@piveau/dpi 0.2.0-alpha.49 → 0.2.0-alpha.50

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,7 +1,7 @@
1
1
  import o from "./AutocompleteVocab.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../../../../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-35dda4e0"]]);
4
+ const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-88c43365"]]);
5
5
  export {
6
- p as default
6
+ r as default
7
7
  };
@@ -1,12 +1,12 @@
1
- import { defineComponent as W, mergeModels as P, computed as t, ref as R, toRef as X, useModel as Y, watch as k, createBlock as B, openBlock as M, unref as v, createSlots as Z, withCtx as A, createElementVNode as w, createTextVNode as ee, createCommentVNode as re, toDisplayString as oe, renderSlot as te } from "vue";
1
+ import { defineComponent as W, mergeModels as F, computed as t, ref as P, toRef as X, useModel as Y, watch as R, createBlock as k, openBlock as B, unref as v, createSlots as Z, withCtx as M, createElementVNode as w, createTextVNode as ee, createCommentVNode as re, toDisplayString as oe, renderSlot as te } from "vue";
2
2
  import { PhSpinner as le } from "@phosphor-icons/vue";
3
3
  import { defineHubSearch as ae } from "@piveau/sdk-vue";
4
- import { useDebounce as p } from "@vueuse/core";
4
+ import { useDebounce as b } from "@vueuse/core";
5
5
  import se from "zod";
6
6
  import ue from "./Autocomplete.vue.js";
