@piveau/dpi 0.1.0-beta.8 → 0.1.0-twinby.0

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 (49) hide show
  1. package/dist/assets/dpi.css +1 -1
  2. package/dist/data-provider-interface/DPIMenu.vue.js +7 -7
  3. package/dist/data-provider-interface/DataProviderInterface.vue2.js +18 -17
  4. package/dist/data-provider-interface/HappyFlowComponents/ui/Autocomplete/Autocomplete.vue.js +7 -0
  5. package/dist/data-provider-interface/HappyFlowComponents/ui/Autocomplete/Autocomplete.vue2.js +122 -0
  6. package/dist/data-provider-interface/HappyFlowComponents/ui/Autocomplete/AutocompleteInputDefinition.js +14 -0
  7. package/dist/data-provider-interface/HappyFlowComponents/ui/Autocomplete/AutocompleteVocabFormKit.vue.js +75 -0
  8. package/dist/data-provider-interface/HappyFlowComponents/ui/Autocomplete/AutocompleteVocabFormKit.vue2.js +4 -0
  9. package/dist/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectNameStep.vue.js +29 -0
  10. package/dist/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue.js +7 -0
  11. package/dist/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectOrganisationStep.vue2.js +70 -0
  12. package/dist/data-provider-interface/HappyFlowComponents/ui/Chip.vue.js +19 -20
  13. package/dist/data-provider-interface/HappyFlowComponents/ui/DpiModalBase.vue.js +1 -1
  14. package/dist/data-provider-interface/HappyFlowComponents/ui/DpiModalBase.vue2.js +32 -28
  15. package/dist/data-provider-interface/HappyFlowComponents/ui/Dropdown.vue.js +1 -1
  16. package/dist/data-provider-interface/HappyFlowComponents/ui/InputField/InputFieldDefinition.js +21 -0
  17. package/dist/data-provider-interface/HappyFlowComponents/ui/InputField/InputFieldFormKit.vue.js +60 -0
  18. package/dist/data-provider-interface/HappyFlowComponents/ui/InputField/InputFieldFormKit.vue2.js +4 -0
  19. package/dist/data-provider-interface/HappyFlowComponents/ui/ListBox/Listbox.vue.js +7 -0
  20. package/dist/data-provider-interface/HappyFlowComponents/ui/ListBox/Listbox.vue2.js +98 -0
  21. package/dist/data-provider-interface/HappyFlowComponents/ui/OptionalInformation/AvailabilityV3.vue.js +16 -21
  22. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/DistributionModal.vue.js +83 -81
  23. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/EssentialsModal.vue.js +2 -4
  24. package/dist/data-provider-interface/components/DistLicense.vue.js +61 -63
  25. package/dist/data-provider-interface/components/DistributionSimplePage.vue.js +791 -779
  26. package/dist/data-provider-interface/components/HVDPage.vue.js +45 -43
  27. package/dist/data-provider-interface/components/InputPageStep.vue.js +9 -11
  28. package/dist/data-provider-interface/components/ProgressSteps.vue.js +7 -0
  29. package/dist/data-provider-interface/components/ProgressSteps.vue2.js +106 -0
  30. package/dist/data-provider-interface/components/ReviewAndPublishPage.vue.js +204 -204
  31. package/dist/data-provider-interface/composables/useDpiSimpleLoader.js +211 -212
  32. package/dist/data-provider-interface/composables/useDpiStepper.js +80 -39
  33. package/dist/data-provider-interface/config/dcatapdeHappyFlow/converter.js +145 -105
  34. package/dist/data-provider-interface/store/modules/conversionStore.js +130 -0
  35. package/dist/data-provider-interface/store/modules/dpiStore.js +18 -16
  36. package/dist/data-provider-interface/utils/RDFconverter.js +226 -0
  37. package/dist/data-provider-interface/utils/inputConverter.js +255 -0
  38. package/dist/data-provider-interface/utils/useSteps.js +39 -30
  39. package/dist/data-provider-interface/views/InputPage.vue.js +80 -92
  40. package/dist/data-provider-interface/views/InputPageProject.vue.js +528 -0
  41. package/dist/index.js +31 -27
  42. package/dist/stories/components/DemoStep.vue.js +331 -0
  43. package/dist/stories/components/DemoStepper.vue.js +7 -0
  44. package/dist/stories/components/DemoStepper.vue2.js +160 -0
  45. package/dist/stories/components/PartnerCard.vue.js +7 -0
  46. package/dist/stories/components/PartnerCard.vue2.js +32 -0
  47. package/dist/stories/components/ReviewStepDemo.vue.js +7 -0
  48. package/dist/stories/components/ReviewStepDemo.vue2.js +98 -0
  49. package/package.json +11 -4
