linear-react-components-ui 1.0.10-beta.1 → 1.0.10-beta.11

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 (446) hide show
  1. package/demo/06c001f4d19c06397d470bb43ff3fe49.png +0 -0
  2. package/demo/270084ef02ed3bddc3f735fd91ee3cae.png +0 -0
  3. package/demo/882f8e819d18f5f2dc08d23ebd28a7d5.png +0 -0
  4. package/demo/bundle.js +2 -0
  5. package/demo/bundle.js.LICENSE.txt +65 -0
  6. package/demo/cbc3b4bd6342c551db7afafe26dc458c.jpg +0 -0
  7. package/demo/edc9476523b940deab91951066981a31.png +0 -0
  8. package/demo/fb44e7c36db6d95bb85a745d4f060fb2.png +0 -0
  9. package/demo/fonts/Roboto-Black.woff +0 -0
  10. package/demo/fonts/Roboto-Black.woff2 +0 -0
  11. package/demo/fonts/Roboto-Bold.woff +0 -0
  12. package/demo/fonts/Roboto-Bold.woff2 +0 -0
  13. package/demo/fonts/Roboto-Light.woff +0 -0
  14. package/demo/fonts/Roboto-Light.woff2 +0 -0
  15. package/demo/fonts/Roboto-Medium.woff +0 -0
  16. package/demo/fonts/Roboto-Medium.woff2 +0 -0
  17. package/demo/fonts/Roboto-Regular.woff +0 -0
  18. package/demo/fonts/Roboto-Regular.woff2 +0 -0
  19. package/demo/fonts/Roboto-Thin.woff +0 -0
  20. package/demo/fonts/Roboto-Thin.woff2 +0 -0
  21. package/demo/fonts/TitilliumWeb-Black.woff +0 -0
  22. package/demo/fonts/TitilliumWeb-Black.woff2 +0 -0
  23. package/demo/fonts/TitilliumWeb-Bold.woff +0 -0
  24. package/demo/fonts/TitilliumWeb-Bold.woff2 +0 -0
  25. package/demo/fonts/TitilliumWeb-ExtraLight.woff +0 -0
  26. package/demo/fonts/TitilliumWeb-ExtraLight.woff2 +0 -0
  27. package/demo/fonts/TitilliumWeb-Light.woff +0 -0
  28. package/demo/fonts/TitilliumWeb-Light.woff2 +0 -0
  29. package/demo/fonts/TitilliumWeb-Regular.woff +0 -0
  30. package/demo/fonts/TitilliumWeb-Regular.woff2 +0 -0
  31. package/demo/fonts/TitilliumWeb-SemiBold.woff +0 -0
  32. package/demo/fonts/TitilliumWeb-SemiBold.woff2 +0 -0
  33. package/demo/index.html +1 -0
  34. package/lib/@types/Align.d.ts +3 -2
  35. package/lib/@types/ButtonTypes.d.ts +1 -1
  36. package/lib/@types/ColorStyles.d.ts +1 -1
  37. package/lib/@types/DataCombo.d.ts +1 -1
  38. package/lib/@types/Icon.d.ts +1 -1
  39. package/lib/@types/LabelStyles.d.ts +1 -1
  40. package/lib/@types/Period.d.ts +1 -1
  41. package/lib/@types/PermissionAttr.d.ts +2 -2
  42. package/lib/@types/PointerEvents.d.ts +1 -1
  43. package/lib/@types/Position.d.ts +1 -1
  44. package/lib/@types/PositionAlert.d.ts +1 -1
  45. package/lib/@types/Size.d.ts +1 -1
  46. package/lib/@types/SizePixels.d.ts +1 -1
  47. package/lib/alerts/AlertContainer.d.ts +2 -0
  48. package/lib/alerts/AlertContainer.js +21 -5
  49. package/lib/alerts/AlertProvider.d.ts +2 -0
  50. package/lib/alerts/AlertProvider.js +45 -15
  51. package/lib/alerts/BaseAlert.d.ts +2 -0
  52. package/lib/alerts/BaseAlert.js +20 -4
  53. package/lib/alerts/Message.d.ts +2 -0
  54. package/lib/alerts/Message.js +32 -21
  55. package/lib/alerts/helpers.d.ts +2 -0
  56. package/lib/alerts/helpers.js +2 -0
  57. package/lib/alerts/index.d.ts +3 -4
  58. package/lib/alerts/index.js +4 -0
  59. package/lib/alerts/types.d.ts +7 -5
  60. package/lib/alerts/withAlert.d.ts +2 -0
  61. package/lib/alerts/withAlert.js +12 -1
  62. package/lib/assets/styles/dialog.scss +0 -2
  63. package/lib/assets/styles/drawers.scss +9 -0
  64. package/lib/assets/styles/table.scss +30 -0
  65. package/lib/assets/styles/tooltip.scss +42 -2
  66. package/lib/avatar/index.js +35 -20
  67. package/lib/badge/index.js +14 -9
  68. package/lib/buttons/ActivateButton.d.ts +2 -0
  69. package/lib/buttons/ActivateButton.js +6 -0
  70. package/lib/buttons/AddButton.d.ts +2 -0
  71. package/lib/buttons/AddButton.js +7 -0
  72. package/lib/buttons/Button.d.ts +2 -0
  73. package/lib/buttons/Button.js +15 -2
  74. package/lib/buttons/ButtonGroups.js +4 -0
  75. package/lib/buttons/CancelButton.d.ts +2 -0
  76. package/lib/buttons/CancelButton.js +11 -1
  77. package/lib/buttons/DangerButton.d.ts +2 -0
  78. package/lib/buttons/DangerButton.js +11 -1
  79. package/lib/buttons/DefaultButton.d.ts +2 -0
  80. package/lib/buttons/DefaultButton.js +97 -49
  81. package/lib/buttons/DestroyButton.d.ts +2 -0
  82. package/lib/buttons/DestroyButton.js +12 -1
  83. package/lib/buttons/EditButton.d.ts +2 -0
  84. package/lib/buttons/EditButton.js +6 -0
  85. package/lib/buttons/InactivateButton.d.ts +2 -0
  86. package/lib/buttons/InactivateButton.js +6 -0
  87. package/lib/buttons/InfoButton.d.ts +2 -0
  88. package/lib/buttons/InfoButton.js +11 -1
  89. package/lib/buttons/PrimaryButton.d.ts +2 -0
  90. package/lib/buttons/PrimaryButton.js +11 -1
  91. package/lib/buttons/RestoreButton.d.ts +2 -0
  92. package/lib/buttons/RestoreButton.js +6 -0
  93. package/lib/buttons/SaveButton.d.ts +2 -0
  94. package/lib/buttons/SaveButton.js +11 -1
  95. package/lib/buttons/SuccessButton.d.ts +2 -0
  96. package/lib/buttons/SuccessButton.js +11 -1
  97. package/lib/buttons/WarningButton.d.ts +2 -0
  98. package/lib/buttons/WarningButton.js +11 -1
  99. package/lib/buttons/button_container/index.js +11 -5
  100. package/lib/buttons/index.d.ts +3 -4
  101. package/lib/buttons/index.js +18 -0
  102. package/lib/buttons/split_button/index.d.ts +2 -0
  103. package/lib/buttons/split_button/index.js +17 -11
  104. package/lib/buttons/types.d.ts +6 -2
  105. package/lib/calendar/DangerCalendar.js +11 -1
  106. package/lib/calendar/InfoCalendar.js +11 -1
  107. package/lib/calendar/PrimaryCalendar.js +11 -1
  108. package/lib/calendar/SuccessCalendar.js +11 -1
  109. package/lib/calendar/WarningCalendar.js +11 -1
  110. package/lib/calendar/base/Day.js +13 -2
  111. package/lib/calendar/base/Month.js +18 -1
  112. package/lib/calendar/base/Week.js +18 -2
  113. package/lib/calendar/base/helpers.js +24 -8
  114. package/lib/calendar/base/index.js +37 -13
  115. package/lib/calendar/index.d.ts +1 -4
  116. package/lib/calendar/index.js +8 -0
  117. package/lib/checkbox/Label.js +7 -1
  118. package/lib/checkbox/index.js +54 -28
  119. package/lib/checkbox/types.d.ts +2 -2
  120. package/lib/dialog/Alert.d.ts +3 -0
  121. package/lib/dialog/Alert.js +8 -0
  122. package/lib/dialog/Custom.d.ts +3 -0
  123. package/lib/dialog/Custom.js +17 -5
  124. package/lib/dialog/Error.d.ts +3 -0
  125. package/lib/dialog/Error.js +8 -0
  126. package/lib/dialog/Information.d.ts +3 -0
  127. package/lib/dialog/Information.js +8 -0
  128. package/lib/dialog/Question.d.ts +3 -0
  129. package/lib/dialog/Question.js +15 -4
  130. package/lib/dialog/Warning.d.ts +3 -0
  131. package/lib/dialog/Warning.js +8 -0
  132. package/lib/dialog/base/Content.d.ts +3 -0
  133. package/lib/dialog/base/Content.js +6 -1
  134. package/lib/dialog/base/Footer.d.ts +3 -0
  135. package/lib/dialog/base/Footer.js +4 -0
  136. package/lib/dialog/base/Header.d.ts +3 -0
  137. package/lib/dialog/base/Header.js +13 -5
  138. package/lib/dialog/base/index.d.ts +3 -0
  139. package/lib/dialog/base/index.js +33 -9
  140. package/lib/dialog/base/style.js +2 -0
  141. package/lib/dialog/form/index.d.ts +3 -0
  142. package/lib/dialog/form/index.js +29 -9
  143. package/lib/dialog/index.d.ts +4 -4
  144. package/lib/dialog/index.js +9 -0
  145. package/lib/dialog/types.d.ts +6 -3
  146. package/lib/drawer/Content.d.ts +2 -0
  147. package/lib/drawer/Content.js +13 -2
  148. package/lib/drawer/Drawer.d.ts +3 -1
  149. package/lib/drawer/Drawer.js +83 -24
  150. package/lib/drawer/Header.d.ts +2 -0
  151. package/lib/drawer/Header.js +27 -10
  152. package/lib/drawer/helpers.d.ts +2 -0
  153. package/lib/drawer/helpers.js +4 -0
  154. package/lib/drawer/index.d.ts +2 -0
  155. package/lib/drawer/index.js +8 -0
  156. package/lib/drawer/types.d.ts +4 -1
  157. package/lib/dropdown/Popup.js +39 -19
  158. package/lib/dropdown/helper.js +4 -0
  159. package/lib/dropdown/withDropdown.js +47 -18
  160. package/lib/fieldset/index.js +46 -21
  161. package/lib/form/Field.d.ts +6 -0
  162. package/lib/form/Field.js +60 -25
  163. package/lib/form/FieldArray.d.ts +6 -0
  164. package/lib/form/FieldArray.js +32 -15
  165. package/lib/form/FieldNumber.d.ts +6 -0
  166. package/lib/form/FieldNumber.js +20 -6
  167. package/lib/form/FieldPeriod.d.ts +6 -0
  168. package/lib/form/FieldPeriod.js +21 -9
  169. package/lib/form/helpers.d.ts +6 -0
  170. package/lib/form/helpers.js +30 -5
  171. package/lib/form/index.d.ts +8 -1
  172. package/lib/form/index.js +101 -37
  173. package/lib/form/types.d.ts +16 -6
  174. package/lib/form/withFieldHOC.d.ts +6 -0
  175. package/lib/form/withFieldHOC.js +34 -15
  176. package/lib/form/withFormSecurity.d.ts +6 -0
  177. package/lib/form/withFormSecurity.js +30 -6
  178. package/lib/gridlayout/GridCol.js +11 -5
  179. package/lib/gridlayout/GridRow.js +9 -3
  180. package/lib/gridlayout/index.d.ts +1 -4
  181. package/lib/gridlayout/index.js +4 -0
  182. package/lib/hint/index.js +11 -6
  183. package/lib/icons/index.d.ts +2 -0
  184. package/lib/icons/index.js +26 -16
  185. package/lib/icons/types.d.ts +4 -2
  186. package/lib/index.d.ts +4 -1
  187. package/lib/index.js +10 -0
  188. package/lib/inputs/base/InputTextBase.d.ts +1 -0
  189. package/lib/inputs/base/InputTextBase.js +85 -51
  190. package/lib/inputs/base/helpers.d.ts +2 -1
  191. package/lib/inputs/base/helpers.js +19 -6
  192. package/lib/inputs/base/types.d.ts +2 -1
  193. package/lib/inputs/color/index.js +38 -11
  194. package/lib/inputs/date/Dialog.d.ts +1 -0
  195. package/lib/inputs/date/Dialog.js +7 -2
  196. package/lib/inputs/date/Dropdown.d.ts +1 -0
  197. package/lib/inputs/date/Dropdown.js +8 -1
  198. package/lib/inputs/date/helpers.d.ts +1 -0
  199. package/lib/inputs/date/helpers.js +11 -2
  200. package/lib/inputs/date/index.d.ts +1 -0
  201. package/lib/inputs/date/index.js +101 -48
  202. package/lib/inputs/date/types.d.ts +1 -0
  203. package/lib/inputs/file/DefaultFile.d.ts +1 -0
  204. package/lib/inputs/file/DefaultFile.js +42 -13
  205. package/lib/inputs/file/DragDropFile.d.ts +1 -0
  206. package/lib/inputs/file/DragDropFile.js +90 -37
  207. package/lib/inputs/file/File.d.ts +1 -0
  208. package/lib/inputs/file/File.js +25 -4
  209. package/lib/inputs/file/FileButtonSettings.d.ts +1 -0
  210. package/lib/inputs/file/FileButtonSettings.js +11 -5
  211. package/lib/inputs/file/helpers.d.ts +1 -0
  212. package/lib/inputs/file/helpers.js +5 -0
  213. package/lib/inputs/file/index.d.ts +2 -4
  214. package/lib/inputs/file/index.js +6 -0
  215. package/lib/inputs/file/types.d.ts +2 -1
  216. package/lib/inputs/inputHOC.d.ts +3 -0
  217. package/lib/inputs/inputHOC.js +34 -10
  218. package/lib/inputs/mask/BaseMask.d.ts +1 -0
  219. package/lib/inputs/mask/BaseMask.js +17 -1
  220. package/lib/inputs/mask/Cnpj.d.ts +1 -0
  221. package/lib/inputs/mask/Cnpj.js +37 -12
  222. package/lib/inputs/mask/Cpf.d.ts +1 -0
  223. package/lib/inputs/mask/Cpf.js +33 -10
  224. package/lib/inputs/mask/Phone.d.ts +1 -0
  225. package/lib/inputs/mask/Phone.js +6 -0
  226. package/lib/inputs/mask/ZipCode.d.ts +1 -0
  227. package/lib/inputs/mask/ZipCode.js +6 -0
  228. package/lib/inputs/mask/helpers.d.ts +3 -0
  229. package/lib/inputs/mask/helpers.js +20 -8
  230. package/lib/inputs/mask/imaskHOC.d.ts +3 -0
  231. package/lib/inputs/mask/imaskHOC.js +83 -52
  232. package/lib/inputs/mask/index.d.ts +2 -4
  233. package/lib/inputs/mask/index.js +7 -0
  234. package/lib/inputs/mask/types.d.ts +2 -1
  235. package/lib/inputs/multiSelect/ActionButtons.d.ts +2 -1
  236. package/lib/inputs/multiSelect/ActionButtons.js +16 -4
  237. package/lib/inputs/multiSelect/Dropdown.d.ts +1 -0
  238. package/lib/inputs/multiSelect/Dropdown.js +46 -23
  239. package/lib/inputs/multiSelect/helper.d.ts +8 -6
  240. package/lib/inputs/multiSelect/helper.js +11 -3
  241. package/lib/inputs/multiSelect/index.d.ts +1 -0
  242. package/lib/inputs/multiSelect/index.js +108 -41
  243. package/lib/inputs/multiSelect/types.d.ts +12 -3
  244. package/lib/inputs/number/BaseNumber.d.ts +3 -0
  245. package/lib/inputs/number/BaseNumber.js +16 -3
  246. package/lib/inputs/number/Currency.d.ts +3 -0
  247. package/lib/inputs/number/Currency.js +7 -1
  248. package/lib/inputs/number/Decimal.d.ts +3 -0
  249. package/lib/inputs/number/Decimal.js +5 -0
  250. package/lib/inputs/number/format_number.js +7 -0
  251. package/lib/inputs/number/index.d.ts +3 -0
  252. package/lib/inputs/number/index.js +13 -3
  253. package/lib/inputs/number/types.d.ts +3 -1
  254. package/lib/inputs/period/Dialog.d.ts +1 -0
  255. package/lib/inputs/period/Dialog.js +7 -2
  256. package/lib/inputs/period/Dropdown.d.ts +1 -0
  257. package/lib/inputs/period/Dropdown.js +7 -0
  258. package/lib/inputs/period/PeriodList.d.ts +1 -0
  259. package/lib/inputs/period/PeriodList.js +7 -1
  260. package/lib/inputs/period/helper.d.ts +1 -0
  261. package/lib/inputs/period/helper.js +12 -2
  262. package/lib/inputs/period/index.d.ts +1 -0
  263. package/lib/inputs/period/index.js +120 -49
  264. package/lib/inputs/period/types.d.ts +4 -3
  265. package/lib/inputs/search/index.d.ts +3 -0
  266. package/lib/inputs/search/index.js +63 -18
  267. package/lib/inputs/select/ActionButtons.d.ts +3 -0
  268. package/lib/inputs/select/ActionButtons.js +12 -4
  269. package/lib/inputs/select/Dropdown.d.ts +3 -0
  270. package/lib/inputs/select/Dropdown.js +49 -29
  271. package/lib/inputs/select/helper.d.ts +7 -9
  272. package/lib/inputs/select/helper.js +41 -11
  273. package/lib/inputs/select/index.d.ts +1 -0
  274. package/lib/inputs/select/index.js +24 -8
  275. package/lib/inputs/select/multiple/Selecteds.d.ts +1 -0
  276. package/lib/inputs/select/multiple/Selecteds.js +8 -4
  277. package/lib/inputs/select/multiple/index.d.ts +1 -0
  278. package/lib/inputs/select/multiple/index.js +109 -47
  279. package/lib/inputs/select/simple/index.d.ts +1 -0
  280. package/lib/inputs/select/simple/index.js +157 -69
  281. package/lib/inputs/select/types.d.ts +28 -12
  282. package/lib/inputs/text/index.d.ts +1 -0
  283. package/lib/inputs/text/index.js +5 -1
  284. package/lib/inputs/text/types.d.ts +2 -2
  285. package/lib/inputs/textarea/index.d.ts +1 -0
  286. package/lib/inputs/textarea/index.js +10 -4
  287. package/lib/inputs/textarea/types.d.ts +1 -0
  288. package/lib/inputs/types.d.ts +7 -3
  289. package/lib/internals/types.d.ts +1 -0
  290. package/lib/internals/withTooltip.js +82 -30
  291. package/lib/labelMessages/index.d.ts +2 -0
  292. package/lib/labelMessages/index.js +46 -27
  293. package/lib/labelMessages/types.d.ts +3 -1
  294. package/lib/labels/DangerLabel.d.ts +2 -0
  295. package/lib/labels/DangerLabel.js +11 -1
  296. package/lib/labels/DefaultLabel.d.ts +2 -0
  297. package/lib/labels/DefaultLabel.js +41 -19
  298. package/lib/labels/InfoLabel.d.ts +2 -0
  299. package/lib/labels/InfoLabel.js +11 -1
  300. package/lib/labels/PrimaryLabel.d.ts +2 -0
  301. package/lib/labels/PrimaryLabel.js +11 -1
  302. package/lib/labels/SuccessLabel.d.ts +2 -0
  303. package/lib/labels/SuccessLabel.js +11 -1
  304. package/lib/labels/WarningLabel.d.ts +2 -0
  305. package/lib/labels/WarningLabel.js +11 -1
  306. package/lib/labels/index.d.ts +3 -4
  307. package/lib/labels/index.js +10 -0
  308. package/lib/labels/label_container/index.js +7 -3
  309. package/lib/labels/types.d.ts +3 -1
  310. package/lib/list/Header.d.ts +2 -0
  311. package/lib/list/Header.js +7 -3
  312. package/lib/list/Item.d.ts +2 -0
  313. package/lib/list/Item.js +68 -33
  314. package/lib/list/Separator.js +4 -0
  315. package/lib/list/helpers.d.ts +2 -0
  316. package/lib/list/helpers.js +4 -0
  317. package/lib/list/index.d.ts +2 -0
  318. package/lib/list/index.js +60 -25
  319. package/lib/list/types.d.ts +5 -3
  320. package/lib/menus/float/MenuItem.d.ts +2 -0
  321. package/lib/menus/float/MenuItem.js +26 -9
  322. package/lib/menus/float/SubMenuContainer.js +17 -5
  323. package/lib/menus/float/helpers.d.ts +2 -0
  324. package/lib/menus/float/helpers.js +4 -0
  325. package/lib/menus/float/index.d.ts +2 -0
  326. package/lib/menus/float/index.js +21 -8
  327. package/lib/menus/float/types.d.ts +3 -1
  328. package/lib/menus/index.d.ts +3 -4
  329. package/lib/menus/index.js +3 -0
  330. package/lib/menus/sidenav/ExpandMenu.d.ts +2 -0
  331. package/lib/menus/sidenav/ExpandMenu.js +7 -2
  332. package/lib/menus/sidenav/MenuLink.d.ts +2 -0
  333. package/lib/menus/sidenav/MenuLink.js +12 -3
  334. package/lib/menus/sidenav/NavMenuGroup.d.ts +2 -0
  335. package/lib/menus/sidenav/NavMenuGroup.js +12 -3
  336. package/lib/menus/sidenav/NavMenuItem.d.ts +2 -0
  337. package/lib/menus/sidenav/NavMenuItem.js +56 -27
  338. package/lib/menus/sidenav/NavSubMenuItem.d.ts +2 -0
  339. package/lib/menus/sidenav/NavSubMenuItem.js +27 -8
  340. package/lib/menus/sidenav/helpers.d.ts +2 -0
  341. package/lib/menus/sidenav/helpers.js +9 -0
  342. package/lib/menus/sidenav/index.d.ts +2 -0
  343. package/lib/menus/sidenav/index.js +75 -26
  344. package/lib/menus/sidenav/popup_menu_search/EmptyList.d.ts +2 -0
  345. package/lib/menus/sidenav/popup_menu_search/EmptyList.js +7 -2
  346. package/lib/menus/sidenav/popup_menu_search/index.d.ts +2 -0
  347. package/lib/menus/sidenav/popup_menu_search/index.js +45 -15
  348. package/lib/menus/sidenav/types.d.ts +5 -3
  349. package/lib/noPermission/index.js +6 -0
  350. package/lib/panel/Content.d.ts +3 -1
  351. package/lib/panel/Content.js +22 -7
  352. package/lib/panel/DangerPanel.d.ts +3 -1
  353. package/lib/panel/DangerPanel.js +7 -0
  354. package/lib/panel/Default.d.ts +3 -1
  355. package/lib/panel/Default.js +44 -20
  356. package/lib/panel/Header.d.ts +3 -1
  357. package/lib/panel/Header.js +29 -15
  358. package/lib/panel/InfoPanel.d.ts +3 -1
  359. package/lib/panel/InfoPanel.js +7 -0
  360. package/lib/panel/PrimaryPanel.d.ts +3 -1
  361. package/lib/panel/PrimaryPanel.js +7 -0
  362. package/lib/panel/SuccessPanel.d.ts +3 -1
  363. package/lib/panel/SuccessPanel.js +7 -0
  364. package/lib/panel/ToolBar.d.ts +3 -1
  365. package/lib/panel/ToolBar.js +5 -0
  366. package/lib/panel/WarningPanel.d.ts +3 -1
  367. package/lib/panel/WarningPanel.js +7 -0
  368. package/lib/panel/helpers.d.ts +3 -1
  369. package/lib/panel/helpers.js +10 -2
  370. package/lib/panel/index.d.ts +4 -5
  371. package/lib/panel/index.js +11 -0
  372. package/lib/panel/types.d.ts +3 -1
  373. package/lib/permissionValidations.js +15 -3
  374. package/lib/popover/PopoverText.d.ts +2 -0
  375. package/lib/popover/PopoverText.js +4 -0
  376. package/lib/popover/PopoverTitle.d.ts +2 -0
  377. package/lib/popover/PopoverTitle.js +4 -0
  378. package/lib/popover/index.d.ts +2 -0
  379. package/lib/popover/index.js +22 -12
  380. package/lib/popover/types.d.ts +3 -1
  381. package/lib/progress/Bar.js +33 -20
  382. package/lib/progress/index.js +14 -5
  383. package/lib/radio/index.js +46 -23
  384. package/lib/skeleton/SkeletonContainer.js +9 -3
  385. package/lib/skeleton/index.js +22 -10
  386. package/lib/spinner/SpinnerLoading.js +7 -3
  387. package/lib/spinner/index.js +40 -18
  388. package/lib/split/Split.js +83 -32
  389. package/lib/split/SplitSide.js +18 -6
  390. package/lib/split/helpers.d.ts +1 -1
  391. package/lib/split/helpers.js +4 -0
  392. package/lib/split/index.d.ts +1 -4
  393. package/lib/split/index.js +5 -0
  394. package/lib/table/Body.js +29 -15
  395. package/lib/table/Header.js +26 -5
  396. package/lib/table/HeaderColumn.js +21 -10
  397. package/lib/table/Row.js +47 -20
  398. package/lib/table/RowColumn.js +29 -12
  399. package/lib/table/helpers.js +7 -0
  400. package/lib/table/index.js +62 -32
  401. package/lib/table/types.d.ts +6 -1
  402. package/lib/tabs/DropdownItems.d.ts +2 -0
  403. package/lib/tabs/DropdownItems.js +21 -12
  404. package/lib/tabs/Menu.d.ts +2 -0
  405. package/lib/tabs/Menu.js +15 -5
  406. package/lib/tabs/MenuItems.d.ts +2 -0
  407. package/lib/tabs/MenuItems.js +33 -23
  408. package/lib/tabs/Panel.d.ts +2 -0
  409. package/lib/tabs/Panel.js +39 -14
  410. package/lib/tabs/index.d.ts +2 -0
  411. package/lib/tabs/index.js +113 -46
  412. package/lib/tabs/tabHelpers.d.ts +2 -0
  413. package/lib/tabs/tabHelpers.js +16 -3
  414. package/lib/tabs/types.d.ts +3 -1
  415. package/lib/toolbar/ButtonBar.d.ts +2 -0
  416. package/lib/toolbar/ButtonBar.js +29 -13
  417. package/lib/toolbar/LabelBar.d.ts +2 -0
  418. package/lib/toolbar/LabelBar.js +28 -11
  419. package/lib/toolbar/Separator.js +4 -0
  420. package/lib/toolbar/ToolBarGroup.d.ts +2 -0
  421. package/lib/toolbar/ToolBarGroup.js +6 -2
  422. package/lib/toolbar/helpers.d.ts +2 -0
  423. package/lib/toolbar/helpers.js +2 -0
  424. package/lib/toolbar/index.d.ts +2 -0
  425. package/lib/toolbar/index.js +23 -7
  426. package/lib/toolbar/types.d.ts +4 -2
  427. package/lib/tooltip/index.d.ts +1 -1
  428. package/lib/tooltip/index.js +30 -11
  429. package/lib/tooltip/types.d.ts +2 -1
  430. package/lib/treetable/Body.js +27 -9
  431. package/lib/treetable/Header.js +11 -1
  432. package/lib/treetable/Row.js +113 -58
  433. package/lib/treetable/helpers.js +10 -0
  434. package/lib/treetable/index.js +11 -0
  435. package/lib/treeview/Header.js +6 -2
  436. package/lib/treeview/Node.js +111 -47
  437. package/lib/treeview/constants.js +4 -0
  438. package/lib/treeview/index.js +134 -54
  439. package/lib/treeview/types.d.ts +2 -2
  440. package/lib/treeview_old/Header.js +6 -1
  441. package/lib/treeview_old/Node.js +32 -5
  442. package/lib/treeview_old/index.js +9 -1
  443. package/lib/{types-90c43ae1.d.ts → types-c1d83632.d.ts} +3 -2
  444. package/lib/uitour/index.js +73 -33
  445. package/lib/uitour/types.d.ts +1 -1
  446. package/package.json +1 -1
