@oliasoft-open-source/react-ui-library 6.3.0 → 6.4.0-beta-1
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/components/check-box/check-box.d.ts.map +1 -1
- package/dist/components/tree-table/tree-table-check-context.d.ts +27 -0
- package/dist/components/tree-table/tree-table-check-context.d.ts.map +1 -0
- package/dist/components/tree-table/tree-table-header.d.ts.map +1 -1
- package/dist/components/tree-table/tree-table-row.d.ts.map +1 -1
- package/dist/components/tree-table/tree-table.d.ts +5 -2
- package/dist/components/tree-table/tree-table.d.ts.map +1 -1
- package/dist/components/tree-table/tree-table.stories-data.d.ts +15 -0
- package/dist/components/tree-table/tree-table.stories-data.d.ts.map +1 -1
- package/dist/components/tree-table/tree-table.stories.d.ts +1 -0
- package/dist/components/tree-table/tree-table.stories.d.ts.map +1 -1
- package/dist/index.js +400 -305
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -536,12 +536,12 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
536
536
|
maxWidth: i,
|
|
537
537
|
children: /* @__PURE__ */ z(W, { icon: n })
|
|
538
538
|
})
|
|
539
|
-
}), si = ({ noMargin: e = !1, dataix: t = 0, isInTable: n = !1, tabIndex: r = 0, checked: i = !1, indeterminate: a = !1, name: o, label:
|
|
540
|
-
let y = s(U), b = h || _, x =
|
|
541
|
-
return
|
|
539
|
+
}), si = ({ noMargin: e = !1, dataix: t = 0, isInTable: n = !1, tabIndex: r = 0, checked: i = !1, indeterminate: a = !1, name: o, label: c = "", disabled: l = !1, small: d = !1, onChange: f, testId: m, helpText: h, onClickHelp: _, textTransform: v = Dr.CAPITALIZE }) => {
|
|
540
|
+
let y = s(U), b = h || _, x = l || y, S = p(null);
|
|
541
|
+
return u(() => {
|
|
542
542
|
S.current && (S.current.indeterminate = a);
|
|
543
|
-
}, [a]), /* @__PURE__ */ B("div", {
|
|
544
|
-
className: g(qr.checkbox, e && qr.noMargin, n && qr.isInTable, x && qr.disabled, d && qr.small, !
|
|
543
|
+
}, [a, i]), /* @__PURE__ */ B("div", {
|
|
544
|
+
className: g(qr.checkbox, e && qr.noMargin, n && qr.isInTable, x && qr.disabled, d && qr.small, !c && qr.noLabel),
|
|
545
545
|
"data-ix": t,
|
|
546
546
|
onClick: (e) => {
|
|
547
547
|
if (!x) {
|
|
@@ -573,7 +573,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
573
573
|
children: [/* @__PURE__ */ z("span", {
|
|
574
574
|
className: qr.checkmark,
|
|
575
575
|
children: /* @__PURE__ */ z(W, { icon: H.CHECK })
|
|
576
|
-
}),
|
|
576
|
+
}), c]
|
|
577
577
|
}),
|
|
578
578
|
b && /* @__PURE__ */ z("div", {
|
|
579
579
|
className: qr.helpIconEnabled,
|
|
@@ -6735,22 +6735,100 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6735
6735
|
drag: "_drag_1ywvy_31",
|
|
6736
6736
|
folder: "_folder_1ywvy_30",
|
|
6737
6737
|
active: "_active_1ywvy_61"
|
|
6738
|
-
}, Ju = (
|
|
6739
|
-
let
|
|
6738
|
+
}, Ju = (e, t) => e.filter((e) => e.parent === t).flatMap((t) => [t.id, ...Ju(e, t.id)]), Yu = (e, t, n) => {
|
|
6739
|
+
let r = new Set(n), i = e.filter((e) => e.parent === t);
|
|
6740
|
+
if (i.length === 0) return {
|
|
6741
|
+
checked: r.has(t),
|
|
6742
|
+
indeterminate: !1
|
|
6743
|
+
};
|
|
6744
|
+
let a = i.map((t) => Yu(e, t.id, n)), o = a.filter((e) => e.checked).length, s = a.filter((e) => e.indeterminate).length, c = o === i.length;
|
|
6745
|
+
return {
|
|
6746
|
+
checked: c,
|
|
6747
|
+
indeterminate: o + s > 0 && !c
|
|
6748
|
+
};
|
|
6749
|
+
}, Xu = (e, t) => {
|
|
6750
|
+
let n = t.length;
|
|
6751
|
+
return {
|
|
6752
|
+
checked: e.length > 0 && n === e.length,
|
|
6753
|
+
indeterminate: n > 0 && n < e.length
|
|
6754
|
+
};
|
|
6755
|
+
}, Zu = n(null), Qu = () => s(Zu), $u = ({ checkedRows: e, children: t, onChangeCheckedRows: n, rows: r }) => {
|
|
6756
|
+
let i = e !== void 0, a = d(() => {
|
|
6757
|
+
if (!i) return null;
|
|
6758
|
+
let t = /* @__PURE__ */ new Map();
|
|
6759
|
+
for (let n of r) t.set(n.id, Yu(r, n.id, e));
|
|
6760
|
+
return t;
|
|
6761
|
+
}, [
|
|
6762
|
+
i,
|
|
6763
|
+
r,
|
|
6764
|
+
e
|
|
6765
|
+
]), s = d(() => i ? Xu(r, e) : void 0, [
|
|
6766
|
+
i,
|
|
6767
|
+
r,
|
|
6768
|
+
e
|
|
6769
|
+
]), c = o((e) => a == null ? void 0 : a.get(e), [a]), l = o((t) => {
|
|
6770
|
+
if (!i) return;
|
|
6771
|
+
let a = [t, ...Ju(r, t)], { checked: o } = Yu(r, t, e);
|
|
6772
|
+
if (o) {
|
|
6773
|
+
let t = new Set(a);
|
|
6774
|
+
n == null || n(e.filter((e) => !t.has(e)));
|
|
6775
|
+
} else n == null || n([...new Set([...e, ...a])]);
|
|
6776
|
+
}, [
|
|
6777
|
+
e,
|
|
6778
|
+
i,
|
|
6779
|
+
n,
|
|
6780
|
+
r
|
|
6781
|
+
]), u = o(() => {
|
|
6782
|
+
if (!i) return;
|
|
6783
|
+
let { checked: t } = Xu(r, e);
|
|
6784
|
+
t ? n == null || n([]) : n == null || n(r.map((e) => e.id));
|
|
6785
|
+
}, [
|
|
6786
|
+
e,
|
|
6787
|
+
i,
|
|
6788
|
+
n,
|
|
6789
|
+
r
|
|
6790
|
+
]), f = d(() => ({
|
|
6791
|
+
enabled: i,
|
|
6792
|
+
headerCheckState: s,
|
|
6793
|
+
getRowCheckState: c,
|
|
6794
|
+
toggleRowCheck: l,
|
|
6795
|
+
toggleHeaderCheck: u
|
|
6796
|
+
}), [
|
|
6797
|
+
i,
|
|
6798
|
+
c,
|
|
6799
|
+
s,
|
|
6800
|
+
u,
|
|
6801
|
+
l
|
|
6802
|
+
]);
|
|
6803
|
+
return /* @__PURE__ */ z(Zu.Provider, {
|
|
6804
|
+
value: f,
|
|
6805
|
+
children: t
|
|
6806
|
+
});
|
|
6807
|
+
}, ed = ({ columnAlignment: e, columnWidths: t, depth: n, draggable: r, handleRef: i, hasChild: a, hasRowActions: o, icons: s, isOpen: c, node: l, onDragEnter: u, onDragOver: d, onDragLeave: f, onDrop: p, onToggle: m }) => {
|
|
6808
|
+
let h = Qu(), _ = h != null && h.enabled ? h.getRowCheckState(l.id) : void 0, v = _ == null ? void 0 : _.checked, y = _ == null ? void 0 : _.indeterminate, { data: b, droppable: x } = l, { id: S, cells: C, testId: w, actions: T = [], active: E, onRowClick: D } = b, O = x || a, k = h == null ? void 0 : h.enabled, A = (e) => {
|
|
6740
6809
|
let r = t ? t[e] : void 0;
|
|
6741
|
-
return e === 0 ? `calc(${r} - ${`calc(var(--size) * ${
|
|
6810
|
+
return e === 0 ? `calc(${r} - ${`calc(var(--size) * ${O ? n + 1 : n})`})` : r;
|
|
6742
6811
|
};
|
|
6743
6812
|
return /* @__PURE__ */ z("table", {
|
|
6744
6813
|
className: mo.table,
|
|
6745
|
-
"data-testid":
|
|
6814
|
+
"data-testid": w,
|
|
6746
6815
|
onDrop: p,
|
|
6747
6816
|
onDragEnter: u,
|
|
6748
6817
|
onDragOver: d,
|
|
6749
6818
|
onDragLeave: f,
|
|
6750
6819
|
children: /* @__PURE__ */ z("tbody", { children: /* @__PURE__ */ B("tr", {
|
|
6751
|
-
onClick:
|
|
6752
|
-
className: g(qu.treeTableRow,
|
|
6820
|
+
onClick: D,
|
|
6821
|
+
className: g(qu.treeTableRow, E ? qu.active : void 0),
|
|
6753
6822
|
children: [
|
|
6823
|
+
k && /* @__PURE__ */ z(pc, {
|
|
6824
|
+
isHeader: !1,
|
|
6825
|
+
cell: {
|
|
6826
|
+
type: fc.CHECKBOX,
|
|
6827
|
+
checked: v,
|
|
6828
|
+
indeterminate: y,
|
|
6829
|
+
onChange: () => h == null ? void 0 : h.toggleRowCheck(l.id)
|
|
6830
|
+
}
|
|
6831
|
+
}),
|
|
6754
6832
|
r && /* @__PURE__ */ z("td", {
|
|
6755
6833
|
className: qu.dragCell,
|
|
6756
6834
|
children: /* @__PURE__ */ z("div", {
|
|
@@ -6761,11 +6839,11 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6761
6839
|
})
|
|
6762
6840
|
}),
|
|
6763
6841
|
Array.from({ length: n }).map((e, t) => /* @__PURE__ */ z("td", { className: qu.folderCell }, t)),
|
|
6764
|
-
|
|
6842
|
+
O && /* @__PURE__ */ z("td", {
|
|
6765
6843
|
className: qu.folderCell,
|
|
6766
6844
|
children: /* @__PURE__ */ z("div", {
|
|
6767
6845
|
className: qu.folder,
|
|
6768
|
-
onClick: () => m(
|
|
6846
|
+
onClick: () => m(S),
|
|
6769
6847
|
onMouseDown: (e) => e.stopPropagation(),
|
|
6770
6848
|
children: /* @__PURE__ */ z(K, {
|
|
6771
6849
|
basic: !0,
|
|
@@ -6777,117 +6855,134 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6777
6855
|
})
|
|
6778
6856
|
})
|
|
6779
6857
|
}),
|
|
6780
|
-
|
|
6858
|
+
C.map((t, n) => /* @__PURE__ */ z(pc, {
|
|
6781
6859
|
isHeader: !1,
|
|
6782
6860
|
cell: t,
|
|
6783
|
-
width:
|
|
6861
|
+
width: A(n),
|
|
6784
6862
|
columnAlignment: e ? e[n] : null
|
|
6785
6863
|
}, n)),
|
|
6786
6864
|
o && /* @__PURE__ */ z(pc, {
|
|
6787
6865
|
isHeader: !1,
|
|
6788
6866
|
cell: {
|
|
6789
6867
|
type: fc.ACTIONS,
|
|
6790
|
-
actions:
|
|
6868
|
+
actions: T
|
|
6791
6869
|
}
|
|
6792
6870
|
})
|
|
6793
6871
|
]
|
|
6794
6872
|
}) })
|
|
6795
6873
|
});
|
|
6796
|
-
},
|
|
6797
|
-
|
|
6798
|
-
|
|
6799
|
-
|
|
6800
|
-
i.
|
|
6801
|
-
|
|
6802
|
-
|
|
6803
|
-
|
|
6804
|
-
|
|
6805
|
-
|
|
6806
|
-
|
|
6807
|
-
|
|
6808
|
-
|
|
6809
|
-
|
|
6810
|
-
|
|
6811
|
-
|
|
6812
|
-
|
|
6874
|
+
}, td = ({ columnAlignment: e, columnWidths: t, draggable: n, hasRowActions: r, headers: i }) => {
|
|
6875
|
+
let a = Qu(), o = a == null ? void 0 : a.headerCheckState, s = (a == null ? void 0 : a.enabled) && o !== void 0;
|
|
6876
|
+
return /* @__PURE__ */ z("table", {
|
|
6877
|
+
className: g(mo.table, qu.treeTableHeader),
|
|
6878
|
+
children: /* @__PURE__ */ z("thead", { children: i.map((i, c) => /* @__PURE__ */ B("tr", { children: [
|
|
6879
|
+
s && c === 0 ? /* @__PURE__ */ z(pc, {
|
|
6880
|
+
isHeader: !0,
|
|
6881
|
+
cell: {
|
|
6882
|
+
type: fc.CHECKBOX,
|
|
6883
|
+
checked: o.checked,
|
|
6884
|
+
indeterminate: o.indeterminate,
|
|
6885
|
+
onChange: a.toggleHeaderCheck
|
|
6886
|
+
}
|
|
6887
|
+
}) : s ? /* @__PURE__ */ z("td", {}) : null,
|
|
6888
|
+
n && /* @__PURE__ */ z("th", { className: qu.dragCell }),
|
|
6889
|
+
i.cells.map((n, r) => /* @__PURE__ */ z(pc, {
|
|
6890
|
+
isHeader: !0,
|
|
6891
|
+
cell: n,
|
|
6892
|
+
width: t ? t[r] : void 0,
|
|
6893
|
+
columnAlignment: e ? e[r] : void 0
|
|
6894
|
+
}, r)),
|
|
6895
|
+
r && /* @__PURE__ */ z(pc, {
|
|
6896
|
+
isHeader: !0,
|
|
6897
|
+
cell: {
|
|
6898
|
+
type: fc.ACTIONS,
|
|
6899
|
+
actions: i.actions,
|
|
6900
|
+
width: 31
|
|
6901
|
+
}
|
|
6902
|
+
})
|
|
6903
|
+
] }, c)) })
|
|
6904
|
+
});
|
|
6905
|
+
}, nd = ({ allowParentReassignment: e, autoOpenActiveItems: t = !1, canDrop: n, checkedRows: r, draggable: i = !1, icons: a, isInitialOpen: o = !1, itemHasChild: s, onItemToggle: c, onListReorder: l, onChangeCheckedRows: u, onChangeOpen: d, table: f, testId: p, treeRef: m }) => {
|
|
6906
|
+
let { columnAlignment: h, columnWidths: g, fixedWidth: _, headers: v, rows: y = [] } = f, b = Fs(y, v == null ? [] : v);
|
|
6907
|
+
return /* @__PURE__ */ z($u, {
|
|
6908
|
+
checkedRows: r,
|
|
6909
|
+
onChangeCheckedRows: u,
|
|
6910
|
+
rows: y,
|
|
6911
|
+
children: /* @__PURE__ */ B("div", {
|
|
6912
|
+
className: qu.treeTable,
|
|
6913
|
+
"data-testid": p,
|
|
6914
|
+
style: { width: _ },
|
|
6915
|
+
children: [!!v && /* @__PURE__ */ z(td, {
|
|
6916
|
+
columnAlignment: h,
|
|
6917
|
+
columnWidths: g,
|
|
6918
|
+
draggable: i,
|
|
6919
|
+
hasRowActions: b,
|
|
6920
|
+
headers: v
|
|
6921
|
+
}), /* @__PURE__ */ z(Ku, {
|
|
6922
|
+
allowParentReassignment: e,
|
|
6923
|
+
autoOpenActiveItems: t,
|
|
6924
|
+
canDrop: n,
|
|
6925
|
+
draggable: i,
|
|
6926
|
+
icons: a,
|
|
6927
|
+
isInitialOpen: o,
|
|
6928
|
+
itemHasChild: s,
|
|
6929
|
+
list: {
|
|
6930
|
+
noHeader: !0,
|
|
6931
|
+
items: y
|
|
6932
|
+
},
|
|
6933
|
+
onChangeOpen: d,
|
|
6934
|
+
onItemToggle: c,
|
|
6935
|
+
onListReorder: l,
|
|
6936
|
+
placeholderIndent: "var(--size)",
|
|
6937
|
+
render: (e, { depth: t, draggable: n, handleRef: r, hasChild: i, isOpen: o, onToggle: s }) => /* @__PURE__ */ z(ed, {
|
|
6938
|
+
node: e,
|
|
6939
|
+
columnAlignment: h,
|
|
6940
|
+
columnWidths: g,
|
|
6941
|
+
depth: t,
|
|
6942
|
+
draggable: n,
|
|
6943
|
+
handleRef: r,
|
|
6944
|
+
hasChild: i,
|
|
6945
|
+
hasRowActions: b,
|
|
6946
|
+
icons: a,
|
|
6947
|
+
isOpen: o,
|
|
6948
|
+
onToggle: s
|
|
6949
|
+
}, e.id),
|
|
6950
|
+
treeRef: m
|
|
6951
|
+
})]
|
|
6813
6952
|
})
|
|
6814
|
-
] }, a)) })
|
|
6815
|
-
}), Xu = ({ allowParentReassignment: e, autoOpenActiveItems: t = !1, canDrop: n, draggable: r = !1, icons: i, isInitialOpen: a = !1, itemHasChild: o, onItemToggle: s, onListReorder: c, onChangeOpen: l, table: u, testId: d, treeRef: f }) => {
|
|
6816
|
-
let { columnAlignment: p, columnWidths: m, fixedWidth: h, headers: g, rows: _ = [] } = u, v = Fs(_, g == null ? [] : g);
|
|
6817
|
-
return /* @__PURE__ */ B("div", {
|
|
6818
|
-
className: qu.treeTable,
|
|
6819
|
-
"data-testid": d,
|
|
6820
|
-
style: { width: h },
|
|
6821
|
-
children: [!!g && /* @__PURE__ */ z(Yu, {
|
|
6822
|
-
columnAlignment: p,
|
|
6823
|
-
columnWidths: m,
|
|
6824
|
-
draggable: r,
|
|
6825
|
-
hasRowActions: v,
|
|
6826
|
-
headers: g
|
|
6827
|
-
}), /* @__PURE__ */ z(Ku, {
|
|
6828
|
-
allowParentReassignment: e,
|
|
6829
|
-
autoOpenActiveItems: t,
|
|
6830
|
-
canDrop: n,
|
|
6831
|
-
draggable: r,
|
|
6832
|
-
icons: i,
|
|
6833
|
-
isInitialOpen: a,
|
|
6834
|
-
itemHasChild: o,
|
|
6835
|
-
list: {
|
|
6836
|
-
noHeader: !0,
|
|
6837
|
-
items: _
|
|
6838
|
-
},
|
|
6839
|
-
onChangeOpen: l,
|
|
6840
|
-
onItemToggle: s,
|
|
6841
|
-
onListReorder: c,
|
|
6842
|
-
placeholderIndent: "var(--size)",
|
|
6843
|
-
render: (e, { depth: t, draggable: n, handleRef: r, hasChild: a, isOpen: o, onToggle: s }) => /* @__PURE__ */ z(Ju, {
|
|
6844
|
-
node: e,
|
|
6845
|
-
columnAlignment: p,
|
|
6846
|
-
columnWidths: m,
|
|
6847
|
-
depth: t,
|
|
6848
|
-
draggable: n,
|
|
6849
|
-
handleRef: r,
|
|
6850
|
-
hasChild: a,
|
|
6851
|
-
hasRowActions: v,
|
|
6852
|
-
icons: i,
|
|
6853
|
-
isOpen: o,
|
|
6854
|
-
onToggle: s
|
|
6855
|
-
}, e.id),
|
|
6856
|
-
treeRef: f
|
|
6857
|
-
})]
|
|
6858
6953
|
});
|
|
6859
|
-
},
|
|
6954
|
+
}, rd = () => {
|
|
6860
6955
|
let e = p(null);
|
|
6861
6956
|
return u(() => {
|
|
6862
6957
|
e.current && (e.current(), e.current = null);
|
|
6863
6958
|
}), (t) => {
|
|
6864
6959
|
e.current = t;
|
|
6865
6960
|
};
|
|
6866
|
-
},
|
|
6961
|
+
}, id = (e) => {
|
|
6867
6962
|
let t = p(void 0);
|
|
6868
6963
|
return c(() => {
|
|
6869
6964
|
t.current = e;
|
|
6870
6965
|
}, [e]), t.current;
|
|
6871
|
-
},
|
|
6966
|
+
}, ad = (e, t) => {
|
|
6872
6967
|
let n = t == null ? void 0 : t[e];
|
|
6873
6968
|
if (!n) {
|
|
6874
6969
|
var r;
|
|
6875
6970
|
return console.log(`Warning: 'unitTemplate' missing for '${e}'. Using initial unit, preferred unit or value unit.`), (r = Un(e)) == null ? "" : r;
|
|
6876
6971
|
}
|
|
6877
6972
|
return n;
|
|
6878
|
-
},
|
|
6973
|
+
}, od = /* @__PURE__ */ function(e) {
|
|
6879
6974
|
return e.CUSTOM = "custom", e.PREDEFINED = "predefined", e;
|
|
6880
|
-
}({}),
|
|
6975
|
+
}({}), sd = (e) => e === "undefined" || e === void 0 || e === "" || e === "null" || e === null || e === "NaN" || isNaN(e), cd = (e) => {
|
|
6881
6976
|
if (!e) return !1;
|
|
6882
6977
|
let t = Dn(e);
|
|
6883
6978
|
return !xn.includes(t);
|
|
6884
|
-
},
|
|
6979
|
+
}, ld = ({ value: e, unitkey: t, toUnit: n }) => {
|
|
6885
6980
|
var r;
|
|
6886
6981
|
let i = bn[t];
|
|
6887
6982
|
if (!i || i.length === 0 || !((r = Wn(e)) != null && r.valid) || !i.includes(n)) return !1;
|
|
6888
6983
|
let a = Dn(String(e));
|
|
6889
6984
|
return !(a && !i.includes(a));
|
|
6890
|
-
},
|
|
6985
|
+
}, ud = ({ value: e, unitkey: t, toUnit: n, fromUnit: r, doNotConvertValue: i = !1, exactPrecision: a = !1 }) => {
|
|
6891
6986
|
var o;
|
|
6892
6987
|
let s = Nn(e) ? kn(e) : e, c = [Infinity, -Infinity].includes(Number(s));
|
|
6893
6988
|
if (i || c) return {
|
|
@@ -6907,13 +7002,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6907
7002
|
value: void 0,
|
|
6908
7003
|
error: "Source unit is missing"
|
|
6909
7004
|
};
|
|
6910
|
-
if (
|
|
7005
|
+
if (sd(s)) return {
|
|
6911
7006
|
value: void 0,
|
|
6912
7007
|
error: "Value is invalid for conversion"
|
|
6913
7008
|
};
|
|
6914
7009
|
try {
|
|
6915
7010
|
let e = Kn(s, l);
|
|
6916
|
-
return
|
|
7011
|
+
return ld({
|
|
6917
7012
|
value: e,
|
|
6918
7013
|
toUnit: n,
|
|
6919
7014
|
unitkey: t
|
|
@@ -6930,13 +7025,13 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6930
7025
|
error: "Conversion not possible"
|
|
6931
7026
|
};
|
|
6932
7027
|
}
|
|
6933
|
-
},
|
|
6934
|
-
let a = kn(e), o =
|
|
6935
|
-
return !
|
|
7028
|
+
}, dd = ({ value: e = "", toUnit: t, unitkey: n, defaultFromUnit: r, doNotConvertValue: i }) => {
|
|
7029
|
+
let a = kn(e), o = sd(a);
|
|
7030
|
+
return !ld({
|
|
6936
7031
|
value: e,
|
|
6937
7032
|
unitkey: n,
|
|
6938
7033
|
toUnit: t
|
|
6939
|
-
}) ||
|
|
7034
|
+
}) || cd(e) || o ? { value: a } : Nn(e) ? ud({
|
|
6940
7035
|
value: e,
|
|
6941
7036
|
unitkey: n,
|
|
6942
7037
|
toUnit: t,
|
|
@@ -6944,25 +7039,25 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6944
7039
|
doNotConvertValue: i,
|
|
6945
7040
|
exactPrecision: !0
|
|
6946
7041
|
}) : { value: e };
|
|
6947
|
-
},
|
|
7042
|
+
}, fd = (e) => ln(e) && !tn(e) && !on(e) ? en(e, "fieldName", "") : typeof e == "string" ? e : "", pd = (e = "") => xn == null ? void 0 : xn.includes(e), md = (e, t) => {
|
|
6948
7043
|
let n = Dn(e || "");
|
|
6949
|
-
return
|
|
6950
|
-
},
|
|
6951
|
-
|
|
6952
|
-
},
|
|
7044
|
+
return pd(t) && pd(n);
|
|
7045
|
+
}, hd = n(null), gd = () => s(hd), _d = !1, vd = (e) => {
|
|
7046
|
+
_d || (_d = !0, hd = e);
|
|
7047
|
+
}, yd = (e) => jn(e) ? e : Fn(e), bd = {
|
|
6953
7048
|
predefinedMenuActive: "_predefinedMenuActive_ye9w9_1",
|
|
6954
7049
|
inputWrapper: "_inputWrapper_ye9w9_4"
|
|
6955
|
-
},
|
|
7050
|
+
}, xd = ({ name: e, placeholder: t = "", disabled: n = !1, disabledUnit: r = !1, error: i = null, left: a = !1, small: o = !1, width: s = "100%", value: l, unitkey: u = "", initUnit: f, noConversion: p = !1, onChange: h = pn, onClick: _ = pn, onFocus: v = pn, onSwitchUnit: y = pn, unitTemplate: b, testId: x, warning: S = null, predefinedOptions: C, initialPredefinedOption: w = !1, shouldLinkAutomaticly: T = !0, selectedPredefinedOptionKey: E, validationCallback: D = () => ({
|
|
6956
7051
|
name: "",
|
|
6957
7052
|
error: null
|
|
6958
7053
|
}), disabledValidation: O = !1, allowEmpty: k = !1, convertBackToStorageUnit: A = !1, enableCosmeticRounding: j = !0, enableDisplayRounding: M = !1, roundDisplayValue: N, selectOnFocus: P = !0, groupOrder: F, tooltip: ee = null }) => {
|
|
6959
|
-
let I =
|
|
7054
|
+
let I = gd(), te = rd();
|
|
6960
7055
|
typeof l == "number" && (l = `${l}`);
|
|
6961
|
-
let [ne = "", re = ""] = l === void 0 ? [] : zn(l), ie = d(() =>
|
|
7056
|
+
let [ne = "", re = ""] = l === void 0 ? [] : zn(l), ie = d(() => ad(u, b || (I == null ? void 0 : I.unitTemplate)), [
|
|
6962
7057
|
u,
|
|
6963
7058
|
b,
|
|
6964
7059
|
I == null ? void 0 : I.unitTemplate
|
|
6965
|
-
]), ae =
|
|
7060
|
+
]), ae = md(l, ie), oe = f || ie || re, se = id(oe), { value: ce } = dd({
|
|
6966
7061
|
value: l,
|
|
6967
7062
|
toUnit: oe,
|
|
6968
7063
|
unitkey: u,
|
|
@@ -6974,10 +7069,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6974
7069
|
} : {
|
|
6975
7070
|
value: ce,
|
|
6976
7071
|
unit: oe
|
|
6977
|
-
}), ue = k || (L == null ? void 0 : L.value) === void 0, [de, fe] = m(w ?
|
|
7072
|
+
}), ue = k || (L == null ? void 0 : L.value) === void 0, [de, fe] = m(w ? od.PREDEFINED : od.CUSTOM), pe = !!(O || n), me = C && C.find((e) => {
|
|
6978
7073
|
if (!(e != null && e.value)) return;
|
|
6979
7074
|
if (E) return E === e.valueKey;
|
|
6980
|
-
let t = Nn(e.value) ? Dn(e.value) : "", { value: n = l } =
|
|
7075
|
+
let t = Nn(e.value) ? Dn(e.value) : "", { value: n = l } = ud({
|
|
6981
7076
|
value: String(l),
|
|
6982
7077
|
unitkey: u,
|
|
6983
7078
|
toUnit: t
|
|
@@ -6986,7 +7081,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
6986
7081
|
}), he = () => {
|
|
6987
7082
|
var e;
|
|
6988
7083
|
let t = (e = l) == null ? "" : e, n = L.unit;
|
|
6989
|
-
if (!
|
|
7084
|
+
if (!ld({
|
|
6990
7085
|
value: t,
|
|
6991
7086
|
unitkey: u,
|
|
6992
7087
|
toUnit: n
|
|
@@ -7000,7 +7095,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7000
7095
|
return null;
|
|
7001
7096
|
}
|
|
7002
7097
|
}, ge = (t) => {
|
|
7003
|
-
let n =
|
|
7098
|
+
let n = fd(e), r = t.target, { value: i, selectionStart: a } = r, o = Kn(i, (L == null ? void 0 : L.unit) || "");
|
|
7004
7099
|
h({ target: {
|
|
7005
7100
|
value: A ? Kn(wn(o, re), re) : o,
|
|
7006
7101
|
name: n
|
|
@@ -7022,7 +7117,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7022
7117
|
if (oe) {
|
|
7023
7118
|
let e, t = "";
|
|
7024
7119
|
if (se !== oe) {
|
|
7025
|
-
let { value: n } =
|
|
7120
|
+
let { value: n } = dd({
|
|
7026
7121
|
value: l,
|
|
7027
7122
|
toUnit: oe,
|
|
7028
7123
|
unitkey: u,
|
|
@@ -7031,7 +7126,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7031
7126
|
});
|
|
7032
7127
|
e = n, t = oe;
|
|
7033
7128
|
} else if (Kn(L.value, L.unit) !== l) {
|
|
7034
|
-
let { value: n } =
|
|
7129
|
+
let { value: n } = dd({
|
|
7035
7130
|
value: l,
|
|
7036
7131
|
toUnit: L.unit,
|
|
7037
7132
|
unitkey: u,
|
|
@@ -7043,7 +7138,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7043
7138
|
e !== void 0 && le({
|
|
7044
7139
|
value: e,
|
|
7045
7140
|
unit: t
|
|
7046
|
-
}), fe(C && me && T ?
|
|
7141
|
+
}), fe(C && me && T ? od.PREDEFINED : od.CUSTOM);
|
|
7047
7142
|
}
|
|
7048
7143
|
}, [
|
|
7049
7144
|
oe,
|
|
@@ -7051,14 +7146,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7051
7146
|
i,
|
|
7052
7147
|
T
|
|
7053
7148
|
]);
|
|
7054
|
-
let ve = he(), ye = Pn(L.unit) || L.unit || "", be = p || !ve || ve && ve.length === 1, xe =
|
|
7149
|
+
let ve = he(), ye = Pn(L.unit) || L.unit || "", be = p || !ve || ve && ve.length === 1, xe = fd(e), Se, Ce = (t) => {
|
|
7055
7150
|
let r = t != null && t.value ? t.value : "", [i = "", a = ""] = Nn(r) ? zn(r) : [r], o = Gn(r);
|
|
7056
|
-
if (
|
|
7151
|
+
if (ld({
|
|
7057
7152
|
value: r,
|
|
7058
7153
|
unitkey: u,
|
|
7059
7154
|
toUnit: a
|
|
7060
7155
|
})) {
|
|
7061
|
-
let { value: e = "" } =
|
|
7156
|
+
let { value: e = "" } = dd({
|
|
7062
7157
|
value: r,
|
|
7063
7158
|
toUnit: ie,
|
|
7064
7159
|
unitkey: u,
|
|
@@ -7071,7 +7166,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7071
7166
|
type: xi.OPTION,
|
|
7072
7167
|
inline: !0,
|
|
7073
7168
|
onClick: () => {
|
|
7074
|
-
Wn(i).valid && !n && (fe(
|
|
7169
|
+
Wn(i).valid && !n && (fe(od.PREDEFINED), h({ target: {
|
|
7075
7170
|
value: r,
|
|
7076
7171
|
name: typeof e == "string" ? e : (e == null ? void 0 : e.fieldName) || "",
|
|
7077
7172
|
predefinedSelected: !0,
|
|
@@ -7083,27 +7178,27 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7083
7178
|
height: "0"
|
|
7084
7179
|
})] }),
|
|
7085
7180
|
description: o,
|
|
7086
|
-
selected: me === t && de ===
|
|
7181
|
+
selected: me === t && de === od.PREDEFINED
|
|
7087
7182
|
};
|
|
7088
7183
|
};
|
|
7089
7184
|
if (Se = [{
|
|
7090
7185
|
type: xi.OPTION,
|
|
7091
7186
|
inline: !0,
|
|
7092
7187
|
onClick: () => {
|
|
7093
|
-
de !==
|
|
7188
|
+
de !== od.CUSTOM && !n && h({ target: {
|
|
7094
7189
|
value: Kn(L.value, L.unit),
|
|
7095
7190
|
name: typeof e == "string" ? e : (e == null ? void 0 : e.fieldName) || ""
|
|
7096
7191
|
} });
|
|
7097
7192
|
},
|
|
7098
7193
|
label: "Custom",
|
|
7099
|
-
selected: de ===
|
|
7194
|
+
selected: de === od.CUSTOM
|
|
7100
7195
|
}], C != null && C.length) {
|
|
7101
7196
|
let e = C.map(Ce);
|
|
7102
7197
|
Se = [...Se, ...e];
|
|
7103
7198
|
}
|
|
7104
7199
|
let we = (e) => {
|
|
7105
7200
|
if (Nn(e)) {
|
|
7106
|
-
let t = Dn(e), { value: n } =
|
|
7201
|
+
let t = Dn(e), { value: n } = dd({
|
|
7107
7202
|
value: e,
|
|
7108
7203
|
toUnit: L.unit,
|
|
7109
7204
|
unitkey: u,
|
|
@@ -7115,7 +7210,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7115
7210
|
return e;
|
|
7116
7211
|
}, Te = !C && (!F || F === V.FIRST) ? V.FIRST : V.MIDDLE, Ee = !F || F === V.LAST ? V.LAST : V.MIDDLE;
|
|
7117
7212
|
return /* @__PURE__ */ z("div", {
|
|
7118
|
-
className: de ===
|
|
7213
|
+
className: de === od.PREDEFINED ? g(bd.predefinedMenuActive) : "",
|
|
7119
7214
|
children: /* @__PURE__ */ B(Ma, {
|
|
7120
7215
|
small: o,
|
|
7121
7216
|
width: s,
|
|
@@ -7130,17 +7225,17 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7130
7225
|
trigger: "Component",
|
|
7131
7226
|
component: /* @__PURE__ */ z(K, {
|
|
7132
7227
|
groupOrder: "first",
|
|
7133
|
-
active: de ===
|
|
7134
|
-
icon: de ===
|
|
7228
|
+
active: de === od.PREDEFINED,
|
|
7229
|
+
icon: de === od.PREDEFINED ? "link" : "unlink",
|
|
7135
7230
|
small: o
|
|
7136
7231
|
}),
|
|
7137
7232
|
small: o,
|
|
7138
7233
|
sections: Se
|
|
7139
7234
|
},
|
|
7140
|
-
tooltip: de ===
|
|
7235
|
+
tooltip: de === od.PREDEFINED ? me == null ? void 0 : me.label : ""
|
|
7141
7236
|
}),
|
|
7142
7237
|
/* @__PURE__ */ z("div", {
|
|
7143
|
-
className:
|
|
7238
|
+
className: bd.inputWrapper,
|
|
7144
7239
|
children: /* @__PURE__ */ z(Gs, {
|
|
7145
7240
|
name: xe,
|
|
7146
7241
|
testId: x,
|
|
@@ -7182,7 +7277,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7182
7277
|
let r = n || t || "", i = Mn(e) ? e : "";
|
|
7183
7278
|
return {
|
|
7184
7279
|
type: "Option",
|
|
7185
|
-
label: j ?
|
|
7280
|
+
label: j ? yd(i) : i,
|
|
7186
7281
|
inline: !0,
|
|
7187
7282
|
onClick: (n) => {
|
|
7188
7283
|
n.stopPropagation(), _e(e, t);
|
|
@@ -7197,10 +7292,10 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7197
7292
|
]
|
|
7198
7293
|
})
|
|
7199
7294
|
});
|
|
7200
|
-
},
|
|
7295
|
+
}, Sd = Object.freeze({
|
|
7201
7296
|
Translations: "translations",
|
|
7202
7297
|
LanguageKey: "languageKey"
|
|
7203
|
-
}),
|
|
7298
|
+
}), Cd = {
|
|
7204
7299
|
unified: "Unified",
|
|
7205
7300
|
split: "Split",
|
|
7206
7301
|
changesTooLarge: "Changes are too large to be shown",
|
|
@@ -7222,29 +7317,29 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7222
7317
|
pluralChanges: "changes",
|
|
7223
7318
|
showAll: "Show all",
|
|
7224
7319
|
unknown: "Unknown"
|
|
7225
|
-
},
|
|
7320
|
+
}, wd = (e) => Object.keys(Cd).reduce((t, n) => ({
|
|
7226
7321
|
...t,
|
|
7227
|
-
[n]: (e == null ? void 0 : e[n]) || (
|
|
7228
|
-
}), {}),
|
|
7229
|
-
[
|
|
7230
|
-
[
|
|
7231
|
-
},
|
|
7232
|
-
|
|
7233
|
-
},
|
|
7322
|
+
[n]: (e == null ? void 0 : e[n]) || (Cd == null ? void 0 : Cd[n])
|
|
7323
|
+
}), {}), Td = {
|
|
7324
|
+
[Sd.Translations]: wd(),
|
|
7325
|
+
[Sd.LanguageKey]: "en"
|
|
7326
|
+
}, Ed = (e) => e ? Td[e] : Td, Dd = (e, t) => {
|
|
7327
|
+
Td[e] = t;
|
|
7328
|
+
}, Od = (e) => e.reduce(({ preferredUnits: e, storageUnits: t }, { unitKey: n, preferredUnit: r, storageUnit: i }) => {
|
|
7234
7329
|
var a;
|
|
7235
|
-
let { unitTemplate: o = null } = (a =
|
|
7236
|
-
return e[n] = r == null ?
|
|
7330
|
+
let { unitTemplate: o = null } = (a = gd()) == null ? {} : a;
|
|
7331
|
+
return e[n] = r == null ? ad(n, o) : r, t[n] = i, {
|
|
7237
7332
|
preferredUnits: e,
|
|
7238
7333
|
storageUnits: t
|
|
7239
7334
|
};
|
|
7240
7335
|
}, {
|
|
7241
7336
|
preferredUnits: {},
|
|
7242
7337
|
storageUnits: {}
|
|
7243
|
-
}),
|
|
7338
|
+
}), kd = ({ row: e, rowIndex: t, selectedUnits: n, storageUnits: r, convertBackToStorageUnit: i, enableCosmeticRounding: a, enableDisplayRounding: o }) => ({
|
|
7244
7339
|
...e,
|
|
7245
7340
|
cells: e.cells.map((e, s) => {
|
|
7246
7341
|
if ("autoUnit" in e && e != null && e.autoUnit && (typeof (e == null ? void 0 : e.value) == "string" || typeof (e == null ? void 0 : e.value) == "number")) {
|
|
7247
|
-
let { unitKey: c, value: l, formatDisplayValue: u } = e, d = o && "roundDisplayValue" in e ? e == null ? void 0 : e.roundDisplayValue : null, f = n[c], p = r[c], m = p && f !== p, { value: h = l } =
|
|
7342
|
+
let { unitKey: c, value: l, formatDisplayValue: u } = e, d = o && "roundDisplayValue" in e ? e == null ? void 0 : e.roundDisplayValue : null, f = n[c], p = r[c], m = p && f !== p, { value: h = l } = ud({
|
|
7248
7343
|
value: Hs(l),
|
|
7249
7344
|
unitkey: c,
|
|
7250
7345
|
toUnit: f,
|
|
@@ -7258,7 +7353,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7258
7353
|
roundDisplayValue: d,
|
|
7259
7354
|
selectOnFocus: !0,
|
|
7260
7355
|
onChange: (n) => {
|
|
7261
|
-
let { value: r } = n.target, a = i ? p : f, { value: o = r } =
|
|
7356
|
+
let { value: r } = n.target, a = i ? p : f, { value: o = r } = ud({
|
|
7262
7357
|
value: String(r),
|
|
7263
7358
|
unitkey: c,
|
|
7264
7359
|
toUnit: a,
|
|
@@ -7282,8 +7377,8 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7282
7377
|
}
|
|
7283
7378
|
return e;
|
|
7284
7379
|
})
|
|
7285
|
-
}),
|
|
7286
|
-
let { translations: i } =
|
|
7380
|
+
}), Ad = ({ headers: e, selectedUnits: t, storageUnits: n, onChangeUnit: r }) => {
|
|
7381
|
+
let { translations: i } = Ed();
|
|
7287
7382
|
return e ? e.map((e) => ({
|
|
7288
7383
|
...e,
|
|
7289
7384
|
cells: e.cells.map((e) => {
|
|
@@ -7312,8 +7407,8 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7312
7407
|
return e;
|
|
7313
7408
|
})
|
|
7314
7409
|
})) : [];
|
|
7315
|
-
},
|
|
7316
|
-
let { headers: u, ...d } = e, { storageUnits: f, preferredUnits: p } =
|
|
7410
|
+
}, jd = ({ table: e, unitConfig: t, convertBackToStorageUnit: n = !0, enableCosmeticRounding: r = !0, enableDisplayRounding: i = !0, onListReorder: a, canListReorder: s, beforeRenderRow: l }) => {
|
|
7411
|
+
let { headers: u, ...d } = e, { storageUnits: f, preferredUnits: p } = Od(t), h = id(p), [g, _] = m(p), v = ({ unitKey: e, value: n }) => {
|
|
7317
7412
|
_({
|
|
7318
7413
|
...g,
|
|
7319
7414
|
[e]: n
|
|
@@ -7324,7 +7419,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7324
7419
|
newUnit: n,
|
|
7325
7420
|
unitKey: e
|
|
7326
7421
|
});
|
|
7327
|
-
}, y = o(({ row: e, rowIndex: t }) =>
|
|
7422
|
+
}, y = o(({ row: e, rowIndex: t }) => kd({
|
|
7328
7423
|
row: l ? l({
|
|
7329
7424
|
row: e,
|
|
7330
7425
|
rowIndex: t
|
|
@@ -7353,7 +7448,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7353
7448
|
}, [t]), /* @__PURE__ */ z(yc, {
|
|
7354
7449
|
table: {
|
|
7355
7450
|
...d,
|
|
7356
|
-
headers:
|
|
7451
|
+
headers: Ad({
|
|
7357
7452
|
headers: e.headers,
|
|
7358
7453
|
selectedUnits: g,
|
|
7359
7454
|
storageUnits: f,
|
|
@@ -7364,8 +7459,8 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7364
7459
|
canListReorder: s,
|
|
7365
7460
|
beforeRenderRow: y
|
|
7366
7461
|
});
|
|
7367
|
-
},
|
|
7368
|
-
let { translations: d } =
|
|
7462
|
+
}, Md = { settingField: "_settingField_1x02n_1" }, Nd = ({ helpText: t, disabled: n = !1, showCustom: r = !1, children: i, userValue: a = void 0, companyValue: o = void 0, noPermission: s = !1, selectedOption: c, handleSelectChange: l, testId: u }) => {
|
|
7463
|
+
let { translations: d } = Ed(), f = (t) => t.replace(/\\n/g, "\n").split(/\n/).map((t, n) => /* @__PURE__ */ B(e.Fragment, { children: [t, /* @__PURE__ */ z("br", {})] }, n)), p = [
|
|
7369
7464
|
...r ? [] : [{
|
|
7370
7465
|
label: d == null ? void 0 : d.allUsers,
|
|
7371
7466
|
value: !1
|
|
@@ -7380,7 +7475,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7380
7475
|
}] : []
|
|
7381
7476
|
], m = a !== void 0 && o !== void 0 && !an(a, o);
|
|
7382
7477
|
return /* @__PURE__ */ B("div", {
|
|
7383
|
-
className:
|
|
7478
|
+
className: Md.settingField,
|
|
7384
7479
|
"data-testid": u,
|
|
7385
7480
|
children: [/* @__PURE__ */ B(Nl, {
|
|
7386
7481
|
justifyContent: "space-between",
|
|
@@ -7412,19 +7507,19 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7412
7507
|
children: f(t)
|
|
7413
7508
|
})]
|
|
7414
7509
|
});
|
|
7415
|
-
},
|
|
7510
|
+
}, Pd = (e, t) => {
|
|
7416
7511
|
let n = e.replace(/\r\n/g, "\n").split("\n"), r = t.replace(/\r\n/g, "\n").split("\n"), i = r.length - n.length, a = n.length - r.length;
|
|
7417
7512
|
return {
|
|
7418
7513
|
added: Math.max(0, i),
|
|
7419
7514
|
removed: Math.max(0, a)
|
|
7420
7515
|
};
|
|
7421
|
-
},
|
|
7516
|
+
}, Fd = "split", Id = "unified", Ld = ({ oldJson: e, newJson: t, viewType: n = Fd }) => {
|
|
7422
7517
|
var r, i;
|
|
7423
|
-
let { translations: a } =
|
|
7424
|
-
value:
|
|
7518
|
+
let { translations: a } = Ed(), [o, s] = m(n), l = [{
|
|
7519
|
+
value: Fd,
|
|
7425
7520
|
label: (r = a == null ? void 0 : a.split) == null ? "Split" : r
|
|
7426
7521
|
}, {
|
|
7427
|
-
value:
|
|
7522
|
+
value: Id,
|
|
7428
7523
|
label: (i = a == null ? void 0 : a.unified) == null ? "Unified" : i
|
|
7429
7524
|
}];
|
|
7430
7525
|
c(() => {
|
|
@@ -7432,7 +7527,7 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7432
7527
|
}, [n]);
|
|
7433
7528
|
let u = ({ target: { value: e } }) => {
|
|
7434
7529
|
s(e);
|
|
7435
|
-
}, { added: d, removed: f } =
|
|
7530
|
+
}, { added: d, removed: f } = Pd(e, t), p = d + f > 3500;
|
|
7436
7531
|
return /* @__PURE__ */ z(R, { children: /* @__PURE__ */ z(na, {
|
|
7437
7532
|
bordered: !0,
|
|
7438
7533
|
heading: /* @__PURE__ */ B(Nl, {
|
|
@@ -7465,14 +7560,14 @@ var Cr = /* @__PURE__ */ function(e) {
|
|
|
7465
7560
|
}) : /* @__PURE__ */ z(xr, {
|
|
7466
7561
|
oldValue: e,
|
|
7467
7562
|
newValue: t,
|
|
7468
|
-
splitView: o ===
|
|
7563
|
+
splitView: o === Fd,
|
|
7469
7564
|
compareMethod: Sr.WORDS
|
|
7470
7565
|
})
|
|
7471
7566
|
}) });
|
|
7472
7567
|
};
|
|
7473
7568
|
//#endregion
|
|
7474
7569
|
//#region src/helpers/date.ts
|
|
7475
|
-
function
|
|
7570
|
+
function Rd({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i, locale: a }) {
|
|
7476
7571
|
return e ? new Date(e).toLocaleString(a, {
|
|
7477
7572
|
year: "numeric",
|
|
7478
7573
|
month: "short",
|
|
@@ -7486,28 +7581,28 @@ function Md({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i
|
|
|
7486
7581
|
}
|
|
7487
7582
|
//#endregion
|
|
7488
7583
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/clone.js
|
|
7489
|
-
function
|
|
7584
|
+
function zd(e) {
|
|
7490
7585
|
var t;
|
|
7491
7586
|
let n = /^\/(.*)\/([gimyu]*)$/.exec(e.toString());
|
|
7492
7587
|
if (!n) throw Error("Invalid RegExp");
|
|
7493
7588
|
return new RegExp((t = n[1]) == null ? "" : t, n[2]);
|
|
7494
7589
|
}
|
|
7495
|
-
function
|
|
7590
|
+
function Bd(e) {
|
|
7496
7591
|
if (typeof e != "object") return e;
|
|
7497
7592
|
if (e === null) return null;
|
|
7498
|
-
if (Array.isArray(e)) return e.map(
|
|
7593
|
+
if (Array.isArray(e)) return e.map(Bd);
|
|
7499
7594
|
if (e instanceof Date) return new Date(e.getTime());
|
|
7500
|
-
if (e instanceof RegExp) return
|
|
7595
|
+
if (e instanceof RegExp) return zd(e);
|
|
7501
7596
|
let t = {};
|
|
7502
|
-
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] =
|
|
7597
|
+
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = Bd(e[n]));
|
|
7503
7598
|
return t;
|
|
7504
7599
|
}
|
|
7505
7600
|
//#endregion
|
|
7506
7601
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/assertions/arrays.js
|
|
7507
|
-
function
|
|
7602
|
+
function Vd(e, t) {
|
|
7508
7603
|
if (e.length === 0) throw Error(t || "Expected a non-empty array");
|
|
7509
7604
|
}
|
|
7510
|
-
var
|
|
7605
|
+
var Hd = (e) => e[e.length - 1], Ud = class {
|
|
7511
7606
|
setResult(e) {
|
|
7512
7607
|
return this.result = e, this.hasResult = !0, this;
|
|
7513
7608
|
}
|
|
@@ -7515,16 +7610,16 @@ var Id = (e) => e[e.length - 1], Ld = class {
|
|
|
7515
7610
|
return this.exiting = !0, this;
|
|
7516
7611
|
}
|
|
7517
7612
|
push(e, t) {
|
|
7518
|
-
return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (
|
|
7613
|
+
return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (Vd(this.children), Hd(this.children).next = e, this.children.push(e)) : (this.children = [e], this.nextAfterChildren = this.next || null, this.next = e), e.next = this, this;
|
|
7519
7614
|
}
|
|
7520
|
-
},
|
|
7615
|
+
}, Wd = class extends Ud {
|
|
7521
7616
|
constructor(e, t) {
|
|
7522
7617
|
super(), this.left = e, this.right = t, this.pipe = "diff";
|
|
7523
7618
|
}
|
|
7524
7619
|
prepareDeltaResult(e) {
|
|
7525
7620
|
var t, n, r, i;
|
|
7526
7621
|
if (typeof e == "object" && ((t = this.options) != null && t.omitRemovedValues && Array.isArray(e) && e.length > 1 && (e.length === 2 || e[2] === 0 || e[2] === 3) && (e[0] = 0), (n = this.options) != null && n.cloneDiffValues)) {
|
|
7527
|
-
let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues :
|
|
7622
|
+
let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues : Bd;
|
|
7528
7623
|
typeof e[0] == "object" && (e[0] = t(e[0])), typeof e[1] == "object" && (e[1] = t(e[1]));
|
|
7529
7624
|
}
|
|
7530
7625
|
return e;
|
|
@@ -7532,15 +7627,15 @@ var Id = (e) => e[e.length - 1], Ld = class {
|
|
|
7532
7627
|
setResult(e) {
|
|
7533
7628
|
return this.prepareDeltaResult(e), super.setResult(e);
|
|
7534
7629
|
}
|
|
7535
|
-
},
|
|
7630
|
+
}, Gd = class extends Ud {
|
|
7536
7631
|
constructor(e, t) {
|
|
7537
7632
|
super(), this.left = e, this.delta = t, this.pipe = "patch";
|
|
7538
7633
|
}
|
|
7539
|
-
},
|
|
7634
|
+
}, Kd = class extends Ud {
|
|
7540
7635
|
constructor(e) {
|
|
7541
7636
|
super(), this.delta = e, this.pipe = "reverse";
|
|
7542
7637
|
}
|
|
7543
|
-
},
|
|
7638
|
+
}, qd = class {
|
|
7544
7639
|
constructor(e) {
|
|
7545
7640
|
this.name = e, this.filters = [];
|
|
7546
7641
|
}
|
|
@@ -7604,7 +7699,7 @@ var Id = (e) => e[e.length - 1], Ld = class {
|
|
|
7604
7699
|
}
|
|
7605
7700
|
}), this);
|
|
7606
7701
|
}
|
|
7607
|
-
},
|
|
7702
|
+
}, Jd = class {
|
|
7608
7703
|
constructor(e) {
|
|
7609
7704
|
this.selfOptions = e || {}, this.pipes = {};
|
|
7610
7705
|
}
|
|
@@ -7631,7 +7726,7 @@ var Id = (e) => e[e.length - 1], Ld = class {
|
|
|
7631
7726
|
for (; r;) n.nextAfterChildren !== void 0 && (n.next = n.nextAfterChildren, n.nextAfterChildren = null), typeof r == "string" && (r = this.pipe(r)), r.process(n), i = r, r = null, n && n.next && (n = n.next, r = n.pipe || i);
|
|
7632
7727
|
return n.hasResult ? n.result : void 0;
|
|
7633
7728
|
}
|
|
7634
|
-
},
|
|
7729
|
+
}, Yd = (e, t, n, r) => e[n] === t[r], Xd = (e, t, n, r) => {
|
|
7635
7730
|
var i, a, o;
|
|
7636
7731
|
let s = e.length, c = t.length, l, u, d = Array(s + 1);
|
|
7637
7732
|
for (l = 0; l < s + 1; l++) {
|
|
@@ -7647,7 +7742,7 @@ var Id = (e) => e[e.length - 1], Ld = class {
|
|
|
7647
7742
|
for (u = 1; u < c + 1; u++) n(e, t, l - 1, u - 1, r) ? s[u] = ((i = f[u - 1]) == null ? 0 : i) + 1 : s[u] = Math.max((a = f[u]) == null ? 0 : a, (o = s[u - 1]) == null ? 0 : o);
|
|
7648
7743
|
}
|
|
7649
7744
|
return d;
|
|
7650
|
-
},
|
|
7745
|
+
}, Zd = (e, t, n, r) => {
|
|
7651
7746
|
let i = t.length, a = n.length, o = {
|
|
7652
7747
|
sequence: [],
|
|
7653
7748
|
indices1: [],
|
|
@@ -7669,11 +7764,11 @@ var Id = (e) => e[e.length - 1], Ld = class {
|
|
|
7669
7764
|
}
|
|
7670
7765
|
}
|
|
7671
7766
|
return o;
|
|
7672
|
-
},
|
|
7767
|
+
}, Qd = { get: (e, t, n, r) => {
|
|
7673
7768
|
let i = r || {};
|
|
7674
|
-
return
|
|
7675
|
-
} },
|
|
7676
|
-
function
|
|
7769
|
+
return Zd(Xd(e, t, n || Yd, i), e, t, i);
|
|
7770
|
+
} }, $d = 3;
|
|
7771
|
+
function ef(e, t, n, r) {
|
|
7677
7772
|
for (let i = 0; i < n; i++) {
|
|
7678
7773
|
let n = e[i];
|
|
7679
7774
|
for (let e = 0; e < r; e++) {
|
|
@@ -7683,7 +7778,7 @@ function Jd(e, t, n, r) {
|
|
|
7683
7778
|
}
|
|
7684
7779
|
return !1;
|
|
7685
7780
|
}
|
|
7686
|
-
function
|
|
7781
|
+
function tf(e, t, n, r, i) {
|
|
7687
7782
|
let a = e[n], o = t[r];
|
|
7688
7783
|
if (a === o) return !0;
|
|
7689
7784
|
if (typeof a != "object" || typeof o != "object") return !1;
|
|
@@ -7696,15 +7791,15 @@ function Yd(e, t, n, r, i) {
|
|
|
7696
7791
|
let l = i.hashCache2[r];
|
|
7697
7792
|
return l === void 0 && (i.hashCache2[r] = l = s(o, r)), l === void 0 ? !1 : c === l;
|
|
7698
7793
|
}
|
|
7699
|
-
var
|
|
7794
|
+
var nf = function(e) {
|
|
7700
7795
|
var t, n, r, i, a;
|
|
7701
7796
|
if (!e.leftIsArray) return;
|
|
7702
7797
|
let o = {
|
|
7703
7798
|
objectHash: (t = e.options) == null ? void 0 : t.objectHash,
|
|
7704
7799
|
matchByPosition: (n = e.options) == null ? void 0 : n.matchByPosition
|
|
7705
7800
|
}, s = 0, c = 0, l, u, d, f = e.left, p = e.right, m = f.length, h = p.length, g;
|
|
7706
|
-
for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !
|
|
7707
|
-
for (; c + s < m && c + s < h &&
|
|
7801
|
+
for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !ef(f, p, m, h)); s < m && s < h && tf(f, p, s, s, o);) l = s, g = new Wd(f[l], p[l]), e.push(g, l), s++;
|
|
7802
|
+
for (; c + s < m && c + s < h && tf(f, p, m - 1 - c, h - 1 - c, o);) u = m - 1 - c, d = h - 1 - c, g = new Wd(f[u], p[d]), e.push(g, d), c++;
|
|
7708
7803
|
let _;
|
|
7709
7804
|
if (s + c === m) {
|
|
7710
7805
|
if (m === h) {
|
|
@@ -7728,7 +7823,7 @@ var Xd = function(e) {
|
|
|
7728
7823
|
return;
|
|
7729
7824
|
}
|
|
7730
7825
|
o.hashCache1 = void 0, o.hashCache2 = void 0;
|
|
7731
|
-
let v = f.slice(s, m - c), y = p.slice(s, h - c), b =
|
|
7826
|
+
let v = f.slice(s, m - c), y = p.slice(s, h - c), b = Qd.get(v, y, tf, o), x = [];
|
|
7732
7827
|
for (_ = _ || { _t: "a" }, l = s; l < m - c; l++) if (b.indices1.indexOf(l - s) < 0) {
|
|
7733
7828
|
let t = `_${l}`;
|
|
7734
7829
|
_[t] = [
|
|
@@ -7749,8 +7844,8 @@ var Xd = function(e) {
|
|
|
7749
7844
|
if (S && w > 0) for (let n = 0; n < w; n++) {
|
|
7750
7845
|
u = x[n];
|
|
7751
7846
|
let r = u === void 0 ? void 0 : _[`_${u}`];
|
|
7752
|
-
if (u !== void 0 && r &&
|
|
7753
|
-
r.splice(1, 2, l,
|
|
7847
|
+
if (u !== void 0 && r && tf(v, y, u - s, l - s, o)) {
|
|
7848
|
+
r.splice(1, 2, l, $d), r.splice(1, 2, l, $d), C || (r[0] = ""), d = l, g = new Wd(f[u], p[d]), e.push(g, d), x.splice(n, 1), t = !0;
|
|
7754
7849
|
break;
|
|
7755
7850
|
}
|
|
7756
7851
|
}
|
|
@@ -7758,20 +7853,20 @@ var Xd = function(e) {
|
|
|
7758
7853
|
} else {
|
|
7759
7854
|
if (b.indices1[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices1: ${b.indices1}`);
|
|
7760
7855
|
if (u = b.indices1[t] + s, b.indices2[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices2: ${b.indices2}`);
|
|
7761
|
-
d = b.indices2[t] + s, g = new
|
|
7856
|
+
d = b.indices2[t] + s, g = new Wd(f[u], p[d]), e.push(g, d);
|
|
7762
7857
|
}
|
|
7763
7858
|
}
|
|
7764
7859
|
e.setResult(_).exit();
|
|
7765
7860
|
};
|
|
7766
|
-
|
|
7767
|
-
var
|
|
7861
|
+
nf.filterName = "arrays";
|
|
7862
|
+
var rf = {
|
|
7768
7863
|
numerically(e, t) {
|
|
7769
7864
|
return e - t;
|
|
7770
7865
|
},
|
|
7771
7866
|
numericallyBy(e) {
|
|
7772
7867
|
return (t, n) => t[e] - n[e];
|
|
7773
7868
|
}
|
|
7774
|
-
},
|
|
7869
|
+
}, af = function(e) {
|
|
7775
7870
|
var t;
|
|
7776
7871
|
if (!e.nested) return;
|
|
7777
7872
|
let n = e.delta;
|
|
@@ -7779,7 +7874,7 @@ var Zd = {
|
|
|
7779
7874
|
let r, i, a = n, o = e.left, s = [], c = [], l = [];
|
|
7780
7875
|
for (r in a) if (r !== "_t") if (r[0] === "_") {
|
|
7781
7876
|
let e = r;
|
|
7782
|
-
if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] ===
|
|
7877
|
+
if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] === $d)) s.push(Number.parseInt(r.slice(1), 10));
|
|
7783
7878
|
else throw Error(`only removal or move can be applied at original array indices, invalid diff type: ${(t = a[e]) == null ? void 0 : t[2]}`);
|
|
7784
7879
|
} else {
|
|
7785
7880
|
let e = r;
|
|
@@ -7791,15 +7886,15 @@ var Zd = {
|
|
|
7791
7886
|
delta: a[e]
|
|
7792
7887
|
});
|
|
7793
7888
|
}
|
|
7794
|
-
for (s = s.sort(
|
|
7889
|
+
for (s = s.sort(rf.numerically), r = s.length - 1; r >= 0; r--) {
|
|
7795
7890
|
if (i = s[r], i === void 0) continue;
|
|
7796
7891
|
let e = a[`_${i}`], t = o.splice(i, 1)[0];
|
|
7797
|
-
(e == null ? void 0 : e[2]) ===
|
|
7892
|
+
(e == null ? void 0 : e[2]) === $d && c.push({
|
|
7798
7893
|
index: e[1],
|
|
7799
7894
|
value: t
|
|
7800
7895
|
});
|
|
7801
7896
|
}
|
|
7802
|
-
c = c.sort(
|
|
7897
|
+
c = c.sort(rf.numericallyBy("index"));
|
|
7803
7898
|
let u = c.length;
|
|
7804
7899
|
for (r = 0; r < u; r++) {
|
|
7805
7900
|
let e = c[r];
|
|
@@ -7809,7 +7904,7 @@ var Zd = {
|
|
|
7809
7904
|
if (d > 0) for (r = 0; r < d; r++) {
|
|
7810
7905
|
let t = l[r];
|
|
7811
7906
|
if (t === void 0) continue;
|
|
7812
|
-
let n = new
|
|
7907
|
+
let n = new Gd(o[t.index], t.delta);
|
|
7813
7908
|
e.push(n, t.index);
|
|
7814
7909
|
}
|
|
7815
7910
|
if (!e.children) {
|
|
@@ -7818,8 +7913,8 @@ var Zd = {
|
|
|
7818
7913
|
}
|
|
7819
7914
|
e.exit();
|
|
7820
7915
|
};
|
|
7821
|
-
|
|
7822
|
-
var
|
|
7916
|
+
af.filterName = "arrays";
|
|
7917
|
+
var of = function(e) {
|
|
7823
7918
|
if (!e || !e.children || e.delta._t !== "a") return;
|
|
7824
7919
|
let t = e.left, n = e.children.length;
|
|
7825
7920
|
for (let r = 0; r < n; r++) {
|
|
@@ -7830,16 +7925,16 @@ var $d = function(e) {
|
|
|
7830
7925
|
}
|
|
7831
7926
|
e.setResult(t).exit();
|
|
7832
7927
|
};
|
|
7833
|
-
|
|
7834
|
-
var
|
|
7928
|
+
of.filterName = "arraysCollectChildren";
|
|
7929
|
+
var sf = function(e) {
|
|
7835
7930
|
if (!e.nested) {
|
|
7836
7931
|
let t = e.delta;
|
|
7837
|
-
if (t[2] ===
|
|
7932
|
+
if (t[2] === $d) {
|
|
7838
7933
|
let n = t;
|
|
7839
7934
|
e.newName = `_${n[1]}`, e.setResult([
|
|
7840
7935
|
n[0],
|
|
7841
7936
|
Number.parseInt(e.childName.substring(1), 10),
|
|
7842
|
-
|
|
7937
|
+
$d
|
|
7843
7938
|
]).exit();
|
|
7844
7939
|
}
|
|
7845
7940
|
return;
|
|
@@ -7849,26 +7944,26 @@ var ef = function(e) {
|
|
|
7849
7944
|
let n = t;
|
|
7850
7945
|
for (let t in n) {
|
|
7851
7946
|
if (t === "_t") continue;
|
|
7852
|
-
let r = new
|
|
7947
|
+
let r = new Kd(n[t]);
|
|
7853
7948
|
e.push(r, t);
|
|
7854
7949
|
}
|
|
7855
7950
|
e.exit();
|
|
7856
7951
|
};
|
|
7857
|
-
|
|
7858
|
-
var
|
|
7952
|
+
sf.filterName = "arrays";
|
|
7953
|
+
var cf = (e, t, n) => {
|
|
7859
7954
|
if (typeof t == "string" && t[0] === "_") return Number.parseInt(t.substring(1), 10);
|
|
7860
7955
|
if (Array.isArray(n) && n[2] === 0) return `_${t}`;
|
|
7861
7956
|
let r = +t;
|
|
7862
7957
|
for (let n in e) {
|
|
7863
7958
|
let i = e[n];
|
|
7864
|
-
if (Array.isArray(i)) if (i[2] ===
|
|
7959
|
+
if (Array.isArray(i)) if (i[2] === $d) {
|
|
7865
7960
|
let e = Number.parseInt(n.substring(1), 10), a = i[1];
|
|
7866
7961
|
if (a === +t) return e;
|
|
7867
7962
|
e <= r && a > r ? r++ : e >= r && a < r && r--;
|
|
7868
7963
|
} else i[2] === 0 ? Number.parseInt(n.substring(1), 10) <= r && r++ : i.length === 1 && Number.parseInt(n, 10) <= r && r--;
|
|
7869
7964
|
}
|
|
7870
7965
|
return r;
|
|
7871
|
-
},
|
|
7966
|
+
}, lf = (e) => {
|
|
7872
7967
|
if (!e || !e.children) return;
|
|
7873
7968
|
let t = e.delta;
|
|
7874
7969
|
if (t._t !== "a") return;
|
|
@@ -7879,22 +7974,22 @@ var tf = (e, t, n) => {
|
|
|
7879
7974
|
let a = r.newName;
|
|
7880
7975
|
if (a === void 0) {
|
|
7881
7976
|
if (r.childName === void 0) throw Error("child.childName is undefined");
|
|
7882
|
-
a =
|
|
7977
|
+
a = cf(n, r.childName, r.result);
|
|
7883
7978
|
}
|
|
7884
7979
|
i[a] !== r.result && (i[a] = r.result);
|
|
7885
7980
|
}
|
|
7886
7981
|
e.setResult(i).exit();
|
|
7887
7982
|
};
|
|
7888
|
-
|
|
7983
|
+
lf.filterName = "arraysCollectChildren";
|
|
7889
7984
|
//#endregion
|
|
7890
7985
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/dates.js
|
|
7891
|
-
var
|
|
7986
|
+
var uf = function(e) {
|
|
7892
7987
|
e.left instanceof Date ? (e.right instanceof Date && e.left.getTime() === e.right.getTime() ? e.setResult(void 0) : e.setResult([e.left, e.right]), e.exit()) : e.right instanceof Date && e.setResult([e.left, e.right]).exit();
|
|
7893
7988
|
};
|
|
7894
|
-
|
|
7989
|
+
uf.filterName = "dates";
|
|
7895
7990
|
//#endregion
|
|
7896
7991
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/nested.js
|
|
7897
|
-
var
|
|
7992
|
+
var df = new Set(["__proto__"]), ff = (e) => {
|
|
7898
7993
|
if (!e || !e.children) return;
|
|
7899
7994
|
let t = e.children.length, n = e.result;
|
|
7900
7995
|
for (let r = 0; r < t; r++) {
|
|
@@ -7906,18 +8001,18 @@ var af = new Set(["__proto__"]), of = (e) => {
|
|
|
7906
8001
|
}
|
|
7907
8002
|
n && e.leftIsArray && (n._t = "a"), e.setResult(n).exit();
|
|
7908
8003
|
};
|
|
7909
|
-
|
|
7910
|
-
var
|
|
8004
|
+
ff.filterName = "collectChildren";
|
|
8005
|
+
var pf = (e) => {
|
|
7911
8006
|
var t;
|
|
7912
8007
|
if (e.leftIsArray || e.leftType !== "object") return;
|
|
7913
8008
|
let n = e.left, r = e.right, i = (t = e.options) == null ? void 0 : t.propertyFilter;
|
|
7914
8009
|
for (let t in n) {
|
|
7915
8010
|
if (!Object.prototype.hasOwnProperty.call(n, t) || i && !i(t, e)) continue;
|
|
7916
|
-
let a = new
|
|
8011
|
+
let a = new Wd(n[t], r[t]);
|
|
7917
8012
|
e.push(a, t);
|
|
7918
8013
|
}
|
|
7919
8014
|
for (let t in r) if (Object.prototype.hasOwnProperty.call(r, t) && !(i && !i(t, e)) && n[t] === void 0) {
|
|
7920
|
-
let n = new
|
|
8015
|
+
let n = new Wd(void 0, r[t]);
|
|
7921
8016
|
e.push(n, t);
|
|
7922
8017
|
}
|
|
7923
8018
|
if (!e.children || e.children.length === 0) {
|
|
@@ -7926,15 +8021,15 @@ var sf = (e) => {
|
|
|
7926
8021
|
}
|
|
7927
8022
|
e.exit();
|
|
7928
8023
|
};
|
|
7929
|
-
|
|
7930
|
-
var
|
|
8024
|
+
pf.filterName = "objects";
|
|
8025
|
+
var mf = function(e) {
|
|
7931
8026
|
if (!e.nested) return;
|
|
7932
8027
|
let t = e.delta;
|
|
7933
8028
|
if (t._t) return;
|
|
7934
8029
|
let n = t, r = !1;
|
|
7935
8030
|
for (let t in n) {
|
|
7936
|
-
if (
|
|
7937
|
-
let i = e.left, a = new
|
|
8031
|
+
if (df.has(t) || !Object.prototype.hasOwnProperty.call(n, t)) continue;
|
|
8032
|
+
let i = e.left, a = new Gd(typeof i == "object" && i && Object.prototype.hasOwnProperty.call(i, t) ? i[t] : void 0, n[t]);
|
|
7938
8033
|
e.push(a, t), r = !0;
|
|
7939
8034
|
}
|
|
7940
8035
|
if (!r) {
|
|
@@ -7943,8 +8038,8 @@ var cf = function(e) {
|
|
|
7943
8038
|
}
|
|
7944
8039
|
e.exit();
|
|
7945
8040
|
};
|
|
7946
|
-
|
|
7947
|
-
var
|
|
8041
|
+
mf.filterName = "objects";
|
|
8042
|
+
var hf = function(e) {
|
|
7948
8043
|
if (!e || !e.children || e.delta._t) return;
|
|
7949
8044
|
if (e.left === null || typeof e.left != "object") {
|
|
7950
8045
|
e.setResult(e.left).exit();
|
|
@@ -7955,17 +8050,17 @@ var lf = function(e) {
|
|
|
7955
8050
|
let n = e.children[r];
|
|
7956
8051
|
if (n === void 0) continue;
|
|
7957
8052
|
let i = n.childName;
|
|
7958
|
-
|
|
8053
|
+
df.has(i) || (Object.prototype.hasOwnProperty.call(e.left, i) && n.result === void 0 ? delete t[i] : t[i] !== n.result && (t[i] = n.result));
|
|
7959
8054
|
}
|
|
7960
8055
|
e.setResult(t).exit();
|
|
7961
8056
|
};
|
|
7962
|
-
|
|
7963
|
-
var
|
|
8057
|
+
hf.filterName = "collectChildren";
|
|
8058
|
+
var gf = function(e) {
|
|
7964
8059
|
if (!e.nested || e.delta._t) return;
|
|
7965
8060
|
let t = e.delta, n = !1;
|
|
7966
8061
|
for (let r in t) {
|
|
7967
|
-
if (
|
|
7968
|
-
let i = new
|
|
8062
|
+
if (df.has(r) || !Object.prototype.hasOwnProperty.call(t, r)) continue;
|
|
8063
|
+
let i = new Kd(t[r]);
|
|
7969
8064
|
e.push(i, r), n = !0;
|
|
7970
8065
|
}
|
|
7971
8066
|
if (!n) {
|
|
@@ -7974,25 +8069,25 @@ var uf = function(e) {
|
|
|
7974
8069
|
}
|
|
7975
8070
|
e.exit();
|
|
7976
8071
|
};
|
|
7977
|
-
|
|
7978
|
-
var
|
|
8072
|
+
gf.filterName = "objects";
|
|
8073
|
+
var _f = (e) => {
|
|
7979
8074
|
if (!e || !e.children || e.delta._t) return;
|
|
7980
8075
|
let t = e.children.length, n = {};
|
|
7981
8076
|
for (let r = 0; r < t; r++) {
|
|
7982
8077
|
let t = e.children[r];
|
|
7983
8078
|
if (t === void 0) continue;
|
|
7984
8079
|
let i = t.childName;
|
|
7985
|
-
|
|
8080
|
+
df.has(i) || n[i] !== t.result && (n[i] = t.result);
|
|
7986
8081
|
}
|
|
7987
8082
|
e.setResult(n).exit();
|
|
7988
8083
|
};
|
|
7989
|
-
|
|
8084
|
+
_f.filterName = "collectChildren";
|
|
7990
8085
|
//#endregion
|
|
7991
8086
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/texts.js
|
|
7992
|
-
var
|
|
7993
|
-
function
|
|
8087
|
+
var vf = 2, yf = 60, bf = null;
|
|
8088
|
+
function xf(e, t) {
|
|
7994
8089
|
var n;
|
|
7995
|
-
if (!
|
|
8090
|
+
if (!bf) {
|
|
7996
8091
|
let r;
|
|
7997
8092
|
if ((n = e == null ? void 0 : e.textDiff) != null && n.diffMatchPatch) r = new e.textDiff.diffMatchPatch();
|
|
7998
8093
|
else {
|
|
@@ -8000,7 +8095,7 @@ function hf(e, t) {
|
|
|
8000
8095
|
let e = /* @__PURE__ */ Error("The diff-match-patch library was not provided. Pass the library in through the options or use the `jsondiffpatch/with-text-diffs` entry-point.");
|
|
8001
8096
|
throw e.diff_match_patch_not_found = !0, e;
|
|
8002
8097
|
}
|
|
8003
|
-
|
|
8098
|
+
bf = {
|
|
8004
8099
|
diff: (e, t) => r.patch_toText(r.patch_make(e, t)),
|
|
8005
8100
|
patch: (e, t) => {
|
|
8006
8101
|
let n = r.patch_apply(r.patch_fromText(t), e);
|
|
@@ -8012,17 +8107,17 @@ function hf(e, t) {
|
|
|
8012
8107
|
}
|
|
8013
8108
|
};
|
|
8014
8109
|
}
|
|
8015
|
-
return
|
|
8110
|
+
return bf;
|
|
8016
8111
|
}
|
|
8017
|
-
var
|
|
8112
|
+
var Sf = function(e) {
|
|
8018
8113
|
var t, n;
|
|
8019
8114
|
if (e.leftType !== "string") return;
|
|
8020
|
-
let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) ||
|
|
8115
|
+
let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) || yf;
|
|
8021
8116
|
if (r.length < a || i.length < a) {
|
|
8022
8117
|
e.setResult([r, i]).exit();
|
|
8023
8118
|
return;
|
|
8024
8119
|
}
|
|
8025
|
-
let o =
|
|
8120
|
+
let o = xf(e.options);
|
|
8026
8121
|
if (!o) {
|
|
8027
8122
|
e.setResult([r, i]).exit();
|
|
8028
8123
|
return;
|
|
@@ -8031,19 +8126,19 @@ var gf = function(e) {
|
|
|
8031
8126
|
e.setResult([
|
|
8032
8127
|
s(r, i),
|
|
8033
8128
|
0,
|
|
8034
|
-
|
|
8129
|
+
vf
|
|
8035
8130
|
]).exit();
|
|
8036
8131
|
};
|
|
8037
|
-
|
|
8038
|
-
var
|
|
8132
|
+
Sf.filterName = "texts";
|
|
8133
|
+
var Cf = function(e) {
|
|
8039
8134
|
if (e.nested) return;
|
|
8040
8135
|
let t = e.delta;
|
|
8041
|
-
if (t[2] !==
|
|
8042
|
-
let n = t, r =
|
|
8136
|
+
if (t[2] !== vf) return;
|
|
8137
|
+
let n = t, r = xf(e.options, !0).patch;
|
|
8043
8138
|
e.setResult(r(e.left, n[0])).exit();
|
|
8044
8139
|
};
|
|
8045
|
-
|
|
8046
|
-
var
|
|
8140
|
+
Cf.filterName = "texts";
|
|
8141
|
+
var wf = (e) => {
|
|
8047
8142
|
var t, n, r;
|
|
8048
8143
|
let i = /^@@ +-(\d+),(\d+) +\+(\d+),(\d+) +@@$/, a = e.split("\n");
|
|
8049
8144
|
for (let e = 0; e < a.length; e++) {
|
|
@@ -8064,21 +8159,21 @@ var vf = (e) => {
|
|
|
8064
8159
|
} else s === "-" && (a[e] = `+${(r = a[e]) == null ? void 0 : r.slice(1)}`);
|
|
8065
8160
|
}
|
|
8066
8161
|
return a.join("\n");
|
|
8067
|
-
},
|
|
8162
|
+
}, Tf = function(e) {
|
|
8068
8163
|
if (e.nested) return;
|
|
8069
8164
|
let t = e.delta;
|
|
8070
|
-
if (t[2] !==
|
|
8165
|
+
if (t[2] !== vf) return;
|
|
8071
8166
|
let n = t;
|
|
8072
8167
|
e.setResult([
|
|
8073
|
-
|
|
8168
|
+
wf(n[0]),
|
|
8074
8169
|
0,
|
|
8075
|
-
|
|
8170
|
+
vf
|
|
8076
8171
|
]).exit();
|
|
8077
8172
|
};
|
|
8078
|
-
|
|
8173
|
+
Tf.filterName = "texts";
|
|
8079
8174
|
//#endregion
|
|
8080
8175
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/trivial.js
|
|
8081
|
-
var
|
|
8176
|
+
var Ef = function(e) {
|
|
8082
8177
|
if (e.left === e.right) {
|
|
8083
8178
|
e.setResult(void 0).exit();
|
|
8084
8179
|
return;
|
|
@@ -8111,8 +8206,8 @@ var bf = function(e) {
|
|
|
8111
8206
|
}
|
|
8112
8207
|
e.left instanceof RegExp && (e.right instanceof RegExp ? e.setResult([e.left.toString(), e.right.toString()]).exit() : e.setResult([e.left, e.right]).exit());
|
|
8113
8208
|
};
|
|
8114
|
-
|
|
8115
|
-
var
|
|
8209
|
+
Ef.filterName = "trivial";
|
|
8210
|
+
var Df = function(e) {
|
|
8116
8211
|
if (e.delta === void 0) {
|
|
8117
8212
|
e.setResult(e.left).exit();
|
|
8118
8213
|
return;
|
|
@@ -8136,8 +8231,8 @@ var xf = function(e) {
|
|
|
8136
8231
|
}
|
|
8137
8232
|
t.length === 3 && t[2] === 0 && e.setResult(void 0).exit();
|
|
8138
8233
|
};
|
|
8139
|
-
|
|
8140
|
-
var
|
|
8234
|
+
Df.filterName = "trivial";
|
|
8235
|
+
var Of = function(e) {
|
|
8141
8236
|
if (e.delta === void 0) {
|
|
8142
8237
|
e.setResult(e.delta).exit();
|
|
8143
8238
|
return;
|
|
@@ -8158,36 +8253,36 @@ var Sf = function(e) {
|
|
|
8158
8253
|
}
|
|
8159
8254
|
t.length === 3 && t[2] === 0 && e.setResult([t[0]]).exit();
|
|
8160
8255
|
};
|
|
8161
|
-
|
|
8256
|
+
Of.filterName = "trivial";
|
|
8162
8257
|
//#endregion
|
|
8163
8258
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/diffpatcher.js
|
|
8164
|
-
var
|
|
8259
|
+
var kf = class {
|
|
8165
8260
|
constructor(e) {
|
|
8166
|
-
this.processor = new
|
|
8261
|
+
this.processor = new Jd(e), this.processor.pipe(new qd("diff").append(ff, Ef, uf, Sf, pf, nf).shouldHaveResult()), this.processor.pipe(new qd("patch").append(hf, of, Df, Cf, mf, af).shouldHaveResult()), this.processor.pipe(new qd("reverse").append(_f, lf, Of, Tf, gf, sf).shouldHaveResult());
|
|
8167
8262
|
}
|
|
8168
8263
|
options(e) {
|
|
8169
8264
|
return this.processor.options(e);
|
|
8170
8265
|
}
|
|
8171
8266
|
diff(e, t) {
|
|
8172
|
-
return this.processor.process(new
|
|
8267
|
+
return this.processor.process(new Wd(e, t));
|
|
8173
8268
|
}
|
|
8174
8269
|
patch(e, t) {
|
|
8175
|
-
return this.processor.process(new
|
|
8270
|
+
return this.processor.process(new Gd(e, t));
|
|
8176
8271
|
}
|
|
8177
8272
|
reverse(e) {
|
|
8178
|
-
return this.processor.process(new
|
|
8273
|
+
return this.processor.process(new Kd(e));
|
|
8179
8274
|
}
|
|
8180
8275
|
unpatch(e, t) {
|
|
8181
8276
|
return this.patch(e, this.reverse(t));
|
|
8182
8277
|
}
|
|
8183
8278
|
clone(e) {
|
|
8184
|
-
return
|
|
8279
|
+
return Bd(e);
|
|
8185
8280
|
}
|
|
8186
8281
|
};
|
|
8187
8282
|
//#endregion
|
|
8188
8283
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/index.js
|
|
8189
|
-
function
|
|
8190
|
-
return new
|
|
8284
|
+
function Af(e) {
|
|
8285
|
+
return new kf(e);
|
|
8191
8286
|
}
|
|
8192
8287
|
//#endregion
|
|
8193
8288
|
//#region node_modules/.pnpm/@dmsnell+diff-match-patch@1.1.0/node_modules/@dmsnell/diff-match-patch/index.js
|
|
@@ -8760,46 +8855,46 @@ $.Diff = function(e, t) {
|
|
|
8760
8855
|
};
|
|
8761
8856
|
//#endregion
|
|
8762
8857
|
//#region src/components/audit-log/create-diff-patcher.tsx
|
|
8763
|
-
var
|
|
8858
|
+
var jf = (e = {}) => Af({
|
|
8764
8859
|
...e,
|
|
8765
8860
|
textDiff: {
|
|
8766
8861
|
diffMatchPatch: $,
|
|
8767
8862
|
minLength: 120
|
|
8768
8863
|
},
|
|
8769
8864
|
cloneDiffValues: !0
|
|
8770
|
-
}),
|
|
8865
|
+
}), Mf = ["user", "unittemplate"], Nf = jf(), Pf = (e, t, n) => {
|
|
8771
8866
|
let r = Object.fromEntries(e.map((e) => [e.sectionKey, e.sectionLabel]));
|
|
8772
8867
|
for (let e = t.length - 1; e >= 0; e--) {
|
|
8773
8868
|
let n = r[t[e]];
|
|
8774
8869
|
if (n) return n;
|
|
8775
8870
|
}
|
|
8776
8871
|
return n || "";
|
|
8777
|
-
},
|
|
8872
|
+
}, Ff = (e) => {
|
|
8778
8873
|
let t = (e) => Nn(e) ? Gn(e) : String(e);
|
|
8779
8874
|
return Array.isArray(e) ? e.length === 0 ? "" : e.some((e) => e && typeof e == "object") ? "Multiple changes..." : e.map(t).join(", ") : e && typeof e == "object" ? Object.keys(e).length === 0 ? "" : "Multiple changes..." : t(e);
|
|
8780
|
-
},
|
|
8875
|
+
}, If = (e) => {
|
|
8781
8876
|
switch (e.length) {
|
|
8782
8877
|
case 1: {
|
|
8783
8878
|
let [t] = e;
|
|
8784
8879
|
return {
|
|
8785
8880
|
type: "created",
|
|
8786
8881
|
before: "",
|
|
8787
|
-
after:
|
|
8882
|
+
after: Ff(t)
|
|
8788
8883
|
};
|
|
8789
8884
|
}
|
|
8790
8885
|
case 2: {
|
|
8791
8886
|
let [t, n] = e;
|
|
8792
8887
|
return {
|
|
8793
8888
|
type: "modified",
|
|
8794
|
-
before:
|
|
8795
|
-
after:
|
|
8889
|
+
before: Ff(t),
|
|
8890
|
+
after: Ff(n)
|
|
8796
8891
|
};
|
|
8797
8892
|
}
|
|
8798
8893
|
case 3: {
|
|
8799
8894
|
let [t] = e;
|
|
8800
8895
|
return {
|
|
8801
8896
|
type: "deleted",
|
|
8802
|
-
before:
|
|
8897
|
+
before: Ff(t),
|
|
8803
8898
|
after: ""
|
|
8804
8899
|
};
|
|
8805
8900
|
}
|
|
@@ -8809,15 +8904,15 @@ var Tf = (e = {}) => wf({
|
|
|
8809
8904
|
after: ""
|
|
8810
8905
|
};
|
|
8811
8906
|
}
|
|
8812
|
-
},
|
|
8813
|
-
let r =
|
|
8907
|
+
}, Lf = (e) => Array.isArray(e), Rf = (e, t) => t ? Lf(t) ? t.length === 0 ? e : t.reduce((e, t) => Nf.unpatch(Xt(e), Xt(t)), Xt(e)) : Nf.unpatch(Xt(e), Xt(t)) : e, zf = (e) => e.createdAt || e.date, Bf = (e, t, n) => {
|
|
8908
|
+
let r = zf(e);
|
|
8814
8909
|
if (!r) return {
|
|
8815
8910
|
oldJson: "",
|
|
8816
8911
|
newJson: "",
|
|
8817
8912
|
error: `Cannot create comparison view: missing date for audit log ${e.id}`
|
|
8818
8913
|
};
|
|
8819
8914
|
let i = t.filter((e) => {
|
|
8820
|
-
let t =
|
|
8915
|
+
let t = zf(e);
|
|
8821
8916
|
return !!(e.diffs && t && t >= r);
|
|
8822
8917
|
}), a = Array.from({ length: i.length + 1 });
|
|
8823
8918
|
a[0] = Xt(n);
|
|
@@ -8830,7 +8925,7 @@ var Tf = (e = {}) => wf({
|
|
|
8830
8925
|
a[e + 1] = a[e];
|
|
8831
8926
|
continue;
|
|
8832
8927
|
}
|
|
8833
|
-
a[e + 1] =
|
|
8928
|
+
a[e + 1] = Rf(a[e], t);
|
|
8834
8929
|
}
|
|
8835
8930
|
let e = i.length > 0 ? a[i.length - 1] : n, t = i.length > 0 ? a[i.length] : n;
|
|
8836
8931
|
o = JSON.stringify(t == null ? "" : t, null, 2), s = JSON.stringify(e == null ? "" : e, null, 2);
|
|
@@ -8845,10 +8940,10 @@ var Tf = (e = {}) => wf({
|
|
|
8845
8940
|
oldJson: o,
|
|
8846
8941
|
newJson: s
|
|
8847
8942
|
};
|
|
8848
|
-
},
|
|
8943
|
+
}, Vf = (e, t, n = {}, r = []) => {
|
|
8849
8944
|
var i;
|
|
8850
8945
|
if (!e) return;
|
|
8851
|
-
let a = [...
|
|
8946
|
+
let a = [...Mf, ...(i = n.hiddenKeys) == null ? [] : i];
|
|
8852
8947
|
Object.keys(e).forEach((i) => {
|
|
8853
8948
|
var o;
|
|
8854
8949
|
let s = e[i];
|
|
@@ -8861,12 +8956,12 @@ var Tf = (e = {}) => wf({
|
|
|
8861
8956
|
tn(s) ? t.push({
|
|
8862
8957
|
deltaFormat: [...s],
|
|
8863
8958
|
path: c
|
|
8864
|
-
}) : ln(s) &&
|
|
8959
|
+
}) : ln(s) && Vf(s, t, n, c);
|
|
8865
8960
|
});
|
|
8866
|
-
},
|
|
8961
|
+
}, Hf = (e, t = {}) => {
|
|
8867
8962
|
let n = [];
|
|
8868
|
-
return e ? (
|
|
8869
|
-
},
|
|
8963
|
+
return e ? (Vf(e, n, t), n) : [];
|
|
8964
|
+
}, Uf = (e) => e.replace(/\[\d+\]/g, "").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]/g, " ").replace(/\s+/g, " ").trim().replace(/^./, (e) => e.toUpperCase()), Wf = (e) => {
|
|
8870
8965
|
if (e == null || e === "") return "empty";
|
|
8871
8966
|
if (typeof e == "boolean") return e ? "true" : "false";
|
|
8872
8967
|
if (typeof e == "string") return e;
|
|
@@ -8877,32 +8972,32 @@ var Tf = (e = {}) => wf({
|
|
|
8877
8972
|
} catch {
|
|
8878
8973
|
return String(e);
|
|
8879
8974
|
}
|
|
8880
|
-
},
|
|
8975
|
+
}, Gf = (e, t = e.length - 1) => {
|
|
8881
8976
|
if (t >= e.length) return "Value";
|
|
8882
8977
|
let n = e[t];
|
|
8883
|
-
return !n || An(n) ?
|
|
8884
|
-
},
|
|
8885
|
-
let o =
|
|
8978
|
+
return !n || An(n) ? Gf(e, t - 1) : Uf(n);
|
|
8979
|
+
}, Kf = ({ userName: e, type: t, property: n, before: r, after: i, sectionName: a }) => {
|
|
8980
|
+
let o = Wf(r), s = Wf(i), c = a ? ` in ${a}` : "";
|
|
8886
8981
|
switch (t) {
|
|
8887
8982
|
case "modified": return `${e} updated ${n} from ${o} to ${s}${c}.`;
|
|
8888
8983
|
case "created": return `${e} created ${s}${c}.`;
|
|
8889
8984
|
case "deleted": return `${e} deleted ${o}${c}.`;
|
|
8890
8985
|
default: return `${e} changed ${n}${c}.`;
|
|
8891
8986
|
}
|
|
8892
|
-
},
|
|
8987
|
+
}, qf = ({ sectionNames: e, userName: t, diffs: n, defaultSectionName: r }) => /* @__PURE__ */ z(yc, { table: {
|
|
8893
8988
|
headers: [{ cells: [{ value: "Changes" }] }],
|
|
8894
8989
|
rows: n.map((n) => {
|
|
8895
|
-
let { deltaFormat: i, path: a } = n, o =
|
|
8896
|
-
return { cells: [{ value:
|
|
8990
|
+
let { deltaFormat: i, path: a } = n, o = Pf(e, a, r), { type: s, before: c, after: l } = If(i);
|
|
8991
|
+
return { cells: [{ value: Kf({
|
|
8897
8992
|
userName: t,
|
|
8898
8993
|
type: s,
|
|
8899
|
-
property:
|
|
8994
|
+
property: Gf(a),
|
|
8900
8995
|
before: c,
|
|
8901
8996
|
after: l,
|
|
8902
8997
|
sectionName: o
|
|
8903
8998
|
}) }] };
|
|
8904
8999
|
})
|
|
8905
|
-
} }),
|
|
9000
|
+
} }), Jf = Object.freeze({
|
|
8906
9001
|
summary: {
|
|
8907
9002
|
label: "Summary",
|
|
8908
9003
|
value: "summary"
|
|
@@ -8911,13 +9006,13 @@ var Tf = (e = {}) => wf({
|
|
|
8911
9006
|
label: "Compare",
|
|
8912
9007
|
value: "compare"
|
|
8913
9008
|
}
|
|
8914
|
-
}),
|
|
8915
|
-
let c = [
|
|
9009
|
+
}), Yf = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, transformDiffsConfig: i, sectionNames: a, defaultSectionName: o, onClose: s }) => {
|
|
9010
|
+
let c = [Jf.summary, Jf.compare].map(({ label: e, value: t }) => ({
|
|
8916
9011
|
label: e,
|
|
8917
9012
|
value: t
|
|
8918
9013
|
})), [l, u] = m(c[0]), { diffs: d = void 0 } = e || {};
|
|
8919
9014
|
if (!d) return null;
|
|
8920
|
-
let { oldJson: f, newJson: p, error: h } =
|
|
9015
|
+
let { oldJson: f, newJson: p, error: h } = Bf(e, t, n);
|
|
8921
9016
|
return /* @__PURE__ */ z(Ka, {
|
|
8922
9017
|
visible: r,
|
|
8923
9018
|
centered: !0,
|
|
@@ -8929,15 +9024,15 @@ var Tf = (e = {}) => wf({
|
|
|
8929
9024
|
onChange: (e) => u(c.find((t) => t.value === e.target.value)),
|
|
8930
9025
|
options: c,
|
|
8931
9026
|
value: l
|
|
8932
|
-
}), l.value === "summary" ? /* @__PURE__ */ z(
|
|
9027
|
+
}), l.value === "summary" ? /* @__PURE__ */ z(qf, {
|
|
8933
9028
|
userName: e.userName,
|
|
8934
9029
|
sectionNames: a,
|
|
8935
|
-
diffs:
|
|
9030
|
+
diffs: Hf(d, i),
|
|
8936
9031
|
defaultSectionName: o
|
|
8937
9032
|
}) : h ? /* @__PURE__ */ z("div", {
|
|
8938
9033
|
style: { padding: 16 },
|
|
8939
9034
|
children: h
|
|
8940
|
-
}) : /* @__PURE__ */ z(
|
|
9035
|
+
}) : /* @__PURE__ */ z(Ld, {
|
|
8941
9036
|
oldJson: f,
|
|
8942
9037
|
newJson: p
|
|
8943
9038
|
})] }),
|
|
@@ -8950,7 +9045,7 @@ var Tf = (e = {}) => wf({
|
|
|
8950
9045
|
height: "90vh"
|
|
8951
9046
|
} })
|
|
8952
9047
|
});
|
|
8953
|
-
},
|
|
9048
|
+
}, Xf = [
|
|
8954
9049
|
{
|
|
8955
9050
|
label: "10 / page",
|
|
8956
9051
|
value: 10
|
|
@@ -8963,8 +9058,8 @@ var Tf = (e = {}) => wf({
|
|
|
8963
9058
|
label: "50 / page",
|
|
8964
9059
|
value: 50
|
|
8965
9060
|
}
|
|
8966
|
-
],
|
|
8967
|
-
let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s =
|
|
9061
|
+
], Zf = (e, t = {}) => {
|
|
9062
|
+
let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s = Hf(n, t).length, c = s ? `${s} change${s === 1 ? "" : "s"}` : "no field changes";
|
|
8968
9063
|
if (i === "API") return a === "Created" ? "Created through API" : "Changed through API";
|
|
8969
9064
|
switch (a) {
|
|
8970
9065
|
case "Created": return `Created by ${r}`;
|
|
@@ -8974,7 +9069,7 @@ var Tf = (e = {}) => wf({
|
|
|
8974
9069
|
case "Updated": return `Updated by ${r} (${c})`;
|
|
8975
9070
|
default: return `Change by ${r}`;
|
|
8976
9071
|
}
|
|
8977
|
-
},
|
|
9072
|
+
}, Qf = ({ logs: e, data: t, total: n, loading: r, selectedPage: i, rowsPerPage: a, sectionNames: o, defaultSectionName: s, filterToggles: c = [], transformDiffsConfig: l, onChangeRowsPerPage: u, onSelectPage: d, onClickSnapshot: f, snapshotLoading: p, getActions: h, isLogDisabled: g }) => {
|
|
8978
9073
|
let [_, v] = m(!1), [y, b] = m(null), x = (e) => {
|
|
8979
9074
|
if (e.snapshot) {
|
|
8980
9075
|
f == null || f(e.snapshot, e);
|
|
@@ -8993,7 +9088,7 @@ var Tf = (e = {}) => wf({
|
|
|
8993
9088
|
return {
|
|
8994
9089
|
cells: [
|
|
8995
9090
|
{
|
|
8996
|
-
value: e.snapshot ? `Snapshot: ${e.snapshot}` :
|
|
9091
|
+
value: e.snapshot ? `Snapshot: ${e.snapshot}` : Zf(e, l),
|
|
8997
9092
|
type: "Link",
|
|
8998
9093
|
disabled: n,
|
|
8999
9094
|
onClick: n ? void 0 : () => x(e),
|
|
@@ -9012,8 +9107,8 @@ var Tf = (e = {}) => wf({
|
|
|
9012
9107
|
type: "Static"
|
|
9013
9108
|
},
|
|
9014
9109
|
{
|
|
9015
|
-
value:
|
|
9016
|
-
date:
|
|
9110
|
+
value: Rd({
|
|
9111
|
+
date: zf(e),
|
|
9017
9112
|
showTime: !0
|
|
9018
9113
|
}),
|
|
9019
9114
|
type: "Static"
|
|
@@ -9056,14 +9151,14 @@ var Tf = (e = {}) => wf({
|
|
|
9056
9151
|
onChange: (e) => {
|
|
9057
9152
|
u(Number(e.target.value));
|
|
9058
9153
|
},
|
|
9059
|
-
options:
|
|
9154
|
+
options: Xf,
|
|
9060
9155
|
value: a
|
|
9061
9156
|
},
|
|
9062
9157
|
onSelectPage: (e) => d(e),
|
|
9063
9158
|
small: !0
|
|
9064
9159
|
} }
|
|
9065
9160
|
} })
|
|
9066
|
-
}), _ && y && y.diffs && /* @__PURE__ */ z(
|
|
9161
|
+
}), _ && y && y.diffs && /* @__PURE__ */ z(Yf, {
|
|
9067
9162
|
sectionNames: o,
|
|
9068
9163
|
isOpen: _,
|
|
9069
9164
|
onClose: () => v(!1),
|
|
@@ -9073,7 +9168,7 @@ var Tf = (e = {}) => wf({
|
|
|
9073
9168
|
data: t,
|
|
9074
9169
|
transformDiffsConfig: l
|
|
9075
9170
|
})] });
|
|
9076
|
-
},
|
|
9171
|
+
}, $f = ({ pathName: e, moduleName: t, onNavigate: n, onStartTimingEvent: r }) => {
|
|
9077
9172
|
let i = window.location.href, a = p(i);
|
|
9078
9173
|
return c(() => {
|
|
9079
9174
|
a.current = i;
|
|
@@ -9096,10 +9191,10 @@ var Tf = (e = {}) => wf({
|
|
|
9096
9191
|
});
|
|
9097
9192
|
};
|
|
9098
9193
|
}, [e, t]), null;
|
|
9099
|
-
},
|
|
9100
|
-
|
|
9101
|
-
e ===
|
|
9194
|
+
}, ep = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null, tp = (e) => {
|
|
9195
|
+
Dd(Sd.LanguageKey, e.languageKey), Object.entries(e).forEach(([e, t]) => {
|
|
9196
|
+
e === Sd.Translations ? Dd(e, wd(t)) : Dd(e, ep(t) ? t : { ...t });
|
|
9102
9197
|
});
|
|
9103
9198
|
};
|
|
9104
9199
|
//#endregion
|
|
9105
|
-
export { Kr as Accordion, di as AccordionWithDefaultToggle, Ji as Actions, Tr as Align,
|
|
9200
|
+
export { Kr as Accordion, di as AccordionWithDefaultToggle, Ji as Actions, Tr as Align, Qf as AuditLog, Pi as Badge, Qi as Breadcrumb, Xi as BreadcrumbLinkType, K as Button, ea as ButtonGroup, Er as ButtonPosition, hi as ButtonType, na as Card, si as CheckBox, Br as Chevron, Ur as Collapse, wr as Color, sa as ColorInput, fa as Column, Sa as Dialog, Ld as DiffViewer, U as DisabledContext, _a as Divider, ka as Drawer, Iu as ElementType, Ac as Empty, Ml as Field, Ol as FileButton, za as FileInput, Nl as Flex, Fl as FormRow, zl as Grid, V as GroupOrder, ya as Heading, oi as HelpIcon, W as Icon, H as IconType, Pa as Input, Ma as InputGroup, ks as InputGroupAddon, Ia as InputReaderMethods, kr as InputType, Al as Label, Ql as List, Vl as ListHeading, ql as ListSubheading, eu as Loader, Ki as Menu, Si as MenuCarat, xi as MenuType, po as Message, oo as MessageType, Ka as Modal, yo as NativeSelect, Gs as NumberInput, ou as OptionDropdown, cu as Page, As as Pagination, Hu as PopConfirm, aa as Popover, Ha as Portal, uu as PrintHeader, Ya as ProgressBar, du as RadioButton, gu as RichTextInput, vu as Row, Cs as Select, Nd as SettingField, Cu as SideBar, Tu as Skeleton, $s as Slider, eo as SmartUploadModal, Ba as Spacer, mi as Spinner, yc as Table, Dl as TableImportExport, ku as Tabs, ha as Text, Mu as TextArea, Au as TextLink, Dr as TextTransform, Or as Theme, cr as Toaster, dl as Toggle, G as Tooltip, zu as TopBar, Ku as Tree, nd as TreeTable, Cr as TriggerType, xd as UnitInput, jd as UnitTable, $f as UsageTracker, cl as dismissToast, vd as initializeContext, tp as initializeGuiLibrary, La as readFile, sl as toast, bo as useFocus, Va as useKeyboardEvent, Co as useWindowWidth };
|