@piveau/dpi 0.1.0-beta.5 → 0.1.0-beta.7

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/DataProviderInterface.vue2.js +45 -40
  3. package/dist/data-provider-interface/HappyFlowComponents/HomeTable.vue.js +15 -15
  4. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/AdditionalsSubModal.vue.js +15 -14
  5. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/DistributionModal.vue.js +73 -32
  6. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/FindabilityChips.vue.js +26 -24
  7. package/dist/data-provider-interface/HappyFlowComponents/ui/SectionItems/HVDSwitch.vue.js +23 -22
  8. package/dist/data-provider-interface/HappyFlowComponents/ui/TableRowV3.vue.js +88 -85
  9. package/dist/data-provider-interface/components/DistributionSimplePage.vue.js +382 -382
  10. package/dist/data-provider-interface/components/ReviewAndPublishPage.vue.js +183 -174
  11. package/dist/data-provider-interface/composables/useDpiContext.js +5 -7
  12. package/dist/data-provider-interface/composables/useDpiEditMode.js +15 -13
  13. package/dist/data-provider-interface/composables/useDpiSimpleLoader.js +7 -7
  14. package/dist/data-provider-interface/store/index.js +32 -0
  15. package/dist/data-provider-interface/store/modules/authStore.js +301 -0
  16. package/dist/data-provider-interface/store/modules/catalogueDetailsStore.js +34 -0
  17. package/dist/data-provider-interface/store/modules/cataloguesStore.js +256 -0
  18. package/dist/data-provider-interface/store/modules/datasetDetailsStore.js +644 -0
  19. package/dist/data-provider-interface/store/modules/datasetsStore.js +361 -0
  20. package/dist/data-provider-interface/store/{dpiStore.js → modules/dpiStore.js} +11 -12
  21. package/dist/data-provider-interface/store/modules/snackbarStore.js +45 -0
  22. package/dist/data-provider-interface/views/InputPage.vue.js +100 -99
  23. package/dist/index.js +4 -4
  24. package/dist/utils/draftApi.js +33 -0
  25. package/dist/utils/helpers.js +36 -22
  26. package/dist/utils/identifiersApi.js +16 -0
  27. package/dist/utils/jwt.js +7 -0
  28. package/package.json +6 -4
  29. package/dist/data-provider-interface/store/modules/formSchemaStore.js +0 -94
