@piveau/dpi 0.1.0-beta.68 → 0.1.0-beta.69

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.
@@ -147,24 +147,24 @@ const yt = {
147
147
  setup(f, { emit: _e }) {
148
148
  const e = f, R = i(null), q = i(null), B = i(null), z = i(null), M = i(null), P = i(null), v = _e, $ = i(!1), W = i(!1), E = i(!1), O = i(!1), H = i(!1), N = i(!1), j = i(!1);
149
149
  i(!1);
150
- const ce = i(!1), Z = i(!1), G = i(!1), J = i(!1), K = i(!1), Q = i(!1), X = i(!1), Y = i(!1), ee = i(!1), te = i(!1), I = i([]), r = i({ key: "", text: "" }), Ie = i(null), ae = i(!1), C = i(null), ie = i(null);
150
+ const ce = i(!1), Z = i(!1), G = i(!1), J = i(!1), K = i(!1), Q = i(!1), X = i(!1), Y = i(!1), ee = i(!1), te = i(!1), I = i([]), n = i({ key: "", text: "" }), Ie = i(null), ae = i(!1), C = i(null), ie = i(null);
151
151
  i([...e.fileTypes]);
152
152
  const xe = i([]), De = i([]);
153
153
  i(null);
154
154
  const Le = i(!1), ue = i(""), me = i(""), pe = i(""), Ce = i(""), b = i({}), T = i({}), V = i({}), _ = i({}), fe = i(""), ve = i(""), ye = i(""), he = i(0), ke = i(""), ge = i(""), be = i(""), w = i(""), U = i(""), we = i(""), F = i(""), A = i(""), se = i(!0);
155
155
  i(!0);
156
156
  const Ue = (a, t) => {
157
- se.value = !1, r.value = {
157
+ se.value = !1, n.value = {
158
158
  key: e.sections[a].keys[t],
159
159
  text: e.sections[a].items[t]
160
160
  }, b.value[e.distributionId] || (b.value[e.distributionId] = []), T.value[e.distributionId] || (T.value[e.distributionId] = []), V.value[e.distributionId] || (V.value[e.distributionId] = []), _.value[e.distributionId] || (_.value[e.distributionId] = []);
161
161
  }, oe = () => {
162
- se.value = !0, r.value = { key: "", text: "" };
162
+ se.value = !0, n.value = { key: "", text: "" };
163
163
  }, Fe = () => {
164
164
  const a = (t) => {
165
165
  if (!t || t.trim() === "") return !1;
166
- const n = t.trim();
167
- return /\.[a-zA-Z]{2,}$/.test(n);
166
+ const r = t.trim();
167
+ return /\.[a-zA-Z]{2,}$/.test(r);
168
168
  };
169
169
  if (E.value) {
170
170
  const t = V.value[e.distributionId] || [];
@@ -198,13 +198,13 @@ const yt = {
198
198
  m.length > 0 && v("addPolicyItems", e.distributionId, m), O.value = !1;
199
199
  }
200
200
  if ($.value) {
201
- const t = b.value[e.distributionId] || [], n = (s) => {
201
+ const t = b.value[e.distributionId] || [], r = (s) => {
202
202
  const p = s["dct:title"] && s["dct:title"].trim() !== "", k = s["dct:description"] && s["dct:description"].trim() !== "", x = s["dct:format"] && s["dct:format"].trim !== "" && (typeof s["dct:format"] == "string" ? s["dct:format"].trim() !== "" : !0);
203
203
  return p || k || x;
204
204
  };
205
205
  if (t.some((s) => {
206
206
  const p = s["dcat:accessURL"] ? s["dcat:accessURL"].trim() : "";
207
- return !!(n(s) && (!p || !a(p)) || p && !a(p));
207
+ return !!(r(s) && (!p || !a(p)) || p && !a(p));
208
208
  })) {
209
209
  q.value && q.value.validateAllItems();
210
210
  return;
@@ -220,13 +220,13 @@ const yt = {
220
220
  ), $.value = !1;
221
221
  }
222
222
  if (W.value) {
223
- const t = T.value[e.distributionId] || [], n = (s) => {
223
+ const t = T.value[e.distributionId] || [], r = (s) => {
224
224
  const p = s["dct:title"] && s["dct:title"].trim() !== "", k = s["dct:description"] && s["dct:description"].trim() !== "";
225
225
  return p || k;
226
226
  };
227
227
  if (t.some((s) => {
228
228
  const p = s["dcat:downloadURL"] ? s["dcat:downloadURL"].trim() : "";
229
- return !!(n(s) && (!p || !a(p)) || p && !a(p));
229
+ return !!(r(s) && (!p || !a(p)) || p && !a(p));
230
230
  })) {
231
231
  B.value && B.value.validateAllItems();
232
232
  return;
@@ -242,12 +242,12 @@ const yt = {
242
242
  ), W.value = !1;
243
243
  }
244
244
  if (H.value && (v("addModifiedDate", ue.value, e.distributionId), H.value = !1), N.value && (v("addIssuedDate", me.value, e.distributionId), N.value = !1), j.value && (v("addDescription", pe.value, e.distributionId), j.value = !1), ce.value && (v("addAccessRights", Ce.value, e.distributionId), ce.value = !1), Z.value && (v("addAvailability", fe.value, e.distributionId, e.uri), Z.value = !1), Y.value && (v("addStatus", ve.value, e.distributionId), Y.value = !1), ee.value) {
245
- const t = w.value && w.value.trim() !== "", n = U.value && U.value.trim() !== "";
246
- if ((t || n) && (!t || !n)) {
245
+ const t = w.value && w.value.trim() !== "", r = U.value && U.value.trim() !== "";
246
+ if ((t || r) && (!t || !r)) {
247
247
  z.value && z.value.validateAllItems();
248
248
  return;
249
249
  }
250
- t && n && v(
250
+ t && r && v(
251
251
  "addChecksum",
252
252
  w.value,
253
253
  U.value,
@@ -256,13 +256,13 @@ const yt = {
256
256
  ), ee.value = !1;
257
257
  }
258
258
  if (te.value) {
259
- const t = typeof A.value == "string" ? A.value.trim() : "", n = typeof F.value == "string" ? F.value.trim() : "";
260
- if (t && (t.toLowerCase().includes("cc-by") || t.toLowerCase().includes("cc by")) && !n || // by- license without attribution
261
- n && !t) {
259
+ const t = typeof A.value == "string" ? A.value.trim() : "", r = typeof F.value == "string" ? F.value.trim() : "";
260
+ if (t && (t.toLowerCase().includes("cc-by") || t.toLowerCase().includes("cc by")) && !r || // by- license without attribution
261
+ r && !t) {
262
262
  M.value && M.value.validate();
263
263
  return;
264
264
  }
265
- (t || n) && v(
265
+ (t || r) && v(
266
266
  "addChangeLicense",
267
267
  F.value,
268
268
  A.value,
@@ -289,7 +289,7 @@ const yt = {
289
289
  Je(
290
290
  () => e.sections,
291
291
  (a) => {
292
- Array.isArray(a) && a.length > 0 && (I.value = a.map((t, n) => n === 0));
292
+ Array.isArray(a) && a.length > 0 && (I.value = a.map((t, r) => r === 0));
293
293
  },
294
294
  { immediate: !0 }
295
295
  );
@@ -312,9 +312,9 @@ const yt = {
312
312
  } catch (m) {
313
313
  console.error("Failed to load planned availability data", m);
314
314
  }
315
- const n = a.appContext.app.config.globalProperties.$i18n.locale;
315
+ const r = a.appContext.app.config.globalProperties.$i18n.locale;
316
316
  try {
317
- const m = await tt(t.api.baseUrl, n);
317
+ const m = await tt(t.api.baseUrl, r);
318
318
  De.value = m.map((l) => ({
319
319
  "@value": l.label,
320
320
  label: l.label
@@ -343,8 +343,8 @@ const yt = {
343
343
  ve.value = a, Y.value = !0;
344
344
  }, Oe = (a, t) => {
345
345
  console.log(e.checksumURI), ee.value = !0, U.value = t, w.value = a;
346
- }, He = (a, t, n, m) => {
347
- console.log(a, t, n, m), te.value = !0, A.value = t, F.value = a;
346
+ }, He = (a, t, r, m) => {
347
+ console.log(a, t, r, m), te.value = !0, A.value = t, F.value = a;
348
348
  }, Ne = (a) => {
349
349
  ye.value = a, G.value = !0;
350
350
  }, de = (a, t) => {
@@ -370,7 +370,7 @@ const yt = {
370
370
  se.value ? (o(), c("div", yt, [
371
371
  u("div", {
372
372
  class: S(["dpiV3_modalWrap", {
373
- dpiV3_optionalInfo: e.optionalInfoView || r.value.key === "foaf:page"
373
+ dpiV3_optionalInfo: e.optionalInfoView || n.value.key === "foaf:page"
374
374
  }])
375
375
  }, [
376
376
  u("div", {
@@ -421,10 +421,10 @@ const yt = {
421
421
  ])) : d("", !0),
422
422
  e.optionalInfoView ? (o(), c("div", Lt, [
423
423
  u("div", Ct, [
424
- (o(!0), c(D, null, Ve(f.sections, (n, m) => (o(), c(D, { key: m }, [
424
+ (o(!0), c(D, null, Ve(f.sections, (r, m) => (o(), c(D, { key: m }, [
425
425
  u("div", wt, [
426
426
  u("div", Ut, [
427
- u("div", null, h(n.title), 1),
427
+ u("div", null, h(r.title), 1),
428
428
  u("div", Ft, [
429
429
  y(Ye, {
430
430
  onClick: (l) => Ae(m),
@@ -433,7 +433,7 @@ const yt = {
433
433
  ])
434
434
  ])
435
435
  ]),
436
- I.value[m] ? (o(!0), c(D, { key: 0 }, Ve(n.items, (l, s) => (o(), c(D, { key: s }, [
436
+ I.value[m] ? (o(!0), c(D, { key: 0 }, Ve(r.items, (l, s) => (o(), c(D, { key: s }, [
437
437
  t[4] || (t[4] = u("div", { class: "dpiV3_itemDivider" }, null, -1)),
438
438
  u("div", {
439
439
  class: "dpiV3_itemOptional",
@@ -446,129 +446,129 @@ const yt = {
446
446
  ])) : d("", !0)
447
447
  ], 2)
448
448
  ])) : d("", !0),
449
- r.value.key ? (o(), c("div", Rt, [
449
+ n.value.key ? (o(), c("div", Rt, [
450
450
  u("div", {
451
451
  class: S(["dpiV3_modalWrap", {
452
- dpiV3_removeOverflow: r.value.key === "dcatap:availability" || r.value.key === "dct:language" || r.value.key === "dcat:mediaType" || r.value.key === "dcat:compressFormat" || r.value.key === "dcat:packageFormat" || r.value.key === "spdx:checksum" || r.value.key === "adms:status"
452
+ dpiV3_removeOverflow: n.value.key === "dcatap:availability" || n.value.key === "dcat:mediaType" || n.value.key === "dcat:compressFormat" || n.value.key === "dcat:packageFormat" || n.value.key === "spdx:checksum" || n.value.key === "adms:status"
453
453
  }])
454
454
  }, [
455
455
  u("div", qt, [
456
- u("h2", null, h(r.value.text) + " " + h(a.$t("message.dataupload.datasets.dcat:distribution.modal.add_small")), 1),
456
+ u("h2", null, h(n.value.text) + " " + h(a.$t("message.dataupload.datasets.dcat:distribution.modal.add_small")), 1),
457
457
  y(re, {
458
458
  class: "dpiv3_modalCrossout",
459
459
  onClick: oe
460
460
  })
461
461
  ]),
462
- r.value.key === "dcatap:availability" ? (o(), c("p", Bt, h(a.$t(
462
+ n.value.key === "dcatap:availability" ? (o(), c("p", Bt, h(a.$t(
463
463
  "message.dataupload.datasets.dcat:distribution.modal.availability_paragraph"
464
464
  )), 1)) : d("", !0),
465
- r.value.key === "dcat:byteSize" ? (o(), c("p", zt, h(a.$t(
465
+ n.value.key === "dcat:byteSize" ? (o(), c("p", zt, h(a.$t(
466
466
  "message.dataupload.datasets.dcat:distribution.modal.byte-size-paragraph"
467
467
  )), 1)) : d("", !0),
468
- r.value.key === "foaf:page" ? (o(), c("p", Mt, h(a.$t(
468
+ n.value.key === "foaf:page" ? (o(), c("p", Mt, h(a.$t(
469
469
  "message.dataupload.datasets.dcat:distribution.modal.documentation-paragraph"
470
470
  )), 1)) : d("", !0),
471
- r.value.key === "dct:modified" ? (o(), c("div", Pt, [
471
+ n.value.key === "dct:modified" ? (o(), c("div", Pt, [
472
472
  y(it, {
473
473
  modelValue: f.modifiedDate,
474
474
  onAddModifiedDate: Me
475
475
  }, null, 8, ["modelValue"])
476
476
  ])) : d("", !0),
477
- r.value.key === "dct:issued" ? (o(), c("div", $t, [
477
+ n.value.key === "dct:issued" ? (o(), c("div", $t, [
478
478
  y(dt, {
479
479
  modelValue: f.issuedDate,
480
- labelText: r.value.text + " (optional)",
480
+ labelText: n.value.text + " (optional)",
481
481
  onAddIssuedDate: Pe
482
482
  }, null, 8, ["modelValue", "labelText"])
483
483
  ])) : d("", !0),
484
- r.value.key === "dct:description" ? (o(), c("div", Wt, [
484
+ n.value.key === "dct:description" ? (o(), c("div", Wt, [
485
485
  y(st, {
486
486
  onAddDescription: $e,
487
487
  descriptionText: f.descriptionText
488
488
  }, null, 8, ["descriptionText"])
489
489
  ])) : d("", !0),
490
- r.value.key === "foaf:page" ? (o(), c("div", Et, [
490
+ n.value.key === "foaf:page" ? (o(), c("div", Et, [
491
491
  y(at, {
492
492
  ref_key: "documentationsV3Ref",
493
493
  ref: q,
494
494
  documentations: b.value[e.distributionId] || [],
495
495
  fileTypes: f.fileTypes,
496
- onUpdate: t[0] || (t[0] = (n) => Re(e.distributionId, n)),
496
+ onUpdate: t[0] || (t[0] = (r) => Re(e.distributionId, r)),
497
497
  distributionId: e.distributionId
498
498
  }, null, 8, ["documentations", "fileTypes", "distributionId"])
499
499
  ])) : d("", !0),
500
- r.value.key === "dcat:accessService" ? (o(), c("div", Ot, [
500
+ n.value.key === "dcat:accessService" ? (o(), c("div", Ot, [
501
501
  y(pt, {
502
502
  ref_key: "accessServiceV3Ref",
503
503
  ref: B,
504
504
  accessServices: T.value[e.distributionId] || [],
505
- onUpdate: t[1] || (t[1] = (n) => qe(e.distributionId, n)),
505
+ onUpdate: t[1] || (t[1] = (r) => qe(e.distributionId, r)),
506
506
  distributionId: e.distributionId
507
507
  }, null, 8, ["accessServices", "distributionId"])
508
508
  ])) : d("", !0),
509
- r.value.key === "dcat:byteSize" ? (o(), g(lt, {
509
+ n.value.key === "dcat:byteSize" ? (o(), g(lt, {
510
510
  key: 8,
511
511
  byteSizeProp: f.byteSizeText,
512
512
  onAddByteSize: je
513
513
  }, null, 8, ["byteSizeProp"])) : d("", !0),
514
- r.value.key === "dcatap:availability" ? (o(), g(ot, {
514
+ n.value.key === "dcatap:availability" ? (o(), g(ot, {
515
515
  key: 9,
516
516
  availabilityText: f.availabilityText,
517
517
  onAddAvailability: We
518
518
  }, null, 8, ["availabilityText"])) : d("", !0),
519
- r.value.key === "dct:language" ? (o(), g(rt, {
519
+ n.value.key === "dct:language" ? (o(), g(rt, {
520
520
  key: 10,
521
521
  languageText: f.languageText,
522
522
  distributionId: f.distributionId,
523
523
  onAddLanguage: Ne
524
524
  }, null, 8, ["languageText", "distributionId"])) : d("", !0),
525
- r.value.key === "dct:conformsTo" ? (o(), c("div", Ht, [
525
+ n.value.key === "dct:conformsTo" ? (o(), c("div", Ht, [
526
526
  y(ut, {
527
527
  ref_key: "conformsToV3Ref",
528
528
  ref: R,
529
529
  conformsToItems: V.value[e.distributionId] || [],
530
- onUpdate: t[2] || (t[2] = (n) => Be(e.distributionId, n)),
530
+ onUpdate: t[2] || (t[2] = (r) => Be(e.distributionId, r)),
531
531
  asCard: !1,
532
532
  distributionId: e.distributionId
533
533
  }, null, 8, ["conformsToItems", "distributionId"])
534
534
  ])) : d("", !0),
535
- r.value.key === "odrl:hasPolicy" ? (o(), c("div", Nt, [
535
+ n.value.key === "odrl:hasPolicy" ? (o(), c("div", Nt, [
536
536
  y(mt, {
537
537
  ref_key: "policyV3Ref",
538
538
  ref: P,
539
539
  policyItems: _.value[e.distributionId] || [],
540
- onUpdate: t[3] || (t[3] = (n) => ze(e.distributionId, n)),
540
+ onUpdate: t[3] || (t[3] = (r) => ze(e.distributionId, r)),
541
541
  asCard: !1,
542
542
  distributionId: e.distributionId
543
543
  }, null, 8, ["policyItems", "distributionId"])
544
544
  ])) : d("", !0),
545
- r.value.key === "dcat:mediaType" ? (o(), g(ne, {
545
+ n.value.key === "dcat:mediaType" ? (o(), g(ne, {
546
546
  key: 13,
547
547
  onAddMediaType: de,
548
548
  fileTypes: f.fileTypes,
549
549
  fileFormatType: "dcat:mediaType",
550
550
  fileFormatText: f.mediaTypeText
551
551
  }, null, 8, ["fileTypes", "fileFormatText"])) : d("", !0),
552
- r.value.key === "dcat:compressFormat" ? (o(), g(ne, {
552
+ n.value.key === "dcat:compressFormat" ? (o(), g(ne, {
553
553
  key: 14,
554
554
  onAddCompressFormat: de,
555
555
  fileTypes: f.fileTypes,
556
556
  fileFormatType: "dcat:compressFormat",
557
557
  compressFormatText: f.compressFormatText
558
558
  }, null, 8, ["fileTypes", "compressFormatText"])) : d("", !0),
559
- r.value.key === "dcat:packageFormat" ? (o(), g(ne, {
559
+ n.value.key === "dcat:packageFormat" ? (o(), g(ne, {
560
560
  key: 15,
561
561
  onAddPackageFormat: de,
562
562
  fileTypes: f.fileTypes,
563
563
  fileFormatType: "dcat:packageFormat",
564
564
  packageFormatText: f.packageFormatText
565
565
  }, null, 8, ["fileTypes", "packageFormatText"])) : d("", !0),
566
- r.value.key === "adms:status" ? (o(), g(nt, {
566
+ n.value.key === "adms:status" ? (o(), g(nt, {
567
567
  key: 16,
568
568
  statusText: f.statusText,
569
569
  onAddStatus: Ee
570
570
  }, null, 8, ["statusText"])) : d("", !0),
571
- r.value.key === "spdx:checksum" ? (o(), g(ct, {
571
+ n.value.key === "spdx:checksum" ? (o(), g(ct, {
572
572
  key: 17,
573
573
  ref_key: "checksumV3Ref",
574
574
  ref: z,
@@ -576,7 +576,7 @@ const yt = {
576
576
  checksumText: f.checksumText,
577
577
  checksumDropdownText: f.checksumDropdownText
578
578
  }, null, 8, ["checksumText", "checksumDropdownText"])) : d("", !0),
579
- r.value.key === "dcterms:license" ? (o(), g(ft, {
579
+ n.value.key === "dcterms:license" ? (o(), g(ft, {
580
580
  key: 18,
581
581
  ref_key: "changeLicenseV3Ref",
582
582
  ref: M,
@@ -636,7 +636,7 @@ const yt = {
636
636
  ])) : d("", !0)
637
637
  ], 64));
638
638
  }
639
- }, Da = /* @__PURE__ */ vt(aa, [["__scopeId", "data-v-e69e9437"]]);
639
+ }, Da = /* @__PURE__ */ vt(aa, [["__scopeId", "data-v-188f269d"]]);
640
640
  export {
641
641
  Da as default
642
642
  };