@piveau/dpi 0.1.0-beta.42 → 0.1.0-beta.44

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,6 +1,6 @@
1
- import { ref as v, computed as we, toRef as ot, onUnmounted as st, onMounted as it, getCurrentInstance as lt, watch as nt, createElementBlock as m, openBlock as r, Fragment as q, createElementVNode as f, createBlock as G, createCommentVNode as p, toDisplayString as $, renderList as De, unref as L, createVNode as u, withDirectives as dt, vShow as ct } from "vue";
1
+ import { ref as v, computed as we, toRef as ot, onUnmounted as st, onMounted as it, getCurrentInstance as lt, watch as nt, createElementBlock as m, openBlock as r, Fragment as q, createElementVNode as f, createBlock as G, createCommentVNode as p, toDisplayString as F, renderList as De, unref as L, createVNode as u, withDirectives as dt, vShow as ct } from "vue";
2
2
  import "@formkit/core";
3
- import { PhWarning as Z } from "@phosphor-icons/vue";
3
+ import { PhWarning as Q } from "@phosphor-icons/vue";
4
4
  import { useI18n as rt } from "vue-i18n";
5
5
  import { useStore as ut } from "vuex";
6
6
  import { useEditModeInfo as mt } from "../composables/useDpiEditMode.js";
@@ -10,7 +10,7 @@ import { getFileTypes as pt, getChecksumAlgorithms as vt, getPlannedAvailability
10
10
  import { eventBus as _e } from "../HappyFlowComponents/services/eventBus.js";
11
11
  import M from "../HappyFlowComponents/ui/ButtonV3.vue.js";
12
12
  import yt from "../HappyFlowComponents/ui/Dropdown.vue.js";
13
- import Q from "../HappyFlowComponents/ui/InputField.vue.js";
13
+ import X from "../HappyFlowComponents/ui/InputField.vue.js";
14
14
  import kt from "../HappyFlowComponents/ui/ModalSimpleV3.vue.js";
15
15
  import xt from "../HappyFlowComponents/ui/ModalV3.vue.js";
16
16
  import bt from "../HappyFlowComponents/ui/OptionalInformation/AccessServiceV3.vue.js";
@@ -21,7 +21,7 @@ import It from "../HappyFlowComponents/ui/OptionalInformation/ChecksumV3.vue.js"
21
21
  import Lt from "../HappyFlowComponents/ui/OptionalInformation/ConformsToV3.vue.js";
22
22
  import Tt from "../HappyFlowComponents/ui/OptionalInformation/DescriptionV3.vue.js";
23
23
  import Vt from "../HappyFlowComponents/ui/OptionalInformation/DocumentationsV3.vue.js";
24
- import X from "../HappyFlowComponents/ui/OptionalInformation/FileFormatV3.vue.js";
24
+ import Y from "../HappyFlowComponents/ui/OptionalInformation/FileFormatV3.vue.js";
25
25
  import Ut from "../HappyFlowComponents/ui/OptionalInformation/IssuedDateV3.vue.js";
26
26
  import Ct from "../HappyFlowComponents/ui/OptionalInformation/LanguageV3.vue.js";
27
27
  import Rt from "../HappyFlowComponents/ui/OptionalInformation/ModifiedDateV3.vue.js";
@@ -29,8 +29,8 @@ import At from "../HappyFlowComponents/ui/OptionalInformation/PolicyV3.vue.js";
29
29
  import St from "../HappyFlowComponents/ui/OptionalInformation/StatusV3.vue.js";
30
30
  import R from "../HappyFlowComponents/ui/TextButtonSmall.vue.js";
31
31
  /* empty css */
32
- import Ft from "../../_virtual/_plugin-vue_export-helper.js";
33
- const $t = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
32
+ import $t from "../../_virtual/_plugin-vue_export-helper.js";
33
+ const Ft = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
34
34
  key: 1,
35
35
  class: "copy-large-regular"
36
36
  }, Bt = { class: "dpiV3_LinkAndMetadata input-container" }, zt = {
@@ -45,7 +45,7 @@ const $t = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
45
45
  }, Ht = { class: "dpiV3_TitleDelete" }, jt = { class: "dpiV3_documentationContents" }, Jt = { class: "dpiV3_Documentation" }, Kt = {
46
46
  key: 3,
47
47
  class: "dpiV3_DocumentationsInDistr"
48
- }, qt = { class: "dpiV3_TitleDelete" }, Gt = { class: "dpiV3_documentationContents" }, Zt = { class: "dpiV3_Documentation" }, Qt = { class: "dpiV3_DocumentationsInDistr" }, Xt = { class: "dpiV3_TitleDelete" }, Yt = { key: 0 }, ea = {
48
+ }, qt = { class: "dpiV3_TitleDelete" }, Gt = { class: "dpiV3_documentationContents" }, Qt = { class: "dpiV3_Documentation" }, Xt = { class: "dpiV3_DocumentationsInDistr" }, Yt = { class: "dpiV3_TitleDelete" }, Zt = { key: 0 }, ea = {
49
49
  key: 0,
50
50
  class: "dpiV3_tempAddMore"
51
51
  }, ta = {
@@ -101,7 +101,7 @@ const $t = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
101
101
  },
