linear-react-components-ui 1.1.26-beta.5 → 1.1.26-beta.6

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 (211) hide show
  1. package/lib/alerts/AlertProvider.js +2 -2
  2. package/lib/alerts/BaseAlert.js +8 -8
  3. package/lib/alerts/Message.js +1 -1
  4. package/lib/alerts/withAlert.js +1 -1
  5. package/lib/assets/BaseAlert.css +1 -1
  6. package/lib/assets/Content.css +1 -1
  7. package/lib/assets/DefaultFile.css +1 -1
  8. package/lib/assets/Drawer.css +1 -1
  9. package/lib/assets/index11.css +1 -1
  10. package/lib/assets/index5.css +1 -1
  11. package/lib/avatar/index.js +1 -1
  12. package/lib/badge/index.js +1 -1
  13. package/lib/buttons/ActivateButton.js +1 -1
  14. package/lib/buttons/AddButton.js +1 -1
  15. package/lib/buttons/Button.js +1 -1
  16. package/lib/buttons/ButtonGroups.js +1 -1
  17. package/lib/buttons/CancelButton.js +1 -1
  18. package/lib/buttons/DangerButton.js +1 -1
  19. package/lib/buttons/DefaultButton.js +70 -71
  20. package/lib/buttons/DestroyButton.js +1 -1
  21. package/lib/buttons/EditButton.js +1 -1
  22. package/lib/buttons/InactivateButton.js +1 -1
  23. package/lib/buttons/InfoButton.js +1 -1
  24. package/lib/buttons/PrimaryButton.js +1 -1
  25. package/lib/buttons/RestoreButton.js +1 -1
  26. package/lib/buttons/SaveButton.js +1 -1
  27. package/lib/buttons/SuccessButton.js +1 -1
  28. package/lib/buttons/WarningButton.js +1 -1
  29. package/lib/buttons/button_container/index.js +1 -1
  30. package/lib/buttons/split_button/index.js +1 -1
  31. package/lib/calendar/DangerCalendar.js +1 -1
  32. package/lib/calendar/InfoCalendar.js +1 -1
  33. package/lib/calendar/PrimaryCalendar.js +1 -1
  34. package/lib/calendar/SuccessCalendar.js +1 -1
  35. package/lib/calendar/WarningCalendar.js +1 -1
  36. package/lib/calendar/base/Day.js +2 -2
  37. package/lib/calendar/base/Month.js +1 -1
  38. package/lib/calendar/base/Week.js +1 -1
  39. package/lib/calendar/base/helpers.js +1 -1
  40. package/lib/calendar/base/index.js +64 -66
  41. package/lib/checkbox/index.js +4 -4
  42. package/lib/chunks/index.CM1aLH2W.js +205 -0
  43. package/lib/chunks/{index.CBPsbBt0.js → index.Df3kt2LQ.js} +3 -3
  44. package/lib/chunks/{jsx-runtime.gtoSnx-V.js → jsx-runtime.C7wFtzyj.js} +2 -2
  45. package/lib/chunks/{lodash.C68pWaTB.js → lodash.CIAK_hAg.js} +433 -433
  46. package/lib/chunks/{moment.CwOqp704.js → moment.DMLRxgRE.js} +8 -8
  47. package/lib/chunks/{tabs.CM2We4tV.js → tabs.D0L_nVfP.js} +95 -96
  48. package/lib/chunks/v1.Ds1rkxUj.js +49 -0
  49. package/lib/dialog/Alert.js +1 -1
  50. package/lib/dialog/Custom.js +3 -3
  51. package/lib/dialog/Error.js +1 -1
  52. package/lib/dialog/Information.js +1 -1
  53. package/lib/dialog/Question.js +36 -39
  54. package/lib/dialog/Warning.js +1 -1
  55. package/lib/dialog/base/Content.js +1 -1
  56. package/lib/dialog/base/Footer.js +1 -1
  57. package/lib/dialog/base/Header.js +2 -2
  58. package/lib/dialog/base/index.js +2 -2
  59. package/lib/dialog/form/index.js +2 -2
  60. package/lib/dialog/index.js +1 -1
  61. package/lib/dialog/wizard/index.js +4 -4
  62. package/lib/dialog/wizard/progressbar.js +87 -3
  63. package/lib/dialog/wizard/step.js +2 -2
  64. package/lib/drawer/Content.js +1 -1
  65. package/lib/drawer/Drawer.js +19 -19
  66. package/lib/drawer/Header.js +1 -1
  67. package/lib/dropdown/Popup.js +1 -1
  68. package/lib/dropdown/withDropdown.js +31 -31
  69. package/lib/fieldset/index.js +1 -1
  70. package/lib/form/Field.js +2 -2
  71. package/lib/form/FieldArray.js +2 -2
  72. package/lib/form/FieldNumber.js +27 -27
  73. package/lib/form/FieldPeriod.js +2 -2
  74. package/lib/form/helpers.js +1 -1
  75. package/lib/form/index.js +49 -49
  76. package/lib/form/withFieldHOC.js +1 -1
  77. package/lib/form/withFormSecurity.js +1 -1
  78. package/lib/gridlayout/GridCol.js +1 -1
  79. package/lib/gridlayout/GridRow.js +1 -1
  80. package/lib/hint/helpers.js +1 -1
  81. package/lib/hint/index.js +1 -1
  82. package/lib/icons/index.js +51 -54
  83. package/lib/index.js +2 -2
  84. package/lib/inputs/base/InputTextBase.js +112 -114
  85. package/lib/inputs/base/Label.js +1 -1
  86. package/lib/inputs/base/helpers.d.ts +3 -3
  87. package/lib/inputs/base/helpers.js +1 -1
  88. package/lib/inputs/color/index.js +2 -2
  89. package/lib/inputs/date/Dialog.js +2 -2
  90. package/lib/inputs/date/Dropdown.js +10 -14
  91. package/lib/inputs/date/helpers.js +1 -1
  92. package/lib/inputs/date/index.js +102 -114
  93. package/lib/inputs/errorMessage/index.js +1 -1
  94. package/lib/inputs/file/DefaultFile.js +43 -44
  95. package/lib/inputs/file/DragDropFile.js +91 -93
  96. package/lib/inputs/file/File.d.ts +1 -1
  97. package/lib/inputs/file/File.js +33 -34
  98. package/lib/inputs/file/FileButtonSettings.js +1 -1
  99. package/lib/inputs/inputHOC.js +1 -1
  100. package/lib/inputs/mask/BaseMask.js +8 -8
  101. package/lib/inputs/mask/Cnpj.js +2 -2
  102. package/lib/inputs/mask/Cpf.js +2 -2
  103. package/lib/inputs/mask/Phone.js +1 -1
  104. package/lib/inputs/mask/ZipCode.js +1 -1
  105. package/lib/inputs/mask/helpers.d.ts +33 -33
  106. package/lib/inputs/mask/helpers.js +1 -1
  107. package/lib/inputs/multiSelect/ActionButtons.js +2 -2
  108. package/lib/inputs/multiSelect/Dropdown.js +63 -64
  109. package/lib/inputs/multiSelect/helper.js +4 -7
  110. package/lib/inputs/multiSelect/index.js +45 -47
  111. package/lib/inputs/number/BaseNumber.js +1 -1
  112. package/lib/inputs/number/Currency.js +1 -1
  113. package/lib/inputs/number/Decimal.js +1 -1
  114. package/lib/inputs/number/index.js +10 -10
  115. package/lib/inputs/period/Dialog.js +2 -2
  116. package/lib/inputs/period/Dropdown.js +10 -15
  117. package/lib/inputs/period/PeriodList.js +1 -1
  118. package/lib/inputs/period/helper.js +1 -1
  119. package/lib/inputs/period/index.js +207 -223
  120. package/lib/inputs/search/index.js +29 -29
  121. package/lib/inputs/select/ActionButtons.js +1 -1
  122. package/lib/inputs/select/Dropdown.js +53 -53
  123. package/lib/inputs/select/helper.d.ts +1 -1
  124. package/lib/inputs/select/helper.js +39 -45
  125. package/lib/inputs/select/index.js +1 -1
  126. package/lib/inputs/select/multiple/Selecteds.js +1 -1
  127. package/lib/inputs/select/multiple/index.js +139 -143
  128. package/lib/inputs/select/simple/index.js +157 -164
  129. package/lib/inputs/text/index.js +1 -1
  130. package/lib/inputs/textarea/index.js +1 -1
  131. package/lib/internals/withTooltip.js +1 -1
  132. package/lib/labelMessages/index.js +1 -1
  133. package/lib/labels/DangerLabel.js +1 -1
  134. package/lib/labels/DefaultLabel.js +1 -1
  135. package/lib/labels/InfoLabel.js +1 -1
  136. package/lib/labels/PrimaryLabel.js +1 -1
  137. package/lib/labels/SuccessLabel.js +1 -1
  138. package/lib/labels/WarningLabel.js +1 -1
  139. package/lib/labels/label_container/index.js +1 -1
  140. package/lib/list/Header.js +1 -1
  141. package/lib/list/Item.js +2 -2
  142. package/lib/list/Separator.js +1 -1
  143. package/lib/list/index.js +2 -2
  144. package/lib/menus/float/MenuItem.js +18 -18
  145. package/lib/menus/float/SubMenuContainer.d.ts +10 -10
  146. package/lib/menus/float/index.js +2 -2
  147. package/lib/menus/sidenav/ExpandMenu.js +1 -1
  148. package/lib/menus/sidenav/MenuLink.js +1 -1
  149. package/lib/menus/sidenav/NavMenuGroup.js +1 -1
  150. package/lib/menus/sidenav/NavMenuItem.js +54 -56
  151. package/lib/menus/sidenav/NavSubMenuItem.js +1 -1
  152. package/lib/menus/sidenav/index.js +2 -2
  153. package/lib/menus/sidenav/popup_menu_search/EmptyList.js +1 -1
  154. package/lib/menus/sidenav/popup_menu_search/index.js +2 -2
  155. package/lib/noPermission/index.js +1 -1
  156. package/lib/panel/Content.js +30 -31
  157. package/lib/panel/DangerPanel.js +1 -1
  158. package/lib/panel/Default.js +1 -1
  159. package/lib/panel/Header.js +1 -1
  160. package/lib/panel/InfoPanel.js +1 -1
  161. package/lib/panel/PrimaryPanel.js +1 -1
  162. package/lib/panel/SuccessPanel.js +1 -1
  163. package/lib/panel/ToolBar.js +1 -1
  164. package/lib/panel/WarningPanel.js +1 -1
  165. package/lib/permissionValidations.js +11 -11
  166. package/lib/popover/PopoverText.js +1 -1
  167. package/lib/popover/PopoverTitle.js +1 -1
  168. package/lib/popover/index.js +1 -1
  169. package/lib/progress/Bar.js +1 -1
  170. package/lib/progress/index.js +1 -1
  171. package/lib/radio/index.js +1 -1
  172. package/lib/shortcuts/index.js +1 -1
  173. package/lib/skeleton/SkeletonContainer.js +1 -1
  174. package/lib/skeleton/index.js +1 -1
  175. package/lib/spinner/SpinnerLoading.js +1 -1
  176. package/lib/spinner/index.js +1 -1
  177. package/lib/split/Split.js +1 -1
  178. package/lib/split/SplitSide.js +1 -1
  179. package/lib/table/Body.js +25 -25
  180. package/lib/table/Header.js +28 -31
  181. package/lib/table/HeaderColumn.js +2 -2
  182. package/lib/table/Row.js +1 -1
  183. package/lib/table/RowColumn.js +1 -1
  184. package/lib/table/index.js +2 -2
  185. package/lib/tabs/DropdownTabs.js +4 -4
  186. package/lib/tabs/Menu.js +1 -1
  187. package/lib/tabs/MenuTabs.js +2 -2
  188. package/lib/tabs/Panel.js +29 -30
  189. package/lib/tabs/context.js +25 -29
  190. package/lib/tabs/index.js +2 -2
  191. package/lib/textContent/index.js +2 -2
  192. package/lib/toolbar/ButtonBar.js +1 -1
  193. package/lib/toolbar/LabelBar.js +1 -1
  194. package/lib/toolbar/Separator.js +1 -1
  195. package/lib/toolbar/ToolBarGroup.js +1 -1
  196. package/lib/toolbar/index.js +1 -1
  197. package/lib/tooltip/index.js +24 -24
  198. package/lib/treetable/Body.js +2 -2
  199. package/lib/treetable/Header.js +3 -3
  200. package/lib/treetable/Row.js +52 -52
  201. package/lib/treetable/helpers.d.ts +4 -5
  202. package/lib/treetable/index.js +1 -1
  203. package/lib/treeview/Header.js +1 -1
  204. package/lib/treeview/Node.js +4 -4
  205. package/lib/treeview/index.js +28 -28
  206. package/lib/uitour/index.js +32 -32
  207. package/package.json +24 -39
  208. package/lib/chunks/index.CjD97zna.js +0 -206
  209. package/lib/chunks/index.m4wxhMbx.js +0 -89
  210. package/lib/chunks/v1.CDXKvGzE.js +0 -41
  211. /package/lib/assets/{index29.css → progressbar.css} +0 -0
