@piveau/dpi 0.2.0-alpha.5 → 0.2.0-alpha.7

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.
Files changed (51) hide show
  1. package/dist/assets/dpi.css +1 -1
  2. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectDescriptionStep.vue.js +2 -2
  3. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/BasicInfosStep/ProjectStatusStep.vue.js +18 -21
  4. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Chip.vue.js +49 -41
  5. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ChipToggleList/ChipToggleList.vue.js +2 -2
  6. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ChipToggleList/ChipToggleList.vue2.js +30 -24
  7. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DataCollection/BasicInformationStep.vue.js +1 -1
  8. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/DataCollection/BasicInformationStep.vue2.js +5 -5
  9. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Findability/ApplicationsStep.vue.js +1 -1
  10. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Findability/ApplicationsStep.vue2.js +63 -61
  11. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Findability/DiscoverabilityStep.vue.js +47 -38
  12. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/InputField/InputFieldFormKit.vue.js +33 -29
  13. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ListBox/ListBoxDefinition.js +8 -3
  14. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ListBox/ListBoxFormKit.vue.js +65 -37
  15. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ListBox/Listbox.vue.js +2 -2
  16. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ListBox/Listbox.vue2.js +21 -22
  17. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/AreYouSureToSkipCard.vue.js +31 -0
  18. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/AreYouSureToSkipCard.vue2.js +4 -0
  19. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/DatasetStep.vue.js +3 -3
  20. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/DatasetStep.vue2.js +72 -62
  21. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/GetResource.vue.js +38 -0
  22. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/GetResource.vue2.js +4 -0
  23. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/HardwareStep.vue.js +2 -2
  24. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/HardwareStep.vue2.js +76 -69
  25. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/SoftwareStep.vue.js +2 -2
  26. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/SoftwareStep.vue2.js +78 -91
  27. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ProcessSteps/utils.js +27 -42
  28. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Projektphasen/InitiierenStep.vue.js +17 -17
  29. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Projektphasen/PlanenStep.vue.js +10 -10
  30. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Projektphasen/ProjektPhasenOverviewStep.vue.js +1 -1
  31. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Projektphasen/UmstezenStep.vue.js +16 -16
  32. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/Projektphasen/WeiterdenkenStep.vue.js +13 -13
  33. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ReviewStep/ReviewStep.vue.js +934 -0
  34. package/dist/packages/dpi/src/data-provider-interface/HappyFlowComponents/ui/ReviewStep/ReviewStep.vue2.js +4 -0
  35. package/dist/packages/dpi/src/data-provider-interface/components/ProgressSteps.vue.js +1 -1
  36. package/dist/packages/dpi/src/data-provider-interface/components/StepActionsSection.vue.js +2 -2
  37. package/dist/packages/dpi/src/data-provider-interface/components/StepActionsSection.vue2.js +75 -63
  38. package/dist/packages/dpi/src/data-provider-interface/components/TheCancelConfirmationDialog.vue.js +7 -0
  39. package/dist/packages/dpi/src/data-provider-interface/components/TheCancelConfirmationDialog.vue2.js +42 -0
  40. package/dist/packages/dpi/src/data-provider-interface/components/dev-tools/ProjectDpiDevTools.vue.js +7 -0
  41. package/dist/packages/dpi/src/data-provider-interface/components/dev-tools/ProjectDpiDevTools.vue2.js +249 -0
  42. package/dist/packages/dpi/src/data-provider-interface/components/dev-tools/fixtures.js +287 -0
  43. package/dist/packages/dpi/src/data-provider-interface/composables/project-transformer/__tests__/fixtures/theProjectForm.js +281 -0
  44. package/dist/packages/dpi/src/data-provider-interface/composables/project-transformer/decodeProject.js +244 -0
  45. package/dist/packages/dpi/src/data-provider-interface/composables/project-transformer/encodeProject.js +330 -0
  46. package/dist/packages/dpi/src/data-provider-interface/composables/project-transformer/shared.js +37 -0
  47. package/dist/packages/dpi/src/data-provider-interface/schema/projectLdSchema.js +114 -0
  48. package/dist/packages/dpi/src/data-provider-interface/views/InputPageProject.vue.js +387 -328
  49. package/dist/packages/dpi/src/stories/components/LinkCard.vue.js +3 -3
  50. package/dist/packages/dpi/src/stories/components/LinkCard.vue2.js +6 -6
  51. package/package.json +5 -2
