@oliasoft-open-source/react-ui-library 6.1.0-beta-5 → 6.1.0-beta-7
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/components/audit-log/audit-log.d.ts +1 -0
- package/dist/components/audit-log/audit-log.d.ts.map +1 -1
- package/dist/components/audit-log/changes-overview.d.ts +2 -1
- package/dist/components/audit-log/changes-overview.d.ts.map +1 -1
- package/dist/components/audit-log/comparison-view-modal.d.ts +2 -1
- package/dist/components/audit-log/comparison-view-modal.d.ts.map +1 -1
- package/dist/components/audit-log/utils.d.ts +1 -1
- package/dist/components/audit-log/utils.d.ts.map +1 -1
- package/dist/global.css +1 -1
- package/dist/index.js +52 -50
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8791,13 +8791,13 @@ var Cf = (e = {}) => Sf({
|
|
|
8791
8791
|
minLength: 120
|
|
8792
8792
|
},
|
|
8793
8793
|
cloneDiffValues: !0
|
|
8794
|
-
}), wf = ["user", "unittemplate"], Tf = Cf(), Ef = (e, t) => {
|
|
8795
|
-
let
|
|
8794
|
+
}), wf = ["user", "unittemplate"], Tf = Cf(), Ef = (e, t, n) => {
|
|
8795
|
+
let r = Object.fromEntries(e.map((e) => [e.sectionKey, e.sectionLabel]));
|
|
8796
8796
|
for (let e = t.length - 1; e >= 0; e--) {
|
|
8797
|
-
let
|
|
8798
|
-
if (
|
|
8797
|
+
let n = r[t[e]];
|
|
8798
|
+
if (n) return n;
|
|
8799
8799
|
}
|
|
8800
|
-
return "";
|
|
8800
|
+
return n || "";
|
|
8801
8801
|
}, Df = (e) => {
|
|
8802
8802
|
let t = (e) => Fn(e) ? qn(e) : String(e);
|
|
8803
8803
|
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);
|
|
@@ -8913,19 +8913,19 @@ var Cf = (e = {}) => Sf({
|
|
|
8913
8913
|
case "deleted": return `${e} deleted ${o}${c}.`;
|
|
8914
8914
|
default: return `${e} changed ${n}${c}.`;
|
|
8915
8915
|
}
|
|
8916
|
-
}, zf = ({ sectionNames: e, userName: t, diffs: n }) => /* @__PURE__ */ z(_c, { table: {
|
|
8916
|
+
}, zf = ({ sectionNames: e, userName: t, diffs: n, defaultSectionName: r }) => /* @__PURE__ */ z(_c, { table: {
|
|
8917
8917
|
headers: [{ cells: [{ value: "Changes" }] }],
|
|
8918
8918
|
rows: n.map((n) => {
|
|
8919
|
-
let { deltaFormat:
|
|
8920
|
-
console.log(e,
|
|
8921
|
-
let { type:
|
|
8919
|
+
let { deltaFormat: i, path: a } = n, o = Ef(e, a, r);
|
|
8920
|
+
console.log(e, a, o);
|
|
8921
|
+
let { type: s, before: c, after: l } = Of(i);
|
|
8922
8922
|
return { cells: [{ value: Rf({
|
|
8923
8923
|
userName: t,
|
|
8924
|
-
type:
|
|
8925
|
-
property: Lf(
|
|
8926
|
-
before:
|
|
8927
|
-
after:
|
|
8928
|
-
sectionName:
|
|
8924
|
+
type: s,
|
|
8925
|
+
property: Lf(a),
|
|
8926
|
+
before: c,
|
|
8927
|
+
after: l,
|
|
8928
|
+
sectionName: o
|
|
8929
8929
|
}) }] };
|
|
8930
8930
|
})
|
|
8931
8931
|
} }), Bf = Object.freeze({
|
|
@@ -8937,13 +8937,13 @@ var Cf = (e = {}) => Sf({
|
|
|
8937
8937
|
label: "Compare",
|
|
8938
8938
|
value: "compare"
|
|
8939
8939
|
}
|
|
8940
|
-
}), Vf = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, transformDiffsConfig: i, sectionNames: a,
|
|
8941
|
-
let
|
|
8940
|
+
}), Vf = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, transformDiffsConfig: i, sectionNames: a, defaultSectionName: o, onClose: s }) => {
|
|
8941
|
+
let c = [Bf.summary, Bf.compare].map(({ label: e, value: t }) => ({
|
|
8942
8942
|
label: e,
|
|
8943
8943
|
value: t
|
|
8944
|
-
})), [
|
|
8945
|
-
if (!
|
|
8946
|
-
let { oldJson:
|
|
8944
|
+
})), [l, u] = m(c[0]), { diffs: d = void 0 } = e || {};
|
|
8945
|
+
if (!d) return null;
|
|
8946
|
+
let { oldJson: f, newJson: p, error: h } = Mf(e, t, n);
|
|
8947
8947
|
return /* @__PURE__ */ z(Ka, {
|
|
8948
8948
|
visible: r,
|
|
8949
8949
|
centered: !0,
|
|
@@ -8952,25 +8952,26 @@ var Cf = (e = {}) => Sf({
|
|
|
8952
8952
|
heading: "Comparison view",
|
|
8953
8953
|
content: /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z(Du, {
|
|
8954
8954
|
name: "ViewTab",
|
|
8955
|
-
onChange: (e) =>
|
|
8956
|
-
options:
|
|
8957
|
-
value:
|
|
8958
|
-
}),
|
|
8955
|
+
onChange: (e) => u(c.find((t) => t.value === e.target.value)),
|
|
8956
|
+
options: c,
|
|
8957
|
+
value: l
|
|
8958
|
+
}), l.value === "summary" ? /* @__PURE__ */ z(zf, {
|
|
8959
8959
|
userName: e.userName,
|
|
8960
8960
|
sectionNames: a,
|
|
8961
|
-
diffs: Pf(
|
|
8962
|
-
|
|
8961
|
+
diffs: Pf(d, i),
|
|
8962
|
+
defaultSectionName: o
|
|
8963
|
+
}) : h ? /* @__PURE__ */ z("div", {
|
|
8963
8964
|
style: { padding: 16 },
|
|
8964
|
-
children:
|
|
8965
|
+
children: h
|
|
8965
8966
|
}) : /* @__PURE__ */ z(kd, {
|
|
8966
|
-
oldJson:
|
|
8967
|
-
newJson:
|
|
8967
|
+
oldJson: f,
|
|
8968
|
+
newJson: p
|
|
8968
8969
|
})] }),
|
|
8969
8970
|
footer: /* @__PURE__ */ z(K, {
|
|
8970
8971
|
label: "Cancel",
|
|
8971
|
-
onClick:
|
|
8972
|
+
onClick: s
|
|
8972
8973
|
}),
|
|
8973
|
-
onClose:
|
|
8974
|
+
onClose: s,
|
|
8974
8975
|
width: "90vw",
|
|
8975
8976
|
height: "90vh"
|
|
8976
8977
|
} })
|
|
@@ -8999,29 +9000,29 @@ var Cf = (e = {}) => Sf({
|
|
|
8999
9000
|
case "Updated": return `Updated by ${r} (${c})`;
|
|
9000
9001
|
default: return `Change by ${r}`;
|
|
9001
9002
|
}
|
|
9002
|
-
}, Wf = ({ logs: e, data: t, total: n, loading: r, selectedPage: i, rowsPerPage: a, sectionNames: o,
|
|
9003
|
-
let [
|
|
9003
|
+
}, Wf = ({ 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: h, isLogDisabled: g }) => {
|
|
9004
|
+
let [_, v] = m(!1), [y, b] = m(null), x = (e) => {
|
|
9004
9005
|
if (e.snapshot) {
|
|
9005
|
-
|
|
9006
|
+
f == null || f(e.snapshot, e);
|
|
9006
9007
|
return;
|
|
9007
9008
|
}
|
|
9008
|
-
|
|
9009
|
-
},
|
|
9009
|
+
b(e), v(!0);
|
|
9010
|
+
}, S = [{ cells: [
|
|
9010
9011
|
{ value: "Change" },
|
|
9011
9012
|
{ value: "Modified by" },
|
|
9012
9013
|
{ value: "Using" },
|
|
9013
9014
|
{ value: "Operation" },
|
|
9014
9015
|
{ value: "Date" }
|
|
9015
|
-
] }],
|
|
9016
|
+
] }], C = e.map((e) => {
|
|
9016
9017
|
var t;
|
|
9017
|
-
let n = (t =
|
|
9018
|
+
let n = (t = g == null ? void 0 : g(e)) == null ? !!(e.snapshot && p || !e.diffs) : t;
|
|
9018
9019
|
return {
|
|
9019
9020
|
cells: [
|
|
9020
9021
|
{
|
|
9021
|
-
value: e.snapshot ? `Snapshot: ${e.snapshot}` : Uf(e,
|
|
9022
|
+
value: e.snapshot ? `Snapshot: ${e.snapshot}` : Uf(e, l),
|
|
9022
9023
|
type: "Link",
|
|
9023
9024
|
disabled: n,
|
|
9024
|
-
onClick: n ? void 0 : () =>
|
|
9025
|
+
onClick: n ? void 0 : () => x(e),
|
|
9025
9026
|
breakWord: !0
|
|
9026
9027
|
},
|
|
9027
9028
|
{
|
|
@@ -9044,14 +9045,14 @@ var Cf = (e = {}) => Sf({
|
|
|
9044
9045
|
type: "Static"
|
|
9045
9046
|
}
|
|
9046
9047
|
],
|
|
9047
|
-
actions:
|
|
9048
|
+
actions: h == null ? void 0 : h(e)
|
|
9048
9049
|
};
|
|
9049
9050
|
});
|
|
9050
9051
|
return /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z(ia, {
|
|
9051
9052
|
heading: /* @__PURE__ */ B(jl, {
|
|
9052
9053
|
gap: !0,
|
|
9053
9054
|
wrap: !0,
|
|
9054
|
-
children: [/* @__PURE__ */ z(ya, { children: "Changes" }),
|
|
9055
|
+
children: [/* @__PURE__ */ z(ya, { children: "Changes" }), c.map((e) => {
|
|
9055
9056
|
var t;
|
|
9056
9057
|
return /* @__PURE__ */ z(ll, {
|
|
9057
9058
|
small: (t = e.small) == null ? !0 : t,
|
|
@@ -9068,9 +9069,9 @@ var Cf = (e = {}) => Sf({
|
|
|
9068
9069
|
theme: Ar.WHITE,
|
|
9069
9070
|
children: /* @__PURE__ */ z(gi, { dark: !0 })
|
|
9070
9071
|
}) : /* @__PURE__ */ z(_c, { table: {
|
|
9071
|
-
headers:
|
|
9072
|
+
headers: S,
|
|
9072
9073
|
testId: "auditlog-table",
|
|
9073
|
-
rows:
|
|
9074
|
+
rows: C,
|
|
9074
9075
|
fixedWidth: "100%",
|
|
9075
9076
|
bordered: !1,
|
|
9076
9077
|
actionsRight: !0,
|
|
@@ -9079,23 +9080,24 @@ var Cf = (e = {}) => Sf({
|
|
|
9079
9080
|
selectedPage: i,
|
|
9080
9081
|
rowsPerPage: {
|
|
9081
9082
|
onChange: (e) => {
|
|
9082
|
-
|
|
9083
|
+
u(Number(e.target.value));
|
|
9083
9084
|
},
|
|
9084
9085
|
options: Hf,
|
|
9085
9086
|
value: a
|
|
9086
9087
|
},
|
|
9087
|
-
onSelectPage: (e) =>
|
|
9088
|
+
onSelectPage: (e) => d(e),
|
|
9088
9089
|
small: !0
|
|
9089
9090
|
} }
|
|
9090
9091
|
} })
|
|
9091
|
-
}),
|
|
9092
|
+
}), _ && y && y.diffs && /* @__PURE__ */ z(Vf, {
|
|
9092
9093
|
sectionNames: o,
|
|
9093
|
-
isOpen:
|
|
9094
|
-
onClose: () =>
|
|
9094
|
+
isOpen: _,
|
|
9095
|
+
onClose: () => v(!1),
|
|
9095
9096
|
auditLogs: e,
|
|
9096
|
-
auditLog:
|
|
9097
|
+
auditLog: y,
|
|
9098
|
+
defaultSectionName: s,
|
|
9097
9099
|
data: t,
|
|
9098
|
-
transformDiffsConfig:
|
|
9100
|
+
transformDiffsConfig: l
|
|
9099
9101
|
})] });
|
|
9100
9102
|
}, Gf = ({ pathName: e, moduleName: t, onNavigate: n, onStartTimingEvent: r }) => {
|
|
9101
9103
|
let i = window.location.href, a = p(i);
|
package/package.json
CHANGED