@oliasoft-open-source/react-ui-library 5.15.1-beta-6 → 5.15.2

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 CHANGED
@@ -137,7 +137,7 @@ declare type FilterToggle = {
137
137
  onChange: () => void;
138
138
  };
139
139
 
140
- export declare const Flex: ({ alignItems, justifyContent, direction, height, children, wrap, gap, }: IFlexProps) => JSX_2.Element;
140
+ export declare const Flex: ({ alignItems, justifyContent, direction, height, width, children, wrap, gap, }: IFlexProps) => JSX_2.Element;
141
141
 
142
142
  export declare const FormRow: ({ children }: IFormRowProps) => JSX_2.Element;
143
143
 
@@ -541,6 +541,7 @@ export declare interface IFlexProps {
541
541
  justifyContent?: string;
542
542
  direction?: Property.FlexDirection;
543
543
  height?: TStringOrNumber;
544
+ width?: TStringOrNumber;
544
545
  children?: default_2.ReactNode;
545
546
  wrap?: boolean;
546
547
  gap?: boolean | TStringOrNumber;
package/dist/index.js CHANGED
@@ -5463,17 +5463,18 @@ const Field = ({ label: e, labelLeft: t = !1, labelWidth: n = "auto", children:
5463
5463
  className: form_module_default.fieldInput,
5464
5464
  children: r
5465
5465
  })]
5466
- }), Flex = ({ alignItems: e = "initial", justifyContent: t = "initial", direction: n = "initial", height: r = "initial", children: i = null, wrap: a = !0, gap: o = !1 }) => /* @__PURE__ */ jsx("div", {
5466
+ }), Flex = ({ alignItems: e = "initial", justifyContent: t = "initial", direction: n = "initial", height: r = "initial", width: i = "initial", children: a = null, wrap: o = !0, gap: s = !1 }) => /* @__PURE__ */ jsx("div", {
5467
5467
  style: {
5468
5468
  display: "flex",
5469
5469
  flexDirection: n,
5470
5470
  alignItems: e,
5471
5471
  justifyContent: t,
5472
5472
  height: typeof r == "number" ? `${r}px` : r,
5473
- flexWrap: a ? "wrap" : "nowrap",
5474
- gap: o === !1 ? 0 : o === !0 ? "var(--padding)" : typeof o == "number" ? `${o}px` : o
5473
+ width: typeof i == "number" ? `${i}px` : i,
5474
+ flexWrap: o ? "wrap" : "nowrap",
5475
+ gap: s === !1 ? 0 : s === !0 ? "var(--padding)" : typeof s == "number" ? `${s}px` : s
5475
5476
  },
5476
- children: i
5477
+ children: a
5477
5478
  });
5478
5479
  var form_row_module_default = { formRow: "_formRow_odewu_1" };