102
102
  setup(A) {
103
103
  var ge, ye, ke;
104
- const B = A, { isEditMode: Y } = mt(), { t: D } = rt(), T = v(null), Ie = {
104
+ const B = A, { isEditMode: Z } = mt(), { t: D } = rt(), T = v(null), Ie = {
105
105
  isValid: "unset",
106
106
  id: 1,
107
107
  "dcat:accessURL": "",
@@ -134,7 +134,7 @@ const $t = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
134
134
  "dcterms:license": ""
135
135
  }
136
136
  }, { formValues: w } = ft(), l = we(
137
- () => Y.value || B.inRap
137
+ () => Z.value || B.inRap
138
138
  ).value ? ot((ge = w.value.DistributionSimple) == null ? void 0 : ge["dcat:distribution"]) : v([Ie]);
139
139
  l.value[0]["dcat:downloadURL"] || (console.log(l["dcat:downloadURL"], l), l.value[0]["dcat:downloadURL"] = [{ "@id": "" }]);
140
140
  const n = v({}), V = v({}), ee = v([]), S = v(!1), z = v(!1), x = v(0), y = v([]), te = v([]), ae = v([]), oe = v([]), P = v([...y.value]), Le = ut(), N = v(null);
@@ -191,7 +191,7 @@ const $t = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
191
191
  };
192
192
  }), !t && l.value.length > 0 && (l.value[0].isValid = !1), a == null && (W.value = !t), w.value.DistributionSimple["dcat:distribution"] = l.value;
193
193
  }
194
- function F(a, t) {
194
+ function $(a, t) {
195
195
  var o, s, i;
196
196
  let e = !0;
197
197
  if (t === "dcat:accessURL")
@@ -221,7 +221,7 @@ const $t = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
221
221
  }), !a && l.value.length > 0 ? l.value[0].isValid = !1 : l.value.length > 0 && (l.value[0].isValid = !0), W.value = !a, w.value.DistributionSimple["dcat:distribution"] = l.value;
222
222
  }
