@oliasoft-open-source/react-ui-library 7.5.1 → 7.5.2-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.
|
@@ -7,7 +7,7 @@ export interface IUnitTableOnChangeEvent extends React.ChangeEvent<HTMLInputElem
|
|
|
7
7
|
target: EventTarget & HTMLInputElement & {
|
|
8
8
|
rowIndex: number;
|
|
9
9
|
cellIndex: number;
|
|
10
|
-
unit
|
|
10
|
+
unit?: string;
|
|
11
11
|
};
|
|
12
12
|
}
|
|
13
13
|
interface IUnitTableCell {
|
|
@@ -15,11 +15,11 @@ interface IUnitTableCell {
|
|
|
15
15
|
unitKey: string;
|
|
16
16
|
formatDisplayValue?: (value: TStringNumberNull, selectedUnit: string) => TStringNumberNull;
|
|
17
17
|
}
|
|
18
|
-
interface IUnitTableNumberInputCell extends INumberInputCell, IUnitTableCell {
|
|
19
|
-
onChange
|
|
18
|
+
interface IUnitTableNumberInputCell extends Omit<INumberInputCell, 'onChange'>, IUnitTableCell {
|
|
19
|
+
onChange?: (event: IUnitTableOnChangeEvent) => void;
|
|
20
20
|
}
|
|
21
|
-
interface IUnitTableInputCell extends IInputCell, IUnitTableCell {
|
|
22
|
-
onChange
|
|
21
|
+
interface IUnitTableInputCell extends Omit<IInputCell, 'onChange'>, IUnitTableCell {
|
|
22
|
+
onChange?: (event: IUnitTableOnChangeEvent) => void;
|
|
23
23
|
}
|
|
24
24
|
interface IUnitTableStaticCell extends IStaticCell, IUnitTableCell {
|
|
25
25
|
}
|
|
@@ -40,6 +40,11 @@ interface IUnitConfigItem {
|
|
|
40
40
|
storageUnit: string;
|
|
41
41
|
preferredUnit?: string;
|
|
42
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* UnitTable extends Table onChange events with:
|
|
45
|
+
* - rowIndex and cellIndex for editable cells
|
|
46
|
+
* - unit for autoUnit cells
|
|
47
|
+
*/
|
|
43
48
|
export interface IUnitTableProps extends Omit<ITableProps, 'table'> {
|
|
44
49
|
table: IUnitTable;
|
|
45
50
|
unitConfig: IUnitConfigItem[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unit-table.d.ts","sourceRoot":"","sources":["../../../src/components/unit-table/unit-table.tsx"],"names":[],"mappings":"AACA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAGhE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,WAAW,EACX,UAAU,EACX,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAS,MAAM,wBAAwB,CAAC;AAQ5D,MAAM,WAAW,uBAAwB,SAAQ,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC;IAClF,MAAM,EAAE,WAAW,GAAG,gBAAgB,GAAG;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"unit-table.d.ts","sourceRoot":"","sources":["../../../src/components/unit-table/unit-table.tsx"],"names":[],"mappings":"AACA,OAAO,KAA2C,MAAM,OAAO,CAAC;AAGhE,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EACL,UAAU,EACV,gBAAgB,EAChB,WAAW,EACX,UAAU,EACX,MAAM,uDAAuD,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,WAAW,EAAS,MAAM,wBAAwB,CAAC;AAQ5D,MAAM,WAAW,uBAAwB,SAAQ,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC;IAClF,MAAM,EAAE,WAAW,GAAG,gBAAgB,GAAG;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;CACjG;AAED,UAAU,cAAc;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,KAAK,iBAAiB,CAAC;CAC5F;AAED,UAAU,yBAA0B,SAAQ,IAAI,CAAC,gBAAgB,EAAE,UAAU,CAAC,EAAE,cAAc;IAC5F,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,uBAAuB,KAAK,IAAI,CAAC;CACrD;AAED,UAAU,mBAAoB,SAAQ,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,EAAE,cAAc;IAChF,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,uBAAuB,KAAK,IAAI,CAAC;CACrD;AACD,UAAU,oBAAqB,SAAQ,WAAW,EAAE,cAAc;CAAG;AAErE,KAAK,mBAAmB,GAAG,UAAU,GAAG,oBAAoB,GAAG,mBAAmB,GAAG,yBAAyB,CAAC;AAE/G,MAAM,WAAW,aAAc,SAAQ,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC5D,KAAK,EAAE,mBAAmB,EAAE,CAAC;CAC9B;AAED,UAAU,UAAW,SAAQ,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC7D,IAAI,CAAC,EAAE,aAAa,EAAE,CAAC;CACxB;AAED,UAAU,eAAe;IACvB,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IACnF,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAMD;;;;GAIG;AACH,MAAM,WAAW,eAAgB,SAAQ,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC;IACjE,KAAK,EAAE,UAAU,CAAC;IAClB,UAAU,EAAE,eAAe,EAAE,CAAC;IAC9B,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC5D,cAAc,CAAC,EAAE,CAAC,GAAG,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC;IAChE,eAAe,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,QAAQ,EAAE,EAAE;QAAE,GAAG,EAAE,aAAa,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,KAAK,aAAa,CAAC;CAClG;AAuLD,eAAO,MAAM,SAAS,GAAI,sKASvB,eAAe,4CA0EjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"unit-table.stories.d.ts","sourceRoot":"","sources":["../../../src/components/unit-table/unit-table.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAQtD,OAAO,EAAqD,eAAe,EAAE,MAAM,cAAc,CAAC;wBAK7F,IAAI;AAHT,wBAGU;AA8HV;;wHAEwH;AAExH,eAAO,MAAM,gBAAgB,EAAE,OAAO,CAAC,eAAe,
|
|
1
|
+
{"version":3,"file":"unit-table.stories.d.ts","sourceRoot":"","sources":["../../../src/components/unit-table/unit-table.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAC;AAQtD,OAAO,EAAqD,eAAe,EAAE,MAAM,cAAc,CAAC;wBAK7F,IAAI;AAHT,wBAGU;AA8HV;;wHAEwH;AAExH,eAAO,MAAM,gBAAgB,EAAE,OAAO,CAAC,eAAe,CAmKrD,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,OAAO,CAAC,eAAe,CAgFzD,CAAC;AAEF,eAAO,MAAM,yBAAyB,EAAE,OAAO,CAAC,eAAe,CAyF9D,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -7948,11 +7948,20 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7948
7948
|
}, {
|
|
7949
7949
|
preferredUnits: {},
|
|
7950
7950
|
storageUnits: {}
|
|
7951
|
-
}), up = ({
|
|
7951
|
+
}), up = ({ event: e, rowIndex: t, cellIndex: n, value: r, unit: i }) => ({
|
|
7952
|
+
...e,
|
|
7953
|
+
target: {
|
|
7954
|
+
...e.target,
|
|
7955
|
+
value: r,
|
|
7956
|
+
rowIndex: t,
|
|
7957
|
+
cellIndex: n,
|
|
7958
|
+
...i === void 0 ? {} : { unit: i }
|
|
7959
|
+
}
|
|
7960
|
+
}), dp = (e) => e.type === Rl.INPUT || e.type === Rl.NUMBER_INPUT, fp = ({ row: e, rowIndex: t, selectedUnits: n, storageUnits: r, convertBackToStorageUnit: i, enableCosmeticRounding: a, enableDisplayRounding: o }) => ({
|
|
7952
7961
|
...e,
|
|
7953
7962
|
cells: e.cells.map((e, s) => {
|
|
7954
|
-
if ("autoUnit" in e && e
|
|
7955
|
-
let { unitKey: c, value: l, formatDisplayValue: u } = e, d = o && "roundDisplayValue" in e ? e
|
|
7963
|
+
if ("autoUnit" in e && e.autoUnit && (typeof e.value == "string" || typeof e.value == "number")) {
|
|
7964
|
+
let { unitKey: c, value: l, formatDisplayValue: u } = e, d = o && "roundDisplayValue" in e ? e.roundDisplayValue : null, f = n[c], p = r[c], m = p && f !== p, { value: h = l } = lf({
|
|
7956
7965
|
value: gr(l),
|
|
7957
7966
|
unitkey: c,
|
|
7958
7967
|
toUnit: f,
|
|
@@ -7972,25 +7981,30 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
7972
7981
|
toUnit: a,
|
|
7973
7982
|
fromUnit: f
|
|
7974
7983
|
}), l = m ? o : r;
|
|
7975
|
-
|
|
7976
|
-
|
|
7977
|
-
|
|
7978
|
-
|
|
7979
|
-
|
|
7980
|
-
|
|
7981
|
-
|
|
7982
|
-
rowIndex: t,
|
|
7983
|
-
cellIndex: s,
|
|
7984
|
-
unit: a
|
|
7985
|
-
}
|
|
7986
|
-
});
|
|
7987
|
-
}
|
|
7984
|
+
"onChange" in e && typeof e.onChange == "function" && e.onChange(up({
|
|
7985
|
+
event: n,
|
|
7986
|
+
rowIndex: t,
|
|
7987
|
+
cellIndex: s,
|
|
7988
|
+
value: String(l),
|
|
7989
|
+
unit: a
|
|
7990
|
+
}));
|
|
7988
7991
|
}
|
|
7989
7992
|
};
|
|
7990
7993
|
}
|
|
7991
|
-
return e
|
|
7994
|
+
return dp(e) ? {
|
|
7995
|
+
...e,
|
|
7996
|
+
onChange: (n) => {
|
|
7997
|
+
var r;
|
|
7998
|
+
(r = e.onChange) == null || r.call(e, up({
|
|
7999
|
+
event: n,
|
|
8000
|
+
rowIndex: t,
|
|
8001
|
+
cellIndex: s,
|
|
8002
|
+
value: n.target.value
|
|
8003
|
+
}));
|
|
8004
|
+
}
|
|
8005
|
+
} : e;
|
|
7992
8006
|
})
|
|
7993
|
-
}),
|
|
8007
|
+
}), pp = ({ headers: e, selectedUnits: t, storageUnits: n, onChangeUnit: r }) => {
|
|
7994
8008
|
let { translations: i } = sp();
|
|
7995
8009
|
return e ? e.map((e) => ({
|
|
7996
8010
|
...e,
|
|
@@ -8020,7 +8034,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
8020
8034
|
return e;
|
|
8021
8035
|
})
|
|
8022
8036
|
})) : [];
|
|
8023
|
-
},
|
|
8037
|
+
}, mp = ({ table: e, unitConfig: t, convertBackToStorageUnit: n = !0, enableCosmeticRounding: r = !0, enableDisplayRounding: i = !0, onListReorder: a, canListReorder: o, beforeRenderRow: s }) => {
|
|
8024
8038
|
let { headers: c, ...u } = e, { storageUnits: f, preferredUnits: p } = lp(t), m = nf(p), [h, g] = _(p), v = ({ unitKey: e, value: n }) => {
|
|
8025
8039
|
g((t) => ({
|
|
8026
8040
|
...t,
|
|
@@ -8032,7 +8046,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
8032
8046
|
newUnit: n,
|
|
8033
8047
|
unitKey: e
|
|
8034
8048
|
});
|
|
8035
|
-
}, y = l(({ row: e, rowIndex: t }) =>
|
|
8049
|
+
}, y = l(({ row: e, rowIndex: t }) => fp({
|
|
8036
8050
|
row: s ? s({
|
|
8037
8051
|
row: e,
|
|
8038
8052
|
rowIndex: t
|
|
@@ -8061,7 +8075,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
8061
8075
|
}, [t]), /* @__PURE__ */ x(Gl, {
|
|
8062
8076
|
table: {
|
|
8063
8077
|
...u,
|
|
8064
|
-
headers:
|
|
8078
|
+
headers: pp({
|
|
8065
8079
|
headers: e.headers,
|
|
8066
8080
|
selectedUnits: h,
|
|
8067
8081
|
storageUnits: f,
|
|
@@ -8072,7 +8086,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
8072
8086
|
canListReorder: o,
|
|
8073
8087
|
beforeRenderRow: y
|
|
8074
8088
|
});
|
|
8075
|
-
},
|
|
8089
|
+
}, hp = { settingField: "_settingField_1x02n_1" }, gp = ({ 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 }) => {
|
|
8076
8090
|
let { translations: d } = sp(), f = (t) => t.replace(/\\n/g, "\n").split(/\n/).map((t, n) => /* @__PURE__ */ S(e.Fragment, { children: [t, /* @__PURE__ */ x("br", {})] }, n)), p = [
|
|
8077
8091
|
...r ? [] : [{
|
|
8078
8092
|
label: d == null ? void 0 : d.allUsers,
|
|
@@ -8088,7 +8102,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
8088
8102
|
}] : []
|
|
8089
8103
|
], m = a !== void 0 && o !== void 0 && !ln(a, o);
|
|
8090
8104
|
return /* @__PURE__ */ S("div", {
|
|
8091
|
-
className:
|
|
8105
|
+
className: hp.settingField,
|
|
8092
8106
|
"data-testid": u,
|
|
8093
8107
|
children: [/* @__PURE__ */ S(ld, {
|
|
8094
8108
|
justifyContent: "space-between",
|
|
@@ -8120,19 +8134,19 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
8120
8134
|
children: f(t)
|
|
8121
8135
|
})]
|
|
8122
8136
|
});
|
|
8123
|
-
},
|
|
8137
|
+
}, _p = (e, t) => {
|
|
8124
8138
|
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;
|
|
8125
8139
|
return {
|
|
8126
8140
|
added: Math.max(0, i),
|
|
8127
8141
|
removed: Math.max(0, a)
|
|
8128
8142
|
};
|
|
8129
|
-
},
|
|
8143
|
+
}, vp = "split", yp = "unified", bp = ({ oldJson: e, newJson: t, viewType: n = vp }) => {
|
|
8130
8144
|
var r, i;
|
|
8131
8145
|
let { translations: a } = sp(), [o, s] = _(n), c = [{
|
|
8132
|
-
value:
|
|
8146
|
+
value: vp,
|
|
8133
8147
|
label: (r = a == null ? void 0 : a.split) == null ? "Split" : r
|
|
8134
8148
|
}, {
|
|
8135
|
-
value:
|
|
8149
|
+
value: yp,
|
|
8136
8150
|
label: (i = a == null ? void 0 : a.unified) == null ? "Unified" : i
|
|
8137
8151
|
}];
|
|
8138
8152
|
d(() => {
|
|
@@ -8140,7 +8154,7 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
8140
8154
|
}, [n]);
|
|
8141
8155
|
let l = ({ target: { value: e } }) => {
|
|
8142
8156
|
s(e);
|
|
8143
|
-
}, { added: u, removed: f } =
|
|
8157
|
+
}, { added: u, removed: f } = _p(e, t), p = u + f > 3500;
|
|
8144
8158
|
return /* @__PURE__ */ x(b, { children: /* @__PURE__ */ x(Za, {
|
|
8145
8159
|
bordered: !0,
|
|
8146
8160
|
heading: /* @__PURE__ */ S(ld, {
|
|
@@ -8173,14 +8187,14 @@ var Co = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), wo =
|
|
|
8173
8187
|
}) : /* @__PURE__ */ x(ui, {
|
|
8174
8188
|
oldValue: e,
|
|
8175
8189
|
newValue: t,
|
|
8176
|
-
splitView: o ===
|
|
8190
|
+
splitView: o === vp,
|
|
8177
8191
|
compareMethod: di.WORDS
|
|
8178
8192
|
})
|
|
8179
8193
|
}) });
|
|
8180
8194
|
};
|
|
8181
8195
|
//#endregion
|
|
8182
8196
|
//#region src/helpers/date.ts
|
|
8183
|
-
function
|
|
8197
|
+
function xp({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i, locale: a }) {
|
|
8184
8198
|
return e ? new Date(e).toLocaleString(a, {
|
|
8185
8199
|
year: "numeric",
|
|
8186
8200
|
month: "short",
|
|
@@ -8194,28 +8208,28 @@ function yp({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i
|
|
|
8194
8208
|
}
|
|
8195
8209
|
//#endregion
|
|
8196
8210
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/clone.js
|
|
8197
|
-
function
|
|
8211
|
+
function Sp(e) {
|
|
8198
8212
|
var t;
|
|
8199
8213
|
let n = /^\/(.*)\/([gimyu]*)$/.exec(e.toString());
|
|
8200
8214
|
if (!n) throw Error("Invalid RegExp");
|
|
8201
8215
|
return new RegExp((t = n[1]) == null ? "" : t, n[2]);
|
|
8202
8216
|
}
|
|
8203
|
-
function
|
|
8217
|
+
function Cp(e) {
|
|
8204
8218
|
if (typeof e != "object") return e;
|
|
8205
8219
|
if (e === null) return null;
|
|
8206
|
-
if (Array.isArray(e)) return e.map(
|
|
8220
|
+
if (Array.isArray(e)) return e.map(Cp);
|
|
8207
8221
|
if (e instanceof Date) return new Date(e.getTime());
|
|
8208
|
-
if (e instanceof RegExp) return
|
|
8222
|
+
if (e instanceof RegExp) return Sp(e);
|
|
8209
8223
|
let t = {};
|
|
8210
|
-
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] =
|
|
8224
|
+
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = Cp(e[n]));
|
|
8211
8225
|
return t;
|
|
8212
8226
|
}
|
|
8213
8227
|
//#endregion
|
|
8214
8228
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/assertions/arrays.js
|
|
8215
|
-
function
|
|
8229
|
+
function wp(e, t) {
|
|
8216
8230
|
if (e.length === 0) throw Error(t || "Expected a non-empty array");
|
|
8217
8231
|
}
|
|
8218
|
-
var
|
|
8232
|
+
var Tp = (e) => e[e.length - 1], Ep = class {
|
|
8219
8233
|
setResult(e) {
|
|
8220
8234
|
return this.result = e, this.hasResult = !0, this;
|
|
8221
8235
|
}
|
|
@@ -8223,16 +8237,16 @@ var Cp = (e) => e[e.length - 1], wp = class {
|
|
|
8223
8237
|
return this.exiting = !0, this;
|
|
8224
8238
|
}
|
|
8225
8239
|
push(e, t) {
|
|
8226
|
-
return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (
|
|
8240
|
+
return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (wp(this.children), Tp(this.children).next = e, this.children.push(e)) : (this.children = [e], this.nextAfterChildren = this.next || null, this.next = e), e.next = this, this;
|
|
8227
8241
|
}
|
|
8228
|
-
},
|
|
8242
|
+
}, Dp = class extends Ep {
|
|
8229
8243
|
constructor(e, t) {
|
|
8230
8244
|
super(), this.left = e, this.right = t, this.pipe = "diff";
|
|
8231
8245
|
}
|
|
8232
8246
|
prepareDeltaResult(e) {
|
|
8233
8247
|
var t, n, r, i;
|
|
8234
8248
|
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)) {
|
|
8235
|
-
let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues :
|
|
8249
|
+
let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues : Cp;
|
|
8236
8250
|
typeof e[0] == "object" && (e[0] = t(e[0])), typeof e[1] == "object" && (e[1] = t(e[1]));
|
|
8237
8251
|
}
|
|
8238
8252
|
return e;
|
|
@@ -8240,15 +8254,15 @@ var Cp = (e) => e[e.length - 1], wp = class {
|
|
|
8240
8254
|
setResult(e) {
|
|
8241
8255
|
return this.prepareDeltaResult(e), super.setResult(e);
|
|
8242
8256
|
}
|
|
8243
|
-
},
|
|
8257
|
+
}, Op = class extends Ep {
|
|
8244
8258
|
constructor(e, t) {
|
|
8245
8259
|
super(), this.left = e, this.delta = t, this.pipe = "patch";
|
|
8246
8260
|
}
|
|
8247
|
-
},
|
|
8261
|
+
}, kp = class extends Ep {
|
|
8248
8262
|
constructor(e) {
|
|
8249
8263
|
super(), this.delta = e, this.pipe = "reverse";
|
|
8250
8264
|
}
|
|
8251
|
-
},
|
|
8265
|
+
}, Ap = class {
|
|
8252
8266
|
constructor(e) {
|
|
8253
8267
|
this.name = e, this.filters = [];
|
|
8254
8268
|
}
|
|
@@ -8312,7 +8326,7 @@ var Cp = (e) => e[e.length - 1], wp = class {
|
|
|
8312
8326
|
}
|
|
8313
8327
|
}), this);
|
|
8314
8328
|
}
|
|
8315
|
-
},
|
|
8329
|
+
}, jp = class {
|
|
8316
8330
|
constructor(e) {
|
|
8317
8331
|
this.selfOptions = e || {}, this.pipes = {};
|
|
8318
8332
|
}
|
|
@@ -8339,7 +8353,7 @@ var Cp = (e) => e[e.length - 1], wp = class {
|
|
|
8339
8353
|
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);
|
|
8340
8354
|
return n.hasResult ? n.result : void 0;
|
|
8341
8355
|
}
|
|
8342
|
-
},
|
|
8356
|
+
}, Mp = (e, t, n, r) => e[n] === t[r], Np = (e, t, n, r) => {
|
|
8343
8357
|
var i, a, o;
|
|
8344
8358
|
let s = e.length, c = t.length, l, u, d = Array(s + 1);
|
|
8345
8359
|
for (l = 0; l < s + 1; l++) {
|
|
@@ -8355,7 +8369,7 @@ var Cp = (e) => e[e.length - 1], wp = class {
|
|
|
8355
8369
|
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);
|
|
8356
8370
|
}
|
|
8357
8371
|
return d;
|
|
8358
|
-
},
|
|
8372
|
+
}, Pp = (e, t, n, r) => {
|
|
8359
8373
|
let i = t.length, a = n.length, o = {
|
|
8360
8374
|
sequence: [],
|
|
8361
8375
|
indices1: [],
|
|
@@ -8377,11 +8391,11 @@ var Cp = (e) => e[e.length - 1], wp = class {
|
|
|
8377
8391
|
}
|
|
8378
8392
|
}
|
|
8379
8393
|
return o;
|
|
8380
|
-
},
|
|
8394
|
+
}, Fp = { get: (e, t, n, r) => {
|
|
8381
8395
|
let i = r || {};
|
|
8382
|
-
return
|
|
8383
|
-
} },
|
|
8384
|
-
function
|
|
8396
|
+
return Pp(Np(e, t, n || Mp, i), e, t, i);
|
|
8397
|
+
} }, Ip = 3;
|
|
8398
|
+
function Lp(e, t, n, r) {
|
|
8385
8399
|
for (let i = 0; i < n; i++) {
|
|
8386
8400
|
let n = e[i];
|
|
8387
8401
|
for (let e = 0; e < r; e++) {
|
|
@@ -8391,7 +8405,7 @@ function Fp(e, t, n, r) {
|
|
|
8391
8405
|
}
|
|
8392
8406
|
return !1;
|
|
8393
8407
|
}
|
|
8394
|
-
function
|
|
8408
|
+
function Rp(e, t, n, r, i) {
|
|
8395
8409
|
let a = e[n], o = t[r];
|
|
8396
8410
|
if (a === o) return !0;
|
|
8397
8411
|
if (typeof a != "object" || typeof o != "object") return !1;
|
|
@@ -8404,15 +8418,15 @@ function Ip(e, t, n, r, i) {
|
|
|
8404
8418
|
let l = i.hashCache2[r];
|
|
8405
8419
|
return l === void 0 && (i.hashCache2[r] = l = s(o, r)), l !== void 0 && c === l;
|
|
8406
8420
|
}
|
|
8407
|
-
var
|
|
8421
|
+
var zp = function(e) {
|
|
8408
8422
|
var t, n, r, i, a;
|
|
8409
8423
|
if (!e.leftIsArray) return;
|
|
8410
8424
|
let o = {
|
|
8411
8425
|
objectHash: (t = e.options) == null ? void 0 : t.objectHash,
|
|
8412
8426
|
matchByPosition: (n = e.options) == null ? void 0 : n.matchByPosition
|
|
8413
8427
|
}, s = 0, c = 0, l, u, d, f = e.left, p = e.right, m = f.length, h = p.length, g;
|
|
8414
|
-
for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !
|
|
8415
|
-
for (; c + s < m && c + s < h &&
|
|
8428
|
+
for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !Lp(f, p, m, h)); s < m && s < h && Rp(f, p, s, s, o);) l = s, g = new Dp(f[l], p[l]), e.push(g, l), s++;
|
|
8429
|
+
for (; c + s < m && c + s < h && Rp(f, p, m - 1 - c, h - 1 - c, o);) u = m - 1 - c, d = h - 1 - c, g = new Dp(f[u], p[d]), e.push(g, d), c++;
|
|
8416
8430
|
let _;
|
|
8417
8431
|
if (s + c === m) {
|
|
8418
8432
|
if (m === h) {
|
|
@@ -8436,7 +8450,7 @@ var Lp = function(e) {
|
|
|
8436
8450
|
return;
|
|
8437
8451
|
}
|
|
8438
8452
|
o.hashCache1 = void 0, o.hashCache2 = void 0;
|
|
8439
|
-
let v = f.slice(s, m - c), y = p.slice(s, h - c), b =
|
|
8453
|
+
let v = f.slice(s, m - c), y = p.slice(s, h - c), b = Fp.get(v, y, Rp, o), x = [];
|
|
8440
8454
|
for (_ = _ || { _t: "a" }, l = s; l < m - c; l++) if (b.indices1.indexOf(l - s) < 0) {
|
|
8441
8455
|
let t = `_${l}`;
|
|
8442
8456
|
_[t] = [
|
|
@@ -8457,8 +8471,8 @@ var Lp = function(e) {
|
|
|
8457
8471
|
if (S && w > 0) for (let n = 0; n < w; n++) {
|
|
8458
8472
|
u = x[n];
|
|
8459
8473
|
let r = u === void 0 ? void 0 : _[`_${u}`];
|
|
8460
|
-
if (u !== void 0 && r &&
|
|
8461
|
-
r.splice(1, 2, l,
|
|
8474
|
+
if (u !== void 0 && r && Rp(v, y, u - s, l - s, o)) {
|
|
8475
|
+
r.splice(1, 2, l, Ip), r.splice(1, 2, l, Ip), C || (r[0] = ""), d = l, g = new Dp(f[u], p[d]), e.push(g, d), x.splice(n, 1), t = !0;
|
|
8462
8476
|
break;
|
|
8463
8477
|
}
|
|
8464
8478
|
}
|
|
@@ -8466,20 +8480,20 @@ var Lp = function(e) {
|
|
|
8466
8480
|
} else {
|
|
8467
8481
|
if (b.indices1[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices1: ${b.indices1}`);
|
|
8468
8482
|
if (u = b.indices1[t] + s, b.indices2[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices2: ${b.indices2}`);
|
|
8469
|
-
d = b.indices2[t] + s, g = new
|
|
8483
|
+
d = b.indices2[t] + s, g = new Dp(f[u], p[d]), e.push(g, d);
|
|
8470
8484
|
}
|
|
8471
8485
|
}
|
|
8472
8486
|
e.setResult(_).exit();
|
|
8473
8487
|
};
|
|
8474
|
-
|
|
8475
|
-
var
|
|
8488
|
+
zp.filterName = "arrays";
|
|
8489
|
+
var Bp = {
|
|
8476
8490
|
numerically(e, t) {
|
|
8477
8491
|
return e - t;
|
|
8478
8492
|
},
|
|
8479
8493
|
numericallyBy(e) {
|
|
8480
8494
|
return (t, n) => t[e] - n[e];
|
|
8481
8495
|
}
|
|
8482
|
-
},
|
|
8496
|
+
}, Vp = function(e) {
|
|
8483
8497
|
var t;
|
|
8484
8498
|
if (!e.nested) return;
|
|
8485
8499
|
let n = e.delta;
|
|
@@ -8488,7 +8502,7 @@ var Rp = {
|
|
|
8488
8502
|
for (r in a) if (r !== "_t") {
|
|
8489
8503
|
if (r[0] === "_") {
|
|
8490
8504
|
let e = r;
|
|
8491
|
-
if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] ===
|
|
8505
|
+
if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] === Ip)) s.push(Number.parseInt(r.slice(1), 10));
|
|
8492
8506
|
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]}`);
|
|
8493
8507
|
} else {
|
|
8494
8508
|
let e = r;
|
|
@@ -8501,15 +8515,15 @@ var Rp = {
|
|
|
8501
8515
|
});
|
|
8502
8516
|
}
|
|
8503
8517
|
}
|
|
8504
|
-
for (s = s.sort(
|
|
8518
|
+
for (s = s.sort(Bp.numerically), r = s.length - 1; r >= 0; r--) {
|
|
8505
8519
|
if (i = s[r], i === void 0) continue;
|
|
8506
8520
|
let e = a[`_${i}`], t = o.splice(i, 1)[0];
|
|
8507
|
-
(e == null ? void 0 : e[2]) ===
|
|
8521
|
+
(e == null ? void 0 : e[2]) === Ip && c.push({
|
|
8508
8522
|
index: e[1],
|
|
8509
8523
|
value: t
|
|
8510
8524
|
});
|
|
8511
8525
|
}
|
|
8512
|
-
c = c.sort(
|
|
8526
|
+
c = c.sort(Bp.numericallyBy("index"));
|
|
8513
8527
|
let u = c.length;
|
|
8514
8528
|
for (r = 0; r < u; r++) {
|
|
8515
8529
|
let e = c[r];
|
|
@@ -8519,7 +8533,7 @@ var Rp = {
|
|
|
8519
8533
|
if (d > 0) for (r = 0; r < d; r++) {
|
|
8520
8534
|
let t = l[r];
|
|
8521
8535
|
if (t === void 0) continue;
|
|
8522
|
-
let n = new
|
|
8536
|
+
let n = new Op(o[t.index], t.delta);
|
|
8523
8537
|
e.push(n, t.index);
|
|
8524
8538
|
}
|
|
8525
8539
|
if (!e.children) {
|
|
@@ -8528,8 +8542,8 @@ var Rp = {
|
|
|
8528
8542
|
}
|
|
8529
8543
|
e.exit();
|
|
8530
8544
|
};
|
|
8531
|
-
|
|
8532
|
-
var
|
|
8545
|
+
Vp.filterName = "arrays";
|
|
8546
|
+
var Hp = function(e) {
|
|
8533
8547
|
if (!e || !e.children || e.delta._t !== "a") return;
|
|
8534
8548
|
let t = e.left, n = e.children.length;
|
|
8535
8549
|
for (let r = 0; r < n; r++) {
|
|
@@ -8540,16 +8554,16 @@ var Bp = function(e) {
|
|
|
8540
8554
|
}
|
|
8541
8555
|
e.setResult(t).exit();
|
|
8542
8556
|
};
|
|
8543
|
-
|
|
8544
|
-
var
|
|
8557
|
+
Hp.filterName = "arraysCollectChildren";
|
|
8558
|
+
var Up = function(e) {
|
|
8545
8559
|
if (!e.nested) {
|
|
8546
8560
|
let t = e.delta;
|
|
8547
|
-
if (t[2] ===
|
|
8561
|
+
if (t[2] === Ip) {
|
|
8548
8562
|
let n = t;
|
|
8549
8563
|
e.newName = `_${n[1]}`, e.setResult([
|
|
8550
8564
|
n[0],
|
|
8551
8565
|
Number.parseInt(e.childName.substring(1), 10),
|
|
8552
|
-
|
|
8566
|
+
Ip
|
|
8553
8567
|
]).exit();
|
|
8554
8568
|
}
|
|
8555
8569
|
return;
|
|
@@ -8559,20 +8573,20 @@ var Vp = function(e) {
|
|
|
8559
8573
|
let n = t;
|
|
8560
8574
|
for (let t in n) {
|
|
8561
8575
|
if (t === "_t") continue;
|
|
8562
|
-
let r = new
|
|
8576
|
+
let r = new kp(n[t]);
|
|
8563
8577
|
e.push(r, t);
|
|
8564
8578
|
}
|
|
8565
8579
|
e.exit();
|
|
8566
8580
|
};
|
|
8567
|
-
|
|
8568
|
-
var
|
|
8581
|
+
Up.filterName = "arrays";
|
|
8582
|
+
var Wp = (e, t, n) => {
|
|
8569
8583
|
if (typeof t == "string" && t[0] === "_") return Number.parseInt(t.substring(1), 10);
|
|
8570
8584
|
if (Array.isArray(n) && n[2] === 0) return `_${t}`;
|
|
8571
8585
|
let r = +t;
|
|
8572
8586
|
for (let n in e) {
|
|
8573
8587
|
let i = e[n];
|
|
8574
8588
|
if (Array.isArray(i)) {
|
|
8575
|
-
if (i[2] ===
|
|
8589
|
+
if (i[2] === Ip) {
|
|
8576
8590
|
let e = Number.parseInt(n.substring(1), 10), a = i[1];
|
|
8577
8591
|
if (a === +t) return e;
|
|
8578
8592
|
e <= r && a > r ? r++ : e >= r && a < r && r--;
|
|
@@ -8580,7 +8594,7 @@ var Hp = (e, t, n) => {
|
|
|
8580
8594
|
}
|
|
8581
8595
|
}
|
|
8582
8596
|
return r;
|
|
8583
|
-
},
|
|
8597
|
+
}, Gp = (e) => {
|
|
8584
8598
|
if (!e || !e.children) return;
|
|
8585
8599
|
let t = e.delta;
|
|
8586
8600
|
if (t._t !== "a") return;
|
|
@@ -8591,22 +8605,22 @@ var Hp = (e, t, n) => {
|
|
|
8591
8605
|
let a = r.newName;
|
|
8592
8606
|
if (a === void 0) {
|
|
8593
8607
|
if (r.childName === void 0) throw Error("child.childName is undefined");
|
|
8594
|
-
a =
|
|
8608
|
+
a = Wp(n, r.childName, r.result);
|
|
8595
8609
|
}
|
|
8596
8610
|
i[a] !== r.result && (i[a] = r.result);
|
|
8597
8611
|
}
|
|
8598
8612
|
e.setResult(i).exit();
|
|
8599
8613
|
};
|
|
8600
|
-
|
|
8614
|
+
Gp.filterName = "arraysCollectChildren";
|
|
8601
8615
|
//#endregion
|
|
8602
8616
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/dates.js
|
|
8603
|
-
var
|
|
8617
|
+
var Kp = function(e) {
|
|
8604
8618
|
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();
|
|
8605
8619
|
};
|
|
8606
|
-
|
|
8620
|
+
Kp.filterName = "dates";
|
|
8607
8621
|
//#endregion
|
|
8608
8622
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/nested.js
|
|
8609
|
-
var
|
|
8623
|
+
var qp = /* @__PURE__ */ new Set(["__proto__"]), Jp = (e) => {
|
|
8610
8624
|
if (!e || !e.children) return;
|
|
8611
8625
|
let t = e.children.length, n = e.result;
|
|
8612
8626
|
for (let r = 0; r < t; r++) {
|
|
@@ -8618,18 +8632,18 @@ var Gp = /* @__PURE__ */ new Set(["__proto__"]), Kp = (e) => {
|
|
|
8618
8632
|
}
|
|
8619
8633
|
n && e.leftIsArray && (n._t = "a"), e.setResult(n).exit();
|
|
8620
8634
|
};
|
|
8621
|
-
|
|
8622
|
-
var
|
|
8635
|
+
Jp.filterName = "collectChildren";
|
|
8636
|
+
var Yp = (e) => {
|
|
8623
8637
|
var t;
|
|
8624
8638
|
if (e.leftIsArray || e.leftType !== "object") return;
|
|
8625
8639
|
let n = e.left, r = e.right, i = (t = e.options) == null ? void 0 : t.propertyFilter;
|
|
8626
8640
|
for (let t in n) {
|
|
8627
8641
|
if (!Object.prototype.hasOwnProperty.call(n, t) || i && !i(t, e)) continue;
|
|
8628
|
-
let a = new
|
|
8642
|
+
let a = new Dp(n[t], r[t]);
|
|
8629
8643
|
e.push(a, t);
|
|
8630
8644
|
}
|
|
8631
8645
|
for (let t in r) if (Object.prototype.hasOwnProperty.call(r, t) && !(i && !i(t, e)) && n[t] === void 0) {
|
|
8632
|
-
let n = new
|
|
8646
|
+
let n = new Dp(void 0, r[t]);
|
|
8633
8647
|
e.push(n, t);
|
|
8634
8648
|
}
|
|
8635
8649
|
if (!e.children || e.children.length === 0) {
|
|
@@ -8638,15 +8652,15 @@ var qp = (e) => {
|
|
|
8638
8652
|
}
|
|
8639
8653
|
e.exit();
|
|
8640
8654
|
};
|
|
8641
|
-
|
|
8642
|
-
var
|
|
8655
|
+
Yp.filterName = "objects";
|
|
8656
|
+
var Xp = function(e) {
|
|
8643
8657
|
if (!e.nested) return;
|
|
8644
8658
|
let t = e.delta;
|
|
8645
8659
|
if (t._t) return;
|
|
8646
8660
|
let n = t, r = !1;
|
|
8647
8661
|
for (let t in n) {
|
|
8648
|
-
if (
|
|
8649
|
-
let i = e.left, a = new
|
|
8662
|
+
if (qp.has(t) || !Object.prototype.hasOwnProperty.call(n, t)) continue;
|
|
8663
|
+
let i = e.left, a = new Op(typeof i == "object" && i && Object.prototype.hasOwnProperty.call(i, t) ? i[t] : void 0, n[t]);
|
|
8650
8664
|
e.push(a, t), r = !0;
|
|
8651
8665
|
}
|
|
8652
8666
|
if (!r) {
|
|
@@ -8655,8 +8669,8 @@ var Jp = function(e) {
|
|
|
8655
8669
|
}
|
|
8656
8670
|
e.exit();
|
|
8657
8671
|
};
|
|
8658
|
-
|
|
8659
|
-
var
|
|
8672
|
+
Xp.filterName = "objects";
|
|
8673
|
+
var Zp = function(e) {
|
|
8660
8674
|
if (!e || !e.children || e.delta._t) return;
|
|
8661
8675
|
if (e.left === null || typeof e.left != "object") {
|
|
8662
8676
|
e.setResult(e.left).exit();
|
|
@@ -8667,17 +8681,17 @@ var Yp = function(e) {
|
|
|
8667
8681
|
let n = e.children[r];
|
|
8668
8682
|
if (n === void 0) continue;
|
|
8669
8683
|
let i = n.childName;
|
|
8670
|
-
|
|
8684
|
+
qp.has(i) || (Object.prototype.hasOwnProperty.call(e.left, i) && n.result === void 0 ? delete t[i] : t[i] !== n.result && (t[i] = n.result));
|
|
8671
8685
|
}
|
|
8672
8686
|
e.setResult(t).exit();
|
|
8673
8687
|
};
|
|
8674
|
-
|
|
8675
|
-
var
|
|
8688
|
+
Zp.filterName = "collectChildren";
|
|
8689
|
+
var Qp = function(e) {
|
|
8676
8690
|
if (!e.nested || e.delta._t) return;
|
|
8677
8691
|
let t = e.delta, n = !1;
|
|
8678
8692
|
for (let r in t) {
|
|
8679
|
-
if (
|
|
8680
|
-
let i = new
|
|
8693
|
+
if (qp.has(r) || !Object.prototype.hasOwnProperty.call(t, r)) continue;
|
|
8694
|
+
let i = new kp(t[r]);
|
|
8681
8695
|
e.push(i, r), n = !0;
|
|
8682
8696
|
}
|
|
8683
8697
|
if (!n) {
|
|
@@ -8686,25 +8700,25 @@ var Xp = function(e) {
|
|
|
8686
8700
|
}
|
|
8687
8701
|
e.exit();
|
|
8688
8702
|
};
|
|
8689
|
-
|
|
8690
|
-
var
|
|
8703
|
+
Qp.filterName = "objects";
|
|
8704
|
+
var $p = (e) => {
|
|
8691
8705
|
if (!e || !e.children || e.delta._t) return;
|
|
8692
8706
|
let t = e.children.length, n = {};
|
|
8693
8707
|
for (let r = 0; r < t; r++) {
|
|
8694
8708
|
let t = e.children[r];
|
|
8695
8709
|
if (t === void 0) continue;
|
|
8696
8710
|
let i = t.childName;
|
|
8697
|
-
|
|
8711
|
+
qp.has(i) || n[i] !== t.result && (n[i] = t.result);
|
|
8698
8712
|
}
|
|
8699
8713
|
e.setResult(n).exit();
|
|
8700
8714
|
};
|
|
8701
|
-
|
|
8715
|
+
$p.filterName = "collectChildren";
|
|
8702
8716
|
//#endregion
|
|
8703
8717
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/texts.js
|
|
8704
|
-
var
|
|
8705
|
-
function
|
|
8718
|
+
var em = 2, tm = 60, nm = null;
|
|
8719
|
+
function rm(e, t) {
|
|
8706
8720
|
var n;
|
|
8707
|
-
if (!
|
|
8721
|
+
if (!nm) {
|
|
8708
8722
|
let r;
|
|
8709
8723
|
if ((n = e == null ? void 0 : e.textDiff) != null && n.diffMatchPatch) r = new e.textDiff.diffMatchPatch();
|
|
8710
8724
|
else {
|
|
@@ -8712,7 +8726,7 @@ function tm(e, t) {
|
|
|
8712
8726
|
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.");
|
|
8713
8727
|
throw e.diff_match_patch_not_found = !0, e;
|
|
8714
8728
|
}
|
|
8715
|
-
|
|
8729
|
+
nm = {
|
|
8716
8730
|
diff: (e, t) => r.patch_toText(r.patch_make(e, t)),
|
|
8717
8731
|
patch: (e, t) => {
|
|
8718
8732
|
let n = r.patch_apply(r.patch_fromText(t), e);
|
|
@@ -8724,17 +8738,17 @@ function tm(e, t) {
|
|
|
8724
8738
|
}
|
|
8725
8739
|
};
|
|
8726
8740
|
}
|
|
8727
|
-
return
|
|
8741
|
+
return nm;
|
|
8728
8742
|
}
|
|
8729
|
-
var
|
|
8743
|
+
var im = function(e) {
|
|
8730
8744
|
var t, n;
|
|
8731
8745
|
if (e.leftType !== "string") return;
|
|
8732
|
-
let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) ||
|
|
8746
|
+
let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) || tm;
|
|
8733
8747
|
if (r.length < a || i.length < a) {
|
|
8734
8748
|
e.setResult([r, i]).exit();
|
|
8735
8749
|
return;
|
|
8736
8750
|
}
|
|
8737
|
-
let o =
|
|
8751
|
+
let o = rm(e.options);
|
|
8738
8752
|
if (!o) {
|
|
8739
8753
|
e.setResult([r, i]).exit();
|
|
8740
8754
|
return;
|
|
@@ -8743,19 +8757,19 @@ var nm = function(e) {
|
|
|
8743
8757
|
e.setResult([
|
|
8744
8758
|
s(r, i),
|
|
8745
8759
|
0,
|
|
8746
|
-
|
|
8760
|
+
em
|
|
8747
8761
|
]).exit();
|
|
8748
8762
|
};
|
|
8749
|
-
|
|
8750
|
-
var
|
|
8763
|
+
im.filterName = "texts";
|
|
8764
|
+
var am = function(e) {
|
|
8751
8765
|
if (e.nested) return;
|
|
8752
8766
|
let t = e.delta;
|
|
8753
|
-
if (t[2] !==
|
|
8754
|
-
let n = t, r =
|
|
8767
|
+
if (t[2] !== em) return;
|
|
8768
|
+
let n = t, r = rm(e.options, !0).patch;
|
|
8755
8769
|
e.setResult(r(e.left, n[0])).exit();
|
|
8756
8770
|
};
|
|
8757
|
-
|
|
8758
|
-
var
|
|
8771
|
+
am.filterName = "texts";
|
|
8772
|
+
var om = (e) => {
|
|
8759
8773
|
var t, n, r;
|
|
8760
8774
|
let i = /^@@ +-(\d+),(\d+) +\+(\d+),(\d+) +@@$/, a = e.split("\n");
|
|
8761
8775
|
for (let e = 0; e < a.length; e++) {
|
|
@@ -8776,21 +8790,21 @@ var im = (e) => {
|
|
|
8776
8790
|
} else s === "-" && (a[e] = `+${(r = a[e]) == null ? void 0 : r.slice(1)}`);
|
|
8777
8791
|
}
|
|
8778
8792
|
return a.join("\n");
|
|
8779
|
-
},
|
|
8793
|
+
}, sm = function(e) {
|
|
8780
8794
|
if (e.nested) return;
|
|
8781
8795
|
let t = e.delta;
|
|
8782
|
-
if (t[2] !==
|
|
8796
|
+
if (t[2] !== em) return;
|
|
8783
8797
|
let n = t;
|
|
8784
8798
|
e.setResult([
|
|
8785
|
-
|
|
8799
|
+
om(n[0]),
|
|
8786
8800
|
0,
|
|
8787
|
-
|
|
8801
|
+
em
|
|
8788
8802
|
]).exit();
|
|
8789
8803
|
};
|
|
8790
|
-
|
|
8804
|
+
sm.filterName = "texts";
|
|
8791
8805
|
//#endregion
|
|
8792
8806
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/trivial.js
|
|
8793
|
-
var
|
|
8807
|
+
var cm = function(e) {
|
|
8794
8808
|
if (e.left === e.right) {
|
|
8795
8809
|
e.setResult(void 0).exit();
|
|
8796
8810
|
return;
|
|
@@ -8823,8 +8837,8 @@ var om = function(e) {
|
|
|
8823
8837
|
}
|
|
8824
8838
|
e.left instanceof RegExp && (e.right instanceof RegExp ? e.setResult([e.left.toString(), e.right.toString()]).exit() : e.setResult([e.left, e.right]).exit());
|
|
8825
8839
|
};
|
|
8826
|
-
|
|
8827
|
-
var
|
|
8840
|
+
cm.filterName = "trivial";
|
|
8841
|
+
var lm = function(e) {
|
|
8828
8842
|
if (e.delta === void 0) {
|
|
8829
8843
|
e.setResult(e.left).exit();
|
|
8830
8844
|
return;
|
|
@@ -8848,8 +8862,8 @@ var sm = function(e) {
|
|
|
8848
8862
|
}
|
|
8849
8863
|
t.length === 3 && t[2] === 0 && e.setResult(void 0).exit();
|
|
8850
8864
|
};
|
|
8851
|
-
|
|
8852
|
-
var
|
|
8865
|
+
lm.filterName = "trivial";
|
|
8866
|
+
var um = function(e) {
|
|
8853
8867
|
if (e.delta === void 0) {
|
|
8854
8868
|
e.setResult(e.delta).exit();
|
|
8855
8869
|
return;
|
|
@@ -8870,36 +8884,36 @@ var cm = function(e) {
|
|
|
8870
8884
|
}
|
|
8871
8885
|
t.length === 3 && t[2] === 0 && e.setResult([t[0]]).exit();
|
|
8872
8886
|
};
|
|
8873
|
-
|
|
8887
|
+
um.filterName = "trivial";
|
|
8874
8888
|
//#endregion
|
|
8875
8889
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/diffpatcher.js
|
|
8876
|
-
var
|
|
8890
|
+
var dm = class {
|
|
8877
8891
|
constructor(e) {
|
|
8878
|
-
this.processor = new
|
|
8892
|
+
this.processor = new jp(e), this.processor.pipe(new Ap("diff").append(Jp, cm, Kp, im, Yp, zp).shouldHaveResult()), this.processor.pipe(new Ap("patch").append(Zp, Hp, lm, am, Xp, Vp).shouldHaveResult()), this.processor.pipe(new Ap("reverse").append($p, Gp, um, sm, Qp, Up).shouldHaveResult());
|
|
8879
8893
|
}
|
|
8880
8894
|
options(e) {
|
|
8881
8895
|
return this.processor.options(e);
|
|
8882
8896
|
}
|
|
8883
8897
|
diff(e, t) {
|
|
8884
|
-
return this.processor.process(new
|
|
8898
|
+
return this.processor.process(new Dp(e, t));
|
|
8885
8899
|
}
|
|
8886
8900
|
patch(e, t) {
|
|
8887
|
-
return this.processor.process(new
|
|
8901
|
+
return this.processor.process(new Op(e, t));
|
|
8888
8902
|
}
|
|
8889
8903
|
reverse(e) {
|
|
8890
|
-
return this.processor.process(new
|
|
8904
|
+
return this.processor.process(new kp(e));
|
|
8891
8905
|
}
|
|
8892
8906
|
unpatch(e, t) {
|
|
8893
8907
|
return this.patch(e, this.reverse(t));
|
|
8894
8908
|
}
|
|
8895
8909
|
clone(e) {
|
|
8896
|
-
return
|
|
8910
|
+
return Cp(e);
|
|
8897
8911
|
}
|
|
8898
8912
|
};
|
|
8899
8913
|
//#endregion
|
|
8900
8914
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/index.js
|
|
8901
|
-
function
|
|
8902
|
-
return new
|
|
8915
|
+
function fm(e) {
|
|
8916
|
+
return new dm(e);
|
|
8903
8917
|
}
|
|
8904
8918
|
//#endregion
|
|
8905
8919
|
//#region node_modules/.pnpm/@dmsnell+diff-match-patch@1.1.0/node_modules/@dmsnell/diff-match-patch/index.js
|
|
@@ -9461,46 +9475,46 @@ $.Diff = function(e, t) {
|
|
|
9461
9475
|
};
|
|
9462
9476
|
//#endregion
|
|
9463
9477
|
//#region src/components/audit-log/create-diff-patcher.tsx
|
|
9464
|
-
var
|
|
9478
|
+
var pm = (e = {}) => fm({
|
|
9465
9479
|
...e,
|
|
9466
9480
|
textDiff: {
|
|
9467
9481
|
diffMatchPatch: $,
|
|
9468
9482
|
minLength: 120
|
|
9469
9483
|
},
|
|
9470
9484
|
cloneDiffValues: !0
|
|
9471
|
-
}),
|
|
9485
|
+
}), mm = ["user", "unittemplate"], hm = pm(), gm = (e, t, n) => {
|
|
9472
9486
|
let r = Object.fromEntries(e.map((e) => [e.sectionKey, e.sectionLabel]));
|
|
9473
9487
|
for (let e = t.length - 1; e >= 0; e--) {
|
|
9474
9488
|
let n = r[t[e]];
|
|
9475
9489
|
if (n) return n;
|
|
9476
9490
|
}
|
|
9477
9491
|
return n || "";
|
|
9478
|
-
},
|
|
9492
|
+
}, _m = (e) => {
|
|
9479
9493
|
let t = (e) => sr(e) ? yr(e) : String(e);
|
|
9480
9494
|
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);
|
|
9481
|
-
},
|
|
9495
|
+
}, vm = (e) => {
|
|
9482
9496
|
switch (e.length) {
|
|
9483
9497
|
case 1: {
|
|
9484
9498
|
let [t] = e;
|
|
9485
9499
|
return {
|
|
9486
9500
|
type: "created",
|
|
9487
9501
|
before: "",
|
|
9488
|
-
after:
|
|
9502
|
+
after: _m(t)
|
|
9489
9503
|
};
|
|
9490
9504
|
}
|
|
9491
9505
|
case 2: {
|
|
9492
9506
|
let [t, n] = e;
|
|
9493
9507
|
return {
|
|
9494
9508
|
type: "modified",
|
|
9495
|
-
before:
|
|
9496
|
-
after:
|
|
9509
|
+
before: _m(t),
|
|
9510
|
+
after: _m(n)
|
|
9497
9511
|
};
|
|
9498
9512
|
}
|
|
9499
9513
|
case 3: {
|
|
9500
9514
|
let [t] = e;
|
|
9501
9515
|
return {
|
|
9502
9516
|
type: "deleted",
|
|
9503
|
-
before:
|
|
9517
|
+
before: _m(t),
|
|
9504
9518
|
after: ""
|
|
9505
9519
|
};
|
|
9506
9520
|
}
|
|
@@ -9510,15 +9524,15 @@ var dm = (e = {}) => um({
|
|
|
9510
9524
|
after: ""
|
|
9511
9525
|
};
|
|
9512
9526
|
}
|
|
9513
|
-
},
|
|
9514
|
-
let r =
|
|
9527
|
+
}, ym = (e) => Array.isArray(e), bm = (e, t) => t ? ym(t) ? t.length === 0 ? e : t.reduce((e, t) => hm.unpatch(en(e), en(t)), en(e)) : hm.unpatch(en(e), en(t)) : e, xm = (e) => e.createdAt || e.date, Sm = (e, t, n) => {
|
|
9528
|
+
let r = xm(e);
|
|
9515
9529
|
if (!r) return {
|
|
9516
9530
|
oldJson: "",
|
|
9517
9531
|
newJson: "",
|
|
9518
9532
|
error: `Cannot create comparison view: missing date for audit log ${e.id}`
|
|
9519
9533
|
};
|
|
9520
9534
|
let i = t.filter((e) => {
|
|
9521
|
-
let t =
|
|
9535
|
+
let t = xm(e);
|
|
9522
9536
|
return !!(e.diffs && t && t >= r);
|
|
9523
9537
|
}), a = Array.from({ length: i.length + 1 });
|
|
9524
9538
|
a[0] = en(n);
|
|
@@ -9531,7 +9545,7 @@ var dm = (e = {}) => um({
|
|
|
9531
9545
|
a[e + 1] = a[e];
|
|
9532
9546
|
continue;
|
|
9533
9547
|
}
|
|
9534
|
-
a[e + 1] =
|
|
9548
|
+
a[e + 1] = bm(a[e], t);
|
|
9535
9549
|
}
|
|
9536
9550
|
let e = i.length > 0 ? a[i.length - 1] : n, t = i.length > 0 ? a[i.length] : n;
|
|
9537
9551
|
o = JSON.stringify(t == null ? "" : t, null, 2), s = JSON.stringify(e == null ? "" : e, null, 2);
|
|
@@ -9546,10 +9560,10 @@ var dm = (e = {}) => um({
|
|
|
9546
9560
|
oldJson: o,
|
|
9547
9561
|
newJson: s
|
|
9548
9562
|
};
|
|
9549
|
-
},
|
|
9563
|
+
}, Cm = (e, t, n = {}, r = []) => {
|
|
9550
9564
|
var i;
|
|
9551
9565
|
if (!e) return;
|
|
9552
|
-
let a = [...
|
|
9566
|
+
let a = [...mm, ...(i = n.hiddenKeys) == null ? [] : i];
|
|
9553
9567
|
Object.keys(e).forEach((i) => {
|
|
9554
9568
|
var o;
|
|
9555
9569
|
let s = e[i];
|
|
@@ -9562,12 +9576,12 @@ var dm = (e = {}) => um({
|
|
|
9562
9576
|
on(s) ? t.push({
|
|
9563
9577
|
deltaFormat: [...s],
|
|
9564
9578
|
path: c
|
|
9565
|
-
}) : mn(s) &&
|
|
9579
|
+
}) : mn(s) && Cm(s, t, n, c);
|
|
9566
9580
|
});
|
|
9567
|
-
},
|
|
9581
|
+
}, wm = (e, t = {}) => {
|
|
9568
9582
|
let n = [];
|
|
9569
|
-
return e ? (
|
|
9570
|
-
},
|
|
9583
|
+
return e ? (Cm(e, n, t), n) : [];
|
|
9584
|
+
}, Tm = (e) => e.replace(/\[\d+\]/g, "").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]/g, " ").replace(/\s+/g, " ").trim().replace(/^./, (e) => e.toUpperCase()), Em = (e) => {
|
|
9571
9585
|
if (e == null || e === "") return "empty";
|
|
9572
9586
|
if (typeof e == "boolean") return e ? "true" : "false";
|
|
9573
9587
|
if (typeof e == "string") return e;
|
|
@@ -9578,27 +9592,27 @@ var dm = (e = {}) => um({
|
|
|
9578
9592
|
} catch {
|
|
9579
9593
|
return String(e);
|
|
9580
9594
|
}
|
|
9581
|
-
},
|
|
9595
|
+
}, Dm = (e, t = e.length - 1) => {
|
|
9582
9596
|
if (t >= e.length) return "Value";
|
|
9583
9597
|
let n = e[t];
|
|
9584
|
-
return !n || ir(n) ?
|
|
9585
|
-
},
|
|
9586
|
-
let o =
|
|
9598
|
+
return !n || ir(n) ? Dm(e, t - 1) : Tm(n);
|
|
9599
|
+
}, Om = ({ userName: e, type: t, property: n, before: r, after: i, sectionName: a }) => {
|
|
9600
|
+
let o = Em(r), s = Em(i), c = a ? ` in ${a}` : "";
|
|
9587
9601
|
switch (t) {
|
|
9588
9602
|
case "modified": return `${e} updated ${n} from ${o} to ${s}${c}.`;
|
|
9589
9603
|
case "created": return `${e} created ${s}${c}.`;
|
|
9590
9604
|
case "deleted": return `${e} deleted ${o}${c}.`;
|
|
9591
9605
|
default: return `${e} changed ${n}${c}.`;
|
|
9592
9606
|
}
|
|
9593
|
-
},
|
|
9607
|
+
}, km = ({ sectionNames: e, userName: t, diffs: n, defaultSectionName: r }) => {
|
|
9594
9608
|
let i = {
|
|
9595
9609
|
headers: [{ cells: [{ value: "Changes" }] }],
|
|
9596
9610
|
rows: n.map((n) => {
|
|
9597
|
-
let { deltaFormat: i, path: a } = n, o =
|
|
9598
|
-
return { cells: [{ value:
|
|
9611
|
+
let { deltaFormat: i, path: a } = n, o = gm(e, a, r), { type: s, before: c, after: l } = vm(i);
|
|
9612
|
+
return { cells: [{ value: Om({
|
|
9599
9613
|
userName: t,
|
|
9600
9614
|
type: s,
|
|
9601
|
-
property:
|
|
9615
|
+
property: Dm(a),
|
|
9602
9616
|
before: c,
|
|
9603
9617
|
after: l,
|
|
9604
9618
|
sectionName: o
|
|
@@ -9606,7 +9620,7 @@ var dm = (e = {}) => um({
|
|
|
9606
9620
|
})
|
|
9607
9621
|
};
|
|
9608
9622
|
return /* @__PURE__ */ x(Gl, { table: i });
|
|
9609
|
-
},
|
|
9623
|
+
}, Am = Object.freeze({
|
|
9610
9624
|
summary: {
|
|
9611
9625
|
label: "Summary",
|
|
9612
9626
|
value: "summary"
|
|
@@ -9615,13 +9629,13 @@ var dm = (e = {}) => um({
|
|
|
9615
9629
|
label: "Compare",
|
|
9616
9630
|
value: "compare"
|
|
9617
9631
|
}
|
|
9618
|
-
}),
|
|
9619
|
-
let c = [
|
|
9632
|
+
}), jm = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, transformDiffsConfig: i, sectionNames: a, defaultSectionName: o, onClose: s }) => {
|
|
9633
|
+
let c = [Am.summary, Am.compare].map(({ label: e, value: t }) => ({
|
|
9620
9634
|
label: e,
|
|
9621
9635
|
value: t
|
|
9622
9636
|
})), [l, u] = _(c[0]), { diffs: d = void 0 } = e || {};
|
|
9623
9637
|
if (!d) return null;
|
|
9624
|
-
let { oldJson: f, newJson: p, error: m } =
|
|
9638
|
+
let { oldJson: f, newJson: p, error: m } = Sm(e, t, n);
|
|
9625
9639
|
return /* @__PURE__ */ x(bs, {
|
|
9626
9640
|
visible: r,
|
|
9627
9641
|
centered: !0,
|
|
@@ -9633,15 +9647,15 @@ var dm = (e = {}) => um({
|
|
|
9633
9647
|
onChange: (e) => u(c.find((t) => t.value === e.target.value)),
|
|
9634
9648
|
options: c,
|
|
9635
9649
|
value: l
|
|
9636
|
-
}), l.value === "summary" ? /* @__PURE__ */ x(
|
|
9650
|
+
}), l.value === "summary" ? /* @__PURE__ */ x(km, {
|
|
9637
9651
|
userName: e.userName,
|
|
9638
9652
|
sectionNames: a,
|
|
9639
|
-
diffs:
|
|
9653
|
+
diffs: wm(d, i),
|
|
9640
9654
|
defaultSectionName: o
|
|
9641
9655
|
}) : m ? /* @__PURE__ */ x("div", {
|
|
9642
9656
|
style: { padding: 16 },
|
|
9643
9657
|
children: m
|
|
9644
|
-
}) : /* @__PURE__ */ x(
|
|
9658
|
+
}) : /* @__PURE__ */ x(bp, {
|
|
9645
9659
|
oldJson: f,
|
|
9646
9660
|
newJson: p
|
|
9647
9661
|
})] }),
|
|
@@ -9654,7 +9668,7 @@ var dm = (e = {}) => um({
|
|
|
9654
9668
|
height: "90vh"
|
|
9655
9669
|
} })
|
|
9656
9670
|
});
|
|
9657
|
-
},
|
|
9671
|
+
}, Mm = [
|
|
9658
9672
|
{
|
|
9659
9673
|
label: "10 / page",
|
|
9660
9674
|
value: 10
|
|
@@ -9667,8 +9681,8 @@ var dm = (e = {}) => um({
|
|
|
9667
9681
|
label: "50 / page",
|
|
9668
9682
|
value: 50
|
|
9669
9683
|
}
|
|
9670
|
-
],
|
|
9671
|
-
let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s =
|
|
9684
|
+
], Nm = (e, t = {}) => {
|
|
9685
|
+
let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s = wm(n, t).length, c = s ? `${s} change${s === 1 ? "" : "s"}` : "no field changes";
|
|
9672
9686
|
if (i === "API" && !r) return a === "Created" ? "Created through API" : "Changed through API";
|
|
9673
9687
|
switch (a) {
|
|
9674
9688
|
case "Created": return `Created by ${r}`;
|
|
@@ -9678,7 +9692,7 @@ var dm = (e = {}) => um({
|
|
|
9678
9692
|
case "Updated": return `Updated by ${r} (${c})`;
|
|
9679
9693
|
default: return `Change by ${r}`;
|
|
9680
9694
|
}
|
|
9681
|
-
},
|
|
9695
|
+
}, Pm = ({ 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: m, isLogDisabled: h }) => {
|
|
9682
9696
|
let [g, v] = _(!1), [y, C] = _(null), w = (e) => {
|
|
9683
9697
|
if (e.snapshot) {
|
|
9684
9698
|
f == null || f(e.snapshot, e);
|
|
@@ -9697,7 +9711,7 @@ var dm = (e = {}) => um({
|
|
|
9697
9711
|
return {
|
|
9698
9712
|
cells: [
|
|
9699
9713
|
{
|
|
9700
|
-
value: e.snapshot ? `Snapshot: ${e.snapshot}` :
|
|
9714
|
+
value: e.snapshot ? `Snapshot: ${e.snapshot}` : Nm(e, l),
|
|
9701
9715
|
type: "Link",
|
|
9702
9716
|
disabled: n,
|
|
9703
9717
|
onClick: n ? void 0 : () => w(e),
|
|
@@ -9716,8 +9730,8 @@ var dm = (e = {}) => um({
|
|
|
9716
9730
|
type: "Static"
|
|
9717
9731
|
},
|
|
9718
9732
|
{
|
|
9719
|
-
value:
|
|
9720
|
-
date:
|
|
9733
|
+
value: xp({
|
|
9734
|
+
date: xm(e),
|
|
9721
9735
|
showTime: !0
|
|
9722
9736
|
}),
|
|
9723
9737
|
type: "Static"
|
|
@@ -9760,14 +9774,14 @@ var dm = (e = {}) => um({
|
|
|
9760
9774
|
onChange: (e) => {
|
|
9761
9775
|
u(Number(e.target.value));
|
|
9762
9776
|
},
|
|
9763
|
-
options:
|
|
9777
|
+
options: Mm,
|
|
9764
9778
|
value: a
|
|
9765
9779
|
},
|
|
9766
9780
|
onSelectPage: (e) => d(e),
|
|
9767
9781
|
small: !0
|
|
9768
9782
|
} }
|
|
9769
9783
|
} })
|
|
9770
|
-
}), g && y && y.diffs && /* @__PURE__ */ x(
|
|
9784
|
+
}), g && y && y.diffs && /* @__PURE__ */ x(jm, {
|
|
9771
9785
|
sectionNames: o,
|
|
9772
9786
|
isOpen: g,
|
|
9773
9787
|
onClose: () => v(!1),
|
|
@@ -9777,7 +9791,7 @@ var dm = (e = {}) => um({
|
|
|
9777
9791
|
data: t,
|
|
9778
9792
|
transformDiffsConfig: l
|
|
9779
9793
|
})] });
|
|
9780
|
-
},
|
|
9794
|
+
}, Fm = ({ pathName: e, moduleName: t, onNavigate: n, onStartTimingEvent: r }) => {
|
|
9781
9795
|
let i = window.location.href, a = g(i);
|
|
9782
9796
|
return d(() => {
|
|
9783
9797
|
a.current = i;
|
|
@@ -9800,20 +9814,20 @@ var dm = (e = {}) => um({
|
|
|
9800
9814
|
});
|
|
9801
9815
|
};
|
|
9802
9816
|
}, [e, t]), null;
|
|
9803
|
-
},
|
|
9817
|
+
}, Im = {
|
|
9804
9818
|
errorBoundary: "_errorBoundary_hmco0_1",
|
|
9805
9819
|
sidebarErrorBoundary: "_sidebarErrorBoundary_hmco0_5",
|
|
9806
9820
|
rightSidebarErrorBoundary: "_rightSidebarErrorBoundary_hmco0_6"
|
|
9807
|
-
},
|
|
9821
|
+
}, Lm = ({ options: e }) => {
|
|
9808
9822
|
let { ErrorComponent: t, isSideBar: n, isRightSideBar: r, isPage: i, style: a } = e == null ? {} : e, { translations: o } = sp();
|
|
9809
9823
|
if (t) return /* @__PURE__ */ x(t, {});
|
|
9810
9824
|
if (n || r) return /* @__PURE__ */ x("div", {
|
|
9811
|
-
className: y(n ?
|
|
9825
|
+
className: y(n ? Im.sidebarErrorBoundary : "", r ? Im.rightSidebarErrorBoundary : ""),
|
|
9812
9826
|
style: a,
|
|
9813
9827
|
children: o == null ? void 0 : o.unexpectedError
|
|
9814
9828
|
});
|
|
9815
9829
|
let s = /* @__PURE__ */ x("div", {
|
|
9816
|
-
className:
|
|
9830
|
+
className: Im.errorBoundary,
|
|
9817
9831
|
style: a,
|
|
9818
9832
|
children: /* @__PURE__ */ x(Bs, { message: {
|
|
9819
9833
|
icon: !0,
|
|
@@ -9828,19 +9842,19 @@ var dm = (e = {}) => um({
|
|
|
9828
9842
|
padding: 0,
|
|
9829
9843
|
children: s
|
|
9830
9844
|
}) : s;
|
|
9831
|
-
},
|
|
9832
|
-
fallback: /* @__PURE__ */ x(
|
|
9845
|
+
}, Rm = ({ children: e, options: t }) => /* @__PURE__ */ x(fi.ErrorBoundary, {
|
|
9846
|
+
fallback: /* @__PURE__ */ x(Lm, { options: t }),
|
|
9833
9847
|
onError: (e, t) => {
|
|
9834
9848
|
console.error("Error caught by boundary:", e, t);
|
|
9835
9849
|
},
|
|
9836
9850
|
children: e
|
|
9837
|
-
}),
|
|
9851
|
+
}), zm = (e, t = {}) => (n) => /* @__PURE__ */ x(Rm, {
|
|
9838
9852
|
options: t,
|
|
9839
9853
|
children: /* @__PURE__ */ x(e, { ...n })
|
|
9840
|
-
}),
|
|
9854
|
+
}), Bm = (e = {}) => (t) => zm(t, e), Vm = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null, Hm = (e) => {
|
|
9841
9855
|
cp(rp.LanguageKey, e.languageKey), Object.entries(e).forEach(([e, t]) => {
|
|
9842
|
-
e === rp.Translations ? cp(e, ap(t)) : cp(e,
|
|
9856
|
+
e === rp.Translations ? cp(e, ap(t)) : cp(e, Vm(t) ? t : { ...t });
|
|
9843
9857
|
});
|
|
9844
9858
|
};
|
|
9845
9859
|
//#endregion
|
|
9846
|
-
export { Li as Accordion, oa as AccordionWithDefaultToggle, Ua as Actions, hi as Align,
|
|
9860
|
+
export { Li as Accordion, oa as AccordionWithDefaultToggle, Ua as Actions, hi as Align, Pm as AuditLog, ka as Badge, qa as Breadcrumb, Ga as BreadcrumbLinkType, q as Button, Ya as ButtonGroup, gi as ButtonPosition, ua as ButtonType, Za as Card, na as CheckBox, ji as Chevron, Pi as Collapse, mi as Color, Fo as ColorInput, Po as ColorInputPopover, Bo as Column, Qo as Dialog, bp as DiffViewer, W as DisabledContext, Go as Divider, as as Drawer, Pf as ElementType, nu as Empty, Rm as ErrorBoundary, cd as Field, id as FileButton, hs as FileInput, ld as Flex, dd as FormRow, bo as Grid, H as GroupOrder, Yo as Heading, ta as HelpIcon, G as Icon, U as IconType, us as Input, cs as InputGroup, nl as InputGroupAddon, fs as InputReaderMethods, yi as InputType, od as Label, wd as List, pd as ListHeading, yd as ListSubheading, Ed as Loader, Va as Menu, _a as MenuCarat, ga as MenuType, Bs as Message, Ps as MessageType, bs as Modal, Ks as NativeSelect, hl as NumberInput, Nd as OptionDropdown, Fd as Page, rl as Pagination, Bf as PopConfirm, go as Popover, Id as Portal, Rd as PrintHeader, Cs as ProgressBar, zd as RadioButton, Wd as RichTextInput, Kd as Row, Xc as Select, gp as SettingField, Zd as SideBar, $d as Skeleton, Tl as Slider, Os as SmartUploadModal, gs as Spacer, la as Spinner, Gl as Table, rd as TableImportExport, Df as Tabs, Uo as Text, Af as TextArea, Of as TextLink, _i as TextTransform, vi as Theme, Kr as Toaster, Vu as Toggle, K as Tooltip, Lf as TopBar, Wf as Tree, np as TreeTable, pi as TriggerType, bf as UnitInput, wf as UnitSlider, mp as UnitTable, Fm as UsageTracker, Ru as dismissToast, _f as initializeContext, Hm as initializeGuiLibrary, ps as readFile, Lu as toast, qs as useFocus, _s as useKeyboardEvent, Xs as useWindowWidth, Bm as withChainableErrorBoundary, zm as withErrorBoundary };
|
package/package.json
CHANGED