@piveau/piveau-hub-ui-modules 4.0.23 → 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,12 +19,15 @@ declare const _default: import('vue').DefineComponent<{
12
19
  isLoading: boolean;
13
20
  success: boolean;
14
21
  fail: boolean;
22
+ validExtensions: any;
15
23
  }, {
16
24
  getCatalogue(): unknown;
17
25
  getData: import('vuex').Computed;
18
26
  getUserData: import('vuex').Computed;
19
27
  getIsEditMode: import('vuex').Computed;
20
28
  }, {
29
+ toggleUploadUrl(): void;
30
+ toggleUploadFileSwitch(): void;
21
31
  validateFile(event: any): void;
22
32
  saveUrl(): Promise<void>;
23
33
  checkIfPresent(): true | undefined;
@@ -1,37 +1,13 @@
1
- import { getCurrentInstance as x, reactive as O, ref as S, computed as C, onMounted as E, openBlock as r, createElementBlock as d, Fragment as L, createElementVNode as a, createTextVNode as s, unref as V, createCommentVNode as f, withDirectives as b, vModelText as k, mergeProps as A, toDisplayString as g, renderList as T, pushScopeId as P, popScopeId as G } from "vue";
2
- import { onClickOutside as D } from "../../external/@vueuse/core/index";
3
- import { mapGetters as I, mapActions as q } from "vuex";
4
- import B from "axios";
5
- import N from "../utils/general-helper.mjs";
6
- import { getNode as H } 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 M from "../../_virtual/_plugin-vue_export-helper.mjs";
9
- const h = (t) => (P("data-v-798d4239"), t = t(), G(), t), _ = { class: "position-relative w-100 p-3" }, j = {
10
- key: 0,
11
- class: "w-100 p-3 position-relative"
12
- }, W = /* @__PURE__ */ h(() => /* @__PURE__ */ a("label", {
13
- class: "formkit-label w-100",
14
- for: "aUrlLink"
15
- }, "Provide an URL", -1)), z = ["data-type"], J = { class: "file-div position-relative" }, K = /* @__PURE__ */ h(() => /* @__PURE__ */ a("label", {
16
- class: "formkit-label",
17
- for: "aUrlFL"
18
- }, "Upload a file", -1)), Q = ["accept"], X = {
19
- class: "upload-feedback position-absolute d-flex",
20
- style: { right: "0" }
21
- }, Y = {
22
- key: 0,
23
- class: "lds-ring"
24
- }, Z = { key: 1 }, ee = /* @__PURE__ */ h(() => /* @__PURE__ */ a("i", { class: "material-icons d-flex check-icon" }, "check_circle", -1)), te = [
25
- ee
26
- ], le = { key: 2 }, ie = /* @__PURE__ */ h(() => /* @__PURE__ */ a("i", { class: "material-icons d-flex close-icon" }, "error", -1)), oe = [
27
- ie
28
- ], ae = {
29
- key: 0,
30
- class: "dURLText my-3"
31
- }, se = ["href"], ne = {
32
- key: 1,
33
- class: "errorSub my-3 d-flex"
34
- }, re = { class: "allowedTypesWrapper" }, de = {
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) => (P("data-v-798d4239"), t = t(), G(), t), _ = { class: "position
39
15
  }
40
16
  },
