@oliasoft-open-source/react-ui-library 10.2.6-beta-3 → 10.2.6-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.
Files changed (2) hide show
  1. package/dist/index.js +20 -20
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -10113,20 +10113,20 @@ var Qm = (e = {}) => Zm({
10113
10113
  label: "50 / page",
10114
10114
  value: 50
10115
10115
  }
10116
- ], vh = (e, t = {}) => {
10117
- let { diffs: n, userName: r, source: i, operation: a, operationMetaData: o, createdAt: s } = e, c = lh(n, t).length, l = c ? `${c} change${c === 1 ? "" : "s"}` : "no field changes";
10118
- if (i === "API" && !r) return a === "Created" ? "Created through API" : "Changed through API";
10119
- switch (a) {
10116
+ ], vh = (e, t, n = {}) => {
10117
+ let { diffs: r, userName: i, source: a, operation: o, operationMetaData: s } = e, c = lh(r, n).length, l = c ? `${c} change${c === 1 ? "" : "s"}` : "no field changes";
10118
+ if (a === "API" && !i) return o === "Created" ? "Created through API" : "Changed through API";
10119
+ switch (o) {
10120
10120
  case "Created": return "Created";
10121
- case "Cloned": return `Cloned from ${o}`;
10121
+ case "Cloned": return `Cloned from ${s}`;
10122
10122
  case "Reverted": {
10123
- let e = o ? om({
10124
- date: s,
10123
+ let e = t.find((e) => e.id === s), n = e ? om({
10124
+ date: oh(e),
10125
10125
  showTime: !0
10126
10126
  }) : null;
10127
- return `Reverted${e ? ` (to ${e})` : ""}`;
10127
+ return `Reverted${n ? ` (to ${n})` : ""}`;
10128
10128
  }
10129
- case "Restored": return `Restored from ${o}`;
10129
+ case "Restored": return `Restored from ${s}`;
10130
10130
  case "Imported": return "Imported";
10131
10131
  case "Updated": return `Updated (${l})`;
10132
10132
  default: return "Change";
@@ -10144,39 +10144,39 @@ var Qm = (e = {}) => Zm({
10144
10144
  { value: "Using" },
10145
10145
  { value: "Operation" },
10146
10146
  { value: "Date" }
10147
- ] }], D = e.map((e) => {
10148
- var t;
10149
- let n = (t = h == null ? void 0 : h(e)) == null ? !!(e.snapshot && p || !e.diffs) : t, r = e.snapshot ? `Snapshot: ${e.snapshot}` : vh(e, l), i = (e.operation === "Restored" || e.operation === "Cloned") && g;
10147
+ ] }], D = e.map((t) => {
10148
+ var n;
10149
+ let r = (n = h == null ? void 0 : h(t)) == null ? !!(t.snapshot && p || !t.diffs) : n, i = t.snapshot ? `Snapshot: ${t.snapshot}` : vh(t, e, l), a = (t.operation === "Restored" || t.operation === "Cloned") && g;
10150
10150
  return {
10151
10151
  cells: [
10152
10152
  {
10153
- value: r,
10153
+ value: i,
10154
10154
  type: "Link",
10155
- disabled: n,
10156
- onClick: n ? void 0 : i ? () => g(e.operationMetaData) : () => T(e),
10155
+ disabled: r,
10156
+ onClick: r ? void 0 : a ? () => g(t.operationMetaData) : () => T(t),
10157
10157
  breakWord: !0
10158
10158
  },
10159
10159
  {
10160
- value: e.userName || (e.source === "API" ? "API" : "Unknown user"),
10160
+ value: t.userName || (t.source === "API" ? "API" : "Unknown user"),
10161
10161
  type: "Static"
10162
10162
  },
10163
10163
  {
10164
- value: e.source || "System",
10164
+ value: t.source || "System",
10165
10165
  type: "Static"
10166
10166
  },
10167
10167
  {
10168
- value: e.operation,
10168
+ value: t.operation,
10169
10169
  type: "Static"
10170
10170
  },
10171
10171
  {
10172
10172
  value: om({
10173
- date: oh(e),
10173
+ date: oh(t),
10174
10174
  showTime: !0
10175
10175
  }),
10176
10176
  type: "Static"
10177
10177
  }
10178
10178
  ],
10179
- actions: m == null ? void 0 : m(e)
10179
+ actions: m == null ? void 0 : m(t)
10180
10180
  };
10181
10181
  });
10182
10182
  return /* @__PURE__ */ C(x, { children: [/* @__PURE__ */ S(bo, {
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-3",
3
+ "version": "10.2.6-beta-4",
4
4
  "description": "Reusable UI components for React projects",
5
5
  "homepage": "https://oliasoft-open-source.gitlab.io/react-ui-library",
6
6
  "bugs": {