@@ -1,9 +1,16 @@
1
1
  export { default as Field } from './Field.js';
2
2
  export { default as FieldNumber } from './FieldNumber.js';
3
3
  export { default as FieldArray } from './FieldArray.js';
4
+ export { default as FieldPeriod } from './FieldPeriod.js';
4
5
  import { IFormProps } from './types.js';
5
6
  import 'react';
7
+ import '../inputs/select/types.js';
8
+ import '../@types/Align.js';
9
+ import '../@types/DataCombo.js';
10
+ import '../@types/PermissionAttr.js';
11
+ import '../inputs/base/types.js';
12
+ import '../@types/Period.js';
6
13
 
7
- declare const Form: ({ submitOnPressEnterKey, dataSource, securityBeforeUnload, handlerReset, handlerSubmit, handlerValidates, style, customClass, securityTitle, securityText, onDataChange, onValidateForm, externalFieldErrors, onSubmit, skeletonize, disabled, children, }: IFormProps) => JSX.Element;
14
+ declare const Form: ({ submitOnPressEnterKey, dataSource, securityBeforeUnload, handlerReset, handlerSubmit, handlerValidates, style, customClass, securityTitle, securityText, securityData, onDataChange, onValidateForm, externalFieldErrors, onSubmit, skeletonize, disabled, children, }: IFormProps) => JSX.Element;
8
15
 
