@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.
- package/dist/assets/dpi.css +1 -1
- package/dist/packages/dpi/src/data-provider-interface/components/ReviewAndPublishPage.vue.js +297 -234
- package/dist/packages/dpi/src/data-provider-interface/components/VisibilityPage.vue.js +85 -71
- package/dist/packages/dpi/src/data-provider-interface/views/InputPage.vue.js +1 -1
- package/package.json +1 -1
|
@@ -1,106 +1,120 @@
|
|
|
1
|
-
import { ref as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
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
|
|
9
|
-
const
|
|
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
|
-
},
|
|
12
|
+
}, $ = { class: "copy-mini-regular" }, ii = {
|
|
13
13
|
__name: "VisibilityPage",
|
|
14
|
-
props: {
|
|
14
|
+
props: /* @__PURE__ */ F({
|
|
15
15
|
context: Object
|
|
16
|
-
},
|
|
17
|
-
|
|
18
|
-
|
|
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(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
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:",
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
|
|
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
|
|
37
|
-
var
|
|
38
|
-
return ((
|
|
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
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
-
|
|
83
|
+
d[0] || (d[0] = (S) => o.value = S),
|
|
84
|
+
I
|
|
71
85
|
],
|
|
72
|
-
|
|
86
|
+
"dropdown-width": "large",
|
|
73
87
|
type: "inputField",
|
|
74
|
-
|
|
75
|
-
|
|
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
|
|
95
|
+
label: i(s)("message.dataupload.datasets.visibilityPage.dropdown-label"),
|
|
82
96
|
dropdown_dpiV3: !0,
|
|
83
|
-
placeholder: i
|
|
97
|
+
placeholder: i(s)("message.dataupload.datasets.visibilityPage.dropdown-placeholder"),
|
|
84
98
|
inputFieldSize: "large",
|
|
85
|
-
modelValue:
|
|
99
|
+
modelValue: o.value,
|
|
86
100
|
defaultInput: !0,
|
|
87
|
-
showError: ((
|
|
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:
|
|
91
|
-
}, null, 8, ["modelValue", "
|
|
104
|
+
data: w.value
|
|
105
|
+
}, null, 8, ["modelValue", "input-field-props", "data"])
|
|
92
106
|
]),
|
|
93
|
-
((
|
|
94
|
-
|
|
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
|
-
|
|
99
|
-
])) :
|
|
112
|
+
t("span", $, a(i(s)("message.dataupload.datasets.visibilityPage.error-message")), 1)
|
|
113
|
+
])) : P("", !0)
|
|
100
114
|
]);
|
|
101
115
|
};
|
|
102
116
|
}
|
|
103
|
-
},
|
|
117
|
+
}, ri = /* @__PURE__ */ H(ii, [["__scopeId", "data-v-ab47a431"]]);
|
|
104
118
|
export {
|
|
105
|
-
|
|
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
|
-
|
|
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) {
|