@@ -1,66 +1,66 @@
1
- import { j as e } from "../chunks/jsx-runtime.gtoSnx-V.js";
2
- import A, { useContext as ee, useState as m, useRef as oe, useEffect as p, Fragment as N, createElement as ne } from "react";
3
- import { _ as te } from "../chunks/lodash.C68pWaTB.js";
1
+ import { j as e } from "../chunks/jsx-runtime.C7wFtzyj.js";
2
+ import A, { useContext as ee, useState as c, useRef as oe, useEffect as f, Fragment as N, createElement as ne } from "react";
3
+ import { _ as te } from "../chunks/lodash.CIAK_hAg.js";
4
4
  import se from "../icons/index.js";
5
5
  import D from "../spinner/SpinnerLoading.js";
6
6
  import "../table/helpers.js";
7
7
  import R from "../table/Row.js";
8
8
  import '../assets/table.css';import '../assets/skeleton.css';import '../assets/gridlayout.css';/* empty css */
9
9
  /* empty css */
10
- import V from "../table/RowColumn.js";
10
+ import G from "../table/RowColumn.js";
11
11
  /* empty css */
12
- import _ from "../toolbar/index.js";
12
+ import V from "../toolbar/index.js";
13
13
  import { TreeTableContext as re, searchChildrensPerRow as le } from "./helpers.js";
