@3sc/common-component 0.0.353 → 0.0.354
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/index.es.js +42 -45
- package/dist/index.es.js.map +1 -1
- package/dist/index.umd.js +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -43477,39 +43477,40 @@ const ww = {
|
|
|
43477
43477
|
const h = Sr((p == null ? void 0 : p.columns) || []);
|
|
43478
43478
|
if (!r && t) {
|
|
43479
43479
|
let O = (l && zu({ childUniqueKey: i })) ?? zu({ definitions: a, childUniqueKey: i });
|
|
43480
|
-
|
|
43481
|
-
|
|
43480
|
+
O.filter((k) => !h[k.key]);
|
|
43481
|
+
const b = p && ((x = p == null ? void 0 : p.columns) == null ? void 0 : x.some(
|
|
43482
|
+
(k) => (k == null ? void 0 : k.children) && k.children[i]
|
|
43482
43483
|
));
|
|
43483
|
-
if (!p ||
|
|
43484
|
-
if (
|
|
43485
|
-
const
|
|
43486
|
-
O = (w = p == null ? void 0 : p.columns) == null ? void 0 : w.map((
|
|
43487
|
-
var
|
|
43488
|
-
return
|
|
43489
|
-
...
|
|
43484
|
+
if (!p || b == !1) {
|
|
43485
|
+
if (b == !1) {
|
|
43486
|
+
const k = Sr(O);
|
|
43487
|
+
O = (w = p == null ? void 0 : p.columns) == null ? void 0 : w.map((E) => {
|
|
43488
|
+
var P;
|
|
43489
|
+
return E != null && E.children && !E.children[i] ? {
|
|
43490
|
+
...E,
|
|
43490
43491
|
children: {
|
|
43491
|
-
...
|
|
43492
|
-
[i]: (
|
|
43492
|
+
...E.children,
|
|
43493
|
+
[i]: (P = k == null ? void 0 : k[E == null ? void 0 : E.key]) == null ? void 0 : P.children[i]
|
|
43493
43494
|
}
|
|
43494
|
-
} :
|
|
43495
|
+
} : E;
|
|
43495
43496
|
});
|
|
43496
43497
|
}
|
|
43497
43498
|
(async () => {
|
|
43498
43499
|
try {
|
|
43499
|
-
const
|
|
43500
|
+
const E = { ...f || {
|
|
43500
43501
|
platform: { theme: "light" }
|
|
43501
|
-
} },
|
|
43502
|
-
let
|
|
43503
|
-
for (let
|
|
43504
|
-
const
|
|
43505
|
-
|
|
43502
|
+
} }, P = (p == null ? void 0 : p.pageSize) ?? o;
|
|
43503
|
+
let D = E;
|
|
43504
|
+
for (let A = 0; A < d.length; A++) {
|
|
43505
|
+
const j = d[A];
|
|
43506
|
+
A === d.length - 1 ? D[j] = {
|
|
43506
43507
|
columns: O,
|
|
43507
|
-
pageSize:
|
|
43508
|
-
} : (
|
|
43508
|
+
pageSize: P
|
|
43509
|
+
} : (D[j] = { ...D[j] || {} }, D = D[j]);
|
|
43509
43510
|
}
|
|
43510
|
-
localStorage.setItem(Dr.SETTINGS, JSON.stringify(
|
|
43511
|
-
} catch (
|
|
43512
|
-
console.error(
|
|
43511
|
+
localStorage.setItem(Dr.SETTINGS, JSON.stringify(E)), await Yc({ baseUrl: n, payload: E });
|
|
43512
|
+
} catch (k) {
|
|
43513
|
+
console.error(k);
|
|
43513
43514
|
}
|
|
43514
43515
|
})();
|
|
43515
43516
|
}
|
|
@@ -43520,7 +43521,6 @@ const ww = {
|
|
|
43520
43521
|
i
|
|
43521
43522
|
)) ?? l ?? zu({ definitions: a });
|
|
43522
43523
|
const g = [], m = Sr(l);
|
|
43523
|
-
console.log({ definitions: a, hashMapUserSettings: m, hashMapLabels: u });
|
|
43524
43524
|
for (const O of a) {
|
|
43525
43525
|
const b = m[O.key] || {}, k = u[O.key] || {}, E = Sr(b.children || []), P = Sr(k.children || []);
|
|
43526
43526
|
let D = {
|
|
@@ -43528,13 +43528,13 @@ const ww = {
|
|
|
43528
43528
|
...b,
|
|
43529
43529
|
...k
|
|
43530
43530
|
};
|
|
43531
|
-
|
|
43531
|
+
(C = O.children) != null && C.length && (D.children = O.children.map((A) => ({
|
|
43532
43532
|
...A,
|
|
43533
43533
|
...E[A.key],
|
|
43534
43534
|
...P[A.key]
|
|
43535
43535
|
}))), g.push(D);
|
|
43536
43536
|
}
|
|
43537
|
-
return
|
|
43537
|
+
return g.sort((O, b) => O.sequenceId - b.sequenceId);
|
|
43538
43538
|
}, PW = (e) => e.sort((t, n) => t.sequenceId - n.sequenceId), ea = (e, t) => e == null ? void 0 : e.map((n) => ({
|
|
43539
43539
|
id: n.id,
|
|
43540
43540
|
key: n.key,
|
|
@@ -43547,26 +43547,23 @@ const ww = {
|
|
|
43547
43547
|
[t]: ea(n.children)
|
|
43548
43548
|
} : ea(n.children)
|
|
43549
43549
|
}
|
|
43550
|
-
})), Sr = (e) => Array.isArray(e) && (e == null ? void 0 : e.reduce((t, n) => (t[n.key] = n, t), {})), zu = ({ definitions: e, childUniqueKey: t }) => ea(e, t), MW = (e, t, n) => {
|
|
43551
|
-
const
|
|
43552
|
-
|
|
43553
|
-
|
|
43554
|
-
const c = Sr(Array.isArray(i == null ? void 0 : i.children) ? i == null ? void 0 : i.children : (d = i == null ? void 0 : i.children) == null ? void 0 : d[n]), u = c == null ? void 0 : c[l.key];
|
|
43555
|
-
return {
|
|
43556
|
-
...l,
|
|
43557
|
-
sequenceId: (u == null ? void 0 : u.sequenceId) || l.sequenceId,
|
|
43558
|
-
isHidden: (u == null ? void 0 : u.isHidden) ?? l.isHidden
|
|
43559
|
-
};
|
|
43560
|
-
}) : void 0;
|
|
43550
|
+
})), Sr = (e) => Array.isArray(e) && (e == null ? void 0 : e.reduce((t, n) => (t[n.key] = n, t), {})), zu = ({ definitions: e, childUniqueKey: t }) => ea(e, t), MW = (e, t, n) => t.map((o) => {
|
|
43551
|
+
const i = e[o.key], a = o.children ? o.children.map((l) => {
|
|
43552
|
+
var d;
|
|
43553
|
+
const c = Sr(Array.isArray(i == null ? void 0 : i.children) ? i == null ? void 0 : i.children : (d = i == null ? void 0 : i.children) == null ? void 0 : d[n]), u = c == null ? void 0 : c[l.key];
|
|
43561
43554
|
return {
|
|
43562
|
-
...
|
|
43563
|
-
sequenceId: (
|
|
43564
|
-
isHidden: (
|
|
43565
|
-
...a ? { children: a } : {}
|
|
43555
|
+
...l,
|
|
43556
|
+
sequenceId: (u == null ? void 0 : u.sequenceId) || l.sequenceId,
|
|
43557
|
+
isHidden: (u == null ? void 0 : u.isHidden) ?? l.isHidden
|
|
43566
43558
|
};
|
|
43567
|
-
});
|
|
43568
|
-
return
|
|
43569
|
-
|
|
43559
|
+
}) : void 0;
|
|
43560
|
+
return {
|
|
43561
|
+
...o,
|
|
43562
|
+
sequenceId: (i == null ? void 0 : i.sequenceId) || o.sequenceId,
|
|
43563
|
+
isHidden: (i == null ? void 0 : i.isHidden) ?? o.isHidden,
|
|
43564
|
+
...a ? { children: a } : {}
|
|
43565
|
+
};
|
|
43566
|
+
}), DW = () => ({
|
|
43570
43567
|
definitions: [
|
|
43571
43568
|
{
|
|
43572
43569
|
id: 1,
|
|
@@ -44694,7 +44691,7 @@ function Ew({ tableProps: e, isDefaultConfig: t, gridPath: n, baseUrl: r, childU
|
|
|
44694
44691
|
pageSize: (c = e == null ? void 0 : e.pagination) == null ? void 0 : c.rowPerPage
|
|
44695
44692
|
});
|
|
44696
44693
|
return gt(() => {
|
|
44697
|
-
|
|
44694
|
+
l != null && l.length && (a == null || a({
|
|
44698
44695
|
type: qe.SET_GRID_DATA,
|
|
44699
44696
|
payload: { visibleGridColumns: l }
|
|
44700
44697
|
}));
|