@vcmap/module-selector 2.0.1 → 2.0.2

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/index.js CHANGED
@@ -10,90 +10,93 @@ function loadCss(href) {
10
10
  elem.onerror = reject;
11
11
  document.head.appendChild(elem);
12
12
  });
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) {
13
+ } await loadCss('data:text/css;base64,LnYtY2FyZFtkYXRhLXYtMjlhMjIwMmZde2Rpc3BsYXk6ZmxleDtmbGV4LWRpcmVjdGlvbjpjb2x1bW47anVzdGlmeS1jb250ZW50OmNlbnRlcjthbGlnbi1pdGVtczpjZW50ZXI7aGVpZ2h0OjE1MHB4O3dpZHRoOjE1MHB4O2FzcGVjdC1yYXRpbzoxO3RyYW5zaXRpb246YmFja2dyb3VuZC1jb2xvciAuM3N9LmZpeGVkLWNhcmRbZGF0YS12LTI5YTIyMDJmXXtoZWlnaHQ6MTUwcHg7d2lkdGg6MTUwcHg7YXNwZWN0LXJhdGlvOjF9LnNlbGVjdGVkLWNhcmRbZGF0YS12LTI5YTIyMDJmXXtiYWNrZ3JvdW5kLWNvbG9yOnJnYih2YXIoLS12LXRoZW1lLXByaW1hcnkpKTtjb2xvcjpyZ2IodmFyKC0tdi10aGVtZS1vbi1wcmltYXJ5KSl9LnYtYnJlYWRjcnVtYnNbZGF0YS12LTA0YmU3OGExXXtwYWRkaW5nOjE2cHggMCA0cHh9Cg==');var Oe = Object.defineProperty;
14
+ var Te = (e, o, t) => o in e ? Oe(e, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : e[o] = t;
15
+ var W = (e, o, t) => Te(e, typeof o != "symbol" ? o + "" : o, t);
16
+ import { VcsFormButton as he, VcsTextField as se, VcsLabel as be, VcsFormSection as Me, VcsCheckbox as $e, useProxiedComplexModel as Fe, useModelHasProperty as Re, VcsDataTable as De, VcsList as qe, AbstractConfigEditor as Pe, WindowSlot as Ge, createToggleAction as je, ButtonLocation as Le } from "../../../assets/ui.js";
17
+ import { defineComponent as J, inject as Se, computed as H, resolveComponent as c, openBlock as I, createBlock as $, withCtx as n, createVNode as d, createTextVNode as S, toDisplayString as V, createCommentVNode as q, createElementBlock as ie, Fragment as de, renderList as me, normalizeClass as ye, ref as k, createElementVNode as pe, normalizeProps as ze, guardReactiveProps as We, reactive as He, watch as we, mergeProps as Ke } from "../../../assets/vue.js";
18
+ import { VSheet as Je, VContainer as Z, VRow as Q, VCol as X, VCard as Ve, VIcon as _e, VCardTitle as Ze, VForm as ke, VDivider as Qe, VTooltip as Xe, VDialog as Ye, VBreadcrumbs as xe, VBreadcrumbsItem as eo } from "../../../assets/vuetify.js";
19
+ import { VcsModule as oo } from "../../../assets/core.js";
20
+ function Ee(e, o) {
18
21
  if (e != null) {
19
- const i = Number.parseInt(String(e), 10);
20
- if (i != null && !Number.isNaN(i))
21
- return i;
22
+ const t = Number.parseInt(String(e), 10);
23
+ if (t != null && !Number.isNaN(t))
24
+ return t;
22
25
  }
23
26
  return o;
24
27
  }
25
- function Ne(e, o) {
28
+ function to(e, o) {
26
29
  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
30
  }
28
- function qe(e) {
31
+ function lo(e) {
29
32
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
30
33
  }
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;
34
+ var no = function e(o, t) {
35
+ if (o === t) return !0;
36
+ if (o && t && typeof o == "object" && typeof t == "object") {
37
+ if (o.constructor !== t.constructor) return !1;
38
+ var r, i, l;
36
39
  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
+ if (r = o.length, r != t.length) return !1;
41
+ for (i = r; i-- !== 0; )
42
+ if (!e(o[i], t[i])) return !1;
40
43
  return !0;
41
44
  }
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;
45
+ if (o.constructor === RegExp) return o.source === t.source && o.flags === t.flags;
46
+ if (o.valueOf !== Object.prototype.valueOf) return o.valueOf() === t.valueOf();
47
+ if (o.toString !== Object.prototype.toString) return o.toString() === t.toString();
48
+ if (l = Object.keys(o), r = l.length, r !== Object.keys(t).length) return !1;
49
+ for (i = r; i-- !== 0; )
50
+ if (!Object.prototype.hasOwnProperty.call(t, l[i])) return !1;
51
+ for (i = r; i-- !== 0; ) {
52
+ var a = l[i];
53
+ if (!e(o[a], t[a])) return !1;
51
54
  }
52
55
  return !0;
53
56
  }
54
- return o !== o && i !== i;
57
+ return o !== o && t !== t;
55
58
  };
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, {
59
+ const ue = /* @__PURE__ */ lo(no), j = "@vcmap/module-selector", io = "2.0.2", ro = "^6.0";
60
+ async function Ie(e, o) {
61
+ const t = await fetch(e, {
59
62
  method: "GET"
60
63
  }).then((r) => {
61
64
  if (r.ok)
62
65
  return r.json();
63
66
  });
64
- if (i) {
65
- i._id = "moduleSelector_module_id";
66
- const r = new Oe(i);
67
+ if (t) {
68
+ t._id = "moduleSelector_module_id";
69
+ const r = new oo(t);
67
70
  await o.addModule(r);
68
71
  }
69
72
  }
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));
73
+ async function ao(e) {
74
+ var i, l;
75
+ const o = "moduleSelector_module_id", t = (i = e.maps.activeMap) == null ? void 0 : i.name;
76
+ e.getModuleById(o) && await e.removeModule(o), e.maps.activeMap || await e.maps.setActiveMap(t || ((l = [...e.maps][0]) == null ? void 0 : l.name));
74
77
  }
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);
78
+ const ae = "moduleSelector_window_id";
79
+ async function Ue(e, o, t, r, i) {
80
+ var s;
81
+ if (await ao(t), e === null && !i) {
82
+ t.windowManager.remove(ae);
80
83
  return;
81
84
  }
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);
85
+ const l = r[e], a = (l == null ? void 0 : l.type) === "group" ? (s = l.cards) == null ? void 0 : s[o] : null;
86
+ a != null && a.moduleUrl ? await Ie(a.moduleUrl, t) : (l == null ? void 0 : l.type) === "url" && await Ie(l.moduleUrl, t), t.windowManager.remove(ae);
84
87
  }
