@datagouv/components-next 0.0.26 → 0.0.28
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/dist/{JsonPreview.client-BcEfE_hL.js → JsonPreview.client-CTVlEXLB.js} +1 -1
- package/dist/{MapContainer.client-CnTKaf7m.js → MapContainer.client-OzbKd1q2.js} +1 -1
- package/dist/{PdfPreview.client-CP0aZ7i4.js → PdfPreview.client-BJCj1V2Y.js} +1 -1
- package/dist/{Pmtiles.client-C08OX9MO.js → Pmtiles.client-BP1vaS18.js} +1 -1
- package/dist/Swagger.client-DxtT4qu8.js +4 -0
- package/dist/{XmlPreview.client-B1wI3spd.js → XmlPreview.client-CFz4_AKn.js} +2 -2
- package/dist/components-next.js +1 -1
- package/dist/{main-GTyyeszt.js → main-DsdzSeFn.js} +32185 -31336
- package/dist/{vue3-xml-viewer.common-YFdchaJI.js → vue3-xml-viewer.common-ekkwEa2k.js} +1 -1
- package/package.json +1 -1
- package/src/config.ts +0 -5
- package/src/main.ts +18 -0
- package/dist/Swagger.client-DhNaLxjG.js +0 -4
package/package.json
CHANGED
package/src/config.ts
CHANGED
|
@@ -21,11 +21,6 @@ export type PluginConfig = {
|
|
|
21
21
|
maxJsonPreviewSize?: number // Maximum size of JSON to preview in characters
|
|
22
22
|
maxPdfPreviewSize?: number // Maximum size of PDF to preview in bytes
|
|
23
23
|
maxXmlPreviewSize?: number // Maximum size of XML to preview in characters
|
|
24
|
-
i18n?: {
|
|
25
|
-
global: {
|
|
26
|
-
mergeLocaleMessage: (locale: string, messages: unknown) => void
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
24
|
}
|
|
30
25
|
|
|
31
26
|
export const configKey = Symbol() as InjectionKey<PluginConfig>
|
package/src/main.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { App, Plugin } from 'vue'
|
|
2
|
+
import { createI18n, useI18n } from 'vue-i18n'
|
|
2
3
|
import type { ContactPoint, ContactPointRole } from './types/contact_point.js'
|
|
3
4
|
import type { Badge, Badges } from './types/badges'
|
|
4
5
|
import type { Dataset, DatasetV2, DatasetV2WithFullObject, NewDataset, Quality, Rel } from './types/datasets'
|
|
@@ -118,6 +119,23 @@ const datagouv: Plugin<PluginConfig> = {
|
|
|
118
119
|
const textClamp = await import('vue3-text-clamp')
|
|
119
120
|
options.textClamp = textClamp.default
|
|
120
121
|
}
|
|
122
|
+
try {
|
|
123
|
+
// There is no condition to check if vue-i18n is instancied, only an error...
|
|
124
|
+
useI18n()
|
|
125
|
+
}
|
|
126
|
+
catch {
|
|
127
|
+
const i18n = createI18n({
|
|
128
|
+
legacy: false,
|
|
129
|
+
globalInjection: true,
|
|
130
|
+
locale: 'fr',
|
|
131
|
+
messages: {},
|
|
132
|
+
formatFallbackMessages: true,
|
|
133
|
+
missingWarn: false,
|
|
134
|
+
fallbackFormat: true,
|
|
135
|
+
fallbackWarn: false,
|
|
136
|
+
})
|
|
137
|
+
app.use(i18n)
|
|
138
|
+
}
|
|
121
139
|
},
|
|
122
140
|
}
|
|
123
141
|
|