@piveau/dpi 0.2.0-alpha.48 → 0.2.0-alpha.49
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/packages/dpi/src/data-provider-interface/HappyFlowComponents/Organisation.vue.js +1 -1
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/Organisation.vue2.js +64 -49
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue.js +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue2.js +129 -98
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ModalV3.vue.js +1 -1
- package/dist/packages/dpi/src/data-provider-interface/components/ContactPage.vue.js +137 -124
- package/dist/packages/dpi/src/data-provider-interface/components/PublisherPage.vue.js +161 -130
- package/dist/packages/dpi/src/data-provider-interface/components/VisibilityPage.vue.js +4 -4
- package/dist/packages/dpi/src/data-provider-interface/composables/useOrganizationInfo.js +48 -0
- package/package.json +1 -1
|
@@ -1,33 +1,46 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import { PhWarning as
|
|
3
|
-
import { useEditModeInfo as
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import {
|
|
1
|
+
import { ref as p, computed as P, unref as v, watch as M, createElementBlock as r, openBlock as c, createElementVNode as s, createCommentVNode as g, toDisplayString as d, createVNode as u, Fragment as C, renderList as z } from "vue";
|
|
2
|
+
import { PhWarning as _ } from "@phosphor-icons/vue";
|
|
3
|
+
import { useEditModeInfo as x } from "../composables/useDpiEditMode.js";
|
|
4
|
+
import { useFormValues as q } from "../composables/useDpiFormValues.js";
|
|
5
|
+
import { useOrganizationInfo as G } from "../composables/useOrganizationInfo.js";
|
|
6
|
+
import { useTwinbyUser as H } from "../composables/useTwinbyUser.js";
|
|
7
|
+
import T from "../HappyFlowComponents/ui/InputField.vue.js";
|
|
8
|
+
import D from "../HappyFlowComponents/ui/TextButtonSmall.vue.js";
|
|
7
9
|
/* empty css */
|
|
8
|
-
import
|
|
9
|
-
const
|
|
10
|
+
import J from "../../../../../_virtual/_plugin-vue_export-helper.js";
|
|
11
|
+
const Q = { class: "dpiV3InnerComponentWrap" }, X = { class: "copy-large-regular" }, Y = { class: "dpiV3AutoCompleteWrap" }, Z = { class: "CardTips_internal" }, ee = { class: "CardTips_Part" }, ae = { class: "firstRow" }, te = { class: "icon_title copy-small-semi-bold" }, se = { class: "TextButton_small" }, le = { class: "secondRow" }, oe = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "copy-small-regular"
|
|
14
|
+
}, ie = {
|
|
15
|
+
key: 2,
|
|
16
|
+
class: "copy-small-regular"
|
|
17
|
+
}, ne = { class: "CardTips_Part" }, re = { class: "firstRow" }, ce = { class: "icon_title copy-small-semi-bold" }, de = { class: "TextButton_small" }, ue = { class: "secondRow" }, me = { class: "input-container" }, pe = {
|
|
10
18
|
key: 0,
|
|
11
19
|
class: "dpiV3_errormsgWrapper"
|
|
12
|
-
},
|
|
20
|
+
}, ve = { class: "copy-mini-regular" }, fe = { class: "input-container" }, he = {
|
|
13
21
|
key: 0,
|
|
14
22
|
class: "dpiV3_errormsgWrapper"
|
|
15
|
-
},
|
|
23
|
+
}, ge = { class: "copy-mini-regular" }, _e = { class: "input-container" }, be = {
|
|
16
24
|
key: 0,
|
|
17
25
|
class: "dpiV3_errormsgWrapper"
|
|
18
|
-
},
|
|
26
|
+
}, we = { class: "copy-mini-regular" }, ye = { class: "copy-large-regular" }, ke = {
|
|
19
27
|
key: 0,
|
|
20
28
|
class: "form-error-message"
|
|
21
|
-
},
|
|
29
|
+
}, Pe = {
|
|
22
30
|
__name: "ContactPage",
|
|
23
31
|
props: {
|
|
24
32
|
context: Object
|
|
25
33
|
},
|
|
26
34
|
setup(S) {
|
|
27
|
-
const { formValues:
|
|
35
|
+
const f = S, { formValues: F } = q(), { isEditMode: O } = x(), { organization: R, authToken: W, startFetchPermissions: A } = H();
|
|
36
|
+
A();
|
|
37
|
+
const { resultEnhanced: L, isLoading: N, isFetching: U } = G({
|
|
38
|
+
id: R,
|
|
39
|
+
authToken: W
|
|
40
|
+
}), b = p(null), w = p(null), y = P(() => {
|
|
28
41
|
var e, t;
|
|
29
42
|
try {
|
|
30
|
-
const a = (t = (e =
|
|
43
|
+
const a = (t = (e = F.value.BasicInfos) == null ? void 0 : e["dct:publisher"]) == null ? void 0 : t[0];
|
|
31
44
|
if (a && a["foaf:name"] && a["foaf:mbox"])
|
|
32
45
|
return [
|
|
33
46
|
a["foaf:name"],
|
|
@@ -41,17 +54,16 @@ const L = { class: "dpiV3InnerComponentWrap" }, q = { class: "copy-large-regular
|
|
|
41
54
|
"",
|
|
42
55
|
""
|
|
43
56
|
];
|
|
44
|
-
}),
|
|
45
|
-
var
|
|
46
|
-
const e = (a =
|
|
47
|
-
if (e)
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
}), o = f({
|
|
57
|
+
}), V = P(() => N.value || U.value), h = P(() => {
|
|
58
|
+
var a;
|
|
59
|
+
const e = (a = L.value) == null ? void 0 : a.publisher;
|
|
60
|
+
if (!e)
|
|
61
|
+
return {};
|
|
62
|
+
const t = {
|
|
63
|
+
organization: e.name
|
|
64
|
+
};
|
|
65
|
+
return e.email && (t.email = e.email), t;
|
|
66
|
+
}), l = p({
|
|
55
67
|
1: {
|
|
56
68
|
show: !1,
|
|
57
69
|
message: "Bitte geben Sie einen gültigen Organisationsnamen ein."
|
|
@@ -65,8 +77,8 @@ const L = { class: "dpiV3InnerComponentWrap" }, q = { class: "copy-large-regular
|
|
|
65
77
|
message: "Bitte geben Sie eine gültige Telefonnummer ein."
|
|
66
78
|
}
|
|
67
79
|
});
|
|
68
|
-
let n =
|
|
69
|
-
const
|
|
80
|
+
let n = p({ 1: !1, 2: !1, 3: !1 });
|
|
81
|
+
const o = p([
|
|
70
82
|
{
|
|
71
83
|
isValid: "unset",
|
|
72
84
|
"vcard:fn": "",
|
|
@@ -74,41 +86,35 @@ const L = { class: "dpiV3InnerComponentWrap" }, q = { class: "copy-large-regular
|
|
|
74
86
|
"vcard:hasTelephone": ""
|
|
75
87
|
}
|
|
76
88
|
]);
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
T && T["foaf:name"] && T["foaf:mbox"];
|
|
80
|
-
} catch (e) {
|
|
81
|
-
console.warn("Could not load publisher data from context:", e);
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
function V(e) {
|
|
89
|
+
O.value || f.context.node.input(o), f.context.node.value.length === 0 && f.context.node.input(v(o));
|
|
90
|
+
function E(e) {
|
|
85
91
|
return e.trim().length >= 2;
|
|
86
92
|
}
|
|
87
|
-
function
|
|
93
|
+
function B(e) {
|
|
88
94
|
return /^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(e);
|
|
89
95
|
}
|
|
90
96
|
function $(e) {
|
|
91
97
|
if (!e || e.trim() === "")
|
|
92
98
|
return !0;
|
|
93
99
|
const t = e.replace(/[\s\-().]/g, "");
|
|
94
|
-
if (
|
|
100
|
+
if (!/^\+?\d+$/.test(t))
|
|
95
101
|
return !1;
|
|
96
102
|
const a = t.replace(/\D/g, "");
|
|
97
103
|
return a.length >= 6 && a.length <= 15;
|
|
98
104
|
}
|
|
99
|
-
function
|
|
105
|
+
function k(e, t, a) {
|
|
100
106
|
let i = !1;
|
|
101
107
|
if (a === 3 && e.trim() === "")
|
|
102
|
-
|
|
108
|
+
l.value[a].show = !1, n.value[a] = !0;
|
|
103
109
|
else if (e.trim() === "")
|
|
104
|
-
|
|
110
|
+
l.value[a].show = !0, n.value[a] = !1;
|
|
105
111
|
else {
|
|
106
112
|
switch (t) {
|
|
107
113
|
case "vcard:fn":
|
|
108
|
-
i =
|
|
114
|
+
i = E(e);
|
|
109
115
|
break;
|
|
110
116
|
case "vcard:hasEmail":
|
|
111
|
-
i =
|
|
117
|
+
i = B(e);
|
|
112
118
|
break;
|
|
113
119
|
case "vcard:hasTelephone":
|
|
114
120
|
i = $(e);
|
|
@@ -116,96 +122,103 @@ const L = { class: "dpiV3InnerComponentWrap" }, q = { class: "copy-large-regular
|
|
|
116
122
|
default:
|
|
117
123
|
i = e.trim() !== "";
|
|
118
124
|
}
|
|
119
|
-
|
|
125
|
+
l.value[a].show = !i, n.value[a] = i;
|
|
120
126
|
}
|
|
121
|
-
n.value[1] && n.value[2] ?
|
|
127
|
+
n.value[1] && n.value[2] ? o.value[0].isValid = !0 : o.value[0].isValid = "unset";
|
|
122
128
|
}
|
|
123
|
-
function
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
}, 800)) : a === 3 ? (
|
|
127
|
-
|
|
128
|
-
}, 800)) :
|
|
129
|
+
function m(e, t, a) {
|
|
130
|
+
o.value = o.value.map((i) => t in i ? { ...i, [t]: e } : i), f.context.node.input(o.value), a === 2 ? (b.value && clearTimeout(b.value), b.value = setTimeout(() => {
|
|
131
|
+
k(e, t, a);
|
|
132
|
+
}, 800)) : a === 3 ? (w.value && clearTimeout(w.value), w.value = setTimeout(() => {
|
|
133
|
+
k(e, t, a);
|
|
134
|
+
}, 800)) : k(e, t, a);
|
|
129
135
|
}
|
|
130
|
-
function
|
|
131
|
-
const e =
|
|
132
|
-
e.organization &&
|
|
136
|
+
function j() {
|
|
137
|
+
const e = h.value;
|
|
138
|
+
e.organization && m(e.organization, "vcard:fn", 1), e.email && m(e.email, "vcard:hasEmail", 2);
|
|
133
139
|
}
|
|
134
|
-
function
|
|
135
|
-
|
|
140
|
+
function I() {
|
|
141
|
+
m(y.value[0], "vcard:fn", 1), m(y.value[1], "vcard:hasEmail", 2);
|
|
136
142
|
}
|
|
137
|
-
|
|
138
|
-
const e =
|
|
143
|
+
function K() {
|
|
144
|
+
const e = o.value[0];
|
|
139
145
|
if (e["vcard:fn"].trim() === "")
|
|
140
|
-
|
|
146
|
+
l.value[1].show = !0, n.value[1] = !1;
|
|
141
147
|
else {
|
|
142
|
-
const t =
|
|
143
|
-
|
|
148
|
+
const t = E(e["vcard:fn"]);
|
|
149
|
+
l.value[1].show = !t, n.value[1] = t;
|
|
144
150
|
}
|
|
145
151
|
if (e["vcard:hasEmail"].trim() === "")
|
|
146
|
-
|
|
152
|
+
l.value[2].show = !0, n.value[2] = !1;
|
|
147
153
|
else {
|
|
148
|
-
const t =
|
|
149
|
-
|
|
154
|
+
const t = B(e["vcard:hasEmail"]);
|
|
155
|
+
l.value[2].show = !t, n.value[2] = t;
|
|
150
156
|
}
|
|
151
157
|
if (e["vcard:hasTelephone"].trim() === "")
|
|
152
|
-
|
|
158
|
+
l.value[3].show = !1, n.value[3] = !0;
|
|
153
159
|
else {
|
|
154
160
|
const t = $(e["vcard:hasTelephone"]);
|
|
155
|
-
|
|
161
|
+
l.value[3].show = !t, n.value[3] = t;
|
|
156
162
|
}
|
|
157
|
-
n.value[1] && n.value[2] ?
|
|
158
|
-
}
|
|
159
|
-
return
|
|
160
|
-
e === !1 &&
|
|
161
|
-
}), (e, t) => (
|
|
162
|
-
s("h4", null,
|
|
163
|
-
s("div",
|
|
164
|
-
s("div",
|
|
165
|
-
s("div",
|
|
166
|
-
s("div",
|
|
167
|
-
s("div",
|
|
168
|
-
s("div",
|
|
169
|
-
s("div",
|
|
170
|
-
u(
|
|
163
|
+
n.value[1] && n.value[2] ? o.value[0].isValid = !0 : o.value[0].isValid = !1;
|
|
164
|
+
}
|
|
165
|
+
return M(() => o.value[0].isValid, (e) => {
|
|
166
|
+
e === !1 && K();
|
|
167
|
+
}), (e, t) => (c(), r("div", Q, [
|
|
168
|
+
s("h4", null, d(e.$t("message.dataupload.datasets.dcat:contactPoint.title")), 1),
|
|
169
|
+
s("div", X, d(e.$t("message.dataupload.datasets.dcat:contactPoint.description")), 1),
|
|
170
|
+
s("div", Y, [
|
|
171
|
+
s("div", Z, [
|
|
172
|
+
s("div", ee, [
|
|
173
|
+
s("div", ae, [
|
|
174
|
+
s("div", te, d(e.$t("message.dataupload.datasets.dcat:contactPoint.account")), 1),
|
|
175
|
+
s("div", se, [
|
|
176
|
+
u(D, {
|
|
171
177
|
"button-text": e.$t(
|
|
172
178
|
"message.dataupload.datasets.dcat:contactPoint.useAccountButton"
|
|
173
179
|
),
|
|
174
180
|
"icon-start": "DeleteBlue",
|
|
175
181
|
"icon-name": "copy",
|
|
176
182
|
class: "dpiV3_usedetailsButton",
|
|
177
|
-
|
|
178
|
-
|
|
183
|
+
disabled: V.value || Object.keys(h.value).length === 0,
|
|
184
|
+
onClick: j
|
|
185
|
+
}, null, 8, ["button-text", "disabled"])
|
|
179
186
|
])
|
|
180
187
|
]),
|
|
181
|
-
s("div",
|
|
182
|
-
(
|
|
188
|
+
s("div", le, [
|
|
189
|
+
V.value ? (c(), r("span", oe, "Lade Kontodaten...")) : Object.keys(h.value).length > 0 ? (c(!0), r(C, { key: 1 }, z(h.value, (a, i) => (c(), r("span", {
|
|
190
|
+
key: i,
|
|
191
|
+
class: "copy-small-regular"
|
|
192
|
+
}, d(a), 1))), 128)) : (c(), r("span", ie, "Keine Kontodaten verfügbar"))
|
|
183
193
|
])
|
|
184
194
|
]),
|
|
185
|
-
s("div",
|
|
186
|
-
s("div",
|
|
187
|
-
s("div",
|
|
188
|
-
s("div",
|
|
189
|
-
u(
|
|
195
|
+
s("div", ne, [
|
|
196
|
+
s("div", re, [
|
|
197
|
+
s("div", ce, d(e.$t("message.metadata.publisher")), 1),
|
|
198
|
+
s("div", de, [
|
|
199
|
+
u(D, {
|
|
190
200
|
"button-text": e.$t(
|
|
191
201
|
"message.dataupload.datasets.dcat:contactPoint.usePublisherButton"
|
|
192
202
|
),
|
|
193
203
|
"icon-start": "true",
|
|
194
204
|
"icon-name": "copy",
|
|
195
205
|
class: "",
|
|
196
|
-
onClick:
|
|
206
|
+
onClick: I
|
|
197
207
|
}, null, 8, ["button-text"])
|
|
198
208
|
])
|
|
199
209
|
]),
|
|
200
|
-
s("div",
|
|
201
|
-
(
|
|
210
|
+
s("div", ue, [
|
|
211
|
+
(c(!0), r(C, null, z(y.value, (a, i) => (c(), r("span", {
|
|
212
|
+
key: i,
|
|
213
|
+
class: "copy-small-regular"
|
|
214
|
+
}, d(a), 1))), 128))
|
|
202
215
|
])
|
|
203
216
|
])
|
|
204
217
|
])
|
|
205
218
|
]),
|
|
206
|
-
s("div",
|
|
207
|
-
u(
|
|
208
|
-
"model-value":
|
|
219
|
+
s("div", me, [
|
|
220
|
+
u(T, {
|
|
221
|
+
"model-value": o.value[0]["vcard:fn"],
|
|
209
222
|
"add-on-text": !1,
|
|
210
223
|
"date-picker": !1,
|
|
211
224
|
"info-icon": !1,
|
|
@@ -217,20 +230,20 @@ const L = { class: "dpiV3InnerComponentWrap" }, q = { class: "copy-large-regular
|
|
|
217
230
|
"initial-hint-text": !1,
|
|
218
231
|
label: e.$t("message.dataupload.datasets.dcat:contactPoint.nameInput.title"),
|
|
219
232
|
"show-end-icon": !1,
|
|
220
|
-
"show-error":
|
|
221
|
-
"onUpdate:modelValue": t[0] || (t[0] = (a) =>
|
|
233
|
+
"show-error": l.value[1].show,
|
|
234
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => m(a, "vcard:fn", 1))
|
|
222
235
|
}, null, 8, ["model-value", "placeholder", "label", "show-error"]),
|
|
223
|
-
|
|
224
|
-
u(
|
|
236
|
+
l.value[1].show ? (c(), r("div", pe, [
|
|
237
|
+
u(v(_), {
|
|
225
238
|
size: 16,
|
|
226
239
|
weight: "fill"
|
|
227
240
|
}),
|
|
228
|
-
s("span",
|
|
229
|
-
])) :
|
|
241
|
+
s("span", ve, d(l.value[1].message), 1)
|
|
242
|
+
])) : g("", !0)
|
|
230
243
|
]),
|
|
231
|
-
s("div",
|
|
232
|
-
u(
|
|
233
|
-
"model-value":
|
|
244
|
+
s("div", fe, [
|
|
245
|
+
u(T, {
|
|
246
|
+
"model-value": o.value[0]["vcard:hasEmail"],
|
|
234
247
|
"add-on-text": !1,
|
|
235
248
|
"date-picker": !1,
|
|
236
249
|
"info-icon": !1,
|
|
@@ -242,20 +255,20 @@ const L = { class: "dpiV3InnerComponentWrap" }, q = { class: "copy-large-regular
|
|
|
242
255
|
"initial-hint-text": !1,
|
|
243
256
|
label: e.$t("message.dataupload.datasets.dcat:contactPoint.mailInput.title"),
|
|
244
257
|
"show-end-icon": !1,
|
|
245
|
-
"show-error":
|
|
246
|
-
"onUpdate:modelValue": t[1] || (t[1] = (a) =>
|
|
258
|
+
"show-error": l.value[2].show,
|
|
259
|
+
"onUpdate:modelValue": t[1] || (t[1] = (a) => m(a, "vcard:hasEmail", 2))
|
|
247
260
|
}, null, 8, ["model-value", "placeholder", "label", "show-error"]),
|
|
248
|
-
|
|
249
|
-
u(
|
|
261
|
+
l.value[2].show ? (c(), r("div", he, [
|
|
262
|
+
u(v(_), {
|
|
250
263
|
size: 16,
|
|
251
264
|
weight: "fill"
|
|
252
265
|
}),
|
|
253
|
-
s("span",
|
|
254
|
-
])) :
|
|
266
|
+
s("span", ge, d(l.value[2].message), 1)
|
|
267
|
+
])) : g("", !0)
|
|
255
268
|
]),
|
|
256
|
-
s("div",
|
|
257
|
-
u(
|
|
258
|
-
"model-value":
|
|
269
|
+
s("div", _e, [
|
|
270
|
+
u(T, {
|
|
271
|
+
"model-value": o.value[0]["vcard:hasTelephone"],
|
|
259
272
|
"add-on-text": !1,
|
|
260
273
|
"date-picker": !1,
|
|
261
274
|
"info-icon": !1,
|
|
@@ -267,28 +280,28 @@ const L = { class: "dpiV3InnerComponentWrap" }, q = { class: "copy-large-regular
|
|
|
267
280
|
"initial-hint-text": !1,
|
|
268
281
|
label: e.$t("message.dataupload.datasets.dcat:contactPoint.telInput.title"),
|
|
269
282
|
"show-end-icon": !1,
|
|
270
|
-
"show-error":
|
|
271
|
-
"onUpdate:modelValue": t[2] || (t[2] = (a) =>
|
|
283
|
+
"show-error": l.value[3].show,
|
|
284
|
+
"onUpdate:modelValue": t[2] || (t[2] = (a) => m(a, "vcard:hasTelephone", 3))
|
|
272
285
|
}, null, 8, ["model-value", "placeholder", "label", "show-error"]),
|
|
273
|
-
|
|
274
|
-
u(
|
|
286
|
+
l.value[3].show ? (c(), r("div", be, [
|
|
287
|
+
u(v(_), {
|
|
275
288
|
size: 16,
|
|
276
289
|
weight: "fill"
|
|
277
290
|
}),
|
|
278
|
-
s("span",
|
|
279
|
-
])) :
|
|
291
|
+
s("span", we, d(l.value[3].message), 1)
|
|
292
|
+
])) : g("", !0)
|
|
280
293
|
]),
|
|
281
|
-
s("div",
|
|
282
|
-
|
|
283
|
-
u(
|
|
294
|
+
s("div", ye, d(e.$t("message.dataupload.datasets.dcat:contactPoint.descriptionBottom")), 1),
|
|
295
|
+
o.value.find((a) => a.isValid === !1) ? (c(), r("div", ke, [
|
|
296
|
+
u(v(_), {
|
|
284
297
|
size: 16,
|
|
285
298
|
weight: "fill"
|
|
286
299
|
}),
|
|
287
300
|
t[3] || (t[3] = s("span", { class: "copy-mini-regular" }, "Bitte füllen Sie alle Pflichtfelder aus, bevor Sie fortfahren.", -1))
|
|
288
|
-
])) :
|
|
301
|
+
])) : g("", !0)
|
|
289
302
|
]));
|
|
290
303
|
}
|
|
291
|
-
},
|
|
304
|
+
}, Oe = /* @__PURE__ */ J(Pe, [["__scopeId", "data-v-00c46b14"]]);
|
|
292
305
|
export {
|
|
293
|
-
|
|
306
|
+
Oe as default
|
|
294
307
|
};
|