@@ -1,80 +1,84 @@
1
- import { defineComponent as v, mergeModels as c, useModel as V, computed as f, createBlock as k, openBlock as _, unref as a, withCtx as i, createVNode as n, createElementVNode as o, renderSlot as d, createElementBlock as B, createCommentVNode as C } from "vue";
2
- import { TransitionRoot as b, Dialog as y, TransitionChild as m, DialogPanel as M } from "@headlessui/vue";
1
+ import { defineComponent as f, mergeModels as v, useModel as c, computed as V, createBlock as k, openBlock as _, unref as a, withCtx as n, createVNode as i, createElementVNode as o, renderSlot as l, createElementBlock as B, createCommentVNode as C } from "vue";
2
+ import { TransitionRoot as b, Dialog as y, TransitionChild as u, DialogPanel as M } from "@headlessui/vue";
3
3
  import h from "./CrossOutButton.vue.js";
4
4
  const $ = { class: "dpiV3_RapModalContainer" }, g = { class: "dpiV3_RapModalInner" }, R = { class: "dpiV3_modalHead" }, w = {
5
5
  key: 0,
6
6
  class: "dpiV3_closeButtonContainer"
7
- }, D = { class: "dpiV3_modalBody" }, N = { class: "dpiV3_interactionWrap" }, P = /* @__PURE__ */ v({
7
+ }, D = { class: "dpiV3_modalBody" }, N = { class: "dpiV3_interactionWrap" }, P = /* @__PURE__ */ f({
8
8
  __name: "DpiModalBase",
9
- props: /* @__PURE__ */ c({
9
+ props: /* @__PURE__ */ v({
10
10
  persistent: { type: Boolean }
11
11
  }, {
12
12
  modelValue: { type: Boolean },
13
13
  modelModifiers: {}
14
14
  }),
15
15
  emits: ["update:modelValue"],
16
- setup(s) {
17
- const l = s, p = V(s, "modelValue"), r = f({
16
+ setup(r) {
17
+ const d = r, p = c(r, "modelValue"), s = V({
18
18
  get() {
19
19
  return p.value;
20
20
  },
21
21
  set(e) {
22
- l.persistent && !e || (p.value = e);
22
+ d.persistent && !e || (p.value = e);
23
23
  }
24
24
  });
25
25
  return (e, t) => (_(), k(a(b), {
26
- show: r.value,
27
- as: "template"
26
+ show: s.value,
27
+ as: "template",
28
+ unmount: !1
28
29
  }, {
29
- default: i(() => [
30
- n(a(y), {
31
- onClose: t[1] || (t[1] = (u) => r.value = !1),
32
- style: { position: "relative", "z-index": "10000" }
30
+ default: n(() => [
31
+ i(a(y), {
32
+ onClose: t[1] || (t[1] = (m) => s.value = !1),
33
+ style: { position: "relative", "z-index": "10000" },
34
+ unmount: !1
33
35
  }, {
34
- default: i(() => [
35
- n(a(m), {
36
+ default: n(() => [
37
+ i(a(u), {
36
38
  enter: "dpiV3__backdrop-transition--enter",
37
39
  leave: "dpiV3__backdrop-transition--leave",
38
40
  "enter-from": "dpiV3__backdrop-transition--enter-from",
39
41
  "enter-to": "dpiV3__backdrop-transition--enter-to",
40
42
  "leave-from": "dpiV3__backdrop-transition--leave-from",
41
- "leave-to": "dpiV3__backdrop-transition--leave-to"
43
+ "leave-to": "dpiV3__backdrop-transition--leave-to",
44
+ unmount: !1
42
45
  }, {
43
- default: i(() => t[2] || (t[2] = [
46
+ default: n(() => t[2] || (t[2] = [
44
47
  o("div", { class: "dpiV3_backdrop" }, null, -1)
45
48
  ])),
46
49
  _: 1,
47
50
  __: [2]
48
51
  }),
49
52
  o("div", $, [
50
- n(a(m), {
53
+ i(a(u), {
51
54
  enter: "dpiV3__modal-transition--enter",
52
55
  leave: "dpiV3__modal-transition--leave",
53
56
  "enter-from": "dpiV3__modal-transition--enter-from",
54
57
  "enter-to": "dpiV3__modal-transition--enter-to",
55
58
  "leave-from": "dpiV3__modal-transition--leave-from",
56
- "leave-to": "dpiV3__modal-transition--leave-to"
59
+ "leave-to": "dpiV3__modal-transition--leave-to",
60
+ unmount: !1
57
61
  }, {
58
- default: i(() => [
59
- n(a(M), { class: "dpiV3_RapModalOuter" }, {
60
- default: i(() => [
62
+ default: n(() => [
63
+ i(a(M), { class: "dpiV3_RapModalOuter" }, {
64
+ default: n(() => [
61
65
  o("div", g, [
62
66
  o("div", R, [
63
- d(e.$slots, "header", {}, void 0, !0),
64
- l.persistent ? C("", !0) : (_(), B("div", w, [
65
- n(h, {
66
- onClick: t[0] || (t[0] = (u) => r.value = !1),
67
+ l(e.$slots, "header", {}, void 0, !0),
68
+ d.persistent ? C("", !0) : (_(), B("div", w, [
69
+ i(h, {
70
+ onClick: t[0] || (t[0] = (m) => s.value = !1),
67
71
  class: "dpiV3_closeButton",
68
72
  type: "default"
69
73
  })
70
74
  ]))
71
75
  ]),
72
76
  o("div", D, [
73
- d(e.$slots, "default", {}, void 0, !0)
77
+ l(e.$slots, "default", {}, void 0, !0)
74
78
  ])
75
79
  ]),
76
80
  o("div", N, [
77
- d(e.$slots, "footer", {}, void 0, !0)
81
+ l(e.$slots, "footer", {}, void 0, !0)
78
82
  ])
79
83
  ]),
80
84
  _: 3
@@ -225,7 +225,7 @@ const ee = { class: "dpiV3_dropdownV3" }, te = {
225
225
  ], 6)) : h("", !0)
226
226
  ]));
227
227
  }
228
- }, me = /* @__PURE__ */ Z(ce, [["__scopeId", "data-v-ed0325fe"]]);
228
+ }, me = /* @__PURE__ */ Z(ce, [["__scopeId", "data-v-0df80d8c"]]);
229
229
  export {
230
230
  me as default
231
231
  };
@@ -0,0 +1,21 @@
1
+ import t from "./InputFieldFormKit.vue.js";
2
+ const n = {
3
+ type: "input",
4
+ schema: [],
5
+ component: t,
6
+ props: [
7
+ "inputType",
8
+ "addOnText",
9
+ "datePicker",
10
+ "infoIcon",
11
+ "preIcon",
12
+ "showEndIcon",
13
+ "tooltipText",
14
+ "initialHintText",
15
+ "textLabel",
16
+ "placeholder"
17
+ ]
18
+ };
19
+ export {
20
+ n as default
21
+ };
@@ -0,0 +1,60 @@
1
+ import { defineComponent as V, computed as n, createBlock as j, openBlock as K, unref as r } from "vue";
2
+ import P from "../InputField.vue.js";
3
+ const M = /* @__PURE__ */ V({
4
+ __name: "InputFieldFormKit",
5
+ props: {
6
+ context: {}
7
+ },
8
+ setup(k) {
9
+ var i, p, u, x, d, m, f;
10
+ const t = k, c = n({
11
+ get: () => {
12
+ var e;
13
+ return ((e = t.context) == null ? void 0 : e._value) || "";
14
+ },
15
+ set: (e) => {
16
+ var o;
17
+ (o = t.context) == null || o.node.input(e);
18
+ }
19
+ }), I = n(() => {
20
+ var e;
21
+ return (e = t.context) == null ? void 0 : e.textLabel;
22
+ }), y = n(() => {
23
+ var e;
24
+ return (e = t.context) == null ? void 0 : e.name;
25
+ }), T = n(() => {
26
+ var e;
27
+ return ((e = t.context) == null ? void 0 : e.placeholder) || "Enter text here";
28
+ }), l = n(() => {
29
+ var e;
30
+ return Object.keys((e = t.context) == null ? void 0 : e.messages).length > 0;
31
+ }), s = n(() => {
32
+ var o, a, h, v, g;
33
+ if (!l.value)
34
+ return "";
35
+ const e = (a = Object.keys((o = t.context) == null ? void 0 : o.messages)) == null ? void 0 : a[0];
36
+ return ((g = (v = (h = t.context) == null ? void 0 : h.messages) == null ? void 0 : v[e]) == null ? void 0 : g.value) || "";
37
+ }), _ = ((i = t.context) == null ? void 0 : i.inputType) || "text", b = ((p = t.context) == null ? void 0 : p.addOnText) || !1, w = ((u = t.context) == null ? void 0 : u.datePicker) || !1, E = ((x = t.context) == null ? void 0 : x.infoIcon) || !1, O = ((d = t.context) == null ? void 0 : d.preIcon) || !1, B = ((m = t.context) == null ? void 0 : m.showEndIcon) !== !1, F = ((f = t.context) == null ? void 0 : f.tooltipText) || "This is helpful information";
38
+ return (e, o) => (K(), j(P, {
39
+ modelValue: c.value,
40
+ "onUpdate:modelValue": o[0] || (o[0] = (a) => c.value = a),
41
+ label: I.value,
42
+ placeholder: T.value,
43
+ "input-type": r(_),
44
+ "add-on-text": r(b),
45
+ "date-picker": r(w),
46
+ "info-icon": r(E),
47
+ "pre-icon": r(O),
48
+ "show-end-icon": B,
49
+ "tooltip-text": r(F),
50
+ "show-error": l.value,
51
+ "supporting-hint-message": s.value,
52
+ "initial-hint-text": s.value,
53
+ error_message: s.value,
54
+ name: y.value
55
+ }, null, 8, ["modelValue", "label", "placeholder", "input-type", "add-on-text", "date-picker", "info-icon", "pre-icon", "tooltip-text", "show-error", "supporting-hint-message", "initial-hint-text", "error_message", "name"]));
56
+ }
57
+ });
58
+ export {
59
+ M as default
60
+ };
@@ -0,0 +1,4 @@
1
+ import f from "./InputFieldFormKit.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./Listbox.vue2.js";
2
+ /* empty css */
3
+ import t from "../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-20d6f6d1"]]);
5
+ export {
6
+ p as default
7
+ };
@@ -0,0 +1,98 @@
1
+ import { defineComponent as v, mergeModels as f, useModel as g, computed as V, createElementBlock as m, openBlock as n, createVNode as d, unref as l, withCtx as s, normalizeClass as b, createElementVNode as t, createCommentVNode as k, renderSlot as L, createTextVNode as M, toDisplayString as u, Fragment as w, renderList as B, createBlock as C } from "vue";
2
+ import { Listbox as h, ListboxButton as N, ListboxLabel as y, ListboxOptions as E, ListboxOption as z } from "@headlessui/vue";
3
+ const O = { class: "listbox" }, S = { class: "listbox__input" }, j = { class: "listbox__input-label" }, F = /* @__PURE__ */ v({
4
+ __name: "Listbox",
5
+ props: /* @__PURE__ */ f({
6
+ options: {},
7
+ label: { default: "" },
8
+ errorMessage: { default: "" },
9
+ name: { default: "" }
10
+ }, {
11
+ modelValue: { required: !0 },
12
+ modelModifiers: {}
13
+ }),
14
+ emits: ["update:modelValue"],
15
+ setup(_) {
16
+ const o = _, a = g(_, "modelValue"), c = V(() => !!o.errorMessage);
17
+ return (r, i) => (n(), m("div", O, [
18
+ d(l(h), {
19
+ modelValue: a.value,
20
+ "onUpdate:modelValue": i[0] || (i[0] = (e) => a.value = e),
21
+ name: o.name
22
+ }, {
23
+ default: s(() => [
24
+ d(l(N), {
25
+ as: "button",
26
+ class: b(["listbox__button", { "listbox__button--error": c.value }])
27
+ }, {
28
+ default: s(() => {
29
+ var e;
30
+ return [
31
+ d(l(y), { as: "div" }, {
32
+ default: s(() => [
33
+ L(r.$slots, "label", {
34
+ label: o.label,
35
+ selected: a.value
36
+ }, () => [
37
+ M(u(o.label), 1)
38
+ ], !0)
39
+ ]),
40
+ _: 3
41
+ }),
42
+ t("div", S, [
43
+ t("div", j, u((e = a.value) == null ? void 0 : e.name), 1),
44
+ i[1] || (i[1] = t("div", { class: "listbox__input-icon" }, [
45
+ t("svg", {
46
+ xmlns: "http://www.w3.org/2000/svg",
47
+ fill: "none",
48
+ viewBox: "0 0 24 24",
49
+ "stroke-width": "1.5",
50
+ stroke: "currentColor",
51
+ class: "size-4"
52
+ }, [
53
+ t("path", {
54
+ "stroke-linecap": "round",
55
+ "stroke-linejoin": "round",
56
+ d: "M19.5 8.25l-7.5 7.5-7.5-7.5"
57
+ })
58
+ ])
59
+ ], -1))
60
+ ]),
61
+ r.errorMessage ? (n(), m("div", {
62
+ key: 0,
63
+ class: b(["listbox__message", { "listbox__message--error": c.value }])
64
+ }, u(r.errorMessage), 3)) : k("", !0)
65
+ ];
66
+ }),
67
+ _: 3
68
+ }, 8, ["class"]),
69
+ d(l(E), {
70
+ class: "listbox__options",
71
+ as: "ul"
72
+ }, {
73
+ default: s(() => [
74
+ (n(!0), m(w, null, B(r.options, (e) => (n(), C(l(z), {
75
+ as: "template",
76
+ key: e.id,
77
+ value: e,
78
+ disabled: e.unavailable
79
+ }, {
80
+ default: s(({ active: p, selected: x }) => [
81
+ t("li", {
82
+ class: b(["listbox__option", { "listbox__option--active": p, "listbox__option--selected": x }])
83
+ }, u(e.name), 3)
84
+ ]),
85
+ _: 2
86
+ }, 1032, ["value", "disabled"]))), 128))
87
+ ]),
88
+ _: 1
89
+ })
90
+ ]),
91
+ _: 3
92
+ }, 8, ["modelValue", "name"])
93
+ ]));
94
+ }
95
+ });
96
+ export {
97
+ F as default
98
+ };
@@ -1,4 +1,4 @@
1
- import { onMounted as f, getCurrentInstance as m, ref as u, watch as y, createBlock as g, openBlock as x, unref as p } from "vue";
1
+ import { onMounted as f, getCurrentInstance as m, ref as s, watch as y, createBlock as g, openBlock as x, unref as p } from "vue";
2
2
  import { getPlannedAvailability as I } from "../../services/dpiV3_apis.js";
3
3
  import w from "../Dropdown.vue.js";
4
4
  import { useI18n as B } from "vue-i18n";
@@ -16,43 +16,38 @@ const h = {
16
16
  const a = m().appContext.app.config.globalProperties.$env;
17
17
  try {
18
18
  const e = await I(a.api.baseUrl);
19
- i.value = e.map((n) => ({
20
- "@value": n.value,
21
- label: n.label,
22
- uri: n.uri
23
- }));
19
+ i.value = e.map((l) => ({
20
+ "@value": l.value,
21
+ label: l.label,
22
+ uri: l.uri
23
+ })), console.log(i.value);
24
24
  } catch (e) {
25
25
  console.error("Failed to load planned availability data", e);
26
26
  }
27
27
  });
28
- const l = d, i = u([]), o = u(l.availabilityText);
28
+ const o = d, i = s([]), n = s(o.availabilityText);
29
29
  i.value.uri;
30
- const s = c, v = (t) => {
31
- let a = i.value.find((e) => e["@value"] === t).uri || "";
32
- s(
33
- "addAvailability",
34
- t,
35
- l.distributionId,
36
- a
37
- );
30
+ const u = c, v = (t) => {
31
+ let a = i.value.find((l) => l["@value"] === t).uri || "", e = i.value.find((l) => l["@value"] === t).label || "";
32
+ console.log(e), u("addAvailability", t, o.distributionId, a, e);
38
33
  };
39
34
  y(
40
- () => l.availabilityText,
35
+ () => o.availabilityText,
41
36
  (t) => {
42
- o.value = t;
37
+ n.value = t;
43
38
  }
44
39
  );
45
40
  const b = () => {
46
- s("deleteButtonClicked", l.distributionId);
41
+ u("deleteButtonClicked", o.distributionId);
47
42
  };
48
43
  return (t, a) => (x(), g(w, {
49
44
  "onUpdate:modelValue": [
50
45
  a[0] || (a[0] = (e) => v(e)),
51
- a[1] || (a[1] = (e) => o.value = e)
46
+ a[1] || (a[1] = (e) => n.value = e)
52
47
  ],
53
48
  dropdownWidth: "large",
54
49
  type: "inputField",
55
- modelValue: o.value,
50
+ modelValue: n.value,
56
51
  inputFieldProps: {
57
52
  addOnText: !1,
58
53
  initialHintText: !1,
@@ -67,7 +62,7 @@ const h = {
67
62
  "message.dataupload.datasets.dcat:distribution.advanced.availability-placeholder"
68
63
  ),
69
64
  inputFieldSize: "large",
70
- modelValue: o.value,
65
+ modelValue: n.value,
71
66
  defaultInput: !d.showDeleteButton
72
67
  },
73
68
  data: i.value,
@@ -1,105 +1,107 @@
1
- import { ref as o, getCurrentInstance as g, watch as D, onMounted as z, resolveComponent as C, createElementBlock as x, openBlock as F, createVNode as d, withCtx as V, unref as m, isRef as M } from "vue";
2
- import { getLicenses as T } from "../../services/dpiV3_apis.js";
3
- import B from "../Dropdown.vue.js";
4
- import P from "../../../components/DistributionSimplePage.vue.js";
1
+ import { ref as n, getCurrentInstance as _, watch as E, onMounted as N, resolveComponent as O, createElementBlock as j, openBlock as T, createVNode as p, withCtx as B, unref as u, isRef as H } from "vue";
2
+ import { getLicenses as U } from "../../services/dpiV3_apis.js";
3
+ import W from "../Dropdown.vue.js";
4
+ import $ from "../../../components/DistributionSimplePage.vue.js";
5
5
  import "@formkit/core";
6
- import S from "../InputField.vue.js";
7
- import { useFormValues as k } from "../../../composables/useDpiFormValues.js";
8
- const R = { class: "dpiV3_innerRapModalWrapper" }, W = {
6
+ import A from "../InputField.vue.js";
7
+ import { useFormValues as q } from "../../../composables/useDpiFormValues.js";
8
+ const G = { class: "dpiV3_innerRapModalWrapper" }, le = {
9
9
  __name: "DistributionModal",
10
10
  props: {
11
11
  context: Object,
12
12
  newValues: Object
13
13
  },
14
- setup(b) {
15
- let s = o("");
16
- o([]), g().appContext.app.config.globalProperties.$env;
17
- let r = o([]);
18
- const { formValues: c } = k(), v = o("");
19
- let h = o(!1), i = o({ 1: !1, 2: !1 });
20
- const a = o([
14
+ setup(P) {
15
+ n();
16
+ let c = n("");
17
+ n([]), _().appContext.app.config.globalProperties.$env;
18
+ let s = n([]);
19
+ const { formValues: o } = q(), v = n("");
20
+ let k = n(!1), f = n({ 1: !1, 2: !1 });
21
+ const r = n([
21
22
  { isValid: "unset", "dcterms:license": "", title: "", uri: "" }
22
- ]), L = (e, l, t) => {
23
- f(e, l, t);
24
- }, w = (e) => {
23
+ ]), R = (e, l, t) => {
24
+ b(e, l, t);
25
+ }, y = (e) => {
25
26
  const l = typeof e == "object" && e.target ? e.target.value : e;
26
- f(l, "dcterms:license", 1);
27
- }, I = (e, l, t) => {
28
- e.target.value != "" ? (i.value[t] = !0, i.value[1] && i.value[2] && (a.value[0].isValid = !0)) : (i.value[t] = !1, (!i.value[1] || !i.value[2]) && (a.value[0].isValid = !1));
29
- const n = e.target.value;
30
- a.value = a.value.map((p) => l in p ? { ...p, [l]: n } : p), c.value.DistributionSimple["dct:license"] = a.value;
31
- }, f = (e, l, t, n) => {
32
- !(e === "" || r.value.some((u) => u["@value"] === e)) && e !== "" ? (v.value = "Bitte wählen Sie eine gültige Lizenz aus der Liste", i.value[t] = !1, a.value[0].isValid = !1) : (v.value = "", h.value = e !== "", e !== "" ? (i.value[t] = !0, e !== "" && i.value[2] && (a.value[0].isValid = !0)) : (i.value[t] = !1, a.value[0].isValid = !1), a.value = a.value.map((u) => l in u ? { ...u, [l]: e, uri: n } : u)), console.log(c.value.DistributionSimple), c.value.DistributionSimple["dct:license"] = a.value;
27
+ b(l, "dcterms:license", 1);
28
+ }, b = (e, l, t, a) => {
29
+ const m = e === "" || s.value.some((i) => i["@value"] === e);
30
+ let d = n();
31
+ s.value.some((i) => i["@value"] === e) && (d.value = s.value.find(
32
+ (i) => i["@value"] === e
33
+ ).label), !m && e !== "" ? (v.value = "Bitte wählen Sie eine gültige Lizenz aus der Liste", f.value[t] = !1, r.value[0].isValid = !1) : (v.value = "", k.value = e !== "", e !== "" ? (f.value[t] = !0, e !== "" && f.value[2] && (r.value[0].isValid = !0)) : (f.value[t] = !1, r.value[0].isValid = !1), r.value = r.value.map((i) => l in i ? { ...i, [l]: e, uri: a, title: d } : i)), console.log(o.value.DistributionSimple), o.value.DistributionSimple["dct:license"] = r.value;
33
34
  };
34
- return D(s, (e) => {
35
+ return E(c, (e) => {
35
36
  console.log("##############");
36
- let l = r.value.find(
37
+ let l = s.value.find(
37
38
  (t) => t["@value"] === e
38
39
  ).uri;
39
- e !== void 0 && f(e, "dcterms:license", 1, l);
40
- }), z(async () => {
41
- const l = g().appContext.app.config.globalProperties.$env;
40
+ e !== void 0 && b(e, "dcterms:license", 1, l);
41
+ }), N(async () => {
42
+ const l = _().appContext.app.config.globalProperties.$env;
42
43
  console.log("halloo?");
43
44
  try {
44
- const t = await T(l.api.baseUrl);
45
- r.value = t.map((n) => ({
46
- "@value": n.value,
47
- label: n.label,
48
- uri: n.uri
49
- })), console.log(r.value);
45
+ const t = await U(l.api.baseUrl);
46
+ s.value = t.map((a) => ({
47
+ "@value": a.value,
48
+ label: a.label,
49
+ uri: a.uri
50
+ })), console.log(s.value);
50
51
  } catch (t) {
51
52
  console.error("Failed to load licenses", t);
52
53
  }
53
54
  }), (e, l) => {
54
- const t = C("innerRapModalItem");
55
- return F(), x("div", R, [
56
- d(t, null, {
57
- default: V(() => [
58
- d(B, {
59
- "onUpdate:modelValue": [
60
- l[0] || (l[0] = (n) => L(n, "dcterms:license", 1)),
61
- l[1] || (l[1] = (n) => M(s) ? s.value = n : s = n)
62
- ],
63
- dropdownWidth: "large",
64
- onInput: w,
65
- type: "inputField",
66
- modelValue: m(s),
67
- inputFieldProps: {
68
- addOnText: !1,
69
- initialHintText: !1,
70
- datePicker: !1,
55
+ const t = O("innerRapModalItem");
56
+ return T(), j("div", G, [
57
+ p(t, null, {
58
+ default: B(() => {
59
+ var a, m, d, i, h, D, V, w, I, L, x, z, S, C, F, M;
60
+ return [
61
+ p(W, {
62
+ "onUpdate:modelValue": [
63
+ l[0] || (l[0] = (g) => R(g, "dcterms:license", 1)),
64
+ l[1] || (l[1] = (g) => H(c) ? c.value = g : c = g)
65
+ ],
66
+ dropdownWidth: "large",
67
+ onInput: y,
68
+ type: "inputField",
69
+ modelValue: u(c),
70
+ inputFieldProps: {
71
+ addOnText: !1,
72
+ initialHintText: !1,
73
+ datePicker: !1,
74
+ infoIcon: !1,
75
+ preIcon: !1,
76
+ label: "Lizenz",
77
+ dropdown_dpiV3: !0,
78
+ placeholder: ((h = (i = (d = (m = (a = u(o).DistributionSimple) == null ? void 0 : a["dcat:distribution"]) == null ? void 0 : m[0]) == null ? void 0 : d["dct:license"]) == null ? void 0 : i[0]) == null ? void 0 : h["dcterms:license"]) || ((w = (V = (D = u(o).DistributionSimple) == null ? void 0 : D["dct:license"]) == null ? void 0 : V[0]) == null ? void 0 : w["dcterms:license"]) || "Lizenz wählen...",
79
+ inputFieldSize: "large",
80
+ defaultInput: !0,
81
+ showError: !1
82
+ },
83
+ data: u(s),
84
+ onDeleteButtonClicked: e.deleteModifiedField,
85
+ class: "gap5BottomAsMargin"
86
+ }, null, 8, ["modelValue", "inputFieldProps", "data", "onDeleteButtonClicked"]),
87
+ p(A, {
88
+ label: e.$t("message.metadata.publisher"),
71
89
  infoIcon: !1,
72
90
  preIcon: !1,
73
- label: "Lizenz",
74
- dropdown_dpiV3: !0,
75
- placeholder: "Lizenz wählen...",
76
- inputFieldSize: "large",
77
- modelValue: m(s),
78
- defaultInput: !0,
79
- showError: !1
80
- },
81
- data: m(r),
82
- onDeleteButtonClicked: e.deleteModifiedField,
83
- class: "gap5BottomAsMargin"
84
- }, null, 8, ["modelValue", "inputFieldProps", "data", "onDeleteButtonClicked"]),
85
- d(S, {
86
- onInput: l[2] || (l[2] = (n) => I(n, "title", 2)),
87
- modelValue: e.changeLicenseTitleText,
88
- "onUpdate:modelValue": l[3] || (l[3] = (n) => e.changeLicenseTitleText = n),
89
- label: e.$t("message.metadata.publisher"),
90
- infoIcon: !1,
91
- preIcon: !1,
92
- initialHintText: !0,
93
- "supporting-hint-message": "Dieser Namensnennungstext stellt sicher, dass die Lizenzbedingungen eingehalten werden.",
94
- showEndIcon: !1
95
- }, null, 8, ["modelValue", "label"])
96
- ]),
91
+ initialHintText: !0,
92
+ "supporting-hint-message": "Dieser Namensnennungstext stellt sicher, dass die Lizenzbedingungen eingehalten werden.",
93
+ showEndIcon: !1,
94
+ placeholder: ((x = (L = (I = u(o).DistributionSimple) == null ? void 0 : I["dct:license"]) == null ? void 0 : L[0]) == null ? void 0 : x.title) || ((M = (F = (C = (S = (z = u(o).DistributionSimple) == null ? void 0 : z["dcat:distribution"]) == null ? void 0 : S[0]) == null ? void 0 : C["dct:license"]) == null ? void 0 : F[0]) == null ? void 0 : M.title) || "Name des Datenbereitstellers",
95
+ isDisabled: !0
96
+ }, null, 8, ["label", "placeholder"])
97
+ ];
98
+ }),
97
99
  _: 1
98
100
  }),
99
- d(t, null, {
100
- default: V(() => [
101
- d(P, {
102
- context: b.context,
101
+ p(t, null, {
102
+ default: B(() => [
103
+ p($, {
104
+ context: P.context,
103
105
  inRap: !0
104
106
  }, null, 8, ["context"])
105
107
  ]),
@@ -110,5 +112,5 @@ const R = { class: "dpiV3_innerRapModalWrapper" }, W = {
110
112
  }
111
113
  };
112
114
  export {
113
- W as default
115
+ le as default
114
116
  };
@@ -1,8 +1,6 @@
1
1
  import { mergeModels as u, ref as p, getCurrentInstance as m, useModel as r, createElementBlock as f, openBlock as c, createElementVNode as n, createVNode as o, toDisplayString as i } from "vue";
2
2
  import s from "../InputField.vue.js";
3
3
  import V from "../TextAreaV3.vue.js";
4
- import "@formkit/core";
5
- import "@formkit/vue";
6
4
  import { useFormValues as b } from "../../../composables/useDpiFormValues.js";
7
5
  /* empty css */
8
6
  import I from "../../../../_virtual/_plugin-vue_export-helper.js";
@@ -128,7 +126,7 @@ const g = { class: "dpiV3_innerRapModalWrapper" }, v = { class: "dpiV3_innerRapM
128
126
  ])
129
127
  ]));
130
128
  }
131
- }, R = /* @__PURE__ */ I($, [["__scopeId", "data-v-eeaac3aa"]]);
129
+ }, W = /* @__PURE__ */ I($, [["__scopeId", "data-v-5da38e70"]]);
132
130
  export {
133
- R as default
131
+ W as default
134
132
  };