@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.
@@ -1,46 +1,46 @@
1
- import { ref as m, computed as T, unref as v, watch as q, createElementBlock as r, openBlock as c, createElementVNode as s, createCommentVNode as g, toDisplayString as d, createVNode as u, Fragment as D, renderList as S } from "vue";
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 G } from "../composables/useDpiEditMode.js";
4
- import { useFormValues as H } from "../composables/useDpiFormValues.js";
5
- import { useOrganizationInfo as J } from "../composables/useOrganizationInfo.js";
6
- import { useTwinbyUser as Q } from "../composables/useTwinbyUser.js";
7
- import V from "../HappyFlowComponents/ui/InputField.vue.js";
8
- import W from "../HappyFlowComponents/ui/TextButtonSmall.vue.js";
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 X from "../../../../../_virtual/_plugin-vue_export-helper.js";
11
- const Y = { class: "dpiV3InnerComponentWrap" }, Z = { class: "copy-large-regular" }, ee = { class: "dpiV3AutoCompleteWrap" }, ae = { class: "CardTips_internal" }, te = { class: "CardTips_Part" }, se = { class: "firstRow" }, le = { class: "icon_title copy-small-semi-bold" }, oe = { class: "TextButton_small" }, ie = { class: "secondRow" }, ne = {
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
- }, re = {
14
+ }, ie = {
15
15
  key: 2,
16
16
  class: "copy-small-regular"
17
- }, ce = { class: "CardTips_Part" }, de = { class: "firstRow" }, ue = { class: "icon_title copy-small-semi-bold" }, pe = { class: "TextButton_small" }, me = { class: "secondRow" }, ve = { class: "input-container" }, fe = {
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
- }, he = { class: "copy-mini-regular" }, ge = { class: "input-container" }, _e = {
20
+ }, fe = { class: "copy-mini-regular" }, ve = { class: "input-container" }, he = {
21
21
  key: 0,
22
22
  class: "dpiV3_errormsgWrapper"
23
- }, be = { class: "copy-mini-regular" }, we = { class: "input-container" }, ye = {
23
+ }, ge = { class: "copy-mini-regular" }, _e = { class: "input-container" }, be = {
24
24
  key: 0,
25
25
  class: "dpiV3_errormsgWrapper"
26
- }, ke = { class: "copy-mini-regular" }, Pe = { class: "copy-large-regular" }, Te = {
26
+ }, we = { class: "copy-mini-regular" }, ye = { class: "copy-large-regular" }, ke = {
27
27
  key: 0,
28
28
  class: "form-error-message"
29
- }, Ve = {
29
+ }, Pe = {
30
30
  __name: "ContactPage",
31
31
  props: {
32
32
  context: Object
33
33
  },
34
- setup(F) {
35
- const f = F, { formValues: O } = H(), { isEditMode: R } = G(), { organization: A, authToken: L, startFetchPermissions: N } = Q();
36
- N();
37
- const { resultEnhanced: b, isLoading: U, isFetching: j } = J({
38
- id: A,
39
- authToken: L
40
- }), w = m(null), y = m(null), k = T(() => {
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 = O.value.BasicInfos) == null ? void 0 : e["dct:publisher"]) == null ? void 0 : t[0];
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
- }), E = T(() => U.value || j.value), h = T(() => {
58
- var a, o, z;
59
- const e = (a = b.value) == null ? void 0 : a.publisher;
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 || ((o = b.value) == null ? void 0 : o.title) || ((z = b.value) == null ? void 0 : z.id)
63
+ organization: e.name || ""
64
64
  };
65
65
  if (e.email && (t.email = e.email), e.homepage) {
66
- const x = e.homepage.startsWith("http") ? e.homepage : `https://${e.homepage}`;
67
- t.website = x;
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
- R.value || f.context.node.input(i), f.context.node.value.length === 0 && f.context.node.input(v(i));
94
- function $(e) {
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 B(e) {
97
+ function $(e) {
98
98
  return /^[^\s@]+@[^\s@][^\s.@]*\.[^\s@]+$/.test(e);
99
99
  }
100
- function C(e) {
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 P(e, t, a) {
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 = $(e);
118
+ o = E(e);
119
119
  break;
120
120
  case "vcard:hasEmail":
121
- o = B(e);
121
+ o = $(e);
122
122
  break;
123
123
  case "vcard:hasTelephone":
124
- o = C(e);
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), f.context.node.input(i.value), a === 2 ? (w.value && clearTimeout(w.value), w.value = setTimeout(() => {
135
- P(e, t, a);
136
- }, 800)) : a === 3 ? (y.value && clearTimeout(y.value), y.value = setTimeout(() => {
137
- P(e, t, a);
138
- }, 800)) : P(e, t, a);
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 I() {
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 K() {
145
- p(k.value[0], "vcard:fn", 1), p(k.value[1], "vcard:hasEmail", 2);
144
+ function I() {
145
+ p(y.value[0], "vcard:fn", 1), p(y.value[1], "vcard:hasEmail", 2);
146
146
  }
147
- function M() {
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 = $(e["vcard:fn"]);
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 = B(e["vcard:hasEmail"]);
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 = C(e["vcard:hasTelephone"]);
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 q(() => i.value[0].isValid, (e) => {
170
- e === !1 && M();
171
- }), (e, t) => (c(), r("div", Y, [
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", Z, d(e.$t("message.dataupload.datasets.dcat:contactPoint.description")), 1),
174
- s("div", ee, [
175
- s("div", ae, [
176
- s("div", te, [
177
- s("div", se, [
178
- s("div", le, d(e.$t("message.dataupload.datasets.dcat:contactPoint.account")), 1),
179
- s("div", oe, [
180
- u(W, {
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: E.value || Object.keys(h.value).length === 0,
188
- onClick: I
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", ie, [
193
- E.value ? (c(), r("span", ne, "Lade Kontodaten...")) : Object.keys(h.value).length > 0 ? (c(!0), r(D, { key: 1 }, S(h.value, (a, o) => (c(), r("span", {
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", re, "Keine Kontodaten verfügbar"))
196
+ }, d(a), 1))), 128)) : (c(), r("span", ie, "Keine Kontodaten verfügbar"))
197
197
  ])
198
198
  ]),
199
- s("div", ce, [
200
- s("div", de, [
201
- s("div", ue, d(e.$t("message.metadata.publisher")), 1),
202
- s("div", pe, [
203
- u(W, {
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: K
210
+ onClick: I
211
211
  }, null, 8, ["button-text"])
212
212
  ])
213
213
  ]),
214
- s("div", me, [
215
- (c(!0), r(D, null, S(k.value, (a, o) => (c(), r("span", {
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", ve, [
224
- u(V, {
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", fe, [
241
- u(v(_), {
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", he, d(l.value[1].message), 1)
245
+ s("span", fe, d(l.value[1].message), 1)
246
246
  ])) : g("", !0)
247
247
  ]),
248
- s("div", ge, [
249
- u(V, {
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", _e, [
266
- u(v(_), {
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", be, d(l.value[2].message), 1)
270
+ s("span", ge, d(l.value[2].message), 1)
271
271
  ])) : g("", !0)
272
272
  ]),
273
- s("div", we, [
274
- u(V, {
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", ye, [
291
- u(v(_), {
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", ke, d(l.value[3].message), 1)
295
+ s("span", we, d(l.value[3].message), 1)
296
296
  ])) : g("", !0)
297
297
  ]),
298
- s("div", Pe, d(e.$t("message.dataupload.datasets.dcat:contactPoint.descriptionBottom")), 1),
299
- i.value.find((a) => a.isValid === !1) ? (c(), r("div", Te, [
300
- u(v(_), {
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
- }, Re = /* @__PURE__ */ X(Ve, [["__scopeId", "data-v-67c48bcf"]]);
308
+ }, Fe = /* @__PURE__ */ J(Pe, [["__scopeId", "data-v-62702ebf"]]);
309
309
  export {
310
- Re as default
310
+ Fe as default
311
311
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@piveau/dpi",
3
3
  "type": "module",
4
- "version": "0.2.0-alpha.62",
4
+ "version": "0.2.0-alpha.63",
5
5
  "private": false,
6
6
  "sideEffects": [
7
7
  "*.css",