@linagora/linid-im-front-corelib 0.0.36 → 0.0.38
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 +105 -80
- package/dist/core-lib.umd.js +10 -10
- package/dist/package.json +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/types/src/index.d.ts +1 -1
- package/dist/types/src/types/uiDesign.d.ts +11 -3
- package/package.json +1 -1
package/dist/core-lib.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as _n from "vue";
|
|
2
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, getCurrentScope as Fo, onScopeDispose as Uo, watch as vn, computed as ke, toRefs as hr, defineComponent as Jt, watchEffect as Mo, openBlock as En, createElementBlock as Er, Fragment as Mt, renderList as xo, createBlock as Vo, resolveDynamicComponent as $o, mergeProps as jo, renderSlot as Bo, createElementVNode as Ho, createCommentVNode as Wo, onMounted as qo, onUnmounted as Go, shallowRef as Yo, h as Ns, createVNode as Ko, Text as Xo } from "vue";
|
|
3
3
|
let xt = null;
|
|
4
|
-
function
|
|
4
|
+
function Du(e) {
|
|
5
5
|
if (xt !== 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 $t = null;
|
|
328
|
-
function
|
|
328
|
+
function ku(e) {
|
|
329
329
|
if ($t !== null) {
|
|
330
330
|
console.warn(
|
|
331
331
|
"[LinID CoreLib] Pinia store has already been initialized. Re-initialization is ignored."
|
|
@@ -355,7 +355,7 @@ const ti = () => ni(er()), ni = /* @__PURE__ */ Zn("linidZoneStore", {
|
|
|
355
355
|
this.zones[e] || (this.zones[e] = []), this.zones[e].push(t);
|
|
356
356
|
}
|
|
357
357
|
}
|
|
358
|
-
}),
|
|
358
|
+
}), Fu = /* @__PURE__ */ Jt({
|
|
359
359
|
__name: "LinidZoneRenderer",
|
|
360
360
|
props: {
|
|
361
361
|
zone: {}
|
|
@@ -2133,25 +2133,25 @@ Q.getAdapter = Ws.getAdapter;
|
|
|
2133
2133
|
Q.HttpStatusCode = kn;
|
|
2134
2134
|
Q.default = Q;
|
|
2135
2135
|
const {
|
|
2136
|
-
Axios:
|
|
2137
|
-
AxiosError:
|
|
2138
|
-
CanceledError:
|
|
2139
|
-
isCancel:
|
|
2140
|
-
CancelToken:
|
|
2141
|
-
VERSION:
|
|
2142
|
-
all:
|
|
2143
|
-
Cancel:
|
|
2144
|
-
isAxiosError:
|
|
2145
|
-
spread:
|
|
2146
|
-
toFormData:
|
|
2147
|
-
AxiosHeaders:
|
|
2136
|
+
Axios: xu,
|
|
2137
|
+
AxiosError: Vu,
|
|
2138
|
+
CanceledError: $u,
|
|
2139
|
+
isCancel: ju,
|
|
2140
|
+
CancelToken: Bu,
|
|
2141
|
+
VERSION: Hu,
|
|
2142
|
+
all: Wu,
|
|
2143
|
+
Cancel: qu,
|
|
2144
|
+
isAxiosError: Gu,
|
|
2145
|
+
spread: Yu,
|
|
2146
|
+
toFormData: Ku,
|
|
2147
|
+
AxiosHeaders: Xu,
|
|
2148
2148
|
HttpStatusCode: xr,
|
|
2149
|
-
formToJSON:
|
|
2150
|
-
getAdapter:
|
|
2151
|
-
mergeConfig:
|
|
2149
|
+
formToJSON: Ju,
|
|
2150
|
+
getAdapter: Qu,
|
|
2151
|
+
mergeConfig: zu
|
|
2152
2152
|
} = Q;
|
|
2153
2153
|
let Bt = null;
|
|
2154
|
-
function
|
|
2154
|
+
function Zu(e) {
|
|
2155
2155
|
if (Bt !== null) {
|
|
2156
2156
|
console.warn(
|
|
2157
2157
|
"[LinID CoreLib] HTTP client has already been initialized. Re-initialization is ignored."
|
|
@@ -2168,7 +2168,7 @@ function Ie() {
|
|
|
2168
2168
|
return Bt;
|
|
2169
2169
|
}
|
|
2170
2170
|
const Ks = /* @__PURE__ */ new Map();
|
|
2171
|
-
function
|
|
2171
|
+
function ef(e) {
|
|
2172
2172
|
Ks.set(e.instanceId, e);
|
|
2173
2173
|
}
|
|
2174
2174
|
function st(e) {
|
|
@@ -2179,25 +2179,25 @@ function st(e) {
|
|
|
2179
2179
|
);
|
|
2180
2180
|
return t;
|
|
2181
2181
|
}
|
|
2182
|
-
async function
|
|
2182
|
+
async function tf(e, t) {
|
|
2183
2183
|
const n = st(e);
|
|
2184
2184
|
return Ie().post(`/${n.apiEndpoint}`, t).then(({ data: r }) => r);
|
|
2185
2185
|
}
|
|
2186
|
-
async function
|
|
2186
|
+
async function nf(e, t, n) {
|
|
2187
2187
|
const r = st(e);
|
|
2188
2188
|
return Ie().put(`/${r.apiEndpoint}/${t}`, n).then(({ data: s }) => s);
|
|
2189
2189
|
}
|
|
2190
|
-
async function
|
|
2190
|
+
async function rf(e, t, n) {
|
|
2191
2191
|
const r = st(e);
|
|
2192
2192
|
return Ie().get(`/${r.apiEndpoint}`, {
|
|
2193
2193
|
params: { ...t, ...n }
|
|
2194
2194
|
}).then(({ data: s }) => s);
|
|
2195
2195
|
}
|
|
2196
|
-
async function
|
|
2196
|
+
async function sf(e, t) {
|
|
2197
2197
|
const n = st(e);
|
|
2198
2198
|
return Ie().get(`/${n.apiEndpoint}/${t}`).then(({ data: r }) => r);
|
|
2199
2199
|
}
|
|
2200
|
-
async function
|
|
2200
|
+
async function of(e, t) {
|
|
2201
2201
|
const n = st(e);
|
|
2202
2202
|
return Ie().delete(`/${n.apiEndpoint}/${t}`);
|
|
2203
2203
|
}
|
|
@@ -2205,7 +2205,8 @@ async function wa(e, t, n) {
|
|
|
2205
2205
|
const r = st(e);
|
|
2206
2206
|
await Ie().post(
|
|
2207
2207
|
`/${r.apiEndpoint}/validate/${t}`,
|
|
2208
|
-
n
|
|
2208
|
+
n,
|
|
2209
|
+
{ headers: { "Content-Type": "application/json" } }
|
|
2209
2210
|
);
|
|
2210
2211
|
}
|
|
2211
2212
|
function Le(e, t) {
|
|
@@ -4952,7 +4953,7 @@ if (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) {
|
|
|
4952
4953
|
}
|
|
4953
4954
|
process.env.NODE_ENV;
|
|
4954
4955
|
let Yt = null;
|
|
4955
|
-
function
|
|
4956
|
+
function af(e) {
|
|
4956
4957
|
if (Yt !== null) {
|
|
4957
4958
|
console.warn(
|
|
4958
4959
|
"[LinID CoreLib] I18n has already been initialized. Re-initialization is ignored."
|
|
@@ -5491,7 +5492,7 @@ var tu = To(function(e) {
|
|
|
5491
5492
|
}, t;
|
|
5492
5493
|
})(Co);
|
|
5493
5494
|
const nu = new Co();
|
|
5494
|
-
function
|
|
5495
|
+
function cf() {
|
|
5495
5496
|
function e(t) {
|
|
5496
5497
|
nu.next({
|
|
5497
5498
|
key: "notify",
|
|
@@ -5500,7 +5501,7 @@ function af() {
|
|
|
5500
5501
|
}
|
|
5501
5502
|
return { Notify: e };
|
|
5502
5503
|
}
|
|
5503
|
-
function
|
|
5504
|
+
function lf() {
|
|
5504
5505
|
function e(n) {
|
|
5505
5506
|
return {
|
|
5506
5507
|
page: (n.page || 1) - 1,
|
|
@@ -5533,7 +5534,7 @@ function ru(e, t) {
|
|
|
5533
5534
|
pattern: (u) => (l) => c(l, u)
|
|
5534
5535
|
};
|
|
5535
5536
|
}
|
|
5536
|
-
function
|
|
5537
|
+
function uf(e, t, n) {
|
|
5537
5538
|
if (!t.hasValidations)
|
|
5538
5539
|
return [];
|
|
5539
5540
|
const { required: r, validateFromApi: s, ...o } = ru(e, t.name), i = n.filter((a) => t.inputSettings?.[a] != null).map(
|
|
@@ -5548,7 +5549,7 @@ function lf(e, t, n) {
|
|
|
5548
5549
|
];
|
|
5549
5550
|
}
|
|
5550
5551
|
let Kt = null;
|
|
5551
|
-
function
|
|
5552
|
+
function ff(e) {
|
|
5552
5553
|
if (Kt !== null) {
|
|
5553
5554
|
console.warn(
|
|
5554
5555
|
"[LinID CoreLib] UI Design has already been initialized. Re-initialization is ignored."
|
|
@@ -5743,6 +5744,29 @@ const ou = [
|
|
|
5743
5744
|
"imgStyle",
|
|
5744
5745
|
"spinnerColor",
|
|
5745
5746
|
"spinnerSize"
|
|
5747
|
+
], Nu = [
|
|
5748
|
+
"autofocus",
|
|
5749
|
+
"stackLabel",
|
|
5750
|
+
"hideHint",
|
|
5751
|
+
"clearable",
|
|
5752
|
+
"clearIcon",
|
|
5753
|
+
"useChips",
|
|
5754
|
+
"labelColor",
|
|
5755
|
+
"color",
|
|
5756
|
+
"bgColor",
|
|
5757
|
+
"dark",
|
|
5758
|
+
"filled",
|
|
5759
|
+
"outlined",
|
|
5760
|
+
"borderless",
|
|
5761
|
+
"standout",
|
|
5762
|
+
"hideBottomSpace",
|
|
5763
|
+
"rounded",
|
|
5764
|
+
"square",
|
|
5765
|
+
"dense",
|
|
5766
|
+
"itemAligned",
|
|
5767
|
+
"inputClass",
|
|
5768
|
+
"inputStyle",
|
|
5769
|
+
"noErrorIcon"
|
|
5746
5770
|
], bs = {
|
|
5747
5771
|
"q-btn": ou,
|
|
5748
5772
|
"q-tabs": iu,
|
|
@@ -5759,7 +5783,8 @@ const ou = [
|
|
|
5759
5783
|
"q-toggle": Eu,
|
|
5760
5784
|
"q-input": gu,
|
|
5761
5785
|
"q-date": bu,
|
|
5762
|
-
"q-img": yu
|
|
5786
|
+
"q-img": yu,
|
|
5787
|
+
"q-file": Nu
|
|
5763
5788
|
};
|
|
5764
5789
|
function ys(e, t) {
|
|
5765
5790
|
return t.split(".").reduce((n, r) => {
|
|
@@ -5767,7 +5792,7 @@ function ys(e, t) {
|
|
|
5767
5792
|
return n[r];
|
|
5768
5793
|
}, e);
|
|
5769
5794
|
}
|
|
5770
|
-
function
|
|
5795
|
+
function Ou(e, t, n) {
|
|
5771
5796
|
let r = ys(e, `${t}.${n}`);
|
|
5772
5797
|
if (r === void 0 && (r = ys(e, `default.${n}`)), typeof r == "object")
|
|
5773
5798
|
throw new Error(
|
|
@@ -5775,39 +5800,39 @@ function Nu(e, t, n) {
|
|
|
5775
5800
|
);
|
|
5776
5801
|
return r;
|
|
5777
5802
|
}
|
|
5778
|
-
function
|
|
5803
|
+
function Su(e) {
|
|
5779
5804
|
if (!(e in bs))
|
|
5780
5805
|
throw new Error(
|
|
5781
5806
|
`[UiDesign] The component '${e}' is not supported for UI design retrieval.`
|
|
5782
5807
|
);
|
|
5783
5808
|
return bs[e];
|
|
5784
5809
|
}
|
|
5785
|
-
function
|
|
5810
|
+
function df() {
|
|
5786
5811
|
const e = ke(() => su());
|
|
5787
5812
|
function t(n, r, s) {
|
|
5788
|
-
const o =
|
|
5813
|
+
const o = Su(r), i = {};
|
|
5789
5814
|
for (const a of o) {
|
|
5790
|
-
const c = s?.[a] ??
|
|
5815
|
+
const c = s?.[a] ?? Ou(e.value, n, `${r}.${String(a)}`);
|
|
5791
5816
|
c !== void 0 && (i[a] = c);
|
|
5792
5817
|
}
|
|
5793
5818
|
return i;
|
|
5794
5819
|
}
|
|
5795
5820
|
return { ui: t };
|
|
5796
5821
|
}
|
|
5797
|
-
async function
|
|
5822
|
+
async function Tu() {
|
|
5798
5823
|
return (await Ie().get("/metadata/entities")).data;
|
|
5799
5824
|
}
|
|
5800
|
-
async function
|
|
5825
|
+
async function pf(e) {
|
|
5801
5826
|
return (await Ie().get(
|
|
5802
5827
|
`/metadata/entities/${e}`
|
|
5803
5828
|
)).data;
|
|
5804
5829
|
}
|
|
5805
|
-
async function
|
|
5830
|
+
async function Lu() {
|
|
5806
5831
|
return (await Ie().get(
|
|
5807
5832
|
"/metadata/routes"
|
|
5808
5833
|
)).data;
|
|
5809
5834
|
}
|
|
5810
|
-
const
|
|
5835
|
+
const mf = () => Au(er()), Au = /* @__PURE__ */ Zn("LinidConfigurationStore", {
|
|
5811
5836
|
state: () => ({
|
|
5812
5837
|
entities: [],
|
|
5813
5838
|
apiEndpoints: [],
|
|
@@ -5838,8 +5863,8 @@ const pf = () => Lu(er()), Lu = /* @__PURE__ */ Zn("LinidConfigurationStore", {
|
|
|
5838
5863
|
this.loading = !0, this.error = null;
|
|
5839
5864
|
try {
|
|
5840
5865
|
const [e, t] = await Promise.all([
|
|
5841
|
-
|
|
5842
|
-
|
|
5866
|
+
Tu(),
|
|
5867
|
+
Lu()
|
|
5843
5868
|
]);
|
|
5844
5869
|
this.entities = e, this.apiEndpoints = t;
|
|
5845
5870
|
} catch (e) {
|
|
@@ -5849,7 +5874,7 @@ const pf = () => Lu(er()), Lu = /* @__PURE__ */ Zn("LinidConfigurationStore", {
|
|
|
5849
5874
|
}
|
|
5850
5875
|
}
|
|
5851
5876
|
}
|
|
5852
|
-
}),
|
|
5877
|
+
}), _f = () => vu(er()), vu = /* @__PURE__ */ Zn("LinidUiStore", {
|
|
5853
5878
|
state: () => ({
|
|
5854
5879
|
mainNavigationItems: []
|
|
5855
5880
|
}),
|
|
@@ -5863,15 +5888,15 @@ const pf = () => Lu(er()), Lu = /* @__PURE__ */ Zn("LinidConfigurationStore", {
|
|
|
5863
5888
|
}
|
|
5864
5889
|
}
|
|
5865
5890
|
});
|
|
5866
|
-
function
|
|
5891
|
+
function Cu(e, t) {
|
|
5867
5892
|
if (!Xt(e) || !Xt(t))
|
|
5868
5893
|
return t;
|
|
5869
5894
|
const n = { ...e };
|
|
5870
5895
|
for (const r of Object.keys(t))
|
|
5871
|
-
n[r] =
|
|
5896
|
+
n[r] = Cu(e[r], t[r]);
|
|
5872
5897
|
return n;
|
|
5873
5898
|
}
|
|
5874
|
-
function
|
|
5899
|
+
function hf(e) {
|
|
5875
5900
|
const t = {};
|
|
5876
5901
|
for (const [n, r] of Object.entries(e)) {
|
|
5877
5902
|
const s = n.split(".");
|
|
@@ -5885,15 +5910,15 @@ function _f(e) {
|
|
|
5885
5910
|
function Xt(e) {
|
|
5886
5911
|
return typeof e == "object" && e !== null && !Array.isArray(e);
|
|
5887
5912
|
}
|
|
5888
|
-
function
|
|
5913
|
+
function Ru(e, t) {
|
|
5889
5914
|
return typeof e != "object" || e === null ? e : Object.fromEntries(
|
|
5890
5915
|
Object.entries(e).map(([n, r]) => {
|
|
5891
|
-
const s = t(n), o = Xt(r) ?
|
|
5916
|
+
const s = t(n), o = Xt(r) ? Ru(r, t) : r;
|
|
5892
5917
|
return [s, o];
|
|
5893
5918
|
})
|
|
5894
5919
|
);
|
|
5895
5920
|
}
|
|
5896
|
-
function
|
|
5921
|
+
function Iu(e, t) {
|
|
5897
5922
|
if (e === t || typeof e == "number" && typeof t == "number" && Number.isNaN(e) && Number.isNaN(t))
|
|
5898
5923
|
return !0;
|
|
5899
5924
|
if (e == null || t == null || typeof e != "object" || typeof t != "object" || Array.isArray(e) !== Array.isArray(t))
|
|
@@ -5903,11 +5928,11 @@ function Ru(e, t) {
|
|
|
5903
5928
|
return !1;
|
|
5904
5929
|
const s = e, o = t;
|
|
5905
5930
|
return n.every(
|
|
5906
|
-
(i) => Object.prototype.hasOwnProperty.call(o, i) &&
|
|
5931
|
+
(i) => Object.prototype.hasOwnProperty.call(o, i) && Iu(s[i], o[i])
|
|
5907
5932
|
);
|
|
5908
5933
|
}
|
|
5909
|
-
var
|
|
5910
|
-
class
|
|
5934
|
+
var Pu = /* @__PURE__ */ ((e) => (e.SETUP = "setup", e.CONFIGURE = "configure", e.INITIALIZE = "initialize", e.READY = "ready", e.POST_INIT = "postInit", e))(Pu || {});
|
|
5935
|
+
class Ef {
|
|
5911
5936
|
/**
|
|
5912
5937
|
* Unique identifier for the module.
|
|
5913
5938
|
*
|
|
@@ -6011,17 +6036,17 @@ class hf {
|
|
|
6011
6036
|
}
|
|
6012
6037
|
}
|
|
6013
6038
|
export {
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6022
|
-
|
|
6023
|
-
|
|
6024
|
-
|
|
6039
|
+
Ef as BasicRemoteModule,
|
|
6040
|
+
Fu as LinidZoneRenderer,
|
|
6041
|
+
Pu as ModuleLifecyclePhase,
|
|
6042
|
+
Iu as deepEqual,
|
|
6043
|
+
of as deleteEntityById,
|
|
6044
|
+
hf as fromDot,
|
|
6045
|
+
Lu as getApiEndpointsConfiguration,
|
|
6046
|
+
rf as getEntities,
|
|
6047
|
+
Tu as getEntitiesConfiguration,
|
|
6048
|
+
sf as getEntityById,
|
|
6049
|
+
pf as getEntityConfiguration,
|
|
6025
6050
|
Ie as getHttpClient,
|
|
6026
6051
|
Vl as getI18nInstance,
|
|
6027
6052
|
Jo as getModuleFederation,
|
|
@@ -6030,25 +6055,25 @@ export {
|
|
|
6030
6055
|
su as getUiDesign,
|
|
6031
6056
|
Xt as isObject,
|
|
6032
6057
|
Qo as loadAsyncComponent,
|
|
6033
|
-
|
|
6034
|
-
|
|
6035
|
-
|
|
6036
|
-
|
|
6037
|
-
|
|
6038
|
-
|
|
6039
|
-
|
|
6040
|
-
|
|
6041
|
-
|
|
6058
|
+
Cu as merge,
|
|
6059
|
+
ef as registerModuleHostConfiguration,
|
|
6060
|
+
Ru as renameKeys,
|
|
6061
|
+
tf as saveEntity,
|
|
6062
|
+
Zu as setHttpClient,
|
|
6063
|
+
af as setI18nInstance,
|
|
6064
|
+
Du as setModuleFederation,
|
|
6065
|
+
ku as setPiniaStore,
|
|
6066
|
+
ff as setUiDesign,
|
|
6042
6067
|
nu as uiEventSubject,
|
|
6043
|
-
|
|
6068
|
+
nf as updateEntity,
|
|
6044
6069
|
Hl as useFieldValidation,
|
|
6045
|
-
|
|
6046
|
-
|
|
6070
|
+
mf as useLinidConfigurationStore,
|
|
6071
|
+
_f as useLinidUiStore,
|
|
6047
6072
|
ti as useLinidZoneStore,
|
|
6048
|
-
|
|
6049
|
-
|
|
6073
|
+
cf as useNotify,
|
|
6074
|
+
lf as usePagination,
|
|
6050
6075
|
ru as useQuasarFieldValidation,
|
|
6051
|
-
|
|
6076
|
+
uf as useQuasarRules,
|
|
6052
6077
|
$l as useScopedI18n,
|
|
6053
|
-
|
|
6078
|
+
df as useUiDesign
|
|
6054
6079
|
};
|