@piveau/dpi 0.1.0-beta.39 → 0.1.0-beta.40

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.
Files changed (29) hide show
  1. package/dist/assets/dpi.css +1 -1
  2. package/dist/data-provider-interface/HappyFlowComponents/services/dpiV3_apis.js +1 -1
  3. package/dist/data-provider-interface/HappyFlowComponents/ui/ModalV3.vue.js +393 -314
  4. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AccessServiceV3.vue.js +105 -69
  5. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ChangeLicenseV3.vue.js +95 -57
  6. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ChecksumV3.vue.js +83 -55
  7. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/ConformsToV3.vue.js +116 -75
  8. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/DocumentationsV3.vue.js +145 -124
  9. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/PolicyV3.vue.js +41 -41
  10. package/dist/data-provider-interface/HappyFlowComponents/ui/RapModal.vue.js +123 -108
  11. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/AdditionalsSubModal.vue.js +440 -258
  12. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/CoverageModal.vue.js +37 -32
  13. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/DistributionModal.vue.js +6 -6
  14. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/EssentialsModal.vue.js +183 -126
  15. package/dist/data-provider-interface/components/ContactPage.vue.js +95 -89
  16. package/dist/data-provider-interface/components/DistLicense.vue.js +224 -133
  17. package/dist/data-provider-interface/components/DistributionSimplePage.vue.js +401 -396
  18. package/dist/data-provider-interface/components/HVDPage.vue.js +56 -55
  19. package/dist/data-provider-interface/components/PublisherPage.vue.js +94 -89
  20. package/dist/data-provider-interface/components/TempResPage.vue.js +122 -104
  21. package/dist/data-provider-interface/components/TempResPageInModal.vue.js +249 -108
  22. package/dist/data-provider-interface/components/VisibilityPage.vue.js +86 -0
  23. package/dist/data-provider-interface/composables/useDpiSimpleLoader.js +128 -118
  24. package/dist/data-provider-interface/config/dcatapdeHappyFlow/converter.js +40 -28
  25. package/dist/data-provider-interface/config/dcatapdeHappyFlow/input-definition.js +4 -0
  26. package/dist/data-provider-interface/config/dcatapdeHappyFlow/page-content-config.js +1 -1
  27. package/dist/data-provider-interface/views/InputPage.vue.js +421 -767
  28. package/dist/form/inputDefinitions.js +15 -10
  29. package/package.json +2 -2
@@ -1,16 +1,20 @@
1
- import { ref as m, onMounted as U, createElementBlock as u, openBlock as s, normalizeClass as V, createCommentVNode as I, createBlock as y, Fragment as L, renderList as A, createElementVNode as R, createVNode as p, unref as i, isRef as M } from "vue";
2
- import b from "../ButtonV3.vue.js";
3
- import z from "../ModalSimpleV3.vue.js";
4
- import x from "../InputField.vue.js";
1
+ import { ref as h, reactive as R, computed as N, onMounted as P, createElementBlock as u, openBlock as r, normalizeClass as S, createCommentVNode as V, createBlock as q, Fragment as W, renderList as H, createElementVNode as I, createVNode as f, unref as l, isRef as O } from "vue";
2
+ import w from "../ButtonV3.vue.js";
3
+ import j from "../ModalSimpleV3.vue.js";
4
+ import k from "../InputField.vue.js";
5
+ import { PhWarning as Z } from "@phosphor-icons/vue";
5
6
  /* empty css */