9
16
  export { Form as default };
package/lib/form/index.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
@@ -22,70 +23,108 @@ Object.defineProperty(exports, "FieldNumber", {
22
23
  return _FieldNumber.default;
23
24
  }
24
25
  });
26
+ Object.defineProperty(exports, "FieldPeriod", {
27
+ enumerable: true,
28
+ get: function get() {
29
+ return _FieldPeriod.default;
30
+ }
31
+ });
25
32
  exports.default = void 0;
33
+
26
34
  var _react = _interopRequireWildcard(require("react"));
35
+
27
36
  var _lodash = _interopRequireDefault(require("lodash"));
37
+
28
38
  var _helpers = require("./helpers");
39
+
29
40
  var _Field = _interopRequireDefault(require("./Field"));
41
+
30
42
  var _FieldNumber = _interopRequireDefault(require("./FieldNumber"));
43
+
31
44
  var _FieldArray = _interopRequireDefault(require("./FieldArray"));
45
+
46
+ var _FieldPeriod = _interopRequireDefault(require("./FieldPeriod"));
47
+
32
48
  require("../assets/styles/form.scss");
49
+
33
50
  var _dialog = require("../dialog");
51
+
34
52
  var _withFormSecurity = require("./withFormSecurity");
53
+
35
54
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
55
+
36
56
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
57
+
37
58
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
38
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
39
- function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
40
- function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
59
+
60
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
61
+
41
62
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
63
+
42
64
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
65
+
43
66
  function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
