@vcmap/module-selector 2.0.0 → 2.0.1
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/CHANGELOG.md +5 -1
- package/dist/index.js +1291 -151
- package/package.json +11 -6
- package/src/ModuleSelector.vue +12 -27
- package/src/config/ModuleEditor.vue +136 -0
- package/src/config/ModuleSelectorConfigEditor.vue +660 -0
- package/src/config/WindowPositionSettings.vue +105 -0
- package/src/defaultOptions.ts +3 -0
- package/src/index.ts +163 -22
- package/src/moduleHelper.ts +31 -0
package/dist/index.js
CHANGED
|
@@ -10,40 +10,90 @@ function loadCss(href) {
|
|
|
10
10
|
elem.onerror = reject;
|
|
11
11
|
document.head.appendChild(elem);
|
|
12
12
|
});
|
|
13
|
-
} await loadCss('data:text/css;base64,
|
|
14
|
-
import { defineComponent as
|
|
15
|
-
import { VSheet as
|
|
16
|
-
import { VcsModule as
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
13
|
+
} await loadCss('data:text/css;base64,LnYtY2FyZFtkYXRhLXYtMjlhMjIwMmZde2Rpc3BsYXk6ZmxleDtmbGV4LWRpcmVjdGlvbjpjb2x1bW47anVzdGlmeS1jb250ZW50OmNlbnRlcjthbGlnbi1pdGVtczpjZW50ZXI7aGVpZ2h0OjE1MHB4O3dpZHRoOjE1MHB4O2FzcGVjdC1yYXRpbzoxO3RyYW5zaXRpb246YmFja2dyb3VuZC1jb2xvciAuM3N9LmZpeGVkLWNhcmRbZGF0YS12LTI5YTIyMDJmXXtoZWlnaHQ6MTUwcHg7d2lkdGg6MTUwcHg7YXNwZWN0LXJhdGlvOjF9LnNlbGVjdGVkLWNhcmRbZGF0YS12LTI5YTIyMDJmXXtiYWNrZ3JvdW5kLWNvbG9yOnJnYih2YXIoLS12LXRoZW1lLXByaW1hcnkpKTtjb2xvcjpyZ2IodmFyKC0tdi10aGVtZS1vbi1wcmltYXJ5KSl9LnYtYnJlYWRjcnVtYnNbZGF0YS12LWEwNWI5ZDk4XXtwYWRkaW5nOjE2cHggMCA0cHh9Cg==');import { VcsFormButton as re, VcsTextField as te, VcsLabel as se, VcsFormSection as ae, VcsCheckbox as ce, useProxiedComplexModel as ve, useModelHasProperty as ge, VcsList as Me, AbstractConfigEditor as be, WindowSlot as he, createToggleAction as we, ButtonLocation as Ve } from "../../../assets/ui.js";
|
|
14
|
+
import { defineComponent as J, inject as me, computed as j, resolveComponent as m, openBlock as w, createBlock as _, withCtx as l, createVNode as t, createTextVNode as S, toDisplayString as y, createCommentVNode as B, createElementBlock as R, Fragment as W, renderList as le, normalizeClass as ie, ref as N, createElementVNode as Se, reactive as _e, watch as ne, mergeProps as ye } from "../../../assets/vue.js";
|
|
15
|
+
import { VSheet as Ee, VContainer as Z, VRow as Q, VCol as X, VCard as fe, VIcon as Ce, VCardTitle as $e, VForm as Ie, VDivider as ke, VDialog as Ue, VBreadcrumbs as Ae, VBreadcrumbsItem as Te } from "../../../assets/vuetify.js";
|
|
16
|
+
import { VcsModule as Oe } from "../../../assets/core.js";
|
|
17
|
+
function de(e, o) {
|
|
18
|
+
if (e != null) {
|
|
19
|
+
const i = Number.parseInt(String(e), 10);
|
|
20
|
+
if (i != null && !Number.isNaN(i))
|
|
21
|
+
return i;
|
|
22
|
+
}
|
|
23
|
+
return o;
|
|
24
|
+
}
|
|
25
|
+
function Ne(e, o) {
|
|
26
|
+
return e == null ? !!o : typeof e == "boolean" ? e : e === 1 ? !0 : e === 0 ? !1 : typeof e == "string" && (e.toLowerCase() === "true" || e.toLowerCase() === "1") ? !0 : typeof e == "string" && (e.toLowerCase() === "false" || e.toLowerCase() === "0") ? !1 : !!o;
|
|
27
|
+
}
|
|
28
|
+
function qe(e) {
|
|
29
|
+
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
30
|
+
}
|
|
31
|
+
var Be = function e(o, i) {
|
|
32
|
+
if (o === i) return !0;
|
|
33
|
+
if (o && i && typeof o == "object" && typeof i == "object") {
|
|
34
|
+
if (o.constructor !== i.constructor) return !1;
|
|
35
|
+
var r, d, n;
|
|
36
|
+
if (Array.isArray(o)) {
|
|
37
|
+
if (r = o.length, r != i.length) return !1;
|
|
38
|
+
for (d = r; d-- !== 0; )
|
|
39
|
+
if (!e(o[d], i[d])) return !1;
|
|
40
|
+
return !0;
|
|
41
|
+
}
|
|
42
|
+
if (o.constructor === RegExp) return o.source === i.source && o.flags === i.flags;
|
|
43
|
+
if (o.valueOf !== Object.prototype.valueOf) return o.valueOf() === i.valueOf();
|
|
44
|
+
if (o.toString !== Object.prototype.toString) return o.toString() === i.toString();
|
|
45
|
+
if (n = Object.keys(o), r = n.length, r !== Object.keys(i).length) return !1;
|
|
46
|
+
for (d = r; d-- !== 0; )
|
|
47
|
+
if (!Object.prototype.hasOwnProperty.call(i, n[d])) return !1;
|
|
48
|
+
for (d = r; d-- !== 0; ) {
|
|
49
|
+
var u = n[d];
|
|
50
|
+
if (!e(o[u], i[u])) return !1;
|
|
51
|
+
}
|
|
52
|
+
return !0;
|
|
53
|
+
}
|
|
54
|
+
return o !== o && i !== i;
|
|
55
|
+
};
|
|
56
|
+
const oe = /* @__PURE__ */ qe(Be), P = "@vcmap/module-selector", Fe = "2.0.1", Ge = "^6.0";
|
|
57
|
+
async function ue(e, o) {
|
|
58
|
+
const i = await fetch(e, {
|
|
20
59
|
method: "GET"
|
|
21
|
-
}).then((
|
|
22
|
-
if (
|
|
23
|
-
return
|
|
60
|
+
}).then((r) => {
|
|
61
|
+
if (r.ok)
|
|
62
|
+
return r.json();
|
|
24
63
|
});
|
|
25
|
-
if (
|
|
26
|
-
|
|
27
|
-
const
|
|
28
|
-
await o.addModule(
|
|
64
|
+
if (i) {
|
|
65
|
+
i._id = "moduleSelector_module_id";
|
|
66
|
+
const r = new Oe(i);
|
|
67
|
+
await o.addModule(r);
|
|
29
68
|
}
|
|
30
69
|
}
|
|
31
|
-
async function
|
|
32
|
-
var
|
|
33
|
-
const o = "moduleSelector_module_id",
|
|
34
|
-
e.getModuleById(o) && await e.removeModule(o), e.maps.activeMap || await e.maps.setActiveMap(
|
|
70
|
+
async function Le(e) {
|
|
71
|
+
var d, n;
|
|
72
|
+
const o = "moduleSelector_module_id", i = (d = e.maps.activeMap) == null ? void 0 : d.name;
|
|
73
|
+
e.getModuleById(o) && await e.removeModule(o), e.maps.activeMap || await e.maps.setActiveMap(i || ((n = [...e.maps][0]) == null ? void 0 : n.name));
|
|
35
74
|
}
|
|
36
|
-
const
|
|
75
|
+
const K = "moduleSelector_window_id";
|
|
76
|
+
async function pe(e, o, i, r, d) {
|
|
77
|
+
var a;
|
|
78
|
+
if (await Le(i), e === null && !d) {
|
|
79
|
+
i.windowManager.remove(K);
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
const n = r[e], u = (n == null ? void 0 : n.type) === "group" ? (a = n.cards) == null ? void 0 : a[o] : null;
|
|
83
|
+
u != null && u.moduleUrl ? await ue(u.moduleUrl, i) : (n == null ? void 0 : n.type) === "url" && await ue(n.moduleUrl, i), i.windowManager.remove(K);
|
|
84
|
+
}
|
|
85
|
+
const Pe = J({
|
|
37
86
|
name: "ModuleSelector",
|
|
87
|
+
methods: { startApplication: pe },
|
|
38
88
|
components: {
|
|
39
|
-
VSheet:
|
|
40
|
-
VContainer:
|
|
41
|
-
VRow:
|
|
42
|
-
VCol:
|
|
43
|
-
VCard:
|
|
44
|
-
VIcon:
|
|
45
|
-
VCardTitle:
|
|
46
|
-
VcsFormButton:
|
|
89
|
+
VSheet: Ee,
|
|
90
|
+
VContainer: Z,
|
|
91
|
+
VRow: Q,
|
|
92
|
+
VCol: X,
|
|
93
|
+
VCard: fe,
|
|
94
|
+
VIcon: Ce,
|
|
95
|
+
VCardTitle: $e,
|
|
96
|
+
VcsFormButton: re
|
|
47
97
|
},
|
|
48
98
|
props: {
|
|
49
99
|
modules: {
|
|
@@ -62,86 +112,79 @@ const x = "moduleSelector_window_id", X = E({
|
|
|
62
112
|
}
|
|
63
113
|
},
|
|
64
114
|
setup(e) {
|
|
65
|
-
const o =
|
|
66
|
-
const
|
|
67
|
-
return (
|
|
68
|
-
}),
|
|
69
|
-
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
},
|
|
75
|
-
var i;
|
|
76
|
-
await Q(o);
|
|
77
|
-
const n = t.selectedMainModuleIndex.value, C = t.selectedNestedModuleIndex.value;
|
|
78
|
-
if (n === null && !e.basisModule) return;
|
|
79
|
-
const d = s[n], g = (d == null ? void 0 : d.type) === "group" ? (i = d.cards) == null ? void 0 : i[C] : null;
|
|
80
|
-
g != null && g.moduleUrl ? await $(g.moduleUrl, o) : (d == null ? void 0 : d.type) === "url" && await $(d.moduleUrl, o), o.windowManager.remove(x);
|
|
81
|
-
}, w = V(() => {
|
|
115
|
+
const o = me("vcsApp"), i = o.plugins.getByKey(P), { modules: r } = e, d = j(() => {
|
|
116
|
+
const c = e.modules[i.selectedMainModuleIndex.value];
|
|
117
|
+
return (c == null ? void 0 : c.type) === "group" ? c.cards : [];
|
|
118
|
+
}), n = (c) => {
|
|
119
|
+
i.selectedMainModuleIndex.value === c ? i.selectedMainModuleIndex.value = null : i.selectedMainModuleIndex.value = c;
|
|
120
|
+
}, u = (c) => {
|
|
121
|
+
i.selectedNestedModuleIndex.value === c ? i.selectedNestedModuleIndex.value = null : i.selectedNestedModuleIndex.value = c;
|
|
122
|
+
}, a = () => {
|
|
123
|
+
i.selectedNestedModuleIndex.value = null, i.selectedMainModuleIndex.value = null;
|
|
124
|
+
}, v = j(() => {
|
|
82
125
|
if (!e.requireModuleSelection) return !1;
|
|
83
|
-
const
|
|
84
|
-
return
|
|
126
|
+
const c = i.selectedMainModuleIndex.value, f = i.selectedNestedModuleIndex.value, g = r[c];
|
|
127
|
+
return c == null || (g == null ? void 0 : g.type) === "group" && g.cards && f == null;
|
|
85
128
|
});
|
|
86
129
|
return {
|
|
87
|
-
nestedCards:
|
|
88
|
-
plugin:
|
|
89
|
-
selectModule:
|
|
90
|
-
selectNestedModule:
|
|
91
|
-
showMainCards:
|
|
92
|
-
|
|
93
|
-
|
|
130
|
+
nestedCards: d,
|
|
131
|
+
plugin: i,
|
|
132
|
+
selectModule: n,
|
|
133
|
+
selectNestedModule: u,
|
|
134
|
+
showMainCards: a,
|
|
135
|
+
isButtonDisabled: v,
|
|
136
|
+
app: o
|
|
94
137
|
};
|
|
95
138
|
}
|
|
96
139
|
}), Y = (e, o) => {
|
|
97
|
-
const
|
|
98
|
-
for (const [
|
|
99
|
-
|
|
100
|
-
return
|
|
140
|
+
const i = e.__vccOpts || e;
|
|
141
|
+
for (const [r, d] of o)
|
|
142
|
+
i[r] = d;
|
|
143
|
+
return i;
|
|
101
144
|
};
|
|
102
|
-
function
|
|
103
|
-
const
|
|
104
|
-
return
|
|
145
|
+
function je(e, o, i, r, d, n) {
|
|
146
|
+
const u = m("v-icon"), a = m("v-card-title"), v = m("v-card"), c = m("v-col"), f = m("v-row"), g = m("VcsFormButton"), $ = m("v-container"), U = m("v-sheet");
|
|
147
|
+
return w(), _(U, {
|
|
105
148
|
class: "module-selector",
|
|
106
149
|
elevation: "1"
|
|
107
150
|
}, {
|
|
108
151
|
default: l(() => [
|
|
109
|
-
|
|
152
|
+
t($, null, {
|
|
110
153
|
default: l(() => [
|
|
111
|
-
|
|
154
|
+
t(f, {
|
|
112
155
|
class: "justify-center align-center",
|
|
113
156
|
"no-gutters": ""
|
|
114
157
|
}, {
|
|
115
158
|
default: l(() => [
|
|
116
|
-
e.basisModule && !e.nestedCards.length ? (
|
|
159
|
+
e.basisModule && !e.nestedCards.length ? (w(), _(c, {
|
|
117
160
|
key: 0,
|
|
118
161
|
cols: "auto",
|
|
119
162
|
class: "pa-2"
|
|
120
163
|
}, {
|
|
121
164
|
default: l(() => [
|
|
122
|
-
|
|
165
|
+
t(v, {
|
|
123
166
|
class: "pa-3 fixed-card selected-card",
|
|
124
167
|
outlined: ""
|
|
125
168
|
}, {
|
|
126
169
|
default: l(() => [
|
|
127
|
-
e.basisModule.icon ? (
|
|
170
|
+
e.basisModule.icon ? (w(), _(u, {
|
|
128
171
|
key: 0,
|
|
129
172
|
size: "50"
|
|
130
173
|
}, {
|
|
131
174
|
default: l(() => [
|
|
132
|
-
|
|
133
|
-
|
|
175
|
+
S(
|
|
176
|
+
y(e.basisModule.icon),
|
|
134
177
|
1
|
|
135
178
|
/* TEXT */
|
|
136
179
|
)
|
|
137
180
|
]),
|
|
138
181
|
_: 1
|
|
139
182
|
/* STABLE */
|
|
140
|
-
})) :
|
|
141
|
-
a
|
|
183
|
+
})) : B("v-if", !0),
|
|
184
|
+
t(a, { class: "text-center" }, {
|
|
142
185
|
default: l(() => [
|
|
143
|
-
|
|
144
|
-
|
|
186
|
+
S(
|
|
187
|
+
y(e.$st(e.basisModule.title)),
|
|
145
188
|
1
|
|
146
189
|
/* TEXT */
|
|
147
190
|
)
|
|
@@ -156,31 +199,31 @@ function ee(e, o, t, s, f, y) {
|
|
|
156
199
|
]),
|
|
157
200
|
_: 1
|
|
158
201
|
/* STABLE */
|
|
159
|
-
})) :
|
|
160
|
-
e.nestedCards.length ? (
|
|
161
|
-
|
|
202
|
+
})) : B("v-if", !0),
|
|
203
|
+
e.nestedCards.length ? (w(), R(
|
|
204
|
+
W,
|
|
162
205
|
{ key: 2 },
|
|
163
206
|
[
|
|
164
|
-
|
|
207
|
+
t(c, {
|
|
165
208
|
cols: "auto",
|
|
166
209
|
class: "pa-2"
|
|
167
210
|
}, {
|
|
168
211
|
default: l(() => [
|
|
169
|
-
|
|
212
|
+
t(v, {
|
|
170
213
|
class: "fixed-card hover-card",
|
|
171
214
|
outlined: "",
|
|
172
|
-
onClick: o[0] || (o[0] = (
|
|
215
|
+
onClick: o[0] || (o[0] = (V) => e.showMainCards())
|
|
173
216
|
}, {
|
|
174
217
|
default: l(() => [
|
|
175
|
-
|
|
218
|
+
t(u, { size: "50" }, {
|
|
176
219
|
default: l(() => [
|
|
177
|
-
|
|
220
|
+
S("mdi-arrow-left")
|
|
178
221
|
]),
|
|
179
222
|
_: 1
|
|
180
223
|
/* STABLE */
|
|
181
224
|
}),
|
|
182
|
-
|
|
183
|
-
" " +
|
|
225
|
+
S(
|
|
226
|
+
" " + y(e.$st("moduleSelector.cardBack")),
|
|
184
227
|
1
|
|
185
228
|
/* TEXT */
|
|
186
229
|
)
|
|
@@ -192,36 +235,36 @@ function ee(e, o, t, s, f, y) {
|
|
|
192
235
|
_: 1
|
|
193
236
|
/* STABLE */
|
|
194
237
|
}),
|
|
195
|
-
(
|
|
196
|
-
|
|
238
|
+
(w(!0), R(
|
|
239
|
+
W,
|
|
197
240
|
null,
|
|
198
|
-
|
|
199
|
-
|
|
241
|
+
le(e.nestedCards, (V, E) => (w(), _(
|
|
242
|
+
c,
|
|
200
243
|
{
|
|
201
|
-
key:
|
|
244
|
+
key: E,
|
|
202
245
|
cols: "auto",
|
|
203
246
|
class: "pa-2"
|
|
204
247
|
},
|
|
205
248
|
{
|
|
206
249
|
default: l(() => [
|
|
207
|
-
|
|
208
|
-
class:
|
|
209
|
-
"selected-card": e.plugin.selectedNestedModuleIndex.value ===
|
|
250
|
+
t(v, {
|
|
251
|
+
class: ie(["fixed-card hover-card", {
|
|
252
|
+
"selected-card": e.plugin.selectedNestedModuleIndex.value === E
|
|
210
253
|
}]),
|
|
211
254
|
outlined: "",
|
|
212
|
-
onClick: (
|
|
255
|
+
onClick: (I) => e.selectNestedModule(E)
|
|
213
256
|
}, {
|
|
214
257
|
default: l(() => [
|
|
215
|
-
|
|
216
|
-
|
|
258
|
+
V.icon ? (w(), _(
|
|
259
|
+
u,
|
|
217
260
|
{
|
|
218
261
|
key: 0,
|
|
219
262
|
size: "50"
|
|
220
263
|
},
|
|
221
264
|
{
|
|
222
265
|
default: l(() => [
|
|
223
|
-
|
|
224
|
-
|
|
266
|
+
S(
|
|
267
|
+
y(V.icon),
|
|
225
268
|
1
|
|
226
269
|
/* TEXT */
|
|
227
270
|
)
|
|
@@ -231,14 +274,14 @@ function ee(e, o, t, s, f, y) {
|
|
|
231
274
|
},
|
|
232
275
|
1024
|
|
233
276
|
/* DYNAMIC_SLOTS */
|
|
234
|
-
)) :
|
|
235
|
-
|
|
236
|
-
|
|
277
|
+
)) : B("v-if", !0),
|
|
278
|
+
t(
|
|
279
|
+
a,
|
|
237
280
|
{ class: "text-center" },
|
|
238
281
|
{
|
|
239
282
|
default: l(() => [
|
|
240
|
-
|
|
241
|
-
|
|
283
|
+
S(
|
|
284
|
+
y(e.$st(V.title)),
|
|
242
285
|
1
|
|
243
286
|
/* TEXT */
|
|
244
287
|
)
|
|
@@ -266,36 +309,36 @@ function ee(e, o, t, s, f, y) {
|
|
|
266
309
|
],
|
|
267
310
|
64
|
|
268
311
|
/* STABLE_FRAGMENT */
|
|
269
|
-
)) : (
|
|
270
|
-
|
|
312
|
+
)) : (w(!0), R(
|
|
313
|
+
W,
|
|
271
314
|
{ key: 1 },
|
|
272
|
-
|
|
273
|
-
|
|
315
|
+
le(e.modules, (V, E) => (w(), _(
|
|
316
|
+
c,
|
|
274
317
|
{
|
|
275
318
|
cols: "auto",
|
|
276
319
|
class: "pa-2",
|
|
277
|
-
key:
|
|
320
|
+
key: E
|
|
278
321
|
},
|
|
279
322
|
{
|
|
280
323
|
default: l(() => [
|
|
281
|
-
|
|
282
|
-
class:
|
|
283
|
-
"selected-card": e.plugin.selectedMainModuleIndex.value ===
|
|
324
|
+
t(v, {
|
|
325
|
+
class: ie(["fixed-card hover-card", {
|
|
326
|
+
"selected-card": e.plugin.selectedMainModuleIndex.value === E
|
|
284
327
|
}]),
|
|
285
328
|
outlined: "",
|
|
286
|
-
onClick: (
|
|
329
|
+
onClick: (I) => e.selectModule(E)
|
|
287
330
|
}, {
|
|
288
331
|
default: l(() => [
|
|
289
|
-
|
|
290
|
-
|
|
332
|
+
V.icon ? (w(), _(
|
|
333
|
+
u,
|
|
291
334
|
{
|
|
292
335
|
key: 0,
|
|
293
336
|
size: "50"
|
|
294
337
|
},
|
|
295
338
|
{
|
|
296
339
|
default: l(() => [
|
|
297
|
-
|
|
298
|
-
|
|
340
|
+
S(
|
|
341
|
+
y(V.icon),
|
|
299
342
|
1
|
|
300
343
|
/* TEXT */
|
|
301
344
|
)
|
|
@@ -305,14 +348,14 @@ function ee(e, o, t, s, f, y) {
|
|
|
305
348
|
},
|
|
306
349
|
1024
|
|
307
350
|
/* DYNAMIC_SLOTS */
|
|
308
|
-
)) :
|
|
309
|
-
|
|
310
|
-
|
|
351
|
+
)) : B("v-if", !0),
|
|
352
|
+
t(
|
|
353
|
+
a,
|
|
311
354
|
{ class: "text-center" },
|
|
312
355
|
{
|
|
313
356
|
default: l(() => [
|
|
314
|
-
|
|
315
|
-
|
|
357
|
+
S(
|
|
358
|
+
y(e.$st(V.title)),
|
|
316
359
|
1
|
|
317
360
|
/* TEXT */
|
|
318
361
|
)
|
|
@@ -341,24 +384,30 @@ function ee(e, o, t, s, f, y) {
|
|
|
341
384
|
_: 1
|
|
342
385
|
/* STABLE */
|
|
343
386
|
}),
|
|
344
|
-
|
|
387
|
+
t(f, { justify: "end" }, {
|
|
345
388
|
default: l(() => [
|
|
346
|
-
|
|
389
|
+
t(g, {
|
|
347
390
|
variant: "filled",
|
|
348
391
|
class: "ma-5",
|
|
349
|
-
onClick: e.startApplication
|
|
392
|
+
onClick: o[1] || (o[1] = (V) => e.startApplication(
|
|
393
|
+
e.plugin.selectedMainModuleIndex.value,
|
|
394
|
+
e.plugin.selectedNestedModuleIndex.value,
|
|
395
|
+
e.app,
|
|
396
|
+
e.modules,
|
|
397
|
+
e.basisModule
|
|
398
|
+
)),
|
|
350
399
|
disabled: e.isButtonDisabled
|
|
351
400
|
}, {
|
|
352
401
|
default: l(() => [
|
|
353
|
-
|
|
354
|
-
|
|
402
|
+
S(
|
|
403
|
+
y(e.$st("moduleSelector.startButton")),
|
|
355
404
|
1
|
|
356
405
|
/* TEXT */
|
|
357
406
|
)
|
|
358
407
|
]),
|
|
359
408
|
_: 1
|
|
360
409
|
/* STABLE */
|
|
361
|
-
}, 8, ["
|
|
410
|
+
}, 8, ["disabled"])
|
|
362
411
|
]),
|
|
363
412
|
_: 1
|
|
364
413
|
/* STABLE */
|
|
@@ -372,82 +421,1173 @@ function ee(e, o, t, s, f, y) {
|
|
|
372
421
|
/* STABLE */
|
|
373
422
|
});
|
|
374
423
|
}
|
|
375
|
-
const
|
|
424
|
+
const De = /* @__PURE__ */ Y(Pe, [["render", je], ["__scopeId", "data-v-29a2202f"]]), H = () => ({
|
|
376
425
|
windowTitle: "moduleSelector.title",
|
|
426
|
+
isActiveOnStart: !0,
|
|
427
|
+
requireModuleSelection: !1,
|
|
377
428
|
position: {
|
|
378
429
|
left: "33%",
|
|
379
430
|
right: "33%",
|
|
380
431
|
top: "10%"
|
|
381
432
|
},
|
|
433
|
+
basisModule: void 0,
|
|
382
434
|
modules: []
|
|
435
|
+
}), ze = J({
|
|
436
|
+
name: "ModuleEditor",
|
|
437
|
+
components: {
|
|
438
|
+
VcsTextField: te,
|
|
439
|
+
VcsLabel: se,
|
|
440
|
+
VCol: X,
|
|
441
|
+
VRow: Q,
|
|
442
|
+
VForm: Ie,
|
|
443
|
+
VContainer: Z,
|
|
444
|
+
VcsFormButton: re,
|
|
445
|
+
VDivider: ke,
|
|
446
|
+
VCard: fe,
|
|
447
|
+
VcsFormSection: ae
|
|
448
|
+
},
|
|
449
|
+
props: {
|
|
450
|
+
modelValue: {
|
|
451
|
+
type: Object,
|
|
452
|
+
required: !0
|
|
453
|
+
}
|
|
454
|
+
},
|
|
455
|
+
setup(e) {
|
|
456
|
+
const o = N(e.modelValue), i = N(!1);
|
|
457
|
+
return {
|
|
458
|
+
localModuleOptions: o,
|
|
459
|
+
isFormValid: i,
|
|
460
|
+
validateForm: () => {
|
|
461
|
+
i.value = !!o.value.title;
|
|
462
|
+
},
|
|
463
|
+
requiredRule: (n) => !!n || "moduleSelector.configEditor.editorError"
|
|
464
|
+
};
|
|
465
|
+
}
|
|
466
|
+
}), Re = { class: "d-flex gc-2 w-100 justify-end pa-2" };
|
|
467
|
+
function We(e, o, i, r, d, n) {
|
|
468
|
+
const u = m("VcsLabel"), a = m("v-col"), v = m("VcsTextField"), c = m("v-row"), f = m("v-container"), g = m("v-form"), $ = m("v-divider"), U = m("VcsFormButton"), V = m("VcsFormSection"), E = m("v-card");
|
|
469
|
+
return w(), _(E, null, {
|
|
470
|
+
default: l(() => [
|
|
471
|
+
t(V, null, {
|
|
472
|
+
default: l(() => [
|
|
473
|
+
t(g, {
|
|
474
|
+
modelValue: e.isFormValid,
|
|
475
|
+
"onUpdate:modelValue": o[3] || (o[3] = (I) => e.isFormValid = I),
|
|
476
|
+
ref: "form"
|
|
477
|
+
}, {
|
|
478
|
+
default: l(() => [
|
|
479
|
+
t(f, { class: "px-2 pt-0 pb-2" }, {
|
|
480
|
+
default: l(() => [
|
|
481
|
+
t(c, { "no-gutters": "" }, {
|
|
482
|
+
default: l(() => [
|
|
483
|
+
t(a, { cols: "6" }, {
|
|
484
|
+
default: l(() => [
|
|
485
|
+
t(u, {
|
|
486
|
+
required: "",
|
|
487
|
+
"html-for": "moduleName"
|
|
488
|
+
}, {
|
|
489
|
+
default: l(() => [
|
|
490
|
+
S(
|
|
491
|
+
y(e.$st("moduleSelector.configEditor.moduleName")),
|
|
492
|
+
1
|
|
493
|
+
/* TEXT */
|
|
494
|
+
)
|
|
495
|
+
]),
|
|
496
|
+
_: 1
|
|
497
|
+
/* STABLE */
|
|
498
|
+
})
|
|
499
|
+
]),
|
|
500
|
+
_: 1
|
|
501
|
+
/* STABLE */
|
|
502
|
+
}),
|
|
503
|
+
t(a, { cols: "6" }, {
|
|
504
|
+
default: l(() => [
|
|
505
|
+
t(v, {
|
|
506
|
+
id: "moduleName",
|
|
507
|
+
placeholder: "Module Name",
|
|
508
|
+
modelValue: e.localModuleOptions.title,
|
|
509
|
+
"onUpdate:modelValue": o[0] || (o[0] = (I) => e.localModuleOptions.title = I),
|
|
510
|
+
rules: [e.requiredRule]
|
|
511
|
+
}, null, 8, ["modelValue", "rules"])
|
|
512
|
+
]),
|
|
513
|
+
_: 1
|
|
514
|
+
/* STABLE */
|
|
515
|
+
})
|
|
516
|
+
]),
|
|
517
|
+
_: 1
|
|
518
|
+
/* STABLE */
|
|
519
|
+
}),
|
|
520
|
+
t(c, { "no-gutters": "" }, {
|
|
521
|
+
default: l(() => [
|
|
522
|
+
t(a, { cols: "6" }, {
|
|
523
|
+
default: l(() => [
|
|
524
|
+
t(u, {
|
|
525
|
+
required: "",
|
|
526
|
+
"html-for": "moduleIcon"
|
|
527
|
+
}, {
|
|
528
|
+
default: l(() => [
|
|
529
|
+
S(
|
|
530
|
+
y(e.$st("moduleSelector.configEditor.moduleIcon")),
|
|
531
|
+
1
|
|
532
|
+
/* TEXT */
|
|
533
|
+
)
|
|
534
|
+
]),
|
|
535
|
+
_: 1
|
|
536
|
+
/* STABLE */
|
|
537
|
+
})
|
|
538
|
+
]),
|
|
539
|
+
_: 1
|
|
540
|
+
/* STABLE */
|
|
541
|
+
}),
|
|
542
|
+
t(a, { cols: "6" }, {
|
|
543
|
+
default: l(() => [
|
|
544
|
+
t(v, {
|
|
545
|
+
id: "moduleIcon",
|
|
546
|
+
placeholder: "Icon Name",
|
|
547
|
+
modelValue: e.localModuleOptions.icon,
|
|
548
|
+
"onUpdate:modelValue": o[1] || (o[1] = (I) => e.localModuleOptions.icon = I),
|
|
549
|
+
rules: [e.requiredRule]
|
|
550
|
+
}, null, 8, ["modelValue", "rules"])
|
|
551
|
+
]),
|
|
552
|
+
_: 1
|
|
553
|
+
/* STABLE */
|
|
554
|
+
})
|
|
555
|
+
]),
|
|
556
|
+
_: 1
|
|
557
|
+
/* STABLE */
|
|
558
|
+
}),
|
|
559
|
+
t(c, { "no-gutters": "" }, {
|
|
560
|
+
default: l(() => [
|
|
561
|
+
t(a, { cols: "6" }, {
|
|
562
|
+
default: l(() => [
|
|
563
|
+
t(u, {
|
|
564
|
+
required: "",
|
|
565
|
+
"html-for": "moduleUrl"
|
|
566
|
+
}, {
|
|
567
|
+
default: l(() => [
|
|
568
|
+
S(
|
|
569
|
+
y(e.$st("moduleSelector.configEditor.moduleUrl")),
|
|
570
|
+
1
|
|
571
|
+
/* TEXT */
|
|
572
|
+
)
|
|
573
|
+
]),
|
|
574
|
+
_: 1
|
|
575
|
+
/* STABLE */
|
|
576
|
+
})
|
|
577
|
+
]),
|
|
578
|
+
_: 1
|
|
579
|
+
/* STABLE */
|
|
580
|
+
}),
|
|
581
|
+
t(a, { cols: "6" }, {
|
|
582
|
+
default: l(() => [
|
|
583
|
+
t(v, {
|
|
584
|
+
id: "moduleUrl",
|
|
585
|
+
placeholder: "URL",
|
|
586
|
+
modelValue: e.localModuleOptions.moduleUrl,
|
|
587
|
+
"onUpdate:modelValue": o[2] || (o[2] = (I) => e.localModuleOptions.moduleUrl = I),
|
|
588
|
+
rules: [e.requiredRule]
|
|
589
|
+
}, null, 8, ["modelValue", "rules"])
|
|
590
|
+
]),
|
|
591
|
+
_: 1
|
|
592
|
+
/* STABLE */
|
|
593
|
+
})
|
|
594
|
+
]),
|
|
595
|
+
_: 1
|
|
596
|
+
/* STABLE */
|
|
597
|
+
})
|
|
598
|
+
]),
|
|
599
|
+
_: 1
|
|
600
|
+
/* STABLE */
|
|
601
|
+
})
|
|
602
|
+
]),
|
|
603
|
+
_: 1
|
|
604
|
+
/* STABLE */
|
|
605
|
+
}, 8, ["modelValue"]),
|
|
606
|
+
t($),
|
|
607
|
+
Se("div", Re, [
|
|
608
|
+
t(U, {
|
|
609
|
+
disabled: !e.isFormValid,
|
|
610
|
+
onClick: o[4] || (o[4] = () => {
|
|
611
|
+
e.$emit("submit", e.localModuleOptions);
|
|
612
|
+
}),
|
|
613
|
+
variant: "filled"
|
|
614
|
+
}, {
|
|
615
|
+
default: l(() => [
|
|
616
|
+
S(
|
|
617
|
+
y(e.$st("components.apply")),
|
|
618
|
+
1
|
|
619
|
+
/* TEXT */
|
|
620
|
+
)
|
|
621
|
+
]),
|
|
622
|
+
_: 1
|
|
623
|
+
/* STABLE */
|
|
624
|
+
}, 8, ["disabled"]),
|
|
625
|
+
t(U, {
|
|
626
|
+
onClick: o[5] || (o[5] = (I) => e.$emit("close"))
|
|
627
|
+
}, {
|
|
628
|
+
default: l(() => [
|
|
629
|
+
S(
|
|
630
|
+
y(e.$st("components.cancel")),
|
|
631
|
+
1
|
|
632
|
+
/* TEXT */
|
|
633
|
+
)
|
|
634
|
+
]),
|
|
635
|
+
_: 1
|
|
636
|
+
/* STABLE */
|
|
637
|
+
})
|
|
638
|
+
])
|
|
639
|
+
]),
|
|
640
|
+
_: 1
|
|
641
|
+
/* STABLE */
|
|
642
|
+
})
|
|
643
|
+
]),
|
|
644
|
+
_: 1
|
|
645
|
+
/* STABLE */
|
|
646
|
+
});
|
|
647
|
+
}
|
|
648
|
+
const He = /* @__PURE__ */ Y(ze, [["render", We]]), Ke = J({
|
|
649
|
+
name: "WindowPositionSettings",
|
|
650
|
+
components: {
|
|
651
|
+
VContainer: Z,
|
|
652
|
+
VRow: Q,
|
|
653
|
+
VCol: X,
|
|
654
|
+
VcsCheckbox: ce,
|
|
655
|
+
VcsTextField: te
|
|
656
|
+
},
|
|
657
|
+
props: {
|
|
658
|
+
modelValue: {
|
|
659
|
+
type: Object,
|
|
660
|
+
required: !0
|
|
661
|
+
},
|
|
662
|
+
positionKeys: {
|
|
663
|
+
type: Array,
|
|
664
|
+
default: () => ["height", "maxHeight", "width", "maxWidth"]
|
|
665
|
+
}
|
|
666
|
+
},
|
|
667
|
+
setup(e, { emit: o }) {
|
|
668
|
+
const i = ve(
|
|
669
|
+
e,
|
|
670
|
+
"modelValue",
|
|
671
|
+
o
|
|
672
|
+
);
|
|
673
|
+
return {
|
|
674
|
+
inputs: j(() => e.positionKeys.reduce(
|
|
675
|
+
(d, n) => (d[n] = {
|
|
676
|
+
key: n,
|
|
677
|
+
checkbox: ge(i, n, null),
|
|
678
|
+
input: j({
|
|
679
|
+
get() {
|
|
680
|
+
return i.value[n];
|
|
681
|
+
},
|
|
682
|
+
set(u) {
|
|
683
|
+
i.value[n] = u;
|
|
684
|
+
}
|
|
685
|
+
}),
|
|
686
|
+
placeholder: "auto"
|
|
687
|
+
}, d),
|
|
688
|
+
{}
|
|
689
|
+
))
|
|
690
|
+
};
|
|
691
|
+
}
|
|
692
|
+
});
|
|
693
|
+
function Je(e, o, i, r, d, n) {
|
|
694
|
+
const u = m("VcsCheckbox"), a = m("v-col"), v = m("VcsTextField"), c = m("v-row"), f = m("v-container");
|
|
695
|
+
return w(), _(f, { class: "py-0 px-1" }, {
|
|
696
|
+
default: l(() => [
|
|
697
|
+
(w(!0), R(
|
|
698
|
+
W,
|
|
699
|
+
null,
|
|
700
|
+
le(e.inputs, ({ key: g, checkbox: $, input: U, placeholder: V }) => (w(), _(
|
|
701
|
+
c,
|
|
702
|
+
{
|
|
703
|
+
"no-gutters": "",
|
|
704
|
+
key: g
|
|
705
|
+
},
|
|
706
|
+
{
|
|
707
|
+
default: l(() => [
|
|
708
|
+
t(
|
|
709
|
+
a,
|
|
710
|
+
null,
|
|
711
|
+
{
|
|
712
|
+
default: l(() => [
|
|
713
|
+
t(u, {
|
|
714
|
+
label: `appConfigurator.editors.featureInfo.window.position.${g}`,
|
|
715
|
+
modelValue: $.value,
|
|
716
|
+
"onUpdate:modelValue": (E) => $.value = E
|
|
717
|
+
}, null, 8, ["label", "modelValue", "onUpdate:modelValue"])
|
|
718
|
+
]),
|
|
719
|
+
_: 2
|
|
720
|
+
/* DYNAMIC */
|
|
721
|
+
},
|
|
722
|
+
1024
|
|
723
|
+
/* DYNAMIC_SLOTS */
|
|
724
|
+
),
|
|
725
|
+
t(
|
|
726
|
+
a,
|
|
727
|
+
null,
|
|
728
|
+
{
|
|
729
|
+
default: l(() => [
|
|
730
|
+
t(v, {
|
|
731
|
+
clearable: "",
|
|
732
|
+
disabled: !$.value,
|
|
733
|
+
placeholder: V,
|
|
734
|
+
modelValue: U.value,
|
|
735
|
+
"onUpdate:modelValue": (E) => U.value = E,
|
|
736
|
+
modelModifiers: { trim: !0 }
|
|
737
|
+
}, null, 8, ["disabled", "placeholder", "modelValue", "onUpdate:modelValue"])
|
|
738
|
+
]),
|
|
739
|
+
_: 2
|
|
740
|
+
/* DYNAMIC */
|
|
741
|
+
},
|
|
742
|
+
1024
|
|
743
|
+
/* DYNAMIC_SLOTS */
|
|
744
|
+
)
|
|
745
|
+
]),
|
|
746
|
+
_: 2
|
|
747
|
+
/* DYNAMIC */
|
|
748
|
+
},
|
|
749
|
+
1024
|
|
750
|
+
/* DYNAMIC_SLOTS */
|
|
751
|
+
))),
|
|
752
|
+
128
|
|
753
|
+
/* KEYED_FRAGMENT */
|
|
754
|
+
))
|
|
755
|
+
]),
|
|
756
|
+
_: 1
|
|
757
|
+
/* STABLE */
|
|
758
|
+
});
|
|
759
|
+
}
|
|
760
|
+
const Ze = /* @__PURE__ */ Y(Ke, [["render", Je]]), Qe = J({
|
|
761
|
+
name: "ModuleSelectorConfigEditor",
|
|
762
|
+
components: {
|
|
763
|
+
VcsCheckbox: ce,
|
|
764
|
+
VDialog: Ue,
|
|
765
|
+
VcsList: Me,
|
|
766
|
+
VcsFormSection: ae,
|
|
767
|
+
VRow: Q,
|
|
768
|
+
VcsLabel: se,
|
|
769
|
+
AbstractConfigEditor: be,
|
|
770
|
+
VcsTextField: te,
|
|
771
|
+
VCol: X,
|
|
772
|
+
VContainer: Z,
|
|
773
|
+
ModuleEditor: He,
|
|
774
|
+
VBreadcrumbs: Ae,
|
|
775
|
+
VBreadcrumbsItem: Te,
|
|
776
|
+
WindowPositionSettings: Ze
|
|
777
|
+
},
|
|
778
|
+
props: {
|
|
779
|
+
getConfig: {
|
|
780
|
+
type: Function,
|
|
781
|
+
required: !0
|
|
782
|
+
},
|
|
783
|
+
setConfig: {
|
|
784
|
+
type: Function,
|
|
785
|
+
required: !0
|
|
786
|
+
}
|
|
787
|
+
},
|
|
788
|
+
setup(e) {
|
|
789
|
+
var z, p, ee;
|
|
790
|
+
const o = me("vcsApp"), i = N(0), r = N(void 0), d = N([]), n = N(void 0), u = N(void 0), a = N(void 0);
|
|
791
|
+
r.value = { ...H(), ...e.getConfig() };
|
|
792
|
+
const v = N();
|
|
793
|
+
(z = r.value) != null && z.basisModule && (v.value = (p = r.value) == null ? void 0 : p.basisModule);
|
|
794
|
+
const c = j({
|
|
795
|
+
get() {
|
|
796
|
+
return !!v.value;
|
|
797
|
+
},
|
|
798
|
+
set(s) {
|
|
799
|
+
var C;
|
|
800
|
+
s ? v.value = ((C = r.value) == null ? void 0 : C.basisModule) || { title: "" } : v.value = null;
|
|
801
|
+
}
|
|
802
|
+
}), f = _e([]);
|
|
803
|
+
function g(s) {
|
|
804
|
+
var C;
|
|
805
|
+
if (s.type === "url")
|
|
806
|
+
return {
|
|
807
|
+
title: s.title,
|
|
808
|
+
type: s.type,
|
|
809
|
+
icon: s.icon,
|
|
810
|
+
moduleUrl: s.moduleUrl || ""
|
|
811
|
+
};
|
|
812
|
+
{
|
|
813
|
+
const M = ((C = s.cards) == null ? void 0 : C.map((A) => ({
|
|
814
|
+
title: A.title,
|
|
815
|
+
icon: A.icon,
|
|
816
|
+
moduleUrl: A.moduleUrl,
|
|
817
|
+
type: A.type
|
|
818
|
+
}))) || [];
|
|
819
|
+
return {
|
|
820
|
+
title: s.title,
|
|
821
|
+
type: s.type,
|
|
822
|
+
icon: s.icon,
|
|
823
|
+
...M.length ? { cards: M } : {}
|
|
824
|
+
};
|
|
825
|
+
}
|
|
826
|
+
}
|
|
827
|
+
const $ = {
|
|
828
|
+
name: "moduleSelector.configEditor.addGroup",
|
|
829
|
+
callback() {
|
|
830
|
+
var M;
|
|
831
|
+
const s = {
|
|
832
|
+
type: "group",
|
|
833
|
+
name: "",
|
|
834
|
+
id: "",
|
|
835
|
+
title: "title",
|
|
836
|
+
icon: "icon",
|
|
837
|
+
cards: []
|
|
838
|
+
};
|
|
839
|
+
(M = d.value) == null || M.push(s), n.value = s;
|
|
840
|
+
const C = d.value.indexOf(s);
|
|
841
|
+
s.id = `${s.title}-${C}`, f.splice(1, 1), f.length > 0 && (f[0].icon = "$vcsPlus", f[0].title = "moduleSelector.configEditor.TooltipAddModule");
|
|
842
|
+
}
|
|
843
|
+
};
|
|
844
|
+
function U(s) {
|
|
845
|
+
return s.map(g);
|
|
846
|
+
}
|
|
847
|
+
function V(s, C) {
|
|
848
|
+
var A, F, G;
|
|
849
|
+
const M = {
|
|
850
|
+
id: `${s.title}-${C}`,
|
|
851
|
+
name: s.title,
|
|
852
|
+
title: s.title,
|
|
853
|
+
icon: s.icon,
|
|
854
|
+
type: s.type,
|
|
855
|
+
actions: []
|
|
856
|
+
};
|
|
857
|
+
return s.type === "url" && (M.moduleUrl = s.moduleUrl, (A = M.actions) == null || A.push({
|
|
858
|
+
name: "edit",
|
|
859
|
+
title: "moduleSelector.configEditor.TooltipEditModule",
|
|
860
|
+
icon: "$vcsEdit",
|
|
861
|
+
callback() {
|
|
862
|
+
if (n.value === void 0 && d.value.length > 0) {
|
|
863
|
+
const b = d.value.find(
|
|
864
|
+
(k) => k.id === M.id
|
|
865
|
+
);
|
|
866
|
+
b && (u.value = {
|
|
867
|
+
id: b.id,
|
|
868
|
+
title: b.title,
|
|
869
|
+
icon: b.icon,
|
|
870
|
+
moduleUrl: b.moduleUrl
|
|
871
|
+
});
|
|
872
|
+
} else {
|
|
873
|
+
const b = n.value.cards.find(
|
|
874
|
+
(k) => k.id === M.id
|
|
875
|
+
);
|
|
876
|
+
b && (u.value = {
|
|
877
|
+
id: b.id,
|
|
878
|
+
title: b.title,
|
|
879
|
+
icon: b.icon,
|
|
880
|
+
moduleUrl: b.moduleUrl
|
|
881
|
+
});
|
|
882
|
+
}
|
|
883
|
+
}
|
|
884
|
+
})), s.type === "group" && ((F = M.actions) == null || F.push({
|
|
885
|
+
name: "editGroup",
|
|
886
|
+
title: "moduleSelector.configEditor.TooltipEditGroup",
|
|
887
|
+
icon: "mdi-playlist-edit",
|
|
888
|
+
callback() {
|
|
889
|
+
if (d.value.length > 0) {
|
|
890
|
+
const b = d.value.find(
|
|
891
|
+
(k) => k.id === M.id
|
|
892
|
+
);
|
|
893
|
+
b && (n.value = b, f.splice(1, 1), f.length > 0 && (f[0].icon = "$vcsPlus", f[0].title = "moduleSelector.configEditor.TooltipAddModule"));
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
}), s.cards && (M.cards = s.cards.map(V))), (G = M.actions) == null || G.push({
|
|
897
|
+
name: "linkButton.editor.remove",
|
|
898
|
+
title: "moduleSelector.configEditor.TooltipDeleteMG",
|
|
899
|
+
icon: "$vcsTrashCan",
|
|
900
|
+
callback() {
|
|
901
|
+
var b, k, h;
|
|
902
|
+
n.value ? n.value.cards = (k = (b = n.value) == null ? void 0 : b.cards) == null ? void 0 : k.filter(
|
|
903
|
+
(T) => T.id !== M.id
|
|
904
|
+
) : d.value = (h = d.value) == null ? void 0 : h.filter(
|
|
905
|
+
(T) => T.id !== M.id
|
|
906
|
+
);
|
|
907
|
+
}
|
|
908
|
+
}), M;
|
|
909
|
+
}
|
|
910
|
+
(ee = r.value) != null && ee.modules && (d.value = r.value.modules.map(V)), f.push(
|
|
911
|
+
{
|
|
912
|
+
name: "moduleSelector.configEditor.add",
|
|
913
|
+
callback() {
|
|
914
|
+
u.value = {
|
|
915
|
+
id: "",
|
|
916
|
+
title: "title",
|
|
917
|
+
icon: "icon",
|
|
918
|
+
moduleUrl: "url"
|
|
919
|
+
};
|
|
920
|
+
}
|
|
921
|
+
},
|
|
922
|
+
$
|
|
923
|
+
), ne(r, (s) => {
|
|
924
|
+
s != null && s.modules ? a.value = s.modules.map(
|
|
925
|
+
(C, M) => V(C, M)
|
|
926
|
+
) : a.value = [];
|
|
927
|
+
});
|
|
928
|
+
const E = () => {
|
|
929
|
+
e.setConfig({
|
|
930
|
+
...r.value,
|
|
931
|
+
modules: U(d.value),
|
|
932
|
+
basisModule: v.value
|
|
933
|
+
});
|
|
934
|
+
}, I = () => {
|
|
935
|
+
var s, C, M, A, F, G, b, k, h, T;
|
|
936
|
+
if (n.value === void 0) {
|
|
937
|
+
if (u.value)
|
|
938
|
+
if (((s = u.value) == null ? void 0 : s.id) !== "") {
|
|
939
|
+
const O = d.value.find(
|
|
940
|
+
(q) => {
|
|
941
|
+
var L;
|
|
942
|
+
return q.id === ((L = u.value) == null ? void 0 : L.id);
|
|
943
|
+
}
|
|
944
|
+
);
|
|
945
|
+
O && (O.title = u.value.title, O.icon = u.value.icon, O.moduleUrl = u.value.moduleUrl);
|
|
946
|
+
} else {
|
|
947
|
+
d.value.push({
|
|
948
|
+
id: `${u.value.title}-${d.value.length}`,
|
|
949
|
+
title: u.value.title,
|
|
950
|
+
name: u.value.title,
|
|
951
|
+
icon: u.value.icon,
|
|
952
|
+
moduleUrl: u.value.moduleUrl,
|
|
953
|
+
type: "url"
|
|
954
|
+
});
|
|
955
|
+
const O = U(
|
|
956
|
+
d.value
|
|
957
|
+
);
|
|
958
|
+
d.value = O.map(V);
|
|
959
|
+
}
|
|
960
|
+
} else if (u.value && ((C = u.value) == null ? void 0 : C.id) !== "") {
|
|
961
|
+
const O = n.value.cards.find(
|
|
962
|
+
(L) => L.id === u.value.id
|
|
963
|
+
);
|
|
964
|
+
O && (O.title = u.value.title, O.icon = u.value.icon, O.moduleUrl = u.value.moduleUrl);
|
|
965
|
+
let q;
|
|
966
|
+
(M = n.value) != null && M.id || ((A = n.value) == null ? void 0 : A.id) !== "" ? q = n.value.id : q = `${n.value.title}-${d.value.length - 1}`, n.value = d.value.find(
|
|
967
|
+
(L) => L.id === q
|
|
968
|
+
);
|
|
969
|
+
} else {
|
|
970
|
+
n.value.cards.push({
|
|
971
|
+
id: `${u.value.title}-${(G = (F = n.value) == null ? void 0 : F.cards) == null ? void 0 : G.length}`,
|
|
972
|
+
title: u.value.title,
|
|
973
|
+
name: u.value.title,
|
|
974
|
+
icon: u.value.icon,
|
|
975
|
+
moduleUrl: u.value.moduleUrl,
|
|
976
|
+
type: "url"
|
|
977
|
+
});
|
|
978
|
+
const O = U(
|
|
979
|
+
d.value
|
|
980
|
+
);
|
|
981
|
+
d.value = O.map(V);
|
|
982
|
+
let q;
|
|
983
|
+
(b = n.value) != null && b.id || ((k = n.value) == null ? void 0 : k.id) !== "" ? q = n.value.id : q = `${(h = n.value) == null ? void 0 : h.title}-${d.value.length - 1}`, n.value = (T = d.value) == null ? void 0 : T.find(
|
|
984
|
+
(L) => L.id === q
|
|
985
|
+
);
|
|
986
|
+
}
|
|
987
|
+
u.value = void 0;
|
|
988
|
+
}, x = () => {
|
|
989
|
+
n.value = void 0, f.length > 0 && (delete f[0].icon, delete f[0].title), f.push($);
|
|
990
|
+
}, D = N([
|
|
991
|
+
{
|
|
992
|
+
title: o.vueI18n.t(
|
|
993
|
+
"moduleSelector.configEditor.breadcrumbs.overview"
|
|
994
|
+
),
|
|
995
|
+
disabled: !1,
|
|
996
|
+
href: "#"
|
|
997
|
+
},
|
|
998
|
+
{
|
|
999
|
+
title: o.vueI18n.t("moduleSelector.configEditor.breadcrumbs.group"),
|
|
1000
|
+
disabled: !0,
|
|
1001
|
+
href: "#"
|
|
1002
|
+
}
|
|
1003
|
+
]);
|
|
1004
|
+
return ne(n, (s) => {
|
|
1005
|
+
s && s.title && (D.value[1].title = `${o.vueI18n.t("moduleSelector.configEditor.breadcrumbs.group")}: ${s.title}`, s.name = s.title);
|
|
1006
|
+
}), {
|
|
1007
|
+
editingItem: u,
|
|
1008
|
+
localConfig: r,
|
|
1009
|
+
listItemArray: d,
|
|
1010
|
+
breadcrumbItems: D,
|
|
1011
|
+
currentGroup: n,
|
|
1012
|
+
apply: E,
|
|
1013
|
+
returnLevel: x,
|
|
1014
|
+
updateItem: I,
|
|
1015
|
+
level: i,
|
|
1016
|
+
listItems: a,
|
|
1017
|
+
basisModule: v,
|
|
1018
|
+
basisModuleExists: c,
|
|
1019
|
+
headerActions: f,
|
|
1020
|
+
move({
|
|
1021
|
+
item: s,
|
|
1022
|
+
targetIndex: C
|
|
1023
|
+
}) {
|
|
1024
|
+
var M, A, F, G, b, k;
|
|
1025
|
+
if (d.value && n.value === void 0) {
|
|
1026
|
+
let h = C;
|
|
1027
|
+
h = h >= 0 ? h : 0, h = h < ((M = d.value) == null ? void 0 : M.length) ? h : d.value.length - 1;
|
|
1028
|
+
const T = (A = d.value) == null ? void 0 : A.indexOf(s);
|
|
1029
|
+
T !== h && ((F = d.value) == null || F.splice(T, 1), (G = d.value) == null || G.splice(h, 0, s));
|
|
1030
|
+
} else if ((((k = (b = n.value) == null ? void 0 : b.cards) == null ? void 0 : k.length) ?? 0) > 1) {
|
|
1031
|
+
let h = C;
|
|
1032
|
+
h = h >= 0 ? h : 0, h = h < n.value.cards.length ? h : n.value.cards.length - 1;
|
|
1033
|
+
const T = n.value.cards.indexOf(s);
|
|
1034
|
+
T && T !== h && (n.value.cards.splice(T, 1), n.value.cards.splice(h, 0, s));
|
|
1035
|
+
}
|
|
1036
|
+
}
|
|
1037
|
+
};
|
|
1038
|
+
}
|
|
383
1039
|
});
|
|
384
|
-
function
|
|
1040
|
+
function Xe(e, o, i, r, d, n) {
|
|
1041
|
+
const u = m("VcsLabel"), a = m("v-col"), v = m("VcsTextField"), c = m("v-row"), f = m("VcsCheckbox"), g = m("v-container"), $ = m("VcsFormSection"), U = m("WindowPositionSettings"), V = m("v-breadcrumbs-item"), E = m("v-breadcrumbs"), I = m("VcsList"), x = m("ModuleEditor"), D = m("v-dialog"), z = m("AbstractConfigEditor");
|
|
1042
|
+
return e.localConfig ? (w(), _(z, ye({
|
|
1043
|
+
key: 0,
|
|
1044
|
+
onSubmit: e.apply
|
|
1045
|
+
}, { ...e.$attrs, ...e.$props }), {
|
|
1046
|
+
default: l(() => [
|
|
1047
|
+
e.currentGroup === void 0 ? (w(), _(g, {
|
|
1048
|
+
key: 0,
|
|
1049
|
+
class: "py-0 px-0"
|
|
1050
|
+
}, {
|
|
1051
|
+
default: l(() => [
|
|
1052
|
+
t($, { heading: "moduleSelector.configEditor.general" }, {
|
|
1053
|
+
default: l(() => [
|
|
1054
|
+
t(g, { class: "py-0 px-1" }, {
|
|
1055
|
+
default: l(() => [
|
|
1056
|
+
t(c, { "no-gutters": "" }, {
|
|
1057
|
+
default: l(() => [
|
|
1058
|
+
t(a, { cols: "6" }, {
|
|
1059
|
+
default: l(() => [
|
|
1060
|
+
t(u, { "html-for": "moduleselector-window-title" }, {
|
|
1061
|
+
default: l(() => [
|
|
1062
|
+
S(
|
|
1063
|
+
y(e.$st("moduleSelector.configEditor.windowTitle")),
|
|
1064
|
+
1
|
|
1065
|
+
/* TEXT */
|
|
1066
|
+
)
|
|
1067
|
+
]),
|
|
1068
|
+
_: 1
|
|
1069
|
+
/* STABLE */
|
|
1070
|
+
})
|
|
1071
|
+
]),
|
|
1072
|
+
_: 1
|
|
1073
|
+
/* STABLE */
|
|
1074
|
+
}),
|
|
1075
|
+
t(a, null, {
|
|
1076
|
+
default: l(() => [
|
|
1077
|
+
t(v, {
|
|
1078
|
+
id: "moduleselector-window-title",
|
|
1079
|
+
placeholder: e.$t("moduleSelector.title"),
|
|
1080
|
+
modelValue: e.localConfig.windowTitle,
|
|
1081
|
+
"onUpdate:modelValue": o[0] || (o[0] = (p) => e.localConfig.windowTitle = p)
|
|
1082
|
+
}, null, 8, ["placeholder", "modelValue"])
|
|
1083
|
+
]),
|
|
1084
|
+
_: 1
|
|
1085
|
+
/* STABLE */
|
|
1086
|
+
})
|
|
1087
|
+
]),
|
|
1088
|
+
_: 1
|
|
1089
|
+
/* STABLE */
|
|
1090
|
+
}),
|
|
1091
|
+
t(c, { "no-gutters": "" }, {
|
|
1092
|
+
default: l(() => [
|
|
1093
|
+
t(a, null, {
|
|
1094
|
+
default: l(() => [
|
|
1095
|
+
t(f, {
|
|
1096
|
+
modelValue: e.localConfig.isActiveOnStart,
|
|
1097
|
+
"onUpdate:modelValue": o[1] || (o[1] = (p) => e.localConfig.isActiveOnStart = p),
|
|
1098
|
+
label: "moduleSelector.configEditor.isActiveOnStart"
|
|
1099
|
+
}, null, 8, ["modelValue"])
|
|
1100
|
+
]),
|
|
1101
|
+
_: 1
|
|
1102
|
+
/* STABLE */
|
|
1103
|
+
})
|
|
1104
|
+
]),
|
|
1105
|
+
_: 1
|
|
1106
|
+
/* STABLE */
|
|
1107
|
+
}),
|
|
1108
|
+
t(c, { "no-gutters": "" }, {
|
|
1109
|
+
default: l(() => [
|
|
1110
|
+
t(a, null, {
|
|
1111
|
+
default: l(() => [
|
|
1112
|
+
t(f, {
|
|
1113
|
+
modelValue: e.localConfig.requireModuleSelection,
|
|
1114
|
+
"onUpdate:modelValue": o[2] || (o[2] = (p) => e.localConfig.requireModuleSelection = p),
|
|
1115
|
+
label: "moduleSelector.configEditor.requireModuleSelection"
|
|
1116
|
+
}, null, 8, ["modelValue"])
|
|
1117
|
+
]),
|
|
1118
|
+
_: 1
|
|
1119
|
+
/* STABLE */
|
|
1120
|
+
})
|
|
1121
|
+
]),
|
|
1122
|
+
_: 1
|
|
1123
|
+
/* STABLE */
|
|
1124
|
+
})
|
|
1125
|
+
]),
|
|
1126
|
+
_: 1
|
|
1127
|
+
/* STABLE */
|
|
1128
|
+
})
|
|
1129
|
+
]),
|
|
1130
|
+
_: 1
|
|
1131
|
+
/* STABLE */
|
|
1132
|
+
}),
|
|
1133
|
+
t($, {
|
|
1134
|
+
heading: "moduleSelector.configEditor.windowPosition",
|
|
1135
|
+
expandable: !0
|
|
1136
|
+
}, {
|
|
1137
|
+
default: l(() => [
|
|
1138
|
+
t(U, {
|
|
1139
|
+
modelValue: e.localConfig.position,
|
|
1140
|
+
"onUpdate:modelValue": o[3] || (o[3] = (p) => e.localConfig.position = p),
|
|
1141
|
+
"position-keys": [
|
|
1142
|
+
"top",
|
|
1143
|
+
"right",
|
|
1144
|
+
"bottom",
|
|
1145
|
+
"left",
|
|
1146
|
+
"width",
|
|
1147
|
+
"maxWidth",
|
|
1148
|
+
"height",
|
|
1149
|
+
"maxHeight"
|
|
1150
|
+
]
|
|
1151
|
+
}, null, 8, ["modelValue"])
|
|
1152
|
+
]),
|
|
1153
|
+
_: 1
|
|
1154
|
+
/* STABLE */
|
|
1155
|
+
}),
|
|
1156
|
+
t($, { heading: "moduleSelector.configEditor.baseModule" }, {
|
|
1157
|
+
default: l(() => [
|
|
1158
|
+
t(g, { class: "py-0 px-1" }, {
|
|
1159
|
+
default: l(() => [
|
|
1160
|
+
t(c, { "no-gutters": "" }, {
|
|
1161
|
+
default: l(() => [
|
|
1162
|
+
t(a, null, {
|
|
1163
|
+
default: l(() => [
|
|
1164
|
+
t(f, {
|
|
1165
|
+
id: "BaseModuleCheckbox",
|
|
1166
|
+
modelValue: e.basisModuleExists,
|
|
1167
|
+
"onUpdate:modelValue": o[4] || (o[4] = (p) => e.basisModuleExists = p),
|
|
1168
|
+
label: "moduleSelector.configEditor.baseModuleCheckbox"
|
|
1169
|
+
}, null, 8, ["modelValue"])
|
|
1170
|
+
]),
|
|
1171
|
+
_: 1
|
|
1172
|
+
/* STABLE */
|
|
1173
|
+
})
|
|
1174
|
+
]),
|
|
1175
|
+
_: 1
|
|
1176
|
+
/* STABLE */
|
|
1177
|
+
}),
|
|
1178
|
+
e.basisModuleExists ? (w(), _(c, {
|
|
1179
|
+
key: 0,
|
|
1180
|
+
"no-gutters": ""
|
|
1181
|
+
}, {
|
|
1182
|
+
default: l(() => [
|
|
1183
|
+
t(a, { cols: "6" }, {
|
|
1184
|
+
default: l(() => [
|
|
1185
|
+
t(u, {
|
|
1186
|
+
required: "",
|
|
1187
|
+
"html-for": "basisModuleName"
|
|
1188
|
+
}, {
|
|
1189
|
+
default: l(() => [
|
|
1190
|
+
S(
|
|
1191
|
+
y(e.$st("moduleSelector.configEditor.title")),
|
|
1192
|
+
1
|
|
1193
|
+
/* TEXT */
|
|
1194
|
+
)
|
|
1195
|
+
]),
|
|
1196
|
+
_: 1
|
|
1197
|
+
/* STABLE */
|
|
1198
|
+
})
|
|
1199
|
+
]),
|
|
1200
|
+
_: 1
|
|
1201
|
+
/* STABLE */
|
|
1202
|
+
}),
|
|
1203
|
+
t(a, null, {
|
|
1204
|
+
default: l(() => [
|
|
1205
|
+
t(v, {
|
|
1206
|
+
id: "basisModuleName",
|
|
1207
|
+
placeholder: "Base Module",
|
|
1208
|
+
rules: [
|
|
1209
|
+
e.basisModuleExists && (!e.basisModule.title || e.basisModule.title === "") ? () => "moduleSelector.configEditor.error" : () => !0
|
|
1210
|
+
],
|
|
1211
|
+
modelValue: e.basisModule.title,
|
|
1212
|
+
"onUpdate:modelValue": o[5] || (o[5] = (p) => e.basisModule.title = p)
|
|
1213
|
+
}, null, 8, ["rules", "modelValue"])
|
|
1214
|
+
]),
|
|
1215
|
+
_: 1
|
|
1216
|
+
/* STABLE */
|
|
1217
|
+
})
|
|
1218
|
+
]),
|
|
1219
|
+
_: 1
|
|
1220
|
+
/* STABLE */
|
|
1221
|
+
})) : B("v-if", !0),
|
|
1222
|
+
e.basisModuleExists ? (w(), _(c, {
|
|
1223
|
+
key: 1,
|
|
1224
|
+
"no-gutters": ""
|
|
1225
|
+
}, {
|
|
1226
|
+
default: l(() => [
|
|
1227
|
+
t(a, { cols: "6" }, {
|
|
1228
|
+
default: l(() => [
|
|
1229
|
+
t(u, {
|
|
1230
|
+
required: "",
|
|
1231
|
+
"html-for": "basisModuleIcon"
|
|
1232
|
+
}, {
|
|
1233
|
+
default: l(() => [
|
|
1234
|
+
S(
|
|
1235
|
+
y(e.$st("components.style.icon")),
|
|
1236
|
+
1
|
|
1237
|
+
/* TEXT */
|
|
1238
|
+
)
|
|
1239
|
+
]),
|
|
1240
|
+
_: 1
|
|
1241
|
+
/* STABLE */
|
|
1242
|
+
})
|
|
1243
|
+
]),
|
|
1244
|
+
_: 1
|
|
1245
|
+
/* STABLE */
|
|
1246
|
+
}),
|
|
1247
|
+
t(a, null, {
|
|
1248
|
+
default: l(() => [
|
|
1249
|
+
t(v, {
|
|
1250
|
+
id: "basisModuleIcon",
|
|
1251
|
+
placeholder: "mdi-home-city",
|
|
1252
|
+
rules: [
|
|
1253
|
+
e.basisModuleExists && (!e.basisModule.icon || e.basisModule.icon === "") ? () => "moduleSelector.configEditor.error" : () => !0
|
|
1254
|
+
],
|
|
1255
|
+
modelValue: e.basisModule.icon,
|
|
1256
|
+
"onUpdate:modelValue": o[6] || (o[6] = (p) => e.basisModule.icon = p)
|
|
1257
|
+
}, null, 8, ["rules", "modelValue"])
|
|
1258
|
+
]),
|
|
1259
|
+
_: 1
|
|
1260
|
+
/* STABLE */
|
|
1261
|
+
})
|
|
1262
|
+
]),
|
|
1263
|
+
_: 1
|
|
1264
|
+
/* STABLE */
|
|
1265
|
+
})) : B("v-if", !0)
|
|
1266
|
+
]),
|
|
1267
|
+
_: 1
|
|
1268
|
+
/* STABLE */
|
|
1269
|
+
})
|
|
1270
|
+
]),
|
|
1271
|
+
_: 1
|
|
1272
|
+
/* STABLE */
|
|
1273
|
+
})
|
|
1274
|
+
]),
|
|
1275
|
+
_: 1
|
|
1276
|
+
/* STABLE */
|
|
1277
|
+
})) : (w(), _(g, {
|
|
1278
|
+
key: 1,
|
|
1279
|
+
class: "py-0 px-1"
|
|
1280
|
+
}, {
|
|
1281
|
+
default: l(() => [
|
|
1282
|
+
t(E, {
|
|
1283
|
+
items: e.breadcrumbItems,
|
|
1284
|
+
divider: "/"
|
|
1285
|
+
}, {
|
|
1286
|
+
item: l(({ item: p }) => [
|
|
1287
|
+
(w(), _(V, {
|
|
1288
|
+
key: p.title,
|
|
1289
|
+
disabled: p.disabled,
|
|
1290
|
+
href: p.href,
|
|
1291
|
+
onClick: (ee) => p.disabled ? null : e.returnLevel()
|
|
1292
|
+
}, {
|
|
1293
|
+
default: l(() => [
|
|
1294
|
+
S(
|
|
1295
|
+
y(p.title),
|
|
1296
|
+
1
|
|
1297
|
+
/* TEXT */
|
|
1298
|
+
)
|
|
1299
|
+
]),
|
|
1300
|
+
_: 2
|
|
1301
|
+
/* DYNAMIC */
|
|
1302
|
+
}, 1032, ["disabled", "href", "onClick"]))
|
|
1303
|
+
]),
|
|
1304
|
+
_: 1
|
|
1305
|
+
/* STABLE */
|
|
1306
|
+
}, 8, ["items"]),
|
|
1307
|
+
t(c, { "no-gutters": "" }, {
|
|
1308
|
+
default: l(() => [
|
|
1309
|
+
t(a, { cols: "6" }, {
|
|
1310
|
+
default: l(() => [
|
|
1311
|
+
t(u, {
|
|
1312
|
+
required: "",
|
|
1313
|
+
"html-for": "groupModuleName"
|
|
1314
|
+
}, {
|
|
1315
|
+
default: l(() => [
|
|
1316
|
+
S(
|
|
1317
|
+
y(e.$st("moduleSelector.configEditor.groupName")),
|
|
1318
|
+
1
|
|
1319
|
+
/* TEXT */
|
|
1320
|
+
)
|
|
1321
|
+
]),
|
|
1322
|
+
_: 1
|
|
1323
|
+
/* STABLE */
|
|
1324
|
+
})
|
|
1325
|
+
]),
|
|
1326
|
+
_: 1
|
|
1327
|
+
/* STABLE */
|
|
1328
|
+
}),
|
|
1329
|
+
t(a, null, {
|
|
1330
|
+
default: l(() => [
|
|
1331
|
+
t(v, {
|
|
1332
|
+
id: "groupModuleName",
|
|
1333
|
+
placeholder: "Module Name",
|
|
1334
|
+
modelValue: e.currentGroup.title,
|
|
1335
|
+
"onUpdate:modelValue": o[7] || (o[7] = (p) => e.currentGroup.title = p),
|
|
1336
|
+
rules: [(p) => !!p || "moduleSelector.configEditor.error"]
|
|
1337
|
+
}, null, 8, ["modelValue", "rules"])
|
|
1338
|
+
]),
|
|
1339
|
+
_: 1
|
|
1340
|
+
/* STABLE */
|
|
1341
|
+
})
|
|
1342
|
+
]),
|
|
1343
|
+
_: 1
|
|
1344
|
+
/* STABLE */
|
|
1345
|
+
}),
|
|
1346
|
+
t(c, { "no-gutters": "" }, {
|
|
1347
|
+
default: l(() => [
|
|
1348
|
+
t(a, { cols: "6" }, {
|
|
1349
|
+
default: l(() => [
|
|
1350
|
+
t(u, {
|
|
1351
|
+
required: "",
|
|
1352
|
+
"html-for": "groupModuleIcon"
|
|
1353
|
+
}, {
|
|
1354
|
+
default: l(() => [
|
|
1355
|
+
S(
|
|
1356
|
+
y(e.$st("moduleSelector.configEditor.moduleIcon")),
|
|
1357
|
+
1
|
|
1358
|
+
/* TEXT */
|
|
1359
|
+
)
|
|
1360
|
+
]),
|
|
1361
|
+
_: 1
|
|
1362
|
+
/* STABLE */
|
|
1363
|
+
})
|
|
1364
|
+
]),
|
|
1365
|
+
_: 1
|
|
1366
|
+
/* STABLE */
|
|
1367
|
+
}),
|
|
1368
|
+
t(a, null, {
|
|
1369
|
+
default: l(() => [
|
|
1370
|
+
t(v, {
|
|
1371
|
+
id: "groupModuleIcon",
|
|
1372
|
+
placeholder: "Module Icon",
|
|
1373
|
+
modelValue: e.currentGroup.icon,
|
|
1374
|
+
"onUpdate:modelValue": o[8] || (o[8] = (p) => e.currentGroup.icon = p),
|
|
1375
|
+
rules: [
|
|
1376
|
+
(p) => !!p || "moduleSelector.configEditor.editorError"
|
|
1377
|
+
]
|
|
1378
|
+
}, null, 8, ["modelValue", "rules"])
|
|
1379
|
+
]),
|
|
1380
|
+
_: 1
|
|
1381
|
+
/* STABLE */
|
|
1382
|
+
})
|
|
1383
|
+
]),
|
|
1384
|
+
_: 1
|
|
1385
|
+
/* STABLE */
|
|
1386
|
+
})
|
|
1387
|
+
]),
|
|
1388
|
+
_: 1
|
|
1389
|
+
/* STABLE */
|
|
1390
|
+
})),
|
|
1391
|
+
t($, {
|
|
1392
|
+
heading: "moduleSelector.configEditor.heading",
|
|
1393
|
+
"start-open": !0,
|
|
1394
|
+
"header-actions": e.headerActions
|
|
1395
|
+
}, {
|
|
1396
|
+
default: l(() => [
|
|
1397
|
+
B("V-if currentItem group > cards || wenn url oder empty listItems"),
|
|
1398
|
+
e.currentGroup === void 0 ? (w(), _(I, {
|
|
1399
|
+
key: 0,
|
|
1400
|
+
items: e.listItemArray,
|
|
1401
|
+
draggable: !0,
|
|
1402
|
+
onItemMoved: e.move
|
|
1403
|
+
}, null, 8, ["items", "onItemMoved"])) : (w(), _(I, {
|
|
1404
|
+
key: 1,
|
|
1405
|
+
items: e.currentGroup.cards,
|
|
1406
|
+
draggable: !0,
|
|
1407
|
+
onItemMoved: e.move
|
|
1408
|
+
}, null, 8, ["items", "onItemMoved"])),
|
|
1409
|
+
e.editingItem ? (w(), _(D, {
|
|
1410
|
+
key: 2,
|
|
1411
|
+
"model-value": !0,
|
|
1412
|
+
width: "400",
|
|
1413
|
+
persistent: !0
|
|
1414
|
+
}, {
|
|
1415
|
+
default: l(() => [
|
|
1416
|
+
t(x, {
|
|
1417
|
+
"model-value": e.editingItem,
|
|
1418
|
+
onClose: o[9] || (o[9] = (p) => e.editingItem = void 0),
|
|
1419
|
+
onSubmit: o[10] || (o[10] = (p) => e.updateItem())
|
|
1420
|
+
}, null, 8, ["model-value"])
|
|
1421
|
+
]),
|
|
1422
|
+
_: 1
|
|
1423
|
+
/* STABLE */
|
|
1424
|
+
})) : B("v-if", !0)
|
|
1425
|
+
]),
|
|
1426
|
+
_: 1
|
|
1427
|
+
/* STABLE */
|
|
1428
|
+
}, 8, ["header-actions"])
|
|
1429
|
+
]),
|
|
1430
|
+
_: 1
|
|
1431
|
+
/* STABLE */
|
|
1432
|
+
}, 16, ["onSubmit"])) : B("v-if", !0);
|
|
1433
|
+
}
|
|
1434
|
+
const Ye = /* @__PURE__ */ Y(Qe, [["render", Xe], ["__scopeId", "data-v-a05b9d98"]]);
|
|
1435
|
+
function to(e) {
|
|
1436
|
+
let o;
|
|
385
1437
|
return {
|
|
386
1438
|
get name() {
|
|
387
|
-
return
|
|
1439
|
+
return P;
|
|
388
1440
|
},
|
|
389
1441
|
get version() {
|
|
390
|
-
return
|
|
1442
|
+
return Fe;
|
|
391
1443
|
},
|
|
392
1444
|
get mapVersion() {
|
|
393
|
-
return
|
|
1445
|
+
return Ge;
|
|
394
1446
|
},
|
|
395
1447
|
get config() {
|
|
396
|
-
return { ...
|
|
1448
|
+
return { ...H(), ...e };
|
|
397
1449
|
},
|
|
398
|
-
selectedMainModuleIndex:
|
|
399
|
-
selectedNestedModuleIndex:
|
|
400
|
-
initialize(
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
1450
|
+
selectedMainModuleIndex: N(void 0),
|
|
1451
|
+
selectedNestedModuleIndex: N(void 0),
|
|
1452
|
+
async initialize(i, r) {
|
|
1453
|
+
var u;
|
|
1454
|
+
o = i;
|
|
1455
|
+
const d = {
|
|
1456
|
+
id: K,
|
|
1457
|
+
component: De,
|
|
1458
|
+
slot: he.DETACHED,
|
|
405
1459
|
position: this.config.position,
|
|
406
1460
|
state: {
|
|
407
|
-
headerTitle: this.config.windowTitle
|
|
1461
|
+
headerTitle: this.config.windowTitle,
|
|
1462
|
+
infoUrlCallback: o.getHelpUrlCallback("/tools/moduleSelector.html")
|
|
408
1463
|
},
|
|
409
1464
|
props: {
|
|
410
1465
|
modules: this.config.modules,
|
|
411
1466
|
basisModule: this.config.basisModule,
|
|
412
1467
|
requireModuleSelection: this.config.requireModuleSelection
|
|
413
1468
|
}
|
|
414
|
-
}
|
|
1469
|
+
};
|
|
1470
|
+
if (r) {
|
|
1471
|
+
const a = de(r.smi), v = de(r.snmi), c = Ne(r.w), { modules: f } = this.config;
|
|
1472
|
+
if (a !== void 0 && a < (f == null ? void 0 : f.length)) {
|
|
1473
|
+
this.selectedMainModuleIndex.value = a;
|
|
1474
|
+
const g = f[a];
|
|
1475
|
+
v !== void 0 && (g == null ? void 0 : g.type) === "group" && v < ((u = g == null ? void 0 : g.cards) == null ? void 0 : u.length) && (this.selectedNestedModuleIndex.value = v);
|
|
1476
|
+
}
|
|
1477
|
+
c || await pe(
|
|
1478
|
+
this.selectedMainModuleIndex.value,
|
|
1479
|
+
this.selectedNestedModuleIndex.value,
|
|
1480
|
+
o,
|
|
1481
|
+
e.modules,
|
|
1482
|
+
e.basisModule
|
|
1483
|
+
);
|
|
1484
|
+
}
|
|
1485
|
+
const { action: n } = we(
|
|
415
1486
|
{
|
|
416
1487
|
name: "moduleSelector",
|
|
417
1488
|
title: "moduleSelector.title",
|
|
418
1489
|
icon: "mdi-view-grid"
|
|
419
1490
|
},
|
|
420
|
-
|
|
1491
|
+
d,
|
|
421
1492
|
o.windowManager,
|
|
422
|
-
|
|
1493
|
+
P
|
|
423
1494
|
);
|
|
424
1495
|
return o.navbarManager.add(
|
|
425
1496
|
{
|
|
426
|
-
id:
|
|
427
|
-
action:
|
|
1497
|
+
id: n.name,
|
|
1498
|
+
action: n
|
|
428
1499
|
},
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
), e.isActiveOnStart && o.windowManager.add(
|
|
1500
|
+
P,
|
|
1501
|
+
Ve.PROJECT
|
|
1502
|
+
), (r && r.w || !r && e.isActiveOnStart) && o.windowManager.add(d, P), Promise.resolve();
|
|
1503
|
+
},
|
|
1504
|
+
getDefaultOptions: H,
|
|
1505
|
+
getState() {
|
|
1506
|
+
var u, a;
|
|
1507
|
+
const i = (u = this.selectedMainModuleIndex) == null ? void 0 : u.value, r = (a = this.selectedNestedModuleIndex) == null ? void 0 : a.value, d = o.windowManager.has(K), n = this.config.isActiveOnStart;
|
|
1508
|
+
return i !== void 0 || r !== void 0 || d !== n ? { smi: i, snmi: r, w: d } : {};
|
|
1509
|
+
},
|
|
1510
|
+
getConfigEditors() {
|
|
1511
|
+
return [
|
|
1512
|
+
{
|
|
1513
|
+
component: Ye,
|
|
1514
|
+
title: "moduleSelector.name",
|
|
1515
|
+
infoUrlCallback: o.getHelpUrlCallback(
|
|
1516
|
+
"/components/plugins/moduleSelectorConfig.html",
|
|
1517
|
+
"app-configurator"
|
|
1518
|
+
)
|
|
1519
|
+
}
|
|
1520
|
+
];
|
|
432
1521
|
},
|
|
433
|
-
getDefaultOptions: q,
|
|
434
1522
|
toJSON() {
|
|
435
|
-
const
|
|
436
|
-
return
|
|
1523
|
+
const i = {}, r = H();
|
|
1524
|
+
return this.config.windowTitle !== r.windowTitle && (i.windowTitle = this.config.windowTitle), this.config.isActiveOnStart !== r.isActiveOnStart && (i.isActiveOnStart = this.config.isActiveOnStart), this.config.requireModuleSelection !== r.requireModuleSelection && (i.requireModuleSelection = this.config.requireModuleSelection), oe(this.config.position, r.position) || (i.position = this.config.position), oe(this.config.modules, r.modules) || (i.modules = this.config.modules), oe(this.config.basisModule, r.basisModule) || (i.basisModule = this.config.basisModule), i;
|
|
437
1525
|
},
|
|
438
1526
|
i18n: {
|
|
439
1527
|
de: {
|
|
440
1528
|
moduleSelector: {
|
|
1529
|
+
name: "Modul Auswahl Editor",
|
|
441
1530
|
title: "Themenkartenauswahl",
|
|
442
1531
|
startButton: "Anwendung starten",
|
|
443
|
-
cardBack: "Zurück"
|
|
1532
|
+
cardBack: "Zurück",
|
|
1533
|
+
configEditor: {
|
|
1534
|
+
TooltipAddModule: "Modul hinzufügen",
|
|
1535
|
+
TooltipEditModule: "Modul bearbeiten",
|
|
1536
|
+
TooltipEditGroup: "Modul-Gruppe bearbeiten",
|
|
1537
|
+
TooltipDeleteMG: "Modul/Gruppe löschen",
|
|
1538
|
+
error: "Bitte tragen Sie einen Namen ein",
|
|
1539
|
+
editorError: "Bitte füllen Sie das Feld aus",
|
|
1540
|
+
breadcrumbs: { overview: "Übersicht", group: "Gruppe" },
|
|
1541
|
+
heading: "Themen- & Modulzuordnung",
|
|
1542
|
+
baseModule: "Basismodul",
|
|
1543
|
+
baseModuleCheckbox: "Basismodul anzeigen",
|
|
1544
|
+
title: "Titel",
|
|
1545
|
+
add: "Module hinzufügen",
|
|
1546
|
+
addGroup: "Module Gruppe hinzufügen",
|
|
1547
|
+
moduleName: "Module Name",
|
|
1548
|
+
moduleIcon: "Icon Name",
|
|
1549
|
+
moduleUrl: "Module URL",
|
|
1550
|
+
groupName: "Gruppen Name",
|
|
1551
|
+
back: "Zurück",
|
|
1552
|
+
general: "Allgemeine Einstellungen",
|
|
1553
|
+
isActiveOnStart: "Themenkartenauswahl beim Start der Karte zeigen",
|
|
1554
|
+
requireModuleSelection: "Modulauswahl erforderlich machen",
|
|
1555
|
+
windowTitle: "Fenster Titel",
|
|
1556
|
+
windowPosition: "Fenster Position"
|
|
1557
|
+
}
|
|
444
1558
|
}
|
|
445
1559
|
},
|
|
446
1560
|
en: {
|
|
447
1561
|
moduleSelector: {
|
|
1562
|
+
name: "Module Selector Editor",
|
|
448
1563
|
title: "Theme map selection",
|
|
449
1564
|
startButton: "Start application",
|
|
450
|
-
cardBack: "Back"
|
|
1565
|
+
cardBack: "Back",
|
|
1566
|
+
configEditor: {
|
|
1567
|
+
TooltipAddModule: "Add module",
|
|
1568
|
+
TooltipEditModule: "Edit module",
|
|
1569
|
+
TooltipEditGroup: "Edit module group",
|
|
1570
|
+
TooltipDeleteMG: "Delete module/group",
|
|
1571
|
+
error: "Please add a name",
|
|
1572
|
+
editorError: "Please fill in the field",
|
|
1573
|
+
breadcrumbs: { overview: "Overview", group: "Group" },
|
|
1574
|
+
heading: "Topic & module assignment",
|
|
1575
|
+
baseModule: "Base module",
|
|
1576
|
+
baseModuleCheckbox: "Show base module",
|
|
1577
|
+
title: "Title",
|
|
1578
|
+
add: "Add module",
|
|
1579
|
+
addGroup: "Add module Group",
|
|
1580
|
+
moduleName: "Module name",
|
|
1581
|
+
moduleIcon: "Icon name",
|
|
1582
|
+
moduleUrl: "Module URL",
|
|
1583
|
+
groupName: "Group name",
|
|
1584
|
+
back: "Back",
|
|
1585
|
+
general: "General settings",
|
|
1586
|
+
isActiveOnStart: "Show theme map selection on map start",
|
|
1587
|
+
requireModuleSelection: "Require module selection",
|
|
1588
|
+
windowTitle: "Window title",
|
|
1589
|
+
windowPosition: "Window position"
|
|
1590
|
+
}
|
|
451
1591
|
}
|
|
452
1592
|
}
|
|
453
1593
|
},
|
|
@@ -456,5 +1596,5 @@ function se(e) {
|
|
|
456
1596
|
};
|
|
457
1597
|
}
|
|
458
1598
|
export {
|
|
459
|
-
|
|
1599
|
+
to as default
|
|
460
1600
|
};
|