linear-react-components-ui 1.1.26-beta-1 → 1.1.26-beta.10

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 (225) hide show
  1. package/lib/alerts/AlertContainer.js +8 -2
  2. package/lib/alerts/AlertProvider.js +11 -5
  3. package/lib/alerts/BaseAlert.js +10 -8
  4. package/lib/alerts/Message.js +91 -64
  5. package/lib/alerts/withAlert.js +10 -6
  6. package/lib/assets/BaseAlert.css +1 -1
  7. package/lib/assets/Content.css +1 -1
  8. package/lib/assets/DefaultFile.css +1 -1
  9. package/lib/assets/Drawer.css +1 -1
  10. package/lib/assets/index11.css +1 -1
  11. package/lib/assets/index5.css +1 -1
  12. package/lib/avatar/index.js +29 -51
  13. package/lib/badge/index.js +25 -23
  14. package/lib/buttons/ActivateButton.js +9 -4
  15. package/lib/buttons/AddButton.js +12 -5
  16. package/lib/buttons/Button.js +16 -5
  17. package/lib/buttons/ButtonGroups.js +10 -3
  18. package/lib/buttons/CancelButton.js +14 -4
  19. package/lib/buttons/DangerButton.js +15 -4
  20. package/lib/buttons/DefaultButton.js +76 -111
  21. package/lib/buttons/DestroyButton.js +21 -5
  22. package/lib/buttons/EditButton.js +9 -4
  23. package/lib/buttons/InactivateButton.js +9 -4
  24. package/lib/buttons/InfoButton.js +15 -4
  25. package/lib/buttons/PrimaryButton.js +15 -4
  26. package/lib/buttons/RestoreButton.js +9 -4
  27. package/lib/buttons/SaveButton.js +14 -4
  28. package/lib/buttons/SuccessButton.js +15 -4
  29. package/lib/buttons/WarningButton.js +15 -4
  30. package/lib/buttons/button_container/index.js +21 -16
  31. package/lib/buttons/split_button/index.js +53 -55
  32. package/lib/calendar/DangerCalendar.js +18 -4
  33. package/lib/calendar/InfoCalendar.js +18 -4
  34. package/lib/calendar/PrimaryCalendar.js +18 -4
  35. package/lib/calendar/SuccessCalendar.js +18 -4
  36. package/lib/calendar/WarningCalendar.js +18 -4
  37. package/lib/calendar/base/Day.js +32 -22
  38. package/lib/calendar/base/Month.js +24 -21
  39. package/lib/calendar/base/Week.js +20 -19
  40. package/lib/calendar/base/helpers.js +11 -19
  41. package/lib/calendar/base/index.js +129 -97
  42. package/lib/checkbox/index.js +6 -5
  43. package/lib/chunks/compiler-runtime.Cu50tn6L.js +54 -0
  44. package/lib/chunks/{index.Da--18GT.js → index.Df3kt2LQ.js} +179 -181
  45. package/lib/chunks/index.aw0XaUkg.js +266 -0
  46. package/lib/chunks/jsx-runtime.D1SHvdVE.js +282 -0
  47. package/lib/chunks/lodash.CIAK_hAg.js +3684 -0
  48. package/lib/chunks/moment.DMLRxgRE.js +2589 -0
  49. package/lib/chunks/tabs.BvKfeA6Y.js +244 -0
  50. package/lib/chunks/v1.Ds1rkxUj.js +49 -0
  51. package/lib/dialog/Alert.js +18 -17
  52. package/lib/dialog/Custom.js +42 -28
  53. package/lib/dialog/Error.js +18 -17
  54. package/lib/dialog/Information.js +18 -17
  55. package/lib/dialog/Question.js +43 -59
  56. package/lib/dialog/Warning.js +18 -17
  57. package/lib/dialog/base/Content.js +13 -4
  58. package/lib/dialog/base/Footer.js +8 -3
  59. package/lib/dialog/base/Header.js +4 -3
  60. package/lib/dialog/base/index.js +5 -4
  61. package/lib/dialog/form/index.js +5 -4
  62. package/lib/dialog/index.js +1 -1
  63. package/lib/dialog/wizard/index.js +11 -10
  64. package/lib/dialog/wizard/progressbar.js +96 -3
  65. package/lib/dialog/wizard/step.js +4 -3
  66. package/lib/dialog/wizard/useWizard.js +42 -29
  67. package/lib/drawer/Content.js +15 -8
  68. package/lib/drawer/Drawer.js +38 -35
  69. package/lib/drawer/Header.js +53 -40
  70. package/lib/drawer/helpers.js +2 -2
  71. package/lib/dropdown/Popup.js +4 -2
  72. package/lib/dropdown/withDropdown.js +75 -50
  73. package/lib/fieldset/index.js +66 -47
  74. package/lib/form/Field.js +88 -62
  75. package/lib/form/FieldArray.js +18 -39
  76. package/lib/form/FieldNumber.js +42 -38
  77. package/lib/form/FieldPeriod.js +90 -59
  78. package/lib/form/helpers.js +14 -11
  79. package/lib/form/index.js +88 -100
  80. package/lib/form/withFieldHOC.js +57 -48
  81. package/lib/form/withFormSecurity.js +15 -18
  82. package/lib/gridlayout/GridCol.js +21 -20
  83. package/lib/gridlayout/GridRow.js +22 -20
  84. package/lib/hint/helpers.js +6 -2
  85. package/lib/hint/index.js +27 -25
  86. package/lib/icons/helper.js +142 -569
  87. package/lib/icons/index.js +62 -57
  88. package/lib/index.js +20 -19
  89. package/lib/inputs/base/InputTextBase.js +121 -207
  90. package/lib/inputs/base/Label.js +27 -29
  91. package/lib/inputs/base/helpers.d.ts +3 -3
  92. package/lib/inputs/base/helpers.js +4 -2
  93. package/lib/inputs/color/index.js +52 -73
  94. package/lib/inputs/date/Dialog.js +15 -16
  95. package/lib/inputs/date/Dropdown.js +16 -14
  96. package/lib/inputs/date/helpers.js +7 -7
  97. package/lib/inputs/date/index.js +101 -147
  98. package/lib/inputs/errorMessage/index.js +21 -13
  99. package/lib/inputs/file/DefaultFile.js +64 -67
  100. package/lib/inputs/file/DragDropFile.js +79 -135
  101. package/lib/inputs/file/File.d.ts +1 -1
  102. package/lib/inputs/file/File.js +24 -39
  103. package/lib/inputs/file/FileButtonSettings.js +20 -17
  104. package/lib/inputs/inputHOC.js +38 -20
  105. package/lib/inputs/mask/BaseMask.js +51 -30
  106. package/lib/inputs/mask/Cnpj.js +42 -36
  107. package/lib/inputs/mask/Cpf.js +45 -33
  108. package/lib/inputs/mask/Phone.js +10 -6
  109. package/lib/inputs/mask/ZipCode.js +9 -4
  110. package/lib/inputs/mask/helpers.d.ts +33 -33
  111. package/lib/inputs/mask/helpers.js +44 -44
  112. package/lib/inputs/multiSelect/ActionButtons.js +35 -46
  113. package/lib/inputs/multiSelect/Dropdown.js +94 -133
  114. package/lib/inputs/multiSelect/helper.js +4 -7
  115. package/lib/inputs/multiSelect/index.js +167 -127
  116. package/lib/inputs/number/BaseNumber.js +43 -31
  117. package/lib/inputs/number/Currency.js +19 -12
  118. package/lib/inputs/number/Decimal.js +9 -4
  119. package/lib/inputs/number/index.js +31 -35
  120. package/lib/inputs/period/Dialog.js +16 -16
  121. package/lib/inputs/period/Dropdown.js +15 -15
  122. package/lib/inputs/period/PeriodList.js +41 -27
  123. package/lib/inputs/period/helper.js +8 -4
  124. package/lib/inputs/period/index.js +192 -330
  125. package/lib/inputs/search/index.js +95 -71
  126. package/lib/inputs/select/ActionButtons.js +24 -45
  127. package/lib/inputs/select/Dropdown.js +61 -110
  128. package/lib/inputs/select/helper.d.ts +1 -1
  129. package/lib/inputs/select/helper.js +43 -45
  130. package/lib/inputs/select/index.js +23 -25
  131. package/lib/inputs/select/multiple/Selecteds.js +23 -19
  132. package/lib/inputs/select/multiple/index.js +106 -176
  133. package/lib/inputs/select/simple/index.js +126 -196
  134. package/lib/inputs/text/index.js +9 -4
  135. package/lib/inputs/textarea/index.js +13 -15
  136. package/lib/internals/withTooltip.js +114 -67
  137. package/lib/labelMessages/index.js +50 -45
  138. package/lib/labels/DangerLabel.js +18 -4
  139. package/lib/labels/DefaultLabel.js +53 -39
  140. package/lib/labels/InfoLabel.js +18 -4
  141. package/lib/labels/PrimaryLabel.js +18 -4
  142. package/lib/labels/SuccessLabel.js +18 -4
  143. package/lib/labels/WarningLabel.js +18 -4
  144. package/lib/labels/label_container/index.js +15 -9
  145. package/lib/list/Header.js +18 -6
  146. package/lib/list/Item.js +5 -4
  147. package/lib/list/Separator.js +8 -3
  148. package/lib/list/helpers.js +2 -2
  149. package/lib/list/index.js +21 -18
  150. package/lib/menus/float/MenuItem.js +49 -52
  151. package/lib/menus/float/SubMenuContainer.d.ts +10 -10
  152. package/lib/menus/float/index.js +102 -81
  153. package/lib/menus/sidenav/ExpandMenu.js +17 -15
  154. package/lib/menus/sidenav/MenuLink.js +21 -14
  155. package/lib/menus/sidenav/NavMenuGroup.js +19 -14
  156. package/lib/menus/sidenav/NavMenuItem.js +131 -111
  157. package/lib/menus/sidenav/NavSubMenuItem.js +36 -20
  158. package/lib/menus/sidenav/helpers.js +4 -4
  159. package/lib/menus/sidenav/index.js +145 -123
  160. package/lib/menus/sidenav/popup_menu_search/EmptyList.js +21 -17
  161. package/lib/menus/sidenav/popup_menu_search/index.js +17 -51
  162. package/lib/noPermission/index.js +13 -8
  163. package/lib/panel/Content.js +49 -40
  164. package/lib/panel/DangerPanel.js +10 -5
  165. package/lib/panel/Default.js +62 -36
  166. package/lib/panel/Header.js +53 -37
  167. package/lib/panel/InfoPanel.js +10 -5
  168. package/lib/panel/PrimaryPanel.js +10 -5
  169. package/lib/panel/SuccessPanel.js +10 -5
  170. package/lib/panel/ToolBar.js +17 -4
  171. package/lib/panel/WarningPanel.js +10 -5
  172. package/lib/panel/helpers.js +8 -5
  173. package/lib/permissionValidations.js +15 -11
  174. package/lib/popover/PopoverText.js +12 -5
  175. package/lib/popover/PopoverTitle.js +10 -3
  176. package/lib/popover/index.js +36 -56
  177. package/lib/progress/Bar.js +43 -34
  178. package/lib/progress/index.js +23 -18
  179. package/lib/radio/index.js +105 -89
  180. package/lib/shortcuts/index.js +20 -7
  181. package/lib/skeleton/SkeletonContainer.js +16 -6
  182. package/lib/skeleton/index.js +42 -18
  183. package/lib/spinner/SpinnerLoading.js +53 -16
  184. package/lib/spinner/index.js +47 -37
  185. package/lib/split/Split.js +83 -79
  186. package/lib/split/SplitSide.js +24 -16
  187. package/lib/table/Body.js +36 -49
  188. package/lib/table/Header.js +45 -35
  189. package/lib/table/HeaderColumn.js +40 -27
  190. package/lib/table/Row.js +47 -48
  191. package/lib/table/RowColumn.js +50 -38
  192. package/lib/table/helpers.js +3 -1
  193. package/lib/table/index.js +101 -104
  194. package/lib/tabs/DropdownTabs.js +64 -61
  195. package/lib/tabs/Menu.js +35 -49
  196. package/lib/tabs/MenuTabs.js +59 -84
  197. package/lib/tabs/Panel.js +57 -47
  198. package/lib/tabs/context.js +36 -40
  199. package/lib/tabs/index.js +69 -64
  200. package/lib/tabs/tabHelpers.js +10 -8
  201. package/lib/textContent/index.js +30 -32
  202. package/lib/toolbar/ButtonBar.js +62 -58
  203. package/lib/toolbar/LabelBar.js +46 -38
  204. package/lib/toolbar/Separator.js +8 -3
  205. package/lib/toolbar/ToolBarGroup.js +14 -3
  206. package/lib/toolbar/index.js +35 -29
  207. package/lib/tooltip/index.js +24 -24
  208. package/lib/treetable/Body.js +26 -27
  209. package/lib/treetable/Header.js +23 -19
  210. package/lib/treetable/Row.js +210 -147
  211. package/lib/treetable/helpers.d.ts +4 -5
  212. package/lib/treetable/helpers.js +6 -14
  213. package/lib/treetable/index.js +25 -15
  214. package/lib/treeview/Header.js +13 -5
  215. package/lib/treeview/Node.js +198 -175
  216. package/lib/treeview/index.js +257 -174
  217. package/lib/uitour/index.js +167 -166
  218. package/package.json +32 -43
  219. package/lib/chunks/index.CmrLK9Qe.js +0 -675
  220. package/lib/chunks/index.D5f6Ow9V.js +0 -89
  221. package/lib/chunks/index.yztgndLc.js +0 -206
  222. package/lib/chunks/jsx-runtime.CYK1ROHF.js +0 -445
  223. package/lib/chunks/tabs.Cvj2MJH6.js +0 -246
  224. package/lib/chunks/v1.CDXKvGzE.js +0 -41
  225. /package/lib/assets/{index29.css → progressbar.css} +0 -0
