@datagouv/components-next 0.0.25 → 0.0.27
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-D7nu4jr7.js → JsonPreview.client-LKxB-065.js} +1 -1
- package/dist/{MapContainer.client-DRQQqp1n.js → MapContainer.client-D9eDI4Vb.js} +1 -1
- package/dist/{PdfPreview.client-j2TDRZe5.js → PdfPreview.client-Beh_siOr.js} +1 -1
- package/dist/{Pmtiles.client-bGQAS7Bw.js → Pmtiles.client-C-jRjbtQ.js} +1 -1
- package/dist/Swagger.client-B5lyf4lI.js +4 -0
- package/dist/{XmlPreview.client-K2hRL5s7.js → XmlPreview.client-C6J-DwQf.js} +2 -2
- package/dist/components-next.js +57 -56
- package/dist/components.css +1 -1
- package/dist/{main-qCXX5fcf.js → main-CZXf5f3h.js} +23253 -22394
- package/dist/{vue3-xml-viewer.common-BZLPbkUq.js → vue3-xml-viewer.common-Bb5dDJsR.js} +1 -1
- package/package.json +1 -1
- package/src/components/AnimatedLoader.vue +19 -0
- package/src/components/BrandedButton.vue +2 -1
- package/src/main.ts +17 -0
- package/dist/Swagger.client-CzgEk61z.js +0 -4
package/package.json
CHANGED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { RiLoader5Line } from '@remixicon/vue'
|
|
3
|
+
|
|
4
|
+
withDefaults(defineProps<{
|
|
5
|
+
color?: 'primary' | 'white'
|
|
6
|
+
}>(), {
|
|
7
|
+
color: 'primary',
|
|
8
|
+
})
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<RiLoader5Line
|
|
13
|
+
class=" text-7xl animate-spin"
|
|
14
|
+
:class="{
|
|
15
|
+
'text-primary': color === 'primary',
|
|
16
|
+
'text-white': color === 'white',
|
|
17
|
+
}"
|
|
18
|
+
/>
|
|
19
|
+
</template>
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
:target="newTab ? '_blank' : undefined"
|
|
12
12
|
:type
|
|
13
13
|
>
|
|
14
|
-
<
|
|
14
|
+
<AnimatedLoader
|
|
15
15
|
v-if="loading"
|
|
16
16
|
size="16"
|
|
17
17
|
:color="color === 'primary' ? 'white' : 'primary'"
|
|
@@ -51,6 +51,7 @@ import { RiExternalLinkLine } from '@remixicon/vue'
|
|
|
51
51
|
import type { RouteLocation } from 'vue-router'
|
|
52
52
|
import AppLink from './AppLink.vue'
|
|
53
53
|
import { bannerActionTypeKey } from './BannerAction.vue'
|
|
54
|
+
import AnimatedLoader from './AnimatedLoader.vue'
|
|
54
55
|
|
|
55
56
|
type ColorType = 'primary' | 'primary-soft' | 'primary-softer' | 'secondary' | 'secondary-softer' | 'warning' | 'danger' | 'tertiary'
|
|
56
57
|
|
package/src/main.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { App, Plugin } from 'vue'
|
|
2
|
+
import { createI18n } 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'
|
|
@@ -16,6 +17,7 @@ import type { Site } from './types/site'
|
|
|
16
17
|
import type { Weight, WellType } from './types/ui'
|
|
17
18
|
import type { User } from './types/users'
|
|
18
19
|
|
|
20
|
+
import AnimatedLoader from './components/AnimatedLoader.vue'
|
|
19
21
|
import AppLink from './components/AppLink.vue'
|
|
20
22
|
import Avatar from './components/Avatar.vue'
|
|
21
23
|
import AvatarWithName from './components/AvatarWithName.vue'
|
|
@@ -117,12 +119,27 @@ const datagouv: Plugin<PluginConfig> = {
|
|
|
117
119
|
const textClamp = await import('vue3-text-clamp')
|
|
118
120
|
options.textClamp = textClamp.default
|
|
119
121
|
}
|
|
122
|
+
if (!options.i18n) {
|
|
123
|
+
const i18n = createI18n({
|
|
124
|
+
legacy: false,
|
|
125
|
+
globalInjection: true,
|
|
126
|
+
locale: 'fr',
|
|
127
|
+
messages: {},
|
|
128
|
+
formatFallbackMessages: true,
|
|
129
|
+
missingWarn: false,
|
|
130
|
+
fallbackFormat: true,
|
|
131
|
+
fallbackWarn: false,
|
|
132
|
+
})
|
|
133
|
+
options.i18n = i18n
|
|
134
|
+
app.use(i18n)
|
|
135
|
+
}
|
|
120
136
|
},
|
|
121
137
|
}
|
|
122
138
|
|
|
123
139
|
export {
|
|
124
140
|
datagouv,
|
|
125
141
|
useComponentsConfig,
|
|
142
|
+
AnimatedLoader,
|
|
126
143
|
AppLink,
|
|
127
144
|
Avatar,
|
|
128
145
|
AvatarWithName,
|