@linagora/linid-im-front-corelib 0.0.34 → 0.0.35
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 +53 -45
- package/dist/core-lib.umd.js +12 -12
- package/dist/package.json +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/types/src/index.d.ts +1 -0
- package/package.json +1 -1
package/dist/core-lib.es.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as _n from "vue";
|
|
2
|
-
import { defineAsyncComponent as Io, hasInjectionContext as An, inject as Ut, getCurrentInstance as Po, ref as pt, reactive as wo, markRaw as ft, effectScope as Do, isRef as mt, isReactive as zn, toRef as hn, toRaw as ko, nextTick as _r, computed as
|
|
2
|
+
import { defineAsyncComponent as Io, hasInjectionContext as An, inject as Ut, getCurrentInstance as Po, ref as pt, reactive as wo, markRaw as ft, effectScope as Do, isRef as mt, isReactive as zn, toRef as hn, toRaw as ko, nextTick as _r, computed as ke, getCurrentScope as Fo, onScopeDispose as Uo, watch as vn, toRefs as hr, defineComponent as Jt, watchEffect as Mo, createElementBlock as Er, openBlock as En, Fragment as Mt, renderSlot as xo, createCommentVNode as Vo, renderList as $o, createBlock as jo, resolveDynamicComponent as Bo, mergeProps as Ho, createElementVNode as Wo, shallowRef as qo, onMounted as Go, onUnmounted as Yo, h as Ns, createVNode as Ko, Text as Xo } from "vue";
|
|
3
3
|
let xt = null;
|
|
4
4
|
function wu(e) {
|
|
5
5
|
if (xt !== null) {
|
|
@@ -94,7 +94,7 @@ function Nr(e, t, n, r) {
|
|
|
94
94
|
// use ref() to unwrap refs inside state TODO: check if this is still necessary
|
|
95
95
|
hr(pt(s ? s() : {}).value)
|
|
96
96
|
) : hr(n.state.value[e]);
|
|
97
|
-
return pe(l, o, Object.keys(i || {}).reduce((p, g) => (process.env.NODE_ENV !== "production" && g in l && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${g}" in store "${e}".`), p[g] = ft(
|
|
97
|
+
return pe(l, o, Object.keys(i || {}).reduce((p, g) => (process.env.NODE_ENV !== "production" && g in l && console.warn(`[🍍]: A getter cannot have the same name as another state property. Rename one of them. Found with "${g}" in store "${e}".`), p[g] = ft(ke(() => {
|
|
98
98
|
Vt(n);
|
|
99
99
|
const A = n._s.get(e);
|
|
100
100
|
return i[g].call(A, A);
|
|
@@ -156,7 +156,7 @@ function In(e, t, n = {}, r, s, o) {
|
|
|
156
156
|
function se(z) {
|
|
157
157
|
ne.add(z);
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function we(z) {
|
|
160
160
|
be.add(z);
|
|
161
161
|
}
|
|
162
162
|
Qe(g, {
|
|
@@ -164,7 +164,7 @@ function In(e, t, n = {}, r, s, o) {
|
|
|
164
164
|
name: k[gn],
|
|
165
165
|
store: _,
|
|
166
166
|
after: se,
|
|
167
|
-
onError:
|
|
167
|
+
onError: we
|
|
168
168
|
});
|
|
169
169
|
let Z;
|
|
170
170
|
try {
|
|
@@ -252,7 +252,7 @@ function In(e, t, n = {}, r, s, o) {
|
|
|
252
252
|
for (const P in I._hmrPayload.getters) {
|
|
253
253
|
const k = I._hmrPayload.getters[P], W = o ? (
|
|
254
254
|
// special handling of options api
|
|
255
|
-
|
|
255
|
+
ke(() => (Vt(r), k.call(_, _)))
|
|
256
256
|
) : k;
|
|
257
257
|
_[P] = //
|
|
258
258
|
W;
|
|
@@ -1629,15 +1629,15 @@ const Bs = (e) => {
|
|
|
1629
1629
|
duplex: "half"
|
|
1630
1630
|
}), ye;
|
|
1631
1631
|
if (h.isFormData(m) && (ye = ce.headers.get("content-type")) && x.setContentType(ye), ce.body) {
|
|
1632
|
-
const [Me,
|
|
1632
|
+
const [Me, De] = vr(
|
|
1633
1633
|
be,
|
|
1634
1634
|
jt(Cr(R))
|
|
1635
1635
|
);
|
|
1636
|
-
m = Ir(ce.body, Pr, Me,
|
|
1636
|
+
m = Ir(ce.body, Pr, Me, De);
|
|
1637
1637
|
}
|
|
1638
1638
|
}
|
|
1639
1639
|
h.isString(U) || (U = U ? "include" : "omit");
|
|
1640
|
-
const se = o && "credentials" in n.prototype,
|
|
1640
|
+
const se = o && "credentials" in n.prototype, we = {
|
|
1641
1641
|
...I,
|
|
1642
1642
|
signal: k,
|
|
1643
1643
|
method: S.toUpperCase(),
|
|
@@ -1646,21 +1646,21 @@ const Bs = (e) => {
|
|
|
1646
1646
|
duplex: "half",
|
|
1647
1647
|
credentials: se ? U : void 0
|
|
1648
1648
|
};
|
|
1649
|
-
W = o && new n(b,
|
|
1650
|
-
let Z = await (o ? P(W, I) : P(b,
|
|
1649
|
+
W = o && new n(b, we);
|
|
1650
|
+
let Z = await (o ? P(W, I) : P(b, we));
|
|
1651
1651
|
const z = l && (_ === "stream" || _ === "response");
|
|
1652
1652
|
if (l && (C || z && ne)) {
|
|
1653
1653
|
const ce = {};
|
|
1654
1654
|
["status", "statusText", "headers"].forEach((Xe) => {
|
|
1655
1655
|
ce[Xe] = Z[Xe];
|
|
1656
1656
|
});
|
|
1657
|
-
const ye = h.toFiniteNumber(Z.headers.get("content-length")), [Me,
|
|
1657
|
+
const ye = h.toFiniteNumber(Z.headers.get("content-length")), [Me, De] = C && vr(
|
|
1658
1658
|
ye,
|
|
1659
1659
|
jt(Cr(C), !0)
|
|
1660
1660
|
) || [];
|
|
1661
1661
|
Z = new r(
|
|
1662
1662
|
Ir(Z.body, Pr, Me, () => {
|
|
1663
|
-
|
|
1663
|
+
De && De(), ne && ne();
|
|
1664
1664
|
}),
|
|
1665
1665
|
ce
|
|
1666
1666
|
);
|
|
@@ -2160,7 +2160,7 @@ function zu(e) {
|
|
|
2160
2160
|
}
|
|
2161
2161
|
Bt = e;
|
|
2162
2162
|
}
|
|
2163
|
-
function
|
|
2163
|
+
function Ie() {
|
|
2164
2164
|
if (Bt === null)
|
|
2165
2165
|
throw new Error(
|
|
2166
2166
|
"[LinID CoreLib] HTTP client is not initialized. Call setHttpClient() first."
|
|
@@ -2181,29 +2181,29 @@ function st(e) {
|
|
|
2181
2181
|
}
|
|
2182
2182
|
async function ef(e, t) {
|
|
2183
2183
|
const n = st(e);
|
|
2184
|
-
return
|
|
2184
|
+
return Ie().post(`/${n.apiEndpoint}`, t).then(({ data: r }) => r);
|
|
2185
2185
|
}
|
|
2186
2186
|
async function tf(e, t, n) {
|
|
2187
2187
|
const r = st(e);
|
|
2188
|
-
return
|
|
2188
|
+
return Ie().put(`/${r.apiEndpoint}/${t}`, n).then(({ data: s }) => s);
|
|
2189
2189
|
}
|
|
2190
2190
|
async function nf(e, t, n) {
|
|
2191
2191
|
const r = st(e);
|
|
2192
|
-
return
|
|
2192
|
+
return Ie().get(`/${r.apiEndpoint}`, {
|
|
2193
2193
|
params: { ...t, ...n }
|
|
2194
2194
|
}).then(({ data: s }) => s);
|
|
2195
2195
|
}
|
|
2196
2196
|
async function rf(e, t) {
|
|
2197
2197
|
const n = st(e);
|
|
2198
|
-
return
|
|
2198
|
+
return Ie().get(`/${n.apiEndpoint}/${t}`).then(({ data: r }) => r);
|
|
2199
2199
|
}
|
|
2200
2200
|
async function sf(e, t) {
|
|
2201
2201
|
const n = st(e);
|
|
2202
|
-
return
|
|
2202
|
+
return Ie().delete(`/${n.apiEndpoint}/${t}`);
|
|
2203
2203
|
}
|
|
2204
2204
|
async function wa(e, t, n) {
|
|
2205
2205
|
const r = st(e);
|
|
2206
|
-
await
|
|
2206
|
+
await Ie().post(
|
|
2207
2207
|
`/${r.apiEndpoint}/validate/${t}`,
|
|
2208
2208
|
n
|
|
2209
2209
|
);
|
|
@@ -2230,7 +2230,7 @@ const ka = /\{([0-9a-zA-Z]+)\}/g;
|
|
|
2230
2230
|
function nn(e, ...t) {
|
|
2231
2231
|
return t.length === 1 && j(t[0]) && (t = t[0]), (!t || !t.hasOwnProperty) && (t = {}), e.replace(ka, (n, r) => t.hasOwnProperty(r) ? t[r] : "");
|
|
2232
2232
|
}
|
|
2233
|
-
const
|
|
2233
|
+
const Pe = (e, t = !1) => t ? Symbol.for(e) : Symbol(e), Fa = (e, t, n) => Ua({ l: e, k: t, s: n }), Ua = (e) => JSON.stringify(e).replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029").replace(/\u0027/g, "\\u0027"), ee = (e) => typeof e == "number" && isFinite(e), Ma = (e) => or(e) === "[object Date]", Ht = (e) => or(e) === "[object RegExp]", rn = (e) => $(e) && Object.keys(e).length === 0, te = Object.assign, xa = Object.create, H = (e = null) => xa(e);
|
|
2234
2234
|
let $r;
|
|
2235
2235
|
const He = () => $r || ($r = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : typeof global < "u" ? global : H());
|
|
2236
2236
|
function jr(e) {
|
|
@@ -2569,12 +2569,12 @@ function rc(e, t = {}) {
|
|
|
2569
2569
|
function se(f) {
|
|
2570
2570
|
return k(f, be);
|
|
2571
2571
|
}
|
|
2572
|
-
function
|
|
2572
|
+
function we(f) {
|
|
2573
2573
|
const d = f.charCodeAt(0);
|
|
2574
2574
|
return d >= 48 && d <= 57;
|
|
2575
2575
|
}
|
|
2576
2576
|
function Z(f) {
|
|
2577
|
-
return k(f,
|
|
2577
|
+
return k(f, we);
|
|
2578
2578
|
}
|
|
2579
2579
|
function z(f) {
|
|
2580
2580
|
const d = f.charCodeAt(0);
|
|
@@ -2622,7 +2622,7 @@ function rc(e, t = {}) {
|
|
|
2622
2622
|
}
|
|
2623
2623
|
return f.currentChar() === Ae && p(F.UNTERMINATED_CLOSING_BRACE, o(), 0), L;
|
|
2624
2624
|
}
|
|
2625
|
-
function
|
|
2625
|
+
function De(f) {
|
|
2626
2626
|
S(f);
|
|
2627
2627
|
let d = "";
|
|
2628
2628
|
return f.currentChar() === "-" ? (f.next(), d += `-${ce(f)}`) : d += ce(f), f.currentChar() === Ae && p(F.UNTERMINATED_CLOSING_BRACE, o(), 0), d;
|
|
@@ -2725,7 +2725,7 @@ function rc(e, t = {}) {
|
|
|
2725
2725
|
if (q = T(f, d))
|
|
2726
2726
|
return L = g(d, 4, Me(f)), S(f), L;
|
|
2727
2727
|
if (Y = y(f, d))
|
|
2728
|
-
return L = g(d, 5,
|
|
2728
|
+
return L = g(d, 5, De(f)), S(f), L;
|
|
2729
2729
|
if (V = C(f, d))
|
|
2730
2730
|
return L = g(d, 6, pr(f)), S(f), L;
|
|
2731
2731
|
if (!q && !Y && !V)
|
|
@@ -4384,7 +4384,7 @@ const Sl = {
|
|
|
4384
4384
|
[re.NOT_INSTALLED_WITH_PROVIDE]: "Need to install with `provide` function",
|
|
4385
4385
|
[re.NOT_COMPATIBLE_LEGACY_VUE_I18N]: "Not compatible legacy VueI18n.",
|
|
4386
4386
|
[re.NOT_AVAILABLE_COMPOSITION_IN_LEGACY]: "Not available Compostion API in Legacy API mode. Please make sure that the legacy API mode is working properly"
|
|
4387
|
-
}, $n = /* @__PURE__ */
|
|
4387
|
+
}, $n = /* @__PURE__ */ Pe("__translateVNode"), jn = /* @__PURE__ */ Pe("__datetimeParts"), Bn = /* @__PURE__ */ Pe("__numberParts"), Hn = /* @__PURE__ */ Pe("__enableEmitter"), Wn = /* @__PURE__ */ Pe("__disableEmitter"), Tl = Pe("__setPluralRules"), bo = /* @__PURE__ */ Pe("__injectWithOption"), qn = /* @__PURE__ */ Pe("__dispose"), Te = {
|
|
4388
4388
|
FALLBACK_TO_ROOT: Jc,
|
|
4389
4389
|
// 8
|
|
4390
4390
|
NOT_FOUND_PARENT_SCOPE: 9,
|
|
@@ -4549,24 +4549,24 @@ function Rl(e = {}) {
|
|
|
4549
4549
|
p.value
|
|
4550
4550
|
];
|
|
4551
4551
|
}
|
|
4552
|
-
const I =
|
|
4552
|
+
const I = ke({
|
|
4553
4553
|
get: () => a.value,
|
|
4554
4554
|
set: (O) => {
|
|
4555
4555
|
_.locale = O, a.value = O;
|
|
4556
4556
|
}
|
|
4557
|
-
}), P =
|
|
4557
|
+
}), P = ke({
|
|
4558
4558
|
get: () => c.value,
|
|
4559
4559
|
set: (O) => {
|
|
4560
4560
|
_.fallbackLocale = O, c.value = O, ut(_, a.value, O);
|
|
4561
4561
|
}
|
|
4562
|
-
}), k =
|
|
4562
|
+
}), k = ke(() => u.value), W = /* @__PURE__ */ ke(() => l.value), ne = /* @__PURE__ */ ke(() => p.value);
|
|
4563
4563
|
function be() {
|
|
4564
4564
|
return G(N) ? N : null;
|
|
4565
4565
|
}
|
|
4566
4566
|
function se(O) {
|
|
4567
4567
|
N = O, _.postTranslation = O;
|
|
4568
4568
|
}
|
|
4569
|
-
function
|
|
4569
|
+
function we() {
|
|
4570
4570
|
return S;
|
|
4571
4571
|
}
|
|
4572
4572
|
function Z(O) {
|
|
@@ -4617,7 +4617,7 @@ function Rl(e = {}) {
|
|
|
4617
4617
|
function Me(...O) {
|
|
4618
4618
|
return _e((v) => Reflect.apply(ts, null, [v, ...O]), () => Mn(...O), "datetime format", (v) => Reflect.apply(v.d, v, [...O]), () => qt, (v) => w(v) || J(v));
|
|
4619
4619
|
}
|
|
4620
|
-
function
|
|
4620
|
+
function De(...O) {
|
|
4621
4621
|
return _e((v) => Reflect.apply(rs, null, [v, ...O]), () => xn(...O), "number format", (v) => Reflect.apply(v.n, v, [...O]), () => qt, (v) => w(v) || J(v));
|
|
4622
4622
|
}
|
|
4623
4623
|
function Xe(O) {
|
|
@@ -4781,11 +4781,11 @@ function Rl(e = {}) {
|
|
|
4781
4781
|
mergeLocaleMessage: mn,
|
|
4782
4782
|
getPostTranslationHandler: be,
|
|
4783
4783
|
setPostTranslationHandler: se,
|
|
4784
|
-
getMissingHandler:
|
|
4784
|
+
getMissingHandler: we,
|
|
4785
4785
|
setMissingHandler: Z,
|
|
4786
4786
|
[Tl]: dn
|
|
4787
4787
|
};
|
|
4788
|
-
return V.datetimeFormats = W, V.numberFormats = ne, V.rt = ye, V.te = pn, V.tm = at, V.d = Me, V.n =
|
|
4788
|
+
return V.datetimeFormats = W, V.numberFormats = ne, V.rt = ye, V.te = pn, V.tm = at, V.d = Me, V.n = De, V.getDateTimeFormat = f, V.setDateTimeFormat = d, V.mergeDateTimeFormat = L, V.getNumberFormat = D, V.setNumberFormat = q, V.mergeNumberFormat = Y, V[bo] = n, V[$n] = St, V[jn] = Tt, V[Bn] = fn, process.env.NODE_ENV !== "production" && (V[Hn] = (O) => {
|
|
4789
4789
|
_.__v_emitter = O;
|
|
4790
4790
|
}, V[Wn] = () => {
|
|
4791
4791
|
_.__v_emitter = void 0;
|
|
@@ -4862,7 +4862,7 @@ te({
|
|
|
4862
4862
|
type: [String, Object]
|
|
4863
4863
|
}
|
|
4864
4864
|
}, dr);
|
|
4865
|
-
const wl = /* @__PURE__ */
|
|
4865
|
+
const wl = /* @__PURE__ */ Pe("global-vue-i18n");
|
|
4866
4866
|
function an(e = {}) {
|
|
4867
4867
|
const t = fr();
|
|
4868
4868
|
if (t == null)
|
|
@@ -5783,7 +5783,7 @@ function Ou(e) {
|
|
|
5783
5783
|
return bs[e];
|
|
5784
5784
|
}
|
|
5785
5785
|
function ff() {
|
|
5786
|
-
const e =
|
|
5786
|
+
const e = ke(() => su());
|
|
5787
5787
|
function t(n, r, s) {
|
|
5788
5788
|
const o = Ou(r), i = {};
|
|
5789
5789
|
for (const a of o) {
|
|
@@ -5795,14 +5795,19 @@ function ff() {
|
|
|
5795
5795
|
return { ui: t };
|
|
5796
5796
|
}
|
|
5797
5797
|
async function Su() {
|
|
5798
|
-
return (await
|
|
5798
|
+
return (await Ie().get("/metadata/entities")).data;
|
|
5799
|
+
}
|
|
5800
|
+
async function df(e) {
|
|
5801
|
+
return (await Ie().get(
|
|
5802
|
+
`/metadata/entities/${e}`
|
|
5803
|
+
)).data;
|
|
5799
5804
|
}
|
|
5800
5805
|
async function Tu() {
|
|
5801
|
-
return (await
|
|
5806
|
+
return (await Ie().get(
|
|
5802
5807
|
"/metadata/routes"
|
|
5803
5808
|
)).data;
|
|
5804
5809
|
}
|
|
5805
|
-
const
|
|
5810
|
+
const pf = () => Lu(er()), Lu = /* @__PURE__ */ Zn("LinidConfigurationStore", {
|
|
5806
5811
|
state: () => ({
|
|
5807
5812
|
entities: [],
|
|
5808
5813
|
apiEndpoints: [],
|
|
@@ -5844,7 +5849,7 @@ const df = () => Lu(er()), Lu = /* @__PURE__ */ Zn("LinidConfigurationStore", {
|
|
|
5844
5849
|
}
|
|
5845
5850
|
}
|
|
5846
5851
|
}
|
|
5847
|
-
}),
|
|
5852
|
+
}), mf = () => Au(er()), Au = /* @__PURE__ */ Zn("LinidUiStore", {
|
|
5848
5853
|
state: () => ({
|
|
5849
5854
|
mainNavigationItems: []
|
|
5850
5855
|
}),
|
|
@@ -5866,7 +5871,7 @@ function vu(e, t) {
|
|
|
5866
5871
|
n[r] = vu(e[r], t[r]);
|
|
5867
5872
|
return n;
|
|
5868
5873
|
}
|
|
5869
|
-
function
|
|
5874
|
+
function _f(e) {
|
|
5870
5875
|
const t = {};
|
|
5871
5876
|
for (const [n, r] of Object.entries(e)) {
|
|
5872
5877
|
const s = n.split(".");
|
|
@@ -5902,7 +5907,7 @@ function Ru(e, t) {
|
|
|
5902
5907
|
);
|
|
5903
5908
|
}
|
|
5904
5909
|
var Iu = /* @__PURE__ */ ((e) => (e.SETUP = "setup", e.CONFIGURE = "configure", e.INITIALIZE = "initialize", e.READY = "ready", e.POST_INIT = "postInit", e))(Iu || {});
|
|
5905
|
-
class
|
|
5910
|
+
class hf {
|
|
5906
5911
|
/**
|
|
5907
5912
|
* Unique identifier for the module.
|
|
5908
5913
|
*
|
|
@@ -6006,15 +6011,18 @@ class _f {
|
|
|
6006
6011
|
}
|
|
6007
6012
|
}
|
|
6008
6013
|
export {
|
|
6009
|
-
|
|
6014
|
+
hf as BasicRemoteModule,
|
|
6010
6015
|
ku as LinidZoneRenderer,
|
|
6011
6016
|
Iu as ModuleLifecyclePhase,
|
|
6012
6017
|
Ru as deepEqual,
|
|
6013
6018
|
sf as deleteEntityById,
|
|
6014
|
-
|
|
6019
|
+
_f as fromDot,
|
|
6020
|
+
Tu as getApiEndpointsConfiguration,
|
|
6015
6021
|
nf as getEntities,
|
|
6022
|
+
Su as getEntitiesConfiguration,
|
|
6016
6023
|
rf as getEntityById,
|
|
6017
|
-
|
|
6024
|
+
df as getEntityConfiguration,
|
|
6025
|
+
Ie as getHttpClient,
|
|
6018
6026
|
Vl as getI18nInstance,
|
|
6019
6027
|
Jo as getModuleFederation,
|
|
6020
6028
|
st as getModuleHostConfiguration,
|
|
@@ -6034,8 +6042,8 @@ export {
|
|
|
6034
6042
|
nu as uiEventSubject,
|
|
6035
6043
|
tf as updateEntity,
|
|
6036
6044
|
Hl as useFieldValidation,
|
|
6037
|
-
|
|
6038
|
-
|
|
6045
|
+
pf as useLinidConfigurationStore,
|
|
6046
|
+
mf as useLinidUiStore,
|
|
6039
6047
|
ti as useLinidZoneStore,
|
|
6040
6048
|
af as useNotify,
|
|
6041
6049
|
cf as usePagination,
|