@oliasoft-open-source/react-ui-library 6.1.0-beta-2 → 6.1.0-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/components/audit-log/audit-log.d.ts.map +1 -1
- package/dist/components/audit-log/comparison-view-modal.d.ts +2 -3
- package/dist/components/audit-log/comparison-view-modal.d.ts.map +1 -1
- package/dist/components/audit-log/utils.d.ts +2 -1
- package/dist/components/audit-log/utils.d.ts.map +1 -1
- package/dist/index.js +71 -68
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit-log.d.ts","sourceRoot":"","sources":["../../../src/components/audit-log/audit-log.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAmB,YAAY,
|
|
1
|
+
{"version":3,"file":"audit-log.d.ts","sourceRoot":"","sources":["../../../src/components/audit-log/audit-log.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAmB,YAAY,EAAkB,MAAM,SAAS,CAAC;AAExE,MAAM,MAAM,iBAAiB,GACzB,SAAS,GACT,QAAQ,GACR,UAAU,GACV,UAAU,GACV,SAAS,CAAC;AAEd,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAE5C,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,iBAAiB,CAAC;IAC7B,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,EAAE,GAAG,IAAI,CAAC;IACvC,iBAAiB,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAC3C,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,oBAAoB,GAAG;IACjC,UAAU,CAAC,EAAE,MAAM,EAAE,CAAC;IACtB,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE;QAClB,GAAG,EAAE,MAAM,CAAC;QACZ,IAAI,EAAE,MAAM,EAAE,CAAC;QACf,KAAK,EAAE,OAAO,CAAC;KAChB,KAAK,OAAO,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,WAAW,EAAE,GAAG,EAAE,CAAC;IACnB,IAAI,EAAE,MAAM,EAAE,CAAC;CAChB,CAAC;AAEF,UAAU,cAAc;IACtB,IAAI,EAAE,YAAY,EAAE,CAAC;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,YAAY,EAAE,CAAC;IAC/B,YAAY,EAAE,YAAY,EAAE,CAAC;IAC7B,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,YAAY,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACrC,mBAAmB,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,IAAI,EAAE,GAAG,CAAC;IACV,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,YAAY,KAAK,IAAI,CAAC;IAChE,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,YAAY,KAAK,GAAG,EAAE,CAAC;IAC1C,aAAa,CAAC,EAAE,CAAC,GAAG,EAAE,YAAY,KAAK,OAAO,CAAC;CAChD;AA2CD,eAAO,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAoJ7C,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { AuditLogItem } from '../../';
|
|
3
|
-
import { ISectionName
|
|
4
|
-
import { TransformDiffsConfig
|
|
3
|
+
import { ISectionName } from './utils';
|
|
4
|
+
import { TransformDiffsConfig } from './audit-log';
|
|
5
5
|
export declare const viewTypes: Readonly<{
|
|
6
6
|
summary: {
|
|
7
7
|
label: string;
|
|
@@ -12,7 +12,6 @@ export declare const viewTypes: Readonly<{
|
|
|
12
12
|
value: string;
|
|
13
13
|
};
|
|
14
14
|
}>;
|
|
15
|
-
export declare const transformDiffs: (diffs: JsonDelta | JsonDelta[] | null, config?: TransformDiffsConfig) => TTransformedDiff[];
|
|
16
15
|
export declare const ComparisonViewModal: ({ auditLog, auditLogs, data, isOpen, transformDiffsConfig, sectionNames, onClose, }: {
|
|
17
16
|
auditLog: AuditLogItem;
|
|
18
17
|
auditLogs: AuditLogItem[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"comparison-view-modal.d.ts","sourceRoot":"","sources":["../../../src/components/audit-log/comparison-view-modal.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AACnD,OAAO,EAA+B,YAAY,EAAc,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"comparison-view-modal.d.ts","sourceRoot":"","sources":["../../../src/components/audit-log/comparison-view-modal.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,SAAS,EAAY,MAAM,OAAO,CAAC;AACnD,OAAO,EAA+B,YAAY,EAAc,MAAM,QAAQ,CAAC;AAE/E,OAAO,EAAkB,YAAY,EAAkB,MAAM,SAAS,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAEnD,eAAO,MAAM,SAAS;;;;;;;;;EASpB,CAAC;AAEH,eAAO,MAAM,mBAAmB,GAAI,qFAQjC;IACD,QAAQ,EAAE,YAAY,CAAC;IACvB,SAAS,EAAE,YAAY,EAAE,CAAC;IAC1B,IAAI,EAAE,GAAG,CAAC;IACV,YAAY,EAAE,YAAY,EAAE,CAAC;IAC7B,MAAM,EAAE,OAAO,CAAC;IAChB,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB,mDA0DA,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AuditLogItem } from './audit-log';
|
|
1
|
+
import { AuditLogItem, TransformDiffsConfig, TTransformedDiff } from './audit-log';
|
|
2
2
|
export type ChangeCounts = {
|
|
3
3
|
total: number;
|
|
4
4
|
added: number;
|
|
@@ -26,5 +26,6 @@ export declare const createDiffJson: (auditLog: AuditLogItem, auditLogs: AuditLo
|
|
|
26
26
|
newJson: string;
|
|
27
27
|
error?: string;
|
|
28
28
|
};
|
|
29
|
+
export declare const transformDiffs: (diffs: JsonDelta | JsonDelta[] | null, config?: TransformDiffsConfig) => TTransformedDiff[];
|
|
29
30
|
export {};
|
|
30
31
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/audit-log/utils.ts"],"names":[],"mappings":"AAKA,OAAO,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/audit-log/utils.ts"],"names":[],"mappings":"AAKA,OAAO,EACL,YAAY,EACZ,oBAAoB,EACpB,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAUrB,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,KAAK,cAAc,GAAG;IACpB,IAAI,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IACzC,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AA6DF,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,eAAO,MAAM,cAAc,GACzB,cAAc,YAAY,EAAE,EAC5B,aAAa,MAAM,EAAE,KACpB,MAUF,CAAC;AAEF,eAAO,MAAM,MAAM,GAAI,GAAG,GAAG,WAuB5B,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,aAAa,GAAG,EAAE,KAAG,cAqBnD,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,GAAG,CAAC;AAoB5B,eAAO,MAAM,eAAe,GAAI,KAAK,YAAY,uBAA8B,CAAC;AAEhF,eAAO,MAAM,cAAc,GACzB,UAAU,YAAY,EACtB,WAAW,YAAY,EAAE,EACzB,MAAM,GAAG,KACR;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAwDpD,CAAC;AA8BF,eAAO,MAAM,cAAc,GACzB,OAAO,SAAS,GAAG,SAAS,EAAE,GAAG,IAAI,EACrC,SAAQ,oBAAyB,uBASlC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -8783,47 +8783,47 @@ $.Diff = function(e, t) {
|
|
|
8783
8783
|
return n.join("").replace(/%20/g, " ");
|
|
8784
8784
|
};
|
|
8785
8785
|
//#endregion
|
|
8786
|
-
//#region src/components/audit-log/
|
|
8787
|
-
var Cf = (
|
|
8786
|
+
//#region src/components/audit-log/create-diff-patcher.tsx
|
|
8787
|
+
var Cf = (e = {}) => Sf({
|
|
8788
8788
|
...e,
|
|
8789
8789
|
textDiff: {
|
|
8790
8790
|
diffMatchPatch: $,
|
|
8791
8791
|
minLength: 120
|
|
8792
8792
|
},
|
|
8793
8793
|
cloneDiffValues: !0
|
|
8794
|
-
})
|
|
8794
|
+
}), wf = ["user", "unittemplate"], Tf = Cf(), Ef = (e, t) => {
|
|
8795
8795
|
let n = Object.fromEntries((e || []).map((e) => [e.sectionKey, e.sectionLabel]));
|
|
8796
8796
|
for (let e = t.length - 1; e >= 0; e--) {
|
|
8797
8797
|
let r = n[t[e]];
|
|
8798
8798
|
if (r) return r;
|
|
8799
8799
|
}
|
|
8800
8800
|
return "";
|
|
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);
|
|
8804
|
-
},
|
|
8804
|
+
}, Of = (e) => {
|
|
8805
8805
|
switch (e.length) {
|
|
8806
8806
|
case 1: {
|
|
8807
8807
|
let [t] = e;
|
|
8808
8808
|
return {
|
|
8809
8809
|
type: "created",
|
|
8810
8810
|
before: "",
|
|
8811
|
-
after:
|
|
8811
|
+
after: Df(t)
|
|
8812
8812
|
};
|
|
8813
8813
|
}
|
|
8814
8814
|
case 2: {
|
|
8815
8815
|
let [t, n] = e;
|
|
8816
8816
|
return {
|
|
8817
8817
|
type: "modified",
|
|
8818
|
-
before:
|
|
8819
|
-
after:
|
|
8818
|
+
before: Df(t),
|
|
8819
|
+
after: Df(n)
|
|
8820
8820
|
};
|
|
8821
8821
|
}
|
|
8822
8822
|
case 3: {
|
|
8823
8823
|
let [t] = e;
|
|
8824
8824
|
return {
|
|
8825
8825
|
type: "deleted",
|
|
8826
|
-
before:
|
|
8826
|
+
before: Df(t),
|
|
8827
8827
|
after: ""
|
|
8828
8828
|
};
|
|
8829
8829
|
}
|
|
@@ -8833,15 +8833,15 @@ var Cf = ((e = {}) => Sf({
|
|
|
8833
8833
|
after: ""
|
|
8834
8834
|
};
|
|
8835
8835
|
}
|
|
8836
|
-
},
|
|
8837
|
-
let r =
|
|
8836
|
+
}, kf = (e) => Array.isArray(e), Af = (e, t) => t ? kf(t) ? t.length === 0 ? e : t.reduce((e, t) => Tf.unpatch(Xt(e), Xt(t)), Xt(e)) : Tf.unpatch(Xt(e), Xt(t)) : e, jf = (e) => e.createdAt || e.date, Mf = (e, t, n) => {
|
|
8837
|
+
let r = jf(e);
|
|
8838
8838
|
if (!r) return {
|
|
8839
8839
|
oldJson: "",
|
|
8840
8840
|
newJson: "",
|
|
8841
8841
|
error: `Cannot create comparison view: missing date for audit log ${e.id}`
|
|
8842
8842
|
};
|
|
8843
8843
|
let i = t.filter((e) => {
|
|
8844
|
-
let t =
|
|
8844
|
+
let t = jf(e);
|
|
8845
8845
|
return !!(e.diffs && t && t >= r);
|
|
8846
8846
|
}), a = Array.from({ length: i.length + 1 });
|
|
8847
8847
|
a[0] = Xt(n);
|
|
@@ -8854,7 +8854,7 @@ var Cf = ((e = {}) => Sf({
|
|
|
8854
8854
|
a[e + 1] = a[e];
|
|
8855
8855
|
continue;
|
|
8856
8856
|
}
|
|
8857
|
-
a[e + 1] =
|
|
8857
|
+
a[e + 1] = Af(a[e], t);
|
|
8858
8858
|
}
|
|
8859
8859
|
let e = i.length > 0 ? a[i.length - 1] : n, t = i.length > 0 ? a[i.length] : n;
|
|
8860
8860
|
o = JSON.stringify(t == null ? "" : t, null, 2), s = JSON.stringify(e == null ? "" : e, null, 2);
|
|
@@ -8869,7 +8869,28 @@ var Cf = ((e = {}) => Sf({
|
|
|
8869
8869
|
oldJson: o,
|
|
8870
8870
|
newJson: s
|
|
8871
8871
|
};
|
|
8872
|
-
},
|
|
8872
|
+
}, Nf = (e, t, n = {}, r = []) => {
|
|
8873
|
+
var i;
|
|
8874
|
+
if (!e) return;
|
|
8875
|
+
let a = [...wf, ...(i = n.hiddenKeys) == null ? [] : i];
|
|
8876
|
+
Object.keys(e).forEach((i) => {
|
|
8877
|
+
var o;
|
|
8878
|
+
let s = e[i];
|
|
8879
|
+
if (a.includes(i) || (o = n.shouldSkip) != null && o.call(n, {
|
|
8880
|
+
key: i,
|
|
8881
|
+
path: r,
|
|
8882
|
+
value: s
|
|
8883
|
+
})) return;
|
|
8884
|
+
let c = [...r, i];
|
|
8885
|
+
tn(s) ? t.push({
|
|
8886
|
+
deltaFormat: [...s],
|
|
8887
|
+
path: c
|
|
8888
|
+
}) : ln(s) && Nf(s, t, n, c);
|
|
8889
|
+
});
|
|
8890
|
+
}, Pf = (e, t = {}) => {
|
|
8891
|
+
let n = [];
|
|
8892
|
+
return e ? (Nf(e, n, t), n) : [];
|
|
8893
|
+
}, Ff = (e) => e.replace(/\[\d+\]/g, "").replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[_-]/g, " ").replace(/\s+/g, " ").trim().replace(/^./, (e) => e.toUpperCase()), If = (e) => {
|
|
8873
8894
|
if (e == null || e === "") return "empty";
|
|
8874
8895
|
if (typeof e == "boolean") return e ? "true" : "false";
|
|
8875
8896
|
if (typeof e == "string") return e;
|
|
@@ -8880,32 +8901,32 @@ var Cf = ((e = {}) => Sf({
|
|
|
8880
8901
|
} catch {
|
|
8881
8902
|
return String(e);
|
|
8882
8903
|
}
|
|
8883
|
-
},
|
|
8904
|
+
}, Lf = (e, t = e.length - 1) => {
|
|
8884
8905
|
if (t >= e.length) return "Value";
|
|
8885
8906
|
let n = e[t];
|
|
8886
|
-
return !n || Mn(n) ?
|
|
8887
|
-
},
|
|
8888
|
-
let o =
|
|
8907
|
+
return !n || Mn(n) ? Lf(e, t - 1) : Ff(n);
|
|
8908
|
+
}, Rf = ({ userName: e, type: t, property: n, before: r, after: i, sectionName: a }) => {
|
|
8909
|
+
let o = If(r), s = If(i), c = a ? ` in ${a}` : "";
|
|
8889
8910
|
switch (t) {
|
|
8890
8911
|
case "modified": return `${e} updated ${n} from ${o} to ${s}${c}.`;
|
|
8891
8912
|
case "created": return `${e} created ${s}${c}.`;
|
|
8892
8913
|
case "deleted": return `${e} deleted ${o}${c}.`;
|
|
8893
8914
|
default: return `${e} changed ${n}${c}.`;
|
|
8894
8915
|
}
|
|
8895
|
-
},
|
|
8916
|
+
}, zf = ({ sectionNames: e, userName: t, diffs: n }) => /* @__PURE__ */ z(_c, { table: {
|
|
8896
8917
|
headers: [{ cells: [{ value: "Changes" }] }],
|
|
8897
8918
|
rows: n.map((n) => {
|
|
8898
|
-
let { deltaFormat: r, path: i } = n, a =
|
|
8899
|
-
return { cells: [{ value:
|
|
8919
|
+
let { deltaFormat: r, path: i } = n, a = Ef(e, i), { type: o, before: s, after: c } = Of(r);
|
|
8920
|
+
return { cells: [{ value: Rf({
|
|
8900
8921
|
userName: t,
|
|
8901
8922
|
type: o,
|
|
8902
|
-
property:
|
|
8923
|
+
property: Lf(i),
|
|
8903
8924
|
before: s,
|
|
8904
8925
|
after: c,
|
|
8905
8926
|
sectionName: a
|
|
8906
8927
|
}) }] };
|
|
8907
8928
|
})
|
|
8908
|
-
} }),
|
|
8929
|
+
} }), Bf = Object.freeze({
|
|
8909
8930
|
summary: {
|
|
8910
8931
|
label: "Summary",
|
|
8911
8932
|
value: "summary"
|
|
@@ -8914,32 +8935,13 @@ var Cf = ((e = {}) => Sf({
|
|
|
8914
8935
|
label: "Compare",
|
|
8915
8936
|
value: "compare"
|
|
8916
8937
|
}
|
|
8917
|
-
}),
|
|
8918
|
-
|
|
8919
|
-
let r = [...If, ...(n = t.hiddenKeys) == null ? [] : n], i = [], a = (e, n = []) => {
|
|
8920
|
-
e && Object.keys(e).forEach((o) => {
|
|
8921
|
-
var s;
|
|
8922
|
-
let c = e[o];
|
|
8923
|
-
if (r.includes(o) || (s = t.shouldSkip) != null && s.call(t, {
|
|
8924
|
-
key: o,
|
|
8925
|
-
path: n,
|
|
8926
|
-
value: c
|
|
8927
|
-
})) return;
|
|
8928
|
-
let l = [...n, o];
|
|
8929
|
-
tn(c) ? i.push({
|
|
8930
|
-
deltaFormat: [...c],
|
|
8931
|
-
path: l
|
|
8932
|
-
}) : ln(c) && a(c, l);
|
|
8933
|
-
});
|
|
8934
|
-
};
|
|
8935
|
-
return e ? (a(e), i) : [];
|
|
8936
|
-
}, zf = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, transformDiffsConfig: i, sectionNames: a, onClose: o }) => {
|
|
8937
|
-
let s = [Lf.summary, Lf.compare].map(({ label: e, value: t }) => ({
|
|
8938
|
+
}), Vf = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, transformDiffsConfig: i, sectionNames: a, onClose: o }) => {
|
|
8939
|
+
let s = [Bf.summary, Bf.compare].map(({ label: e, value: t }) => ({
|
|
8938
8940
|
label: e,
|
|
8939
8941
|
value: t
|
|
8940
8942
|
})), [c, l] = m(s[0]), { diffs: u = void 0 } = e || {};
|
|
8941
8943
|
if (!u) return null;
|
|
8942
|
-
let { oldJson: d, newJson: f, error: p } =
|
|
8944
|
+
let { oldJson: d, newJson: f, error: p } = Mf(e, t, n);
|
|
8943
8945
|
return /* @__PURE__ */ z(Ka, {
|
|
8944
8946
|
visible: r,
|
|
8945
8947
|
centered: !0,
|
|
@@ -8951,10 +8953,10 @@ var Cf = ((e = {}) => Sf({
|
|
|
8951
8953
|
onChange: (e) => l(s.find((t) => t.value === e.target.value)),
|
|
8952
8954
|
options: s,
|
|
8953
8955
|
value: c
|
|
8954
|
-
}), c.value === "summary" ? /* @__PURE__ */ z(
|
|
8956
|
+
}), c.value === "summary" ? /* @__PURE__ */ z(zf, {
|
|
8955
8957
|
userName: e.userName,
|
|
8956
8958
|
sectionNames: a,
|
|
8957
|
-
diffs:
|
|
8959
|
+
diffs: Pf(u, i)
|
|
8958
8960
|
}) : p ? /* @__PURE__ */ z("div", {
|
|
8959
8961
|
style: { padding: 16 },
|
|
8960
8962
|
children: p
|
|
@@ -8971,7 +8973,7 @@ var Cf = ((e = {}) => Sf({
|
|
|
8971
8973
|
height: "90vh"
|
|
8972
8974
|
} })
|
|
8973
8975
|
});
|
|
8974
|
-
},
|
|
8976
|
+
}, Hf = [
|
|
8975
8977
|
{
|
|
8976
8978
|
label: "10 / page",
|
|
8977
8979
|
value: 10
|
|
@@ -8984,18 +8986,18 @@ var Cf = ((e = {}) => Sf({
|
|
|
8984
8986
|
label: "50 / page",
|
|
8985
8987
|
value: 50
|
|
8986
8988
|
}
|
|
8987
|
-
],
|
|
8988
|
-
let { diffs:
|
|
8989
|
-
if (
|
|
8990
|
-
switch (
|
|
8991
|
-
case "Created": return `Created by ${
|
|
8992
|
-
case "Cloned": return `Cloned by ${
|
|
8993
|
-
case "Reverted": return `Reverted by ${
|
|
8994
|
-
case "Imported": return `Imported by ${
|
|
8995
|
-
case "Updated": return `Updated by ${
|
|
8996
|
-
default: return `Change by ${
|
|
8997
|
-
}
|
|
8998
|
-
},
|
|
8989
|
+
], Uf = (e, t = {}) => {
|
|
8990
|
+
let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s = Pf(n, t).length, c = s ? `${s} change${s === 1 ? "" : "s"}` : "no field changes";
|
|
8991
|
+
if (i === "API") return a === "Created" ? "Created through API" : "Changed through API";
|
|
8992
|
+
switch (a) {
|
|
8993
|
+
case "Created": return `Created by ${r}`;
|
|
8994
|
+
case "Cloned": return `Cloned by ${r} (from ${o || "unknown"})`;
|
|
8995
|
+
case "Reverted": return `Reverted by ${r}`;
|
|
8996
|
+
case "Imported": return `Imported by ${r}`;
|
|
8997
|
+
case "Updated": return `Updated by ${r} (${c})`;
|
|
8998
|
+
default: return `Change by ${r}`;
|
|
8999
|
+
}
|
|
9000
|
+
}, Wf = ({ logs: e, data: t, total: n, loading: r, selectedPage: i, rowsPerPage: a, sectionNames: o, filterToggles: s = [], transformDiffsConfig: c, onChangeRowsPerPage: l, onSelectPage: u, onClickSnapshot: d, snapshotLoading: f, getActions: p, isLogDisabled: h }) => {
|
|
8999
9001
|
let [g, _] = m(!1), [v, y] = m(null), b = (e) => {
|
|
9000
9002
|
if (e.snapshot) {
|
|
9001
9003
|
d == null || d(e.snapshot, e);
|
|
@@ -9014,7 +9016,7 @@ var Cf = ((e = {}) => Sf({
|
|
|
9014
9016
|
return {
|
|
9015
9017
|
cells: [
|
|
9016
9018
|
{
|
|
9017
|
-
value: e.snapshot ? `Snapshot: ${e.snapshot}` :
|
|
9019
|
+
value: e.snapshot ? `Snapshot: ${e.snapshot}` : Uf(e, c),
|
|
9018
9020
|
type: "Link",
|
|
9019
9021
|
disabled: n,
|
|
9020
9022
|
onClick: n ? void 0 : () => b(e),
|
|
@@ -9034,7 +9036,7 @@ var Cf = ((e = {}) => Sf({
|
|
|
9034
9036
|
},
|
|
9035
9037
|
{
|
|
9036
9038
|
value: Ad({
|
|
9037
|
-
date:
|
|
9039
|
+
date: jf(e),
|
|
9038
9040
|
showTime: !0
|
|
9039
9041
|
}),
|
|
9040
9042
|
type: "Static"
|
|
@@ -9065,6 +9067,7 @@ var Cf = ((e = {}) => Sf({
|
|
|
9065
9067
|
children: /* @__PURE__ */ z(gi, { dark: !0 })
|
|
9066
9068
|
}) : /* @__PURE__ */ z(_c, { table: {
|
|
9067
9069
|
headers: x,
|
|
9070
|
+
testId: "auditlog-table",
|
|
9068
9071
|
rows: S,
|
|
9069
9072
|
fixedWidth: "100%",
|
|
9070
9073
|
bordered: !1,
|
|
@@ -9076,14 +9079,14 @@ var Cf = ((e = {}) => Sf({
|
|
|
9076
9079
|
onChange: (e) => {
|
|
9077
9080
|
l(Number(e.target.value));
|
|
9078
9081
|
},
|
|
9079
|
-
options:
|
|
9082
|
+
options: Hf,
|
|
9080
9083
|
value: a
|
|
9081
9084
|
},
|
|
9082
9085
|
onSelectPage: (e) => u(e),
|
|
9083
9086
|
small: !0
|
|
9084
9087
|
} }
|
|
9085
9088
|
} })
|
|
9086
|
-
}), g && v && v.diffs && /* @__PURE__ */ z(
|
|
9089
|
+
}), g && v && v.diffs && /* @__PURE__ */ z(Vf, {
|
|
9087
9090
|
sectionNames: o,
|
|
9088
9091
|
isOpen: g,
|
|
9089
9092
|
onClose: () => _(!1),
|
|
@@ -9092,7 +9095,7 @@ var Cf = ((e = {}) => Sf({
|
|
|
9092
9095
|
data: t,
|
|
9093
9096
|
transformDiffsConfig: c
|
|
9094
9097
|
})] });
|
|
9095
|
-
},
|
|
9098
|
+
}, Gf = ({ pathName: e, moduleName: t, onNavigate: n, onStartTimingEvent: r }) => {
|
|
9096
9099
|
let i = window.location.href, a = p(i);
|
|
9097
9100
|
return c(() => {
|
|
9098
9101
|
a.current = i;
|
|
@@ -9115,10 +9118,10 @@ var Cf = ((e = {}) => Sf({
|
|
|
9115
9118
|
});
|
|
9116
9119
|
};
|
|
9117
9120
|
}, [e, t]), null;
|
|
9118
|
-
},
|
|
9121
|
+
}, Kf = (e) => typeof e == "string" || typeof e == "number" || typeof e == "boolean" || e === null, qf = (e) => {
|
|
9119
9122
|
yd(md.LanguageKey, e.languageKey), Object.entries(e).forEach(([e, t]) => {
|
|
9120
|
-
e === md.Translations ? yd(e, gd(t)) : yd(e,
|
|
9123
|
+
e === md.Translations ? yd(e, gd(t)) : yd(e, Kf(t) ? t : { ...t });
|
|
9121
9124
|
});
|
|
9122
9125
|
};
|
|
9123
9126
|
//#endregion
|
|
9124
|
-
export { Jr as Accordion, pi as AccordionWithDefaultToggle, Xi as Actions, Dr as Align,
|
|
9127
|
+
export { Jr as Accordion, pi as AccordionWithDefaultToggle, Xi as Actions, Dr as Align, Wf as AuditLog, Ii as Badge, ea as Breadcrumb, Qi as BreadcrumbLinkType, K as Button, na as ButtonGroup, Or as ButtonPosition, _i as ButtonType, ia as Card, li as CheckBox, Hr as Chevron, Gr as Collapse, Er as Color, la as ColorInput, fa as Column, Sa as Dialog, kd as DiffViewer, U as DisabledContext, _a as Divider, ka as Drawer, Pu as ElementType, Oc as Empty, Al as Field, El as FileButton, za as FileInput, jl as Flex, Nl as FormRow, Ll as Grid, V as GroupOrder, ya as Heading, ci as HelpIcon, W as Icon, H as IconType, Pa as Input, Ma as InputGroup, Ds as InputGroupAddon, Ia as InputReaderMethods, jr as InputType, Ol as Label, Xl as List, zl as ListHeading, Gl as ListSubheading, Ql as Loader, Ji as Menu, wi as MenuCarat, Ci as MenuType, po as Message, oo as MessageType, Ka as Modal, yo as NativeSelect, Us as NumberInput, iu as OptionDropdown, ou as Page, Os as Pagination, Bu as PopConfirm, sa as Popover, Ha as Portal, cu as PrintHeader, Ya as ProgressBar, lu as RadioButton, mu as RichTextInput, gu as Row, xs as Select, Td as SettingField, xu as SideBar, Cu as Skeleton, Zs as Slider, eo as SmartUploadModal, Ba as Spacer, gi as Spinner, _c as Table, Tl as TableImportExport, Du as Tabs, ha as Text, Au as TextArea, Ou as TextLink, kr as TextTransform, Ar as Theme, ur as Toaster, ll as Toggle, G as Tooltip, Lu as TopBar, Wu as Tree, Ju as TreeTable, Tr as TriggerType, pd as UnitInput, Cd as UnitTable, Gf as UsageTracker, ol as dismissToast, ud as initializeContext, qf as initializeGuiLibrary, La as readFile, al as toast, bo as useFocus, Va as useKeyboardEvent, Co as useWindowWidth };
|
package/package.json
CHANGED