@datagouv/components-next 0.0.28 → 0.0.30
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 +0 -2
- package/dist/{JsonPreview.client-CTVlEXLB.js → JsonPreview.client-DEoTeNS0.js} +1 -1
- package/dist/{MapContainer.client-OzbKd1q2.js → MapContainer.client-CNmXA5i0.js} +1 -1
- package/dist/{PdfPreview.client-BJCj1V2Y.js → PdfPreview.client-CsVdmxPR.js} +1 -1
- package/dist/{Pmtiles.client-BP1vaS18.js → Pmtiles.client-GgcBwFa0.js} +1 -1
- package/dist/Swagger.client-2tUSrvmQ.js +4 -0
- package/dist/{XmlPreview.client-CFz4_AKn.js → XmlPreview.client-C0lxnMVl.js} +2 -2
- package/dist/components-next.js +1 -1
- package/dist/components.css +1 -1
- package/dist/{main-DsdzSeFn.js → main-D5CXGAAc.js} +1397 -1393
- package/dist/{vue3-xml-viewer.common-ekkwEa2k.js → vue3-xml-viewer.common-WmBgOZ5X.js} +1 -1
- package/package.json +1 -1
- package/src/components/DatasetCard.vue +8 -3
- package/src/config.ts +0 -1
- package/src/functions/datasets.ts +1 -1
- package/dist/Swagger.client-DxtT4qu8.js +0 -4
- package/src/functions/config.ts +0 -12
package/package.json
CHANGED
|
@@ -57,12 +57,16 @@
|
|
|
57
57
|
>
|
|
58
58
|
<AppLink
|
|
59
59
|
:to="datasetUrl"
|
|
60
|
-
class="text-gray-title text-base bg-none flex truncate"
|
|
60
|
+
class="text-gray-title text-base bg-none flex w-full truncate"
|
|
61
|
+
:target="datasetUrlInNewTab ? '_blank' : undefined"
|
|
61
62
|
>
|
|
62
|
-
<span
|
|
63
|
+
<span
|
|
64
|
+
class="block truncate"
|
|
65
|
+
:class="dataset.acronym ? 'flex-initial' : 'flex-1'"
|
|
66
|
+
>{{ dataset.title }}</span>
|
|
63
67
|
<small
|
|
64
68
|
v-if="dataset.acronym"
|
|
65
|
-
class="flex-
|
|
69
|
+
class="flex-1 ml-2"
|
|
66
70
|
>{{ dataset.acronym }}</small>
|
|
67
71
|
<span class="absolute inset-0" />
|
|
68
72
|
</AppLink>
|
|
@@ -182,6 +186,7 @@ import AppLink from './AppLink.vue'
|
|
|
182
186
|
* It is used as a separate prop to allow other sites using the package to define their own dataset pages.
|
|
183
187
|
*/
|
|
184
188
|
datasetUrl: RouteLocationRaw
|
|
189
|
+
datasetUrlInNewTab?: boolean
|
|
185
190
|
|
|
186
191
|
/**
|
|
187
192
|
* The organizationUrl is an optional route location object to allow Vue Router to navigate to the details of the organization linked to tha dataset.
|
package/src/config.ts
CHANGED
|
@@ -11,7 +11,7 @@ function constructUrl(baseUrl: string, path: string): string {
|
|
|
11
11
|
export default function getDatasetOEmbedHtml(type: string, id: string): string {
|
|
12
12
|
const config = useComponentsConfig()
|
|
13
13
|
|
|
14
|
-
const staticUrl = constructUrl(config.
|
|
14
|
+
const staticUrl = constructUrl(config.baseUrl, 'oembed.js')
|
|
15
15
|
return `<div data-udata-${type}="${id}"></div><script data-udata="${config.baseUrl}" src="${staticUrl}" async defer></script>`
|
|
16
16
|
}
|
|
17
17
|
|
package/src/functions/config.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { ref } from 'vue'
|
|
2
|
-
|
|
3
|
-
export type ComponentsConfig = {
|
|
4
|
-
staticUrl: string
|
|
5
|
-
baseApiUrl: string
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export const config = ref<ComponentsConfig | null>(null)
|
|
9
|
-
|
|
10
|
-
export function setConfig(newConfig: ComponentsConfig) {
|
|
11
|
-
config.value = newConfig
|
|
12
|
-
}
|