6
- import D from "../../../../_virtual/_plugin-vue_export-helper.js";
7
- const $ = { class: "dpiV3_LinkAndMetadata" }, E = {
7
+ import G from "../../../../_virtual/_plugin-vue_export-helper.js";
8
+ const J = { class: "dpiV3_LinkAndMetadata" }, K = {
8
9
  key: 0,
10
+ class: "dpiV3_errorMessage"
11
+ }, Q = {
12
+ key: 1,
9
13
  class: "copy-mini-regular dpiV3_text_error"
10
- }, F = {
14
+ }, X = {
11
15
  key: 0,
12
16
  class: "dpiV3_tempAddMore"
13
- }, N = {
17
+ }, Y = {
14
18
  __name: "ConformsToV3",
15
19
  props: {
16
20
  conformsToItems: { type: Array, required: !0 },
@@ -18,16 +22,19 @@ const $ = { class: "dpiV3_LinkAndMetadata" }, E = {
18
22
  asCard: { type: Boolean, required: !1, default: !1 },
19
23
  showDeleteButton: { type: Boolean, required: !1, default: !1 }
20
24
  },
21
- emits: ["update"],
22
- setup(l, { emit: S }) {
23
- let d = m({});
24
- const a = l, c = S, g = m(!1), C = m(null);
25
- let r = m(!1);
26
- U(() => {
25
+ emits: ["update", "validationChange"],
26
+ setup(d, { expose: _, emit: y }) {
27
+ let s = h({});
28
+ const i = d, c = y, C = h(!1), v = h(null), a = R({}), b = R({});
29
+ let m = h(!1);
30
+ const U = N(() => Object.values(a).some((e) => e === !0)), z = () => {
31
+ c("validationChange", U.value);
32
+ };
33
+ P(() => {
27
34
  console.log(
28
35
  "Component Mounted: conformsToItems received for distributionId:",
29
- a.distributionId
30
- ), console.log("conformsToItems:", a.conformsToItems), a.conformsToItems.length === 0 && (console.log("No conformsToItems found, initializing first documentation."), c("update", [
36
+ i.distributionId
37
+ ), console.log("conformsToItems:", i.conformsToItems), i.conformsToItems.length === 0 && (console.log("No conformsToItems found, initializing first documentation."), c("update", [
31
38
  {
32
39
  id: 1,
33
40
  "dcat:downloadURL": "",
@@ -35,57 +42,83 @@ const $ = { class: "dpiV3_LinkAndMetadata" }, E = {
35
42
  }
36
43
  ]));
37
44
  });
38
- const v = (e) => {
45
+ const p = (e) => {
46
+ if (!e || e.trim() === "") return !1;
47
+ const t = e.trim();
48
+ return /\.[a-zA-Z]{2,}$/.test(t);
49
+ }, g = (e) => {
50
+ const t = i.conformsToItems.find((o) => o.id === e);
51
+ if (t) {
52
+ const o = t["dct:title"] && t["dct:title"].trim() !== "", n = t["dcat:downloadURL"] ? t["dcat:downloadURL"].trim() : "";
53
+ o ? n ? p(n) ? a[e] = null : a[e] = "Bitte geben Sie eine gültige URL ein (z.B. https://example.com)" : a[e] = "URL ist erforderlich" : n && !p(n) ? a[e] = "Bitte geben Sie eine gültige URL ein (z.B. https://example.com)" : a[e] = null;
54
+ }
55
+ }, B = () => {
56
+ let e = !1;
57
+ return i.conformsToItems.forEach((t) => {
58
+ const o = t["dct:title"] && t["dct:title"].trim() !== "", n = t["dcat:downloadURL"] ? t["dcat:downloadURL"].trim() : "";
59
+ o ? n ? p(n) || (a[t.id] = "Bitte geben Sie eine gültige URL ein (z.B. example.com)", e = !0) : (a[t.id] = "URL ist erforderlich", e = !0) : n && !p(n) && (a[t.id] = "Bitte geben Sie eine gültige URL ein (z.B. example.com)", e = !0);
60
+ }), e;
61
+ }, A = (e) => {
39
62
  switch (e) {
40
63
  case "delete":
41
- w();
64
+ D();
42
65
  break;
43
66
  }
44
- }, k = () => {
45
- const n = {
46
- id: (a.conformsToItems.length ? Math.max(...a.conformsToItems.map((t) => t.id)) : 0) + 1,
67
+ }, E = () => {
68
+ if (B())
69
+ return;
70
+ const t = {
71
+ id: (i.conformsToItems.length ? Math.max(...i.conformsToItems.map((o) => o.id)) : 0) + 1,
47
72
  "dcat:downloadURL": "",
48
73
  "dct:title": ""
49
74
  };
50
- c("update", [...a.conformsToItems, n]);
51
- }, T = (e, n, t) => {
52
- var h;
53
- (h = e == null ? void 0 : e.target) == null || h.value;
54
- const o = a.conformsToItems.map(
55
- (f) => f.id === t ? { ...f, [n]: e.target.value } : f
75
+ c("update", [...i.conformsToItems, t]);
76
+ }, M = (e) => {
77
+ b[e] && clearTimeout(b[e]), b[e] = setTimeout(() => {
78
+ g(e);
79
+ }, 800);
80
+ }, x = (e, t, o) => {
81
+ var L;
82
+ (L = e == null ? void 0 : e.target) == null || L.value;
83
+ const n = i.conformsToItems.map(
84
+ (T) => T.id === o ? { ...T, [t]: e.target.value } : T
56
85
  );
57
- c("update", o);
58
- }, _ = (e) => {
59
- d.value = {
86
+ c("update", n), M(o);
87
+ }, $ = (e) => {
88
+ s.value = {
60
89
  button: "Löschen",
61
90
  header: "Standard löschen",
62
91
  text: "Sind Sie sicher, dass Sie diesen Standard löschen wollen?",
63
92
  action: "delete",
64
93
  optionalString_1: e["dct:title"],
65
94
  optionalString_2: e["dcat:downloadURL"]
66
- }, r.value = !0, C.value = e;
67
- }, w = () => {
68
- if (a.conformsToItems.length === 1) {
69
- g.value = !0;
95
+ }, m.value = !0, v.value = e;
96
+ }, D = () => {
97
+ if (i.conformsToItems.length === 1) {
98
+ C.value = !0;
70
99
  return;
71
100
  }
72
- const e = a.conformsToItems.filter(
73
- (n) => n.id !== C.value.id
101
+ const e = i.conformsToItems.filter(
102
+ (t) => t.id !== v.value.id
74
103
  );
75
- c("update", e);
76
- }, B = (e) => {
77
- e["dct:title"] = "";
104
+ delete a[v.value.id], c("update", e), z();
105
+ }, F = (e) => {
106
+ e["dct:title"] = "", g(e.id);
78
107
  };
79
- return (e, n) => (s(), u("div", {
80
- class: V(["dpiV3_documentationsWrap", { dpiV3_docAllAsCard: l.asCard }])
108
+ return _({
109
+ validateAllItems: B,
110
+ hasValidationErrors: U
111
+ }), (e, t) => (r(), u("div", {
112
+ class: S(["dpiV3_documentationsWrap", { dpiV3_docAllAsCard: d.asCard }])
81
113
  }, [
82
- (s(!0), u(L, null, A(l.conformsToItems, (t) => (s(), u("div", {
83
- key: t.id,
84
- class: V(["dpiV3AutoCompleteWrap", { dpiV3_docAsCard: l.asCard }])
114
+ (r(!0), u(W, null, H(d.conformsToItems, (o) => (r(), u("div", {
115
+ key: o.id,
116
+ class: S(["dpiV3AutoCompleteWrap", { dpiV3_docAsCard: d.asCard }])
85
117
  }, [
86
- R("div", $, [
87
- p(x, {
88
- onInput: (o) => T(o, "dcat:downloadURL", t.id),
118
+ I("div", J, [
119
+ f(k, {
120
+ onInput: (n) => x(n, "dcat:downloadURL", o.id),
121
+ onBlur: (n) => g(o.id),
89
122
  addOnText: !1,
90
123
  datePicker: !1,
91
124
  infoIcon: !1,
@@ -95,11 +128,19 @@ const $ = { class: "dpiV3_LinkAndMetadata" }, E = {
95
128
  initialHintText: !1,
96
129
  label: "URL",
97
130
  showEndIcon: !1,
98
- modelValue: t["dcat:downloadURL"],
99
- "onUpdate:modelValue": (o) => t["dcat:downloadURL"] = o
100
- }, null, 8, ["onInput", "modelValue", "onUpdate:modelValue"]),
101
- p(x, {
102
- onInput: (o) => T(o, "dct:title", t.id),
131
+ modelValue: o["dcat:downloadURL"],
132
+ "onUpdate:modelValue": (n) => o["dcat:downloadURL"] = n
133
+ }, null, 8, ["onInput", "onBlur", "modelValue", "onUpdate:modelValue"]),
134
+ a[o.id] ? (r(), u("div", K, [
135
+ f(l(Z), {
136
+ size: 16,
137
+ weight: "fill"
138
+ }),
139
+ t[2] || (t[2] = I("span", { class: "copy-mini-regular" }, "URL ist erforderlich", -1))
140
+ ])) : V("", !0),
141
+ f(k, {
142
+ onInput: (n) => x(n, "dct:title", o.id),
143
+ onBlur: (n) => g(o.id),
103
144
  addOnText: !1,
104
145
  datePicker: !1,
105
146
  infoIcon: !1,
@@ -111,14 +152,14 @@ const $ = { class: "dpiV3_LinkAndMetadata" }, E = {
111
152
  "message.dataupload.datasets.dcat:distribution.distribution-title.label"
112
153
  ),
113
154
  showEndIcon: !1,
114
- modelValue: t["dct:title"],
115
- "onUpdate:modelValue": (o) => t["dct:title"] = o,
116
- defaultInput: !l.showDeleteButton,
117
- onDeleteButtonClicked: (o) => B(t)
118
- }, null, 8, ["onInput", "label", "modelValue", "onUpdate:modelValue", "defaultInput", "onDeleteButtonClicked"]),
119
- g.value && l.conformsToItems.length === 1 ? (s(), u("p", E, " Mindestens eine URL muss vorhanden sein. ")) : I("", !0)
155
+ modelValue: o["dct:title"],
156
+ "onUpdate:modelValue": (n) => o["dct:title"] = n,
157
+ defaultInput: !d.showDeleteButton,
158
+ onDeleteButtonClicked: (n) => F(o)
159
+ }, null, 8, ["onInput", "onBlur", "label", "modelValue", "onUpdate:modelValue", "defaultInput", "onDeleteButtonClicked"]),
160
+ C.value && d.conformsToItems.length === 1 ? (r(), u("p", Q, " Mindestens eine URL muss vorhanden sein. ")) : V("", !0)
120
161
  ]),
121
- p(b, {
162
+ f(w, {
122
163
  class: "dpiV3_tempAddMore",
123
164
  buttonText: e.$t(
124
165
  "message.dataupload.datasets.dcat:distribution.advanced.documentation.delete"
@@ -126,32 +167,32 @@ const $ = { class: "dpiV3_LinkAndMetadata" }, E = {
126
167
  size: "small",
127
168
  iconStart: "trash",
128
169
  variant: "tertiary",
129
- onClick: (o) => _(t)
170
+ onClick: (n) => $(o)
130
171
  }, null, 8, ["buttonText", "onClick"])
131
172
  ], 2))), 128)),
132
- l.asCard ? I("", !0) : (s(), u("div", F, [
133
- p(b, {
173
+ d.asCard ? V("", !0) : (r(), u("div", X, [
174
+ f(w, {
134
175
  buttonText: "Weitere Standards hinzufügen",
135
176
  size: "small",
136
177
  iconStart: "plus",
137
178
  variant: "tertiary",
138
- onClick: k
179
+ onClick: E
139
180
  })
140
181
  ])),
141
- i(r) ? (s(), y(z, {
182
+ l(m) ? (r(), q(j, {
142
183
  key: 1,
143
- buttons: i(d).button,
144
- headerText: i(d).header,
145
- text: i(d).text,
146
- onClose: n[0] || (n[0] = (t) => M(r) ? r.value = !1 : r = !1),
147
- action: i(d).action,
148
- onActionHandling: n[1] || (n[1] = (t) => v(t)),
149
- optionalString_1: i(d).optionalString_1,
150
- optionalString_2: i(d).optionalString_2
151
- }, null, 8, ["buttons", "headerText", "text", "action", "optionalString_1", "optionalString_2"])) : I("", !0)
184
+ buttons: l(s).button,
185
+ headerText: l(s).header,
186
+ text: l(s).text,
187
+ onClose: t[0] || (t[0] = (o) => O(m) ? m.value = !1 : m = !1),
188
+ action: l(s).action,
189
+ onActionHandling: t[1] || (t[1] = (o) => A(o)),
190
+ optionalString_1: l(s).optionalString_1,
191
+ optionalString_2: l(s).optionalString_2
192
+ }, null, 8, ["buttons", "headerText", "text", "action", "optionalString_1", "optionalString_2"])) : V("", !0)
152
193
  ], 2));
153
194
  }
154
- }, G = /* @__PURE__ */ D(N, [["__scopeId", "data-v-aab2720a"]]);
195
+ }, de = /* @__PURE__ */ G(Y, [["__scopeId", "data-v-bc09c0ae"]]);
155
196
  export {
156
- G as default
197
+ de as default
157
198
  };