7
- const ne = { class: "autocomplete-vocab__label" }, be = /* @__PURE__ */ W({
7
+ const ne = { class: "autocomplete-vocab__label" }, pe = /* @__PURE__ */ W({
8
8
  __name: "AutocompleteVocab",
9
- props: /* @__PURE__ */ P({
9
+ props: /* @__PURE__ */ F({
10
10
  by: { default: "" },
11
11
  baseUrl: { default: "https://twin.bydata.de/api/hub/search" },
12
12
  vocabulary: {},
@@ -19,32 +19,32 @@ const ne = { class: "autocomplete-vocab__label" }, be = /* @__PURE__ */ W({
19
19
  disabled: { type: Boolean, default: !1 },
20
20
  isAutocompleteDisabled: { type: Boolean, default: !1 },
21
21
  postProcessFn: {},
22
- sort: { default: "title.de+asc,name.de+asc" },
22
+ sort: { default: "title.de+asc,name.de+asc,pref_label.de+asc,pref_label.en+asc,alt_label.de+asc,alt_label.en+asc" },
23
23
  authToken: { default: "" }
24
24
  }, {
25
25
  modelValue: { default: "" },
26
26
  modelModifiers: {}
27
27
  }),
28
- emits: /* @__PURE__ */ P(["select"], ["update:modelValue"]),
29
- setup(b, { emit: D }) {
30
- const r = b, I = D, u = t(() => !!r.vocabulary), m = t(() => r.by || u.value ? "vocabulary" : "resource"), T = t(() => r.resource === "dataset" ? "dataset" : u.value ? "vocabulary" : m.value), U = t(() => r.resource === "dataset" ? "datasets" : u.value ? "vocabularies" : m.value === "resource" ? `resources/${r.resource}` : "vocabularies"), _ = t(() => !r.isAutocompleteDisabled && !!(r.resource || r.vocabulary)), { useSearch: $, useResource: E } = ae({
28
+ emits: /* @__PURE__ */ F(["select"], ["update:modelValue"]),
29
+ setup(p, { emit: A }) {
30
+ const r = p, D = A, u = t(() => !!r.vocabulary), m = t(() => r.by || u.value ? "vocabulary" : "resource"), I = t(() => r.resource === "dataset" ? "dataset" : u.value ? "vocabulary" : m.value), T = t(() => r.resource === "dataset" ? "datasets" : u.value ? "vocabularies" : m.value === "resource" ? `resources/${r.resource}` : "vocabularies"), U = t(() => !r.isAutocompleteDisabled && !!(r.resource || r.vocabulary)), { useSearch: $, useResource: E } = ae({
31
31
  baseUrl: r.baseUrl,
32
- index: T.value,
33
- indexDetails: U.value,
32
+ index: I.value,
33
+ indexDetails: T.value,
34
34
  schema: se.any()
35
35
  }, (e) => {
36
- var d, V, F;
37
- const o = (d = r.setupFn) == null ? void 0 : d.call(r, e), a = String((o == null ? void 0 : o.id) || (e == null ? void 0 : e.resource) || ""), n = String((o == null ? void 0 : o.name) || ((V = e == null ? void 0 : e.pref_label) == null ? void 0 : V.de) || ((F = e == null ? void 0 : e.pref_label) == null ? void 0 : F.en) || "");
36
+ var d, V, _;
37
+ const o = (d = r.setupFn) == null ? void 0 : d.call(r, e), a = String((o == null ? void 0 : o.id) || (e == null ? void 0 : e.resource) || ""), n = String((o == null ? void 0 : o.name) || ((V = e == null ? void 0 : e.pref_label) == null ? void 0 : V.de) || ((_ = e == null ? void 0 : e.pref_label) == null ? void 0 : _.en) || "");
38
38
  return {
39
39
  ...o,
40
40
  id: a,
41
41
  name: n
42
42
  };
43
- }), f = R(""), L = p(f, 300), z = t(() => r.vocabulary), C = t(() => ({
43
+ }), f = P(""), L = b(f, 300), z = t(() => r.vocabulary), C = t(() => ({
44
44
  ...r.authToken && { Authorization: `Bearer ${r.authToken}` }
45
45
  })), { getSearchResultsEnhanced: N, isFetching: O } = $({
46
46
  queryOptions: {
47
- enabled: _
47
+ enabled: U
48
48
  },
49
49
  queryParams: {
50
50
  q: L,
@@ -63,7 +63,7 @@ const ne = { class: "autocomplete-vocab__label" }, be = /* @__PURE__ */ W({
63
63
  }), x = t(() => {
64
64
  let e = N.value || [];
65
65
  return r.postProcessFn && (e = r.postProcessFn(e)), e;
66
- }), l = Y(b, "modelValue"), y = t(() => !(!l.value || typeof l.value == "string")), j = t(() => typeof l.value == "string");
66
+ }), l = Y(p, "modelValue"), y = t(() => !(!l.value || typeof l.value == "string")), j = t(() => typeof l.value == "string");
67
67
  function i(e) {
68
68
  return String(e ?? "").trim();
69
69
  }
@@ -79,7 +79,7 @@ const ne = { class: "autocomplete-vocab__label" }, be = /* @__PURE__ */ W({
79
79
  queryOptions: {
80
80
  enabled: h
81
81
  }
82
- }), g = p(J, 350), K = p(O, 350), s = R(), S = t({
82
+ }), g = b(J, 350), K = b(O, 350), s = P(), S = t({
83
83
  get: () => {
84
84
  var a, n;
85
85
  const e = c.value;
@@ -100,11 +100,11 @@ const ne = { class: "autocomplete-vocab__label" }, be = /* @__PURE__ */ W({
100
100
  s.value = e, l.value = i(e.id);
101
101
  }
102
102
  });
103
- return k(G, (e, o) => {
103
+ return R(G, (e, o) => {
104
104
  e && (o && o.id === e.id || (s.value = e, y.value && (l.value = e), y.value || (l.value = i(e.id))));
105
- }, { immediate: !0 }), k(s, (e) => {
106
- e && I("select", e);
107
- }, { immediate: !0 }), (e, o) => (M(), B(ue, {
105
+ }, { immediate: !0 }), R(s, (e) => {
106
+ e && D("select", e);
107
+ }, { immediate: !0 }), (e, o) => (B(), k(ue, {
108
108
  modelValue: S.value,
109
109
  "onUpdate:modelValue": o[0] || (o[0] = (a) => S.value = a),
110
110
  query: f.value,
@@ -117,10 +117,10 @@ const ne = { class: "autocomplete-vocab__label" }, be = /* @__PURE__ */ W({
117
117
  disabled: v(g) || r.disabled,
118
118
  loading: v(K)
119
119
  }, Z({
120
- label: A(() => [
120
+ label: M(() => [
121
121
  w("div", ne, [
122
122
  ee(oe(e.label) + " ", 1),
123
- v(g) ? (M(), B(v(le), {
123
+ v(g) ? (B(), k(v(le), {
124
124
  key: 0,
125
125
  class: "animate-spin"
126
126
  })) : re("", !0)
@@ -130,7 +130,7 @@ const ne = { class: "autocomplete-vocab__label" }, be = /* @__PURE__ */ W({
130
130
  }, [
131
131
  e.$slots.option ? {
132
132
  name: "option",
133
- fn: A(({ option: a, active: n, selected: q, disabled: d }) => [
133
+ fn: M(({ option: a, active: n, selected: q, disabled: d }) => [
134
134
  te(e.$slots, "option", {
135
135
  option: a,
136
136
  active: n,
@@ -144,5 +144,5 @@ const ne = { class: "autocomplete-vocab__label" }, be = /* @__PURE__ */ W({
144
144
  }
145
145
  });
146
146
  export {
147
- be as default
147
+ pe as default
148
148
  };
@@ -1,9 +1,9 @@
1
- import { defineComponent as f, ref as n, getCurrentInstance as v, computed as g, resolveComponent as V, createElementBlock as R, openBlock as _, createVNode as i, withCtx as c, createCommentVNode as C, createElementVNode as x } from "vue";
2
- import A from "../../../components/TempResPageInModal.vue.js";
1
+ import { defineComponent as v, ref as d, getCurrentInstance as g, computed as V, resolveComponent as R, createElementBlock as _, openBlock as C, createVNode as i, withCtx as c, createCommentVNode as x, createElementVNode as b } from "vue";
3
2
  import "@formkit/core";
4
- import { useFormValues as I } from "../../../composables/useDpiFormValues.js";
5
- import b from "../../../components/Spatial.vue.js";
6
- const y = { class: "dpiV3_innerRapModalWrapper" }, D = /* @__PURE__ */ f({
3
+ import A from "../../../components/Spatial.vue.js";
4
+ import I from "../../../components/TempResPageInModal.vue.js";
5
+ import { useFormValues as y } from "../../../composables/useDpiFormValues.js";
6
+ const O = { class: "dpiV3_innerRapModalWrapper" }, D = /* @__PURE__ */ v({
7
7
  __name: "CoverageModal",
8
8
  props: {
9
9
  context: Object,
@@ -11,9 +11,9 @@ const y = { class: "dpiV3_innerRapModalWrapper" }, D = /* @__PURE__ */ f({
11
11
  },
12
12
  setup(u, { expose: m }) {
13
13
  var s, p;
14
- const d = n(null);
15
- n([]), v().appContext.app.config.globalProperties.$env;
16
- const { formValues: t } = I(), r = g({
14
+ const n = d(null);
15
+ d([]), g().appContext.app.config.globalProperties.$env;
16
+ const { formValues: t } = y(), r = V({
17
17
  get() {
18
18
  var l, e, o;
19
19
  return ((o = (e = (l = t.value.Additionals) == null ? void 0 : l["dct:spatial"]) == null ? void 0 : e.filter((a) => !(a.isValid && Object.keys(a).length === 1))) == null ? void 0 : o.map((a) => a["@id"])) || [];
@@ -24,7 +24,7 @@ const y = { class: "dpiV3_innerRapModalWrapper" }, D = /* @__PURE__ */ f({
24
24
  ];
25
25
  }
26
26
  });
27
- return ((p = (s = t.value.Covering) == null ? void 0 : s["dcat:temporalResolution"]) == null ? void 0 : p["dct:temporal"]) === void 0 && (t.value.Covering["dcat:temporalResolution"] = {
27
+ ((p = (s = t.value.Covering) == null ? void 0 : s["dcat:temporalResolution"]) == null ? void 0 : p["dct:temporal"]) === void 0 && (t.value.Covering["dcat:temporalResolution"] = {
28
28
  isValid: !0,
29
29
  type: "dct:PeriodOfTime",
30
30
  "dct:temporal": [
@@ -34,7 +34,7 @@ const y = { class: "dpiV3_innerRapModalWrapper" }, D = /* @__PURE__ */ f({
34
34
  "dcat:endDate": ""
35
35
  }
36
36
  ]
37
- }), n(), n({
37
+ }), d(), d({
38
38
  "dcatde:politicalGeocodingURI": [
39
39
  {
40
40
  isValid: !0,
@@ -57,16 +57,20 @@ const y = { class: "dpiV3_innerRapModalWrapper" }, D = /* @__PURE__ */ f({
57
57
  ]
58
58
  }
59
59
  ]
60
- }), console.log(t), console.log({}), m({
61
- validateAllItems: () => d.value && d.value.validateAllItems ? d.value.validateAllItems() : !1
60
+ }), console.log(t), console.log({});
61
+ function f() {
62
+ return n.value && n.value.validateAllItems ? n.value.validateAllItems() : !1;
63
+ }
64
+ return m({
65
+ validateAllItems: f
62
66
  }), (l, e) => {
63
- const o = V("innerRapModalItem");
64
- return _(), R("div", y, [
67
+ const o = R("innerRapModalItem");
68
+ return C(), _("div", O, [
65
69
  i(o, null, {
66
70
  default: c(() => [
67
- C("", !0),
68
- e[2] || (e[2] = x("div", { class: "copy-large-regular" }, " Räumliche Abdeckung ", -1)),
69
- i(b, {
71
+ x("", !0),
72
+ e[2] || (e[2] = b("div", { class: "copy-large-regular" }, " Räumliche Abdeckung (optional) ", -1)),
73
+ i(A, {
70
74
  modelValue: r.value,
71
75
  "onUpdate:modelValue": e[1] || (e[1] = (a) => r.value = a)
72
76
  }, null, 8, ["modelValue"])
@@ -76,11 +80,11 @@ const y = { class: "dpiV3_innerRapModalWrapper" }, D = /* @__PURE__ */ f({
76
80
  }),
77
81
  i(o, null, {
78
82
  default: c(() => [
79
- i(A, {
83
+ i(I, {
80
84
  ref_key: "tempResPageRef",
81
- ref: d,
85
+ ref: n,
82
86
  context: u.context,
83
- inRap: !0,
87
+ "in-rap": !0,
84
88
  class: "dpiV3_tempresCard"
85
89
  }, null, 8, ["context"])
86
90
  ]),