@oliasoft-open-source/react-ui-library 10.2.6-beta-10 → 10.2.7-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.
Files changed (2) hide show
  1. package/dist/index.js +28 -22
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -10141,17 +10141,23 @@ var eh = (e = {}) => $m({
10141
10141
  label: "50 / page",
10142
10142
  value: 50
10143
10143
  }
10144
- ], bh = (e, t = {}) => {
10145
- let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o } = e, s = dh(n, t).length, c = s ? `${s} change${s === 1 ? "" : "s"}` : "no field changes";
10146
- if (i === "API" && !r) return a === "Created" ? "Created through API" : "Changed through API";
10147
- switch (a) {
10148
- case "Created": return `Created by ${r}`;
10149
- case "Cloned": return `Cloned from ${o}`;
10150
- case "Reverted": return `Reverted by ${r} ${o ? `(from ${o})` : ""}`;
10151
- case "Restored": return `Restored from ${o}`;
10152
- case "Imported": return `Imported by ${r}`;
10153
- case "Updated": return `Updated by ${r} (${c})`;
10154
- default: return `Change by ${r}`;
10144
+ ], bh = (e, t, n = {}) => {
10145
+ let { diffs: r, userName: i, source: a, operation: o, operationMetaData: s } = e, c = dh(r, n).length, l = c ? `${c} change${c === 1 ? "" : "s"}` : "no field changes";
10146
+ if (a === "API" && !i) return o === "Created" ? "Created through API" : "Changed through API";
10147
+ switch (o) {
10148
+ case "Created": return "Created";
10149
+ case "Cloned": return `Cloned (from design ID ${s})`;
10150
+ case "Reverted": {
10151
+ let e = t.find((e) => e.id === s), n = e ? cm({
10152
+ date: ch(e),
10153
+ showTime: !0
10154
+ }) : null;
10155
+ return `Reverted${n ? ` (to ${n})` : ""}`;
10156
+ }
10157
+ case "Restored": return `Restored (from design ID ${s})`;
10158
+ case "Imported": return "Imported";
10159
+ case "Updated": return `Updated (${l})`;
10160
+ default: return "Updated";
10155
10161
  }
10156
10162
  }, xh = ({ 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 }) => {
10157
10163
  let [_, y] = v(!1), [b, w] = v(null), T = (e) => {
@@ -10166,39 +10172,39 @@ var eh = (e = {}) => $m({
10166
10172
  { value: "Using" },
10167
10173
  { value: "Operation" },
10168
10174
  { value: "Date" }
10169
- ] }], D = e.map((e) => {
10170
- var t;
10171
- let n = (t = h == null ? void 0 : h(e)) == null ? !!(e.snapshot && p || !e.diffs) : t, r = e.snapshot ? `Snapshot: ${e.snapshot}` : bh(e, l), i = (e.operation === "Restored" || e.operation === "Cloned") && g;
10175
+ ] }], D = e.map((t) => {
10176
+ var n;
10177
+ let r = t.operation === "Cloned" || t.operation === "Restored", i = !!(t.snapshot && p) || t.operation === "Created" || !r && !t.diffs, a = (n = h == null ? void 0 : h(t)) == null ? i : n;
10172
10178
  return {
10173
10179
  cells: [
10174
10180
  {
10175
- value: r,
10181
+ value: t.snapshot ? `Snapshot: ${t.snapshot}` : bh(t, e, l),
10176
10182
  type: "Link",
10177
- disabled: n,
10178
- onClick: n ? void 0 : i ? () => g(e.operationMetaData) : () => T(e),
10183
+ disabled: a,
10184
+ onClick: a ? void 0 : r && g ? () => g(t.operationMetaData) : () => T(t),
10179
10185
  breakWord: !0
10180
10186
  },
10181
10187
  {
10182
- value: e.userName || (e.source === "API" ? "API" : "Unknown user"),
10188
+ value: t.userName || (t.source === "API" ? "API" : "Unknown user"),
10183
10189
  type: "Static"
10184
10190
  },
10185
10191
  {
10186
- value: e.source || "System",
10192
+ value: t.source || "System",
10187
10193
  type: "Static"
10188
10194
  },
10189
10195
  {
10190
- value: e.operation,
10196
+ value: t.operation,
10191
10197
  type: "Static"
10192
10198
  },
10193
10199
  {
10194
10200
  value: cm({
10195
- date: ch(e),
10201
+ date: ch(t),
10196
10202
  showTime: !0
10197
10203
  }),
10198
10204
  type: "Static"
10199
10205
  }
10200
10206
  ],
10201
- actions: m == null ? void 0 : m(e)
10207
+ actions: m == null ? void 0 : m(t)
10202
10208
  };
10203
10209
  });
10204
10210
  return /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(go, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/react-ui-library",
3
- "version": "10.2.6-beta-10",
3
+ "version": "10.2.7-beta-1",
4
4
  "description": "Reusable UI components for React projects",
5
5
  "homepage": "https://oliasoft-open-source.gitlab.io/react-ui-library",
6
6
  "bugs": {