@piveau/dpi 0.1.0-beta.41 → 0.1.0-beta.42
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/assets/dpi.css +1 -1
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/LanguageV3.vue.js +32 -32
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/StatusV3.vue.js +20 -19
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/AdditionalsSubModal.vue.js +1 -0
- package/dist/data-provider-interface/components/DistributionSimplePage.vue.js +226 -226
- package/dist/data-provider-interface/composables/useDpiSimpleLoader.js +163 -152
- package/dist/data-provider-interface/config/dcatapdeHappyFlow/converter.js +27 -20
- package/dist/data-provider-interface/config/dcatapdeHappyFlow/input-definition.js +19 -6
- package/package.json +1 -1
package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/LanguageV3.vue.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ref as d, getCurrentInstance as _, onMounted as P, computed as S, watch as z, createElementBlock as g, openBlock as c, Fragment as
|
|
1
|
+
import { ref as d, getCurrentInstance as _, onMounted as P, computed as S, watch as z, createElementBlock as g, openBlock as c, Fragment as h, createCommentVNode as w, renderList as W, unref as r, normalizeClass as $, createVNode as V, createBlock as A } from "vue";
|
|
2
2
|
import { getLanguages as N } from "../../services/dpiV3_apis.js";
|
|
3
3
|
import U from "../Dropdown.vue.js";
|
|
4
4
|
import q from "../ButtonV3.vue.js";
|
|
@@ -19,68 +19,68 @@ const Q = {
|
|
|
19
19
|
},
|
|
20
20
|
emits: ["addLanguage", "deleteButtonClicked"],
|
|
21
21
|
setup(v, { emit: C }) {
|
|
22
|
-
const
|
|
22
|
+
const n = v;
|
|
23
23
|
let l = d([{ label: "", "@value": "", uri: "" }]), u = {};
|
|
24
24
|
const { formValues: k } = H(), { t: f } = E(), y = () => {
|
|
25
25
|
l.value.push({});
|
|
26
26
|
}, b = _(), B = b.appContext.app.config.globalProperties.$env, I = b.appContext.app.config.globalProperties.$i18n.locale;
|
|
27
27
|
let p = d([]);
|
|
28
28
|
u = k.value.DistributionSimple["dcat:distribution"].find(
|
|
29
|
-
(e) => e.id ===
|
|
29
|
+
(e) => e.id === n.distributionId
|
|
30
30
|
) || {}, P(async () => {
|
|
31
|
-
var e
|
|
32
|
-
|
|
31
|
+
var e;
|
|
32
|
+
u["dct:language"].length > 0 && (l.value = u["dct:language"]), p.value = (e = u["dct:language"]) == null ? void 0 : e.map((a) => a.label);
|
|
33
33
|
try {
|
|
34
|
-
const
|
|
35
|
-
s.value =
|
|
36
|
-
"@value":
|
|
37
|
-
label:
|
|
38
|
-
uri:
|
|
34
|
+
const a = await N(B.api.baseUrl, I);
|
|
35
|
+
s.value = a.map((t) => ({
|
|
36
|
+
"@value": t.label,
|
|
37
|
+
label: t.label,
|
|
38
|
+
uri: t.uri
|
|
39
39
|
}));
|
|
40
|
-
} catch (
|
|
41
|
-
console.error("Failed to load language data",
|
|
40
|
+
} catch (a) {
|
|
41
|
+
console.error("Failed to load language data", a);
|
|
42
42
|
}
|
|
43
43
|
});
|
|
44
44
|
const s = d([]);
|
|
45
45
|
let L = d(p);
|
|
46
46
|
console.log("Titelliste", L);
|
|
47
|
-
const O = C, F = (e,
|
|
48
|
-
l.value.length > 1 ? (l.value[
|
|
47
|
+
const O = C, F = (e, a) => {
|
|
48
|
+
l.value.length > 1 ? (l.value[a] = {
|
|
49
49
|
label: e,
|
|
50
|
-
uri: s.value.find((
|
|
50
|
+
uri: s.value.find((t) => t["@value"] === e).uri || ""
|
|
51
51
|
}, u["dct:language"] = l.value) : (l.value[0] = {
|
|
52
52
|
"@value": e,
|
|
53
|
-
uri: s.value.find((
|
|
54
|
-
}, u["dct:language"][0] = l.value[0], s.value.find((
|
|
53
|
+
uri: s.value.find((t) => t["@value"] === e).uri || ""
|
|
54
|
+
}, u["dct:language"][0] = l.value[0], s.value.find((t) => t["@value"] === e).uri);
|
|
55
55
|
}, m = d(""), x = (e) => {
|
|
56
56
|
m.value = e, console.log(m);
|
|
57
57
|
}, T = S(() => s.value.filter(
|
|
58
58
|
(e) => {
|
|
59
|
-
var
|
|
60
|
-
return (
|
|
59
|
+
var a, t, o, i;
|
|
60
|
+
return (i = (a = e["@value"]) == null ? void 0 : a.toLowerCase()) == null ? void 0 : i.trim().startsWith((o = (t = m.value) == null ? void 0 : t.toLowerCase()) == null ? void 0 : o.trim());
|
|
61
61
|
}
|
|
62
62
|
));
|
|
63
63
|
z(
|
|
64
|
-
() =>
|
|
64
|
+
() => n.languageText,
|
|
65
65
|
(e) => {
|
|
66
66
|
p.value = e;
|
|
67
67
|
}
|
|
68
68
|
);
|
|
69
69
|
const D = () => {
|
|
70
|
-
console.log("delete clicked"), O("deleteButtonClicked",
|
|
70
|
+
console.log("delete clicked"), O("deleteButtonClicked", n.distributionId);
|
|
71
71
|
};
|
|
72
|
-
return (e,
|
|
73
|
-
(c(!0), g(
|
|
72
|
+
return (e, a) => (c(), g(h, null, [
|
|
73
|
+
(c(!0), g(h, null, W(r(l), (t, o) => (c(), g("div", {
|
|
74
74
|
class: $([{
|
|
75
|
-
repeatableOuter: !
|
|
76
|
-
dpiV3AutoCompleteWrap: !
|
|
75
|
+
repeatableOuter: !n.inOverview,
|
|
76
|
+
dpiV3AutoCompleteWrap: !n.inOverview
|
|
77
77
|
}, "langDropdown"])
|
|
78
78
|
}, [
|
|
79
79
|
V(U, {
|
|
80
|
-
"onUpdate:modelValue": [(
|
|
80
|
+
"onUpdate:modelValue": [(i) => F(i, o), (i) => r(l)[o].label = i],
|
|
81
81
|
dropdownWidth: "large",
|
|
82
82
|
type: "inputField",
|
|
83
|
-
modelValue: r(l)[
|
|
83
|
+
modelValue: r(l)[o].label,
|
|
84
84
|
inputFieldProps: {
|
|
85
85
|
addOnText: !1,
|
|
86
86
|
initialHintText: !1,
|
|
@@ -95,28 +95,28 @@ const Q = {
|
|
|
95
95
|
"message.dataupload.datasets.dcat:distribution.advanced.language-placeholder"
|
|
96
96
|
),
|
|
97
97
|
inputFieldSize: "large",
|
|
98
|
-
modelValue: r(p)[
|
|
98
|
+
modelValue: r(p)[o],
|
|
99
99
|
defaultInput: !v.showDeleteButton
|
|
100
100
|
},
|
|
101
101
|
data: T.value,
|
|
102
102
|
onDeleteDropdownField: D,
|
|
103
103
|
onInput: x
|
|
104
104
|
}, null, 8, ["onUpdate:modelValue", "modelValue", "inputFieldProps", "data"]),
|
|
105
|
-
|
|
105
|
+
n.inOverview ? w("", !0) : (c(), A(M, {
|
|
106
106
|
key: 0,
|
|
107
107
|
"button-text": "löschen",
|
|
108
108
|
class: "rightAlign",
|
|
109
|
-
onClick: (
|
|
109
|
+
onClick: (i) => r(l).splice(o, 1)
|
|
110
110
|
}, null, 8, ["onClick"]))
|
|
111
111
|
], 2))), 256)),
|
|
112
|
-
|
|
112
|
+
n.inOverview ? w("", !0) : (c(), g("div", Q, [
|
|
113
113
|
V(q, {
|
|
114
114
|
buttonText: "Weitere hinzufügen",
|
|
115
115
|
size: "large",
|
|
116
116
|
iconStart: "plus",
|
|
117
117
|
variant: "tertiary",
|
|
118
118
|
class: "mt-3",
|
|
119
|
-
onClick:
|
|
119
|
+
onClick: a[0] || (a[0] = (t) => y())
|
|
120
120
|
})
|
|
121
121
|
]))
|
|
122
122
|
], 64));
|
package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/StatusV3.vue.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as d, onMounted as f, getCurrentInstance as v, watch as m, createBlock as S, openBlock as b } from "vue";
|
|
2
|
-
import { getDatasetStatus as
|
|
3
|
-
import
|
|
2
|
+
import { getDatasetStatus as g } from "../../services/dpiV3_apis.js";
|
|
3
|
+
import x from "../Dropdown.vue.js";
|
|
4
4
|
const T = {
|
|
5
5
|
__name: "StatusV3",
|
|
6
6
|
props: {
|
|
@@ -9,41 +9,42 @@ const T = {
|
|
|
9
9
|
statusText: { type: String, default: "" }
|
|
10
10
|
},
|
|
11
11
|
emits: ["addStatus", "deleteButtonClicked"],
|
|
12
|
-
setup(
|
|
13
|
-
const
|
|
12
|
+
setup(u, { emit: i }) {
|
|
13
|
+
const l = d([]);
|
|
14
14
|
f(async () => {
|
|
15
15
|
const t = v().appContext.app.config.globalProperties.$env;
|
|
16
16
|
try {
|
|
17
|
-
const e = await
|
|
18
|
-
console.log(e),
|
|
19
|
-
"@value":
|
|
20
|
-
|
|
17
|
+
const e = await g(t.api.baseUrl);
|
|
18
|
+
console.log(e), l.value = e.flatMap((o) => o.value === "OP_DATPRO" ? [] : o.value === "DEVELOP" ? [] : o.value === "DISCONT" ? [] : [{
|
|
19
|
+
"@value": o.label,
|
|
20
|
+
uri: o.resource,
|
|
21
21
|
selected: !1
|
|
22
22
|
}]);
|
|
23
23
|
} catch (e) {
|
|
24
24
|
console.error("Failed to load dataset status data:", e);
|
|
25
25
|
}
|
|
26
26
|
});
|
|
27
|
-
const
|
|
28
|
-
|
|
27
|
+
const n = u, s = d(n.statusText), r = i, p = (a) => {
|
|
28
|
+
const t = l.value.find((e) => e["@value"] === a);
|
|
29
|
+
console.log(t, l), r("addStatus", t, n.distributionId);
|
|
29
30
|
};
|
|
30
31
|
m(
|
|
31
|
-
() =>
|
|
32
|
+
() => n.statusText,
|
|
32
33
|
(a) => {
|
|
33
|
-
|
|
34
|
+
s.value = a;
|
|
34
35
|
}
|
|
35
36
|
);
|
|
36
37
|
const c = () => {
|
|
37
|
-
r("deleteButtonClicked",
|
|
38
|
+
r("deleteButtonClicked", n.distributionId);
|
|
38
39
|
};
|
|
39
|
-
return (a, t) => (b(), S(
|
|
40
|
+
return (a, t) => (b(), S(x, {
|
|
40
41
|
"onUpdate:modelValue": [
|
|
41
42
|
t[0] || (t[0] = (e) => p(e)),
|
|
42
|
-
t[1] || (t[1] = (e) =>
|
|
43
|
+
t[1] || (t[1] = (e) => s.value = e)
|
|
43
44
|
],
|
|
44
45
|
dropdownWidth: "large",
|
|
45
46
|
type: "inputField",
|
|
46
|
-
modelValue:
|
|
47
|
+
modelValue: s.value,
|
|
47
48
|
inputFieldProps: {
|
|
48
49
|
addOnText: !1,
|
|
49
50
|
initialHintText: !1,
|
|
@@ -54,10 +55,10 @@ const T = {
|
|
|
54
55
|
dropdown_dpiV3: !0,
|
|
55
56
|
placeholder: "Geben Sie den Status ein...",
|
|
56
57
|
inputFieldSize: "large",
|
|
57
|
-
modelValue:
|
|
58
|
-
defaultInput: !
|
|
58
|
+
modelValue: s.value,
|
|
59
|
+
defaultInput: !u.showDeleteButton
|
|
59
60
|
},
|
|
60
|
-
data:
|
|
61
|
+
data: l.value,
|
|
61
62
|
onDeleteDropdownField: c
|
|
62
63
|
}, null, 8, ["modelValue", "inputFieldProps", "data"]));
|
|
63
64
|
}
|