# Core Services
# Context helpers aka $mapo
To make helper functions available across your app, Mapo inject some juice into Vue instances (client side), the context (server side) and even in the Vuex store. Following nuxt convention to prefix those functions with a $, you can find those helpers under the name $mapo.
The $mapo service can be accessed from context and this in pages, components, plugins, and store actions.
# Typedefs
- SnackMessage :
SnackMessage
The payload that need to be sent to the store in order to make the snack appear.
- ConfirmDialogOptions :
ConfirmDialogOptions
The payload for the open function of the ConfirmDialog.
- MapoRequestConfig :
MapoRequestConfig
Additional option configuration. Here you can configure some mapo reserved options.
# SnackMessage : SnackMessage
The payload that need to be sent to the store in order to make the snack appear.
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
message | string | Contains the message to show. |
color | string | Indicates the color of the close button. |
# ConfirmDialogOptions : ConfirmDialogOptions
The payload for the open function of the ConfirmDialog.
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
title | string | The title of the dialog. |
question | string | The text in the body of the dialog. |
dismissButton | string | The text in the dismiss Button. |
approveButton | string | The text in the approve Button. |
attrs | Object | An object with props (opens new window) you want to inject into the confirm dialog. |
# MapoRequestConfig : MapoRequestConfig
Additional option configuration. Here you can configure some mapo reserved options.
Kind: global typedef
Properties
Name | Type | Description |
---|---|---|
multipart | string | Set the multipart politic. Accepts 'auto'|'force|'disable' . If auto is set the request is transformed in multipart if any file is in the payload. If set to force the request is transformed in multipart no matter if files are found. If set to 'disable' the request is never transformed in multipart. |