85
- const Pe = J({
88
+ const so = J({
86
89
  name: "ModuleSelector",
87
- methods: { startApplication: pe },
90
+ methods: { startApplication: Ue },
88
91
  components: {
89
- VSheet: Ee,
92
+ VSheet: Je,
90
93
  VContainer: Z,
91
94
  VRow: Q,
92
95
  VCol: X,
93
- VCard: fe,
94
- VIcon: Ce,
95
- VCardTitle: $e,
96
- VcsFormButton: re
96
+ VCard: Ve,
97
+ VIcon: _e,
98
+ VCardTitle: Ze,
99
+ VcsFormButton: he
97
100
  },
98
101
  props: {
99
102
  modules: {
@@ -112,79 +115,79 @@ const Pe = J({
112
115
  }
113
116
  },
114
117
  setup(e) {
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(() => {
118
+ const o = Se("vcsApp"), t = o.plugins.getByKey(j), { modules: r } = e, i = H(() => {
119
+ const u = e.modules[t.selectedMainModuleIndex.value];
120
+ return (u == null ? void 0 : u.type) === "group" ? u.cards : [];
121
+ }), l = (u) => {
122
+ t.selectedMainModuleIndex.value === u ? t.selectedMainModuleIndex.value = null : t.selectedMainModuleIndex.value = u;
123
+ }, a = (u) => {
124
+ t.selectedNestedModuleIndex.value === u ? t.selectedNestedModuleIndex.value = null : t.selectedNestedModuleIndex.value = u;
125
+ }, s = () => {
126
+ t.selectedNestedModuleIndex.value = null, t.selectedMainModuleIndex.value = null;
127
+ }, f = H(() => {
125
128
  if (!e.requireModuleSelection) return !1;
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;
129
+ const u = t.selectedMainModuleIndex.value, C = t.selectedNestedModuleIndex.value, b = r[u];
130
+ return u == null || (b == null ? void 0 : b.type) === "group" && b.cards && C == null;
128
131
  });
129
132
  return {
130
- nestedCards: d,
131
- plugin: i,
132
- selectModule: n,
133
- selectNestedModule: u,
134
- showMainCards: a,
135
- isButtonDisabled: v,
133
+ nestedCards: i,
134
+ plugin: t,
135
+ selectModule: l,
136
+ selectNestedModule: a,
137
+ showMainCards: s,
138
+ isButtonDisabled: f,
136
139
  app: o
137
140
  };
138
141
  }
139
142
  }), Y = (e, o) => {
140
- const i = e.__vccOpts || e;
141
- for (const [r, d] of o)
142
- i[r] = d;
143
- return i;
143
+ const t = e.__vccOpts || e;
144
+ for (const [r, i] of o)
145
+ t[r] = i;
146
+ return t;
144
147
  };
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, {
148
+ function uo(e, o, t, r, i, l) {
149
+ const a = c("v-icon"), s = c("v-card-title"), f = c("v-card"), u = c("v-col"), C = c("v-row"), b = c("VcsFormButton"), g = c("v-container"), R = c("v-sheet");
150
+ return I(), $(R, {
148
151
  class: "module-selector",
149
152
  elevation: "1"
150
153
  }, {
151
- default: l(() => [
152
- t($, null, {
153
- default: l(() => [
154
- t(f, {
154
+ default: n(() => [
155
+ d(g, null, {
156
+ default: n(() => [
157
+ d(C, {
155
158
  class: "justify-center align-center",
156
159
  "no-gutters": ""
157
160
  }, {
158
- default: l(() => [
159
- e.basisModule && !e.nestedCards.length ? (w(), _(c, {
161
+ default: n(() => [
162
+ e.basisModule && !e.nestedCards.length ? (I(), $(u, {
160
163
  key: 0,
161
164
  cols: "auto",
162
165
  class: "pa-2"
163
166
  }, {
164
- default: l(() => [
165
- t(v, {
167
+ default: n(() => [
168
+ d(f, {
166
169
  class: "pa-3 fixed-card selected-card",
167
170
  outlined: ""
168
171
  }, {
169
- default: l(() => [
170
- e.basisModule.icon ? (w(), _(u, {
172
+ default: n(() => [
173
+ e.basisModule.icon ? (I(), $(a, {
171
174
  key: 0,
172
175
  size: "50"
173
176
  }, {
174
- default: l(() => [
177
+ default: n(() => [
175
178
  S(
176
- y(e.basisModule.icon),
179
+ V(e.basisModule.icon),
177
180
  1
178
181
  /* TEXT */
179
182
  )
180
183
  ]),
181
184
  _: 1
182
185
  /* STABLE */
183
- })) : B("v-if", !0),
184
- t(a, { class: "text-center" }, {
185
- default: l(() => [
186
+ })) : q("v-if", !0),
187
+ d(s, { class: "text-center" }, {
188
+ default: n(() => [
186
189
  S(
187
- y(e.$st(e.basisModule.title)),
190
+ V(e.$st(e.basisModule.title)),
188
191
  1
189
192
  /* TEXT */
190
193
  )
@@ -199,31 +202,31 @@ function je(e, o, i, r, d, n) {
199
202
  ]),
200
203
  _: 1
201
204
  /* STABLE */
202
- })) : B("v-if", !0),
203
- e.nestedCards.length ? (w(), R(
204
- W,
205
+ })) : q("v-if", !0),
206
+ e.nestedCards.length ? (I(), ie(
207
+ de,
205
208
  { key: 2 },
206
209
  [
207
- t(c, {
210
+ d(u, {
208
211
  cols: "auto",
209
212
  class: "pa-2"
210
213
  }, {
211
- default: l(() => [
212
- t(v, {
214
+ default: n(() => [
215
+ d(f, {
213
216
  class: "fixed-card hover-card",
214
217
  outlined: "",
215
- onClick: o[0] || (o[0] = (V) => e.showMainCards())
218
+ onClick: o[0] || (o[0] = (v) => e.showMainCards())
216
219
  }, {
217
- default: l(() => [
218
- t(u, { size: "50" }, {
219
- default: l(() => [
220
+ default: n(() => [
221
+ d(a, { size: "50" }, {
222
+ default: n(() => [
220
223
  S("mdi-arrow-left")
221
224
  ]),
222
225
  _: 1
223
226
  /* STABLE */
224
227
  }),
225
228
  S(
226
- " " + y(e.$st("moduleSelector.cardBack")),
229
+ " " + V(e.$st("moduleSelector.cardBack")),
227
230
  1
228
231
  /* TEXT */
229
232
  )
@@ -235,36 +238,36 @@ function je(e, o, i, r, d, n) {
235
238
  _: 1
236
239
  /* STABLE */
237
240
  }),
238
- (w(!0), R(
239
- W,
241
+ (I(!0), ie(
242
+ de,
240
243
  null,
241
- le(e.nestedCards, (V, E) => (w(), _(
242
- c,
244
+ me(e.nestedCards, (v, y) => (I(), $(
245
+ u,
243
246
  {
244
- key: E,
247
+ key: y,
245
248
  cols: "auto",
246
249
  class: "pa-2"
247
250
  },
248
251
  {
249
- default: l(() => [
250
- t(v, {
251
- class: ie(["fixed-card hover-card", {
252
- "selected-card": e.plugin.selectedNestedModuleIndex.value === E
252
+ default: n(() => [
253
+ d(f, {
254
+ class: ye(["fixed-card hover-card", {
255
+ "selected-card": e.plugin.selectedNestedModuleIndex.value === y
253
256
  }]),
254
257
  outlined: "",
255
- onClick: (I) => e.selectNestedModule(E)
258
+ onClick: (U) => e.selectNestedModule(y)
256
259
  }, {
257
- default: l(() => [
258
- V.icon ? (w(), _(
259
- u,
260
+ default: n(() => [
261
+ v.icon ? (I(), $(
262
+ a,
260
263
  {
261
264
  key: 0,
262
265
  size: "50"
263
266
  },
264
267
  {
265
- default: l(() => [
268
+ default: n(() => [
266
269
  S(
267
- y(V.icon),
270
+ V(v.icon),
268
271
  1
269
272
  /* TEXT */
270
273
  )
@@ -274,14 +277,14 @@ function je(e, o, i, r, d, n) {
274
277
  },
275
278
  1024
276
279
  /* DYNAMIC_SLOTS */
277
- )) : B("v-if", !0),
278
- t(
279
- a,
280
+ )) : q("v-if", !0),
281
+ d(
282
+ s,
280
283
  { class: "text-center" },
281
284
  {
282
- default: l(() => [
285
+ default: n(() => [
283
286
  S(
284
- y(e.$st(V.title)),
287
+ V(e.$st(v.title)),
285
288
  1
286
289
  /* TEXT */
287
290
  )
@@ -309,36 +312,36 @@ function je(e, o, i, r, d, n) {
309
312
  ],
310
313
  64
311
314
  /* STABLE_FRAGMENT */
312
- )) : (w(!0), R(
313
- W,
315
+ )) : (I(!0), ie(
316
+ de,
314
317
  { key: 1 },
315
- le(e.modules, (V, E) => (w(), _(
316
- c,
318
+ me(e.modules, (v, y) => (I(), $(
319
+ u,
317
320
  {
318
321
  cols: "auto",
319
322
  class: "pa-2",
320
- key: E
323
+ key: y
321
324
  },
322
325
  {
323
- default: l(() => [
324
- t(v, {
325
- class: ie(["fixed-card hover-card", {
326
- "selected-card": e.plugin.selectedMainModuleIndex.value === E
326
+ default: n(() => [
327
+ d(f, {
328
+ class: ye(["fixed-card hover-card", {
329
+ "selected-card": e.plugin.selectedMainModuleIndex.value === y
327
330
  }]),
328
331
  outlined: "",
329
- onClick: (I) => e.selectModule(E)
332
+ onClick: (U) => e.selectModule(y)
330
333
  }, {
331
- default: l(() => [
332
- V.icon ? (w(), _(
333
- u,
334
+ default: n(() => [
335
+ v.icon ? (I(), $(
336
+ a,
334
337
  {
335
338
  key: 0,
336
339
  size: "50"
337
340
  },
338
341
  {
339
- default: l(() => [
342
+ default: n(() => [
340
343
  S(
341
- y(V.icon),
344
+ V(v.icon),
342
345
  1
343
346
  /* TEXT */
344
347
  )
@@ -348,14 +351,14 @@ function je(e, o, i, r, d, n) {
348
351
  },
349
352
  1024
350
353
  /* DYNAMIC_SLOTS */
351
- )) : B("v-if", !0),
352
- t(
353
- a,
354
+ )) : q("v-if", !0),
355
+ d(
356
+ s,
354
357
  { class: "text-center" },
355
358
  {
356
- default: l(() => [
359
+ default: n(() => [
357
360
  S(
358
- y(e.$st(V.title)),
361
+ V(e.$st(v.title)),
359
362
  1
360
363
  /* TEXT */
361
364
  )
@@ -384,12 +387,12 @@ function je(e, o, i, r, d, n) {
384
387
  _: 1
385
388
  /* STABLE */
386
389
  }),
387
- t(f, { justify: "end" }, {
388
- default: l(() => [
389
- t(g, {
390
+ d(C, { justify: "end" }, {
391
+ default: n(() => [
392
+ d(b, {
390
393
  variant: "filled",
391
394
  class: "ma-5",
392
- onClick: o[1] || (o[1] = (V) => e.startApplication(
395
+ onClick: o[1] || (o[1] = (v) => e.startApplication(
393
396
  e.plugin.selectedMainModuleIndex.value,
394
397
  e.plugin.selectedNestedModuleIndex.value,
395
398
  e.app,
@@ -398,9 +401,9 @@ function je(e, o, i, r, d, n) {
398
401
  )),
399
402
  disabled: e.isButtonDisabled
400
403
  }, {
401
- default: l(() => [
404
+ default: n(() => [
402
405
  S(
403
- y(e.$st("moduleSelector.startButton")),
406
+ V(e.$st("moduleSelector.startButton")),
404
407
  1
405
408
  /* TEXT */
406
409
  )
@@ -421,7 +424,7 @@ function je(e, o, i, r, d, n) {
421
424
  /* STABLE */
422
425
  });
423
426
  }
424
- const De = /* @__PURE__ */ Y(Pe, [["render", je], ["__scopeId", "data-v-29a2202f"]]), H = () => ({
427
+ const co = /* @__PURE__ */ Y(so, [["render", uo], ["__scopeId", "data-v-29a2202f"]]), re = () => ({
425
428
  windowTitle: "moduleSelector.title",
426
429
  isActiveOnStart: !0,
427
430
  requireModuleSelection: !1,
@@ -431,20 +434,24 @@ const De = /* @__PURE__ */ Y(Pe, [["render", je], ["__scopeId", "data-v-29a2202f
431
434
  top: "10%"
432
435
  },
433
436
  basisModule: void 0,
434
- modules: []
435
- }), ze = J({
437
+ modules: [],
438
+ serverUrl: "",
439
+ projectId: "",
440
+ appId: "",
441
+ token: ""
442
+ }), mo = J({
436
443
  name: "ModuleEditor",
437
444
  components: {
438
- VcsTextField: te,
439
- VcsLabel: se,
445
+ VcsTextField: se,
446
+ VcsLabel: be,
440
447
  VCol: X,
441
448
  VRow: Q,
442
- VForm: Ie,
449
+ VForm: ke,
443
450
  VContainer: Z,
444
- VcsFormButton: re,
445
- VDivider: ke,
446
- VCard: fe,
447
- VcsFormSection: ae
451
+ VcsFormButton: he,
452
+ VDivider: Qe,
453
+ VCard: Ve,
454
+ VcsFormSection: Me
448
455
  },
449
456
  props: {
450
457
  modelValue: {
@@ -453,42 +460,42 @@ const De = /* @__PURE__ */ Y(Pe, [["render", je], ["__scopeId", "data-v-29a2202f
453
460
  }
454
461
  },
455
462
  setup(e) {
456
- const o = N(e.modelValue), i = N(!1);
463
+ const o = k(e.modelValue), t = k(!1);
457
464
  return {
458
465
  localModuleOptions: o,
459
- isFormValid: i,
466
+ isFormValid: t,
460
467
  validateForm: () => {
461
- i.value = !!o.value.title;
468
+ t.value = !!o.value.title;
462
469
  },
463
- requiredRule: (n) => !!n || "moduleSelector.configEditor.editorError"
470
+ requiredRule: (l) => !!l || "moduleSelector.configEditor.editorError"
464
471
  };
465
472
  }
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, {
473
+ }), po = { class: "d-flex gc-2 w-100 justify-end pa-2" };
474
+ function fo(e, o, t, r, i, l) {
475
+ const a = c("VcsLabel"), s = c("v-col"), f = c("VcsTextField"), u = c("v-row"), C = c("v-container"), b = c("v-form"), g = c("v-divider"), R = c("VcsFormButton"), v = c("VcsFormSection"), y = c("v-card");
476
+ return I(), $(y, null, {
477
+ default: n(() => [
478
+ d(v, null, {
479
+ default: n(() => [
480
+ d(b, {
474
481
  modelValue: e.isFormValid,
475
- "onUpdate:modelValue": o[3] || (o[3] = (I) => e.isFormValid = I),
482
+ "onUpdate:modelValue": o[3] || (o[3] = (U) => e.isFormValid = U),
476
483
  ref: "form"
477
484
  }, {
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, {
485
+ default: n(() => [
486
+ d(C, { class: "px-2 pt-0 pb-2" }, {
487
+ default: n(() => [
488
+ d(u, { "no-gutters": "" }, {
489
+ default: n(() => [
490
+ d(s, { cols: "6" }, {
491
+ default: n(() => [
492
+ d(a, {
486
493
  required: "",
487
494
  "html-for": "moduleName"
488
495
  }, {
489
- default: l(() => [
496
+ default: n(() => [
490
497
  S(
491
- y(e.$st("moduleSelector.configEditor.moduleName")),
498
+ V(e.$st("moduleSelector.configEditor.moduleName")),
492
499
  1
493
500
  /* TEXT */
494
501
  )
@@ -500,13 +507,13 @@ function We(e, o, i, r, d, n) {
500
507
  _: 1
501
508
  /* STABLE */
502
509
  }),
503
- t(a, { cols: "6" }, {
504
- default: l(() => [
505
- t(v, {
510
+ d(s, { cols: "6" }, {
511
+ default: n(() => [
512
+ d(f, {
506
513
  id: "moduleName",
507
514
  placeholder: "Module Name",
508
515
  modelValue: e.localModuleOptions.title,
509
- "onUpdate:modelValue": o[0] || (o[0] = (I) => e.localModuleOptions.title = I),
516
+ "onUpdate:modelValue": o[0] || (o[0] = (U) => e.localModuleOptions.title = U),
510
517
  rules: [e.requiredRule]
511
518
  }, null, 8, ["modelValue", "rules"])
512
519
  ]),
@@ -517,17 +524,17 @@ function We(e, o, i, r, d, n) {
517
524
  _: 1
518
525
  /* STABLE */
519
526
  }),
520
- t(c, { "no-gutters": "" }, {
521
- default: l(() => [
522
- t(a, { cols: "6" }, {
523
- default: l(() => [
524
- t(u, {
527
+ d(u, { "no-gutters": "" }, {
528
+ default: n(() => [
529
+ d(s, { cols: "6" }, {
530
+ default: n(() => [
531
+ d(a, {
525
532
  required: "",
526
533
  "html-for": "moduleIcon"
527
534
  }, {
528
- default: l(() => [
535
+ default: n(() => [
529
536
  S(
530
- y(e.$st("moduleSelector.configEditor.moduleIcon")),
537
+ V(e.$st("moduleSelector.configEditor.moduleIcon")),
531
538
  1
532
539
  /* TEXT */
533
540
  )
@@ -539,13 +546,13 @@ function We(e, o, i, r, d, n) {
539
546
  _: 1
540
547
  /* STABLE */
541
548
  }),
542
- t(a, { cols: "6" }, {
543
- default: l(() => [
544
- t(v, {
549
+ d(s, { cols: "6" }, {
550
+ default: n(() => [
551
+ d(f, {
545
552
  id: "moduleIcon",
546
553
  placeholder: "Icon Name",
547
554
  modelValue: e.localModuleOptions.icon,
548
- "onUpdate:modelValue": o[1] || (o[1] = (I) => e.localModuleOptions.icon = I),
555
+ "onUpdate:modelValue": o[1] || (o[1] = (U) => e.localModuleOptions.icon = U),
549
556
  rules: [e.requiredRule]
550
557
  }, null, 8, ["modelValue", "rules"])
551
558
  ]),
@@ -556,17 +563,17 @@ function We(e, o, i, r, d, n) {
556
563
  _: 1
557
564
  /* STABLE */
558
565
  }),
559
- t(c, { "no-gutters": "" }, {
560
- default: l(() => [
561
- t(a, { cols: "6" }, {
562
- default: l(() => [
563
- t(u, {
566
+ d(u, { "no-gutters": "" }, {
567
+ default: n(() => [
568
+ d(s, { cols: "6" }, {
569
+ default: n(() => [
570
+ d(a, {
564
571
  required: "",
565
572
  "html-for": "moduleUrl"
566
573
  }, {
567
- default: l(() => [
574
+ default: n(() => [
568
575
  S(
569
- y(e.$st("moduleSelector.configEditor.moduleUrl")),
576
+ V(e.$st("moduleSelector.configEditor.moduleUrl")),
570
577
  1
571
578
  /* TEXT */
572
579
  )
@@ -578,13 +585,13 @@ function We(e, o, i, r, d, n) {
578
585
  _: 1
579
586
  /* STABLE */
580
587
  }),
581
- t(a, { cols: "6" }, {
582
- default: l(() => [
583
- t(v, {
588
+ d(s, { cols: "6" }, {
589
+ default: n(() => [
590
+ d(f, {
584
591
  id: "moduleUrl",
585
592
  placeholder: "URL",
586
593
  modelValue: e.localModuleOptions.moduleUrl,
587
- "onUpdate:modelValue": o[2] || (o[2] = (I) => e.localModuleOptions.moduleUrl = I),
594
+ "onUpdate:modelValue": o[2] || (o[2] = (U) => e.localModuleOptions.moduleUrl = U),
588
595
  rules: [e.requiredRule]
589
596
  }, null, 8, ["modelValue", "rules"])
590
597
  ]),
@@ -603,18 +610,18 @@ function We(e, o, i, r, d, n) {
603
610
  _: 1
604
611
  /* STABLE */
605
612
  }, 8, ["modelValue"]),
606
- t($),
607
- Se("div", Re, [
608
- t(U, {
613
+ d(g),
614
+ pe("div", po, [
615
+ d(R, {
609
616
  disabled: !e.isFormValid,
610
617
  onClick: o[4] || (o[4] = () => {
611
618
  e.$emit("submit", e.localModuleOptions);
612
619
  }),
613
620
  variant: "filled"
614
621
  }, {
615
- default: l(() => [
622
+ default: n(() => [
616
623
  S(
617
- y(e.$st("components.apply")),
624
+ V(e.$st("components.apply")),
618
625
  1
619
626
  /* TEXT */
620
627
  )
@@ -622,12 +629,12 @@ function We(e, o, i, r, d, n) {
622
629
  _: 1
623
630
  /* STABLE */
624
631
  }, 8, ["disabled"]),
625
- t(U, {
626
- onClick: o[5] || (o[5] = (I) => e.$emit("close"))
632
+ d(R, {
633
+ onClick: o[5] || (o[5] = (U) => e.$emit("close"))
627
634
  }, {
628
- default: l(() => [
635
+ default: n(() => [
629
636
  S(
630
- y(e.$st("components.cancel")),
637
+ V(e.$st("components.cancel")),
631
638
  1
632
639
  /* TEXT */
633
640
  )
@@ -645,14 +652,14 @@ function We(e, o, i, r, d, n) {
645
652
  /* STABLE */
646
653
  });
647
654
  }
648
- const He = /* @__PURE__ */ Y(ze, [["render", We]]), Ke = J({
655
+ const vo = /* @__PURE__ */ Y(mo, [["render", fo]]), go = J({
649
656
  name: "WindowPositionSettings",
650
657
  components: {
651
658
  VContainer: Z,
652
659
  VRow: Q,
653
660
  VCol: X,
654
- VcsCheckbox: ce,
655
- VcsTextField: te
661
+ VcsCheckbox: $e,
662
+ VcsTextField: se
656
663
  },
657
664
  props: {
658
665
  modelValue: {
@@ -665,55 +672,55 @@ const He = /* @__PURE__ */ Y(ze, [["render", We]]), Ke = J({
665
672
  }
666
673
  },
667
674
  setup(e, { emit: o }) {
668
- const i = ve(
675
+ const t = Fe(
669
676
  e,
670
677
  "modelValue",
671
678
  o
672
679
  );
673
680
  return {
674
- inputs: j(() => e.positionKeys.reduce(
675
- (d, n) => (d[n] = {
676
- key: n,
677
- checkbox: ge(i, n, null),
678
- input: j({
681
+ inputs: H(() => e.positionKeys.reduce(
682
+ (i, l) => (i[l] = {
683
+ key: l,
684
+ checkbox: Re(t, l, null),
685
+ input: H({
679
686
  get() {
680
- return i.value[n];
687
+ return t.value[l];
681
688
  },
682
- set(u) {
683
- i.value[n] = u;
689
+ set(a) {
690
+ t.value[l] = a;
684
691
  }
685
692
  }),
686
693
  placeholder: "auto"
687
- }, d),
694
+ }, i),
688
695
  {}
689
696
  ))
690
697
  };
691
698
  }
692
699
  });
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,
700
+ function ho(e, o, t, r, i, l) {
701
+ const a = c("VcsCheckbox"), s = c("v-col"), f = c("VcsTextField"), u = c("v-row"), C = c("v-container");
702
+ return I(), $(C, { class: "py-0 px-1" }, {
703
+ default: n(() => [
704
+ (I(!0), ie(
705
+ de,
699
706
  null,
700
- le(e.inputs, ({ key: g, checkbox: $, input: U, placeholder: V }) => (w(), _(
701
- c,
707
+ me(e.inputs, ({ key: b, checkbox: g, input: R, placeholder: v }) => (I(), $(
708
+ u,
702
709
  {
703
710
  "no-gutters": "",
704
- key: g
711
+ key: b
705
712
  },
706
713
  {
707
- default: l(() => [
708
- t(
709
- a,
714
+ default: n(() => [
715
+ d(
716
+ s,
710
717
  null,
711
718
  {
712
- default: l(() => [
713
- t(u, {
714
- label: `appConfigurator.editors.featureInfo.window.position.${g}`,
715
- modelValue: $.value,
716
- "onUpdate:modelValue": (E) => $.value = E
719
+ default: n(() => [
720
+ d(a, {
721
+ label: `appConfigurator.editors.featureInfo.window.position.${b}`,
722
+ modelValue: g.value,
723
+ "onUpdate:modelValue": (y) => g.value = y
717
724
  }, null, 8, ["label", "modelValue", "onUpdate:modelValue"])
718
725
  ]),
719
726
  _: 2
@@ -722,17 +729,17 @@ function Je(e, o, i, r, d, n) {
722
729
  1024
723
730
  /* DYNAMIC_SLOTS */
724
731
  ),
725
- t(
726
- a,
732
+ d(
733
+ s,
727
734
  null,
728
735
  {
729
- default: l(() => [
730
- t(v, {
736
+ default: n(() => [
737
+ d(f, {
731
738
  clearable: "",
732
- disabled: !$.value,
733
- placeholder: V,
734
- modelValue: U.value,
735
- "onUpdate:modelValue": (E) => U.value = E,
739
+ disabled: !g.value,
740
+ placeholder: v,
741
+ modelValue: R.value,
742
+ "onUpdate:modelValue": (y) => R.value = y,
736
743
  modelModifiers: { trim: !0 }
737
744
  }, null, 8, ["disabled", "placeholder", "modelValue", "onUpdate:modelValue"])
738
745
  ]),
@@ -757,23 +764,610 @@ function Je(e, o, i, r, d, n) {
757
764
  /* STABLE */
758
765
  });
759
766
  }
760
- const Ze = /* @__PURE__ */ Y(Ke, [["render", Je]]), Qe = J({
767
+ const bo = /* @__PURE__ */ Y(go, [["render", ho]]);
768
+ let Ae = "";
769
+ function Mo(e) {
770
+ Ae = e;
771
+ }
772
+ let fe;
773
+ function So(e) {
774
+ fe = e;
775
+ }
776
+ let Ce = {};
777
+ function Vo() {
778
+ return fe ? {
779
+ authorization: `Bearer ${fe}`,
780
+ ...Ce
781
+ } : { ...Ce };
782
+ }
783
+ class yo extends Error {
784
+ constructor(t, r, i, l, a) {
785
+ super(`Failed to ${r} ${i}. Got status ${t} with reason: ${l}`);
786
+ W(this, "url");
787
+ W(this, "method");
788
+ W(this, "status");
789
+ W(this, "reason");
790
+ W(this, "error");
791
+ this.error = a, this.method = r, this.status = t, this.url = i, this.reason = l;
792
+ }
793
+ }
794
+ function wo(e, o, t) {
795
+ let r = e;
796
+ Object.keys(t).filter((l) => t[l] === "path").map((l) => ({ key: l, param: o[l] })).forEach(({ key: l, param: a }) => {
797
+ r = r.replace(`{${l}}`, a.toString());
798
+ });
799
+ const i = new URL(r, Ae);
800
+ return Object.keys(t).filter((l) => t[l] === "query" && o[l]).map((l) => ({ key: l, param: o[l] })).forEach(({ key: l, param: a }) => {
801
+ Array.isArray(a) ? a.forEach((s) => {
802
+ i.searchParams.append(l, s.toString());
803
+ }) : i.searchParams.append(l, a.toString());
804
+ }), i.toString();
805
+ }
806
+ async function Eo(e, o, t, r = void 0, i = {}) {
807
+ const l = await fetch(e, {
808
+ method: o,
809
+ body: r,
810
+ headers: { ...i, ...Vo() },
811
+ redirect: "follow"
812
+ });
813
+ if (l.status === t)
814
+ return l;
815
+ let a = await l.text(), s;
816
+ try {
817
+ const f = JSON.parse(a);
818
+ f.reason && ({ reason: a } = f), f.error && ({ error: s } = f);
819
+ } catch {
820
+ }
821
+ throw new yo(l.status, o, e, a, s);
822
+ }
823
+ async function Io(e, o, t, r = void 0, i = {}) {
824
+ return (await Eo(e, o, t, r, i)).json();
825
+ }
826
+ async function Co(e) {
827
+ const o = "api/v1/project/{projectId}/modules", t = "get", i = wo(o, e, {
828
+ projectId: "path",
829
+ limit: "query",
830
+ page: "query",
831
+ sort: "query",
832
+ orderBy: "query",
833
+ name: "query"
834
+ });
835
+ return Io(i, t, 200, void 0, void 0);
836
+ }
837
+ const A = {
838
+ OFF: 1,
839
+ ERROR: 2,
840
+ WARN: 4,
841
+ INFO: 8,
842
+ DEBUG: 16
843
+ }, P = {
844
+ ERROR: 0,
845
+ WARN: 0,
846
+ INFO: 0,
847
+ DEBUG: 0
848
+ };
849
+ P.ERROR = A.ERROR | A.WARN | A.INFO | A.DEBUG;
850
+ P.WARN = A.WARN | A.INFO | A.DEBUG;
851
+ P.INFO = A.INFO | A.DEBUG;
852
+ P.DEBUG = A.DEBUG;
853
+ const K = {
854
+ useTimestamp: !1,
855
+ logLevel: A.INFO
856
+ }, x = /* @__PURE__ */ new Map();
857
+ x.set(A.ERROR, "error");
858
+ x.set(A.WARN, "warn");
859
+ x.set(A.INFO, "info");
860
+ x.set(A.DEBUG, "log");
861
+ class Ne {
862
+ /**
863
+ * @param {string=} className
864
+ */
865
+ constructor(o) {
866
+ this.className = o, this.deprecations = /* @__PURE__ */ new Map();
867
+ }
868
+ /**
869
+ * Logs an error message
870
+ * @param {string} msg The message to log.
871
+ * @param {...any} optArgs
872
+ */
873
+ error(o, ...t) {
874
+ K.logLevel & P.ERROR && this._log(String(o), A.ERROR, t);
875
+ }
876
+ /**
877
+ * Logs a warning message
878
+ * @param {string} msg The message to log.
879
+ * @param {...any} optArgs
880
+ */
881
+ warning(o, ...t) {
882
+ K.logLevel & P.WARN && this._log(String(o), A.WARN, t);
883
+ }
884
+ /**
885
+ * Deprecate a function. deprecations are stored on the logger
886
+ * @param {string} functionName
887
+ * @param {string=} alternativeFunctionName
888
+ */
889
+ deprecate(o, t) {
890
+ const r = String(o), i = t ? String(t) : null;
891
+ if (!this.deprecations.has(r)) {
892
+ this.deprecations.set(r, i || null);
893
+ let l = `${r} has been deprecated and will be removed`;
894
+ i && (l = `${l}. ${i}`), this.warning(l);
895
+ }
896
+ }
897
+ /**
898
+ * Logs an info message
899
+ * @param {string} msg The message to log.
900
+ * @param {...any} optArgs
901
+ */
902
+ info(o, ...t) {
903
+ K.logLevel & P.INFO && this._log(String(o), A.INFO, t);
904
+ }
905
+ /**
906
+ * Logs a debug message
907
+ * @param {string} msg The message to log.
908
+ * @param {...any} optArgs
909
+ */
910
+ debug(o, ...t) {
911
+ K.logLevel & P.DEBUG && this._log(String(o), A.DEBUG, t);
912
+ }
913
+ /**
914
+ * Alias for debug
915
+ * @param {string} msg The message to log.
916
+ * @param {...any} optArgs
917
+ */
918
+ log(o, ...t) {
919
+ K.logLevel & P.DEBUG && this._log(String(o), A.DEBUG, t);
920
+ }
921
+ /**
922
+ * Logs a message
923
+ * @param {string} msg The message to log.
924
+ * @param {LOG_LEVEL} level
925
+ * @param {Array} optArgs
926
+ * @private
927
+ */
928
+ _log(o, t, r) {
929
+ let i = o;
930
+ this.className && (i = `[${this.className}] ${i}`), console[x.get(t)](i, ...r), t & A.ERROR && (console.group(), console.trace(), console.groupEnd());
931
+ }
932
+ }
933
+ const ve = /* @__PURE__ */ new Map();
934
+ let ce;
935
+ function $o() {
936
+ return ce || (ce = new Ne()), ce;
937
+ }
938
+ function _o(e) {
939
+ const o = new Ne(e);
940
+ return ve.set(e, o), o;
941
+ }
942
+ function ge(e) {
943
+ return e ? ve.has(e) ? ve.get(e) : _o(e) : $o();
944
+ }
945
+ function ko(e) {
946
+ try {
947
+ if (e.serverUrl) {
948
+ const o = new URL(
949
+ e.serverUrl,
950
+ window.location.href
951
+ ).toString();
952
+ Mo(o);
953
+ const t = e.token || localStorage.getItem("Meteor.loginToken");
954
+ t && (So(t), ge(j).info("Publisher connection successful"));
955
+ }
956
+ } catch (o) {
957
+ ge(j).error("Failed to connect to publisher", o);
958
+ }
959
+ }
960
+ function Uo(e, o) {
961
+ return new Date(e).toLocaleString(o);
962
+ }
963
+ function Ao() {
964
+ return [
965
+ {
966
+ title: "moduleSelector.configEditor.moduleCloudPicker.headers.name",
967
+ value: "name"
968
+ },
969
+ {
970
+ title: "moduleSelector.configEditor.moduleCloudPicker.headers.type",
971
+ value: "type",
972
+ sortable: !1
973
+ },
974
+ {
975
+ title: "moduleSelector.configEditor.moduleCloudPicker.headers.description",
976
+ value: "description"
977
+ },
978
+ {
979
+ title: "moduleSelector.configEditor.moduleCloudPicker.headers.createdAt",
980
+ value: "createdAt",
981
+ sort: (e, o) => new Date(o).getTime() - new Date(e).getTime()
982
+ },
983
+ {
984
+ title: "moduleSelector.configEditor.moduleCloudPicker.headers.updatedAt",
985
+ value: "updatedAt",
986
+ sort: (e, o) => new Date(o).getTime() - new Date(e).getTime()
987
+ },
988
+ {
989
+ title: "moduleSelector.configEditor.moduleCloudPicker.headers.createdBy",
990
+ value: "createdBy"
991
+ },
992
+ {
993
+ title: "moduleSelector.configEditor.moduleCloudPicker.headers.updatedBy",
994
+ value: "updatedBy"
995
+ }
996
+ ];
997
+ }
998
+ const No = J({
999
+ name: "CloudModuleSelector",
1000
+ components: {
1001
+ VcsDataTable: De,
1002
+ VcsFormButton: he,
1003
+ VTooltip: Xe,
1004
+ VIcon: _e,
1005
+ VCard: Ve,
1006
+ VcsLabel: be,
1007
+ VcsTextField: se,
1008
+ VcsFormSection: Me,
1009
+ VRow: Q,
1010
+ VCol: X,
1011
+ VForm: ke,
1012
+ VContainer: Z
1013
+ },
1014
+ props: {
1015
+ modelValue: {
1016
+ type: Object,
1017
+ required: !0
1018
+ }
1019
+ },
1020
+ setup(e, { emit: o }) {
1021
+ const t = Se("vcsApp"), r = t.plugins.getByKey(j), i = t.plugins.getByKey(
1022
+ "@vcmap/app-configurator"
1023
+ );
1024
+ ko(i.config || r.config);
1025
+ const l = k(!0), a = k([]), s = k(0), f = k(0), u = k([void 0]), C = Ao(), b = /* @__PURE__ */ new Map(), g = k(e.modelValue), R = H(() => g.value.id === ""), v = k(!1), y = () => {
1026
+ var D, L;
1027
+ v.value = !!((D = g.value) != null && D.title) && !!((L = g.value) != null && L.icon);
1028
+ }, U = {
1029
+ standalone: "$vcsGlobeNature",
1030
+ extension: "$vcsShapes"
1031
+ };
1032
+ function G(D) {
1033
+ var _;
1034
+ const { itemsPerPage: L, page: te, search: le, sortBy: ne, sortDesc: m } = D;
1035
+ l.value = !0, (_ = i == null ? void 0 : i.config) != null && _.projectId && Co({
1036
+ projectId: i.config.projectId,
1037
+ limit: L,
1038
+ page: te - 1,
1039
+ name: le,
1040
+ orderBy: ne,
1041
+ sort: m != null && m[0] ? "desc" : "asc"
1042
+ }).then((h) => {
1043
+ a.value = h.items.map((w) => {
1044
+ var T, E;
1045
+ const B = {
1046
+ name: w.name,
1047
+ description: w.description,
1048
+ createdAt: w.createdAt,
1049
+ updatedAt: w.updatedAt,
1050
+ createdBy: (i == null ? void 0 : i.getUserName(w.createdBy)) || w.createdBy,
1051
+ updatedBy: (i == null ? void 0 : i.getUserName(w.updatedBy)) || w.updatedBy,
1052
+ _id: w._id
1053
+ };
1054
+ return (((T = w.maps) == null ? void 0 : T.length) ?? 0) > 0 && (((E = w.layers) == null ? void 0 : E.length) ?? 0) > 0 ? B.type = "standalone" : B.type = "extension", B.disabled = !!t.getModuleById(w._id), b.set(w._id, w), B;
1055
+ }), s.value = h.totalCount, f.value = h.totalPages;
1056
+ }).catch((h) => {
1057
+ ge("CloudModuleSelector.vue").error(
1058
+ "Failed to load project modules.",
1059
+ h
1060
+ );
1061
+ }).finally(() => {
1062
+ l.value = !1;
1063
+ });
1064
+ }
1065
+ return {
1066
+ selectedItem: g,
1067
+ isItemIdEmpty: R,
1068
+ loading: l,
1069
+ items: a,
1070
+ totalItems: s,
1071
+ totalPages: f,
1072
+ headers: C,
1073
+ selected: u,
1074
+ typeIcon(D) {
1075
+ return U[D];
1076
+ },
1077
+ formatDate: Uo,
1078
+ getItems: G,
1079
+ close: () => {
1080
+ o("close");
1081
+ },
1082
+ addSelected: () => {
1083
+ var D;
1084
+ u.value.length > 0 && ((D = u.value[0]) == null ? void 0 : D._id) !== "" && (g.value.id = u.value[0]._id, g.value.title = u.value[0].name, g.value.icon = "", g.value.moduleUrl = `configs/${u.value[0]._id}.json`);
1085
+ },
1086
+ isFValid: v,
1087
+ validateForm: y,
1088
+ removeSelected: () => {
1089
+ g.value.id = "", g.value.title = "", g.value.icon = "", g.value.moduleUrl = "";
1090
+ },
1091
+ requiredRule: (D) => !!D || "moduleSelector.configEditor.editorError"
1092
+ };
1093
+ }
1094
+ }), Bo = { class: "d-flex px-2" };
1095
+ function Oo(e, o, t, r, i, l) {
1096
+ const a = c("v-icon"), s = c("v-tooltip"), f = c("VcsDataTable"), u = c("VcsLabel"), C = c("v-col"), b = c("VcsTextField"), g = c("v-row"), R = c("v-container"), v = c("v-form"), y = c("VcsFormSection"), U = c("VcsFormButton"), G = c("v-card");
1097
+ return I(), $(G, null, {
1098
+ default: n(() => [
1099
+ pe("div", null, [
1100
+ e.isItemIdEmpty ? (I(), $(f, {
1101
+ key: 0,
1102
+ "base-component": "VDataTableServer",
1103
+ loading: e.loading,
1104
+ items: e.items,
1105
+ "server-items-length": e.totalItems,
1106
+ "server-pages-length": e.totalPages,
1107
+ "searchbar-placeholder": e.$t("moduleSelector.configEditor.moduleCloudPicker.searchName"),
1108
+ headers: e.headers,
1109
+ "select-strategy": "single",
1110
+ "return-object": "",
1111
+ "show-select": "",
1112
+ "item-value": "_id",
1113
+ modelValue: e.selected,
1114
+ "onUpdate:modelValue": o[0] || (o[0] = (N) => e.selected = N),
1115
+ "onUpdate:items": e.getItems
1116
+ }, {
1117
+ "item.type": n(({ item: N }) => [
1118
+ d(
1119
+ a,
1120
+ ze(We({ ...e.$attrs })),
1121
+ {
1122
+ default: n(() => [
1123
+ S(
1124
+ V(e.typeIcon(N.type)),
1125
+ 1
1126
+ /* TEXT */
1127
+ )
1128
+ ]),
1129
+ _: 2
1130
+ /* DYNAMIC */
1131
+ },
1132
+ 1040
1133
+ /* FULL_PROPS, DYNAMIC_SLOTS */
1134
+ ),
1135
+ d(
1136
+ s,
1137
+ {
1138
+ activator: "parent",
1139
+ location: "right"
1140
+ },
1141
+ {
1142
+ default: n(() => [
1143
+ S(
1144
+ V(e.$t(`appConfigurator.dialogs.vcsModuleTable.${N.type}`)),
1145
+ 1
1146
+ /* TEXT */
1147
+ )
1148
+ ]),
1149
+ _: 2
1150
+ /* DYNAMIC */
1151
+ },
1152
+ 1024
1153
+ /* DYNAMIC_SLOTS */
1154
+ )
1155
+ ]),
1156
+ "item.createdAt": n(({ item: N }) => [
1157
+ S(
1158
+ V(e.formatDate(N.createdAt, e.$i18n.locale)),
1159
+ 1
1160
+ /* TEXT */
1161
+ )
1162
+ ]),
1163
+ "item.updatedAt": n(({ item: N }) => [
1164
+ S(
1165
+ V(e.formatDate(N.updatedAt, e.$i18n.locale)),
1166
+ 1
1167
+ /* TEXT */
1168
+ )
1169
+ ]),
1170
+ _: 1
1171
+ /* STABLE */
1172
+ }, 8, ["loading", "items", "server-items-length", "server-pages-length", "searchbar-placeholder", "headers", "modelValue", "onUpdate:items"])) : (I(), $(y, { key: 1 }, {
1173
+ default: n(() => [
1174
+ d(v, {
1175
+ modelValue: e.isFValid,
1176
+ "onUpdate:modelValue": o[3] || (o[3] = (N) => e.isFValid = N),
1177
+ ref: "form"
1178
+ }, {
1179
+ default: n(() => [
1180
+ d(R, { class: "px-2 pt-0 pb-2" }, {
1181
+ default: n(() => [
1182
+ d(g, {
1183
+ "no-gutters": "",
1184
+ class: "px-2"
1185
+ }, {
1186
+ default: n(() => [
1187
+ d(C, { cols: "2" }, {
1188
+ default: n(() => [
1189
+ d(u, {
1190
+ required: "",
1191
+ "html-for": "moduleName"
1192
+ }, {
1193
+ default: n(() => [
1194
+ S(
1195
+ V(e.$st("moduleSelector.configEditor.moduleName")),
1196
+ 1
1197
+ /* TEXT */
1198
+ )
1199
+ ]),
1200
+ _: 1
1201
+ /* STABLE */
1202
+ })
1203
+ ]),
1204
+ _: 1
1205
+ /* STABLE */
1206
+ }),
1207
+ d(C, { cols: "4" }, {
1208
+ default: n(() => [
1209
+ d(b, {
1210
+ id: "moduleName",
1211
+ placeholder: "Module Name",
1212
+ modelValue: e.selectedItem.title,
1213
+ "onUpdate:modelValue": o[1] || (o[1] = (N) => e.selectedItem.title = N),
1214
+ rules: [e.requiredRule]
1215
+ }, null, 8, ["modelValue", "rules"])
1216
+ ]),
1217
+ _: 1
1218
+ /* STABLE */
1219
+ })
1220
+ ]),
1221
+ _: 1
1222
+ /* STABLE */
1223
+ }),
1224
+ d(g, {
1225
+ "no-gutters": "",
1226
+ class: "px-2"
1227
+ }, {
1228
+ default: n(() => [
1229
+ d(C, { cols: "2" }, {
1230
+ default: n(() => [
1231
+ d(u, {
1232
+ required: "",
1233
+ "html-for": "moduleIcon"
1234
+ }, {
1235
+ default: n(() => [
1236
+ S(
1237
+ V(e.$st("moduleSelector.configEditor.moduleIcon")),
1238
+ 1
1239
+ /* TEXT */
1240
+ )
1241
+ ]),
1242
+ _: 1
1243
+ /* STABLE */
1244
+ })
1245
+ ]),
1246
+ _: 1
1247
+ /* STABLE */
1248
+ }),
1249
+ d(C, { cols: "4" }, {
1250
+ default: n(() => [
1251
+ d(b, {
1252
+ id: "moduleIcon",
1253
+ placeholder: "Icon Name",
1254
+ modelValue: e.selectedItem.icon,
1255
+ "onUpdate:modelValue": o[2] || (o[2] = (N) => e.selectedItem.icon = N),
1256
+ rules: [e.requiredRule]
1257
+ }, null, 8, ["modelValue", "rules"])
1258
+ ]),
1259
+ _: 1
1260
+ /* STABLE */
1261
+ })
1262
+ ]),
1263
+ _: 1
1264
+ /* STABLE */
1265
+ })
1266
+ ]),
1267
+ _: 1
1268
+ /* STABLE */
1269
+ })
1270
+ ]),
1271
+ _: 1
1272
+ /* STABLE */
1273
+ }, 8, ["modelValue"])
1274
+ ]),
1275
+ _: 1
1276
+ /* STABLE */
1277
+ })),
1278
+ pe("div", Bo, [
1279
+ e.isItemIdEmpty ? (I(), $(U, {
1280
+ key: 0,
1281
+ variant: "filled",
1282
+ disabled: e.selected[0] === void 0,
1283
+ class: "ma-2",
1284
+ onClick: e.addSelected,
1285
+ tooltip: "appConfigurator.dialogs.addTooltip",
1286
+ "tooltip-position": "bottom"
1287
+ }, {
1288
+ default: n(() => [
1289
+ S(
1290
+ V(e.$t("moduleSelector.configEditor.moduleCloudPicker.continue")),
1291
+ 1
1292
+ /* TEXT */
1293
+ )
1294
+ ]),
1295
+ _: 1
1296
+ /* STABLE */
1297
+ }, 8, ["disabled", "onClick"])) : q("v-if", !0),
1298
+ e.isItemIdEmpty ? q("v-if", !0) : (I(), $(U, {
1299
+ key: 1,
1300
+ disabled: !e.isFValid,
1301
+ variant: "filled",
1302
+ class: "ma-2",
1303
+ onClick: o[4] || (o[4] = () => {
1304
+ e.$emit("submit", e.selectedItem);
1305
+ })
1306
+ }, {
1307
+ default: n(() => [
1308
+ S(
1309
+ V(e.$t("components.apply")),
1310
+ 1
1311
+ /* TEXT */
1312
+ )
1313
+ ]),
1314
+ _: 1
1315
+ /* STABLE */
1316
+ }, 8, ["disabled"])),
1317
+ e.isItemIdEmpty ? q("v-if", !0) : (I(), $(U, {
1318
+ key: 2,
1319
+ onClick: e.removeSelected,
1320
+ class: "ma-2"
1321
+ }, {
1322
+ default: n(() => [
1323
+ S(
1324
+ V(e.$t("moduleSelector.configEditor.moduleCloudPicker.back")),
1325
+ 1
1326
+ /* TEXT */
1327
+ )
1328
+ ]),
1329
+ _: 1
1330
+ /* STABLE */
1331
+ }, 8, ["onClick"])),
1332
+ d(U, {
1333
+ class: "ma-2",
1334
+ onClick: e.close
1335
+ }, {
1336
+ default: n(() => [
1337
+ S(
1338
+ V(e.$t("components.cancel")),
1339
+ 1
1340
+ /* TEXT */
1341
+ )
1342
+ ]),
1343
+ _: 1
1344
+ /* STABLE */
1345
+ }, 8, ["onClick"])
1346
+ ])
1347
+ ])
1348
+ ]),
1349
+ _: 1
1350
+ /* STABLE */
1351
+ });
1352
+ }
1353
+ const To = /* @__PURE__ */ Y(No, [["render", Oo]]), Fo = J({
761
1354
  name: "ModuleSelectorConfigEditor",
762
1355
  components: {
763
- VcsCheckbox: ce,
764
- VDialog: Ue,
765
- VcsList: Me,
766
- VcsFormSection: ae,
1356
+ VcsCheckbox: $e,
1357
+ VDialog: Ye,
1358
+ VcsList: qe,
1359
+ VcsFormSection: Me,
767
1360
  VRow: Q,
768
- VcsLabel: se,
769
- AbstractConfigEditor: be,
770
- VcsTextField: te,
1361
+ VcsLabel: be,
1362
+ AbstractConfigEditor: Pe,
1363
+ VcsTextField: se,
771
1364
  VCol: X,
772
1365
  VContainer: Z,
773
- ModuleEditor: He,
774
- VBreadcrumbs: Ae,
775
- VBreadcrumbsItem: Te,
776
- WindowPositionSettings: Ze
1366
+ ModuleEditor: vo,
1367
+ VBreadcrumbs: xe,
1368
+ VBreadcrumbsItem: eo,
1369
+ WindowPositionSettings: bo,
1370
+ VcsModuleTable: To
777
1371
  },
778
1372
  props: {
779
1373
  getConfig: {
@@ -786,208 +1380,261 @@ const Ze = /* @__PURE__ */ Y(Ke, [["render", Je]]), Qe = J({
786
1380
  }
787
1381
  },
788
1382
  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({
1383
+ var te, le, ne;
1384
+ const o = Se("vcsApp"), t = k(0), r = k(void 0), i = k([]), l = k(void 0), a = k({ id: "", title: "", icon: "", moduleUrl: "" }), s = k({ id: "", title: "", icon: "", moduleUrl: "" }), f = k(!1), u = k(!1), C = k(!1), b = k(void 0);
1385
+ r.value = {
1386
+ ...re(),
1387
+ ...e.getConfig()
1388
+ };
1389
+ const g = k();
1390
+ (te = r.value) != null && te.basisModule && (g.value = (le = r.value) == null ? void 0 : le.basisModule);
1391
+ const R = H({
795
1392
  get() {
796
- return !!v.value;
1393
+ return !!g.value;
797
1394
  },
798
- set(s) {
799
- var C;
800
- s ? v.value = ((C = r.value) == null ? void 0 : C.basisModule) || { title: "" } : v.value = null;
1395
+ set(m) {
1396
+ var _;
1397
+ m ? g.value = ((_ = r.value) == null ? void 0 : _.basisModule) || { title: "" } : g.value = null;
801
1398
  }
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,
1399
+ }), v = He([]);
1400
+ function y(m, _) {
1401
+ var w, B, T;
1402
+ const h = {
1403
+ id: `${m.title || "undefined"}-${_}`,
1404
+ name: m.title,
1405
+ title: m.title,
1406
+ icon: m.icon,
1407
+ type: m.type,
855
1408
  actions: []
856
1409
  };
857
- return s.type === "url" && (M.moduleUrl = s.moduleUrl, (A = M.actions) == null || A.push({
1410
+ return m.type === "url" && (h.moduleUrl = m.moduleUrl, (w = h.actions) == null || w.push({
858
1411
  name: "edit",
859
1412
  title: "moduleSelector.configEditor.TooltipEditModule",
860
1413
  icon: "$vcsEdit",
861
1414
  callback() {
862
- if (n.value === void 0 && d.value.length > 0) {
863
- const b = d.value.find(
864
- (k) => k.id === M.id
1415
+ if (l.value === void 0 && i.value.length > 0) {
1416
+ const E = i.value.find(
1417
+ (F) => F.id === h.id
865
1418
  );
866
- b && (u.value = {
867
- id: b.id,
868
- title: b.title,
869
- icon: b.icon,
870
- moduleUrl: b.moduleUrl
1419
+ E && (a.value = {
1420
+ id: E.id,
1421
+ title: E.title,
1422
+ icon: E.icon,
1423
+ moduleUrl: E.moduleUrl
871
1424
  });
872
1425
  } else {
873
- const b = n.value.cards.find(
874
- (k) => k.id === M.id
1426
+ const E = l.value.cards.find(
1427
+ (F) => F.id === h.id
875
1428
  );
876
- b && (u.value = {
877
- id: b.id,
878
- title: b.title,
879
- icon: b.icon,
880
- moduleUrl: b.moduleUrl
1429
+ E && (a.value = {
1430
+ id: E.id,
1431
+ title: E.title,
1432
+ icon: E.icon,
1433
+ moduleUrl: E.moduleUrl
881
1434
  });
882
1435
  }
1436
+ u.value = !0;
883
1437
  }
884
- })), s.type === "group" && ((F = M.actions) == null || F.push({
1438
+ })), m.type === "group" && ((B = h.actions) == null || B.push({
885
1439
  name: "editGroup",
886
1440
  title: "moduleSelector.configEditor.TooltipEditGroup",
887
1441
  icon: "mdi-playlist-edit",
888
1442
  callback() {
889
- if (d.value.length > 0) {
890
- const b = d.value.find(
891
- (k) => k.id === M.id
1443
+ if (i.value.length > 0) {
1444
+ const E = i.value.find(
1445
+ (F) => F.id === h.id
892
1446
  );
893
- b && (n.value = b, f.splice(1, 1), f.length > 0 && (f[0].icon = "$vcsPlus", f[0].title = "moduleSelector.configEditor.TooltipAddModule"));
1447
+ E && (l.value = E, v.splice(2, 1), v.length > 1 && (v[1].icon = "$vcsPlus", v[1].title = "moduleSelector.configEditor.TooltipAddModule"));
894
1448
  }
895
1449
  }
896
- }), s.cards && (M.cards = s.cards.map(V))), (G = M.actions) == null || G.push({
1450
+ }), m.cards && (h.cards = m.cards.map(y))), (T = h.actions) == null || T.push({
897
1451
  name: "linkButton.editor.remove",
898
1452
  title: "moduleSelector.configEditor.TooltipDeleteMG",
899
1453
  icon: "$vcsTrashCan",
900
1454
  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
1455
+ var E, F, M;
1456
+ l.value ? l.value.cards = (F = (E = l.value) == null ? void 0 : E.cards) == null ? void 0 : F.filter(
1457
+ (O) => O.id !== h.id
1458
+ ) : i.value = (M = i.value) == null ? void 0 : M.filter(
1459
+ (O) => O.id !== h.id
906
1460
  );
907
1461
  }
908
- }), M;
1462
+ }), h;
909
1463
  }
910
- (ee = r.value) != null && ee.modules && (d.value = r.value.modules.map(V)), f.push(
1464
+ v.push({
1465
+ name: "moduleSelector.configEditor.addFromCloud",
1466
+ icon: "$vcsImport",
1467
+ callback() {
1468
+ s.value = {
1469
+ id: "",
1470
+ title: "",
1471
+ icon: "",
1472
+ moduleUrl: ""
1473
+ }, f.value = !0;
1474
+ }
1475
+ });
1476
+ function U(m) {
1477
+ var _;
1478
+ if (m.type === "url") {
1479
+ const { actions: h, id: w, name: B, ...T } = m;
1480
+ return {
1481
+ ...T,
1482
+ moduleUrl: m.moduleUrl || ""
1483
+ };
1484
+ } else {
1485
+ const h = ((_ = m.cards) == null ? void 0 : _.map((F) => {
1486
+ const { actions: M, id: O, name: z, ...Be } = F;
1487
+ return {
1488
+ ...Be
1489
+ };
1490
+ })) || [], { actions: w, id: B, name: T, ...E } = m;
1491
+ return {
1492
+ ...E,
1493
+ ...h.length ? { cards: h } : {}
1494
+ };
1495
+ }
1496
+ }
1497
+ const G = {
1498
+ name: "moduleSelector.configEditor.addGroup",
1499
+ callback() {
1500
+ var h;
1501
+ const m = {
1502
+ type: "group",
1503
+ title: "",
1504
+ icon: "",
1505
+ cards: []
1506
+ };
1507
+ C.value = !0;
1508
+ const _ = (h = i.value) == null ? void 0 : h.push(
1509
+ y(
1510
+ m,
1511
+ i.value.length
1512
+ )
1513
+ );
1514
+ l.value = i.value[_ - 1], v.splice(2, 1), v.length > 1 && (v[1].icon = "$vcsPlus", v[1].title = "moduleSelector.configEditor.TooltipAddModule");
1515
+ }
1516
+ };
1517
+ function N(m) {
1518
+ return m.map(U);
1519
+ }
1520
+ (ne = r.value) != null && ne.modules && (i.value = r.value.modules.map(y)), v.push(
911
1521
  {
912
1522
  name: "moduleSelector.configEditor.add",
913
1523
  callback() {
914
- u.value = {
1524
+ a.value = {
915
1525
  id: "",
916
- title: "title",
917
- icon: "icon",
918
- moduleUrl: "url"
919
- };
1526
+ title: "",
1527
+ icon: "",
1528
+ moduleUrl: ""
1529
+ }, u.value = !0;
920
1530
  }
921
1531
  },
922
- $
923
- ), ne(r, (s) => {
924
- s != null && s.modules ? a.value = s.modules.map(
925
- (C, M) => V(C, M)
926
- ) : a.value = [];
1532
+ G
1533
+ ), we(r, (m) => {
1534
+ m != null && m.modules ? b.value = m.modules.map(
1535
+ (_, h) => y(_, h)
1536
+ ) : b.value = [];
927
1537
  });
928
- const E = () => {
1538
+ const ee = () => {
929
1539
  e.setConfig({
930
1540
  ...r.value,
931
- modules: U(d.value),
932
- basisModule: v.value
1541
+ modules: N(i.value),
1542
+ basisModule: g.value
933
1543
  });
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);
1544
+ }, oe = () => {
1545
+ var m, _, h, w, B, T, E, F;
1546
+ if (l.value === void 0) {
1547
+ if (a.value)
1548
+ if (((m = a.value) == null ? void 0 : m.id) !== "") {
1549
+ const M = i.value.find(
1550
+ (O) => {
1551
+ var z;
1552
+ return O.id === ((z = a.value) == null ? void 0 : z.id);
943
1553
  }
944
1554
  );
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"
1555
+ M && Object.assign(M, {
1556
+ ...a.value
954
1557
  });
955
- const O = U(
956
- d.value
1558
+ } else
1559
+ i.value.push(
1560
+ y(
1561
+ {
1562
+ ...a.value,
1563
+ type: "url"
1564
+ },
1565
+ i.value.length
1566
+ )
957
1567
  );
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
1568
+ } else if (a.value && ((_ = a.value) == null ? void 0 : _.id) !== "") {
1569
+ const M = l.value.cards.find(
1570
+ (z) => z.id === a.value.id
963
1571
  );
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
1572
+ M && Object.assign(M, {
1573
+ ...a.value
1574
+ });
1575
+ let O;
1576
+ (h = l.value) != null && h.id || ((w = l.value) == null ? void 0 : w.id) !== "" ? O = l.value.id : O = `${l.value.title}-${i.value.length - 1}`, l.value = i.value.find(
1577
+ (z) => z.id === O
968
1578
  );
969
1579
  } 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
1580
+ l.value.cards.push(
1581
+ y(
1582
+ {
1583
+ ...a.value,
1584
+ type: "url"
1585
+ },
1586
+ l.value.cards.length
1587
+ )
1588
+ );
1589
+ let M;
1590
+ (B = l.value) != null && B.id || ((T = l.value) == null ? void 0 : T.id) !== "" ? M = l.value.id : M = `${(E = l.value) == null ? void 0 : E.title}-${i.value.length - 1}`, l.value = (F = i.value) == null ? void 0 : F.find(
1591
+ (O) => O.id === M
1592
+ );
1593
+ }
1594
+ a.value = {
1595
+ id: "",
1596
+ title: "",
1597
+ icon: "",
1598
+ moduleUrl: ""
1599
+ }, u.value = !1;
1600
+ }, p = () => {
1601
+ var m, _, h, w;
1602
+ if (l.value === void 0)
1603
+ s.value && i.value.push(
1604
+ y(
1605
+ {
1606
+ title: s.value.title,
1607
+ icon: s.value.icon,
1608
+ moduleUrl: s.value.moduleUrl,
1609
+ type: "url"
1610
+ },
1611
+ i.value.length
1612
+ )
1613
+ );
1614
+ else {
1615
+ l.value.cards.push(
1616
+ y(
1617
+ {
1618
+ ...s.value,
1619
+ type: "url"
1620
+ },
1621
+ l.value.cards.length
1622
+ )
980
1623
  );
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
1624
+ let B;
1625
+ (m = l.value) != null && m.id || ((_ = l.value) == null ? void 0 : _.id) !== "" ? B = l.value.id : B = `${(h = l.value) == null ? void 0 : h.title}-${i.value.length - 1}`, l.value = (w = i.value) == null ? void 0 : w.find(
1626
+ (T) => T.id === B
985
1627
  );
986
1628
  }
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([
1629
+ s.value = {
1630
+ id: "",
1631
+ title: "",
1632
+ icon: "",
1633
+ moduleUrl: ""
1634
+ }, f.value = !1;
1635
+ }, D = () => {
1636
+ l.value = void 0, v.length > 1 && (delete v[1].icon, delete v[1].title), v.push(G);
1637
+ }, L = k([
991
1638
  {
992
1639
  title: o.vueI18n.t(
993
1640
  "moduleSelector.configEditor.breadcrumbs.overview"
@@ -1001,66 +1648,70 @@ const Ze = /* @__PURE__ */ Y(Ke, [["render", Je]]), Qe = J({
1001
1648
  href: "#"
1002
1649
  }
1003
1650
  ]);
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);
1651
+ return we(l, (m) => {
1652
+ m && m.title && (L.value[1].title = `${o.vueI18n.t("moduleSelector.configEditor.breadcrumbs.group")}: ${m.title}`, m.name = m.title);
1006
1653
  }), {
1007
- editingItem: u,
1654
+ editingItem: a,
1655
+ selectCloudItem: s,
1656
+ editingItemDialogVisible: u,
1657
+ selectCloudItemDialogVisible: f,
1008
1658
  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,
1659
+ listItemArray: i,
1660
+ breadcrumbItems: L,
1661
+ currentGroup: l,
1662
+ apply: ee,
1663
+ returnLevel: D,
1664
+ updateItem: oe,
1665
+ updateCloudItem: p,
1666
+ level: t,
1667
+ listItems: b,
1668
+ basisModule: g,
1669
+ basisModuleExists: R,
1670
+ headerActions: v,
1020
1671
  move({
1021
- item: s,
1022
- targetIndex: C
1672
+ item: m,
1673
+ targetIndex: _
1023
1674
  }) {
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));
1675
+ var h, w, B, T, E, F;
1676
+ if (i.value && l.value === void 0) {
1677
+ let M = _;
1678
+ M = M >= 0 ? M : 0, M = M < ((h = i.value) == null ? void 0 : h.length) ? M : i.value.length - 1;
1679
+ const O = (w = i.value) == null ? void 0 : w.indexOf(m);
1680
+ O !== M && ((B = i.value) == null || B.splice(O, 1), (T = i.value) == null || T.splice(M, 0, m));
1681
+ } else if ((((F = (E = l.value) == null ? void 0 : E.cards) == null ? void 0 : F.length) ?? 0) > 1) {
1682
+ let M = _;
1683
+ M = M >= 0 ? M : 0, M = M < l.value.cards.length ? M : l.value.cards.length - 1;
1684
+ const O = l.value.cards.indexOf(m);
1685
+ O && O !== M && (l.value.cards.splice(O, 1), l.value.cards.splice(M, 0, m));
1035
1686
  }
1036
1687
  }
1037
1688
  };
1038
1689
  }
1039
1690
  });
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({
1691
+ function Ro(e, o, t, r, i, l) {
1692
+ const a = c("VcsLabel"), s = c("v-col"), f = c("VcsTextField"), u = c("v-row"), C = c("VcsCheckbox"), b = c("v-container"), g = c("VcsFormSection"), R = c("WindowPositionSettings"), v = c("v-breadcrumbs-item"), y = c("v-breadcrumbs"), U = c("VcsList"), G = c("ModuleEditor"), N = c("v-dialog"), ee = c("VcsModuleTable"), oe = c("AbstractConfigEditor");
1693
+ return e.localConfig ? (I(), $(oe, Ke({
1043
1694
  key: 0,
1044
1695
  onSubmit: e.apply
1045
1696
  }, { ...e.$attrs, ...e.$props }), {
1046
- default: l(() => [
1047
- e.currentGroup === void 0 ? (w(), _(g, {
1697
+ default: n(() => [
1698
+ e.currentGroup === void 0 ? (I(), $(b, {
1048
1699
  key: 0,
1049
1700
  class: "py-0 px-0"
1050
1701
  }, {
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(() => [
1702
+ default: n(() => [
1703
+ d(g, { heading: "moduleSelector.configEditor.general" }, {
1704
+ default: n(() => [
1705
+ d(b, { class: "py-0 px-1" }, {
1706
+ default: n(() => [
1707
+ d(u, { "no-gutters": "" }, {
1708
+ default: n(() => [
1709
+ d(s, { cols: "6" }, {
1710
+ default: n(() => [
1711
+ d(a, { "html-for": "moduleselector-window-title" }, {
1712
+ default: n(() => [
1062
1713
  S(
1063
- y(e.$st("moduleSelector.configEditor.windowTitle")),
1714
+ V(e.$st("moduleSelector.configEditor.windowTitle")),
1064
1715
  1
1065
1716
  /* TEXT */
1066
1717
  )
@@ -1072,11 +1723,11 @@ function Xe(e, o, i, r, d, n) {
1072
1723
  _: 1
1073
1724
  /* STABLE */
1074
1725
  }),
1075
- t(a, null, {
1076
- default: l(() => [
1077
- t(v, {
1726
+ d(s, null, {
1727
+ default: n(() => [
1728
+ d(f, {
1078
1729
  id: "moduleselector-window-title",
1079
- placeholder: e.$t("moduleSelector.title"),
1730
+ placeholder: e.$st("moduleSelector.title"),
1080
1731
  modelValue: e.localConfig.windowTitle,
1081
1732
  "onUpdate:modelValue": o[0] || (o[0] = (p) => e.localConfig.windowTitle = p)
1082
1733
  }, null, 8, ["placeholder", "modelValue"])
@@ -1088,11 +1739,11 @@ function Xe(e, o, i, r, d, n) {
1088
1739
  _: 1
1089
1740
  /* STABLE */
1090
1741
  }),
1091
- t(c, { "no-gutters": "" }, {
1092
- default: l(() => [
1093
- t(a, null, {
1094
- default: l(() => [
1095
- t(f, {
1742
+ d(u, { "no-gutters": "" }, {
1743
+ default: n(() => [
1744
+ d(s, null, {
1745
+ default: n(() => [
1746
+ d(C, {
1096
1747
  modelValue: e.localConfig.isActiveOnStart,
1097
1748
  "onUpdate:modelValue": o[1] || (o[1] = (p) => e.localConfig.isActiveOnStart = p),
1098
1749
  label: "moduleSelector.configEditor.isActiveOnStart"
@@ -1105,11 +1756,11 @@ function Xe(e, o, i, r, d, n) {
1105
1756
  _: 1
1106
1757
  /* STABLE */
1107
1758
  }),
1108
- t(c, { "no-gutters": "" }, {
1109
- default: l(() => [
1110
- t(a, null, {
1111
- default: l(() => [
1112
- t(f, {
1759
+ d(u, { "no-gutters": "" }, {
1760
+ default: n(() => [
1761
+ d(s, null, {
1762
+ default: n(() => [
1763
+ d(C, {
1113
1764
  modelValue: e.localConfig.requireModuleSelection,
1114
1765
  "onUpdate:modelValue": o[2] || (o[2] = (p) => e.localConfig.requireModuleSelection = p),
1115
1766
  label: "moduleSelector.configEditor.requireModuleSelection"
@@ -1130,12 +1781,12 @@ function Xe(e, o, i, r, d, n) {
1130
1781
  _: 1
1131
1782
  /* STABLE */
1132
1783
  }),
1133
- t($, {
1784
+ d(g, {
1134
1785
  heading: "moduleSelector.configEditor.windowPosition",
1135
1786
  expandable: !0
1136
1787
  }, {
1137
- default: l(() => [
1138
- t(U, {
1788
+ default: n(() => [
1789
+ d(R, {
1139
1790
  modelValue: e.localConfig.position,
1140
1791
  "onUpdate:modelValue": o[3] || (o[3] = (p) => e.localConfig.position = p),
1141
1792
  "position-keys": [
@@ -1153,15 +1804,15 @@ function Xe(e, o, i, r, d, n) {
1153
1804
  _: 1
1154
1805
  /* STABLE */
1155
1806
  }),
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, {
1807
+ d(g, { heading: "moduleSelector.configEditor.baseModule" }, {
1808
+ default: n(() => [
1809
+ d(b, { class: "py-0 px-1" }, {
1810
+ default: n(() => [
1811
+ d(u, { "no-gutters": "" }, {
1812
+ default: n(() => [
1813
+ d(s, null, {
1814
+ default: n(() => [
1815
+ d(C, {
1165
1816
  id: "BaseModuleCheckbox",
1166
1817
  modelValue: e.basisModuleExists,
1167
1818
  "onUpdate:modelValue": o[4] || (o[4] = (p) => e.basisModuleExists = p),
@@ -1175,20 +1826,20 @@ function Xe(e, o, i, r, d, n) {
1175
1826
  _: 1
1176
1827
  /* STABLE */
1177
1828
  }),
1178
- e.basisModuleExists ? (w(), _(c, {
1829
+ e.basisModuleExists ? (I(), $(u, {
1179
1830
  key: 0,
1180
1831
  "no-gutters": ""
1181
1832
  }, {
1182
- default: l(() => [
1183
- t(a, { cols: "6" }, {
1184
- default: l(() => [
1185
- t(u, {
1833
+ default: n(() => [
1834
+ d(s, { cols: "6" }, {
1835
+ default: n(() => [
1836
+ d(a, {
1186
1837
  required: "",
1187
1838
  "html-for": "basisModuleName"
1188
1839
  }, {
1189
- default: l(() => [
1840
+ default: n(() => [
1190
1841
  S(
1191
- y(e.$st("moduleSelector.configEditor.title")),
1842
+ V(e.$st("moduleSelector.configEditor.title")),
1192
1843
  1
1193
1844
  /* TEXT */
1194
1845
  )
@@ -1200,9 +1851,9 @@ function Xe(e, o, i, r, d, n) {
1200
1851
  _: 1
1201
1852
  /* STABLE */
1202
1853
  }),
1203
- t(a, null, {
1204
- default: l(() => [
1205
- t(v, {
1854
+ d(s, null, {
1855
+ default: n(() => [
1856
+ d(f, {
1206
1857
  id: "basisModuleName",
1207
1858
  placeholder: "Base Module",
1208
1859
  rules: [
@@ -1218,21 +1869,21 @@ function Xe(e, o, i, r, d, n) {
1218
1869
  ]),
1219
1870
  _: 1
1220
1871
  /* STABLE */
1221
- })) : B("v-if", !0),
1222
- e.basisModuleExists ? (w(), _(c, {
1872
+ })) : q("v-if", !0),
1873
+ e.basisModuleExists ? (I(), $(u, {
1223
1874
  key: 1,
1224
1875
  "no-gutters": ""
1225
1876
  }, {
1226
- default: l(() => [
1227
- t(a, { cols: "6" }, {
1228
- default: l(() => [
1229
- t(u, {
1877
+ default: n(() => [
1878
+ d(s, { cols: "6" }, {
1879
+ default: n(() => [
1880
+ d(a, {
1230
1881
  required: "",
1231
1882
  "html-for": "basisModuleIcon"
1232
1883
  }, {
1233
- default: l(() => [
1884
+ default: n(() => [
1234
1885
  S(
1235
- y(e.$st("components.style.icon")),
1886
+ V(e.$st("components.style.icon")),
1236
1887
  1
1237
1888
  /* TEXT */
1238
1889
  )
@@ -1244,9 +1895,9 @@ function Xe(e, o, i, r, d, n) {
1244
1895
  _: 1
1245
1896
  /* STABLE */
1246
1897
  }),
1247
- t(a, null, {
1248
- default: l(() => [
1249
- t(v, {
1898
+ d(s, null, {
1899
+ default: n(() => [
1900
+ d(f, {
1250
1901
  id: "basisModuleIcon",
1251
1902
  placeholder: "mdi-home-city",
1252
1903
  rules: [
@@ -1262,7 +1913,7 @@ function Xe(e, o, i, r, d, n) {
1262
1913
  ]),
1263
1914
  _: 1
1264
1915
  /* STABLE */
1265
- })) : B("v-if", !0)
1916
+ })) : q("v-if", !0)
1266
1917
  ]),
1267
1918
  _: 1
1268
1919
  /* STABLE */
@@ -1274,25 +1925,25 @@ function Xe(e, o, i, r, d, n) {
1274
1925
  ]),
1275
1926
  _: 1
1276
1927
  /* STABLE */
1277
- })) : (w(), _(g, {
1928
+ })) : (I(), $(b, {
1278
1929
  key: 1,
1279
1930
  class: "py-0 px-1"
1280
1931
  }, {
1281
- default: l(() => [
1282
- t(E, {
1932
+ default: n(() => [
1933
+ d(y, {
1283
1934
  items: e.breadcrumbItems,
1284
1935
  divider: "/"
1285
1936
  }, {
1286
- item: l(({ item: p }) => [
1287
- (w(), _(V, {
1937
+ item: n(({ item: p }) => [
1938
+ (I(), $(v, {
1288
1939
  key: p.title,
1289
1940
  disabled: p.disabled,
1290
1941
  href: p.href,
1291
- onClick: (ee) => p.disabled ? null : e.returnLevel()
1942
+ onClick: (D) => p.disabled ? null : e.returnLevel()
1292
1943
  }, {
1293
- default: l(() => [
1944
+ default: n(() => [
1294
1945
  S(
1295
- y(p.title),
1946
+ V(p.title),
1296
1947
  1
1297
1948
  /* TEXT */
1298
1949
  )
@@ -1304,17 +1955,17 @@ function Xe(e, o, i, r, d, n) {
1304
1955
  _: 1
1305
1956
  /* STABLE */
1306
1957
  }, 8, ["items"]),
1307
- t(c, { "no-gutters": "" }, {
1308
- default: l(() => [
1309
- t(a, { cols: "6" }, {
1310
- default: l(() => [
1311
- t(u, {
1958
+ d(u, { "no-gutters": "" }, {
1959
+ default: n(() => [
1960
+ d(s, { cols: "6" }, {
1961
+ default: n(() => [
1962
+ d(a, {
1312
1963
  required: "",
1313
1964
  "html-for": "groupModuleName"
1314
1965
  }, {
1315
- default: l(() => [
1966
+ default: n(() => [
1316
1967
  S(
1317
- y(e.$st("moduleSelector.configEditor.groupName")),
1968
+ V(e.$st("moduleSelector.configEditor.groupName")),
1318
1969
  1
1319
1970
  /* TEXT */
1320
1971
  )
@@ -1326,9 +1977,9 @@ function Xe(e, o, i, r, d, n) {
1326
1977
  _: 1
1327
1978
  /* STABLE */
1328
1979
  }),
1329
- t(a, null, {
1330
- default: l(() => [
1331
- t(v, {
1980
+ d(s, null, {
1981
+ default: n(() => [
1982
+ d(f, {
1332
1983
  id: "groupModuleName",
1333
1984
  placeholder: "Module Name",
1334
1985
  modelValue: e.currentGroup.title,
@@ -1343,17 +1994,17 @@ function Xe(e, o, i, r, d, n) {
1343
1994
  _: 1
1344
1995
  /* STABLE */
1345
1996
  }),
1346
- t(c, { "no-gutters": "" }, {
1347
- default: l(() => [
1348
- t(a, { cols: "6" }, {
1349
- default: l(() => [
1350
- t(u, {
1997
+ d(u, { "no-gutters": "" }, {
1998
+ default: n(() => [
1999
+ d(s, { cols: "6" }, {
2000
+ default: n(() => [
2001
+ d(a, {
1351
2002
  required: "",
1352
2003
  "html-for": "groupModuleIcon"
1353
2004
  }, {
1354
- default: l(() => [
2005
+ default: n(() => [
1355
2006
  S(
1356
- y(e.$st("moduleSelector.configEditor.moduleIcon")),
2007
+ V(e.$st("moduleSelector.configEditor.moduleIcon")),
1357
2008
  1
1358
2009
  /* TEXT */
1359
2010
  )
@@ -1365,9 +2016,9 @@ function Xe(e, o, i, r, d, n) {
1365
2016
  _: 1
1366
2017
  /* STABLE */
1367
2018
  }),
1368
- t(a, null, {
1369
- default: l(() => [
1370
- t(v, {
2019
+ d(s, null, {
2020
+ default: n(() => [
2021
+ d(f, {
1371
2022
  id: "groupModuleIcon",
1372
2023
  placeholder: "Module Icon",
1373
2024
  modelValue: e.currentGroup.icon,
@@ -1388,40 +2039,55 @@ function Xe(e, o, i, r, d, n) {
1388
2039
  _: 1
1389
2040
  /* STABLE */
1390
2041
  })),
1391
- t($, {
2042
+ d(g, {
1392
2043
  heading: "moduleSelector.configEditor.heading",
1393
2044
  "start-open": !0,
1394
2045
  "header-actions": e.headerActions
1395
2046
  }, {
1396
- default: l(() => [
1397
- B("V-if currentItem group > cards || wenn url oder empty listItems"),
1398
- e.currentGroup === void 0 ? (w(), _(I, {
2047
+ default: n(() => [
2048
+ e.currentGroup === void 0 ? (I(), $(U, {
1399
2049
  key: 0,
1400
2050
  items: e.listItemArray,
1401
2051
  draggable: !0,
1402
2052
  onItemMoved: e.move
1403
- }, null, 8, ["items", "onItemMoved"])) : (w(), _(I, {
2053
+ }, null, 8, ["items", "onItemMoved"])) : (I(), $(U, {
1404
2054
  key: 1,
1405
2055
  items: e.currentGroup.cards,
1406
2056
  draggable: !0,
1407
2057
  onItemMoved: e.move
1408
2058
  }, null, 8, ["items", "onItemMoved"])),
1409
- e.editingItem ? (w(), _(D, {
1410
- key: 2,
1411
- "model-value": !0,
2059
+ d(N, {
2060
+ modelValue: e.editingItemDialogVisible,
2061
+ "onUpdate:modelValue": o[11] || (o[11] = (p) => e.editingItemDialogVisible = p),
1412
2062
  width: "400",
1413
2063
  persistent: !0
1414
2064
  }, {
1415
- default: l(() => [
1416
- t(x, {
2065
+ default: n(() => [
2066
+ d(G, {
1417
2067
  "model-value": e.editingItem,
1418
- onClose: o[9] || (o[9] = (p) => e.editingItem = void 0),
2068
+ onClose: o[9] || (o[9] = (p) => e.editingItemDialogVisible = !1),
1419
2069
  onSubmit: o[10] || (o[10] = (p) => e.updateItem())
1420
2070
  }, null, 8, ["model-value"])
1421
2071
  ]),
1422
2072
  _: 1
1423
2073
  /* STABLE */
1424
- })) : B("v-if", !0)
2074
+ }, 8, ["modelValue"]),
2075
+ d(N, {
2076
+ modelValue: e.selectCloudItemDialogVisible,
2077
+ "onUpdate:modelValue": o[14] || (o[14] = (p) => e.selectCloudItemDialogVisible = p),
2078
+ width: "1000",
2079
+ persistent: !0
2080
+ }, {
2081
+ default: n(() => [
2082
+ d(ee, {
2083
+ "model-value": e.selectCloudItem,
2084
+ onClose: o[12] || (o[12] = (p) => e.selectCloudItemDialogVisible = !1),
2085
+ onSubmit: o[13] || (o[13] = (p) => e.updateCloudItem())
2086
+ }, null, 8, ["model-value"])
2087
+ ]),
2088
+ _: 1
2089
+ /* STABLE */
2090
+ }, 8, ["modelValue"])
1425
2091
  ]),
1426
2092
  _: 1
1427
2093
  /* STABLE */
@@ -1429,33 +2095,33 @@ function Xe(e, o, i, r, d, n) {
1429
2095
  ]),
1430
2096
  _: 1
1431
2097
  /* STABLE */
1432
- }, 16, ["onSubmit"])) : B("v-if", !0);
2098
+ }, 16, ["onSubmit"])) : q("v-if", !0);
1433
2099
  }
1434
- const Ye = /* @__PURE__ */ Y(Qe, [["render", Xe], ["__scopeId", "data-v-a05b9d98"]]);
1435
- function to(e) {
2100
+ const Do = /* @__PURE__ */ Y(Fo, [["render", Ro], ["__scopeId", "data-v-04be78a1"]]);
2101
+ function zo(e) {
1436
2102
  let o;
1437
2103
  return {
1438
2104
  get name() {
1439
- return P;
2105
+ return j;
1440
2106
  },
1441
2107
  get version() {
1442
- return Fe;
2108
+ return io;
1443
2109
  },
1444
2110
  get mapVersion() {
1445
- return Ge;
2111
+ return ro;
1446
2112
  },
1447
2113
  get config() {
1448
- return { ...H(), ...e };
2114
+ return { ...re(), ...e };
1449
2115
  },
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,
2116
+ selectedMainModuleIndex: k(void 0),
2117
+ selectedNestedModuleIndex: k(void 0),
2118
+ async initialize(t, r) {
2119
+ var a;
2120
+ o = t;
2121
+ const i = {
2122
+ id: ae,
2123
+ component: co,
2124
+ slot: Ge.DETACHED,
1459
2125
  position: this.config.position,
1460
2126
  state: {
1461
2127
  headerTitle: this.config.windowTitle,
@@ -1468,13 +2134,13 @@ function to(e) {
1468
2134
  }
1469
2135
  };
1470
2136
  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);
2137
+ const s = Ee(r.smi), f = Ee(r.snmi), u = to(r.w), { modules: C } = this.config;
2138
+ if (s !== void 0 && s < (C == null ? void 0 : C.length)) {
2139
+ this.selectedMainModuleIndex.value = s;
2140
+ const b = C[s];
2141
+ f !== void 0 && (b == null ? void 0 : b.type) === "group" && f < ((a = b == null ? void 0 : b.cards) == null ? void 0 : a.length) && (this.selectedNestedModuleIndex.value = f);
1476
2142
  }
1477
- c || await pe(
2143
+ u || await Ue(
1478
2144
  this.selectedMainModuleIndex.value,
1479
2145
  this.selectedNestedModuleIndex.value,
1480
2146
  o,
@@ -1482,35 +2148,35 @@ function to(e) {
1482
2148
  e.basisModule
1483
2149
  );
1484
2150
  }
1485
- const { action: n } = we(
2151
+ const { action: l } = je(
1486
2152
  {
1487
2153
  name: "moduleSelector",
1488
2154
  title: "moduleSelector.title",
1489
2155
  icon: "mdi-view-grid"
1490
2156
  },
1491
- d,
2157
+ i,
1492
2158
  o.windowManager,
1493
- P
2159
+ j
1494
2160
  );
1495
2161
  return o.navbarManager.add(
1496
2162
  {
1497
- id: n.name,
1498
- action: n
2163
+ id: l.name,
2164
+ action: l
1499
2165
  },
1500
- P,
1501
- Ve.PROJECT
1502
- ), (r && r.w || !r && e.isActiveOnStart) && o.windowManager.add(d, P), Promise.resolve();
2166
+ j,
2167
+ Le.PROJECT
2168
+ ), (r && r.w || !r && e.isActiveOnStart) && o.windowManager.add(i, j), Promise.resolve();
1503
2169
  },
1504
- getDefaultOptions: H,
2170
+ getDefaultOptions: re,
1505
2171
  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 } : {};
2172
+ var a, s;
2173
+ const t = (a = this.selectedMainModuleIndex) == null ? void 0 : a.value, r = (s = this.selectedNestedModuleIndex) == null ? void 0 : s.value, i = o.windowManager.has(ae), l = this.config.isActiveOnStart;
2174
+ return t !== void 0 || r !== void 0 || i !== l ? { smi: t, snmi: r, w: i } : {};
1509
2175
  },
1510
2176
  getConfigEditors() {
1511
2177
  return [
1512
2178
  {
1513
- component: Ye,
2179
+ component: Do,
1514
2180
  title: "moduleSelector.name",
1515
2181
  infoUrlCallback: o.getHelpUrlCallback(
1516
2182
  "/components/plugins/moduleSelectorConfig.html",
@@ -1520,8 +2186,8 @@ function to(e) {
1520
2186
  ];
1521
2187
  },
1522
2188
  toJSON() {
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;
2189
+ const t = {}, r = re();
2190
+ return this.config.windowTitle !== r.windowTitle && (t.windowTitle = this.config.windowTitle), this.config.isActiveOnStart !== r.isActiveOnStart && (t.isActiveOnStart = this.config.isActiveOnStart), this.config.requireModuleSelection !== r.requireModuleSelection && (t.requireModuleSelection = this.config.requireModuleSelection), ue(this.config.position, r.position) || (t.position = this.config.position), ue(this.config.modules, r.modules) || (t.modules = this.config.modules), ue(this.config.basisModule, r.basisModule) || (t.basisModule = this.config.basisModule), e.serverUrl != null && (t.serverUrl = e.serverUrl), e.projectId != null && (t.projectId = e.projectId), e.appId != null && (t.appId = e.appId), e.token != null && (t.token = e.token), t;
1525
2191
  },
1526
2192
  i18n: {
1527
2193
  de: {
@@ -1531,6 +2197,20 @@ function to(e) {
1531
2197
  startButton: "Anwendung starten",
1532
2198
  cardBack: "Zurück",
1533
2199
  configEditor: {
2200
+ moduleCloudPicker: {
2201
+ searchName: "Suche nach Name...",
2202
+ continue: "Weiter",
2203
+ back: "Zurück",
2204
+ headers: {
2205
+ name: "Modul Name",
2206
+ type: "Typ",
2207
+ description: "Beschreibung",
2208
+ createdAt: "Erzeugt am",
2209
+ updatedAt: "Aktualisiert am",
2210
+ createdBy: "Erzeugt von",
2211
+ updatedBy: "Aktualisiert von"
2212
+ }
2213
+ },
1534
2214
  TooltipAddModule: "Modul hinzufügen",
1535
2215
  TooltipEditModule: "Modul bearbeiten",
1536
2216
  TooltipEditGroup: "Modul-Gruppe bearbeiten",
@@ -1564,6 +2244,20 @@ function to(e) {
1564
2244
  startButton: "Start application",
1565
2245
  cardBack: "Back",
1566
2246
  configEditor: {
2247
+ moduleCloudPicker: {
2248
+ searchName: "Search for name...",
2249
+ continue: "Continue",
2250
+ back: "Back",
2251
+ headers: {
2252
+ name: "Module name",
2253
+ type: "Type",
2254
+ description: "Description",
2255
+ createdAt: "Created at",
2256
+ updatedAt: "Updated at",
2257
+ createdBy: "Created by",
2258
+ updatedBy: "Created by"
2259
+ }
2260
+ },
1567
2261
  TooltipAddModule: "Add module",
1568
2262
  TooltipEditModule: "Edit module",
1569
2263
  TooltipEditGroup: "Edit module group",
@@ -1596,5 +2290,5 @@ function to(e) {
1596
2290
  };
1597
2291
  }
1598
2292
  export {
1599
- to as default
2293
+ zo as default
1600
2294
  };