@oliasoft-open-source/react-ui-library 9.5.1-beta-2 → 9.5.1-beta-3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +170 -170
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8407,12 +8407,12 @@ var Ao = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), jo =
|
|
|
8407
8407
|
compareMethod: Ci.WORDS
|
|
8408
8408
|
})
|
|
8409
8409
|
}) });
|
|
8410
|
-
}, Hp = { backgroundColor: "var(--color-background-error-muted)" }, Up = { backgroundColor: "var(--color-background-success-muted)" }, Wp = { backgroundColor: "var(--color-background-warning-muted)" }, Gp = (e) => {
|
|
8410
|
+
}, Hp = { backgroundColor: "var(--color-background-error-muted)" }, Up = { backgroundColor: "var(--color-background-success-muted)" }, Wp = { backgroundColor: "var(--color-background-warning-muted)" }, Gp = (e) => typeof e == "object" && e && "value" in e ? e.value : e, Kp = (e) => {
|
|
8411
8411
|
var t;
|
|
8412
8412
|
if (e.id != null) return String(e.id);
|
|
8413
|
-
let n = (t = e.cells) == null || (t = t[0]) == null ? void 0 : t.value;
|
|
8413
|
+
let n = Gp((t = e.cells) == null || (t = t[0]) == null ? void 0 : t.value);
|
|
8414
8414
|
return n == null ? "" : String(n);
|
|
8415
|
-
},
|
|
8415
|
+
}, qp = (e, t) => ({
|
|
8416
8416
|
...e,
|
|
8417
8417
|
cells: e.cells.map((e) => ({
|
|
8418
8418
|
...e,
|
|
@@ -8421,7 +8421,7 @@ var Ao = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), jo =
|
|
|
8421
8421
|
...t
|
|
8422
8422
|
}
|
|
8423
8423
|
}))
|
|
8424
|
-
}),
|
|
8424
|
+
}), Jp = (e, t) => ({
|
|
8425
8425
|
...e,
|
|
8426
8426
|
cells: e.cells.map((e, n) => {
|
|
8427
8427
|
var r;
|
|
@@ -8435,12 +8435,12 @@ var Ao = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), jo =
|
|
|
8435
8435
|
tooltip: a
|
|
8436
8436
|
};
|
|
8437
8437
|
})
|
|
8438
|
-
}),
|
|
8438
|
+
}), Yp = (e = [], t = []) => {
|
|
8439
8439
|
let n = /* @__PURE__ */ new Map();
|
|
8440
|
-
for (let e of t) n.set(
|
|
8441
|
-
let r = new Set(e.map(
|
|
8440
|
+
for (let e of t) n.set(Kp(e), e);
|
|
8441
|
+
let r = new Set(e.map(Kp)), i = /* @__PURE__ */ new Map(), a = [], o = null;
|
|
8442
8442
|
for (let e = t.length - 1; e >= 0; e--) {
|
|
8443
|
-
let n = t[e], c =
|
|
8443
|
+
let n = t[e], c = Kp(n);
|
|
8444
8444
|
if (r.has(c)) {
|
|
8445
8445
|
o = c;
|
|
8446
8446
|
continue;
|
|
@@ -8455,7 +8455,7 @@ var Ao = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), jo =
|
|
|
8455
8455
|
a.reverse();
|
|
8456
8456
|
let c = [];
|
|
8457
8457
|
for (let t of e) {
|
|
8458
|
-
let e =
|
|
8458
|
+
let e = Kp(t), r = i.get(e);
|
|
8459
8459
|
if (r) for (let e of r) c.push({
|
|
8460
8460
|
status: "deleted",
|
|
8461
8461
|
row: e
|
|
@@ -8475,11 +8475,11 @@ var Ao = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), jo =
|
|
|
8475
8475
|
row: e
|
|
8476
8476
|
});
|
|
8477
8477
|
return c;
|
|
8478
|
-
},
|
|
8479
|
-
let i = h(() =>
|
|
8478
|
+
}, Xp = (e) => e.status === "deleted" ? qp(e.row, Hp) : e.status === "added" ? qp(e.row, Up) : Jp(e.row, e.compareRow), Zp = ({ table: e, compareRows: t, beforeRenderRow: n, ...r }) => {
|
|
8479
|
+
let i = h(() => Yp(e.rows, t), [e.rows, t]), a = !!e.infiniteScroll, o = h(() => {
|
|
8480
8480
|
if (!a) return i.map((e) => e.row);
|
|
8481
8481
|
}, [a, i]), s = l(({ row: e, rowIndex: t }) => {
|
|
8482
|
-
let r = i[t], a = r ?
|
|
8482
|
+
let r = i[t], a = r ? Xp(r) : e;
|
|
8483
8483
|
return n ? n({
|
|
8484
8484
|
row: a,
|
|
8485
8485
|
rowIndex: t
|
|
@@ -8498,7 +8498,7 @@ var Ao = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), jo =
|
|
|
8498
8498
|
};
|
|
8499
8499
|
//#endregion
|
|
8500
8500
|
//#region src/helpers/date.ts
|
|
8501
|
-
function
|
|
8501
|
+
function Qp({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i, locale: a }) {
|
|
8502
8502
|
return e ? new Date(e).toLocaleString(a, {
|
|
8503
8503
|
year: "numeric",
|
|
8504
8504
|
month: "short",
|
|
@@ -8512,28 +8512,28 @@ function Zp({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i
|
|
|
8512
8512
|
}
|
|
8513
8513
|
//#endregion
|
|
8514
8514
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/clone.js
|
|
8515
|
-
function
|
|
8515
|
+
function $p(e) {
|
|
8516
8516
|
var t;
|
|
8517
8517
|
let n = /^\/(.*)\/([gimyu]*)$/.exec(e.toString());
|
|
8518
8518
|
if (!n) throw Error("Invalid RegExp");
|
|
8519
8519
|
return new RegExp((t = n[1]) == null ? "" : t, n[2]);
|
|
8520
8520
|
}
|
|
8521
|
-
function
|
|
8521
|
+
function em(e) {
|
|
8522
8522
|
if (typeof e != "object") return e;
|
|
8523
8523
|
if (e === null) return null;
|
|
8524
|
-
if (Array.isArray(e)) return e.map(
|
|
8524
|
+
if (Array.isArray(e)) return e.map(em);
|
|
8525
8525
|
if (e instanceof Date) return new Date(e.getTime());
|
|
8526
|
-
if (e instanceof RegExp) return
|
|
8526
|
+
if (e instanceof RegExp) return $p(e);
|
|
8527
8527
|
let t = {};
|
|
8528
|
-
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] =
|
|
8528
|
+
for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = em(e[n]));
|
|
8529
8529
|
return t;
|
|
8530
8530
|
}
|
|
8531
8531
|
//#endregion
|
|
8532
8532
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/assertions/arrays.js
|
|
8533
|
-
function
|
|
8533
|
+
function tm(e, t) {
|
|
8534
8534
|
if (e.length === 0) throw Error(t || "Expected a non-empty array");
|
|
8535
8535
|
}
|
|
8536
|
-
var
|
|
8536
|
+
var nm = (e) => e[e.length - 1], rm = class {
|
|
8537
8537
|
setResult(e) {
|
|
8538
8538
|
return this.result = e, this.hasResult = !0, this;
|
|
8539
8539
|
}
|
|
@@ -8541,16 +8541,16 @@ var tm = (e) => e[e.length - 1], nm = class {
|
|
|
8541
8541
|
return this.exiting = !0, this;
|
|
8542
8542
|
}
|
|
8543
8543
|
push(e, t) {
|
|
8544
|
-
return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (
|
|
8544
|
+
return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (tm(this.children), nm(this.children).next = e, this.children.push(e)) : (this.children = [e], this.nextAfterChildren = this.next || null, this.next = e), e.next = this, this;
|
|
8545
8545
|
}
|
|
8546
|
-
},
|
|
8546
|
+
}, im = class extends rm {
|
|
8547
8547
|
constructor(e, t) {
|
|
8548
8548
|
super(), this.left = e, this.right = t, this.pipe = "diff";
|
|
8549
8549
|
}
|
|
8550
8550
|
prepareDeltaResult(e) {
|
|
8551
8551
|
var t, n, r, i;
|
|
8552
8552
|
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)) {
|
|
8553
|
-
let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues :
|
|
8553
|
+
let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues : em;
|
|
8554
8554
|
typeof e[0] == "object" && (e[0] = t(e[0])), typeof e[1] == "object" && (e[1] = t(e[1]));
|
|
8555
8555
|
}
|
|
8556
8556
|
return e;
|
|
@@ -8558,15 +8558,15 @@ var tm = (e) => e[e.length - 1], nm = class {
|
|
|
8558
8558
|
setResult(e) {
|
|
8559
8559
|
return this.prepareDeltaResult(e), super.setResult(e);
|
|
8560
8560
|
}
|
|
8561
|
-
},
|
|
8561
|
+
}, am = class extends rm {
|
|
8562
8562
|
constructor(e, t) {
|
|
8563
8563
|
super(), this.left = e, this.delta = t, this.pipe = "patch";
|
|
8564
8564
|
}
|
|
8565
|
-
},
|
|
8565
|
+
}, om = class extends rm {
|
|
8566
8566
|
constructor(e) {
|
|
8567
8567
|
super(), this.delta = e, this.pipe = "reverse";
|
|
8568
8568
|
}
|
|
8569
|
-
},
|
|
8569
|
+
}, sm = class {
|
|
8570
8570
|
constructor(e) {
|
|
8571
8571
|
this.name = e, this.filters = [];
|
|
8572
8572
|
}
|
|
@@ -8630,7 +8630,7 @@ var tm = (e) => e[e.length - 1], nm = class {
|
|
|
8630
8630
|
}
|
|
8631
8631
|
}), this);
|
|
8632
8632
|
}
|
|
8633
|
-
},
|
|
8633
|
+
}, cm = class {
|
|
8634
8634
|
constructor(e) {
|
|
8635
8635
|
this.selfOptions = e || {}, this.pipes = {};
|
|
8636
8636
|
}
|
|
@@ -8657,7 +8657,7 @@ var tm = (e) => e[e.length - 1], nm = class {
|
|
|
8657
8657
|
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);
|
|
8658
8658
|
return n.hasResult ? n.result : void 0;
|
|
8659
8659
|
}
|
|
8660
|
-
},
|
|
8660
|
+
}, lm = (e, t, n, r) => e[n] === t[r], um = (e, t, n, r) => {
|
|
8661
8661
|
var i, a, o;
|
|
8662
8662
|
let s = e.length, c = t.length, l, u, d = Array(s + 1);
|
|
8663
8663
|
for (l = 0; l < s + 1; l++) {
|
|
@@ -8673,7 +8673,7 @@ var tm = (e) => e[e.length - 1], nm = class {
|
|
|
8673
8673
|
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);
|
|
8674
8674
|
}
|
|
8675
8675
|
return d;
|
|
8676
|
-
},
|
|
8676
|
+
}, dm = (e, t, n, r) => {
|
|
8677
8677
|
let i = t.length, a = n.length, o = {
|
|
8678
8678
|
sequence: [],
|
|
8679
8679
|
indices1: [],
|
|
@@ -8695,11 +8695,11 @@ var tm = (e) => e[e.length - 1], nm = class {
|
|
|
8695
8695
|
}
|
|
8696
8696
|
}
|
|
8697
8697
|
return o;
|
|
8698
|
-
},
|
|
8698
|
+
}, fm = { get: (e, t, n, r) => {
|
|
8699
8699
|
let i = r || {};
|
|
8700
|
-
return um(
|
|
8701
|
-
} },
|
|
8702
|
-
function
|
|
8700
|
+
return dm(um(e, t, n || lm, i), e, t, i);
|
|
8701
|
+
} }, pm = 3;
|
|
8702
|
+
function mm(e, t, n, r) {
|
|
8703
8703
|
for (let i = 0; i < n; i++) {
|
|
8704
8704
|
let n = e[i];
|
|
8705
8705
|
for (let e = 0; e < r; e++) {
|
|
@@ -8709,7 +8709,7 @@ function pm(e, t, n, r) {
|
|
|
8709
8709
|
}
|
|
8710
8710
|
return !1;
|
|
8711
8711
|
}
|
|
8712
|
-
function
|
|
8712
|
+
function hm(e, t, n, r, i) {
|
|
8713
8713
|
let a = e[n], o = t[r];
|
|
8714
8714
|
if (a === o) return !0;
|
|
8715
8715
|
if (typeof a != "object" || typeof o != "object") return !1;
|
|
@@ -8722,15 +8722,15 @@ function mm(e, t, n, r, i) {
|
|
|
8722
8722
|
let l = i.hashCache2[r];
|
|
8723
8723
|
return l === void 0 && (i.hashCache2[r] = l = s(o, r)), l !== void 0 && c === l;
|
|
8724
8724
|
}
|
|
8725
|
-
var
|
|
8725
|
+
var gm = function(e) {
|
|
8726
8726
|
var t, n, r, i, a;
|
|
8727
8727
|
if (!e.leftIsArray) return;
|
|
8728
8728
|
let o = {
|
|
8729
8729
|
objectHash: (t = e.options) == null ? void 0 : t.objectHash,
|
|
8730
8730
|
matchByPosition: (n = e.options) == null ? void 0 : n.matchByPosition
|
|
8731
8731
|
}, s = 0, c = 0, l, u, d, f = e.left, p = e.right, m = f.length, h = p.length, g;
|
|
8732
|
-
for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !
|
|
8733
|
-
for (; c + s < m && c + s < h &&
|
|
8732
|
+
for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !mm(f, p, m, h)); s < m && s < h && hm(f, p, s, s, o);) l = s, g = new im(f[l], p[l]), e.push(g, l), s++;
|
|
8733
|
+
for (; c + s < m && c + s < h && hm(f, p, m - 1 - c, h - 1 - c, o);) u = m - 1 - c, d = h - 1 - c, g = new im(f[u], p[d]), e.push(g, d), c++;
|
|
8734
8734
|
let _;
|
|
8735
8735
|
if (s + c === m) {
|
|
8736
8736
|
if (m === h) {
|
|
@@ -8754,7 +8754,7 @@ var hm = function(e) {
|
|
|
8754
8754
|
return;
|
|
8755
8755
|
}
|
|
8756
8756
|
o.hashCache1 = void 0, o.hashCache2 = void 0;
|
|
8757
|
-
let v = f.slice(s, m - c), y = p.slice(s, h - c), b =
|
|
8757
|
+
let v = f.slice(s, m - c), y = p.slice(s, h - c), b = fm.get(v, y, hm, o), x = [];
|
|
8758
8758
|
for (_ = _ || { _t: "a" }, l = s; l < m - c; l++) if (b.indices1.indexOf(l - s) < 0) {
|
|
8759
8759
|
let t = `_${l}`;
|
|
8760
8760
|
_[t] = [
|
|
@@ -8775,8 +8775,8 @@ var hm = function(e) {
|
|
|
8775
8775
|
if (S && w > 0) for (let n = 0; n < w; n++) {
|
|
8776
8776
|
u = x[n];
|
|
8777
8777
|
let r = u === void 0 ? void 0 : _[`_${u}`];
|
|
8778
|
-
if (u !== void 0 && r &&
|
|
8779
|
-
r.splice(1, 2, l,
|
|
8778
|
+
if (u !== void 0 && r && hm(v, y, u - s, l - s, o)) {
|
|
8779
|
+
r.splice(1, 2, l, pm), r.splice(1, 2, l, pm), C || (r[0] = ""), d = l, g = new im(f[u], p[d]), e.push(g, d), x.splice(n, 1), t = !0;
|
|
8780
8780
|
break;
|
|
8781
8781
|
}
|
|
8782
8782
|
}
|
|
@@ -8784,20 +8784,20 @@ var hm = function(e) {
|
|
|
8784
8784
|
} else {
|
|
8785
8785
|
if (b.indices1[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices1: ${b.indices1}`);
|
|
8786
8786
|
if (u = b.indices1[t] + s, b.indices2[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices2: ${b.indices2}`);
|
|
8787
|
-
d = b.indices2[t] + s, g = new
|
|
8787
|
+
d = b.indices2[t] + s, g = new im(f[u], p[d]), e.push(g, d);
|
|
8788
8788
|
}
|
|
8789
8789
|
}
|
|
8790
8790
|
e.setResult(_).exit();
|
|
8791
8791
|
};
|
|
8792
|
-
|
|
8793
|
-
var
|
|
8792
|
+
gm.filterName = "arrays";
|
|
8793
|
+
var _m = {
|
|
8794
8794
|
numerically(e, t) {
|
|
8795
8795
|
return e - t;
|
|
8796
8796
|
},
|
|
8797
8797
|
numericallyBy(e) {
|
|
8798
8798
|
return (t, n) => t[e] - n[e];
|
|
8799
8799
|
}
|
|
8800
|
-
},
|
|
8800
|
+
}, vm = function(e) {
|
|
8801
8801
|
var t;
|
|
8802
8802
|
if (!e.nested) return;
|
|
8803
8803
|
let n = e.delta;
|
|
@@ -8806,7 +8806,7 @@ var gm = {
|
|
|
8806
8806
|
for (r in a) if (r !== "_t") {
|
|
8807
8807
|
if (r[0] === "_") {
|
|
8808
8808
|
let e = r;
|
|
8809
|
-
if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] ===
|
|
8809
|
+
if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] === pm)) s.push(Number.parseInt(r.slice(1), 10));
|
|
8810
8810
|
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]}`);
|
|
8811
8811
|
} else {
|
|
8812
8812
|
let e = r;
|
|
@@ -8819,15 +8819,15 @@ var gm = {
|
|
|
8819
8819
|
});
|
|
8820
8820
|
}
|
|
8821
8821
|
}
|
|
8822
|
-
for (s = s.sort(
|
|
8822
|
+
for (s = s.sort(_m.numerically), r = s.length - 1; r >= 0; r--) {
|
|
8823
8823
|
if (i = s[r], i === void 0) continue;
|
|
8824
8824
|
let e = a[`_${i}`], t = o.splice(i, 1)[0];
|
|
8825
|
-
(e == null ? void 0 : e[2]) ===
|
|
8825
|
+
(e == null ? void 0 : e[2]) === pm && c.push({
|
|
8826
8826
|
index: e[1],
|
|
8827
8827
|
value: t
|
|
8828
8828
|
});
|
|
8829
8829
|
}
|
|
8830
|
-
c = c.sort(
|
|
8830
|
+
c = c.sort(_m.numericallyBy("index"));
|
|
8831
8831
|
let u = c.length;
|
|
8832
8832
|
for (r = 0; r < u; r++) {
|
|
8833
8833
|
let e = c[r];
|
|
@@ -8837,7 +8837,7 @@ var gm = {
|
|
|
8837
8837
|
if (d > 0) for (r = 0; r < d; r++) {
|
|
8838
8838
|
let t = l[r];
|
|
8839
8839
|
if (t === void 0) continue;
|
|
8840
|
-
let n = new
|
|
8840
|
+
let n = new am(o[t.index], t.delta);
|
|
8841
8841
|
e.push(n, t.index);
|
|
8842
8842
|
}
|
|
8843
8843
|
if (!e.children) {
|
|
@@ -8846,8 +8846,8 @@ var gm = {
|
|
|
8846
8846
|
}
|
|
8847
8847
|
e.exit();
|
|
8848
8848
|
};
|
|
8849
|
-
|
|
8850
|
-
var
|
|
8849
|
+
vm.filterName = "arrays";
|
|
8850
|
+
var ym = function(e) {
|
|
8851
8851
|
if (!e || !e.children || e.delta._t !== "a") return;
|
|
8852
8852
|
let t = e.left, n = e.children.length;
|
|
8853
8853
|
for (let r = 0; r < n; r++) {
|
|
@@ -8858,16 +8858,16 @@ var vm = function(e) {
|
|
|
8858
8858
|
}
|
|
8859
8859
|
e.setResult(t).exit();
|
|
8860
8860
|
};
|
|
8861
|
-
|
|
8862
|
-
var
|
|
8861
|
+
ym.filterName = "arraysCollectChildren";
|
|
8862
|
+
var bm = function(e) {
|
|
8863
8863
|
if (!e.nested) {
|
|
8864
8864
|
let t = e.delta;
|
|
8865
|
-
if (t[2] ===
|
|
8865
|
+
if (t[2] === pm) {
|
|
8866
8866
|
let n = t;
|
|
8867
8867
|
e.newName = `_${n[1]}`, e.setResult([
|
|
8868
8868
|
n[0],
|
|
8869
8869
|
Number.parseInt(e.childName.substring(1), 10),
|
|
8870
|
-
|
|
8870
|
+
pm
|
|
8871
8871
|
]).exit();
|
|
8872
8872
|
}
|
|
8873
8873
|
return;
|
|
@@ -8877,20 +8877,20 @@ var ym = function(e) {
|
|
|
8877
8877
|
let n = t;
|
|
8878
8878
|
for (let t in n) {
|
|
8879
8879
|
if (t === "_t") continue;
|
|
8880
|
-
let r = new
|
|
8880
|
+
let r = new om(n[t]);
|
|
8881
8881
|
e.push(r, t);
|
|
8882
8882
|
}
|
|
8883
8883
|
e.exit();
|
|
8884
8884
|
};
|
|
8885
|
-
|
|
8886
|
-
var
|
|
8885
|
+
bm.filterName = "arrays";
|
|
8886
|
+
var xm = (e, t, n) => {
|
|
8887
8887
|
if (typeof t == "string" && t[0] === "_") return Number.parseInt(t.substring(1), 10);
|
|
8888
8888
|
if (Array.isArray(n) && n[2] === 0) return `_${t}`;
|
|
8889
8889
|
let r = +t;
|
|
8890
8890
|
for (let n in e) {
|
|
8891
8891
|
let i = e[n];
|
|
8892
8892
|
if (Array.isArray(i)) {
|
|
8893
|
-
if (i[2] ===
|
|
8893
|
+
if (i[2] === pm) {
|
|
8894
8894
|
let e = Number.parseInt(n.substring(1), 10), a = i[1];
|
|
8895
8895
|
if (a === +t) return e;
|
|
8896
8896
|
e <= r && a > r ? r++ : e >= r && a < r && r--;
|
|
@@ -8898,7 +8898,7 @@ var bm = (e, t, n) => {
|
|
|
8898
8898
|
}
|
|
8899
8899
|
}
|
|
8900
8900
|
return r;
|
|
8901
|
-
},
|
|
8901
|
+
}, Sm = (e) => {
|
|
8902
8902
|
if (!e || !e.children) return;
|
|
8903
8903
|
let t = e.delta;
|
|
8904
8904
|
if (t._t !== "a") return;
|
|
@@ -8909,22 +8909,22 @@ var bm = (e, t, n) => {
|
|
|
8909
8909
|
let a = r.newName;
|
|
8910
8910
|
if (a === void 0) {
|
|
8911
8911
|
if (r.childName === void 0) throw Error("child.childName is undefined");
|
|
8912
|
-
a =
|
|
8912
|
+
a = xm(n, r.childName, r.result);
|
|
8913
8913
|
}
|
|
8914
8914
|
i[a] !== r.result && (i[a] = r.result);
|
|
8915
8915
|
}
|
|
8916
8916
|
e.setResult(i).exit();
|
|
8917
8917
|
};
|
|
8918
|
-
|
|
8918
|
+
Sm.filterName = "arraysCollectChildren";
|
|
8919
8919
|
//#endregion
|
|
8920
8920
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/dates.js
|
|
8921
|
-
var
|
|
8921
|
+
var Cm = function(e) {
|
|
8922
8922
|
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();
|
|
8923
8923
|
};
|
|
8924
|
-
|
|
8924
|
+
Cm.filterName = "dates";
|
|
8925
8925
|
//#endregion
|
|
8926
8926
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/nested.js
|
|
8927
|
-
var
|
|
8927
|
+
var wm = /* @__PURE__ */ new Set(["__proto__"]), Tm = (e) => {
|
|
8928
8928
|
if (!e || !e.children) return;
|
|
8929
8929
|
let t = e.children.length, n = e.result;
|
|
8930
8930
|
for (let r = 0; r < t; r++) {
|
|
@@ -8936,18 +8936,18 @@ var Cm = /* @__PURE__ */ new Set(["__proto__"]), wm = (e) => {
|
|
|
8936
8936
|
}
|
|
8937
8937
|
n && e.leftIsArray && (n._t = "a"), e.setResult(n).exit();
|
|
8938
8938
|
};
|
|
8939
|
-
|
|
8940
|
-
var
|
|
8939
|
+
Tm.filterName = "collectChildren";
|
|
8940
|
+
var Em = (e) => {
|
|
8941
8941
|
var t;
|
|
8942
8942
|
if (e.leftIsArray || e.leftType !== "object") return;
|
|
8943
8943
|
let n = e.left, r = e.right, i = (t = e.options) == null ? void 0 : t.propertyFilter;
|
|
8944
8944
|
for (let t in n) {
|
|
8945
8945
|
if (!Object.prototype.hasOwnProperty.call(n, t) || i && !i(t, e)) continue;
|
|
8946
|
-
let a = new
|
|
8946
|
+
let a = new im(n[t], r[t]);
|
|
8947
8947
|
e.push(a, t);
|
|
8948
8948
|
}
|
|
8949
8949
|
for (let t in r) if (Object.prototype.hasOwnProperty.call(r, t) && !(i && !i(t, e)) && n[t] === void 0) {
|
|
8950
|
-
let n = new
|
|
8950
|
+
let n = new im(void 0, r[t]);
|
|
8951
8951
|
e.push(n, t);
|
|
8952
8952
|
}
|
|
8953
8953
|
if (!e.children || e.children.length === 0) {
|
|
@@ -8956,15 +8956,15 @@ var Tm = (e) => {
|
|
|
8956
8956
|
}
|
|
8957
8957
|
e.exit();
|
|
8958
8958
|
};
|
|
8959
|
-
|
|
8960
|
-
var
|
|
8959
|
+
Em.filterName = "objects";
|
|
8960
|
+
var Dm = function(e) {
|
|
8961
8961
|
if (!e.nested) return;
|
|
8962
8962
|
let t = e.delta;
|
|
8963
8963
|
if (t._t) return;
|
|
8964
8964
|
let n = t, r = !1;
|
|
8965
8965
|
for (let t in n) {
|
|
8966
|
-
if (
|
|
8967
|
-
let i = e.left, a = new
|
|
8966
|
+
if (wm.has(t) || !Object.prototype.hasOwnProperty.call(n, t)) continue;
|
|
8967
|
+
let i = e.left, a = new am(typeof i == "object" && i && Object.prototype.hasOwnProperty.call(i, t) ? i[t] : void 0, n[t]);
|
|
8968
8968
|
e.push(a, t), r = !0;
|
|
8969
8969
|
}
|
|
8970
8970
|
if (!r) {
|
|
@@ -8973,8 +8973,8 @@ var Em = function(e) {
|
|
|
8973
8973
|
}
|
|
8974
8974
|
e.exit();
|
|
8975
8975
|
};
|
|
8976
|
-
|
|
8977
|
-
var
|
|
8976
|
+
Dm.filterName = "objects";
|
|
8977
|
+
var Om = function(e) {
|
|
8978
8978
|
if (!e || !e.children || e.delta._t) return;
|
|
8979
8979
|
if (e.left === null || typeof e.left != "object") {
|
|
8980
8980
|
e.setResult(e.left).exit();
|
|
@@ -8985,17 +8985,17 @@ var Dm = function(e) {
|
|
|
8985
8985
|
let n = e.children[r];
|
|
8986
8986
|
if (n === void 0) continue;
|
|
8987
8987
|
let i = n.childName;
|
|
8988
|
-
|
|
8988
|
+
wm.has(i) || (Object.prototype.hasOwnProperty.call(e.left, i) && n.result === void 0 ? delete t[i] : t[i] !== n.result && (t[i] = n.result));
|
|
8989
8989
|
}
|
|
8990
8990
|
e.setResult(t).exit();
|
|
8991
8991
|
};
|
|
8992
|
-
|
|
8993
|
-
var
|
|
8992
|
+
Om.filterName = "collectChildren";
|
|
8993
|
+
var km = function(e) {
|
|
8994
8994
|
if (!e.nested || e.delta._t) return;
|
|
8995
8995
|
let t = e.delta, n = !1;
|
|
8996
8996
|
for (let r in t) {
|
|
8997
|
-
if (
|
|
8998
|
-
let i = new
|
|
8997
|
+
if (wm.has(r) || !Object.prototype.hasOwnProperty.call(t, r)) continue;
|
|
8998
|
+
let i = new om(t[r]);
|
|
8999
8999
|
e.push(i, r), n = !0;
|
|
9000
9000
|
}
|
|
9001
9001
|
if (!n) {
|
|
@@ -9004,25 +9004,25 @@ var Om = function(e) {
|
|
|
9004
9004
|
}
|
|
9005
9005
|
e.exit();
|
|
9006
9006
|
};
|
|
9007
|
-
|
|
9008
|
-
var
|
|
9007
|
+
km.filterName = "objects";
|
|
9008
|
+
var Am = (e) => {
|
|
9009
9009
|
if (!e || !e.children || e.delta._t) return;
|
|
9010
9010
|
let t = e.children.length, n = {};
|
|
9011
9011
|
for (let r = 0; r < t; r++) {
|
|
9012
9012
|
let t = e.children[r];
|
|
9013
9013
|
if (t === void 0) continue;
|
|
9014
9014
|
let i = t.childName;
|
|
9015
|
-
|
|
9015
|
+
wm.has(i) || n[i] !== t.result && (n[i] = t.result);
|
|
9016
9016
|
}
|
|
9017
9017
|
e.setResult(n).exit();
|
|
9018
9018
|
};
|
|
9019
|
-
|
|
9019
|
+
Am.filterName = "collectChildren";
|
|
9020
9020
|
//#endregion
|
|
9021
9021
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/texts.js
|
|
9022
|
-
var
|
|
9023
|
-
function
|
|
9022
|
+
var jm = 2, Mm = 60, Nm = null;
|
|
9023
|
+
function Pm(e, t) {
|
|
9024
9024
|
var n;
|
|
9025
|
-
if (!
|
|
9025
|
+
if (!Nm) {
|
|
9026
9026
|
let r;
|
|
9027
9027
|
if ((n = e == null ? void 0 : e.textDiff) != null && n.diffMatchPatch) r = new e.textDiff.diffMatchPatch();
|
|
9028
9028
|
else {
|
|
@@ -9030,7 +9030,7 @@ function Nm(e, t) {
|
|
|
9030
9030
|
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.");
|
|
9031
9031
|
throw e.diff_match_patch_not_found = !0, e;
|
|
9032
9032
|
}
|
|
9033
|
-
|
|
9033
|
+
Nm = {
|
|
9034
9034
|
diff: (e, t) => r.patch_toText(r.patch_make(e, t)),
|
|
9035
9035
|
patch: (e, t) => {
|
|
9036
9036
|
let n = r.patch_apply(r.patch_fromText(t), e);
|
|
@@ -9042,17 +9042,17 @@ function Nm(e, t) {
|
|
|
9042
9042
|
}
|
|
9043
9043
|
};
|
|
9044
9044
|
}
|
|
9045
|
-
return
|
|
9045
|
+
return Nm;
|
|
9046
9046
|
}
|
|
9047
|
-
var
|
|
9047
|
+
var Fm = function(e) {
|
|
9048
9048
|
var t, n;
|
|
9049
9049
|
if (e.leftType !== "string") return;
|
|
9050
|
-
let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) ||
|
|
9050
|
+
let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) || Mm;
|
|
9051
9051
|
if (r.length < a || i.length < a) {
|
|
9052
9052
|
e.setResult([r, i]).exit();
|
|
9053
9053
|
return;
|
|
9054
9054
|
}
|
|
9055
|
-
let o =
|
|
9055
|
+
let o = Pm(e.options);
|
|
9056
9056
|
if (!o) {
|
|
9057
9057
|
e.setResult([r, i]).exit();
|
|
9058
9058
|
return;
|
|
@@ -9061,19 +9061,19 @@ var Pm = function(e) {
|
|
|
9061
9061
|
e.setResult([
|
|
9062
9062
|
s(r, i),
|
|
9063
9063
|
0,
|
|
9064
|
-
|
|
9064
|
+
jm
|
|
9065
9065
|
]).exit();
|
|
9066
9066
|
};
|
|
9067
|
-
|
|
9068
|
-
var
|
|
9067
|
+
Fm.filterName = "texts";
|
|
9068
|
+
var Im = function(e) {
|
|
9069
9069
|
if (e.nested) return;
|
|
9070
9070
|
let t = e.delta;
|
|
9071
|
-
if (t[2] !==
|
|
9072
|
-
let n = t, r =
|
|
9071
|
+
if (t[2] !== jm) return;
|
|
9072
|
+
let n = t, r = Pm(e.options, !0).patch;
|
|
9073
9073
|
e.setResult(r(e.left, n[0])).exit();
|
|
9074
9074
|
};
|
|
9075
|
-
|
|
9076
|
-
var
|
|
9075
|
+
Im.filterName = "texts";
|
|
9076
|
+
var Lm = (e) => {
|
|
9077
9077
|
var t, n, r;
|
|
9078
9078
|
let i = /^@@ +-(\d+),(\d+) +\+(\d+),(\d+) +@@$/, a = e.split("\n");
|
|
9079
9079
|
for (let e = 0; e < a.length; e++) {
|
|
@@ -9094,21 +9094,21 @@ var Im = (e) => {
|
|
|
9094
9094
|
} else s === "-" && (a[e] = `+${(r = a[e]) == null ? void 0 : r.slice(1)}`);
|
|
9095
9095
|
}
|
|
9096
9096
|
return a.join("\n");
|
|
9097
|
-
},
|
|
9097
|
+
}, Rm = function(e) {
|
|
9098
9098
|
if (e.nested) return;
|
|
9099
9099
|
let t = e.delta;
|
|
9100
|
-
if (t[2] !==
|
|
9100
|
+
if (t[2] !== jm) return;
|
|
9101
9101
|
let n = t;
|
|
9102
9102
|
e.setResult([
|
|
9103
|
-
|
|
9103
|
+
Lm(n[0]),
|
|
9104
9104
|
0,
|
|
9105
|
-
|
|
9105
|
+
jm
|
|
9106
9106
|
]).exit();
|
|
9107
9107
|
};
|
|
9108
|
-
|
|
9108
|
+
Rm.filterName = "texts";
|
|
9109
9109
|
//#endregion
|
|
9110
9110
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/trivial.js
|
|
9111
|
-
var
|
|
9111
|
+
var zm = function(e) {
|
|
9112
9112
|
if (e.left === e.right) {
|
|
9113
9113
|
e.setResult(void 0).exit();
|
|
9114
9114
|
return;
|
|
@@ -9141,8 +9141,8 @@ var Rm = function(e) {
|
|
|
9141
9141
|
}
|
|
9142
9142
|
e.left instanceof RegExp && (e.right instanceof RegExp ? e.setResult([e.left.toString(), e.right.toString()]).exit() : e.setResult([e.left, e.right]).exit());
|
|
9143
9143
|
};
|
|
9144
|
-
|
|
9145
|
-
var
|
|
9144
|
+
zm.filterName = "trivial";
|
|
9145
|
+
var Bm = function(e) {
|
|
9146
9146
|
if (e.delta === void 0) {
|
|
9147
9147
|
e.setResult(e.left).exit();
|
|
9148
9148
|
return;
|
|
@@ -9166,8 +9166,8 @@ var zm = function(e) {
|
|
|
9166
9166
|
}
|
|
9167
9167
|
t.length === 3 && t[2] === 0 && e.setResult(void 0).exit();
|
|
9168
9168
|
};
|
|
9169
|
-
|
|
9170
|
-
var
|
|
9169
|
+
Bm.filterName = "trivial";
|
|
9170
|
+
var Vm = function(e) {
|
|
9171
9171
|
if (e.delta === void 0) {
|
|
9172
9172
|
e.setResult(e.delta).exit();
|
|
9173
9173
|
return;
|
|
@@ -9188,36 +9188,36 @@ var Bm = function(e) {
|
|
|
9188
9188
|
}
|
|
9189
9189
|
t.length === 3 && t[2] === 0 && e.setResult([t[0]]).exit();
|
|
9190
9190
|
};
|
|
9191
|
-
|
|
9191
|
+
Vm.filterName = "trivial";
|
|
9192
9192
|
//#endregion
|
|
9193
9193
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/diffpatcher.js
|
|
9194
|
-
var
|
|
9194
|
+
var Hm = class {
|
|
9195
9195
|
constructor(e) {
|
|
9196
|
-
this.processor = new
|
|
9196
|
+
this.processor = new cm(e), this.processor.pipe(new sm("diff").append(Tm, zm, Cm, Fm, Em, gm).shouldHaveResult()), this.processor.pipe(new sm("patch").append(Om, ym, Bm, Im, Dm, vm).shouldHaveResult()), this.processor.pipe(new sm("reverse").append(Am, Sm, Vm, Rm, km, bm).shouldHaveResult());
|
|
9197
9197
|
}
|
|
9198
9198
|
options(e) {
|
|
9199
9199
|
return this.processor.options(e);
|
|
9200
9200
|
}
|
|
9201
9201
|
diff(e, t) {
|
|
9202
|
-
return this.processor.process(new
|
|
9202
|
+
return this.processor.process(new im(e, t));
|
|
9203
9203
|
}
|
|
9204
9204
|
patch(e, t) {
|
|
9205
|
-
return this.processor.process(new
|
|
9205
|
+
return this.processor.process(new am(e, t));
|
|
9206
9206
|
}
|
|
9207
9207
|
reverse(e) {
|
|
9208
|
-
return this.processor.process(new
|
|
9208
|
+
return this.processor.process(new om(e));
|
|
9209
9209
|
}
|
|
9210
9210
|
unpatch(e, t) {
|
|
9211
9211
|
return this.patch(e, this.reverse(t));
|
|
9212
9212
|
}
|
|
9213
9213
|
clone(e) {
|
|
9214
|
-
return
|
|
9214
|
+
return em(e);
|
|
9215
9215
|
}
|
|
9216
9216
|
};
|
|
9217
9217
|
//#endregion
|
|
9218
9218
|
//#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/index.js
|
|
9219
|
-
function
|
|
9220
|
-
return new
|
|
9219
|
+
function Um(e) {
|
|
9220
|
+
return new Hm(e);
|
|
9221
9221
|
}
|
|
9222
9222
|
//#endregion
|
|
9223
9223
|
//#region node_modules/.pnpm/@dmsnell+diff-match-patch@1.1.0/node_modules/@dmsnell/diff-match-patch/index.js
|
|
@@ -9779,46 +9779,46 @@ $.Diff = function(e, t) {
|
|
|
9779
9779
|
};
|
|
9780
9780
|
//#endregion
|
|
9781
9781
|
//#region src/components/audit-log/create-diff-patcher.tsx
|
|
9782
|
-
var
|
|
9782
|
+
var Wm = (e = {}) => Um({
|
|
9783
9783
|
...e,
|
|
9784
9784
|
textDiff: {
|
|
9785
9785
|
diffMatchPatch: $,
|
|
9786
9786
|
minLength: 120
|
|
9787
9787
|
},
|
|
9788
9788
|
cloneDiffValues: !0
|
|
9789
|
-
}),
|
|
9789
|
+
}), Gm = ["user", "unittemplate"], Km = Wm(), qm = (e, t, n) => {
|
|
9790
9790
|
let r = Object.fromEntries(e.map((e) => [e.sectionKey, e.sectionLabel]));
|
|
9791
9791
|
for (let e = t.length - 1; e >= 0; e--) {
|
|
9792
9792
|
let n = r[t[e]];
|
|
9793
9793
|
if (n) return n;
|
|
9794
9794
|
}
|
|
9795
9795
|
return n || "";
|
|
9796
|
-
},
|
|
9796
|
+
}, Jm = (e) => {
|
|
9797
9797
|
let t = (e) => vr(e) ? Ar(e) : String(e);
|
|
9798
9798
|
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);
|
|
9799
|
-
},
|
|
9799
|
+
}, Ym = (e) => {
|
|
9800
9800
|
switch (e.length) {
|
|
9801
9801
|
case 1: {
|
|
9802
9802
|
let [t] = e;
|
|
9803
9803
|
return {
|
|
9804
9804
|
type: "created",
|
|
9805
9805
|
before: "",
|
|
9806
|
-
after:
|
|
9806
|
+
after: Jm(t)
|
|
9807
9807
|
};
|
|
9808
9808
|
}
|
|
9809
9809
|
case 2: {
|
|
9810
9810
|
let [t, n] = e;
|
|
9811
9811
|
return {
|
|
9812
9812
|
type: "modified",
|
|
9813
|
-
before:
|
|
9814
|
-
after:
|
|
9813
|
+
before: Jm(t),
|
|
9814
|
+
after: Jm(n)
|
|
9815
9815
|
};
|
|
9816
9816
|
}
|
|
9817
9817
|
case 3: {
|
|
9818
9818
|
let [t] = e;
|
|
9819
9819
|
return {
|
|
9820
9820
|
type: "deleted",
|
|
9821
|
-
before:
|
|
9821
|
+
before: Jm(t),
|
|
9822
9822
|
after: ""
|
|
9823
9823
|
};
|
|
9824
9824
|
}
|
|
@@ -9828,15 +9828,15 @@ var Um = (e = {}) => Hm({
|
|
|
9828
9828
|
after: ""
|
|
9829
9829
|
};
|
|
9830
9830
|
}
|
|
9831
|
-
},
|
|
9832
|
-
let r =
|
|
9831
|
+
}, Xm = (e) => Array.isArray(e), Zm = (e, t) => t ? Xm(t) ? t.length === 0 ? e : t.reduce((e, t) => Km.unpatch(nn(e), nn(t)), nn(e)) : Km.unpatch(nn(e), nn(t)) : e, Qm = (e) => e.createdAt || e.date, $m = (e, t, n) => {
|
|
9832
|
+
let r = Qm(e);
|
|
9833
9833
|
if (!r) return {
|
|
9834
9834
|
oldJson: "",
|
|
9835
9835
|
newJson: "",
|
|
9836
9836
|
error: `Cannot create comparison view: missing date for audit log ${e.id}`
|
|
9837
9837
|
};
|
|
9838
9838
|
let i = t.filter((e) => {
|
|
9839
|
-
let t =
|
|
9839
|
+
let t = Qm(e);
|
|
9840
9840
|
return !!(e.diffs && t && t >= r);
|
|
9841
9841
|
}), a = Array.from({ length: i.length + 1 });
|
|
9842
9842
|
a[0] = nn(n);
|
|
@@ -9849,7 +9849,7 @@ var Um = (e = {}) => Hm({
|
|
|
9849
9849
|
a[e + 1] = a[e];
|
|
9850
9850
|
continue;
|
|
9851
9851
|
}
|
|
9852
|
-
a[e + 1] =
|
|
9852
|
+
a[e + 1] = Zm(a[e], t);
|
|
9853
9853
|
}
|
|
9854
9854
|
let e = i.length > 0 ? a[i.length - 1] : n, t = i.length > 0 ? a[i.length] : n;
|
|
9855
9855
|
o = JSON.stringify(t == null ? "" : t, null, 2), s = JSON.stringify(e == null ? "" : e, null, 2);
|
|
@@ -9864,10 +9864,10 @@ var Um = (e = {}) => Hm({
|
|
|
9864
9864
|
oldJson: o,
|
|
9865
9865
|
newJson: s
|
|
9866
9866
|
};
|
|
9867
|
-
},
|
|
9867
|
+
}, eh = (e, t, n = {}, r = []) => {
|
|
9868
9868
|
var i;
|
|
9869
9869
|
if (!e) return;
|
|
9870
|
-
let a = [...
|
|
9870
|
+
let a = [...Gm, ...(i = n.hiddenKeys) == null ? [] : i];
|
|
9871
9871
|
Object.keys(e).forEach((i) => {
|
|
9872
9872
|
var o;
|
|
9873
9873
|
let s = e[i];
|
|
@@ -9880,12 +9880,12 @@ var Um = (e = {}) => Hm({
|
|
|
9880
9880
|
cn(s) ? t.push({
|
|
9881
9881
|
deltaFormat: [...s],
|
|
9882
9882
|
path: c
|
|
9883
|
-
}) : gn(s) &&
|
|
9883
|
+
}) : gn(s) && eh(s, t, n, c);
|
|
9884
9884
|
});
|
|
9885
|
-
},
|
|
9885
|
+
}, th = (e, t = {}) => {
|
|
9886
9886
|
let n = [];
|
|
9887
|
-
return e ? (
|
|
9888
|
-
},
|
|
9887
|
+
return e ? (eh(e, n, t), n) : [];
|
|
9888
|
+
}, nh = (e) => e.replace(/\[\d+\]/g, "").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]/g, " ").replace(/\s+/g, " ").trim().replace(/^./, (e) => e.toUpperCase()), rh = (e) => {
|
|
9889
9889
|
if (e == null || e === "") return "empty";
|
|
9890
9890
|
if (typeof e == "boolean") return e ? "true" : "false";
|
|
9891
9891
|
if (typeof e == "string") return e;
|
|
@@ -9896,27 +9896,27 @@ var Um = (e = {}) => Hm({
|
|
|
9896
9896
|
} catch {
|
|
9897
9897
|
return String(e);
|
|
9898
9898
|
}
|
|
9899
|
-
},
|
|
9899
|
+
}, ih = (e, t = e.length - 1) => {
|
|
9900
9900
|
if (t >= e.length) return "Value";
|
|
9901
9901
|
let n = e[t];
|
|
9902
|
-
return !n || hr(n) ?
|
|
9903
|
-
},
|
|
9904
|
-
let o =
|
|
9902
|
+
return !n || hr(n) ? ih(e, t - 1) : nh(n);
|
|
9903
|
+
}, ah = ({ userName: e, type: t, property: n, before: r, after: i, sectionName: a }) => {
|
|
9904
|
+
let o = rh(r), s = rh(i), c = a ? ` in ${a}` : "";
|
|
9905
9905
|
switch (t) {
|
|
9906
9906
|
case "modified": return `${e} updated ${n} from ${o} to ${s}${c}.`;
|
|
9907
9907
|
case "created": return `${e} created ${s}${c}.`;
|
|
9908
9908
|
case "deleted": return `${e} deleted ${o}${c}.`;
|
|
9909
9909
|
default: return `${e} changed ${n}${c}.`;
|
|
9910
9910
|
}
|
|
9911
|
-
},
|
|
9911
|
+
}, oh = ({ sectionNames: e, userName: t, diffs: n, defaultSectionName: r }) => {
|
|
9912
9912
|
let i = {
|
|
9913
9913
|
headers: [{ cells: [{ value: "Changes" }] }],
|
|
9914
9914
|
rows: n.map((n) => {
|
|
9915
|
-
let { deltaFormat: i, path: a } = n, o =
|
|
9916
|
-
return { cells: [{ value:
|
|
9915
|
+
let { deltaFormat: i, path: a } = n, o = qm(e, a, r), { type: s, before: c, after: l } = Ym(i);
|
|
9916
|
+
return { cells: [{ value: ah({
|
|
9917
9917
|
userName: t,
|
|
9918
9918
|
type: s,
|
|
9919
|
-
property:
|
|
9919
|
+
property: ih(a),
|
|
9920
9920
|
before: c,
|
|
9921
9921
|
after: l,
|
|
9922
9922
|
sectionName: o
|
|
@@ -9924,7 +9924,7 @@ var Um = (e = {}) => Hm({
|
|
|
9924
9924
|
})
|
|
9925
9925
|
};
|
|
9926
9926
|
return /* @__PURE__ */ S(nu, { table: i });
|
|
9927
|
-
},
|
|
9927
|
+
}, sh = Object.freeze({
|
|
9928
9928
|
summary: {
|
|
9929
9929
|
label: "Summary",
|
|
9930
9930
|
value: "summary"
|
|
@@ -9933,13 +9933,13 @@ var Um = (e = {}) => Hm({
|
|
|
9933
9933
|
label: "Compare",
|
|
9934
9934
|
value: "compare"
|
|
9935
9935
|
}
|
|
9936
|
-
}),
|
|
9937
|
-
let c = [
|
|
9936
|
+
}), ch = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, transformDiffsConfig: i, sectionNames: a, defaultSectionName: o, onClose: s }) => {
|
|
9937
|
+
let c = [sh.summary, sh.compare].map(({ label: e, value: t }) => ({
|
|
9938
9938
|
label: e,
|
|
9939
9939
|
value: t
|
|
9940
9940
|
})), [l, u] = v(c[0]), { diffs: d = void 0 } = e || {};
|
|
9941
9941
|
if (!d) return null;
|
|
9942
|
-
let { oldJson: f, newJson: p, error: m } =
|
|
9942
|
+
let { oldJson: f, newJson: p, error: m } = $m(e, t, n);
|
|
9943
9943
|
return /* @__PURE__ */ S(Es, {
|
|
9944
9944
|
visible: r,
|
|
9945
9945
|
centered: !0,
|
|
@@ -9952,10 +9952,10 @@ var Um = (e = {}) => Hm({
|
|
|
9952
9952
|
onChange: (e) => u(c.find((t) => t.value === e.target.value)),
|
|
9953
9953
|
options: c,
|
|
9954
9954
|
value: l
|
|
9955
|
-
}), l.value === "summary" ? /* @__PURE__ */ S(
|
|
9955
|
+
}), l.value === "summary" ? /* @__PURE__ */ S(oh, {
|
|
9956
9956
|
userName: e.userName,
|
|
9957
9957
|
sectionNames: a,
|
|
9958
|
-
diffs:
|
|
9958
|
+
diffs: th(d, i),
|
|
9959
9959
|
defaultSectionName: o
|
|
9960
9960
|
}) : m ? /* @__PURE__ */ S("div", {
|
|
9961
9961
|
style: { padding: 16 },
|
|
@@ -9973,7 +9973,7 @@ var Um = (e = {}) => Hm({
|
|
|
9973
9973
|
height: "90vh"
|
|
9974
9974
|
} })
|
|
9975
9975
|
});
|
|
9976
|
-
},
|
|
9976
|
+
}, lh = [
|
|
9977
9977
|
{
|
|
9978
9978
|
label: "10 / page",
|
|
9979
9979
|
value: 10
|
|
@@ -9986,8 +9986,8 @@ var Um = (e = {}) => Hm({
|
|
|
9986
9986
|
label: "50 / page",
|
|
9987
9987
|
value: 50
|
|
9988
9988
|
}
|
|
9989
|
-
],
|
|
9990
|
-
let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s =
|
|
9989
|
+
], uh = (e, t = {}) => {
|
|
9990
|
+
let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s = th(n, t).length, c = s ? `${s} change${s === 1 ? "" : "s"}` : "no field changes";
|
|
9991
9991
|
if (i === "API" && !r) return a === "Created" ? "Created through API" : "Changed through API";
|
|
9992
9992
|
switch (a) {
|
|
9993
9993
|
case "Created": return `Created by ${r}`;
|
|
@@ -9997,7 +9997,7 @@ var Um = (e = {}) => Hm({
|
|
|
9997
9997
|
case "Updated": return `Updated by ${r} (${c})`;
|
|
9998
9998
|
default: return `Change by ${r}`;
|
|
9999
9999
|
}
|
|
10000
|
-
},
|
|
10000
|
+
}, dh = ({ 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 }) => {
|
|
10001
10001
|
let [g, _] = v(!1), [y, b] = v(null), w = (e) => {
|
|
10002
10002
|
if (e.snapshot) {
|
|
10003
10003
|
f == null || f(e.snapshot, e);
|
|
@@ -10016,7 +10016,7 @@ var Um = (e = {}) => Hm({
|
|
|
10016
10016
|
return {
|
|
10017
10017
|
cells: [
|
|
10018
10018
|
{
|
|
10019
|
-
value: e.snapshot ? `Snapshot: ${e.snapshot}` :
|
|
10019
|
+
value: e.snapshot ? `Snapshot: ${e.snapshot}` : uh(e, l),
|
|
10020
10020
|
type: "Link",
|
|
10021
10021
|
disabled: n,
|
|
10022
10022
|
onClick: n ? void 0 : () => w(e),
|
|
@@ -10035,8 +10035,8 @@ var Um = (e = {}) => Hm({
|
|
|
10035
10035
|
type: "Static"
|
|
10036
10036
|
},
|
|
10037
10037
|
{
|
|
10038
|
-
value:
|
|
10039
|
-
date:
|
|
10038
|
+
value: Qp({
|
|
10039
|
+
date: Qm(e),
|
|
10040
10040
|
showTime: !0
|
|
10041
10041
|
}),
|
|
10042
10042
|
type: "Static"
|
|
@@ -10079,14 +10079,14 @@ var Um = (e = {}) => Hm({
|
|
|
10079
10079
|
onChange: (e) => {
|
|
10080
10080
|
u(Number(e.target.value));
|
|
10081
10081
|
},
|
|
10082
|
-
options:
|
|
10082
|
+
options: lh,
|
|
10083
10083
|
value: a
|
|
10084
10084
|
},
|
|
10085
10085
|
onSelectPage: (e) => d(e),
|
|
10086
10086
|
small: !0
|
|
10087
10087
|
} }
|
|
10088
10088
|
} })
|
|
10089
|
-
}), g && y && y.diffs && /* @__PURE__ */ S(
|
|
10089
|
+
}), g && y && y.diffs && /* @__PURE__ */ S(ch, {
|
|
10090
10090
|
sectionNames: o,
|
|
10091
10091
|
isOpen: g,
|
|
10092
10092
|
onClose: () => _(!1),
|
|
@@ -10096,7 +10096,7 @@ var Um = (e = {}) => Hm({
|
|
|
10096
10096
|
data: t,
|
|
10097
10097
|
transformDiffsConfig: l
|
|
10098
10098
|
})] });
|
|
10099
|
-
},
|
|
10099
|
+
}, fh = ({ pathName: e, moduleName: t, onNavigate: n, onStartTimingEvent: r }) => {
|
|
10100
10100
|
let i = window.location.href, a = _(i);
|
|
10101
10101
|
return d(() => {
|
|
10102
10102
|
a.current = i;
|
|
@@ -10119,20 +10119,20 @@ var Um = (e = {}) => Hm({
|
|
|
10119
10119
|
});
|
|
10120
10120
|
};
|
|
10121
10121
|
}, [e, t]), null;
|
|
10122
|
-
},
|
|
10122
|
+
}, ph = {
|
|
10123
10123
|
errorBoundary: "_errorBoundary_hmco0_1",
|
|
10124
10124
|
sidebarErrorBoundary: "_sidebarErrorBoundary_hmco0_5",
|
|
10125
10125
|
rightSidebarErrorBoundary: "_rightSidebarErrorBoundary_hmco0_6"
|
|
10126
|
-
},
|
|
10126
|
+
}, mh = ({ options: e }) => {
|
|
10127
10127
|
let { ErrorComponent: t, isSideBar: n, isRightSideBar: r, isPage: i, style: a } = e == null ? {} : e, { translations: o } = Ap();
|
|
10128
10128
|
if (t) return /* @__PURE__ */ S(t, {});
|
|
10129
10129
|
if (n || r) return /* @__PURE__ */ S("div", {
|
|
10130
|
-
className: b(n ?
|
|
10130
|
+
className: b(n ? ph.sidebarErrorBoundary : "", r ? ph.rightSidebarErrorBoundary : ""),
|
|
10131
10131
|
style: a,
|
|
10132
10132
|
children: o == null ? void 0 : o.unexpectedError
|
|
10133
10133
|
});
|
|
10134
10134
|
let s = /* @__PURE__ */ S("div", {
|
|
10135
|
-
className:
|
|
10135
|
+
className: ph.errorBoundary,
|
|
10136
10136
|
style: a,
|
|
10137
10137
|
children: /* @__PURE__ */ S(Ks, { message: {
|
|
10138
10138
|
icon: !0,
|
|
@@ -10147,19 +10147,19 @@ var Um = (e = {}) => Hm({
|
|
|
10147
10147
|
padding: 0,
|
|
10148
10148
|
children: s
|
|
10149
10149
|
}) : s;
|
|
10150
|
-
},
|
|
10151
|
-
fallback: /* @__PURE__ */ S(
|
|
10150
|
+
}, hh = ({ children: e, options: t }) => /* @__PURE__ */ S(wi.ErrorBoundary, {
|
|
10151
|
+
fallback: /* @__PURE__ */ S(mh, { options: t }),
|
|
10152
10152
|
onError: (e, t) => {
|
|
10153
10153
|
console.error("Error caught by boundary:", e, t);
|
|
10154
10154
|
},
|
|
10155
10155
|
children: e
|
|
10156
|
-
}),
|
|
10156
|
+
}), gh = (e, t = {}) => (n) => /* @__PURE__ */ S(hh, {
|
|
10157
10157
|
options: t,
|
|
10158
10158
|
children: /* @__PURE__ */ S(e, { ...n })
|
|
10159
|
-
}),
|
|
10159
|
+
}), _h = (e = {}) => (t) => gh(t, e), vh = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null, yh = (e) => {
|
|
10160
10160
|
jp(Ep.LanguageKey, e.languageKey), Object.entries(e).forEach(([e, t]) => {
|
|
10161
|
-
e === Ep.Translations ? jp(e, Op(t)) : jp(e,
|
|
10161
|
+
e === Ep.Translations ? jp(e, Op(t)) : jp(e, vh(t) ? t : { ...t });
|
|
10162
10162
|
});
|
|
10163
10163
|
};
|
|
10164
10164
|
//#endregion
|
|
10165
|
-
export { Yi as Accordion, _a as AccordionWithDefaultToggle, po as Actions, Di as Align,
|
|
10165
|
+
export { Yi as Accordion, _a as AccordionWithDefaultToggle, po as Actions, Di as Align, dh as AuditLog, ro as Badge, _o as Breadcrumb, ho as BreadcrumbLinkType, q as Button, yo as ButtonGroup, Oi as ButtonPosition, xa as ButtonType, xo as Card, pa as CheckBox, Ui as Chevron, Ki as Collapse, Ei as Color, Ho as ColorInput, Vo as ColorInputPopover, qo as Column, is as Dialog, Zp as DiffTable, Vp as DiffViewer, W as DisabledContext, Qo as Divider, ds as Drawer, rp as ElementType, pu as Empty, hh as ErrorBoundary, yd as Field, hd as FileButton, xs as FileInput, bd as Flex, Sd as FormRow, Do as Grid, H as GroupOrder, ts as Heading, fa as HelpIcon, G as Icon, U as IconType, gs as Input, ms as InputGroup, cl as InputGroupAddon, vs as InputReaderMethods, ji as InputType, _d as Label, Fd as List, wd as ListHeading, Ad as ListSubheading, Ld as Loader, mf as Mention, uo as Menu, qa as MenuCarat, Ka as MenuType, Ks as Message, Bs as MessageType, Es as Modal, Qs as NativeSelect, xl as NumberInput, Wd as OptionDropdown, Kd as Page, ll as Pagination, lp as PopConfirm, Co as Popover, qd as Portal, Yd as PrintHeader, ks as ProgressBar, Xd as RadioButton, pf as RichTextInput, gf as Row, nl as Select, Lp as SettingField, xf as SideBar, Cf as Skeleton, jl as Slider, Ps as SmartUploadModal, Ss as Spacer, ba as Spinner, nu as Table, md as TableImportExport, Xf as Tabs, Xo as Text, $f as TextArea, Zf as TextLink, ki as TextTransform, Ai as Theme, ri as Toaster, Qu as Toggle, K as Tooltip, op as TopBar, pp as Tree, Tp as TreeTable, Ti as TriggerType, Uf as UnitInput, qf as UnitSlider, Fp as UnitTable, fh as UsageTracker, Yu as dismissToast, Bf as initializeContext, yh as initializeGuiLibrary, ys as readFile, Ju as toast, $s as useFocus, Cs as useKeyboardEvent, nc as useWindowWidth, _h as withChainableErrorBoundary, gh as withErrorBoundary };
|
package/package.json
CHANGED