hrm_ui_lib 2.1.0 → 2.2.0

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 (574) hide show
  1. package/assets/styles/styles.css +61 -5
  2. package/assets/styles/styles.scss +1 -1
  3. package/components/Alert/Alert.js +11 -52
  4. package/components/Alert/consts.js +12 -14
  5. package/components/Alert/index.js +1 -52
  6. package/components/Alert/types.js +1 -1
  7. package/components/Avatar/Avatar.js +21 -117
  8. package/components/Avatar/AvatarGroup.js +18 -117
  9. package/components/Avatar/index.js +2 -64
  10. package/components/Avatar/types.js +1 -1
  11. package/components/Badge/Badge.js +5 -22
  12. package/components/Badge/index.js +1 -6
  13. package/components/Badge/types.js +1 -1
  14. package/components/BadgeV2/BadgeV2.d.ts +3 -0
  15. package/components/BadgeV2/BadgeV2.js +9 -0
  16. package/components/BadgeV2/index.d.ts +1 -0
  17. package/components/BadgeV2/index.js +1 -0
  18. package/components/BadgeV2/types.d.ts +42 -0
  19. package/components/BadgeV2/types.js +31 -0
  20. package/components/Breadcrumb/Breadcrumb.js +6 -23
  21. package/components/Breadcrumb/index.js +1 -2
  22. package/components/Breadcrumb/types.js +1 -1
  23. package/components/Button/Button.js +29 -52
  24. package/components/Button/consts.js +12 -14
  25. package/components/Button/index.js +1 -52
  26. package/components/Button/types.js +1 -1
  27. package/components/Checkbox/Checkbox.js +45 -52
  28. package/components/Checkbox/index.js +1 -52
  29. package/components/Checkbox/types.js +1 -1
  30. package/components/Chips/Chips.js +23 -65
  31. package/components/Chips/consts.js +10 -12
  32. package/components/Chips/index.js +1 -11
  33. package/components/Chips/types.js +5 -7
  34. package/components/Collapse/CollapseGroup/CollapseGroup.js +22 -73
  35. package/components/Collapse/CollapseItem/CollapseItem.js +11 -86
  36. package/components/Collapse/index.js +2 -16
  37. package/components/Collapse/types.js +1 -1
  38. package/components/Container/Container.js +4 -9
  39. package/components/Container/index.js +1 -2
  40. package/components/Container/types.js +1 -1
  41. package/components/Copy/Copy.js +15 -93
  42. package/components/Copy/index.js +1 -54
  43. package/components/Copy/types.js +1 -1
  44. package/components/Counter/Counter.js +54 -134
  45. package/components/Counter/index.js +1 -61
  46. package/components/Counter/types.js +1 -1
  47. package/components/DatePicker/CustomHeader/CustomHeader.js +16 -191
  48. package/components/DatePicker/CustomHeader/helpers.js +10 -16
  49. package/components/DatePicker/RangeDatePicker/RangeDatePicker.js +7 -129
  50. package/components/DatePicker/RangeDatePicker/RangeDatePickerDesktop.js +71 -172
  51. package/components/DatePicker/RangeDatePicker/RangeDatePickerMobile.js +86 -265
  52. package/components/DatePicker/RangeDatePicker/index.js +1 -124
  53. package/components/DatePicker/SimpleDatePicker/SimpleDatePicker.js +8 -128
  54. package/components/DatePicker/SimpleDatePicker/SimpleDatePickerDesktop.js +45 -202
  55. package/components/DatePicker/SimpleDatePicker/SimpleDatePickerMobile.js +44 -206
  56. package/components/DatePicker/SimpleDatePicker/index.js +1 -123
  57. package/components/DatePicker/TimePicker/MobileModalContent.js +33 -123
  58. package/components/DatePicker/TimePicker/TimePicker.js +7 -75
  59. package/components/DatePicker/TimePicker/TimePickerDesktop.js +42 -128
  60. package/components/DatePicker/TimePicker/TimePickerMobile.js +27 -125
  61. package/components/DatePicker/TimePicker/consts.js +5 -8
  62. package/components/DatePicker/TimePicker/helpers.js +9 -19
  63. package/components/DatePicker/TimePicker/index.js +1 -70
  64. package/components/DatePicker/hooks.js +33 -2171
  65. package/components/DatePicker/index.js +3 -134
  66. package/components/DatePicker/localization.js +43 -6
  67. package/components/DatePicker/types.js +5 -7
  68. package/components/Divider/Divider.js +8 -15
  69. package/components/Divider/index.js +1 -3
  70. package/components/Divider/types.js +1 -1
  71. package/components/Empty/Empty.js +9 -83
  72. package/components/Empty/index.js +1 -54
  73. package/components/Empty/types.js +1 -1
  74. package/components/FileUpload/DropzoneFileUpload/DropzoneFileUpload.js +67 -52
  75. package/components/FileUpload/DropzoneFileUpload/ErrorItem.js +21 -52
  76. package/components/FileUpload/DropzoneFileUpload/FilePreview.js +23 -52
  77. package/components/FileUpload/DropzoneFileUpload/PreviewItem.js +30 -52
  78. package/components/FileUpload/DropzoneFileUpload/helpers.js +79 -52
  79. package/components/FileUpload/DropzoneFileUpload/index.js +1 -52
  80. package/components/FileUpload/FileUpload.js +69 -192
  81. package/components/FileUpload/UploadItems.js +22 -101
  82. package/components/FileUpload/index.js +3 -61
  83. package/components/FileUpload/types.js +6 -10
  84. package/components/FormContainer/FormContainer.js +43 -136
  85. package/components/FormContainer/index.js +1 -55
  86. package/components/FormContainer/types.js +1 -1
  87. package/components/FormField/FormField.js +17 -112
  88. package/components/FormField/index.js +1 -56
  89. package/components/FormField/types.js +1 -1
  90. package/components/Heading/Heading.js +5 -27
  91. package/components/Heading/index.js +1 -5
  92. package/components/Heading/types.js +1 -1
  93. package/components/Image/Image.js +12 -32
  94. package/components/Image/index.js +1 -2
  95. package/components/Image/types.js +1 -1
  96. package/components/Input/Input.js +68 -236
  97. package/components/Input/index.js +1 -58
  98. package/components/Input/types.js +1 -1
  99. package/components/Link/Link.js +14 -40
  100. package/components/Link/index.js +1 -3
  101. package/components/Link/types.js +1 -1
  102. package/components/Menu/Menu.js +47 -161
  103. package/components/Menu/NestedMenu.js +47 -173
  104. package/components/Menu/index.js +2 -72
  105. package/components/Menu/types.js +1 -1
  106. package/components/Modal/Modal.js +70 -52
  107. package/components/Modal/ModalConfirmation.js +30 -137
  108. package/components/Modal/ModalContent.js +10 -52
  109. package/components/Modal/index.js +2 -53
  110. package/components/Modal/types.js +1 -1
  111. package/components/More/More.js +19 -85
  112. package/components/More/index.js +1 -53
  113. package/components/More/types.js +1 -1
  114. package/components/Pagination/Pagination.js +15 -56
  115. package/components/Pagination/consts.js +5 -7
  116. package/components/Pagination/index.js +1 -10
  117. package/components/Pagination/types.js +1 -1
  118. package/components/Popover/Popover.js +41 -52
  119. package/components/Popover/PopoverDesktop.js +16 -69
  120. package/components/Popover/PopoverMobile.js +8 -52
  121. package/components/Popover/index.js +1 -52
  122. package/components/Popover/types.js +1 -1
  123. package/components/Progress/Progress.js +21 -56
  124. package/components/Progress/index.js +1 -2
  125. package/components/Progress/types.js +1 -1
  126. package/components/ProgressStep/ProgressStep.js +9 -38
  127. package/components/ProgressStep/Step.js +51 -98
  128. package/components/ProgressStep/consts.js +7 -9
  129. package/components/ProgressStep/index.js +1 -12
  130. package/components/ProgressStep/types.js +5 -7
  131. package/components/Radio/Radio.js +19 -56
  132. package/components/Radio/RadioGroup.js +21 -111
  133. package/components/Radio/index.js +2 -55
  134. package/components/Radio/types.js +1 -1
  135. package/components/SVGIcons/IconAdd.js +7 -28
  136. package/components/SVGIcons/IconAddCircle.js +7 -31
  137. package/components/SVGIcons/IconAddCircleFilled.js +7 -31
  138. package/components/SVGIcons/IconAddFilled.js +7 -28
  139. package/components/SVGIcons/IconAlert.js +7 -31
  140. package/components/SVGIcons/IconAlertBadge.js +7 -31
  141. package/components/SVGIcons/IconAlertBadgeFilled.js +7 -31
  142. package/components/SVGIcons/IconAlertFilled.js +7 -31
  143. package/components/SVGIcons/IconAm.js +6 -57
  144. package/components/SVGIcons/IconAmd.js +7 -28
  145. package/components/SVGIcons/IconAmdFilled.js +7 -28
  146. package/components/SVGIcons/IconApple.js +7 -31
  147. package/components/SVGIcons/IconArrowDown.js +7 -31
  148. package/components/SVGIcons/IconArrowDownFilled.js +7 -31
  149. package/components/SVGIcons/IconArrowDownLeft.js +7 -31
  150. package/components/SVGIcons/IconArrowDownLeftFilled.js +7 -31
  151. package/components/SVGIcons/IconArrowDownload.js +7 -31
  152. package/components/SVGIcons/IconArrowDownloadFilled.js +7 -31
  153. package/components/SVGIcons/IconArrowEnter.js +7 -28
  154. package/components/SVGIcons/IconArrowEnterFilled.js +7 -28
  155. package/components/SVGIcons/IconArrowExit.js +7 -28
  156. package/components/SVGIcons/IconArrowExitFilled.js +7 -28
  157. package/components/SVGIcons/IconArrowExportLeftToRight.js +7 -31
  158. package/components/SVGIcons/IconArrowExportLeftToRightFilled.js +7 -31
  159. package/components/SVGIcons/IconArrowExportRightToLeft.js +7 -31
  160. package/components/SVGIcons/IconArrowExportRightToLeftFilled.js +7 -31
  161. package/components/SVGIcons/IconArrowExportUp.js +7 -31
  162. package/components/SVGIcons/IconArrowExportUpFilled.js +7 -31
  163. package/components/SVGIcons/IconArrowImport.js +7 -31
  164. package/components/SVGIcons/IconArrowImportFilled.js +7 -31
  165. package/components/SVGIcons/IconArrowLeft.js +7 -31
  166. package/components/SVGIcons/IconArrowLeftFilled.js +7 -31
  167. package/components/SVGIcons/IconArrowRepeatAll.js +7 -31
  168. package/components/SVGIcons/IconArrowRepeatAllFilled.js +7 -31
  169. package/components/SVGIcons/IconArrowReset.js +7 -31
  170. package/components/SVGIcons/IconArrowResetFilled.js +7 -31
  171. package/components/SVGIcons/IconArrowRight.js +7 -31
  172. package/components/SVGIcons/IconArrowRightFilled.js +7 -31
  173. package/components/SVGIcons/IconArrowSort.js +7 -28
  174. package/components/SVGIcons/IconArrowSortFilled.js +7 -28
  175. package/components/SVGIcons/IconArrowSync.js +7 -28
  176. package/components/SVGIcons/IconArrowSyncFilled.js +7 -28
  177. package/components/SVGIcons/IconArrowUp.js +7 -31
  178. package/components/SVGIcons/IconArrowUpFilled.js +7 -31
  179. package/components/SVGIcons/IconArrowUpLeft.js +7 -31
  180. package/components/SVGIcons/IconArrowUpLeftFilled.js +7 -31
  181. package/components/SVGIcons/IconArrowUpRight.js +7 -31
  182. package/components/SVGIcons/IconArrowUpRightFilled.js +7 -31
  183. package/components/SVGIcons/IconAttach.js +7 -31
  184. package/components/SVGIcons/IconAttachFilled.js +7 -31
  185. package/components/SVGIcons/IconBeach.js +7 -28
  186. package/components/SVGIcons/IconBeachFilled.js +7 -28
  187. package/components/SVGIcons/IconBook.js +7 -31
  188. package/components/SVGIcons/IconBookFilled.js +7 -31
  189. package/components/SVGIcons/IconBookmark.js +7 -31
  190. package/components/SVGIcons/IconBookmarkFilled.js +7 -31
  191. package/components/SVGIcons/IconBriefcase.js +7 -31
  192. package/components/SVGIcons/IconBriefcaseFilled.js +7 -31
  193. package/components/SVGIcons/IconBuilding.js +7 -54
  194. package/components/SVGIcons/IconBuildingBank.js +7 -28
  195. package/components/SVGIcons/IconBuildingBankFilled.js +7 -28
  196. package/components/SVGIcons/IconBuildingFilled.js +7 -31
  197. package/components/SVGIcons/IconBulletListAdd.js +7 -31
  198. package/components/SVGIcons/IconBulletListAddFilled.js +7 -31
  199. package/components/SVGIcons/IconCalculator.js +7 -31
  200. package/components/SVGIcons/IconCalculatorFilled.js +7 -31
  201. package/components/SVGIcons/IconCalendarClock.js +7 -28
  202. package/components/SVGIcons/IconCalendarClockFilled.js +7 -28
  203. package/components/SVGIcons/IconCalendarDay.js +7 -31
  204. package/components/SVGIcons/IconCalendarDayFilled.js +7 -31
  205. package/components/SVGIcons/IconCalendarEmpty.js +7 -28
  206. package/components/SVGIcons/IconCalendarLeft.js +7 -28
  207. package/components/SVGIcons/IconCalendarLeftFilled.js +7 -28
  208. package/components/SVGIcons/IconCalendarRight.js +7 -28
  209. package/components/SVGIcons/IconCalendarRightFilled.js +7 -28
  210. package/components/SVGIcons/IconCall.js +7 -31
  211. package/components/SVGIcons/IconCallFilled.js +7 -31
  212. package/components/SVGIcons/IconCard.js +7 -28
  213. package/components/SVGIcons/IconCardFilled.js +7 -28
  214. package/components/SVGIcons/IconCaretDown.js +7 -28
  215. package/components/SVGIcons/IconCaretDownFilled.js +7 -28
  216. package/components/SVGIcons/IconCaretDownRight.js +7 -28
  217. package/components/SVGIcons/IconCaretDownRightFilled.js +7 -28
  218. package/components/SVGIcons/IconCaretLeft.js +7 -28
  219. package/components/SVGIcons/IconCaretLeftFilled.js +7 -28
  220. package/components/SVGIcons/IconCaretRight.js +7 -28
  221. package/components/SVGIcons/IconCaretRightFilled.js +7 -28
  222. package/components/SVGIcons/IconCaretUp.js +7 -28
  223. package/components/SVGIcons/IconCaretUpFilled.js +7 -28
  224. package/components/SVGIcons/IconChat.js +7 -28
  225. package/components/SVGIcons/IconChatFilled.js +7 -28
  226. package/components/SVGIcons/IconChatMultiple.js +7 -28
  227. package/components/SVGIcons/IconChatMultipleFilled.js +7 -28
  228. package/components/SVGIcons/IconCheckboxArrowRight.js +7 -31
  229. package/components/SVGIcons/IconCheckboxArrowRightFilled.js +7 -31
  230. package/components/SVGIcons/IconCheckmark.js +7 -28
  231. package/components/SVGIcons/IconCheckmarkCircle.js +7 -28
  232. package/components/SVGIcons/IconCheckmarkCircleFilled.js +7 -28
  233. package/components/SVGIcons/IconCheckmarkFilled.js +7 -28
  234. package/components/SVGIcons/IconChevronDoubleLeft.js +7 -28
  235. package/components/SVGIcons/IconChevronDoubleRight.js +7 -28
  236. package/components/SVGIcons/IconChevronDown.js +7 -28
  237. package/components/SVGIcons/IconChevronDownFilled.js +7 -28
  238. package/components/SVGIcons/IconChevronLeft.js +7 -28
  239. package/components/SVGIcons/IconChevronLeftFilled.js +7 -28
  240. package/components/SVGIcons/IconChevronRight.js +7 -28
  241. package/components/SVGIcons/IconChevronRightFilled.js +7 -28
  242. package/components/SVGIcons/IconChevronUp.js +7 -28
  243. package/components/SVGIcons/IconChevronUpDown.js +7 -31
  244. package/components/SVGIcons/IconChevronUpDownFilled.js +7 -31
  245. package/components/SVGIcons/IconChevronUpFilled.js +7 -28
  246. package/components/SVGIcons/IconClipboardDay.js +7 -28
  247. package/components/SVGIcons/IconClock.js +7 -31
  248. package/components/SVGIcons/IconClockDismiss.js +7 -28
  249. package/components/SVGIcons/IconClockDismissFilled.js +7 -28
  250. package/components/SVGIcons/IconClockFilled.js +7 -31
  251. package/components/SVGIcons/IconComment.js +7 -31
  252. package/components/SVGIcons/IconCommentFilled.js +7 -31
  253. package/components/SVGIcons/IconContractCard.js +7 -28
  254. package/components/SVGIcons/IconContractCardFilled.js +7 -28
  255. package/components/SVGIcons/IconCopy.js +7 -28
  256. package/components/SVGIcons/IconCopyFilled.js +7 -28
  257. package/components/SVGIcons/IconCubeTree.js +7 -28
  258. package/components/SVGIcons/IconCubeTreeFilled.js +7 -31
  259. package/components/SVGIcons/IconDatabase.js +7 -31
  260. package/components/SVGIcons/IconDatabaseFilled.js +7 -31
  261. package/components/SVGIcons/IconDelete.js +7 -28
  262. package/components/SVGIcons/IconDeleteFilled.js +7 -28
  263. package/components/SVGIcons/IconDeviceMeetingRoom.js +7 -28
  264. package/components/SVGIcons/IconDeviceMeetingRoomFilled.js +7 -28
  265. package/components/SVGIcons/IconDismiss.js +7 -28
  266. package/components/SVGIcons/IconDismissCircle.js +7 -31
  267. package/components/SVGIcons/IconDismissCircleFilled.js +7 -31
  268. package/components/SVGIcons/IconDismissFilled.js +7 -28
  269. package/components/SVGIcons/IconDocument.js +7 -28
  270. package/components/SVGIcons/IconDocumentBulletList.js +7 -31
  271. package/components/SVGIcons/IconDocumentBulletListFilled.js +7 -31
  272. package/components/SVGIcons/IconDocumentEdit.js +7 -28
  273. package/components/SVGIcons/IconDocumentEditFilled.js +7 -28
  274. package/components/SVGIcons/IconDocumentFilled.js +7 -28
  275. package/components/SVGIcons/IconDocumentPerson.js +7 -28
  276. package/components/SVGIcons/IconEdit.js +7 -28
  277. package/components/SVGIcons/IconEditFilled.js +7 -28
  278. package/components/SVGIcons/IconErrorCircle.js +7 -28
  279. package/components/SVGIcons/IconErrorCircleFilled.js +7 -28
  280. package/components/SVGIcons/IconEur.js +7 -28
  281. package/components/SVGIcons/IconEurFilled.js +7 -28
  282. package/components/SVGIcons/IconExpandUpLeft.js +7 -31
  283. package/components/SVGIcons/IconExpandUpLeftFilled.js +7 -31
  284. package/components/SVGIcons/IconExpandUpRight.js +7 -31
  285. package/components/SVGIcons/IconExpandUpRightFilled.js +7 -31
  286. package/components/SVGIcons/IconEyeOff.js +7 -31
  287. package/components/SVGIcons/IconEyeOffFilled.js +7 -31
  288. package/components/SVGIcons/IconEyeOn.js +7 -31
  289. package/components/SVGIcons/IconEyeOnFilled.js +7 -31
  290. package/components/SVGIcons/IconFacebook.js +7 -38
  291. package/components/SVGIcons/IconFilter.js +7 -28
  292. package/components/SVGIcons/IconFilterFilled.js +7 -28
  293. package/components/SVGIcons/IconFlag.js +7 -31
  294. package/components/SVGIcons/IconFlagFilled.js +7 -31
  295. package/components/SVGIcons/IconFolderLink.js +7 -28
  296. package/components/SVGIcons/IconFolderLinkFilled.js +7 -28
  297. package/components/SVGIcons/IconFood.js +7 -28
  298. package/components/SVGIcons/IconFoodFilled.js +7 -28
  299. package/components/SVGIcons/IconGb.js +6 -71
  300. package/components/SVGIcons/IconGlobe.js +7 -28
  301. package/components/SVGIcons/IconGlobeFilled.js +7 -28
  302. package/components/SVGIcons/IconGoogle.js +7 -40
  303. package/components/SVGIcons/IconHandOpenHeart.js +7 -31
  304. package/components/SVGIcons/IconHandOpenHeartFilled.js +7 -31
  305. package/components/SVGIcons/IconHeart.js +7 -31
  306. package/components/SVGIcons/IconHeartFilled.js +7 -31
  307. package/components/SVGIcons/IconHistory.js +7 -31
  308. package/components/SVGIcons/IconHistoryFilled.js +7 -31
  309. package/components/SVGIcons/IconHome.js +7 -31
  310. package/components/SVGIcons/IconHomeFilled.js +7 -31
  311. package/components/SVGIcons/IconImage.js +7 -31
  312. package/components/SVGIcons/IconImageFilled.js +7 -31
  313. package/components/SVGIcons/IconInfo.js +7 -28
  314. package/components/SVGIcons/IconInfoFilled.js +7 -28
  315. package/components/SVGIcons/IconInstagram.js +7 -39
  316. package/components/SVGIcons/IconKeyReset.js +7 -31
  317. package/components/SVGIcons/IconKeyResetFilled.js +7 -31
  318. package/components/SVGIcons/IconLink.js +7 -31
  319. package/components/SVGIcons/IconLinkFilled.js +7 -31
  320. package/components/SVGIcons/IconLinkedin.js +7 -31
  321. package/components/SVGIcons/IconList.js +7 -28
  322. package/components/SVGIcons/IconListFilled.js +7 -31
  323. package/components/SVGIcons/IconLocation.js +7 -31
  324. package/components/SVGIcons/IconLocationFilled.js +7 -31
  325. package/components/SVGIcons/IconLockClosed.js +7 -31
  326. package/components/SVGIcons/IconLockClosedFilled.js +7 -31
  327. package/components/SVGIcons/IconLockOpen.js +7 -31
  328. package/components/SVGIcons/IconLockOpenFilled.js +7 -31
  329. package/components/SVGIcons/IconMail.js +7 -31
  330. package/components/SVGIcons/IconMailAdd.js +7 -31
  331. package/components/SVGIcons/IconMailAddFilled.js +7 -31
  332. package/components/SVGIcons/IconMailArrowForward.js +7 -31
  333. package/components/SVGIcons/IconMailArrowForwardFilled.js +7 -31
  334. package/components/SVGIcons/IconMailFilled.js +7 -31
  335. package/components/SVGIcons/IconMailLink.js +7 -31
  336. package/components/SVGIcons/IconMailLinkFilled.js +7 -31
  337. package/components/SVGIcons/IconMedium.js +7 -31
  338. package/components/SVGIcons/IconMore.js +7 -31
  339. package/components/SVGIcons/IconMoreFilled.js +7 -31
  340. package/components/SVGIcons/IconMoreVertical.js +7 -31
  341. package/components/SVGIcons/IconMoreVerticalFilled.js +7 -31
  342. package/components/SVGIcons/IconNavigation.js +7 -31
  343. package/components/SVGIcons/IconNavigationFilled.js +7 -31
  344. package/components/SVGIcons/IconNotebook.js +7 -31
  345. package/components/SVGIcons/IconNotebookAdd.js +7 -47
  346. package/components/SVGIcons/IconNotebookAddFilled.js +7 -44
  347. package/components/SVGIcons/IconNotebookFilled.js +7 -31
  348. package/components/SVGIcons/IconOnlyEmployee.js +7 -28
  349. package/components/SVGIcons/IconOpen.js +7 -31
  350. package/components/SVGIcons/IconOpenFilled.js +7 -31
  351. package/components/SVGIcons/IconPatient.js +7 -28
  352. package/components/SVGIcons/IconPatientFilled.js +7 -28
  353. package/components/SVGIcons/IconPeople.js +7 -28
  354. package/components/SVGIcons/IconPeopleAdd.js +7 -31
  355. package/components/SVGIcons/IconPeopleAddFilled.js +7 -31
  356. package/components/SVGIcons/IconPeopleFilled.js +7 -31
  357. package/components/SVGIcons/IconPercent.js +7 -33
  358. package/components/SVGIcons/IconPerson.js +7 -31
  359. package/components/SVGIcons/IconPersonAccount.js +7 -28
  360. package/components/SVGIcons/IconPersonAccountFilled.js +7 -28
  361. package/components/SVGIcons/IconPersonAdd.js +7 -31
  362. package/components/SVGIcons/IconPersonAddFilled.js +7 -31
  363. package/components/SVGIcons/IconPersonArrowLeft.js +7 -28
  364. package/components/SVGIcons/IconPersonArrowLeftFilled.js +7 -28
  365. package/components/SVGIcons/IconPersonArrowRight.js +7 -28
  366. package/components/SVGIcons/IconPersonArrowRightFilled.js +7 -28
  367. package/components/SVGIcons/IconPersonBoard.js +7 -28
  368. package/components/SVGIcons/IconPersonFilled.js +7 -31
  369. package/components/SVGIcons/IconPersonMinus.js +7 -28
  370. package/components/SVGIcons/IconPersonStar.js +7 -31
  371. package/components/SVGIcons/IconPersonStarFilled.js +7 -31
  372. package/components/SVGIcons/IconPersonSubtract.js +7 -31
  373. package/components/SVGIcons/IconPersonSubtractFilled.js +7 -31
  374. package/components/SVGIcons/IconPhone.js +7 -31
  375. package/components/SVGIcons/IconPhoneFilled.js +7 -31
  376. package/components/SVGIcons/IconPlugConnected.js +7 -28
  377. package/components/SVGIcons/IconPos.js +7 -33
  378. package/components/SVGIcons/IconPosFilled.js +7 -33
  379. package/components/SVGIcons/IconProhibited.js +7 -31
  380. package/components/SVGIcons/IconProhibitedFilled.js +7 -31
  381. package/components/SVGIcons/IconProjectProduct.js +7 -28
  382. package/components/SVGIcons/IconQuestion.js +7 -31
  383. package/components/SVGIcons/IconQuestionFilled.js +7 -31
  384. package/components/SVGIcons/IconRedo.js +7 -31
  385. package/components/SVGIcons/IconRedoFilled.js +7 -31
  386. package/components/SVGIcons/IconRu.js +6 -60
  387. package/components/SVGIcons/IconRub.js +7 -28
  388. package/components/SVGIcons/IconRubFilled.js +7 -28
  389. package/components/SVGIcons/IconSave.js +7 -31
  390. package/components/SVGIcons/IconSaveFilled.js +7 -31
  391. package/components/SVGIcons/IconSavings.js +7 -31
  392. package/components/SVGIcons/IconSavingsFilled.js +7 -31
  393. package/components/SVGIcons/IconSearch.js +7 -31
  394. package/components/SVGIcons/IconSearchFilled.js +7 -31
  395. package/components/SVGIcons/IconSelectAllOff.js +7 -31
  396. package/components/SVGIcons/IconSelectAllOffFilled.js +7 -31
  397. package/components/SVGIcons/IconSelectAllOn.js +7 -31
  398. package/components/SVGIcons/IconSelectAllOnFilled.js +7 -31
  399. package/components/SVGIcons/IconSend.js +7 -31
  400. package/components/SVGIcons/IconSendFilled.js +7 -31
  401. package/components/SVGIcons/IconSettings.js +7 -28
  402. package/components/SVGIcons/IconSettingsFilled.js +7 -31
  403. package/components/SVGIcons/IconShare.js +7 -31
  404. package/components/SVGIcons/IconShareAndroid.js +7 -31
  405. package/components/SVGIcons/IconShareAndroidFilled.js +7 -31
  406. package/components/SVGIcons/IconShareFilled.js +7 -31
  407. package/components/SVGIcons/IconSignOut.js +7 -31
  408. package/components/SVGIcons/IconSignOutFilled.js +7 -31
  409. package/components/SVGIcons/IconSpinner.js +7 -31
  410. package/components/SVGIcons/IconSpinnerFilled.js +7 -31
  411. package/components/SVGIcons/IconStatus.js +7 -31
  412. package/components/SVGIcons/IconStatusFilled.js +7 -31
  413. package/components/SVGIcons/IconSubtract.js +7 -31
  414. package/components/SVGIcons/IconSubtractCircle.js +7 -31
  415. package/components/SVGIcons/IconSubtractCircleFilled.js +7 -31
  416. package/components/SVGIcons/IconSubtractFilled.js +7 -31
  417. package/components/SVGIcons/IconTableCellEdit.js +7 -35
  418. package/components/SVGIcons/IconTableCellEditFilled.js +7 -41
  419. package/components/SVGIcons/IconTelegram.js +7 -40
  420. package/components/SVGIcons/IconTimer.js +7 -31
  421. package/components/SVGIcons/IconTimerFilled.js +7 -31
  422. package/components/SVGIcons/IconTwitter.js +7 -31
  423. package/components/SVGIcons/IconUndo.js +7 -31
  424. package/components/SVGIcons/IconUndoFilled.js +7 -31
  425. package/components/SVGIcons/IconUnitsEmployee.js +7 -28
  426. package/components/SVGIcons/IconUpload.js +7 -28
  427. package/components/SVGIcons/IconUsd.js +7 -28
  428. package/components/SVGIcons/IconUsdFilled.js +7 -28
  429. package/components/SVGIcons/IconUserMinus.js +7 -31
  430. package/components/SVGIcons/IconVideo.js +7 -28
  431. package/components/SVGIcons/IconVideoFilled.js +7 -28
  432. package/components/SVGIcons/IconWallet.js +7 -31
  433. package/components/SVGIcons/IconWalletFilled.js +7 -31
  434. package/components/SVGIcons/IconWarning.js +7 -28
  435. package/components/SVGIcons/IconWarningFilled.js +7 -28
  436. package/components/SVGIcons/IconYoutube.js +7 -31
  437. package/components/SVGIcons/index.js +302 -305
  438. package/components/SVGIcons/types.js +1 -1
  439. package/components/Select/ButtonSelect/ButtonSelect.js +42 -195
  440. package/components/Select/FilterSelect/FilterDropdown.js +14 -95
  441. package/components/Select/FilterSelect/FilterGroupDropdown.js +18 -82
  442. package/components/Select/FilterSelect/FilterSelect.js +69 -199
  443. package/components/Select/MultiSelect/DesktopWrapper.js +18 -55
  444. package/components/Select/MultiSelect/MobileWrapper.js +12 -77
  445. package/components/Select/MultiSelect/MultiBase/MultiBase.js +60 -211
  446. package/components/Select/MultiSelect/MultiSelect.js +66 -244
  447. package/components/Select/MultiSelect/MultiSelectGrouped/MultiSelectGrouped.js +94 -264
  448. package/components/Select/MultiSelect/MultiSelectWithTabs/MultiSelectWithTabs.js +76 -251
  449. package/components/Select/MultiSelect/OptionsWrapper.js +64 -175
  450. package/components/Select/NestedSelect/NestedSelect.js +55 -197
  451. package/components/Select/ProfileDropdown/index.js +12 -82
  452. package/components/Select/Select/Select.js +85 -254
  453. package/components/Select/Select/SelectDesktop/index.js +66 -219
  454. package/components/Select/Select/SelectMobile/MobileTopContent.js +17 -90
  455. package/components/Select/Select/SelectMobile/index.js +49 -194
  456. package/components/Select/Select/helpers.js +8 -9
  457. package/components/Select/SharedComponents/Actions.js +13 -115
  458. package/components/Select/SharedComponents/ButtonSelectWrapper/Button/Button.js +8 -43
  459. package/components/Select/SharedComponents/ButtonSelectWrapper/ButtonSelectWrapper.js +27 -130
  460. package/components/Select/SharedComponents/ContentTop.js +70 -177
  461. package/components/Select/SharedComponents/Footer.js +10 -97
  462. package/components/Select/SharedComponents/InputSelectWrapper/InputSelectWrapper.js +49 -161
  463. package/components/Select/SharedComponents/Loading.js +5 -16
  464. package/components/Select/SharedComponents/index.js +6 -92
  465. package/components/Select/constants.js +7 -9
  466. package/components/Select/index.js +6 -114
  467. package/components/Select/localization.js +28 -30
  468. package/components/Select/types.js +1 -1
  469. package/components/SideSheet/Footer/Footer.js +13 -99
  470. package/components/SideSheet/SideSheet.js +55 -208
  471. package/components/SideSheet/index.js +1 -56
  472. package/components/SideSheet/types.js +1 -1
  473. package/components/Snackbar/Snackbar.js +29 -123
  474. package/components/Snackbar/consts.js +11 -13
  475. package/components/Snackbar/index.js +1 -54
  476. package/components/Snackbar/types.js +1 -1
  477. package/components/Status/Status.js +16 -51
  478. package/components/Status/index.js +1 -8
  479. package/components/Status/types.js +1 -1
  480. package/components/Stepper/Stepper.js +28 -44
  481. package/components/Stepper/index.js +1 -3
  482. package/components/Stepper/types.js +1 -1
  483. package/components/Switcher/Switcher.js +17 -114
  484. package/components/Switcher/index.js +1 -55
  485. package/components/Switcher/types.js +1 -1
  486. package/components/Tab/Tab.js +18 -35
  487. package/components/Tab/TabItem.js +11 -52
  488. package/components/Tab/index.js +1 -11
  489. package/components/Tab/types.js +1 -1
  490. package/components/Table/Header.js +19 -121
  491. package/components/Table/IndeterminateCheckbox.js +13 -76
  492. package/components/Table/Row.js +16 -92
  493. package/components/Table/Table.js +60 -160
  494. package/components/Table/index.js +1 -61
  495. package/components/Table/types.js +1 -1
  496. package/components/Table/utils.js +17 -76
  497. package/components/TableV2/AdvancedPagination.js +61 -270
  498. package/components/TableV2/ColumnHeader.js +29 -61
  499. package/components/TableV2/ColumnSettings.js +31 -162
  500. package/components/TableV2/IndeterminateCheckbox.js +13 -84
  501. package/components/TableV2/Table.js +114 -310
  502. package/components/TableV2/constants/index.js +26 -22
  503. package/components/TableV2/hooks/useTableColumnSettings.js +16 -19
  504. package/components/TableV2/hooks/useTableControl.js +176 -297
  505. package/components/TableV2/index.js +3 -131
  506. package/components/TableV2/loadTableSettings.js +8 -17
  507. package/components/TableV2/types.js +1 -1
  508. package/components/Text/Text.js +5 -34
  509. package/components/Text/index.js +1 -5
  510. package/components/Text/types.js +1 -1
  511. package/components/Textarea/Textarea.js +36 -140
  512. package/components/Textarea/index.js +1 -56
  513. package/components/Textarea/types.js +1 -1
  514. package/components/Tooltip/Tooltip.js +49 -99
  515. package/components/Tooltip/index.js +1 -18
  516. package/components/Tooltip/types.js +11 -13
  517. package/consts/index.js +86 -65
  518. package/context/FormContextProvider.js +4 -10
  519. package/context/index.js +2 -5
  520. package/context/types.js +6 -10
  521. package/helperComponents/AnimatePresenceWrapper/AnimatePresenceWrapper.js +4 -12
  522. package/helperComponents/AnimatePresenceWrapper/index.js +1 -3
  523. package/helperComponents/CodeBlock/CodeBlock.js +4 -178
  524. package/helperComponents/CodeBlock/index.js +1 -3
  525. package/helperComponents/ErrorMessage/ErrorMessage.js +7 -26
  526. package/helperComponents/ErrorMessage/index.js +1 -8
  527. package/helperComponents/ErrorMessage/types.js +1 -1
  528. package/helperComponents/GoToWebPage/GoToWebPage.js +5 -66
  529. package/helperComponents/IconDynamicComponent/IconDynamicComponent.js +11 -25
  530. package/helperComponents/IconDynamicComponent/constants.js +10 -31
  531. package/helperComponents/IconDynamicComponent/index.js +1 -3
  532. package/helperComponents/Label/Label.js +8 -28
  533. package/helperComponents/Label/index.js +1 -6
  534. package/helperComponents/Label/types.js +1 -1
  535. package/helperComponents/Loader/Loader.js +4 -14
  536. package/helperComponents/Loader/index.js +1 -2
  537. package/helperComponents/Loader/types.js +1 -1
  538. package/helperComponents/OptionItem/OptionItem.js +27 -148
  539. package/helperComponents/OptionItem/index.js +1 -64
  540. package/helperComponents/OptionItem/types.js +1 -1
  541. package/helperComponents/index.js +6 -65
  542. package/helpers/check-authorization.js +57 -111
  543. package/helpers/download-file.js +7 -9
  544. package/helpers/format-date.js +14 -42
  545. package/helpers/get-module-prefix.js +3 -5
  546. package/helpers/index.js +7 -59
  547. package/helpers/isDeepEqual.js +11 -17
  548. package/helpers/locale.js +10 -15
  549. package/helpers/storage.js +17 -18
  550. package/hooks/index.js +12 -21
  551. package/hooks/useChangePositionsOnScroll.js +28 -32
  552. package/hooks/useDispatchEventOnScroll.js +8 -13
  553. package/hooks/useFormContext.js +3 -8
  554. package/hooks/useFormProps.js +3 -8
  555. package/hooks/useGetElemPositions.js +14 -16
  556. package/hooks/useGetElemSizes.js +11 -13
  557. package/hooks/useGetHasBottomSpace.js +13 -24
  558. package/hooks/useGetIsMobile.js +33 -45
  559. package/hooks/useGetTooltipPosition.js +66 -82
  560. package/hooks/useGetTooltipStyles.js +45 -87
  561. package/hooks/useHideBodyScroll.js +25 -34
  562. package/hooks/useHideOnScroll.js +19 -24
  563. package/hooks/useOnOutsideClick.js +33 -46
  564. package/hooks/useScreenSize.js +24 -34
  565. package/index.d.ts +1 -0
  566. package/index.js +47 -468
  567. package/package.json +1 -1
  568. package/type/file-upload.js +6 -8
  569. package/type/index.js +4 -4
  570. package/type/locale.js +12 -14
  571. package/type/notification.js +7 -9
  572. package/type/status-code.js +7 -9
  573. package/utils/helpers.js +63 -77
  574. /package/{Alert-BslI0aA0.js → Alert-CNizbUJ6.js} +0 -0