@@ -0,0 +1,4 @@
1
+ import f from "./ReviewStep.vue.js";
2
+ export {
3
+ f as default
4
+ };
@@ -1,7 +1,7 @@
1
1
  import o from "./ProgressSteps.vue2.js";
2
2
  /* empty css */
3
3
  import r from "../../../../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-03c01e93"]]);
4
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-599e3d1c"]]);
5
5
  export {
6
6
  p as default
7
7
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./StepActionsSection.vue2.js";
2
2
  /* empty css */
3
3
  import t from "../../../../../_virtual/_plugin-vue_export-helper.js";
4
- const r = /* @__PURE__ */ t(o, [["__scopeId", "data-v-8b3e09cd"]]);
4
+ const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-4b1aabda"]]);
5
5
  export {
6
- r as default
6
+ c as default
7
7
  };
@@ -1,11 +1,12 @@
1
- import { defineComponent as B, inject as P, ref as h, watch as z, toRef as E, computed as F, createElementBlock as u, openBlock as i, createElementVNode as c, createBlock as _, createCommentVNode as I, renderSlot as g, createVNode as d, normalizeStyle as M, withDirectives as p, vShow as y, withCtx as x, Fragment as A, renderList as D, toDisplayString as L, createTextVNode as R, nextTick as $ } from "vue";
2
- import { getNode as K, isNode as W } from "@formkit/core";
3
- import { getValidationMessages as j } from "@formkit/validation";
4
- import { useFormValues as J } from "../composables/useDpiFormValues.js";
5
- import f from "../HappyFlowComponents/ui/ButtonV3.vue.js";
6
- import O from "../HappyFlowComponents/ui/Card.vue.js";
7
- import { dpiStepperKey as Z } from "../utils/injectionKeys.js";
8
- const q = { class: "step-actions-container" }, G = { class: "step-actions" }, H = { class: "step-actions__prev-and-next" }, Q = { class: "validation-errors" }, ie = /* @__PURE__ */ B({
1
+ import { defineComponent as z, inject as E, ref as d, watch as D, toRef as M, computed as A, createElementBlock as f, openBlock as r, createElementVNode as v, createBlock as F, createCommentVNode as I, createVNode as i, renderSlot as x, normalizeStyle as L, withDirectives as y, vShow as C, withCtx as m, Fragment as R, renderList as _, toDisplayString as K, createTextVNode as $, unref as j, nextTick as U } from "vue";
2
+ import { getNode as W, isNode as Z } from "@formkit/core";
3
+ import { getValidationMessages as q } from "@formkit/validation";
4
+ import { PhExclamationMark as G } from "@phosphor-icons/vue";
5
+ import h from "../HappyFlowComponents/ui/ButtonV3.vue.js";
6
+ import H from "../HappyFlowComponents/ui/Card.vue.js";
7
+ import { dpiStepperKey as J } from "../utils/injectionKeys.js";
8
+ import O from "./TheCancelConfirmationDialog.vue.js";
9
+ const Q = { class: "step-actions-container" }, X = { class: "step-actions" }, Y = { class: "step-actions__prev-and-next" }, ee = { class: "validation-errors" }, ce = /* @__PURE__ */ z({
9
10
  __name: "StepActionsSection",
10
11
  props: {
11
12
  hideCancel: { type: Boolean, default: !1 },
@@ -17,117 +18,128 @@ const q = { class: "step-actions-container" }, G = { class: "step-actions" }, H
17
18
  nextText: { default: "Weiter" },
18
19
  nextVariant: { default: "primary" }
19
20
  },
20
- setup(U) {
21
- const { formValues: C } = J(), e = P(Z);
21
+ emits: ["submit"],
22
+ setup(te, { emit: V }) {
23
+ const S = V, e = E(J);
22
24
  e || console.warn("dpiStepper is not provided. Please use StepActionsSection inside InputPage");
23
- function S(t) {
25
+ function T(t) {
24
26
  return t !== void 0;
25
27
  }
26
- const r = h(!1), a = h([]);
27
- function V(t) {
28
+ const l = d(!1), s = d(!1), a = d([]);
29
+ function N(t) {
28
30
  if (!t)
29
31
  return;
30
- const n = j(t);
31
- !n || n.size === 0 || (a.value = [...n.entries()].flatMap(([o, k]) => k.map((w) => String(w.value))));
32
+ const o = q(t);
33
+ !o || o.size === 0 || (a.value = [...o.entries()].flatMap(([n, P]) => P.map((w) => String(w.value))));
32
34
  }
33
- e && z(e.activeStep, () => {
34
- a.value.splice(0, a.value.length), r.value = !1;
35
+ e && D(e.activeStep, () => {
36
+ a.value.splice(0, a.value.length), s.value = !1;
35
37
  });
36
- const N = E(e == null ? void 0 : e.steps);
37
- function v(t) {
38
- var o;
39
- const n = (o = N.value) == null ? void 0 : o[t];
40
- return n ? n.valid : !1;
38
+ const b = M(e == null ? void 0 : e.steps);
39
+ function p(t) {
40
+ var n;
41
+ const o = (n = b.value) == null ? void 0 : n[t];
42
+ return o ? o.valid : !1;
41
43
  }
42
- function T() {
43
- v((e == null ? void 0 : e.activeStep.value) || "") && (e == null || e.goToNextStep());
44
+ function k() {
45
+ p((e == null ? void 0 : e.activeStep.value) || "") && (e == null || e.goToNextStep());
44
46
  }
45
- function m() {
46
- window.alert("WIP");
47
+ function g() {
48
+ l.value = !0;
47
49
  }
48
- function s() {
50
+ function u() {
49
51
  e == null || e.goToPreviousStep();
50
52
  }
51
- const b = F(() => e != null && e.activeStep.value ? K(e == null ? void 0 : e.activeStep.value) : null);
52
- async function l() {
53
- if (!S(e))
53
+ const B = A(() => e != null && e.activeStep.value ? W(e == null ? void 0 : e.activeStep.value) : null);
54
+ async function c() {
55
+ if (!T(e))
54
56
  return;
55
- e.triggerValidationCurrentStep(), await $();
56
- const t = b.value;
57
- if (t ? !v((e == null ? void 0 : e.activeStep.value) || "") : !1) {
58
- if (!W(t)) {
57
+ e.triggerValidationCurrentStep(), await U();
58
+ const t = B.value;
59
+ if (t ? !p((e == null ? void 0 : e.activeStep.value) || "") : !1) {
60
+ if (!Z(t)) {
59
61
  console.error("Current step node is not a FormKitNode", t);
60
62
  return;
61
63
  }
62
- V(t), r.value = !0;
64
+ N(t), s.value = !0;
63
65
  }
64
- e != null && e.isLast.value ? window.alert(`Form submitted: ${JSON.stringify(C.value, null, 2)}`) : T();
66
+ e != null && e.isLast.value ? S("submit") : k();
65
67
  }
66
- return (t, n) => (i(), u("div", q, [
67
- c("div", G, [
68
- g(t.$slots, "default", {
69
- handleCancel: m,
70
- handlePrevious: s,
71
- handleSubmit: l
68
+ return (t, o) => (r(), f("div", Q, [
69
+ v("div", X, [
70
+ x(t.$slots, "default", {
71
+ handleCancel: g,
72
+ handlePrevious: u,
73
+ handleSubmit: c
72
74
  }, () => [
73
- d(f, {
74
- style: M({ opacity: t.hideCancel ? 0 : 1 }),
75
+ i(h, {
76
+ style: L({ opacity: t.hideCancel ? 0 : 1 }),
75
77
  variant: "tertiary",
76
78
  size: "large",
77
79
  type: "button",
78
80
  "button-text": t.cancelText,
79
- onClick: m
81
+ onClick: g
80
82
  }, null, 8, ["style", "button-text"]),
81
- c("div", H, [
82
- g(t.$slots, "prev-and-next", {
83
+ v("div", Y, [
84
+ x(t.$slots, "prev-and-next", {
83
85
  hidePrevious: t.hidePrevious,
84
86
  hideNext: t.hideNext,
85
87
  previousText: t.previousText,
86
88
  nextText: t.nextText,
87
- handlePrevious: s,
88
- handleSubmit: l
89
+ handlePrevious: u,
90
+ handleSubmit: c
89
91
  }, () => [
90
- p(d(f, {
92
+ y(i(h, {
91
93
  variant: "secondary",
92
94
  size: "large",
93
95
  type: "button",
94
96
  "button-text": t.previousText,
95
97
  "icon-start": "CaretLeft",
96
- onClick: s
98
+ onClick: u
97
99
  }, null, 8, ["button-text"]), [
98
- [y, !t.hidePrevious]
100
+ [C, !t.hidePrevious]
99
101
  ]),
100
- p(d(f, {
102
+ y(i(h, {
101
103
  size: "large",
102
104
  variant: t.nextVariant,
103
105
  type: "button",
104
106
  "button-text": t.nextText,
105
107
  "icon-end": "CaretRight",
106
- onClick: l
108
+ onClick: c
107
109
  }, null, 8, ["variant", "button-text"]), [
108
- [y, !t.hideNext]
110
+ [C, !t.hideNext]
109
111
  ])
110
112
  ], !0)
111
113
  ])
112
114
  ], !0)
113
115
  ]),
114
- r.value && a.value.length ? (i(), _(O, {
116
+ s.value && a.value.length ? (r(), F(H, {
115
117
  key: 0,
116
118
  variant: "error"
117
119
  }, {
118
- title: x(() => n[0] || (n[0] = [
119
- R(" Bitte korrigieren Sie die folgenden Fehler ", -1)
120
+ icon: m(() => [
121
+ i(j(G), {
122
+ size: 32,
123
+ color: "currentColor"
124
+ })
125
+ ]),
126
+ title: m(() => o[1] || (o[1] = [
127
+ $(" Bitte korrigieren Sie die folgenden Fehler ", -1)
120
128
  ])),
121
- default: x(() => [
122
- c("ul", Q, [
123
- (i(!0), u(A, null, D(a.value, (o) => (i(), u("li", { key: o }, L(o), 1))), 128))
129
+ default: m(() => [
130
+ v("ul", ee, [
131
+ (r(!0), f(R, null, _(a.value, (n) => (r(), f("li", { key: n }, K(n), 1))), 128))
124
132
  ])
125
133
  ]),
126
134
  _: 1
127
- })) : I("", !0)
135
+ })) : I("", !0),
136
+ i(O, {
137
+ modelValue: l.value,
138
+ "onUpdate:modelValue": o[0] || (o[0] = (n) => l.value = n)
139
+ }, null, 8, ["modelValue"])
128
140
  ]));
129
141
  }
130
142
  });
131
143
  export {
132
- ie as default
144
+ ce as default
133
145
  };
@@ -0,0 +1,7 @@
1
+ import o from "./TheCancelConfirmationDialog.vue2.js";
2
+ /* empty css */
3
+ import a from "../../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const i = /* @__PURE__ */ a(o, [["__scopeId", "data-v-f89364fa"]]);
5
+ export {
6
+ i as default
7
+ };
@@ -0,0 +1,42 @@
1
+ import { defineComponent as u, mergeModels as s, useModel as p, createBlock as f, openBlock as v, withCtx as t, createElementVNode as i, createVNode as a } from "vue";
2
+ import r from "../HappyFlowComponents/ui/ButtonV3.vue.js";
3
+ import V from "../HappyFlowComponents/ui/DpiModalBase.vue.js";
4
+ const k = /* @__PURE__ */ u({
5
+ __name: "TheCancelConfirmationDialog",
6
+ props: {
7
+ modelValue: { type: Boolean },
8
+ modelModifiers: {}
9
+ },
10
+ emits: /* @__PURE__ */ s(["closeWithoutSaving", "closeWithSaving"], ["update:modelValue"]),
11
+ setup(m, { emit: d }) {
12
+ const l = d, n = p(m, "modelValue");
13
+ return (C, e) => (v(), f(V, {
14
+ modelValue: n.value,
15
+ "onUpdate:modelValue": e[2] || (e[2] = (o) => n.value = o)
16
+ }, {
17
+ header: t(() => e[3] || (e[3] = [
18
+ i("h4", null, "Title", -1)
19
+ ])),
20
+ footer: t(() => [
21
+ a(r, {
22
+ "button-text": "Cancel",
23
+ variant: "secondary",
24
+ onClick: e[0] || (e[0] = (o) => l("closeWithoutSaving"))
25
+ }),
26
+ a(r, {
27
+ "button-text": "Confirm",
28
+ variant: "primary",
29
+ onClick: e[1] || (e[1] = (o) => l("closeWithSaving"))
30
+ })
31
+ ]),
32
+ default: t(() => [
33
+ e[4] || (e[4] = i("div", null, " body ", -1))
34
+ ]),
35
+ _: 1,
36
+ __: [4]
37
+ }, 8, ["modelValue"]));
38
+ }
39
+ });
40
+ export {
41
+ k as default
42
+ };
@@ -0,0 +1,7 @@
1
+ import o from "./ProjectDpiDevTools.vue2.js";
2
+ /* empty css */
3
+ import t from "../../../../../../_virtual/_plugin-vue_export-helper.js";
4
+ const c = /* @__PURE__ */ t(o, [["__scopeId", "data-v-c3b54f7a"]]);
5
+ export {
6
+ c as default
7
+ };
@@ -0,0 +1,249 @@
1
+ import { defineComponent as T, useModel as V, ref as f, createBlock as _, openBlock as v, withCtx as o, createElementVNode as n, createVNode as t, unref as l, createTextVNode as y, createElementBlock as N } from "vue";
2
+ import { TabGroup as w, TabList as E, Tab as g, TabPanels as A, TabPanel as O } from "@headlessui/vue";
3
+ import { PhStar as F, PhFloppyDisk as x } from "@phosphor-icons/vue";
4
+ import { useStorage as B } from "@vueuse/core";
5
+ import { decodeProject as M } from "../../composables/project-transformer/decodeProject.js";
6
+ import { encodeProject as G } from "../../composables/project-transformer/encodeProject.js";
7
+ import { useFormValues as z } from "../../composables/useDpiFormValues.js";
8
+ import u from "../../HappyFlowComponents/ui/ButtonV3.vue.js";
9
+ import b from "../../HappyFlowComponents/ui/Card.vue.js";
10
+ import I from "../../HappyFlowComponents/ui/DpiModalBase.vue.js";
11
+ import U from "../../HappyFlowComponents/ui/ListBox/Listbox.vue.js";
12
+ import H from "../../HappyFlowComponents/ui/TextAreaV3.vue.js";
13
+ import { fullProject as K } from "./fixtures.js";
14
+ const R = { class: "tab-wrapper" }, Y = { class: "hurry" }, q = { class: "hurry-actions" }, Q = {
15
+ key: 0,
16
+ class: "hurry-flurry"
17
+ }, W = {
18
+ key: 1,
19
+ class: "hurry-flurry-empty"
20
+ }, X = { class: "hurry" }, Z = { class: "hurry-actions" }, $ = "dpi:project:snapshots", me = /* @__PURE__ */ T({
21
+ __name: "ProjectDpiDevTools",
22
+ props: {
23
+ modelValue: { type: Boolean },
24
+ modelModifiers: {},
25
+ nonce: {
26
+ default: 0
27
+ },
28
+ nonceModifiers: {}
29
+ },
30
+ emits: ["update:modelValue", "update:nonce"],
31
+ setup(h) {
32
+ const S = V(h, "modelValue"), m = V(h, "nonce"), { formValues: p } = z(), c = f(""), i = f("");
33
+ function k() {
34
+ m.value++, p.value = K.formValuesFn();
35
+ }
36
+ const d = B($, []), s = f("");
37
+ function C(a) {
38
+ return new Date(a).toLocaleString();
39
+ }
40
+ function J() {
41
+ const a = Date.now(), e = {
42
+ id: String(a),
43
+ name: C(a),
44
+ createdAt: a,
45
+ // ensure we store a plain JSON object without references
46
+ data: JSON.parse(JSON.stringify(p.value))
47
+ };
48
+ d.value = [...d.value, e], s.value = e;
49
+ }
50
+ function L() {
51
+ !s.value || typeof s.value == "string" || (m.value++, p.value = JSON.parse(JSON.stringify(s.value.data)));
52
+ }
53
+ async function D() {
54
+ i.value = "";
55
+ try {
56
+ const a = JSON.parse(c.value), e = await M(a);
57
+ m.value++, p.value = JSON.parse(JSON.stringify(e));
58
+ } catch (a) {
59
+ i.value = a instanceof Error ? a.message : "Failed to load JSON-LD";
60
+ }
61
+ }
62
+ async function P() {
63
+ i.value = "";
64
+ try {
65
+ const a = G(p.value), e = JSON.stringify(a, null, 2);
66
+ c.value = e;
67
+ } catch (a) {
68
+ i.value = a instanceof Error ? a.message : "Failed to encode project";
69
+ }
70
+ }
71
+ function j() {
72
+ d.value = [], s.value = "";
73
+ }
74
+ return (a, e) => (v(), _(I, {
75
+ modelValue: S.value,
76
+ "onUpdate:modelValue": e[2] || (e[2] = (r) => S.value = r)
77
+ }, {
78
+ header: o(() => e[3] || (e[3] = [
79
+ n("h4", null, "DPI Tools for Devs", -1)
80
+ ])),
81
+ default: o(() => [
82
+ n("div", R, [
83
+ t(l(w), null, {
84
+ default: o(() => [
85
+ t(l(E), { class: "tab-list" }, {
86
+ default: o(() => [
87
+ t(l(g), { as: "template" }, {
88
+ default: o(({ selected: r }) => [
89
+ t(u, {
90
+ variant: r ? "secondary" : "tertiary",
91
+ "button-text": "Form"
92
+ }, null, 8, ["variant"])
93
+ ]),
94
+ _: 1
95
+ }),
96
+ t(l(g), { as: "template" }, {
97
+ default: o(({ selected: r }) => [
98
+ t(u, {
99
+ variant: r ? "secondary" : "tertiary",
100
+ "button-text": "Edit Mode"
101
+ }, null, 8, ["variant"])
102
+ ]),
103
+ _: 1
104
+ })
105
+ ]),
106
+ _: 1
107
+ }),
108
+ t(l(A), { class: "tab-panels" }, {
109
+ default: o(() => [
110
+ t(l(O), null, {
111
+ default: o(() => [
112
+ e[9] || (e[9] = n("p", null, "Manage current state of the form data model", -1)),
113
+ t(b, null, {
114
+ title: o(() => e[4] || (e[4] = [
115
+ y(" Presets ", -1)
116
+ ])),
117
+ icon: o(() => [
118
+ t(l(F), {
119
+ size: 32,
120
+ color: "#009fe3"
121
+ })
122
+ ]),
123
+ default: o(() => [
124
+ n("div", null, [
125
+ t(u, {
126
+ "icon-start": "Check",
127
+ "button-text": "Autofill inputs and reload DPI",
128
+ variant: "primary",
129
+ onClick: k
130
+ }),
131
+ e[5] || (e[5] = n("p", { class: "mt-3" }, " Preset contains complete form values ", -1))
132
+ ])
133
+ ]),
134
+ _: 1
135
+ }),
136
+ t(b, { class: "mt-3" }, {
137
+ title: o(() => e[6] || (e[6] = [
138
+ y(" Snapshots ", -1)
139
+ ])),
140
+ icon: o(() => [
141
+ t(l(x), {
142
+ size: 32,
143
+ color: "#009fe3"
144
+ })
145
+ ]),
146
+ default: o(() => [
147
+ n("div", Y, [
148
+ e[8] || (e[8] = n("p", null, " Snapshots are stored locally in your browser ", -1)),
149
+ n("div", q, [
150
+ t(u, {
151
+ class: "mb-3",
152
+ "icon-start": "plus",
153
+ "button-text": "Save snapshot",
154
+ variant: "secondary",
155
+ onClick: J
156
+ }),
157
+ t(u, {
158
+ class: "mb-3",
159
+ "icon-start": "trash",
160
+ "button-text": "Clear all snapshots",
161
+ variant: "tertiary",
162
+ disabled: !l(d).length,
163
+ onClick: j
164
+ }, null, 8, ["disabled"])
165
+ ]),
166
+ l(d).length ? (v(), N("div", Q, [
167
+ t(U, {
168
+ modelValue: s.value,
169
+ "onUpdate:modelValue": e[0] || (e[0] = (r) => s.value = r),
170
+ label: "Select snapshot",
171
+ placeholder: "Choose a snapshot",
172
+ options: l(d)
173
+ }, null, 8, ["modelValue", "options"]),
174
+ t(u, {
175
+ "icon-end": "Check",
176
+ "button-text": "Load snapshot",
177
+ variant: "tertiary",
178
+ disabled: !s.value,
179
+ onClick: L
180
+ }, null, 8, ["disabled"])
181
+ ])) : (v(), N("div", W, e[7] || (e[7] = [
182
+ n("span", { class: "copy-small-regular" }, "No snapshots saved", -1)
183
+ ])))
184
+ ])
185
+ ]),
186
+ _: 1
187
+ })
188
+ ]),
189
+ _: 1,
190
+ __: [9]
191
+ }),
192
+ t(l(O), null, {
193
+ default: o(() => [
194
+ t(b, null, {
195
+ title: o(() => e[10] || (e[10] = [
196
+ y(" Load from JSON-LD ", -1)
197
+ ])),
198
+ icon: o(() => [
199
+ t(l(x), {
200
+ size: 32,
201
+ color: "#009fe3"
202
+ })
203
+ ]),
204
+ default: o(() => [
205
+ n("div", X, [
206
+ t(H, {
207
+ modelValue: c.value,
208
+ "onUpdate:modelValue": e[1] || (e[1] = (r) => c.value = r),
209
+ label: "JSON-LD",
210
+ placeholder: "Paste a JSON-LD document here (GraphObject or NodeObject)",
211
+ "show-error": !!i.value,
212
+ "error-message": i.value
213
+ }, null, 8, ["modelValue", "show-error", "error-message"]),
214
+ n("div", Z, [
215
+ t(u, {
216
+ "button-text": "Generate JSON-LD in textarea",
217
+ variant: "secondary",
218
+ onClick: P
219
+ }),
220
+ t(u, {
221
+ "icon-end": "Check",
222
+ "button-text": "Load from json-ld",
223
+ variant: "primary",
224
+ disabled: !c.value,
225
+ onClick: D
226
+ }, null, 8, ["disabled"])
227
+ ])
228
+ ])
229
+ ]),
230
+ _: 1
231
+ })
232
+ ]),
233
+ _: 1
234
+ })
235
+ ]),
236
+ _: 1
237
+ })
238
+ ]),
239
+ _: 1
240
+ })
241
+ ])
242
+ ]),
243
+ _: 1
244
+ }, 8, ["modelValue"]));
245
+ }
246
+ });
247
+ export {
248
+ me as default
249
+ };