@oliasoft-open-source/react-ui-library 9.5.1-beta-3 → 9.5.1-beta-4

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.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import { ChangeEvent } from 'react';
2
2
  import { Color as Color_2 } from 'react-aria-components/ColorPicker';
3
+ import { ComponentProps } from 'react';
4
+ import { ComponentType } from 'react';
3
5
  import { Context } from 'react';
4
6
  import { CSSProperties } from 'react';
5
7
  import { default as default_2 } from 'react';
@@ -14,6 +16,7 @@ import { Id } from 'react-toastify';
14
16
  import { JSX } from 'react/jsx-runtime';
15
17
  import { KeyboardEvent as KeyboardEvent_2 } from 'react';
16
18
  import { KeyboardEventHandler } from 'react';
19
+ import { MemoExoticComponent } from 'react';
17
20
  import { MouseEvent as MouseEvent_2 } from 'react';
18
21
  import { MouseEventHandler } from 'react';
19
22
  import { MutableRefObject } from 'react';
@@ -2474,8 +2477,11 @@ declare type ViewType = typeof SPLIT_VIEW | typeof UNIFIED_VIEW;
2474
2477
 
2475
2478
  export declare const widthOfCharacters: (characterCount: number) => string;
2476
2479
 
2477
- export declare const withChainableErrorBoundary: (options?: ErrorBoundaryOptions) => <T extends default_2.JSXElementConstructor<any>>(Component: T) => T;
2480
+ export declare const withChainableErrorBoundary: (options?: ErrorBoundaryOptions) => <P extends object>(Component: ComponentType<P>) => ComponentType<P>;
2478
2481
 
2479
- export declare const withErrorBoundary: <T extends default_2.JSXElementConstructor<any>>(Component: T, options?: ErrorBoundaryOptions) => T;
2482
+ export declare const withErrorBoundary: <T extends ComponentType<any>>(Component: T, options?: ErrorBoundaryOptions) => MemoExoticComponent<{
2483
+ (props: ComponentProps<T>): JSX.Element;
2484
+ displayName: string;
2485
+ }>;
2480
2486
 
