@piveau/dpi 0.1.0-beta.58 → 0.1.0-beta.59

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.
@@ -4,7 +4,7 @@ import { PhNumberCircleFive as Z, PhCheckCircle as G, PhLightbulb as J } from "@
4
4
  import { useWindowScroll as Q } from "@vueuse/core";
5
5
  import X from "jquery";
6
6
  import { has as I, isNil as U } from "lodash-es";
7
- import { defineComponent as Y, resolveComponent as g, createElementBlock as r, openBlock as s, createCommentVNode as p, createElementVNode as o, createVNode as h, createBlock as b, withModifiers as N, withCtx as j, Fragment as V, renderList as _, withDirectives as z, normalizeClass as y, toDisplayString as c, vShow as H, createTextVNode as M, ref as R, markRaw as x, getCurrentInstance as ee } from "vue";
7
+ import { defineComponent as Y, resolveComponent as g, createElementBlock as r, openBlock as s, createCommentVNode as p, createElementVNode as o, createVNode as v, createBlock as b, withModifiers as N, withCtx as j, Fragment as V, renderList as _, withDirectives as z, normalizeClass as y, toDisplayString as c, vShow as H, createTextVNode as M, ref as R, markRaw as x, getCurrentInstance as ee } from "vue";
8
8
  import { useI18n as te } from "vue-i18n";
9
9
  import { mapActions as B, mapGetters as W } from "vuex";
10
10
  import ie from "../components/InputPageStep.vue.js";