14
- import K from "../toolbar/ToolBarGroup.js";
15
- import { v as u } from "../chunks/v1.CDXKvGzE.js";
14
+ import _ from "../toolbar/ToolBarGroup.js";
15
+ import { v as p } from "../chunks/v1.Ds1rkxUj.js";
16
16
  const ie = (T) => {
17
17
  const {
18
18
  data: L,
19
19
  dataColumns: r,
20
20
  rootPropName: I,
21
- stylesForRow: W,
22
- parentPropName: X,
23
- styleForLeftToolbar: Y,
24
- onClickFirstColumn: P,
25
- onClickGetChildrens: a,
26
- leftToolbarElements: $,
27
- rightToolbarElements: k,
28
- styleForRightToolbar: q,
21
+ stylesForRow: K,
22
+ parentPropName: W,
23
+ styleForLeftToolbar: X,
24
+ onClickFirstColumn: k,
25
+ onClickGetChildrens: u,
26
+ leftToolbarElements: P,
27
+ rightToolbarElements: $,
28
+ styleForRightToolbar: Y,
29
29
  toolbarElementsValidations: x,
30
30
  openNodeId: F
31
- } = ee(re), { rowId: l, dataRow: d, rowLevel: g } = T, [w, b] = m(!1), [t, G] = m(), [S, j] = m(!1), [v, z] = m(!1), [H, J] = m(!1), C = oe(null), B = () => {
32
- const o = le(L, X, l, g);
33
- G(o), j(!1);
31
+ } = ee(re), { rowId: l, dataRow: a, rowLevel: g } = T, [w, C] = c(!1), [t, q] = c(), [S, b] = c(!1), [j, z] = c(!1), [H, J] = c(!1), v = oe(null), B = () => {
32
+ const o = le(L, W, l, g);
33
+ q(o), b(!1);
34
34
  }, Q = () => {
35
- !H && !w ? (b(!0), j(!0), a != null && a(l) && typeof a(l).finally == "function" && a(l).then(() => {
35
+ !H && !w ? (C(!0), b(!0), u?.(l) && typeof u(l).finally == "function" && u(l).then(() => {
36
36
  }).catch(() => {
37
37
  }).finally(() => {
38
38
  B();
39
- }), J(!0)) : b((o) => !o);
39
+ }), J(!0)) : C((o) => !o);
40
40
  }, U = (o) => {
41
41
  const s = x && x[o], n = {
42
42
  disabled: { disabled: !0 },
43
43
  unvisible: { visible: !1 }
44
44
  };
45
45
  let i = {};
46
- return s && s.forEach((h) => {
47
- const { validator: f, onDenied: c } = h;
48
- te.isEmpty(i) && f && f(d) && c && (i = n[c] || n.unvisible);
46
+ return s && s.forEach((m) => {
47
+ const { validator: h, onDenied: d } = m;
48
+ te.isEmpty(i) && h && h(a) && d && (i = n[d] || n.unvisible);
49
49
  }), i;
50
50
  }, O = (o) => {
51
51
  let s = [];
52
52
  return o && (s = A.Children.map(o, (n) => {
53
53
  if (A.isValidElement(n) && n.props) {
54
- const { validationKey: i, onNodeElementClick: h, ...f } = n.props;
55
- let c, y = {};
56
- return x && i && (c = U(i)), h && (y = {
54
+ const { validationKey: i, onNodeElementClick: m, ...h } = n.props;
55
+ let d, y = {};
56
+ return x && i && (d = U(i)), m && (y = {
57
57
  ...y,
58
58
  onClick: (M) => {
59
- h(d), M.stopPropagation && M.stopPropagation();
59
+ m(a), M.stopPropagation && M.stopPropagation();
60
60
  }
61
61
  }), ne(
62
62
  n.type,
63
- { ...f, ...y, ...c }
63
+ { ...h, ...y, ...d }
64
64
  );
65
65
  }
66
66
  return n;
@@ -69,24 +69,24 @@ const ie = (T) => {
69
69
  z(!0);
70
70
  }, E = (o) => {
71
71
  const s = document.elementFromPoint(o.clientX, o.clientY);
72
- C.current && !C.current.contains(s) && z(!1);
72
+ v.current && !v.current.contains(s) && z(!1);
73
73
  };
74
- return p(() => {
74
+ return f(() => {
75
75
  B();
76
- }, [L]), p(() => {
77
- j(!1);
78
- }, [t]), p(() => (v ? window.addEventListener("mousemove", E) : window.removeEventListener("mousemove", E), () => {
76
+ }, [L]), f(() => {
77
+ b(!1);
78
+ }, [t]), f(() => (j ? window.addEventListener("mousemove", E) : window.removeEventListener("mousemove", E), () => {
79
79
  window.removeEventListener("mousemove", E);
80
- }), [v]), p(() => {
81
- F === Number(d.id) && b(!0);
80
+ }), [j]), f(() => {
81
+ F === Number(a.id) && C(!0);
82
82
  }, [F]), /* @__PURE__ */ e.jsxs(N, { children: [
83
83
  /* @__PURE__ */ e.jsxs(R, { ...T, dataId: l, customClass: "tree-row-element", children: [
84
84
  /* @__PURE__ */ e.jsx(
85
- V,
85
+ G,
86
86
  {
87
87
  ignoreTableColClick: !0,
88
88
  style: r[0].style,
89
- children: /* @__PURE__ */ e.jsxs("div", { ref: C, className: "column-container", onMouseEnter: Z, children: [
89
+ children: /* @__PURE__ */ e.jsxs("div", { ref: v, className: "column-container", onMouseEnter: Z, children: [
90
90
  /* @__PURE__ */ e.jsxs(
91
91
  "span",
92
92
  {
@@ -108,34 +108,34 @@ const ie = (T) => {
108
108
  tabIndex: -1,
109
109
  role: "button",
110
110
  className: "value-button",
111
- onClick: () => P ? P(l) : {},
112
- children: d[r[0].name]
111
+ onClick: () => k ? k(l) : {},
112
+ children: a[r[0].name]
113
113
  }
114
114
  ),
115
- /* @__PURE__ */ e.jsx("span", { className: "container-toolbar-buttons", children: /* @__PURE__ */ e.jsx(_, { size: "small", customClass: "row-toolbar", children: /* @__PURE__ */ e.jsx(
116
- K,
115
+ /* @__PURE__ */ e.jsx("span", { className: "container-toolbar-buttons", children: /* @__PURE__ */ e.jsx(V, { size: "small", customClass: "row-toolbar", children: /* @__PURE__ */ e.jsx(
116
+ _,
117
117
  {
118
- style: { float: "left", height: "fit-content", ...Y },
119
- children: v && $ && O($)
118
+ style: { float: "left", height: "fit-content", ...X },
119
+ children: j && P && O(P)
120
120
  },
121
- `left-toolbar-${u()}`
121
+ `left-toolbar-${p()}`
122
122
  ) }) })
123
123
  ]
124
124
  }
125
125
  ),
126
- /* @__PURE__ */ e.jsx("span", { className: "container-toolbar-info", children: /* @__PURE__ */ e.jsx(_, { size: "small", customClass: "row-toolbar", children: /* @__PURE__ */ e.jsx(
127
- K,
126
+ /* @__PURE__ */ e.jsx("span", { className: "container-toolbar-info", children: /* @__PURE__ */ e.jsx(V, { size: "small", customClass: "row-toolbar", children: /* @__PURE__ */ e.jsx(
127
+ _,
128
128
  {
129
- style: { float: "right", height: "fit-content", gap: "4px", ...q },
130
- children: k && O(k)
129
+ style: { float: "right", height: "fit-content", gap: "4px", ...Y },
130
+ children: $ && O($)
131
131
  },
132
- `right-toolbar-${u()}`
132
+ `right-toolbar-${p()}`
133
133
  ) }) })
134
134
  ] })
135
135
  },
136
- `td-${r[0].name}-${u()}`
136
+ `td-${r[0].name}-${p()}`
137
137
  ),
138
- r.slice(1).map((o) => /* @__PURE__ */ e.jsx(V, { style: { ...o.style }, ignoreTableColClick: !0, children: d[o.name] }, `key-${o.name}-${u()}`))
138
+ r.slice(1).map((o) => /* @__PURE__ */ e.jsx(G, { style: { ...o.style }, ignoreTableColClick: !0, children: a[o.name] }, `key-${o.name}-${p()}`))
139
139
  ] }),
140
140
  w && /* @__PURE__ */ e.jsx(N, { children: t && t.length === 0 && S ? /* @__PURE__ */ e.jsx(R, { children: /* @__PURE__ */ e.jsx("td", { colSpan: r.length, className: "td-loading-childrens", children: /* @__PURE__ */ e.jsx("div", { className: "td-loading-childrens-container", children: /* @__PURE__ */ e.jsx(D, { size: "48px" }, "loading-childrens") }) }) }, "tr-loading-childrens") : /* @__PURE__ */ e.jsxs(N, { children: [
141
141
  t && t.map((o) => /* @__PURE__ */ e.jsx(
@@ -144,7 +144,7 @@ const ie = (T) => {
144
144
  dataRow: o,
145
145
  rowLevel: o.rowLevel ? o.rowLevel + 1 : 1,
146
146
  rowId: `${o[I]}`,
147
- style: W
147
+ style: K
148
148
  },
149
149
  o[I]
150
150
  )),
@@ -1,14 +1,13 @@
1
- /// <reference types="react" />
2
1
  export declare const TreeTableContext: import('react').Context<import('./types').ITreeTableProps>;
3
- export declare const searchRootElements: (data: {
2
+ export declare const searchRootElements: (data: Array<{
4
3
  [key: string]: any;
5
- }[], parentPropName: string, rowLevel?: number) => ({
4
+ }>, parentPropName: string, rowLevel?: number) => ({
6
5
  [key: string]: any;
7
6
  } & {
8
7
  rowLevel: number;
9
8
  })[];
10
- export declare const searchChildrensPerRow: (data: {
9
+ export declare const searchChildrensPerRow: (data: Array<{
11
10
  [key: string]: any;
12
- }[], parentPropName: string, rowId?: string | number, rowLevel?: number) => {
11
+ }>, parentPropName: string, rowId?: string | number, rowLevel?: number) => {
13
12
  [key: string]: any;
14
13
  }[];
@@ -1,4 +1,4 @@
1
- import { j as e } from "../chunks/jsx-runtime.gtoSnx-V.js";
1
+ import { j as e } from "../chunks/jsx-runtime.C7wFtzyj.js";
2
2
  import t from "../table/index.js";
3
3
  import l from "./Body.js";
4
4
  import a from "./Header.js";
@@ -1,4 +1,4 @@
1
- import { j as s } from "../chunks/jsx-runtime.gtoSnx-V.js";
1
+ import { j as s } from "../chunks/jsx-runtime.C7wFtzyj.js";
2
2
  const l = (t) => {
3
3
  const { title: e, customClass: r, children: a } = t;
4
4
  return /* @__PURE__ */ s.jsx("div", { className: `treeviewheader ${r}`, children: e ? /* @__PURE__ */ s.jsx("div", { className: "title", children: e }) : a });
@@ -1,7 +1,7 @@
1
- import { j as s } from "../chunks/jsx-runtime.gtoSnx-V.js";
1
+ import { j as s } from "../chunks/jsx-runtime.C7wFtzyj.js";
2
2
  import C, { useState as a, useRef as re, useContext as de, useEffect as ae } from "react";
3
- import { _ as ce } from "../chunks/lodash.C68pWaTB.js";
4
- import { C as me, L as O } from "../chunks/tabs.CM2We4tV.js";
3
+ import { _ as ce } from "../chunks/lodash.CIAK_hAg.js";
4
+ import { C as me, L as O } from "../chunks/tabs.D0L_nVfP.js";
5
5
  import M from "../icons/index.js";
6
6
  import { TreeviewContext as ue } from "./constants.js";
7
7
  import pe from "../buttons/Button.js";
@@ -9,7 +9,7 @@ import '../assets/button.css';/* empty css */
9
9
  import fe from "../list/index.js";
10
10
  import he from "../toolbar/index.js";
11
11
  import xe from "../spinner/SpinnerLoading.js";
12
- import { v as be } from "../chunks/v1.CDXKvGzE.js";
12
+ import { v as be } from "../chunks/v1.Ds1rkxUj.js";
13
13
  import ve from "../toolbar/ToolBarGroup.js";
14
14
  const h = (i) => !!(i.itens && i.itens.length > 0), Oe = (i) => {
15
15
  const {
@@ -1,9 +1,9 @@
1
- import { j as g } from "../chunks/jsx-runtime.gtoSnx-V.js";
2
- import { useState as u, useEffect as q } from "react";
3
- import { _ as w } from "../chunks/lodash.C68pWaTB.js";
4
- import pe from "./Node.js";
1
+ import { j as w } from "../chunks/jsx-runtime.C7wFtzyj.js";
2
+ import { useState as u, useEffect as g } from "react";
3
+ import { _ as A } from "../chunks/lodash.CIAK_hAg.js";
4
+ import Se from "./Node.js";
5
5
  import { default as Oe } from "./Header.js";
6
- import { TreeviewContext as Se } from "./constants.js";
6
+ import { TreeviewContext as pe } from "./constants.js";
7
7
  import '../assets/index18.css';const qe = (h) => {
8
8
  const {
9
9
  selectedIds: f = [],
@@ -11,7 +11,7 @@ import '../assets/index18.css';const qe = (h) => {
11
11
  allowCheckAllAncestry: I,
12
12
  onNodeOpen: v,
13
13
  allowCheckAllChildren: E,
14
- onSelectedIdsChange: p,
14
+ onSelectedIdsChange: q,
15
15
  idsInLoading: z,
16
16
  startNodesOpened: B = !1,
17
17
  alwaysShowArrow: L,
@@ -28,7 +28,7 @@ import '../assets/index18.css';const qe = (h) => {
28
28
  requiredIds: se = [],
29
29
  customClassForNodes: ne = "",
30
30
  customStyleForNodes: re
31
- } = h, [N, le] = u(h.data), [c, P] = u(f), [W, de] = u(f), [C, O] = u(!1), [R, ce] = u(!1), [m, S] = u([]), [b, ie] = u([]), [o] = u({}), y = (e, n = !1, t = [], r = []) => (o[e] !== void 0 ? (t.push(e), n && r.push(e), o[e].forEach((s) => y(s, n, t, r))) : t.push(e), n ? { nodeChildrenIds: t, requiredIds: r } : { nodeChildrenIds: t }), T = (e) => {
31
+ } = h, [N, le] = u(h.data), [c, P] = u(f), [W, de] = u(f), [C, O] = u(!1), [R, ce] = u(!1), [m, S] = u([]), [b, ie] = u([]), [o] = u({}), p = (e, n = !1, t = [], r = []) => (o[e] !== void 0 ? (t.push(e), n && r.push(e), o[e].forEach((s) => p(s, n, t, r))) : t.push(e), n ? { nodeChildrenIds: t, requiredIds: r } : { nodeChildrenIds: t }), T = (e) => {
32
32
  const n = Object.keys(o).find((t) => o[t].find((r) => r === e));
33
33
  return Number(n);
34
34
  }, U = (e, n = []) => {
@@ -53,29 +53,29 @@ import '../assets/index18.css';const qe = (h) => {
53
53
  const r = V(e), s = t.filter((d) => !r.includes(d)), l = c.filter((d) => !n.includes(d));
54
54
  return S(s), l;
55
55
  }, x = (e, n, t = !1, r = !0) => {
56
- const s = U(e), l = s.filter((A) => !m.includes(A)), d = s.filter((A) => !c.includes(A)), i = [...c, ...n, ...d], a = [...m, ...l];
56
+ const s = U(e), l = s.filter((y) => !m.includes(y)), d = s.filter((y) => !c.includes(y)), i = [...c, ...n, ...d], a = [...m, ...l];
57
57
  return r && S(a), t ? { updatedIdsWithAncestryIds: i, requiredParentsIds: a } : { updatedIdsWithAncestryIds: i };
58
58
  }, D = (e, n = !1, t = []) => {
59
59
  let r, s = t;
60
60
  if (n) {
61
- const { nodeChildrenIds: i, requiredIds: a } = y(e, n), A = a ? a.filter((me) => !t.includes(me)) : [];
62
- s = [...t, ...A], r = i;
63
- } else r = y(e).nodeChildrenIds;
61
+ const { nodeChildrenIds: i, requiredIds: a } = p(e, n), y = a ? a.filter((me) => !t.includes(me)) : [];
62
+ s = [...t, ...y], r = i;
63
+ } else r = p(e).nodeChildrenIds;
64
64
  const l = r.filter((i) => !c.includes(i)), d = [...c, ...l];
65
65
  return S(s), O(!1), d;
66
66
  }, F = (e, n = []) => {
67
67
  let t = n.length > 0 ? n : c;
68
- const r = y(e).nodeChildrenIds;
68
+ const r = p(e).nodeChildrenIds;
69
69
  return t = t.filter((s) => !r.includes(s)), O(!1), t;
70
70
  }, ae = (e, n, t) => {
71
- const r = y(e).nodeChildrenIds, s = t.filter((l) => !r.includes(l));
71
+ const r = p(e).nodeChildrenIds, s = t.filter((l) => !r.includes(l));
72
72
  S([...s]), k(e, n, s);
73
73
  }, oe = (e) => {
74
74
  const { id: n } = e;
75
75
  let t = b;
76
76
  !b.includes(n) && v && (t = [...t, n], v(e)), ie(t);
77
77
  }, ue = (e, n, t) => {
78
- const r = w.isArray(e) ? e : [e];
78
+ const r = A.isArray(e) ? e : [e];
79
79
  let s = [...c, ...r];
80
80
  if (t && (n || C) && E)
81
81
  if (I) {
@@ -88,7 +88,7 @@ import '../assets/index18.css';const qe = (h) => {
88
88
  else I && (s = x(e, r).updatedIdsWithAncestryIds);
89
89
  return s;
90
90
  }, fe = (e, n, t, r) => {
91
- const s = w.isArray(e) ? e : [e];
91
+ const s = A.isArray(e) ? e : [e];
92
92
  let l = c.filter((d) => !s.includes(d));
93
93
  if (t && (n || C) && E)
94
94
  if (I) {
@@ -103,7 +103,7 @@ import '../assets/index18.css';const qe = (h) => {
103
103
  return l;
104
104
  }, H = (e, n, t, r = !1, s = C) => {
105
105
  let l = [...c];
106
- n ? l = ue(e, s, t) : l = fe(e, s, t, r), P(l), p && p(l);
106
+ n ? l = ue(e, s, t) : l = fe(e, s, t, r), P(l), q && q(l);
107
107
  }, he = (e, n, t = !1) => {
108
108
  O(!0), H(e, n, !0, t, !0);
109
109
  }, j = (e, n, t) => {
@@ -112,8 +112,8 @@ import '../assets/index18.css';const qe = (h) => {
112
112
  const s = {};
113
113
  s[e.id] = r, Object.assign(t, s);
114
114
  }
115
- return /* @__PURE__ */ g.jsx(
116
- pe,
115
+ return /* @__PURE__ */ w.jsx(
116
+ Se,
117
117
  {
118
118
  node: e,
119
119
  idsInLoading: z,
@@ -143,16 +143,16 @@ import '../assets/index18.css';const qe = (h) => {
143
143
  updatedIdsWithAncestryIds: l
144
144
  } = x(r, [], !0, !1);
145
145
  t = [...t, ...l], s && (n = [...n, ...s]);
146
- }), S(w.uniq(n)), P(w.uniq(t)), ce((r) => r || !0);
146
+ }), S(A.uniq(n)), P(A.uniq(t)), ce((r) => r || !0);
147
147
  };
148
- q(() => {
149
- const e = w.isEqual(W.sort(), f.sort());
150
- $ && h.data !== N ? le(h.data) : e || (P(f), p == null || p(f), de(f));
151
- }, [f.length, h.data]), q(() => {
148
+ g(() => {
149
+ const e = A.isEqual(W.sort(), f.sort());
150
+ $ && h.data !== N ? le(h.data) : e || (P(f), q?.(f), de(f));
151
+ }, [f.length, h.data]), g(() => {
152
152
  I && !R && M(c);
153
- }, [c]), q(() => {
153
+ }, [c]), g(() => {
154
154
  I && M(c);
155
- }, [W]), q(() => {
155
+ }, [W]), g(() => {
156
156
  j(N, void 0, o);
157
157
  }, []);
158
158
  const Ie = {
@@ -166,9 +166,9 @@ import '../assets/index18.css';const qe = (h) => {
166
166
  handlerUpdateSelectedIds: H,
167
167
  handlerToggleCheckChildren: he
168
168
  };
169
- return /* @__PURE__ */ g.jsx(Se.Provider, { value: Ie, children: /* @__PURE__ */ g.jsxs("div", { className: `treeview-component ${Y}`, children: [
169
+ return /* @__PURE__ */ w.jsx(pe.Provider, { value: Ie, children: /* @__PURE__ */ w.jsxs("div", { className: `treeview-component ${Y}`, children: [
170
170
  Z,
171
- /* @__PURE__ */ g.jsx(
171
+ /* @__PURE__ */ w.jsx(
172
172
  "ul",
173
173
  {
174
174
  style: ee,
@@ -179,7 +179,7 @@ import '../assets/index18.css';const qe = (h) => {
179
179
  ] }) });
180
180
  };
181
181
  export {
182
- pe as TreeNode,
182
+ Se as TreeNode,
183
183
  Oe as TreeViewHeader,
184
184
  qe as default
185
185
  };
@@ -1,12 +1,12 @@
1
- import { j as o } from "../chunks/jsx-runtime.gtoSnx-V.js";
2
- import { useState as r, useRef as v, useCallback as V, useEffect as w, useMemo as X } from "react";
1
+ import { j as o } from "../chunks/jsx-runtime.C7wFtzyj.js";
2
+ import { useState as l, useRef as E, useCallback as V, useEffect as w, useMemo as X } from "react";
3
3
  import { createPortal as Y } from "react-dom";
4
4
  import Z from "../buttons/Button.js";
5
5
  import y from "../buttons/PrimaryButton.js";
6
6
  import "../icons/index.js";
7
7
  import '../assets/button.css';import '../assets/index19.css';/* empty css */
8
- import { STEP_POSITIONS as h, ARROW_WIDTH as G, ARROW_HEIGHT as U } from "./helpers.js";
9
- const re = ($) => {
8
+ import { STEP_POSITIONS as b, ARROW_WIDTH as G, ARROW_HEIGHT as U } from "./helpers.js";
9
+ const le = ($) => {
10
10
  const {
11
11
  data: i,
12
12
  nextButtonLabel: j,
@@ -16,40 +16,40 @@ const re = ($) => {
16
16
  showBackButton: R = !0,
17
17
  visible: a = !0,
18
18
  onFinish: T,
19
- onStepChange: P
20
- } = $, [s, b] = r(void 0), [x, g] = r(!1), [I, S] = r(!1), [u, B] = r(!1), [L, H] = r(null), [f, A] = r(a), [W, O] = r(h.left), m = v(null), E = v(null), l = v([]), M = () => {
19
+ onStepChange: O
20
+ } = $, [s, h] = l(void 0), [x, g] = l(!1), [I, S] = l(!1), [u, v] = l(!1), [P, L] = l(null), [f, H] = l(a), [A, W] = l(b.left), m = E(null), B = E(null), r = E([]), M = () => {
21
21
  if (x) {
22
- const e = i.findIndex((c) => c.id === (s == null ? void 0 : s.id)), t = i[e + 1], n = i.findIndex((c) => c.id === t.id);
23
- document.getElementById(t.targetId) && b({ ...t, number: n + 1 });
22
+ const e = i.findIndex((c) => c.id === s?.id), t = i[e + 1], n = i.findIndex((c) => c.id === t.id);
23
+ document.getElementById(t.targetId) && h({ ...t, number: n + 1 });
24
24
  }
25
25
  }, _ = () => {
26
26
  if (I) {
27
- const e = i.findIndex((c) => c.id === (s == null ? void 0 : s.id)), t = i[e - 1], n = i.findIndex((c) => c.id === t.id);
28
- document.getElementById(t.targetId) && b({ ...t, number: n + 1 });
27
+ const e = i.findIndex((c) => c.id === s?.id), t = i[e - 1], n = i.findIndex((c) => c.id === t.id);
28
+ document.getElementById(t.targetId) && h({ ...t, number: n + 1 });
29
29
  }
30
30
  }, p = () => {
31
- A(!1), T && T(!0);
31
+ H(!1), T && T(!0);
32
32
  }, q = (e) => {
33
33
  if (m.current) {
34
34
  const t = m.current.getBoundingClientRect(), n = window.innerWidth;
35
- t.right >= n || (s == null ? void 0 : s.position) === h.right ? (O(h.right), H({
35
+ t.right >= n || s?.position === b.right ? (W(b.right), L({
36
36
  top: e.top - U,
37
37
  left: e.left - t.width - G
38
- })) : (O(h.left), H({
38
+ })) : (W(b.left), L({
39
39
  top: e.top - U,
40
40
  left: e.left + e.width + G
41
41
  }));
42
42
  }
43
43
  }, D = (e) => {
44
- A(a), b(e);
44
+ H(a), h(e);
45
45
  }, z = () => {
46
- l.current.length > 0 && l.current.forEach((t) => {
46
+ r.current.length > 0 && r.current.forEach((t) => {
47
47
  const n = document.getElementById(t.elementId);
48
- n && (delete n.dataset.uitour, l.current = l.current.filter((d) => d.elementId !== t.elementId));
48
+ n && (delete n.dataset.uitour, r.current = r.current.filter((d) => d.elementId !== t.elementId));
49
49
  });
50
50
  }, F = V((e) => {
51
51
  const t = document.getElementById(e.elementId);
52
- t && (t.dataset.uitour = e.effect, l.current && l.current.push(e));
52
+ t && (t.dataset.uitour = e.effect, r.current && r.current.push(e));
53
53
  }, []), J = (e) => {
54
54
  if (e.effect) {
55
55
  const { effect: t, targetId: n } = e;
@@ -69,38 +69,38 @@ const re = ($) => {
69
69
  const t = e.getBoundingClientRect(), n = i.findIndex((Q) => Q.id === s.id), d = i.length - 1, c = 0;
70
70
  switch (n) {
71
71
  case d:
72
- g(!1), S(!0), B(!0);
72
+ g(!1), S(!0), v(!0);
73
73
  break;
74
74
  case c:
75
- g(!0), B(!1), S(!1);
75
+ g(!0), v(!1), S(!1);
76
76
  break;
77
77
  default:
78
- g(!0), S(!0), B(!1);
78
+ g(!0), S(!0), v(!1);
79
79
  }
80
- q(t), z(), J(i[n]), P && P(e);
80
+ q(t), z(), J(i[n]), O && O(e);
81
81
  }
82
- E.current && (E.current.innerHTML = s.description);
82
+ B.current && (B.current.innerHTML = s.description);
83
83
  }
84
84
  }, [s, m.current]), w(() => {
85
85
  let e = null;
86
86
  if (i && a) {
87
87
  const n = { ...i[0], number: 1 };
88
88
  document.getElementById(n.targetId) ? D(n) : (e = new MutationObserver(() => {
89
- document.getElementById(n.targetId) && (D(n), e == null || e.disconnect(), e = null);
89
+ document.getElementById(n.targetId) && (D(n), e?.disconnect(), e = null);
90
90
  }), e.observe(document, { subtree: !0, childList: !0 }));
91
91
  }
92
92
  return () => {
93
- e == null || e.disconnect(), e = null;
93
+ e?.disconnect(), e = null;
94
94
  };
95
95
  }, [a, i]), w(() => {
96
- !f && l.current.length > 0 && z(), f ? document.body.style.overflow = "hidden" : document.body.style.overflow = "auto";
97
- }, [f, l.current.length]);
96
+ !f && r.current.length > 0 && z(), f ? document.body.style.overflow = "hidden" : document.body.style.overflow = "auto";
97
+ }, [f, r.current.length]);
98
98
  const K = X(() => /* @__PURE__ */ o.jsx("div", { className: "uitour-component", children: s && /* @__PURE__ */ o.jsxs(
99
99
  "div",
100
100
  {
101
101
  ref: m,
102
- className: `step -${W}`,
103
- style: { ...L },
102
+ className: `step -${A}`,
103
+ style: { ...P },
104
104
  children: [
105
105
  C && /* @__PURE__ */ o.jsx("div", { className: "closebutton", children: /* @__PURE__ */ o.jsx(
106
106
  Z,
@@ -122,7 +122,7 @@ const re = ($) => {
122
122
  "p",
123
123
  {
124
124
  className: "description",
125
- ref: E
125
+ ref: B
126
126
  }
127
127
  )
128
128
  ] })
@@ -163,8 +163,8 @@ const re = ($) => {
163
163
  s.id
164
164
  ) }), [
165
165
  s,
166
- W,
167
- L,
166
+ A,
167
+ P,
168
168
  C,
169
169
  p,
170
170
  k,
@@ -182,5 +182,5 @@ const re = ($) => {
182
182
  return f ? Y(K, document.body) : null;
183
183
  };
184
184
  export {
185
- re as default
185
+ le as default
186
186
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linear-react-components-ui",
3
- "version": "1.1.26-beta.5",
3
+ "version": "1.1.26-beta.6",
4
4
  "description": "Linear Sistemas ReactJs Components",
5
5
  "type": "module",
6
6
  "files": [
@@ -11,7 +11,6 @@
11
11
  "demo": "vite",
12
12
  "demo:prod": "vite preview",
13
13
  "check:js": "eslint --cache",
14
- "deploy:heroku": "npm run demo:prod && cd demo && git commit -am 'Deploy' && git push heroku master",
15
14
  "deploy:vercel": "npm run demo:prod && vercel --prod demo",
16
15
  "publish:npm": "npm run lib && npm publish",
17
16
  "publish:npm:beta": "npm run lib && npm publish --tag beta",
@@ -42,59 +41,45 @@
42
41
  ]
43
42
  },
44
43
  "dependencies": {
45
- "attach-dom-events": "1.0.0",
46
- "browserslist": "4.23.0",
47
- "esbuild": "0.21.5",
48
- "history": "5.0.0",
49
- "init": "0.1.2",
50
44
  "lodash": "4.17.21",
51
45
  "moment": "2.30.1",
52
- "prop-types": "15.8.1",
53
- "react-dev-utils": "12.0.0",
54
46
  "react-imask": "7.6.1",
55
- "react-router-dom": "6.30.1",
56
- "react-syntax-highlighter": "15.5.0",
57
- "semver": "7.5.4",
58
- "uuid": "9.0.1"
47
+ "react-router-dom": "7.8.2",
48
+ "react-syntax-highlighter": "15.6.6",
49
+ "uuid": "13.0.0",
50
+ "react": "19.1.1",
51
+ "react-dom": "19.1.1"
59
52
  },
60
53
  "devDependencies": {
61
- "@eslint/js": "9.34.0",
54
+ "@eslint/js": "9.35.0",
62
55
  "@stylistic/eslint-plugin": "5.3.1",
63
- "@swc/core": "1.4.13",
64
- "@testing-library/dom": "10.4.0",
65
- "@testing-library/jest-dom": "6.6.3",
66
- "@testing-library/react": "16.2.0",
56
+ "@testing-library/dom": "10.4.1",
57
+ "@testing-library/jest-dom": "6.8.0",
58
+ "@testing-library/react": "16.3.0",
67
59
  "@testing-library/user-event": "14.6.1",
68
- "@types/lodash": "4.14.191",
69
- "@types/node": "22.13.14",
70
- "@types/react": "19.0.12",
71
- "@types/react-dev-utils": "9.0.11",
72
- "@types/react-dom": "19.0.4",
73
- "@types/react-syntax-highlighter": "15.5.6",
74
- "@types/uuid": "8.3.4",
75
- "@vitejs/plugin-react": "4.3.4",
60
+ "@types/lodash": "4.17.20",
61
+ "@types/node": "22.18.0",
62
+ "@types/react": "19.1.12",
63
+ "@types/react-dom": "19.1.9",
64
+ "@types/react-syntax-highlighter": "15.5.13",
65
+ "@vitejs/plugin-react": "5.0.2",
76
66
  "babel-plugin-react-compiler": "19.1.0-rc.3",
77
- "eslint": "9.34.0",
67
+ "eslint": "9.35.0",
78
68
  "eslint-plugin-import": "2.32.0",
79
69
  "eslint-plugin-jsx-a11y": "6.10.2",
80
70
  "eslint-plugin-react": "7.37.5",
81
71
  "eslint-plugin-react-hooks": "6.0.0-rc.1",
82
72
  "fast-glob": "3.3.3",
83
- "globals": "16.3.0",
84
- "husky": "9.0.7",
85
- "identity-obj-proxy": "3.0.0",
73
+ "globals": "16.4.0",
74
+ "husky": "9.1.7",
86
75
  "jiti": "2.5.1",
87
76
  "jsdom": "26.1.0",
88
- "react": "19.1.1",
89
- "react-dom": "19.1.1",
90
77
  "resize-observer-polyfill": "1.5.1",
91
- "sass": "1.74.1",
92
- "ts-node": "10.9.2",
93
- "tsup": "6.6.0",
94
- "typescript": "4.9.5",
95
- "typescript-eslint": "8.42.0",
96
- "vite": "6.2.3",
97
- "vite-plugin-dts": "^4.5.4",
78
+ "sass-embedded": "1.92.1",
79
+ "typescript": "5.9.2",
80
+ "typescript-eslint": "8.43.0",
81
+ "vite": "7.1.5",
82
+ "vite-plugin-dts": "4.5.4",
98
83
  "vite-plugin-lib-inject-css": "2.2.2",
99
84
  "vitest": "3.2.4"
100
85
  }