@volverjs/ui-vue 0.0.3 → 0.0.5-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +1 -1
- package/README.md +54 -15
- package/auto-imports.d.ts +12 -3
- package/bin/icons.cjs +1 -73
- package/dist/Volver.d.ts +23 -11
- package/dist/components/VvAccordion/VvAccordion.es.js +180 -74
- package/dist/components/VvAccordion/VvAccordion.umd.js +1 -1
- package/dist/components/VvAccordion/VvAccordion.vue.d.ts +4 -1
- package/dist/components/VvAccordion/index.d.ts +8 -3
- package/dist/components/VvAccordionGroup/VvAccordionGroup.es.js +280 -122
- package/dist/components/VvAccordionGroup/VvAccordionGroup.umd.js +1 -1
- package/dist/components/VvAccordionGroup/VvAccordionGroup.vue.d.ts +15 -12
- package/dist/components/VvAccordionGroup/index.d.ts +8 -0
- package/dist/components/VvAction/VvAction.es.js +338 -0
- package/dist/components/VvAction/VvAction.umd.js +1 -0
- package/dist/components/VvAction/VvAction.vue.d.ts +63 -0
- package/dist/components/VvAction/index.d.ts +24 -0
- package/dist/components/VvBadge/VvBadge.es.js +251 -22
- package/dist/components/VvBadge/VvBadge.umd.js +1 -1
- package/dist/components/VvBadge/VvBadge.vue.d.ts +2 -2
- package/dist/components/VvBadge/index.d.ts +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.es.js +280 -62
- package/dist/components/VvBreadcrumb/VvBreadcrumb.umd.js +1 -1
- package/dist/components/VvBreadcrumb/VvBreadcrumb.vue.d.ts +11 -11
- package/dist/components/VvBreadcrumb/index.d.ts +1 -1
- package/dist/components/VvButton/VvButton.es.js +720 -261
- package/dist/components/VvButton/VvButton.umd.js +1 -1
- package/dist/components/VvButton/VvButton.vue.d.ts +54 -54
- package/dist/components/VvButton/index.d.ts +30 -75
- package/dist/components/VvButtonGroup/VvButtonGroup.es.js +296 -49
- package/dist/components/VvButtonGroup/VvButtonGroup.umd.js +1 -1
- package/dist/components/VvButtonGroup/VvButtonGroup.vue.d.ts +2 -2
- package/dist/components/VvButtonGroup/index.d.ts +1 -1
- package/dist/components/VvCard/VvCard.es.js +60 -28
- package/dist/components/VvCard/VvCard.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.es.js +630 -172
- package/dist/components/VvCheckbox/VvCheckbox.umd.js +1 -1
- package/dist/components/VvCheckbox/VvCheckbox.vue.d.ts +4 -4
- package/dist/components/VvCheckbox/index.d.ts +6 -6
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.es.js +736 -228
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.umd.js +1 -1
- package/dist/components/VvCheckboxGroup/VvCheckboxGroup.vue.d.ts +9 -9
- package/dist/components/VvCheckboxGroup/index.d.ts +4 -4
- package/dist/components/VvCombobox/VvCombobox.es.js +1673 -768
- package/dist/components/VvCombobox/VvCombobox.umd.js +1 -1
- package/dist/components/VvCombobox/VvCombobox.vue.d.ts +159 -61
- package/dist/components/VvCombobox/index.d.ts +54 -23
- package/dist/components/VvDialog/VvDialog.es.js +426 -115
- package/dist/components/VvDialog/VvDialog.umd.js +1 -1
- package/dist/components/VvDialog/VvDialog.vue.d.ts +12 -3
- package/dist/components/VvDialog/index.d.ts +4 -1
- package/dist/components/VvDropdown/VvDropdown.es.js +504 -190
- package/dist/components/VvDropdown/VvDropdown.umd.js +1 -1
- package/dist/components/VvDropdown/VvDropdown.vue.d.ts +114 -42
- package/dist/components/VvDropdown/VvDropdownAction.vue.d.ts +61 -0
- package/dist/components/VvDropdown/VvDropdownOption.vue.d.ts +52 -0
- package/dist/components/VvDropdown/index.d.ts +35 -14
- package/dist/components/VvDropdownAction/VvDropdownAction.es.js +454 -0
- package/dist/components/VvDropdownAction/VvDropdownAction.umd.js +1 -0
- package/dist/components/VvDropdownItem/VvDropdownItem.es.js +48 -18
- package/dist/components/VvDropdownItem/VvDropdownItem.umd.js +1 -1
- package/dist/components/VvDropdownOption/VvDropdownOption.es.js +361 -0
- package/dist/components/VvDropdownOption/VvDropdownOption.umd.js +1 -0
- package/dist/components/VvIcon/VvIcon.es.js +116 -52
- package/dist/components/VvIcon/VvIcon.umd.js +1 -1
- package/dist/components/VvIcon/VvIcon.vue.d.ts +7 -7
- package/dist/components/VvIcon/index.d.ts +2 -2
- package/dist/components/VvInputText/VvInputPasswordAction.d.ts +2 -2
- package/dist/components/VvInputText/VvInputStepAction.d.ts +1 -1
- package/dist/components/VvInputText/VvInputText.es.js +1054 -376
- package/dist/components/VvInputText/VvInputText.umd.js +1 -1
- package/dist/components/VvInputText/VvInputText.vue.d.ts +107 -20
- package/dist/components/VvInputText/VvInputTextActions.d.ts +1 -1
- package/dist/components/VvInputText/index.d.ts +67 -3
- package/dist/components/VvProgress/VvProgress.es.js +254 -23
- package/dist/components/VvProgress/VvProgress.umd.js +1 -1
- package/dist/components/VvProgress/VvProgress.vue.d.ts +2 -2
- package/dist/components/VvProgress/index.d.ts +1 -1
- package/dist/components/VvRadio/VvRadio.es.js +568 -137
- package/dist/components/VvRadio/VvRadio.umd.js +1 -1
- package/dist/components/VvRadio/VvRadio.vue.d.ts +4 -4
- package/dist/components/VvRadio/index.d.ts +6 -6
- package/dist/components/VvRadioGroup/VvRadioGroup.es.js +674 -193
- package/dist/components/VvRadioGroup/VvRadioGroup.umd.js +1 -1
- package/dist/components/VvRadioGroup/VvRadioGroup.vue.d.ts +9 -9
- package/dist/components/VvRadioGroup/index.d.ts +4 -4
- package/dist/components/VvSelect/VvSelect.es.js +703 -251
- package/dist/components/VvSelect/VvSelect.umd.js +1 -1
- package/dist/components/VvSelect/VvSelect.vue.d.ts +24 -17
- package/dist/components/VvSelect/index.d.ts +8 -8
- package/dist/components/VvTextarea/VvTextarea.es.js +747 -272
- package/dist/components/VvTextarea/VvTextarea.umd.js +1 -1
- package/dist/components/VvTextarea/VvTextarea.vue.d.ts +21 -14
- package/dist/components/VvTextarea/index.d.ts +7 -7
- package/dist/components/VvTooltip/VvTooltip.es.js +252 -24
- package/dist/components/VvTooltip/VvTooltip.umd.js +1 -1
- package/dist/components/VvTooltip/VvTooltip.vue.d.ts +7 -7
- package/dist/components/VvTooltip/index.d.ts +2 -2
- package/dist/components/index.es.js +3676 -2007
- package/dist/components/index.umd.js +1 -1
- package/dist/composables/dropdown/useInjectDropdown.d.ts +1 -1
- package/dist/composables/dropdown/useProvideDropdown.d.ts +3 -3
- package/dist/composables/group/useInjectedGroupState.d.ts +2 -2
- package/dist/composables/group/useProvideGroupState.d.ts +1 -1
- package/dist/composables/useComponentFocus.d.ts +1 -1
- package/dist/composables/useComponentIcon.d.ts +7 -7
- package/dist/composables/useDebouncedInput.d.ts +4 -1
- package/dist/composables/useDefaults.d.ts +2 -0
- package/dist/composables/useModifiers.d.ts +1 -1
- package/dist/composables/useOptions.d.ts +2 -2
- package/dist/composables/useTextCount.d.ts +3 -3
- package/dist/composables/useUniqueId.d.ts +1 -1
- package/dist/composables/useVolver.d.ts +1 -1
- package/dist/constants.d.ts +30 -0
- package/dist/directives/index.es.js +288 -0
- package/dist/directives/index.umd.js +1 -0
- package/dist/directives/v-tooltip.es.js +285 -0
- package/dist/directives/v-tooltip.umd.js +1 -0
- package/dist/icons.es.js +38 -23
- package/dist/icons.umd.js +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.es.js +115 -3269
- package/dist/index.umd.js +1 -1
- package/dist/props/index.d.ts +215 -23
- package/dist/resolvers/unplugin.d.ts +14 -8
- package/dist/resolvers/unplugin.es.js +94 -33
- package/dist/resolvers/unplugin.umd.js +1 -1
- package/dist/stories/Combobox/Combobox.settings.d.ts +44 -0
- package/dist/stories/Dropdown/Dropdown.settings.d.ts +3 -2
- package/dist/stories/InputText/InputText.settings.d.ts +53 -0
- package/dist/stories/argTypes.d.ts +1 -1
- package/package.json +167 -63
- package/src/Volver.ts +60 -26
- package/src/assets/icons/detailed.json +1 -1
- package/src/assets/icons/normal.json +1 -1
- package/src/assets/icons/simple.json +1 -1
- package/src/components/VvAccordion/VvAccordion.vue +19 -22
- package/src/components/VvAccordion/index.ts +12 -4
- package/src/components/VvAccordionGroup/VvAccordionGroup.vue +19 -10
- package/src/components/VvAccordionGroup/index.ts +8 -0
- package/src/components/VvAction/VvAction.vue +144 -0
- package/src/components/VvAction/index.ts +5 -0
- package/src/components/VvBadge/VvBadge.vue +2 -2
- package/src/components/VvBadge/index.ts +1 -1
- package/src/components/VvBreadcrumb/VvBreadcrumb.vue +3 -3
- package/src/components/VvButton/VvButton.vue +41 -124
- package/src/components/VvButton/index.ts +16 -88
- package/src/components/VvButtonGroup/VvButtonGroup.vue +4 -7
- package/src/components/VvButtonGroup/index.ts +1 -1
- package/src/components/VvCard/VvCard.vue +2 -2
- package/src/components/VvCheckbox/VvCheckbox.vue +3 -7
- package/src/components/VvCheckbox/index.ts +11 -7
- package/src/components/VvCheckboxGroup/VvCheckboxGroup.vue +7 -10
- package/src/components/VvCheckboxGroup/index.ts +1 -1
- package/src/components/VvCombobox/VvCombobox.vue +85 -57
- package/src/components/VvCombobox/index.ts +12 -10
- package/src/components/VvDialog/VvDialog.vue +28 -11
- package/src/components/VvDialog/index.ts +5 -2
- package/src/components/VvDropdown/VvDropdown.vue +6 -5
- package/src/components/VvDropdown/VvDropdownAction.vue +46 -0
- package/src/components/VvDropdown/VvDropdownOption.vue +72 -0
- package/src/components/VvDropdown/index.ts +6 -11
- package/src/components/VvIcon/VvIcon.vue +3 -3
- package/src/components/VvIcon/index.ts +3 -3
- package/src/components/VvInputText/VvInputClearAction.ts +2 -2
- package/src/components/VvInputText/VvInputPasswordAction.ts +3 -4
- package/src/components/VvInputText/VvInputStepAction.ts +3 -2
- package/src/components/VvInputText/VvInputText.vue +128 -35
- package/src/components/VvInputText/VvInputTextActions.ts +5 -8
- package/src/components/VvInputText/index.ts +62 -1
- package/src/components/VvProgress/VvProgress.vue +2 -2
- package/src/components/VvProgress/index.ts +1 -1
- package/src/components/VvRadio/VvRadio.vue +3 -7
- package/src/components/VvRadio/index.ts +11 -7
- package/src/components/VvRadioGroup/VvRadioGroup.vue +7 -10
- package/src/components/VvRadioGroup/index.ts +1 -1
- package/src/components/VvSelect/VvSelect.vue +4 -4
- package/src/components/VvSelect/index.ts +3 -5
- package/src/components/VvTextarea/VvTextarea.vue +4 -4
- package/src/components/VvTextarea/index.ts +1 -1
- package/src/components/VvTooltip/VvTooltip.vue +2 -2
- package/src/components/VvTooltip/index.ts +3 -3
- package/src/composables/dropdown/useInjectDropdown.ts +2 -2
- package/src/composables/dropdown/useProvideDropdown.ts +9 -11
- package/src/composables/group/useInjectedGroupState.ts +1 -1
- package/src/composables/group/useProvideGroupState.ts +1 -1
- package/src/composables/useComponentIcon.ts +1 -1
- package/src/composables/useDebouncedInput.ts +10 -3
- package/src/composables/useDefaults.ts +89 -0
- package/src/composables/useModifiers.ts +8 -9
- package/src/composables/useOptions.ts +1 -1
- package/src/composables/useVolver.ts +2 -2
- package/src/constants.ts +36 -0
- package/src/directives/index.ts +1 -1
- package/src/directives/v-tooltip.ts +2 -2
- package/src/index.ts +0 -2
- package/src/props/index.ts +111 -19
- package/src/resolvers/unplugin.ts +96 -49
- package/src/stories/Accordion/Accordion.stories.mdx +8 -2
- package/src/stories/Accordion/Accordion.test.ts +21 -15
- package/src/stories/Accordion/AccordionSlots.stories.mdx +8 -8
- package/src/stories/AccordionGroup/AccordionGroup.stories.mdx +17 -1
- package/src/stories/AccordionGroup/AccordionGroup.test.ts +18 -12
- package/src/stories/AccordionGroup/AccordionGroupSlots.stories.mdx +3 -2
- package/src/stories/Breadcrumb/Breadcrumb.stories.mdx +2 -1
- package/src/stories/Button/Button.stories.mdx +4 -2
- package/src/stories/Button/Button.test.ts +3 -1
- package/src/stories/Button/ButtonModifiers.stories.mdx +2 -2
- package/src/stories/Button/ButtonSlots.stories.mdx +8 -7
- package/src/stories/Button/ButtonState.stories.mdx +2 -11
- package/src/stories/Card/Card.stories.mdx +2 -1
- package/src/stories/Checkbox/Checkbox.stories.mdx +2 -1
- package/src/stories/CheckboxGroup/CheckboxGroup.stories.mdx +2 -1
- package/src/stories/CheckboxGroup/CheckboxGroupSlots.stories.mdx +2 -1
- package/src/stories/Combobox/Combobox.settings.ts +44 -0
- package/src/stories/Combobox/Combobox.stories.mdx +40 -1
- package/src/stories/Dialog/Dialog.stories.mdx +2 -1
- package/src/stories/Dropdown/Dropdown.settings.ts +3 -2
- package/src/stories/Dropdown/Dropdown.stories.mdx +14 -12
- package/src/stories/Dropdown/DropdownMultilevel.stories.mdx +56 -0
- package/src/stories/Dropdown/DropdownSlots.stories.mdx +14 -13
- package/src/stories/Icon/Icon.stories.mdx +2 -1
- package/src/stories/Icon/IconsCollection.stories.mdx +2 -1
- package/src/stories/InputText/InputText.settings.ts +53 -0
- package/src/stories/InputText/InputText.stories.mdx +42 -1
- package/src/stories/InputText/InputText.test.ts +5 -2
- package/src/stories/Progress/Progress.stories.mdx +2 -1
- package/src/stories/Radio/Radio.stories.mdx +2 -1
- package/src/stories/RadioGroup/RadioGroup.stories.mdx +2 -1
- package/src/stories/RadioGroup/RadioGroupSlots.stories.mdx +2 -1
- package/src/stories/Select/Select.stories.mdx +2 -1
- package/src/stories/Textarea/Textarea.stories.mdx +2 -1
- package/src/stories/Tooltip/Tooltip.stories.mdx +2 -1
- package/src/stories/Tooltip/TooltipDirective.stories.mdx +2 -1
- package/src/stories/argTypes.ts +2 -2
- package/src/types/group.d.ts +5 -0
package/src/Volver.ts
CHANGED
|
@@ -6,9 +6,8 @@ import {
|
|
|
6
6
|
type IconifyJSON,
|
|
7
7
|
type PartialIconifyAPIConfig,
|
|
8
8
|
} from '@iconify/vue'
|
|
9
|
-
import type { App, Component, Plugin } from 'vue'
|
|
10
|
-
import { DEFAULT_ICONIFY_PROVIDER, INJECTION_KEY_VOLVER } from '
|
|
11
|
-
import directives from '@/directives'
|
|
9
|
+
import type { App, Component, Directive, Plugin, Ref } from 'vue'
|
|
10
|
+
import { DEFAULT_ICONIFY_PROVIDER, INJECTION_KEY_VOLVER } from './constants'
|
|
12
11
|
|
|
13
12
|
export function useDefaultProps(
|
|
14
13
|
component: Component,
|
|
@@ -84,7 +83,7 @@ export type VolverOptions = {
|
|
|
84
83
|
* @see https://docs.iconify.design/icon-components/vue/add-collection.html
|
|
85
84
|
* @default 'vv'
|
|
86
85
|
*/
|
|
87
|
-
|
|
86
|
+
iconsProvider?: string
|
|
88
87
|
/**
|
|
89
88
|
* Components to install
|
|
90
89
|
*/
|
|
@@ -93,6 +92,10 @@ export type VolverOptions = {
|
|
|
93
92
|
* Alias to install
|
|
94
93
|
*/
|
|
95
94
|
aliases?: Record<string, Component>
|
|
95
|
+
/**
|
|
96
|
+
* Directives to install
|
|
97
|
+
*/
|
|
98
|
+
directives?: Record<string, Directive>
|
|
96
99
|
/**
|
|
97
100
|
* Default props for components
|
|
98
101
|
*/
|
|
@@ -122,19 +125,19 @@ export interface VolverInterface {
|
|
|
122
125
|
*/
|
|
123
126
|
addIcon(name: string, data: IconifyIcon): boolean
|
|
124
127
|
/**
|
|
125
|
-
* Add custom config for provider
|
|
128
|
+
* Add custom config for icons provider
|
|
126
129
|
* @param {String} provider
|
|
127
130
|
* @param {PartialIconifyAPIConfig} customConfig
|
|
128
131
|
* @returns {Boolean} true on success, false if something is wrong with data
|
|
129
132
|
*/
|
|
130
|
-
|
|
133
|
+
addIconsAPIProvider(
|
|
131
134
|
provider: string,
|
|
132
135
|
customConfig: PartialIconifyAPIConfig,
|
|
133
136
|
): boolean
|
|
134
137
|
/**
|
|
135
138
|
* Current provider
|
|
136
139
|
*/
|
|
137
|
-
|
|
140
|
+
iconsProvider: string
|
|
138
141
|
/**
|
|
139
142
|
* Array of installed iconify collections
|
|
140
143
|
* @see https://docs.iconify.design/types/iconify-json.html
|
|
@@ -144,55 +147,82 @@ export interface VolverInterface {
|
|
|
144
147
|
* Set true inside nuxt
|
|
145
148
|
*/
|
|
146
149
|
nuxt: boolean
|
|
150
|
+
/**
|
|
151
|
+
* Components defaults options
|
|
152
|
+
*/
|
|
153
|
+
defaults: Ref<DefaultOptions>
|
|
147
154
|
}
|
|
148
155
|
|
|
149
156
|
export class Volver implements VolverInterface {
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
157
|
+
private _fetchOptions: RequestInit = {}
|
|
158
|
+
private _iconsCollections: IconifyJSON[] = []
|
|
159
|
+
private _iconsProvider = DEFAULT_ICONIFY_PROVIDER
|
|
160
|
+
private _nuxt = false
|
|
161
|
+
defaults: Ref<DefaultOptions> = ref({})
|
|
154
162
|
|
|
155
163
|
constructor({
|
|
156
164
|
fetchWithCredentials,
|
|
157
165
|
fetchOptions,
|
|
158
|
-
|
|
166
|
+
iconsProvider,
|
|
159
167
|
nuxt,
|
|
160
168
|
iconsCollections,
|
|
169
|
+
defaults,
|
|
161
170
|
}: VolverOptions = {}) {
|
|
162
171
|
// fetch options
|
|
163
172
|
if (fetchOptions) {
|
|
164
|
-
this.
|
|
173
|
+
this._fetchOptions = fetchOptions
|
|
165
174
|
}
|
|
166
175
|
// fetch with credentials sugar syntax
|
|
167
176
|
if (fetchWithCredentials) {
|
|
168
|
-
this.
|
|
177
|
+
this._fetchOptions = {
|
|
178
|
+
...this._fetchOptions,
|
|
179
|
+
credentials: 'include',
|
|
180
|
+
}
|
|
169
181
|
}
|
|
170
182
|
// default iconify provider
|
|
171
|
-
if (
|
|
172
|
-
this.
|
|
183
|
+
if (iconsProvider) {
|
|
184
|
+
this._iconsProvider = iconsProvider
|
|
173
185
|
}
|
|
174
186
|
// enable nuxt mode
|
|
175
187
|
if (nuxt) {
|
|
176
|
-
this.
|
|
188
|
+
this._nuxt = nuxt
|
|
177
189
|
}
|
|
178
190
|
// add iconify collections
|
|
179
191
|
if (iconsCollections && Array.isArray(iconsCollections)) {
|
|
180
192
|
iconsCollections.forEach((iconsCollection) => {
|
|
181
|
-
this.addCollection(iconsCollection, this.
|
|
193
|
+
this.addCollection(iconsCollection, this._iconsProvider)
|
|
182
194
|
})
|
|
183
195
|
}
|
|
196
|
+
if (defaults) {
|
|
197
|
+
this.defaults.value = defaults
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
get nuxt(): boolean {
|
|
202
|
+
return this._nuxt
|
|
184
203
|
}
|
|
185
204
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
205
|
+
get iconsProvider(): string {
|
|
206
|
+
return this._iconsProvider
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
get iconsCollections(): IconifyJSON[] {
|
|
210
|
+
return this._iconsCollections
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
addCollection(
|
|
214
|
+
collection: IconifyJSON,
|
|
215
|
+
providerName: string = this._iconsProvider,
|
|
216
|
+
): boolean {
|
|
217
|
+
this._iconsCollections.push(collection)
|
|
218
|
+
return addCollection(collection, providerName)
|
|
189
219
|
}
|
|
190
220
|
|
|
191
221
|
addIcon(name: string, data: IconifyIcon): boolean {
|
|
192
222
|
return addIcon(name, data)
|
|
193
223
|
}
|
|
194
224
|
|
|
195
|
-
|
|
225
|
+
addIconsAPIProvider(
|
|
196
226
|
provider: string,
|
|
197
227
|
customConfig: PartialIconifyAPIConfig,
|
|
198
228
|
): boolean {
|
|
@@ -204,7 +234,7 @@ export class Volver implements VolverInterface {
|
|
|
204
234
|
options: RequestInit = { cache: 'force-cache' },
|
|
205
235
|
): Promise<string | undefined> {
|
|
206
236
|
return new Promise((resolve, reject) => {
|
|
207
|
-
fetch(src, { ...this.
|
|
237
|
+
fetch(src, { ...this._fetchOptions, ...options })
|
|
208
238
|
.catch((e) => reject(e))
|
|
209
239
|
.then((response) => response?.text())
|
|
210
240
|
.then((svg?: string) => resolve(svg))
|
|
@@ -224,6 +254,7 @@ const VolverPlugin: Plugin = {
|
|
|
224
254
|
// register global methods
|
|
225
255
|
app.config.globalProperties.$vv = volver
|
|
226
256
|
|
|
257
|
+
// register components
|
|
227
258
|
if (options.components) {
|
|
228
259
|
Object.entries(options.components).forEach(([name, component]) => {
|
|
229
260
|
app.component(
|
|
@@ -233,6 +264,7 @@ const VolverPlugin: Plugin = {
|
|
|
233
264
|
})
|
|
234
265
|
}
|
|
235
266
|
|
|
267
|
+
// register aliases
|
|
236
268
|
if (options.aliases) {
|
|
237
269
|
Object.entries(options.aliases).forEach(([name, component]) => {
|
|
238
270
|
app.component(
|
|
@@ -243,9 +275,11 @@ const VolverPlugin: Plugin = {
|
|
|
243
275
|
}
|
|
244
276
|
|
|
245
277
|
// register directives
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
278
|
+
if (options.directives) {
|
|
279
|
+
Object.entries(options.directives).forEach(([name, directive]) => {
|
|
280
|
+
app.directive(name, directive)
|
|
281
|
+
})
|
|
282
|
+
}
|
|
249
283
|
|
|
250
284
|
// provide volver to components
|
|
251
285
|
app.provide(INJECTION_KEY_VOLVER, volver)
|