@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
|
|
63330
|
-
|
|
63331
|
-
|
|
63332
|
-
|
|
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,
|
|
63338
|
+
return ((g = m.modifiedDiff) == null ? void 0 : g[kn(f)]) ?? Gu(f, m, s);
|
|
63337
63339
|
}
|
|
63338
|
-
}))
|
|
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
|
-
...
|
|
63362
|
+
...u
|
|
63369
63363
|
],
|
|
63370
|
-
data:
|
|
63364
|
+
data: a,
|
|
63371
63365
|
emptyTableMsg: r,
|
|
63372
|
-
|
|
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
|
-
|
|
63380
|
+
l > 0 && /* @__PURE__ */ w(Ae, { children: /* @__PURE__ */ ee(Je, { fontStyle: "italic", children: [
|
|
63376
63381
|
"+",
|
|
63377
|
-
|
|
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
|
|
63395
|
-
let
|
|
63396
|
-
for (e.sort((
|
|
63397
|
-
const
|
|
63398
|
-
if (
|
|
63399
|
-
const
|
|
63400
|
-
Object.keys(
|
|
63401
|
-
...
|
|
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:
|
|
63404
|
-
}),
|
|
63405
|
-
} else
|
|
63406
|
-
}
|
|
63407
|
-
for (;
|
|
63408
|
-
|
|
63409
|
-
for (;
|
|
63410
|
-
|
|
63411
|
-
return { dataDiff:
|
|
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: [
|