@oliasoft-open-source/react-ui-library 5.23.0-beta-21 → 5.23.0-beta-23
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"changes-overview.d.ts","sourceRoot":"","sources":["../../../src/components/audit-log/changes-overview.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkC,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"changes-overview.d.ts","sourceRoot":"","sources":["../../../src/components/audit-log/changes-overview.tsx"],"names":[],"mappings":"AACA,OAAO,EAAkC,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AA+E/C,eAAO,MAAM,eAAe,GAAI,oCAI7B;IACD,YAAY,EAAE,YAAY,EAAE,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,gBAAgB,EAAE,CAAC;CAC3B,4CA+BA,CAAC"}
|
|
@@ -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;AAG/E,OAAO,EAAkB,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,eAAO,MAAM,SAAS;;;;;;;;;EASpB,CAAC;AAEH,eAAO,MAAM,cAAc,GAAI,OAAO,SAAS,GAAG,SAAS,EAAE,GAAG,IAAI,uBA8BnE,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,+DAOjC;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,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB,
|
|
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;AAG/E,OAAO,EAAkB,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C,eAAO,MAAM,SAAS;;;;;;;;;EASpB,CAAC;AAEH,eAAO,MAAM,cAAc,GAAI,OAAO,SAAS,GAAG,SAAS,EAAE,GAAG,IAAI,uBA8BnE,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,+DAOjC;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,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,CAAC,EAAE,SAAS,CAAC;CACzB,mDA0DA,CAAC"}
|
|
@@ -25,6 +25,7 @@ export declare const getAuditLogDate: (log: AuditLogItem) => string | undefined;
|
|
|
25
25
|
export declare const createDiffJson: (auditLog: AuditLogItem, auditLogs: AuditLogItem[], data: any) => {
|
|
26
26
|
oldJson: string;
|
|
27
27
|
newJson: string;
|
|
28
|
+
error?: string;
|
|
28
29
|
};
|
|
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,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAQ3C,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,eAAO,MAAM,WAAW,GAAI,OAAO,GAAG,KAAG,YAexC,CAAC;AAEF,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
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/components/audit-log/utils.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAQ3C,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,eAAO,MAAM,WAAW,GAAI,OAAO,GAAG,KAAG,YAexC,CAAC;AAEF,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;CAsDpD,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -8755,7 +8755,11 @@ var Zd = ((e = {}) => Xd({
|
|
|
8755
8755
|
}
|
|
8756
8756
|
}, af = (e) => Array.isArray(e), of = (e, t) => t ? af(t) ? t.length === 0 ? e : t.reduce((e, t) => Zd.unpatch(zt(e), zt(t)), zt(e)) : Zd.unpatch(zt(e), zt(t)) : e, sf = (e) => e.createdAt || e.date, cf = (e, t, n) => {
|
|
8757
8757
|
let r = sf(e);
|
|
8758
|
-
if (!r)
|
|
8758
|
+
if (!r) return {
|
|
8759
|
+
oldJson: "",
|
|
8760
|
+
newJson: "",
|
|
8761
|
+
error: `Cannot create comparison view: missing date for audit log ${e.id}`
|
|
8762
|
+
};
|
|
8759
8763
|
let i = t.filter((e) => {
|
|
8760
8764
|
let t = sf(e);
|
|
8761
8765
|
return !!(e.diffs && t && t >= r);
|
|
@@ -8775,7 +8779,11 @@ var Zd = ((e = {}) => Xd({
|
|
|
8775
8779
|
let e = i.length > 0 ? a[i.length - 1] : n, t = i.length > 0 ? a[i.length] : n;
|
|
8776
8780
|
o = JSON.stringify(t == null ? "" : t, null, 2), s = JSON.stringify(e == null ? "" : e, null, 2);
|
|
8777
8781
|
} catch (e) {
|
|
8778
|
-
console.error("err", e)
|
|
8782
|
+
return console.error("err", e), {
|
|
8783
|
+
oldJson: "",
|
|
8784
|
+
newJson: "",
|
|
8785
|
+
error: "Cannot create comparison view for this audit log."
|
|
8786
|
+
};
|
|
8779
8787
|
}
|
|
8780
8788
|
return {
|
|
8781
8789
|
oldJson: o,
|
|
@@ -8797,7 +8805,9 @@ var Zd = ((e = {}) => Xd({
|
|
|
8797
8805
|
let n = e[t];
|
|
8798
8806
|
return !n || xn(n) ? df(e, t - 1) : lf(n);
|
|
8799
8807
|
}, ff = ({ userName: e, type: t, property: n, before: r, after: i, sectionName: a }) => {
|
|
8800
|
-
let o = uf(r), s = uf(i)
|
|
8808
|
+
let o = uf(r), s = uf(i);
|
|
8809
|
+
console.log(s);
|
|
8810
|
+
let c = a ? ` in ${a}` : "";
|
|
8801
8811
|
switch (t) {
|
|
8802
8812
|
case "modified": return `${e} updated ${n} from ${o} to ${s}${c}.`;
|
|
8803
8813
|
case "created": return `${e} created ${s}${c}.`;
|
|
@@ -8842,7 +8852,7 @@ var Zd = ((e = {}) => Xd({
|
|
|
8842
8852
|
value: t
|
|
8843
8853
|
})), [s, c] = m(o[0]), { diffs: l = void 0 } = e || {};
|
|
8844
8854
|
if (!l) return null;
|
|
8845
|
-
let { oldJson: u, newJson: d } = cf(e, t, n);
|
|
8855
|
+
let { oldJson: u, newJson: d, error: f } = cf(e, t, n);
|
|
8846
8856
|
return /* @__PURE__ */ R(Ca, {
|
|
8847
8857
|
visible: r,
|
|
8848
8858
|
centered: !0,
|
|
@@ -8858,6 +8868,9 @@ var Zd = ((e = {}) => Xd({
|
|
|
8858
8868
|
userName: e.userName,
|
|
8859
8869
|
sectionNames: i,
|
|
8860
8870
|
diffs: hf(l)
|
|
8871
|
+
}) : f ? /* @__PURE__ */ R("div", {
|
|
8872
|
+
style: { padding: 16 },
|
|
8873
|
+
children: f
|
|
8861
8874
|
}) : /* @__PURE__ */ R(ad, {
|
|
8862
8875
|
oldJson: u,
|
|
8863
8876
|
newJson: d
|
package/package.json
CHANGED