5479
5480
  const FormRow = ({ children: e }) => /* @__PURE__ */ jsx("div", {
@@ -6627,30 +6628,30 @@ var tree_module_default = {
6627
6628
  placeholderContainer: "_placeholderContainer_1cqsz_38"
6628
6629
  };
6629
6630
  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, disabled: f, testId: p, onClick: m, actions: h = [] } = u, [_, v] = React.useState(!1), [y, b] = React.useState(0), x = (e) => {
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
6632
  e.stopPropagation(), i(l);
6633
+ }, x = (e) => {
6634
+ e.preventDefault(), e.stopPropagation(), h || (_(!0), y((/* @__PURE__ */ new Date()).getTime()));
6632
6635
  }, S = (e) => {
6633
- e.preventDefault(), e.stopPropagation(), _ || (v(!0), b((/* @__PURE__ */ new Date()).getTime()));
6636
+ e.preventDefault(), e.stopPropagation(), (/* @__PURE__ */ new Date()).getTime() - v > 20 && _(!1);
6634
6637
  }, C = (e) => {
6635
- e.preventDefault(), e.stopPropagation(), (/* @__PURE__ */ new Date()).getTime() - y > 20 && v(!1);
6638
+ e.preventDefault(), e.stopPropagation(), a && !r && (/* @__PURE__ */ new Date()).getTime() - v > 200 && b(e);
6636
6639
  }, w = (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
+ e.preventDefault(), e.stopPropagation(), _(!1), y((/* @__PURE__ */ new Date()).getTime()), c == null || c(e);
6640
6641
  };
6641
6642
  return /* @__PURE__ */ jsx("div", {
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
+ 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
6644
  style: { marginInlineStart: n * 24 },
6644
- "data-testid": p,
6645
+ "data-testid": f,
6645
6646
  onClick: (e) => {
6646
- f || (m ? m(e) : a && x(e));
6647
+ p ? p(e) : a && b(e);
6647
6648
  },
6648
- onDrop: (e) => c ? T(e) : {},
6649
- onDragEnter: (e) => c ? S(e) : {},
6650
- onDragOver: (e) => c ? w(e) : {},
6651
- onDragLeave: (e) => c ? C(e) : {},
6649
+ onDrop: (e) => c ? w(e) : {},
6650
+ onDragEnter: (e) => c ? x(e) : {},
6651
+ onDragOver: (e) => c ? C(e) : {},
6652
+ onDragLeave: (e) => c ? S(e) : {},
6652
6653
  children: /* @__PURE__ */ jsxs("div", {
6653
- className: cx(list_module_default.itemHeader, _ ? list_module_default.noPointerEvents : ""),
6654
+ className: cx(list_module_default.itemHeader, h ? list_module_default.noPointerEvents : ""),
6654
6655
  children: [
6655
6656
  a && /* @__PURE__ */ jsx("div", {
6656
6657
  className: tree_module_default.toggle,
@@ -6660,7 +6661,7 @@ const TreeItem = ({ node: t, depth: n, isOpen: r, onToggle: i, hasChild: a, drag
6660
6661
  small: !0,
6661
6662
  round: !0,
6662
6663
  icon: r ? (s == null ? void 0 : s.collapse) || IconType.COLLAPSE : (s == null ? void 0 : s.expand) || IconType.EXPAND,
6663
- onClick: x
6664
+ onClick: b
6664
6665
  })
6665
6666
  }),
6666
6667
  o && /* @__PURE__ */ jsx("div", {
@@ -6668,12 +6669,12 @@ const TreeItem = ({ node: t, depth: n, isOpen: r, onToggle: i, hasChild: a, drag
6668
6669
  children: /* @__PURE__ */ jsx(Icon, { icon: IconType.DRAG })
6669
6670
  }),
6670
6671
  /* @__PURE__ */ jsx(MetaContent, { item: u }),
6671
- /* @__PURE__ */ jsxs("div", {
6672
+ /* @__PURE__ */ jsx("div", {
6672
6673
  className: list_module_default.right,
6673
- children: [/* @__PURE__ */ jsx(MetaCount, { item: u }), !f && h.length > 0 && /* @__PURE__ */ jsx("div", {
6674
+ children: /* @__PURE__ */ jsx("div", {
6674
6675
  className: list_module_default.actions,
6675
- children: /* @__PURE__ */ jsx(Actions, { actions: h })
6676
- })]
6676
+ children: /* @__PURE__ */ jsx(Actions, { actions: m })
6677
+ })
6677
6678
  })
6678
6679
  ]
6679
6680
  })
@@ -9056,7 +9057,7 @@ const ComparisonViewModal = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, se
9056
9057
  }
9057
9058
  ], g = ({ diffs: e, userName: t, source: n, operation: r, operationMetaData: i }) => {
9058
9059
  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 by ${t || "Unknown user"}` : `Changed through API by ${t || "Unknown user"}`;
9060
+ if (n === "API") return r === "Created" ? "Created through API" : "Changed through API";
9060
9061
  switch (r) {
9061
9062
  case "Created": return `Created by ${t}`;
9062
9063
  case "Cloned": return `Cloned by ${t} (from ${i || "unknown"})`;
@@ -9081,7 +9082,7 @@ const ComparisonViewModal = ({ auditLog: e, auditLogs: t, data: n, isOpen: r, se
9081
9082
  breakWord: !0
9082
9083
  },
9083
9084
  {
9084
- value: e.userName || "Unknown",
9085
+ value: e.source === "API" ? "API" : e.userName || "Unknown",
9085
9086
  type: "Static"
9086
9087
  },
9087
9088
  {
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-6",
3
+ "version": "5.15.2",
4
4
  "description": "Reusable UI components for React projects",
5
5
  "homepage": "https://oliasoft-open-source.gitlab.io/react-ui-library",
6
6
  "bugs": {