67
+
44
68
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
69
+
45
70
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
71
+
46
72
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
73
+
47
74
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
75
+
48
76
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
49
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
50
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
77
+
78
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
79
+
80
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
81
+
51
82
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
83
+
52
84
  var Form = function Form(_ref) {
53
85
  var _ref$submitOnPressEnt = _ref.submitOnPressEnterKey,
54
- submitOnPressEnterKey = _ref$submitOnPressEnt === void 0 ? true : _ref$submitOnPressEnt,
55
- dataSource = _ref.dataSource,
56
- securityBeforeUnload = _ref.securityBeforeUnload,
57
- handlerReset = _ref.handlerReset,
58
- handlerSubmit = _ref.handlerSubmit,
59
- handlerValidates = _ref.handlerValidates,
60
- style = _ref.style,
61
- customClass = _ref.customClass,
62
- securityTitle = _ref.securityTitle,
63
- securityText = _ref.securityText,
64
- onDataChange = _ref.onDataChange,
65
- onValidateForm = _ref.onValidateForm,
66
- externalFieldErrors = _ref.externalFieldErrors,
67
- onSubmit = _ref.onSubmit,
68
- skeletonize = _ref.skeletonize,
69
- disabled = _ref.disabled,
70
- children = _ref.children;
86
+ submitOnPressEnterKey = _ref$submitOnPressEnt === void 0 ? true : _ref$submitOnPressEnt,
87
+ dataSource = _ref.dataSource,
88
+ securityBeforeUnload = _ref.securityBeforeUnload,
89
+ handlerReset = _ref.handlerReset,
90
+ handlerSubmit = _ref.handlerSubmit,
91
+ handlerValidates = _ref.handlerValidates,
92
+ style = _ref.style,
93
+ customClass = _ref.customClass,
94
+ securityTitle = _ref.securityTitle,
95
+ securityText = _ref.securityText,
96
+ securityData = _ref.securityData,
97
+ onDataChange = _ref.onDataChange,
98
+ onValidateForm = _ref.onValidateForm,
99
+ externalFieldErrors = _ref.externalFieldErrors,
100
+ onSubmit = _ref.onSubmit,
101
+ skeletonize = _ref.skeletonize,
102
+ disabled = _ref.disabled,
103
+ children = _ref.children;
104
+
71
105
  var _useState = (0, _react.useState)(dataSource),
72
- _useState2 = _slicedToArray(_useState, 2),
73
- data = _useState2[0],
74
- setData = _useState2[1];
106
+ _useState2 = _slicedToArray(_useState, 2),
107
+ data = _useState2[0],
108
+ setData = _useState2[1];
109
+
75
110
  var _useState3 = (0, _react.useState)(dataSource),
76
- _useState4 = _slicedToArray(_useState3, 2),
77
- originalData = _useState4[0],
78
- setOriginalData = _useState4[1];
111
+ _useState4 = _slicedToArray(_useState3, 2),
112
+ originalData = _useState4[0],
113
+ setOriginalData = _useState4[1];
114
+
79
115
  var _useState5 = (0, _react.useState)(submitOnPressEnterKey),
80
- _useState6 = _slicedToArray(_useState5, 2),
81
- submitFormOnEnter = _useState6[0],
82
- setSubmitFormOnEnter = _useState6[1];
116
+ _useState6 = _slicedToArray(_useState5, 2),
117
+ submitFormOnEnter = _useState6[0],
118
+ setSubmitFormOnEnter = _useState6[1];
119
+
83
120
  var _useState7 = (0, _react.useState)({}),
84
- _useState8 = _slicedToArray(_useState7, 2),
85
- fieldErrors = _useState8[0],
86
- setFieldErrors = _useState8[1];
121
+ _useState8 = _slicedToArray(_useState7, 2),
122
+ fieldErrors = _useState8[0],
123
+ setFieldErrors = _useState8[1];
124
+
87
125
  var fieldsValidators = (0, _react.useRef)({});
88
126
  var context = (0, _react.useContext)(_withFormSecurity.FormSecurityContext);
127
+
89
128
  var getValidatesErrorMessages = function getValidatesErrorMessages(validators, fieldValue) {
90
129
  var validatorsArray = !(validators instanceof Array) ? [validators] : validators;
91
130
  var errors = [];
@@ -97,66 +136,85 @@ var Form = function Form(_ref) {
97
136
  });
98
137
  return errors;
99
138
  };