@@ -1,24 +1,24 @@
1
- import { whenever as k } from "@vueuse/core";
2
- import { defineComponent as M, defineAsyncComponent as N, toRef as V, computed as i, toValue as q, provide as L, watchEffect as v, ref as u, nextTick as $ } from "vue";
3
- import { useRoute as P } from "vue-router";
4
- import { mapActions as D, mapGetters as _, useStore as B } from "vuex";
5
- import { useRuntimeEnv as O } from "../composables/useRuntimeEnv.js";
6
- import F from "./components/TheErrorDialog.vue.js";
7
- import { autocompleteKey as T, defaultAutocompleteAdapter as j } from "./composables/aucotomplete.js";
8
- import { setupDpiContext as z } from "./composables/useDpiContext.js";
9
- import { useDpiEditMode as J } from "./composables/useDpiEditMode.js";
10
- import { useFormValues as G } from "./composables/useDpiFormValues.js";
11
- import { useErrorDialog as K } from "./composables/useErrorDialog.js";
12
- import { config as H } from "./config/dpi-spec-config.js";
13
- import Q from "./HappyFlowComponents/ui/ButtonV3.vue.js";
14
- import U from "./HappyFlowComponents/ui/DpiModalBase.vue.js";
15
- const ue = M({
1
+ import { whenever as V } from "@vueuse/core";
2
+ import { defineComponent as q, defineAsyncComponent as P, toRef as _, computed as i, toValue as B, provide as O, watchEffect as v, ref as u, nextTick as D } from "vue";
3
+ import { useRoute as j } from "vue-router";
4
+ import { mapActions as w, mapGetters as z, useStore as F } from "vuex";
5
+ import { useRuntimeEnv as T } from "../composables/useRuntimeEnv.js";
6
+ import J from "./components/TheErrorDialog.vue.js";
7
+ import { autocompleteKey as G, defaultAutocompleteAdapter as K } from "./composables/aucotomplete.js";
8
+ import { setupDpiContext as H } from "./composables/useDpiContext.js";
9
+ import { useDpiEditMode as Q } from "./composables/useDpiEditMode.js";
10
+ import { useFormValues as U } from "./composables/useDpiFormValues.js";
11
+ import { useErrorDialog as W } from "./composables/useErrorDialog.js";
12
+ import { config as X } from "./config/dpi-spec-config.js";
13
+ import Y from "./HappyFlowComponents/ui/ButtonV3.vue.js";
14
+ import Z from "./HappyFlowComponents/ui/DpiModalBase.vue.js";
15
+ const fe = q({
16
16
  name: "DataProviderInterface",
17
17
  components: {
18
- ButtonV3: Q,
19
- InputPage: N(() => import("./views/InputPage.vue.js")),
20
- DpiModalBase: U,
21
- TheErrorDialog: F
18
+ ButtonV3: Y,
19
+ InputPage: P(() => import("./views/InputPage.vue.js")),
20
+ DpiModalBase: Z,
21
+ TheErrorDialog: J
22
22
  },
23
23
  props: {
24
24
  name: {
@@ -53,7 +53,7 @@ const ue = M({
53
53
  };
54
54
  },
55
55
  computed: {
56
- ..._("auth", [
56
+ ...z("auth", [
57
57
  "getIsEditMode"
58
58
  ]),
59
59
  mode() {
@@ -61,10 +61,10 @@ const ue = M({
61
61
  }
62
62
  },
63
63
  methods: {
64
- ...D("dpiStore", [
64
+ ...w("dpiStore", [
65
65
  "saveLocalstorageValues"
66
66
  ]),
67
- ...D("auth", [
67
+ ...w("auth", [
68
68
  "populateDraftAndEdit"
69
69
  ]),
70
70
  getClearPath() {
@@ -88,10 +88,10 @@ const ue = M({
88
88
  window.removeEventListener("scroll", this.handleScroll);
89
89
  },
90
90
  setup(o) {
91
- const e = P(), r = B(), c = O(), h = c.content.dataProviderInterface.specification, w = H[h], b = V(o, "dpiContext"), { formValues: g } = G(), { openErrorDialog: y } = K(), t = i(() => {
92
- const a = q(b);
91
+ const e = j(), r = F(), c = T(), h = c.content.dataProviderInterface.specification, S = X[h], b = _(o, "dpiContext"), { formValues: g } = U(), { openErrorDialog: y } = W(), t = i(() => {
92
+ const a = B(b);
93
93
  return {
94
- specification: w,
94
+ specification: S,
95
95
  specificationName: h,
96
96
  edit: {
97
97
  enabled: e.query.edit === "true",
@@ -101,26 +101,26 @@ const ue = M({
101
101
  },
102
102
  ...a
103
103
  };
104
- }), S = i(() => t.value.specification), E = i(() => t.value.specificationName);
105
- z(t);
106
- const A = j({
104
+ }), A = i(() => t.value.specification), E = i(() => t.value.specificationName);
105
+ H(t);
106
+ const C = K({
107
107
  envs: c,
108
108
  dpiContext: t
109
109
  });
110
- L(T, o.autocomplete || A.adapter), v(() => {
111
- r.dispatch("dpiStore/setSpecification", S.value), r.dispatch("dpiStore/setSpecificationname", E.value);
110
+ O(G, o.autocomplete || C.adapter), v(() => {
111
+ r.dispatch("dpiStore/setSpecification", A.value), r.dispatch("dpiStore/setSpecificationname", E.value);
112
112
  });
113
- const C = i(() => `${e.query.key}@${E.value}`), { isReady: p, result: m, inEditModeAndRptAvailable: I, parsingErrors: s, fetchError: n } = J(t), f = u(!1);
113
+ const I = i(() => `${e.query.key}@${E.value}`), { isReady: p, result: m, inEditModeAndRptAvailable: $, parsingErrors: s, fetchError: n, isSimpleLoaderReady: x, isMaterialized: R, isLoading: L, jsonld: M } = Q(t), f = u(!1);
114
114
  v(async () => {
115
- f.value || I.value && p.value && (await $(), await $(), g.value = m.value, console.log("resultus", m.value), f.value = !0);
115
+ f.value || $.value && p.value && (await D(), await D(), g.value = m.value, console.log("resultus", m.value), f.value = !0);
116
116
  });
117
- const x = i(() => {
117
+ const k = i(() => {
118
118
  var a;
119
119
  return (a = t.value.edit) != null && a.enabled ? p.value && f.value : p.value;
120
- }), d = u(!1), l = u(null), R = u(!0);
120
+ }), d = u(!1), l = u(null), N = u(!0);
121
121
  return v(() => {
122
122
  s.value && s.value.length > 0 ? (l.value = s.value[0], d.value = !0, y(new Error(s.value[0].message))) : (d.value = !1, l.value = null);
123
- }), k(n, () => {
123
+ }), V(n, () => {
124
124
  var a;
125
125
  l.value = {
126
126
  code: "fetch_failed",
@@ -129,16 +129,21 @@ const ue = M({
129
129
  }, { immediate: !0 }), {
130
130
  result: m,
131
131
  resolvedDpiContext: t,
132
- key: C,
133
- isReady: x,
132
+ key: I,
133
+ isReady: k,
134
134
  formValues: g,
135
135
  showErrorModal: d,
136
136
  currentError: l,
137
- isDevelopment: R,
138
- fetchError: n
137
+ isDevelopment: N,
138
+ fetchError: n,
139
+ isSimpleLoaderReady: x,
140
+ isMaterialized: R,
141
+ isLoading: L,
142
+ jsonld: M,
143
+ inEditModeAndRptAvailable: $
139
144
  };
140
145
  }
141
146
  });
142
147
  export {
143
- ue as default
148
+ fe as default
144
149
  };
@@ -1,4 +1,4 @@
1
- import { ref as v, computed as l, watch as _, createElementBlock as r, openBlock as a, createElementVNode as o, createCommentVNode as B, unref as u, createTextVNode as h, createVNode as D, withCtx as L, createStaticVNode as N, Fragment as b, renderList as V, createBlock as k } from "vue";
1
+ import { ref as v, computed as n, watch as _, createElementBlock as r, openBlock as a, createElementVNode as o, createCommentVNode as B, unref as u, createTextVNode as h, createVNode as D, withCtx as L, createStaticVNode as N, Fragment as b, renderList as V, createBlock as k } from "vue";
2
2
  import { useAsyncState as U, useDebounce as z } from "@vueuse/core";
3
3
  import C from "axios";
4
4
  import "jquery";
@@ -24,28 +24,28 @@ const F = { class: "dpiV3_dpiHome V3-typography" }, K = { class: "dpiV3_homeHead
24
24
  setup(X) {
25
25
  const x = R(), i = W();
26
26
  E(), localStorage.getItem("dpi_duplicate"), v("");
27
- let d = l(() => i.getters["auth/getUserCatalogIds"]);
27
+ let l = n(() => i.getters["auth/getUserCatalogIds"]);
28
28
  v({
29
29
  loading: !1,
30
30
  message: "",
31
31
  confirm: () => null
32
32
  });
33
- const m = l(() => i.getters["auth/getUserDrafts"]), I = l(() => i.getters["auth/getUserData"]);
34
- l(() => I.value.rtpToken);
33
+ const m = n(() => i.getters["auth/getUserDrafts"]), I = n(() => i.getters["auth/getUserData"]);
34
+ n(() => I.value.rtpToken);
35
35
  const S = (s) => i.dispatch("snackbar/showSnackbar", s);
36
36
  async function w(s) {
37
- const t = s.map((n) => C.get(`${x.api.baseUrl}search?facets={%22catalog%22:[%22${n}%22]}&filters=dataset&includes=title,modified,id,description,catalog`));
38
- return (await Promise.all(t)).flatMap((n) => n.data.result.results);
37
+ const t = s.map((d) => C.get(`${x.api.baseUrl}search?facets={%22catalog%22:[%22${d}%22]}&filters=dataset&includes=title,modified,id,description,catalog`));
38
+ return (await Promise.all(t)).flatMap((d) => d.data.result.results);
39
39
  }
40
40
  const {
41
41
  state: p,
42
42
  execute: H,
43
43
  isLoading: P,
44
44
  error: c
45
- } = U(async () => w(d.value), [], { immediate: !1 });
46
- _(d, () => {
45
+ } = U(async () => w(l.value), [], { immediate: !1 });
46
+ _(l, () => {
47
47
  var s;
48
- ((s = d.value) == null ? void 0 : s.length) > 0 && H();
48
+ ((s = l.value) == null ? void 0 : s.length) > 0 && H();
49
49
  }, { immediate: !0 }), _(c, () => {
50
50
  console.error(c), S({
51
51
  message: c.message,
@@ -57,7 +57,7 @@ const F = { class: "dpiV3_dpiHome V3-typography" }, K = { class: "dpiV3_homeHead
57
57
  o("div", K, [
58
58
  t[1] || (t[1] = o("h2", { class: "dpiV3_tableHeader" }, " Ihre Datensätze ", -1)),
59
59
  u(p).length === 0 && m.value.length === 0 ? (a(), r("p", M, t[0] || (t[0] = [
60
- h(" Willkommen im Data Provider Infsdfterface ✨ ", -1),
60
+ h(" Willkommen im Data Provider Interface ✨ ", -1),
61
61
  o("br", null, null, -1),
62
62
  h("Beginnen Sie mit der Erstellung Ihres ersten Datensatzes! ", -1)
63
63
  ]))) : B("", !0),
@@ -77,7 +77,7 @@ const F = { class: "dpiV3_dpiHome V3-typography" }, K = { class: "dpiV3_homeHead
77
77
  u(T) ? (a(), r("div", J, t[2] || (t[2] = [
78
78
  o("p", null, "Lädt Daten...", -1)
79
79
  ]))) : (a(), r("div", O, [
80
- t[3] || (t[3] = N('<div class="dpiV3_tableHeadWrap" data-v-3fec7901><div class="dpiV3_thWrap" data-v-3fec7901><div scope="col" data-v-3fec7901><span data-v-3fec7901>Datensätze</span></div><div scope="col" class="dpiV3_statusHead" data-v-3fec7901><span data-v-3fec7901>Status</span></div></div><div class="dpiV3_blankCell" data-v-3fec7901></div></div>', 1)),
80
+ t[3] || (t[3] = N('<div class="dpiV3_tableHeadWrap" data-v-e3ec9dd2><div class="dpiV3_thWrap" data-v-e3ec9dd2><div scope="col" data-v-e3ec9dd2><span data-v-e3ec9dd2>Datensätze</span></div><div scope="col" class="dpiV3_statusHead" data-v-e3ec9dd2><span data-v-e3ec9dd2>Status</span></div></div><div class="dpiV3_blankCell" data-v-e3ec9dd2></div></div>', 1)),
81
81
  o("div", null, [
82
82
  (a(!0), r(b, null, V(m.value, (e) => (a(), k(y, {
83
83
  id: e.id,
@@ -89,11 +89,11 @@ const F = { class: "dpiV3_dpiHome V3-typography" }, K = { class: "dpiV3_homeHead
89
89
  draft: "true",
90
90
  dataset: e
91
91
  }, null, 8, ["id", "data-cy", "catalogue", "text", "date", "dataset"]))), 128)),
92
- (a(!0), r(b, null, V(u(p), (e, n) => {
93
- var f, g;
92
+ (a(!0), r(b, null, V(u(p), (e, d) => {
93
+ var g, f;
94
94
  return a(), k(y, {
95
95
  key: e.id,
96
- text: ((f = e.title) == null ? void 0 : f.de) || ((g = e.title) == null ? void 0 : g.en) || "Kein Titel in englisch oder deutsch vohanden",
96
+ text: ((g = e.title) == null ? void 0 : g.de) || ((f = e.title) == null ? void 0 : f.en) || "Kein Titel in englisch oder deutsch vohanden",
97
97
  date: e.modified ? new Date(e.modified).toDateString() : "-",
98
98
  dataset: e
99
99
  }, null, 8, ["text", "date", "dataset"]);
@@ -103,7 +103,7 @@ const F = { class: "dpiV3_dpiHome V3-typography" }, K = { class: "dpiV3_homeHead
103
103
  ])
104
104
  ]));
105
105
  }
106
- }, ce = /* @__PURE__ */ q(Q, [["__scopeId", "data-v-3fec7901"]]);
106
+ }, ce = /* @__PURE__ */ q(Q, [["__scopeId", "data-v-e3ec9dd2"]]);
107
107
  export {
108
108
  ce as default
109
109
  };
@@ -1,12 +1,13 @@
1
- import { ref as k, getCurrentInstance as A, resolveComponent as x, createElementBlock as w, openBlock as r, Fragment as F, createVNode as v, withCtx as V, createTextVNode as N, toDisplayString as U, createCommentVNode as i, createBlock as u, renderList as S, unref as c, isRef as $, createElementVNode as j } from "vue";
1
+ import { ref as k, getCurrentInstance as U, resolveComponent as x, createElementBlock as w, openBlock as r, Fragment as F, createVNode as v, withCtx as V, createTextVNode as j, toDisplayString as N, createCommentVNode as i, createBlock as u, renderList as S, unref as c, isRef as $, createElementVNode as L } from "vue";
2
2
  import C from "../ButtonV3.vue.js";
3
3
  import g from "../InputField.vue.js";
4
- import L from "../TextAreaV3.vue.js";
4
+ import D from "../TextAreaV3.vue.js";
5
5
  import O from "../Dropdown.vue.js";
6
- import { getNode as D } from "@formkit/core";
6
+ import "@formkit/core";
7
7
  import { getOptionalURIs as R } from "../../services/dpiV3_apis.js";
8
+ import { useFormValues as G } from "../../../composables/useDpiFormValues.js";
8
9
  /* empty css */
9
- const G = { class: "dpiV3_actionButtonWrap" }, _ = {
10
+ const M = { class: "dpiV3_actionButtonWrap" }, le = {
10
11
  __name: "AdditionalsSubModal",
11
12
  props: {
12
13
  context: Object,
@@ -14,8 +15,8 @@ const G = { class: "dpiV3_actionButtonWrap" }, _ = {
14
15
  },
15
16
  setup(l, { emit: E }) {
16
17
  const P = E;
17
- let m = k([{}]), h = k([]), o = k(), H = A().appContext.app.config.globalProperties.$env;
18
- const W = l, B = () => {
18
+ let m = k([{}]), h = k([]), o = k(), H = U().appContext.app.config.globalProperties.$env;
19
+ const { formValues: W } = G(), B = l, z = () => {
19
20
  P("goBack", !1);
20
21
  }, s = (n, t, f) => {
21
22
  console.log("######## Ident", t, n, f), n.target.value != "" && (m.value[0][t] = n.target.value), t === "@id" && n.target.value != "" && (m.value[0][t] = "https://" + n.target.value);
@@ -49,15 +50,15 @@ const G = { class: "dpiV3_actionButtonWrap" }, _ = {
49
50
  console.log(d);
50
51
  }
51
52
  }
52
- }, z = () => {
53
- D("Additionals").value[W.item.name] = m.value, P("sst", "close"), console.log(m);
53
+ }, A = () => {
54
+ W.value.Additionals[B.item.name] = m.value, P("sst", "close"), console.log(m);
54
55
  };
55
56
  return (n, t) => {
56
57
  const f = x("additionalText"), p = x("itemWrapperAdditionals"), d = x("activeItem"), I = x("interaction");
57
58
  return r(), w(F, null, [
58
59
  v(f, null, {
59
60
  default: V(() => [
60
- N(U(l.item.help), 1)
61
+ j(N(l.item.help), 1)
61
62
  ]),
62
63
  _: 1
63
64
  }),
@@ -143,7 +144,7 @@ const G = { class: "dpiV3_actionButtonWrap" }, _ = {
143
144
  data: c(h),
144
145
  autocomplete: !0
145
146
  }, null, 8, ["onInput", "modelValue", "inputFieldProps", "data"])) : i("", !0),
146
- e.$formkit === "textarea" ? (r(), u(L, {
147
+ e.$formkit === "textarea" ? (r(), u(D, {
147
148
  key: 4,
148
149
  label: e.label,
149
150
  placeholder: l.item.placeholder,
@@ -221,16 +222,16 @@ const G = { class: "dpiV3_actionButtonWrap" }, _ = {
221
222
  }),
222
223
  v(I, { class: "dpiV3_interactionWrap" }, {
223
224
  default: V(() => [
224
- j("div", G, [
225
+ L("div", M, [
225
226
  v(C, {
226
- onClick: B,
227
+ onClick: z,
227
228
  buttonText: "Zurück",
228
229
  size: "large",
229
230
  iconStart: "CaretLeft",
230
231
  variant: "tertiary"
231
232
  }),
232
233
  v(C, {
233
- onClick: z,
234
+ onClick: A,
234
235
  buttonText: "Speichern",
235
236
  size: "large"
236
237
  })
@@ -243,5 +244,5 @@ const G = { class: "dpiV3_actionButtonWrap" }, _ = {
243
244
  }
244
245
  };
245
246
  export {
246
- _ as default
247
+ le as default
247
248
  };
@@ -1,28 +1,69 @@
1
- import { ref as p, getCurrentInstance as u, resolveComponent as d, createElementBlock as m, openBlock as f, createVNode as n, withCtx as r, unref as t } from "vue";
2
- import b from "../Dropdown.vue.js";
3
- import c from "../../../components/DistributionSimplePage.vue.js";
4
- import { getNode as l } from "@formkit/core";
5
- import g from "../InputField.vue.js";
6
- const D = { class: "dpiV3_innerRapModalWrapper" }, k = {
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";
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 = {
7
9
  __name: "DistributionModal",
8
10
  props: {
9
11
  context: Object,
10
12
  newValues: Object
11
13
  },
12
- setup(s) {
13
- return p([]), u().appContext.app.config.globalProperties.$env, (i, e) => {
14
- const a = d("innerRapModalItem");
15
- return f(), m("div", D, [
16
- n(a, null, {
17
- default: r(() => [
18
- n(b, {
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([
21
+ { isValid: "unset", "dcterms:license": "", title: "", uri: "" }
22
+ ]), L = (e, l, t) => {
23
+ f(e, l, t);
24
+ }, w = (e) => {
25
+ 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;
33
+ };
34
+ return D(s, (e) => {
35
+ console.log("##############");
36
+ let l = r.value.find(
37
+ (t) => t["@value"] === e
38
+ ).uri;
39
+ e !== void 0 && f(e, "dcterms:license", 1, l);
40
+ }), z(async () => {
41
+ const l = g().appContext.app.config.globalProperties.$env;
42
+ console.log("halloo?");
43
+ 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);
50
+ } catch (t) {
51
+ console.error("Failed to load licenses", t);
52
+ }
53
+ }), (e, l) => {
54
+ const t = C("innerRapModalItem");
55
+ return F(), x("div", R, [
56
+ d(t, null, {
57
+ default: V(() => [
58
+ d(B, {
19
59
  "onUpdate:modelValue": [
20
- e[0] || (e[0] = (o) => i.handleChangeLicenseVal(o, "label", 1)),
21
- e[1] || (e[1] = (o) => t(l)("DistributionSimple").value[Object.keys(t(l)("DistributionSimple").value)[1]][0].label = o)
60
+ l[0] || (l[0] = (n) => L(n, "dcterms:license", 1)),
61
+ l[1] || (l[1] = (n) => M(s) ? s.value = n : s = n)
22
62
  ],
23
63
  dropdownWidth: "large",
64
+ onInput: w,
24
65
  type: "inputField",
25
- modelValue: t(l)("DistributionSimple").value[Object.keys(t(l)("DistributionSimple").value)[1]][0].label,
66
+ modelValue: m(s),
26
67
  inputFieldProps: {
27
68
  addOnText: !1,
28
69
  initialHintText: !1,
@@ -33,32 +74,32 @@ const D = { class: "dpiV3_innerRapModalWrapper" }, k = {
33
74
  dropdown_dpiV3: !0,
34
75
  placeholder: "Lizenz wählen...",
35
76
  inputFieldSize: "large",
36
- modelValue: "",
77
+ modelValue: m(s),
37
78
  defaultInput: !0,
38
79
  showError: !1
39
80
  },
40
- data: i.licenseOptions,
41
- onDeleteButtonClicked: i.deleteModifiedField,
81
+ data: m(r),
82
+ onDeleteButtonClicked: e.deleteModifiedField,
42
83
  class: "gap5BottomAsMargin"
43
- }, null, 8, ["modelValue", "data", "onDeleteButtonClicked"]),
44
- n(g, {
45
- label: i.$t("message.metadata.publisher"),
46
- modelValue: t(l)("DistributionSimple").value[Object.keys(t(l)("DistributionSimple").value)[1]][0].title,
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"),
47
90
  infoIcon: !1,
48
91
  preIcon: !1,
49
92
  initialHintText: !0,
50
93
  "supporting-hint-message": "Dieser Namensnennungstext stellt sicher, dass die Lizenzbedingungen eingehalten werden.",
51
- showEndIcon: !1,
52
- onInput: e[2] || (e[2] = () => {
53
- })
54
- }, null, 8, ["label", "modelValue"])
94
+ showEndIcon: !1
95
+ }, null, 8, ["modelValue", "label"])
55
96
  ]),
56
97
  _: 1
57
98
  }),
58
- n(a, null, {
59
- default: r(() => [
60
- n(c, {
61
- context: s.context,
99
+ d(t, null, {
100
+ default: V(() => [
101
+ d(P, {
102
+ context: b.context,
62
103
  inRap: !0
63
104
  }, null, 8, ["context"])
64
105
  ]),
@@ -69,5 +110,5 @@ const D = { class: "dpiV3_innerRapModalWrapper" }, k = {
69
110
  }
70
111
  };
71
112
  export {
72
- k as default
113
+ W as default
73
114
  };
@@ -1,43 +1,45 @@
1
- import { ref as s, getCurrentInstance as _, onMounted as b, createElementBlock as n, openBlock as o, Fragment as y, renderList as h, unref as c, createBlock as m } from "vue";
2
- import g from "../Chip.vue.js";
3
- import { getDatasetCategories as C } from "../../services/dpiV3_apis.js";
4
- import { getNode as r } from "@formkit/core";
1
+ import { ref as s, getCurrentInstance as _, onMounted as m, createElementBlock as n, openBlock as r, Fragment as y, renderList as h, createBlock as g } from "vue";
2
+ import "@formkit/core";
3
+ import { getDatasetCategories as x } from "../../services/dpiV3_apis.js";
4
+ import C from "../Chip.vue.js";
5
+ import { useFormValues as k } from "../../../composables/useDpiFormValues.js";
5
6
  /* empty css */
6
- import k from "../../../../_virtual/_plugin-vue_export-helper.js";
7
- const x = { class: "dpiV3_fChipWrap" }, I = {
7
+ import I from "../../../../_virtual/_plugin-vue_export-helper.js";
8
+ const D = { class: "dpiV3_fChipWrap" }, F = {
8
9
  __name: "FindabilityChips",
9
10
  props: {
10
11
  context: Object
11
12
  },
12
- setup(D) {
13
- let i = s([]), d = _().appContext.app.config.globalProperties.$env, l = s(r("Discoverability").value[Object.keys(r("Discoverability").value)[0]]), p = (t) => {
13
+ setup(c) {
14
+ const u = c, i = s([]), p = _().appContext.app.config.globalProperties.$env, a = s(u.context.attrs["final-values"].Discoverability.discoverabilityPage), d = (t) => {
14
15
  try {
15
- return l.value.find((a) => a.id === t.id);
16
+ return a.value.find((l) => l.id === t.id);
16
17
  } catch {
17
18
  }
18
- };
19
- const u = async () => {
19
+ }, { formValues: o } = k();
20
+ async function f() {
20
21
  try {
21
- i.value = await C(d.api.baseUrl), i.value.sort((t, a) => t.pref_label.de.localeCompare(a.pref_label.de));
22
+ i.value = await x(p.api.baseUrl), i.value.sort((t, l) => t.pref_label.de.localeCompare(l.pref_label.de));
22
23
  } catch (t) {
23
24
  console.log(t);
24
25
  }
25
- }, f = (t) => {
26
- l.value.find((e) => e.id === t.id) ? l.value = l.value.filter((e) => e.id !== t.id) : l.value.push({ id: t.id, uri: t.resource, label: t.pref_label.de }), l.value.length > 1 ? l.value.find((e) => e.isValid = !0) : l.value.find((e) => e.isValid = !1), r("Discoverability").value[Object.keys(r("Discoverability").value)[0]] = l, console.log(l);
27
- };
28
- return b(() => {
29
- u();
30
- }), (t, a) => (o(), n("div", x, [
31
- (o(!0), n(y, null, h(c(i), (e, v) => (o(), m(g, {
32
- key: v,
26
+ }
27
+ function v(t) {
28
+ a.value.find((e) => e.id === t.id) ? a.value = a.value.filter((e) => e.id !== t.id) : a.value.push({ id: t.id, uri: t.resource, label: t.pref_label.de }), a.value.length > 1 ? a.value.find((e) => e.isValid = !0) : a.value.find((e) => e.isValid = !1), o.value.Discoverability[Object.keys(o.value.Discoverability)[0]] = a, console.log(a);
29
+ }
30
+ return m(() => {
31
+ f();
32
+ }), (t, l) => (r(), n("div", D, [
33
+ (r(!0), n(y, null, h(i.value, (e, b) => (r(), g(C, {
34
+ key: b,
33
35
  text: e.pref_label.de,
34
36
  data: { "@value": e.value, URI: e.URI },
35
- setup: { "@type": "select", "@inTable": !1, "@findability": !0, "@selected": c(p)(e) },
36
- onClick: (E) => f(e)
37
+ setup: { "@type": "select", "@inTable": !1, "@findability": !0, "@selected": d(e) },
38
+ onClick: (V) => v(e)
37
39
  }, null, 8, ["text", "data", "setup", "onClick"]))), 128))
38
40
  ]));
39
41
  }
40
- }, V = /* @__PURE__ */ k(I, [["__scopeId", "data-v-3cc20246"]]);
42
+ }, P = /* @__PURE__ */ I(F, [["__scopeId", "data-v-9f64c670"]]);
41
43
  export {
42
- V as default
44
+ P as default
43
45
  };
@@ -1,23 +1,24 @@
1
- import { ref as o, createElementBlock as v, openBlock as b, Fragment as m, createElementVNode as s, createVNode as n, unref as d, toDisplayString as h, getCurrentInstance as V } from "vue";
2
- import w from "../SwitchV3.vue.js";
3
- import _ from "../Dropdown.vue.js";
4
- import { getHvdCategories as y } from "../../services/dpiV3_apis.js";
5
- import { getNode as S } from "@formkit/core";
1
+ import { ref as o, createElementBlock as g, openBlock as b, Fragment as h, createElementVNode as s, createVNode as n, unref as d, toDisplayString as V, getCurrentInstance as w } from "vue";
2
+ import _ from "../SwitchV3.vue.js";
3
+ import y from "../Dropdown.vue.js";
4
+ import { getHvdCategories as S } from "../../services/dpiV3_apis.js";
5
+ import "@formkit/core";
6
+ import { useFormValues as C } from "../../../composables/useDpiFormValues.js";
6
7
  /* empty css */
7
- const C = { class: "dpiV3_findabilitySwitchWrapper" }, D = { class: "dpiV3_Switch_Label copy-large-semi-bold" }, E = {
8
+ const D = { class: "dpiV3_findabilitySwitchWrapper" }, k = { class: "dpiV3_Switch_Label copy-large-semi-bold" }, W = {
8
9
  __name: "HVDSwitch",
9
10
  props: {
10
11
  context: Object
11
12
  },
12
- setup(k) {
13
- const l = o(!1);
13
+ setup(H) {
14
+ const { formValues: c } = C(), l = o(!1);
14
15
  let i = o([{ isValid: !0 }]);
15
- const r = o([]), c = o([]), p = (e) => {
16
+ const r = o([]), p = o([]), u = (e) => {
16
17
  i.value[0].isValid = !1, l.value = !e, console.log(l);
17
- }, u = async () => {
18
+ }, f = async () => {
18
19
  try {
19
- const e = V().appContext.app.config.globalProperties.$env, t = await y(e.api.baseUrl);
20
- c.value = t, r.value = t.map((a) => ({
20
+ const e = w().appContext.app.config.globalProperties.$env, t = await S(e.api.baseUrl);
21
+ p.value = t, r.value = t.map((a) => ({
21
22
  label: a.pref_label.de,
22
23
  uri: a.resource,
23
24
  "@value": a.pref_label.de,
@@ -27,21 +28,21 @@ const C = { class: "dpiV3_findabilitySwitchWrapper" }, D = { class: "dpiV3_Switc
27
28
  } catch (e) {
28
29
  console.error("Error in component:", e), error.value = e;
29
30
  }
30
- }, f = (e) => {
31
- const t = r.value.find((g) => g.label === e.target.innerHTML), a = S("Discoverability").value;
31
+ }, m = (e) => {
32
+ const t = r.value.find((v) => v.label === e.target.innerHTML), a = c.value.Discoverability;
32
33
  a[Object.keys(a)[1]] = [{ isValid: !0, label: t.label, uri: t.uri }];
33
34
  };
34
- return u(), (e, t) => (b(), v(m, null, [
35
- s("div", C, [
36
- n(w, {
37
- onSwitchToggled: t[0] || (t[0] = (a) => d(i)[0].isValid === !0 ? p(l.value) : (d(i)[0].isValid = !0, l.value = !l.value)),
35
+ return f(), (e, t) => (b(), g(h, null, [
36
+ s("div", D, [
37
+ n(_, {
38
+ onSwitchToggled: t[0] || (t[0] = (a) => d(i)[0].isValid === !0 ? u(l.value) : (d(i)[0].isValid = !0, l.value = !l.value)),
38
39
  hasIcon: !1,
39
40
  defaultChecked: !1,
40
41
  disabled: !1
41
42
  }),
42
- s("div", D, h(e.$t("message.dataupload.datasets.hvdPage.switch-label")), 1)
43
+ s("div", k, V(e.$t("message.dataupload.datasets.hvdPage.switch-label")), 1)
43
44
  ]),
44
- n(_, {
45
+ n(y, {
45
46
  dropdownWidth: "large",
46
47
  isDisabled: !l.value,
47
48
  type: "inputField",
@@ -58,11 +59,11 @@ const C = { class: "dpiV3_findabilitySwitchWrapper" }, D = { class: "dpiV3_Switc
58
59
  inputFieldSize: "large"
59
60
  },
60
61
  data: r.value,
61
- onClick: t[1] || (t[1] = (a) => f(a))
62
+ onClick: t[1] || (t[1] = (a) => m(a))
62
63
  }, null, 8, ["isDisabled", "inputFieldProps", "data"])
63
64
  ], 64));
64
65
  }
65
66
  };
66
67
  export {
67
- E as default
68
+ W as default
68
69
  };