@piveau/dpi 0.2.0-alpha.58 → 0.2.0-alpha.59

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,17 +1,17 @@
1
- import { defineComponent as L, mergeModels as R, useModel as z, ref as m, computed as b, watch as $, createElementBlock as p, openBlock as n, createCommentVNode as h, createBlock as c, Fragment as G, renderList as I, withDirectives as M, createElementVNode as y, vModelCheckbox as N, withCtx as _, createVNode as v } from "vue";
2
- import E from "../HappyFlowComponents/ui/Autocomplete/AutocompleteVocab.vue.js";
3
- import F from "../HappyFlowComponents/ui/ButtonV3.vue.js";
1
+ import { defineComponent as R, mergeModels as $, useModel as z, ref as v, computed as m, watch as G, createElementBlock as c, openBlock as n, createCommentVNode as b, createBlock as r, Fragment as I, renderList as M, withDirectives as N, createElementVNode as h, vModelCheckbox as E, withCtx as w, createVNode as y } from "vue";
2
+ import F from "../HappyFlowComponents/ui/Autocomplete/AutocompleteVocab.vue.js";
3
+ import T from "../HappyFlowComponents/ui/ButtonV3.vue.js";
4
4
  import V from "../HappyFlowComponents/ui/Chip.vue.js";
5
- import T from "../HappyFlowComponents/ui/InputField.vue.js";
6
- import W from "../HappyFlowComponents/ui/ListBox/Listbox.vue.js";
7
- import D from "../HappyFlowComponents/ui/ProcessSteps/GetResource.vue.js";
8
- import K from "../HappyFlowComponents/ui/ProcessSteps/ProcessStepInputCard.vue.js";
9
- const O = { class: "step-section" }, P = { key: 0 }, j = ["id", "value", "disabled"], q = {
5
+ import W from "../HappyFlowComponents/ui/InputField.vue.js";
6
+ import D from "../HappyFlowComponents/ui/ListBox/Listbox.vue.js";
7
+ import K from "../HappyFlowComponents/ui/ProcessSteps/GetResource.vue.js";
8
+ import O from "../HappyFlowComponents/ui/ProcessSteps/ProcessStepInputCard.vue.js";
9
+ const P = { class: "step-section" }, j = { key: 0 }, q = ["id", "value", "disabled"], H = {
10
10
  key: 2,
11
11
  class: "step-section-actions dpiV3_tempAddMore"
12
- }, le = /* @__PURE__ */ L({
12
+ }, te = /* @__PURE__ */ R({
13
13
  __name: "Spatial",
14
- props: /* @__PURE__ */ R({
14
+ props: /* @__PURE__ */ $({
15
15
  baseUrl: { default: "https://twin.bydata.de/api/hub/search" },
16
16
  options: { default: () => [
17
17
  { id: "continent", name: "Kontinent" },
@@ -25,7 +25,7 @@ const O = { class: "step-section" }, P = { key: 0 }, j = ["id", "value", "disabl
25
25
  }),
26
26
  emits: ["update:modelValue"],
27
27
  setup(g) {
28
- const u = g, s = z(g, "modelValue"), r = m(u.options.find((l) => l.id === "place") || u.options[0]), d = m(void 0), i = m(""), f = b(() => {
28
+ const u = g, s = z(g, "modelValue"), p = v(u.options.find((l) => l.id === "place") || u.options[0]), d = v(void 0), i = v(""), f = m(() => {
29
29
  try {
30
30
  if (!i.value)
31
31
  return !1;
@@ -34,29 +34,29 @@ const O = { class: "step-section" }, P = { key: 0 }, j = ["id", "value", "disabl
34
34
  } catch {
35
35
  return !1;
36
36
  }
37
- }), w = b(() => {
37
+ }), A = m(() => {
38
38
  var l;
39
- return ((l = r.value) == null ? void 0 : l.id) || "";
39
+ return ((l = p.value) == null ? void 0 : l.id) || "";
40
+ }), k = v(0);
41
+ G(p, (l) => {
42
+ l && (d.value = void 0), k.value++;
40
43
  });
41
- $(r, (l) => {
42
- l && (d.value = void 0);
43
- });
44
- function A(l) {
44
+ function B(l) {
45
45
  return l.startsWith("http://publications.europa.eu/resource/authority");
46
46
  }
47
- const B = b(() => f.value || !!d.value);
48
- function C() {
47
+ const C = m(() => f.value || !!d.value);
48
+ function L() {
49
49
  var e;
50
50
  const l = (e = i.value) == null ? void 0 : e.trim(), t = f.value, a = d.value, o = t ? l : a;
51
51
  o && (s.value = [o], i.value = "", d.value = void 0);
52
52
  }
53
- return (l, t) => (n(), p("section", O, [
54
- s.value.length > 0 ? (n(), p("div", P, [
55
- (n(!0), p(G, null, I(s.value, (a, o) => (n(), p("div", {
53
+ return (l, t) => (n(), c("section", P, [
54
+ s.value.length > 0 ? (n(), c("div", j, [
55
+ (n(!0), c(I, null, M(s.value, (a, o) => (n(), c("div", {
56
56
  key: `spatial-${o}`,
57
57
  class: "functionalities"
58
58
  }, [
59
- M(y("input", {
59
+ N(h("input", {
60
60
  id: `spatial-${o}`,
61
61
  "onUpdate:modelValue": t[0] || (t[0] = (e) => s.value = e),
62
62
  hidden: "",
@@ -64,33 +64,33 @@ const O = { class: "step-section" }, P = { key: 0 }, j = ["id", "value", "disabl
64
64
  name: "spatial",
65
65
  type: "checkbox",
66
66
  disabled: u.readonly
67
- }, null, 8, j), [
68
- [N, s.value]
67
+ }, null, 8, q), [
68
+ [E, s.value]
69
69
  ]),
70
- A(a) ? (n(), c(D, {
70
+ B(a) ? (n(), r(K, {
71
71
  key: 0,
72
72
  "base-url": u.baseUrl,
73
73
  vocabulary: a == null ? void 0 : a.split("/").slice(-2)[0],
74
74
  "resource-id": a,
75
75
  "setup-fn": (e) => e
76
76
  }, {
77
- default: _(({ result: e }) => {
78
- var k, U, x, S;
77
+ default: w(({ result: e }) => {
78
+ var U, x, S, _;
79
79
  return [
80
- l.readonly ? (n(), c(V, {
80
+ l.readonly ? (n(), r(V, {
81
81
  key: 1,
82
82
  as: "span",
83
83
  for: `spatial-${o}`,
84
- text: ((x = e == null ? void 0 : e.pref_label) == null ? void 0 : x.de) || ((S = e == null ? void 0 : e.pref_label) == null ? void 0 : S.en),
84
+ text: ((S = e == null ? void 0 : e.pref_label) == null ? void 0 : S.de) || ((_ = e == null ? void 0 : e.pref_label) == null ? void 0 : _.en),
85
85
  setup: {
86
86
  "@type": "static"
87
87
  },
88
88
  data: { "@value": a, URI: a }
89
- }, null, 8, ["for", "text", "data"])) : (n(), c(V, {
89
+ }, null, 8, ["for", "text", "data"])) : (n(), r(V, {
90
90
  key: 0,
91
91
  as: "label",
92
92
  for: `spatial-${o}`,
93
- text: ((k = e == null ? void 0 : e.pref_label) == null ? void 0 : k.de) || ((U = e == null ? void 0 : e.pref_label) == null ? void 0 : U.en),
93
+ text: ((U = e == null ? void 0 : e.pref_label) == null ? void 0 : U.de) || ((x = e == null ? void 0 : e.pref_label) == null ? void 0 : x.en),
94
94
  setup: {
95
95
  "@type": "select",
96
96
  "@icon": "suffix",
@@ -103,7 +103,7 @@ const O = { class: "step-section" }, P = { key: 0 }, j = ["id", "value", "disabl
103
103
  ];
104
104
  }),
105
105
  _: 2
106
- }, 1032, ["base-url", "vocabulary", "resource-id", "setup-fn"])) : (n(), c(V, {
106
+ }, 1032, ["base-url", "vocabulary", "resource-id", "setup-fn"])) : (n(), r(V, {
107
107
  key: 1,
108
108
  as: "label",
109
109
  for: `spatial-${o}`,
@@ -118,37 +118,39 @@ const O = { class: "step-section" }, P = { key: 0 }, j = ["id", "value", "disabl
118
118
  data: { "@value": a, URI: a }
119
119
  }, null, 8, ["for", "text", "data"]))
120
120
  ]))), 128))
121
- ])) : h("", !0),
122
- s.value.length === 0 ? (n(), c(K, {
121
+ ])) : b("", !0),
122
+ s.value.length === 0 ? (n(), r(O, {
123
123
  key: 1,
124
124
  class: "step-section",
125
125
  "no-delete": ""
126
126
  }, {
127
- default: _(() => {
127
+ default: w(() => {
128
128
  var a;
129
129
  return [
130
- t[4] || (t[4] = y("h5", null, "Administrativer Bezug", -1)),
131
- v(W, {
132
- modelValue: r.value,
133
- "onUpdate:modelValue": t[1] || (t[1] = (o) => r.value = o),
130
+ t[4] || (t[4] = h("h5", null, "Administrativer Bezug", -1)),
131
+ y(D, {
132
+ modelValue: p.value,
133
+ "onUpdate:modelValue": t[1] || (t[1] = (o) => p.value = o),
134
134
  options: u.options,
135
135
  label: "Gebiet der Abdeckung",
136
136
  placeholder: "Wählen Sie das Gebiet der Abdeckung."
137
137
  }, null, 8, ["modelValue", "options"]),
138
- v(E, {
138
+ (n(), r(F, {
139
+ key: `spatial-${k.value}`,
139
140
  modelValue: d.value,
140
141
  "onUpdate:modelValue": t[2] || (t[2] = (o) => d.value = o),
141
142
  by: "vocabulary",
142
- label: (a = r.value) == null ? void 0 : a.name,
143
+ label: (a = p.value) == null ? void 0 : a.name,
143
144
  "base-url": u.baseUrl,
144
- vocabulary: w.value,
145
+ vocabulary: A.value,
145
146
  placeholder: "Legen Sie die räumliche Abdeckung fest.",
146
147
  name: "spatial",
147
148
  "search-icon": "",
148
- limit: 700
149
- }, null, 8, ["modelValue", "label", "base-url", "vocabulary"]),
150
- t[5] || (t[5] = y("h5", null, "oder Geodatensatz", -1)),
151
- v(T, {
149
+ limit: 700,
150
+ "input-as-button": !1
151
+ }, null, 8, ["modelValue", "label", "base-url", "vocabulary"])),
152
+ t[5] || (t[5] = h("h5", null, "oder Geodatensatz", -1)),
153
+ y(W, {
152
154
  modelValue: i.value,
153
155
  "onUpdate:modelValue": t[3] || (t[3] = (o) => i.value = o),
154
156
  "add-on-text": !1,
@@ -167,20 +169,20 @@ const O = { class: "step-section" }, P = { key: 0 }, j = ["id", "value", "disabl
167
169
  }),
168
170
  _: 1,
169
171
  __: [4, 5]
170
- })) : h("", !0),
171
- s.value.length === 0 ? (n(), p("div", q, [
172
- v(F, {
172
+ })) : b("", !0),
173
+ s.value.length === 0 ? (n(), c("div", H, [
174
+ y(T, {
173
175
  "button-text": "Räumliche Abdeckung hinzufügen",
174
176
  size: "medium",
175
177
  variant: "tertiary",
176
178
  "icon-start": "plus",
177
- disabled: !B.value,
178
- onClick: C
179
+ disabled: !C.value,
180
+ onClick: L
179
181
  }, null, 8, ["disabled"])
180
- ])) : h("", !0)
182
+ ])) : b("", !0)
181
183
  ]));
182
184
  }
183
185
  });
184
186
  export {
185
- le as default
187
+ te as default
186
188
  };