@piveau/piveau-hub-ui-modules 4.6.98 → 4.6.99
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/data-provider-interface/DPIMenu.vue.d.ts +1 -0
- package/dist/data-provider-interface/DPIMenu.vue.mjs +62 -47
- package/dist/data-provider-interface/DPIMenu.vue.mjs.map +1 -1
- package/dist/data-provider-interface/DataProviderInterface.vue.mjs.map +1 -1
- package/dist/data-provider-interface/DataProviderInterface.vue2.mjs.map +1 -1
- package/dist/data-provider-interface/components/SelectControlledGroup.vue.mjs +10 -10
- package/dist/data-provider-interface/components/SelectControlledGroup.vue.mjs.map +1 -1
- package/dist/data-provider-interface/views/DistributionInputPage.vue.mjs +86 -83
- package/dist/data-provider-interface/views/DistributionInputPage.vue.mjs.map +1 -1
- package/dist/datasets/DatasetList.vue.mjs +10 -10
- package/dist/datasets/DatasetList.vue.mjs.map +1 -1
- package/dist/piveau-hub-ui-modules.css +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as m, reactive as V, openBlock as f, createElementBlock as x, createElementVNode as a, toDisplayString as c, createTextVNode as i, createVNode as r, unref as
|
|
2
|
-
import { FormKit as
|
|
1
|
+
import { defineComponent as m, reactive as V, openBlock as f, createElementBlock as x, createElementVNode as a, toDisplayString as c, createTextVNode as i, createVNode as r, unref as s, withCtx as d, renderSlot as g } from "vue";
|
|
2
|
+
import { FormKit as p } from "@formkit/vue";
|
|
3
3
|
const k = { class: "formkitProperty" }, y = { class: "formkitCmpWrap d-flex" }, b = /* @__PURE__ */ m({
|
|
4
4
|
__name: "SelectControlledGroup",
|
|
5
5
|
props: {
|
|
@@ -13,16 +13,16 @@ const k = { class: "formkitProperty" }, y = { class: "formkitCmpWrap d-flex" },
|
|
|
13
13
|
placeholder: {},
|
|
14
14
|
info: {}
|
|
15
15
|
},
|
|
16
|
-
setup(
|
|
17
|
-
const t =
|
|
16
|
+
setup(u) {
|
|
17
|
+
const t = u, l = V({
|
|
18
18
|
groupValue: {},
|
|
19
19
|
selectValue: t.initialValue ?? Object.keys(t.options)[0]
|
|
20
20
|
});
|
|
21
|
-
return (
|
|
21
|
+
return (n, e) => (f(), x("div", k, [
|
|
22
22
|
a("h4", null, c(t.label), 1),
|
|
23
23
|
e[4] || (e[4] = i()),
|
|
24
24
|
a("div", y, [
|
|
25
|
-
r(
|
|
25
|
+
r(s(p), {
|
|
26
26
|
id: t.id,
|
|
27
27
|
type: "group",
|
|
28
28
|
name: n.name,
|
|
@@ -30,19 +30,19 @@ const k = { class: "formkitProperty" }, y = { class: "formkitCmpWrap d-flex" },
|
|
|
30
30
|
modelValue: l.groupValue,
|
|
31
31
|
"onUpdate:modelValue": e[1] || (e[1] = (o) => l.groupValue = o)
|
|
32
32
|
}, {
|
|
33
|
-
default:
|
|
34
|
-
r(
|
|
33
|
+
default: d(() => [
|
|
34
|
+
r(s(p), {
|
|
35
35
|
modelValue: l.selectValue,
|
|
36
36
|
"onUpdate:modelValue": e[0] || (e[0] = (o) => l.selectValue = o),
|
|
37
37
|
type: "select",
|
|
38
38
|
options: t.options,
|
|
39
39
|
name: t.selectName
|
|
40
40
|
}, {
|
|
41
|
-
prefix:
|
|
41
|
+
prefix: d(() => [...e[2] || (e[2] = [])]),
|
|
42
42
|
_: 1
|
|
43
43
|
}, 8, ["modelValue", "options", "name"]),
|
|
44
44
|
e[3] || (e[3] = i()),
|
|
45
|
-
g(
|
|
45
|
+
g(n.$slots, "default", {
|
|
46
46
|
selectValue: l.selectValue
|
|
47
47
|
})
|
|
48
48
|
]),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelectControlledGroup.vue.mjs","sources":["../../../lib/data-provider-interface/components/SelectControlledGroup.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * `SelectControlledGroup` is a Vue component wrapping the FormKit group input. \n * It features a central select input that dictates the behavior of all child inputs within the group. \n * This setup allows for conditional display and interaction of child components based on the select input's value. \n * \n * Note that this is not a FormKit input itself, but rather a wrapper around the FormKit group input.\n */\n\nimport { reactive } from 'vue';\nimport { FormKit } from '@formkit/vue';\n\nconst props = defineProps<{\n name?: string;\n selectName: string;\n initialValue?: string;\n options: Record<string, string>;\n index?: number;\n id?: any;\n label?: string;\n placeholder?: string;\n info?: string;\n}>();\n\nconst data = reactive({\n groupValue: {},\n selectValue: props.initialValue ?? Object.keys(props.options)[0],\n});\n</script>\n\n<template>\n <div class=\"formkitProperty\">\n <h4>{{ props.label }}</h4>\n <div class=\"formkitCmpWrap d-flex\">\n <FormKit :id=\"props.id\" type=\"group\" :name=\"name\" :index=\"props.index\" v-model=\"data.groupValue\">\n <FormKit v-model=\"data.selectValue\" type=\"select\" :options=\"props.options\" :name=\"props.selectName\">\n <template #prefix>\n <!-- <div v-if=\"props.info\" class=\"infoI\">\n <div class=\"tooltipFormkit\">\n {{ props.info }}\n </div>\n </div> -->\n </template>\n </FormKit>\n <slot :select-value=\"data.selectValue\" />\n </FormKit>\n </div>\n\n </div>\n\n</template>"],"names":["props","__props","data","reactive","_openBlock","_createElementBlock","_hoisted_1","_createElementVNode","_toDisplayString","_hoisted_2","_createVNode","_unref","FormKit","_cache","$event","_renderSlot","_ctx"],"mappings":";;;;;;;;;;;;;;;;AAYA,UAAMA,IAAQC,GAYRC,IAAOC,EAAS;AAAA,MACpB,YAAY,CAAC;AAAA,MACb,aAAaH,EAAM,gBAAgB,OAAO,KAAKA,EAAM,OAAO,EAAE,CAAC;AAAA,IAAA,CAChE;sBAICI,EAAA,GAAAC,EAiBM,OAjBNC,GAiBM;AAAA,MAhBJC,EAA0B,MAAA,MAAAC,EAAnBR,EAAM,KAAK,GAAA,CAAA;AAAA;MAClBO,EAaM,OAbNE,GAaM;AAAA,QAZJC,EAWUC,EAAAC,CAAA,GAAA;AAAA,UAXA,IAAIZ,EAAM;AAAA,UAAI,MAAK;AAAA,UAAS,
|
|
1
|
+
{"version":3,"file":"SelectControlledGroup.vue.mjs","sources":["../../../lib/data-provider-interface/components/SelectControlledGroup.vue"],"sourcesContent":["<script setup lang=\"ts\">\n/**\n * `SelectControlledGroup` is a Vue component wrapping the FormKit group input. \n * It features a central select input that dictates the behavior of all child inputs within the group. \n * This setup allows for conditional display and interaction of child components based on the select input's value. \n * \n * Note that this is not a FormKit input itself, but rather a wrapper around the FormKit group input.\n */\n\nimport { reactive } from 'vue';\nimport { FormKit } from '@formkit/vue';\n\nconst props = defineProps<{\n name?: string;\n selectName: string;\n initialValue?: string;\n options: Record<string, string>;\n index?: number;\n id?: any;\n label?: string;\n placeholder?: string;\n info?: string;\n}>();\n\nconst data = reactive({\n groupValue: {},\n selectValue: props.initialValue ?? Object.keys(props.options)[0],\n});\n</script>\n\n<template>\n <div class=\"formkitProperty\">\n <h4>{{ props.label }}</h4>\n <div class=\"formkitCmpWrap d-flex\">\n <FormKit :id=\"props.id\" type=\"group\" :name=\"name\" :index=\"props.index\" v-model=\"data.groupValue\">\n <FormKit v-model=\"data.selectValue\" type=\"select\" :options=\"props.options\" :name=\"props.selectName\">\n <template #prefix>\n <!-- <div v-if=\"props.info\" class=\"infoI\">\n <div class=\"tooltipFormkit\">\n {{ props.info }}\n </div>\n </div> -->\n </template>\n </FormKit>\n <slot :select-value=\"data.selectValue\" />\n </FormKit>\n </div>\n\n </div>\n\n</template>"],"names":["props","__props","data","reactive","_openBlock","_createElementBlock","_hoisted_1","_createElementVNode","_toDisplayString","_hoisted_2","_createVNode","_unref","FormKit","name","_cache","$event","_renderSlot","_ctx"],"mappings":";;;;;;;;;;;;;;;;AAYA,UAAMA,IAAQC,GAYRC,IAAOC,EAAS;AAAA,MACpB,YAAY,CAAC;AAAA,MACb,aAAaH,EAAM,gBAAgB,OAAO,KAAKA,EAAM,OAAO,EAAE,CAAC;AAAA,IAAA,CAChE;sBAICI,EAAA,GAAAC,EAiBM,OAjBNC,GAiBM;AAAA,MAhBJC,EAA0B,MAAA,MAAAC,EAAnBR,EAAM,KAAK,GAAA,CAAA;AAAA;MAClBO,EAaM,OAbNE,GAaM;AAAA,QAZJC,EAWUC,EAAAC,CAAA,GAAA;AAAA,UAXA,IAAIZ,EAAM;AAAA,UAAI,MAAK;AAAA,UAAS,MAAMa,EAAI;AAAA,UAAG,OAAOb,EAAM;AAAA,UAAgB,YAAAE,EAAK;AAAA,UAAL,uBAAAY,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAC,MAAAb,EAAK,aAAUa;AAAA,QAAA;qBAC7F,MAQU;AAAA,YARVL,EAQUC,EAAAC,CAAA,GAAA;AAAA,cARQ,YAAAV,EAAK;AAAA,cAAL,uBAAAY,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,CAAAC,MAAAb,EAAK,cAAWa;AAAA,cAAE,MAAK;AAAA,cAAU,SAASf,EAAM;AAAA,cAAU,MAAMA,EAAM;AAAA,YAAA;cAC3E,UAAX,MAMW,CAAA,GAAAc,EAAA,CAAA,MAAAA,EAAA,CAAA,IAAA,GAAA,CAAA;AAAA;;;YAEbE,EAAyCC,EAAA,QAAA,WAAA;AAAA,cAAlC,aAAcf,EAAK;AAAA,YAAA;;;;;;;;"}
|
|
@@ -1,145 +1,148 @@
|
|
|
1
|
-
import { ref as u, onMounted as
|
|
2
|
-
import { useStore as
|
|
3
|
-
import
|
|
4
|
-
import { cloneDeep as
|
|
1
|
+
import { ref as u, onMounted as K, nextTick as P, resolveComponent as T, openBlock as v, createElementBlock as b, Fragment as I, createElementVNode as i, toDisplayString as a, createTextVNode as n, createVNode as h, withCtx as x, renderList as z, normalizeClass as W, withModifiers as q, createCommentVNode as G } from "vue";
|
|
2
|
+
import { useStore as H } from "vuex";
|
|
3
|
+
import J from "../components/DistributionStepper.vue.mjs";
|
|
4
|
+
import { cloneDeep as F } from "lodash-es";
|
|
5
5
|
import "@formkit/core";
|
|
6
6
|
import "./DistributionInputPage.vue2.mjs";
|
|
7
|
-
import
|
|
8
|
-
const
|
|
7
|
+
import Q from "../../_virtual/_plugin-vue_export-helper.mjs";
|
|
8
|
+
const R = {
|
|
9
9
|
name: "distribution-stepper-list",
|
|
10
10
|
class: "distributionsListClass"
|
|
11
|
-
},
|
|
11
|
+
}, U = { class: "d-flex m-4 align-items-center justify-content-between" }, X = { class: "m-0" }, Y = ["onClick"], Z = { class: "confirmation-dialog" }, _ = { class: "confirmation-body" }, tt = {
|
|
12
12
|
__name: "DistributionInputPage",
|
|
13
13
|
props: {
|
|
14
14
|
values: Object,
|
|
15
15
|
schema: Object
|
|
16
16
|
},
|
|
17
|
-
setup(
|
|
18
|
-
const
|
|
17
|
+
setup(M) {
|
|
18
|
+
const o = M, c = u([]), f = H(), r = u(!1), d = u(null), y = u(""), e = u({
|
|
19
19
|
disList: []
|
|
20
20
|
});
|
|
21
|
-
|
|
22
|
-
if (await
|
|
23
|
-
for (let s = 0; s <
|
|
24
|
-
c.value.push("distribution " + s),
|
|
21
|
+
K(async () => {
|
|
22
|
+
if (await P(), o.values.Distributions.distributionList.length != 0)
|
|
23
|
+
for (let s = 0; s < o.values.Distributions.distributionList.length; s++)
|
|
24
|
+
c.value.push("distribution " + s), e.value.disList.push({ name: "distribution " + s, isActive: !1 });
|
|
25
25
|
});
|
|
26
|
-
const
|
|
27
|
-
|
|
26
|
+
const S = () => {
|
|
27
|
+
e.value.disList.push({ name: "distribution " + e.value.disList.length, isActive: !1 }), D(e.value.disList.length - 1);
|
|
28
28
|
}, D = (s) => {
|
|
29
|
-
|
|
29
|
+
e.value.disList.forEach(
|
|
30
30
|
(t, p) => {
|
|
31
31
|
s != p && (t.isActive = !1);
|
|
32
32
|
}
|
|
33
|
-
),
|
|
34
|
-
},
|
|
35
|
-
const t =
|
|
36
|
-
t.Distributions.distributionList.splice(s, 1), f.dispatch("dpiStore/saveFormValues", { property: "datasets", values: t }),
|
|
33
|
+
), e.value.disList[s].isActive = !e.value.disList[s].isActive;
|
|
34
|
+
}, E = (s) => {
|
|
35
|
+
const t = F(o.values);
|
|
36
|
+
t.Distributions.distributionList.splice(s, 1), f.dispatch("dpiStore/saveFormValues", { property: "datasets", values: t }), e.value.disList.splice(s, 1);
|
|
37
37
|
}, L = (s = null) => {
|
|
38
38
|
d.value = s, y.value = s == null ? "Are you sure you want to delete this distribution? - It will only be effective when you publish the dataset." : "Are you sure you want to delete all distributions?", r.value = !0;
|
|
39
39
|
}, m = () => {
|
|
40
40
|
r.value = !1, d.value = null;
|
|
41
|
-
},
|
|
42
|
-
d.value === null ?
|
|
43
|
-
},
|
|
44
|
-
const s =
|
|
45
|
-
s.Distributions.distributionList = [], f.dispatch("dpiStore/saveFormValues", { property: "datasets", values: s }),
|
|
41
|
+
}, N = () => {
|
|
42
|
+
d.value === null ? j() : E(d.value), m();
|
|
43
|
+
}, j = () => {
|
|
44
|
+
const s = F(o.values);
|
|
45
|
+
s.Distributions.distributionList = [], f.dispatch("dpiStore/saveFormValues", { property: "datasets", values: s }), e.value.disList = [], r.value = !1;
|
|
46
46
|
};
|
|
47
47
|
return (s, t) => {
|
|
48
|
-
const p =
|
|
49
|
-
return v(), b(
|
|
50
|
-
|
|
48
|
+
const p = T("FormKit");
|
|
49
|
+
return v(), b(I, null, [
|
|
50
|
+
i("h1", null, a(s.$t("message.dataupload.info.distributions")), 1),
|
|
51
51
|
t[11] || (t[11] = n()),
|
|
52
|
-
t[12] || (t[12] =
|
|
52
|
+
t[12] || (t[12] = i("hr", null, null, -1)),
|
|
53
53
|
t[13] || (t[13] = n()),
|
|
54
|
-
|
|
55
|
-
|
|
54
|
+
i("div", R, [
|
|
55
|
+
h(p, {
|
|
56
56
|
type: "list",
|
|
57
57
|
name: "distributionList"
|
|
58
58
|
}, {
|
|
59
|
-
default:
|
|
60
|
-
(v(!0), b(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
e("h2", q, "Distribution " + o(a + 1), 1),
|
|
66
|
-
t[2] || (t[2] = n()),
|
|
67
|
-
e("div", null, [
|
|
68
|
-
e("button", {
|
|
69
|
-
class: "btn btn-secondary",
|
|
70
|
-
type: "button",
|
|
71
|
-
onClick: (F) => D(a)
|
|
72
|
-
}, o(s.$t("message.datasetDetails.edit")), 9, G),
|
|
73
|
-
t[1] || (t[1] = n()),
|
|
74
|
-
e("button", {
|
|
75
|
-
class: "btn btn-secondary",
|
|
76
|
-
type: "button",
|
|
77
|
-
onClick: t[0] || (t[0] = (F) => L(null))
|
|
78
|
-
}, o(s.$t("message.datasetDetails.delete")), 1)
|
|
79
|
-
])
|
|
80
|
-
]),
|
|
81
|
-
t[3] || (t[3] = n()),
|
|
82
|
-
e("div", {
|
|
83
|
-
class: M(["disInputWrapper", { "d-none": !i.value.disList[a].isActive }])
|
|
59
|
+
default: x(() => [
|
|
60
|
+
(v(!0), b(I, null, z(e.value.disList, (O, l) => {
|
|
61
|
+
var g, C, k, w, A, V, $;
|
|
62
|
+
return v(), b("section", {
|
|
63
|
+
key: l,
|
|
64
|
+
class: "distributionOuter"
|
|
84
65
|
}, [
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
66
|
+
i("div", U, [
|
|
67
|
+
i("h2", X, a(($ = (V = (A = (w = (k = (C = (g = o == null ? void 0 : o.values) == null ? void 0 : g.Distributions) == null ? void 0 : C.distributionList) == null ? void 0 : k[l]) == null ? void 0 : w.Mandatory) == null ? void 0 : A["dct:title"]) == null ? void 0 : V[0]) != null && $["@value"] ? o.values.Distributions.distributionList[l].Mandatory["dct:title"][0]["@value"] : `Distribution ${l + 1}`), 1),
|
|
68
|
+
t[2] || (t[2] = n()),
|
|
69
|
+
i("div", null, [
|
|
70
|
+
i("button", {
|
|
71
|
+
class: "btn btn-secondary",
|
|
72
|
+
type: "button",
|
|
73
|
+
onClick: (B) => D(l)
|
|
74
|
+
}, a(s.$t("message.datasetDetails.edit")), 9, Y),
|
|
75
|
+
t[1] || (t[1] = n()),
|
|
76
|
+
i("button", {
|
|
77
|
+
class: "btn btn-secondary",
|
|
78
|
+
type: "button",
|
|
79
|
+
onClick: t[0] || (t[0] = (B) => L(null))
|
|
80
|
+
}, a(s.$t("message.datasetDetails.delete")), 1)
|
|
81
|
+
])
|
|
82
|
+
]),
|
|
83
|
+
t[3] || (t[3] = n()),
|
|
84
|
+
i("div", {
|
|
85
|
+
class: W(["disInputWrapper", { "d-none": !e.value.disList[l].isActive }])
|
|
86
|
+
}, [
|
|
87
|
+
h(J, {
|
|
88
|
+
name: O.name,
|
|
89
|
+
index: l,
|
|
90
|
+
schema: o.schema,
|
|
91
|
+
values: o.values,
|
|
92
|
+
distributionList: c.value
|
|
93
|
+
}, null, 8, ["name", "index", "schema", "values", "distributionList"])
|
|
94
|
+
], 2)
|
|
95
|
+
]);
|
|
96
|
+
}), 128))
|
|
94
97
|
]),
|
|
95
98
|
_: 1
|
|
96
99
|
}),
|
|
97
100
|
t[8] || (t[8] = n()),
|
|
98
|
-
|
|
101
|
+
i("button", {
|
|
99
102
|
type: "button",
|
|
100
103
|
class: "btn btn-secondary",
|
|
101
|
-
onClick:
|
|
102
|
-
},
|
|
104
|
+
onClick: S
|
|
105
|
+
}, a(s.$t("message.dataupload.info.newDistribution")), 1),
|
|
103
106
|
t[9] || (t[9] = n()),
|
|
104
|
-
|
|
107
|
+
i("button", {
|
|
105
108
|
type: "button",
|
|
106
109
|
class: "btn btn-secondary",
|
|
107
110
|
onClick: L
|
|
108
|
-
},
|
|
111
|
+
}, a(s.$t("message.dataupload.info.deleteDistribution")), 1),
|
|
109
112
|
t[10] || (t[10] = n()),
|
|
110
113
|
r.value ? (v(), b("div", {
|
|
111
114
|
key: 0,
|
|
112
115
|
class: "confirmation-overlay",
|
|
113
|
-
onClick:
|
|
116
|
+
onClick: q(m, ["self"])
|
|
114
117
|
}, [
|
|
115
|
-
|
|
116
|
-
t[5] || (t[5] =
|
|
117
|
-
|
|
118
|
+
i("div", Z, [
|
|
119
|
+
t[5] || (t[5] = i("div", { class: "confirmation-header" }, [
|
|
120
|
+
i("h3", null, "Attention")
|
|
118
121
|
], -1)),
|
|
119
122
|
t[6] || (t[6] = n()),
|
|
120
|
-
|
|
121
|
-
|
|
123
|
+
i("div", _, [
|
|
124
|
+
i("p", null, a(y.value), 1)
|
|
122
125
|
]),
|
|
123
126
|
t[7] || (t[7] = n()),
|
|
124
|
-
|
|
125
|
-
|
|
127
|
+
i("div", { class: "confirmation-footer" }, [
|
|
128
|
+
i("button", {
|
|
126
129
|
class: "btn btn-danger",
|
|
127
|
-
onClick:
|
|
130
|
+
onClick: N
|
|
128
131
|
}, "Confirm Delete"),
|
|
129
132
|
t[4] || (t[4] = n()),
|
|
130
|
-
|
|
133
|
+
i("button", {
|
|
131
134
|
class: "btn btn-secondary",
|
|
132
135
|
onClick: m
|
|
133
136
|
}, "Cancel and Exit")
|
|
134
137
|
])
|
|
135
138
|
])
|
|
136
|
-
])) :
|
|
139
|
+
])) : G("", !0)
|
|
137
140
|
])
|
|
138
141
|
], 64);
|
|
139
142
|
};
|
|
140
143
|
}
|
|
141
|
-
},
|
|
144
|
+
}, ut = /* @__PURE__ */ Q(tt, [["__scopeId", "data-v-3ee3c25f"]]);
|
|
142
145
|
export {
|
|
143
|
-
|
|
146
|
+
ut as default
|
|
144
147
|
};
|
|
145
148
|
//# sourceMappingURL=DistributionInputPage.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DistributionInputPage.vue.mjs","sources":["../../../lib/data-provider-interface/views/DistributionInputPage.vue"],"sourcesContent":["<template>\n <h1>{{ $t('message.dataupload.info.distributions') }}</h1>\n <hr>\n <div name=\"distribution-stepper-list\" class=\"distributionsListClass\">\n\n <FormKit type=\"list\" name=\"distributionList\">\n\n <section v-for=\"(dist, index) in list.disList\" :key=\"index\" class=\"distributionOuter\">\n <div class=\"d-flex m-4 align-items-center justify-content-between\">\n <h2 class=\"m-0\">Distribution {{ index + 1 }}</h2>\n <div>\n <button class=\"btn btn-secondary\" type=\"button\" @click=\"editDis(index)\">{{ $t('message.datasetDetails.edit')\n }}</button>\n <!-- <button class=\"btn btn-secondary\" type=\"button\" @click=\"removeDis(index)\">{{\n $t('message.datasetDetails.delete') }}</button> -->\n <button class=\"btn btn-secondary\" type=\"button\" @click=\"openDeleteConfirmation(null)\">\n {{ $t('message.datasetDetails.delete') }}\n </button>\n </div>\n </div>\n <div class=\"disInputWrapper\" :class=\"{ 'd-none': !list.disList[index].isActive }\">\n <DistributionStepper :name=\"dist.name\" :index=\"index\" :schema=\"props.schema\" :values=\"props.values\"\n :distributionList=\"disIndex\">\n </DistributionStepper>\n\n </div>\n\n </section>\n </FormKit>\n <button type=\"button\" class=\"btn btn-secondary\" @click=\"addDistribution\">{{\n $t('message.dataupload.info.newDistribution')\n }}</button>\n <!-- <button type=\"button\" class=\"btn btn-secondary\" @click=\"deleteAllDistributions\">{{\n $t('message.dataupload.info.deleteDistribution') }}</button> -->\n <button type=\"button\" class=\"btn btn-secondary\" @click=\"openDeleteConfirmation\">{{\n $t('message.dataupload.info.deleteDistribution') }}</button>\n\n <div v-if=\"showConfirmDialog\" class=\"confirmation-overlay\" @click.self=\"closeConfirmDialog\">\n <div class=\"confirmation-dialog\">\n <div class=\"confirmation-header\">\n <h3>Attention</h3>\n </div>\n <div class=\"confirmation-body\">\n <p>{{ confirmMessage }}</p>\n </div>\n <div class=\"confirmation-footer\">\n <button class=\"btn btn-danger\" @click=\"executeDelete\">Confirm Delete</button>\n <button class=\"btn btn-secondary\" @click=\"closeConfirmDialog\">Cancel and Exit</button>\n </div>\n </div>\n </div>\n </div>\n</template>\n<script setup>\nimport { ref, onMounted, nextTick, computed } from 'vue';\nimport { useStore } from 'vuex';\nimport DistributionStepper from '../components/DistributionStepper.vue';\nimport { cloneDeep } from 'lodash';\nimport { useDpiStepper } from '../composables/useDpiStepper';\n\nconst props = defineProps({\n values: Object,\n schema: Object,\n})\n\nconst disIndex = ref([])\nconst store = useStore();\nconst showConfirmDialog = ref(false);\nconst deleteIndex = ref(null);\nconst confirmMessage = ref('');\n\nconst list = ref({\n disList: [],\n})\nonMounted(async () => {\n // Load DOM\n await nextTick()\n if (props.values.Distributions.distributionList.length != 0) {\n for (let index = 0; index < props.values.Distributions.distributionList.length; index++) {\n disIndex.value.push('distribution ' + index)\n list.value.disList.push({ 'name': 'distribution ' + index, 'isActive': false })\n }\n }\n})\nconst addDistribution = () => {\n list.value.disList.push({ 'name': 'distribution ' + list.value.disList.length, 'isActive': false })\n editDis(list.value.disList.length - 1)\n}\nconst editDis = (i) => {\n list.value.disList.forEach((el, index) => {\n if (i != index) {\n el.isActive = false\n }\n }\n )\n list.value.disList[i].isActive = !list.value.disList[i].isActive\n}\nconst removeDis = (i) => {\n const newValues = cloneDeep(props.values);\n newValues.Distributions.distributionList.splice(i, 1);\n\n store.dispatch('dpiStore/saveFormValues', { property: 'datasets', values: newValues });\n list.value.disList.splice(i, 1)\n}\n\nconst openDeleteConfirmation = (index = null) => {\n deleteIndex.value = index;\n confirmMessage.value = (index === null || index === undefined)\n ? 'Are you sure you want to delete this distribution? - It will only be effective when you publish the dataset.'\n : 'Are you sure you want to delete all distributions?';\n showConfirmDialog.value = true;\n};\n\nconst closeConfirmDialog = () => {\n showConfirmDialog.value = false;\n deleteIndex.value = null;\n};\n\nconst executeDelete = () => {\n if (deleteIndex.value === null) {\n // Delete all distributions\n deleteAllDistributions();\n } else {\n // Delete single distribution\n removeDis(deleteIndex.value);\n }\n closeConfirmDialog();\n};\n\nconst deleteAllDistributions = () => {\n const newValues = cloneDeep(props.values);\n newValues.Distributions.distributionList = [];\n store.dispatch('dpiStore/saveFormValues', { property: 'datasets', values: newValues });\n\n list.value.disList = []\n showConfirmDialog.value = false;\n}\n\n</script>\n\n<style scoped>\n.confirmation-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0, 0, 0, 0.5);\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 1050;\n}\n\n.confirmation-dialog {\n background: white;\n border-radius: 5px;\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);\n width: 400px;\n max-width: 90%;\n}\n\n.confirmation-header {\n padding: 15px 20px;\n border-bottom: 1px solid #eee;\n}\n\n.confirmation-header h3 {\n margin: 0;\n font-size: 1.25rem;\n}\n\n.confirmation-body {\n padding: 20px;\n}\n\n.confirmation-footer {\n padding: 15px 20px;\n border-top: 1px solid #eee;\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n}\n\n.btn-danger {\n background-color: #dc3545;\n color: white;\n border-color: #dc3545;\n}\n\n.btn-danger:hover {\n background-color: #c82333;\n border-color: #bd2130;\n}\n</style>"],"names":["props","__props","disIndex","ref","store","useStore","showConfirmDialog","deleteIndex","confirmMessage","list","onMounted","nextTick","index","addDistribution","editDis","i","el","removeDis","newValues","cloneDeep","openDeleteConfirmation","closeConfirmDialog","executeDelete","deleteAllDistributions","_createElementVNode","$t","_hoisted_1","_createVNode","_component_FormKit","_openBlock","_createElementBlock","_Fragment","dist","_hoisted_2","_hoisted_3","$event","_hoisted_4","_normalizeClass","DistributionStepper","_hoisted_5","_hoisted_6"],"mappings":";;;;;;;;;;;;;;;;;AA4DA,UAAMA,IAAQC,GAKRC,IAAWC,EAAI,EAAE,GACjBC,IAAQC,EAAQ,GAChBC,IAAoBH,EAAI,EAAK,GAC7BI,IAAcJ,EAAI,IAAI,GACtBK,IAAiBL,EAAI,EAAE,GAEvBM,IAAON,EAAI;AAAA,MACf,SAAS,CAAE;AAAA,IACb,CAAC;AACD,IAAAO,EAAU,YAAY;AAGpB,UADA,MAAMC,EAAS,GACXX,EAAM,OAAO,cAAc,iBAAiB,UAAU;AACxD,iBAASY,IAAQ,GAAGA,IAAQZ,EAAM,OAAO,cAAc,iBAAiB,QAAQY;AAC9E,UAAAV,EAAS,MAAM,KAAK,kBAAkBU,CAAK,GAC3CH,EAAK,MAAM,QAAQ,KAAK,EAAE,MAAQ,kBAAkBG,GAAO,UAAY,IAAO;AAAA,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qB,SAAOX;AAAA,eACtDY,EAAE,GAAA,yCAAA,CAAA,GAAA,CAAA;AAAA;UAIJD,EAC8D,UAAA;AAAA,YADtD,MAAK;AAAA,YAAS,OAAM;AAAA,YAAqB,SAAOJ;AAAA,eACtDK,EAAE,GAAA,4CAAA,CAAA,GAAA,CAAA;AAAA;UAEOnB,EAAiB,cAA5BwB,EAaM,OAAA;AAAA;YAbwB,OAAM;AAAA,YAAwB,WAAYT,GAAkB,CAAA,MAAA,CAAA;AAAA;YACxFG,EAWM,OAXNe,GAWM;AAAA,8BAVJf,EAEM,OAAA,EAFD,OAAM,yBAAqB;AAAA,gBAC9BA,EAAkB,YAAd,WAAS;AAAA;;cAEfA,EAEM,OAFNgB,GAEM;AAAA,gBADJhB,EAA2B,aAArBhB,EAAc,KAAA,GAAA,CAAA;AAAA;;cAEtBgB,EAGM,OAAA,EAHD,OAAM,sBAAqB,GAAA;AAAA,gBAC9BA,EAA6E,UAAA;AAAA,kBAArE,OAAM;AAAA,kBAAkB,SAAOF;AAAA,mBAAe,gBAAc;AAAA;gBACpEE,EAAsF,UAAA;AAAA,kBAA9E,OAAM;AAAA,kBAAqB,SAAOH;AAAA,mBAAoB,iBAAe;AAAA;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"DistributionInputPage.vue.mjs","sources":["../../../lib/data-provider-interface/views/DistributionInputPage.vue"],"sourcesContent":["<template>\n <h1>{{ $t('message.dataupload.info.distributions') }}</h1>\n <hr>\n <div name=\"distribution-stepper-list\" class=\"distributionsListClass\">\n\n <FormKit type=\"list\" name=\"distributionList\">\n <section v-for=\"(dist, index) in list.disList\" :key=\"index\" class=\"distributionOuter\">\n <div class=\"d-flex m-4 align-items-center justify-content-between\">\n <h2 class=\"m-0\">\n {{\n props?.values?.Distributions?.distributionList?.[index]?.Mandatory?.['dct:title']?.[0]?.['@value']\n ? props.values.Distributions.distributionList[index].Mandatory['dct:title'][0]['@value']\n : `Distribution ${index + 1}`\n }}\n </h2>\n <div>\n <button class=\"btn btn-secondary\" type=\"button\" @click=\"editDis(index)\">{{ $t('message.datasetDetails.edit')\n }}</button>\n <!-- <button class=\"btn btn-secondary\" type=\"button\" @click=\"removeDis(index)\">{{\n $t('message.datasetDetails.delete') }}</button> -->\n <button class=\"btn btn-secondary\" type=\"button\" @click=\"openDeleteConfirmation(null)\">\n {{ $t('message.datasetDetails.delete') }}\n </button>\n </div>\n </div>\n <div class=\"disInputWrapper\" :class=\"{ 'd-none': !list.disList[index].isActive }\">\n <DistributionStepper :name=\"dist.name\" :index=\"index\" :schema=\"props.schema\" :values=\"props.values\"\n :distributionList=\"disIndex\">\n </DistributionStepper>\n\n </div>\n\n </section>\n </FormKit>\n <button type=\"button\" class=\"btn btn-secondary\" @click=\"addDistribution\">{{\n $t('message.dataupload.info.newDistribution')\n }}</button>\n <!-- <button type=\"button\" class=\"btn btn-secondary\" @click=\"deleteAllDistributions\">{{\n $t('message.dataupload.info.deleteDistribution') }}</button> -->\n <button type=\"button\" class=\"btn btn-secondary\" @click=\"openDeleteConfirmation\">{{\n $t('message.dataupload.info.deleteDistribution') }}</button>\n\n <div v-if=\"showConfirmDialog\" class=\"confirmation-overlay\" @click.self=\"closeConfirmDialog\">\n <div class=\"confirmation-dialog\">\n <div class=\"confirmation-header\">\n <h3>Attention</h3>\n </div>\n <div class=\"confirmation-body\">\n <p>{{ confirmMessage }}</p>\n </div>\n <div class=\"confirmation-footer\">\n <button class=\"btn btn-danger\" @click=\"executeDelete\">Confirm Delete</button>\n <button class=\"btn btn-secondary\" @click=\"closeConfirmDialog\">Cancel and Exit</button>\n </div>\n </div>\n </div>\n </div>\n</template>\n<script setup>\nimport { ref, onMounted, nextTick, computed } from 'vue';\nimport { useStore } from 'vuex';\nimport DistributionStepper from '../components/DistributionStepper.vue';\nimport { cloneDeep } from 'lodash';\nimport { useDpiStepper } from '../composables/useDpiStepper';\n\nconst props = defineProps({\n values: Object,\n schema: Object,\n})\n\nconst disIndex = ref([])\nconst store = useStore();\nconst showConfirmDialog = ref(false);\nconst deleteIndex = ref(null);\nconst confirmMessage = ref('');\n\nconst list = ref({\n disList: [],\n})\nonMounted(async () => {\n // Load DOM\n await nextTick()\n if (props.values.Distributions.distributionList.length != 0) {\n for (let index = 0; index < props.values.Distributions.distributionList.length; index++) {\n disIndex.value.push('distribution ' + index)\n list.value.disList.push({ 'name': 'distribution ' + index, 'isActive': false })\n }\n }\n})\nconst addDistribution = () => {\n list.value.disList.push({ 'name': 'distribution ' + list.value.disList.length, 'isActive': false })\n editDis(list.value.disList.length - 1)\n}\nconst editDis = (i) => {\n list.value.disList.forEach((el, index) => {\n if (i != index) {\n el.isActive = false\n }\n }\n )\n list.value.disList[i].isActive = !list.value.disList[i].isActive\n}\nconst removeDis = (i) => {\n const newValues = cloneDeep(props.values);\n newValues.Distributions.distributionList.splice(i, 1);\n\n store.dispatch('dpiStore/saveFormValues', { property: 'datasets', values: newValues });\n list.value.disList.splice(i, 1)\n}\n\nconst openDeleteConfirmation = (index = null) => {\n deleteIndex.value = index;\n confirmMessage.value = (index === null || index === undefined)\n ? 'Are you sure you want to delete this distribution? - It will only be effective when you publish the dataset.'\n : 'Are you sure you want to delete all distributions?';\n showConfirmDialog.value = true;\n};\n\nconst closeConfirmDialog = () => {\n showConfirmDialog.value = false;\n deleteIndex.value = null;\n};\n\nconst executeDelete = () => {\n if (deleteIndex.value === null) {\n // Delete all distributions\n deleteAllDistributions();\n } else {\n // Delete single distribution\n removeDis(deleteIndex.value);\n }\n closeConfirmDialog();\n};\n\nconst deleteAllDistributions = () => {\n const newValues = cloneDeep(props.values);\n newValues.Distributions.distributionList = [];\n store.dispatch('dpiStore/saveFormValues', { property: 'datasets', values: newValues });\n\n list.value.disList = []\n showConfirmDialog.value = false;\n}\n\n</script>\n\n<style scoped>\n.confirmation-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background-color: rgba(0, 0, 0, 0.5);\n display: flex;\n justify-content: center;\n align-items: center;\n z-index: 1050;\n}\n\n.confirmation-dialog {\n background: white;\n border-radius: 5px;\n box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);\n width: 400px;\n max-width: 90%;\n}\n\n.confirmation-header {\n padding: 15px 20px;\n border-bottom: 1px solid #eee;\n}\n\n.confirmation-header h3 {\n margin: 0;\n font-size: 1.25rem;\n}\n\n.confirmation-body {\n padding: 20px;\n}\n\n.confirmation-footer {\n padding: 15px 20px;\n border-top: 1px solid #eee;\n display: flex;\n justify-content: flex-end;\n gap: 10px;\n}\n\n.btn-danger {\n background-color: #dc3545;\n color: white;\n border-color: #dc3545;\n}\n\n.btn-danger:hover {\n background-color: #c82333;\n border-color: #bd2130;\n}\n</style>"],"names":["props","__props","disIndex","ref","store","useStore","showConfirmDialog","deleteIndex","confirmMessage","list","onMounted","nextTick","index","addDistribution","editDis","i","el","removeDis","newValues","cloneDeep","openDeleteConfirmation","closeConfirmDialog","executeDelete","deleteAllDistributions","_createElementVNode","$t","_hoisted_1","_createVNode","_component_FormKit","_openBlock","_createElementBlock","_Fragment","dist","_hoisted_2","_hoisted_3","_toDisplayString","_g","_f","_e","_d","_c","_b","_a","$event","_hoisted_4","_normalizeClass","DistributionStepper","_hoisted_5","_hoisted_6"],"mappings":";;;;;;;;;;;;;;;;;AAiEA,UAAMA,IAAQC,GAKRC,IAAWC,EAAI,EAAE,GACjBC,IAAQC,EAAQ,GAChBC,IAAoBH,EAAI,EAAK,GAC7BI,IAAcJ,EAAI,IAAI,GACtBK,IAAiBL,EAAI,EAAE,GAEvBM,IAAON,EAAI;AAAA,MACf,SAAS,CAAE;AAAA,IACb,CAAC;AACD,IAAAO,EAAU,YAAY;AAGpB,UADA,MAAMC,EAAS,GACXX,EAAM,OAAO,cAAc,iBAAiB,UAAU;AACxD,iBAASY,IAAQ,GAAGA,IAAQZ,EAAM,OAAO,cAAc,iBAAiB,QAAQY;AAC9E,UAAAV,EAAS,MAAM,KAAK,kBAAkBU,CAAK,GAC3CH,EAAK,MAAM,QAAQ,KAA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|
|
2
|
-
import
|
|
3
|
-
import { useDataInfoBox as
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as c, openBlock as a, createBlock as r, resolveDynamicComponent as d, withCtx as m, createElementBlock as i, Fragment as u, renderList as p, unref as f, renderSlot as D } from "vue";
|
|
2
|
+
import B from "../PvDataInfoBox/PvDataInfoBox.vue.mjs";
|
|
3
|
+
import { useDataInfoBox as k } from "../composables/useDataInfoBox.mjs";
|
|
4
|
+
const x = /* @__PURE__ */ c({
|
|
5
5
|
__name: "DatasetList",
|
|
6
6
|
props: {
|
|
7
7
|
as: { default: "div" },
|
|
8
8
|
datasets: {},
|
|
9
9
|
locale: {}
|
|
10
10
|
},
|
|
11
|
-
setup(
|
|
12
|
-
const s =
|
|
11
|
+
setup(n) {
|
|
12
|
+
const s = n, l = k({
|
|
13
13
|
datasets: s.datasets,
|
|
14
14
|
locale: s.locale
|
|
15
15
|
});
|
|
16
|
-
return (
|
|
16
|
+
return (e, y) => (a(), r(d(e.as), null, {
|
|
17
17
|
default: m(() => [
|
|
18
|
-
(a(!0), i(u, null, f(
|
|
18
|
+
(a(!0), i(u, null, p(f(l), (t, o) => D(e.$slots, "default", {
|
|
19
19
|
dataset: t,
|
|
20
20
|
rawDataset: e.datasets[o],
|
|
21
21
|
index: o
|
|
22
22
|
}, () => [
|
|
23
|
-
(a(),
|
|
23
|
+
(a(), r(B, {
|
|
24
24
|
key: t.id,
|
|
25
25
|
to: `/datasets/${t.id}`,
|
|
26
26
|
src: t.src,
|
|
@@ -36,6 +36,6 @@ const C = /* @__PURE__ */ c({
|
|
|
36
36
|
}
|
|
37
37
|
});
|
|
38
38
|
export {
|
|
39
|
-
|
|
39
|
+
x as default
|
|
40
40
|
};
|
|
41
41
|
//# sourceMappingURL=DatasetList.vue.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DatasetList.vue.mjs","sources":["../../lib/datasets/DatasetList.vue"],"sourcesContent":["<template>\n <component :is=\"as\">\n <template v-for=\"(dataset, idx) in computedDatasets\">\n <slot :dataset=\"dataset\" :raw-dataset=\"datasets[idx]\" :index=\"idx\">\n <pv-data-info-box\n :key=\"dataset.id\"\n :to=\"`/datasets/${dataset.id}`\"\n :src=\"dataset.src\"\n :dataset=\"dataset.dataset\"\n :description-max-length=\"1000\"\n :data-cy=\"`dataset@${dataset.id}`\"\n class=\"mt-3\"\n />\n </slot>\n </template>\n </component>\n</template>\n\n<script lang=\"ts\" setup>\nimport PvDataInfoBox from '../PvDataInfoBox/PvDataInfoBox.vue'\n\nimport { useDataInfoBox } from '../composables/useDataInfoBox';\n\nconst props = withDefaults(defineProps<{\n as?: string;\n datasets: any;\n locale: string;\n}>(), {\n as: 'div'\n})\n\nconst computedDatasets = useDataInfoBox({ \n datasets: props.datasets,\n locale: props.locale\n })\n</script>\n\n<style lang=\"scss\" scoped>\n\n</style>"],"names":["props","__props","computedDatasets","useDataInfoBox","_openBlock","_createBlock","_resolveDynamicComponent","_createElementBlock","_Fragment","_renderList","_unref","dataset","idx","_renderSlot","_ctx","PvDataInfoBox"],"mappings":";;;;;;;;;;;AAuBA,UAAMA,IAAQC,GAQRC,IAAmBC,EAAe;AAAA,MACtC,UAAUH,EAAM;AAAA,MAChB,QAAQA,EAAM;AAAA,IAAA,CACd;sBAjCAI,EAAA,GAAAC,EAcYC,
|
|
1
|
+
{"version":3,"file":"DatasetList.vue.mjs","sources":["../../lib/datasets/DatasetList.vue"],"sourcesContent":["<template>\n <component :is=\"as\">\n <template v-for=\"(dataset, idx) in computedDatasets\">\n <slot :dataset=\"dataset\" :raw-dataset=\"datasets[idx]\" :index=\"idx\">\n <pv-data-info-box\n :key=\"dataset.id\"\n :to=\"`/datasets/${dataset.id}`\"\n :src=\"dataset.src\"\n :dataset=\"dataset.dataset\"\n :description-max-length=\"1000\"\n :data-cy=\"`dataset@${dataset.id}`\"\n class=\"mt-3\"\n />\n </slot>\n </template>\n </component>\n</template>\n\n<script lang=\"ts\" setup>\nimport PvDataInfoBox from '../PvDataInfoBox/PvDataInfoBox.vue'\n\nimport { useDataInfoBox } from '../composables/useDataInfoBox';\n\nconst props = withDefaults(defineProps<{\n as?: string;\n datasets: any;\n locale: string;\n}>(), {\n as: 'div'\n})\n\nconst computedDatasets = useDataInfoBox({ \n datasets: props.datasets,\n locale: props.locale\n })\n</script>\n\n<style lang=\"scss\" scoped>\n\n</style>"],"names":["props","__props","computedDatasets","useDataInfoBox","_openBlock","_createBlock","_resolveDynamicComponent","as","_createElementBlock","_Fragment","_renderList","_unref","dataset","idx","_renderSlot","_ctx","datasets","PvDataInfoBox"],"mappings":";;;;;;;;;;;AAuBA,UAAMA,IAAQC,GAQRC,IAAmBC,EAAe;AAAA,MACtC,UAAUH,EAAM;AAAA,MAChB,QAAQA,EAAM;AAAA,IAAA,CACd;sBAjCAI,EAAA,GAAAC,EAcYC,EAdIC,EAAE,EAAA,GAAA,MAAA;AAAA,iBACN,MAA0C;AAAA,SAApDH,EAAA,EAAA,GAAAI,EAYWC,GAZwB,MAAAC,EAAAC,EAAAT,CAAA,GAAjB,CAAAU,GAASC,MACzBC,EAUOC,EAAA,QAAA,WAAA;AAAA,UAVA,SAAAH;AAAA,UAAmB,YAAaI,EAAQ,SAACH,CAAG;AAAA,UAAI,OAAOA;AAAA,QAAA,GAA9D,MAUO;AAAA,aATL,GAAAR,EAQEY,GAAA;AAAA,YAPC,KAAKL,EAAQ;AAAA,YACb,IAAE,aAAeA,EAAQ,EAAE;AAAA,YAC3B,KAAKA,EAAQ;AAAA,YACb,SAASA,EAAQ;AAAA,YACjB,0BAAwB;AAAA,YACxB,WAAO,WAAaA,EAAQ,EAAE;AAAA,YAC/B,OAAM;AAAA,UAAA;;;;;;;"}
|