2481
2487
  export { }
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) => typeof e == "object" && e && "value" in e ? e.value : e, Kp = (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) => {
8411
8411
  var t;
8412
8412
  if (e.id != null) return String(e.id);
8413
- let n = Gp((t = e.cells) == null || (t = t[0]) == null ? void 0 : t.value);
8413
+ let n = (t = e.cells) == null || (t = t[0]) == null ? void 0 : t.value;
8414
8414
  return n == null ? "" : String(n);
8415
- }, qp = (e, t) => ({
8415
+ }, Kp = (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
- }), Jp = (e, t) => ({
8424
+ }), qp = (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
- }), Yp = (e = [], t = []) => {
8438
+ }), Jp = (e = [], t = []) => {
8439
8439
  let n = /* @__PURE__ */ new 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;
8440
+ for (let e of t) n.set(Gp(e), e);
8441
+ let r = new Set(e.map(Gp)), i = /* @__PURE__ */ new Map(), a = [], o = null;
8442
8442
  for (let e = t.length - 1; e >= 0; e--) {
8443
- let n = t[e], c = Kp(n);
8443
+ let n = t[e], c = Gp(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 = Kp(t), r = i.get(e);
8458
+ let e = Gp(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,9 @@ var Ao = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), jo =
8475
8475
  row: e
8476
8476
  });
8477
8477
  return c;
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
- if (!a) return i.map((e) => e.row);
8481
- }, [a, i]), s = l(({ row: e, rowIndex: t }) => {
8482
- let r = i[t], a = r ? Xp(r) : e;
8478
+ }, Yp = (e) => e.status === "deleted" ? Kp(e.row, Hp) : e.status === "added" ? Kp(e.row, Up) : qp(e.row, e.compareRow), Xp = ({ table: e, compareRows: t, beforeRenderRow: n, ...r }) => {
8479
+ let i = h(() => Jp(e.rows, t), [e.rows, t]), a = l(({ row: e, rowIndex: t }) => {
8480
+ let r = i[t], a = r ? Yp(r) : e;
8483
8481
  return n ? n({
8484
8482
  row: a,
8485
8483
  rowIndex: t
@@ -8487,18 +8485,19 @@ var Ao = (e) => e.replace(/^lch\(\s*(\d+(?:\.\d+)?)(?!%)\s+/, "lch($1% "), jo =
8487
8485
  }, [i, n]);
8488
8486
  return /* @__PURE__ */ S(nu, {
8489
8487
  ...r,
8490
- beforeRenderRow: s,
8488
+ beforeRenderRow: a,
8491
8489
  table: {
8492
8490
  ...e,
8493
- rows: o,
8494
- rowCount: a ? i.length : void 0,
8495
- striped: !1
8491
+ rows: void 0,
8492
+ rowCount: i.length,
8493
+ striped: !1,
8494
+ infiniteScroll: !0
8496
8495
  }
8497
8496
  });
8498
8497
  };
8499
8498
  //#endregion
8500
8499
  //#region src/helpers/date.ts
8501
- function Qp({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i, locale: a }) {
8500
+ function Zp({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i, locale: a }) {
8502
8501
  return e ? new Date(e).toLocaleString(a, {
8503
8502
  year: "numeric",
8504
8503
  month: "short",
@@ -8512,28 +8511,28 @@ function Qp({ date: e, showTime: t, showSeconds: n, timeZone: r, showTimeZone: i
8512
8511
  }
8513
8512
  //#endregion
8514
8513
  //#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/clone.js
8515
- function $p(e) {
8514
+ function Qp(e) {
8516
8515
  var t;
8517
8516
  let n = /^\/(.*)\/([gimyu]*)$/.exec(e.toString());
8518
8517
  if (!n) throw Error("Invalid RegExp");
8519
8518
  return new RegExp((t = n[1]) == null ? "" : t, n[2]);
8520
8519
  }
8521
- function em(e) {
8520
+ function $p(e) {
8522
8521
  if (typeof e != "object") return e;
8523
8522
  if (e === null) return null;
8524
- if (Array.isArray(e)) return e.map(em);
8523
+ if (Array.isArray(e)) return e.map($p);
8525
8524
  if (e instanceof Date) return new Date(e.getTime());
8526
- if (e instanceof RegExp) return $p(e);
8525
+ if (e instanceof RegExp) return Qp(e);
8527
8526
  let t = {};
8528
- for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = em(e[n]));
8527
+ for (let n in e) Object.prototype.hasOwnProperty.call(e, n) && (t[n] = $p(e[n]));
8529
8528
  return t;
8530
8529
  }
8531
8530
  //#endregion
8532
8531
  //#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/assertions/arrays.js
8533
- function tm(e, t) {
8532
+ function em(e, t) {
8534
8533
  if (e.length === 0) throw Error(t || "Expected a non-empty array");
8535
8534
  }
8536
- var nm = (e) => e[e.length - 1], rm = class {
8535
+ var tm = (e) => e[e.length - 1], nm = class {
8537
8536
  setResult(e) {
8538
8537
  return this.result = e, this.hasResult = !0, this;
8539
8538
  }
@@ -8541,16 +8540,16 @@ var nm = (e) => e[e.length - 1], rm = class {
8541
8540
  return this.exiting = !0, this;
8542
8541
  }
8543
8542
  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 ? (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;
8543
+ return e.parent = this, t !== void 0 && (e.childName = t), e.root = this.root || this, e.options = e.options || this.options, this.children ? (em(this.children), tm(this.children).next = e, this.children.push(e)) : (this.children = [e], this.nextAfterChildren = this.next || null, this.next = e), e.next = this, this;
8545
8544
  }
8546
- }, im = class extends rm {
8545
+ }, rm = class extends nm {
8547
8546
  constructor(e, t) {
8548
8547
  super(), this.left = e, this.right = t, this.pipe = "diff";
8549
8548
  }
8550
8549
  prepareDeltaResult(e) {
8551
8550
  var t, n, r, i;
8552
8551
  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 : em;
8552
+ let t = typeof ((r = this.options) == null ? void 0 : r.cloneDiffValues) == "function" ? (i = this.options) == null ? void 0 : i.cloneDiffValues : $p;
8554
8553
  typeof e[0] == "object" && (e[0] = t(e[0])), typeof e[1] == "object" && (e[1] = t(e[1]));
8555
8554
  }
8556
8555
  return e;
@@ -8558,15 +8557,15 @@ var nm = (e) => e[e.length - 1], rm = class {
8558
8557
  setResult(e) {
8559
8558
  return this.prepareDeltaResult(e), super.setResult(e);
8560
8559
  }
8561
- }, am = class extends rm {
8560
+ }, im = class extends nm {
8562
8561
  constructor(e, t) {
8563
8562
  super(), this.left = e, this.delta = t, this.pipe = "patch";
8564
8563
  }
8565
- }, om = class extends rm {
8564
+ }, am = class extends nm {
8566
8565
  constructor(e) {
8567
8566
  super(), this.delta = e, this.pipe = "reverse";
8568
8567
  }
8569
- }, sm = class {
8568
+ }, om = class {
8570
8569
  constructor(e) {
8571
8570
  this.name = e, this.filters = [];
8572
8571
  }
@@ -8630,7 +8629,7 @@ var nm = (e) => e[e.length - 1], rm = class {
8630
8629
  }
8631
8630
  }), this);
8632
8631
  }
8633
- }, cm = class {
8632
+ }, sm = class {
8634
8633
  constructor(e) {
8635
8634
  this.selfOptions = e || {}, this.pipes = {};
8636
8635
  }
@@ -8657,7 +8656,7 @@ var nm = (e) => e[e.length - 1], rm = class {
8657
8656
  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
8657
  return n.hasResult ? n.result : void 0;
8659
8658
  }
8660
- }, lm = (e, t, n, r) => e[n] === t[r], um = (e, t, n, r) => {
8659
+ }, cm = (e, t, n, r) => e[n] === t[r], lm = (e, t, n, r) => {
8661
8660
  var i, a, o;
8662
8661
  let s = e.length, c = t.length, l, u, d = Array(s + 1);
8663
8662
  for (l = 0; l < s + 1; l++) {
@@ -8673,7 +8672,7 @@ var nm = (e) => e[e.length - 1], rm = class {
8673
8672
  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
8673
  }
8675
8674
  return d;
8676
- }, dm = (e, t, n, r) => {
8675
+ }, um = (e, t, n, r) => {
8677
8676
  let i = t.length, a = n.length, o = {
8678
8677
  sequence: [],
8679
8678
  indices1: [],
@@ -8695,11 +8694,11 @@ var nm = (e) => e[e.length - 1], rm = class {
8695
8694
  }
8696
8695
  }
8697
8696
  return o;
8698
- }, fm = { get: (e, t, n, r) => {
8697
+ }, dm = { get: (e, t, n, r) => {
8699
8698
  let i = r || {};
8700
- return dm(um(e, t, n || lm, i), e, t, i);
8701
- } }, pm = 3;
8702
- function mm(e, t, n, r) {
8699
+ return um(lm(e, t, n || cm, i), e, t, i);
8700
+ } }, fm = 3;
8701
+ function pm(e, t, n, r) {
8703
8702
  for (let i = 0; i < n; i++) {
8704
8703
  let n = e[i];
8705
8704
  for (let e = 0; e < r; e++) {
@@ -8709,7 +8708,7 @@ function mm(e, t, n, r) {
8709
8708
  }
8710
8709
  return !1;
8711
8710
  }
8712
- function hm(e, t, n, r, i) {
8711
+ function mm(e, t, n, r, i) {
8713
8712
  let a = e[n], o = t[r];
8714
8713
  if (a === o) return !0;
8715
8714
  if (typeof a != "object" || typeof o != "object") return !1;
@@ -8722,15 +8721,15 @@ function hm(e, t, n, r, i) {
8722
8721
  let l = i.hashCache2[r];
8723
8722
  return l === void 0 && (i.hashCache2[r] = l = s(o, r)), l !== void 0 && c === l;
8724
8723
  }
8725
- var gm = function(e) {
8724
+ var hm = function(e) {
8726
8725
  var t, n, r, i, a;
8727
8726
  if (!e.leftIsArray) return;
8728
8727
  let o = {
8729
8728
  objectHash: (t = e.options) == null ? void 0 : t.objectHash,
8730
8729
  matchByPosition: (n = e.options) == null ? void 0 : n.matchByPosition
8731
8730
  }, 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 = !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++;
8731
+ for (m > 0 && h > 0 && !o.objectHash && typeof o.matchByPosition != "boolean" && (o.matchByPosition = !pm(f, p, m, h)); s < m && s < h && mm(f, p, s, s, o);) l = s, g = new rm(f[l], p[l]), e.push(g, l), s++;
8732
+ for (; c + s < m && c + s < h && mm(f, p, m - 1 - c, h - 1 - c, o);) u = m - 1 - c, d = h - 1 - c, g = new rm(f[u], p[d]), e.push(g, d), c++;
8734
8733
  let _;
8735
8734
  if (s + c === m) {
8736
8735
  if (m === h) {
@@ -8754,7 +8753,7 @@ var gm = function(e) {
8754
8753
  return;
8755
8754
  }
8756
8755
  o.hashCache1 = void 0, o.hashCache2 = void 0;
8757
- let v = f.slice(s, m - c), y = p.slice(s, h - c), b = fm.get(v, y, hm, o), x = [];
8756
+ let v = f.slice(s, m - c), y = p.slice(s, h - c), b = dm.get(v, y, mm, o), x = [];
8758
8757
  for (_ = _ || { _t: "a" }, l = s; l < m - c; l++) if (b.indices1.indexOf(l - s) < 0) {
8759
8758
  let t = `_${l}`;
8760
8759
  _[t] = [
@@ -8775,8 +8774,8 @@ var gm = function(e) {
8775
8774
  if (S && w > 0) for (let n = 0; n < w; n++) {
8776
8775
  u = x[n];
8777
8776
  let r = u === void 0 ? void 0 : _[`_${u}`];
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;
8777
+ if (u !== void 0 && r && mm(v, y, u - s, l - s, o)) {
8778
+ r.splice(1, 2, l, fm), r.splice(1, 2, l, fm), C || (r[0] = ""), d = l, g = new rm(f[u], p[d]), e.push(g, d), x.splice(n, 1), t = !0;
8780
8779
  break;
8781
8780
  }
8782
8781
  }
@@ -8784,20 +8783,20 @@ var gm = function(e) {
8784
8783
  } else {
8785
8784
  if (b.indices1[t] === void 0) throw Error(`Invalid indexOnArray2: ${t}, seq.indices1: ${b.indices1}`);
8786
8785
  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 im(f[u], p[d]), e.push(g, d);
8786
+ d = b.indices2[t] + s, g = new rm(f[u], p[d]), e.push(g, d);
8788
8787
  }
8789
8788
  }
8790
8789
  e.setResult(_).exit();
8791
8790
  };
8792
- gm.filterName = "arrays";
8793
- var _m = {
8791
+ hm.filterName = "arrays";
8792
+ var gm = {
8794
8793
  numerically(e, t) {
8795
8794
  return e - t;
8796
8795
  },
8797
8796
  numericallyBy(e) {
8798
8797
  return (t, n) => t[e] - n[e];
8799
8798
  }
8800
- }, vm = function(e) {
8799
+ }, _m = function(e) {
8801
8800
  var t;
8802
8801
  if (!e.nested) return;
8803
8802
  let n = e.delta;
@@ -8806,7 +8805,7 @@ var _m = {
8806
8805
  for (r in a) if (r !== "_t") {
8807
8806
  if (r[0] === "_") {
8808
8807
  let e = r;
8809
- if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] === pm)) s.push(Number.parseInt(r.slice(1), 10));
8808
+ if (a[e] !== void 0 && (a[e][2] === 0 || a[e][2] === fm)) s.push(Number.parseInt(r.slice(1), 10));
8810
8809
  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
8810
  } else {
8812
8811
  let e = r;
@@ -8819,15 +8818,15 @@ var _m = {
8819
8818
  });
8820
8819
  }
8821
8820
  }
8822
- for (s = s.sort(_m.numerically), r = s.length - 1; r >= 0; r--) {
8821
+ for (s = s.sort(gm.numerically), r = s.length - 1; r >= 0; r--) {
8823
8822
  if (i = s[r], i === void 0) continue;
8824
8823
  let e = a[`_${i}`], t = o.splice(i, 1)[0];
8825
- (e == null ? void 0 : e[2]) === pm && c.push({
8824
+ (e == null ? void 0 : e[2]) === fm && c.push({
8826
8825
  index: e[1],
8827
8826
  value: t
8828
8827
  });
8829
8828
  }
8830
- c = c.sort(_m.numericallyBy("index"));
8829
+ c = c.sort(gm.numericallyBy("index"));
8831
8830
  let u = c.length;
8832
8831
  for (r = 0; r < u; r++) {
8833
8832
  let e = c[r];
@@ -8837,7 +8836,7 @@ var _m = {
8837
8836
  if (d > 0) for (r = 0; r < d; r++) {
8838
8837
  let t = l[r];
8839
8838
  if (t === void 0) continue;
8840
- let n = new am(o[t.index], t.delta);
8839
+ let n = new im(o[t.index], t.delta);
8841
8840
  e.push(n, t.index);
8842
8841
  }
8843
8842
  if (!e.children) {
@@ -8846,8 +8845,8 @@ var _m = {
8846
8845
  }
8847
8846
  e.exit();
8848
8847
  };
8849
- vm.filterName = "arrays";
8850
- var ym = function(e) {
8848
+ _m.filterName = "arrays";
8849
+ var vm = function(e) {
8851
8850
  if (!e || !e.children || e.delta._t !== "a") return;
8852
8851
  let t = e.left, n = e.children.length;
8853
8852
  for (let r = 0; r < n; r++) {
@@ -8858,16 +8857,16 @@ var ym = function(e) {
8858
8857
  }
8859
8858
  e.setResult(t).exit();
8860
8859
  };
8861
- ym.filterName = "arraysCollectChildren";
8862
- var bm = function(e) {
8860
+ vm.filterName = "arraysCollectChildren";
8861
+ var ym = function(e) {
8863
8862
  if (!e.nested) {
8864
8863
  let t = e.delta;
8865
- if (t[2] === pm) {
8864
+ if (t[2] === fm) {
8866
8865
  let n = t;
8867
8866
  e.newName = `_${n[1]}`, e.setResult([
8868
8867
  n[0],
8869
8868
  Number.parseInt(e.childName.substring(1), 10),
8870
- pm
8869
+ fm
8871
8870
  ]).exit();
8872
8871
  }
8873
8872
  return;
@@ -8877,20 +8876,20 @@ var bm = function(e) {
8877
8876
  let n = t;
8878
8877
  for (let t in n) {
8879
8878
  if (t === "_t") continue;
8880
- let r = new om(n[t]);
8879
+ let r = new am(n[t]);
8881
8880
  e.push(r, t);
8882
8881
  }
8883
8882
  e.exit();
8884
8883
  };
8885
- bm.filterName = "arrays";
8886
- var xm = (e, t, n) => {
8884
+ ym.filterName = "arrays";
8885
+ var bm = (e, t, n) => {
8887
8886
  if (typeof t == "string" && t[0] === "_") return Number.parseInt(t.substring(1), 10);
8888
8887
  if (Array.isArray(n) && n[2] === 0) return `_${t}`;
8889
8888
  let r = +t;
8890
8889
  for (let n in e) {
8891
8890
  let i = e[n];
8892
8891
  if (Array.isArray(i)) {
8893
- if (i[2] === pm) {
8892
+ if (i[2] === fm) {
8894
8893
  let e = Number.parseInt(n.substring(1), 10), a = i[1];
8895
8894
  if (a === +t) return e;
8896
8895
  e <= r && a > r ? r++ : e >= r && a < r && r--;
@@ -8898,7 +8897,7 @@ var xm = (e, t, n) => {
8898
8897
  }
8899
8898
  }
8900
8899
  return r;
8901
- }, Sm = (e) => {
8900
+ }, xm = (e) => {
8902
8901
  if (!e || !e.children) return;
8903
8902
  let t = e.delta;
8904
8903
  if (t._t !== "a") return;
@@ -8909,22 +8908,22 @@ var xm = (e, t, n) => {
8909
8908
  let a = r.newName;
8910
8909
  if (a === void 0) {
8911
8910
  if (r.childName === void 0) throw Error("child.childName is undefined");
8912
- a = xm(n, r.childName, r.result);
8911
+ a = bm(n, r.childName, r.result);
8913
8912
  }
8914
8913
  i[a] !== r.result && (i[a] = r.result);
8915
8914
  }
8916
8915
  e.setResult(i).exit();
8917
8916
  };
8918
- Sm.filterName = "arraysCollectChildren";
8917
+ xm.filterName = "arraysCollectChildren";
8919
8918
  //#endregion
8920
8919
  //#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/dates.js
8921
- var Cm = function(e) {
8920
+ var Sm = function(e) {
8922
8921
  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
8922
  };
8924
- Cm.filterName = "dates";
8923
+ Sm.filterName = "dates";
8925
8924
  //#endregion
8926
8925
  //#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/nested.js
8927
- var wm = /* @__PURE__ */ new Set(["__proto__"]), Tm = (e) => {
8926
+ var Cm = /* @__PURE__ */ new Set(["__proto__"]), wm = (e) => {
8928
8927
  if (!e || !e.children) return;
8929
8928
  let t = e.children.length, n = e.result;
8930
8929
  for (let r = 0; r < t; r++) {
@@ -8936,18 +8935,18 @@ var wm = /* @__PURE__ */ new Set(["__proto__"]), Tm = (e) => {
8936
8935
  }
8937
8936
  n && e.leftIsArray && (n._t = "a"), e.setResult(n).exit();
8938
8937
  };
8939
- Tm.filterName = "collectChildren";
8940
- var Em = (e) => {
8938
+ wm.filterName = "collectChildren";
8939
+ var Tm = (e) => {
8941
8940
  var t;
8942
8941
  if (e.leftIsArray || e.leftType !== "object") return;
8943
8942
  let n = e.left, r = e.right, i = (t = e.options) == null ? void 0 : t.propertyFilter;
8944
8943
  for (let t in n) {
8945
8944
  if (!Object.prototype.hasOwnProperty.call(n, t) || i && !i(t, e)) continue;
8946
- let a = new im(n[t], r[t]);
8945
+ let a = new rm(n[t], r[t]);
8947
8946
  e.push(a, t);
8948
8947
  }
8949
8948
  for (let t in r) if (Object.prototype.hasOwnProperty.call(r, t) && !(i && !i(t, e)) && n[t] === void 0) {
8950
- let n = new im(void 0, r[t]);
8949
+ let n = new rm(void 0, r[t]);
8951
8950
  e.push(n, t);
8952
8951
  }
8953
8952
  if (!e.children || e.children.length === 0) {
@@ -8956,15 +8955,15 @@ var Em = (e) => {
8956
8955
  }
8957
8956
  e.exit();
8958
8957
  };
8959
- Em.filterName = "objects";
8960
- var Dm = function(e) {
8958
+ Tm.filterName = "objects";
8959
+ var Em = function(e) {
8961
8960
  if (!e.nested) return;
8962
8961
  let t = e.delta;
8963
8962
  if (t._t) return;
8964
8963
  let n = t, r = !1;
8965
8964
  for (let t in n) {
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]);
8965
+ if (Cm.has(t) || !Object.prototype.hasOwnProperty.call(n, t)) continue;
8966
+ let i = e.left, a = new im(typeof i == "object" && i && Object.prototype.hasOwnProperty.call(i, t) ? i[t] : void 0, n[t]);
8968
8967
  e.push(a, t), r = !0;
8969
8968
  }
8970
8969
  if (!r) {
@@ -8973,8 +8972,8 @@ var Dm = function(e) {
8973
8972
  }
8974
8973
  e.exit();
8975
8974
  };
8976
- Dm.filterName = "objects";
8977
- var Om = function(e) {
8975
+ Em.filterName = "objects";
8976
+ var Dm = function(e) {
8978
8977
  if (!e || !e.children || e.delta._t) return;
8979
8978
  if (e.left === null || typeof e.left != "object") {
8980
8979
  e.setResult(e.left).exit();
@@ -8985,17 +8984,17 @@ var Om = function(e) {
8985
8984
  let n = e.children[r];
8986
8985
  if (n === void 0) continue;
8987
8986
  let i = n.childName;
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));
8987
+ Cm.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
8988
  }
8990
8989
  e.setResult(t).exit();
8991
8990
  };
8992
- Om.filterName = "collectChildren";
8993
- var km = function(e) {
8991
+ Dm.filterName = "collectChildren";
8992
+ var Om = function(e) {
8994
8993
  if (!e.nested || e.delta._t) return;
8995
8994
  let t = e.delta, n = !1;
8996
8995
  for (let r in t) {
8997
- if (wm.has(r) || !Object.prototype.hasOwnProperty.call(t, r)) continue;
8998
- let i = new om(t[r]);
8996
+ if (Cm.has(r) || !Object.prototype.hasOwnProperty.call(t, r)) continue;
8997
+ let i = new am(t[r]);
8999
8998
  e.push(i, r), n = !0;
9000
8999
  }
9001
9000
  if (!n) {
@@ -9004,25 +9003,25 @@ var km = function(e) {
9004
9003
  }
9005
9004
  e.exit();
9006
9005
  };
9007
- km.filterName = "objects";
9008
- var Am = (e) => {
9006
+ Om.filterName = "objects";
9007
+ var km = (e) => {
9009
9008
  if (!e || !e.children || e.delta._t) return;
9010
9009
  let t = e.children.length, n = {};
9011
9010
  for (let r = 0; r < t; r++) {
9012
9011
  let t = e.children[r];
9013
9012
  if (t === void 0) continue;
9014
9013
  let i = t.childName;
9015
- wm.has(i) || n[i] !== t.result && (n[i] = t.result);
9014
+ Cm.has(i) || n[i] !== t.result && (n[i] = t.result);
9016
9015
  }
9017
9016
  e.setResult(n).exit();
9018
9017
  };
9019
- Am.filterName = "collectChildren";
9018
+ km.filterName = "collectChildren";
9020
9019
  //#endregion
9021
9020
  //#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/texts.js
9022
- var jm = 2, Mm = 60, Nm = null;
9023
- function Pm(e, t) {
9021
+ var Am = 2, jm = 60, Mm = null;
9022
+ function Nm(e, t) {
9024
9023
  var n;
9025
- if (!Nm) {
9024
+ if (!Mm) {
9026
9025
  let r;
9027
9026
  if ((n = e == null ? void 0 : e.textDiff) != null && n.diffMatchPatch) r = new e.textDiff.diffMatchPatch();
9028
9027
  else {
@@ -9030,7 +9029,7 @@ function Pm(e, t) {
9030
9029
  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
9030
  throw e.diff_match_patch_not_found = !0, e;
9032
9031
  }
9033
- Nm = {
9032
+ Mm = {
9034
9033
  diff: (e, t) => r.patch_toText(r.patch_make(e, t)),
9035
9034
  patch: (e, t) => {
9036
9035
  let n = r.patch_apply(r.patch_fromText(t), e);
@@ -9042,17 +9041,17 @@ function Pm(e, t) {
9042
9041
  }
9043
9042
  };
9044
9043
  }
9045
- return Nm;
9044
+ return Mm;
9046
9045
  }
9047
- var Fm = function(e) {
9046
+ var Pm = function(e) {
9048
9047
  var t, n;
9049
9048
  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) || Mm;
9049
+ let r = e.left, i = e.right, a = ((n = (t = e.options) == null ? void 0 : t.textDiff) == null ? void 0 : n.minLength) || jm;
9051
9050
  if (r.length < a || i.length < a) {
9052
9051
  e.setResult([r, i]).exit();
9053
9052
  return;
9054
9053
  }
9055
- let o = Pm(e.options);
9054
+ let o = Nm(e.options);
9056
9055
  if (!o) {
9057
9056
  e.setResult([r, i]).exit();
9058
9057
  return;
@@ -9061,19 +9060,19 @@ var Fm = function(e) {
9061
9060
  e.setResult([
9062
9061
  s(r, i),
9063
9062
  0,
9064
- jm
9063
+ Am
9065
9064
  ]).exit();
9066
9065
  };
9067
- Fm.filterName = "texts";
9068
- var Im = function(e) {
9066
+ Pm.filterName = "texts";
9067
+ var Fm = function(e) {
9069
9068
  if (e.nested) return;
9070
9069
  let t = e.delta;
9071
- if (t[2] !== jm) return;
9072
- let n = t, r = Pm(e.options, !0).patch;
9070
+ if (t[2] !== Am) return;
9071
+ let n = t, r = Nm(e.options, !0).patch;
9073
9072
  e.setResult(r(e.left, n[0])).exit();
9074
9073
  };
9075
- Im.filterName = "texts";
9076
- var Lm = (e) => {
9074
+ Fm.filterName = "texts";
9075
+ var Im = (e) => {
9077
9076
  var t, n, r;
9078
9077
  let i = /^@@ +-(\d+),(\d+) +\+(\d+),(\d+) +@@$/, a = e.split("\n");
9079
9078
  for (let e = 0; e < a.length; e++) {
@@ -9094,21 +9093,21 @@ var Lm = (e) => {
9094
9093
  } else s === "-" && (a[e] = `+${(r = a[e]) == null ? void 0 : r.slice(1)}`);
9095
9094
  }
9096
9095
  return a.join("\n");
9097
- }, Rm = function(e) {
9096
+ }, Lm = function(e) {
9098
9097
  if (e.nested) return;
9099
9098
  let t = e.delta;
9100
- if (t[2] !== jm) return;
9099
+ if (t[2] !== Am) return;
9101
9100
  let n = t;
9102
9101
  e.setResult([
9103
- Lm(n[0]),
9102
+ Im(n[0]),
9104
9103
  0,
9105
- jm
9104
+ Am
9106
9105
  ]).exit();
9107
9106
  };
9108
- Rm.filterName = "texts";
9107
+ Lm.filterName = "texts";
9109
9108
  //#endregion
9110
9109
  //#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/filters/trivial.js
9111
- var zm = function(e) {
9110
+ var Rm = function(e) {
9112
9111
  if (e.left === e.right) {
9113
9112
  e.setResult(void 0).exit();
9114
9113
  return;
@@ -9141,8 +9140,8 @@ var zm = function(e) {
9141
9140
  }
9142
9141
  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
9142
  };
9144
- zm.filterName = "trivial";
9145
- var Bm = function(e) {
9143
+ Rm.filterName = "trivial";
9144
+ var zm = function(e) {
9146
9145
  if (e.delta === void 0) {
9147
9146
  e.setResult(e.left).exit();
9148
9147
  return;
@@ -9166,8 +9165,8 @@ var Bm = function(e) {
9166
9165
  }
9167
9166
  t.length === 3 && t[2] === 0 && e.setResult(void 0).exit();
9168
9167
  };
9169
- Bm.filterName = "trivial";
9170
- var Vm = function(e) {
9168
+ zm.filterName = "trivial";
9169
+ var Bm = function(e) {
9171
9170
  if (e.delta === void 0) {
9172
9171
  e.setResult(e.delta).exit();
9173
9172
  return;
@@ -9188,36 +9187,36 @@ var Vm = function(e) {
9188
9187
  }
9189
9188
  t.length === 3 && t[2] === 0 && e.setResult([t[0]]).exit();
9190
9189
  };
9191
- Vm.filterName = "trivial";
9190
+ Bm.filterName = "trivial";
9192
9191
  //#endregion
9193
9192
  //#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/diffpatcher.js
9194
- var Hm = class {
9193
+ var Vm = class {
9195
9194
  constructor(e) {
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());
9195
+ this.processor = new sm(e), this.processor.pipe(new om("diff").append(wm, Rm, Sm, Pm, Tm, hm).shouldHaveResult()), this.processor.pipe(new om("patch").append(Dm, vm, zm, Fm, Em, _m).shouldHaveResult()), this.processor.pipe(new om("reverse").append(km, xm, Bm, Lm, Om, ym).shouldHaveResult());
9197
9196
  }
9198
9197
  options(e) {
9199
9198
  return this.processor.options(e);
9200
9199
  }
9201
9200
  diff(e, t) {
9202
- return this.processor.process(new im(e, t));
9201
+ return this.processor.process(new rm(e, t));
9203
9202
  }
9204
9203
  patch(e, t) {
9205
- return this.processor.process(new am(e, t));
9204
+ return this.processor.process(new im(e, t));
9206
9205
  }
9207
9206
  reverse(e) {
9208
- return this.processor.process(new om(e));
9207
+ return this.processor.process(new am(e));
9209
9208
  }
9210
9209
  unpatch(e, t) {
9211
9210
  return this.patch(e, this.reverse(t));
9212
9211
  }
9213
9212
  clone(e) {
9214
- return em(e);
9213
+ return $p(e);
9215
9214
  }
9216
9215
  };
9217
9216
  //#endregion
9218
9217
  //#region node_modules/.pnpm/jsondiffpatch@0.7.6/node_modules/jsondiffpatch/lib/index.js
9219
- function Um(e) {
9220
- return new Hm(e);
9218
+ function Hm(e) {
9219
+ return new Vm(e);
9221
9220
  }
9222
9221
  //#endregion
9223
9222
  //#region node_modules/.pnpm/@dmsnell+diff-match-patch@1.1.0/node_modules/@dmsnell/diff-match-patch/index.js
@@ -9779,46 +9778,46 @@ $.Diff = function(e, t) {
9779
9778
  };
9780
9779
  //#endregion
9781
9780
  //#region src/components/audit-log/create-diff-patcher.tsx
9782
- var Wm = (e = {}) => Um({
9781
+ var Um = (e = {}) => Hm({
9783
9782
  ...e,
9784
9783
  textDiff: {
9785
9784
  diffMatchPatch: $,
9786
9785
  minLength: 120
9787
9786
  },
9788
9787
  cloneDiffValues: !0
9789
- }), Gm = ["user", "unittemplate"], Km = Wm(), qm = (e, t, n) => {
9788
+ }), Wm = ["user", "unittemplate"], Gm = Um(), Km = (e, t, n) => {
9790
9789
  let r = Object.fromEntries(e.map((e) => [e.sectionKey, e.sectionLabel]));
9791
9790
  for (let e = t.length - 1; e >= 0; e--) {
9792
9791
  let n = r[t[e]];
9793
9792
  if (n) return n;
9794
9793
  }
9795
9794
  return n || "";
9796
- }, Jm = (e) => {
9795
+ }, qm = (e) => {
9797
9796
  let t = (e) => vr(e) ? Ar(e) : String(e);
9798
9797
  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
- }, Ym = (e) => {
9798
+ }, Jm = (e) => {
9800
9799
  switch (e.length) {
9801
9800
  case 1: {
9802
9801
  let [t] = e;
9803
9802
  return {
9804
9803
  type: "created",
9805
9804
  before: "",
9806
- after: Jm(t)
9805
+ after: qm(t)
9807
9806
  };
9808
9807
  }
9809
9808
  case 2: {
9810
9809
  let [t, n] = e;
9811
9810
  return {
9812
9811
  type: "modified",
9813
- before: Jm(t),
9814
- after: Jm(n)
9812
+ before: qm(t),
9813
+ after: qm(n)
9815
9814
  };
9816
9815
  }
9817
9816
  case 3: {
9818
9817
  let [t] = e;
9819
9818
  return {
9820
9819
  type: "deleted",
9821
- before: Jm(t),
9820
+ before: qm(t),
9822
9821
  after: ""
9823
9822
  };
9824
9823
  }
@@ -9828,15 +9827,15 @@ var Wm = (e = {}) => Um({
9828
9827
  after: ""
9829
9828
  };
9830
9829
  }
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);
9830
+ }, Ym = (e) => Array.isArray(e), Xm = (e, t) => t ? Ym(t) ? t.length === 0 ? e : t.reduce((e, t) => Gm.unpatch(nn(e), nn(t)), nn(e)) : Gm.unpatch(nn(e), nn(t)) : e, Zm = (e) => e.createdAt || e.date, Qm = (e, t, n) => {
9831
+ let r = Zm(e);
9833
9832
  if (!r) return {
9834
9833
  oldJson: "",
9835
9834
  newJson: "",
9836
9835
  error: `Cannot create comparison view: missing date for audit log ${e.id}`
9837
9836
  };
9838
9837
  let i = t.filter((e) => {
9839
- let t = Qm(e);
9838
+ let t = Zm(e);
9840
9839
  return !!(e.diffs && t && t >= r);
9841
9840
  }), a = Array.from({ length: i.length + 1 });
9842
9841
  a[0] = nn(n);
@@ -9849,7 +9848,7 @@ var Wm = (e = {}) => Um({
9849
9848
  a[e + 1] = a[e];
9850
9849
  continue;
9851
9850
  }
9852
- a[e + 1] = Zm(a[e], t);
9851
+ a[e + 1] = Xm(a[e], t);
9853
9852
  }
9854
9853
  let e = i.length > 0 ? a[i.length - 1] : n, t = i.length > 0 ? a[i.length] : n;
9855
9854
  o = JSON.stringify(t == null ? "" : t, null, 2), s = JSON.stringify(e == null ? "" : e, null, 2);
@@ -9864,10 +9863,10 @@ var Wm = (e = {}) => Um({
9864
9863
  oldJson: o,
9865
9864
  newJson: s
9866
9865
  };
9867
- }, eh = (e, t, n = {}, r = []) => {
9866
+ }, $m = (e, t, n = {}, r = []) => {
9868
9867
  var i;
9869
9868
  if (!e) return;
9870
- let a = [...Gm, ...(i = n.hiddenKeys) == null ? [] : i];
9869
+ let a = [...Wm, ...(i = n.hiddenKeys) == null ? [] : i];
9871
9870
  Object.keys(e).forEach((i) => {
9872
9871
  var o;
9873
9872
  let s = e[i];
@@ -9880,12 +9879,12 @@ var Wm = (e = {}) => Um({
9880
9879
  cn(s) ? t.push({
9881
9880
  deltaFormat: [...s],
9882
9881
  path: c
9883
- }) : gn(s) && eh(s, t, n, c);
9882
+ }) : gn(s) && $m(s, t, n, c);
9884
9883
  });
9885
- }, th = (e, t = {}) => {
9884
+ }, eh = (e, t = {}) => {
9886
9885
  let n = [];
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) => {
9886
+ return e ? ($m(e, n, t), n) : [];
9887
+ }, th = (e) => e.replace(/\[\d+\]/g, "").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]/g, " ").replace(/\s+/g, " ").trim().replace(/^./, (e) => e.toUpperCase()), nh = (e) => {
9889
9888
  if (e == null || e === "") return "empty";
9890
9889
  if (typeof e == "boolean") return e ? "true" : "false";
9891
9890
  if (typeof e == "string") return e;
@@ -9896,27 +9895,27 @@ var Wm = (e = {}) => Um({
9896
9895
  } catch {
9897
9896
  return String(e);
9898
9897
  }
9899
- }, ih = (e, t = e.length - 1) => {
9898
+ }, rh = (e, t = e.length - 1) => {
9900
9899
  if (t >= e.length) return "Value";
9901
9900
  let n = e[t];
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}` : "";
9901
+ return !n || hr(n) ? rh(e, t - 1) : th(n);
9902
+ }, ih = ({ userName: e, type: t, property: n, before: r, after: i, sectionName: a }) => {
9903
+ let o = nh(r), s = nh(i), c = a ? ` in ${a}` : "";
9905
9904
  switch (t) {
9906
9905
  case "modified": return `${e} updated ${n} from ${o} to ${s}${c}.`;
9907
9906
  case "created": return `${e} created ${s}${c}.`;
9908
9907
  case "deleted": return `${e} deleted ${o}${c}.`;
9909
9908
  default: return `${e} changed ${n}${c}.`;
9910
9909
  }
9911
- }, oh = ({ sectionNames: e, userName: t, diffs: n, defaultSectionName: r }) => {
9910
+ }, ah = ({ sectionNames: e, userName: t, diffs: n, defaultSectionName: r }) => {
9912
9911
  let i = {
9913
9912
  headers: [{ cells: [{ value: "Changes" }] }],
9914
9913
  rows: n.map((n) => {
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({
9914
+ let { deltaFormat: i, path: a } = n, o = Km(e, a, r), { type: s, before: c, after: l } = Jm(i);
9915
+ return { cells: [{ value: ih({
9917
9916
  userName: t,
9918
9917
  type: s,
9919
- property: ih(a),
9918
+ property: rh(a),
9920
9919
  before: c,
9921
9920
  after: l,
9922
9921
  sectionName: o
@@ -9924,7 +9923,7 @@ var Wm = (e = {}) => Um({
9924
9923
  })
9925
9924
  };
9926
9925
  return /* @__PURE__ */ S(nu, { table: i });
9927
- }, sh = Object.freeze({
9926
+ }, oh = Object.freeze({
9928
9927
  summary: {
9929
9928
  label: "Summary",
9930
9929
  value: "summary"
@@ -9933,13 +9932,13 @@ var Wm = (e = {}) => Um({
9933
9932
  label: "Compare",
9934
9933
  value: "compare"
9935
9934
  }
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 }) => ({
9935
+ }), sh = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, transformDiffsConfig: i, sectionNames: a, defaultSectionName: o, onClose: s }) => {
9936
+ let c = [oh.summary, oh.compare].map(({ label: e, value: t }) => ({
9938
9937
  label: e,
9939
9938
  value: t
9940
9939
  })), [l, u] = v(c[0]), { diffs: d = void 0 } = e || {};
9941
9940
  if (!d) return null;
9942
- let { oldJson: f, newJson: p, error: m } = $m(e, t, n);
9941
+ let { oldJson: f, newJson: p, error: m } = Qm(e, t, n);
9943
9942
  return /* @__PURE__ */ S(Es, {
9944
9943
  visible: r,
9945
9944
  centered: !0,
@@ -9952,10 +9951,10 @@ var Wm = (e = {}) => Um({
9952
9951
  onChange: (e) => u(c.find((t) => t.value === e.target.value)),
9953
9952
  options: c,
9954
9953
  value: l
9955
- }), l.value === "summary" ? /* @__PURE__ */ S(oh, {
9954
+ }), l.value === "summary" ? /* @__PURE__ */ S(ah, {
9956
9955
  userName: e.userName,
9957
9956
  sectionNames: a,
9958
- diffs: th(d, i),
9957
+ diffs: eh(d, i),
9959
9958
  defaultSectionName: o
9960
9959
  }) : m ? /* @__PURE__ */ S("div", {
9961
9960
  style: { padding: 16 },
@@ -9973,7 +9972,7 @@ var Wm = (e = {}) => Um({
9973
9972
  height: "90vh"
9974
9973
  } })
9975
9974
  });
9976
- }, lh = [
9975
+ }, ch = [
9977
9976
  {
9978
9977
  label: "10 / page",
9979
9978
  value: 10
@@ -9986,8 +9985,8 @@ var Wm = (e = {}) => Um({
9986
9985
  label: "50 / page",
9987
9986
  value: 50
9988
9987
  }
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";
9988
+ ], lh = (e, t = {}) => {
9989
+ let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s = eh(n, t).length, c = s ? `${s} change${s === 1 ? "" : "s"}` : "no field changes";
9991
9990
  if (i === "API" && !r) return a === "Created" ? "Created through API" : "Changed through API";
9992
9991
  switch (a) {
9993
9992
  case "Created": return `Created by ${r}`;
@@ -9997,7 +9996,7 @@ var Wm = (e = {}) => Um({
9997
9996
  case "Updated": return `Updated by ${r} (${c})`;
9998
9997
  default: return `Change by ${r}`;
9999
9998
  }
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 }) => {
9999
+ }, uh = ({ 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
10000
  let [g, _] = v(!1), [y, b] = v(null), w = (e) => {
10002
10001
  if (e.snapshot) {
10003
10002
  f == null || f(e.snapshot, e);
@@ -10016,7 +10015,7 @@ var Wm = (e = {}) => Um({
10016
10015
  return {
10017
10016
  cells: [
10018
10017
  {
10019
- value: e.snapshot ? `Snapshot: ${e.snapshot}` : uh(e, l),
10018
+ value: e.snapshot ? `Snapshot: ${e.snapshot}` : lh(e, l),
10020
10019
  type: "Link",
10021
10020
  disabled: n,
10022
10021
  onClick: n ? void 0 : () => w(e),
@@ -10035,8 +10034,8 @@ var Wm = (e = {}) => Um({
10035
10034
  type: "Static"
10036
10035
  },
10037
10036
  {
10038
- value: Qp({
10039
- date: Qm(e),
10037
+ value: Zp({
10038
+ date: Zm(e),
10040
10039
  showTime: !0
10041
10040
  }),
10042
10041
  type: "Static"
@@ -10079,14 +10078,14 @@ var Wm = (e = {}) => Um({
10079
10078
  onChange: (e) => {
10080
10079
  u(Number(e.target.value));
10081
10080
  },
10082
- options: lh,
10081
+ options: ch,
10083
10082
  value: a
10084
10083
  },
10085
10084
  onSelectPage: (e) => d(e),
10086
10085
  small: !0
10087
10086
  } }
10088
10087
  } })
10089
- }), g && y && y.diffs && /* @__PURE__ */ S(ch, {
10088
+ }), g && y && y.diffs && /* @__PURE__ */ S(sh, {
10090
10089
  sectionNames: o,
10091
10090
  isOpen: g,
10092
10091
  onClose: () => _(!1),
@@ -10096,7 +10095,7 @@ var Wm = (e = {}) => Um({
10096
10095
  data: t,
10097
10096
  transformDiffsConfig: l
10098
10097
  })] });
10099
- }, fh = ({ pathName: e, moduleName: t, onNavigate: n, onStartTimingEvent: r }) => {
10098
+ }, dh = ({ pathName: e, moduleName: t, onNavigate: n, onStartTimingEvent: r }) => {
10100
10099
  let i = window.location.href, a = _(i);
10101
10100
  return d(() => {
10102
10101
  a.current = i;
@@ -10119,20 +10118,20 @@ var Wm = (e = {}) => Um({
10119
10118
  });
10120
10119
  };
10121
10120
  }, [e, t]), null;
10122
- }, ph = {
10121
+ }, fh = {
10123
10122
  errorBoundary: "_errorBoundary_hmco0_1",
10124
10123
  sidebarErrorBoundary: "_sidebarErrorBoundary_hmco0_5",
10125
10124
  rightSidebarErrorBoundary: "_rightSidebarErrorBoundary_hmco0_6"
10126
- }, mh = ({ options: e }) => {
10125
+ }, ph = ({ options: e }) => {
10127
10126
  let { ErrorComponent: t, isSideBar: n, isRightSideBar: r, isPage: i, style: a } = e == null ? {} : e, { translations: o } = Ap();
10128
10127
  if (t) return /* @__PURE__ */ S(t, {});
10129
10128
  if (n || r) return /* @__PURE__ */ S("div", {
10130
- className: b(n ? ph.sidebarErrorBoundary : "", r ? ph.rightSidebarErrorBoundary : ""),
10129
+ className: b(n ? fh.sidebarErrorBoundary : "", r ? fh.rightSidebarErrorBoundary : ""),
10131
10130
  style: a,
10132
10131
  children: o == null ? void 0 : o.unexpectedError
10133
10132
  });
10134
10133
  let s = /* @__PURE__ */ S("div", {
10135
- className: ph.errorBoundary,
10134
+ className: fh.errorBoundary,
10136
10135
  style: a,
10137
10136
  children: /* @__PURE__ */ S(Ks, { message: {
10138
10137
  icon: !0,
@@ -10147,19 +10146,23 @@ var Wm = (e = {}) => Um({
10147
10146
  padding: 0,
10148
10147
  children: s
10149
10148
  }) : s;
10150
- }, hh = ({ children: e, options: t }) => /* @__PURE__ */ S(wi.ErrorBoundary, {
10151
- fallback: /* @__PURE__ */ S(mh, { options: t }),
10149
+ }, mh = ({ children: e, options: t }) => /* @__PURE__ */ S(wi.ErrorBoundary, {
10150
+ fallback: /* @__PURE__ */ S(ph, { options: t }),
10152
10151
  onError: (e, t) => {
10153
10152
  console.error("Error caught by boundary:", e, t);
10154
10153
  },
10155
10154
  children: e
10156
- }), gh = (e, t = {}) => (n) => /* @__PURE__ */ S(hh, {
10157
- options: t,
10158
- children: /* @__PURE__ */ S(e, { ...n })
10159
- }), _h = (e = {}) => (t) => gh(t, e), vh = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null, yh = (e) => {
10155
+ }), hh = (e, t = {}) => {
10156
+ var n, r;
10157
+ let i = (n) => /* @__PURE__ */ S(mh, {
10158
+ options: t,
10159
+ children: /* @__PURE__ */ S(e, { ...n })
10160
+ });
10161
+ return i.displayName = `WithErrorBoundary(${(n = (r = e.displayName) == null ? e.name : r) == null ? "Component" : n})`, c(i);
10162
+ }, gh = (e = {}) => (t) => hh(t, e), _h = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null, vh = (e) => {
10160
10163
  jp(Ep.LanguageKey, e.languageKey), Object.entries(e).forEach(([e, t]) => {
10161
- e === Ep.Translations ? jp(e, Op(t)) : jp(e, vh(t) ? t : { ...t });
10164
+ e === Ep.Translations ? jp(e, Op(t)) : jp(e, _h(t) ? t : { ...t });
10162
10165
  });
10163
10166
  };
10164
10167
  //#endregion
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 };
10168
+ export { Yi as Accordion, _a as AccordionWithDefaultToggle, po as Actions, Di as Align, uh 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, Xp as DiffTable, Vp as DiffViewer, W as DisabledContext, Qo as Divider, ds as Drawer, rp as ElementType, pu as Empty, mh 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, dh as UsageTracker, Yu as dismissToast, Bf as initializeContext, vh as initializeGuiLibrary, ys as readFile, Ju as toast, $s as useFocus, Cs as useKeyboardEvent, nc as useWindowWidth, gh as withChainableErrorBoundary, hh as withErrorBoundary };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/react-ui-library",
3
- "version": "9.5.1-beta-3",
3
+ "version": "9.5.1-beta-4",
4
4
  "description": "Reusable UI components for React projects",
5
5
  "homepage": "https://oliasoft-open-source.gitlab.io/react-ui-library",
6
6
  "bugs": {