@oliasoft-open-source/react-ui-library 5.15.2 → 5.15.3-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 +19 -19
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -6628,30 +6628,30 @@ var tree_module_default = {
6628
6628
  placeholderContainer: "_placeholderContainer_1cqsz_38"
6629
6629
  };
6630
6630
  const TreeItem = ({ node: t, depth: n, isOpen: r, onToggle: i, hasChild: a, draggable: o, icons: s, onDrop: c }) => {
6631
- 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) => {
6631
+ 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) => {
6632
6632
  e.stopPropagation(), i(l);
6633
- }, x = (e) => {
6634
- e.preventDefault(), e.stopPropagation(), h || (_(!0), y((/* @__PURE__ */ new Date()).getTime()));
6635
6633
  }, S = (e) => {
6636
- e.preventDefault(), e.stopPropagation(), (/* @__PURE__ */ new Date()).getTime() - v > 20 && _(!1);
6634
+ e.preventDefault(), e.stopPropagation(), _ || (v(!0), b((/* @__PURE__ */ new Date()).getTime()));
6637
6635
  }, C = (e) => {
6638
- e.preventDefault(), e.stopPropagation(), a && !r && (/* @__PURE__ */ new Date()).getTime() - v > 200 && b(e);
6636
+ e.preventDefault(), e.stopPropagation(), (/* @__PURE__ */ new Date()).getTime() - y > 20 && v(!1);
6639
6637
  }, w = (e) => {
6640
- e.preventDefault(), e.stopPropagation(), _(!1), y((/* @__PURE__ */ new Date()).getTime()), c == null || c(e);
6638
+ e.preventDefault(), e.stopPropagation(), a && !r && (/* @__PURE__ */ new Date()).getTime() - y > 200 && x(e);
6639
+ }, T = (e) => {
6640
+ e.preventDefault(), e.stopPropagation(), v(!1), b((/* @__PURE__ */ new Date()).getTime()), c == null || c(e);
6641
6641
  };
6642
6642
  return /* @__PURE__ */ jsx("div", {
6643
- 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 : ""),
6643
+ 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 : ""),
6644
6644
  style: { marginInlineStart: n * 24 },
6645
- "data-testid": f,
6645
+ "data-testid": p,
6646
6646
  onClick: (e) => {
6647
- p ? p(e) : a && b(e);
6647
+ f || (m ? m(e) : a && x(e));
6648
6648
  },
6649
- onDrop: (e) => c ? w(e) : {},
6650
- onDragEnter: (e) => c ? x(e) : {},
6651
- onDragOver: (e) => c ? C(e) : {},
6652
- onDragLeave: (e) => c ? S(e) : {},
6649
+ onDrop: (e) => c ? T(e) : {},
6650
+ onDragEnter: (e) => c ? S(e) : {},
6651
+ onDragOver: (e) => c ? w(e) : {},
6652
+ onDragLeave: (e) => c ? C(e) : {},
6653
6653
  children: /* @__PURE__ */ jsxs("div", {
6654
- className: cx(list_module_default.itemHeader, h ? list_module_default.noPointerEvents : ""),
6654
+ className: cx(list_module_default.itemHeader, _ ? list_module_default.noPointerEvents : ""),
6655
6655
  children: [
6656
6656
  a && /* @__PURE__ */ jsx("div", {
6657
6657
  className: tree_module_default.toggle,
@@ -6661,7 +6661,7 @@ const TreeItem = ({ node: t, depth: n, isOpen: r, onToggle: i, hasChild: a, drag
6661
6661
  small: !0,
6662
6662
  round: !0,
6663
6663
  icon: r ? (s == null ? void 0 : s.collapse) || IconType.COLLAPSE : (s == null ? void 0 : s.expand) || IconType.EXPAND,
6664
- onClick: b
6664
+ onClick: x
6665
6665
  })
6666
6666
  }),
6667
6667
  o && /* @__PURE__ */ jsx("div", {
@@ -6669,12 +6669,12 @@ const TreeItem = ({ node: t, depth: n, isOpen: r, onToggle: i, hasChild: a, drag
6669
6669
  children: /* @__PURE__ */ jsx(Icon, { icon: IconType.DRAG })
6670
6670
  }),
6671
6671
  /* @__PURE__ */ jsx(MetaContent, { item: u }),
6672
- /* @__PURE__ */ jsx("div", {
6672
+ /* @__PURE__ */ jsxs("div", {
6673
6673
  className: list_module_default.right,
6674
- children: /* @__PURE__ */ jsx("div", {
6674
+ children: [/* @__PURE__ */ jsx(MetaCount, { item: u }), !f && h.length > 0 && /* @__PURE__ */ jsx("div", {
6675
6675
  className: list_module_default.actions,
6676
- children: /* @__PURE__ */ jsx(Actions, { actions: m })
6677
- })
6676
+ children: /* @__PURE__ */ jsx(Actions, { actions: h })
6677
+ })]
6678
6678
  })
6679
6679
  ]
6680
6680
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oliasoft-open-source/react-ui-library",
3
- "version": "5.15.2",
3
+ "version": "5.15.3-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": {