@piveau/piveau-hub-ui-modules 4.0.21 → 4.0.25

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,9 +1,16 @@
1
+ import { onClickOutside } from '@vueuse/core';
1
2
  declare const _default: import('vue').DefineComponent<{
2
3
  context: {
3
4
  type: ObjectConstructor;
4
5
  required: true;
5
6
  };
6
- }, {}, {
7
+ }, {
8
+ drop: {
9
+ active: boolean;
10
+ };
11
+ onClickOutside: typeof onClickOutside;
12
+ triggerDropdown: (e: any) => void;
13
+ }, {
7
14
  error: string;
8
15
  URLValue: string;
9
16
  uploadURL: boolean;
@@ -12,13 +19,15 @@ declare const _default: import('vue').DefineComponent<{
12
19
  isLoading: boolean;
13
20
  success: boolean;
14
21
  fail: boolean;
15
- validExtensions: string[];
22
+ validExtensions: any;
16
23
  }, {
17
24
  getCatalogue(): unknown;
18
25
  getData: import('vuex').Computed;
19
26
  getUserData: import('vuex').Computed;
20
27
  getIsEditMode: import('vuex').Computed;
21
28
  }, {
29
+ toggleUploadUrl(): void;
30
+ toggleUploadFileSwitch(): void;
22
31
  validateFile(event: any): void;
23
32
  saveUrl(): Promise<void>;
24
33
  checkIfPresent(): true | undefined;
@@ -1,37 +1,13 @@
1
- import { reactive as x, ref as E, onMounted as O, openBlock as n, createElementBlock as r, Fragment as L, createElementVNode as a, createTextVNode as s, unref as S, createCommentVNode as c, withDirectives as b, vModelText as k, mergeProps as V, toDisplayString as U, renderList as A, pushScopeId as C, popScopeId as T } from "vue";
2
- import { onClickOutside as P } from "../../external/@vueuse/core/index";
3
- import { mapGetters as w, mapActions as G } from "vuex";
4
- import D from "axios";
5
- import q from "../utils/general-helper.mjs";
6
- import { getNode as B } from "@formkit/core";
1
+ import { mapGetters as y, mapActions as E } from "vuex";
2
+ import S from "axios";
3
+ import O from "../utils/general-helper.mjs";
4
+ import { getNode as V } from "@formkit/core";
5
+ import { reactive as A, ref as C, openBlock as d, createElementBlock as c, Fragment as L, createElementVNode as a, createTextVNode as s, createCommentVNode as u, withDirectives as b, vModelText as _, mergeProps as T, toDisplayString as U, renderList as D, pushScopeId as P, popScopeId as G } from "vue";
6
+ import { onClickOutside as k } from "../../external/@vueuse/core/index";
7
+ import { useRuntimeEnv as q } from "../../composables/useRuntimeEnv.mjs";
7
8
  import "./FileUpload.vue2.mjs";
8
- import N from "../../_virtual/_plugin-vue_export-helper.mjs";
9
- const h = (t) => (C("data-v-72ea5545"), t = t(), T(), t), H = { class: "position-relative w-100 p-3" }, M = {
10
- key: 0,
11
- class: "w-100 p-3 position-relative"
12
- }, j = /* @__PURE__ */ h(() => /* @__PURE__ */ a("label", {
13
- class: "formkit-label w-100",
14
- for: "aUrlLink"
15
- }, "Provide an URL", -1)), W = ["data-type"], z = { class: "file-div position-relative" }, _ = /* @__PURE__ */ h(() => /* @__PURE__ */ a("label", {
16
- class: "formkit-label",
17
- for: "aUrlFL"
18
- }, "Upload a file", -1)), J = ["accept"], K = {
19
- class: "upload-feedback position-absolute d-flex",
20
- style: { right: "0" }
21
- }, Q = {
22
- key: 0,
23
- class: "lds-ring"
24
- }, X = { key: 1 }, Y = /* @__PURE__ */ h(() => /* @__PURE__ */ a("i", { class: "material-icons d-flex check-icon" }, "check_circle", -1)), Z = [
25
- Y
26
- ], ee = { key: 2 }, te = /* @__PURE__ */ h(() => /* @__PURE__ */ a("i", { class: "material-icons d-flex close-icon" }, "error", -1)), ie = [
27
- te
28
- ], le = {
29
- key: 0,
30
- class: "dURLText my-3"
31
- }, oe = ["href"], ae = {
32
- key: 1,
33
- class: "errorSub my-3 d-flex"
34
- }, se = { class: "allowedTypesWrapper" }, ne = {
9
+ import B from "../../_virtual/_plugin-vue_export-helper.mjs";
10
+ const N = {
35
11
  props: {
36
12
  context: {
37
13
  type: Object,
@@ -39,6 +15,7 @@ const h = (t) => (C("data-v-72ea5545"), t = t(), T(), t), H = { class: "position
39
15
  }
40
16
  },
41
17
  data() {
18
+ var t;
42
19
  return {
43
20
  error: "",
44
21
  URLValue: "",
@@ -48,28 +25,34 @@ const h = (t) => (C("data-v-72ea5545"), t = t(), T(), t), H = { class: "position
48
25
  isLoading: !1,
49
26
  success: !1,
50
27
  fail: !1,
51
- validExtensions: this.$env.content.dataProviderInterface.uploadFileTypes
28
+ validExtensions: ((t = this.$env.content.dataProviderInterface.uploadFileTypes) == null ? void 0 : t.split(",")) || []
52
29
  };
53
30
  },
54
31
  computed: {
55
- ...w("auth", [
32
+ ...y("auth", [
56
33
  "getUserData",
57
34
  "getIsEditMode"
58
35
  ]),
59
- ...w("dpiStore", [
36
+ ...y("dpiStore", [
60
37
  "getData"
61
38
  ]),
62
39
  getCatalogue() {
63
- return B("dcat:catalog").value;
40
+ return V("dcat:catalog").value;
64
41
  }
65
42
  },
66
43
  methods: {
67
- ...G("dpiStore", [
44
+ ...E("dpiStore", [
68
45
  "saveLocalstorageValues"
69
46
  ]),
47
+ toggleUploadUrl() {
48
+ this.uploadURL && (this.uploadURL = !this.uploadURL);
49
+ },
50
+ toggleUploadFileSwitch() {
51
+ this.uploadFileSwitch && (this.uploadFileSwitch = !this.uploadFileSwitch);
52
+ },
70
53
  validateFile(t) {
71
- const d = "." + t.target.files[0].name.split(".").pop().toLowerCase();
72
- validExtensions != null ? validExtensions.length != 0 && (validExtensions.includes(d) ? this.uploadOrReplaceFile({ file: t.target.files[0] }) : console.log("Wrong filetype")) : (this.error = "", this.uploadOrReplaceFile({ file: t.target.files[0] }));
54
+ const o = "." + t.target.files[0].name.split(".").pop().toLowerCase();
55
+ this.validExtensions && this.validExtensions.length ? this.validExtensions.includes(o) ? this.uploadOrReplaceFile({ file: t.target.files[0] }) : console.log("Wrong filetype") : (this.error = "", this.uploadOrReplaceFile({ file: t.target.files[0] }));
73
56
  },
74
57
  async saveUrl() {
75
58
  this.URLValue.includes("http://") || this.URLValue.includes("https://") ? await this.context.node.input({ "@id": this.URLValue }) : await this.context.node.input({ "@id": "https://" + this.URLValue });
@@ -80,29 +63,29 @@ const h = (t) => (C("data-v-72ea5545"), t = t(), T(), t), H = { class: "position
80
63
  },
81
64
  // finds the parent input group of a given element.
82
65
  findParentInputGroupOfElement(t) {
83
- let o = t;
84
- for (; o; ) {
85
- if (o.classList.contains("formkit-input-group-repeatable"))
86
- return o;
87
- o = o.parentElement;
66
+ let e = t;
67
+ for (; e; ) {
68
+ if (e.classList.contains("formkit-input-group-repeatable"))
69
+ return e;
70
+ e = e.parentElement;
88
71
  }
89
72
  return null;
90
73
  },
91
74
  // finds the index of the distribution access URL based on the root of this component.
92
75
  findDistributionAccessUrlIndex() {
93
- const t = this.$refs.fileupload, o = this.findParentInputGroupOfElement(t);
94
- if (!o)
76
+ const t = this.$refs.fileupload, e = this.findParentInputGroupOfElement(t);
77
+ if (!e)
95
78
  return null;
96
- const u = o.parentElement.querySelectorAll(".formkit-input-group-repeatable");
97
- return Array.from(u).indexOf(o);
79
+ const n = e.parentElement.querySelectorAll(".formkit-input-group-repeatable");
80
+ return Array.from(n).indexOf(e);
98
81
  },
99
82
  async uploadOrReplaceFile({ file: t }) {
100
- var u, e, i, l, p, f, g;
101
- const o = ((i = (e = (u = this.$env) == null ? void 0 : u.content) == null ? void 0 : e.dataProviderInterface) == null ? void 0 : i.enableFileUploadReplace) || !1, d = ((l = this.$route.query) == null ? void 0 : l.edit) ?? !1;
102
- if (o && d) {
103
- const I = (p = this.$route.query) == null ? void 0 : p.edit, R = this.findDistributionAccessUrlIndex(), m = (f = this.getData("distributions")) == null ? void 0 : f[I], v = (g = m == null ? void 0 : m["dcat:accessURL"]) == null ? void 0 : g[R], y = v == null ? void 0 : v["@id"];
104
- if (y) {
105
- const $ = this.$env.api.fileUploadUrl, F = q.getFileIdByAccessUrl({ accessUrl: y, fileUploadUrl: $ });
83
+ var n, i, r, l, p, f, g;
84
+ const e = ((r = (i = (n = this.$env) == null ? void 0 : n.content) == null ? void 0 : i.dataProviderInterface) == null ? void 0 : r.enableFileUploadReplace) || !1, o = ((l = this.$route.query) == null ? void 0 : l.edit) ?? !1;
85
+ if (e && o) {
86
+ const w = (p = this.$route.query) == null ? void 0 : p.edit, I = this.findDistributionAccessUrlIndex(), m = (f = this.getData("distributions")) == null ? void 0 : f[w], v = (g = m == null ? void 0 : m["dcat:accessURL"]) == null ? void 0 : g[I], x = v == null ? void 0 : v["@id"];
87
+ if (x) {
88
+ const R = this.$env.api.fileUploadUrl, F = O.getFileIdByAccessUrl({ accessUrl: x, fileUploadUrl: R });
106
89
  return await this.uploadFile(t, {
107
90
  method: "PUT",
108
91
  url: `${this.$env.api.fileUploadUrl}data/${F}?catalog=${this.getCatalogue}`
@@ -111,25 +94,25 @@ const h = (t) => (C("data-v-72ea5545"), t = t(), T(), t), H = { class: "position
111
94
  }
112
95
  return await this.uploadFile(t);
113
96
  },
114
- async uploadFile(t, o = {}) {
97
+ async uploadFile(t, e = {}) {
115
98
  this.isLoading = !0;
116
- const d = new FormData();
117
- d.append("file", t);
118
- const u = this.getCatalogue, e = this.getUserData.rtpToken, i = {
99
+ const o = new FormData();
100
+ o.append("file", t);
101
+ const n = this.getCatalogue, i = this.getUserData.rtpToken, r = {
119
102
  method: "POST",
120
- url: `${this.$env.api.fileUploadUrl}data?catalog=${u}`,
121
- ...o
103
+ url: `${this.$env.api.fileUploadUrl}data?catalog=${n}`,
104
+ ...e
122
105
  }, l = {
123
- method: i.method,
124
- url: i.url,
106
+ method: r.method,
107
+ url: r.url,
125
108
  headers: {
126
109
  "Content-Type": "multipart/form-data",
127
- Authorization: `Bearer ${e}`
110
+ Authorization: `Bearer ${i}`
128
111
  },
129
- data: d
112
+ data: o
130
113
  };
131
114
  try {
132
- const p = await D.request(l), f = p.data.result.location.substring(p.data.result.location.indexOf("/") + 1);
115
+ const p = await S.request(l), f = p.data.result.location.substring(p.data.result.location.indexOf("/") + 1);
133
116
  this.context.model = `${this.$env.api.fileUploadUrl}${f}`, this.isLoading = !1, this.success = !0, await this.context.node.input({ "@id": `${this.$env.api.fileUploadUrl}${f}` });
134
117
  } catch (p) {
135
118
  this.isLoading = !1, this.fail = !0, console.error(p);
@@ -141,124 +124,157 @@ const h = (t) => (C("data-v-72ea5545"), t = t(), T(), t), H = { class: "position
141
124
  if (this.context.value["@id"])
142
125
  return this.uploadURL = !0, this.URLValue = this.context.value["@id"], !0;
143
126
  });
144
- }
145
- }, re = /* @__PURE__ */ Object.assign(ne, {
146
- __name: "FileUpload",
147
- setup(t) {
148
- var o = x({
127
+ },
128
+ setup() {
129
+ q();
130
+ var t = A({
149
131
  active: !1
150
132
  });
151
- const d = E(null);
152
- P(d, (e) => o.active = !1);
153
- function u(e) {
154
- o.active = !o.active;
133
+ const e = C(null);
134
+ k(e, (n) => t.active = !1);
135
+ function o(n) {
136
+ t.active = !t.active;
155
137
  }
156
- return O(async () => {
157
- }), (e, i) => (n(), r(L, null, [
158
- a("div", H, [
159
- a("input", {
160
- type: "text",
161
- class: "selectInputField formkit-inner",
162
- readonly: "readonly",
163
- onClick: i[0] || (i[0] = (l) => u()),
164
- placeholder: "Choose between fileupload and providing a URL"
165
- }),
138
+ return {
139
+ drop: t,
140
+ onClickOutside: k,
141
+ triggerDropdown: o
142
+ };
143
+ }
144
+ }, h = (t) => (P("data-v-5fc0b1f6"), t = t(), G(), t), H = { class: "position-relative w-100 p-3" }, M = {
145
+ key: 0,
146
+ ref: "fLoad",
147
+ class: "selectListUpload"
148
+ }, W = {
149
+ key: 0,
150
+ class: "w-100 p-3 position-relative"
151
+ }, j = /* @__PURE__ */ h(() => /* @__PURE__ */ a("label", {
152
+ class: "formkit-label w-100",
153
+ for: "aUrlLink"
154
+ }, "Provide an URL", -1)), z = ["data-type"], J = { class: "file-div position-relative" }, K = /* @__PURE__ */ h(() => /* @__PURE__ */ a("label", {
155
+ class: "formkit-label",
156
+ for: "aUrlFL"
157
+ }, "Upload a file", -1)), Q = ["accept"], X = {
158
+ class: "upload-feedback position-absolute d-flex",
159
+ style: { right: "0" }
160
+ }, Y = {
161
+ key: 0,
162
+ class: "lds-ring"
163
+ }, Z = { key: 1 }, $ = /* @__PURE__ */ h(() => /* @__PURE__ */ a("i", { class: "material-icons d-flex check-icon" }, "check_circle", -1)), ee = [
164
+ $
165
+ ], te = { key: 2 }, ie = /* @__PURE__ */ h(() => /* @__PURE__ */ a("i", { class: "material-icons d-flex close-icon" }, "error", -1)), le = [
166
+ ie
167
+ ], oe = {
168
+ key: 0,
169
+ class: "dURLText my-3"
170
+ }, se = ["href"], ae = {
171
+ key: 1,
172
+ class: "allowedTypesWrapper"
173
+ }, ne = {
174
+ key: 0,
175
+ class: "errorSub my-3 d-flex"
176
+ };
177
+ function re(t, e, o, n, i, r) {
178
+ return d(), c(L, null, [
179
+ a("div", H, [
180
+ a("input", {
181
+ type: "text",
182
+ class: "selectInputField formkit-inner",
183
+ readonly: "readonly",
184
+ onClick: e[0] || (e[0] = (l) => n.triggerDropdown()),
185
+ placeholder: "Choose between fileupload and providing a URL"
186
+ }),
187
+ s(),
188
+ n.drop.active ? (d(), c("ul", M, [
189
+ a("li", {
190
+ onClick: e[1] || (e[1] = (l) => {
191
+ n.triggerDropdown(), i.uploadFileSwitch = !0, r.toggleUploadUrl();
192
+ }),
193
+ class: "p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC"
194
+ }, "Upload a file"),
166
195
  s(),
167
- S(o).active ? (n(), r("ul", {
168
- key: 0,
169
- ref_key: "fLoad",
170
- ref: d,
171
- class: "selectListUpload"
172
- }, [
173
- a("li", {
174
- onClick: i[1] || (i[1] = (l) => {
175
- u(), e.uploadFileSwitch = !0, e.uploadURL && (e.uploadURL = !e.uploadURL);
176
- }),
177
- class: "p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC"
178
- }, "Upload a file"),
179
- s(),
180
- a("li", {
181
- onClick: i[2] || (i[2] = (l) => {
182
- u(), e.uploadURL = !0, e.uploadFileSwitch && (e.uploadFileSwitch = !e.uploadFileSwitch);
183
- }),
184
- class: "p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC"
185
- }, "Provide an URL")
186
- ], 512)) : c("", !0)
196
+ a("li", {
197
+ onClick: e[2] || (e[2] = (l) => {
198
+ n.triggerDropdown(), i.uploadURL = !0, r.toggleUploadFileSwitch();
199
+ }),
200
+ class: "p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC"
201
+ }, "Provide an URL")
202
+ ], 512)) : u("", !0)
203
+ ]),
204
+ s(),
205
+ i.uploadURL && !i.uploadFileSwitch ? (d(), c("div", W, [
206
+ j,
207
+ s(),
208
+ b(a("input", {
209
+ id: "aUrlLink",
210
+ "onUpdate:modelValue": e[3] || (e[3] = (l) => i.URLValue = l),
211
+ class: "selectInputField formkit-inner",
212
+ type: "url",
213
+ name: "@id",
214
+ onInput: e[4] || (e[4] = (...l) => r.saveUrl && r.saveUrl(...l)),
215
+ validation: "alpha_spaces:latin",
216
+ "validation-visibility": "live"
217
+ }, null, 544), [
218
+ [_, i.URLValue]
219
+ ])
220
+ ])) : u("", !0),
221
+ s(),
222
+ i.uploadFileSwitch ? (d(), c("div", T({
223
+ key: 1,
224
+ ref: "fileupload",
225
+ class: ["p-3 w-100", `formkit-input-element formkit-input-element--${o.context.type}`],
226
+ "data-type": o.context.type
227
+ }, t.$attrs), [
228
+ b(a("input", {
229
+ type: "text",
230
+ "onUpdate:modelValue": e[5] || (e[5] = (l) => o.context.model = l),
231
+ onBlur: e[6] || (e[6] = (...l) => o.context.blurHandler && o.context.blurHandler(...l)),
232
+ hidden: ""
233
+ }, null, 544), [
234
+ [_, o.context.model]
187
235
  ]),
188
236
  s(),
189
- e.uploadURL && !e.uploadFileSwitch ? (n(), r("div", M, [
190
- j,
237
+ a("div", J, [
238
+ K,
191
239
  s(),
192
- b(a("input", {
193
- id: "aUrlLink",
194
- "onUpdate:modelValue": i[3] || (i[3] = (l) => e.URLValue = l),
195
- class: "selectInputField formkit-inner",
196
- type: "url",
197
- name: "@id",
198
- onInput: i[4] || (i[4] = (...l) => e.saveUrl && e.saveUrl(...l)),
199
- validation: "alpha_spaces:latin",
200
- "validation-visibility": "live"
201
- }, null, 544), [
202
- [k, e.URLValue]
203
- ])
204
- ])) : c("", !0),
205
- s(),
206
- e.uploadFileSwitch ? (n(), r("div", V({
207
- key: 1,
208
- ref: "fileupload",
209
- class: ["p-3 w-100", `formkit-input-element formkit-input-element--${t.context.type}`],
210
- "data-type": t.context.type
211
- }, e.$attrs), [
212
- b(a("input", {
213
- type: "text",
214
- "onUpdate:modelValue": i[5] || (i[5] = (l) => t.context.model = l),
215
- onBlur: i[6] || (i[6] = (...l) => t.context.blurHandler && t.context.blurHandler(...l)),
216
- hidden: ""
217
- }, null, 544), [
218
- [k, t.context.model]
219
- ]),
240
+ a("input", {
241
+ class: "mt-3",
242
+ type: "file",
243
+ id: "aUrlFL",
244
+ name: "fileUpload",
245
+ onChange: e[7] || (e[7] = (l) => r.validateFile(l)),
246
+ accept: i.validExtensions
247
+ }, null, 40, Q),
220
248
  s(),
221
- a("div", z, [
222
- _,
249
+ a("div", X, [
250
+ i.isLoading ? (d(), c("div", Y)) : u("", !0),
223
251
  s(),
224
- a("input", {
225
- class: "mt-3",
226
- type: "file",
227
- id: "aUrlFL",
228
- name: "fileUpload",
229
- onChange: i[7] || (i[7] = (l) => e.validateFile(l)),
230
- accept: e.validExtensions
231
- }, null, 40, J),
252
+ i.success ? (d(), c("div", Z, ee)) : u("", !0),
232
253
  s(),
233
- a("div", K, [
234
- e.isLoading ? (n(), r("div", Q)) : c("", !0),
235
- s(),
236
- e.success ? (n(), r("div", X, Z)) : c("", !0),
237
- s(),
238
- e.fail ? (n(), r("div", ee, ie)) : c("", !0)
239
- ])
240
- ]),
241
- s(),
242
- e.success ? (n(), r("p", le, [
243
- s(U(e.$t("message.metadata.downloadUrl")) + ": ", 1),
244
- a("a", {
245
- href: t.context.model
246
- }, U(t.context.model), 9, oe)
247
- ])) : c("", !0),
248
- s(),
249
- e.success ? c("", !0) : (n(), r("p", ae, "Allowed types: ")),
250
- s(),
251
- a("div", se, [
252
- (n(!0), r(L, null, A(e.validExtensions, (l, p) => (n(), r("span", {
253
- key: l,
254
- class: "mr-1 mb-1 allowedFTypes"
255
- }, U(l), 1))), 128))
254
+ i.fail ? (d(), c("div", te, le)) : u("", !0)
256
255
  ])
257
- ], 16, W)) : c("", !0)
258
- ], 64));
259
- }
260
- }), Ue = /* @__PURE__ */ N(re, [["__scopeId", "data-v-72ea5545"]]);
256
+ ]),
257
+ s(),
258
+ i.success ? (d(), c("p", oe, [
259
+ s(U(t.$t("message.metadata.downloadUrl")) + ": ", 1),
260
+ a("a", {
261
+ href: o.context.model
262
+ }, U(o.context.model), 9, se)
263
+ ])) : u("", !0),
264
+ s(),
265
+ i.validExtensions && i.validExtensions.length ? (d(), c("div", ae, [
266
+ i.success ? u("", !0) : (d(), c("p", ne, "Allowed types: ")),
267
+ s(),
268
+ (d(!0), c(L, null, D(i.validExtensions, (l) => (d(), c("span", {
269
+ key: l,
270
+ class: "mr-1 mb-1 allowedFTypes"
271
+ }, U(l), 1))), 128))
272
+ ])) : u("", !0)
273
+ ], 16, z)) : u("", !0)
274
+ ], 64);
275
+ }
276
+ const ge = /* @__PURE__ */ B(N, [["render", re], ["__scopeId", "data-v-5fc0b1f6"]]);
261
277
  export {
262
- Ue as default
278
+ ge as default
263
279
  };
264
280
  //# sourceMappingURL=FileUpload.vue.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"FileUpload.vue.mjs","sources":["../../../lib/data-provider-interface/components/FileUpload.vue"],"sourcesContent":["<script setup>\nimport { reactive, ref, onMounted } from 'vue';\nimport { onClickOutside } from '@vueuse/core'\nimport { getCurrentInstance } from \"vue\";\n\n\nvar drop = reactive({\n active: false,\n})\n\nconst fLoad = ref(null);\n\nonClickOutside(fLoad, event => drop.active = false)\nfunction triggerDropdown(e) {\n drop.active = !drop.active\n}\n\nonMounted(async () => {\n});\n\n</script>\n\n<template>\n <div class=\"position-relative w-100 p-3 \">\n <input type=\"text\" class=\"selectInputField formkit-inner\" readonly=\"readonly\" @click=\"triggerDropdown()\"\n placeholder=\"Choose between fileupload and providing a URL\">\n <ul ref=\"fLoad\" v-if=\"drop.active\" class=\"selectListUpload\">\n <li @click=\"triggerDropdown(); uploadFileSwitch = true; if (uploadURL) { uploadURL = !uploadURL }\"\n class=\"p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC\">Upload a file</li>\n <li @click=\"triggerDropdown(); uploadURL = true; if (uploadFileSwitch) { uploadFileSwitch = !uploadFileSwitch }\"\n class=\"p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC\">Provide an URL</li>\n </ul>\n </div>\n <div class=\"w-100 p-3 position-relative\" v-if=\"uploadURL && !uploadFileSwitch\">\n <label class=\" formkit-label w-100\" for=\"aUrlLink\">Provide an URL</label>\n <input id=\"aUrlLink\" v-model=\"URLValue\" class=\"selectInputField formkit-inner\" type=\"url\" name=\"@id\"\n @input=\"saveUrl\" validation=\"alpha_spaces:latin\" validation-visibility=\"live\">\n\n </div>\n <div v-if=\"uploadFileSwitch\" ref=\"fileupload\" class=\"p-3 w-100\"\n :class=\"`formkit-input-element formkit-input-element--${context.type}`\" :data-type=\"context.type\" v-bind=\"$attrs\">\n <input type=\"text\" v-model=\"context.model\" @blur=\"context.blurHandler\" hidden />\n <div class=\"file-div position-relative\">\n <label class=\"formkit-label\" for=\"aUrlFL\">Upload a file</label>\n <input class=\"mt-3\" type=\"file\" id=\"aUrlFL\" name=\"fileUpload\" @change=\"validateFile($event)\"\n :accept=\"validExtensions\">\n <div class=\"upload-feedback position-absolute d-flex\" style=\"right: 0\">\n <div v-if=\"isLoading\" class=\"lds-ring\">\n </div>\n <div v-if=\"success\"><i class=\"material-icons d-flex check-icon\">check_circle</i></div>\n <div v-if=\"fail\"><i class=\"material-icons d-flex close-icon\">error</i></div>\n </div>\n </div>\n <p class=\"dURLText my-3\" v-if=\"success\">{{ $t('message.metadata.downloadUrl') }}: <a :href=\"context.model\">{{\n context.model }}</a></p>\n <p class=\"errorSub my-3 d-flex \" v-if=\"!success\">Allowed types: </p>\n <div class=\"allowedTypesWrapper\">\n <span v-for=\"types, index in validExtensions\" :key=\"types\" class=\"mr-1 mb-1 allowedFTypes \">{{ types\n }}</span>\n </div>\n\n\n </div>\n\n</template>\n\n<script>\n/* eslint-disable consistent-return, no-unused-vars */\nimport { mapGetters, mapActions } from 'vuex';\nimport axios from 'axios';\nimport helper from '../utils/general-helper'\nimport { getNode } from '@formkit/core'\n\nexport default {\n props: {\n context: {\n type: Object,\n required: true,\n },\n },\n data() {\n return {\n error: '',\n URLValue: '',\n uploadURL: false,\n uploadFileSwitch: false,\n checkifSet: false,\n isLoading: false,\n success: false,\n fail: false,\n validExtensions: this.$env.content.dataProviderInterface.uploadFileTypes\n };\n },\n computed: {\n\n ...mapGetters('auth', [\n 'getUserData',\n 'getIsEditMode'\n ]),\n ...mapGetters('dpiStore', [\n 'getData',\n ]),\n getCatalogue() {\n return getNode('dcat:catalog').value;\n },\n },\n methods: {\n ...mapActions('dpiStore', [\n 'saveLocalstorageValues',\n ]),\n validateFile(event) {\n\n const file = event.target.files[0];\n\n const fileExtension = '.' + file.name.split('.').pop().toLowerCase();\n if (validExtensions != undefined) {\n if (validExtensions.length != 0) {\n if (!validExtensions.includes(fileExtension)) {\n console.log('Wrong filetype');\n\n } else {\n this.uploadOrReplaceFile({ file: event.target.files[0] })\n }\n }\n } else {\n this.error = \"\"\n this.uploadOrReplaceFile({ file: event.target.files[0] })\n }\n },\n async saveUrl() {\n\n if (this.URLValue.includes('http://') || this.URLValue.includes('https://')) {\n await this.context.node.input({ '@id': this.URLValue })\n }\n else await this.context.node.input({ '@id': 'https://' + this.URLValue })\n\n },\n checkIfPresent() {\n // console.log(this.context.value['@id']);\n if (this.context.value['@id']) {\n // console.log(this.context.value['@id']);\n this.URLValue = this.context.value['@id']\n return true\n }\n else false\n },\n // finds the parent input group of a given element.\n findParentInputGroupOfElement(element) {\n // Start with the given element.\n let currentElement = element;\n\n // Traverse the DOM tree upwards.\n while (currentElement) {\n // If the current element is an input group, return it.\n if (currentElement.classList.contains('formkit-input-group-repeatable')) {\n return currentElement;\n }\n // If not, move to the parent element.\n currentElement = currentElement.parentElement;\n }\n\n // If no input group was found, return null.\n return null;\n },\n // finds the index of the distribution access URL based on the root of this component.\n findDistributionAccessUrlIndex() {\n // todo: find a more stable way to find the index of the distribution access URL.\n // this way uses the DOM tree, which is not stable.\n\n // Start at the root of this component.\n const rootElement = this.$refs.fileupload;\n\n // Find the parent input group of the root element.\n const parentInputGroup = this.findParentInputGroupOfElement(rootElement);\n if (!parentInputGroup) return null;\n\n // Get the parent element of all input groups.\n const parentOfAllInputGroups = parentInputGroup.parentElement;\n const allInputGroupsNodeList = parentOfAllInputGroups.querySelectorAll('.formkit-input-group-repeatable');\n const allInputGroupsArray = Array.from(allInputGroupsNodeList);\n\n // Find the index of the parent input group within the array of all input groups.\n const indexOfParentInputGroup = allInputGroupsArray.indexOf(parentInputGroup);\n\n return indexOfParentInputGroup;\n },\n async uploadOrReplaceFile({ file }) {\n\n const replaceEnabled = this.$env?.content?.dataProviderInterface?.enableFileUploadReplace || false;\n const wantsToReplace = this.$route.query?.edit ?? false;\n\n if (replaceEnabled && wantsToReplace) {\n const distributionIndexToReplace = this.$route.query?.edit;\n const fileIndexToReplace = this.findDistributionAccessUrlIndex();\n\n const targetDistribution = this.getData('distributions')?.[distributionIndexToReplace];\n const targetFile = targetDistribution?.['dcat:accessURL']?.[fileIndexToReplace];\n const accessUrl = targetFile?.['@id'];\n if (accessUrl) {\n const fileUploadUrl = this.$env.api.fileUploadUrl;\n\n const fileId = helper.getFileIdByAccessUrl({ accessUrl, fileUploadUrl })\n\n return await this.uploadFile(file, {\n method: 'PUT',\n url: `${this.$env.api.fileUploadUrl}data/${fileId}?catalog=${this.getCatalogue}`,\n });\n }\n\n }\n\n return await this.uploadFile(file);\n },\n async uploadFile(file, options = {}) {\n\n this.isLoading = true;\n\n const form = new FormData();\n form.append('file', file);\n\n const catalog = this.getCatalogue;\n const token = this.getUserData.rtpToken;\n\n const resolvedOptions = {\n method: 'POST',\n url: `${this.$env.api.fileUploadUrl}data?catalog=${catalog}`,\n ...options,\n };\n\n const requestOptions = {\n method: resolvedOptions.method,\n url: resolvedOptions.url,\n headers: {\n 'Content-Type': 'multipart/form-data',\n Authorization: `Bearer ${token}`,\n },\n data: form,\n };\n\n try {\n\n const result = await axios.request(requestOptions);\n const path = result.data.result.location.substring(result.data.result.location.indexOf('/') + 1);\n this.context.model = `${this.$env.api.fileUploadUrl}${path}`;\n this.isLoading = false;\n this.success = true;\n await this.context.node.input({ '@id': `${this.$env.api.fileUploadUrl}${path}` })\n // this.context.rootEmit('change');\n\n } catch (err) {\n\n this.isLoading = false;\n this.fail = true;\n console.error(err); // eslint-disable-line\n }\n },\n },\n mounted() {\n\n this.$nextTick(function () {\n\n if (this.context.value['@id']) {\n this.uploadURL = true\n this.URLValue = this.context.value['@id']\n return true\n }\n else false\n })\n }\n};\n</script>\n\n<style lang=\"scss\" scoped>\n// @import '../../../styles/bootstrap_theme';\n// @import '../../../styles/utils/css-animations';\n.dURLText {}\n\n.file-div {\n display: flex;\n align-items: center;\n}\n\n.upload-feedback {\n padding: 10px;\n}\n\n/*** MATERIAL ICONS ***/\n%modal-icon {\n font-size: 20px;\n cursor: default;\n}\n\n.check-icon {\n @extend %modal-icon;\n color: #28a745;\n}\n\n.close-icon {\n @extend %modal-icon;\n color: red;\n}\n\n.lds-ring {\n display: inline-block;\n position: relative;\n width: 30px;\n height: 30px;\n}\n\n.lds-ring div {\n box-sizing: border-box;\n display: block;\n position: absolute;\n right: 0;\n width: 30px;\n height: 30px;\n border: 8px solid lightgray;\n border-radius: 50%;\n animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: lightgray transparent transparent transparent;\n}\n\n.lds-ring div:nth-child(1) {\n animation-delay: -0.45s;\n}\n\n.lds-ring div:nth-child(2) {\n animation-delay: -0.3s;\n}\n\n.lds-ring div:nth-child(3) {\n animation-delay: -0.15s;\n}\n\n.error {\n color: red;\n}\n\n.errorSub {\n color: black;\n}\n\n@keyframes lds-ring {\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.allowedFTypes {\n padding: 0.5rem;\n border-radius: 5px;\n border: 1px solid lightgrey;\n}\n\n.allowedTypesWrapper {\n max-width: 100%;\n display: flex;\n flex-wrap: wrap;\n}\n</style>\n"],"names":["__default__","mapGetters","getNode","mapActions","event","fileExtension","element","currentElement","rootElement","parentInputGroup","allInputGroupsNodeList","file","replaceEnabled","_c","_b","_a","wantsToReplace","_d","distributionIndexToReplace","_e","fileIndexToReplace","targetDistribution","_f","targetFile","_g","accessUrl","fileUploadUrl","fileId","helper","options","form","catalog","token","resolvedOptions","requestOptions","result","axios","path","err","drop","reactive","fLoad","ref","onClickOutside","triggerDropdown","onMounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0CAyEAA,KAAe;AAAA,EACb,OAAO;AAAA,IACL,SAAS;AAAA,MACP,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,EACF;AAAA,EACD,OAAO;AACL,WAAO;AAAA,MACL,OAAO;AAAA,MACP,UAAU;AAAA,MACV,WAAW;AAAA,MACX,kBAAkB;AAAA,MAClB,YAAY;AAAA,MACZ,WAAW;AAAA,MACX,SAAS;AAAA,MACT,MAAM;AAAA,MACN,iBAAiB,KAAK,KAAK,QAAQ,sBAAsB;AAAA,IAC/D;AAAA,EACG;AAAA,EACD,UAAU;AAAA,IAER,GAAGC,EAAW,QAAQ;AAAA,MACpB;AAAA,MACA;AAAA,IACN,CAAK;AAAA,IACD,GAAGA,EAAW,YAAY;AAAA,MACxB;AAAA,IACN,CAAK;AAAA,IACD,eAAe;AACb,aAAOC,EAAQ,cAAc,EAAE;AAAA,IAChC;AAAA,EACF;AAAA,EACD,SAAS;AAAA,IACP,GAAGC,EAAW,Y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"],"sourcesContent":["<template>\n <div class=\"position-relative w-100 p-3 \">\n <input type=\"text\" class=\"selectInputField formkit-inner\" readonly=\"readonly\" @click=\"triggerDropdown()\"\n placeholder=\"Choose between fileupload and providing a URL\">\n <ul ref=\"fLoad\" v-if=\"drop.active\" class=\"selectListUpload\">\n <li @click=\"triggerDropdown(); uploadFileSwitch = true; toggleUploadUrl()\"\n class=\"p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC\">Upload a file</li>\n <li @click=\"triggerDropdown(); uploadURL = true; toggleUploadFileSwitch()\"\n class=\"p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC\">Provide an URL</li>\n </ul>\n </div>\n <div class=\"w-100 p-3 position-relative\" v-if=\"uploadURL && !uploadFileSwitch\">\n <label class=\" formkit-label w-100\" for=\"aUrlLink\">Provide an URL</label>\n <input id=\"aUrlLink\" v-model=\"URLValue\" class=\"selectInputField formkit-inner\" type=\"url\" name=\"@id\"\n @input=\"saveUrl\" validation=\"alpha_spaces:latin\" validation-visibility=\"live\">\n\n </div>\n <div v-if=\"uploadFileSwitch\" ref=\"fileupload\" class=\"p-3 w-100\"\n :class=\"`formkit-input-element formkit-input-element--${context.type}`\" :data-type=\"context.type\" v-bind=\"$attrs\">\n <input type=\"text\" v-model=\"context.model\" @blur=\"context.blurHandler\" hidden />\n <div class=\"file-div position-relative\">\n <label class=\"formkit-label\" for=\"aUrlFL\">Upload a file</label>\n <input class=\"mt-3\" type=\"file\" id=\"aUrlFL\" name=\"fileUpload\" @change=\"validateFile($event)\"\n :accept=\"validExtensions\">\n <div class=\"upload-feedback position-absolute d-flex\" style=\"right: 0\">\n <div v-if=\"isLoading\" class=\"lds-ring\">\n </div>\n <div v-if=\"success\"><i class=\"material-icons d-flex check-icon\">check_circle</i></div>\n <div v-if=\"fail\"><i class=\"material-icons d-flex close-icon\">error</i></div>\n </div>\n </div>\n <p class=\"dURLText my-3\" v-if=\"success\">{{ $t('message.metadata.downloadUrl') }}: <a :href=\"context.model\">{{\n context.model }}</a></p>\n <div v-if=\"validExtensions && validExtensions.length\" class=\"allowedTypesWrapper\">\n <p class=\"errorSub my-3 d-flex \" v-if=\"!success\">Allowed types: </p>\n <span v-for=\"types in validExtensions\" :key=\"types\" class=\"mr-1 mb-1 allowedFTypes \">\n {{ types }}\n </span>\n </div>\n\n\n </div>\n\n</template>\n\n<script>\n/* eslint-disable consistent-return, no-unused-vars */\nimport { mapGetters, mapActions } from 'vuex';\nimport axios from 'axios';\nimport helper from '../utils/general-helper'\nimport { getNode } from '@formkit/core'\n\nimport { reactive, ref, onMounted, computed } from 'vue';\nimport { onClickOutside } from '@vueuse/core'\nimport { getCurrentInstance } from \"vue\";\nimport {useRuntimeEnv} from \"../../composables/useRuntimeEnv.ts\";\n\nexport default {\n props: {\n context: {\n type: Object,\n required: true,\n },\n },\n\n data() {\n return {\n error: '',\n URLValue: '',\n uploadURL: false,\n uploadFileSwitch: false,\n checkifSet: false,\n isLoading: false,\n success: false,\n fail: false,\n validExtensions: this.$env.content.dataProviderInterface.uploadFileTypes?.split(',') || []\n };\n },\n computed: {\n\n ...mapGetters('auth', [\n 'getUserData',\n 'getIsEditMode'\n ]),\n ...mapGetters('dpiStore', [\n 'getData',\n ]),\n getCatalogue() {\n return getNode('dcat:catalog').value;\n }\n },\n methods: {\n ...mapActions('dpiStore', [\n 'saveLocalstorageValues',\n ]),\n toggleUploadUrl() {\n if (this.uploadURL) { this.uploadURL = !this.uploadURL }\n },\n toggleUploadFileSwitch() {\n if (this.uploadFileSwitch) { this.uploadFileSwitch = !this.uploadFileSwitch }\n },\n validateFile(event) {\n const file = event.target.files[0];\n const fileExtension = '.' + file.name.split('.').pop().toLowerCase();\n if (this.validExtensions && this.validExtensions.length) {\n if (!this.validExtensions.includes(fileExtension)) {\n console.log('Wrong filetype');\n } else {\n this.uploadOrReplaceFile({ file: event.target.files[0] })\n }\n } else {\n this.error = \"\"\n this.uploadOrReplaceFile({ file: event.target.files[0] })\n }\n },\n async saveUrl() {\n\n if (this.URLValue.includes('http://') || this.URLValue.includes('https://')) {\n await this.context.node.input({ '@id': this.URLValue })\n }\n else await this.context.node.input({ '@id': 'https://' + this.URLValue })\n\n },\n checkIfPresent() {\n // console.log(this.context.value['@id']);\n if (this.context.value['@id']) {\n // console.log(this.context.value['@id']);\n this.URLValue = this.context.value['@id']\n return true\n }\n else false\n },\n // finds the parent input group of a given element.\n findParentInputGroupOfElement(element) {\n // Start with the given element.\n let currentElement = element;\n\n // Traverse the DOM tree upwards.\n while (currentElement) {\n // If the current element is an input group, return it.\n if (currentElement.classList.contains('formkit-input-group-repeatable')) {\n return currentElement;\n }\n // If not, move to the parent element.\n currentElement = currentElement.parentElement;\n }\n\n // If no input group was found, return null.\n return null;\n },\n // finds the index of the distribution access URL based on the root of this component.\n findDistributionAccessUrlIndex() {\n // todo: find a more stable way to find the index of the distribution access URL.\n // this way uses the DOM tree, which is not stable.\n\n // Start at the root of this component.\n const rootElement = this.$refs.fileupload;\n\n // Find the parent input group of the root element.\n const parentInputGroup = this.findParentInputGroupOfElement(rootElement);\n if (!parentInputGroup) return null;\n\n // Get the parent element of all input groups.\n const parentOfAllInputGroups = parentInputGroup.parentElement;\n const allInputGroupsNodeList = parentOfAllInputGroups.querySelectorAll('.formkit-input-group-repeatable');\n const allInputGroupsArray = Array.from(allInputGroupsNodeList);\n\n // Find the index of the parent input group within the array of all input groups.\n const indexOfParentInputGroup = allInputGroupsArray.indexOf(parentInputGroup);\n\n return indexOfParentInputGroup;\n },\n async uploadOrReplaceFile({ file }) {\n\n const replaceEnabled = this.$env?.content?.dataProviderInterface?.enableFileUploadReplace || false;\n const wantsToReplace = this.$route.query?.edit ?? false;\n\n if (replaceEnabled && wantsToReplace) {\n const distributionIndexToReplace = this.$route.query?.edit;\n const fileIndexToReplace = this.findDistributionAccessUrlIndex();\n\n const targetDistribution = this.getData('distributions')?.[distributionIndexToReplace];\n const targetFile = targetDistribution?.['dcat:accessURL']?.[fileIndexToReplace];\n const accessUrl = targetFile?.['@id'];\n if (accessUrl) {\n const fileUploadUrl = this.$env.api.fileUploadUrl;\n\n const fileId = helper.getFileIdByAccessUrl({ accessUrl, fileUploadUrl })\n\n return await this.uploadFile(file, {\n method: 'PUT',\n url: `${this.$env.api.fileUploadUrl}data/${fileId}?catalog=${this.getCatalogue}`,\n });\n }\n\n }\n\n return await this.uploadFile(file);\n },\n async uploadFile(file, options = {}) {\n\n this.isLoading = true;\n\n const form = new FormData();\n form.append('file', file);\n\n const catalog = this.getCatalogue;\n const token = this.getUserData.rtpToken;\n\n const resolvedOptions = {\n method: 'POST',\n url: `${this.$env.api.fileUploadUrl}data?catalog=${catalog}`,\n ...options,\n };\n\n const requestOptions = {\n method: resolvedOptions.method,\n url: resolvedOptions.url,\n headers: {\n 'Content-Type': 'multipart/form-data',\n Authorization: `Bearer ${token}`,\n },\n data: form,\n };\n\n try {\n\n const result = await axios.request(requestOptions);\n const path = result.data.result.location.substring(result.data.result.location.indexOf('/') + 1);\n this.context.model = `${this.$env.api.fileUploadUrl}${path}`;\n this.isLoading = false;\n this.success = true;\n await this.context.node.input({ '@id': `${this.$env.api.fileUploadUrl}${path}` })\n // this.context.rootEmit('change');\n\n } catch (err) {\n\n this.isLoading = false;\n this.fail = true;\n console.error(err); // eslint-disable-line\n }\n },\n },\n mounted() {\n\n this.$nextTick(function () {\n\n if (this.context.value['@id']) {\n this.uploadURL = true\n this.URLValue = this.context.value['@id']\n return true\n }\n else false\n })\n },\n setup() {\n\n// let instance = getCurrentInstance().appContext.app.config.globalProperties.$env\n const env = useRuntimeEnv();\n\n var drop = reactive({\n active: false,\n })\n\n const fLoad = ref(null);\n\n onClickOutside(fLoad, event => drop.active = false)\n function triggerDropdown(e) {\n drop.active = !drop.active\n }\n\n return {\n drop,\n onClickOutside,\n triggerDropdown,\n };\n }\n};\n</script>\n\n<style lang=\"scss\" scoped>\n// @import '../../../styles/bootstrap_theme';\n// @import '../../../styles/utils/css-animations';\n.dURLText {}\n\n.file-div {\n display: flex;\n align-items: center;\n}\n\n.upload-feedback {\n padding: 10px;\n}\n\n/*** MATERIAL ICONS ***/\n%modal-icon {\n font-size: 20px;\n cursor: default;\n}\n\n.check-icon {\n @extend %modal-icon;\n color: #28a745;\n}\n\n.close-icon {\n @extend %modal-icon;\n color: red;\n}\n\n.lds-ring {\n display: inline-block;\n position: relative;\n width: 30px;\n height: 30px;\n}\n\n.lds-ring div {\n box-sizing: border-box;\n display: block;\n position: absolute;\n right: 0;\n width: 30px;\n height: 30px;\n border: 8px solid lightgray;\n border-radius: 50%;\n animation: lds-ring 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;\n border-color: lightgray transparent transparent transparent;\n}\n\n.lds-ring div:nth-child(1) {\n animation-delay: -0.45s;\n}\n\n.lds-ring div:nth-child(2) {\n animation-delay: -0.3s;\n}\n\n.lds-ring div:nth-child(3) {\n animation-delay: -0.15s;\n}\n\n.error {\n color: red;\n}\n\n.errorSub {\n color: black;\n}\n\n@keyframes lds-ring {\n 0% {\n transform: rotate(0deg);\n }\n\n 100% {\n transform: rotate(360deg);\n }\n}\n\n.allowedFTypes {\n padding: 0.5rem;\n border-radius: 5px;\n border: 1px solid lightgrey;\n}\n\n.allowedTypesWrapper {\n max-width: 100%;\n display: flex;\n flex-wrap: wrap;\n}\n</style>\n"],"names":["_sfc_main","_a","mapGetters","getNode","mapActions","event","fileExtension","element","currentElement","rootElement","parentInputGroup","allInputGroupsNodeList","file","replaceEnabled","_c","_b","wantsToReplace","_d","distributionIndexToReplace","_e","fileIndexToReplace","targetDistribution","_f","targetFile","_g","accessUrl","fileUploadUrl","fileId","helper","options","form","catalog","token","resolvedOptions","requestOptions","result","axios","path","err","useRuntimeEnv","drop","reactive","fLoad","ref","onClickOutside","triggerDropdown","e","_hoisted_1","_createElementVNode","_hoisted_5","_hoisted_6","_hoisted_8","_hoisted_12","_withScopeId","_hoisted_15","_hoisted_18","_openBlock","_createElementBlock","_Fragment","$setup","_createTextVNode","_hoisted_2","_cache","$event","$data","$options","_createCommentVNode","_hoisted_3","_hoisted_4","args","_mergeProps","$props","_ctx","_vModelText","_hoisted_7","_hoisted_9","_hoisted_10","_hoisted_11","_hoisted_13","_hoisted_14","_hoisted_16","_hoisted_17","_toDisplayString","_hoisted_19","_hoisted_20","_renderList","types"],"mappings":";;;;;;;;;AAyDA,MAAKA,IAAU;AAAA,EACb,OAAO;AAAA,IACL,SAAS;AAAA,MACP,MAAM;AAAA,MACN,UAAU;AAAA,IACX;AAAA,EACF;AAAA,EAED,OAAO;;AACL,WAAO;AAAA,MACL,OAAO;AAAA,MACP,UAAU;AAAA,MACV,WAAW;AAAA,MACX,kBAAkB;AAAA,MAClB,YAAY;AAAA,MACZ,WAAW;AAAA,MACX,SAAS;AAAA,MACT,MAAM;AAAA,MACN,mBAAiBC,IAAA,KAAK,KAAK,QAAQ,sBAAsB,oBAAxC,gBAAAA,EAAyD,MAAM,SAAQ,CAAC;AAAA;EAE5F;AAAA,EACD,UAAU;AAAA,IAER,GAAGC,EAAW,QAAQ;AAAA,MACpB;AAAA,MACA;AAAA,IACF,CAAC;AAAA,IACD,GAAGA,EAAW,YAAY;AAAA,MACxB;AAAA,IACF,CAAC;AAAA,IACD,eAAe;AACb,aAAOC,EAAQ,cAAc,EAAE;AAAA,IACjC;AAAA,EACD;AAAA,EACD,SAAS;AAAA,IACP,GAAGC,EAAW,YAAY;AAAA,MACxB;AAAA,IACF,CAAC;AAAA,IACD,kBAAkB;AAChB,MAAI,KAAK,cAAa,KAAK,YAAY,CAAC,KAAK;AAAA,IAC9C;AAAA,IACD,yBAAyB;AACvB,MAAI,KAAK,qBAAoB,KAAK,mBAAmB,CAAC,KAAK;AAAA,IAC5D;AAAA,IACD,aAAaC,GAAO;AAElB,YAAMC,IAAgB,MADTD,EAAM,OAAO,MAAM,CAAC,EACA,KAAK,MAAM,GAAG,EAAE,MAAM;AACvD,MAAI,KAAK,mBAAmB,KAAK,gBAAgB,SAC1C,KAAK,gBA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;AAAA,IAAA,GAAA,IAAAjB,CAAA,KAAAiB,EAAA,IAAA,EAAA;AAAA;;;"}
@@ -9,7 +9,7 @@ declare const _default: import('vue').DefineComponent<{
9
9
  showMultilingualValue(property: any, value: any): boolean | "";
10
10
  checkadms(str: any): any;
11
11
  showValue(property: any, value: any): boolean | undefined;
12
- filterDateFormatEU(date: any): string;
12
+ filterDateFormatEU(date: any): any;
13
13
  convertTemporalResolution(data: any): string;
14
14
  }, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
15
15
  property: StringConstructor;
@@ -13,11 +13,7 @@ declare const _default: import('vue').DefineComponent<Readonly<{
13
13
  away(): void;
14
14
  replaceHttp: typeof replaceHttp;
15
15
  setClipboard(value: any): void;
16
- }, {
17
- directives: {
18
- ClickAway: import('vue').Directive;
19
- };
20
- }, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<Readonly<{
16
+ }, any, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<Readonly<{
21
17
  title?: any;
22
18
  message?: any;
23
19
  distribution?: any;