@oliasoft-open-source/react-ui-library 5.15.1-beta-3 → 5.15.1-beta-5

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 +21 -21
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -6627,30 +6627,30 @@ var tree_module_default = {
6627
6627
  placeholderContainer: "_placeholderContainer_1cqsz_38"
6628
6628
  };
6629
6629
  const TreeItem = ({ node: t, depth: n, isOpen: r, onToggle: i, hasChild: a, draggable: o, icons: s, onDrop: c }) => {
6630
- let { id: l, data: u } = t, { active: d, testId: f, onClick: p, actions: m = [] } = u, [h, _] = React.useState(!1), [v, y] = React.useState(0), b = (e) => {
6630
+ let { id: l, data: u } = t, { active: d, disabled: f, testId: p, onClick: m, actions: h = [] } = u, [_, v] = React.useState(!1), [y, b] = React.useState(0), x = (e) => {
6631
6631
  e.stopPropagation(), i(l);
6632
- }, x = (e) => {
6633
- e.preventDefault(), e.stopPropagation(), h || (_(!0), y((/* @__PURE__ */ new Date()).getTime()));
6634
6632
  }, S = (e) => {
6635
- e.preventDefault(), e.stopPropagation(), (/* @__PURE__ */ new Date()).getTime() - v > 20 && _(!1);
6633
+ e.preventDefault(), e.stopPropagation(), _ || (v(!0), b((/* @__PURE__ */ new Date()).getTime()));
6636
6634
  }, C = (e) => {
6637
- e.preventDefault(), e.stopPropagation(), a && !r && (/* @__PURE__ */ new Date()).getTime() - v > 200 && b(e);
6635
+ e.preventDefault(), e.stopPropagation(), (/* @__PURE__ */ new Date()).getTime() - y > 20 && v(!1);
6638
6636
  }, w = (e) => {
6639
- e.preventDefault(), e.stopPropagation(), _(!1), y((/* @__PURE__ */ new Date()).getTime()), c == null || c(e);
6637
+ e.preventDefault(), e.stopPropagation(), a && !r && (/* @__PURE__ */ new Date()).getTime() - y > 200 && x(e);
6638
+ }, T = (e) => {
6639
+ e.preventDefault(), e.stopPropagation(), v(!1), b((/* @__PURE__ */ new Date()).getTime()), c == null || c(e);
6640
6640
  };
6641
6641
  return /* @__PURE__ */ jsx("div", {
6642
- className: cx(list_module_default.item, list_module_default.action, d ? list_module_default.active : "", n > 0 ? list_module_default.indented : "", h ? list_module_default.bordered : ""),
6642
+ className: cx(list_module_default.item, f ? "" : list_module_default.action, d ? list_module_default.active : "", f ? list_module_default.disabled : "", n > 0 ? list_module_default.indented : "", _ ? list_module_default.bordered : ""),
6643
6643
  style: { marginInlineStart: n * 24 },
6644
- "data-testid": f,
6644
+ "data-testid": p,
6645
6645
  onClick: (e) => {
6646
- p ? p(e) : a && b(e);
6646
+ f || (m ? m(e) : a && x(e));
6647
6647
  },
6648
- onDrop: (e) => c ? w(e) : {},
6649
- onDragEnter: (e) => c ? x(e) : {},
6650
- onDragOver: (e) => c ? C(e) : {},
6651
- onDragLeave: (e) => c ? S(e) : {},
6648
+ onDrop: (e) => c ? T(e) : {},
6649
+ onDragEnter: (e) => c ? S(e) : {},
6650
+ onDragOver: (e) => c ? w(e) : {},
6651
+ onDragLeave: (e) => c ? C(e) : {},
6652
6652
  children: /* @__PURE__ */ jsxs("div", {
6653
- className: cx(list_module_default.itemHeader, h ? list_module_default.noPointerEvents : ""),
6653
+ className: cx(list_module_default.itemHeader, _ ? list_module_default.noPointerEvents : ""),
6654
6654
  children: [
6655
6655
  a && /* @__PURE__ */ jsx("div", {
6656
6656
  className: tree_module_default.toggle,
@@ -6660,7 +6660,7 @@ const TreeItem = ({ node: t, depth: n, isOpen: r, onToggle: i, hasChild: a, drag
6660
6660
  small: !0,
6661
6661
  round: !0,
6662
6662
  icon: r ? (s == null ? void 0 : s.collapse) || IconType.COLLAPSE : (s == null ? void 0 : s.expand) || IconType.EXPAND,
6663
- onClick: b
6663
+ onClick: x
6664
6664
  })
6665
6665
  }),
6666
6666
  o && /* @__PURE__ */ jsx("div", {
@@ -6668,12 +6668,12 @@ const TreeItem = ({ node: t, depth: n, isOpen: r, onToggle: i, hasChild: a, drag
6668
6668
  children: /* @__PURE__ */ jsx(Icon, { icon: IconType.DRAG })
6669
6669
  }),
6670
6670
  /* @__PURE__ */ jsx(MetaContent, { item: u }),
6671
- /* @__PURE__ */ jsx("div", {
6671
+ /* @__PURE__ */ jsxs("div", {
6672
6672
  className: list_module_default.right,
6673
- children: /* @__PURE__ */ jsx("div", {
6673
+ children: [/* @__PURE__ */ jsx(MetaCount, { item: u }), !f && h.length > 0 && /* @__PURE__ */ jsx("div", {
6674
6674
  className: list_module_default.actions,
6675
- children: /* @__PURE__ */ jsx(Actions, { actions: m })
6676
- })
6675
+ children: /* @__PURE__ */ jsx(Actions, { actions: h })
6676
+ })]
6677
6677
  })
6678
6678
  ]
6679
6679
  })
@@ -9056,7 +9056,7 @@ const ComparisonViewModal = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, se
9056
9056
  }
9057
9057
  ], g = ({ diffs: e, userName: t, source: n, operation: r, operationMetaData: i }) => {
9058
9058
  let a = countDeltas(e), o = a.total ? `${a.total} change${a.total === 1 ? "" : "s"}` : "no field changes";
9059
- if (n === "API") return r === "Created" ? "Created through API" : "Changed through API";
9059
+ if (n === "API") return r === "Created" ? `Created through API by ${t || "Unknown user"}` : `Changed through API by ${t || "Unknown user"}`;
9060
9060
  switch (r) {
9061
9061
  case "Created": return `Created by ${t}`;
9062
9062
  case "Cloned": return `Cloned by ${t} (from ${i || "unknown"})`;
@@ -9081,7 +9081,7 @@ const ComparisonViewModal = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, se
9081
9081
  breakWord: !0
9082
9082
  },
9083
9083
  {
9084
- value: e.source === "API" ? "API" : e.userName || "Unknown",
9084
+ value: e.userName || "Unknown",
9085
9085
  type: "Static"
9086
9086
  },
9087
9087
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/react-ui-library",
3
- "version": "5.15.1-beta-3",
3
+ "version": "5.15.1-beta-5",
4
4
  "description": "Reusable UI components for React projects",
5
5
  "homepage": "https://oliasoft-open-source.gitlab.io/react-ui-library",
6
6
  "bugs": {