@@ -1,303 +1,182 @@
1
- import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
2
- import _defineProperty from '@babel/runtime/helpers/defineProperty';
3
- import _slicedToArray from '@babel/runtime/helpers/slicedToArray';
4
- import { useReactTable, getPaginationRowModel, getSortedRowModel, getCoreRowModel } from '@tanstack/react-table';
5
- import { useSensors, useSensor, MouseSensor, TouchSensor } from '@dnd-kit/core';
6
- import React, { useState, useMemo, useEffect } from 'react';
7
- import { IndeterminateCheckbox } from '../IndeterminateCheckbox.js';
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useReactTable, getCoreRowModel, getSortedRowModel, getPaginationRowModel } from '@tanstack/react-table';
3
+ import { MouseSensor, TouchSensor, useSensor, useSensors } from '@dnd-kit/core';
4
+ import { useState, useMemo, useEffect } from 'react';
5
+ import { IndeterminateCheckbox } from '../IndeterminateCheckbox';
8
6
  import { arrayMove } from '@dnd-kit/sortable';
9
- import { loadTableSettings } from '../loadTableSettings.js';
10
- import { useTableColumnSettings } from './useTableColumnSettings.js';
11
- import { STORAGE_TYPE, TABLE_NAME_PREFIX } from '../constants/index.js';
12
- import '../../../Alert-BslI0aA0.js';
13
- import '@babel/runtime/helpers/extends';
14
- import '../../Alert/consts.js';
15
- import 'classnames';
16
- import '../../Text/Text.js';
17
- import '../../../utils/helpers.js';
18
- import 'dayjs';
19
- import '@babel/runtime/helpers/objectWithoutProperties';
20
- import '../../../helperComponents/Loader/Loader.js';
21
- import '../../../consts/index.js';
22
- import '../../../type/file-upload.js';
23
- import '../../../hooks/useScreenSize.js';
24
- import 'react-hook-form';
25
- import 'react-dropzone';
26
- import '../../SVGIcons/IconUpload.js';
27
- import '../../FileUpload/types.js';
28
- import '../../../helpers/format-date.js';
29
- import '../../../helpers/locale.js';
30
- import '../../../type/locale.js';
31
- import '../../../helpers/storage.js';
32
- import 'react-toastify';
33
- import '../../../hooks/useGetIsMobile.js';
34
- import 'framer-motion';
35
- import '../../../helperComponents/AnimatePresenceWrapper/AnimatePresenceWrapper.js';
36
- import '../../../hooks/useOnOutsideClick.js';
37
- import '../../../hooks/useHideBodyScroll.js';
38
- import '../../SVGIcons/IconDismiss.js';
39
- import '../../Tooltip/types.js';
40
- import '../../Tooltip/Tooltip.js';
41
- import '../../../hooks/useGetTooltipStyles.js';
42
- import '../../../hooks/useGetElemSizes.js';
43
- import '../../../hooks/useGetElemPositions.js';
44
- import '../../../hooks/useGetTooltipPosition.js';
45
- import '../../../hooks/useHideOnScroll.js';
46
- import 'react-syntax-highlighter';
47
- import '../../Link/Link.js';
48
- import '../../Popover/PopoverDesktop.js';
49
- import '../../SVGIcons/IconInfo.js';
50
- import '../../../helperComponents/IconDynamicComponent/IconDynamicComponent.js';
51
- import '../../../helperComponents/IconDynamicComponent/constants.js';
52
- import '@babel/runtime/helpers/typeof';
53
- import '../../SVGIcons/IconDismissFilled.js';
54
- import '../../SVGIcons/IconDelete.js';
55
- import '../../FileUpload/DropzoneFileUpload/FilePreview.js';
56
- import '../../Progress/Progress.js';
57
- import '../../SVGIcons/IconArrowDownloadFilled.js';
58
- import '../../../helpers/download-file.js';
59
- import '../../Button/consts.js';
60
-
61
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
62
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
63
- function useTableControl(_ref) {
64
- var _savedSettings$column, _savedSettings$column2;
65
- var withSelect = _ref.withSelect,
66
- columns = _ref.columns,
67
- data = _ref.data,
68
- tableSettings = _ref.tableSettings,
69
- _ref$totalCount = _ref.totalCount,
70
- totalCount = _ref$totalCount === void 0 ? 0 : _ref$totalCount,
71
- _ref$defaultPageSize = _ref.defaultPageSize,
72
- defaultPageSize = _ref$defaultPageSize === void 0 ? 10 : _ref$defaultPageSize,
73
- _ref$defaultPageIndex = _ref.defaultPageIndex,
74
- defaultPageIndex = _ref$defaultPageIndex === void 0 ? 0 : _ref$defaultPageIndex,
75
- _ref$defaultHiddenCol = _ref.defaultHiddenColumns,
76
- defaultHiddenColumns = _ref$defaultHiddenCol === void 0 ? [] : _ref$defaultHiddenCol,
77
- onSortChange = _ref.onSortChange,
78
- onRowSelection = _ref.onRowSelection,
79
- onColumnSizing = _ref.onColumnSizing,
80
- onPaginationChange = _ref.onPaginationChange;
81
- var shouldPersistToStorage = (tableSettings === null || tableSettings === void 0 ? void 0 : tableSettings.persistColumnSettings) === STORAGE_TYPE.LOCAL;
82
- var shouldEmitExternal = (tableSettings === null || tableSettings === void 0 ? void 0 : tableSettings.persistColumnSettings) === STORAGE_TYPE.EXTERNAL;
83
- var tableName = "".concat(TABLE_NAME_PREFIX, "-").concat(tableSettings === null || tableSettings === void 0 ? void 0 : tableSettings.tableName);
84
- var savedSettings = shouldPersistToStorage && tableName ? loadTableSettings(tableName) : {
85
- columnVisibility: {},
86
- columnSizing: {},
87
- columnOrder: []
88
- };
89
- var _useState = useState(null),
90
- _useState2 = _slicedToArray(_useState, 2),
91
- activeId = _useState2[0],
92
- setActiveId = _useState2[1];
93
- var _useState3 = useState([]),
94
- _useState4 = _slicedToArray(_useState3, 2),
95
- sorting = _useState4[0],
96
- setSorting = _useState4[1];
97
- var _useState5 = useState({}),
98
- _useState6 = _slicedToArray(_useState5, 2),
99
- rowSelection = _useState6[0],
100
- setRowSelection = _useState6[1];
101
- var _useState7 = useState((_savedSettings$column = savedSettings.columnSizing) !== null && _savedSettings$column !== void 0 ? _savedSettings$column : {}),
102
- _useState8 = _slicedToArray(_useState7, 2),
103
- columnSizing = _useState8[0],
104
- setColumnSizing = _useState8[1];
105
- var _useState9 = useState(_objectSpread(_objectSpread({}, defaultHiddenColumns.reduce(function (acc, key) {
106
- acc[key] = false;
107
- return acc;
108
- }, {})), savedSettings.columnVisibility)),
109
- _useState0 = _slicedToArray(_useState9, 2),
110
- columnVisibility = _useState0[0],
111
- setColumnVisibility = _useState0[1];
112
- var _useState1 = useState({
113
- pageIndex: defaultPageIndex,
114
- pageSize: defaultPageSize
115
- }),
116
- _useState10 = _slicedToArray(_useState1, 2),
117
- pagination = _useState10[0],
118
- setPagination = _useState10[1];
119
- var memoizedColumns = useMemo(function () {
120
- var columnsList = _toConsumableArray(columns).map(function (col) {
121
- if (col.id === 'actions') {
122
- return _objectSpread(_objectSpread({}, col), {}, {
123
- enableColumnDragging: false,
124
- enableSorting: false,
125
- enableResizing: false,
126
- enableHiding: false
127
- });
128
- }
129
- return col;
7
+ import { loadTableSettings } from '../loadTableSettings';
8
+ import { useTableColumnSettings } from './useTableColumnSettings';
9
+ import { STORAGE_TYPE, TABLE_NAME_PREFIX } from '../constants';
10
+ export function useTableControl({ withSelect, columns, data, tableSettings, totalCount = 0, defaultPageSize = 10, defaultPageIndex = 0, defaultHiddenColumns = [], onSortChange, onRowSelection, onColumnSizing, onPaginationChange }) {
11
+ var _a, _b;
12
+ const shouldPersistToStorage = (tableSettings === null || tableSettings === void 0 ? void 0 : tableSettings.persistColumnSettings) === STORAGE_TYPE.LOCAL;
13
+ const shouldEmitExternal = (tableSettings === null || tableSettings === void 0 ? void 0 : tableSettings.persistColumnSettings) === STORAGE_TYPE.EXTERNAL;
14
+ const tableName = `${TABLE_NAME_PREFIX}-${tableSettings === null || tableSettings === void 0 ? void 0 : tableSettings.tableName}`;
15
+ const savedSettings = shouldPersistToStorage && tableName
16
+ ? loadTableSettings(tableName)
17
+ : { columnVisibility: {}, columnSizing: {}, columnOrder: [] };
18
+ const [activeId, setActiveId] = useState(null);
19
+ const [sorting, setSorting] = useState([]);
20
+ const [rowSelection, setRowSelection] = useState({});
21
+ const [columnSizing, setColumnSizing] = useState((_a = savedSettings.columnSizing) !== null && _a !== void 0 ? _a : {});
22
+ const [columnVisibility, setColumnVisibility] = useState(Object.assign(Object.assign({}, defaultHiddenColumns.reduce((acc, key) => {
23
+ acc[key] = false;
24
+ return acc;
25
+ }, {})), savedSettings.columnVisibility));
26
+ const [pagination, setPagination] = useState({
27
+ pageIndex: defaultPageIndex,
28
+ pageSize: defaultPageSize
130
29
  });
131
- if (withSelect) {
132
- columnsList.unshift({
133
- id: 'select',
134
- enableHiding: false,
135
- enableColumnDragging: false,
136
- enablePinning: true,
137
- header: function header(_ref2) {
138
- var table = _ref2.table;
139
- return /*#__PURE__*/React.createElement(IndeterminateCheckbox, {
140
- checked: table.getIsAllRowsSelected(),
141
- indeterminate: table.getIsSomeRowsSelected(),
142
- onChange: table.getToggleAllRowsSelectedHandler()
143
- });
144
- },
145
- cell: function cell(_ref3) {
146
- var row = _ref3.row;
147
- return /*#__PURE__*/React.createElement(IndeterminateCheckbox, {
148
- checked: row.getIsSelected(),
149
- disabled: !row.getCanSelect(),
150
- indeterminate: row.getIsSomeSelected(),
151
- onChange: row.getToggleSelectedHandler()
152
- });
30
+ const memoizedColumns = useMemo(() => {
31
+ const columnsList = [...columns].map((col) => {
32
+ if (col.id === 'actions') {
33
+ return Object.assign(Object.assign({}, col), { enableColumnDragging: false, enableSorting: false, enableResizing: false, enableHiding: false });
34
+ }
35
+ return col;
36
+ });
37
+ if (withSelect) {
38
+ columnsList.unshift({
39
+ id: 'select',
40
+ enableHiding: false,
41
+ enableColumnDragging: false,
42
+ enablePinning: true,
43
+ header: ({ table }) => (_jsx(IndeterminateCheckbox, { checked: table.getIsAllRowsSelected(), indeterminate: table.getIsSomeRowsSelected(), onChange: table.getToggleAllRowsSelectedHandler() })),
44
+ cell: ({ row }) => (_jsx(IndeterminateCheckbox, { checked: row.getIsSelected(), disabled: !row.getCanSelect(), indeterminate: row.getIsSomeSelected(), onChange: row.getToggleSelectedHandler() }))
45
+ });
153
46
  }
154
- });
155
- }
156
- return columnsList;
157
- }, [columns]);
158
- var _useState11 = useState((_savedSettings$column2 = savedSettings.columnOrder) !== null && _savedSettings$column2 !== void 0 && _savedSettings$column2.length && savedSettings.columnOrder.length === memoizedColumns.length ? savedSettings.columnOrder : memoizedColumns.map(function (column) {
159
- return column.id;
160
- })),
161
- _useState12 = _slicedToArray(_useState11, 2),
162
- columnOrder = _useState12[0],
163
- setColumnOrder = _useState12[1];
164
- var reorderedColumns = columnOrder.map(function (columnId) {
165
- return memoizedColumns.find(function (col) {
166
- return col.id === columnId;
167
- });
168
- });
169
- var handleSortingChange = function handleSortingChange(updaterOrValue) {
170
- var newSorting = typeof updaterOrValue === 'function' ? updaterOrValue(sorting) : updaterOrValue;
171
- setSorting(newSorting);
172
- var sortingEvent = newSorting.map(function (sort) {
173
- var _sort$id;
174
- return {
175
- column: (_sort$id = sort.id) !== null && _sort$id !== void 0 ? _sort$id : '',
176
- direction: sort.desc ? 'desc' : sort.id ? 'asc' : false,
177
- timestamp: Date.now()
178
- };
47
+ return columnsList;
48
+ }, [columns]);
49
+ const [columnOrder, setColumnOrder] = useState(((_b = savedSettings.columnOrder) === null || _b === void 0 ? void 0 : _b.length) && savedSettings.columnOrder.length === memoizedColumns.length
50
+ ? savedSettings.columnOrder
51
+ : memoizedColumns.map((column) => column.id));
52
+ const reorderedColumns = columnOrder.map((columnId) => memoizedColumns.find((col) => col.id === columnId));
53
+ const handleSortingChange = (updaterOrValue) => {
54
+ const newSorting = typeof updaterOrValue === 'function' ? updaterOrValue(sorting) : updaterOrValue;
55
+ setSorting(newSorting);
56
+ const sortingEvent = newSorting.map((sort) => {
57
+ var _a;
58
+ return ({
59
+ column: (_a = sort.id) !== null && _a !== void 0 ? _a : '',
60
+ direction: sort.desc ? 'desc' : sort.id ? 'asc' : false,
61
+ timestamp: Date.now()
62
+ });
63
+ });
64
+ onSortChange === null || onSortChange === void 0 ? void 0 : onSortChange(sortingEvent);
65
+ };
66
+ const handleRowSelect = (updaterOrValue) => {
67
+ const newSelectionRow = typeof updaterOrValue === 'function' ? updaterOrValue(rowSelection) : updaterOrValue;
68
+ setRowSelection(newSelectionRow);
69
+ onRowSelection === null || onRowSelection === void 0 ? void 0 : onRowSelection(newSelectionRow);
70
+ };
71
+ const handleColumnSizingChange = (updaterOrValue) => {
72
+ const newColumnSizing = typeof updaterOrValue === 'function' ? updaterOrValue(columnSizing) : updaterOrValue;
73
+ setColumnSizing(newColumnSizing);
74
+ onColumnSizing === null || onColumnSizing === void 0 ? void 0 : onColumnSizing(newColumnSizing);
75
+ };
76
+ const handlePaginationChange = (updaterOrValue) => {
77
+ const newPagination = typeof updaterOrValue === 'function' ? updaterOrValue(pagination) : updaterOrValue;
78
+ setPagination(newPagination);
79
+ onPaginationChange === null || onPaginationChange === void 0 ? void 0 : onPaginationChange(newPagination);
80
+ };
81
+ const hiddenColumns = defaultHiddenColumns === null || defaultHiddenColumns === void 0 ? void 0 : defaultHiddenColumns.reduce((acc, key) => {
82
+ acc[key] = false;
83
+ return acc;
84
+ }, {});
85
+ const table = useReactTable({
86
+ data,
87
+ columns: reorderedColumns,
88
+ pageCount: Math.ceil(totalCount / pagination.pageSize),
89
+ state: {
90
+ sorting,
91
+ pagination,
92
+ columnOrder,
93
+ columnSizing,
94
+ rowSelection,
95
+ columnVisibility: Object.assign(Object.assign({}, hiddenColumns), columnVisibility),
96
+ columnPinning: {
97
+ left: ['select'],
98
+ right: ['actions']
99
+ }
100
+ },
101
+ defaultColumn: {
102
+ minSize: 200,
103
+ size: 150,
104
+ maxSize: 400
105
+ },
106
+ onPaginationChange: handlePaginationChange,
107
+ onColumnSizingChange: handleColumnSizingChange,
108
+ onSortingChange: handleSortingChange,
109
+ onRowSelectionChange: handleRowSelect,
110
+ onColumnVisibilityChange: setColumnVisibility,
111
+ getCoreRowModel: getCoreRowModel(),
112
+ getSortedRowModel: getSortedRowModel(),
113
+ getPaginationRowModel: getPaginationRowModel(),
114
+ columnResizeMode: 'onChange',
115
+ manualSorting: !!onSortChange,
116
+ manualPagination: !!onPaginationChange,
117
+ enableRowSelection: true,
118
+ enableColumnResizing: true,
119
+ isMultiSortEvent: () => true
179
120
  });
180
- onSortChange === null || onSortChange === void 0 || onSortChange(sortingEvent);
181
- };
182
- var handleRowSelect = function handleRowSelect(updaterOrValue) {
183
- var newSelectionRow = typeof updaterOrValue === 'function' ? updaterOrValue(rowSelection) : updaterOrValue;
184
- setRowSelection(newSelectionRow);
185
- onRowSelection === null || onRowSelection === void 0 || onRowSelection(newSelectionRow);
186
- };
187
- var handleColumnSizingChange = function handleColumnSizingChange(updaterOrValue) {
188
- var newColumnSizing = typeof updaterOrValue === 'function' ? updaterOrValue(columnSizing) : updaterOrValue;
189
- setColumnSizing(newColumnSizing);
190
- onColumnSizing === null || onColumnSizing === void 0 || onColumnSizing(newColumnSizing);
191
- };
192
- var handlePaginationChange = function handlePaginationChange(updaterOrValue) {
193
- var newPagination = typeof updaterOrValue === 'function' ? updaterOrValue(pagination) : updaterOrValue;
194
- setPagination(newPagination);
195
- onPaginationChange === null || onPaginationChange === void 0 || onPaginationChange(newPagination);
196
- };
197
- var hiddenColumns = defaultHiddenColumns === null || defaultHiddenColumns === void 0 ? void 0 : defaultHiddenColumns.reduce(function (acc, key) {
198
- acc[key] = false;
199
- return acc;
200
- }, {});
201
- var table = useReactTable({
202
- data: data,
203
- columns: reorderedColumns,
204
- pageCount: Math.ceil(totalCount / pagination.pageSize),
205
- state: {
206
- sorting: sorting,
207
- pagination: pagination,
208
- columnOrder: columnOrder,
209
- columnSizing: columnSizing,
210
- rowSelection: rowSelection,
211
- columnVisibility: _objectSpread(_objectSpread({}, hiddenColumns), columnVisibility),
212
- columnPinning: {
213
- left: ['select'],
214
- right: ['actions']
215
- }
216
- },
217
- defaultColumn: {
218
- minSize: 200,
219
- size: 150,
220
- maxSize: 400
221
- },
222
- onPaginationChange: handlePaginationChange,
223
- onColumnSizingChange: handleColumnSizingChange,
224
- onSortingChange: handleSortingChange,
225
- onRowSelectionChange: handleRowSelect,
226
- onColumnVisibilityChange: setColumnVisibility,
227
- getCoreRowModel: getCoreRowModel(),
228
- getSortedRowModel: getSortedRowModel(),
229
- getPaginationRowModel: getPaginationRowModel(),
230
- columnResizeMode: 'onChange',
231
- manualSorting: !!onSortChange,
232
- manualPagination: !!onPaginationChange,
233
- enableRowSelection: true,
234
- enableColumnResizing: true,
235
- isMultiSortEvent: function isMultiSortEvent() {
236
- return true;
237
- }
238
- });
239
- useTableColumnSettings(table, tableName, shouldPersistToStorage);
240
- var sensors = useSensors(useSensor(MouseSensor, {
241
- activationConstraint: {
242
- distance: 8
243
- }
244
- }), useSensor(TouchSensor, {
245
- activationConstraint: {
246
- delay: 200,
247
- tolerance: 5
248
- }
249
- }));
250
- var handleDragStart = function handleDragStart(event) {
251
- setActiveId(event.active.id);
252
- document.body.classList.add('select-none');
253
- };
254
- var handleDragEnd = function handleDragEnd(event) {
255
- var active = event.active,
256
- over = event.over;
257
- if (over && active.id !== over.id) {
258
- var oldIndex = columnOrder.indexOf(active.id);
259
- var newIndex = columnOrder.indexOf(over.id);
260
- var oldColumn = reorderedColumns[newIndex];
261
- if ((oldColumn === null || oldColumn === void 0 ? void 0 : oldColumn.enableColumnDragging) === false) {
262
- return;
263
- }
264
- var newColumnOrder = arrayMove(columnOrder, oldIndex, newIndex);
265
- setColumnOrder(newColumnOrder);
266
- }
267
- setActiveId(null);
268
- document.body.classList.remove('select-none');
269
- };
270
- var handleDragCancel = function handleDragCancel() {
271
- setActiveId(null);
272
- document.body.classList.remove('select-none');
273
- };
274
- var activeHeader = activeId ? table.getHeaderGroups()[0].headers.find(function (header) {
275
- return header.id === activeId;
276
- }) : null;
277
- useEffect(function () {
278
- var settings = {
279
- columnVisibility: columnVisibility,
280
- columnOrder: columnOrder,
281
- columnSizing: columnSizing
121
+ useTableColumnSettings(table, tableName, shouldPersistToStorage);
122
+ const sensors = useSensors(useSensor(MouseSensor, {
123
+ activationConstraint: {
124
+ distance: 8
125
+ }
126
+ }), useSensor(TouchSensor, {
127
+ activationConstraint: {
128
+ delay: 200,
129
+ tolerance: 5
130
+ }
131
+ }));
132
+ const handleDragStart = (event) => {
133
+ setActiveId(event.active.id);
134
+ document.body.classList.add('select-none');
135
+ };
136
+ const handleDragEnd = (event) => {
137
+ const { active, over } = event;
138
+ if (over && active.id !== over.id) {
139
+ const oldIndex = columnOrder.indexOf(active.id);
140
+ const newIndex = columnOrder.indexOf(over.id);
141
+ const oldColumn = reorderedColumns[newIndex];
142
+ if ((oldColumn === null || oldColumn === void 0 ? void 0 : oldColumn.enableColumnDragging) === false) {
143
+ return;
144
+ }
145
+ const newColumnOrder = arrayMove(columnOrder, oldIndex, newIndex);
146
+ setColumnOrder(newColumnOrder);
147
+ }
148
+ setActiveId(null);
149
+ document.body.classList.remove('select-none');
150
+ };
151
+ const handleDragCancel = () => {
152
+ setActiveId(null);
153
+ document.body.classList.remove('select-none');
154
+ };
155
+ const activeHeader = activeId
156
+ ? table.getHeaderGroups()[0].headers.find((header) => header.id === activeId)
157
+ : null;
158
+ useEffect(() => {
159
+ var _a;
160
+ const settings = {
161
+ columnVisibility,
162
+ columnOrder,
163
+ columnSizing
164
+ };
165
+ if (shouldPersistToStorage && tableSettings.tableName) {
166
+ const serialized = JSON.stringify(settings);
167
+ localStorage.setItem(tableName, serialized);
168
+ }
169
+ if (shouldEmitExternal) {
170
+ (_a = tableSettings === null || tableSettings === void 0 ? void 0 : tableSettings.onColumnSettingsChange) === null || _a === void 0 ? void 0 : _a.call(tableSettings, settings);
171
+ }
172
+ }, [columnVisibility, columnOrder, columnSizing]);
173
+ return {
174
+ table,
175
+ activeHeader,
176
+ sensors,
177
+ memoizedColumns,
178
+ handleDragCancel,
179
+ handleDragEnd,
180
+ handleDragStart
282
181
  };
283
- if (shouldPersistToStorage && tableSettings.tableName) {
284
- var serialized = JSON.stringify(settings);
285
- localStorage.setItem(tableName, serialized);
286
- }
287
- if (shouldEmitExternal) {
288
- var _tableSettings$onColu;
289
- tableSettings === null || tableSettings === void 0 || (_tableSettings$onColu = tableSettings.onColumnSettingsChange) === null || _tableSettings$onColu === void 0 || _tableSettings$onColu.call(tableSettings, settings);
290
- }
291
- }, [columnVisibility, columnOrder, columnSizing]);
292
- return {
293
- table: table,
294
- activeHeader: activeHeader,
295
- sensors: sensors,
296
- memoizedColumns: memoizedColumns,
297
- handleDragCancel: handleDragCancel,
298
- handleDragEnd: handleDragEnd,
299
- handleDragStart: handleDragStart
300
- };
301
182
  }
302
-
303
- export { useTableControl };
@@ -1,131 +1,3 @@
1
- export { Table as TableV2 } from './Table.js';
2
- export { ColumnSettings } from './ColumnSettings.js';
3
- export { AdvancedPagination } from './AdvancedPagination.js';
4
- import '@babel/runtime/helpers/defineProperty';
5
- import '@babel/runtime/helpers/toConsumableArray';
6
- import '@babel/runtime/helpers/slicedToArray';
7
- import 'react';
8
- import '@tanstack/react-table';
9
- import '@dnd-kit/core';
10
- import '@dnd-kit/sortable';
11
- import './ColumnHeader.js';
12
- import '@babel/runtime/helpers/extends';
13
- import '../SVGIcons/IconArrowDown.js';
14
- import 'classnames';
15
- import '../SVGIcons/IconArrowSort.js';
16
- import '../SVGIcons/IconArrowUp.js';
17
- import '../Text/Text.js';
18
- import '../../utils/helpers.js';
19
- import 'dayjs';
20
- import 'react-loading-skeleton';
21
- import './hooks/useTableControl.js';
22
- import './IndeterminateCheckbox.js';
23
- import '../../Alert-BslI0aA0.js';
24
- import '../Alert/consts.js';
25
- import '@babel/runtime/helpers/objectWithoutProperties';
26
- import '../../helperComponents/Loader/Loader.js';
27
- import '../../consts/index.js';
28
- import '../../type/file-upload.js';
29
- import '../../hooks/useScreenSize.js';
30
- import 'react-hook-form';
31
- import 'react-dropzone';
32
- import '../SVGIcons/IconUpload.js';
33
- import '../FileUpload/types.js';
34
- import '../../helpers/format-date.js';
35
- import '../../helpers/locale.js';
36
- import '../../type/locale.js';
37
- import '../../helpers/storage.js';
38
- import 'react-toastify';
39
- import '../../hooks/useGetIsMobile.js';
40
- import 'framer-motion';
41
- import '../../helperComponents/AnimatePresenceWrapper/AnimatePresenceWrapper.js';
42
- import '../../hooks/useOnOutsideClick.js';
43
- import '../../hooks/useHideBodyScroll.js';
44
- import '../SVGIcons/IconDismiss.js';
45
- import '../Tooltip/types.js';
46
- import '../Tooltip/Tooltip.js';
47
- import '../../hooks/useGetTooltipStyles.js';
48
- import '../../hooks/useGetElemSizes.js';
49
- import '../../hooks/useGetElemPositions.js';
50
- import '../../hooks/useGetTooltipPosition.js';
51
- import '../../hooks/useHideOnScroll.js';
52
- import 'react-syntax-highlighter';
53
- import '../Link/Link.js';
54
- import '../Popover/PopoverDesktop.js';
55
- import '../SVGIcons/IconInfo.js';
56
- import '../../helperComponents/IconDynamicComponent/IconDynamicComponent.js';
57
- import '../../helperComponents/IconDynamicComponent/constants.js';
58
- import '@babel/runtime/helpers/typeof';
59
- import '../SVGIcons/IconDismissFilled.js';
60
- import '../SVGIcons/IconDelete.js';
61
- import '../FileUpload/DropzoneFileUpload/FilePreview.js';
62
- import '../Progress/Progress.js';
63
- import '../SVGIcons/IconArrowDownloadFilled.js';
64
- import '../../helpers/download-file.js';
65
- import '../Button/consts.js';
66
- import './loadTableSettings.js';
67
- import './hooks/useTableColumnSettings.js';
68
- import './constants/index.js';
69
- import '../Empty/Empty.js';
70
- import '../Image/Image.js';
71
- import '../SVGIcons/IconChevronDown.js';
72
- import '../SVGIcons/IconChevronUp.js';
73
- import '../SVGIcons/IconSettings.js';
74
- import '../Switcher/Switcher.js';
75
- import '../../helperComponents/Label/Label.js';
76
- import '../SVGIcons/IconCheckmark.js';
77
- import '../Menu/Menu.js';
78
- import 'react-dom';
79
- import '../../helperComponents/OptionItem/OptionItem.js';
80
- import '../Avatar/Avatar.js';
81
- import '../FileUpload/FileUpload.js';
82
- import '../FileUpload/UploadItems.js';
83
- import '../../hooks/useFormProps.js';
84
- import '../../context/types.js';
85
- import '../../helperComponents/ErrorMessage/ErrorMessage.js';
86
- import '../SVGIcons/IconEditFilled.js';
87
- import '../SVGIcons/IconEdit.js';
88
- import '../SVGIcons/IconAttach.js';
89
- import '../Collapse/CollapseGroup/CollapseGroup.js';
90
- import '../Collapse/CollapseItem/CollapseItem.js';
91
- import '../SVGIcons/IconChevronRight.js';
92
- import '../Divider/Divider.js';
93
- import '../Input/Input.js';
94
- import 'react-input-mask';
95
- import 'react-number-format';
96
- import '../SVGIcons/IconCheckmarkCircleFilled.js';
97
- import '../Select/Select/Select.js';
98
- import '../Select/Select/SelectDesktop/index.js';
99
- import 'react-window';
100
- import '../../hooks/useGetHasBottomSpace.js';
101
- import '../../hooks/useChangePositionsOnScroll.js';
102
- import '../Select/SharedComponents/ContentTop.js';
103
- import '../Select/SharedComponents/Actions.js';
104
- import '../SVGIcons/IconMore.js';
105
- import '../SVGIcons/IconSearchFilled.js';
106
- import '../SVGIcons/IconSelectAllOff.js';
107
- import '../SVGIcons/IconChevronLeft.js';
108
- import '../Select/SharedComponents/Loading.js';
109
- import '../Select/constants.js';
110
- import '../Select/Select/helpers.js';
111
- import '../Select/Select/SelectMobile/index.js';
112
- import '../Select/Select/SelectMobile/MobileTopContent.js';
113
- import '../Select/localization.js';
114
- import '../Select/MultiSelect/MultiSelect.js';
115
- import '../Select/MultiSelect/OptionsWrapper.js';
116
- import '../Select/MultiSelect/MultiSelectGrouped/MultiSelectGrouped.js';
117
- import '../SVGIcons/IconCaretUpFilled.js';
118
- import '../SVGIcons/IconCaretDownFilled.js';
119
- import '../Select/MultiSelect/MultiBase/MultiBase.js';
120
- import '../Select/MultiSelect/MultiSelectWithTabs/MultiSelectWithTabs.js';
121
- import '../Tab/Tab.js';
122
- import '../Tab/TabItem.js';
123
- import '../Badge/Badge.js';
124
- import '../Select/SharedComponents/Footer.js';
125
- import '../Select/SharedComponents/InputSelectWrapper/InputSelectWrapper.js';
126
- import '../Select/MultiSelect/MobileWrapper.js';
127
- import '../Select/MultiSelect/DesktopWrapper.js';
128
- import '../Select/SharedComponents/ButtonSelectWrapper/ButtonSelectWrapper.js';
129
- import '../Select/SharedComponents/ButtonSelectWrapper/Button/Button.js';
130
- import '../SVGIcons/IconChevronDoubleLeft.js';
131
- import '../SVGIcons/IconChevronDoubleRight.js';
1
+ export { Table as TableV2 } from './Table';
2
+ export { ColumnSettings } from './ColumnSettings';
3
+ export { AdvancedPagination } from './AdvancedPagination';
@@ -1,18 +1,9 @@
1
- var loadTableSettings = function loadTableSettings(tableKey) {
2
- try {
3
- var raw = localStorage.getItem(tableKey);
4
- return raw ? JSON.parse(raw) : {
5
- columnOrder: [],
6
- columnSizing: {},
7
- columnVisibility: {}
8
- };
9
- } catch (_unused) {
10
- return {
11
- columnOrder: [],
12
- columnSizing: {},
13
- columnVisibility: {}
14
- };
15
- }
1
+ export const loadTableSettings = (tableKey) => {
2
+ try {
3
+ const raw = localStorage.getItem(tableKey);
4
+ return raw ? JSON.parse(raw) : { columnOrder: [], columnSizing: {}, columnVisibility: {} };
5
+ }
6
+ catch (_a) {
7
+ return { columnOrder: [], columnSizing: {}, columnVisibility: {} };
8
+ }
16
9
  };
17
-
18
- export { loadTableSettings };
@@ -1 +1 @@
1
-
1
+ export {};