@@ -157,12 +157,12 @@ const Fe = Y({
157
157
  try {
158
158
  let i = [];
159
159
  if (Object.keys(this.steps).forEach((n, a) => {
160
- let v = {
160
+ let m = {
161
161
  step: n,
162
162
  substeps: this.subSteps[a],
163
163
  substepCount: Object.keys(this.subSteps[a]).length
164
164
  };
165
- i.push(v);
165
+ i.push(m);
166
166
  }), e === "next" && (i[this.stepCounter].substepCount > 1 ? (this.substepCounter + 1 === i[this.stepCounter].substepCount ? (this.stepCounter++, this.activeStep = i[this.stepCounter].step, this.activeSubStep = Object.keys(
167
167
  i[this.stepCounter].substeps
168
168
  )[0], this.substepCounter = 0) : (this.substepCounter++, this.activeSubStep = Object.keys(
@@ -248,23 +248,16 @@ const Fe = Y({
248
248
  }
249
249
  },
250
250
  async dispatchDataToDPI(e, t, i, n) {
251
- var a, v;
251
+ var a, m;
252
252
  try {
253
- if (n === "publish") {
254
- if (i.token = this.getUserData.rtpToken, localStorage.getItem(localStorage.getItem("dpi_editmode"))) {
255
- debugger;
256
- i.url = `${this.$env.api.hubUrl}drafts/datasets/publish/${i.id}?catalogue=${i.catalog}`;
257
- } else i.url = `${this.$env.api.hubUrl}catalogues/${i.catalog}/datasets/origin?originalId=${i.id}`;
258
- await this.$store.dispatch(t, i);
259
- }
260
- n === "draft" && await this.$store.dispatch(t, i), n === "depublish" && await this.$store.dispatch("auth/putDatasetToDraft", {
253
+ n === "publish" && (i.token = this.getUserData.rtpToken, localStorage.getItem("dpi_draftmode") === "true" && localStorage.getItem("dpi_editmode") === "true" ? i.url = `${this.$env.api.hubUrl}drafts/datasets/publish/${i.id}?catalogue=${i.catalog}` : i.url = `${this.$env.api.hubUrl}catalogues/${i.catalog}/datasets/origin?originalId=${i.id}`, await this.$store.dispatch(t, i)), n === "draft" && await this.$store.dispatch(t, i), n === "depublish" && await this.$store.dispatch("auth/putDatasetToDraft", {
261
254
  id: i.id,
262
255
  catalog: i.catalog,
263
256
  title: i.title,
264
257
  description: i.description
265
258
  }), (a = this.$Progress) == null || a.finish(), this.clearAll();
266
259
  } catch (C) {
267
- console.error(C), (v = this.$Progress) == null || v.fail();
260
+ console.error(C), (m = this.$Progress) == null || m.fail();
268
261
  }
269
262
  },
270
263
  dropdownCLick() {
@@ -292,10 +285,10 @@ const Fe = Y({
292
285
  X('[data-bs-toggle="tooltip"]').tooltip({
293
286
  container: "body"
294
287
  }), setTimeout(() => {
295
- document.querySelectorAll(".formkitProperty h4").forEach((a, v) => {
288
+ document.querySelectorAll(".formkitProperty h4").forEach((a, m) => {
296
289
  a.parentElement.parentElement.classList.contains(
297
290
  "formkitWrapRepeatable"
298
- ) || (v != 0 && v != 1 && v != 2 && v != 3 && a.nextElementSibling.classList.toggle("d-none"), a.addEventListener("click", () => {
291
+ ) || (m != 0 && m != 1 && m != 2 && m != 3 && a.nextElementSibling.classList.toggle("d-none"), a.addEventListener("click", () => {
299
292
  a.classList.toggle("dpiChevUp"), a.nextElementSibling.classList.toggle("d-none");
300
293
  }));
301
294
  }), document.querySelectorAll(".formkitProperty");
@@ -360,9 +353,9 @@ const Fe = Y({
360
353
  steps: i,
361
354
  activeStep: n,
362
355
  subSteps: a,
363
- visitedSteps: v,
356
+ visitedSteps: m,
364
357
  previousStep: C,
365
- nextStep: m,
358
+ nextStep: h,
366
359
  stepPlugin: k,
367
360
  goToNextStep: T,
368
361
  goToPreviousStep: $
@@ -372,15 +365,15 @@ const Fe = Y({
372
365
  }), l = () => {
373
366
  let { x: f, y: q } = Q({ behavior: "smooth" });
374
367
  q.value = 0;
375
- }, u = (f) => (i[f].errorCount > 0 || i[f].blockingCount > 0) && v.value.includes(f), d = x({ OverviewPage: $e }), S = R("");
368
+ }, u = (f) => (i[f].errorCount > 0 || i[f].blockingCount > 0) && m.value.includes(f), d = x({ OverviewPage: $e }), S = R("");
376
369
  return t.value && (n.value = "ReviewAndPublish", S.value = "reviewAndPublishPage"), {
377
370
  steps: i,
378
- visitedSteps: v,
371
+ visitedSteps: m,
379
372
  activeStep: n,
380
373
  activeSubStep: S,
381
374
  subSteps: a,
382
375
  previousStep: C,
383
- nextStep: m,
376
+ nextStep: h,
384
377
  stepPlugin: k,
385
378
  checkStepValidity: u,
386
379
  goToNextStep: T,
@@ -446,12 +439,12 @@ const Fe = Y({
446
439
  key: 5,
447
440
  class: "p-1"
448
441
  };
449
- function jt(e, t, i, n, a, v) {
450
- const C = g("TextButtonSmall"), m = g("ButtonV3"), k = g("LogoV3"), T = g("PhNumberCircleFive"), $ = g("PhCheckCircle"), P = g("Illustration"), D = g("FormKitSchema"), w = g("PhLightbulb"), F = g("DistributionInputPage"), A = g("InputPageStep"), L = g("FormKit"), O = g("ModalSimpleV3");
442
+ function jt(e, t, i, n, a, m) {
443
+ const C = g("TextButtonSmall"), h = g("ButtonV3"), k = g("LogoV3"), T = g("PhNumberCircleFive"), $ = g("PhCheckCircle"), P = g("Illustration"), D = g("FormKitSchema"), w = g("PhLightbulb"), F = g("DistributionInputPage"), A = g("InputPageStep"), L = g("FormKit"), O = g("ModalSimpleV3");
451
444
  return s(), r("div", Ae, [
452
445
  e.isInput ? (s(), r("div", Le, [
453
446
  o("div", Oe, [
454
- h(L, {
447
+ v(L, {
455
448
  id: "dpiForm",
456
449
  modelValue: e.formValues,
457
450
  "onUpdate:modelValue": t[11] || (t[11] = (l) => e.formValues = l),
@@ -465,7 +458,7 @@ function jt(e, t, i, n, a, v) {
465
458
  default: j(() => [
466
459
  e.dpiContext.edit.fromDraft || e.dpiContext.edit.enabled ? (s(), r("div", Ee, [
467
460
  o("div", Ue, [
468
- h(C, {
461
+ v(C, {
469
462
  "button-text": "Übersicht",
470
463
  "icon-start": "CaretLeft",
471
464
  "icon-name": "caretLeft",
@@ -473,12 +466,12 @@ function jt(e, t, i, n, a, v) {
473
466
  }, null, 8, ["onClick"]),
474
467
  o("div", null, [
475
468
  e.dpiContext.edit.enabled && !e.dpiContext.edit.fromDraft ? (s(), r("div", je, [
476
- h(m, {
469
+ v(h, {
477
470
  "button-text": "Veröffentlichung aufheben",
478
471
  size: "large",
479
472
  onClick: t[0] || (t[0] = (l) => e.navTrigger("depublish"))
480
473
  }),
481
- h(m, {
474
+ v(h, {
482
475
  "button-text": "Veröffentlicht ansehen",
483
476
  variant: "secondary",
484
477
  size: "large",
@@ -486,7 +479,7 @@ function jt(e, t, i, n, a, v) {
486
479
  onClick: t[1] || (t[1] = (l) => e.handlePublishedRoute())
487
480
  })
488
481
  ])) : (s(), r("div", ze, [
489
- h(m, {
482
+ v(h, {
490
483
  "button-text": "Veröffentlichen",
491
484
  size: "large",
492
485
  onClick: t[2] || (t[2] = (l) => e.navTrigger("publish"))
@@ -496,7 +489,7 @@ function jt(e, t, i, n, a, v) {
496
489
  ])
497
490
  ])) : (s(), r("div", He, [
498
491
  e.$env.content.dataProviderInterface.specification === "dcatapdeHappyFlow" && e.activeStep !== "Landing" ? (s(), r("div", Me, [
499
- h(k),
492
+ v(k),
500
493
  o("ul", Re, [
501
494
  (s(!0), r(V, null, _(e.steps, (l, u, d) => z((s(), r("li", {
502
495
  key: l,
@@ -597,10 +590,10 @@ function jt(e, t, i, n, a, v) {
597
590
  ])
598
591
  ])) : (s(), r("div", st, [
599
592
  o("div", ot, [
600
- h(k)
593
+ v(k)
601
594
  ]),
602
595
  o("div", at, [
603
- h(P, { "illustration-name": "start" })
596
+ v(P, { "illustration-name": "start" })
604
597
  ])
605
598
  ]))
606
599
  ])),
@@ -660,7 +653,7 @@ function jt(e, t, i, n, a, v) {
660
653
  ]
661
654
  ])), 256)),
662
655
  e.activeStep === "Landing" ? (s(), r("div", vt, [
663
- h(m, {
656
+ v(h, {
664
657
  "button-text": "Abbrechen",
665
658
  size: "large",
666
659
  variant: "tertiary",
@@ -668,7 +661,7 @@ function jt(e, t, i, n, a, v) {
668
661
  e.activeSimpleModal = !0, console.log(e.activeSimpleModal);
669
662
  })
670
663
  }),
671
- h(m, {
664
+ v(h, {
672
665
  "button-text": "Datenbereitstellung starten",
673
666
  size: "large",
674
667
  onClick: t[4] || (t[4] = (d) => e.navTrigger("next"))
@@ -676,20 +669,20 @@ function jt(e, t, i, n, a, v) {
676
669
  ])) : p("", !0),
677
670
  e.activeStep === "ReviewAndPublish" ? (s(), r("div", mt, [
678
671
  o("div", gt, [
679
- e.dpiContext.edit.enabled && !e.dpiContext.edit.fromDraft ? (s(), b(m, {
672
+ e.dpiContext.edit.enabled && !e.dpiContext.edit.fromDraft ? (s(), b(h, {
680
673
  key: 0,
681
674
  "button-text": "Veröffentlichung aufheben",
682
675
  size: "large",
683
676
  variant: "secondary",
684
677
  onClick: t[5] || (t[5] = (d) => e.navTrigger("depublish"))
685
- })) : (s(), b(m, {
678
+ })) : (s(), b(h, {
686
679
  key: 1,
687
680
  "button-text": "Als Entwurf speichern",
688
681
  size: "large",
689
682
  variant: "secondary",
690
683
  onClick: t[6] || (t[6] = (d) => e.navTrigger("draft"))
691
684
  })),
692
- h(m, {
685
+ v(h, {
693
686
  "button-text": "Veröffentlichen",
694
687
  size: "large",
695
688
  onClick: t[7] || (t[7] = (d) => e.formValues[e.activeStep][e.activeSubStep][0].isValid === !0 ? e.navTrigger("publish") : e.formValues[e.activeStep][e.activeSubStep][0].isValid = !1)
@@ -702,14 +695,14 @@ function jt(e, t, i, n, a, v) {
702
695
  dpiV3_activeInfobox: e.activeSubStep.includes("hvdPage")
703
696
  }])
704
697
  }, [
705
- h(m, {
698
+ v(h, {
706
699
  "button-text": "Abbrechen",
707
700
  size: "large",
708
701
  variant: "tertiary",
709
702
  onClick: t[8] || (t[8] = (d) => e.activeSimpleModal = !0)
710
703
  }),
711
704
  o("div", ft, [
712
- e.activeStep !== "Landing" ? (s(), b(m, {
705
+ e.activeStep !== "Landing" ? (s(), b(h, {
713
706
  key: 0,
714
707
  "icon-start": "CaretLeft",
715
708
  "button-text": "Zurück",
@@ -717,7 +710,7 @@ function jt(e, t, i, n, a, v) {
717
710
  variant: "secondary",
718
711
  onClick: t[9] || (t[9] = (d) => e.navTrigger("prev"))
719
712
  })) : p("", !0),
720
- h(m, {
713
+ v(h, {
721
714
  "icon-end": "CaretRight",
722
715
  "button-text": "Weiter",
723
716
  size: "large",
@@ -728,7 +721,7 @@ function jt(e, t, i, n, a, v) {
728
721
  e.activeSubStep.includes("hvdPage") ? (s(), r("div", bt, [
729
722
  o("div", St, [
730
723
  o("div", Ct, [
731
- h(w, {
724
+ v(w, {
732
725
  size: 32,
733
726
  color: "#009fe3"
734
727
  }),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@piveau/dpi",
3
3
  "type": "module",
4
- "version": "0.1.0-beta.58",
4
+ "version": "0.1.0-beta.59",
5
5
  "private": false,
6
6
  "sideEffects": [
7
7
  "*.css",