@piveau/piveau-hub-ui-modules 4.9.1 → 4.9.2
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/datasetDetails/properties/DatasetDetailsProperties.vue.d.ts +3 -0
- package/dist/datasetDetails/properties/DatasetDetailsProperties.vue.mjs +85 -54
- package/dist/datasetDetails/properties/DatasetDetailsProperties.vue.mjs.map +1 -1
- package/dist/datasetDetails/properties/DatasetDetailsProperty.vue.mjs +51 -46
- package/dist/datasetDetails/properties/DatasetDetailsProperty.vue.mjs.map +1 -1
- package/dist/datasetDetails/properties/specification.d.ts +1 -1
- package/dist/datasetDetails/properties/specification.mjs +3 -3
- package/dist/datasetDetails/properties/specification.mjs.map +1 -1
- package/dist/piveau-hub-ui-modules.css +1 -1
- package/package.json +1 -1
|
@@ -215,6 +215,9 @@ declare const _default: import('vue').DefineComponent<{}, {}, {
|
|
|
215
215
|
};
|
|
216
216
|
propertyFields(): string;
|
|
217
217
|
fieldsArray(): string[];
|
|
218
|
+
regularFields(): string[];
|
|
219
|
+
catalogRecordFields(): "catalogRecord"[];
|
|
220
|
+
hasCatalogRecord(): boolean;
|
|
218
221
|
showMoreVisible(): boolean;
|
|
219
222
|
getDatasetDescriptionHeight: import('vuex').Computed;
|
|
220
223
|
}, {
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { mapGetters as
|
|
2
|
-
import
|
|
3
|
-
import { dcatSchema as
|
|
4
|
-
import { resolveComponent as
|
|
1
|
+
import { mapGetters as P } from "vuex";
|
|
2
|
+
import T from "./DatasetDetailsProperty.vue.mjs";
|
|
3
|
+
import { dcatSchema as R, dcatDeSchema as A, dcatFields as C, dcatDeFields as E } from "./specification.mjs";
|
|
4
|
+
import { resolveComponent as D, openBlock as s, createElementBlock as g, createElementVNode as m, renderSlot as u, createVNode as I, createTextVNode as a, withDirectives as S, Fragment as w, renderList as k, createBlock as H, createCommentVNode as x, vShow as F } from "vue";
|
|
5
5
|
import "./DatasetDetailsProperties.vue2.mjs";
|
|
6
|
-
import
|
|
7
|
-
const
|
|
6
|
+
import M from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
7
|
+
const N = {
|
|
8
8
|
name: "DatasetDetailsProperties",
|
|
9
9
|
components: {
|
|
10
|
-
DatasetDetailsProperty:
|
|
10
|
+
DatasetDetailsProperty: T
|
|
11
11
|
},
|
|
12
12
|
data() {
|
|
13
13
|
return {
|
|
@@ -18,19 +18,28 @@ const $ = {
|
|
|
18
18
|
};
|
|
19
19
|
},
|
|
20
20
|
computed: {
|
|
21
|
-
...
|
|
21
|
+
...P("datasetDetails", [
|
|
22
22
|
"getDatasetDescriptionHeight"
|
|
23
23
|
]),
|
|
24
24
|
fieldSchema() {
|
|
25
|
-
return Object.assign(
|
|
25
|
+
return Object.assign(R(this.i18n.global.t), A());
|
|
26
26
|
},
|
|
27
27
|
propertyFields() {
|
|
28
|
-
var
|
|
29
|
-
let
|
|
30
|
-
return (!
|
|
28
|
+
var r, y;
|
|
29
|
+
let t = (y = (r = this.$env.content) == null ? void 0 : r.datasetDetails) == null ? void 0 : y.properties;
|
|
30
|
+
return (!t || t === "") && (t = C, this.$env.content.dataProviderInterface.specification === "dcatapde" && (t += "," + E)), t;
|
|
31
31
|
},
|
|
32
32
|
fieldsArray() {
|
|
33
|
-
return this.propertyFields.split(",").map((
|
|
33
|
+
return this.propertyFields.split(",").map((t) => t.trim());
|
|
34
|
+
},
|
|
35
|
+
regularFields() {
|
|
36
|
+
return this.fieldsArray.filter((t) => t !== "catalogRecord");
|
|
37
|
+
},
|
|
38
|
+
catalogRecordFields() {
|
|
39
|
+
return this.fieldsArray.filter((t) => t === "catalogRecord");
|
|
40
|
+
},
|
|
41
|
+
hasCatalogRecord() {
|
|
42
|
+
return this.fieldsArray.includes("catalogRecord");
|
|
34
43
|
},
|
|
35
44
|
showMoreVisible() {
|
|
36
45
|
return this.initialHeight > this.restrictedHeight;
|
|
@@ -59,65 +68,87 @@ const $ = {
|
|
|
59
68
|
role: "tablist",
|
|
60
69
|
id: "myTab"
|
|
61
70
|
}, O = {
|
|
71
|
+
key: 0,
|
|
72
|
+
class: "dsd-catalog-record-separator"
|
|
73
|
+
}, q = {
|
|
62
74
|
class: "additional-information-overlay",
|
|
63
75
|
ref: "overlay"
|
|
64
76
|
};
|
|
65
|
-
function
|
|
66
|
-
const
|
|
67
|
-
return
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
title:
|
|
72
|
-
arrowDown: !
|
|
77
|
+
function z(t, r, y, J, l, e) {
|
|
78
|
+
const V = D("dataset-details-feature-header"), v = D("dataset-details-property"), _ = D("pv-show-more");
|
|
79
|
+
return s(), g("div", B, [
|
|
80
|
+
m("div", L, [
|
|
81
|
+
u(t.$slots, "property-header", {}, () => [
|
|
82
|
+
I(V, {
|
|
83
|
+
title: t.$t("message.datasetDetails.additionalInfo"),
|
|
84
|
+
arrowDown: !l.infoVisible,
|
|
73
85
|
tag: "additional-information-toggle",
|
|
74
|
-
onClick:
|
|
86
|
+
onClick: e.toggleInfo
|
|
75
87
|
}, null, 8, ["title", "arrowDown", "onClick"])
|
|
76
88
|
], !0),
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
(
|
|
84
|
-
var
|
|
85
|
-
return
|
|
86
|
-
name:
|
|
87
|
-
translate: (
|
|
88
|
-
type: (
|
|
89
|
-
propertyFields: (
|
|
90
|
-
track: (
|
|
91
|
-
itemstyles: (
|
|
92
|
-
preTransform: (
|
|
93
|
-
transform: (
|
|
94
|
-
key:
|
|
89
|
+
r[6] || (r[6] = a()),
|
|
90
|
+
S(m("div", j, [
|
|
91
|
+
u(t.$slots, "property-table-before", {}, void 0, !0),
|
|
92
|
+
r[3] || (r[3] = a()),
|
|
93
|
+
u(t.$slots, "property-table", {}, () => [
|
|
94
|
+
m("table", G, [
|
|
95
|
+
(s(!0), g(w, null, k(e.regularFields, (i, b) => {
|
|
96
|
+
var d, o, n, p, h, f, c;
|
|
97
|
+
return s(), H(v, {
|
|
98
|
+
name: i,
|
|
99
|
+
translate: (d = e.fieldSchema[i]) == null ? void 0 : d.translate,
|
|
100
|
+
type: (o = e.fieldSchema[i]) == null ? void 0 : o.type,
|
|
101
|
+
propertyFields: (n = e.fieldSchema[i]) == null ? void 0 : n.fields,
|
|
102
|
+
track: (p = e.fieldSchema[i]) == null ? void 0 : p.track,
|
|
103
|
+
itemstyles: (h = e.fieldSchema[i]) == null ? void 0 : h.itemstyles,
|
|
104
|
+
preTransform: (f = e.fieldSchema[i]) == null ? void 0 : f.preTransform,
|
|
105
|
+
transform: (c = e.fieldSchema[i]) == null ? void 0 : c.transform,
|
|
106
|
+
key: `${i}-${b}`
|
|
107
|
+
}, null, 8, ["name", "translate", "type", "propertyFields", "track", "itemstyles", "preTransform", "transform"]);
|
|
108
|
+
}), 128)),
|
|
109
|
+
r[1] || (r[1] = a()),
|
|
110
|
+
e.hasCatalogRecord ? (s(), g("tr", O, [...r[0] || (r[0] = [
|
|
111
|
+
m("hr", { class: "dsd-catalog-record-divider" }, null, -1)
|
|
112
|
+
])])) : x("", !0),
|
|
113
|
+
r[2] || (r[2] = a()),
|
|
114
|
+
(s(!0), g(w, null, k(e.catalogRecordFields, (i, b) => {
|
|
115
|
+
var d, o, n, p, h, f, c;
|
|
116
|
+
return s(), H(v, {
|
|
117
|
+
name: i,
|
|
118
|
+
translate: (d = e.fieldSchema[i]) == null ? void 0 : d.translate,
|
|
119
|
+
type: (o = e.fieldSchema[i]) == null ? void 0 : o.type,
|
|
120
|
+
propertyFields: (n = e.fieldSchema[i]) == null ? void 0 : n.fields,
|
|
121
|
+
track: (p = e.fieldSchema[i]) == null ? void 0 : p.track,
|
|
122
|
+
itemstyles: (h = e.fieldSchema[i]) == null ? void 0 : h.itemstyles,
|
|
123
|
+
preTransform: (f = e.fieldSchema[i]) == null ? void 0 : f.preTransform,
|
|
124
|
+
transform: (c = e.fieldSchema[i]) == null ? void 0 : c.transform,
|
|
125
|
+
key: `${i}-${b}`
|
|
95
126
|
}, null, 8, ["name", "translate", "type", "propertyFields", "track", "itemstyles", "preTransform", "transform"]);
|
|
96
127
|
}), 128))
|
|
97
128
|
], 512)
|
|
98
129
|
], !0),
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
[
|
|
130
|
+
r[4] || (r[4] = a()),
|
|
131
|
+
S(m("div", q, null, 512), [
|
|
132
|
+
[F, e.showMoreVisible && !l.expanded]
|
|
102
133
|
]),
|
|
103
|
-
|
|
104
|
-
|
|
134
|
+
r[5] || (r[5] = a()),
|
|
135
|
+
u(t.$slots, "property-table-after", {}, void 0, !0)
|
|
105
136
|
], 512), [
|
|
106
|
-
[
|
|
137
|
+
[F, l.infoVisible]
|
|
107
138
|
])
|
|
108
139
|
]),
|
|
109
|
-
|
|
110
|
-
|
|
140
|
+
r[7] || (r[7] = a()),
|
|
141
|
+
e.showMoreVisible ? (s(), H(_, {
|
|
111
142
|
key: 0,
|
|
112
|
-
label:
|
|
113
|
-
upArrow:
|
|
114
|
-
action:
|
|
143
|
+
label: l.expanded ? t.$t("message.metadata.showLess") : t.$t("message.metadata.showMore"),
|
|
144
|
+
upArrow: l.expanded,
|
|
145
|
+
action: e.toggleExpanded,
|
|
115
146
|
class: "row text-primary"
|
|
116
|
-
}, null, 8, ["label", "upArrow", "action"])) :
|
|
147
|
+
}, null, 8, ["label", "upArrow", "action"])) : x("", !0)
|
|
117
148
|
]);
|
|
118
149
|
}
|
|
119
|
-
const
|
|
150
|
+
const Z = /* @__PURE__ */ M(N, [["render", z], ["__scopeId", "data-v-fa8729b5"]]);
|
|
120
151
|
export {
|
|
121
|
-
|
|
152
|
+
Z as default
|
|
122
153
|
};
|
|
123
154
|
//# sourceMappingURL=DatasetDetailsProperties.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatasetDetailsProperties.vue.mjs","sources":["../../../lib/datasetDetails/properties/DatasetDetailsProperties.vue"],"sourcesContent":["<template>\n <div class=\"mt-5 dsd-properties\">\n <div class=\"col-12 mb-2 p-0 dsd-properties-list\">\n <slot name=\"property-header\">\n <dataset-details-feature-header :title=\"$t('message.datasetDetails.additionalInfo')\" :arrowDown=\"!infoVisible\"\n tag=\"additional-information-toggle\" :onClick=\"toggleInfo\" />\n </slot>\n <div class=\"position-relative dsd-item additional-information\" data-cy=\"additional-information\"\n v-show=\"infoVisible\">\n <slot name=\"property-table-before\"></slot>\n <slot name=\"property-table\">\n <table class=\"table table-borderless table-responsive\" ref=\"dsdProperties\" role=\"tablist\" id=\"myTab\">\n <dataset-details-property v-for='(name, index) in
|
|
1
|
+
{"version":3,"file":"DatasetDetailsProperties.vue.mjs","sources":["../../../lib/datasetDetails/properties/DatasetDetailsProperties.vue"],"sourcesContent":["<template>\n <div class=\"mt-5 dsd-properties\">\n <div class=\"col-12 mb-2 p-0 dsd-properties-list\">\n <slot name=\"property-header\">\n <dataset-details-feature-header :title=\"$t('message.datasetDetails.additionalInfo')\" :arrowDown=\"!infoVisible\"\n tag=\"additional-information-toggle\" :onClick=\"toggleInfo\" />\n </slot>\n <div class=\"position-relative dsd-item additional-information\" data-cy=\"additional-information\"\n v-show=\"infoVisible\">\n <slot name=\"property-table-before\"></slot>\n <slot name=\"property-table\">\n <table class=\"table table-borderless table-responsive\" ref=\"dsdProperties\" role=\"tablist\" id=\"myTab\">\n <dataset-details-property v-for='(name, index) in regularFields' :name=\"name\"\n :translate=\"fieldSchema[name]?.translate\" :type=\"fieldSchema[name]?.type\"\n :propertyFields=\"fieldSchema[name]?.fields\" :track=\"fieldSchema[name]?.track\"\n :itemstyles=\"fieldSchema[name]?.itemstyles\" :preTransform=\"fieldSchema[name]?.preTransform\"\n :transform=\"fieldSchema[name]?.transform\" :key=\"`${name}-${index}`\" />\n <tr v-if=\"hasCatalogRecord\" class=\"dsd-catalog-record-separator\">\n <hr class=\"dsd-catalog-record-divider\" />\n </tr>\n <dataset-details-property v-for='(name, index) in catalogRecordFields' :name=\"name\"\n :translate=\"fieldSchema[name]?.translate\" :type=\"fieldSchema[name]?.type\"\n :propertyFields=\"fieldSchema[name]?.fields\" :track=\"fieldSchema[name]?.track\"\n :itemstyles=\"fieldSchema[name]?.itemstyles\" :preTransform=\"fieldSchema[name]?.preTransform\"\n :transform=\"fieldSchema[name]?.transform\" :key=\"`${name}-${index}`\" />\n </table>\n </slot>\n <div class=\"additional-information-overlay\" ref=\"overlay\" v-show=\"showMoreVisible && !expanded\"></div>\n <slot name=\"property-table-after\"></slot>\n </div>\n </div>\n <pv-show-more v-if=\"showMoreVisible\"\n :label=\"expanded ? $t('message.metadata.showLess') : $t('message.metadata.showMore')\" :upArrow=\"expanded\"\n :action=\"toggleExpanded\" class=\"row text-primary\" />\n </div>\n</template>\n\n<script>\nimport { mapGetters } from \"vuex\";\nimport DatasetDetailsProperty from \"./DatasetDetailsProperty\";\nimport { dcatDeFields, dcatFields, dcatSchema, dcatDeSchema } from \"./specification.ts\";\n\nexport default {\n name: \"DatasetDetailsProperties\",\n components: {\n DatasetDetailsProperty\n },\n data() {\n return {\n infoVisible: true,\n initialHeight: 0,\n restrictedHeight: 100,\n expanded: false,\n };\n },\n computed: {\n ...mapGetters('datasetDetails', [\n 'getDatasetDescriptionHeight'\n ]),\n fieldSchema() {\n return Object.assign(dcatSchema(this.i18n.global.t), dcatDeSchema())\n },\n propertyFields() {\n let properties = this.$env.content?.datasetDetails?.properties;\n if (!properties || properties === \"\") {\n properties = dcatFields;\n if (this.$env.content.dataProviderInterface.specification === 'dcatapde') {\n properties += \",\" + dcatDeFields;\n }\n }\n return properties;\n },\n fieldsArray() {\n return this.propertyFields.split(',').map(item => item.trim());\n },\n regularFields() {\n return this.fieldsArray.filter(name => name !== 'catalogRecord');\n },\n catalogRecordFields() {\n return this.fieldsArray.filter(name => name === 'catalogRecord');\n },\n hasCatalogRecord() {\n return this.fieldsArray.includes('catalogRecord');\n },\n showMoreVisible() {\n return this.initialHeight > this.restrictedHeight;\n }\n },\n methods: {\n toggleInfo() {\n this.infoVisible = !this.infoVisible;\n },\n toggleExpanded() {\n this.expanded = !this.expanded;\n this.adaptHeight();\n },\n adaptHeight() {\n this.$refs.dsdProperties.style['flex'] = this.expanded ? \"0 0 100%\" : `0 0 ${this.restrictedHeight}px`;\n this.$refs.dsdProperties.style['max-height'] = this.expanded ? \"100%\" : `${this.restrictedHeight}px`;\n // this.$refs.dsdProperties.style['overflow-y'] = this.expanded ? \"auto\": \"hidden\";\n }\n },\n mounted() {\n this.initialHeight = this.$refs.dsdProperties.clientHeight;\n this.$refs.overlay.style.bottom = (this.$refs.dsdProperties.offsetHeight - this.$refs.dsdProperties.clientHeight) + \"px\";\n if (this.getDatasetDescriptionHeight >= this.initialHeight) {\n this.restrictedHeight = this.getDatasetDescriptionHeight;\n this.toggleExpanded()\n } else if ((this.getDatasetDescriptionHeight >= this.restrictedHeight) && (this.getDatasetDescriptionHeight <= this.initialHeight)) {\n this.restrictedHeight = this.getDatasetDescriptionHeight\n }\n this.adaptHeight();\n }\n}\n</script>\n\n<style scoped lang=\"scss\">\n.arrow {\n cursor: pointer;\n}\n\n.additional-information-overlay {\n width: 100%;\n height: 100px;\n position: absolute;\n left: 0;\n background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0, white 100%);\n pointer-events: none;\n}\n\ntable {\n background: #F5F5F5;\n}\n\n.dsd-catalog-record-separator td {\n padding: 0;\n}\n\n.dsd-catalog-record-divider {\n border: 0;\n border-top: 1px solid #CFDAF5;\n margin: 0.75rem 0;\n width: 95%;\n margin-left: 10px;\n}\n</style>\n"],"names":["_sfc_main","DatasetDetailsProperty","mapGetters","dcatSchema","dcatDeSchema","properties","_b","_a","dcatFields","dcatDeFields","item","name","_hoisted_1","_hoisted_2","_openBlock","_createElementBlock","_createElementVNode","_renderSlot","_ctx","_createVNode","_component_dataset_details_feature_header","$data","$options","_withDirectives","_hoisted_3","_hoisted_4","_Fragment","_renderList","index","_createBlock","_component_dataset_details_property","_c","_d","_e","_f","_g","_hoisted_5","_cache","_hoisted_6","_vShow","_component_pv_show_more"],"mappings":";;;;;;AA0CA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,YAAY;AAAA,IACV,wBAAAC;AAAA,EACD;AAAA,EACD,OAAO;AACL,WAAO;AAAA,MACL,aAAa;AAAA,MACb,eAAe;AAAA,MACf,kBAAkB;AAAA,MAClB,UAAU;AAAA;EAEb;AAAA,EACD,UAAU;AAAA,IACR,GAAGC,EAAW,kBAAkB;AAAA,MAC9B;AAAA,IACF,CAAC;AAAA,IACD,cAAc;AACZ,aAAO,OAAO,OAAOC,EAAW,KAAK,KAAK,OAAO,CAAC,GAAGC,GAAc;AAAA,IACpE;AAAA,IACD,iBAAiB;;AACf,UAAIC,KAAaC,KAAAC,IAAA,KAAK,KAAK,YAAV,gBAAAA,EAAmB,mBAAnB,gBAAAD,EAAmC;AACpD,cAAI,CAACD,KAAcA,MAAe,QAChCA,IAAaG,GACT,KAAK,KAAK,QAAQ,sBAAsB,kBAAkB,eAC5DH,KAAc,MAAMI,KAGjBJ;AAAA,IACR;AAAA,IACD,cAAc;AACZ,aAAO,KAAK,eAAe,MAAM,GAAG,EAAE,IAAI,CAAAK,MAAQA,EAAK,KAAI,CAAE;AAAA,IAC9D;AAAA,IACD,gBAAgB;AACd,aAAO,KAAK,YAAY,OAAO,CAAAC,MAAQA,MAAS,eAAe;AAAA,IAChE;AAAA,IACD,sBAAsB;AACpB,aAAO,KAAK,YAAY,OAAO,CAAAA,MAAQA,MAAS,eAAe;AAAA,IAChE;AAAA,IACD,mBAAmB;AACjB,aAAO,KAAK,YAAY,SAAS,eAAe;AAAA,IACjD;AAAA,IACD,kBAAkB;AAChB,aAAO,KAAK,gBAAgB,KAAK;AAAA,IACnC;AAAA,EACD;AAAA,EACD,SAAS;AAAA,IACP,aAAa;AACX,WAAK,cAAc,CAAC,KAAK;AAAA,IAC1B;AAAA,IACD,iBAAiB;AACf,WAAK,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AI,MAAhB,gBAAAoB,EAAmB;AAAA,gBAAS,QAAOC,IAAAV,EAAA,YAAYX,CAAI,MAAhB,gBAAAqB,EAAmB;AAAA,gBACtE,aAAYC,IAAAX,EAAA,YAAYX,CAAI,MAAhB,gBAAAsB,EAAmB;AAAA,gBAAa,eAAcC,IAAAZ,EAAA,YAAYX,CAAI,MAAhB,gBAAAuB,EAAmB;AAAA,gBAC7E,YAAWC,IAAAb,EAAA,YAAYX,CAAI,MAAhB,gBAAAwB,EAAmB;AAAA,gBAAY,KAAG,GAAKxB,CAAI,IAAIiB,CAAK;AAAA;;;;;QAGtEL,EAAAP,EAAsG,OAAtGsB,GAAsG,MAAA,GAAA,GAAA;AAAA,UAApC,CAAAC,GAAAjB,EAAA,oBAAoBD,EAAQ,QAAA;AAAA;;QAC9FJ,EAAyCC,EAAA,QAAA,wBAAA,CAAA,GAAA,QAAA,EAAA;AAAA;YApBjCG,EAAW,WAAA;AAAA;;;IAuBHC,EAAe,wBAAnCO,EAEsDW,GAAA;AAAA;MADnD,OAAOnB,EAAA,WAAWH,EAAA,kCAAkCA,EAAE,GAAA,2BAAA;AAAA,MAAgC,SAASG,EAAQ;AAAA,MACvG,QAAQC,EAAc;AAAA,MAAE,OAAM;AAAA;;;;"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import K from "../../widgets/AppLink.vue.mjs";
|
|
2
|
-
import
|
|
3
|
-
import { isNil as
|
|
4
|
-
import { showByType as
|
|
5
|
-
import
|
|
6
|
-
import { mapGetters as
|
|
2
|
+
import x from "../../widgets/Tooltip.vue.mjs";
|
|
3
|
+
import { isNil as h, isArray as g } from "lodash-es";
|
|
4
|
+
import { showByType as N } from "./typeCheckers.mjs";
|
|
5
|
+
import S from "./ValuesList.vue.mjs";
|
|
6
|
+
import { mapGetters as j } from "vuex";
|
|
7
7
|
import b from "../../filters/dateFilters.mjs";
|
|
8
|
-
import { truncate as
|
|
9
|
-
import { resolveComponent as
|
|
8
|
+
import { truncate as V, getTranslationFor as B } from "../../utils/helpers.mjs";
|
|
9
|
+
import { resolveComponent as p, openBlock as s, createElementBlock as i, normalizeClass as k, createElementVNode as _, createVNode as c, withCtx as T, createTextVNode as o, toDisplayString as d, createCommentVNode as u, Fragment as v, renderList as D, createBlock as C } from "vue";
|
|
10
10
|
import "./DatasetDetailsProperty.vue2.mjs";
|
|
11
11
|
import E from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
12
12
|
const O = {
|
|
@@ -30,12 +30,12 @@ const O = {
|
|
|
30
30
|
// Transform data after preparing by this.value
|
|
31
31
|
},
|
|
32
32
|
components: {
|
|
33
|
-
Tooltip:
|
|
33
|
+
Tooltip: x,
|
|
34
34
|
AppLink: K,
|
|
35
|
-
ValuesList:
|
|
35
|
+
ValuesList: S
|
|
36
36
|
},
|
|
37
37
|
computed: {
|
|
38
|
-
...
|
|
38
|
+
...j("datasetDetails", ["getProperty"]),
|
|
39
39
|
labelDisplay() {
|
|
40
40
|
const e = ["message.tooltip.datasetDetails", "message.metadata"];
|
|
41
41
|
let t;
|
|
@@ -84,20 +84,20 @@ const O = {
|
|
|
84
84
|
return this.transform && (e = this.transform(e)), e;
|
|
85
85
|
},
|
|
86
86
|
show() {
|
|
87
|
-
return
|
|
87
|
+
return N(this.type, this.data);
|
|
88
88
|
}
|
|
89
89
|
},
|
|
90
90
|
methods: {
|
|
91
|
-
isNil:
|
|
91
|
+
isNil: h,
|
|
92
92
|
isArray: g,
|
|
93
|
-
truncate:
|
|
94
|
-
getTranslationFor:
|
|
93
|
+
truncate: V,
|
|
94
|
+
getTranslationFor: B,
|
|
95
95
|
dateValue() {
|
|
96
96
|
return b.formatEU(this.value);
|
|
97
97
|
},
|
|
98
98
|
prepareObject(e) {
|
|
99
99
|
let t = this.preparedFields ?? Object.keys(e).map((r) => [r]);
|
|
100
|
-
return t = t.filter((r) => !
|
|
100
|
+
return t = t.filter((r) => !h(e[r[0]])), t.map((r) => {
|
|
101
101
|
let l = e[r[0]];
|
|
102
102
|
g(l) || (l = [l]);
|
|
103
103
|
const m = { key: r[0], value: l };
|
|
@@ -108,68 +108,73 @@ const O = {
|
|
|
108
108
|
return e === "" ? "" : e.startsWith("/") ? `${this.i18n.global.t(e.substring(1))}:` : e.startsWith("'") ? e.substring(1, e.length - 1) : `${this.i18n.global.t(`${t}.${e}`)}:`;
|
|
109
109
|
}
|
|
110
110
|
}
|
|
111
|
-
}, P = { key: 0 }, A = {
|
|
112
|
-
function
|
|
113
|
-
const
|
|
114
|
-
return
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
111
|
+
}, P = { key: 0 }, A = { key: 1 }, L = ["href"], W = { key: 2 }, I = { key: 0 }, R = { key: 2 }, U = { key: 3 }, q = { key: 4 };
|
|
112
|
+
function z(e, t, r, l, m, a) {
|
|
113
|
+
const F = p("tooltip"), w = p("app-link"), y = p("values-list");
|
|
114
|
+
return a.show ? (s(), i("tr", {
|
|
115
|
+
key: 0,
|
|
116
|
+
class: k({ "catalog-record-row": r.name === "catalogRecord" })
|
|
117
|
+
}, [
|
|
118
|
+
_("td", {
|
|
119
|
+
class: k(["w-25 text-break font-weight-bold", { "catalog-record-label": r.name === "catalogRecord" }])
|
|
120
|
+
}, [
|
|
121
|
+
c(F, {
|
|
122
|
+
title: a.labelDisplay[0]
|
|
118
123
|
}, {
|
|
119
|
-
default:
|
|
120
|
-
o(d(
|
|
124
|
+
default: T(() => [
|
|
125
|
+
o(d(a.labelDisplay[1]), 1)
|
|
121
126
|
]),
|
|
122
127
|
_: 1
|
|
123
128
|
}, 8, ["title"])
|
|
124
|
-
]),
|
|
129
|
+
], 2),
|
|
125
130
|
t[2] || (t[2] = o()),
|
|
126
131
|
["string", "date", "number", "first:number", "translation"].includes(
|
|
127
132
|
r.type
|
|
128
|
-
) ? (
|
|
133
|
+
) ? (s(), i("td", P, d(a.value), 1)) : u("", !0),
|
|
129
134
|
t[3] || (t[3] = o()),
|
|
130
|
-
r.type === "uri" ? (
|
|
131
|
-
_("a", { href:
|
|
135
|
+
r.type === "uri" ? (s(), i("td", A, [
|
|
136
|
+
_("a", { href: a.value }, d(a.value), 9, L)
|
|
132
137
|
])) : u("", !0),
|
|
133
138
|
t[4] || (t[4] = o()),
|
|
134
|
-
r.type === "links" ? (
|
|
135
|
-
(
|
|
136
|
-
r.name === "identifiers" ? (
|
|
139
|
+
r.type === "links" ? (s(), i("td", W, [
|
|
140
|
+
(s(!0), i(v, null, D(a.value, (n, f) => (s(), i("div", { key: f }, [
|
|
141
|
+
r.name === "identifiers" ? (s(), i("div", I, d(n.label), 1)) : u("", !0),
|
|
137
142
|
t[0] || (t[0] = o()),
|
|
138
|
-
!
|
|
143
|
+
!a.isNil(n) && n.link && r.name !== "languages" && r.name != "identifiers" ? (s(), C(w, {
|
|
139
144
|
key: 1,
|
|
140
145
|
to: n.link
|
|
141
146
|
}, {
|
|
142
|
-
default:
|
|
143
|
-
o(d(
|
|
147
|
+
default: T(() => [
|
|
148
|
+
o(d(a.truncate(n.label, 75)), 1)
|
|
144
149
|
]),
|
|
145
150
|
_: 2
|
|
146
151
|
}, 1032, ["to"])) : u("", !0),
|
|
147
152
|
t[1] || (t[1] = o()),
|
|
148
|
-
!
|
|
153
|
+
!a.isNil(n) && !n.link || r.name === "languages" && r.name != "identifiers" ? (s(), i("div", R, d(a.truncate(n.label, 75)), 1)) : u("", !0)
|
|
149
154
|
]))), 128))
|
|
150
155
|
])) : u("", !0),
|
|
151
156
|
t[5] || (t[5] = o()),
|
|
152
|
-
r.type === "object" ? (
|
|
153
|
-
y
|
|
154
|
-
values:
|
|
155
|
-
interpretTranslateKey:
|
|
157
|
+
r.type === "object" ? (s(), i("td", U, [
|
|
158
|
+
c(y, {
|
|
159
|
+
values: a.value,
|
|
160
|
+
interpretTranslateKey: a.interpretTranslateKey,
|
|
156
161
|
itemstyles: r.itemstyles
|
|
157
162
|
}, null, 8, ["values", "interpretTranslateKey", "itemstyles"])
|
|
158
163
|
])) : u("", !0),
|
|
159
164
|
t[6] || (t[6] = o()),
|
|
160
|
-
r.type === "objects" ? (
|
|
161
|
-
(
|
|
162
|
-
y
|
|
165
|
+
r.type === "objects" ? (s(), i("td", q, [
|
|
166
|
+
(s(!0), i(v, null, D(a.value, (n, f) => (s(), i("div", { key: f }, [
|
|
167
|
+
c(y, {
|
|
163
168
|
values: n,
|
|
164
|
-
interpretTranslateKey:
|
|
169
|
+
interpretTranslateKey: a.interpretTranslateKey,
|
|
165
170
|
itemstyles: r.itemstyles
|
|
166
171
|
}, null, 8, ["values", "interpretTranslateKey", "itemstyles"])
|
|
167
172
|
]))), 128))
|
|
168
173
|
])) : u("", !0)
|
|
169
|
-
])) : u("", !0);
|
|
174
|
+
], 2)) : u("", !0);
|
|
170
175
|
}
|
|
171
|
-
const
|
|
176
|
+
const rt = /* @__PURE__ */ E(O, [["render", z], ["__scopeId", "data-v-ee3eb69b"]]);
|
|
172
177
|
export {
|
|
173
|
-
|
|
178
|
+
rt as default
|
|
174
179
|
};
|
|
175
180
|
//# sourceMappingURL=DatasetDetailsProperty.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatasetDetailsProperty.vue.mjs","sources":["../../../lib/datasetDetails/properties/DatasetDetailsProperty.vue"],"sourcesContent":["<template>\n <tr v-if=\"show\">\n <td class=\"w-25 text-break font-weight-bold\">\n <tooltip :title=\"labelDisplay[0]\">\n {{ labelDisplay[1] }}\n </tooltip>\n </td>\n <td\n v-if=\"\n ['string', 'date', 'number', 'first:number', 'translation'].includes(\n type\n )\n \"\n >\n {{ value }}\n </td>\n <td v-if=\"type === 'uri'\">\n <a :href=\"value\">{{ value }}</a>\n </td>\n <td v-if=\"type === 'links'\">\n <div v-for=\"(v, i) of value\" :key=\"i\">\n <div v-if=\"name === 'identifiers'\">{{ v.label }}</div>\n <app-link\n v-if=\"!isNil(v) && v.link && name !== 'languages' && name != 'identifiers'\"\n :to=\"v.link\"\n >{{ truncate(v.label, 75) }}</app-link\n >\n <div v-if=\"(!isNil(v) && !v.link) || name === 'languages' && name != 'identifiers'\">\n {{ truncate(v.label, 75) }}\n </div>\n </div>\n </td>\n <td v-if=\"type === 'object'\">\n <values-list\n :values=\"value\"\n :interpretTranslateKey=\"interpretTranslateKey\"\n :itemstyles=\"itemstyles\"\n />\n </td>\n <td v-if=\"type === 'objects'\">\n <div v-for=\"(item, i) of value\" :key=\"i\">\n <values-list\n :values=\"item\"\n :interpretTranslateKey=\"interpretTranslateKey\"\n :itemstyles=\"itemstyles\"\n />\n </div>\n </td>\n </tr>\n</template>\n\n<script>\nimport AppLink from \"../../widgets/AppLink\";\nimport Tooltip from \"../../widgets/Tooltip\";\nimport { isNil, isArray } from \"lodash\";\nimport { showByType } from \"./typeCheckers.ts\";\nimport ValuesList from \"./ValuesList\";\nimport { mapGetters } from \"vuex\";\nimport dateFilters from \"../../filters/dateFilters.ts\";\nimport { truncate, getTranslationFor } from \"../../utils/helpers\";\n\nexport default {\n name: \"DatasetDetailsProperty\",\n props: {\n type: String, // Can be any of the types recognized in typeCheckers.ts\n translate: String | Array, // i18n key for the tooltip and label string values (if not given, name is used!)\n name: String, // Key to extract the value from the Datasets store\n propertyFields: String, // Comma-separated keys for extracting data from an object\n itemstyles: String, // Styles to apply to an object key-value block\n track: String, // Comma-separated keys for tracking\n preTransform: Function, // Transform raw data from dataset service\n transform: Function, // Transform data after preparing by this.value\n },\n components: {\n Tooltip,\n AppLink,\n ValuesList,\n },\n computed: {\n ...mapGetters(\"datasetDetails\", [\"getProperty\"]),\n labelDisplay() {\n const prefix = [\"message.tooltip.datasetDetails\", \"message.metadata\"];\n let translateItems;\n if (this.translate) {\n translateItems = this.translate.split(\",\");\n if (translateItems.length === 1) {\n translateItems.push(translateItems[0]);\n }\n } else {\n translateItems = [this.name, this.name];\n }\n return translateItems.map((item, i) =>\n this.interpretTranslateKey(item, prefix[i])\n );\n },\n data() {\n let d = this.getProperty(this.name);\n if (this.name === \"languages\") {\n d.sort((a, b) => {\n if (a.id < b.id) return -1;\n if (a.id > b.id) return 1;\n return 0;\n });\n }\n return d;\n },\n preparedFields() {\n return this.propertyFields?.split(\",\").map((field) => field.split(\":\"));\n },\n preparedTrack() {\n return this.track?.split(\",\");\n },\n value() {\n let v = this.data;\n if (this.preTransform) v = this.preTransform(v);\n switch (this.type) {\n case \"date\":\n v = dateFilters.formatEU(v);\n break;\n case \"links\":\n v = this.data.map((item) => {\n if (item) {\n const link = typeof item === \"string\" ? item : item.resource;\n const label =\n typeof item === \"string\"\n ? item\n : item.label || item.id || item.resource;\n return { link, label };\n }\n });\n break;\n case \"object\":\n v = this.prepareObject(v);\n break;\n case \"objects\":\n v = v.map((item) => {\n return this.prepareObject(item);\n });\n break;\n case \"translation\":\n v = this.getTranslationFor(v, this.$route.query.locale, [\"en\"]);\n break;\n default:\n if (this.type.startsWith(\"first\")) {\n v = this.data[0];\n }\n }\n if (this.transform) v = this.transform(v);\n return v;\n },\n show() {\n return showByType(this.type, this.data);\n },\n },\n methods: {\n isNil,\n isArray,\n truncate,\n getTranslationFor,\n dateValue() {\n return dateFilters.formatEU(this.value);\n },\n prepareObject(object) {\n // Because this.fields can contain \":\" signs that split a key into an array,\n // we also transform the keys in the case this.fields is undefined into arrays:\n let keys = this.preparedFields ?? Object.keys(object).map((key) => [key]);\n\n // Now key[0] holds the actual key in all cases. Check if the value given\n // For a key is undefined and filter them out:\n keys = keys.filter((key) => !isNil(object[key[0]]));\n\n return keys.map((key) => {\n let value = object[key[0]];\n\n // Values can be arrays for displaying several values. For uniform treatment,\n // transform single values into arrays of length 1:\n if (!isArray(value)) value = [value];\n\n // First step: an object holding key and value:\n const result = { key: key[0], value };\n\n // Enrich the object when appropriate:\n if (key[1] !== undefined) result.type = key[1];\n if (key[2] !== undefined) result.translation = key[2];\n\n return result;\n });\n },\n interpretTranslateKey(key, prefix) {\n // console.log(key);\n\n if (key === \"\") return \"\";\n if (key.startsWith(\"/\"))\n return `${this.i18n.global.t(key.substring(1))}:`;\n if (key.startsWith(\"'\")) return key.substring(1, key.length - 1);\n return `${this.i18n.global.t(`${prefix}.${key}`)}:`;\n },\n },\n};\n</script>\n\n<style scoped>\ntr {\n width: 100%;\n}\n.w-25 {\n min-width: 160px;\n}\n</style>\n"],"names":["_sfc_main","Tooltip","AppLink","ValuesList","mapGetters","prefix","translateItems","item","i","d","a","b","_a","field","v","dateFilters","link","label","showByType","isNil","isArray","truncate","getTranslationFor","object","keys","key","value","result","_hoisted_2","$options","_createElementBlock","_hoisted_1","_createElementVNode","_createVNode","_component_tooltip","$props","_openBlock","_hoisted_4","_hoisted_5","_hoisted_6","_Fragment","_renderList","_hoisted_7","_toDisplayString","_createBlock","_component_app_link","_hoisted_8","_hoisted_9","_component_values_list","_hoisted_10"],"mappings":";;;;;;;;;;;AA6DA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,OAAO;AAAA,IACL,MAAM;AAAA;AAAA,IACN,WAAW,SAAS;AAAA;AAAA,IACpB,MAAM;AAAA;AAAA,IACN,gBAAgB;AAAA;AAAA,IAChB,YAAY;AAAA;AAAA,IACZ,OAAO;AAAA;AAAA,IACP,cAAc;AAAA;AAAA,IACd,WAAW;AAAA;AAAA,EACZ;AAAA,EACD,YAAY;AAAA,IACV,SAAAC;AAAA,IACA,SAAAC;AAAA,IACA,YAAAC;AAAA,EACD;AAAA,EACD,UAAU;AAAA,IACR,GAAGC,EAAW,kBAAkB,CAAC,aAAa,CAAC;AAAA,IAC/C,eAAe;AACb,YAAMC,IAAS,CAAC,kCAAkC,kBAAkB;AACpE,UAAIC;AACJ,aAAI,KAAK,aACPA,IAAiB,KAAK,UAAU,MAAM,GAAG,GACrCA,EAAe,WAAW,KAC5BA,EAAe,KAAKA,EAAe,CAAC,CAAC,KAGvCA,IAAiB,CAAC,KAAK,MAAM,KAAK,IAAI,GAEjCA,EAAe;AAAA,QAAI,CAACC,GAAMC,MAC/B,KAAK,sBAAsBD,GAAMF,EAAOG,CAAC,CAAC;AAAA;IAE7C;AAAA,IACD,OAAO;A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uBAAuBA,EAAqB;AAAA,QAC5C,YAAYM,EAAU;AAAA;;;IAGjBA,EAAI,SAAA,kBAAdL,EAQK,MAAAmB,GAAA;AAAA,OAPHb,EAAA,EAAA,GAAAN,EAMMU,GANmB,MAAAC,EAAAZ,EAAA,OAAZ,CAAAtB,GAAMC,YAAnBsB,EAMM,OAAA,EAN2B,KAAKtB,KAAC;AAAA,QACrCyB,EAIEe,GAAA;AAAA,UAHC,QAAQzC;AAAA,UACR,uBAAuBsB,EAAqB;AAAA,UAC5C,YAAYM,EAAU;AAAA;;;;;;"}
|
|
1
|
+
{"version":3,"file":"DatasetDetailsProperty.vue.mjs","sources":["../../../lib/datasetDetails/properties/DatasetDetailsProperty.vue"],"sourcesContent":["<template>\n <tr v-if=\"show\" :class=\"{ 'catalog-record-row': name === 'catalogRecord' }\">\n <td\n class=\"w-25 text-break font-weight-bold\"\n :class=\"{ 'catalog-record-label': name === 'catalogRecord' }\"\n >\n <tooltip :title=\"labelDisplay[0]\">\n {{ labelDisplay[1] }}\n </tooltip>\n </td>\n <td\n v-if=\"\n ['string', 'date', 'number', 'first:number', 'translation'].includes(\n type\n )\n \"\n >\n {{ value }}\n </td>\n <td v-if=\"type === 'uri'\">\n <a :href=\"value\">{{ value }}</a>\n </td>\n <td v-if=\"type === 'links'\">\n <div v-for=\"(v, i) of value\" :key=\"i\">\n <div v-if=\"name === 'identifiers'\">{{ v.label }}</div>\n <app-link\n v-if=\"!isNil(v) && v.link && name !== 'languages' && name != 'identifiers'\"\n :to=\"v.link\"\n >{{ truncate(v.label, 75) }}</app-link\n >\n <div v-if=\"(!isNil(v) && !v.link) || name === 'languages' && name != 'identifiers'\">\n {{ truncate(v.label, 75) }}\n </div>\n </div>\n </td>\n <td v-if=\"type === 'object'\">\n <values-list\n :values=\"value\"\n :interpretTranslateKey=\"interpretTranslateKey\"\n :itemstyles=\"itemstyles\"\n />\n </td>\n <td v-if=\"type === 'objects'\">\n <div v-for=\"(item, i) of value\" :key=\"i\">\n <values-list\n :values=\"item\"\n :interpretTranslateKey=\"interpretTranslateKey\"\n :itemstyles=\"itemstyles\"\n />\n </div>\n </td>\n </tr>\n</template>\n\n<script>\nimport AppLink from \"../../widgets/AppLink\";\nimport Tooltip from \"../../widgets/Tooltip\";\nimport { isNil, isArray } from \"lodash\";\nimport { showByType } from \"./typeCheckers.ts\";\nimport ValuesList from \"./ValuesList\";\nimport { mapGetters } from \"vuex\";\nimport dateFilters from \"../../filters/dateFilters.ts\";\nimport { truncate, getTranslationFor } from \"../../utils/helpers\";\n\nexport default {\n name: \"DatasetDetailsProperty\",\n props: {\n type: String, // Can be any of the types recognized in typeCheckers.ts\n translate: String | Array, // i18n key for the tooltip and label string values (if not given, name is used!)\n name: String, // Key to extract the value from the Datasets store\n propertyFields: String, // Comma-separated keys for extracting data from an object\n itemstyles: String, // Styles to apply to an object key-value block\n track: String, // Comma-separated keys for tracking\n preTransform: Function, // Transform raw data from dataset service\n transform: Function, // Transform data after preparing by this.value\n },\n components: {\n Tooltip,\n AppLink,\n ValuesList,\n },\n computed: {\n ...mapGetters(\"datasetDetails\", [\"getProperty\"]),\n labelDisplay() {\n const prefix = [\"message.tooltip.datasetDetails\", \"message.metadata\"];\n let translateItems;\n if (this.translate) {\n translateItems = this.translate.split(\",\");\n if (translateItems.length === 1) {\n translateItems.push(translateItems[0]);\n }\n } else {\n translateItems = [this.name, this.name];\n }\n return translateItems.map((item, i) =>\n this.interpretTranslateKey(item, prefix[i])\n );\n },\n data() {\n let d = this.getProperty(this.name);\n if (this.name === \"languages\") {\n d.sort((a, b) => {\n if (a.id < b.id) return -1;\n if (a.id > b.id) return 1;\n return 0;\n });\n }\n return d;\n },\n preparedFields() {\n return this.propertyFields?.split(\",\").map((field) => field.split(\":\"));\n },\n preparedTrack() {\n return this.track?.split(\",\");\n },\n value() {\n let v = this.data;\n if (this.preTransform) v = this.preTransform(v);\n switch (this.type) {\n case \"date\":\n v = dateFilters.formatEU(v);\n break;\n case \"links\":\n v = this.data.map((item) => {\n if (item) {\n const link = typeof item === \"string\" ? item : item.resource;\n const label =\n typeof item === \"string\"\n ? item\n : item.label || item.id || item.resource;\n return { link, label };\n }\n });\n break;\n case \"object\":\n v = this.prepareObject(v);\n break;\n case \"objects\":\n v = v.map((item) => {\n return this.prepareObject(item);\n });\n break;\n case \"translation\":\n v = this.getTranslationFor(v, this.$route.query.locale, [\"en\"]);\n break;\n default:\n if (this.type.startsWith(\"first\")) {\n v = this.data[0];\n }\n }\n if (this.transform) v = this.transform(v);\n return v;\n },\n show() {\n return showByType(this.type, this.data);\n },\n },\n methods: {\n isNil,\n isArray,\n truncate,\n getTranslationFor,\n dateValue() {\n return dateFilters.formatEU(this.value);\n },\n prepareObject(object) {\n // Because this.fields can contain \":\" signs that split a key into an array,\n // we also transform the keys in the case this.fields is undefined into arrays:\n let keys = this.preparedFields ?? Object.keys(object).map((key) => [key]);\n\n // Now key[0] holds the actual key in all cases. Check if the value given\n // For a key is undefined and filter them out:\n keys = keys.filter((key) => !isNil(object[key[0]]));\n\n return keys.map((key) => {\n let value = object[key[0]];\n\n // Values can be arrays for displaying several values. For uniform treatment,\n // transform single values into arrays of length 1:\n if (!isArray(value)) value = [value];\n\n // First step: an object holding key and value:\n const result = { key: key[0], value };\n\n // Enrich the object when appropriate:\n if (key[1] !== undefined) result.type = key[1];\n if (key[2] !== undefined) result.translation = key[2];\n\n return result;\n });\n },\n interpretTranslateKey(key, prefix) {\n // console.log(key);\n\n if (key === \"\") return \"\";\n if (key.startsWith(\"/\"))\n return `${this.i18n.global.t(key.substring(1))}:`;\n if (key.startsWith(\"'\")) return key.substring(1, key.length - 1);\n return `${this.i18n.global.t(`${prefix}.${key}`)}:`;\n },\n },\n};\n</script>\n\n<style scoped>\ntr {\n width: 100%;\n}\n.w-25 {\n min-width: 160px;\n}\n.catalog-record-label {\n font-style: italic;\n}\n\n.catalog-record-row td {\n font-style: italic;\n}\n</style>\n"],"names":["_sfc_main","Tooltip","AppLink","ValuesList","mapGetters","prefix","translateItems","item","i","d","a","b","_a","field","v","dateFilters","link","label","showByType","isNil","isArray","truncate","getTranslationFor","object","keys","key","value","result","$options","_createElementBlock","$props","_createElementVNode","_normalizeClass","_createVNode","_component_tooltip","_openBlock","_hoisted_2","_hoisted_3","_hoisted_4","_Fragment","_renderList","_hoisted_5","_toDisplayString","_createBlock","_component_app_link","_hoisted_6","_hoisted_7","_component_values_list","_hoisted_8"],"mappings":";;;;;;;;;;;AAgEA,MAAKA,IAAU;AAAA,EACb,MAAM;AAAA,EACN,OAAO;AAAA,IACL,MAAM;AAAA;AAAA,IACN,WAAW,SAAS;AAAA;AAAA,IACpB,MAAM;AAAA;AAAA,IACN,gBAAgB;AAAA;AAAA,IAChB,YAAY;AAAA;AAAA,IACZ,OAAO;AAAA;AAAA,IACP,cAAc;AAAA;AAAA,IACd,WAAW;AAAA;AAAA,EACZ;AAAA,EACD,YAAY;AAAA,IACV,SAAAC;AAAA,IACA,SAAAC;AAAA,IACA,YAAAC;AAAA,EACD;AAAA,EACD,UAAU;AAAA,IACR,GAAGC,EAAW,kBAAkB,CAAC,aAAa,CAAC;AAAA,IAC/C,eAAe;AACb,YAAMC,IAAS,CAAC,kCAAkC,kBAAkB;AACpE,UAAIC;AACJ,aAAI,KAAK,aACPA,IAAiB,KAAK,UAAU,MAAM,GAAG,GACrCA,EAAe,WAAW,KAC5BA,EAAe,KAAKA,EAAe,CAAC,CAAC,KAGvCA,IAAiB,CAAC,KAAK,MAAM,KAAK,IAAI,GAEjCA,EAAe;AAAA,QAAI,CAACC,GAAMC,MAC/B,KAAK,sBAAsBD,GAAMF,EAAOG,CAAC,CAAC;AAAA;IAE7C;AAAA,IACD,OAAO;AACL,UAAIC,IAAI,KAAK,YAAY,KAAK,IAAI;AAClC,aAAI,KAAK,SAAS,eAChBA,EAAE,KAAK,CAACC,GAAGC,MACLD,EAAE,KAAKC,EAAE,KAAW,KACpBD,EAAE,KAAKC,EAAE,KAAW,IACjB,CACR,GAEIF;AAAA,IAC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,EAAA,EAAA,GAAAN,EAMMU,GANmB,MAAAC,EAAAZ,EAAA,OAAZ,CAAArB,GAAMC,YAAnBqB,EAMM,OAAA,EAN2B,KAAKrB,KAAC;AAAA,QACrCyB,EAIEc,GAAA;AAAA,UAHC,QAAQxC;AAAA,UACR,uBAAuBqB,EAAqB;AAAA,UAC5C,YAAYE,EAAU;AAAA;;;;;;"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const dcatFields = "releaseDate, modificationDate,creator,landingPages,sources,\n languages,publisher,contactPoints,
|
|
1
|
+
export declare const dcatFields = "releaseDate, modificationDate,creator,landingPages,sources,\n languages,publisher,contactPoints,spatial,\n spatialResource,conformsTo,provenances,identifiers,otherIdentifiers, resource,\n frequency,accessRights,accrualPeriodicity,hasVersion,isVersionOf,\n temporal,versionInfo,versionNotes,attributes,dimensions,numSeries,hasQualityAnnotations,\n statUnitMeasures,isReferencedBy,qualifiedAttributions,wasGeneratedBy,\n qualifiedRelations,sample,spatialResolutionInMeters,type,temporalResolution, geoDcatAp, catalogRecord";
|
|
2
2
|
export declare const dcatDeFields = "politicalGeocodingLevelURI,politicalGeocodingURI,availability,\n contributorID,geocodingDescriptionDe,legalBasis,qualityProcessURI,typeDe,\n references,contributor,originator,maintainer";
|
|
3
3
|
export declare const dcatSchema: (t: any) => {
|
|
4
4
|
releaseDate: {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { getTranslationFor as i } from "../../utils/helpers.mjs";
|
|
2
2
|
const n = `releaseDate, modificationDate,creator,landingPages,sources,
|
|
3
|
-
languages,publisher,contactPoints,
|
|
3
|
+
languages,publisher,contactPoints,spatial,
|
|
4
4
|
spatialResource,conformsTo,provenances,identifiers,otherIdentifiers, resource,
|
|
5
5
|
frequency,accessRights,accrualPeriodicity,hasVersion,isVersionOf,
|
|
6
6
|
temporal,versionInfo,versionNotes,attributes,dimensions,numSeries,hasQualityAnnotations,
|
|
7
7
|
statUnitMeasures,isReferencedBy,qualifiedAttributions,wasGeneratedBy,
|
|
8
|
-
qualifiedRelations,sample,spatialResolutionInMeters,type,temporalResolution, geoDcatAp`, o = `politicalGeocodingLevelURI,politicalGeocodingURI,availability,
|
|
8
|
+
qualifiedRelations,sample,spatialResolutionInMeters,type,temporalResolution, geoDcatAp, catalogRecord`, o = `politicalGeocodingLevelURI,politicalGeocodingURI,availability,
|
|
9
9
|
contributorID,geocodingDescriptionDe,legalBasis,qualityProcessURI,typeDe,
|
|
10
10
|
references,contributor,originator,maintainer`, r = (s) => ({
|
|
11
11
|
releaseDate: { type: "date", translate: "created" },
|
|
@@ -15,7 +15,7 @@ const n = `releaseDate, modificationDate,creator,landingPages,sources,
|
|
|
15
15
|
languages: { type: "links", translate: "language,languages" },
|
|
16
16
|
publisher: { type: "object", fields: "name,email,homepage" },
|
|
17
17
|
contactPoints: { type: "objects", translate: "/message.tooltip.contactPoints,contactPoints", fields: "name::/message.metadata.name,organisation_name::/message.datasetDetails.contactPoints.organizationName,email,telephone,address,url:link" },
|
|
18
|
-
catalogRecord: { type: "object", translate: "
|
|
18
|
+
catalogRecord: { type: "object", translate: "'Catalog Record data.europa.eu:','Catalog Record data.europa.eu:'", fields: "issued:date:addedToDataEuropaEU,modified:date:updatedOnDataEuropaEU,homepage" },
|
|
19
19
|
spatial: { type: "objects", fields: "coordinates,type" },
|
|
20
20
|
spatialResource: { type: "links", translate: ",spatialResource", fields: "resource:link" },
|
|
21
21
|
conformsTo: { type: "objects", fields: "title::label,label,resource:link_blank", track: "resource" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"specification.mjs","sources":["../../../lib/datasetDetails/properties/specification.ts"],"sourcesContent":["import { getTranslationFor } from \"../../../lib/utils/helpers\";\n\nexport const dcatFields = `releaseDate, modificationDate,creator,landingPages,sources,\n languages,publisher,contactPoints,catalogRecord,spatial,\n spatialResource,conformsTo,provenances,identifiers,otherIdentifiers, resource,\n frequency,accessRights,accrualPeriodicity,hasVersion,isVersionOf,\n temporal,versionInfo,versionNotes,attributes,dimensions,numSeries,hasQualityAnnotations,\n statUnitMeasures,isReferencedBy,qualifiedAttributions,wasGeneratedBy,\n qualifiedRelations,sample,spatialResolutionInMeters,type,temporalResolution, geoDcatAp`;\n\nexport const dcatDeFields = `politicalGeocodingLevelURI,politicalGeocodingURI,availability,\n contributorID,geocodingDescriptionDe,legalBasis,qualityProcessURI,typeDe,\n references,contributor,originator,maintainer`;\n\n/*\n Below we have schemata describing how properties should be rendered in DatasetDatailsProperties.vue. A schema is\n an object where keys correspond to the above defined fields. For each key, the value is an object the format of which\n we will now describe:\n\n - type: is the the only required property. Will be evaluated in typeCheckers.ts. It reflects the format of the\n data item (CALLED \"response\" BELOW!) retrieved by from the search network response (number, string, url, array, object, array of objects).\n Supported values are:\n * \"number\": response is a single number\n * \"first:number\": render response[0] as a number\n * \"string\": response a simple string\n * \"uri\": response a simple string, rendered as a link\n * \"date\": response a simple string, formatted as a date conforming to the current locale\n * \"translation\": response an object containing locale keys (like \"en\", \"de\"). The value corresponding to the\n current locale is rendered\n * \"object\": response an object whose where each key-value pair is rendered on a separate line\n * \"array\": response an array whose elements are rendered vertically\n * \"links\": reponse either an array of uri-strings rendered as links, or an\n array of objects with a label field that is displayed as a link and another field\n holding the href; that other field is either resource, label or id\n\n - translate: for a property \"xxx\", we have a bold label and tooltip to the left which comes from\n an i18n translation; the default i18n keys are: message.tooltip.datasetDetails.xxx for the tooltip and\n message.metadata.xxx for the displayed label. if instead of xxx, you want to use another key (with the same prefixes),\n translate can provide it. If translate is two strings separated by commas, the left one applies to the tooltip, the right\n to the label. Instead of just a replacement for xxx, you can provide i18n keys without the prefixes by starting the string with\n a slash (example: translate:\"/message.tooltip.yyy,/message.mykey.mylabelkey\"). Instead of translation keys, you can also\n provide literal values as tooltip or label by enclosing the strings in single quotes.\n\n - fields: for objects and arrays of objects, this comma-separated value indicates, what keys of the objects should\n be used for display (filtering out any additional data in the object). If not present, all existent keys will be used.\n A key given in this comma separated list can be of the form \"x\": just a key, or of the form \"x:y\": key x of type y (where\n the type is any of \"link\", \"link_blank\", \"date\" or empty; accordingly, a link (possibly target=\"_blank\") or date will be displayed).\n Also the form \"x:y:z\" is possible, where z is an indication how to translate the key for rendering. If z does not exist,\n the i18n key message.metadata.x will be translated; if z exists, we use message.metadata.z instead. The additional properties for\n \"translate\" above can also be applied to z: leading slash or single quotes.\n\n - track: enable Matomo tracking for a link. track is a string value indicating the key of the data object for which\n tracking should be enabled.\n\n - itemstyles: a string of CSS properties that applies to key-value items of a rendered object\n\n - transform: a function that maps the data to be rendered. Applies after the data has been processed in the value-method of\n DatsetDetailsProperty.vue\n\n - preTransform: same as transform, only applied to the raw data value before processing in the value-method\n\n */\n\nexport const dcatSchema = (t) => ({\n releaseDate: {type: 'date', translate: 'created'},\n modificationDate: {type: 'date', translate: 'updated'},\n landingPages: {type: 'links', translate: 'landingPage'},\n sources: {type: 'links', translate:',sources'},\n languages: {type: 'links', translate: 'language,languages'},\n publisher: {type: 'object', fields: 'name,email,homepage'},\n contactPoints: {type: 'objects', translate:\"/message.tooltip.contactPoints,contactPoints\", fields: \"name::/message.metadata.name,organisation_name::/message.datasetDetails.contactPoints.organizationName,email,telephone,address,url:link\"},\n catalogRecord: {type: 'object', translate:\"/message.tooltip.catalogRecord,catalogRecord\", fields: \"issued:date:addedToDataEuropaEU,modified:date:updatedOnDataEuropaEU,homepage\"},\n spatial: {type: 'objects', fields: \"coordinates,type\"},\n spatialResource: {type: 'links', translate:\",spatialResource\", fields: \"resource:link\"},\n conformsTo: {type: 'objects', fields: \"title::label,label,resource:link_blank\", track:\"resource\"},\n provenances: {type: 'objects', translate: 'provenance,provenances', fields: \"label,resource:link\"},\n // relatedResources: {type: 'links', translate: 'relatedResource,relatedResources'},\n identifiers: {type: 'links', translate: 'identifier,identifiers'},\n otherIdentifiers: {type: 'links', translate: 'otherIdentifier,otherIdentifiers', fields:\"identifier:link,resource:link:identifier,scheme:link\"},\n resource: {type: 'uri', translate: \",'uriRef:'\"},\n frequency: {type: 'object', fields:\"title,resource:link\"},\n accessRights: {type: 'object', translate:\"/message.tooltip.datasetDetails.distributions.rights,accessRights\", fields:\"label::\"},\n accrualPeriodicity: {type: 'object', translate:\"frequency,accrualPeriodicity\", fields:\"label::\"},\n creator: {type: 'objects', fields:\"type,name,resource:link,email,homepage:link\"},\n hasVersion: {type: 'links'},\n isVersionOf: {type: 'links', translate:\"versionOf,isVersionOf\"},\n temporal: {type: 'objects', translate:\"/message.tooltip.datasetDetails.distributions.temporalResolution,temporal\", fields: \"gte:date:,lte:date:' -'\", itemstyles:\"float:left\"},\n versionInfo: {type: 'string'},\n versionNotes: {type: 'translation'},\n attributes: {type: 'links', translate:\",attributes\"},\n dimensions: {type: 'links', translate:\",dimensions\"},\n numSeries: {type: 'number'},\n hasQualityAnnotations: {type: 'links', translate: \",qualityAnnotations\"},\n statUnitMeasures: {type: 'links', translate: \"unitsOfMeasurement\"},\n isReferencedBy: {type: 'links'},\n qualifiedAttributions: {type: 'links', translate: \"qualifiedAttribution\"},\n wasGeneratedBy: {type: 'links'},\n qualifiedRelations: {type: 'objects', translate: \"qualifiedRelation\", fields: \"relation:link,had_role:link:role\"},\n sample: {type: 'links'},\n spatialResolutionInMeters: {\n type: 'number', translate: \"spatialResolutionInMeters,spatialResolutionInMeters.label\",\n transform: value => t('message.metadata.spatialResolutionInMeters.value', {number: value})\n },\n type: {type: 'object', fields: \"label,resource:link_blank\", preTransform: (value) => ({\n ...value,\n name: value?.name ?? value?.label\n })},\n temporalResolution: {type: 'string'},\n geoDcatAp: {\n type: 'objects',\n translate: \"/message.tooltip.datasetDetails.geoDcatAp,'GeoDCAT-AP'\",\n fields: \"label\",\n preTransform: (data) => [{\n label: (data || [])\n .map(item => {\n const label = item?.label;\n return typeof label === 'object' ? getTranslationFor(label, 'en', ['en']) : label;\n })\n .filter(Boolean)\n .join(', ')\n }]\n},\n});\n\nexport const dcatDeSchema = () => ({\n politicalGeocodingLevelURI: {type: 'objects', fields:\"label,resource:link\"},\n politicalGeocodingURI: {type: 'objects', fields:\"label,resource:link\"},\n availability: {type: 'object', translate:\"availabilityDE,availability\", fields:\"label,resource:link\"},\n contributorID: {type: 'objects', fields:\"label,resource:link\"},\n geocodingDescriptionDe: {type: 'translation'},\n legalBasis: {type: 'translation'},\n qualityProcessURI: {type: 'uri'},\n typeDe: {type: 'string', translate:\"type,type\"},\n references: {type: 'uri'},\n contributor: {type: 'objects', fields:\"name,type,homepage,email,resource\"},\n originator: {type: 'objects', fields:\"name,type,homepage,email,resource\"},\n maintainer: {type: 'objects', fields:\"name,type,homepage,email,resource\"}\n});\n\n/* Schema for dataservice-specific properties */\nexport const dcatDataserviceSchema = () => ({\n catalog: {type: 'translation', fields: 'title'},\n publisher: {type: 'object', fields: 'name,email,homepage:link'},\n contact_point: {type: 'objects', fields: 'email'},\n access_right: {type: 'object', fields: 'resource'},\n endpoint_url: {type: 'links', translate:\",endpoint_url\"},\n format: {type: 'object', fields: 'label,resource:link_blank'}\n});\n\nexport const dcatDatasetseriesSchema = () => ({\n publisher: {type: 'object', fields: 'type,name,resource:link'},\n issued: {type: 'date', translate: 'created'},\n modified: {type: 'date', translate: 'updated'},\n temporal: {type: 'objects', fields: 'gte:date,lte:date'},\n spatial_resource: {type: 'links', fields: 'resource:link'},\n contact_point: {type: 'objects', fields: 'name,email,telephone,address'},\n spatial: {type: 'objects', fields: 'coordinates,type'},\n accrual_periodicity: {type: 'object', fields: 'label:label,resource:link'},\n applicable_legislation: {type: 'links', translate: 'legalBasis,applicableLegislation'},\n});\n"],"names":["dcatFields","dcatDeFields","dcatSchema","t","value","data","item","label","getTranslationFor","dcatDeSchema","dcatDataserviceSchema","dcatDatasetseriesSchema"],"mappings":";AAEO,MAAMA,IAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,6FAQbC,IAAe;AAAA;AAAA,mDAqDfC,IAAa,CAACC,OAAO;AAAA,EAC9B,aAAa,EAAC,MAAM,QAAQ,WAAW,UAAS;AAAA,EA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,eAAe,EAAC,MAAM,WAAW,QAAQ,+BAA8B;AAAA,EACvE,SAAS,EAAC,MAAM,WAAW,QAAQ,mBAAkB;AAAA,EACrD,qBAAqB,EAAC,MAAM,UAAU,QAAQ,4BAA2B;AAAA,EACzE,wBAAwB,EAAC,MAAM,SAAS,WAAW,mCAAkC;AACzF;"}
|
|
1
|
+
{"version":3,"file":"specification.mjs","sources":["../../../lib/datasetDetails/properties/specification.ts"],"sourcesContent":["import { getTranslationFor } from \"../../../lib/utils/helpers\";\n\nexport const dcatFields = `releaseDate, modificationDate,creator,landingPages,sources,\n languages,publisher,contactPoints,spatial,\n spatialResource,conformsTo,provenances,identifiers,otherIdentifiers, resource,\n frequency,accessRights,accrualPeriodicity,hasVersion,isVersionOf,\n temporal,versionInfo,versionNotes,attributes,dimensions,numSeries,hasQualityAnnotations,\n statUnitMeasures,isReferencedBy,qualifiedAttributions,wasGeneratedBy,\n qualifiedRelations,sample,spatialResolutionInMeters,type,temporalResolution, geoDcatAp, catalogRecord`;\n\nexport const dcatDeFields = `politicalGeocodingLevelURI,politicalGeocodingURI,availability,\n contributorID,geocodingDescriptionDe,legalBasis,qualityProcessURI,typeDe,\n references,contributor,originator,maintainer`;\n\n/*\n Below we have schemata describing how properties should be rendered in DatasetDatailsProperties.vue. A schema is\n an object where keys correspond to the above defined fields. For each key, the value is an object the format of which\n we will now describe:\n\n - type: is the the only required property. Will be evaluated in typeCheckers.ts. It reflects the format of the\n data item (CALLED \"response\" BELOW!) retrieved by from the search network response (number, string, url, array, object, array of objects).\n Supported values are:\n * \"number\": response is a single number\n * \"first:number\": render response[0] as a number\n * \"string\": response a simple string\n * \"uri\": response a simple string, rendered as a link\n * \"date\": response a simple string, formatted as a date conforming to the current locale\n * \"translation\": response an object containing locale keys (like \"en\", \"de\"). The value corresponding to the\n current locale is rendered\n * \"object\": response an object whose where each key-value pair is rendered on a separate line\n * \"array\": response an array whose elements are rendered vertically\n * \"links\": reponse either an array of uri-strings rendered as links, or an\n array of objects with a label field that is displayed as a link and another field\n holding the href; that other field is either resource, label or id\n\n - translate: for a property \"xxx\", we have a bold label and tooltip to the left which comes from\n an i18n translation; the default i18n keys are: message.tooltip.datasetDetails.xxx for the tooltip and\n message.metadata.xxx for the displayed label. if instead of xxx, you want to use another key (with the same prefixes),\n translate can provide it. If translate is two strings separated by commas, the left one applies to the tooltip, the right\n to the label. Instead of just a replacement for xxx, you can provide i18n keys without the prefixes by starting the string with\n a slash (example: translate:\"/message.tooltip.yyy,/message.mykey.mylabelkey\"). Instead of translation keys, you can also\n provide literal values as tooltip or label by enclosing the strings in single quotes.\n\n - fields: for objects and arrays of objects, this comma-separated value indicates, what keys of the objects should\n be used for display (filtering out any additional data in the object). If not present, all existent keys will be used.\n A key given in this comma separated list can be of the form \"x\": just a key, or of the form \"x:y\": key x of type y (where\n the type is any of \"link\", \"link_blank\", \"date\" or empty; accordingly, a link (possibly target=\"_blank\") or date will be displayed).\n Also the form \"x:y:z\" is possible, where z is an indication how to translate the key for rendering. If z does not exist,\n the i18n key message.metadata.x will be translated; if z exists, we use message.metadata.z instead. The additional properties for\n \"translate\" above can also be applied to z: leading slash or single quotes.\n\n - track: enable Matomo tracking for a link. track is a string value indicating the key of the data object for which\n tracking should be enabled.\n\n - itemstyles: a string of CSS properties that applies to key-value items of a rendered object\n\n - transform: a function that maps the data to be rendered. Applies after the data has been processed in the value-method of\n DatsetDetailsProperty.vue\n\n - preTransform: same as transform, only applied to the raw data value before processing in the value-method\n\n */\n\nexport const dcatSchema = (t) => ({\n releaseDate: {type: 'date', translate: 'created'},\n modificationDate: {type: 'date', translate: 'updated'},\n landingPages: {type: 'links', translate: 'landingPage'},\n sources: {type: 'links', translate:',sources'},\n languages: {type: 'links', translate: 'language,languages'},\n publisher: {type: 'object', fields: 'name,email,homepage'},\n contactPoints: {type: 'objects', translate:\"/message.tooltip.contactPoints,contactPoints\", fields: \"name::/message.metadata.name,organisation_name::/message.datasetDetails.contactPoints.organizationName,email,telephone,address,url:link\"},\n catalogRecord: {type: 'object', translate:\"'Catalog Record data.europa.eu:','Catalog Record data.europa.eu:'\", fields: \"issued:date:addedToDataEuropaEU,modified:date:updatedOnDataEuropaEU,homepage\"},\n spatial: {type: 'objects', fields: \"coordinates,type\"},\n spatialResource: {type: 'links', translate:\",spatialResource\", fields: \"resource:link\"},\n conformsTo: {type: 'objects', fields: \"title::label,label,resource:link_blank\", track:\"resource\"},\n provenances: {type: 'objects', translate: 'provenance,provenances', fields: \"label,resource:link\"},\n // relatedResources: {type: 'links', translate: 'relatedResource,relatedResources'},\n identifiers: {type: 'links', translate: 'identifier,identifiers'},\n otherIdentifiers: {type: 'links', translate: 'otherIdentifier,otherIdentifiers', fields:\"identifier:link,resource:link:identifier,scheme:link\"},\n resource: {type: 'uri', translate: \",'uriRef:'\"},\n frequency: {type: 'object', fields:\"title,resource:link\"},\n accessRights: {type: 'object', translate:\"/message.tooltip.datasetDetails.distributions.rights,accessRights\", fields:\"label::\"},\n accrualPeriodicity: {type: 'object', translate:\"frequency,accrualPeriodicity\", fields:\"label::\"},\n creator: {type: 'objects', fields:\"type,name,resource:link,email,homepage:link\"},\n hasVersion: {type: 'links'},\n isVersionOf: {type: 'links', translate:\"versionOf,isVersionOf\"},\n temporal: {type: 'objects', translate:\"/message.tooltip.datasetDetails.distributions.temporalResolution,temporal\", fields: \"gte:date:,lte:date:' -'\", itemstyles:\"float:left\"},\n versionInfo: {type: 'string'},\n versionNotes: {type: 'translation'},\n attributes: {type: 'links', translate:\",attributes\"},\n dimensions: {type: 'links', translate:\",dimensions\"},\n numSeries: {type: 'number'},\n hasQualityAnnotations: {type: 'links', translate: \",qualityAnnotations\"},\n statUnitMeasures: {type: 'links', translate: \"unitsOfMeasurement\"},\n isReferencedBy: {type: 'links'},\n qualifiedAttributions: {type: 'links', translate: \"qualifiedAttribution\"},\n wasGeneratedBy: {type: 'links'},\n qualifiedRelations: {type: 'objects', translate: \"qualifiedRelation\", fields: \"relation:link,had_role:link:role\"},\n sample: {type: 'links'},\n spatialResolutionInMeters: {\n type: 'number', translate: \"spatialResolutionInMeters,spatialResolutionInMeters.label\",\n transform: value => t('message.metadata.spatialResolutionInMeters.value', {number: value})\n },\n type: {type: 'object', fields: \"label,resource:link_blank\", preTransform: (value) => ({\n ...value,\n name: value?.name ?? value?.label\n })},\n temporalResolution: {type: 'string'},\n geoDcatAp: {\n type: 'objects',\n translate: \"/message.tooltip.datasetDetails.geoDcatAp,'GeoDCAT-AP'\",\n fields: \"label\",\n preTransform: (data) => [{\n label: (data || [])\n .map(item => {\n const label = item?.label;\n return typeof label === 'object' ? getTranslationFor(label, 'en', ['en']) : label;\n })\n .filter(Boolean)\n .join(', ')\n }]\n},\n});\n\nexport const dcatDeSchema = () => ({\n politicalGeocodingLevelURI: {type: 'objects', fields:\"label,resource:link\"},\n politicalGeocodingURI: {type: 'objects', fields:\"label,resource:link\"},\n availability: {type: 'object', translate:\"availabilityDE,availability\", fields:\"label,resource:link\"},\n contributorID: {type: 'objects', fields:\"label,resource:link\"},\n geocodingDescriptionDe: {type: 'translation'},\n legalBasis: {type: 'translation'},\n qualityProcessURI: {type: 'uri'},\n typeDe: {type: 'string', translate:\"type,type\"},\n references: {type: 'uri'},\n contributor: {type: 'objects', fields:\"name,type,homepage,email,resource\"},\n originator: {type: 'objects', fields:\"name,type,homepage,email,resource\"},\n maintainer: {type: 'objects', fields:\"name,type,homepage,email,resource\"}\n});\n\n/* Schema for dataservice-specific properties */\nexport const dcatDataserviceSchema = () => ({\n catalog: {type: 'translation', fields: 'title'},\n publisher: {type: 'object', fields: 'name,email,homepage:link'},\n contact_point: {type: 'objects', fields: 'email'},\n access_right: {type: 'object', fields: 'resource'},\n endpoint_url: {type: 'links', translate:\",endpoint_url\"},\n format: {type: 'object', fields: 'label,resource:link_blank'}\n});\n\nexport const dcatDatasetseriesSchema = () => ({\n publisher: {type: 'object', fields: 'type,name,resource:link'},\n issued: {type: 'date', translate: 'created'},\n modified: {type: 'date', translate: 'updated'},\n temporal: {type: 'objects', fields: 'gte:date,lte:date'},\n spatial_resource: {type: 'links', fields: 'resource:link'},\n contact_point: {type: 'objects', fields: 'name,email,telephone,address'},\n spatial: {type: 'objects', fields: 'coordinates,type'},\n accrual_periodicity: {type: 'object', fields: 'label:label,resource:link'},\n applicable_legislation: {type: 'links', translate: 'legalBasis,applicableLegislation'},\n});\n"],"names":["dcatFields","dcatDeFields","dcatSchema","t","value","data","item","label","getTranslationFor","dcatDeSchema","dcatDataserviceSchema","dcatDatasetseriesSchema"],"mappings":";AAEO,MAAMA,IAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4GAQbC,IAAe;AAAA;AAAA,mDAqDfC,IAAa,CAACC,OAAO;AAAA,EAC9B,aAAa,EAAC,MAAM,QAAQ,WAAW,UAAS;AAAA,EAChD,kBAAkB,EAAC,MAAM,QAAQ,WAAW,UAAS;AAAA,EACrD,cAAc,EAAC,MAAM,SAAS,WAAW,cAAa;AAAA,EACtD,SAAS,EAAC,MAAM,SAAS,WAAU,WAAU;AAAA,EAC7C,WAAW,EAAC,MAAM,SAAS,WAAW,qBAAoB;AAAA,EAC1D,WAAW,EAAC,MAAM,UAAU,QAAQ,sBAAqB;AAAA,EACzD,eAAe,EAAC,MAAM,WAAW,WAAU,gDAAgD,QAAQ,0IAAyI;AAAA,EAC5O,eAAe,EAAC,MAAM,UAAU,WAAU,qEAAqE,QAAQ,+EAA8E;AAAA,EACrM,SAAS,EAAC,MAAM,WAAW,QAAQ,mBAAkB;AAAA,EACrD,iBAAiB,EAAC,MAAM,SAAS,WAAU,oBAAoB,QAAQ,gBAAe;AAAA,EACtF,YAAY,EAAC,MAAM,WAAW,QAAQ,0CAA0C,OAAM,WAAU;AAAA,EAChG,aAAa,EAAC,MAAM,WAAW,WAAW,0BAA0B,QAAQ,sBAAqB;AAAA;AAAA,EAEjG,aAAa,EAAC,MAAM,SAAS,WAAW,yBAAwB;AAAA,EAChE,kBAAkB,EAAC,MAAM,SAAS,WAAW,oCAAo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