@linagora/linid-im-front-corelib 0.0.13 → 0.0.15
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 +291 -241
- 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 +2 -0
- package/dist/types/src/services/objectService.d.ts +49 -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,258 +1,258 @@
|
|
|
1
|
-
import { defineAsyncComponent as
|
|
2
|
-
let
|
|
3
|
-
function
|
|
4
|
-
if (
|
|
1
|
+
import { defineAsyncComponent as Ne, hasInjectionContext as J, inject as Q, getCurrentInstance as De, ref as R, reactive as Oe, markRaw as I, effectScope as Pe, isRef as L, isReactive as K, toRef as Z, toRaw as we, nextTick as re, computed as ee, getCurrentScope as Ce, onScopeDispose as Se, watch as Ve, toRefs as se, defineComponent as Ie, watchEffect as je, createElementBlock as ie, openBlock as W, Fragment as ce, renderSlot as Le, createCommentVNode as $e, renderList as ze, createBlock as Re, resolveDynamicComponent as ke, mergeProps as Fe, createElementVNode as Ae } from "vue";
|
|
2
|
+
let k = null;
|
|
3
|
+
function tt(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) => Ne(
|
|
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
26
|
const C = typeof window < "u";
|
|
27
|
-
let
|
|
28
|
-
const F = (e) =>
|
|
27
|
+
let N;
|
|
28
|
+
const F = (e) => N = e;
|
|
29
29
|
process.env.NODE_ENV;
|
|
30
|
-
const
|
|
30
|
+
const Y = 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 j;
|
|
38
38
|
(function(e) {
|
|
39
39
|
e.direct = "direct", e.patchObject = "patch object", e.patchFunction = "patch function";
|
|
40
|
-
})(
|
|
41
|
-
function
|
|
40
|
+
})(j || (j = {}));
|
|
41
|
+
function pe(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) && !L(t) && !K(t) ? e[n] = pe(i, t) : e[n] = t;
|
|
48
48
|
}
|
|
49
49
|
return e;
|
|
50
50
|
}
|
|
51
|
-
const
|
|
51
|
+
const he = () => {
|
|
52
52
|
};
|
|
53
|
-
function
|
|
53
|
+
function ae(e, o, n, t = he) {
|
|
54
54
|
e.add(o);
|
|
55
55
|
const i = () => {
|
|
56
56
|
e.delete(o) && t();
|
|
57
57
|
};
|
|
58
|
-
return !n &&
|
|
58
|
+
return !n && Ce() && Se(i), i;
|
|
59
59
|
}
|
|
60
60
|
function w(e, ...o) {
|
|
61
61
|
e.forEach((n) => {
|
|
62
62
|
n(...o);
|
|
63
63
|
});
|
|
64
64
|
}
|
|
65
|
-
const
|
|
66
|
-
function
|
|
65
|
+
const He = (e) => e(), ue = Symbol(), q = Symbol();
|
|
66
|
+
function G(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) && !L(t) && !K(t) ? e[n] = G(i, t) : e[n] = t;
|
|
73
73
|
}
|
|
74
74
|
return e;
|
|
75
75
|
}
|
|
76
|
-
const
|
|
76
|
+
const Te = 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 Be(e) {
|
|
81
|
+
return !D(e) || !Object.prototype.hasOwnProperty.call(e, Te);
|
|
82
82
|
}
|
|
83
|
-
const { assign:
|
|
84
|
-
function
|
|
85
|
-
return !!(
|
|
83
|
+
const { assign: m } = Object;
|
|
84
|
+
function le(e) {
|
|
85
|
+
return !!(L(e) && e.effect);
|
|
86
86
|
}
|
|
87
|
-
function
|
|
88
|
-
const { state: i, actions:
|
|
89
|
-
let
|
|
87
|
+
function fe(e, o, n, t) {
|
|
88
|
+
const { state: i, actions: u, getters: a } = o, d = n.state.value[e];
|
|
89
|
+
let v;
|
|
90
90
|
function p() {
|
|
91
91
|
!d && (process.env.NODE_ENV === "production" || !t) && (n.state.value[e] = i ? i() : {});
|
|
92
|
-
const
|
|
92
|
+
const f = 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
|
|
94
|
+
se(R(i ? i() : {}).value)
|
|
95
|
+
) : se(n.state.value[e]);
|
|
96
|
+
return m(f, u, Object.keys(a || {}).reduce((h, y) => (process.env.NODE_ENV !== "production" && y in f && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${y}" in store "${e}".`), h[y] = I(ee(() => {
|
|
97
97
|
F(n);
|
|
98
|
-
const
|
|
99
|
-
return a[
|
|
98
|
+
const _ = n._s.get(e);
|
|
99
|
+
return a[y].call(_, _);
|
|
100
100
|
})), h), {}));
|
|
101
101
|
}
|
|
102
|
-
return
|
|
102
|
+
return v = X(e, p, o, n, t, !0), v;
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function X(e, o, n = {}, t, i, u) {
|
|
105
105
|
let a;
|
|
106
|
-
const d =
|
|
106
|
+
const d = m({ actions: {} }, n);
|
|
107
107
|
if (process.env.NODE_ENV !== "production" && !t._e.active)
|
|
108
108
|
throw new Error("Pinia destroyed");
|
|
109
|
-
const
|
|
110
|
-
process.env.NODE_ENV !== "production" && (
|
|
111
|
-
p ?
|
|
109
|
+
const v = { deep: !0 };
|
|
110
|
+
process.env.NODE_ENV !== "production" && (v.onTrigger = (s) => {
|
|
111
|
+
p ? _ = s : p == !1 && !c._hotUpdating && (Array.isArray(_) ? _.push(s) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
|
|
112
112
|
});
|
|
113
|
-
let p,
|
|
113
|
+
let p, f, h = /* @__PURE__ */ new Set(), y = /* @__PURE__ */ new Set(), _;
|
|
114
114
|
const P = t.state.value[e];
|
|
115
|
-
!
|
|
116
|
-
const
|
|
117
|
-
let
|
|
118
|
-
function
|
|
115
|
+
!u && !P && (process.env.NODE_ENV === "production" || !i) && (t.state.value[e] = {});
|
|
116
|
+
const T = R({});
|
|
117
|
+
let te;
|
|
118
|
+
function ne(s) {
|
|
119
119
|
let r;
|
|
120
|
-
p =
|
|
121
|
-
type:
|
|
120
|
+
p = f = !1, process.env.NODE_ENV !== "production" && (_ = []), typeof s == "function" ? (s(t.state.value[e]), r = {
|
|
121
|
+
type: j.patchFunction,
|
|
122
122
|
storeId: e,
|
|
123
|
-
events:
|
|
124
|
-
}) : (
|
|
125
|
-
type:
|
|
123
|
+
events: _
|
|
124
|
+
}) : (G(t.state.value[e], s), r = {
|
|
125
|
+
type: j.patchObject,
|
|
126
126
|
payload: s,
|
|
127
127
|
storeId: e,
|
|
128
|
-
events:
|
|
128
|
+
events: _
|
|
129
129
|
});
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
}),
|
|
130
|
+
const l = te = Symbol();
|
|
131
|
+
re().then(() => {
|
|
132
|
+
te === l && (p = !0);
|
|
133
|
+
}), f = !0, w(h, r, t.state.value[e]);
|
|
134
134
|
}
|
|
135
|
-
const
|
|
136
|
-
const { state: r } = n,
|
|
135
|
+
const ye = u ? function() {
|
|
136
|
+
const { state: r } = n, l = r ? r() : {};
|
|
137
137
|
this.$patch((E) => {
|
|
138
|
-
|
|
138
|
+
m(E, l);
|
|
139
139
|
});
|
|
140
140
|
} : (
|
|
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
|
+
} : he
|
|
145
145
|
);
|
|
146
|
-
function
|
|
147
|
-
a.stop(), h.clear(),
|
|
146
|
+
function _e() {
|
|
147
|
+
a.stop(), h.clear(), y.clear(), t._s.delete(e);
|
|
148
148
|
}
|
|
149
|
-
const
|
|
150
|
-
if (
|
|
151
|
-
return s[
|
|
152
|
-
const
|
|
149
|
+
const B = (s, r = "") => {
|
|
150
|
+
if (ue in s)
|
|
151
|
+
return s[q] = r, s;
|
|
152
|
+
const l = function() {
|
|
153
153
|
F(t);
|
|
154
|
-
const E = Array.from(arguments),
|
|
154
|
+
const E = Array.from(arguments), S = /* @__PURE__ */ new Set(), M = /* @__PURE__ */ new Set();
|
|
155
155
|
function ve(g) {
|
|
156
|
-
|
|
156
|
+
S.add(g);
|
|
157
157
|
}
|
|
158
|
-
function
|
|
159
|
-
|
|
158
|
+
function be(g) {
|
|
159
|
+
M.add(g);
|
|
160
160
|
}
|
|
161
|
-
w(
|
|
161
|
+
w(y, {
|
|
162
162
|
args: E,
|
|
163
|
-
name:
|
|
163
|
+
name: l[q],
|
|
164
164
|
store: c,
|
|
165
165
|
after: ve,
|
|
166
|
-
onError:
|
|
166
|
+
onError: be
|
|
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 w(
|
|
172
|
+
throw w(M, g), g;
|
|
173
173
|
}
|
|
174
|
-
return
|
|
174
|
+
return V instanceof Promise ? V.then((g) => (w(S, g), g)).catch((g) => (w(M, g), Promise.reject(g))) : (w(S, V), V);
|
|
175
175
|
};
|
|
176
|
-
return
|
|
177
|
-
},
|
|
176
|
+
return l[ue] = !0, l[q] = r, l;
|
|
177
|
+
}, z = /* @__PURE__ */ I({
|
|
178
178
|
actions: {},
|
|
179
179
|
getters: {},
|
|
180
180
|
state: [],
|
|
181
|
-
hotState:
|
|
182
|
-
}),
|
|
181
|
+
hotState: T
|
|
182
|
+
}), oe = {
|
|
183
183
|
_p: t,
|
|
184
184
|
// _s: scope,
|
|
185
185
|
$id: e,
|
|
186
|
-
$onAction:
|
|
187
|
-
$patch:
|
|
188
|
-
$reset:
|
|
186
|
+
$onAction: ae.bind(null, y),
|
|
187
|
+
$patch: ne,
|
|
188
|
+
$reset: ye,
|
|
189
189
|
$subscribe(s, r = {}) {
|
|
190
|
-
const
|
|
191
|
-
(r.flush === "sync" ?
|
|
190
|
+
const l = ae(h, s, r.detached, () => E()), E = a.run(() => Ve(() => t.state.value[e], (S) => {
|
|
191
|
+
(r.flush === "sync" ? f : p) && s({
|
|
192
192
|
storeId: e,
|
|
193
|
-
type:
|
|
194
|
-
events:
|
|
195
|
-
},
|
|
196
|
-
},
|
|
197
|
-
return
|
|
193
|
+
type: j.direct,
|
|
194
|
+
events: _
|
|
195
|
+
}, S);
|
|
196
|
+
}, m({}, v, r)));
|
|
197
|
+
return l;
|
|
198
198
|
},
|
|
199
|
-
$dispose:
|
|
200
|
-
}, c =
|
|
199
|
+
$dispose: _e
|
|
200
|
+
}, c = Oe(process.env.NODE_ENV !== "production" || process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && C ? m(
|
|
201
201
|
{
|
|
202
|
-
_hmrPayload:
|
|
202
|
+
_hmrPayload: z,
|
|
203
203
|
_customProperties: I(/* @__PURE__ */ new Set())
|
|
204
204
|
// devtools custom properties
|
|
205
205
|
},
|
|
206
|
-
|
|
206
|
+
oe
|
|
207
207
|
// must be added later
|
|
208
208
|
// setupStore
|
|
209
|
-
) :
|
|
209
|
+
) : oe);
|
|
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 || He)(() => t._e.run(() => (a = Pe()).run(() => o({ action: B }))));
|
|
212
|
+
for (const s in b) {
|
|
213
|
+
const r = b[s];
|
|
214
|
+
if (L(r) && !le(r) || K(r))
|
|
215
|
+
process.env.NODE_ENV !== "production" && i ? T.value[s] = Z(b, s) : u || (P && Be(r) && (L(r) ? r.value = P[s] : G(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
|
|
218
|
-
|
|
219
|
-
} else process.env.NODE_ENV !== "production" &&
|
|
217
|
+
const l = process.env.NODE_ENV !== "production" && i ? r : B(r, s);
|
|
218
|
+
b[s] = l, process.env.NODE_ENV !== "production" && (z.actions[s] = r), d.actions[s] = r;
|
|
219
|
+
} else process.env.NODE_ENV !== "production" && le(r) && (z.getters[s] = u ? (
|
|
220
220
|
// @ts-expect-error
|
|
221
221
|
n.getters[s]
|
|
222
|
-
) : r, C && (
|
|
223
|
-
(
|
|
222
|
+
) : r, C && (b._getters || // @ts-expect-error: same
|
|
223
|
+
(b._getters = I([]))).push(s));
|
|
224
224
|
}
|
|
225
|
-
if (
|
|
226
|
-
get: () => process.env.NODE_ENV !== "production" && i ?
|
|
225
|
+
if (m(c, b), m(we(c), b), Object.defineProperty(c, "$state", {
|
|
226
|
+
get: () => process.env.NODE_ENV !== "production" && i ? T.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
|
-
|
|
231
|
-
|
|
230
|
+
ne((r) => {
|
|
231
|
+
m(r, s);
|
|
232
232
|
});
|
|
233
233
|
}
|
|
234
234
|
}), process.env.NODE_ENV !== "production" && (c._hotUpdate = I((s) => {
|
|
235
235
|
c._hotUpdating = !0, s._hmrPayload.state.forEach((r) => {
|
|
236
236
|
if (r in c.$state) {
|
|
237
|
-
const
|
|
238
|
-
typeof
|
|
237
|
+
const l = s.$state[r], E = c.$state[r];
|
|
238
|
+
typeof l == "object" && D(l) && D(E) ? pe(l, E) : s.$state[r] = E;
|
|
239
239
|
}
|
|
240
|
-
c[r] =
|
|
240
|
+
c[r] = Z(s.$state, r);
|
|
241
241
|
}), Object.keys(c.$state).forEach((r) => {
|
|
242
242
|
r in s.$state || delete c[r];
|
|
243
|
-
}), p = !1,
|
|
243
|
+
}), p = !1, f = !1, t.state.value[e] = Z(s._hmrPayload, "hotState"), f = !0, re().then(() => {
|
|
244
244
|
p = !0;
|
|
245
245
|
});
|
|
246
246
|
for (const r in s._hmrPayload.actions) {
|
|
247
|
-
const
|
|
247
|
+
const l = s[r];
|
|
248
248
|
c[r] = //
|
|
249
|
-
|
|
249
|
+
B(l, r);
|
|
250
250
|
}
|
|
251
251
|
for (const r in s._hmrPayload.getters) {
|
|
252
|
-
const
|
|
252
|
+
const l = s._hmrPayload.getters[r], E = u ? (
|
|
253
253
|
// special handling of options api
|
|
254
|
-
|
|
255
|
-
) :
|
|
254
|
+
ee(() => (F(t), l.call(c, c)))
|
|
255
|
+
) : l;
|
|
256
256
|
c[r] = //
|
|
257
257
|
E;
|
|
258
258
|
}
|
|
@@ -269,7 +269,7 @@ function Y(e, o, n = {}, t, i, f) {
|
|
|
269
269
|
enumerable: !1
|
|
270
270
|
};
|
|
271
271
|
["_p", "_hmrPayload", "_getters", "_customProperties"].forEach((r) => {
|
|
272
|
-
Object.defineProperty(c, r,
|
|
272
|
+
Object.defineProperty(c, r, m({ value: c[r] }, s));
|
|
273
273
|
});
|
|
274
274
|
}
|
|
275
275
|
return t._p.forEach((s) => {
|
|
@@ -280,9 +280,9 @@ function Y(e, o, n = {}, t, i, f) {
|
|
|
280
280
|
pinia: t,
|
|
281
281
|
options: d
|
|
282
282
|
}));
|
|
283
|
-
Object.keys(r || {}).forEach((
|
|
283
|
+
Object.keys(r || {}).forEach((l) => c._customProperties.add(l)), m(c, r);
|
|
284
284
|
} else
|
|
285
|
-
|
|
285
|
+
m(c, a.run(() => s({
|
|
286
286
|
store: c,
|
|
287
287
|
app: t._a,
|
|
288
288
|
pinia: t,
|
|
@@ -290,40 +290,57 @@ function Y(e, o, n = {}, t, i, f) {
|
|
|
290
290
|
})));
|
|
291
291
|
}), process.env.NODE_ENV !== "production" && c.$state && typeof c.$state == "object" && typeof c.$state.constructor == "function" && !c.$state.constructor.toString().includes("[native code]") && console.warn(`[🍍]: The "state" must be a plain object. It cannot be
|
|
292
292
|
state: () => new MyClass()
|
|
293
|
-
Found in store "${c.$id}".`), P &&
|
|
293
|
+
Found in store "${c.$id}".`), P && u && n.hydrate && n.hydrate(c.$state, P), p = !0, f = !0, c;
|
|
294
294
|
}
|
|
295
295
|
// @__NO_SIDE_EFFECTS__
|
|
296
|
-
function
|
|
296
|
+
function Ee(e, o, n) {
|
|
297
297
|
let t;
|
|
298
298
|
const i = typeof o == "function";
|
|
299
299
|
t = i ? n : o;
|
|
300
|
-
function
|
|
301
|
-
const
|
|
300
|
+
function u(a, d) {
|
|
301
|
+
const v = J();
|
|
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) || (v ? Q(Y, 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 ? X(e, o, t, a) : fe(e, t, a), process.env.NODE_ENV !== "production" && (u._pinia = a));
|
|
309
309
|
const p = a._s.get(e);
|
|
310
310
|
if (process.env.NODE_ENV !== "production" && d) {
|
|
311
|
-
const
|
|
312
|
-
d._hotUpdate(h), delete a.state.value[
|
|
311
|
+
const f = "__hot:" + e, h = i ? X(f, o, t, a, !0) : fe(f, m({}, t), a, !0);
|
|
312
|
+
d._hotUpdate(h), delete a.state.value[f], a._s.delete(f);
|
|
313
313
|
}
|
|
314
314
|
if (process.env.NODE_ENV !== "production" && C) {
|
|
315
|
-
const
|
|
316
|
-
if (
|
|
315
|
+
const f = De();
|
|
316
|
+
if (f && f.proxy && // avoid adding stores that are just built for hot module replacement
|
|
317
317
|
!d) {
|
|
318
|
-
const h =
|
|
319
|
-
|
|
318
|
+
const h = f.proxy, y = "_pStores" in h ? h._pStores : h._pStores = {};
|
|
319
|
+
y[e] = p;
|
|
320
320
|
}
|
|
321
321
|
}
|
|
322
322
|
return p;
|
|
323
323
|
}
|
|
324
|
-
return
|
|
324
|
+
return u.$id = e, u;
|
|
325
|
+
}
|
|
326
|
+
let A = null;
|
|
327
|
+
function nt(e) {
|
|
328
|
+
if (A !== null) {
|
|
329
|
+
console.warn(
|
|
330
|
+
"[LinID CoreLib] Pinia store has already been initialized. Re-initialization is ignored."
|
|
331
|
+
);
|
|
332
|
+
return;
|
|
333
|
+
}
|
|
334
|
+
A = e;
|
|
325
335
|
}
|
|
326
|
-
|
|
336
|
+
function ge() {
|
|
337
|
+
if (A === null)
|
|
338
|
+
throw new Error(
|
|
339
|
+
"[LinID CoreLib] Pinia store is not initialized. Call setPiniaStore() first."
|
|
340
|
+
);
|
|
341
|
+
return A;
|
|
342
|
+
}
|
|
343
|
+
const Me = () => Ze(ge()), Ze = /* @__PURE__ */ Ee("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
|
+
}), ot = /* @__PURE__ */ Ie({
|
|
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 = Me(), t = R([]), i = R(!1);
|
|
364
|
+
return je(() => {
|
|
348
365
|
i.value = !1;
|
|
349
|
-
const
|
|
350
|
-
t.value =
|
|
366
|
+
const u = n.zones[o.zone] || [];
|
|
367
|
+
t.value = u.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
|
-
}), (
|
|
357
|
-
(
|
|
358
|
-
key: d.plugin +
|
|
373
|
+
}), (u, a) => (W(), ie(ce, null, [
|
|
374
|
+
(W(!0), ie(ce, null, ze(t.value, (d, v) => (W(), Re(ke(d.component), Fe({
|
|
375
|
+
key: d.plugin + v
|
|
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(u.$slots, "default", { key: 0 }, () => [
|
|
378
|
+
a[0] || (a[0] = Ae("div", null, "No components to render in this zone.", -1))
|
|
379
|
+
]) : $e("", !0)
|
|
363
380
|
], 64));
|
|
364
381
|
}
|
|
365
382
|
});
|
|
366
|
-
function
|
|
383
|
+
function rt() {
|
|
367
384
|
function e(n) {
|
|
368
385
|
return {
|
|
369
386
|
page: (n.page || 1) - 1,
|
|
@@ -385,7 +402,7 @@ function Ye() {
|
|
|
385
402
|
};
|
|
386
403
|
}
|
|
387
404
|
let U = null;
|
|
388
|
-
function
|
|
405
|
+
function st(e) {
|
|
389
406
|
if (U !== null) {
|
|
390
407
|
console.warn(
|
|
391
408
|
"[LinID CoreLib] UI Design has already been initialized. Re-initialization is ignored."
|
|
@@ -394,24 +411,24 @@ function Ge(e) {
|
|
|
394
411
|
}
|
|
395
412
|
U = e;
|
|
396
413
|
}
|
|
397
|
-
function
|
|
414
|
+
function We() {
|
|
398
415
|
if (U === null)
|
|
399
416
|
throw new Error(
|
|
400
417
|
"[LinID CoreLib] UI Design is not initialized. Call setUiDesign() first."
|
|
401
418
|
);
|
|
402
419
|
return U;
|
|
403
420
|
}
|
|
404
|
-
function
|
|
421
|
+
function de(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 it() {
|
|
428
|
+
const e = ee(() => We());
|
|
412
429
|
function o(n, t) {
|
|
413
|
-
let i =
|
|
414
|
-
if (i === void 0 && (i =
|
|
430
|
+
let i = de(e.value, `${n}.${t}`);
|
|
431
|
+
if (i === void 0 && (i = de(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
|
);
|
|
@@ -424,7 +441,7 @@ function Xe() {
|
|
|
424
441
|
return { ui: o };
|
|
425
442
|
}
|
|
426
443
|
let x = null;
|
|
427
|
-
function
|
|
444
|
+
function ct(e) {
|
|
428
445
|
if (x !== null) {
|
|
429
446
|
console.warn(
|
|
430
447
|
"[LinID CoreLib] HTTP client has already been initialized. Re-initialization is ignored."
|
|
@@ -440,95 +457,122 @@ function O() {
|
|
|
440
457
|
);
|
|
441
458
|
return x;
|
|
442
459
|
}
|
|
443
|
-
async function
|
|
460
|
+
async function qe() {
|
|
444
461
|
return (await O().get("/metadata/entities")).data;
|
|
445
462
|
}
|
|
446
|
-
async function
|
|
463
|
+
async function Je() {
|
|
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 at = () => Qe(ge()), Qe = /* @__PURE__ */ Ee("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
|
+
qe(),
|
|
500
|
+
Je()
|
|
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
|
+
}), me = /* @__PURE__ */ new Map();
|
|
511
|
+
function ut(e) {
|
|
512
|
+
me.set(e.instanceId, e);
|
|
499
513
|
}
|
|
500
|
-
function
|
|
501
|
-
const o =
|
|
514
|
+
function $(e) {
|
|
515
|
+
const o = me.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 lt(e, o) {
|
|
523
|
+
const n = $(e);
|
|
510
524
|
return O().post(`/${n.apiEndpoint}`, o).then(({ data: t }) => t);
|
|
511
525
|
}
|
|
512
|
-
async function
|
|
513
|
-
const t =
|
|
526
|
+
async function ft(e, o, n) {
|
|
527
|
+
const t = $(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 dt(e, o, n) {
|
|
531
|
+
const t = $(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 pt(e, o) {
|
|
537
|
+
const n = $(e);
|
|
524
538
|
return O().get(`/${n.apiEndpoint}/${o}`).then(({ data: t }) => t);
|
|
525
539
|
}
|
|
526
|
-
async function
|
|
527
|
-
const n =
|
|
540
|
+
async function ht(e, o) {
|
|
541
|
+
const n = $(e);
|
|
528
542
|
return O().delete(`/${n.apiEndpoint}/${o}`);
|
|
529
543
|
}
|
|
530
|
-
|
|
531
|
-
|
|
544
|
+
function Ye(e, o) {
|
|
545
|
+
if (!H(e) || !H(o))
|
|
546
|
+
return o;
|
|
547
|
+
const n = { ...e };
|
|
548
|
+
for (const t of Object.keys(o))
|
|
549
|
+
n[t] = Ye(e[t], o[t]);
|
|
550
|
+
return n;
|
|
551
|
+
}
|
|
552
|
+
function Et(e) {
|
|
553
|
+
const o = {};
|
|
554
|
+
for (const [n, t] of Object.entries(e)) {
|
|
555
|
+
const i = n.split(".");
|
|
556
|
+
let u = o;
|
|
557
|
+
i.forEach((a, d) => {
|
|
558
|
+
d === i.length - 1 ? u[a] = t : (H(u[a]) || (u[a] = {}), u = u[a]);
|
|
559
|
+
});
|
|
560
|
+
}
|
|
561
|
+
return o;
|
|
562
|
+
}
|
|
563
|
+
function H(e) {
|
|
564
|
+
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
565
|
+
}
|
|
566
|
+
function Ge(e, o) {
|
|
567
|
+
return typeof e != "object" || e === null ? e : Object.fromEntries(
|
|
568
|
+
Object.entries(e).map(([n, t]) => {
|
|
569
|
+
const i = o(n), u = H(t) ? Ge(t, o) : t;
|
|
570
|
+
return [i, u];
|
|
571
|
+
})
|
|
572
|
+
);
|
|
573
|
+
}
|
|
574
|
+
var Xe = /* @__PURE__ */ ((e) => (e.SETUP = "setup", e.CONFIGURE = "configure", e.INITIALIZE = "initialize", e.READY = "ready", e.POST_INIT = "postInit", e))(Xe || {});
|
|
575
|
+
class gt {
|
|
532
576
|
/**
|
|
533
577
|
* Unique identifier for the module.
|
|
534
578
|
*
|
|
@@ -625,25 +669,31 @@ class ct {
|
|
|
625
669
|
}
|
|
626
670
|
}
|
|
627
671
|
export {
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
672
|
+
gt as BasicRemoteModule,
|
|
673
|
+
ot as LinidZoneRenderer,
|
|
674
|
+
Xe as ModuleLifecyclePhase,
|
|
675
|
+
ht as deleteEntityById,
|
|
676
|
+
Et as fromDot,
|
|
677
|
+
dt as getEntities,
|
|
678
|
+
pt as getEntityById,
|
|
634
679
|
O as getHttpClient,
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
Ge as
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
680
|
+
Ue as getModuleFederation,
|
|
681
|
+
$ as getModuleHostConfiguration,
|
|
682
|
+
ge as getPiniaStore,
|
|
683
|
+
We as getUiDesign,
|
|
684
|
+
H as isObject,
|
|
685
|
+
xe as loadAsyncComponent,
|
|
686
|
+
Ye as merge,
|
|
687
|
+
ut as registerModuleHostConfiguration,
|
|
688
|
+
Ge as renameKeys,
|
|
689
|
+
lt as saveEntity,
|
|
690
|
+
ct as setHttpClient,
|
|
691
|
+
tt as setModuleFederation,
|
|
692
|
+
nt as setPiniaStore,
|
|
693
|
+
st as setUiDesign,
|
|
694
|
+
ft as updateEntity,
|
|
695
|
+
at as useLinidConfigurationStore,
|
|
696
|
+
Me as useLinidZoneStore,
|
|
697
|
+
rt as usePagination,
|
|
698
|
+
it as useUiDesign
|
|
649
699
|
};
|