@piveau/dpi 0.2.0-alpha.18 → 0.2.0-alpha.19

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,106 +1,120 @@
1
- import { ref as m, watch as k, computed as w, createElementBlock as f, openBlock as P, createElementVNode as e, createCommentVNode as E, createVNode as V, toDisplayString as t, createTextVNode as o, unref as d } from "vue";
2
- import { useI18n as F } from "vue-i18n";
3
- import S from "../HappyFlowComponents/ui/Dropdown.vue.js";
4
- import { PhWarning as N } from "@phosphor-icons/vue";
5
- import { useEditModeInfo as O } from "../composables/useDpiEditMode.js";
6
- import { useFormValues as W } from "../composables/useDpiFormValues.js";
1
+ import { mergeModels as F, useModel as M, ref as N, watch as O, computed as C, createElementBlock as n, openBlock as r, createElementVNode as t, createCommentVNode as P, createVNode as h, unref as i, Fragment as T, toDisplayString as a, createTextVNode as c } from "vue";
2
+ import { PhWarning as W } from "@phosphor-icons/vue";
3
+ import { useI18n as j } from "vue-i18n";
4
+ import { useEditModeInfo as z } from "../composables/useDpiEditMode.js";
5
+ import { useFormValues as B } from "../composables/useDpiFormValues.js";
6
+ import q from "../HappyFlowComponents/ui/Dropdown.vue.js";
7
7
  /* empty css */
