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