@linagora/linid-im-front-corelib 0.0.13 → 0.0.14
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/core-lib.es.js +233 -217
- package/dist/core-lib.umd.js +3 -3
- package/dist/package.json +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/types/src/index.d.ts +1 -0
- package/dist/types/src/services/piniaStoreService.d.ts +13 -0
- package/dist/types/src/stores/linidConfigurationStore.d.ts +3 -4
- package/dist/types/src/stores/linidZoneStore.d.ts +3 -5
- package/package.json +1 -1
package/dist/core-lib.es.js
CHANGED
|
@@ -1,107 +1,107 @@
|
|
|
1
|
-
import { defineAsyncComponent as
|
|
2
|
-
let
|
|
3
|
-
function
|
|
4
|
-
if (
|
|
1
|
+
import { defineAsyncComponent as be, hasInjectionContext as q, inject as J, getCurrentInstance as Ne, ref as R, reactive as De, markRaw as I, effectScope as Oe, isRef as $, isReactive as X, toRef as M, toRaw as Pe, nextTick as oe, computed as K, getCurrentScope as Ce, onScopeDispose as we, watch as Se, toRefs as re, defineComponent as Ve, watchEffect as Ie, createElementBlock as se, openBlock as Z, Fragment as ie, renderSlot as Le, createCommentVNode as $e, renderList as je, createBlock as ze, resolveDynamicComponent as Re, mergeProps as ke, createElementVNode as Fe } from "vue";
|
|
2
|
+
let k = null;
|
|
3
|
+
function Xe(e) {
|
|
4
|
+
if (k !== null) {
|
|
5
5
|
console.warn(
|
|
6
6
|
"[LinID CoreLib] Module Federation has already been initialized. Re-initialization is ignored."
|
|
7
7
|
);
|
|
8
8
|
return;
|
|
9
9
|
}
|
|
10
|
-
|
|
10
|
+
k = e;
|
|
11
11
|
}
|
|
12
|
-
function
|
|
13
|
-
if (
|
|
12
|
+
function Ue() {
|
|
13
|
+
if (k === null)
|
|
14
14
|
throw new Error(
|
|
15
15
|
"[LinID CoreLib] Module Federation is not initialized. Call setModuleFederation() first."
|
|
16
16
|
);
|
|
17
|
-
return
|
|
17
|
+
return k;
|
|
18
18
|
}
|
|
19
|
-
const
|
|
20
|
-
() =>
|
|
19
|
+
const xe = (e) => be(
|
|
20
|
+
() => Ue().loadRemote(e).then((o) => {
|
|
21
21
|
if (!o?.default)
|
|
22
22
|
throw new Error(`Failed to load component from ${e}`);
|
|
23
23
|
return o.default;
|
|
24
24
|
})
|
|
25
25
|
);
|
|
26
|
-
const
|
|
27
|
-
let
|
|
28
|
-
const F = (e) =>
|
|
26
|
+
const w = typeof window < "u";
|
|
27
|
+
let N;
|
|
28
|
+
const F = (e) => N = e;
|
|
29
29
|
process.env.NODE_ENV;
|
|
30
|
-
const
|
|
30
|
+
const Q = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
|
|
31
31
|
/* istanbul ignore next */
|
|
32
32
|
Symbol()
|
|
33
33
|
);
|
|
34
34
|
function D(e) {
|
|
35
35
|
return e && typeof e == "object" && Object.prototype.toString.call(e) === "[object Object]" && typeof e.toJSON != "function";
|
|
36
36
|
}
|
|
37
|
-
var
|
|
37
|
+
var L;
|
|
38
38
|
(function(e) {
|
|
39
39
|
e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
|
|
40
|
-
})(
|
|
41
|
-
function
|
|
40
|
+
})(L || (L = {}));
|
|
41
|
+
function de(e, o) {
|
|
42
42
|
for (const n in o) {
|
|
43
43
|
const t = o[n];
|
|
44
44
|
if (!(n in e))
|
|
45
45
|
continue;
|
|
46
46
|
const i = e[n];
|
|
47
|
-
D(i) && D(t) &&
|
|
47
|
+
D(i) && D(t) && !$(t) && !X(t) ? e[n] = de(i, t) : e[n] = t;
|
|
48
48
|
}
|
|
49
49
|
return e;
|
|
50
50
|
}
|
|
51
|
-
const
|
|
51
|
+
const pe = () => {
|
|
52
52
|
};
|
|
53
|
-
function
|
|
53
|
+
function ce(e, o, n, t = pe) {
|
|
54
54
|
e.add(o);
|
|
55
55
|
const i = () => {
|
|
56
56
|
e.delete(o) && t();
|
|
57
57
|
};
|
|
58
|
-
return !n &&
|
|
58
|
+
return !n && Ce() && we(i), i;
|
|
59
59
|
}
|
|
60
|
-
function
|
|
60
|
+
function C(e, ...o) {
|
|
61
61
|
e.forEach((n) => {
|
|
62
62
|
n(...o);
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
-
const
|
|
66
|
-
function
|
|
65
|
+
const Ae = (e) => e(), ae = Symbol(), W = Symbol();
|
|
66
|
+
function Y(e, o) {
|
|
67
67
|
e instanceof Map && o instanceof Map ? o.forEach((n, t) => e.set(t, n)) : e instanceof Set && o instanceof Set && o.forEach(e.add, e);
|
|
68
68
|
for (const n in o) {
|
|
69
69
|
if (!o.hasOwnProperty(n))
|
|
70
70
|
continue;
|
|
71
71
|
const t = o[n], i = e[n];
|
|
72
|
-
D(i) && D(t) && e.hasOwnProperty(n) &&
|
|
72
|
+
D(i) && D(t) && e.hasOwnProperty(n) && !$(t) && !X(t) ? e[n] = Y(i, t) : e[n] = t;
|
|
73
73
|
}
|
|
74
74
|
return e;
|
|
75
75
|
}
|
|
76
|
-
const
|
|
76
|
+
const He = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
|
|
77
77
|
/* istanbul ignore next */
|
|
78
78
|
Symbol()
|
|
79
79
|
);
|
|
80
|
-
function
|
|
81
|
-
return !D(e) || !Object.prototype.hasOwnProperty.call(e,
|
|
80
|
+
function Te(e) {
|
|
81
|
+
return !D(e) || !Object.prototype.hasOwnProperty.call(e, He);
|
|
82
82
|
}
|
|
83
83
|
const { assign: v } = Object;
|
|
84
|
-
function
|
|
85
|
-
return !!(
|
|
84
|
+
function ue(e) {
|
|
85
|
+
return !!($(e) && e.effect);
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function le(e, o, n, t) {
|
|
88
88
|
const { state: i, actions: f, getters: a } = o, d = n.state.value[e];
|
|
89
89
|
let _;
|
|
90
90
|
function p() {
|
|
91
91
|
!d && (process.env.NODE_ENV === "production" || !t) && (n.state.value[e] = i ? i() : {});
|
|
92
92
|
const l = process.env.NODE_ENV !== "production" && t ? (
|
|
93
93
|
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
|
94
|
-
|
|
95
|
-
) :
|
|
96
|
-
return v(l, f, Object.keys(a || {}).reduce((h, m) => (process.env.NODE_ENV !== "production" && m in l && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${m}" in store "${e}".`), h[m] = I(
|
|
94
|
+
re(R(i ? i() : {}).value)
|
|
95
|
+
) : re(n.state.value[e]);
|
|
96
|
+
return v(l, f, Object.keys(a || {}).reduce((h, m) => (process.env.NODE_ENV !== "production" && m in l && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${m}" in store "${e}".`), h[m] = I(K(() => {
|
|
97
97
|
F(n);
|
|
98
98
|
const y = n._s.get(e);
|
|
99
99
|
return a[m].call(y, y);
|
|
100
100
|
})), h), {}));
|
|
101
101
|
}
|
|
102
|
-
return _ =
|
|
102
|
+
return _ = G(e, p, o, n, t, !0), _;
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function G(e, o, n = {}, t, i, f) {
|
|
105
105
|
let a;
|
|
106
106
|
const d = v({ actions: {} }, n);
|
|
107
107
|
if (process.env.NODE_ENV !== "production" && !t._e.active)
|
|
@@ -113,26 +113,26 @@ function Y(e, o, n = {}, t, i, f) {
|
|
|
113
113
|
let p, l, h = /* @__PURE__ */ new Set(), m = /* @__PURE__ */ new Set(), y;
|
|
114
114
|
const P = t.state.value[e];
|
|
115
115
|
!f && !P && (process.env.NODE_ENV === "production" || !i) && (t.state.value[e] = {});
|
|
116
|
-
const
|
|
117
|
-
let
|
|
118
|
-
function
|
|
116
|
+
const H = R({});
|
|
117
|
+
let ee;
|
|
118
|
+
function te(s) {
|
|
119
119
|
let r;
|
|
120
120
|
p = l = !1, process.env.NODE_ENV !== "production" && (y = []), typeof s == "function" ? (s(t.state.value[e]), r = {
|
|
121
|
-
type:
|
|
121
|
+
type: L.patchFunction,
|
|
122
122
|
storeId: e,
|
|
123
123
|
events: y
|
|
124
|
-
}) : (
|
|
125
|
-
type:
|
|
124
|
+
}) : (Y(t.state.value[e], s), r = {
|
|
125
|
+
type: L.patchObject,
|
|
126
126
|
payload: s,
|
|
127
127
|
storeId: e,
|
|
128
128
|
events: y
|
|
129
129
|
});
|
|
130
|
-
const u =
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}), l = !0,
|
|
130
|
+
const u = ee = Symbol();
|
|
131
|
+
oe().then(() => {
|
|
132
|
+
ee === u && (p = !0);
|
|
133
|
+
}), l = !0, C(h, r, t.state.value[e]);
|
|
134
134
|
}
|
|
135
|
-
const
|
|
135
|
+
const ve = f ? function() {
|
|
136
136
|
const { state: r } = n, u = r ? r() : {};
|
|
137
137
|
this.$patch((E) => {
|
|
138
138
|
v(E, u);
|
|
@@ -141,93 +141,93 @@ function Y(e, o, n = {}, t, i, f) {
|
|
|
141
141
|
/* istanbul ignore next */
|
|
142
142
|
process.env.NODE_ENV !== "production" ? () => {
|
|
143
143
|
throw new Error(`🍍: Store "${e}" is built using the setup syntax and does not implement $reset().`);
|
|
144
|
-
} :
|
|
144
|
+
} : pe
|
|
145
145
|
);
|
|
146
|
-
function
|
|
146
|
+
function me() {
|
|
147
147
|
a.stop(), h.clear(), m.clear(), t._s.delete(e);
|
|
148
148
|
}
|
|
149
|
-
const
|
|
150
|
-
if (
|
|
151
|
-
return s[
|
|
149
|
+
const T = (s, r = "") => {
|
|
150
|
+
if (ae in s)
|
|
151
|
+
return s[W] = r, s;
|
|
152
152
|
const u = function() {
|
|
153
153
|
F(t);
|
|
154
|
-
const E = Array.from(arguments),
|
|
155
|
-
function
|
|
156
|
-
|
|
154
|
+
const E = Array.from(arguments), S = /* @__PURE__ */ new Set(), B = /* @__PURE__ */ new Set();
|
|
155
|
+
function ye(g) {
|
|
156
|
+
S.add(g);
|
|
157
157
|
}
|
|
158
|
-
function
|
|
159
|
-
|
|
158
|
+
function _e(g) {
|
|
159
|
+
B.add(g);
|
|
160
160
|
}
|
|
161
|
-
|
|
161
|
+
C(m, {
|
|
162
162
|
args: E,
|
|
163
|
-
name: u[
|
|
163
|
+
name: u[W],
|
|
164
164
|
store: c,
|
|
165
|
-
after:
|
|
166
|
-
onError:
|
|
165
|
+
after: ye,
|
|
166
|
+
onError: _e
|
|
167
167
|
});
|
|
168
|
-
let
|
|
168
|
+
let V;
|
|
169
169
|
try {
|
|
170
|
-
|
|
170
|
+
V = s.apply(this && this.$id === e ? this : c, E);
|
|
171
171
|
} catch (g) {
|
|
172
|
-
throw
|
|
172
|
+
throw C(B, g), g;
|
|
173
173
|
}
|
|
174
|
-
return
|
|
174
|
+
return V instanceof Promise ? V.then((g) => (C(S, g), g)).catch((g) => (C(B, g), Promise.reject(g))) : (C(S, V), V);
|
|
175
175
|
};
|
|
176
|
-
return u[
|
|
177
|
-
},
|
|
176
|
+
return u[ae] = !0, u[W] = r, u;
|
|
177
|
+
}, z = /* @__PURE__ */ I({
|
|
178
178
|
actions: {},
|
|
179
179
|
getters: {},
|
|
180
180
|
state: [],
|
|
181
|
-
hotState:
|
|
182
|
-
}),
|
|
181
|
+
hotState: H
|
|
182
|
+
}), ne = {
|
|
183
183
|
_p: t,
|
|
184
184
|
// _s: scope,
|
|
185
185
|
$id: e,
|
|
186
|
-
$onAction:
|
|
187
|
-
$patch:
|
|
188
|
-
$reset:
|
|
186
|
+
$onAction: ce.bind(null, m),
|
|
187
|
+
$patch: te,
|
|
188
|
+
$reset: ve,
|
|
189
189
|
$subscribe(s, r = {}) {
|
|
190
|
-
const u =
|
|
190
|
+
const u = ce(h, s, r.detached, () => E()), E = a.run(() => Se(() => t.state.value[e], (S) => {
|
|
191
191
|
(r.flush === "sync" ? l : p) && s({
|
|
192
192
|
storeId: e,
|
|
193
|
-
type:
|
|
193
|
+
type: L.direct,
|
|
194
194
|
events: y
|
|
195
|
-
},
|
|
195
|
+
}, S);
|
|
196
196
|
}, v({}, _, r)));
|
|
197
197
|
return u;
|
|
198
198
|
},
|
|
199
|
-
$dispose:
|
|
200
|
-
}, c =
|
|
199
|
+
$dispose: me
|
|
200
|
+
}, c = De(process.env.NODE_ENV !== "production" || process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && w ? v(
|
|
201
201
|
{
|
|
202
|
-
_hmrPayload:
|
|
202
|
+
_hmrPayload: z,
|
|
203
203
|
_customProperties: I(/* @__PURE__ */ new Set())
|
|
204
204
|
// devtools custom properties
|
|
205
205
|
},
|
|
206
|
-
|
|
206
|
+
ne
|
|
207
207
|
// must be added later
|
|
208
208
|
// setupStore
|
|
209
|
-
) :
|
|
209
|
+
) : ne);
|
|
210
210
|
t._s.set(e, c);
|
|
211
|
-
const
|
|
212
|
-
for (const s in
|
|
213
|
-
const r =
|
|
214
|
-
if (
|
|
215
|
-
process.env.NODE_ENV !== "production" && i ?
|
|
211
|
+
const b = (t._a && t._a.runWithContext || Ae)(() => t._e.run(() => (a = Oe()).run(() => o({ action: T }))));
|
|
212
|
+
for (const s in b) {
|
|
213
|
+
const r = b[s];
|
|
214
|
+
if ($(r) && !ue(r) || X(r))
|
|
215
|
+
process.env.NODE_ENV !== "production" && i ? H.value[s] = M(b, s) : f || (P && Te(r) && ($(r) ? r.value = P[s] : Y(r, P[s])), t.state.value[e][s] = r), process.env.NODE_ENV !== "production" && z.state.push(s);
|
|
216
216
|
else if (typeof r == "function") {
|
|
217
|
-
const u = process.env.NODE_ENV !== "production" && i ? r :
|
|
218
|
-
|
|
219
|
-
} else process.env.NODE_ENV !== "production" &&
|
|
217
|
+
const u = process.env.NODE_ENV !== "production" && i ? r : T(r, s);
|
|
218
|
+
b[s] = u, process.env.NODE_ENV !== "production" && (z.actions[s] = r), d.actions[s] = r;
|
|
219
|
+
} else process.env.NODE_ENV !== "production" && ue(r) && (z.getters[s] = f ? (
|
|
220
220
|
// @ts-expect-error
|
|
221
221
|
n.getters[s]
|
|
222
|
-
) : r,
|
|
223
|
-
(
|
|
222
|
+
) : r, w && (b._getters || // @ts-expect-error: same
|
|
223
|
+
(b._getters = I([]))).push(s));
|
|
224
224
|
}
|
|
225
|
-
if (v(c,
|
|
226
|
-
get: () => process.env.NODE_ENV !== "production" && i ?
|
|
225
|
+
if (v(c, b), v(Pe(c), b), Object.defineProperty(c, "$state", {
|
|
226
|
+
get: () => process.env.NODE_ENV !== "production" && i ? H.value : t.state.value[e],
|
|
227
227
|
set: (s) => {
|
|
228
228
|
if (process.env.NODE_ENV !== "production" && i)
|
|
229
229
|
throw new Error("cannot set hotState");
|
|
230
|
-
|
|
230
|
+
te((r) => {
|
|
231
231
|
v(r, s);
|
|
232
232
|
});
|
|
233
233
|
}
|
|
@@ -235,23 +235,23 @@ function Y(e, o, n = {}, t, i, f) {
|
|
|
235
235
|
c._hotUpdating = !0, s._hmrPayload.state.forEach((r) => {
|
|
236
236
|
if (r in c.$state) {
|
|
237
237
|
const u = s.$state[r], E = c.$state[r];
|
|
238
|
-
typeof u == "object" && D(u) && D(E) ?
|
|
238
|
+
typeof u == "object" && D(u) && D(E) ? de(u, E) : s.$state[r] = E;
|
|
239
239
|
}
|
|
240
|
-
c[r] =
|
|
240
|
+
c[r] = M(s.$state, r);
|
|
241
241
|
}), Object.keys(c.$state).forEach((r) => {
|
|
242
242
|
r in s.$state || delete c[r];
|
|
243
|
-
}), p = !1, l = !1, t.state.value[e] =
|
|
243
|
+
}), p = !1, l = !1, t.state.value[e] = M(s._hmrPayload, "hotState"), l = !0, oe().then(() => {
|
|
244
244
|
p = !0;
|
|
245
245
|
});
|
|
246
246
|
for (const r in s._hmrPayload.actions) {
|
|
247
247
|
const u = s[r];
|
|
248
248
|
c[r] = //
|
|
249
|
-
|
|
249
|
+
T(u, r);
|
|
250
250
|
}
|
|
251
251
|
for (const r in s._hmrPayload.getters) {
|
|
252
252
|
const u = s._hmrPayload.getters[r], E = f ? (
|
|
253
253
|
// special handling of options api
|
|
254
|
-
|
|
254
|
+
K(() => (F(t), u.call(c, c)))
|
|
255
255
|
) : u;
|
|
256
256
|
c[r] = //
|
|
257
257
|
E;
|
|
@@ -261,7 +261,7 @@ function Y(e, o, n = {}, t, i, f) {
|
|
|
261
261
|
}), Object.keys(c._hmrPayload.actions).forEach((r) => {
|
|
262
262
|
r in s._hmrPayload.actions || delete c[r];
|
|
263
263
|
}), c._hmrPayload = s._hmrPayload, c._getters = s._getters, c._hotUpdating = !1;
|
|
264
|
-
})), process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" &&
|
|
264
|
+
})), process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && w) {
|
|
265
265
|
const s = {
|
|
266
266
|
writable: !0,
|
|
267
267
|
configurable: !0,
|
|
@@ -273,7 +273,7 @@ function Y(e, o, n = {}, t, i, f) {
|
|
|
273
273
|
});
|
|
274
274
|
}
|
|
275
275
|
return t._p.forEach((s) => {
|
|
276
|
-
if (process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" &&
|
|
276
|
+
if (process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && w) {
|
|
277
277
|
const r = a.run(() => s({
|
|
278
278
|
store: c,
|
|
279
279
|
app: t._a,
|
|
@@ -293,26 +293,26 @@ function Y(e, o, n = {}, t, i, f) {
|
|
|
293
293
|
Found in store "${c.$id}".`), P && f && n.hydrate && n.hydrate(c.$state, P), p = !0, l = !0, c;
|
|
294
294
|
}
|
|
295
295
|
// @__NO_SIDE_EFFECTS__
|
|
296
|
-
function
|
|
296
|
+
function he(e, o, n) {
|
|
297
297
|
let t;
|
|
298
298
|
const i = typeof o == "function";
|
|
299
299
|
t = i ? n : o;
|
|
300
300
|
function f(a, d) {
|
|
301
|
-
const _ =
|
|
301
|
+
const _ = q();
|
|
302
302
|
if (a = // in test mode, ignore the argument provided as we can always retrieve a
|
|
303
303
|
// pinia instance with getActivePinia()
|
|
304
|
-
(process.env.NODE_ENV === "test" &&
|
|
304
|
+
(process.env.NODE_ENV === "test" && N && N._testing ? null : a) || (_ ? J(Q, null) : null), a && F(a), process.env.NODE_ENV !== "production" && !N)
|
|
305
305
|
throw new Error(`[🍍]: "getActivePinia()" was called but there was no active Pinia. Are you trying to use a store before calling "app.use(pinia)"?
|
|
306
306
|
See https://pinia.vuejs.org/core-concepts/outside-component-usage.html for help.
|
|
307
307
|
This will fail in production.`);
|
|
308
|
-
a =
|
|
308
|
+
a = N, a._s.has(e) || (i ? G(e, o, t, a) : le(e, t, a), process.env.NODE_ENV !== "production" && (f._pinia = a));
|
|
309
309
|
const p = a._s.get(e);
|
|
310
310
|
if (process.env.NODE_ENV !== "production" && d) {
|
|
311
|
-
const l = "__hot:" + e, h = i ?
|
|
311
|
+
const l = "__hot:" + e, h = i ? G(l, o, t, a, !0) : le(l, v({}, t), a, !0);
|
|
312
312
|
d._hotUpdate(h), delete a.state.value[l], a._s.delete(l);
|
|
313
313
|
}
|
|
314
|
-
if (process.env.NODE_ENV !== "production" &&
|
|
315
|
-
const l =
|
|
314
|
+
if (process.env.NODE_ENV !== "production" && w) {
|
|
315
|
+
const l = Ne();
|
|
316
316
|
if (l && l.proxy && // avoid adding stores that are just built for hot module replacement
|
|
317
317
|
!d) {
|
|
318
318
|
const h = l.proxy, m = "_pStores" in h ? h._pStores : h._pStores = {};
|
|
@@ -323,7 +323,24 @@ This will fail in production.`);
|
|
|
323
323
|
}
|
|
324
324
|
return f.$id = e, f;
|
|
325
325
|
}
|
|
326
|
-
|
|
326
|
+
let U = null;
|
|
327
|
+
function Ke(e) {
|
|
328
|
+
if (U !== null) {
|
|
329
|
+
console.warn(
|
|
330
|
+
"[LinID CoreLib] Pinia store has already been initialized. Re-initialization is ignored."
|
|
331
|
+
);
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
U = e;
|
|
335
|
+
}
|
|
336
|
+
function Ee() {
|
|
337
|
+
if (U === null)
|
|
338
|
+
throw new Error(
|
|
339
|
+
"[LinID CoreLib] Pinia store is not initialized. Call setPiniaStore() first."
|
|
340
|
+
);
|
|
341
|
+
return U;
|
|
342
|
+
}
|
|
343
|
+
const Be = () => Me(Ee()), Me = /* @__PURE__ */ he("linidZoneStore", {
|
|
327
344
|
state: () => ({
|
|
328
345
|
zones: {}
|
|
329
346
|
}),
|
|
@@ -337,33 +354,33 @@ const He = /* @__PURE__ */ pe("linidZoneStore", {
|
|
|
337
354
|
this.zones[e] || (this.zones[e] = []), this.zones[e].push(o);
|
|
338
355
|
}
|
|
339
356
|
}
|
|
340
|
-
}),
|
|
357
|
+
}), et = /* @__PURE__ */ Ve({
|
|
341
358
|
__name: "LinidZoneRenderer",
|
|
342
359
|
props: {
|
|
343
360
|
zone: {}
|
|
344
361
|
},
|
|
345
362
|
setup(e) {
|
|
346
|
-
const o = e, n =
|
|
347
|
-
return
|
|
363
|
+
const o = e, n = Be(), t = R([]), i = R(!1);
|
|
364
|
+
return Ie(() => {
|
|
348
365
|
i.value = !1;
|
|
349
366
|
const f = n.zones[o.zone] || [];
|
|
350
367
|
t.value = f.map((a) => ({
|
|
351
368
|
...a,
|
|
352
|
-
component:
|
|
369
|
+
component: xe(a.plugin)
|
|
353
370
|
})), Promise.resolve().then(() => {
|
|
354
371
|
i.value = !0;
|
|
355
372
|
});
|
|
356
|
-
}), (f, a) => (
|
|
357
|
-
(
|
|
373
|
+
}), (f, a) => (Z(), se(ie, null, [
|
|
374
|
+
(Z(!0), se(ie, null, je(t.value, (d, _) => (Z(), ze(Re(d.component), ke({
|
|
358
375
|
key: d.plugin + _
|
|
359
376
|
}, { ref_for: !0 }, d.props), null, 16))), 128)),
|
|
360
|
-
i.value && t.value.length === 0 ?
|
|
361
|
-
a[0] || (a[0] =
|
|
362
|
-
]) :
|
|
377
|
+
i.value && t.value.length === 0 ? Le(f.$slots, "default", { key: 0 }, () => [
|
|
378
|
+
a[0] || (a[0] = Fe("div", null, "No components to render in this zone.", -1))
|
|
379
|
+
]) : $e("", !0)
|
|
363
380
|
], 64));
|
|
364
381
|
}
|
|
365
382
|
});
|
|
366
|
-
function
|
|
383
|
+
function tt() {
|
|
367
384
|
function e(n) {
|
|
368
385
|
return {
|
|
369
386
|
page: (n.page || 1) - 1,
|
|
@@ -384,34 +401,34 @@ function Ye() {
|
|
|
384
401
|
toQuasarPagination: o
|
|
385
402
|
};
|
|
386
403
|
}
|
|
387
|
-
let
|
|
388
|
-
function
|
|
389
|
-
if (
|
|
404
|
+
let x = null;
|
|
405
|
+
function nt(e) {
|
|
406
|
+
if (x !== null) {
|
|
390
407
|
console.warn(
|
|
391
408
|
"[LinID CoreLib] UI Design has already been initialized. Re-initialization is ignored."
|
|
392
409
|
);
|
|
393
410
|
return;
|
|
394
411
|
}
|
|
395
|
-
|
|
412
|
+
x = e;
|
|
396
413
|
}
|
|
397
|
-
function
|
|
398
|
-
if (
|
|
414
|
+
function Ze() {
|
|
415
|
+
if (x === null)
|
|
399
416
|
throw new Error(
|
|
400
417
|
"[LinID CoreLib] UI Design is not initialized. Call setUiDesign() first."
|
|
401
418
|
);
|
|
402
|
-
return
|
|
419
|
+
return x;
|
|
403
420
|
}
|
|
404
|
-
function
|
|
421
|
+
function fe(e, o) {
|
|
405
422
|
return o.split(".").reduce((n, t) => {
|
|
406
423
|
if (n && typeof n == "object")
|
|
407
424
|
return n[t];
|
|
408
425
|
}, e);
|
|
409
426
|
}
|
|
410
|
-
function
|
|
411
|
-
const e =
|
|
427
|
+
function ot() {
|
|
428
|
+
const e = K(() => Ze());
|
|
412
429
|
function o(n, t) {
|
|
413
|
-
let i =
|
|
414
|
-
if (i === void 0 && (i =
|
|
430
|
+
let i = fe(e.value, `${n}.${t}`);
|
|
431
|
+
if (i === void 0 && (i = fe(e.value, `default.${t}`)), i === void 0)
|
|
415
432
|
throw new Error(
|
|
416
433
|
`[UiDesign] Value not found for '${n}.${t}' and no default fallback.`
|
|
417
434
|
);
|
|
@@ -423,112 +440,109 @@ function Xe() {
|
|
|
423
440
|
}
|
|
424
441
|
return { ui: o };
|
|
425
442
|
}
|
|
426
|
-
let
|
|
427
|
-
function
|
|
428
|
-
if (
|
|
443
|
+
let A = null;
|
|
444
|
+
function rt(e) {
|
|
445
|
+
if (A !== null) {
|
|
429
446
|
console.warn(
|
|
430
447
|
"[LinID CoreLib] HTTP client has already been initialized. Re-initialization is ignored."
|
|
431
448
|
);
|
|
432
449
|
return;
|
|
433
450
|
}
|
|
434
|
-
|
|
451
|
+
A = e;
|
|
435
452
|
}
|
|
436
453
|
function O() {
|
|
437
|
-
if (
|
|
454
|
+
if (A === null)
|
|
438
455
|
throw new Error(
|
|
439
456
|
"[LinID CoreLib] HTTP client is not initialized. Call setHttpClient() first."
|
|
440
457
|
);
|
|
441
|
-
return
|
|
458
|
+
return A;
|
|
442
459
|
}
|
|
443
|
-
async function
|
|
460
|
+
async function We() {
|
|
444
461
|
return (await O().get("/metadata/entities")).data;
|
|
445
462
|
}
|
|
446
|
-
async function
|
|
463
|
+
async function qe() {
|
|
447
464
|
return (await O().get(
|
|
448
465
|
"/metadata/routes"
|
|
449
466
|
)).data;
|
|
450
467
|
}
|
|
451
|
-
const
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
} finally {
|
|
491
|
-
this.loading = !1;
|
|
492
|
-
}
|
|
468
|
+
const st = () => Je(Ee()), Je = /* @__PURE__ */ he("LinidConfigurationStore", {
|
|
469
|
+
state: () => ({
|
|
470
|
+
entities: [],
|
|
471
|
+
apiEndpoints: [],
|
|
472
|
+
loading: !1,
|
|
473
|
+
error: null
|
|
474
|
+
}),
|
|
475
|
+
getters: {
|
|
476
|
+
/**
|
|
477
|
+
* Returns an entity configuration by name.
|
|
478
|
+
* @param state - The store state.
|
|
479
|
+
* @returns A function that takes an entity name and returns the configuration.
|
|
480
|
+
*/
|
|
481
|
+
getEntityByName: (e) => (o) => e.entities.find((n) => n.name === o),
|
|
482
|
+
/**
|
|
483
|
+
* Returns all api endpoints for a specific entity.
|
|
484
|
+
* @param state - The store state.
|
|
485
|
+
* @returns A function that takes an entity name and returns its api endpoints.
|
|
486
|
+
*/
|
|
487
|
+
getApiEndpointsByEntity: (e) => (o) => e.apiEndpoints.filter(
|
|
488
|
+
(n) => n.entity === o
|
|
489
|
+
)
|
|
490
|
+
},
|
|
491
|
+
actions: {
|
|
492
|
+
/**
|
|
493
|
+
* Fetches all entity and api endpoint configurations from the backend.
|
|
494
|
+
*/
|
|
495
|
+
async fetchConfiguration() {
|
|
496
|
+
this.loading = !0, this.error = null;
|
|
497
|
+
try {
|
|
498
|
+
const [e, o] = await Promise.all([
|
|
499
|
+
We(),
|
|
500
|
+
qe()
|
|
501
|
+
]);
|
|
502
|
+
this.entities = e, this.apiEndpoints = o;
|
|
503
|
+
} catch (e) {
|
|
504
|
+
this.error = e instanceof Error ? e.message : "Failed to fetch configuration", console.error("[Linid CoreLib] Failed to fetch configuration:", e);
|
|
505
|
+
} finally {
|
|
506
|
+
this.loading = !1;
|
|
493
507
|
}
|
|
494
508
|
}
|
|
495
509
|
}
|
|
496
|
-
),
|
|
497
|
-
function
|
|
498
|
-
|
|
510
|
+
}), ge = /* @__PURE__ */ new Map();
|
|
511
|
+
function it(e) {
|
|
512
|
+
ge.set(e.instanceId, e);
|
|
499
513
|
}
|
|
500
|
-
function
|
|
501
|
-
const o =
|
|
514
|
+
function j(e) {
|
|
515
|
+
const o = ge.get(e);
|
|
502
516
|
if (!o)
|
|
503
517
|
throw new Error(
|
|
504
518
|
`[LinID CoreLib] No module host configuration found for instanceId: ${e}`
|
|
505
519
|
);
|
|
506
520
|
return o;
|
|
507
521
|
}
|
|
508
|
-
async function
|
|
509
|
-
const n =
|
|
522
|
+
async function ct(e, o) {
|
|
523
|
+
const n = j(e);
|
|
510
524
|
return O().post(`/${n.apiEndpoint}`, o).then(({ data: t }) => t);
|
|
511
525
|
}
|
|
512
|
-
async function
|
|
513
|
-
const t =
|
|
526
|
+
async function at(e, o, n) {
|
|
527
|
+
const t = j(e);
|
|
514
528
|
return O().put(`/${t.apiEndpoint}/${o}`, n).then(({ data: i }) => i);
|
|
515
529
|
}
|
|
516
|
-
async function
|
|
517
|
-
const t =
|
|
530
|
+
async function ut(e, o, n) {
|
|
531
|
+
const t = j(e);
|
|
518
532
|
return O().get(`/${t.apiEndpoint}`, {
|
|
519
533
|
params: { ...o, ...n }
|
|
520
534
|
}).then(({ data: i }) => i);
|
|
521
535
|
}
|
|
522
|
-
async function
|
|
523
|
-
const n =
|
|
536
|
+
async function lt(e, o) {
|
|
537
|
+
const n = j(e);
|
|
524
538
|
return O().get(`/${n.apiEndpoint}/${o}`).then(({ data: t }) => t);
|
|
525
539
|
}
|
|
526
|
-
async function
|
|
527
|
-
const n =
|
|
540
|
+
async function ft(e, o) {
|
|
541
|
+
const n = j(e);
|
|
528
542
|
return O().delete(`/${n.apiEndpoint}/${o}`);
|
|
529
543
|
}
|
|
530
|
-
var
|
|
531
|
-
class
|
|
544
|
+
var Qe = /* @__PURE__ */ ((e) => (e.SETUP = "setup", e.CONFIGURE = "configure", e.INITIALIZE = "initialize", e.READY = "ready", e.POST_INIT = "postInit", e))(Qe || {});
|
|
545
|
+
class dt {
|
|
532
546
|
/**
|
|
533
547
|
* Unique identifier for the module.
|
|
534
548
|
*
|
|
@@ -625,25 +639,27 @@ class ct {
|
|
|
625
639
|
}
|
|
626
640
|
}
|
|
627
641
|
export {
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
642
|
+
dt as BasicRemoteModule,
|
|
643
|
+
et as LinidZoneRenderer,
|
|
644
|
+
Qe as ModuleLifecyclePhase,
|
|
645
|
+
ft as deleteEntityById,
|
|
646
|
+
ut as getEntities,
|
|
647
|
+
lt as getEntityById,
|
|
634
648
|
O as getHttpClient,
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
+
Ue as getModuleFederation,
|
|
650
|
+
j as getModuleHostConfiguration,
|
|
651
|
+
Ee as getPiniaStore,
|
|
652
|
+
Ze as getUiDesign,
|
|
653
|
+
xe as loadAsyncComponent,
|
|
654
|
+
it as registerModuleHostConfiguration,
|
|
655
|
+
ct as saveEntity,
|
|
656
|
+
rt as setHttpClient,
|
|
657
|
+
Xe as setModuleFederation,
|
|
658
|
+
Ke as setPiniaStore,
|
|
659
|
+
nt as setUiDesign,
|
|
660
|
+
at as updateEntity,
|
|
661
|
+
st as useLinidConfigurationStore,
|
|
662
|
+
Be as useLinidZoneStore,
|
|
663
|
+
tt as usePagination,
|
|
664
|
+
ot as useUiDesign
|
|
649
665
|
};
|