@linagora/linid-im-front-corelib 0.0.44 → 0.0.46
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _n from "vue";
|
|
2
2
|
import { defineAsyncComponent as ko, hasInjectionContext as An, inject as Ft, getCurrentInstance as Fo, ref as Xt, reactive as Uo, markRaw as ft, effectScope as Mo, isRef as pt, isReactive as zn, toRef as hn, toRaw as xo, nextTick as _r, getCurrentScope as Vo, onScopeDispose as $o, watch as vn, computed as ke, toRefs as hr, defineComponent as Jt, openBlock as En, createElementBlock as Er, Fragment as Ut, renderList as Bo, unref as gr, createBlock as jo, resolveDynamicComponent as Ho, mergeProps as Wo, renderSlot as qo, createCommentVNode as Go, onMounted as Os, onUnmounted as Ss, shallowRef as Yo, h as Ts, createVNode as Ko, Text as Xo } from "vue";
|
|
3
3
|
let Mt = null;
|
|
4
|
-
function
|
|
4
|
+
function Bu(e) {
|
|
5
5
|
if (Mt !== null) {
|
|
6
6
|
console.warn(
|
|
7
7
|
"[LinID CoreLib] Module Federation has already been initialized. Re-initialization is ignored."
|
|
@@ -325,7 +325,7 @@ This will fail in production.`);
|
|
|
325
325
|
return o.$id = e, o;
|
|
326
326
|
}
|
|
327
327
|
let Vt = null;
|
|
328
|
-
function
|
|
328
|
+
function ju(e) {
|
|
329
329
|
if (Vt !== null) {
|
|
330
330
|
console.warn(
|
|
331
331
|
"[LinID CoreLib] Pinia store has already been initialized. Re-initialization is ignored."
|
|
@@ -364,7 +364,7 @@ const ti = () => ni(er()), ni = /* @__PURE__ */ Zn("linidZoneStore", {
|
|
|
364
364
|
this.zones[e]?.some(({ plugin: n }) => n === t.plugin) || this.register(e, t);
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
|
-
}),
|
|
367
|
+
}), Hu = /* @__PURE__ */ Jt({
|
|
368
368
|
__name: "LinidZoneRenderer",
|
|
369
369
|
props: {
|
|
370
370
|
zone: {}
|
|
@@ -2136,25 +2136,25 @@ Q.getAdapter = Ys.getAdapter;
|
|
|
2136
2136
|
Q.HttpStatusCode = kn;
|
|
2137
2137
|
Q.default = Q;
|
|
2138
2138
|
const {
|
|
2139
|
-
Axios:
|
|
2140
|
-
AxiosError:
|
|
2141
|
-
CanceledError:
|
|
2142
|
-
isCancel:
|
|
2143
|
-
CancelToken:
|
|
2144
|
-
VERSION:
|
|
2145
|
-
all:
|
|
2146
|
-
Cancel:
|
|
2147
|
-
isAxiosError:
|
|
2148
|
-
spread:
|
|
2149
|
-
toFormData:
|
|
2150
|
-
AxiosHeaders:
|
|
2139
|
+
Axios: Gu,
|
|
2140
|
+
AxiosError: Yu,
|
|
2141
|
+
CanceledError: Ku,
|
|
2142
|
+
isCancel: Xu,
|
|
2143
|
+
CancelToken: Ju,
|
|
2144
|
+
VERSION: Qu,
|
|
2145
|
+
all: zu,
|
|
2146
|
+
Cancel: Zu,
|
|
2147
|
+
isAxiosError: ef,
|
|
2148
|
+
spread: tf,
|
|
2149
|
+
toFormData: nf,
|
|
2150
|
+
AxiosHeaders: rf,
|
|
2151
2151
|
HttpStatusCode: Vr,
|
|
2152
|
-
formToJSON:
|
|
2153
|
-
getAdapter:
|
|
2154
|
-
mergeConfig:
|
|
2152
|
+
formToJSON: sf,
|
|
2153
|
+
getAdapter: of,
|
|
2154
|
+
mergeConfig: af
|
|
2155
2155
|
} = Q;
|
|
2156
2156
|
let Bt = null;
|
|
2157
|
-
function
|
|
2157
|
+
function cf(e) {
|
|
2158
2158
|
if (Bt !== null) {
|
|
2159
2159
|
console.warn(
|
|
2160
2160
|
"[LinID CoreLib] HTTP client has already been initialized. Re-initialization is ignored."
|
|
@@ -2171,7 +2171,7 @@ function Ie() {
|
|
|
2171
2171
|
return Bt;
|
|
2172
2172
|
}
|
|
2173
2173
|
const Qs = /* @__PURE__ */ new Map();
|
|
2174
|
-
function
|
|
2174
|
+
function lf(e) {
|
|
2175
2175
|
Qs.set(e.instanceId, e);
|
|
2176
2176
|
}
|
|
2177
2177
|
function st(e) {
|
|
@@ -2182,25 +2182,25 @@ function st(e) {
|
|
|
2182
2182
|
);
|
|
2183
2183
|
return t;
|
|
2184
2184
|
}
|
|
2185
|
-
async function
|
|
2185
|
+
async function uf(e, t) {
|
|
2186
2186
|
const n = st(e);
|
|
2187
2187
|
return Ie().post(`/${n.apiEndpoint}`, t).then(({ data: r }) => r);
|
|
2188
2188
|
}
|
|
2189
|
-
async function
|
|
2189
|
+
async function ff(e, t, n) {
|
|
2190
2190
|
const r = st(e);
|
|
2191
2191
|
return Ie().put(`/${r.apiEndpoint}/${t}`, n).then(({ data: s }) => s);
|
|
2192
2192
|
}
|
|
2193
|
-
async function
|
|
2193
|
+
async function df(e, t, n) {
|
|
2194
2194
|
const r = st(e);
|
|
2195
2195
|
return Ie().get(`/${r.apiEndpoint}`, {
|
|
2196
2196
|
params: { ...t, ...n }
|
|
2197
2197
|
}).then(({ data: s }) => s);
|
|
2198
2198
|
}
|
|
2199
|
-
async function
|
|
2199
|
+
async function pf(e, t) {
|
|
2200
2200
|
const n = st(e);
|
|
2201
2201
|
return Ie().get(`/${n.apiEndpoint}/${t}`).then(({ data: r }) => r);
|
|
2202
2202
|
}
|
|
2203
|
-
async function
|
|
2203
|
+
async function mf(e, t) {
|
|
2204
2204
|
const n = st(e);
|
|
2205
2205
|
return Ie().delete(`/${n.apiEndpoint}/${t}`);
|
|
2206
2206
|
}
|
|
@@ -4956,7 +4956,7 @@ if (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) {
|
|
|
4956
4956
|
}
|
|
4957
4957
|
process.env.NODE_ENV;
|
|
4958
4958
|
let Gt = null;
|
|
4959
|
-
function
|
|
4959
|
+
function _f(e) {
|
|
4960
4960
|
if (Gt !== null) {
|
|
4961
4961
|
console.warn(
|
|
4962
4962
|
"[LinID CoreLib] I18n has already been initialized. Re-initialization is ignored."
|
|
@@ -5495,7 +5495,7 @@ var tu = vo(function(e) {
|
|
|
5495
5495
|
}, t;
|
|
5496
5496
|
})(Po);
|
|
5497
5497
|
const wo = new Po();
|
|
5498
|
-
function
|
|
5498
|
+
function hf() {
|
|
5499
5499
|
function e(t) {
|
|
5500
5500
|
wo.next({
|
|
5501
5501
|
key: "notify",
|
|
@@ -5504,7 +5504,7 @@ function _f() {
|
|
|
5504
5504
|
}
|
|
5505
5505
|
return { Notify: e };
|
|
5506
5506
|
}
|
|
5507
|
-
function
|
|
5507
|
+
function Ef(e, t) {
|
|
5508
5508
|
const n = Xt(!1);
|
|
5509
5509
|
let r;
|
|
5510
5510
|
function s(o) {
|
|
@@ -5523,7 +5523,7 @@ function hf(e, t) {
|
|
|
5523
5523
|
r?.unsubscribe();
|
|
5524
5524
|
}), { show: n };
|
|
5525
5525
|
}
|
|
5526
|
-
function
|
|
5526
|
+
function gf() {
|
|
5527
5527
|
function e(n) {
|
|
5528
5528
|
return {
|
|
5529
5529
|
page: (n.page || 1) - 1,
|
|
@@ -5556,7 +5556,7 @@ function nu(e, t) {
|
|
|
5556
5556
|
pattern: (u) => (l) => c(l, u)
|
|
5557
5557
|
};
|
|
5558
5558
|
}
|
|
5559
|
-
function
|
|
5559
|
+
function bf(e, t, n) {
|
|
5560
5560
|
if (!t.hasValidations)
|
|
5561
5561
|
return [];
|
|
5562
5562
|
const { required: r, validateFromApi: s, ...o } = nu(e, t.name), i = n.filter((a) => t.inputSettings?.[a] != null).map(
|
|
@@ -5571,7 +5571,7 @@ function gf(e, t, n) {
|
|
|
5571
5571
|
];
|
|
5572
5572
|
}
|
|
5573
5573
|
let Yt = null;
|
|
5574
|
-
function
|
|
5574
|
+
function yf(e) {
|
|
5575
5575
|
if (Yt !== null) {
|
|
5576
5576
|
console.warn(
|
|
5577
5577
|
"[LinID CoreLib] UI Design has already been initialized. Re-initialization is ignored."
|
|
@@ -5929,32 +5929,38 @@ const su = [
|
|
|
5929
5929
|
"side",
|
|
5930
5930
|
"top",
|
|
5931
5931
|
"noWrap"
|
|
5932
|
-
], Cu = [
|
|
5933
|
-
"
|
|
5934
|
-
"
|
|
5935
|
-
"
|
|
5936
|
-
"
|
|
5937
|
-
|
|
5938
|
-
"q-toolbar-title": lu,
|
|
5932
|
+
], Cu = [
|
|
5933
|
+
"autofocus",
|
|
5934
|
+
"noErrorFocus",
|
|
5935
|
+
"noResetFocus",
|
|
5936
|
+
"greedy"
|
|
5937
|
+
], Ru = ["lines", "overline", "caption", "header"], ys = {
|
|
5939
5938
|
"q-avatar": uu,
|
|
5940
5939
|
"q-badge": fu,
|
|
5941
|
-
"q-
|
|
5940
|
+
"q-btn": su,
|
|
5941
|
+
"q-btn-dropdown": Tu,
|
|
5942
5942
|
"q-card": pu,
|
|
5943
5943
|
"q-card-actions": mu,
|
|
5944
|
-
"q-icon": _u,
|
|
5945
|
-
"q-toggle": hu,
|
|
5946
|
-
"q-input": Eu,
|
|
5947
5944
|
"q-date": gu,
|
|
5948
|
-
"q-img": bu,
|
|
5949
|
-
"q-file": yu,
|
|
5950
|
-
"q-select": Nu,
|
|
5951
5945
|
"q-dialog": Ou,
|
|
5952
|
-
"q-
|
|
5953
|
-
"q-
|
|
5954
|
-
"q-
|
|
5946
|
+
"q-file": yu,
|
|
5947
|
+
"q-form": Cu,
|
|
5948
|
+
"q-header": au,
|
|
5949
|
+
"q-icon": _u,
|
|
5950
|
+
"q-img": bu,
|
|
5951
|
+
"q-input": Eu,
|
|
5955
5952
|
"q-item": Au,
|
|
5953
|
+
"q-item-label": Ru,
|
|
5956
5954
|
"q-item-section": vu,
|
|
5957
|
-
"q-
|
|
5955
|
+
"q-list": Lu,
|
|
5956
|
+
"q-route-tab": iu,
|
|
5957
|
+
"q-select": Nu,
|
|
5958
|
+
"q-spinner": Su,
|
|
5959
|
+
"q-table": du,
|
|
5960
|
+
"q-tabs": ou,
|
|
5961
|
+
"q-toggle": hu,
|
|
5962
|
+
"q-toolbar": cu,
|
|
5963
|
+
"q-toolbar-title": lu
|
|
5958
5964
|
};
|
|
5959
5965
|
function Ns(e, t) {
|
|
5960
5966
|
return t.split(".").reduce((n, r) => {
|
|
@@ -5962,7 +5968,7 @@ function Ns(e, t) {
|
|
|
5962
5968
|
return n[r];
|
|
5963
5969
|
}, e);
|
|
5964
5970
|
}
|
|
5965
|
-
function
|
|
5971
|
+
function Iu(e, t, n) {
|
|
5966
5972
|
let r = Ns(e, `${t}.${n}`);
|
|
5967
5973
|
if (r === void 0 && (r = Ns(e, `default.${n}`)), typeof r == "object")
|
|
5968
5974
|
throw new Error(
|
|
@@ -5970,39 +5976,39 @@ function Ru(e, t, n) {
|
|
|
5970
5976
|
);
|
|
5971
5977
|
return r;
|
|
5972
5978
|
}
|
|
5973
|
-
function
|
|
5979
|
+
function Pu(e) {
|
|
5974
5980
|
if (!(e in ys))
|
|
5975
5981
|
throw new Error(
|
|
5976
5982
|
`[UiDesign] The component '${e}' is not supported for UI design retrieval.`
|
|
5977
5983
|
);
|
|
5978
5984
|
return ys[e];
|
|
5979
5985
|
}
|
|
5980
|
-
function
|
|
5986
|
+
function Nf() {
|
|
5981
5987
|
const e = ke(() => ru());
|
|
5982
5988
|
function t(n, r, s) {
|
|
5983
|
-
const o =
|
|
5989
|
+
const o = Pu(r), i = {};
|
|
5984
5990
|
for (const a of o) {
|
|
5985
|
-
const c = s?.[a] ??
|
|
5991
|
+
const c = s?.[a] ?? Iu(e.value, n, `${r}.${String(a)}`);
|
|
5986
5992
|
c !== void 0 && (i[a] = c);
|
|
5987
5993
|
}
|
|
5988
5994
|
return i;
|
|
5989
5995
|
}
|
|
5990
5996
|
return { ui: t };
|
|
5991
5997
|
}
|
|
5992
|
-
async function
|
|
5998
|
+
async function wu() {
|
|
5993
5999
|
return (await Ie().get("/metadata/entities")).data;
|
|
5994
6000
|
}
|
|
5995
|
-
async function
|
|
6001
|
+
async function Of(e) {
|
|
5996
6002
|
return (await Ie().get(
|
|
5997
6003
|
`/metadata/entities/${e}`
|
|
5998
6004
|
)).data;
|
|
5999
6005
|
}
|
|
6000
|
-
async function
|
|
6006
|
+
async function Du() {
|
|
6001
6007
|
return (await Ie().get(
|
|
6002
6008
|
"/metadata/routes"
|
|
6003
6009
|
)).data;
|
|
6004
6010
|
}
|
|
6005
|
-
const
|
|
6011
|
+
const Sf = () => ku(er()), ku = /* @__PURE__ */ Zn("LinidConfigurationStore", {
|
|
6006
6012
|
state: () => ({
|
|
6007
6013
|
entities: [],
|
|
6008
6014
|
apiEndpoints: [],
|
|
@@ -6033,8 +6039,8 @@ const Of = () => Du(er()), Du = /* @__PURE__ */ Zn("LinidConfigurationStore", {
|
|
|
6033
6039
|
this.loading = !0, this.error = null;
|
|
6034
6040
|
try {
|
|
6035
6041
|
const [e, t] = await Promise.all([
|
|
6036
|
-
|
|
6037
|
-
|
|
6042
|
+
wu(),
|
|
6043
|
+
Du()
|
|
6038
6044
|
]);
|
|
6039
6045
|
this.entities = e, this.apiEndpoints = t;
|
|
6040
6046
|
} catch (e) {
|
|
@@ -6044,7 +6050,7 @@ const Of = () => Du(er()), Du = /* @__PURE__ */ Zn("LinidConfigurationStore", {
|
|
|
6044
6050
|
}
|
|
6045
6051
|
}
|
|
6046
6052
|
}
|
|
6047
|
-
}),
|
|
6053
|
+
}), Tf = () => Fu(er()), Fu = /* @__PURE__ */ Zn("LinidUiStore", {
|
|
6048
6054
|
state: () => ({
|
|
6049
6055
|
mainNavigationItems: []
|
|
6050
6056
|
}),
|
|
@@ -6058,15 +6064,15 @@ const Of = () => Du(er()), Du = /* @__PURE__ */ Zn("LinidConfigurationStore", {
|
|
|
6058
6064
|
}
|
|
6059
6065
|
}
|
|
6060
6066
|
});
|
|
6061
|
-
function
|
|
6067
|
+
function Uu(e, t) {
|
|
6062
6068
|
if (!Kt(e) || !Kt(t))
|
|
6063
6069
|
return t;
|
|
6064
6070
|
const n = { ...e };
|
|
6065
6071
|
for (const r of Object.keys(t))
|
|
6066
|
-
n[r] =
|
|
6072
|
+
n[r] = Uu(e[r], t[r]);
|
|
6067
6073
|
return n;
|
|
6068
6074
|
}
|
|
6069
|
-
function
|
|
6075
|
+
function Lf(e) {
|
|
6070
6076
|
const t = {};
|
|
6071
6077
|
for (const [n, r] of Object.entries(e)) {
|
|
6072
6078
|
const s = n.split(".");
|
|
@@ -6080,15 +6086,15 @@ function Tf(e) {
|
|
|
6080
6086
|
function Kt(e) {
|
|
6081
6087
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
6082
6088
|
}
|
|
6083
|
-
function
|
|
6089
|
+
function Mu(e, t) {
|
|
6084
6090
|
return typeof e != "object" || e === null ? e : Object.fromEntries(
|
|
6085
6091
|
Object.entries(e).map(([n, r]) => {
|
|
6086
|
-
const s = t(n), o = Kt(r) ?
|
|
6092
|
+
const s = t(n), o = Kt(r) ? Mu(r, t) : r;
|
|
6087
6093
|
return [s, o];
|
|
6088
6094
|
})
|
|
6089
6095
|
);
|
|
6090
6096
|
}
|
|
6091
|
-
function
|
|
6097
|
+
function xu(e, t) {
|
|
6092
6098
|
if (e === t || typeof e == "number" && typeof t == "number" && Number.isNaN(e) && Number.isNaN(t))
|
|
6093
6099
|
return !0;
|
|
6094
6100
|
if (e == null || t == null || typeof e != "object" || typeof t != "object" || Array.isArray(e) !== Array.isArray(t))
|
|
@@ -6098,11 +6104,11 @@ function Mu(e, t) {
|
|
|
6098
6104
|
return !1;
|
|
6099
6105
|
const s = e, o = t;
|
|
6100
6106
|
return n.every(
|
|
6101
|
-
(i) => Object.prototype.hasOwnProperty.call(o, i) &&
|
|
6107
|
+
(i) => Object.prototype.hasOwnProperty.call(o, i) && xu(s[i], o[i])
|
|
6102
6108
|
);
|
|
6103
6109
|
}
|
|
6104
|
-
var
|
|
6105
|
-
class
|
|
6110
|
+
var Vu = /* @__PURE__ */ ((e) => (e.SETUP = "setup", e.CONFIGURE = "configure", e.INITIALIZE = "initialize", e.READY = "ready", e.POST_INIT = "postInit", e))(Vu || {});
|
|
6111
|
+
class Af {
|
|
6106
6112
|
/**
|
|
6107
6113
|
* Unique identifier for the module.
|
|
6108
6114
|
*
|
|
@@ -6206,17 +6212,17 @@ class Lf {
|
|
|
6206
6212
|
}
|
|
6207
6213
|
}
|
|
6208
6214
|
export {
|
|
6209
|
-
|
|
6210
|
-
|
|
6211
|
-
|
|
6212
|
-
|
|
6213
|
-
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
|
|
6218
|
-
|
|
6219
|
-
|
|
6215
|
+
Af as BasicRemoteModule,
|
|
6216
|
+
Hu as LinidZoneRenderer,
|
|
6217
|
+
Vu as ModuleLifecyclePhase,
|
|
6218
|
+
xu as deepEqual,
|
|
6219
|
+
mf as deleteEntityById,
|
|
6220
|
+
Lf as fromDot,
|
|
6221
|
+
Du as getApiEndpointsConfiguration,
|
|
6222
|
+
df as getEntities,
|
|
6223
|
+
wu as getEntitiesConfiguration,
|
|
6224
|
+
pf as getEntityById,
|
|
6225
|
+
Of as getEntityConfiguration,
|
|
6220
6226
|
Ie as getHttpClient,
|
|
6221
6227
|
Vl as getI18nInstance,
|
|
6222
6228
|
Jo as getModuleFederation,
|
|
@@ -6225,26 +6231,26 @@ export {
|
|
|
6225
6231
|
ru as getUiDesign,
|
|
6226
6232
|
Kt as isObject,
|
|
6227
6233
|
Qo as loadAsyncComponent,
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
|
|
6231
|
-
|
|
6232
|
-
|
|
6233
|
-
|
|
6234
|
-
|
|
6235
|
-
|
|
6236
|
-
|
|
6234
|
+
Uu as merge,
|
|
6235
|
+
lf as registerModuleHostConfiguration,
|
|
6236
|
+
Mu as renameKeys,
|
|
6237
|
+
uf as saveEntity,
|
|
6238
|
+
cf as setHttpClient,
|
|
6239
|
+
_f as setI18nInstance,
|
|
6240
|
+
Bu as setModuleFederation,
|
|
6241
|
+
ju as setPiniaStore,
|
|
6242
|
+
yf as setUiDesign,
|
|
6237
6243
|
wo as uiEventSubject,
|
|
6238
|
-
|
|
6239
|
-
|
|
6244
|
+
ff as updateEntity,
|
|
6245
|
+
Ef as useDialog,
|
|
6240
6246
|
Hl as useFieldValidation,
|
|
6241
|
-
|
|
6242
|
-
|
|
6247
|
+
Sf as useLinidConfigurationStore,
|
|
6248
|
+
Tf as useLinidUiStore,
|
|
6243
6249
|
ti as useLinidZoneStore,
|
|
6244
|
-
|
|
6245
|
-
|
|
6250
|
+
hf as useNotify,
|
|
6251
|
+
gf as usePagination,
|
|
6246
6252
|
nu as useQuasarFieldValidation,
|
|
6247
|
-
|
|
6253
|
+
bf as useQuasarRules,
|
|
6248
6254
|
$l as useScopedI18n,
|
|
6249
|
-
|
|
6255
|
+
Nf as useUiDesign
|
|
6250
6256
|
};
|
package/dist/core-lib.umd.js
CHANGED
|
@@ -14,4 +14,4 @@ This will fail in production.`);i=$e,i._s.has(e)||(o?un(e,t,r,i):fr(e,r,i),proce
|
|
|
14
14
|
${u}`:c)}else throw i},onCacheKey:i=>Ea(t,n,i)}}function tl(e){if(D(e))return e;if(e.loc&&e.loc.source)return e.loc.source}function nl(e,t,n,r){const{modifiers:o,pluralRules:s,messageResolver:i,fallbackLocale:a,fallbackWarn:c,missingWarn:u,fallbackContext:l}=e,g={locale:t,modifiers:o,pluralRules:s,messages:(A,E)=>{let b=i(n,A);if(b==null&&(l||E)){const[,,S]=qo(l||e,A,t,a,c,u);b=i(S,A)}if(D(b)||be(b)){let S=!1;const O=Go(e,A,t,b,A,()=>{S=!0});return S?Vo:O}else return he(b)?b:Vo}};return e.processor&&(g.processor=e.processor),r.list&&(g.list=r.list),r.named&&(g.named=r.named),te(r.plural)&&(g.pluralIndex=r.plural),g}nc();const rl="11.2.2";function ol(){typeof __VUE_I18N_FULL_INSTALL__!="boolean"&&(qe().__VUE_I18N_FULL_INSTALL__=!0),typeof __VUE_I18N_LEGACY_API__!="boolean"&&(qe().__VUE_I18N_LEGACY_API__=!0),typeof __INTLIFY_DROP_MESSAGE_COMPILER__!="boolean"&&(qe().__INTLIFY_DROP_MESSAGE_COMPILER__=!1),typeof __INTLIFY_PROD_DEVTOOLS__!="boolean"&&(qe().__INTLIFY_PROD_DEVTOOLS__=!1)}const oe={UNEXPECTED_RETURN_TYPE:bc,INVALID_ARGUMENT:25,MUST_BE_CALL_SETUP_TOP:26,NOT_INSTALLED:27,REQUIRED_VALUE:28,INVALID_VALUE:29,CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN:30,NOT_INSTALLED_WITH_PROVIDE:31,UNEXPECTED_ERROR:32,NOT_COMPATIBLE_LEGACY_VUE_I18N:33,NOT_AVAILABLE_COMPOSITION_IN_LEGACY:34};function ht(e,...t){return nt(e,null,process.env.NODE_ENV!=="production"?{messages:sl,args:t}:void 0)}const sl={[oe.UNEXPECTED_RETURN_TYPE]:"Unexpected return type in composer",[oe.INVALID_ARGUMENT]:"Invalid argument",[oe.MUST_BE_CALL_SETUP_TOP]:"Must be called at the top of a `setup` function",[oe.NOT_INSTALLED]:"Need to install with `app.use` function",[oe.UNEXPECTED_ERROR]:"Unexpected error",[oe.REQUIRED_VALUE]:"Required in value: {0}",[oe.INVALID_VALUE]:"Invalid value",[oe.CANNOT_SETUP_VUE_DEVTOOLS_PLUGIN]:"Cannot setup vue-devtools plugin",[oe.NOT_INSTALLED_WITH_PROVIDE]:"Need to install with `provide` function",[oe.NOT_COMPATIBLE_LEGACY_VUE_I18N]:"Not compatible legacy VueI18n.",[oe.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]:"Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"},Mn=ve("__translateVNode"),$n=ve("__datetimeParts"),xn=ve("__numberParts"),Bn=ve("__enableEmitter"),jn=ve("__disableEmitter"),il=ve("__setPluralRules"),Yo=ve("__injectWithOption"),Hn=ve("__dispose"),Ae={FALLBACK_TO_ROOT:wc,NOT_FOUND_PARENT_SCOPE:9,IGNORE_OBJ_FLATTEN:10,DEPRECATE_LEGACY_MODE:11,DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE:12,DUPLICATE_USE_I18N_CALLING:13},al={[Ae.FALLBACK_TO_ROOT]:"Fall back to {type} '{key}' with root locale.",[Ae.NOT_FOUND_PARENT_SCOPE]:"Not found parent scope. use the global scope.",[Ae.IGNORE_OBJ_FLATTEN]:"Ignore object flatten: '{key}' key has an string value",[Ae.DEPRECATE_LEGACY_MODE]:`Legacy API mode has been deprecated in v11. Use Composition API mode instead.
|
|
15
15
|
About how to use the Composition API mode, see https://vue-i18n.intlify.dev/guide/advanced/composition.html`,[Ae.DEPRECATE_TRANSLATE_CUSTOME_DIRECTIVE]:"'v-t' has been deprecated in v11. Use translate APIs ('t' or '$t') instead.",[Ae.DUPLICATE_USE_I18N_CALLING]:"Duplicate `useI18n` calling by local scope. Please don't call it on local scope, due to it does not work properly in component."};function Kt(e,...t){return Mt(al[e],...t)}function Et(e){if(!j(e)||be(e))return e;for(const t in e)if(ge(e,t))if(!t.includes("."))j(e[t])&&Et(e[t]);else{const n=t.split("."),r=n.length-1;let o=e,s=!1;for(let i=0;i<r;i++){if(n[i]==="__proto__")throw new Error(`unsafe key: ${n[i]}`);if(n[i]in o||(o[n[i]]=q()),!j(o[n[i]])){process.env.NODE_ENV!=="production"&&Se(Kt(Ae.IGNORE_OBJ_FLATTEN,{key:n[i]})),s=!0;break}o=o[n[i]]}if(s||(be(o)?go.includes(n[r])||delete e[t]:(o[n[r]]=e[t],delete e[t])),!be(o)){const i=o[n[r]];j(i)&&Et(i)}}return e}function Ko(e,t){const{messages:n,__i18n:r,messageResolver:o,flatJson:s}=t,i=H(n)?n:X(r)?q():{[e]:q()};if(X(r)&&r.forEach(a=>{if("locale"in a&&"resource"in a){const{locale:c,resource:u}=a;c?(i[c]=i[c]||q(),jt(u,i[c])):jt(u,i)}else D(a)&&jt(JSON.parse(a),i)}),o==null&&s)for(const a in i)ge(i,a)&&Et(i[a]);return i}function Qo(e){return e.type}function cl(e,t,n){let r=j(t.messages)?t.messages:q();"__i18nGlobal"in n&&(r=Ko(e.locale.value,{messages:r,__i18n:n.__i18nGlobal}));const o=Object.keys(r);o.length&&o.forEach(s=>{e.mergeLocaleMessage(s,r[s])});{if(j(t.datetimeFormats)){const s=Object.keys(t.datetimeFormats);s.length&&s.forEach(i=>{e.mergeDateTimeFormat(i,t.datetimeFormats[i])})}if(j(t.numberFormats)){const s=Object.keys(t.numberFormats);s.length&&s.forEach(i=>{e.mergeNumberFormat(i,t.numberFormats[i])})}}}function Xo(e){return C.createVNode(C.Text,null,e,0)}function Vn(){return"currentInstance"in sn?sn["currentInstance"]:sn.getCurrentInstance()}const Jo="__INTLIFY_META__",zo=()=>[],ll=()=>!1;let Zo=0;function es(e){return((t,n,r,o)=>e(n,r,Vn()||void 0,o))}const ul=()=>{const e=Vn();let t=null;return e&&(t=Qo(e)[Jo])?{[Jo]:t}:null};function fl(e={}){const{__root:t,__injectWithOption:n}=e,r=t===void 0,o=e.flatJson,s=Ce?C.ref:C.shallowRef;let i=J(e.inheritLocale)?e.inheritLocale:!0;const a=s(t&&i?t.locale.value:D(e.locale)?e.locale:qt),c=s(t&&i?t.fallbackLocale.value:D(e.fallbackLocale)||X(e.fallbackLocale)||H(e.fallbackLocale)||e.fallbackLocale===!1?e.fallbackLocale:a.value),u=s(Ko(a.value,e)),l=s(H(e.datetimeFormats)?e.datetimeFormats:{[a.value]:{}}),p=s(H(e.numberFormats)?e.numberFormats:{[a.value]:{}});let g=t?t.missingWarn:J(e.missingWarn)||$t(e.missingWarn)?e.missingWarn:!0,A=t?t.fallbackWarn:J(e.fallbackWarn)||$t(e.fallbackWarn)?e.fallbackWarn:!0,E=t?t.fallbackRoot:J(e.fallbackRoot)?e.fallbackRoot:!0,b=!!e.fallbackFormat,S=Y(e.missing)?e.missing:null,m=Y(e.missing)?es(e.missing):null,O=Y(e.postTranslation)?e.postTranslation:null,T=t?t.warnHtmlMessage:J(e.warnHtmlMessage)?e.warnHtmlMessage:!0,y=!!e.escapeParameter;const P=t?t.modifiers:H(e.modifiers)?e.modifiers:{};let v=e.pluralRules||t&&t.pluralRules,_;_=(()=>{r&&vo(null);const N={version:rl,locale:a.value,fallbackLocale:c.value,messages:u.value,modifiers:P,pluralRules:v,missing:m===null?void 0:m,missingWarn:g,fallbackWarn:A,fallbackFormat:b,unresolving:!0,postTranslation:O===null?void 0:O,warnHtmlMessage:T,escapeParameter:y,messageResolver:e.messageResolver,messageCompiler:e.messageCompiler,__meta:{framework:"vue"}};N.datetimeFormats=l.value,N.numberFormats=p.value,N.__datetimeFormatters=H(_)?_.__datetimeFormatters:void 0,N.__numberFormatters=H(_)?_.__numberFormatters:void 0,process.env.NODE_ENV!=="production"&&(N.__v_emitter=H(_)?_.__v_emitter:void 0);const R=Hc(N);return r&&vo(R),R})(),_t(_,a.value,c.value);function $(){return[a.value,c.value,u.value,l.value,p.value]}const I=C.computed({get:()=>a.value,set:N=>{_.locale=N,a.value=N}}),w=C.computed({get:()=>c.value,set:N=>{_.fallbackLocale=N,c.value=N,_t(_,a.value,N)}}),F=C.computed(()=>u.value),G=C.computed(()=>l.value),se=C.computed(()=>p.value);function Re(){return Y(O)?O:null}function le(N){O=N,_.postTranslation=N}function Ue(){return S}function re(N){N!==null&&(m=es(N)),S=N,_.missing=m}function ee(N,R){return N!=="translate"||!R.resolvedMessage}const ye=(N,R,W,Z,Qe,on)=>{$();let it;try{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(_.fallbackContext=t?jc():void 0),it=N(_)}finally{process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__,r||(_.fallbackContext=void 0)}if(W!=="translate exists"&&te(it)&&it===Wt||W==="translate exists"&&!it){const[Xe,Jl]=R();if(process.env.NODE_ENV!=="production"&&t&&D(Xe)&&ee(W,Jl)&&(E&&(Yt(A,Xe)||wo(g,Xe))&&Se(Kt(Ae.FALLBACK_TO_ROOT,{key:Xe,type:W})),process.env.NODE_ENV!=="production")){const{__v_emitter:Ps}=_;Ps&&E&&Ps.emit("fallback",{type:W,key:Xe,to:"global",groupId:`${W}:${Xe}`})}return t&&E?Z(t):Qe(Xe)}else{if(on(it))return it;throw ht(oe.UNEXPECTED_RETURN_TYPE)}};function pe(...N){return ye(R=>Reflect.apply(Wo,null,[R,...N]),()=>Un(...N),"translate",R=>Reflect.apply(R.t,R,[...N]),R=>R,R=>D(R))}function Pe(...N){const[R,W,Z]=N;if(Z&&!j(Z))throw ht(oe.INVALID_ARGUMENT);return pe(R,W,ne({resolvedMessage:!0},Z||{}))}function Ye(...N){return ye(R=>Reflect.apply(Uo,null,[R,...N]),()=>kn(...N),"datetime format",R=>Reflect.apply(R.d,R,[...N]),()=>Gt,R=>D(R)||X(R))}function Me(...N){return ye(R=>Reflect.apply(xo,null,[R,...N]),()=>Fn(...N),"number format",R=>Reflect.apply(R.n,R,[...N]),()=>Gt,R=>D(R)||X(R))}function st(N){return N.map(R=>D(R)||te(R)||J(R)?Xo(String(R)):R)}const Zn={normalize:st,interpolate:N=>N,type:"vnode"};function nn(...N){return ye(R=>{let W;const Z=R;try{Z.processor=Zn,W=Reflect.apply(Wo,null,[Z,...N])}finally{Z.processor=null}return W},()=>Un(...N),"translate",R=>R[Mn](...N),R=>[Xo(R)],R=>X(R))}function er(...N){return ye(R=>Reflect.apply(xo,null,[R,...N]),()=>Fn(...N),"number format",R=>R[xn](...N),zo,R=>D(R)||X(R))}function rn(...N){return ye(R=>Reflect.apply(Uo,null,[R,...N]),()=>kn(...N),"datetime format",R=>R[$n](...N),zo,R=>D(R)||X(R))}function tr(N){v=N,_.pluralRules=v}function nr(N,R){return ye(()=>{if(!N)return!1;const W=D(R)?R:a.value,Z=Ke(W),Qe=_.messageResolver(Z,N);return be(Qe)||he(Qe)||D(Qe)},()=>[N],"translate exists",W=>Reflect.apply(W.te,W,[N,R]),ll,W=>J(W))}function bt(N){let R=null;const W=Oo(_,c.value,a.value);for(let Z=0;Z<W.length;Z++){const Qe=u.value[W[Z]]||{},on=_.messageResolver(Qe,N);if(on!=null){R=on;break}}return R}function yt(N){const R=bt(N);return R??(t?t.tm(N)||{}:{})}function Ke(N){return u.value[N]||{}}function Ot(N,R){if(o){const W={[N]:R};for(const Z in W)ge(W,Z)&&Et(W[Z]);R=W[N]}u.value[N]=R,_.messages=u.value}function rr(N,R){u.value[N]=u.value[N]||{};const W={[N]:R};if(o)for(const Z in W)ge(W,Z)&&Et(W[Z]);R=W[N],jt(R,u.value[N]),_.messages=u.value}function f(N){return l.value[N]||{}}function d(N,R){l.value[N]=R,_.datetimeFormats=l.value,$o(_,N,R)}function L(N,R){l.value[N]=ne(l.value[N]||{},R),_.datetimeFormats=l.value,$o(_,N,R)}function k(N){return p.value[N]||{}}function K(N,R){p.value[N]=R,_.numberFormats=p.value,jo(_,N,R)}function z(N,R){p.value[N]=ne(p.value[N]||{},R),_.numberFormats=p.value,jo(_,N,R)}Zo++,t&&Ce&&(C.watch(t.locale,N=>{i&&(a.value=N,_.locale=N,_t(_,a.value,c.value))}),C.watch(t.fallbackLocale,N=>{i&&(c.value=N,_.fallbackLocale=N,_t(_,a.value,c.value))}));const V={id:Zo,locale:I,fallbackLocale:w,get inheritLocale(){return i},set inheritLocale(N){i=N,N&&t&&(a.value=t.locale.value,c.value=t.fallbackLocale.value,_t(_,a.value,c.value))},get availableLocales(){return Object.keys(u.value).sort()},messages:F,get modifiers(){return P},get pluralRules(){return v||{}},get isGlobal(){return r},get missingWarn(){return g},set missingWarn(N){g=N,_.missingWarn=g},get fallbackWarn(){return A},set fallbackWarn(N){A=N,_.fallbackWarn=A},get fallbackRoot(){return E},set fallbackRoot(N){E=N},get fallbackFormat(){return b},set fallbackFormat(N){b=N,_.fallbackFormat=b},get warnHtmlMessage(){return T},set warnHtmlMessage(N){T=N,_.warnHtmlMessage=N},get escapeParameter(){return y},set escapeParameter(N){y=N,_.escapeParameter=N},t:pe,getLocaleMessage:Ke,setLocaleMessage:Ot,mergeLocaleMessage:rr,getPostTranslationHandler:Re,setPostTranslationHandler:le,getMissingHandler:Ue,setMissingHandler:re,[il]:tr};return V.datetimeFormats=G,V.numberFormats=se,V.rt=Pe,V.te=nr,V.tm=yt,V.d=Ye,V.n=Me,V.getDateTimeFormat=f,V.setDateTimeFormat=d,V.mergeDateTimeFormat=L,V.getNumberFormat=k,V.setNumberFormat=K,V.mergeNumberFormat=z,V[Yo]=n,V[Mn]=nn,V[$n]=rn,V[xn]=er,process.env.NODE_ENV!=="production"&&(V[Bn]=N=>{_.__v_emitter=N},V[jn]=()=>{_.__v_emitter=void 0}),V}function ts(e,t){}const Wn={tag:{type:[String,Object]},locale:{type:String},scope:{type:String,validator:e=>e==="parent"||e==="global",default:"parent"},i18n:{type:Object}};function dl({slots:e},t){return t.length===1&&t[0]==="default"?(e.default?e.default():[]).reduce((r,o)=>[...r,...o.type===C.Fragment?o.children:[o]],[]):t.reduce((n,r)=>{const o=e[r];return o&&(n[r]=o()),n},q())}function ns(){return C.Fragment}ne({keypath:{type:String,required:!0},plural:{type:[Number,String],validator:e=>te(e)||!isNaN(e)}},Wn);function pl(e){return X(e)&&!D(e[0])}function rs(e,t,n,r){const{slots:o,attrs:s}=t;return()=>{const i={part:!0};let a=q();e.locale&&(i.locale=e.locale),D(e.format)?i.key=e.format:j(e.format)&&(D(e.format.key)&&(i.key=e.format.key),a=Object.keys(e.format).reduce((g,A)=>n.includes(A)?ne(q(),g,{[A]:e.format[A]}):g,q()));const c=r(e.value,i,a);let u=[i.key];X(c)?u=c.map((g,A)=>{const E=o[g.type],b=E?E({[g.type]:g.value,index:A,parts:c}):[g.value];return pl(b)&&(b[0].key=`${g.type}-${A}`),b}):D(c)&&(u=[c]);const l=ne(q(),s),p=D(e.tag)||j(e.tag)?e.tag:ns();return C.h(p,l,u)}}ne({value:{type:Number,required:!0},format:{type:[String,Object]}},Wn);const ml=ve("global-vue-i18n");function Qt(e={}){const t=Vn();if(t==null)throw ht(oe.MUST_BE_CALL_SETUP_TOP);if(!t.isCE&&t.appContext.app!=null&&!t.appContext.app.__VUE_I18N_SYMBOL__)throw ht(oe.NOT_INSTALLED);const n=_l(t),r=El(n),o=Qo(t),s=hl(e,o);if(s==="global")return cl(r,e,o),r;if(s==="parent"){let c=gl(n,t,e.__useComponent);return c==null&&(process.env.NODE_ENV!=="production"&&Se(Kt(Ae.NOT_FOUND_PARENT_SCOPE)),c=r),c}const i=n;let a=i.__getInstance(t);if(a==null){const c=ne({},e);"__i18n"in o&&(c.__i18n=o.__i18n),r&&(c.__root=r),a=fl(c),i.__composerExtend&&(a[Hn]=i.__composerExtend(a)),yl(i,t,a),i.__setInstance(t,a)}else process.env.NODE_ENV!=="production"&&s==="local"&&Se(Kt(Ae.DUPLICATE_USE_I18N_CALLING));return a}function _l(e){const t=C.inject(e.isCE?ml:e.appContext.app.__VUE_I18N_SYMBOL__);if(!t)throw ht(e.isCE?oe.NOT_INSTALLED_WITH_PROVIDE:oe.UNEXPECTED_ERROR);return t}function hl(e,t){return xt(e)?"__i18n"in t?"local":"global":e.useScope?e.useScope:"local"}function El(e){return e.mode==="composition"?e.global:e.global.__composer}function gl(e,t,n=!1){let r=null;const o=t.root;let s=bl(t,n);for(;s!=null;){const i=e;if(e.mode==="composition")r=i.__getInstance(s);else if(__VUE_I18N_LEGACY_API__){const a=i.__getInstance(s);a!=null&&(r=a.__composer,n&&r&&!r[Yo]&&(r=null))}if(r!=null||o===s)break;s=s.parent}return r}function bl(e,t=!1){return e==null?null:t&&e.vnode.ctx||e.parent}function yl(e,t,n){let r=null;C.onMounted(()=>{if(process.env.NODE_ENV!=="production"){t.__VUE_I18N__=n,r=Aa();const o=n;o[Bn]&&o[Bn](r),r.on("*",ts)}},t),C.onUnmounted(()=>{const o=n;process.env.NODE_ENV!=="production"&&(r&&r.off("*",ts),o[jn]&&o[jn](),delete t.__VUE_I18N__),e.__deleteInstance(t);const s=o[Hn];s&&(s(),delete o[Hn])},t)}if(ne({value:{type:[Number,Date],required:!0},format:{type:[String,Object]}},Wn),ol(),Uc(mc),Mc(Ic),$c(Oo),process.env.NODE_ENV!=="production"||__INTLIFY_PROD_DEVTOOLS__){const e=qe();e.__INTLIFY__=!0,_c(e.__INTLIFY_DEVTOOLS_GLOBAL_HOOK__)}process.env.NODE_ENV;let Xt=null;function Ol(e){if(Xt!==null){console.warn("[LinID CoreLib] I18n has already been initialized. Re-initialization is ignored.");return}Xt=e}function os(){if(Xt===null)throw new Error("[LinID CoreLib] I18n is not initialized. Call setI18nInstance() first.");return Xt}function ss(e){const{t,te:n,tm:r}=Qt({useScope:"global",__i18n:os().global});function o(...c){const[u,l,p]=c;return t(typeof l=="number"?`${e}.${u}`:`${e}.${u}`,l,p)}function s(c){return n(`${e}.${c}`)}function i(c){return r(`${e}.${c}`)}function a(c,...u){return s(u[0])?o(...u):c}return{t:o,te:s,tm:i,translateOrDefault:a}}const Nl=new Set([zr.BadRequest,zr.NotFound]);function Sl(e){return Q.isAxiosError(e)&&e.response?.status!=null&&Nl.has(e.response.status)}function is(e,t){const{t:n}=ss(`${e}.fields.${t}`);async function r(l){try{return await ma(e,t,l),!0}catch(p){return Sl(p)?p.response.data.error:n("validation.unknownError")}}function o(l){return l==null||l===""?n("validation.required"):!0}function s(l,p){return l!=null&&l.length<p?n("validation.minLength",{min:p}):!0}function i(l,p){return l!=null&&l.length>p?n("validation.maxLength",{max:p}):!0}function a(l,p){return p>l?n("validation.min",{min:p}):!0}function c(l,p){return l>p?n("validation.max",{max:p}):!0}function u(l,p){return new RegExp(p).test(l)?!0:n("validation.pattern",{pattern:p.toString()})}return{validateFromApi:r,required:o,minLength:s,maxLength:i,min:a,max:c,pattern:u}}var qn=function(e,t){return qn=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(n[o]=r[o])},qn(e,t)};function Jt(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");qn(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function Gn(e){var t=typeof Symbol=="function"&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function Yn(e,t){var n=typeof Symbol=="function"&&e[Symbol.iterator];if(!n)return e;var r=n.call(e),o,s=[],i;try{for(;(t===void 0||t-- >0)&&!(o=r.next()).done;)s.push(o.value)}catch(a){i={error:a}}finally{try{o&&!o.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return s}function Kn(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;function De(e){return typeof e=="function"}function as(e){var t=function(r){Error.call(r),r.stack=new Error().stack},n=e(t);return n.prototype=Object.create(Error.prototype),n.prototype.constructor=n,n}var Qn=as(function(e){return function(n){e(this),this.message=n?n.length+` errors occurred during unsubscription:
|
|
16
16
|
`+n.map(function(r,o){return o+1+") "+r.toString()}).join(`
|
|
17
|
-
`):"",this.name="UnsubscriptionError",this.errors=n}});function Xn(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var zt=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,o,s;if(!this.closed){this.closed=!0;var i=this._parentage;if(i)if(this._parentage=null,Array.isArray(i))try{for(var a=Gn(i),c=a.next();!c.done;c=a.next()){var u=c.value;u.remove(this)}}catch(b){t={error:b}}finally{try{c&&!c.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}else i.remove(this);var l=this.initialTeardown;if(De(l))try{l()}catch(b){s=b instanceof Qn?b.errors:[b]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var g=Gn(p),A=g.next();!A.done;A=g.next()){var E=A.value;try{us(E)}catch(b){s=s??[],b instanceof Qn?s=Kn(Kn([],Yn(s)),Yn(b.errors)):s.push(b)}}}catch(b){r={error:b}}finally{try{A&&!A.done&&(o=g.return)&&o.call(g)}finally{if(r)throw r.error}}}if(s)throw new Qn(s)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)us(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&Xn(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&Xn(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),cs=zt.EMPTY;function ls(e){return e instanceof zt||e&&"closed"in e&&De(e.remove)&&De(e.add)&&De(e.unsubscribe)}function us(e){De(e)?e():e.unsubscribe()}var Tl={Promise:void 0},Ll={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Kn([e,t],Yn(n)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function Al(e){Ll.setTimeout(function(){throw e})}function fs(){}function Zt(e){e()}var ds=(function(e){Jt(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,ls(n)&&n.add(r)):r.destination=Cl,r}return t.create=function(n,r,o){return new Jn(n,r,o)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(zt),Rl=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){en(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){en(r)}else en(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){en(n)}},e})(),Jn=(function(e){Jt(t,e);function t(n,r,o){var s=e.call(this)||this,i;return De(n)||!n?i={next:n??void 0,error:r??void 0,complete:o??void 0}:i=n,s.destination=new Rl(i),s}return t})(ds);function en(e){Al(e)}function Pl(e){throw e}var Cl={closed:!0,next:fs,error:Pl,complete:fs},vl=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function Il(e){return e}function wl(e){return e.length===0?Il:e.length===1?e[0]:function(n){return e.reduce(function(r,o){return o(r)},n)}}var ps=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var o=this,s=kl(t)?t:new Jn(t,n,r);return Zt(function(){var i=o,a=i.operator,c=i.source;s.add(a?a.call(s,c):c?o._subscribe(s):o._trySubscribe(s))}),s},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=ms(n),new n(function(o,s){var i=new Jn({next:function(a){try{t(a)}catch(c){s(c),i.unsubscribe()}},error:s,complete:o});r.subscribe(i)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[vl]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return wl(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=ms(t),new t(function(r,o){var s;n.subscribe(function(i){return s=i},function(i){return o(i)},function(){return r(s)})})},e.create=function(t){return new e(t)},e})();function ms(e){var t;return(t=e??Tl.Promise)!==null&&t!==void 0?t:Promise}function Dl(e){return e&&De(e.next)&&De(e.error)&&De(e.complete)}function kl(e){return e&&e instanceof ds||Dl(e)&&ls(e)}var Fl=as(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),_s=(function(e){Jt(t,e);function t(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return t.prototype.lift=function(n){var r=new hs(this,this);return r.operator=n,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new Fl},t.prototype.next=function(n){var r=this;Zt(function(){var o,s;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var i=Gn(r.currentObservers),a=i.next();!a.done;a=i.next()){var c=a.value;c.next(n)}}catch(u){o={error:u}}finally{try{a&&!a.done&&(s=i.return)&&s.call(i)}finally{if(o)throw o.error}}}})},t.prototype.error=function(n){var r=this;Zt(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var o=r.observers;o.length;)o.shift().error(n)}})},t.prototype.complete=function(){var n=this;Zt(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,o=this,s=o.hasError,i=o.isStopped,a=o.observers;return s||i?cs:(this.currentObservers=null,a.push(n),new zt(function(){r.currentObservers=null,Xn(a,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,o=r.hasError,s=r.thrownError,i=r.isStopped;o?n.error(s):i&&n.complete()},t.prototype.asObservable=function(){var n=new ps;return n.source=this,n},t.create=function(n,r){return new hs(n,r)},t})(ps),hs=(function(e){Jt(t,e);function t(n,r){var o=e.call(this)||this;return o.destination=n,o.source=r,o}return t.prototype.next=function(n){var r,o;(o=(r=this.destination)===null||r===void 0?void 0:r.next)===null||o===void 0||o.call(r,n)},t.prototype.error=function(n){var r,o;(o=(r=this.destination)===null||r===void 0?void 0:r.error)===null||o===void 0||o.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,o;return(o=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&o!==void 0?o:cs},t})(_s);const zn=new _s;function Ul(){function e(t){zn.next({key:"notify",data:t})}return{Notify:e}}function Ml(e,t){const n=C.ref(!1);let r;function o(s){if(s.key!==e)return;const i=s.data;if(i.type==="close"){n.value=!1;return}n.value=!0,t?.(i)}return C.onMounted(()=>{r=zn.subscribe(o)}),C.onUnmounted(()=>{r?.unsubscribe()}),{show:n}}function $l(){function e(n){return{page:(n.page||1)-1,size:n.rowsPerPage||5,sort:n.sortBy||"updateDate",direction:n.descending?"desc":"asc"}}function t(n){return{page:n.number+1,rowsPerPage:n.size,rowsNumber:n.totalElements}}return{toPagination:e,toQuasarPagination:t}}function Es(e,t){const{validateFromApi:n,required:r,minLength:o,maxLength:s,min:i,max:a,pattern:c}=is(e,t);return{validateFromApi:n,required:r,min:u=>l=>i(typeof l=="string"?parseFloat(l):l,u),max:u=>l=>a(typeof l=="string"?parseFloat(l):l,u),minLength:u=>l=>o(l,u),maxLength:u=>l=>s(l,u),pattern:u=>l=>c(l,u)}}function xl(e,t,n){if(!t.hasValidations)return[];const{required:r,validateFromApi:o,...s}=Es(e,t.name),i=n.filter(a=>t.inputSettings?.[a]!=null).map(a=>s[a]?.(t.inputSettings?.[a])).filter(Boolean);return[...t.required?[r]:[],...i,o]}let tn=null;function Bl(e){if(tn!==null){console.warn("[LinID CoreLib] UI Design has already been initialized. Re-initialization is ignored.");return}tn=e}function gs(){if(tn===null)throw new Error("[LinID CoreLib] UI Design is not initialized. Call setUiDesign() first.");return tn}const bs={"q-btn":["icon","iconRight","noCaps","noWrap","align","stack","stretch","size","outline","flat","unelevated","rounded","push","square","glossy","fab","fabMini","padding","color","textColor","dense","ripple","round"],"q-tabs":["vertical","outsideArrows","mobileArrows","align","breakpoint","leftIcon","rightIcon","stretch","shrink","switchIndicator","narrowIndicator","inlineLabel","noCaps","activeColor","activeBgColor","indicatorColor","contentClass","activeClass","dense"],"q-route-tab":["icon","activeClass","exactActiveClass","noCaps","alert","contentClass","ripple"],"q-header":["reveal","revealOffset","elevated","bordered"],"q-toolbar":["inset"],"q-toolbar-title":["shrink"],"q-avatar":["icon","size","fontSize","color","textColor","square","rounded"],"q-badge":["floating","multiLine","align","color","textColor","transparent","outline","rounded"],"q-table":["virtualScrollItemSize","virtualScrollStickySizeStart","virtualScrollStickySizeEnd","color","iconFirstPage","iconPrevPage","iconNextPage","iconLastPage","grid","gridHeader","dense","hideHeader","hideBottom","hideSelectedBanner","hideNoData","hidePagination","flat","bordered","square","separator","wrapCells","tableStyle","tableClass","tableHeaderStyle","tableHeaderClass","cardContainerStyle","cardContainerClass","cardStyle","cardClass","titleClass"],"q-card":["dark","square","flat","bordered"],"q-card-actions":["align","vertical"],"q-icon":["left","right","name","size","color"],"q-toggle":["toggleOrder","toggleIndeterminate","keepColor","icon","checkedIcon","uncheckedIcon","indeterminateIcon","leftLabel","size","color","dark","dense","iconColor"],"q-input":["autofocus","stackLabel","hideHint","clearable","clearIcon","counter","autogrow","fillMask","reverseFillMask","unmaskedValue","debounce","labelColor","color","bgColor","dark","filled","outlined","borderless","standout","hideBottomSpace","rounded","square","dense","itemAligned","noErrorIcon"],"q-date":["landscape","yearsInMonthView","todayBtn","minimal","defaultView","color","textColor","dark","square","flat","bordered"],"q-img":["loading","loadingShowDelay","noSpinner","noNativeMenu","noTransition","draggable","src","srcset","sizes","placeholderSrc","errorSrc","ratio","initialRatio","width","height","fit","position","imgClass","imgStyle","spinnerColor","spinnerSize"],"q-file":["autofocus","stackLabel","hideHint","clearable","clearIcon","useChips","labelColor","color","bgColor","dark","filled","outlined","borderless","standout","hideBottomSpace","rounded","square","dense","itemAligned","inputClass","inputStyle","noErrorIcon"],"q-select":["virtualScrollHorizontal","clearable","autofocus","hideDropdownIcon","popupNoRouteDismiss","fillInput","transitionShow","transitionHide","transitionDuration","behavior","stackLabel","hideHint","clearIcon","counter","dropdownIcon","useInput","inputDebounce","optionsDense","optionsDark","optionsSelectedClass","optionsCover","menuShrink","disableTabSelection","menuAnchor","menuSelf","menuOffset","displayValueHtml","hideSelected","useChips","labelColor","color","bgColor","dark","filled","outlined","borderless","standout","hideBottomSpace","rounded","square","dense","itemAligned","popupContentClass","popupContentStyle","inputClass","inputStyle","noErrorIcon","virtualScrollSliceSize","virtualScrollSliceRatioBefore","virtualScrollSliceRatioAfter","virtualScrollItemSize","virtualScrollStickySizeStart","virtualScrollStickySizeEnd"],"q-dialog":["persistent","noEscDismiss","noBackdropDismiss","noRouteDismiss","autoClose","noRefocus","noFocus","noShake","allowFocusOutside","seamless","maximized","fullWidth","fullHeight","position","backdropFilter","square","transitionShow","transitionHide","transitionDuration"],"q-spinner":["size","color","thickness"],"q-btn-dropdown":["split","disableMainBtn","disableDropdown","persistent","noEscDismiss","noRouteDismiss","autoClose","noRefocus","noFocus","icon","iconRight","noCaps","noWrap","align","stack","stretch","dropdownIcon","cover","menuAnchor","menuSelf","menuOffset","size","outline","flat","unelevated","rounded","push","square","glossy","fab","fabMini","padding","color","textColor","dense","ripple","noIconAnimation","contentStyle","contentClass","transitionShow","transitionHide","transitionDuration"],"q-list":["separator","padding","tag","bordered","dense","dark"],"q-item":["insetLevel","tag","activeClass","exactActiveClass","clickable","manualFocus","focused","dark","dense"],"q-item-section":["avatar","thumbnail","side","top","noWrap"],"q-item-label":["lines","overline","caption","header"]};function ys(e,t){return t.split(".").reduce((n,r)=>{if(n&&typeof n=="object")return n[r]},e)}function jl(e,t,n){let r=ys(e,`${t}.${n}`);if(r===void 0&&(r=ys(e,`default.${n}`)),typeof r=="object")throw new Error(`[UiDesign] Value for '${t}.${n}' is a nested object or null, expected a primitive.`);return r}function Hl(e){if(!(e in bs))throw new Error(`[UiDesign] The component '${e}' is not supported for UI design retrieval.`);return bs[e]}function Vl(){const e=C.computed(()=>gs());function t(n,r,o){const s=Hl(r),i={};for(const a of s){const c=o?.[a]??jl(e.value,n,`${r}.${String(a)}`);c!==void 0&&(i[a]=c)}return i}return{ui:t}}async function Os(){return(await Ne().get("/metadata/entities")).data}async function Wl(e){return(await Ne().get(`/metadata/entities/${e}`)).data}async function Ns(){return(await Ne().get("/metadata/routes")).data}const ql=()=>Gl(Lt()),Gl=fn("LinidConfigurationStore",{state:()=>({entities:[],apiEndpoints:[],loading:!1,error:null}),getters:{getEntityByName:e=>t=>e.entities.find(n=>n.name===t),getApiEndpointsByEntity:e=>t=>e.apiEndpoints.filter(n=>n.entity===t)},actions:{async fetchConfiguration(){this.loading=!0,this.error=null;try{const[e,t]=await Promise.all([Os(),Ns()]);this.entities=e,this.apiEndpoints=t}catch(e){this.error=e instanceof Error?e.message:"Failed to fetch configuration",console.error("[Linid CoreLib] Failed to fetch configuration:",e)}finally{this.loading=!1}}}}),Yl=()=>Kl(Lt()),Kl=fn("LinidUiStore",{state:()=>({mainNavigationItems:[]}),actions:{addMainNavigationMenuItems(...e){this.mainNavigationItems.push(...e)}}});function Ss(e,t){if(!gt(e)||!gt(t))return t;const n={...e};for(const r of Object.keys(t))n[r]=Ss(e[r],t[r]);return n}function Ql(e){const t={};for(const[n,r]of Object.entries(e)){const o=n.split(".");let s=t;o.forEach((i,a)=>{a===o.length-1?s[i]=r:(gt(s[i])||(s[i]={}),s=s[i])})}return t}function gt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Ts(e,t){return typeof e!="object"||e===null?e:Object.fromEntries(Object.entries(e).map(([n,r])=>{const o=t(n),s=gt(r)?Ts(r,t):r;return[o,s]}))}function Ls(e,t){if(e===t||typeof e=="number"&&typeof t=="number"&&Number.isNaN(e)&&Number.isNaN(t))return!0;if(e==null||t==null||typeof e!="object"||typeof t!="object"||Array.isArray(e)!==Array.isArray(t))return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const o=e,s=t;return n.every(i=>Object.prototype.hasOwnProperty.call(s,i)&&Ls(o[i],s[i]))}var As=(e=>(e.SETUP="setup",e.CONFIGURE="configure",e.INITIALIZE="initialize",e.READY="ready",e.POST_INIT="postInit",e))(As||{});class Xl{id;name;version;description;constructor(t,n,r,o){this.id=t,this.name=n,this.version=r,this.description=o}async setup(){return{success:!0}}async configure(t){return{success:!0}}async initialize(t){return{success:!0}}async ready(t){return{success:!0}}async postInit(t){return{success:!0}}}M.BasicRemoteModule=Xl,M.LinidZoneRenderer=Ms,M.ModuleLifecyclePhase=As,M.deepEqual=Ls,M.deleteEntityById=pa,M.fromDot=Ql,M.getApiEndpointsConfiguration=Ns,M.getEntities=fa,M.getEntitiesConfiguration=Os,M.getEntityById=da,M.getEntityConfiguration=Wl,M.getHttpClient=Ne,M.getI18nInstance=os,M.getModuleFederation=or,M.getModuleHostConfiguration=Ve,M.getPiniaStore=Lt,M.getUiDesign=gs,M.isObject=gt,M.loadAsyncComponent=sr,M.merge=Ss,M.registerModuleHostConfiguration=ca,M.renameKeys=Ts,M.saveEntity=la,M.setHttpClient=aa,M.setI18nInstance=Ol,M.setModuleFederation=Is,M.setPiniaStore=Fs,M.setUiDesign=Bl,M.uiEventSubject=zn,M.updateEntity=ua,M.useDialog=Ml,M.useFieldValidation=is,M.useLinidConfigurationStore=ql,M.useLinidUiStore=Yl,M.useLinidZoneStore=dr,M.useNotify=Ul,M.usePagination=$l,M.useQuasarFieldValidation=Es,M.useQuasarRules=xl,M.useScopedI18n=ss,M.useUiDesign=Vl,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})}));
|
|
17
|
+
`):"",this.name="UnsubscriptionError",this.errors=n}});function Xn(e,t){if(e){var n=e.indexOf(t);0<=n&&e.splice(n,1)}}var zt=(function(){function e(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}return e.prototype.unsubscribe=function(){var t,n,r,o,s;if(!this.closed){this.closed=!0;var i=this._parentage;if(i)if(this._parentage=null,Array.isArray(i))try{for(var a=Gn(i),c=a.next();!c.done;c=a.next()){var u=c.value;u.remove(this)}}catch(b){t={error:b}}finally{try{c&&!c.done&&(n=a.return)&&n.call(a)}finally{if(t)throw t.error}}else i.remove(this);var l=this.initialTeardown;if(De(l))try{l()}catch(b){s=b instanceof Qn?b.errors:[b]}var p=this._finalizers;if(p){this._finalizers=null;try{for(var g=Gn(p),A=g.next();!A.done;A=g.next()){var E=A.value;try{us(E)}catch(b){s=s??[],b instanceof Qn?s=Kn(Kn([],Yn(s)),Yn(b.errors)):s.push(b)}}}catch(b){r={error:b}}finally{try{A&&!A.done&&(o=g.return)&&o.call(g)}finally{if(r)throw r.error}}}if(s)throw new Qn(s)}},e.prototype.add=function(t){var n;if(t&&t!==this)if(this.closed)us(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(n=this._finalizers)!==null&&n!==void 0?n:[]).push(t)}},e.prototype._hasParent=function(t){var n=this._parentage;return n===t||Array.isArray(n)&&n.includes(t)},e.prototype._addParent=function(t){var n=this._parentage;this._parentage=Array.isArray(n)?(n.push(t),n):n?[n,t]:t},e.prototype._removeParent=function(t){var n=this._parentage;n===t?this._parentage=null:Array.isArray(n)&&Xn(n,t)},e.prototype.remove=function(t){var n=this._finalizers;n&&Xn(n,t),t instanceof e&&t._removeParent(this)},e.EMPTY=(function(){var t=new e;return t.closed=!0,t})(),e})(),cs=zt.EMPTY;function ls(e){return e instanceof zt||e&&"closed"in e&&De(e.remove)&&De(e.add)&&De(e.unsubscribe)}function us(e){De(e)?e():e.unsubscribe()}var Tl={Promise:void 0},Ll={setTimeout:function(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return setTimeout.apply(void 0,Kn([e,t],Yn(n)))},clearTimeout:function(e){return clearTimeout(e)},delegate:void 0};function Al(e){Ll.setTimeout(function(){throw e})}function fs(){}function Zt(e){e()}var ds=(function(e){Jt(t,e);function t(n){var r=e.call(this)||this;return r.isStopped=!1,n?(r.destination=n,ls(n)&&n.add(r)):r.destination=Cl,r}return t.create=function(n,r,o){return new Jn(n,r,o)},t.prototype.next=function(n){this.isStopped||this._next(n)},t.prototype.error=function(n){this.isStopped||(this.isStopped=!0,this._error(n))},t.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(n){this.destination.next(n)},t.prototype._error=function(n){try{this.destination.error(n)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t})(zt),Rl=(function(){function e(t){this.partialObserver=t}return e.prototype.next=function(t){var n=this.partialObserver;if(n.next)try{n.next(t)}catch(r){en(r)}},e.prototype.error=function(t){var n=this.partialObserver;if(n.error)try{n.error(t)}catch(r){en(r)}else en(t)},e.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(n){en(n)}},e})(),Jn=(function(e){Jt(t,e);function t(n,r,o){var s=e.call(this)||this,i;return De(n)||!n?i={next:n??void 0,error:r??void 0,complete:o??void 0}:i=n,s.destination=new Rl(i),s}return t})(ds);function en(e){Al(e)}function Pl(e){throw e}var Cl={closed:!0,next:fs,error:Pl,complete:fs},vl=(function(){return typeof Symbol=="function"&&Symbol.observable||"@@observable"})();function Il(e){return e}function wl(e){return e.length===0?Il:e.length===1?e[0]:function(n){return e.reduce(function(r,o){return o(r)},n)}}var ps=(function(){function e(t){t&&(this._subscribe=t)}return e.prototype.lift=function(t){var n=new e;return n.source=this,n.operator=t,n},e.prototype.subscribe=function(t,n,r){var o=this,s=kl(t)?t:new Jn(t,n,r);return Zt(function(){var i=o,a=i.operator,c=i.source;s.add(a?a.call(s,c):c?o._subscribe(s):o._trySubscribe(s))}),s},e.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(n){t.error(n)}},e.prototype.forEach=function(t,n){var r=this;return n=ms(n),new n(function(o,s){var i=new Jn({next:function(a){try{t(a)}catch(c){s(c),i.unsubscribe()}},error:s,complete:o});r.subscribe(i)})},e.prototype._subscribe=function(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)},e.prototype[vl]=function(){return this},e.prototype.pipe=function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];return wl(t)(this)},e.prototype.toPromise=function(t){var n=this;return t=ms(t),new t(function(r,o){var s;n.subscribe(function(i){return s=i},function(i){return o(i)},function(){return r(s)})})},e.create=function(t){return new e(t)},e})();function ms(e){var t;return(t=e??Tl.Promise)!==null&&t!==void 0?t:Promise}function Dl(e){return e&&De(e.next)&&De(e.error)&&De(e.complete)}function kl(e){return e&&e instanceof ds||Dl(e)&&ls(e)}var Fl=as(function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}),_s=(function(e){Jt(t,e);function t(){var n=e.call(this)||this;return n.closed=!1,n.currentObservers=null,n.observers=[],n.isStopped=!1,n.hasError=!1,n.thrownError=null,n}return t.prototype.lift=function(n){var r=new hs(this,this);return r.operator=n,r},t.prototype._throwIfClosed=function(){if(this.closed)throw new Fl},t.prototype.next=function(n){var r=this;Zt(function(){var o,s;if(r._throwIfClosed(),!r.isStopped){r.currentObservers||(r.currentObservers=Array.from(r.observers));try{for(var i=Gn(r.currentObservers),a=i.next();!a.done;a=i.next()){var c=a.value;c.next(n)}}catch(u){o={error:u}}finally{try{a&&!a.done&&(s=i.return)&&s.call(i)}finally{if(o)throw o.error}}}})},t.prototype.error=function(n){var r=this;Zt(function(){if(r._throwIfClosed(),!r.isStopped){r.hasError=r.isStopped=!0,r.thrownError=n;for(var o=r.observers;o.length;)o.shift().error(n)}})},t.prototype.complete=function(){var n=this;Zt(function(){if(n._throwIfClosed(),!n.isStopped){n.isStopped=!0;for(var r=n.observers;r.length;)r.shift().complete()}})},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var n;return((n=this.observers)===null||n===void 0?void 0:n.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(n){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,n)},t.prototype._subscribe=function(n){return this._throwIfClosed(),this._checkFinalizedStatuses(n),this._innerSubscribe(n)},t.prototype._innerSubscribe=function(n){var r=this,o=this,s=o.hasError,i=o.isStopped,a=o.observers;return s||i?cs:(this.currentObservers=null,a.push(n),new zt(function(){r.currentObservers=null,Xn(a,n)}))},t.prototype._checkFinalizedStatuses=function(n){var r=this,o=r.hasError,s=r.thrownError,i=r.isStopped;o?n.error(s):i&&n.complete()},t.prototype.asObservable=function(){var n=new ps;return n.source=this,n},t.create=function(n,r){return new hs(n,r)},t})(ps),hs=(function(e){Jt(t,e);function t(n,r){var o=e.call(this)||this;return o.destination=n,o.source=r,o}return t.prototype.next=function(n){var r,o;(o=(r=this.destination)===null||r===void 0?void 0:r.next)===null||o===void 0||o.call(r,n)},t.prototype.error=function(n){var r,o;(o=(r=this.destination)===null||r===void 0?void 0:r.error)===null||o===void 0||o.call(r,n)},t.prototype.complete=function(){var n,r;(r=(n=this.destination)===null||n===void 0?void 0:n.complete)===null||r===void 0||r.call(n)},t.prototype._subscribe=function(n){var r,o;return(o=(r=this.source)===null||r===void 0?void 0:r.subscribe(n))!==null&&o!==void 0?o:cs},t})(_s);const zn=new _s;function Ul(){function e(t){zn.next({key:"notify",data:t})}return{Notify:e}}function Ml(e,t){const n=C.ref(!1);let r;function o(s){if(s.key!==e)return;const i=s.data;if(i.type==="close"){n.value=!1;return}n.value=!0,t?.(i)}return C.onMounted(()=>{r=zn.subscribe(o)}),C.onUnmounted(()=>{r?.unsubscribe()}),{show:n}}function $l(){function e(n){return{page:(n.page||1)-1,size:n.rowsPerPage||5,sort:n.sortBy||"updateDate",direction:n.descending?"desc":"asc"}}function t(n){return{page:n.number+1,rowsPerPage:n.size,rowsNumber:n.totalElements}}return{toPagination:e,toQuasarPagination:t}}function Es(e,t){const{validateFromApi:n,required:r,minLength:o,maxLength:s,min:i,max:a,pattern:c}=is(e,t);return{validateFromApi:n,required:r,min:u=>l=>i(typeof l=="string"?parseFloat(l):l,u),max:u=>l=>a(typeof l=="string"?parseFloat(l):l,u),minLength:u=>l=>o(l,u),maxLength:u=>l=>s(l,u),pattern:u=>l=>c(l,u)}}function xl(e,t,n){if(!t.hasValidations)return[];const{required:r,validateFromApi:o,...s}=Es(e,t.name),i=n.filter(a=>t.inputSettings?.[a]!=null).map(a=>s[a]?.(t.inputSettings?.[a])).filter(Boolean);return[...t.required?[r]:[],...i,o]}let tn=null;function Bl(e){if(tn!==null){console.warn("[LinID CoreLib] UI Design has already been initialized. Re-initialization is ignored.");return}tn=e}function gs(){if(tn===null)throw new Error("[LinID CoreLib] UI Design is not initialized. Call setUiDesign() first.");return tn}const bs={"q-avatar":["icon","size","fontSize","color","textColor","square","rounded"],"q-badge":["floating","multiLine","align","color","textColor","transparent","outline","rounded"],"q-btn":["icon","iconRight","noCaps","noWrap","align","stack","stretch","size","outline","flat","unelevated","rounded","push","square","glossy","fab","fabMini","padding","color","textColor","dense","ripple","round"],"q-btn-dropdown":["split","disableMainBtn","disableDropdown","persistent","noEscDismiss","noRouteDismiss","autoClose","noRefocus","noFocus","icon","iconRight","noCaps","noWrap","align","stack","stretch","dropdownIcon","cover","menuAnchor","menuSelf","menuOffset","size","outline","flat","unelevated","rounded","push","square","glossy","fab","fabMini","padding","color","textColor","dense","ripple","noIconAnimation","contentStyle","contentClass","transitionShow","transitionHide","transitionDuration"],"q-card":["dark","square","flat","bordered"],"q-card-actions":["align","vertical"],"q-date":["landscape","yearsInMonthView","todayBtn","minimal","defaultView","color","textColor","dark","square","flat","bordered"],"q-dialog":["persistent","noEscDismiss","noBackdropDismiss","noRouteDismiss","autoClose","noRefocus","noFocus","noShake","allowFocusOutside","seamless","maximized","fullWidth","fullHeight","position","backdropFilter","square","transitionShow","transitionHide","transitionDuration"],"q-file":["autofocus","stackLabel","hideHint","clearable","clearIcon","useChips","labelColor","color","bgColor","dark","filled","outlined","borderless","standout","hideBottomSpace","rounded","square","dense","itemAligned","inputClass","inputStyle","noErrorIcon"],"q-form":["autofocus","noErrorFocus","noResetFocus","greedy"],"q-header":["reveal","revealOffset","elevated","bordered"],"q-icon":["left","right","name","size","color"],"q-img":["loading","loadingShowDelay","noSpinner","noNativeMenu","noTransition","draggable","src","srcset","sizes","placeholderSrc","errorSrc","ratio","initialRatio","width","height","fit","position","imgClass","imgStyle","spinnerColor","spinnerSize"],"q-input":["autofocus","stackLabel","hideHint","clearable","clearIcon","counter","autogrow","fillMask","reverseFillMask","unmaskedValue","debounce","labelColor","color","bgColor","dark","filled","outlined","borderless","standout","hideBottomSpace","rounded","square","dense","itemAligned","noErrorIcon"],"q-item":["insetLevel","tag","activeClass","exactActiveClass","clickable","manualFocus","focused","dark","dense"],"q-item-label":["lines","overline","caption","header"],"q-item-section":["avatar","thumbnail","side","top","noWrap"],"q-list":["separator","padding","tag","bordered","dense","dark"],"q-route-tab":["icon","activeClass","exactActiveClass","noCaps","alert","contentClass","ripple"],"q-select":["virtualScrollHorizontal","clearable","autofocus","hideDropdownIcon","popupNoRouteDismiss","fillInput","transitionShow","transitionHide","transitionDuration","behavior","stackLabel","hideHint","clearIcon","counter","dropdownIcon","useInput","inputDebounce","optionsDense","optionsDark","optionsSelectedClass","optionsCover","menuShrink","disableTabSelection","menuAnchor","menuSelf","menuOffset","displayValueHtml","hideSelected","useChips","labelColor","color","bgColor","dark","filled","outlined","borderless","standout","hideBottomSpace","rounded","square","dense","itemAligned","popupContentClass","popupContentStyle","inputClass","inputStyle","noErrorIcon","virtualScrollSliceSize","virtualScrollSliceRatioBefore","virtualScrollSliceRatioAfter","virtualScrollItemSize","virtualScrollStickySizeStart","virtualScrollStickySizeEnd"],"q-spinner":["size","color","thickness"],"q-table":["virtualScrollItemSize","virtualScrollStickySizeStart","virtualScrollStickySizeEnd","color","iconFirstPage","iconPrevPage","iconNextPage","iconLastPage","grid","gridHeader","dense","hideHeader","hideBottom","hideSelectedBanner","hideNoData","hidePagination","flat","bordered","square","separator","wrapCells","tableStyle","tableClass","tableHeaderStyle","tableHeaderClass","cardContainerStyle","cardContainerClass","cardStyle","cardClass","titleClass"],"q-tabs":["vertical","outsideArrows","mobileArrows","align","breakpoint","leftIcon","rightIcon","stretch","shrink","switchIndicator","narrowIndicator","inlineLabel","noCaps","activeColor","activeBgColor","indicatorColor","contentClass","activeClass","dense"],"q-toggle":["toggleOrder","toggleIndeterminate","keepColor","icon","checkedIcon","uncheckedIcon","indeterminateIcon","leftLabel","size","color","dark","dense","iconColor"],"q-toolbar":["inset"],"q-toolbar-title":["shrink"]};function ys(e,t){return t.split(".").reduce((n,r)=>{if(n&&typeof n=="object")return n[r]},e)}function jl(e,t,n){let r=ys(e,`${t}.${n}`);if(r===void 0&&(r=ys(e,`default.${n}`)),typeof r=="object")throw new Error(`[UiDesign] Value for '${t}.${n}' is a nested object or null, expected a primitive.`);return r}function Hl(e){if(!(e in bs))throw new Error(`[UiDesign] The component '${e}' is not supported for UI design retrieval.`);return bs[e]}function Vl(){const e=C.computed(()=>gs());function t(n,r,o){const s=Hl(r),i={};for(const a of s){const c=o?.[a]??jl(e.value,n,`${r}.${String(a)}`);c!==void 0&&(i[a]=c)}return i}return{ui:t}}async function Os(){return(await Ne().get("/metadata/entities")).data}async function Wl(e){return(await Ne().get(`/metadata/entities/${e}`)).data}async function Ns(){return(await Ne().get("/metadata/routes")).data}const ql=()=>Gl(Lt()),Gl=fn("LinidConfigurationStore",{state:()=>({entities:[],apiEndpoints:[],loading:!1,error:null}),getters:{getEntityByName:e=>t=>e.entities.find(n=>n.name===t),getApiEndpointsByEntity:e=>t=>e.apiEndpoints.filter(n=>n.entity===t)},actions:{async fetchConfiguration(){this.loading=!0,this.error=null;try{const[e,t]=await Promise.all([Os(),Ns()]);this.entities=e,this.apiEndpoints=t}catch(e){this.error=e instanceof Error?e.message:"Failed to fetch configuration",console.error("[Linid CoreLib] Failed to fetch configuration:",e)}finally{this.loading=!1}}}}),Yl=()=>Kl(Lt()),Kl=fn("LinidUiStore",{state:()=>({mainNavigationItems:[]}),actions:{addMainNavigationMenuItems(...e){this.mainNavigationItems.push(...e)}}});function Ss(e,t){if(!gt(e)||!gt(t))return t;const n={...e};for(const r of Object.keys(t))n[r]=Ss(e[r],t[r]);return n}function Ql(e){const t={};for(const[n,r]of Object.entries(e)){const o=n.split(".");let s=t;o.forEach((i,a)=>{a===o.length-1?s[i]=r:(gt(s[i])||(s[i]={}),s=s[i])})}return t}function gt(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function Ts(e,t){return typeof e!="object"||e===null?e:Object.fromEntries(Object.entries(e).map(([n,r])=>{const o=t(n),s=gt(r)?Ts(r,t):r;return[o,s]}))}function Ls(e,t){if(e===t||typeof e=="number"&&typeof t=="number"&&Number.isNaN(e)&&Number.isNaN(t))return!0;if(e==null||t==null||typeof e!="object"||typeof t!="object"||Array.isArray(e)!==Array.isArray(t))return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;const o=e,s=t;return n.every(i=>Object.prototype.hasOwnProperty.call(s,i)&&Ls(o[i],s[i]))}var As=(e=>(e.SETUP="setup",e.CONFIGURE="configure",e.INITIALIZE="initialize",e.READY="ready",e.POST_INIT="postInit",e))(As||{});class Xl{id;name;version;description;constructor(t,n,r,o){this.id=t,this.name=n,this.version=r,this.description=o}async setup(){return{success:!0}}async configure(t){return{success:!0}}async initialize(t){return{success:!0}}async ready(t){return{success:!0}}async postInit(t){return{success:!0}}}M.BasicRemoteModule=Xl,M.LinidZoneRenderer=Ms,M.ModuleLifecyclePhase=As,M.deepEqual=Ls,M.deleteEntityById=pa,M.fromDot=Ql,M.getApiEndpointsConfiguration=Ns,M.getEntities=fa,M.getEntitiesConfiguration=Os,M.getEntityById=da,M.getEntityConfiguration=Wl,M.getHttpClient=Ne,M.getI18nInstance=os,M.getModuleFederation=or,M.getModuleHostConfiguration=Ve,M.getPiniaStore=Lt,M.getUiDesign=gs,M.isObject=gt,M.loadAsyncComponent=sr,M.merge=Ss,M.registerModuleHostConfiguration=ca,M.renameKeys=Ts,M.saveEntity=la,M.setHttpClient=aa,M.setI18nInstance=Ol,M.setModuleFederation=Is,M.setPiniaStore=Fs,M.setUiDesign=Bl,M.uiEventSubject=zn,M.updateEntity=ua,M.useDialog=Ml,M.useFieldValidation=is,M.useLinidConfigurationStore=ql,M.useLinidUiStore=Yl,M.useLinidZoneStore=dr,M.useNotify=Ul,M.usePagination=$l,M.useQuasarFieldValidation=Es,M.useQuasarRules=xl,M.useScopedI18n=ss,M.useUiDesign=Vl,Object.defineProperty(M,Symbol.toStringTag,{value:"Module"})}));
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@linagora/linid-im-front-corelib",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.46",
|
|
4
4
|
"description": "Core library of the LinID Identity Manager project. Provides shared types, services, components, and utilities for front-end and plugin, enabling consistent integration across the LinID ecosystem.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|