@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.
@@ -1,258 +1,258 @@
1
- import { defineAsyncComponent as ye, hasInjectionContext as W, inject as q, getCurrentInstance as _e, ref as k, reactive as Ne, markRaw as I, effectScope as be, isRef as j, isReactive as G, toRef as B, toRaw as De, nextTick as ne, computed as X, getCurrentScope as Oe, onScopeDispose as Pe, watch as we, toRefs as oe, defineComponent as Ce, watchEffect as Ve, createElementBlock as re, openBlock as M, Fragment as se, renderSlot as Se, createCommentVNode as Ie, renderList as $e, createBlock as je, resolveDynamicComponent as Le, mergeProps as Re, createElementVNode as ke } from "vue";
2
- let z = null;
3
- function Je(e) {
4
- if (z !== null) {
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
- z = e;
10
+ k = e;
11
11
  }
12
- function ze() {
13
- if (z === null)
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 z;
17
+ return k;
18
18
  }
19
- const Fe = (e) => ye(
20
- () => ze().loadRemote(e).then((o) => {
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 b;
28
- const F = (e) => b = e;
27
+ let N;
28
+ const F = (e) => N = e;
29
29
  process.env.NODE_ENV;
30
- const J = process.env.NODE_ENV !== "production" ? Symbol("pinia") : (
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 fe(e, o) {
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) && !j(t) && !G(t) ? e[n] = fe(i, t) : e[n] = 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 de = () => {
51
+ const he = () => {
52
52
  };
53
- function ie(e, o, n, t = de) {
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 && Oe() && Pe(i), i;
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 Ue = (e) => e(), ce = Symbol(), Z = Symbol();
66
- function Q(e, o) {
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) && !j(t) && !G(t) ? e[n] = Q(i, t) : e[n] = t;
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 xe = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
76
+ const Te = process.env.NODE_ENV !== "production" ? Symbol("pinia:skipHydration") : (
77
77
  /* istanbul ignore next */
78
78
  Symbol()
79
79
  );
80
- function Ae(e) {
81
- return !D(e) || !Object.prototype.hasOwnProperty.call(e, xe);
80
+ function Be(e) {
81
+ return !D(e) || !Object.prototype.hasOwnProperty.call(e, Te);
82
82
  }
83
- const { assign: v } = Object;
84
- function ae(e) {
85
- return !!(j(e) && e.effect);
83
+ const { assign: m } = Object;
84
+ function le(e) {
85
+ return !!(L(e) && e.effect);
86
86
  }
87
- function ue(e, o, n, t) {
88
- const { state: i, actions: f, getters: a } = o, d = n.state.value[e];
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 l = process.env.NODE_ENV !== "production" && t ? (
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
- oe(k(i ? i() : {}).value)
95
- ) : oe(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(X(() => {
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 y = n._s.get(e);
99
- return a[m].call(y, y);
98
+ const _ = n._s.get(e);
99
+ return a[y].call(_, _);
100
100
  })), h), {}));
101
101
  }
102
- return _ = Y(e, p, o, n, t, !0), _;
102
+ return v = X(e, p, o, n, t, !0), v;
103
103
  }
104
- function Y(e, o, n = {}, t, i, f) {
104
+ function X(e, o, n = {}, t, i, u) {
105
105
  let a;
106
- const d = v({ actions: {} }, n);
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 _ = { deep: !0 };
110
- process.env.NODE_ENV !== "production" && (_.onTrigger = (s) => {
111
- p ? y = s : p == !1 && !c._hotUpdating && (Array.isArray(y) ? y.push(s) : console.error("🍍 debuggerEvents should be an array. This is most likely an internal Pinia bug."));
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, l, h = /* @__PURE__ */ new Set(), m = /* @__PURE__ */ new Set(), y;
113
+ let p, f, h = /* @__PURE__ */ new Set(), y = /* @__PURE__ */ new Set(), _;
114
114
  const P = t.state.value[e];
115
- !f && !P && (process.env.NODE_ENV === "production" || !i) && (t.state.value[e] = {});
116
- const A = k({});
117
- let K;
118
- function ee(s) {
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 = l = !1, process.env.NODE_ENV !== "production" && (y = []), typeof s == "function" ? (s(t.state.value[e]), r = {
121
- type: $.patchFunction,
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: y
124
- }) : (Q(t.state.value[e], s), r = {
125
- type: $.patchObject,
123
+ events: _
124
+ }) : (G(t.state.value[e], s), r = {
125
+ type: j.patchObject,
126
126
  payload: s,
127
127
  storeId: e,
128
- events: y
128
+ events: _
129
129
  });
130
- const u = K = Symbol();
131
- ne().then(() => {
132
- K === u && (p = !0);
133
- }), l = !0, w(h, r, t.state.value[e]);
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 Ee = f ? function() {
136
- const { state: r } = n, u = r ? r() : {};
135
+ const ye = u ? function() {
136
+ const { state: r } = n, l = r ? r() : {};
137
137
  this.$patch((E) => {
138
- v(E, u);
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
- } : de
144
+ } : he
145
145
  );
146
- function ge() {
147
- a.stop(), h.clear(), m.clear(), t._s.delete(e);
146
+ function _e() {
147
+ a.stop(), h.clear(), y.clear(), t._s.delete(e);
148
148
  }
149
- const H = (s, r = "") => {
150
- if (ce in s)
151
- return s[Z] = r, s;
152
- const u = function() {
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), V = /* @__PURE__ */ new Set(), T = /* @__PURE__ */ new Set();
154
+ const E = Array.from(arguments), S = /* @__PURE__ */ new Set(), M = /* @__PURE__ */ new Set();
155
155
  function ve(g) {
156
- V.add(g);
156
+ S.add(g);
157
157
  }
158
- function me(g) {
159
- T.add(g);
158
+ function be(g) {
159
+ M.add(g);
160
160
  }
161
- w(m, {
161
+ w(y, {
162
162
  args: E,
163
- name: u[Z],
163
+ name: l[q],
164
164
  store: c,
165
165
  after: ve,
166
- onError: me
166
+ onError: be
167
167
  });
168
- let S;
168
+ let V;
169
169
  try {
170
- S = s.apply(this && this.$id === e ? this : c, E);
170
+ V = s.apply(this && this.$id === e ? this : c, E);
171
171
  } catch (g) {
172
- throw w(T, g), g;
172
+ throw w(M, g), g;
173
173
  }
174
- return S instanceof Promise ? S.then((g) => (w(V, g), g)).catch((g) => (w(T, g), Promise.reject(g))) : (w(V, S), S);
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 u[ce] = !0, u[Z] = r, u;
177
- }, R = /* @__PURE__ */ I({
176
+ return l[ue] = !0, l[q] = r, l;
177
+ }, z = /* @__PURE__ */ I({
178
178
  actions: {},
179
179
  getters: {},
180
180
  state: [],
181
- hotState: A
182
- }), te = {
181
+ hotState: T
182
+ }), oe = {
183
183
  _p: t,
184
184
  // _s: scope,
185
185
  $id: e,
186
- $onAction: ie.bind(null, m),
187
- $patch: ee,
188
- $reset: Ee,
186
+ $onAction: ae.bind(null, y),
187
+ $patch: ne,
188
+ $reset: ye,
189
189
  $subscribe(s, r = {}) {
190
- const u = ie(h, s, r.detached, () => E()), E = a.run(() => we(() => t.state.value[e], (V) => {
191
- (r.flush === "sync" ? l : p) && s({
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: $.direct,
194
- events: y
195
- }, V);
196
- }, v({}, _, r)));
197
- return u;
193
+ type: j.direct,
194
+ events: _
195
+ }, S);
196
+ }, m({}, v, r)));
197
+ return l;
198
198
  },
199
- $dispose: ge
200
- }, c = Ne(process.env.NODE_ENV !== "production" || process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test" && C ? v(
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: R,
202
+ _hmrPayload: z,
203
203
  _customProperties: I(/* @__PURE__ */ new Set())
204
204
  // devtools custom properties
205
205
  },
206
- te
206
+ oe
207
207
  // must be added later
208
208
  // setupStore
209
- ) : te);
209
+ ) : oe);
210
210
  t._s.set(e, c);
211
- const N = (t._a && t._a.runWithContext || Ue)(() => t._e.run(() => (a = be()).run(() => o({ action: H }))));
212
- for (const s in N) {
213
- const r = N[s];
214
- if (j(r) && !ae(r) || G(r))
215
- process.env.NODE_ENV !== "production" && i ? A.value[s] = B(N, s) : f || (P && Ae(r) && (j(r) ? r.value = P[s] : Q(r, P[s])), t.state.value[e][s] = r), process.env.NODE_ENV !== "production" && R.state.push(s);
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 u = process.env.NODE_ENV !== "production" && i ? r : H(r, s);
218
- N[s] = u, process.env.NODE_ENV !== "production" && (R.actions[s] = r), d.actions[s] = r;
219
- } else process.env.NODE_ENV !== "production" && ae(r) && (R.getters[s] = f ? (
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 && (N._getters || // @ts-expect-error: same
223
- (N._getters = I([]))).push(s));
222
+ ) : r, C && (b._getters || // @ts-expect-error: same
223
+ (b._getters = I([]))).push(s));
224
224
  }
225
- if (v(c, N), v(De(c), N), Object.defineProperty(c, "$state", {
226
- get: () => process.env.NODE_ENV !== "production" && i ? A.value : t.state.value[e],
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
- ee((r) => {
231
- v(r, s);
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 u = s.$state[r], E = c.$state[r];
238
- typeof u == "object" && D(u) && D(E) ? fe(u, E) : s.$state[r] = E;
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] = B(s.$state, 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, l = !1, t.state.value[e] = B(s._hmrPayload, "hotState"), l = !0, ne().then(() => {
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 u = s[r];
247
+ const l = s[r];
248
248
  c[r] = //
249
- H(u, r);
249
+ B(l, r);
250
250
  }
251
251
  for (const r in s._hmrPayload.getters) {
252
- const u = s._hmrPayload.getters[r], E = f ? (
252
+ const l = s._hmrPayload.getters[r], E = u ? (
253
253
  // special handling of options api
254
- X(() => (F(t), u.call(c, c)))
255
- ) : u;
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, v({ value: c[r] }, s));
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((u) => c._customProperties.add(u)), v(c, r);
283
+ Object.keys(r || {}).forEach((l) => c._customProperties.add(l)), m(c, r);
284
284
  } else
285
- v(c, a.run(() => s({
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 && f && n.hydrate && n.hydrate(c.$state, P), p = !0, l = !0, c;
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 pe(e, o, n) {
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 f(a, d) {
301
- const _ = W();
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" && b && b._testing ? null : a) || (_ ? q(J, null) : null), a && F(a), process.env.NODE_ENV !== "production" && !b)
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 = b, a._s.has(e) || (i ? Y(e, o, t, a) : ue(e, t, a), process.env.NODE_ENV !== "production" && (f._pinia = 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 l = "__hot:" + e, h = i ? Y(l, o, t, a, !0) : ue(l, v({}, t), a, !0);
312
- d._hotUpdate(h), delete a.state.value[l], a._s.delete(l);
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 l = _e();
316
- if (l && l.proxy && // avoid adding stores that are just built for hot module replacement
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 = l.proxy, m = "_pStores" in h ? h._pStores : h._pStores = {};
319
- m[e] = p;
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 f.$id = e, f;
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
- const He = /* @__PURE__ */ pe("linidZoneStore", {
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
- }), Qe = /* @__PURE__ */ Ce({
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 = He(), t = k([]), i = k(!1);
347
- return Ve(() => {
363
+ const o = e, n = Me(), t = R([]), i = R(!1);
364
+ return je(() => {
348
365
  i.value = !1;
349
- const f = n.zones[o.zone] || [];
350
- t.value = f.map((a) => ({
366
+ const u = n.zones[o.zone] || [];
367
+ t.value = u.map((a) => ({
351
368
  ...a,
352
- component: Fe(a.plugin)
369
+ component: xe(a.plugin)
353
370
  })), Promise.resolve().then(() => {
354
371
  i.value = !0;
355
372
  });
356
- }), (f, a) => (M(), re(se, null, [
357
- (M(!0), re(se, null, $e(t.value, (d, _) => (M(), je(Le(d.component), Re({
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 ? Se(f.$slots, "default", { key: 0 }, () => [
361
- a[0] || (a[0] = ke("div", null, "No components to render in this zone.", -1))
362
- ]) : Ie("", !0)
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 Ye() {
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 Ge(e) {
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 Te() {
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 le(e, o) {
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 Xe() {
411
- const e = X(() => Te());
427
+ function it() {
428
+ const e = ee(() => We());
412
429
  function o(n, t) {
413
- let i = le(e.value, `${n}.${t}`);
414
- if (i === void 0 && (i = le(e.value, `default.${t}`)), i === void 0)
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 Ke(e) {
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 Be() {
460
+ async function qe() {
444
461
  return (await O().get("/metadata/entities")).data;
445
462
  }
446
- async function Me() {
463
+ async function Je() {
447
464
  return (await O().get(
448
465
  "/metadata/routes"
449
466
  )).data;
450
467
  }
451
- const et = /* @__PURE__ */ pe(
452
- "LinidConfigurationStore",
453
- {
454
- state: () => ({
455
- entities: [],
456
- apiEndpoints: [],
457
- loading: !1,
458
- error: null
459
- }),
460
- getters: {
461
- /**
462
- * Returns an entity configuration by name.
463
- * @param state - The store state.
464
- * @returns A function that takes an entity name and returns the configuration.
465
- */
466
- getEntityByName: (e) => (o) => e.entities.find((n) => n.name === o),
467
- /**
468
- * Returns all api endpoints for a specific entity.
469
- * @param state - The store state.
470
- * @returns A function that takes an entity name and returns its api endpoints.
471
- */
472
- getApiEndpointsByEntity: (e) => (o) => e.apiEndpoints.filter(
473
- (n) => n.entity === o
474
- )
475
- },
476
- actions: {
477
- /**
478
- * Fetches all entity and api endpoint configurations from the backend.
479
- */
480
- async fetchConfiguration() {
481
- this.loading = !0, this.error = null;
482
- try {
483
- const [e, o] = await Promise.all([
484
- Be(),
485
- Me()
486
- ]);
487
- this.entities = e, this.apiEndpoints = o;
488
- } catch (e) {
489
- this.error = e instanceof Error ? e.message : "Failed to fetch configuration", console.error("[Linid CoreLib] Failed to fetch configuration:", e);
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
- ), he = /* @__PURE__ */ new Map();
497
- function tt(e) {
498
- he.set(e.instanceId, e);
510
+ }), me = /* @__PURE__ */ new Map();
511
+ function ut(e) {
512
+ me.set(e.instanceId, e);
499
513
  }
500
- function L(e) {
501
- const o = he.get(e);
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 nt(e, o) {
509
- const n = L(e);
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 ot(e, o, n) {
513
- const t = L(e);
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 rt(e, o, n) {
517
- const t = L(e);
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 st(e, o) {
523
- const n = L(e);
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 it(e, o) {
527
- const n = L(e);
540
+ async function ht(e, o) {
541
+ const n = $(e);
528
542
  return O().delete(`/${n.apiEndpoint}/${o}`);
529
543
  }
530
- var Ze = /* @__PURE__ */ ((e) => (e.SETUP = "setup", e.CONFIGURE = "configure", e.INITIALIZE = "initialize", e.READY = "ready", e.POST_INIT = "postInit", e))(Ze || {});
531
- class ct {
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
- ct as BasicRemoteModule,
629
- Qe as LinidZoneRenderer,
630
- Ze as ModuleLifecyclePhase,
631
- it as deleteEntityById,
632
- rt as getEntities,
633
- st as getEntityById,
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
- ze as getModuleFederation,
636
- L as getModuleHostConfiguration,
637
- Te as getUiDesign,
638
- Fe as loadAsyncComponent,
639
- tt as registerModuleHostConfiguration,
640
- nt as saveEntity,
641
- Ke as setHttpClient,
642
- Je as setModuleFederation,
643
- Ge as setUiDesign,
644
- ot as updateEntity,
645
- et as useLinidConfigurationStore,
646
- He as useLinidZoneStore,
647
- Ye as usePagination,
648
- Xe as useUiDesign
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
  };