@piveau/dpi 0.1.0-beta.69 → 0.1.0-beta.70
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/services/dpiV3_apis.js +24 -16
- package/dist/data-provider-interface/HappyFlowComponents/ui/ModalV3.vue.js +277 -264
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AccessRightsV3.vue.js +77 -0
- package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ChecksumV3.vue.js +99 -92
- package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/AdditionalsSubModal.vue.js +228 -227
- package/dist/data-provider-interface/components/DistributionSimplePage.vue.js +386 -325
- package/dist/data-provider-interface/config/dcatapdeHappyFlow/converter.js +10 -6
- package/dist/data-provider-interface/config/dcatapdeHappyFlow/page-content-config.js +1 -1
- package/dist/data-provider-interface/views/InputPage.vue.js +26 -23
- package/package.json +1 -1
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { ref as c, onMounted as m, getCurrentInstance as h, watch as v, createBlock as b, openBlock as R, unref as u } from "vue";
|
|
2
|
+
import { getAccessRights as I } from "../../services/dpiV3_apis.js";
|
|
3
|
+
import V from "../Dropdown.vue.js";
|
|
4
|
+
import { useI18n as w } from "vue-i18n";
|
|
5
|
+
import { useFormValues as F } from "../../../composables/useDpiFormValues.js";
|
|
6
|
+
const D = {
|
|
7
|
+
__name: "AccessRightsV3",
|
|
8
|
+
props: {
|
|
9
|
+
distributionId: { type: Number, required: !1 },
|
|
10
|
+
showDeleteButton: { type: Boolean, default: !1 },
|
|
11
|
+
accessRightsProp: { type: String, default: "" }
|
|
12
|
+
},
|
|
13
|
+
emits: ["addAccessRights", "deleteButtonClicked"],
|
|
14
|
+
setup(n, { emit: p }) {
|
|
15
|
+
const { t: d } = w(), { formValues: y } = F(), s = c([]);
|
|
16
|
+
m(async () => {
|
|
17
|
+
const t = h().appContext.app.config.globalProperties.$env;
|
|
18
|
+
try {
|
|
19
|
+
const e = await I(t.api.baseUrl);
|
|
20
|
+
console.log(e), s.value = e.map((a) => ({
|
|
21
|
+
"@value": a.pref_label.de,
|
|
22
|
+
label: a.pref_label.de,
|
|
23
|
+
uri: a.resource
|
|
24
|
+
}));
|
|
25
|
+
} catch (e) {
|
|
26
|
+
console.error("Failed to load planned availability data", e);
|
|
27
|
+
}
|
|
28
|
+
});
|
|
29
|
+
const o = n, i = c(o.accessRightsProp), r = p, f = (l, t) => {
|
|
30
|
+
let e = {
|
|
31
|
+
uri: s.value.find((a) => a["@value"] === l).uri || "",
|
|
32
|
+
label: s.value.find((a) => a["@value"] === l).label || ""
|
|
33
|
+
};
|
|
34
|
+
r("addAccessRights", e, o.distributionId);
|
|
35
|
+
};
|
|
36
|
+
v(
|
|
37
|
+
() => o.accessRightsProp,
|
|
38
|
+
(l) => {
|
|
39
|
+
i.value = l;
|
|
40
|
+
}
|
|
41
|
+
);
|
|
42
|
+
const g = () => {
|
|
43
|
+
console.log("delete clicked"), r("deleteButtonClicked", o.distributionId);
|
|
44
|
+
};
|
|
45
|
+
return (l, t) => (R(), b(V, {
|
|
46
|
+
"onUpdate:modelValue": [
|
|
47
|
+
t[0] || (t[0] = (e) => f(e)),
|
|
48
|
+
t[1] || (t[1] = (e) => i.value = e)
|
|
49
|
+
],
|
|
50
|
+
dropdownWidth: "large",
|
|
51
|
+
type: "inputField",
|
|
52
|
+
modelValue: i.value,
|
|
53
|
+
inputFieldProps: {
|
|
54
|
+
addOnText: !1,
|
|
55
|
+
initialHintText: !1,
|
|
56
|
+
datePicker: !1,
|
|
57
|
+
infoIcon: !1,
|
|
58
|
+
preIcon: !1,
|
|
59
|
+
label: u(d)(
|
|
60
|
+
"message.dataupload.datasets.dcat:distribution.advanced.dct:accessRights"
|
|
61
|
+
) + " (optional)",
|
|
62
|
+
dropdown_dpiV3: !0,
|
|
63
|
+
placeholder: u(d)(
|
|
64
|
+
"message.dataupload.datasets.dcat:distribution.advanced.dct:accessRights"
|
|
65
|
+
) + " hinzufügen",
|
|
66
|
+
inputFieldSize: "large",
|
|
67
|
+
modelValue: i.value,
|
|
68
|
+
defaultInput: !n.showDeleteButton
|
|
69
|
+
},
|
|
70
|
+
data: s.value,
|
|
71
|
+
onDeleteDropdownField: g
|
|
72
|
+
}, null, 8, ["modelValue", "inputFieldProps", "data"]));
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
export {
|
|
76
|
+
D as default
|
|
77
|
+
};
|
package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ChecksumV3.vue.js
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ref as
|
|
1
|
+
import { ref as r, onMounted as P, getCurrentInstance as E, watch as C, createElementBlock as v, openBlock as h, normalizeClass as k, createElementVNode as g, createCommentVNode as b, createVNode as d, unref as I, toDisplayString as w } from "vue";
|
|
2
2
|
import { useFormValues as z } from "../../../composables/useDpiFormValues.js";
|
|
3
3
|
import { getChecksumAlgorithms as M } from "../../services/dpiV3_apis.js";
|
|
4
4
|
import N from "../Dropdown.vue.js";
|
|
5
|
-
import
|
|
6
|
-
import { PhWarning as
|
|
5
|
+
import q from "../InputField.vue.js";
|
|
6
|
+
import { PhWarning as y } from "@phosphor-icons/vue";
|
|
7
7
|
/* empty css */
|
|
8
|
-
import
|
|
9
|
-
const
|
|
8
|
+
import O from "../../../../_virtual/_plugin-vue_export-helper.js";
|
|
9
|
+
const U = {
|
|
10
10
|
key: 0,
|
|
11
11
|
class: "dpiV3_errorMessage"
|
|
12
|
-
}, W = { class: "copy-mini-regular" },
|
|
13
|
-
key:
|
|
12
|
+
}, W = { class: "copy-mini-regular" }, H = {
|
|
13
|
+
key: 0,
|
|
14
14
|
class: "dpiV3_errorMessage"
|
|
15
|
-
},
|
|
15
|
+
}, G = { class: "copy-mini-regular" }, L = {
|
|
16
16
|
__name: "ChecksumV3",
|
|
17
17
|
props: {
|
|
18
18
|
distributionId: { type: Number, required: !1 },
|
|
@@ -20,15 +20,16 @@ const q = { class: "dpiV3_LinkAndMetadata" }, H = {
|
|
|
20
20
|
checksumText: { type: String, default: "" },
|
|
21
21
|
checksumDropdownText: { type: String, default: "" },
|
|
22
22
|
uri: { type: String, default: "" },
|
|
23
|
-
distIndex: { type: Number, required: !1 }
|
|
23
|
+
distIndex: { type: Number, required: !1 },
|
|
24
|
+
asCard: { type: Boolean, required: !1, default: !1 }
|
|
24
25
|
},
|
|
25
26
|
emits: ["addChecksum", "deleteButtonClicked"],
|
|
26
|
-
setup(
|
|
27
|
-
const c =
|
|
27
|
+
setup(n, { expose: T, emit: D }) {
|
|
28
|
+
const c = r([]), { formValues: m } = z(), o = r(null), u = r(null);
|
|
28
29
|
P(async () => {
|
|
29
|
-
const
|
|
30
|
+
const l = E().appContext.app.config.globalProperties.$env;
|
|
30
31
|
try {
|
|
31
|
-
const e = await M(
|
|
32
|
+
const e = await M(l.api.baseUrl);
|
|
32
33
|
c.value = e.map((f) => ({
|
|
33
34
|
"@value": f.value,
|
|
34
35
|
label: f.label,
|
|
@@ -39,108 +40,114 @@ const q = { class: "dpiV3_LinkAndMetadata" }, H = {
|
|
|
39
40
|
console.error("Failed to load checksum algorithms:", e);
|
|
40
41
|
}
|
|
41
42
|
});
|
|
42
|
-
const
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
let
|
|
43
|
+
const s = n, i = r(s.checksumText);
|
|
44
|
+
r([]);
|
|
45
|
+
const a = r(s.checksumDropdownText), V = D;
|
|
46
|
+
let x = "";
|
|
46
47
|
const p = () => {
|
|
47
|
-
const
|
|
48
|
+
const t = i.value && i.value.trim() !== "", l = a.value && a.value.trim() !== "";
|
|
48
49
|
let e = !1;
|
|
49
|
-
return
|
|
50
|
-
},
|
|
51
|
-
i.value =
|
|
50
|
+
return t || l ? (t ? u.value = null : (u.value = "Prüfsumme ist erforderlich", e = !0), l ? o.value = null : (o.value = "Algorithmus ist erforderlich", e = !0)) : (u.value = null, o.value = null), !e;
|
|
51
|
+
}, F = () => !p(), S = (t) => {
|
|
52
|
+
i.value = t.target.value, V(
|
|
52
53
|
"addChecksum",
|
|
53
54
|
i.value,
|
|
54
|
-
|
|
55
|
-
|
|
55
|
+
a.value,
|
|
56
|
+
s.distributionId
|
|
56
57
|
), p();
|
|
57
|
-
},
|
|
58
|
-
var
|
|
59
|
-
|
|
58
|
+
}, A = (t) => {
|
|
59
|
+
var l;
|
|
60
|
+
a.value = t, x = ((l = c.value.find((e) => e["@value"] === t)) == null ? void 0 : l.uri) || "", V(
|
|
60
61
|
"addChecksum",
|
|
61
62
|
i.value,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
63
|
+
a.value,
|
|
64
|
+
s.distributionId,
|
|
65
|
+
x
|
|
65
66
|
), p();
|
|
66
67
|
};
|
|
67
|
-
|
|
68
|
-
() =>
|
|
69
|
-
(
|
|
70
|
-
|
|
68
|
+
C(
|
|
69
|
+
() => s.checksumDropdownText,
|
|
70
|
+
(t) => {
|
|
71
|
+
a.value = t;
|
|
71
72
|
}
|
|
72
|
-
),
|
|
73
|
-
() =>
|
|
74
|
-
(
|
|
75
|
-
i.value =
|
|
73
|
+
), C(
|
|
74
|
+
() => s.checksumText,
|
|
75
|
+
(t) => {
|
|
76
|
+
i.value = t;
|
|
76
77
|
}
|
|
77
78
|
);
|
|
78
|
-
const
|
|
79
|
-
m.value.DistributionSimple["dcat:distribution"][
|
|
79
|
+
const _ = () => {
|
|
80
|
+
m.value.DistributionSimple["dcat:distribution"][s.distIndex].checksum.uri = "", m.value.DistributionSimple["dcat:distribution"][s.distIndex].checksum["spdx:checksum"] = "", a.value = "", o.value = null;
|
|
80
81
|
}, B = () => {
|
|
81
|
-
m.value.DistributionSimple["dcat:distribution"][
|
|
82
|
+
m.value.DistributionSimple["dcat:distribution"][s.distIndex].checksum.title = "", i.value = "", u.value = null;
|
|
82
83
|
};
|
|
83
84
|
return T({
|
|
84
|
-
validateAllItems:
|
|
85
|
-
}), (
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
inputFieldSize: "large",
|
|
96
|
-
initialHintText: !1,
|
|
97
|
-
label: "Prüfsumme",
|
|
98
|
-
showEndIcon: !1,
|
|
99
|
-
defaultInput: !0,
|
|
100
|
-
onDeleteButtonClicked: B,
|
|
101
|
-
class: E({ dpiV3_Space3: d.showDeleteButton })
|
|
102
|
-
}, null, 8, ["modelValue", "class"]),
|
|
103
|
-
u.value ? (h(), v("div", H, [
|
|
104
|
-
r(I(D), {
|
|
105
|
-
size: 16,
|
|
106
|
-
weight: "fill"
|
|
107
|
-
}),
|
|
108
|
-
b("span", W, w(u.value), 1)
|
|
109
|
-
])) : V("", !0),
|
|
110
|
-
r(N, {
|
|
111
|
-
"onUpdate:modelValue": [
|
|
112
|
-
t[2] || (t[2] = (e) => F(e)),
|
|
113
|
-
t[3] || (t[3] = (e) => s.value = e)
|
|
114
|
-
],
|
|
115
|
-
dropdownWidth: "large",
|
|
116
|
-
type: "inputField",
|
|
117
|
-
modelValue: s.value,
|
|
118
|
-
inputFieldProps: {
|
|
85
|
+
validateAllItems: F
|
|
86
|
+
}), (t, l) => (h(), v("div", {
|
|
87
|
+
class: k(["dpiV3_LinkAndMetadata", { dpiV3_docAllAsCard: n.asCard }])
|
|
88
|
+
}, [
|
|
89
|
+
g("div", {
|
|
90
|
+
class: k(["dpiV3AutoCompleteWrap", { dpiV3_docAsCard: n.asCard }])
|
|
91
|
+
}, [
|
|
92
|
+
d(q, {
|
|
93
|
+
onInput: l[0] || (l[0] = (e) => S(e)),
|
|
94
|
+
modelValue: i.value,
|
|
95
|
+
"onUpdate:modelValue": l[1] || (l[1] = (e) => i.value = e),
|
|
119
96
|
addOnText: !1,
|
|
120
|
-
initialHintText: !1,
|
|
121
97
|
datePicker: !1,
|
|
122
98
|
infoIcon: !1,
|
|
99
|
+
placeholder: "Bitte Prüfsumme eingeben...",
|
|
123
100
|
preIcon: !1,
|
|
124
|
-
label: "Algorithmus",
|
|
125
|
-
dropdown_dpiV3: !0,
|
|
126
|
-
placeholder: "Geben Sie den Algorithmus ein...",
|
|
127
101
|
inputFieldSize: "large",
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
102
|
+
initialHintText: !1,
|
|
103
|
+
label: "Prüfsumme",
|
|
104
|
+
showEndIcon: !1,
|
|
105
|
+
defaultInput: !0,
|
|
106
|
+
onDeleteButtonClicked: B,
|
|
107
|
+
class: k({ dpiV3_Space3: n.showDeleteButton })
|
|
108
|
+
}, null, 8, ["modelValue", "class"]),
|
|
109
|
+
u.value ? (h(), v("div", U, [
|
|
110
|
+
d(I(y), {
|
|
111
|
+
size: 16,
|
|
112
|
+
weight: "fill"
|
|
113
|
+
}),
|
|
114
|
+
g("span", W, w(u.value), 1)
|
|
115
|
+
])) : b("", !0),
|
|
116
|
+
d(N, {
|
|
117
|
+
"onUpdate:modelValue": [
|
|
118
|
+
l[2] || (l[2] = (e) => A(e)),
|
|
119
|
+
l[3] || (l[3] = (e) => a.value = e)
|
|
120
|
+
],
|
|
121
|
+
dropdownWidth: "large",
|
|
122
|
+
type: "inputField",
|
|
123
|
+
modelValue: a.value,
|
|
124
|
+
inputFieldProps: {
|
|
125
|
+
addOnText: !1,
|
|
126
|
+
initialHintText: !1,
|
|
127
|
+
datePicker: !1,
|
|
128
|
+
infoIcon: !1,
|
|
129
|
+
preIcon: !1,
|
|
130
|
+
label: "Algorithmus",
|
|
131
|
+
dropdown_dpiV3: !0,
|
|
132
|
+
placeholder: "Geben Sie den Algorithmus ein...",
|
|
133
|
+
inputFieldSize: "large",
|
|
134
|
+
modelValue: a.value,
|
|
135
|
+
defaultInput: !0
|
|
136
|
+
},
|
|
137
|
+
data: c.value,
|
|
138
|
+
onDeleteDropdownField: _
|
|
139
|
+
}, null, 8, ["modelValue", "inputFieldProps", "data"])
|
|
140
|
+
], 2),
|
|
141
|
+
o.value ? (h(), v("div", H, [
|
|
142
|
+
d(I(y), {
|
|
136
143
|
size: 16,
|
|
137
144
|
weight: "fill"
|
|
138
145
|
}),
|
|
139
|
-
|
|
140
|
-
])) :
|
|
141
|
-
]));
|
|
146
|
+
g("span", G, w(o.value), 1)
|
|
147
|
+
])) : b("", !0)
|
|
148
|
+
], 2));
|
|
142
149
|
}
|
|
143
|
-
},
|
|
150
|
+
}, Z = /* @__PURE__ */ O(L, [["__scopeId", "data-v-a3888031"]]);
|
|
144
151
|
export {
|
|
145
|
-
|
|
152
|
+
Z as default
|
|
146
153
|
};
|