223
223
  function j(a) {
224
- return /^(https?:\/\/)?(www\.)?[-\w@:%.+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b([-\w()@:%+.~#?&/=]*)$/.test(a);
224
+ return /^(https?|http):\/\/[^\s/$.?#].[^\s]*$/i.test(a);
225
225
  }
226
226
  st(() => {
227
227
  _e.off("nextClicked", ne), T.value && clearTimeout(T.value);
@@ -259,7 +259,7 @@ const $t = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
259
259
  const e = l.value.find((s) => s.id === t);
260
260
  if (!e) return;
261
261
  let o = y.value.find((s) => s["@value"] === a).uri || "";
262
- e["dct:format"] = { label: a, uri: o }, e.showErrorFormat = !1, e.formatErrorMessage = "", F(e, "dct:format"), w.value.DistributionSimple["dcat:distribution"] = l.value;
262
+ e["dct:format"] = { label: a, uri: o }, e.showErrorFormat = !1, e.formatErrorMessage = "", $(e, "dct:format"), w.value.DistributionSimple["dcat:distribution"] = l.value;
263
263
  }
264
264
  function de(a, t) {
265
265
  const e = l.value.find((o) => o.id === t);
@@ -353,7 +353,7 @@ const $t = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
353
353
  !1
354
354
  );
355
355
  }
356
- function Fe(a) {
356
+ function $e(a) {
357
357
  k(
358
358
  a,
359
359
  "Sprache",
@@ -365,7 +365,7 @@ const $t = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
365
365
  function J(a, t) {
366
366
  k(t, a, a, !0, !1);
367
367
  }
368
- function $e(a) {
368
+ function Fe(a) {
369
369
  k(
370
370
  a,
371
371
  "Regelwerk",
@@ -422,7 +422,7 @@ const $t = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
422
422
  }
423
423
  const Oe = we(() => N.value ? Le.getters["dpiStore/getNavSteps"](N.value) : {});
424
424
  nt(Oe, (a) => {
425
- }), Y.value || B.context.node.input([{ isValid: "unset" }]);
425
+ }), Z.value || B.context.node.input([{ isValid: "unset" }]);
426
426
  function We() {
427
427
  const a = Date.now();
428
428
  l.value.push({
@@ -615,7 +615,7 @@ const $t = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
615
615
  }
616
616
  t.useUndefined ? e[t.optType] = void 0 : e[t.optType] = "";
617
617
  }
618
- function Ze(a) {
618
+ function Qe(a) {
619
619
  var e, o, s, i, c;
620
620
  x.value = a;
621
621
  const t = l.value.find((g) => g.id === a);
@@ -651,10 +651,10 @@ const $t = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
651
651
  downloadURL: (t == null ? void 0 : t.downloadURL) || []
652
652
  }, S.value = !0, document.body.style.overflow = "hidden");
653
653
  }
654
- function Qe() {
654
+ function Xe() {
655
655
  S.value = !1, document.body.style.overflow = "auto";
656
656
  }
657
- function Xe(a) {
657
+ function Ye(a) {
658
658
  x.value = a;
659
659
  const t = l.value.find((i) => i.id === a), e = t ? t["dct:title"] : "", o = t ? t["dct:format"].label : "", s = t ? t["dcat:accessURL"] : "";
660
660
  n.value = {
@@ -692,7 +692,7 @@ const $t = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
692
692
  if (t === "dcat:accessURL") {
693
693
  const h = (s = a == null ? void 0 : a.target) == null ? void 0 : s.value;
694
694
  o[t] = h, T.value && clearTimeout(T.value), T.value = setTimeout(() => {
695
- F(o, t);
695
+ $(o, t);
696
696
  }, 800);
697
697
  } else if (t === "dct:format") {
698
698
  const h = typeof a == "string" ? a.trim() : (c = (i = a == null ? void 0 : a.target) == null ? void 0 : i.value) == null ? void 0 : c.trim();
@@ -706,11 +706,11 @@ const $t = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
706
706
  (I) => I["@value"].toLowerCase().includes(h.toLowerCase())
707
707
  );
708
708
  }
709
- F(o, t);
709
+ $(o, t);
710
710
  } else
711
- o[t] = (g = a == null ? void 0 : a.target) == null ? void 0 : g.value, F(o, t);
711
+ o[t] = (g = a == null ? void 0 : a.target) == null ? void 0 : g.value, $(o, t);
712
712
  }
713
- function Ye(a, t) {
713
+ function Ze(a, t) {
714
714
  const e = l.value.find((o) => o.id === a);
715
715
  e.documentations = e.documentations.filter(
716
716
  (o) => t.some((s) => s.id === o.id)
@@ -735,9 +735,9 @@ const $t = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
735
735
  );
736
736
  }
737
737
  return (a, t) => (r(), m(q, null, [
738
- f("div", $t, [
739
- A.inRap ? p("", !0) : (r(), m("h4", Et, $(a.$t("message.dataupload.datasets.dcat:distribution.title")), 1)),
740
- A.inRap ? p("", !0) : (r(), m("div", Mt, $(a.$t("message.dataupload.datasets.dcat:distribution.description")), 1)),
738
+ f("div", Ft, [
739
+ A.inRap ? p("", !0) : (r(), m("h4", Et, F(a.$t("message.dataupload.datasets.dcat:distribution.title")), 1)),
740
+ A.inRap ? p("", !0) : (r(), m("div", Mt, F(a.$t("message.dataupload.datasets.dcat:distribution.description")), 1)),
741
741
  (r(!0), m(q, null, De(L(l), (e, o) => {
742
742
  var s, i, c, g, h, b, I, xe, be;
743
743
  return r(), m("div", {
@@ -745,7 +745,7 @@ const $t = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
745
745
  class: "dpiV3AutoCompleteWrap"
746
746
  }, [
747
747
  f("div", Bt, [
748
- u(Q, {
748
+ u(X, {
749
749
  "add-on-text": !1,
750
750
  datePicker: !1,
751
751
  infoIcon: !0,
@@ -766,11 +766,11 @@ const $t = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
766
766
  onInput: (d) => K(d, "dcat:accessURL", e.id)
767
767
  }, null, 8, ["placeholder", "label", "showError", "model-value", "onInput"]),
768
768
  e.showErrorDownloadURL && e.urlErrorMessage ? (r(), m("div", zt, [
769
- u(L(Z), {
769
+ u(L(Q), {
770
770
  size: 16,
771
771
  weight: "fill"
772
772
  }),
773
- f("span", Pt, $(e.urlErrorMessage), 1)
773
+ f("span", Pt, F(e.urlErrorMessage), 1)
774
774
  ])) : p("", !0),
775
775
  u(yt, {
776
776
  "dropdown-width": "large",
@@ -800,13 +800,13 @@ const $t = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
800
800
  "model-value": (s = e == null ? void 0 : e["dct:format"]) == null ? void 0 : s.label
801
801
  }, null, 8, ["input-field-props", "data", "onInput", "onUpdate:modelValue", "model-value"]),
802
802
  e.showErrorFormat && e.formatErrorMessage ? (r(), m("div", Nt, [
803
- u(L(Z), {
803
+ u(L(Q), {
804
804
  size: 16,
805
805
  weight: "fill"
806
806
  }),
807
- f("span", Ot, $(e.formatErrorMessage), 1)
807
+ f("span", Ot, F(e.formatErrorMessage), 1)
808
808
  ])) : p("", !0),
809
- u(Q, {
809
+ u(X, {
810
810
  modelValue: e["dct:title"],
811
811
  "onUpdate:modelValue": (d) => e["dct:title"] = d,
812
812
  "add-on-text": !1,
@@ -842,7 +842,7 @@ const $t = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
842
842
  "distribution-id": e.id,
843
843
  "as-card": !0,
844
844
  "show-delete-button": !0,
845
- onUpdate: (d) => Ye(e.id, d)
845
+ onUpdate: (d) => Ze(e.id, d)
846
846
  }, null, 8, ["documentations", "file-types", "distribution-id", "onUpdate"])
847
847
  ])
848
848
  ])
@@ -858,7 +858,7 @@ const $t = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
858
858
  ])
859
859
  ]),
860
860
  f("div", Gt, [
861
- f("div", Zt, [
861
+ f("div", Qt, [
862
862
  u(bt, {
863
863
  "access-services": e.accessServices,
864
864
  "distribution-id": e.id,
@@ -872,20 +872,20 @@ const $t = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
872
872
  ])
873
873
  ])
874
874
  ])) : p("", !0),
875
- (r(!0), m(q, { key: 4 }, De(e["dcat:downloadURL"], (d, U) => (r(), m("div", Qt, [
876
- f("div", Xt, [
875
+ (r(!0), m(q, { key: 4 }, De(e["dcat:downloadURL"], (d, U) => (r(), m("div", Xt, [
876
+ f("div", Yt, [
877
877
  t[8] || (t[8] = f("div", {
878
878
  class: "dpiV3_label",
879
879
  style: { margin: "0" }
880
880
  }, "DownloadURL (optional)", -1)),
881
- e["dcat:downloadURL"].length !== 1 ? (r(), m("div", Yt, [
881
+ e["dcat:downloadURL"].length !== 1 ? (r(), m("div", Zt, [
882
882
  u(R, {
883
883
  "button-text": "löschen",
884
884
  onClick: (C) => e["dcat:downloadURL"].splice(U, 1)
885
885
  }, null, 8, ["onClick"])
886
886
  ])) : p("", !0)
887
887
  ]),
888
- u(Q, {
888
+ u(X, {
889
889
  onInput: (C) => Be(
890
890
  C.target.value,
891
891
  e.id,
@@ -1008,7 +1008,7 @@ const $t = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
1008
1008
  f("div", null, [
1009
1009
  u(R, {
1010
1010
  "button-text": "löschen",
1011
- onClick: (d) => $e(e.id)
1011
+ onClick: (d) => Fe(e.id)
1012
1012
  }, null, 8, ["onClick"])
1013
1013
  ])
1014
1014
  ]),
@@ -1024,7 +1024,7 @@ const $t = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
1024
1024
  "distribution-id": e.id,
1025
1025
  "show-delete-button": !1,
1026
1026
  onAddLanguage: ve,
1027
- onDeleteButtonClicked: (d) => Fe(e.id),
1027
+ onDeleteButtonClicked: (d) => $e(e.id),
1028
1028
  inOverview: !0
1029
1029
  }, null, 8, ["distribution-id", "onDeleteButtonClicked"])
1030
1030
  ])) : p("", !0),
@@ -1038,7 +1038,7 @@ const $t = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
1038
1038
  }, null, 8, ["byte-size-prop", "distribution-id", "onDeleteButtonClicked"])
1039
1039
  ])) : p("", !0),
1040
1040
  e["dcat:mediaType"].label && e["dcat:mediaType"].label.trim() !== "" ? (r(), m("div", pa, [
1041
- u(X, {
1041
+ u(Y, {
1042
1042
  "distribution-id": e.id,
1043
1043
  "file-types": y.value,
1044
1044
  "file-format-type": "dcat:mediaType",
@@ -1049,7 +1049,7 @@ const $t = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
1049
1049
  }, null, 8, ["distribution-id", "file-types", "file-format-text"])
1050
1050
  ])) : p("", !0),
1051
1051
  e["dcat:compressFormat"] && e["dcat:compressFormat"].label && e["dcat:compressFormat"].label.trim() !== "" ? (r(), m("div", va, [
1052
- u(X, {
1052
+ u(Y, {
1053
1053
  "distribution-id": e.id,
1054
1054
  "file-types": y.value,
1055
1055
  "file-format-type": "dcat:compressFormat",
@@ -1060,7 +1060,7 @@ const $t = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
1060
1060
  }, null, 8, ["distribution-id", "file-types", "compress-format-text"])
1061
1061
  ])) : p("", !0),
1062
1062
  e["dcat:packageFormat"].label && e["dcat:packageFormat"].label.trim() !== "" ? (r(), m("div", ha, [
1063
- u(X, {
1063
+ u(Y, {
1064
1064
  "distribution-id": e.id,
1065
1065
  "file-types": y.value,
1066
1066
  "file-format-type": "dcat:packageFormat",
@@ -1078,7 +1078,7 @@ const $t = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
1078
1078
  size: "small",
1079
1079
  "icon-start": "PlusSquare",
1080
1080
  variant: "tertiary",
1081
- onClick: (d) => Ze(e.id)
1081
+ onClick: (d) => Qe(e.id)
1082
1082
  }, null, 8, ["button-text", "onClick"]),
1083
1083
  L(l).length > 1 ? (r(), G(M, {
1084
1084
  key: 0,
@@ -1086,7 +1086,7 @@ const $t = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
1086
1086
  size: "small",
1087
1087
  "icon-start": "trash",
1088
1088
  variant: "tertiary",
1089
- onClick: (d) => Xe(e.id)
1089
+ onClick: (d) => Ye(e.id)
1090
1090
  }, null, 8, ["button-text", "onClick"])) : p("", !0)
1091
1091
  ])
1092
1092
  ]);
@@ -1101,7 +1101,7 @@ const $t = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
1101
1101
  }, null, 8, ["button-text"])
1102
1102
  ]),
1103
1103
  W.value ? (r(), m("div", xa, [
1104
- u(L(Z), {
1104
+ u(L(Q), {
1105
1105
  size: 16,
1106
1106
  weight: "fill"
1107
1107
  }),
@@ -1145,7 +1145,7 @@ const $t = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
1145
1145
  "conforms-to-items": n.value.conformsToItems,
1146
1146
  "policy-items": n.value.policyItems,
1147
1147
  "download-URL": n.value.downloadURL,
1148
- onClose: Qe,
1148
+ onClose: Xe,
1149
1149
  onActionHandling: t[3] || (t[3] = (e) => qe(e)),
1150
1150
  onAddDocumentations: He,
1151
1151
  onAddAccessServices: je,
@@ -1176,7 +1176,7 @@ const $t = { class: "dpiV3InnerComponentWrap" }, Et = { key: 0 }, Mt = {
1176
1176
  }, null, 8, ["buttons", "header-text", "text", "action"])) : p("", !0)
1177
1177
  ], 64));
1178
1178
  }
1179
- }, to = /* @__PURE__ */ Ft(ba, [["__scopeId", "data-v-a72b1c8c"]]);
1179
+ }, to = /* @__PURE__ */ $t(ba, [["__scopeId", "data-v-8eb1395b"]]);
1180
1180
  export {
1181
1181
  to as default
1182
1182
  };