139
+
100
140
  var checkIsValid = function checkIsValid(value) {
101
141
  var updateState = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
102
142
  var dataValidate = value || data;
103
143
  var currentFieldErrors = {};
144
+
104
145
  _lodash.default.forEach(fieldsValidators.current, function (validators, fieldName) {
105
146
  var fieldValue = _lodash.default.get(dataValidate, fieldName);
147
+
106
148
  var messages = getValidatesErrorMessages(validators, fieldValue);
149
+
107
150
  if (messages.length > 0) {
108
151
  currentFieldErrors = _extends({}, fieldErrors, _defineProperty({}, fieldName, messages));
109
152
  }
110
153
  });
154
+
111
155
  if (updateState) setFieldErrors(currentFieldErrors);
112
156
  return _lodash.default.isEmpty(currentFieldErrors);
113
157
  };
158
+
114
159
  var onFieldChange = function onFieldChange(event) {
115
160
  var target = event.target;
116
161
  setData(function (prevState) {
117
162
  return (0, _helpers.changeValue)(prevState, target);
118
163
  });
119
164
  };
165
+
120
166
  var onValidate = function onValidate(fieldName, fieldValue, validators) {
121
167
  if (validators) {
122
168
  var currentFieldErrors = fieldErrors;
123
169
  var errors = getValidatesErrorMessages(validators, fieldValue);
170
+
124
171
  if (errors.length === 0) {
125
172
  currentFieldErrors = _lodash.default.omit(currentFieldErrors, fieldName);
126
173
  } else {
127
174
  currentFieldErrors = _extends({}, currentFieldErrors, _defineProperty({}, fieldName, errors));
128
175
  }
176
+
129
177
  setFieldErrors(currentFieldErrors);
130
178
  }
131
179
  };
