@linagora/linid-im-front-corelib 0.0.57 → 0.0.58
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/README.md +4 -0
- package/dist/core-lib.es.js +107 -78
- package/dist/core-lib.umd.js +11 -11
- package/dist/package.json +1 -1
- package/dist/tsconfig.lib.tsbuildinfo +1 -1
- package/dist/types/src/composables/useTree.d.ts +16 -0
- package/dist/types/src/index.d.ts +3 -1
- package/dist/types/src/types/linidTree.d.ts +21 -0
- package/dist/types/src/types/uiDesign.d.ts +11 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -117,6 +117,10 @@ A full technical documentation is available in the `docs/` directory:
|
|
|
117
117
|
Learn how to implement field validation compatible with Quasar framework.
|
|
118
118
|
→ [`docs/field-validation.md`](docs/field-validation.md)
|
|
119
119
|
|
|
120
|
+
- 🌳 **Tree (`useTree`)**
|
|
121
|
+
Learn how to convert between LinID tree models and Quasar QTree component formats.
|
|
122
|
+
→ [`docs/useTree.md`](docs/useTree.md)
|
|
123
|
+
|
|
120
124
|
More documents will be added as the library evolves.
|
|
121
125
|
|
|
122
126
|
---
|
package/dist/core-lib.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as bn from "vue";
|
|
2
2
|
import { defineAsyncComponent as $s, hasInjectionContext as wn, inject as xt, getCurrentInstance as Bs, ref as Jt, reactive as js, markRaw as mt, effectScope as Hs, isRef as ht, isReactive as ir, toRef as yn, toRaw as qs, nextTick as Or, getCurrentScope as Ws, onScopeDispose as Gs, watch as Dn, computed as Ue, toRefs as Sr, defineComponent as zt, openBlock as Nn, createElementBlock as Tr, Fragment as Vt, renderList as Ys, unref as Ar, createBlock as Ks, resolveDynamicComponent as Xs, mergeProps as Qs, renderSlot as Js, createCommentVNode as zs, onMounted as Io, onUnmounted as Po, shallowRef as Zs, h as wo, createVNode as ei, Text as ti } from "vue";
|
|
3
3
|
let $t = null;
|
|
4
|
-
function
|
|
4
|
+
function zu(e) {
|
|
5
5
|
if ($t !== 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 s.$id = e, s;
|
|
326
326
|
}
|
|
327
327
|
let jt = null;
|
|
328
|
-
function
|
|
328
|
+
function Zu(e) {
|
|
329
329
|
if (jt !== null) {
|
|
330
330
|
console.warn(
|
|
331
331
|
"[LinID CoreLib] Pinia store has already been initialized. Re-initialization is ignored."
|
|
@@ -364,7 +364,7 @@ const ai = () => ci(en()), ci = /* @__PURE__ */ Zt("linidZoneStore", {
|
|
|
364
364
|
this.zones[e]?.some(({ plugin: n }) => n === t.plugin) || this.register(e, t);
|
|
365
365
|
}
|
|
366
366
|
}
|
|
367
|
-
}),
|
|
367
|
+
}), ef = /* @__PURE__ */ zt({
|
|
368
368
|
inheritAttrs: !1,
|
|
369
369
|
__name: "LinidZoneRenderer",
|
|
370
370
|
props: {
|
|
@@ -847,7 +847,7 @@ var yi = Fo(function(e) {
|
|
|
847
847
|
}, t;
|
|
848
848
|
})(Vo);
|
|
849
849
|
const $o = new Vo();
|
|
850
|
-
function
|
|
850
|
+
function tf(e, t) {
|
|
851
851
|
const n = Jt(!1);
|
|
852
852
|
let r;
|
|
853
853
|
function o(s) {
|
|
@@ -2728,25 +2728,25 @@ J.getAdapter = ss.getAdapter;
|
|
|
2728
2728
|
J.HttpStatusCode = Gn;
|
|
2729
2729
|
J.default = J;
|
|
2730
2730
|
const {
|
|
2731
|
-
Axios:
|
|
2732
|
-
AxiosError:
|
|
2733
|
-
CanceledError:
|
|
2734
|
-
isCancel:
|
|
2735
|
-
CancelToken:
|
|
2736
|
-
VERSION:
|
|
2737
|
-
all:
|
|
2738
|
-
Cancel:
|
|
2739
|
-
isAxiosError:
|
|
2740
|
-
spread:
|
|
2741
|
-
toFormData:
|
|
2742
|
-
AxiosHeaders:
|
|
2731
|
+
Axios: sf,
|
|
2732
|
+
AxiosError: af,
|
|
2733
|
+
CanceledError: cf,
|
|
2734
|
+
isCancel: lf,
|
|
2735
|
+
CancelToken: uf,
|
|
2736
|
+
VERSION: ff,
|
|
2737
|
+
all: df,
|
|
2738
|
+
Cancel: pf,
|
|
2739
|
+
isAxiosError: mf,
|
|
2740
|
+
spread: _f,
|
|
2741
|
+
toFormData: hf,
|
|
2742
|
+
AxiosHeaders: Ef,
|
|
2743
2743
|
HttpStatusCode: zr,
|
|
2744
|
-
formToJSON:
|
|
2745
|
-
getAdapter:
|
|
2746
|
-
mergeConfig:
|
|
2744
|
+
formToJSON: gf,
|
|
2745
|
+
getAdapter: bf,
|
|
2746
|
+
mergeConfig: yf
|
|
2747
2747
|
} = J;
|
|
2748
2748
|
let qt = null;
|
|
2749
|
-
function
|
|
2749
|
+
function Nf(e) {
|
|
2750
2750
|
if (qt !== null) {
|
|
2751
2751
|
console.warn(
|
|
2752
2752
|
"[LinID CoreLib] HTTP client has already been initialized. Re-initialization is ignored."
|
|
@@ -2763,7 +2763,7 @@ function we() {
|
|
|
2763
2763
|
return qt;
|
|
2764
2764
|
}
|
|
2765
2765
|
const ls = /* @__PURE__ */ new Map();
|
|
2766
|
-
function
|
|
2766
|
+
function Of(e) {
|
|
2767
2767
|
ls.set(e.instanceId, e);
|
|
2768
2768
|
}
|
|
2769
2769
|
function at(e) {
|
|
@@ -2774,25 +2774,25 @@ function at(e) {
|
|
|
2774
2774
|
);
|
|
2775
2775
|
return t;
|
|
2776
2776
|
}
|
|
2777
|
-
async function
|
|
2777
|
+
async function Sf(e, t) {
|
|
2778
2778
|
const n = at(e);
|
|
2779
2779
|
return we().post(`/${n.apiEndpoint}`, t).then(({ data: r }) => r);
|
|
2780
2780
|
}
|
|
2781
|
-
async function
|
|
2781
|
+
async function Tf(e, t, n) {
|
|
2782
2782
|
const r = at(e);
|
|
2783
2783
|
return we().put(`/${r.apiEndpoint}/${t}`, n).then(({ data: o }) => o);
|
|
2784
2784
|
}
|
|
2785
|
-
async function
|
|
2785
|
+
async function Af(e, t, n) {
|
|
2786
2786
|
const r = at(e);
|
|
2787
2787
|
return we().get(`/${r.apiEndpoint}`, {
|
|
2788
2788
|
params: { ...t, ...n }
|
|
2789
2789
|
}).then(({ data: o }) => o);
|
|
2790
2790
|
}
|
|
2791
|
-
async function
|
|
2791
|
+
async function Lf(e, t) {
|
|
2792
2792
|
const n = at(e);
|
|
2793
2793
|
return we().get(`/${n.apiEndpoint}/${t}`).then(({ data: r }) => r);
|
|
2794
2794
|
}
|
|
2795
|
-
async function
|
|
2795
|
+
async function Rf(e, t) {
|
|
2796
2796
|
const n = at(e);
|
|
2797
2797
|
return we().delete(`/${n.apiEndpoint}/${t}`);
|
|
2798
2798
|
}
|
|
@@ -2812,7 +2812,7 @@ function ec(e, t) {
|
|
|
2812
2812
|
n[r] = ec(e[r], t[r]);
|
|
2813
2813
|
return n;
|
|
2814
2814
|
}
|
|
2815
|
-
function
|
|
2815
|
+
function vf(e) {
|
|
2816
2816
|
const t = {};
|
|
2817
2817
|
for (const [n, r] of Object.entries(e)) {
|
|
2818
2818
|
const o = n.split(".");
|
|
@@ -5637,7 +5637,7 @@ if (process.env.NODE_ENV !== "production" || __INTLIFY_PROD_DEVTOOLS__) {
|
|
|
5637
5637
|
}
|
|
5638
5638
|
process.env.NODE_ENV;
|
|
5639
5639
|
let Kt = null;
|
|
5640
|
-
function
|
|
5640
|
+
function Cf(e) {
|
|
5641
5641
|
if (Kt !== null) {
|
|
5642
5642
|
console.warn(
|
|
5643
5643
|
"[LinID CoreLib] I18n has already been initialized. Re-initialization is ignored."
|
|
@@ -5730,7 +5730,7 @@ function fu(e) {
|
|
|
5730
5730
|
unique: f
|
|
5731
5731
|
};
|
|
5732
5732
|
}
|
|
5733
|
-
function
|
|
5733
|
+
function If() {
|
|
5734
5734
|
function e(t) {
|
|
5735
5735
|
$o.next({
|
|
5736
5736
|
key: "notify",
|
|
@@ -5739,7 +5739,7 @@ function Cf() {
|
|
|
5739
5739
|
}
|
|
5740
5740
|
return { Notify: e };
|
|
5741
5741
|
}
|
|
5742
|
-
function
|
|
5742
|
+
function Pf() {
|
|
5743
5743
|
function e(n) {
|
|
5744
5744
|
return {
|
|
5745
5745
|
page: (n.page || 1) - 1,
|
|
@@ -5784,7 +5784,7 @@ function du(e, t) {
|
|
|
5784
5784
|
unique: (p) => (m) => f(m, p)
|
|
5785
5785
|
};
|
|
5786
5786
|
}
|
|
5787
|
-
function
|
|
5787
|
+
function wf(e, t, n) {
|
|
5788
5788
|
if (!t.hasValidations)
|
|
5789
5789
|
return [];
|
|
5790
5790
|
const { required: r, validateFromApi: o, ...s } = du(e, t.name), i = n.filter((a) => t.inputSettings?.[a] != null).map(
|
|
@@ -5799,7 +5799,7 @@ function Pf(e, t, n) {
|
|
|
5799
5799
|
];
|
|
5800
5800
|
}
|
|
5801
5801
|
let Xt = null;
|
|
5802
|
-
function
|
|
5802
|
+
function Df(e) {
|
|
5803
5803
|
if (Xt !== null) {
|
|
5804
5804
|
console.warn(
|
|
5805
5805
|
"[LinID CoreLib] UI Design has already been initialized. Re-initialization is ignored."
|
|
@@ -6184,6 +6184,20 @@ const mu = [
|
|
|
6184
6184
|
"transitionShow",
|
|
6185
6185
|
"transitionHide",
|
|
6186
6186
|
"transitionDuration"
|
|
6187
|
+
], ju = [
|
|
6188
|
+
"tickStrategy",
|
|
6189
|
+
"noSelectionUnset",
|
|
6190
|
+
"defaultExpandAll",
|
|
6191
|
+
"accordion",
|
|
6192
|
+
"noTransition",
|
|
6193
|
+
"noConnectors",
|
|
6194
|
+
"color",
|
|
6195
|
+
"controlColor",
|
|
6196
|
+
"textColor",
|
|
6197
|
+
"selectedColor",
|
|
6198
|
+
"dense",
|
|
6199
|
+
"dark",
|
|
6200
|
+
"duration"
|
|
6187
6201
|
], vo = {
|
|
6188
6202
|
"q-avatar": yu,
|
|
6189
6203
|
"q-badge": Nu,
|
|
@@ -6212,7 +6226,8 @@ const mu = [
|
|
|
6212
6226
|
"q-tabs": _u,
|
|
6213
6227
|
"q-toggle": Lu,
|
|
6214
6228
|
"q-toolbar": gu,
|
|
6215
|
-
"q-toolbar-title": bu
|
|
6229
|
+
"q-toolbar-title": bu,
|
|
6230
|
+
"q-tree": ju
|
|
6216
6231
|
};
|
|
6217
6232
|
function Co(e, t) {
|
|
6218
6233
|
return t.split(".").reduce((n, r) => {
|
|
@@ -6220,7 +6235,7 @@ function Co(e, t) {
|
|
|
6220
6235
|
return n[r];
|
|
6221
6236
|
}, e);
|
|
6222
6237
|
}
|
|
6223
|
-
function
|
|
6238
|
+
function Hu(e, t, n) {
|
|
6224
6239
|
let r = Co(e, `${t}.${n}`);
|
|
6225
6240
|
if (r === void 0 && (r = Co(e, `default.${n}`)), typeof r == "object")
|
|
6226
6241
|
throw new Error(
|
|
@@ -6228,39 +6243,52 @@ function ju(e, t, n) {
|
|
|
6228
6243
|
);
|
|
6229
6244
|
return r;
|
|
6230
6245
|
}
|
|
6231
|
-
function
|
|
6246
|
+
function qu(e) {
|
|
6232
6247
|
if (!(e in vo))
|
|
6233
6248
|
throw new Error(
|
|
6234
6249
|
`[UiDesign] The component '${e}' is not supported for UI design retrieval.`
|
|
6235
6250
|
);
|
|
6236
6251
|
return vo[e];
|
|
6237
6252
|
}
|
|
6238
|
-
function
|
|
6253
|
+
function kf() {
|
|
6239
6254
|
const e = Ue(() => pu());
|
|
6240
6255
|
function t(n, r, o) {
|
|
6241
|
-
const s =
|
|
6256
|
+
const s = qu(r), i = {};
|
|
6242
6257
|
for (const a of s) {
|
|
6243
|
-
const c = o?.[a] ??
|
|
6258
|
+
const c = o?.[a] ?? Hu(e.value, n, `${r}.${String(a)}`);
|
|
6244
6259
|
c !== void 0 && (i[a] = c);
|
|
6245
6260
|
}
|
|
6246
6261
|
return i;
|
|
6247
6262
|
}
|
|
6248
6263
|
return { ui: t };
|
|
6249
6264
|
}
|
|
6250
|
-
|
|
6265
|
+
function Ff() {
|
|
6266
|
+
function e(t) {
|
|
6267
|
+
return t.map((n) => ({
|
|
6268
|
+
type: n.type,
|
|
6269
|
+
key: n.key,
|
|
6270
|
+
value: n.value,
|
|
6271
|
+
children: e(n.nodes)
|
|
6272
|
+
}));
|
|
6273
|
+
}
|
|
6274
|
+
return {
|
|
6275
|
+
toQTreeNodes: e
|
|
6276
|
+
};
|
|
6277
|
+
}
|
|
6278
|
+
async function Wu() {
|
|
6251
6279
|
return (await we().get("/metadata/entities")).data;
|
|
6252
6280
|
}
|
|
6253
|
-
async function
|
|
6281
|
+
async function Uf(e) {
|
|
6254
6282
|
return (await we().get(
|
|
6255
6283
|
`/metadata/entities/${e}`
|
|
6256
6284
|
)).data;
|
|
6257
6285
|
}
|
|
6258
|
-
async function
|
|
6286
|
+
async function Gu() {
|
|
6259
6287
|
return (await we().get(
|
|
6260
6288
|
"/metadata/routes"
|
|
6261
6289
|
)).data;
|
|
6262
6290
|
}
|
|
6263
|
-
const
|
|
6291
|
+
const Mf = () => Yu(en()), Yu = /* @__PURE__ */ Zt("LinidConfigurationStore", {
|
|
6264
6292
|
state: () => ({
|
|
6265
6293
|
entities: [],
|
|
6266
6294
|
apiEndpoints: [],
|
|
@@ -6291,8 +6319,8 @@ const Ff = () => Gu(en()), Gu = /* @__PURE__ */ Zt("LinidConfigurationStore", {
|
|
|
6291
6319
|
this.loading = !0, this.error = null;
|
|
6292
6320
|
try {
|
|
6293
6321
|
const [e, t] = await Promise.all([
|
|
6294
|
-
|
|
6295
|
-
|
|
6322
|
+
Wu(),
|
|
6323
|
+
Gu()
|
|
6296
6324
|
]);
|
|
6297
6325
|
this.entities = e, this.apiEndpoints = t;
|
|
6298
6326
|
} catch (e) {
|
|
@@ -6302,7 +6330,7 @@ const Ff = () => Gu(en()), Gu = /* @__PURE__ */ Zt("LinidConfigurationStore", {
|
|
|
6302
6330
|
}
|
|
6303
6331
|
}
|
|
6304
6332
|
}
|
|
6305
|
-
}),
|
|
6333
|
+
}), xf = () => Ku(en()), Ku = /* @__PURE__ */ Zt("LinidUiStore", {
|
|
6306
6334
|
state: () => ({
|
|
6307
6335
|
mainNavigationItems: []
|
|
6308
6336
|
}),
|
|
@@ -6315,7 +6343,7 @@ const Ff = () => Gu(en()), Gu = /* @__PURE__ */ Zt("LinidConfigurationStore", {
|
|
|
6315
6343
|
this.mainNavigationItems.push(...e);
|
|
6316
6344
|
}
|
|
6317
6345
|
}
|
|
6318
|
-
}),
|
|
6346
|
+
}), Vf = () => Xu(en()), Xu = /* @__PURE__ */ Zt("LinidUserStore", {
|
|
6319
6347
|
/**
|
|
6320
6348
|
* State properties of the user store.
|
|
6321
6349
|
* @returns The initial state of the user store.
|
|
@@ -6343,7 +6371,7 @@ const Ff = () => Gu(en()), Gu = /* @__PURE__ */ Zt("LinidConfigurationStore", {
|
|
|
6343
6371
|
}
|
|
6344
6372
|
});
|
|
6345
6373
|
let Qt = null;
|
|
6346
|
-
function
|
|
6374
|
+
function $f(e) {
|
|
6347
6375
|
if (Qt !== null) {
|
|
6348
6376
|
console.warn(
|
|
6349
6377
|
"[LinID CoreLib] Nunjucks environment has already been initialized. Re-initialization is ignored."
|
|
@@ -6352,15 +6380,15 @@ function xf(e) {
|
|
|
6352
6380
|
}
|
|
6353
6381
|
Qt = e;
|
|
6354
6382
|
}
|
|
6355
|
-
function
|
|
6383
|
+
function Bf() {
|
|
6356
6384
|
if (Qt === null)
|
|
6357
6385
|
throw new Error(
|
|
6358
6386
|
"[LinID CoreLib] Nunjucks environment is not initialized. Call setNunjucksEnv() first."
|
|
6359
6387
|
);
|
|
6360
6388
|
return Qt;
|
|
6361
6389
|
}
|
|
6362
|
-
var
|
|
6363
|
-
class
|
|
6390
|
+
var Qu = /* @__PURE__ */ ((e) => (e.SETUP = "setup", e.CONFIGURE = "configure", e.INITIALIZE = "initialize", e.READY = "ready", e.POST_INIT = "postInit", e))(Qu || {});
|
|
6391
|
+
class jf {
|
|
6364
6392
|
/**
|
|
6365
6393
|
* Unique identifier for the module.
|
|
6366
6394
|
*
|
|
@@ -6464,49 +6492,50 @@ class $f {
|
|
|
6464
6492
|
}
|
|
6465
6493
|
}
|
|
6466
6494
|
export {
|
|
6467
|
-
|
|
6468
|
-
|
|
6469
|
-
|
|
6495
|
+
jf as BasicRemoteModule,
|
|
6496
|
+
ef as LinidZoneRenderer,
|
|
6497
|
+
Qu as ModuleLifecyclePhase,
|
|
6470
6498
|
us as deepEqual,
|
|
6471
6499
|
Yn as deepEqualUnordered,
|
|
6472
|
-
|
|
6473
|
-
|
|
6474
|
-
|
|
6475
|
-
|
|
6476
|
-
|
|
6477
|
-
|
|
6478
|
-
|
|
6500
|
+
Rf as deleteEntityById,
|
|
6501
|
+
vf as fromDot,
|
|
6502
|
+
Gu as getApiEndpointsConfiguration,
|
|
6503
|
+
Af as getEntities,
|
|
6504
|
+
Wu as getEntitiesConfiguration,
|
|
6505
|
+
Lf as getEntityById,
|
|
6506
|
+
Uf as getEntityConfiguration,
|
|
6479
6507
|
we as getHttpClient,
|
|
6480
6508
|
au as getI18nInstance,
|
|
6481
6509
|
ni as getModuleFederation,
|
|
6482
6510
|
at as getModuleHostConfiguration,
|
|
6483
|
-
|
|
6511
|
+
Bf as getNunjucksEnv,
|
|
6484
6512
|
en as getPiniaStore,
|
|
6485
6513
|
pu as getUiDesign,
|
|
6486
6514
|
rt as isObject,
|
|
6487
6515
|
ri as loadAsyncComponent,
|
|
6488
6516
|
ec as merge,
|
|
6489
|
-
|
|
6517
|
+
Of as registerModuleHostConfiguration,
|
|
6490
6518
|
tc as renameKeys,
|
|
6491
|
-
|
|
6492
|
-
|
|
6493
|
-
|
|
6494
|
-
|
|
6495
|
-
|
|
6496
|
-
|
|
6497
|
-
|
|
6519
|
+
Sf as saveEntity,
|
|
6520
|
+
Nf as setHttpClient,
|
|
6521
|
+
Cf as setI18nInstance,
|
|
6522
|
+
zu as setModuleFederation,
|
|
6523
|
+
$f as setNunjucksEnv,
|
|
6524
|
+
Zu as setPiniaStore,
|
|
6525
|
+
Df as setUiDesign,
|
|
6498
6526
|
$o as uiEventSubject,
|
|
6499
|
-
|
|
6500
|
-
|
|
6527
|
+
Tf as updateEntity,
|
|
6528
|
+
tf as useDialog,
|
|
6501
6529
|
fu as useFieldValidation,
|
|
6502
|
-
|
|
6503
|
-
|
|
6504
|
-
|
|
6530
|
+
Mf as useLinidConfigurationStore,
|
|
6531
|
+
xf as useLinidUiStore,
|
|
6532
|
+
Vf as useLinidUserStore,
|
|
6505
6533
|
ai as useLinidZoneStore,
|
|
6506
|
-
|
|
6507
|
-
|
|
6534
|
+
If as useNotify,
|
|
6535
|
+
Pf as usePagination,
|
|
6508
6536
|
du as useQuasarFieldValidation,
|
|
6509
|
-
|
|
6537
|
+
wf as useQuasarRules,
|
|
6510
6538
|
cu as useScopedI18n,
|
|
6511
|
-
|
|
6539
|
+
Ff as useTree,
|
|
6540
|
+
kf as useUiDesign
|
|
6512
6541
|
};
|