@simoncomputing/mui-bueno-v2 0.25.9 → 0.25.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.es.js CHANGED
@@ -5103,7 +5103,7 @@ const f_ = Ie(/* @__PURE__ */ w("path", {
5103
5103
  children: r
5104
5104
  }) => {
5105
5105
  const o = (s, a) => xC(e, s, a), i = (s, a) => xC(n, s, a);
5106
- return /* @__PURE__ */ w(m_.Provider, { value: { showDiff: t, getPreviousValue: o, getCurrentValue: i }, children: r });
5106
+ return /* @__PURE__ */ w(m_.Provider, { value: { showDiff: t, getPreviousValue: o, getCurrentValue: i }, children: /* @__PURE__ */ w(g6, { children: r }) });
5107
5107
  }, xC = (t, e, n) => (e ? e.replace(/\[(\d+)\]/g, ".$1").split(".").reduce((r, o) => r == null ? void 0 : r[o], t) : t) ?? n, ac = () => Ju(m_);
5108
5108
  function or(t) {
5109
5109
  this.content = t;
@@ -63326,24 +63326,18 @@ const JD = tc(void 0), XD = () => {
63326
63326
  deleted: { icon: wA, label: "Deleted", color: "error" },
63327
63327
  modified: { icon: Vre, label: "Modified", color: "info" }
63328
63328
  }, Bfe = (t) => {
63329
- const { beforeData: e, afterData: n, emptyTableMsg: r = "No changes to display", columns: o } = t, i = $s(Fn().breakpoints.down("sm")), { dataDiff: s, unmodifiedCount: a } = wo(
63330
- () => Hfe(o, e, n, i),
63331
- [e, n, o, i]
63332
- ), l = o.map((f) => ({
63329
+ const { beforeData: e, afterData: n, emptyTableMsg: r = "No changes to display", columns: o, isEqual: i } = t;
63330
+ t.renderExpand != null && t.isEqual == null && console.warn("DiffTable: isEqual prop should be provided when renderExpand is provided");
63331
+ const s = $s(Fn().breakpoints.down("sm")), { dataDiff: a, unmodifiedCount: l } = wo(
63332
+ () => Hfe(o, e, n, s, i),
63333
+ [e, n, o, s, i]
63334
+ ), u = o.map((f) => ({
63333
63335
  ...f,
63334
63336
  render: (p, m) => {
63335
63337
  var g;
63336
- return ((g = m.modifiedDiff) == null ? void 0 : g[kn(f)]) ?? Gu(f, m, i);
63338
+ return ((g = m.modifiedDiff) == null ? void 0 : g[kn(f)]) ?? Gu(f, m, s);
63337
63339
  }
63338
- })), u = t.renderExpand ? {
63339
- renderExpand: (f) => {
63340
- if (f.changeType === "modified") {
63341
- const p = e.find((m) => m.id === f.id);
63342
- return /* @__PURE__ */ w(y6, { previousSnapshot: p, currentSnapshot: f, children: t.renderExpand(f) });
63343
- } else
63344
- return /* @__PURE__ */ w(g6, { children: t.renderExpand(f) });
63345
- }
63346
- } : {};
63340
+ }));
63347
63341
  return /* @__PURE__ */ ee(Ae, { children: [
63348
63342
  /* @__PURE__ */ w(
63349
63343
  DD,
@@ -63365,16 +63359,27 @@ const JD = tc(void 0), XD = () => {
63365
63359
  );
63366
63360
  }
63367
63361
  },
63368
- ...l
63362
+ ...u
63369
63363
  ],
63370
- data: s,
63364
+ data: a,
63371
63365
  emptyTableMsg: r,
63372
- ...u
63366
+ renderExpand: t.renderExpand ? (f) => {
63367
+ const p = e.find((m) => m.id === f.id);
63368
+ return /* @__PURE__ */ w(
63369
+ y6,
63370
+ {
63371
+ previousSnapshot: p,
63372
+ currentSnapshot: f,
63373
+ showDiff: f.changeType === "modified",
63374
+ children: t.renderExpand(f)
63375
+ }
63376
+ );
63377
+ } : void 0
63373
63378
  }
63374
63379
  ),
63375
- a > 0 && /* @__PURE__ */ w(Ae, { children: /* @__PURE__ */ ee(Je, { fontStyle: "italic", children: [
63380
+ l > 0 && /* @__PURE__ */ w(Ae, { children: /* @__PURE__ */ ee(Je, { fontStyle: "italic", children: [
63376
63381
  "+",
63377
- a,
63382
+ l,
63378
63383
  " unmodified rows"
63379
63384
  ] }) })
63380
63385
  ] });
@@ -63390,25 +63395,25 @@ const JD = tc(void 0), XD = () => {
63390
63395
  (((i = s.isEqual) == null ? void 0 : i.call(s, e, n)) ?? Fa.isEqual(a, l)) || (o[kn(s)] = Vfe(a, l));
63391
63396
  }
63392
63397
  return o;
63393
- }, Hfe = (t, e, n, r = !1) => {
63394
- const o = [];
63395
- let i = 0, s = 0, a = 0;
63396
- for (e.sort((l, u) => l.id - u.id), n.sort((l, u) => l.id - u.id); i < e.length && s < n.length; ) {
63397
- const l = e[i], u = n[s];
63398
- if (l.id === u.id) {
63399
- const f = zfe(t, l, u, r);
63400
- Object.keys(f).length === 0 ? a++ : o.push({
63401
- ...u,
63398
+ }, Hfe = (t, e, n, r = !1, o) => {
63399
+ const i = [];
63400
+ let s = 0, a = 0, l = 0;
63401
+ for (e.sort((u, f) => u.id - f.id), n.sort((u, f) => u.id - f.id); s < e.length && a < n.length; ) {
63402
+ const u = e[s], f = n[a];
63403
+ if (u.id === f.id) {
63404
+ const p = zfe(t, u, f, r);
63405
+ (o == null ? void 0 : o(u, f)) ?? Object.keys(p).length === 0 ? l++ : i.push({
63406
+ ...f,
63402
63407
  changeType: "modified",
63403
- modifiedDiff: f
63404
- }), i++, s++;
63405
- } else l.id < u.id ? (o.push({ ...l, changeType: "deleted" }), i++) : (o.push({ ...u, changeType: "added" }), s++);
63406
- }
63407
- for (; i < e.length; )
63408
- o.push({ ...e[i], changeType: "added" }), i++;
63409
- for (; s < n.length; )
63410
- o.push({ ...n[s], changeType: "added" }), s++;
63411
- return { dataDiff: o, unmodifiedCount: a };
63408
+ modifiedDiff: p
63409
+ }), s++, a++;
63410
+ } else u.id < f.id ? (i.push({ ...u, changeType: "deleted" }), s++) : (i.push({ ...f, changeType: "added" }), a++);
63411
+ }
63412
+ for (; s < e.length; )
63413
+ i.push({ ...e[s], changeType: "added" }), s++;
63414
+ for (; a < n.length; )
63415
+ i.push({ ...n[a], changeType: "added" }), a++;
63416
+ return { dataDiff: i, unmodifiedCount: l };
63412
63417
  }, Ape = (t) => {
63413
63418
  const { beforeCitations: e, afterCitations: n } = t, { palette: r } = Fn(), o = ND(r);
63414
63419
  return /* @__PURE__ */ ee(sn, { children: [