@piveau/dpi 0.2.0-alpha.62 → 0.2.0-alpha.63
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 +2 -2
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/Organisation.vue2.js +28 -28
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue.js +1 -1
- package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue2.js +70 -70
- package/dist/packages/dpi/src/data-provider-interface/components/ContactPage.vue.js +93 -93
- package/package.json +1 -1
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
import { ref as m, computed as
|
|
1
|
+
import { ref as m, computed as P, unref as f, 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
2
|
import { PhWarning as _ } from "@phosphor-icons/vue";
|
|
3
|
-
import { useEditModeInfo as
|
|
4
|
-
import { useFormValues as
|
|
5
|
-
import { useOrganizationInfo as
|
|
6
|
-
import { useTwinbyUser as
|
|
7
|
-
import
|
|
8
|
-
import
|
|
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";
|
|
9
9
|
/* empty css */
|
|
10
|
-
import
|
|
11
|
-
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
12
|
key: 0,
|
|
13
13
|
class: "copy-small-regular"
|
|
14
|
-
},
|
|
14
|
+
}, ie = {
|
|
15
15
|
key: 2,
|
|
16
16
|
class: "copy-small-regular"
|
|
17
|
-
},
|
|
17
|
+
}, ne = { class: "CardTips_Part" }, re = { class: "firstRow" }, ce = { class: "icon_title copy-small-semi-bold" }, de = { class: "TextButton_small" }, ue = { class: "secondRow" }, pe = { class: "input-container" }, me = {
|
|
18
18
|
key: 0,
|
|
19
19
|
class: "dpiV3_errormsgWrapper"
|
|
20
|
-
},
|
|
20
|
+
}, fe = { class: "copy-mini-regular" }, ve = { 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 = {
|
|
24
24
|
key: 0,
|
|
25
25
|
class: "dpiV3_errormsgWrapper"
|
|
26
|
-
},
|
|
26
|
+
}, we = { class: "copy-mini-regular" }, ye = { class: "copy-large-regular" }, ke = {
|
|
27
27
|
key: 0,
|
|
28
28
|
class: "form-error-message"
|
|
29
|
-
},
|
|
29
|
+
}, Pe = {
|
|
30
30
|
__name: "ContactPage",
|
|
31
31
|
props: {
|
|
32
32
|
context: Object
|
|
33
33
|
},
|
|
34
|
-
setup(
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
const { resultEnhanced:
|
|
38
|
-
id:
|
|
39
|
-
authToken:
|
|
40
|
-
}),
|
|
34
|
+
setup(S) {
|
|
35
|
+
const v = S, { formValues: W } = q(), { isEditMode: F } = x(), { organization: O, authToken: R, startFetchPermissions: A } = H();
|
|
36
|
+
A();
|
|
37
|
+
const { resultEnhanced: L, isLoading: N, isFetching: U } = G({
|
|
38
|
+
id: O,
|
|
39
|
+
authToken: R
|
|
40
|
+
}), b = m(null), w = m(null), y = P(() => {
|
|
41
41
|
var e, t;
|
|
42
42
|
try {
|
|
43
|
-
const a = (t = (e =
|
|
43
|
+
const a = (t = (e = W.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,17 +54,17 @@ const Y = { class: "dpiV3InnerComponentWrap" }, Z = { class: "copy-large-regular
|
|
|
54
54
|
"",
|
|
55
55
|
""
|
|
56
56
|
];
|
|
57
|
-
}),
|
|
58
|
-
var a
|
|
59
|
-
const e = (a =
|
|
57
|
+
}), V = P(() => N.value || U.value), h = P(() => {
|
|
58
|
+
var a;
|
|
59
|
+
const e = (a = L.value) == null ? void 0 : a.publisher;
|
|
60
60
|
if (!e)
|
|
61
61
|
return {};
|
|
62
62
|
const t = {
|
|
63
|
-
organization: e.name ||
|
|
63
|
+
organization: e.name || ""
|
|
64
64
|
};
|
|
65
65
|
if (e.email && (t.email = e.email), e.homepage) {
|
|
66
|
-
const
|
|
67
|
-
t.website =
|
|
66
|
+
const o = e.homepage.startsWith("http") ? e.homepage : `https://${e.homepage}`;
|
|
67
|
+
t.website = o;
|
|
68
68
|
}
|
|
69
69
|
return t;
|
|
70
70
|
}), l = m({
|
|
@@ -90,14 +90,14 @@ const Y = { class: "dpiV3InnerComponentWrap" }, Z = { class: "copy-large-regular
|
|
|
90
90
|
"vcard:hasTelephone": ""
|
|
91
91
|
}
|
|
92
92
|
]);
|
|
93
|
-
|
|
94
|
-
function
|
|
93
|
+
F.value || v.context.node.input(i), v.context.node.value.length === 0 && v.context.node.input(f(i));
|
|
94
|
+
function E(e) {
|
|
95
95
|
return e.trim().length >= 2;
|
|
96
96
|
}
|
|
97
|
-
function
|
|
97
|
+
function $(e) {
|
|
98
98
|
return /^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(e);
|
|
99
99
|
}
|
|
100
|
-
function
|
|
100
|
+
function B(e) {
|
|
101
101
|
if (!e || e.trim() === "")
|
|
102
102
|
return !0;
|
|
103
103
|
const t = e.replace(/[\s\-().]/g, "");
|
|
@@ -106,7 +106,7 @@ const Y = { class: "dpiV3InnerComponentWrap" }, Z = { class: "copy-large-regular
|
|
|
106
106
|
const a = t.replace(/\D/g, "");
|
|
107
107
|
return a.length >= 6 && a.length <= 15;
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function k(e, t, a) {
|
|
110
110
|
let o = !1;
|
|
111
111
|
if (a === 3 && e.trim() === "")
|
|
112
112
|
l.value[a].show = !1, n.value[a] = !0;
|
|
@@ -115,13 +115,13 @@ const Y = { class: "dpiV3InnerComponentWrap" }, Z = { class: "copy-large-regular
|
|
|
115
115
|
else {
|
|
116
116
|
switch (t) {
|
|
117
117
|
case "vcard:fn":
|
|
118
|
-
o =
|
|
118
|
+
o = E(e);
|
|
119
119
|
break;
|
|
120
120
|
case "vcard:hasEmail":
|
|
121
|
-
o =
|
|
121
|
+
o = $(e);
|
|
122
122
|
break;
|
|
123
123
|
case "vcard:hasTelephone":
|
|
124
|
-
o =
|
|
124
|
+
o = B(e);
|
|
125
125
|
break;
|
|
126
126
|
default:
|
|
127
127
|
o = e.trim() !== "";
|
|
@@ -131,88 +131,88 @@ const Y = { class: "dpiV3InnerComponentWrap" }, Z = { class: "copy-large-regular
|
|
|
131
131
|
n.value[1] && n.value[2] ? i.value[0].isValid = !0 : i.value[0].isValid = "unset";
|
|
132
132
|
}
|
|
133
133
|
function p(e, t, a) {
|
|
134
|
-
i.value = i.value.map((o) => t in o ? { ...o, [t]: e } : o),
|
|
135
|
-
|
|
136
|
-
}, 800)) : a === 3 ? (
|
|
137
|
-
|
|
138
|
-
}, 800)) :
|
|
134
|
+
i.value = i.value.map((o) => t in o ? { ...o, [t]: e } : o), v.context.node.input(i.value), a === 2 ? (b.value && clearTimeout(b.value), b.value = setTimeout(() => {
|
|
135
|
+
k(e, t, a);
|
|
136
|
+
}, 800)) : a === 3 ? (w.value && clearTimeout(w.value), w.value = setTimeout(() => {
|
|
137
|
+
k(e, t, a);
|
|
138
|
+
}, 800)) : k(e, t, a);
|
|
139
139
|
}
|
|
140
|
-
function
|
|
140
|
+
function j() {
|
|
141
141
|
const e = h.value;
|
|
142
142
|
e.organization && p(e.organization, "vcard:fn", 1), e.email && p(e.email, "vcard:hasEmail", 2);
|
|
143
143
|
}
|
|
144
|
-
function
|
|
145
|
-
p(
|
|
144
|
+
function I() {
|
|
145
|
+
p(y.value[0], "vcard:fn", 1), p(y.value[1], "vcard:hasEmail", 2);
|
|
146
146
|
}
|
|
147
|
-
function
|
|
147
|
+
function K() {
|
|
148
148
|
const e = i.value[0];
|
|
149
149
|
if (e["vcard:fn"].trim() === "")
|
|
150
150
|
l.value[1].show = !0, n.value[1] = !1;
|
|
151
151
|
else {
|
|
152
|
-
const t =
|
|
152
|
+
const t = E(e["vcard:fn"]);
|
|
153
153
|
l.value[1].show = !t, n.value[1] = t;
|
|
154
154
|
}
|
|
155
155
|
if (e["vcard:hasEmail"].trim() === "")
|
|
156
156
|
l.value[2].show = !0, n.value[2] = !1;
|
|
157
157
|
else {
|
|
158
|
-
const t =
|
|
158
|
+
const t = $(e["vcard:hasEmail"]);
|
|
159
159
|
l.value[2].show = !t, n.value[2] = t;
|
|
160
160
|
}
|
|
161
161
|
if (e["vcard:hasTelephone"].trim() === "")
|
|
162
162
|
l.value[3].show = !1, n.value[3] = !0;
|
|
163
163
|
else {
|
|
164
|
-
const t =
|
|
164
|
+
const t = B(e["vcard:hasTelephone"]);
|
|
165
165
|
l.value[3].show = !t, n.value[3] = t;
|
|
166
166
|
}
|
|
167
167
|
n.value[1] && n.value[2] ? i.value[0].isValid = !0 : i.value[0].isValid = !1;
|
|
168
168
|
}
|
|
169
|
-
return
|
|
170
|
-
e === !1 &&
|
|
171
|
-
}), (e, t) => (c(), r("div",
|
|
169
|
+
return M(() => i.value[0].isValid, (e) => {
|
|
170
|
+
e === !1 && K();
|
|
171
|
+
}), (e, t) => (c(), r("div", Q, [
|
|
172
172
|
s("h4", null, d(e.$t("message.dataupload.datasets.dcat:contactPoint.title")), 1),
|
|
173
|
-
s("div",
|
|
174
|
-
s("div",
|
|
175
|
-
s("div",
|
|
176
|
-
s("div",
|
|
177
|
-
s("div",
|
|
178
|
-
s("div",
|
|
179
|
-
s("div",
|
|
180
|
-
u(
|
|
173
|
+
s("div", X, d(e.$t("message.dataupload.datasets.dcat:contactPoint.description")), 1),
|
|
174
|
+
s("div", Y, [
|
|
175
|
+
s("div", Z, [
|
|
176
|
+
s("div", ee, [
|
|
177
|
+
s("div", ae, [
|
|
178
|
+
s("div", te, d(e.$t("message.dataupload.datasets.dcat:contactPoint.account")), 1),
|
|
179
|
+
s("div", se, [
|
|
180
|
+
u(D, {
|
|
181
181
|
"button-text": e.$t(
|
|
182
182
|
"message.dataupload.datasets.dcat:contactPoint.useAccountButton"
|
|
183
183
|
),
|
|
184
184
|
"icon-start": "DeleteBlue",
|
|
185
185
|
"icon-name": "copy",
|
|
186
186
|
class: "dpiV3_usedetailsButton",
|
|
187
|
-
disabled:
|
|
188
|
-
onClick:
|
|
187
|
+
disabled: V.value || Object.keys(h.value).length === 0,
|
|
188
|
+
onClick: j
|
|
189
189
|
}, null, 8, ["button-text", "disabled"])
|
|
190
190
|
])
|
|
191
191
|
]),
|
|
192
|
-
s("div",
|
|
193
|
-
|
|
192
|
+
s("div", le, [
|
|
193
|
+
V.value ? (c(), r("span", oe, "Lade Kontodaten...")) : Object.keys(h.value).length > 0 ? (c(!0), r(C, { key: 1 }, z(h.value, (a, o) => (c(), r("span", {
|
|
194
194
|
key: o,
|
|
195
195
|
class: "copy-small-regular"
|
|
196
|
-
}, d(a), 1))), 128)) : (c(), r("span",
|
|
196
|
+
}, d(a), 1))), 128)) : (c(), r("span", ie, "Keine Kontodaten verfügbar"))
|
|
197
197
|
])
|
|
198
198
|
]),
|
|
199
|
-
s("div",
|
|
200
|
-
s("div",
|
|
201
|
-
s("div",
|
|
202
|
-
s("div",
|
|
203
|
-
u(
|
|
199
|
+
s("div", ne, [
|
|
200
|
+
s("div", re, [
|
|
201
|
+
s("div", ce, d(e.$t("message.metadata.publisher")), 1),
|
|
202
|
+
s("div", de, [
|
|
203
|
+
u(D, {
|
|
204
204
|
"button-text": e.$t(
|
|
205
205
|
"message.dataupload.datasets.dcat:contactPoint.usePublisherButton"
|
|
206
206
|
),
|
|
207
207
|
"icon-start": "true",
|
|
208
208
|
"icon-name": "copy",
|
|
209
209
|
class: "",
|
|
210
|
-
onClick:
|
|
210
|
+
onClick: I
|
|
211
211
|
}, null, 8, ["button-text"])
|
|
212
212
|
])
|
|
213
213
|
]),
|
|
214
|
-
s("div",
|
|
215
|
-
(c(!0), r(
|
|
214
|
+
s("div", ue, [
|
|
215
|
+
(c(!0), r(C, null, z(y.value, (a, o) => (c(), r("span", {
|
|
216
216
|
key: o,
|
|
217
217
|
class: "copy-small-regular"
|
|
218
218
|
}, d(a), 1))), 128))
|
|
@@ -220,8 +220,8 @@ const Y = { class: "dpiV3InnerComponentWrap" }, Z = { class: "copy-large-regular
|
|
|
220
220
|
])
|
|
221
221
|
])
|
|
222
222
|
]),
|
|
223
|
-
s("div",
|
|
224
|
-
u(
|
|
223
|
+
s("div", pe, [
|
|
224
|
+
u(T, {
|
|
225
225
|
"model-value": i.value[0]["vcard:fn"],
|
|
226
226
|
"add-on-text": !1,
|
|
227
227
|
"date-picker": !1,
|
|
@@ -237,16 +237,16 @@ const Y = { class: "dpiV3InnerComponentWrap" }, Z = { class: "copy-large-regular
|
|
|
237
237
|
"show-error": l.value[1].show,
|
|
238
238
|
"onUpdate:modelValue": t[0] || (t[0] = (a) => p(a, "vcard:fn", 1))
|
|
239
239
|
}, null, 8, ["model-value", "placeholder", "label", "show-error"]),
|
|
240
|
-
l.value[1].show ? (c(), r("div",
|
|
241
|
-
u(
|
|
240
|
+
l.value[1].show ? (c(), r("div", me, [
|
|
241
|
+
u(f(_), {
|
|
242
242
|
size: 16,
|
|
243
243
|
weight: "fill"
|
|
244
244
|
}),
|
|
245
|
-
s("span",
|
|
245
|
+
s("span", fe, d(l.value[1].message), 1)
|
|
246
246
|
])) : g("", !0)
|
|
247
247
|
]),
|
|
248
|
-
s("div",
|
|
249
|
-
u(
|
|
248
|
+
s("div", ve, [
|
|
249
|
+
u(T, {
|
|
250
250
|
"model-value": i.value[0]["vcard:hasEmail"],
|
|
251
251
|
"add-on-text": !1,
|
|
252
252
|
"date-picker": !1,
|
|
@@ -262,16 +262,16 @@ const Y = { class: "dpiV3InnerComponentWrap" }, Z = { class: "copy-large-regular
|
|
|
262
262
|
"show-error": l.value[2].show,
|
|
263
263
|
"onUpdate:modelValue": t[1] || (t[1] = (a) => p(a, "vcard:hasEmail", 2))
|
|
264
264
|
}, null, 8, ["model-value", "placeholder", "label", "show-error"]),
|
|
265
|
-
l.value[2].show ? (c(), r("div",
|
|
266
|
-
u(
|
|
265
|
+
l.value[2].show ? (c(), r("div", he, [
|
|
266
|
+
u(f(_), {
|
|
267
267
|
size: 16,
|
|
268
268
|
weight: "fill"
|
|
269
269
|
}),
|
|
270
|
-
s("span",
|
|
270
|
+
s("span", ge, d(l.value[2].message), 1)
|
|
271
271
|
])) : g("", !0)
|
|
272
272
|
]),
|
|
273
|
-
s("div",
|
|
274
|
-
u(
|
|
273
|
+
s("div", _e, [
|
|
274
|
+
u(T, {
|
|
275
275
|
"model-value": i.value[0]["vcard:hasTelephone"],
|
|
276
276
|
"add-on-text": !1,
|
|
277
277
|
"date-picker": !1,
|
|
@@ -287,17 +287,17 @@ const Y = { class: "dpiV3InnerComponentWrap" }, Z = { class: "copy-large-regular
|
|
|
287
287
|
"show-error": l.value[3].show,
|
|
288
288
|
"onUpdate:modelValue": t[2] || (t[2] = (a) => p(a, "vcard:hasTelephone", 3))
|
|
289
289
|
}, null, 8, ["model-value", "placeholder", "label", "show-error"]),
|
|
290
|
-
l.value[3].show ? (c(), r("div",
|
|
291
|
-
u(
|
|
290
|
+
l.value[3].show ? (c(), r("div", be, [
|
|
291
|
+
u(f(_), {
|
|
292
292
|
size: 16,
|
|
293
293
|
weight: "fill"
|
|
294
294
|
}),
|
|
295
|
-
s("span",
|
|
295
|
+
s("span", we, d(l.value[3].message), 1)
|
|
296
296
|
])) : g("", !0)
|
|
297
297
|
]),
|
|
298
|
-
s("div",
|
|
299
|
-
i.value.find((a) => a.isValid === !1) ? (c(), r("div",
|
|
300
|
-
u(
|
|
298
|
+
s("div", ye, d(e.$t("message.dataupload.datasets.dcat:contactPoint.descriptionBottom")), 1),
|
|
299
|
+
i.value.find((a) => a.isValid === !1) ? (c(), r("div", ke, [
|
|
300
|
+
u(f(_), {
|
|
301
301
|
size: 16,
|
|
302
302
|
weight: "fill"
|
|
303
303
|
}),
|
|
@@ -305,7 +305,7 @@ const Y = { class: "dpiV3InnerComponentWrap" }, Z = { class: "copy-large-regular
|
|
|
305
305
|
])) : g("", !0)
|
|
306
306
|
]));
|
|
307
307
|
}
|
|
308
|
-
},
|
|
308
|
+
}, Fe = /* @__PURE__ */ J(Pe, [["__scopeId", "data-v-62702ebf"]]);
|
|
309
309
|
export {
|
|
310
|
-
|
|
310
|
+
Fe as default
|
|
311
311
|
};
|