fds-vue-core 6.2.8 → 6.2.11
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/README.md +6 -7
- package/dist/fds-vue-core.cjs.js +198 -545
- package/dist/fds-vue-core.cjs.js.map +1 -1
- package/dist/fds-vue-core.es.js +198 -545
- package/dist/fds-vue-core.es.js.map +1 -1
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/package.json +4 -2
- package/src/components/FdsWeekCalendar/FdsWeekCalendar.vue +11 -4
- package/src/components/FdsWeekCalendar/WeekDay.vue +5 -3
- package/src/components/FdsWeekCalendar/weekCalendar.utils.ts +7 -15
- package/src/components/FdsWizard/FdsWizard.vue +2 -1
- package/src/components/FdsWizard/types.ts +1 -0
- package/src/index.ts +12 -1
- package/src/lang/en.json +6 -0
- package/src/lang/sv.json +6 -0
- package/src/plugin/i18n.ts +15 -0
- package/src/plugin/useFdsI18n.ts +40 -0
package/README.md
CHANGED
|
@@ -44,12 +44,16 @@ export default {
|
|
|
44
44
|
import { createApp } from 'vue'
|
|
45
45
|
import App from './App.vue'
|
|
46
46
|
import FdsVueCore from 'fds-vue-core'
|
|
47
|
+
import i18n from './i18n'
|
|
47
48
|
|
|
48
49
|
const app = createApp(App)
|
|
49
|
-
app.use(
|
|
50
|
+
app.use(i18n)
|
|
51
|
+
app.use(FdsVueCore, { i18n })
|
|
50
52
|
app.mount('#app')
|
|
51
53
|
```
|
|
52
54
|
|
|
55
|
+
If your app already installs Vue I18n globally, components can use that directly. Passing `{ i18n }` to `FdsVueCore` additionally makes the i18n instance available via the provided `FDS_VUE_CORE_I18N_KEY` injection key for components/composables inside this library.
|
|
56
|
+
|
|
53
57
|
## Usage
|
|
54
58
|
|
|
55
59
|
After registration, you can use components directly in your templates:
|
|
@@ -84,12 +88,7 @@ const handleGo = (payload: { route: { routeName: string } }) => {
|
|
|
84
88
|
</script>
|
|
85
89
|
|
|
86
90
|
<template>
|
|
87
|
-
<FdsWizard
|
|
88
|
-
:routes="wizardRoutes"
|
|
89
|
-
:activeRouteName="activeRouteName"
|
|
90
|
-
:completedTo="0"
|
|
91
|
-
@go="handleGo"
|
|
92
|
-
>
|
|
91
|
+
<FdsWizard :routes="wizardRoutes" :activeRouteName="activeRouteName" :completedTo="0" @go="handleGo">
|
|
93
92
|
<template #default="{ currentRoute, currentStepIndex, nextStep, previousStep }">
|
|
94
93
|
<p>Current step: {{ currentRoute?.name }}</p>
|
|
95
94
|
<button @click="previousStep">Previous</button>
|