180
+
132
181
  var onFormSubmit = function onFormSubmit(event) {
133
182
  if (event) event.preventDefault();
134
183
  if (checkIsValid(data)) onSubmit(data);
135
184
  };
185
+
136
186
  var onReset = function onReset() {
137
187
  setData(JSON.parse(JSON.stringify(originalData)));
138
188
  setFieldErrors({});
139
189
  };
190
+
140
191
  var onRemoveFieldValidators = function onRemoveFieldValidators(fieldName) {
141
192
  var newFieldsValidators = _lodash.default.omit(fieldsValidators.current, fieldName);
193
+
142
194
  fieldsValidators.current = newFieldsValidators;
143
195
  };
196
+
144
197
  var onBeforeUnload = function onBeforeUnload(e) {
145
198
  var event = e;
146
199
  event.preventDefault();
200
+
147
201
  if (_lodash.default.isEqual(data, originalData)) {
148
202
  return;
149
203
  }
204
+
150
205
  event.returnValue = true;
151
206
  };
207
+
152
208
  var submitOnEnter = function submitOnEnter(event) {
153
209
  if (event.key === 'Enter') {
154
210
  event.preventDefault();
155
211
  if (submitFormOnEnter) onFormSubmit();
156
212
  }
157
213
  };
214
+
158
215
  var formProps = function formProps() {
159
216
  var propsForm = null;
217
+
160
218
  if (!disabled) {
161
219
  propsForm = {
162
220
  onSubmit: function onSubmit(event) {
@@ -167,21 +225,25 @@ var Form = function Form(_ref) {
167
225
  }
168
226
  };
169
227
  }
228
+
170
229
  return propsForm;
171
230
  };
231
+
172
232
  (0, _react.useEffect)(function () {
173
233
  if (!_lodash.default.isEmpty(context)) {
174
234
  var onChangedData = context.onChangedData;
175
- if (!_lodash.default.isEqual(data, originalData)) {
235
+
236
+ if (securityData && !_lodash.default.isEqual(data, securityData)) {
176
237
  onChangedData(true);
177
238
  } else {
178
239
  onChangedData(false);
179
240
  }
180
- }
241
+ } // TODO - Usar debounce para evitar chamada a cada letra digitada
242
+
181
243
 
182
- // TODO - Usar debounce para evitar chamada a cada letra digitada
183
244
  if (onDataChange) onDataChange(data);
184
245
  if (onValidateForm) onValidateForm(checkIsValid(data, false));
246
+
185
247
  if (!disabled) {
186
248
  handlerSubmit(onFormSubmit);
187
249
  if (handlerReset) handlerReset(onReset);
@@ -193,6 +255,7 @@ var Form = function Form(_ref) {
193
255
  if (context) context.setSecurityBeforeUnload(true);
194
256
  window.addEventListener('beforeunload', onBeforeUnload);
195
257
  }
258
+
196
259
  return function () {
197
260
  return window.removeEventListener('beforeunload', onBeforeUnload);
198
261
  };
@@ -238,5 +301,6 @@ var Form = function Form(_ref) {
238
301
  onUnconfirmClick: context ? context.onUnconfirmClick : function () {}
239
302
  }));
240
303
  };
304
+
241
305
  var _default = Form;
242
306
  exports.default = _default;
@@ -1,14 +1,20 @@
1
1
  import { ChangeEvent, ReactNode, CSSProperties, ComponentType, MouseEventHandler } from 'react';
2
+ import { AllOptions } from '../inputs/select/types.js';
3
+ import '../@types/Align.js';
4
+ import '../@types/DataCombo.js';
5
+ import '../@types/PermissionAttr.js';
6
+ import '../inputs/base/types.js';
7
+ import '../@types/Period.js';
2
8
 
3
- type Validator = (value: string) => string | undefined;
4
- type PeriodValidator = (value: {
9
+ declare type Validator = (value: string) => string | undefined;
10
+ declare type PeriodValidator = (value: {
5
11
  initialData: string;
6
12
  finalData: string;
7
13
  }) => string | undefined;
8
- type OnFielChangeEvent = Event & {
14
+ declare type OnFielChangeEvent = Event & {
9
15
  target: HTMLInputElement;
10
16
  };
11
- type CustomKeyboardEvent = ChangeEvent<HTMLInputElement> & {
17
+ declare type CustomKeyboardEvent = ChangeEvent<HTMLInputElement> & {
12
18
  keyCode: number;
13
19
  };
14
20
  interface IFormProps {
@@ -26,6 +32,7 @@ interface IFormProps {
26
32
  securityBeforeUnload?: boolean;
27
33
  securityTitle?: string;
28
34
  securityText?: string;
35
+ securityData?: object;
29
36
  externalFieldErrors?: object;
30
37
  skeletonize?: boolean;
31
38
  disabled?: boolean;
@@ -58,6 +65,8 @@ interface IFieldProps extends WithFieldProps {
58
65
  descriptionKey?: string;
59
66
  showClearButton?: boolean;
60
67
  gridLayout?: string;
68
+ allOptions?: AllOptions;
69
+ searchNotFoundText?: string;
61
70
  }
62
71
  interface CustomEvent {
63
72
  target: {
@@ -91,11 +100,11 @@ interface IFieldArrayProps extends WithFieldProps {
91
100
  multiple?: boolean;
92
101
  disabled?: boolean;
93
102
  }
94
- type PeriodChangeEvent = {
103
+ declare type PeriodChangeEvent = {
95
104
  initial: string;
96
105
  final: string;
97
106
  };
98
- type PeriodFieldChangeEvent = {
107
+ declare type PeriodFieldChangeEvent = {
99
108
  target: {
100
109
  name: string;
101
110
  value: string;
@@ -154,6 +163,7 @@ interface IEventParams {
154
163
  data?: object;
155
164
  validators?: Validator | Validator[];
156
165
  onBlur?: (event: ChangeEvent<HTMLInputElement>) => void;
166
+ onChange?: (event: ChangeEvent<HTMLInputElement>) => void;
157
167
  onKeyDown?: (event: CustomKeyboardEvent) => void;
158
168
  handlerFieldValidade?: (name: string, value: string, validatorsArray: Validator[] | Validator) => void;
159
169
  handlerFieldChange?: (event: ChangeEvent<HTMLInputElement> | CustomKeyboardEvent) => void;
@@ -1,5 +1,11 @@
1
1
  import React__default from 'react';
2
2
  import { WithFieldProps } from './types.js';
3
+ import '../inputs/select/types.js';
4
+ import '../@types/Align.js';
5
+ import '../@types/DataCombo.js';
6
+ import '../@types/PermissionAttr.js';
7
+ import '../inputs/base/types.js';
8
+ import '../@types/Period.js';
3
9
 
4
10
  declare const withFieldHOC: <ComponentProps extends WithFieldProps>(WrappedComponent: React__default.ComponentType<ComponentProps>) => React__default.ForwardRefExoticComponent<React__default.PropsWithoutRef<ComponentProps> & React__default.RefAttributes<HTMLElement>>;
5
11
 
@@ -1,35 +1,51 @@
1
1
  "use strict";
2
2
 
3
3
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.default = void 0;
9
+
8
10
  var _react = _interopRequireWildcard(require("react"));
11
+
9
12
  var _helpers = require("./helpers");
13
+
10
14
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
+
11
16
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
17
+
12
18
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
19
+
13
20
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
21
+
14
22
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
23
+
15
24
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
16
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
17
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
25
+
26
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
27
+
28
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
29
+
18
30
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
31
+
19
32
  var withFieldHOC = function withFieldHOC(WrappedComponent) {
20
33
  var EnhancedComponent = function EnhancedComponent(props) {
21
34
  var name = props.name,
22
- validators = props.validators,
23
- handlerStoreValidators = props.handlerStoreValidators,
24
- handlerRemoveValidators = props.handlerRemoveValidators;
35
+ validators = props.validators,
36
+ handlerStoreValidators = props.handlerStoreValidators,
37
+ handlerRemoveValidators = props.handlerRemoveValidators;
38
+
25
39
  var _useState = (0, _react.useState)(undefined),
26
- _useState2 = _slicedToArray(_useState, 2),
27
- validatorFromComponent = _useState2[0],
28
- setValidatorFromComponent = _useState2[1];
40
+ _useState2 = _slicedToArray(_useState, 2),
41
+ validatorFromComponent = _useState2[0],
42
+ setValidatorFromComponent = _useState2[1];
43
+
29
44
  var updateValidators = function updateValidators() {
30
45
  var validatorsArray = (0, _helpers.getValidatorsArray)(validators, validatorFromComponent);
31
46
  if (validatorsArray && handlerStoreValidators) handlerStoreValidators(name, validatorsArray);
32
47
  };
48
+
33
49
  (0, _react.useEffect)(function () {
34
50
  updateValidators();
35
51
  return function () {
@@ -48,16 +64,17 @@ var withFieldHOC = function withFieldHOC(WrappedComponent) {
48
64
  value: contextValues
49
65
  }, /*#__PURE__*/_react.default.createElement(WrappedComponent, props));
50
66
  };
67
+
51
68
  function forwardRef(props, ref) {
52
69
  return /*#__PURE__*/_react.default.createElement(_helpers.FormContext.Consumer, null, function (_ref) {
53
70
  var handlerFieldChange = _ref.handlerFieldChange,
54
- handlerFieldValidade = _ref.handlerFieldValidade,
55
- data = _ref.data,
56
- fieldErrors = _ref.fieldErrors,
57
- externalFieldErrors = _ref.externalFieldErrors,
58
- handlerStoreValidators = _ref.handlerStoreValidators,
59
- handlerRemoveValidators = _ref.handlerRemoveValidators,
60
- skeletonize = _ref.skeletonize;
71
+ handlerFieldValidade = _ref.handlerFieldValidade,
72
+ data = _ref.data,
73
+ fieldErrors = _ref.fieldErrors,
74
+ externalFieldErrors = _ref.externalFieldErrors,
75
+ handlerStoreValidators = _ref.handlerStoreValidators,
76
+ handlerRemoveValidators = _ref.handlerRemoveValidators,
77
+ skeletonize = _ref.skeletonize;
61
78
  return /*#__PURE__*/_react.default.createElement(EnhancedComponent, _extends({}, props, {
62
79
  skeletonize: skeletonize,
63
80
  handlerFieldChange: handlerFieldChange,
@@ -71,7 +88,9 @@ var withFieldHOC = function withFieldHOC(WrappedComponent) {
71
88
  }));
72
89
  });
73
90
  }
91
+
74
92
  return /*#__PURE__*/_react.default.forwardRef(forwardRef);
75
93
  };
94
+
76
95
  var _default = withFieldHOC;
77
96
  exports.default = _default;
@@ -1,5 +1,11 @@
1
1
  import React__default from 'react';
2
2
  import { IFormSecurityContext, IWithFormSecurity } from './types.js';
3
+ import '../inputs/select/types.js';
4
+ import '../@types/Align.js';
5
+ import '../@types/DataCombo.js';
6
+ import '../@types/PermissionAttr.js';
7
+ import '../inputs/base/types.js';
8
+ import '../@types/Period.js';
3
9
 
4
10
  declare const FormSecurityContext: React__default.Context<IFormSecurityContext>;
5
11
  declare const withFormSecurity: <ComponentProps extends IWithFormSecurity>(WrappedComponent: React__default.ComponentType<ComponentProps>) => (props: ComponentProps) => JSX.Element;
@@ -1,54 +1,76 @@
1
1
  "use strict";
2
2
 
3
3
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4
+
4
5
  Object.defineProperty(exports, "__esModule", {
5
6
  value: true
6
7
  });
7
8
  exports.default = exports.FormSecurityContext = void 0;
9
+
8
10
  var _react = _interopRequireWildcard(require("react"));
11
+
9
12
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
13
+
10
14
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
+
11
16
  function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
17
+
12
18
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
19
+
13
20
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
21
+
14
22
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
15
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
16
- function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
23
+
24
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
25
+
26
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
27
+
17
28
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
29
+
18
30
  var FormSecurityContext = /*#__PURE__*/_react.default.createContext({});
31
+
19
32
  exports.FormSecurityContext = FormSecurityContext;
33
+
20
34
  var withFormSecurity = function withFormSecurity(WrappedComponent) {
21
35
  var EnhancedComponent = function EnhancedComponent(props) {
22
36
  var handlerClose = props.handlerClose;
23
37
  var changedData = (0, _react.useRef)(false);
24
38
  var securityBeforeUnload = (0, _react.useRef)(false);
39
+
25
40
  var _useState = (0, _react.useState)(false),
26
- _useState2 = _slicedToArray(_useState, 2),
27
- showQuestion = _useState2[0],
28
- setShowQuestion = _useState2[1];
41
+ _useState2 = _slicedToArray(_useState, 2),
42
+ showQuestion = _useState2[0],
43
+ setShowQuestion = _useState2[1];
44
+
29
45
  var newHandlerClose = function newHandlerClose() {
30
46
  if (changedData.current && securityBeforeUnload.current) {
31
47
  setShowQuestion(true);
32
48
  } else if (handlerClose) handlerClose();
33
49
  };
50
+
34
51
  var onConfirmClick = function onConfirmClick() {
35
52
  if (handlerClose) handlerClose();
36
53
  };
54
+
37
55
  var onUnconfirmClick = function onUnconfirmClick() {
38
56
  setShowQuestion(false);
39
57
  };
58
+
40
59
  var onChangedData = function onChangedData(value) {
41
60
  changedData.current = value;
42
61
  };
62
+
43
63
  var setSecurityBeforeUnload = function setSecurityBeforeUnload(value) {
44
64
  securityBeforeUnload.current = value;
45
65
  };
66
+
46
67
  var contextValues = {
47
68
  onChangedData: onChangedData,
48
69
  showQuestion: showQuestion,
49
70
  onConfirmClick: onConfirmClick,
50
71
  onUnconfirmClick: onUnconfirmClick,
51
- setSecurityBeforeUnload: setSecurityBeforeUnload
72
+ setSecurityBeforeUnload: setSecurityBeforeUnload,
73
+ securityBeforeUnload: securityBeforeUnload.current
52
74
  };
53
75
  return /*#__PURE__*/_react.default.createElement(FormSecurityContext.Provider, {
54
76
  value: contextValues
@@ -56,7 +78,9 @@ var withFormSecurity = function withFormSecurity(WrappedComponent) {
56
78
  handlerClose: newHandlerClose
57
79
  })));
58
80
  };
81
+
59
82
  return EnhancedComponent;
60
83
  };
84
+
61
85
  var _default = withFormSecurity;
62
86
  exports.default = _default;
@@ -4,9 +4,13 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
+
7
8
  var _react = _interopRequireDefault(require("react"));
9
+
8
10
  require("../assets/styles/gridlayout.scss");
11
+
9
12
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+
10
14
  var getClass = function getClass(col) {
11
15
  var cols = col ? col.split(' ') : [];
12
16
  var classes = 'grid-container ';
@@ -16,13 +20,14 @@ var getClass = function getClass(col) {
16
20
  if (cols[3]) classes += " col-lg-".concat(cols[3]);
17
21
  return classes;
18
22
  };
23
+
19
24
  var GridCol = function GridCol(props) {
20
25
  var cols = props.cols,
21
- customClass = props.customClass,
22
- children = props.children,
23
- style = props.style,
24
- _props$visible = props.visible,
25
- visible = _props$visible === void 0 ? true : _props$visible;
26
+ customClass = props.customClass,
27
+ children = props.children,
28
+ style = props.style,
29
+ _props$visible = props.visible,
30
+ visible = _props$visible === void 0 ? true : _props$visible;
26
31
  var gridClasses = getClass(cols || '');
27
32
  if (!visible) return null;
28
33
  return /*#__PURE__*/_react.default.createElement("div", {
@@ -30,5 +35,6 @@ var GridCol = function GridCol(props) {
30
35
  style: style
31
36
  }, children);
32
37
  };
38
+
33
39
  var _default = GridCol;
34
40
  exports.default = _default;