@piveau/piveau-hub-ui-modules 4.6.11 → 4.6.13
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/configurations/configureComponents.mjs +21 -19
- package/dist/configurations/configureComponents.mjs.map +1 -1
- package/dist/data-provider-interface/components/SimpleSelect.vue.mjs +63 -60
- package/dist/data-provider-interface/components/SimpleSelect.vue.mjs.map +1 -1
- package/dist/data-provider-interface/config/dcatapde/input-definition.mjs +2 -1
- package/dist/data-provider-interface/config/dcatapde/input-definition.mjs.map +1 -1
- package/dist/datasetDetails/distributions/Distributions.vue.d.ts +0 -1
- package/dist/datasetDetails/distributions/Distributions.vue.mjs +19 -23
- package/dist/datasetDetails/distributions/Distributions.vue.mjs.map +1 -1
- package/dist/piveau-hub-ui-modules.css +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from "../facets/ExpandableSelectFacet.vue.mjs";
|
|
2
2
|
import a from "../facets/RadioFacet.vue.mjs";
|
|
3
3
|
import m from "../widgets/PvShowMore.vue.mjs";
|
|
4
4
|
import s from "../widgets/PvButton.vue.mjs";
|
|
@@ -6,21 +6,23 @@ import n from "../widgets/PvBanner.vue.mjs";
|
|
|
6
6
|
import p from "../datasetDetails/navigation/DatasetDetailsNavigationPage.vue.mjs";
|
|
7
7
|
import f from "../PvDataInfoBox/PvDataInfoBox.vue.mjs";
|
|
8
8
|
import D from "../datasets/Datasets.vue.mjs";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
9
|
+
import l from "../datasetDetails/distributions/DistributionsHeader.vue.mjs";
|
|
10
|
+
import c from "../datasetDetails/distributions/distributionDetails/DistributionDetails.vue.mjs";
|
|
11
11
|
import u from "../facets/SelectedFacetsOverview.vue.mjs";
|
|
12
12
|
import b from "../navigation/SubNavigation.vue.mjs";
|
|
13
|
-
import
|
|
14
|
-
import
|
|
13
|
+
import d from "../datasetDetails/header/DatasetDetailsHeader.vue.mjs";
|
|
14
|
+
import v from "../datasetDetails/DatasetDetailsDescription.vue.mjs";
|
|
15
15
|
import F from "../datasetDetails/DatasetDetailsDataset.vue.mjs";
|
|
16
16
|
import P from "../datasetDetails/distributions/Distribution.vue.mjs";
|
|
17
17
|
import S from "../datasetDetails/distributions/distributionActions/DistributionActions.vue.mjs";
|
|
18
18
|
import g from "../datasetDetails/properties/DatasetDetailsProperties.vue.mjs";
|
|
19
|
-
import
|
|
20
|
-
import
|
|
21
|
-
import
|
|
19
|
+
import w from "../datasetDetails/features/DatasetDetailsFeatures.vue.mjs";
|
|
20
|
+
import x from "../datasetDetails/features/DatasetDetailsFeatureHeader.vue.mjs";
|
|
21
|
+
import B from "../datasetDetails/distributions/distributionPreview/DistributionVisualisationSlot.vue.mjs";
|
|
22
|
+
import C from "../datasetDetails/distributions/DownloadAllDistributions.vue.mjs";
|
|
22
23
|
const H = {
|
|
23
|
-
SelectFacet:
|
|
24
|
+
SelectFacet: e,
|
|
25
|
+
DownloadAllDistributions: C,
|
|
24
26
|
RadioFacet: a,
|
|
25
27
|
PvShowMore: m,
|
|
26
28
|
PvButton: s,
|
|
@@ -28,27 +30,27 @@ const H = {
|
|
|
28
30
|
DatasetDetailsNavigationPage: p,
|
|
29
31
|
PvDataInfoBox: f,
|
|
30
32
|
Datasets: D,
|
|
31
|
-
DistributionsHeader:
|
|
32
|
-
DistributionDetails:
|
|
33
|
+
DistributionsHeader: l,
|
|
34
|
+
DistributionDetails: c,
|
|
33
35
|
SelectedFacetsOverview: u,
|
|
34
36
|
SubNavigation: b,
|
|
35
|
-
DatasetDetailsHeader:
|
|
36
|
-
DatasetDetailsDescription:
|
|
37
|
+
DatasetDetailsHeader: d,
|
|
38
|
+
DatasetDetailsDescription: v,
|
|
37
39
|
DatasetDetailsDataset: F,
|
|
38
40
|
Distribution: P,
|
|
39
41
|
DistributionActions: S,
|
|
40
42
|
DatasetDetailsProperties: g,
|
|
41
|
-
DatasetDetailsFeatures:
|
|
42
|
-
DatasetDetailsFeatureHeader:
|
|
43
|
-
DistributionVisualisationSlot:
|
|
43
|
+
DatasetDetailsFeatures: w,
|
|
44
|
+
DatasetDetailsFeatureHeader: x,
|
|
45
|
+
DistributionVisualisationSlot: B
|
|
44
46
|
};
|
|
45
|
-
function
|
|
46
|
-
const t = { ...H, ...
|
|
47
|
+
function Y(r, i) {
|
|
48
|
+
const t = { ...H, ...i };
|
|
47
49
|
Object.keys(t).forEach((o) => {
|
|
48
50
|
r.component(o, t[o]);
|
|
49
51
|
});
|
|
50
52
|
}
|
|
51
53
|
export {
|
|
52
|
-
|
|
54
|
+
Y as configureComponents
|
|
53
55
|
};
|
|
54
56
|
//# sourceMappingURL=configureComponents.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configureComponents.mjs","sources":["../../lib/configurations/configureComponents.ts"],"sourcesContent":["import ExpandableSelectFacet from \"../facets/ExpandableSelectFacet.vue\";\nimport RadioFacet from \"../facets/RadioFacet.vue\";\nimport PvShowMore from \"../widgets/PvShowMore.vue\";\nimport PvButton from \"../widgets/PvButton.vue\";\nimport PvBanner from \"../widgets/PvBanner.vue\";\nimport DatasetDetailsNavigationPage from \"../datasetDetails/navigation/DatasetDetailsNavigationPage.vue\";\nimport PvDataInfoBox from \"../PvDataInfoBox/PvDataInfoBox.vue\";\nimport Datasets from \"../datasets/Datasets.vue\";\nimport DistributionsHeader from \"../datasetDetails/distributions/DistributionsHeader.vue\";\nimport DistributionDetails from \"../datasetDetails/distributions/distributionDetails/DistributionDetails.vue\";\nimport SelectedFacetsOverview from \"../facets/SelectedFacetsOverview.vue\"\nimport SubNavigation from \"../navigation/SubNavigation.vue\";\nimport DatasetDetailsHeader from \"../datasetDetails/header/DatasetDetailsHeader.vue\";\nimport DatasetDetailsDescription from \"../datasetDetails/DatasetDetailsDescription.vue\";\nimport DatasetDetailsDataset from \"../datasetDetails/DatasetDetailsDataset.vue\";\nimport Distribution from \"../datasetDetails/distributions/Distribution.vue\";\nimport DistributionActions from \"../datasetDetails/distributions/distributionActions/DistributionActions.vue\";\nimport DatasetDetailsProperties from \"../datasetDetails/properties/DatasetDetailsProperties.vue\";\nimport DatasetDetailsFeatures from \"../datasetDetails/features/DatasetDetailsFeatures.vue\";\nimport DatasetDetailsFeatureHeader from \"../datasetDetails/features/DatasetDetailsFeatureHeader.vue\"\nimport DistributionVisualisationSlot from \"../datasetDetails/distributions/distributionPreview/DistributionVisualisationSlot.vue\";\n\nexport type ComponentMap = { [key: string]: any };\n\nconst defaultComponents: ComponentMap = {\n SelectFacet: ExpandableSelectFacet,\n RadioFacet,\n PvShowMore,\n PvButton,\n PvBanner,\n DatasetDetailsNavigationPage,\n PvDataInfoBox,\n Datasets,\n DistributionsHeader,\n DistributionDetails,\n SelectedFacetsOverview,\n SubNavigation,\n DatasetDetailsHeader,\n DatasetDetailsDescription,\n DatasetDetailsDataset,\n Distribution,\n DistributionActions,\n DatasetDetailsProperties,\n DatasetDetailsFeatures,\n DatasetDetailsFeatureHeader,\n DistributionVisualisationSlot\n};\n\nexport function configureComponents(app: any, components?: ComponentMap) {\n const allComponents: ComponentMap = { ...defaultComponents, ...components };\n const componentKeys: string[] = Object.keys(allComponents);\n componentKeys.forEach((key: string) => {
|
|
1
|
+
{"version":3,"file":"configureComponents.mjs","sources":["../../lib/configurations/configureComponents.ts"],"sourcesContent":["import ExpandableSelectFacet from \"../facets/ExpandableSelectFacet.vue\";\nimport RadioFacet from \"../facets/RadioFacet.vue\";\nimport PvShowMore from \"../widgets/PvShowMore.vue\";\nimport PvButton from \"../widgets/PvButton.vue\";\nimport PvBanner from \"../widgets/PvBanner.vue\";\nimport DatasetDetailsNavigationPage from \"../datasetDetails/navigation/DatasetDetailsNavigationPage.vue\";\nimport PvDataInfoBox from \"../PvDataInfoBox/PvDataInfoBox.vue\";\nimport Datasets from \"../datasets/Datasets.vue\";\nimport DistributionsHeader from \"../datasetDetails/distributions/DistributionsHeader.vue\";\nimport DistributionDetails from \"../datasetDetails/distributions/distributionDetails/DistributionDetails.vue\";\nimport SelectedFacetsOverview from \"../facets/SelectedFacetsOverview.vue\"\nimport SubNavigation from \"../navigation/SubNavigation.vue\";\nimport DatasetDetailsHeader from \"../datasetDetails/header/DatasetDetailsHeader.vue\";\nimport DatasetDetailsDescription from \"../datasetDetails/DatasetDetailsDescription.vue\";\nimport DatasetDetailsDataset from \"../datasetDetails/DatasetDetailsDataset.vue\";\nimport Distribution from \"../datasetDetails/distributions/Distribution.vue\";\nimport DistributionActions from \"../datasetDetails/distributions/distributionActions/DistributionActions.vue\";\nimport DatasetDetailsProperties from \"../datasetDetails/properties/DatasetDetailsProperties.vue\";\nimport DatasetDetailsFeatures from \"../datasetDetails/features/DatasetDetailsFeatures.vue\";\nimport DatasetDetailsFeatureHeader from \"../datasetDetails/features/DatasetDetailsFeatureHeader.vue\"\nimport DistributionVisualisationSlot from \"../datasetDetails/distributions/distributionPreview/DistributionVisualisationSlot.vue\";\nimport DownloadAllDistributions from \"../datasetDetails/distributions/DownloadAllDistributions\";\n\nexport type ComponentMap = { [key: string]: any };\n\nconst defaultComponents: ComponentMap = {\n SelectFacet: ExpandableSelectFacet,\n DownloadAllDistributions,\n RadioFacet,\n PvShowMore,\n PvButton,\n PvBanner,\n DatasetDetailsNavigationPage,\n PvDataInfoBox,\n Datasets,\n DistributionsHeader,\n DistributionDetails,\n SelectedFacetsOverview,\n SubNavigation,\n DatasetDetailsHeader,\n DatasetDetailsDescription,\n DatasetDetailsDataset,\n Distribution,\n DistributionActions,\n DatasetDetailsProperties,\n DatasetDetailsFeatures,\n DatasetDetailsFeatureHeader,\n DistributionVisualisationSlot\n};\n\nexport function configureComponents(app: any, components?: ComponentMap) {\n const allComponents: ComponentMap = { ...defaultComponents, ...components };\n const componentKeys: string[] = Object.keys(allComponents);\n componentKeys.forEach((key: string) => {\n app.component(key, allComponents[key]);\n });\n}\n"],"names":["defaultComponents","ExpandableSelectFacet","DownloadAllDistributions","RadioFacet","PvShowMore","PvButton","PvBanner","DatasetDetailsNavigationPage","PvDataInfoBox","Datasets","DistributionsHeader","DistributionDetails","SelectedFacetsOverview","SubNavigation","DatasetDetailsHeader","DatasetDetailsDescription","DatasetDetailsDataset","Distribution","DistributionActions","DatasetDetailsProperties","DatasetDetailsFeatures","DatasetDetailsFeatureHeader","DistributionVisualisationSlot","configureComponents","app","components","allComponents","key"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAyBA,MAAMA,IAAkC;AAAA,EACtC,aAAaC;AAAA,EACb,0BAAAC;AAAA,EACA,YAAAC;AAAA,EACA,YAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,8BAAAC;AAAA,EACA,eAAAC;AAAA,EACA,UAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,wBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,2BAAAC;AAAA,EACA,uBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,0BAAAC;AAAA,EACA,wBAAAC;AAAA,EACA,6BAAAC;AAAA,EACA,+BAAAC;AACF;AAEgB,SAAAC,EAAoBC,GAAUC,GAA2B;AACvE,QAAMC,IAA8B,EAAE,GAAG1B,GAAmB,GAAGyB,EAAW;AAE5D,EADkB,OAAO,KAAKC,CAAa,EAC3C,QAAQ,CAACC,MAAgB;AACrC,IAAAH,EAAI,UAAUG,GAAKD,EAAcC,CAAG,CAAC;AAAA,EAAA,CACtC;AACH;"}
|
|
@@ -1,112 +1,115 @@
|
|
|
1
|
-
import { computed as
|
|
1
|
+
import { computed as i, ref as p, watch as z, onMounted as X, nextTick as D, openBlock as u, createElementBlock as a, createElementVNode as h, toDisplayString as V, createTextVNode as k, withDirectives as N, createVNode as O, unref as _, vShow as $, Fragment as M, renderList as T, createCommentVNode as U } from "vue";
|
|
2
2
|
import { useStore as Y } from "vuex";
|
|
3
3
|
import { getNode as Z } from "@formkit/core";
|
|
4
4
|
import { onClickOutside as g, useAsyncState as ee } from "../../external/@vueuse/core/index";
|
|
5
5
|
import te from "axios";
|
|
6
6
|
import { useRuntimeEnv as se } from "../../composables/useRuntimeEnv.mjs";
|
|
7
7
|
import { useI18n as le } from "vue-i18n";
|
|
8
|
-
import { FormKit as
|
|
8
|
+
import { FormKit as j } from "@formkit/vue";
|
|
9
|
+
import { useDpiContext as re } from "../composables/useDpiContext.mjs";
|
|
9
10
|
import "./SimpleSelect.vue2.mjs";
|
|
10
|
-
const
|
|
11
|
+
const oe = { class: "formkitProperty" }, ne = { class: "position-relative formkitCmpWrap" }, ie = { key: 0 }, ue = ["onClick"], ae = ["onClick"], xe = {
|
|
11
12
|
__name: "SimpleSelect",
|
|
12
13
|
props: {
|
|
13
14
|
context: Object
|
|
14
15
|
},
|
|
15
|
-
setup(
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
P.value = !1, l.id ? (c.value = l.id, f.value = l.name) : (c.value = l, f.value = l), v.value = !1;
|
|
24
|
-
}, { execute: G, state: o, isReady: R, error: E } = ee(async () => await te.get(W.api.baseUrl + "search?filter=catalogue&limit=1000"), { data: { result: { results: [] } } }, { immediate: !1 }), H = u(() => S.value && !!o.value && R.value);
|
|
25
|
-
N(E, () => {
|
|
26
|
-
console.error(E.value);
|
|
16
|
+
setup(A) {
|
|
17
|
+
const d = A, q = re(), { locale: B, fallbackLocale: K } = le({ useScope: "global" }), w = i(() => Q.getters["auth/getUserCatalogIds"]), m = p(!1), Q = Y(), I = p(null), P = se(), f = p(""), c = p(""), L = p(!1);
|
|
18
|
+
g(I, (s) => m.value = !1);
|
|
19
|
+
const y = async (s) => {
|
|
20
|
+
s.id ? (c.value = s.id, f.value = (s == null ? void 0 : s.name) || s.id) : (c.value = s, f.value = s), m.value = !1;
|
|
21
|
+
}, { execute: W, state: o, isReady: S, error: R } = ee(async () => await te.get(P.api.baseUrl + "search?filter=catalogue&limit=1000"), { data: { result: { results: [] } } }, { immediate: !1 }), G = i(() => L.value && !!o.value && S.value);
|
|
22
|
+
z(R, () => {
|
|
23
|
+
console.error(R.value);
|
|
27
24
|
});
|
|
28
|
-
const
|
|
29
|
-
var
|
|
30
|
-
return ((r = (
|
|
31
|
-
}),
|
|
32
|
-
var
|
|
33
|
-
return
|
|
34
|
-
}), x =
|
|
35
|
-
var r,
|
|
36
|
-
return !
|
|
25
|
+
const E = i(() => {
|
|
26
|
+
var s, e, l, r;
|
|
27
|
+
return ((r = (l = (e = (s = o == null ? void 0 : o.value) == null ? void 0 : s.data) == null ? void 0 : e.result) == null ? void 0 : l.results) == null ? void 0 : r.length) > 0;
|
|
28
|
+
}), H = i(() => {
|
|
29
|
+
var s, e, l, r;
|
|
30
|
+
return E && ((r = (l = (e = (s = o == null ? void 0 : o.value) == null ? void 0 : s.data) == null ? void 0 : e.result) == null ? void 0 : l.results) == null ? void 0 : r.length) === 1;
|
|
31
|
+
}), x = i(() => {
|
|
32
|
+
var r, v, C;
|
|
33
|
+
return !E.value || !S.value ? [] : (((C = (v = (r = o.value) == null ? void 0 : r.data) == null ? void 0 : v.result) == null ? void 0 : C.results) || []).filter((t) => {
|
|
37
34
|
var n;
|
|
38
35
|
return (n = w.value) == null ? void 0 : n.includes(t.id);
|
|
39
36
|
}).map((t) => {
|
|
40
|
-
var
|
|
37
|
+
var F;
|
|
41
38
|
const n = (t == null ? void 0 : t.id) || "";
|
|
42
39
|
let b = "";
|
|
43
|
-
return t != null && t.title ? typeof (t == null ? void 0 : t.title) == "string" ? b = t == null ? void 0 : t.title : typeof (t == null ? void 0 : t.title) == "object" && (b = (t == null ? void 0 : t.title[B.value]) || (t == null ? void 0 : t.title[K.value]) || ((
|
|
40
|
+
return t != null && t.title ? typeof (t == null ? void 0 : t.title) == "string" ? b = t == null ? void 0 : t.title : typeof (t == null ? void 0 : t.title) == "object" && (b = (t == null ? void 0 : t.title[B.value]) || (t == null ? void 0 : t.title[K.value]) || ((F = Object.values(t == null ? void 0 : t.title)) == null ? void 0 : F[0]) || n) : b = n, { id: n, name: b || n };
|
|
44
41
|
});
|
|
45
42
|
});
|
|
46
|
-
|
|
47
|
-
if (
|
|
43
|
+
z(H, (s) => {
|
|
44
|
+
if (s) {
|
|
48
45
|
const e = o.value.data.result.results[0];
|
|
49
46
|
y({ id: e.id, name: e.name });
|
|
50
47
|
}
|
|
51
48
|
}, { immediate: !0 }), X(async () => {
|
|
52
|
-
var
|
|
53
|
-
await
|
|
54
|
-
const
|
|
55
|
-
e && y({ id: e.id, name: e.name }), await
|
|
56
|
-
})
|
|
57
|
-
|
|
49
|
+
var l, r, v;
|
|
50
|
+
await W(), await D();
|
|
51
|
+
const s = ((r = (l = Z) == null ? void 0 : l("dcat:catalog")) == null ? void 0 : r.value) || void 0, e = (v = x.value) == null ? void 0 : v.find((C) => C.id === s);
|
|
52
|
+
e && y({ id: e.id, name: e.name }), await D(), L.value = !0;
|
|
53
|
+
});
|
|
54
|
+
const J = i(() => {
|
|
55
|
+
var e;
|
|
56
|
+
return (e = q.value.edit) == null ? void 0 : e.enabled;
|
|
57
|
+
});
|
|
58
|
+
return (s, e) => (u(), a("div", oe, [
|
|
59
|
+
h("h4", null, V(d.context.label), 1),
|
|
58
60
|
e[6] || (e[6] = k()),
|
|
59
|
-
h("div",
|
|
60
|
-
|
|
61
|
-
|
|
61
|
+
h("div", ne, [
|
|
62
|
+
G.value ? (u(), a("div", ie, [
|
|
63
|
+
N(O(_(j), {
|
|
62
64
|
modelValue: c.value,
|
|
63
|
-
"onUpdate:modelValue": e[0] || (e[0] = (
|
|
64
|
-
name: `${
|
|
65
|
+
"onUpdate:modelValue": e[0] || (e[0] = (l) => c.value = l),
|
|
66
|
+
name: `${d.context.node.name}`,
|
|
65
67
|
type: "text"
|
|
66
68
|
}, null, 8, ["modelValue", "name"]), [
|
|
67
|
-
[
|
|
69
|
+
[$, !1]
|
|
68
70
|
]),
|
|
69
71
|
e[4] || (e[4] = k()),
|
|
70
|
-
|
|
72
|
+
O(_(j), {
|
|
71
73
|
class: "autocompleteInputfield",
|
|
72
74
|
modelValue: f.value,
|
|
73
|
-
"onUpdate:modelValue": e[1] || (e[1] = (
|
|
74
|
-
placeholder:
|
|
75
|
+
"onUpdate:modelValue": e[1] || (e[1] = (l) => f.value = l),
|
|
76
|
+
placeholder: d.context.attrs.placeholder,
|
|
75
77
|
type: "text",
|
|
76
|
-
onClick: e[2] || (e[2] = (s) => v.value = !v.value),
|
|
77
78
|
validation: "required",
|
|
78
79
|
mandatory: "true",
|
|
79
80
|
"validation-messages": {
|
|
80
|
-
required:
|
|
81
|
+
required: d.context.attrs.placeholder
|
|
81
82
|
},
|
|
82
|
-
name: `${
|
|
83
|
-
|
|
83
|
+
name: `${d.context.node.name}__displayedValue`,
|
|
84
|
+
disabled: J.value,
|
|
85
|
+
onClick: e[2] || (e[2] = (l) => m.value = !m.value)
|
|
86
|
+
}, null, 8, ["modelValue", "placeholder", "validation-messages", "name", "disabled"]),
|
|
84
87
|
e[5] || (e[5] = k()),
|
|
85
|
-
|
|
88
|
+
N(h("ul", {
|
|
86
89
|
ref_key: "dropdownList",
|
|
87
|
-
ref:
|
|
90
|
+
ref: I,
|
|
88
91
|
class: "autocompleteResultList selectListFK catSelectList"
|
|
89
92
|
}, [
|
|
90
|
-
(
|
|
91
|
-
key:
|
|
92
|
-
onClick: (r) => y(
|
|
93
|
+
(u(!0), a(M, null, T(x.value, (l) => (u(), a("li", {
|
|
94
|
+
key: l,
|
|
95
|
+
onClick: (r) => y(l),
|
|
93
96
|
class: "p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC"
|
|
94
|
-
}, V(
|
|
97
|
+
}, V(l.name), 9, ue))), 128)),
|
|
95
98
|
e[3] || (e[3] = k()),
|
|
96
|
-
x.value.length === 0 ? (
|
|
97
|
-
key:
|
|
98
|
-
onClick: (r) => y(
|
|
99
|
+
x.value.length === 0 ? (u(!0), a(M, { key: 0 }, T(w.value, (l) => (u(), a("li", {
|
|
100
|
+
key: l,
|
|
101
|
+
onClick: (r) => y(l),
|
|
99
102
|
class: "p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC"
|
|
100
|
-
}, V(
|
|
103
|
+
}, V(l), 9, ae))), 128)) : U("", !0)
|
|
101
104
|
], 512), [
|
|
102
|
-
[
|
|
105
|
+
[$, m.value]
|
|
103
106
|
])
|
|
104
|
-
])) :
|
|
107
|
+
])) : U("", !0)
|
|
105
108
|
])
|
|
106
109
|
]));
|
|
107
110
|
}
|
|
108
111
|
};
|
|
109
112
|
export {
|
|
110
|
-
|
|
113
|
+
xe as default
|
|
111
114
|
};
|
|
112
115
|
//# sourceMappingURL=SimpleSelect.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleSelect.vue.mjs","sources":["../../../lib/data-provider-interface/components/SimpleSelect.vue"],"sourcesContent":["<template>\n <div class=\"formkitProperty\">\n <h4>{{ props.context.label }}</h4>\n <div class=\"position-relative formkitCmpWrap\">\n\n <div v-if=\"isReady\">\n <FormKit v-show=\"false\" v-model=\"
|
|
1
|
+
{"version":3,"file":"SimpleSelect.vue.mjs","sources":["../../../lib/data-provider-interface/components/SimpleSelect.vue"],"sourcesContent":["<template>\n <div class=\"formkitProperty\">\n <h4>{{ props.context.label }}</h4>\n <div class=\"position-relative formkitCmpWrap\">\n\n <div v-if=\"isReady\">\n\n <!-- Hidden input that contains the actual catalog id. We rely on that to pass the catalog id to backend later -->\n <FormKit v-show=\"false\" v-model=\"selectedCatalogId\" :name=\"`${props.context.node.name}`\" type=\"text\" />\n\n <!-- User-facing input that displays the name of the selected catalog -->\n <FormKit\n class=\"autocompleteInputfield\"\n v-model=\"selectedCatalogTitle\"\n :placeholder=\"props.context.attrs.placeholder\"\n type=\"text\" \n validation=\"required\"\n mandatory=\"true\"\n :validation-messages=\"{\n required: props.context.attrs.placeholder,\n }\" :name=\"`${props.context.node.name}__displayedValue`\"\n :disabled=\"isDisabled\"\n @click=\"showList = !showList\"\n />\n <ul ref=\"dropdownList\" v-show=\"showList\" class=\"autocompleteResultList selectListFK catSelectList\">\n <li v-for=\"match in authorizedCatalogs\" :key=\"match\" @click=\"setvalue(match)\"\n class=\"p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC\">{{\n match.name }}\n </li>\n <li v-if=\"authorizedCatalogs.length === 0\" v-for=\"idMatch in userCats\" :key=\"idMatch\" @click=\"setvalue(idMatch)\"\n class=\"p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC\">{{\n idMatch }}\n </li>\n </ul>\n </div>\n </div>\n </div>\n\n</template>\n<script setup>\nimport { ref, computed, onMounted, watch, nextTick } from 'vue';\nimport { useStore } from 'vuex';\nimport { getNode } from '@formkit/core'\nimport { onClickOutside } from '@vueuse/core'\nimport axios from 'axios'\nimport { useRuntimeEnv } from \"../../composables/useRuntimeEnv.ts\";\nimport { useI18n } from 'vue-i18n';\nimport { useAsyncState } from '@vueuse/core';\nimport { FormKit } from '@formkit/vue';\nimport { useDpiContext } from '../composables/useDpiContext';\n\nconst props = defineProps({\n context: Object\n})\n\nconst dpiContext = useDpiContext()\nconst { locale, fallbackLocale } = useI18n({ useScope: 'global' })\n\nconst userCats = computed(() => store.getters['auth/getUserCatalogIds']);\nconst showList = ref(false)\nconst store = useStore()\nconst dropdownList = ref(null)\nconst env = useRuntimeEnv()\nconst selectedCatalogTitle = ref('')\nconst selectedCatalogId = ref('')\nconst hasMounted = ref(false)\n\nonClickOutside(dropdownList, event => showList.value = false)\n\nconst setvalue = async (e) => {\n if (e.id) {\n selectedCatalogId.value = e.id\n selectedCatalogTitle.value = e?.name || e.id\n } else {\n selectedCatalogId.value = e\n selectedCatalogTitle.value = e\n }\n\n showList.value = false\n}\n\nconst { execute: filterCatList, state: catalogListData, isReady: isQueryReady, error } = useAsyncState(async () => {\n const catalogListData = await axios.get(env.api.baseUrl + 'search?filter=catalogue&limit=1000')\n return catalogListData\n}, { data: { result: { results: [] } } }, { immediate: false })\n\n// Wait until everything mounted and loaded tu ensure that the catalog list is available and selected catalog from edit mode is available\nconst isReady = computed(() => hasMounted.value && !!catalogListData.value && isQueryReady.value)\n\nwatch(error, () => {\n console.error(error.value)\n})\n\nconst hasResults = computed(() => {\n return catalogListData?.value?.data?.result?.results?.length > 0\n})\n\nconst hasOneResultOnly = computed(() => {\n return hasResults && catalogListData?.value?.data?.result?.results?.length === 1\n})\n\n/**\n * Computes list of users' authorized catalogs in { id: string; name: string } format\n */\nconst authorizedCatalogs = computed(() => {\n if (!hasResults.value || !isQueryReady.value) return []\n\n const allCatalogs = catalogListData.value?.data?.result?.results || []\n const authorizedCatalogs = allCatalogs.filter(catalog => userCats.value?.includes(catalog.id))\n\n // map to { id: string; name: string } pairs\n const authorizedCatalogsDataModel = authorizedCatalogs.map((catalog) => {\n const id = catalog?.id || ''\n let title = ''\n\n if (!catalog?.title) title = id\n else if (typeof catalog?.title === 'string') title = catalog?.title\n else if (typeof catalog?.title === 'object') title =\n catalog?.title[locale.value]\n || catalog?.title[fallbackLocale.value]\n || Object.values(catalog?.title)?.[0]\n || id\n\n return { id, name: title || id }\n });\n return authorizedCatalogsDataModel\n})\n\nwatch(hasOneResultOnly, (yes) => {\n if (yes) {\n const result = catalogListData.value.data.result.results[0]\n setvalue({ id: result.id, name: result.name })\n }\n}, { immediate: true })\n\nonMounted(async () => {\n // When editing, we can restore the selected catalog id immediately, but we rely on fetching from hub-search for its catalog title.\n // So we need to wait until everything is fetched before proceeding further.\n await filterCatList()\n await nextTick()\n // todo: can this be made more robust by using dpiContext.value.edit?.id?\n const catalogIdToLoadForEdit = getNode?.('dcat:catalog')?.value || undefined\n const maybeFoundCatalogFromQuery = authorizedCatalogs.value?.find(item => item.id === catalogIdToLoadForEdit)\n if (maybeFoundCatalogFromQuery) {\n setvalue({ id: maybeFoundCatalogFromQuery.id, name: maybeFoundCatalogFromQuery.name })\n }\n await nextTick()\n hasMounted.value = true\n});\n\n// Disable select option if in edit mode\n// Note: Decision is made due to a backend limitation that causes dataset duplicates to occur when changing a catalog\nconst isDisabled = computed(() => {\n const isInEditMode = dpiContext.value.edit?.enabled\n return isInEditMode\n})\n\n</script>\n<style>\n.catSelectList {\n width: 97.3% !important;\n margin: 0 1rem;\n}\n\n.selectListFK {\n\n max-height: 20rem;\n overflow: overlay;\n overflow-x: hidden;\n}\n</style>\n"],"names":["props","__props","dpiContext","useDpiContext","locale","fallbackLocale","useI18n","userCats","computed","store","showList","ref","useStore","dropdownList","env","useRuntimeEnv","selectedCatalogTitle","selectedCatalogId","hasMounted","onClickOutside","event","setvalue","e","filterCatList","catalogListData","isQueryReady","error","useAsyncState","axios","isReady","watch","hasResults","_d","_c","_b","_a","hasOneResultOnly","authorizedCatalogs","catalog","id","title","yes","result","onMounted","nextTick","catalogIdToLoadForEdit","getNode","maybeFoundCatalogFromQuery","item","isDisabled"],"mappings":";;;;;;;;;;;;;;;;AAmDA,UAAMA,IAAQC,GAIRC,IAAaC,GAAc,GAC3B,EAAE,QAAAC,GAAQ,gBAAAC,EAAgB,IAAGC,GAAQ,EAAE,UAAU,UAAU,GAE3DC,IAAWC,EAAS,MAAMC,EAAM,QAAQ,wBAAwB,CAAC,GACjEC,IAAWC,EAAI,EAAK,GACpBF,IAAQG,EAAS,GACjBC,IAAeF,EAAI,IAAI,GACvBG,IAAMC,GAAc,GACpBC,IAAuBL,EAAI,EAAE,GAC7BM,IAAoBN,EAAI,EAAE,GAC1BO,IAAaP,EAAI,EAAK;AAE5B,IAAAQ,EAAeN,GAAc,CAAAO,MAASV,EAAS,QAAQ,EAAK;AAE5D,UAAMW,IAAW,OAAOC,MAAM;AAC5B,MAAIA,EAAE,MACJL,EAAkB,QAAQK,EAAE,IAC5BN,EAAqB,SAAQM,KAAA,gBAAAA,EAAG,SAAQA,EAAE,OAE1CL,EAAkB,QAAQK,GAC1BN,EAAqB,QAAQM,IAG/BZ,EAAS,QAAQ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355
1355
|
$formkit: "simpleConditional",
|
|
1356
1356
|
name: "dct:license",
|
|
1357
1357
|
identifier: "licence",
|
|
1358
|
-
|
|
1358
|
+
// 👇 Intentionally set to 'licenses' instead of 'licence'. License submission and fetching will break otherwise for dcat-ap.de
|
|
1359
|
+
voc: "licenses",
|
|
1359
1360
|
class: "property inDistribution",
|
|
1360
1361
|
options: { text: "dct:title", textarea: "skos:prefLabel", url: "skos:exactMatch" },
|
|
1361
1362
|
selection: { 1: "vocabulary", 2: "manually" }
|