41
17
  data() {
18
+ var t;
42
19
  return {
43
20
  error: "",
44
21
  URLValue: "",
@@ -47,28 +24,35 @@ const h = (t) => (P("data-v-798d4239"), t = t(), G(), t), _ = { class: "position
47
24
  checkifSet: !1,
48
25
  isLoading: !1,
49
26
  success: !1,
50
- fail: !1
27
+ fail: !1,
28
+ validExtensions: ((t = this.$env.content.dataProviderInterface.uploadFileTypes) == null ? void 0 : t.split(",")) || []
51
29
  };
52
30
  },
53
31
  computed: {
54
- ...I("auth", [
32
+ ...y("auth", [
55
33
  "getUserData",
56
34
  "getIsEditMode"
57
35
  ]),
58
- ...I("dpiStore", [
36
+ ...y("dpiStore", [
59
37
  "getData"
60
38
  ]),
61
39
  getCatalogue() {
62
- return H("dcat:catalog").value;
40
+ return V("dcat:catalog").value;
63
41
  }
64
42
  },
65
43
  methods: {
66
- ...q("dpiStore", [
44
+ ...E("dpiStore", [
67
45
  "saveLocalstorageValues"
68
46
  ]),
47
+ toggleUploadUrl() {
48
+ this.uploadURL && (this.uploadURL = !this.uploadURL);
49
+ },
50
+ toggleUploadFileSwitch() {
51
+ this.uploadFileSwitch && (this.uploadFileSwitch = !this.uploadFileSwitch);
52
+ },
69
53
  validateFile(t) {
70
- const n = "." + t.target.files[0].name.split(".").pop().toLowerCase();
71
- validExtensions != null ? validExtensions.length != 0 && (validExtensions.includes(n) ? 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] }));
72
56
  },
73
57
  async saveUrl() {
74
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 });
@@ -79,29 +63,29 @@ const h = (t) => (P("data-v-798d4239"), t = t(), G(), t), _ = { class: "position
79
63
  },
80
64
  // finds the parent input group of a given element.
81
65
  findParentInputGroupOfElement(t) {
82
- let o = t;
83
- for (; o; ) {
84
- if (o.classList.contains("formkit-input-group-repeatable"))
85
- return o;
86
- 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;
87
71
  }
88
72
  return null;
89
73
  },
90
74
  // finds the index of the distribution access URL based on the root of this component.
91
75
  findDistributionAccessUrlIndex() {
92
- const t = this.$refs.fileupload, o = this.findParentInputGroupOfElement(t);
93
- if (!o)
76
+ const t = this.$refs.fileupload, e = this.findParentInputGroupOfElement(t);
77
+ if (!e)
94
78
  return null;
95
- const u = o.parentElement.querySelectorAll(".formkit-input-group-repeatable");
96
- return Array.from(u).indexOf(o);
79
+ const n = e.parentElement.querySelectorAll(".formkit-input-group-repeatable");
80
+ return Array.from(n).indexOf(e);
97
81
  },
98
82
  async uploadOrReplaceFile({ file: t }) {
99
- var u, p, c, e, l, i, m;
100
- const o = ((c = (p = (u = this.$env) == null ? void 0 : u.content) == null ? void 0 : p.dataProviderInterface) == null ? void 0 : c.enableFileUploadReplace) || !1, n = ((e = this.$route.query) == null ? void 0 : e.edit) ?? !1;
101
- if (o && n) {
102
- const w = (l = this.$route.query) == null ? void 0 : l.edit, R = this.findDistributionAccessUrlIndex(), v = (i = this.getData("distributions")) == null ? void 0 : i[w], U = (m = v == null ? void 0 : v["dcat:accessURL"]) == null ? void 0 : m[R], y = U == null ? void 0 : U["@id"];
103
- if (y) {
104
- const $ = this.$env.api.fileUploadUrl, F = N.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 });
105
89
  return await this.uploadFile(t, {
106
90
  method: "PUT",
107
91
  url: `${this.$env.api.fileUploadUrl}data/${F}?catalog=${this.getCatalogue}`
@@ -110,28 +94,28 @@ const h = (t) => (P("data-v-798d4239"), t = t(), G(), t), _ = { class: "position
110
94
  }
111
95
  return await this.uploadFile(t);
112
96
  },
113
- async uploadFile(t, o = {}) {
97
+ async uploadFile(t, e = {}) {
114
98
  this.isLoading = !0;
115
- const n = new FormData();
116
- n.append("file", t);
117
- const u = this.getCatalogue, p = this.getUserData.rtpToken, c = {
99
+ const o = new FormData();
100
+ o.append("file", t);
101
+ const n = this.getCatalogue, i = this.getUserData.rtpToken, r = {
118
102
  method: "POST",
119
- url: `${this.$env.api.fileUploadUrl}data?catalog=${u}`,
120
- ...o
121
- }, e = {
122
- method: c.method,
123
- url: c.url,
103
+ url: `${this.$env.api.fileUploadUrl}data?catalog=${n}`,
104
+ ...e
105
+ }, l = {
106
+ method: r.method,
107
+ url: r.url,
124
108
  headers: {
125
109
  "Content-Type": "multipart/form-data",
126
- Authorization: `Bearer ${p}`
110
+ Authorization: `Bearer ${i}`
127
111
  },
128
- data: n
112
+ data: o
129
113
  };
130
114
  try {
131
- const l = await B.request(e), i = l.data.result.location.substring(l.data.result.location.indexOf("/") + 1);
132
- this.context.model = `${this.$env.api.fileUploadUrl}${i}`, this.isLoading = !1, this.success = !0, await this.context.node.input({ "@id": `${this.$env.api.fileUploadUrl}${i}` });
133
- } catch (l) {
134
- this.isLoading = !1, this.fail = !0, console.error(l);
115
+ const p = await S.request(l), f = p.data.result.location.substring(p.data.result.location.indexOf("/") + 1);
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}` });
117
+ } catch (p) {
118
+ this.isLoading = !1, this.fail = !0, console.error(p);
135
119
  }
136
120
  }
137
121
  },
@@ -140,126 +124,157 @@ const h = (t) => (P("data-v-798d4239"), t = t(), G(), t), _ = { class: "position
140
124
  if (this.context.value["@id"])
141
125
  return this.uploadURL = !0, this.URLValue = this.context.value["@id"], !0;
142
126
  });
143
- }
144
- }, ue = /* @__PURE__ */ Object.assign(de, {
145
- __name: "FileUpload",
146
- setup(t) {
147
- let o = x().appContext.app.config.globalProperties.$env;
148
- var n = O({
127
+ },
128
+ setup() {
129
+ q();
130
+ var t = A({
149
131
  active: !1
150
132
  });
151
- const u = S(null);
152
- D(u, (e) => n.active = !1);
153
- function p(e) {
154
- n.active = !n.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
- const c = C(() => o.content.dataProviderInterface.uploadFileTypes.split(","));
157
- return E(async () => {
158
- }), (e, l) => (r(), d(L, null, [
159
- a("div", _, [
160
- a("input", {
161
- type: "text",
162
- class: "selectInputField formkit-inner",
163
- readonly: "readonly",
164
- onClick: l[0] || (l[0] = (i) => p()),
165
- placeholder: "Choose between fileupload and providing a URL"
166
- }),
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"),
167
195
  s(),
168
- V(n).active ? (r(), d("ul", {
169
- key: 0,
170
- ref_key: "fLoad",
171
- ref: u,
172
- class: "selectListUpload"
173
- }, [
174
- a("li", {
175
- onClick: l[1] || (l[1] = (i) => {
176
- p(), e.uploadFileSwitch = !0, e.uploadURL && (e.uploadURL = !e.uploadURL);
177
- }),
178
- class: "p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC"
179
- }, "Upload a file"),
180
- s(),
181
- a("li", {
182
- onClick: l[2] || (l[2] = (i) => {
183
- p(), e.uploadURL = !0, e.uploadFileSwitch && (e.uploadFileSwitch = !e.uploadFileSwitch);
184
- }),
185
- class: "p-2 border-b border-gray-200 data-[selected=true]:bg-blue-100 choosableItemsAC"
186
- }, "Provide an URL")
187
- ], 512)) : f("", !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]
188
235
  ]),
189
236
  s(),
190
- e.uploadURL && !e.uploadFileSwitch ? (r(), d("div", j, [
191
- W,
237
+ a("div", J, [
238
+ K,
192
239
  s(),
193
- b(a("input", {
194
- id: "aUrlLink",
195
- "onUpdate:modelValue": l[3] || (l[3] = (i) => e.URLValue = i),
196
- class: "selectInputField formkit-inner",
197
- type: "url",
198
- name: "@id",
199
- onInput: l[4] || (l[4] = (...i) => e.saveUrl && e.saveUrl(...i)),
200
- validation: "alpha_spaces:latin",
201
- "validation-visibility": "live"
202
- }, null, 544), [
203
- [k, e.URLValue]
204
- ])
205
- ])) : f("", !0),
206
- s(),
207
- e.uploadFileSwitch ? (r(), d("div", A({
208
- key: 1,
209
- ref: "fileupload",
210
- class: ["p-3 w-100", `formkit-input-element formkit-input-element--${t.context.type}`],
211
- "data-type": t.context.type
212
- }, e.$attrs), [
213
- b(a("input", {
214
- type: "text",
215
- "onUpdate:modelValue": l[5] || (l[5] = (i) => t.context.model = i),
216
- onBlur: l[6] || (l[6] = (...i) => t.context.blurHandler && t.context.blurHandler(...i)),
217
- hidden: ""
218
- }, null, 544), [
219
- [k, t.context.model]
220
- ]),
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),
221
248
  s(),
222
- a("div", J, [
223
- K,
249
+ a("div", X, [
250
+ i.isLoading ? (d(), c("div", Y)) : u("", !0),
224
251
  s(),
225
- a("input", {
226
- class: "mt-3",
227
- type: "file",
228
- id: "aUrlFL",
229
- name: "fileUpload",
230
- onChange: l[7] || (l[7] = (i) => e.validateFile(i)),
231
- accept: c.value
232
- }, null, 40, Q),
252
+ i.success ? (d(), c("div", Z, ee)) : u("", !0),
233
253
  s(),
234
- a("div", X, [
235
- e.isLoading ? (r(), d("div", Y)) : f("", !0),
236
- s(),
237
- e.success ? (r(), d("div", Z, te)) : f("", !0),
238
- s(),
239
- e.fail ? (r(), d("div", le, oe)) : f("", !0)
240
- ])
241
- ]),
242
- s(),
243
- e.success ? (r(), d("p", ae, [
244
- s(g(e.$t("message.metadata.downloadUrl")) + ": ", 1),
245
- a("a", {
246
- href: t.context.model
247
- }, g(t.context.model), 9, se)
248
- ])) : f("", !0),
249
- s(),
250
- e.success ? f("", !0) : (r(), d("p", ne, "Allowed types: ")),
251
- s(),
252
- a("div", re, [
253
- (r(!0), d(L, null, T(c.value, (i, m) => (r(), d("span", {
254
- key: i,
255
- class: "mr-1 mb-1 allowedFTypes"
256
- }, g(i), 1))), 128))
254
+ i.fail ? (d(), c("div", te, le)) : u("", !0)
257
255
  ])
258
- ], 16, z)) : f("", !0)
259
- ], 64));
260
- }
261
- }), ye = /* @__PURE__ */ M(ue, [["__scopeId", "data-v-798d4239"]]);
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"]]);
262
277
  export {
263
- ye as default
278
+ ge as default
264
279
  };
265
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, computed } from 'vue';\nimport { onClickOutside } from '@vueuse/core'\nimport { getCurrentInstance } from \"vue\";\n\nlet instance = getCurrentInstance().appContext.app.config.globalProperties.$env\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}\nconst validExtensions = computed(() => {\n let arr = instance.content.dataProviderInterface.uploadFileTypes.split(',')\n return arr\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\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\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","instance","getCurrentInstance","drop","reactive","fLoad","ref","onClickOutside","triggerDropdown","validExtensions","computed","onMounted"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0CA8EAA,KAAe;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,MAC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F,GAAO,CAAAvC,MAASqC,EAAK,SAAS,EAAK;AAClD,aAASK,EAAgB,GAAG;AAC1B,MAAAL,EAAK,SAAS,CAACA,EAAK;AAAA,IACtB;AACA,UAAMM,IAAkBC,EAAS,MACrBT,EAAS,QAAQ,sBAAsB,gBAAgB,MAAM,GAAG,CAE3E;AAED,WAAAU,EAAU,YAAY;AAAA,IACtB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"FileUpload.vue.mjs","sources":["../../../lib/data-provider-interface/components/FileUpload.vue"],"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,E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W,EAAA,IAAA,EAAA;AAAA,MAAAN,EAAA;AAAA,MAiCeI,EAAe,mBAAIA,EAAe,gBAAC,UAA9CR,KAAAC,EAKM,OALN0B,IAKM;AAAA,QAJoCnB,EAAO,UAlCrDE,EAAA,IAAA,EAAA,UAkCMT,EAAoE,KAApE2B,IAAiD,iBAAe;AAAA,QAlCtExB,EAAA;AAAA,SAmCMJ,EAAA,EAAA,GAAAC,EAEOC,GArCb,MAAA2B,EAmC4BrB,EAAe,iBAnC3C,CAmCmBsB,YAAb7B,EAEO,QAAA;AAAA,UAFiC,KAAK6B;AAAA,UAAO,OAAM;AAAA,aACrDA,CAAK,GAAA,CAAA;YApChBpB,EAAA,IAAA,EAAA;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;