@@ -1,137 +1,98 @@
1
- import { j as o } from "../../chunks/jsx-runtime.CYK1ROHF.js";
2
- import { useState as v } from "react";
3
- import S from "../../avatar/index.js";
4
- import x from "../../icons/index.js";
5
- const D = (s, u) => {
6
- var d, p, h;
7
- const n = (d = s == null ? void 0 : s.current) == null ? void 0 : d.getBoundingClientRect(), i = n != null && n.bottom ? n == null ? void 0 : n.bottom : 0, l = (p = s == null ? void 0 : s.current) != null && p.offsetTop ? (h = s == null ? void 0 : s.current) == null ? void 0 : h.offsetTop : 0, m = window.innerHeight - i;
8
- let e = 200, r = u, c;
9
- return !r || r <= 0 ? m < e ? (r = n != null && n.top ? n.top : 0, c = window.innerHeight - l + 10) : r = m : (e = r, m < e && (c = window.innerHeight - l + 10)), {
10
- maxHeight: `${r - 30}px`,
11
- bottom: `${c}px`
1
+ import { j as t } from "../../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c as _ } from "../../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import { useState as q } from "react";
4
+ import M from "../../avatar/index.js";
5
+ import D from "../../icons/index.js";
6
+ const P = (j, e) => {
7
+ const l = j?.current?.getBoundingClientRect(), i = l?.bottom ? l?.bottom : 0, n = j?.current?.offsetTop ? j?.current?.offsetTop : 0, k = window.innerHeight - i;
8
+ let r = 200, s = e, a;
9
+ return !s || s <= 0 ? k < r ? (s = l?.top ? l.top : 0, a = window.innerHeight - n + 10) : s = k : (r = s, k < r && (a = window.innerHeight - n + 10)), {
10
+ maxHeight: `${s - 30}px`,
11
+ bottom: `${a}px`
12
12
  };
13
- }, K = (s) => {
14
- const {
15
- imageAlign: u = "left",
16
- descriptionKey: n,
17
- idKey: i,
18
- dropdownMaxHeight: l,
19
- selectFieldRef: m,
20
- isAllChecked: e,
21
- dropdownWidth: r,
22
- inputValue: c,
23
- gridWrapperStyle: d,
24
- onFocus: p,
25
- onFilter: h,
26
- onBlur: b,
27
- dataCombo: a,
28
- opened: j,
29
- onUncheckAll: k,
30
- onCheckAll: y,
31
- selecteds: g,
32
- onSelect: C
33
- } = s, [N] = v(D(m, l || 0));
34
- return /* @__PURE__ */ o.jsxs(
35
- "div",
36
- {
37
- className: "dropdown",
38
- style: {
39
- width: r,
40
- marginLeft: d ? d.paddingLeft : "0",
41
- ...N
42
- },
43
- children: [
44
- /* @__PURE__ */ o.jsxs("div", { className: "filtercontainer", children: [
45
- /* @__PURE__ */ o.jsx(
46
- "input",
47
- {
48
- className: "filterinput",
49
- type: "text",
50
- value: c,
51
- onFocus: () => {
52
- p();
53
- },
54
- onBlur: (t) => {
55
- b(t);
56
- },
57
- onChange: (t) => {
58
- h(t.target.value);
59
- },
60
- autoFocus: j
61
- }
62
- ),
63
- /* @__PURE__ */ o.jsx(x, { customClass: "filtericon", name: "search", viewBox: "0 0 32 32" })
64
- ] }),
65
- /* @__PURE__ */ o.jsxs("div", { className: "listcontainer", children: [
66
- a && a.length > 0 && /* @__PURE__ */ o.jsx("div", { className: "item selectall", children: /* @__PURE__ */ o.jsxs(
67
- "button",
68
- {
69
- className: "menubutton",
70
- tabIndex: -1,
71
- onClick: () => e ? k(!0) : y(!0),
72
- children: [
73
- /* @__PURE__ */ o.jsx(
74
- x,
75
- {
76
- name: e && a.length > 0 ? "checkboxChecked2" : "checkboxUnchecked2",
77
- customClass: "checkboxicon"
78
- }
79
- ),
80
- /* @__PURE__ */ o.jsx("span", { className: "label", children: c !== "" ? "Selecionar todos pesquisados" : "Selecionar Todos" })
81
- ]
82
- }
83
- ) }),
84
- a == null ? void 0 : a.map((t) => {
85
- const w = g ? g.find((f) => f[i] === t[i]) : void 0;
86
- return /* @__PURE__ */ o.jsx(
87
- "div",
88
- {
89
- className: `item ${w && "-selected"}`,
90
- children: /* @__PURE__ */ o.jsxs(
91
- "button",
92
- {
93
- className: "menubutton",
94
- tabIndex: -1,
95
- onClick: () => {
96
- C(t);
97
- },
98
- children: [
99
- /* @__PURE__ */ o.jsx(
100
- x,
101
- {
102
- name: w ? "checkboxChecked2" : "checkboxUnchecked2",
103
- customClass: "checkboxicon"
104
- }
105
- ),
106
- t.iconName && /* @__PURE__ */ o.jsx(
107
- x,
108
- {
109
- name: t.iconName,
110
- customClass: "menuicon",
111
- style: { order: u === "left" ? 0 : 1 }
112
- }
113
- ),
114
- t.imgSrcKey && /* @__PURE__ */ o.jsx(
115
- S,
116
- {
117
- src: t.imgSrcKey,
118
- customClass: "menuicon",
119
- style: { order: u === "left" ? 0 : 1 }
120
- }
121
- ),
122
- /* @__PURE__ */ o.jsx("span", { className: "label", children: typeof n == "string" ? t[n] : n(t) })
123
- ]
124
- }
125
- )
126
- },
127
- `dropdowmItem ${t[i]}}`
128
- );
129
- })
130
- ] })
131
- ]
132
- }
133
- );
13
+ }, Q = (j) => {
14
+ const e = _.c(42), {
15
+ imageAlign: l,
16
+ descriptionKey: i,
17
+ idKey: n,
18
+ dropdownMaxHeight: k,
19
+ selectFieldRef: r,
20
+ isAllChecked: s,
21
+ dropdownWidth: a,
22
+ inputValue: d,
23
+ gridWrapperStyle: E,
24
+ onFocus: A,
25
+ onFilter: B,
26
+ onBlur: H,
27
+ dataCombo: c,
28
+ opened: $,
29
+ onUncheckAll: F,
30
+ onCheckAll: I,
31
+ selecteds: y,
32
+ onSelect: K
33
+ } = j, C = l === void 0 ? "left" : l, T = k || 0;
34
+ let N;
35
+ e[0] !== r || e[1] !== T ? (N = P(r, T), e[0] = r, e[1] = T, e[2] = N) : N = e[2];
36
+ const [R] = q(N), U = E ? E.paddingLeft : "0";
37
+ let m;
38
+ e[3] !== R || e[4] !== a || e[5] !== U ? (m = {
39
+ width: a,
40
+ marginLeft: U,
41
+ ...R
42
+ }, e[3] = R, e[4] = a, e[5] = U, e[6] = m) : m = e[6];
43
+ let p;
44
+ e[7] !== A ? (p = () => {
45
+ A();
46
+ }, e[7] = A, e[8] = p) : p = e[8];
47
+ let u;
48
+ e[9] !== H ? (u = (o) => {
49
+ H(o);
50
+ }, e[9] = H, e[10] = u) : u = e[10];
51
+ let f;
52
+ e[11] !== B ? (f = (o) => {
53
+ B(o.target.value);
54
+ }, e[11] = B, e[12] = f) : f = e[12];
55
+ let h;
56
+ e[13] !== d || e[14] !== $ || e[15] !== p || e[16] !== u || e[17] !== f ? (h = /* @__PURE__ */ t.jsx("input", { className: "filterinput", type: "text", value: d, onFocus: p, onBlur: u, onChange: f, autoFocus: $ }), e[13] = d, e[14] = $, e[15] = p, e[16] = u, e[17] = f, e[18] = h) : h = e[18];
57
+ let v;
58
+ e[19] === Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ t.jsx(D, { customClass: "filtericon", name: "search", viewBox: "0 0 32 32" }), e[19] = v) : v = e[19];
59
+ let x;
60
+ e[20] !== h ? (x = /* @__PURE__ */ t.jsxs("div", { className: "filtercontainer", children: [
61
+ h,
62
+ v
63
+ ] }), e[20] = h, e[21] = x) : x = e[21];
64
+ let g;
65
+ e[22] !== c || e[23] !== d || e[24] !== s || e[25] !== I || e[26] !== F ? (g = c && c.length > 0 && /* @__PURE__ */ t.jsx("div", { className: "item selectall", children: /* @__PURE__ */ t.jsxs("button", { className: "menubutton", tabIndex: -1, onClick: () => s ? F(!0) : I(!0), children: [
66
+ /* @__PURE__ */ t.jsx(D, { name: s && c.length > 0 ? "checkboxChecked2" : "checkboxUnchecked2", customClass: "checkboxicon" }),
67
+ /* @__PURE__ */ t.jsx("span", { className: "label", children: d !== "" ? "Selecionar todos pesquisados" : "Selecionar Todos" })
68
+ ] }) }), e[22] = c, e[23] = d, e[24] = s, e[25] = I, e[26] = F, e[27] = g) : g = e[27];
69
+ let b;
70
+ e[28] !== c || e[29] !== i || e[30] !== n || e[31] !== C || e[32] !== K || e[33] !== y ? (b = c?.map((o) => {
71
+ const L = y ? y.find((W) => W[n] === o[n]) : void 0;
72
+ return /* @__PURE__ */ t.jsx("div", { className: `item ${L && "-selected"}`, children: /* @__PURE__ */ t.jsxs("button", { className: "menubutton", tabIndex: -1, onClick: () => {
73
+ K(o);
74
+ }, children: [
75
+ /* @__PURE__ */ t.jsx(D, { name: L ? "checkboxChecked2" : "checkboxUnchecked2", customClass: "checkboxicon" }),
76
+ o.iconName && /* @__PURE__ */ t.jsx(D, { name: o.iconName, customClass: "menuicon", style: {
77
+ order: C === "left" ? 0 : 1
78
+ } }),
79
+ o.imgSrcKey && /* @__PURE__ */ t.jsx(M, { src: o.imgSrcKey, customClass: "menuicon", style: {
80
+ order: C === "left" ? 0 : 1
81
+ } }),
82
+ /* @__PURE__ */ t.jsx("span", { className: "label", children: typeof i == "string" ? o[i] : i(o) })
83
+ ] }) }, `dropdowmItem ${o[n]}}`);
84
+ }), e[28] = c, e[29] = i, e[30] = n, e[31] = C, e[32] = K, e[33] = y, e[34] = b) : b = e[34];
85
+ let w;
86
+ e[35] !== g || e[36] !== b ? (w = /* @__PURE__ */ t.jsxs("div", { className: "listcontainer", children: [
87
+ g,
88
+ b
89
+ ] }), e[35] = g, e[36] = b, e[37] = w) : w = e[37];
90
+ let S;
91
+ return e[38] !== x || e[39] !== w || e[40] !== m ? (S = /* @__PURE__ */ t.jsxs("div", { className: "dropdown", style: m, children: [
92
+ x,
93
+ w
94
+ ] }), e[38] = x, e[39] = w, e[40] = m, e[41] = S) : S = e[41], S;
134
95
  };
135
96
  export {
136
- K as default
97
+ Q as default
137
98
  };
@@ -1,11 +1,8 @@
1
- const f = ({
2
- dataSource: a,
1
+ const a = ({
2
+ dataSource: t,
3
3
  descriptionKey: e,
4
4
  inputText: o
5
- }) => a.filter((r) => {
6
- var t;
7
- return typeof e == "string" ? r[e].toLowerCase().indexOf(o.toLowerCase()) > -1 : ((t = e(r)) == null ? void 0 : t.toLowerCase().indexOf(o.toLowerCase())) > -1;
8
- });
5
+ }) => t.filter((r) => typeof e == "string" ? r[e].toLowerCase().indexOf(o.toLowerCase()) > -1 : e(r)?.toLowerCase().indexOf(o.toLowerCase()) > -1);
9
6
  export {
10
- f as default
7
+ a as default
11
8
  };
@@ -1,140 +1,180 @@
1
- import { j as b } from "../../chunks/jsx-runtime.CYK1ROHF.js";
2
- import x from "lodash";
3
- import { useState as s, useRef as N, useEffect as S } from "react";
4
- import ne from "../base/InputTextBase.js";
5
- import oe from "./ActionButtons.js";
6
- import se from "./Dropdown.js";
7
- import M from "./helper.js";
8
- import { v as le } from "../../chunks/v1.CDXKvGzE.js";
9
- import '../../assets/index22.css';const pe = (m) => {
10
- const {
11
- onSelect: r,
1
+ import { j as oe } from "../../chunks/jsx-runtime.D1SHvdVE.js";
2
+ import { c as Me } from "../../chunks/compiler-runtime.Cu50tn6L.js";
3
+ import { _ as _e } from "../../chunks/lodash.CIAK_hAg.js";
4
+ import { useState as d, useRef as Ae, useEffect as se } from "react";
5
+ import Te from "../base/InputTextBase.js";
6
+ import qe from "./ActionButtons.js";
7
+ import ze from "./Dropdown.js";
8
+ import Fe from "./helper.js";
9
+ import { v as Ke } from "../../chunks/v1.Ds1rkxUj.js";
10
+ import '../../assets/index22.css';const Ye = (r) => {
11
+ const e = Me.c(98), {
12
+ onSelect: c,
12
13
  idKey: i,
13
- disabled: T = !1,
14
+ disabled: ye,
14
15
  dataSource: n,
15
16
  descriptionKey: f,
16
- value: d,
17
- onBlur: A,
18
- gridLayout: q,
19
- dropdownAlignButton: z = "left"
20
- } = m, K = `multiSelect-component${le()}`, [a, p] = s(n), [o, h] = s(), [L, E] = s(""), [O, U] = s("Nenhum selecionado"), [g, v] = s(0), [G, V] = s(!1), [C, D] = s(!1), [k, _] = s(), [$, H] = s(!1), [J, P] = s(), w = N(null), l = N(null), Q = (e) => {
21
- if (e === null) return;
22
- let t = o;
23
- t && (t.find((u) => u[i] === e[i]) ? t = t.filter((u) => u[i] !== e[i]) : t = [...t, e], r && r(t.map((u) => u[i]))), h(t);
24
- }, F = () => {
25
- let e = g;
26
- e = l.current ? l.current.clientWidth : g, D(!0), v(e);
27
- }, W = (e) => {
28
- const t = e.target;
29
- if ((t == null ? void 0 : t.className) === "") return;
30
- const c = ["item", "menubutton", "filterinput", "filtercontainer", "label"].includes(t == null ? void 0 : t.className);
31
- H(c);
32
- }, y = (e) => {
33
- A && A(e), $ || (E(""), p(n));
34
- }, X = (e) => {
35
- let t = n;
36
- e !== "" && n && (t = M({ dataSource: n, descriptionKey: f, inputText: e })), p(t), E(e);
37
- }, Y = () => {
38
- D(!C), l.current && v(l.current.clientWidth);
39
- }, B = (e = !1) => {
40
- const t = e ? a : n;
41
- r && t && r(t.map((c) => c[i])), h(t);
42
- }, I = () => {
43
- r && r(), h([]);
44
- }, j = () => {
45
- l.current && v(l.current.clientWidth);
46
- }, R = (e) => {
47
- var c;
48
- const { target: t } = e;
49
- t !== w.current && !((c = w.current) != null && c.contains(t)) && (D(!1), p(n), E(""));
50
- }, Z = (e) => {
51
- _(e);
52
- }, ee = () => !!(T || k && (k.disabled || k.hideContent)), te = () => {
53
- const e = x.isEqual(o, n);
54
- let t = O;
55
- e ? t = "Todos" : o && o.length > 1 ? t = "Múltiplos" : o && o.length === 1 ? t = typeof f == "string" ? o[0][f] : f(o[0]) : t = "Nenhum selecionado", U(t);
56
- };
57
- return S(() => {
58
- var e;
59
- if (q) {
60
- const t = (e = l.current) == null ? void 0 : e.parentElement;
61
- t && P(window.getComputedStyle(t));
17
+ value: A,
18
+ onBlur: F,
19
+ gridLayout: ie,
20
+ dropdownAlignButton: De
21
+ } = r, ce = ye === void 0 ? !1 : ye, re = De === void 0 ? "left" : De;
22
+ let L;
23
+ e[0] === Symbol.for("react.memo_cache_sentinel") ? (L = Ke(), e[0] = L) : L = e[0];
24
+ const Le = `multiSelect-component${L}`, [s, O] = d(n), [o, B] = d(), [h, ae] = d(""), [de, Oe] = d("Nenhum selecionado"), [p, fe] = d(0), [me, Be] = d(!1), [a, ue] = d(!1), [x, We] = d(), [he, Ie] = d(!1), [pe, Re] = d(), W = Ae(null), m = Ae(null);
25
+ let I;
26
+ e[1] !== i || e[2] !== c || e[3] !== o ? (I = (t) => {
27
+ if (t === null)
28
+ return;
29
+ let l = o;
30
+ l && (l.find((u) => u[i] === t[i]) ? l = l.filter((u) => u[i] !== t[i]) : l = [...l, t], c && c(l.map((u) => u[i]))), B(l);
31
+ }, e[1] = i, e[2] = c, e[3] = o, e[4] = I) : I = e[4];
32
+ const Se = I;
33
+ let R;
34
+ e[5] !== p ? (R = () => {
35
+ let t;
36
+ t = m.current ? m.current.clientWidth : p, ue(!0), fe(t);
37
+ }, e[5] = p, e[6] = R) : R = e[6];
38
+ const S = R;
39
+ let j;
40
+ e[7] === Symbol.for("react.memo_cache_sentinel") ? (j = (t) => {
41
+ const l = t.target;
42
+ if (l?.className === "")
43
+ return;
44
+ const k = ["item", "menubutton", "filterinput", "filtercontainer", "label"].includes(l?.className);
45
+ Ie(k);
46
+ }, e[7] = j) : j = e[7];
47
+ const ke = j;
48
+ let N;
49
+ e[8] !== n || e[9] !== he || e[10] !== F ? (N = (t) => {
50
+ F && F(t), he || (ae(""), O(n));
51
+ }, e[8] = n, e[9] = he, e[10] = F, e[11] = N) : N = e[11];
52
+ const b = N;
53
+ let M;
54
+ e[12] !== n || e[13] !== f ? (M = (t) => {
55
+ let l = n;
56
+ t !== "" && n && (l = Fe({
57
+ dataSource: n,
58
+ descriptionKey: f,
59
+ inputText: t
60
+ })), O(l), ae(t);
61
+ }, e[12] = n, e[13] = f, e[14] = M) : M = e[14];
62
+ const be = M;
63
+ let T;
64
+ e[15] !== a ? (T = () => {
65
+ ue(!a), m.current && fe(m.current.clientWidth);
66
+ }, e[15] = a, e[16] = T) : T = e[16];
67
+ const we = T;
68
+ let q;
69
+ e[17] !== s || e[18] !== n || e[19] !== i || e[20] !== c ? (q = (t) => {
70
+ const k = (t === void 0 ? !1 : t) ? s : n;
71
+ c && k && c(k.map((u) => u[i])), B(k);
72
+ }, e[17] = s, e[18] = n, e[19] = i, e[20] = c, e[21] = q) : q = e[21];
73
+ const w = q;
74
+ let z;
75
+ e[22] !== c ? (z = () => {
76
+ c && c(), B([]);
77
+ }, e[22] = c, e[23] = z) : z = e[23];
78
+ const C = z;
79
+ let K;
80
+ e[24] === Symbol.for("react.memo_cache_sentinel") ? (K = () => {
81
+ m.current && fe(m.current.clientWidth);
82
+ }, e[24] = K) : K = e[24];
83
+ const xe = K;
84
+ let U;
85
+ e[25] !== n ? (U = (t) => {
86
+ const {
87
+ target: l
88
+ } = t;
89
+ l !== W.current && !W.current?.contains(l) && (ue(!1), O(n), ae(""));
90
+ }, e[25] = n, e[26] = U) : U = e[26];
91
+ const $ = U;
92
+ let G;
93
+ e[27] === Symbol.for("react.memo_cache_sentinel") ? (G = (t) => {
94
+ We(t);
95
+ }, e[27] = G) : G = e[27];
96
+ const je = G;
97
+ let V;
98
+ e[28] !== ce || e[29] !== x ? (V = () => !!(ce || x && (x.disabled || x.hideContent)), e[28] = ce, e[29] = x, e[30] = V) : V = e[30];
99
+ const Ne = V;
100
+ let H;
101
+ e[31] !== n || e[32] !== f || e[33] !== o ? (H = () => {
102
+ const t = _e.isEqual(o, n);
103
+ let l;
104
+ t ? l = "Todos" : o && o.length > 1 ? l = "Múltiplos" : o && o.length === 1 ? l = typeof f == "string" ? o[0][f] : f(o[0]) : l = "Nenhum selecionado", Oe(l);
105
+ }, e[31] = n, e[32] = f, e[33] = o, e[34] = H) : H = e[34];
106
+ const Ce = H;
107
+ let J;
108
+ e[35] !== ie || e[36] !== $ ? (J = () => {
109
+ if (ie) {
110
+ const t = m.current?.parentElement;
111
+ t && Re(window.getComputedStyle(t));
62
112
  }
63
- return window.addEventListener("resize", j), document.addEventListener("click", R), document.addEventListener("mousemove", W), () => {
64
- window.removeEventListener("resize", j), document.removeEventListener("click", R), document.removeEventListener("mousemove", W);
113
+ return window.addEventListener("resize", xe), document.addEventListener("click", $), document.addEventListener("mousemove", ke), () => {
114
+ window.removeEventListener("resize", xe), document.removeEventListener("click", $), document.removeEventListener("mousemove", ke);
65
115
  };
66
- }, []), S(() => {
116
+ }, e[35] = ie, e[36] = $, e[37] = J) : J = e[37];
117
+ let P;
118
+ e[38] === Symbol.for("react.memo_cache_sentinel") ? (P = [], e[38] = P) : P = e[38], se(J, P);
119
+ let Q;
120
+ e[39] !== n || e[40] !== i || e[41] !== A ? (Q = () => {
67
121
  if (n && n.length > 0) {
68
- const e = n.filter((t) => d == null ? void 0 : d.includes(t[i]));
69
- h(e);
122
+ const t = n.filter((l) => A?.includes(l[i]));
123
+ B(t);
70
124
  }
71
- }, [d == null ? void 0 : d.length, n == null ? void 0 : n.length]), S(() => {
72
- if (n && a && !x.isEqual(n, a)) {
73
- const e = M({
74
- ...m,
125
+ }, e[39] = n, e[40] = i, e[41] = A, e[42] = Q) : Q = e[42];
126
+ const ve = A?.length, ge = n?.length;
127
+ let X;
128
+ e[43] !== ve || e[44] !== ge ? (X = [ve, ge], e[43] = ve, e[44] = ge, e[45] = X) : X = e[45], se(Q, X);
129
+ let Y;
130
+ e[46] !== s || e[47] !== n || e[48] !== h || e[49] !== r ? (Y = () => {
131
+ if (n && s && !_e.isEqual(n, s)) {
132
+ const t = Fe({
133
+ ...r,
75
134
  dataSource: n || void 0,
76
- inputText: L
135
+ inputText: h
77
136
  });
78
- p(e);
137
+ O(t);
79
138
  }
80
- }, [n]), S(() => {
81
- const e = x.isEqual(a, o);
82
- V(e), te();
83
- }, [o, a]), /* @__PURE__ */ b.jsxs("span", { id: K, ref: w, className: "multiSelect-component", children: [
84
- /* @__PURE__ */ b.jsx(
85
- ne,
86
- {
87
- ...m,
88
- value: O,
89
- onFocus: () => {
90
- F();
91
- },
92
- onBlur: (e) => {
93
- y(e);
94
- },
95
- customClassForWrapper: "selectwrapper -undigitable",
96
- customClassForInputContent: "multiselect",
97
- inputBaseRef: (e) => {
98
- l.current = e;
99
- },
100
- handlerSetOnDenied: Z,
101
- rightElements: /* @__PURE__ */ b.jsx(
102
- oe,
103
- {
104
- dropdownAlignButton: z,
105
- disabled: ee(),
106
- dropdownOpened: C,
107
- handleOpenClose: () => {
108
- Y();
109
- },
110
- handleCheckAll: B,
111
- handleUncheckAll: I
112
- }
113
- )
114
- }
115
- ),
116
- C && /* @__PURE__ */ b.jsx(
117
- se,
118
- {
119
- ...m,
120
- opened: C,
121
- dataCombo: a,
122
- selecteds: o,
123
- inputValue: L,
124
- isAllChecked: G,
125
- onCheckAll: B,
126
- onUncheckAll: I,
127
- dropdownWidth: g,
128
- selectFieldRef: w,
129
- onSelect: Q,
130
- onFilter: X,
131
- onFocus: F,
132
- onBlur: y,
133
- gridWrapperStyle: J
134
- }
135
- )
136
- ] });
139
+ }, e[46] = s, e[47] = n, e[48] = h, e[49] = r, e[50] = Y) : Y = e[50];
140
+ let Z;
141
+ e[51] !== n ? (Z = [n], e[51] = n, e[52] = Z) : Z = e[52], se(Y, Z);
142
+ let ee;
143
+ e[53] !== s || e[54] !== Ce || e[55] !== o ? (ee = () => {
144
+ const t = _e.isEqual(s, o);
145
+ Be(t), Ce();
146
+ }, e[53] = s, e[54] = Ce, e[55] = o, e[56] = ee) : ee = e[56];
147
+ let te;
148
+ e[57] !== s || e[58] !== o ? (te = [o, s], e[57] = s, e[58] = o, e[59] = te) : te = e[59], se(ee, te);
149
+ let v;
150
+ e[60] !== S ? (v = () => {
151
+ S();
152
+ }, e[60] = S, e[61] = v) : v = e[61];
153
+ let g;
154
+ e[62] !== b ? (g = (t) => {
155
+ b(t);
156
+ }, e[62] = b, e[63] = g) : g = e[63];
157
+ let ne;
158
+ e[64] === Symbol.for("react.memo_cache_sentinel") ? (ne = (t) => {
159
+ m.current = t;
160
+ }, e[64] = ne) : ne = e[64];
161
+ const Ee = Ne();
162
+ let E;
163
+ e[65] !== we ? (E = () => {
164
+ we();
165
+ }, e[65] = we, e[66] = E) : E = e[66];
166
+ let _;
167
+ e[67] !== re || e[68] !== w || e[69] !== C || e[70] !== a || e[71] !== Ee || e[72] !== E ? (_ = /* @__PURE__ */ oe.jsx(qe, { dropdownAlignButton: re, disabled: Ee, dropdownOpened: a, handleOpenClose: E, handleCheckAll: w, handleUncheckAll: C }), e[67] = re, e[68] = w, e[69] = C, e[70] = a, e[71] = Ee, e[72] = E, e[73] = _) : _ = e[73];
168
+ let y;
169
+ e[74] !== de || e[75] !== r || e[76] !== v || e[77] !== g || e[78] !== _ ? (y = /* @__PURE__ */ oe.jsx(Te, { ...r, value: de, onFocus: v, onBlur: g, customClassForWrapper: "selectwrapper -undigitable", customClassForInputContent: "multiselect", inputBaseRef: ne, handlerSetOnDenied: je, rightElements: _ }), e[74] = de, e[75] = r, e[76] = v, e[77] = g, e[78] = _, e[79] = y) : y = e[79];
170
+ let D;
171
+ e[80] !== s || e[81] !== p || e[82] !== pe || e[83] !== be || e[84] !== Se || e[85] !== h || e[86] !== me || e[87] !== b || e[88] !== w || e[89] !== S || e[90] !== C || e[91] !== a || e[92] !== r || e[93] !== o ? (D = a && /* @__PURE__ */ oe.jsx(ze, { ...r, opened: a, dataCombo: s, selecteds: o, inputValue: h, isAllChecked: me, onCheckAll: w, onUncheckAll: C, dropdownWidth: p, selectFieldRef: W, onSelect: Se, onFilter: be, onFocus: S, onBlur: b, gridWrapperStyle: pe }), e[80] = s, e[81] = p, e[82] = pe, e[83] = be, e[84] = Se, e[85] = h, e[86] = me, e[87] = b, e[88] = w, e[89] = S, e[90] = C, e[91] = a, e[92] = r, e[93] = o, e[94] = D) : D = e[94];
172
+ let le;
173
+ return e[95] !== y || e[96] !== D ? (le = /* @__PURE__ */ oe.jsxs("span", { id: Le, ref: W, className: "multiSelect-component", children: [
174
+ y,
175
+ D
176
+ ] }), e[95] = y, e[96] = D, e[97] = le) : le = e[97], le;
137
177
  };
138
178
  export {
139
- pe as default
179
+ Ye as default
140
180
  };