@piveau/dpi 0.1.0-beta.76 → 0.1.0-beta.79

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,4 +1,4 @@
1
- import { ref as v, computed as c, watch as f, createElementBlock as o, openBlock as s, createElementVNode as r, createCommentVNode as b, unref as u, createTextVNode as _, createVNode as h, withCtx as B, createStaticVNode as L, Fragment as D, renderList as y, createBlock as k } from "vue";
1
+ import { ref as v, computed as c, watch as f, createElementBlock as o, openBlock as s, createElementVNode as r, createCommentVNode as _, unref as u, createTextVNode as h, createVNode as b, withCtx as B, createStaticVNode as L, Fragment as D, renderList as y, createBlock as k } from "vue";
2
2
  import { useAsyncState as N, useDebounce as U } from "@vueuse/core";
3
3
  import z from "axios";
4
4
  import "jquery";
@@ -33,14 +33,14 @@ const F = { class: "dpiV3_dpiHome V3-typography" }, K = { class: "dpiV3_homeHead
33
33
  message: "",
34
34
  confirm: () => null
35
35
  });
36
- const n = c(() => l.getters["auth/getUserDrafts"].sort((a, t) => (a.id ?? "").localeCompare(t.id ?? "", "de", { sensitivity: "base", numeric: !0 })));
37
- console.log(n);
36
+ const d = c(() => l.getters["auth/getUserDrafts"].sort((a, t) => (a.title.de ?? "").localeCompare(t.title.de ?? "", "de", { sensitivity: "base", numeric: !0 })));
37
+ console.log(d);
38
38
  const I = c(() => l.getters["auth/getUserData"]);
39
39
  c(() => I.value.rtpToken);
40
40
  const S = (a) => l.dispatch("snackbar/showSnackbar", a);
41
41
  async function w(a) {
42
42
  const t = a.map((i) => z.get(`${x.api.baseUrl}search?facets={%22catalog%22:[%22${i}%22]}&filters=dataset&includes=title,modified,id,description,catalog&limit=1000`));
43
- return (await Promise.all(t)).flatMap((i) => i.data.result.results).sort((i, d) => (i.id ?? "").localeCompare(d.id ?? "", "de", { sensitivity: "base", numeric: !0 }));
43
+ return (await Promise.all(t)).flatMap((i) => i.data.result.results).sort((i, n) => (i.title.de ?? "").localeCompare(n.title.de ?? "", "de", { sensitivity: "base", numeric: !0 }));
44
44
  }
