@oliasoft-open-source/react-ui-library 10.2.1 → 10.2.2-beta-1
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.d.ts +2 -1
- package/dist/index.js +17 -16
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -54,7 +54,7 @@ export declare interface AuditLogItem {
|
|
|
54
54
|
snapshot?: string | null;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
|
-
export declare type AuditLogOperation = 'Created' | 'Cloned' | 'Reverted' | 'Imported' | 'Updated';
|
|
57
|
+
export declare type AuditLogOperation = 'Created' | 'Cloned' | 'Reverted' | 'Restored' | 'Imported' | 'Updated';
|
|
58
58
|
|
|
59
59
|
export declare const Badge: ({ children, color, textColor: textColorProp, title, dot, margin, small, }: IBadgeProps) => JSX.Element;
|
|
60
60
|
|
|
@@ -254,6 +254,7 @@ declare interface IAuditLogProps {
|
|
|
254
254
|
snapshotLoading?: boolean;
|
|
255
255
|
getActions?: (log: AuditLogItem) => any[];
|
|
256
256
|
isLogDisabled?: (log: AuditLogItem) => boolean;
|
|
257
|
+
onClickNavigateToDesgin?: (operationMetaData: string | number) => void;
|
|
257
258
|
}
|
|
258
259
|
|
|
259
260
|
export declare interface IBadgeProps {
|
package/dist/index.js
CHANGED
|
@@ -10089,35 +10089,36 @@ var Ym = (e = {}) => Jm({
|
|
|
10089
10089
|
if (i === "API" && !r) return a === "Created" ? "Created through API" : "Changed through API";
|
|
10090
10090
|
switch (a) {
|
|
10091
10091
|
case "Created": return `Created by ${r}`;
|
|
10092
|
-
case "Cloned": return `Cloned
|
|
10093
|
-
case "Reverted": return `
|
|
10092
|
+
case "Cloned": return `Cloned from ${o}`;
|
|
10093
|
+
case "Reverted": return `Reverted by ${r} ${o ? `(from ${o})` : ""}`;
|
|
10094
|
+
case "Restored": return `Restored from ${o}`;
|
|
10094
10095
|
case "Imported": return `Imported by ${r}`;
|
|
10095
10096
|
case "Updated": return `Updated by ${r} (${c})`;
|
|
10096
10097
|
default: return `Change by ${r}`;
|
|
10097
10098
|
}
|
|
10098
|
-
}, gh = ({ 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: m, isLogDisabled: h }) => {
|
|
10099
|
-
let [
|
|
10099
|
+
}, gh = ({ 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: m, isLogDisabled: h, onClickNavigateToDesgin: g }) => {
|
|
10100
|
+
let [_, y] = v(!1), [b, w] = v(null), T = (e) => {
|
|
10100
10101
|
if (e.snapshot) {
|
|
10101
10102
|
f == null || f(e.snapshot, e);
|
|
10102
10103
|
return;
|
|
10103
10104
|
}
|
|
10104
|
-
|
|
10105
|
-
},
|
|
10105
|
+
w(e), y(!0);
|
|
10106
|
+
}, E = [{ cells: [
|
|
10106
10107
|
{ value: "Change" },
|
|
10107
10108
|
{ value: "Modified by" },
|
|
10108
10109
|
{ value: "Using" },
|
|
10109
10110
|
{ value: "Operation" },
|
|
10110
10111
|
{ value: "Date" }
|
|
10111
|
-
] }],
|
|
10112
|
+
] }], D = e.map((e) => {
|
|
10112
10113
|
var t;
|
|
10113
|
-
let n = (t = h == null ? void 0 : h(e)) == null ? !!(e.snapshot && p || !e.diffs) : t;
|
|
10114
|
+
let n = (t = h == null ? void 0 : h(e)) == null ? !!(e.snapshot && p || !e.diffs) : t, r = e.snapshot ? `Snapshot: ${e.snapshot}` : hh(e, l), i = (e.operation === "Restored" || e.operation === "Cloned") && g;
|
|
10114
10115
|
return {
|
|
10115
10116
|
cells: [
|
|
10116
10117
|
{
|
|
10117
|
-
value:
|
|
10118
|
+
value: r,
|
|
10118
10119
|
type: "Link",
|
|
10119
10120
|
disabled: n,
|
|
10120
|
-
onClick: n ? void 0 : () =>
|
|
10121
|
+
onClick: n ? void 0 : i ? () => g(e.operationMetaData) : () => T(e),
|
|
10121
10122
|
breakWord: !0
|
|
10122
10123
|
},
|
|
10123
10124
|
{
|
|
@@ -10164,9 +10165,9 @@ var Ym = (e = {}) => Jm({
|
|
|
10164
10165
|
theme: Mi.WHITE,
|
|
10165
10166
|
children: /* @__PURE__ */ S(Sa, { dark: !0 })
|
|
10166
10167
|
}) : /* @__PURE__ */ S(eu, { table: {
|
|
10167
|
-
headers:
|
|
10168
|
+
headers: E,
|
|
10168
10169
|
testId: "auditlog-table",
|
|
10169
|
-
rows:
|
|
10170
|
+
rows: D,
|
|
10170
10171
|
fixedWidth: "100%",
|
|
10171
10172
|
bordered: !1,
|
|
10172
10173
|
actionsRight: !0,
|
|
@@ -10184,12 +10185,12 @@ var Ym = (e = {}) => Jm({
|
|
|
10184
10185
|
small: !0
|
|
10185
10186
|
} }
|
|
10186
10187
|
} })
|
|
10187
|
-
}),
|
|
10188
|
+
}), _ && b && b.diffs && /* @__PURE__ */ S(ph, {
|
|
10188
10189
|
sectionNames: o,
|
|
10189
|
-
isOpen:
|
|
10190
|
-
onClose: () =>
|
|
10190
|
+
isOpen: _,
|
|
10191
|
+
onClose: () => y(!1),
|
|
10191
10192
|
auditLogs: e,
|
|
10192
|
-
auditLog:
|
|
10193
|
+
auditLog: b,
|
|
10193
10194
|
defaultSectionName: s,
|
|
10194
10195
|
data: t,
|
|
10195
10196
|
transformDiffsConfig: l
|
package/package.json
CHANGED