linear-react-components-ui 1.1.26-beta.4 → 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 +10 -10
  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.Da--18GT.js → index.Df3kt2LQ.js} +179 -181
  44. package/lib/chunks/{jsx-runtime.gtoSnx-V.js → jsx-runtime.C7wFtzyj.js} +2 -2
  45. package/lib/chunks/lodash.CIAK_hAg.js +3684 -0
  46. package/lib/chunks/moment.DMLRxgRE.js +2589 -0
  47. package/lib/chunks/{tabs.BP3DB7Gx.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 +7 -7
  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 +44 -44
  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 +3 -3
  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.iA-fVKOP.js +0 -89
  210. package/lib/chunks/v1.CDXKvGzE.js +0 -41
  211. /package/lib/assets/{index29.css → progressbar.css} +0 -0
@@ -1,5 +1,89 @@
1
- import "../../chunks/jsx-runtime.gtoSnx-V.js";
2
- import { P as a } from "../../chunks/index.iA-fVKOP.js";
1
+ import { j as t } from "../../chunks/jsx-runtime.C7wFtzyj.js";
2
+ import m, { useEffect as b } from "react";
3
+ import { _ as f } from "../../chunks/lodash.CIAK_hAg.js";
4
+ import { F as j } from "../../chunks/index.CM1aLH2W.js";
5
+ import "./useWizard.js";
6
+ import '../../assets/progressbar.css';function W({
7
+ customClass: s,
8
+ customStyle: e,
9
+ stepsTitle: a,
10
+ position: n = "top"
11
+ }) {
12
+ const o = u();
13
+ if (!o)
14
+ throw new Error("WizardProgressbar must be used within a Wizard component");
15
+ const { currentStep: c } = o;
16
+ return /* @__PURE__ */ t.jsx(
17
+ "div",
18
+ {
19
+ className: `wizard-progressbar ${s}`,
20
+ style: e,
21
+ "data-position": n,
22
+ children: a.map((r) => /* @__PURE__ */ t.jsxs(
23
+ "div",
24
+ {
25
+ className: "title",
26
+ "data-completed": r.completed,
27
+ "data-disabled": r.number > c,
28
+ children: [
29
+ /* @__PURE__ */ t.jsx("div", { className: "step", children: /* @__PURE__ */ t.jsx("span", { className: "number", children: r.number }) }),
30
+ /* @__PURE__ */ t.jsx("span", { className: "step-title", children: r.title })
31
+ ]
32
+ },
33
+ r.number
34
+ ))
35
+ }
36
+ );
37
+ }
38
+ function C({ children: s, customClass: e = "", customStyle: a }) {
39
+ if (!u())
40
+ throw new Error("WizardStep must be used within a Wizard component");
41
+ return /* @__PURE__ */ t.jsx("div", { className: `wizard-step-component ${e}`, style: a, children: s });
42
+ }
43
+ const p = m.createContext(null), u = () => m.useContext(p);
44
+ function E({
45
+ children: s,
46
+ controls: e,
47
+ showProgressbar: a = !0,
48
+ customStyleForProgressBar: n,
49
+ customStyleForBody: o,
50
+ progressBarPosition: c = "top",
51
+ ...r
52
+ }) {
53
+ const { currentStep: l, setTotalSteps: h } = e, i = m.Children.toArray(s), x = i.map((z, d) => ({
54
+ title: String(z.props.title),
55
+ number: d + 1,
56
+ completed: d < l - 1 && d !== l
57
+ })), w = i[l - 1];
58
+ if (!e || f.isEmpty(e))
59
+ throw new Error("Wizard must be have controls by using useWizard hook or creating manually.");
60
+ return b(() => {
61
+ h(i.length);
62
+ }, [i.length]), /* @__PURE__ */ t.jsx(p.Provider, { value: e, children: /* @__PURE__ */ t.jsxs(
63
+ j,
64
+ {
65
+ className: "wizard-dialog",
66
+ wrapperClassName: "wizard-wrapper",
67
+ contentClassName: "wizard-content",
68
+ ...r,
69
+ children: [
70
+ a && /* @__PURE__ */ t.jsx(
71
+ W,
72
+ {
73
+ stepsTitle: x,
74
+ customStyle: n,
75
+ position: c
76
+ }
77
+ ),
78
+ /* @__PURE__ */ t.jsx("div", { className: "wizard-body", style: o, children: w })
79
+ ]
80
+ }
81
+ ) });
82
+ }
3
83
  export {
4
- a as Progressbar
84
+ W as Progressbar,
85
+ C as W,
86
+ p as a,
87
+ E as b,
88
+ u
5
89
  };
@@ -1,5 +1,5 @@
1
- import "../../chunks/jsx-runtime.gtoSnx-V.js";
2
- import { W as t } from "../../chunks/index.iA-fVKOP.js";
1
+ import "../../chunks/jsx-runtime.C7wFtzyj.js";
2
+ import { W as t } from "./progressbar.js";
3
3
  export {
4
4
  t as WizardStep
5
5
  };
@@ -1,4 +1,4 @@
1
- import { j as o } from "../chunks/jsx-runtime.gtoSnx-V.js";
1
+ import { j as o } from "../chunks/jsx-runtime.C7wFtzyj.js";
2
2
  import { useContext as s } from "react";
3
3
  import m from "./helpers.js";
4
4
  import n from "../noPermission/index.js";
@@ -1,4 +1,4 @@
1
- import { j as n } from "../chunks/jsx-runtime.gtoSnx-V.js";
1
+ import { j as n } from "../chunks/jsx-runtime.C7wFtzyj.js";
2
2
  import { useRef as f, useState as R, useEffect as v, Suspense as M } from "react";
3
3
  import _ from "react-dom";
4
4
  import H from "./helpers.js";
@@ -9,63 +9,63 @@ import "../form/withFormSecurity.js";
9
9
  import F from "../spinner/index.js";
10
10
  import '../assets/Drawer.css';const W = ({
11
11
  position: w = "left",
12
- customClass: E = "",
13
- children: C,
14
- style: h,
12
+ customClass: C = "",
13
+ children: h,
14
+ style: E,
15
15
  customClassForContent: x = "",
16
16
  targetId: o,
17
17
  closeOnEsc: d,
18
18
  overlay: D,
19
19
  permissionAttr: N,
20
- skeletonize: m,
21
- handlerClose: s,
20
+ skeletonize: c,
21
+ handlerClose: m,
22
22
  customClassForDrawer: j = "",
23
23
  content: l,
24
24
  title: u,
25
25
  isWaiting: p = !1,
26
26
  ...S
27
27
  }) => {
28
- const b = { ...S, title: u }, i = f(document.createElement("div"));
29
- i.current.className = "drawercontainer";
28
+ const b = { ...S, title: u }, s = f(document.createElement("div"));
29
+ s.current.className = "drawercontainer";
30
30
  const a = f(null), { hideContent: O } = V, [P] = R(q([O], N)), B = p ? { opacity: 0.4, pointerEvent: "none", placeContent: "center" } : {}, g = () => p ? /* @__PURE__ */ n.jsx("div", { className: "waitingspinner", children: /* @__PURE__ */ n.jsx(F, { style: { width: 60 }, delayTime: 0 }) }) : null, k = (e, r) => {
31
31
  const t = document.createElement("div");
32
- t.className = "drawer-component", t.id = String(r), e.appendChild(t), t.appendChild(i.current), a.current = t;
32
+ t.className = "drawer-component", t.id = String(r), e.appendChild(t), t.appendChild(s.current), a.current = t;
33
33
  }, T = (e) => {
34
34
  const r = document.createElement("div");
35
35
  r.className = "drawer-overlay", r.dataset.testid = "drawer-overlay", e.appendChild(r);
36
- }, c = (e) => {
37
- d && e.key === "Escape" && (s == null || s(), e.stopPropagation());
36
+ }, i = (e) => {
37
+ d && e.key === "Escape" && (m?.(), e.stopPropagation());
38
38
  };
39
39
  v(() => {
40
40
  let e;
41
41
  const r = Math.round(+/* @__PURE__ */ new Date() / 1e3);
42
42
  return o === void 0 ? e = document.getElementsByTagName("body")[0] : e = document.getElementById(o), e && k(e, r), D && !o && e && T(e), () => {
43
43
  const t = document.getElementsByClassName("drawer-overlay")[0];
44
- if (d && document.body.removeEventListener("keydown", c), o) {
44
+ if (d && document.body.removeEventListener("keydown", i), o) {
45
45
  const y = document.getElementById(o);
46
46
  y && a.current && y.removeChild(a.current);
47
47
  } else a.current && document.body.removeChild(a.current);
48
48
  t && !o && e && e.removeChild(t);
49
49
  };
50
- }, []), v(() => (d && document.body.addEventListener("keydown", c), () => document.body.removeEventListener("keydown", c)), [d]);
50
+ }, []), v(() => (d && document.body.addEventListener("keydown", i), () => document.body.removeEventListener("keydown", i)), [d]);
51
51
  const $ = {
52
- handlerClose: s,
52
+ handlerClose: m,
53
53
  hideContent: P.hideContent,
54
- skeletonize: m
55
- }, L = () => /* @__PURE__ */ n.jsx(H.Provider, { value: $, children: /* @__PURE__ */ n.jsx("div", { "data-testid": "drawercontainer-component", className: `${w} ${E}`, style: h, children: /* @__PURE__ */ n.jsxs(
54
+ skeletonize: c
55
+ }, L = () => /* @__PURE__ */ n.jsx(H.Provider, { value: $, children: /* @__PURE__ */ n.jsx("div", { "data-testid": "drawercontainer-component", className: `${w} ${C}`, style: E, children: /* @__PURE__ */ n.jsxs(
56
56
  "div",
57
57
  {
58
58
  style: B,
59
59
  "data-testid": "drawercontent",
60
- className: `drawercontent ${m ? "-skeletonized" : ""} ${x}`,
60
+ className: `drawercontent ${c ? "-skeletonized" : ""} ${x}`,
61
61
  children: [
62
62
  u && /* @__PURE__ */ n.jsx(z, { ...b, customClass: j }),
63
- /* @__PURE__ */ n.jsx(M, { children: l ? /* @__PURE__ */ n.jsx(A, { children: l }) : C }),
63
+ /* @__PURE__ */ n.jsx(M, { children: l ? /* @__PURE__ */ n.jsx(A, { children: l }) : h }),
64
64
  g()
65
65
  ]
66
66
  }
67
67
  ) }) });
68
- return _.createPortal(L(), i.current);
68
+ return _.createPortal(L(), s.current);
69
69
  };
70
70
  export {
71
71
  W as default
@@ -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 { useContext as p, Fragment as t } from "react";
3
3
  import h from "../icons/index.js";
4
4
  import N from "./helpers.js";
@@ -1,6 +1,6 @@
1
1
  import { useRef as w, useEffect as x } from "react";
2
2
  import P from "react-dom";
3
- import { v } from "../chunks/v1.CDXKvGzE.js";
3
+ import { v } from "../chunks/v1.Ds1rkxUj.js";
4
4
  const y = ({
5
5
  align: s,
6
6
  isFloatMenu: r,
@@ -1,55 +1,55 @@
1
- import { j as s } from "../chunks/jsx-runtime.gtoSnx-V.js";
1
+ import { j as r } from "../chunks/jsx-runtime.C7wFtzyj.js";
2
2
  import { createContext as L, useState as h, useRef as x, useEffect as O } from "react";
3
- import A from "./Popup.js";
4
- import '../assets/withDropdown.css';const M = L({}), S = (o) => o.displayName || o.name || "Component", q = (o) => {
5
- const a = (c) => {
3
+ import R from "./Popup.js";
4
+ import '../assets/withDropdown.css';const A = L({}), M = (o) => o.displayName || o.name || "Component", b = (o) => {
5
+ const u = (c) => {
6
6
  const {
7
- dropdownOpened: t,
8
- showDropdown: p,
7
+ dropdownOpened: n,
8
+ showDropdown: a,
9
9
  dropdown: i,
10
10
  closeDropdownOnClickOutside: w = !0,
11
- handlerClose: l,
11
+ handlerClose: p,
12
12
  customClassForDropdown: v,
13
13
  children: C,
14
14
  dropdownAlign: j = "left",
15
- isFloatMenu: m,
15
+ isFloatMenu: f,
16
16
  isDropdownOpened: P
17
- } = c, [u, r] = h(t), [k, E] = h(t), e = x(null), D = x(null);
18
- t !== k && (r(t), E(t));
19
- const f = (n) => {
20
- const { target: d } = n;
21
- e != null && e.current && d !== (e == null ? void 0 : e.current) && !n.composedPath().includes(e.current) && D.current !== d && r(!1);
17
+ } = c, [l, t] = h(n), [k, E] = h(n), s = x(null), m = x(null);
18
+ n !== k && (t(n), E(n));
19
+ const D = (e) => {
20
+ const { target: d } = e;
21
+ s?.current && d !== s?.current && !e.composedPath().includes(s.current) && m.current !== d && t(!1);
22
22
  }, g = () => {
23
- r((n) => !n);
24
- }, N = (n) => !n || !u ? null : (D.current = n, /* @__PURE__ */ s.jsx(
25
- A,
23
+ t((e) => !e);
24
+ }, N = (e) => !e || !l ? null : (m.current = e, /* @__PURE__ */ r.jsx(
25
+ R,
26
26
  {
27
- targetRef: n,
27
+ targetRef: e,
28
28
  align: j,
29
29
  customClassForDropdown: v,
30
- isFloatMenu: m,
31
- children: /* @__PURE__ */ s.jsx("div", { className: m ? "items" : void 0, ref: (d) => {
32
- e.current = d;
30
+ isFloatMenu: f,
31
+ children: /* @__PURE__ */ r.jsx("div", { className: f ? "items" : void 0, ref: (d) => {
32
+ s.current = d;
33
33
  }, children: C })
34
34
  }
35
35
  ));
36
- O(() => (i && w && document.addEventListener("click", f), () => {
37
- i && w && document.removeEventListener("click", f);
36
+ O(() => (i && w && document.addEventListener("click", D), () => {
37
+ i && w && document.removeEventListener("click", D);
38
38
  }), []), O(() => {
39
- l && l(() => r(!1));
40
- }, [l]);
39
+ p && p(() => t(!1));
40
+ }, [p]);
41
41
  const y = {
42
42
  handleDropdownClose: g
43
43
  }, F = {
44
- getDropdownPopup: (n) => N(n),
45
- showDropdown: p || (() => r(!u)),
46
- isDropdownOpened: P || u
44
+ getDropdownPopup: (e) => N(e),
45
+ showDropdown: a || (() => t(!l)),
46
+ isDropdownOpened: P || l
47
47
  };
48
- return i ? /* @__PURE__ */ s.jsx(M.Provider, { value: y, children: /* @__PURE__ */ s.jsx(o, { ...c, ...F }) }) : /* @__PURE__ */ s.jsx(o, { ...c });
48
+ return i ? /* @__PURE__ */ r.jsx(A.Provider, { value: y, children: /* @__PURE__ */ r.jsx(o, { ...c, ...F }) }) : /* @__PURE__ */ r.jsx(o, { ...c });
49
49
  };
50
- return a.displayName = `withDropdown(${S(o)})`, a;
50
+ return u.displayName = `withDropdown(${M(o)})`, u;
51
51
  };
52
52
  export {
53
- M as WithDropdownContext,
54
- q as default
53
+ A as WithDropdownContext,
54
+ b as default
55
55
  };
@@ -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 { useState as O, Fragment as D } from "react";
3
3
  import '../assets/gridlayout.css';import '../assets/index12.css';/* empty css */
4
4
  import T from "../gridlayout/GridCol.js";
package/lib/form/Field.js CHANGED
@@ -1,6 +1,6 @@
1
- import { j as p } from "../chunks/jsx-runtime.gtoSnx-V.js";
1
+ import { j as p } from "../chunks/jsx-runtime.C7wFtzyj.js";
2
2
  import { forwardRef as C, useContext as v } from "react";
3
- import l from "lodash";
3
+ import { _ as l } from "../chunks/lodash.CIAK_hAg.js";
4
4
  import x from "./withFieldHOC.js";
5
5
  import { withFieldContext as E, getErrorMessages as F, getValidatorsArray as h } from "./helpers.js";
6
6
  const y = ({
@@ -1,6 +1,6 @@
1
- import { j as t } from "../chunks/jsx-runtime.gtoSnx-V.js";
1
+ import { j as t } from "../chunks/jsx-runtime.C7wFtzyj.js";
2
2
  import { Fragment as C, useCallback as u } from "react";
3
- import x from "lodash";
3
+ import { _ as x } from "../chunks/lodash.CIAK_hAg.js";
4
4
  import E from "./withFieldHOC.js";
5
5
  import '../assets/gridlayout.css';/* empty css */
6
6
  import F from "../gridlayout/GridCol.js";
@@ -1,44 +1,44 @@
1
- import { j as N } from "../chunks/jsx-runtime.gtoSnx-V.js";
2
- import b from "lodash";
3
- import j from "./withFieldHOC.js";
4
- import { getErrorMessages as k } from "./helpers.js";
5
- import { keyCodes as M } from "../internals/constants.js";
6
- const y = ({
1
+ import { j as c } from "../chunks/jsx-runtime.C7wFtzyj.js";
2
+ import { _ as E } from "../chunks/lodash.CIAK_hAg.js";
3
+ import g from "./withFieldHOC.js";
4
+ import { getErrorMessages as x } from "./helpers.js";
5
+ import { keyCodes as N } from "../internals/constants.js";
6
+ const b = ({
7
7
  name: r,
8
- validators: u,
9
- onBlur: m,
10
- onKeyDown: E,
11
- onChange: x,
12
- handlerFieldValidate: s,
13
- handlerFieldChange: g,
14
- component: t
8
+ validators: f,
9
+ onBlur: o,
10
+ onKeyDown: u,
11
+ onChange: e,
12
+ handlerFieldValidate: m,
13
+ handlerFieldChange: s,
14
+ component: i
15
15
  }) => ({
16
- onBlur: (f) => {
17
- (t == null ? void 0 : t.name) !== "NumberField" && g && g(f), u && s && s(r, f.target.value, u), m && m(f);
16
+ onBlur: (t) => {
17
+ i?.name !== "NumberField" && s && s(t), f && m && m(r, t.target.value, f), o && o(t);
18
18
  },
19
- onKeyDown: (f) => {
20
- [M.ENTER].includes(f.keyCode) && (u && (s == null || s(r, f.target.value, u)), E && E(f));
19
+ onKeyDown: (t) => {
20
+ [N.ENTER].includes(t.keyCode) && (f && m?.(r, t.target.value, f), u && u(t));
21
21
  },
22
- onChange: (f) => {
23
- (t == null ? void 0 : t.name) === "NumberField" && (u && f.target && s && s(r, f.target.value, u), g && g(f)), x && x(f);
22
+ onChange: (t) => {
23
+ i?.name === "NumberField" && (f && t.target && m && m(r, t.target.value, f), s && s(t)), e && e(t);
24
24
  }
25
- }), R = (r) => {
26
- const { data: u, name: m } = r, E = b.get(u, m);
27
- return /* @__PURE__ */ N.jsx(
25
+ }), j = (r) => {
26
+ const { data: f, name: o } = r, u = E.get(f, o);
27
+ return /* @__PURE__ */ c.jsx(
28
28
  r.component,
29
29
  {
30
30
  ...r,
31
- ...y({
31
+ ...b({
32
32
  ...r
33
33
  }),
34
- errorMessages: k({
34
+ errorMessages: x({
35
35
  ...r,
36
36
  fieldErrors: r.fieldErrors
37
37
  }),
38
- value: E
38
+ value: u
39
39
  }
40
40
  );
41
- }, T = j(R);
41
+ }, w = g(j);
42
42
  export {
43
- T as default
43
+ w as default
44
44
  };
@@ -1,6 +1,6 @@
1
- import { j as x } from "../chunks/jsx-runtime.gtoSnx-V.js";
1
+ import { j as x } from "../chunks/jsx-runtime.C7wFtzyj.js";
2
2
  import { useState as V, useEffect as $ } from "react";
3
- import e from "lodash";
3
+ import { _ as e } from "../chunks/lodash.CIAK_hAg.js";
4
4
  import '../assets/gridlayout.css';/* empty css */
5
5
  import j from "../gridlayout/GridCol.js";
6
6
  import w from "./withFieldHOC.js";
@@ -1,4 +1,4 @@
1
- import y from "lodash";
1
+ import { _ as y } from "../chunks/lodash.CIAK_hAg.js";
2
2
  import u from "react";
3
3
  const h = "securityBeforeUnload", x = u.createContext({}), B = u.createContext({}), J = (e, c) => {
4
4
  const { name: t, value: s } = c;
package/lib/form/index.js CHANGED
@@ -1,21 +1,21 @@
1
- import { j as x } from "../chunks/jsx-runtime.gtoSnx-V.js";
2
- import { useState as m, useContext as ar, useRef as U, useCallback as q, useEffect as F, Fragment as dr } from "react";
3
- import f from "lodash";
4
- import { changeValue as B, FormContext as mr } from "./helpers.js";
1
+ import { j as x } from "../chunks/jsx-runtime.C7wFtzyj.js";
2
+ import { useState as d, useContext as ar, useRef as U, useCallback as q, useEffect as F, Fragment as ur } from "react";
3
+ import { _ as f } from "../chunks/lodash.CIAK_hAg.js";
4
+ import { changeValue as B, FormContext as dr } from "./helpers.js";
5
5
  import { default as br } from "./Field.js";
6
6
  import { default as Rr } from "./FieldNumber.js";
7
7
  import { default as Sr } from "./FieldArray.js";
8
8
  import { default as Pr } from "./FieldPeriod.js";
9
- import "../chunks/index.CjD97zna.js";
9
+ import "../chunks/index.CM1aLH2W.js";
10
10
  import "../buttons/DefaultButton.js";
11
11
  import "../icons/index.js";
12
12
  import '../assets/button.css';import '../assets/index13.css';/* empty css */
13
- import ur from "../dialog/Question.js";
13
+ import mr from "../dialog/Question.js";
14
14
  import { FormSecurityContext as pr } from "./withFormSecurity.js";
15
- import { v as Fr } from "../chunks/v1.CDXKvGzE.js";
15
+ import { v as Fr } from "../chunks/v1.Ds1rkxUj.js";
16
16
  const wr = ({
17
17
  submitOnPressEnterKey: g = !0,
18
- dataSource: u,
18
+ dataSource: m,
19
19
  securityBeforeUnload: j,
20
20
  handlerReset: k,
21
21
  handlerSubmit: L,
@@ -25,57 +25,57 @@ const wr = ({
25
25
  securityTitle: _,
26
26
  securityText: $,
27
27
  securityData: C,
28
- onDataChange: d,
28
+ onDataChange: u,
29
29
  onValidateForm: p,
30
30
  externalFieldErrors: G,
31
31
  onSubmit: H,
32
32
  skeletonize: T,
33
- disabled: h,
33
+ disabled: V,
34
34
  children: W,
35
35
  useInternalState: l = !1
36
36
  }) => {
37
- const X = Fr(), [v, J] = m(u), [E, Y] = m(u), [b, Z] = m(g), [V, O] = m({}), [A, K] = m(0), [I, rr] = m(!1), c = ar(pr), tr = U(null), a = U({}), i = l ? v : u, R = (r, t) => {
38
- const o = r instanceof Array ? r : [r];
39
- let e = [];
40
- return o.forEach((s) => {
37
+ const X = Fr(), [h, J] = d(m), [E, Y] = d(m), [b, Z] = d(g), [v, O] = d({}), [A, K] = d(0), [I, rr] = d(!1), c = ar(pr), tr = U(null), a = U({}), i = l ? h : m, R = (r, t) => {
38
+ const e = r instanceof Array ? r : [r];
39
+ let o = [];
40
+ return e.forEach((s) => {
41
41
  if (typeof s == "function") {
42
42
  const n = s(t);
43
- n && (e = [...e, n]);
43
+ n && (o = [...o, n]);
44
44
  }
45
- }), e;
45
+ }), o;
46
46
  }, or = (r, t) => {
47
- const o = r || i;
48
- let e = f.pickBy(V, (s, n) => Object.keys(t).includes(n));
47
+ const e = r || i;
48
+ let o = f.pickBy(v, (s, n) => Object.keys(t).includes(n));
49
49
  return f.forEach(t, (s, n) => {
50
- const P = f.get(o, n), lr = R(s, P);
51
- e = { ...e, [n]: lr };
52
- }), e;
53
- }, y = (r, t = !0, o = null) => {
54
- const e = or(r, o || a.current), s = Object.values(e).every((n) => n.length === 0);
50
+ const P = f.get(e, n), lr = R(s, P);
51
+ o = { ...o, [n]: lr };
52
+ }), o;
53
+ }, y = (r, t = !0, e = null) => {
54
+ const o = or(r, e || a.current), s = Object.values(o).every((n) => n.length === 0);
55
55
  return t && rr(s), s;
56
56
  }, er = q((r) => {
57
57
  const { target: t } = r;
58
- !l && d ? d((o) => B(o, t)) : J((o) => B(o, t));
59
- }, []), sr = (r, t, o) => {
60
- if (o) {
61
- let e = V;
62
- const s = R(o, t);
63
- s.length === 0 ? e = f.omit(e, r) : e = { ...e, [r]: s }, O(e);
58
+ !l && u ? u((e) => B(e, t)) : J((e) => B(e, t));
59
+ }, []), sr = (r, t, e) => {
60
+ if (e) {
61
+ let o = v;
62
+ const s = R(e, t);
63
+ s.length === 0 ? o = f.omit(o, r) : o = { ...o, [r]: s }, O(o);
64
64
  }
65
65
  }, Q = q((r) => {
66
66
  r && (r.preventDefault(), r.stopPropagation()), y(i) && H(i);
67
67
  }, [i]), S = (r, t) => {
68
- const o = t ? t instanceof Array ? t : [t] : [];
69
- o.length > 0 ? (r((e) => {
70
- const s = JSON.parse(JSON.stringify(e));
71
- return o.forEach((n) => {
68
+ const e = t ? t instanceof Array ? t : [t] : [];
69
+ e.length > 0 ? (r((o) => {
70
+ const s = JSON.parse(JSON.stringify(o));
71
+ return e.forEach((n) => {
72
72
  n && f.set(s, n, f.get(E, n));
73
73
  }), s;
74
- }), O((e) => (o.forEach((s) => {
75
- delete e[s];
76
- }), e))) : (r(JSON.parse(JSON.stringify(E))), O({}));
74
+ }), O((o) => (e.forEach((s) => {
75
+ delete o[s];
76
+ }), o))) : (r(JSON.parse(JSON.stringify(E))), O({}));
77
77
  }, ir = (r) => {
78
- S(!l && d ? d : J, r);
78
+ S(!l && u ? u : J, r);
79
79
  }, nr = (r) => {
80
80
  const t = f.omit(a, r);
81
81
  a.current = t;
@@ -83,7 +83,7 @@ const wr = ({
83
83
  r.preventDefault(), f.isEqual(i, E);
84
84
  }, fr = () => {
85
85
  let r = null;
86
- return h || (r = {
86
+ return V || (r = {
87
87
  onSubmit: (t) => t.preventDefault(),
88
88
  onKeyPress: (t) => {
89
89
  t && t.key === "Enter" && (t.preventDefault(), t.stopPropagation(), b && Q());
@@ -94,16 +94,16 @@ const wr = ({
94
94
  const { onChangedData: r } = c;
95
95
  C && !f.isEqual(i, C) ? r(!0) : r(!1);
96
96
  }
97
- d && l && d(i), p && p(y(i, !0)), h || (L(Q), k && k(ir), w && w(() => y(i))), f.isEmpty(i) && Y(i);
97
+ u && l && u(i), p && p(y(i, !0)), V || (L(Q), k && k(ir), w && w(() => y(i))), f.isEmpty(i) && Y(i);
98
98
  };
99
99
  F(() => {
100
100
  l && D();
101
- }, [JSON.stringify(v), l]), F(() => {
102
- !l && d && D();
103
- }, [JSON.stringify(u), l]), F(() => (j && (c && c.setSecurityBeforeUnload(!0), window.addEventListener("beforeunload", N)), () => window.removeEventListener("beforeunload", N)), [j, N]), F(() => {
104
- !h && g !== b && Z(g);
101
+ }, [JSON.stringify(h), l]), F(() => {
102
+ !l && u && D();
103
+ }, [JSON.stringify(m), l]), F(() => (j && (c && c.setSecurityBeforeUnload(!0), window.addEventListener("beforeunload", N)), () => window.removeEventListener("beforeunload", N)), [j, N]), F(() => {
104
+ !V && g !== b && Z(g);
105
105
  }, [g]), F(() => {
106
- const r = Object.values(a.current).reduce((t, o) => t + ((o == null ? void 0 : o.length) || 0), 0);
106
+ const r = Object.values(a.current).reduce((t, e) => t + (e?.length || 0), 0);
107
107
  a.current && p && A !== r && (K(r), p(y(i, !0, a.current)));
108
108
  }, [
109
109
  a.current,
@@ -119,14 +119,14 @@ const wr = ({
119
119
  a.current = { ...a.current, [r]: t };
120
120
  },
121
121
  handlerRemoveValidators: nr,
122
- data: l ? v : u,
122
+ data: l ? h : m,
123
123
  originalData: E,
124
- fieldErrors: V,
124
+ fieldErrors: v,
125
125
  externalFieldErrors: G,
126
126
  isFormValid: I
127
127
  };
128
- return /* @__PURE__ */ x.jsxs(dr, { children: [
129
- /* @__PURE__ */ x.jsx(mr.Provider, { value: cr, children: /* @__PURE__ */ x.jsx(
128
+ return /* @__PURE__ */ x.jsxs(ur, { children: [
129
+ /* @__PURE__ */ x.jsx(dr.Provider, { value: cr, children: /* @__PURE__ */ x.jsx(
130
130
  "form",
131
131
  {
132
132
  id: X,
@@ -139,7 +139,7 @@ const wr = ({
139
139
  }
140
140
  ) }),
141
141
  /* @__PURE__ */ x.jsx(
142
- ur,
142
+ mr,
143
143
  {
144
144
  zIndex: "99999999",
145
145
  title: _ || "Dados Alterados",
@@ -1,4 +1,4 @@
1
- import { j as i } from "../chunks/jsx-runtime.gtoSnx-V.js";
1
+ import { j as i } from "../chunks/jsx-runtime.C7wFtzyj.js";
2
2
  import h, { useState as C, useEffect as f } from "react";
3
3
  import { FormContext as v, withFieldContext as V, getValidatorsArray as j } from "./helpers.js";
4
4
  const E = (u) => {
@@ -1,4 +1,4 @@
1
- import { j as a } from "../chunks/jsx-runtime.gtoSnx-V.js";
1
+ import { j as a } from "../chunks/jsx-runtime.C7wFtzyj.js";
2
2
  import d, { useRef as i, useState as m } from "react";
3
3
  const h = d.createContext({}), k = (l) => (r) => {
4
4
  const { onOpenChange: e, handlerClose: n } = r, s = i(!1), o = i(!1), [f, c] = m(!1), u = () => {
@@ -1,4 +1,4 @@
1
- import { j as c } from "../chunks/jsx-runtime.gtoSnx-V.js";
1
+ import { j as c } from "../chunks/jsx-runtime.C7wFtzyj.js";
2
2
  import '../assets/gridlayout.css';/* empty css */
3
3
  const n = (l) => {
4
4
  const s = l ? l.split(" ") : [];
@@ -1,4 +1,4 @@
1
- import { j as r } from "../chunks/jsx-runtime.gtoSnx-V.js";
1
+ import { j as r } from "../chunks/jsx-runtime.C7wFtzyj.js";
2
2
  import '../assets/gridlayout.css';/* empty css */
3
3
  const a = (t) => `row ${t.customClass}
4
4
  ${t.withTrim && " -withtrim"}
@@ -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 n = (t) => /* @__PURE__ */ s.jsx("div", { className: "rules-list", style: { padding: "15px 0px" }, children: /* @__PURE__ */ s.jsx("ul", { style: { listStyleType: "none" }, children: t.map((i, e) => /* @__PURE__ */ s.jsxs("li", { children: [
3
3
  "-",
4
4
  i
package/lib/hint/index.js CHANGED
@@ -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
  import { showHintList as o } from "./helpers.js";
3
3
  import '../assets/index8.css';const u = ({
4
4
  visible: e = !0,