45
45
  const {
46
46
  state: p,
@@ -61,15 +61,15 @@ const F = { class: "dpiV3_dpiHome V3-typography" }, K = { class: "dpiV3_homeHead
61
61
  return (a, t) => (s(), o("div", F, [
62
62
  r("div", K, [
63
63
  t[1] || (t[1] = r("h2", { class: "dpiV3_tableHeader" }, " Ihre Datensätze ", -1)),
64
- u(p).length === 0 && n.value.length === 0 ? (s(), o("p", M, t[0] || (t[0] = [
65
- _(" Willkommen im Data Provider Interface ✨ ", -1),
64
+ u(p).length === 0 && d.value.length === 0 ? (s(), o("p", M, t[0] || (t[0] = [
65
+ h(" Willkommen im Data Provider Interface ✨ ", -1),
66
66
  r("br", null, null, -1),
67
- _("Beginnen Sie mit der Erstellung Ihres ersten Datensatzes! ", -1)
68
- ]))) : b("", !0),
67
+ h("Beginnen Sie mit der Erstellung Ihres ersten Datensatzes! ", -1)
68
+ ]))) : _("", !0),
69
69
  r("div", j, [
70
- h(A, { to: { name: "DataProviderInterface-Input", query: { locale: "de", edit: !1 }, params: { property: "datasets" } } }, {
70
+ b(A, { to: { name: "DataProviderInterface-Input", query: { locale: "de", edit: !1 }, params: { property: "datasets" } } }, {
71
71
  default: B(() => [
72
- h($, {
72
+ b($, {
73
73
  "button-text": "Neuen Datensatz erstellen",
74
74
  size: "large"
75
75
  })
@@ -78,13 +78,13 @@ const F = { class: "dpiV3_dpiHome V3-typography" }, K = { class: "dpiV3_homeHead
78
78
  })
79
79
  ])
80
80
  ]),
81
- u(p).length > 0 || n.value.length > 0 ? (s(), o("div", G, [
81
+ u(p).length > 0 || d.value.length > 0 ? (s(), o("div", G, [
82
82
  u(C) ? (s(), o("div", J, t[2] || (t[2] = [
83
83
  r("p", null, "Lädt Daten...", -1)
84
84
  ]))) : (s(), o("div", O, [
85
- t[3] || (t[3] = L('<div class="dpiV3_tableHeadWrap" data-v-2cb4e971><div class="dpiV3_thWrap" data-v-2cb4e971><div scope="col" data-v-2cb4e971><span data-v-2cb4e971>Datensätze</span></div><div scope="col" class="dpiV3_statusHead" data-v-2cb4e971><span data-v-2cb4e971>Status</span></div></div><div class="dpiV3_blankCell" data-v-2cb4e971></div></div>', 1)),
85
+ t[3] || (t[3] = L('<div class="dpiV3_tableHeadWrap" data-v-73d6a7a0><div class="dpiV3_thWrap" data-v-73d6a7a0><div scope="col" data-v-73d6a7a0><span data-v-73d6a7a0>Datensätze</span></div><div scope="col" class="dpiV3_statusHead" data-v-73d6a7a0><span data-v-73d6a7a0>Status</span></div></div><div class="dpiV3_blankCell" data-v-73d6a7a0></div></div>', 1)),
86
86
  r("div", null, [
87
- (s(!0), o(D, null, y(n.value, (e) => (s(), k(V, {
87
+ (s(!0), o(D, null, y(d.value, (e) => (s(), k(V, {
88
88
  id: e.id,
89
89
  key: e.id,
90
90
  "data-cy": e,
@@ -95,20 +95,20 @@ const F = { class: "dpiV3_dpiHome V3-typography" }, K = { class: "dpiV3_homeHead
95
95
  dataset: e
96
96
  }, null, 8, ["id", "data-cy", "catalogue", "text", "date", "dataset"]))), 128)),
97
97
  (s(!0), o(D, null, y(u(p), (e, P) => {
98
- var i, d;
98
+ var i, n;
99
99
  return s(), k(V, {
100
100
  key: e.id,
101
- text: ((i = e.title) == null ? void 0 : i.de) || ((d = e.title) == null ? void 0 : d.en) || "Kein Titel in englisch oder deutsch vohanden",
101
+ text: ((i = e.title) == null ? void 0 : i.de) || ((n = e.title) == null ? void 0 : n.en) || "Kein Titel in englisch oder deutsch vohanden",
102
102
  date: e.modified ? new Date(e.modified).toDateString() : "-",
103
103
  dataset: e
104
104
  }, null, 8, ["text", "date", "dataset"]);
105
105
  }), 128))
106
106
  ])
107
107
  ]))
108
- ])) : b("", !0)
108
+ ])) : _("", !0)
109
109
  ]));
110
110
  }
111
- }, ce = /* @__PURE__ */ q(Q, [["__scopeId", "data-v-2cb4e971"]]);
111
+ }, ce = /* @__PURE__ */ q(Q, [["__scopeId", "data-v-73d6a7a0"]]);
112
112
  export {
113
113
  ce as default
114
114
  };
@@ -1,44 +1,44 @@
1
1
  import c from "axios";
2
- const u = async (a) => {
2
+ const u = async (s) => {
3
3
  try {
4
- let e = `${a}vocabularies/hvd-category`;
4
+ let e = `${s}vocabularies/hvd-category`;
5
5
  return (await c.get(e)).data.result.results;
6
6
  } catch (e) {
7
7
  throw console.error("Error fetching HVD categories:", e), e;
8
8
  }
9
- }, g = async (a) => {
9
+ }, g = async (s) => {
10
10
  try {
11
- let e = `${a}vocabularies/data-theme`;
11
+ let e = `${s}vocabularies/data-theme`;
12
12
  return (await c.get(e)).data.result.results;
13
13
  } catch (e) {
14
14
  throw console.error("Error fetching Dataset categories:", e), e;
15
15
  }
16
- }, h = async (a) => {
16
+ }, h = async (s) => {
17
17
  try {
18
- let e = `${a}vocabularies/access-right`;
18
+ let e = `${s}vocabularies/access-right`;
19
19
  return (await c.get(e)).data.result.results;
20
20
  } catch (e) {
21
21
  throw console.error("Error fetching Dataset categories:", e), e;
22
22
  }
23
- }, d = async (a) => {
23
+ }, d = async (s) => {
24
24
  try {
25
- let e = `${a}vocabularies/iana-media-types`;
25
+ let e = `${s}vocabularies/iana-media-types`;
26
26
  return (await c.get(e, {
27
27
  headers: { Accept: "application/json" }
28
28
  })).data.result;
29
29
  } catch (e) {
30
30
  throw console.error("Error fetching file types:", e), e;
31
31
  }
32
- }, p = async (a) => {
32
+ }, p = async (s) => {
33
33
  try {
34
- let e = `${a}vocabularies/file-type`;
34
+ let e = `${s}vocabularies/file-type`;
35
35
  return (await c.get(e, {
36
36
  headers: { Accept: "application/json" }
37
37
  })).data.result;
38
38
  } catch (e) {
39
39
  throw console.error("Error fetching file types:", e), e;
40
40
  }
41
- }, n = async (a) => {
41
+ }, n = async (s) => {
42
42
  let e = [
43
43
  "district-key",
44
44
  "government-district-key",
@@ -48,27 +48,27 @@ const u = async (a) => {
48
48
  "state-key"
49
49
  ], r = [], o = [];
50
50
  try {
51
- let l = `${a}vocabularies/political-geocoding-level`;
51
+ let l = `${s}vocabularies/political-geocoding-level`;
52
52
  const t = await c.get(l);
53
- for (let s = 0; s < t.data.result.results.length; s++)
53
+ for (let a = 0; a < t.data.result.results.length; a++)
54
54
  o.push(
55
55
  await c.get(
56
- `${a}vocabularies/political-geocoding-` + e[s]
56
+ `${s}vocabularies/political-geocoding-` + e[a]
57
57
  )
58
58
  ), r.push({
59
- headers: e[s],
60
- list: o[s].data.result.results
59
+ headers: e[a],
60
+ list: o[a].data.result.results
61
61
  });
62
62
  return r;
63
63
  } catch (l) {
64
64
  throw console.error("Error fetching Dataset categories:", l), l;
65
65
  }
66
- }, y = async (a, e) => (await n(e)).map((l) => {
66
+ }, y = async (s, e) => (await n(e)).map((l) => {
67
67
  const t = l.list.filter(
68
- (s) => s.alt_label && s.alt_label.de && s.alt_label.de.includes(a)
68
+ (a) => a.alt_label && a.alt_label.de && a.alt_label.de.includes(s)
69
69
  );
70
70
  return { ...l, list: t };
71
- }).filter((l) => l.list.length > 0), f = async (a, e, r) => {
71
+ }).filter((l) => l.list.length > 0), f = async (s, e, r) => {
72
72
  let o = [];
73
73
  try {
74
74
  let l = `${e}vocabularies/${r}`;
@@ -76,9 +76,9 @@ const u = async (a) => {
76
76
  } catch (l) {
77
77
  throw console.error("Error fetching Dataset categories:", l), l;
78
78
  }
79
- }, b = async (a) => {
79
+ }, b = async (s) => {
80
80
  try {
81
- let e = `${a}vocabularies/planned-availability`;
81
+ let e = `${s}vocabularies/planned-availability`;
82
82
  return (await c.get(e)).data.result.results.map((o) => ({
83
83
  value: o.id,
84
84
  label: o.pref_label.de,
@@ -87,48 +87,48 @@ const u = async (a) => {
87
87
  } catch (e) {
88
88
  throw console.error("Error fetching planned availability:", e), e;
89
89
  }
90
- }, v = async (a, e = "de") => {
90
+ }, v = async (s, e = "de") => {
91
91
  try {
92
- let r = `${a}vocabularies/language`, l = (await c.get(r)).data.result.results.map((t) => ({
92
+ let r = `${s}vocabularies/language`, l = (await c.get(r)).data.result.results.map((t) => ({
93
93
  value: t.id,
94
94
  label: `${t.pref_label[e] || t.pref_label.en || t.id} (${t.id})`,
95
95
  uri: t.resource
96
96
  }));
97
- return l.sort((t, s) => t.label.localeCompare(s.label, e)), l;
97
+ return l.sort((t, a) => t.label.localeCompare(a.label, e)), l;
98
98
  } catch (r) {
99
99
  throw console.error("Error fetching languages:", r), r;
100
100
  }
101
- }, w = async (a, e = "de") => {
101
+ }, w = async (s, e = "de") => {
102
102
  try {
103
- let r = `${a}vocabularies/licence`;
103
+ let r = `${s}vocabularies/licenses`;
104
104
  return (await c.get(r)).data.result.results.map((t) => {
105
- var s;
105
+ var a;
106
106
  return {
107
107
  value: t.id,
108
108
  label: t.pref_label[e] || t.pref_label.en || t.id,
109
- homepage: ((s = t.extensions) == null ? void 0 : s.foaf_homepage) || null,
109
+ homepage: ((a = t.extensions) == null ? void 0 : a.foaf_homepage) || null,
110
110
  uri: t.resource
111
111
  };
112
112
  });
113
113
  } catch (r) {
114
114
  throw console.error("Error fetching licenses:", r), r;
115
115
  }
116
- }, $ = async (a, e = "de") => {
116
+ }, $ = async (s, e = "de") => {
117
117
  try {
118
- let r = `${a}vocabularies/adms`;
118
+ let r = `${s}vocabularies/adms`;
119
119
  return (await c.get(r)).data.result.results.filter(
120
- (s) => s.in_scheme === "http://purl.org/adms/status/1.0" && s.resource !== "http://purl.org/adms/status/UnderDevelopment"
121
- ).map((s) => ({
122
- value: s.id,
123
- label: s.pref_label[e] || s.pref_label.en || s.id,
124
- resource: s.resource || null
120
+ (a) => a.in_scheme === "http://purl.org/adms/status/1.0" && a.resource !== "http://purl.org/adms/status/UnderDevelopment"
121
+ ).map((a) => ({
122
+ value: a.id,
123
+ label: a.pref_label[e] || a.pref_label.en || a.id,
124
+ resource: a.resource || null
125
125
  }));
126
126
  } catch (r) {
127
127
  throw console.error("Error fetching dataset status:", r), r;
128
128
  }
129
- }, m = async (a, e = "en") => {
129
+ }, m = async (s, e = "en") => {
130
130
  try {
131
- let r = `${a}vocabularies/spdx-checksum-algorithm`;
131
+ let r = `${s}vocabularies/spdx-checksum-algorithm`;
132
132
  return (await c.get(r)).data.result.results.map((t) => ({
133
133
  value: t.id,
134
134
  label: t.pref_label[e] || t.pref_label.en || t.id,