8
- import C from "../../../../../_virtual/_plugin-vue_export-helper.js";
9
- const T = { class: "dpiV3InnerComponentWrap" }, j = { class: "dpiV3_Frame_840" }, z = { class: "copy-large-regular description-text" }, B = { class: "visibility-options-description" }, M = { class: "visibility-option" }, q = { class: "option-title" }, H = { class: "visibility-option" }, U = { class: "option-title" }, A = { class: "visibility-option" }, G = { class: "option-title" }, J = {
8
+ import H from "../../../../../_virtual/_plugin-vue_export-helper.js";
9
+ const U = { class: "dpiV3InnerComponentWrap" }, A = { class: "dpiV3_Frame_840" }, G = { class: "copy-large-regular description-text" }, J = { class: "visibility-options-description" }, K = { class: "visibility-option" }, L = { class: "option-title" }, Q = { class: "visibility-option" }, R = { class: "option-title" }, X = { class: "visibility-option" }, Y = { class: "option-title" }, Z = {
10
10
  key: 0,
11
11
  class: "dpiV3_errormsgWrapper"
12
- }, K = { class: "copy-mini-regular" }, L = {
12
+ }, $ = { class: "copy-mini-regular" }, ii = {
13
13
  __name: "VisibilityPage",
14
- props: {
14
+ props: /* @__PURE__ */ F({
15
15
  context: Object
16
- },
17
- setup(Q, { expose: h }) {
18
- const { t: R } = F(), { isEditMode: X } = O(), { formValues: s } = W(), a = m(""), _ = m([
16
+ }, {
17
+ selectedVisibility: {
18
+ type: String,
19
+ default: ""
20
+ },
21
+ selectedVisibilityModifiers: {}
22
+ }),
23
+ emits: ["update:selectedVisibility"],
24
+ setup(D, { expose: x }) {
25
+ const o = M(D, "selectedVisibility"), { t: s } = j(), { isEditMode: p } = z(), { formValues: l } = B(), w = N([
19
26
  { "@value": "public", label: "Öffentlich" },
20
27
  { "@value": "restricted", label: "Eingeschränkt" },
21
28
  { "@value": "internal", label: "Intern" }
22
29
  ]);
23
- Object.keys(s.value.Discoverability.visibilityPage).length === 0 && (s.value.Discoverability.visibilityPage = [{ isValid: "unset" }]);
24
- const $ = (i) => {
25
- a.value = i, n(i);
26
- }, n = (i) => {
27
- i && i !== "" ? s.value.Discoverability.visibilityPage = [
28
- { isValid: !0, visibility: i }
29
- ] : s.value.Discoverability.visibilityPage = [
30
+ p.value || Object.keys(l.value.Discoverability.visibilityPage).length === 0 && (l.value.Discoverability.visibilityPage = [{ isValid: "unset" }]);
31
+ function I(e) {
32
+ o.value = e, u(e);
33
+ }
34
+ function u(e) {
35
+ e && e !== "" ? l.value.Discoverability.visibilityPage = [
36
+ { isValid: !0, visibility: e }
37
+ ] : l.value.Discoverability.visibilityPage = [
30
38
  { isValid: !1, visibility: "" }
31
- ], console.log("Visibility validation state:", s.value.Discoverability.visibilityPage);
32
- };
33
- k(a, (i) => {
34
- i !== void 0 && n(i);
39
+ ], console.log("Visibility validation state:", l.value.Discoverability.visibilityPage);
40
+ }
41
+ O(o, (e) => {
42
+ e !== void 0 && u(e);
35
43
  });
36
- const D = w(() => {
37
- var i, l;
38
- return ((l = (i = s.value.Discoverability.visibilityPage) == null ? void 0 : i[0]) == null ? void 0 : l.isValid) === !0;
44
+ const k = C(() => {
45
+ var e, d;
46
+ return ((d = (e = l.value.Discoverability.visibilityPage) == null ? void 0 : e[0]) == null ? void 0 : d.isValid) === !0;
39
47
  });
40
- return h({
41
- validateVisibilitySelection: () => a.value !== "" ? (s.value.Discoverability.visibilityPage[0].isValid = !0, !0) : (s.value.Discoverability.visibilityPage = [{ isValid: !1 }], !1),
42
- canProceed: D
43
- }), (i, l) => {
44
- var r, p, c, u, v, b, y, g;
45
- return P(), f("div", T, [
46
- e("div", j, [
47
- e("h4", null, t(i.$t("message.dataupload.datasets.visibilityPage.title")), 1),
48
- e("div", z, [
49
- e("p", null, t(i.$t("message.dataupload.datasets.visibilityPage.intro-text")), 1),
50
- e("p", null, t(i.$t("message.dataupload.datasets.visibilityPage.recommendation-text")), 1),
51
- e("ul", B, [
52
- e("li", M, [
53
- e("span", q, '"' + t(i.$t("message.dataupload.datasets.visibilityPage.visibility-option-public")) + '":', 1),
54
- o(" " + t(i.$t("message.dataupload.datasets.visibilityPage.visibility-option-public-desc")), 1)
55
- ]),
56
- e("li", H, [
57
- e("span", U, '"' + t(i.$t("message.dataupload.datasets.visibilityPage.visibility-option-restricted")) + '":', 1),
58
- o(" " + t(i.$t("message.dataupload.datasets.visibilityPage.visibility-option-restricted-desc")), 1)
48
+ function E() {
49
+ return o.value !== "" ? (l.value.Discoverability.visibilityPage[0].isValid = !0, !0) : (l.value.Discoverability.visibilityPage = [{ isValid: !1 }], !1);
50
+ }
51
+ return x({
52
+ validateVisibilitySelection: E,
53
+ canProceed: k
54
+ }), (e, d) => {
55
+ var v, b, y, g, m, f, _, V;
56
+ return r(), n("div", U, [
57
+ t("div", A, [
58
+ i(p) ? P("", !0) : (r(), n(T, { key: 0 }, [
59
+ t("h4", null, a(i(s)("message.dataupload.datasets.visibilityPage.title")), 1),
60
+ t("div", G, [
61
+ t("p", null, a(i(s)("message.dataupload.datasets.visibilityPage.intro-text")), 1),
62
+ t("p", null, a(i(s)("message.dataupload.datasets.visibilityPage.recommendation-text")), 1),
63
+ t("ul", J, [
64
+ t("li", K, [
65
+ t("span", L, '"' + a(i(s)("message.dataupload.datasets.visibilityPage.visibility-option-public")) + '":', 1),
66
+ c(" " + a(i(s)("message.dataupload.datasets.visibilityPage.visibility-option-public-desc")), 1)
67
+ ]),
68
+ t("li", Q, [
69
+ t("span", R, '"' + a(i(s)("message.dataupload.datasets.visibilityPage.visibility-option-restricted")) + '":', 1),
70
+ c(" " + a(i(s)("message.dataupload.datasets.visibilityPage.visibility-option-restricted-desc")), 1)
71
+ ]),
72
+ t("li", X, [
73
+ t("span", Y, '"' + a(i(s)("message.dataupload.datasets.visibilityPage.visibility-option-internal")) + '":', 1),
74
+ c(" " + a(i(s)("message.dataupload.datasets.visibilityPage.visibility-option-internal-desc")), 1)
75
+ ])
59
76
  ]),
60
- e("li", A, [
61
- e("span", G, '"' + t(i.$t("message.dataupload.datasets.visibilityPage.visibility-option-internal")) + '":', 1),
62
- o(" " + t(i.$t("message.dataupload.datasets.visibilityPage.visibility-option-internal-desc")), 1)
63
- ])
64
- ]),
65
- e("p", null, t(i.$t("message.dataupload.datasets.visibilityPage.registration-note")), 1)
66
- ]),
67
- V(S, {
77
+ t("p", null, a(i(s)("message.dataupload.datasets.visibilityPage.registration-note")), 1)
78
+ ])
79
+ ], 64)),
80
+ h(q, {
81
+ modelValue: o.value,
68
82
  "onUpdate:modelValue": [
69
- $,
70
- l[0] || (l[0] = (I) => a.value = I)
83
+ d[0] || (d[0] = (S) => o.value = S),
84
+ I
71
85
  ],
72
- dropdownWidth: "large",
86
+ "dropdown-width": "large",
73
87
  type: "inputField",
74
- modelValue: a.value,
75
- inputFieldProps: {
88
+ class: "visibility-dropdown",
89
+ "input-field-props": {
76
90
  addOnText: !1,
77
91
  initialHintText: !1,
78
92
  datePicker: !1,
79
93
  infoIcon: !1,
80
94
  preIcon: !1,
81
- label: i.$t("message.dataupload.datasets.visibilityPage.dropdown-label"),
95
+ label: i(s)("message.dataupload.datasets.visibilityPage.dropdown-label"),
82
96
  dropdown_dpiV3: !0,
83
- placeholder: i.$t("message.dataupload.datasets.visibilityPage.dropdown-placeholder"),
97
+ placeholder: i(s)("message.dataupload.datasets.visibilityPage.dropdown-placeholder"),
84
98
  inputFieldSize: "large",
85
- modelValue: a.value,
99
+ modelValue: o.value,
86
100
  defaultInput: !0,
87
- showError: ((u = (c = (p = (r = d(s)) == null ? void 0 : r.Discoverability) == null ? void 0 : p.visibilityPage) == null ? void 0 : c[0]) == null ? void 0 : u.isValid) === !1,
101
+ showError: ((g = (y = (b = (v = i(l)) == null ? void 0 : v.Discoverability) == null ? void 0 : b.visibilityPage) == null ? void 0 : y[0]) == null ? void 0 : g.isValid) === !1,
88
102
  required: !0
89
103
  },
90
- data: _.value
91
- }, null, 8, ["modelValue", "inputFieldProps", "data"])
104
+ data: w.value
105
+ }, null, 8, ["modelValue", "input-field-props", "data"])
92
106
  ]),
93
- ((g = (y = (b = (v = d(s)) == null ? void 0 : v.Discoverability) == null ? void 0 : b.visibilityPage) == null ? void 0 : y[0]) == null ? void 0 : g.isValid) === !1 ? (P(), f("div", J, [
94
- V(d(N), {
107
+ ((V = (_ = (f = (m = i(l)) == null ? void 0 : m.Discoverability) == null ? void 0 : f.visibilityPage) == null ? void 0 : _[0]) == null ? void 0 : V.isValid) === !1 ? (r(), n("div", Z, [
108
+ h(i(W), {
95
109
  size: 16,
96
110
  weight: "fill"
97
111
  }),
98
- e("span", K, t(i.$t("message.dataupload.datasets.visibilityPage.error-message")), 1)
99
- ])) : E("", !0)
112
+ t("span", $, a(i(s)("message.dataupload.datasets.visibilityPage.error-message")), 1)
113
+ ])) : P("", !0)
100
114
  ]);
101
115
  };
102
116
  }
103
- }, oi = /* @__PURE__ */ C(L, [["__scopeId", "data-v-8ffc7cf5"]]);
117
+ }, ri = /* @__PURE__ */ H(ii, [["__scopeId", "data-v-ab47a431"]]);
104
118
  export {
105
- oi as default
119
+ ri as default
106
120
  };
@@ -752,7 +752,7 @@ const tt = be({
752
752
  data: S,
753
753
  authToken: de.value,
754
754
  publicationStatus: K === "publish" ? "published" : "draft",
755
- visibility: ((N = (X = (G = (Z = L.value) == null ? void 0 : Z.Discoverability) == null ? void 0 : G.visibilityPage) == null ? void 0 : X[0]) == null ? void 0 : N.visibility) || ne.query.visibility || "public",
755
+ accessLevel: ((N = (X = (G = (Z = L.value) == null ? void 0 : Z.Discoverability) == null ? void 0 : G.visibilityPage) == null ? void 0 : X[0]) == null ? void 0 : N.visibility) || ne.query.visibility || "public",
756
756
  type: "dataset"
757
757
  }), (Y = this.$Progress) == null || Y.finish(), this.clearAll();
758
758
  } catch (Q) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@piveau/dpi",
3
3
  "type": "module",
4
- "version": "0.2.0-alpha.18",
4
+ "version": "0.2.0-alpha.19",
5
5
  "private": false,
6
6
  "sideEffects": [
7
7
  "*.css",