@mailstep/design-system 0.8.27 → 0.8.28-beta.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 (532) hide show
  1. package/package.json +4 -4
  2. package/ui/Blocks/CommonGrid/CommonGrid.js +104 -152
  3. package/ui/Blocks/CommonGrid/CommonGridContainer.js +187 -368
  4. package/ui/Blocks/CommonGrid/HoC/withProps.js +9 -37
  5. package/ui/Blocks/CommonGrid/HoC/withReduxActions.js +29 -46
  6. package/ui/Blocks/CommonGrid/components/ActionHead/ActionHead.js +105 -196
  7. package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownMenu.js +37 -49
  8. package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownSelect.js +76 -162
  9. package/ui/Blocks/CommonGrid/components/ActionHead/index.js +3 -1
  10. package/ui/Blocks/CommonGrid/components/ButtonMore/ButtonMore.js +43 -124
  11. package/ui/Blocks/CommonGrid/components/ButtonMore/index.js +3 -1
  12. package/ui/Blocks/CommonGrid/components/ColumnFilterCell.js +50 -112
  13. package/ui/Blocks/CommonGrid/components/ColumnTitle/ColumnTitle.js +130 -251
  14. package/ui/Blocks/CommonGrid/components/ColumnTitle/index.js +3 -1
  15. package/ui/Blocks/CommonGrid/components/ColumnTitle.js +36 -104
  16. package/ui/Blocks/CommonGrid/components/ControlButtons/ControlButtons.js +156 -252
  17. package/ui/Blocks/CommonGrid/components/ControlButtons/index.js +3 -1
  18. package/ui/Blocks/CommonGrid/components/ControlButtons/styles.js +40 -53
  19. package/ui/Blocks/CommonGrid/components/DataCell.js +34 -97
  20. package/ui/Blocks/CommonGrid/components/DataRow.js +60 -74
  21. package/ui/Blocks/CommonGrid/components/DropdownButton/DropdownButton.js +67 -154
  22. package/ui/Blocks/CommonGrid/components/DropdownButton/index.js +3 -1
  23. package/ui/Blocks/CommonGrid/components/ExtraControlButtons/ExtraControlButtons.js +57 -149
  24. package/ui/Blocks/CommonGrid/components/ExtraControlButtons/index.js +3 -1
  25. package/ui/Blocks/CommonGrid/components/FilterDropdown.js +30 -48
  26. package/ui/Blocks/CommonGrid/components/FilterRow.js +28 -36
  27. package/ui/Blocks/CommonGrid/components/Filters/ActionsFilter/ActionsFilter.js +32 -83
  28. package/ui/Blocks/CommonGrid/components/Filters/ActionsFilter/index.js +3 -1
  29. package/ui/Blocks/CommonGrid/components/Filters/BooleanSelect/BooleanSelect.js +34 -90
  30. package/ui/Blocks/CommonGrid/components/Filters/BooleanSelect/index.js +4 -2
  31. package/ui/Blocks/CommonGrid/components/Filters/DatePickerRange/DatePickerRange.js +149 -373
  32. package/ui/Blocks/CommonGrid/components/Filters/DatePickerRange/index.js +3 -1
  33. package/ui/Blocks/CommonGrid/components/Filters/DatePickerRange/utils/getCleanValues.js +7 -12
  34. package/ui/Blocks/CommonGrid/components/Filters/DatePickerRange/utils/pickerRangeToString.js +13 -25
  35. package/ui/Blocks/CommonGrid/components/Filters/DatePickerRange/utils/sameDate.js +3 -3
  36. package/ui/Blocks/CommonGrid/components/Filters/GridSelect/GridSelect.js +92 -376
  37. package/ui/Blocks/CommonGrid/components/Filters/GridSelect/guards.js +4 -8
  38. package/ui/Blocks/CommonGrid/components/Filters/GridSelect/index.js +4 -2
  39. package/ui/Blocks/CommonGrid/components/Filters/NumberRange/NumberRange.js +142 -293
  40. package/ui/Blocks/CommonGrid/components/Filters/NumberRange/index.js +3 -1
  41. package/ui/Blocks/CommonGrid/components/Filters/NumberRange/types.js +1 -0
  42. package/ui/Blocks/CommonGrid/components/Filters/TextRange/TextRange.js +160 -320
  43. package/ui/Blocks/CommonGrid/components/Filters/TextRange/index.js +3 -1
  44. package/ui/Blocks/CommonGrid/components/Filters/TextRange/types.js +1 -0
  45. package/ui/Blocks/CommonGrid/components/FloatingButton/FloatingButton.js +79 -156
  46. package/ui/Blocks/CommonGrid/components/FloatingButton/index.js +3 -1
  47. package/ui/Blocks/CommonGrid/components/GridInfo/index.js +30 -41
  48. package/ui/Blocks/CommonGrid/components/GridModals/index.js +132 -134
  49. package/ui/Blocks/CommonGrid/components/GridStatus/index.js +23 -25
  50. package/ui/Blocks/CommonGrid/components/GroupRow.js +26 -87
  51. package/ui/Blocks/CommonGrid/components/HeadCell.js +33 -89
  52. package/ui/Blocks/CommonGrid/components/HeadRow.js +69 -192
  53. package/ui/Blocks/CommonGrid/components/IconList/IconList.js +61 -99
  54. package/ui/Blocks/CommonGrid/components/IconList/index.js +3 -1
  55. package/ui/Blocks/CommonGrid/components/ManageColumnForm/ManageColumnForm.js +52 -114
  56. package/ui/Blocks/CommonGrid/components/ManageColumnForm/components/ManageColumnRow.js +66 -171
  57. package/ui/Blocks/CommonGrid/components/ManageColumnForm/index.js +3 -1
  58. package/ui/Blocks/CommonGrid/components/ManageColumnForm/styles.js +16 -34
  59. package/ui/Blocks/CommonGrid/components/ManageColumnForm/utils.js +7 -9
  60. package/ui/Blocks/CommonGrid/components/MobileFilterModal.js +110 -228
  61. package/ui/Blocks/CommonGrid/components/MobileOverlayWrapper.js +13 -21
  62. package/ui/Blocks/CommonGrid/components/MobileSortModal.js +64 -88
  63. package/ui/Blocks/CommonGrid/components/OversizedScroll.js +34 -86
  64. package/ui/Blocks/CommonGrid/components/PresetsModalBody/components/TagRemove.js +17 -20
  65. package/ui/Blocks/CommonGrid/components/PresetsModalBody/index.js +88 -201
  66. package/ui/Blocks/CommonGrid/components/QuickFilter/QuickFilter.js +29 -54
  67. package/ui/Blocks/CommonGrid/components/QuickFilter/index.js +3 -1
  68. package/ui/Blocks/CommonGrid/components/Resize.js +46 -53
  69. package/ui/Blocks/CommonGrid/components/Table.js +40 -94
  70. package/ui/Blocks/CommonGrid/components/TablePagination/TablePagination.js +63 -113
  71. package/ui/Blocks/CommonGrid/components/TablePagination/index.js +3 -1
  72. package/ui/Blocks/CommonGrid/components/gridCells/BoolIcon.js +16 -32
  73. package/ui/Blocks/CommonGrid/components/gridCells/ButtonInCell.js +10 -58
  74. package/ui/Blocks/CommonGrid/components/gridCells/Date.js +7 -7
  75. package/ui/Blocks/CommonGrid/components/gridCells/DateTime.js +9 -12
  76. package/ui/Blocks/CommonGrid/components/gridCells/EnumInCell.js +27 -100
  77. package/ui/Blocks/CommonGrid/components/gridCells/HoverBubble.js +48 -48
  78. package/ui/Blocks/CommonGrid/components/gridCells/IconButtonInCell.js +31 -33
  79. package/ui/Blocks/CommonGrid/components/gridCells/ImageCell.js +28 -50
  80. package/ui/Blocks/CommonGrid/components/gridCells/LinkInCell.js +8 -22
  81. package/ui/Blocks/CommonGrid/components/gridCells/RemoveItem.js +37 -63
  82. package/ui/Blocks/CommonGrid/components/gridCells/RowActionsCell.js +75 -113
  83. package/ui/Blocks/CommonGrid/components/gridCells/StringJoin.js +7 -7
  84. package/ui/Blocks/CommonGrid/components/gridCells/SwitchInCell.js +9 -57
  85. package/ui/Blocks/CommonGrid/components/gridCells/ToggleCell.js +30 -82
  86. package/ui/Blocks/CommonGrid/components/gridCells/index.js +14 -14
  87. package/ui/Blocks/CommonGrid/components/icons/Edit.js +13 -65
  88. package/ui/Blocks/CommonGrid/components/icons/EyeOpen.js +13 -65
  89. package/ui/Blocks/CommonGrid/components/icons/Sorting.js +19 -72
  90. package/ui/Blocks/CommonGrid/components/utils.js +18 -67
  91. package/ui/Blocks/CommonGrid/hooks/useAddFilter.js +14 -14
  92. package/ui/Blocks/CommonGrid/hooks/useColumnSizes.js +85 -119
  93. package/ui/Blocks/CommonGrid/hooks/useCreatePreset.js +29 -77
  94. package/ui/Blocks/CommonGrid/hooks/useDeletePreset.js +21 -32
  95. package/ui/Blocks/CommonGrid/hooks/useEditReadAsColumn.js +56 -91
  96. package/ui/Blocks/CommonGrid/hooks/useEvent.js +10 -14
  97. package/ui/Blocks/CommonGrid/hooks/useFloatingButton.js +14 -15
  98. package/ui/Blocks/CommonGrid/hooks/useGridActionTrigger.js +25 -42
  99. package/ui/Blocks/CommonGrid/hooks/useGridAutoRowsPerPage.js +10 -20
  100. package/ui/Blocks/CommonGrid/hooks/useManageColumn.js +97 -220
  101. package/ui/Blocks/CommonGrid/hooks/usePresetFileHandlers.js +54 -124
  102. package/ui/Blocks/CommonGrid/hooks/usePresetsState.js +13 -57
  103. package/ui/Blocks/CommonGrid/hooks/useQuickFilter.js +76 -149
  104. package/ui/Blocks/CommonGrid/hooks/useRowsKeyControls.js +19 -23
  105. package/ui/Blocks/CommonGrid/hooks/useSelectPreset.js +18 -80
  106. package/ui/Blocks/CommonGrid/hooks/useToggleAllCheckbox.js +17 -28
  107. package/ui/Blocks/CommonGrid/hooks/useUxReset.js +12 -63
  108. package/ui/Blocks/CommonGrid/index.js +26 -10
  109. package/ui/Blocks/CommonGrid/store/index.js +286 -430
  110. package/ui/Blocks/CommonGrid/store/migrateState.js +10 -10
  111. package/ui/Blocks/CommonGrid/storybook/components/ComplexCell.js +16 -20
  112. package/ui/Blocks/CommonGrid/storybook/components/EnumCellExample.js +17 -22
  113. package/ui/Blocks/CommonGrid/storybook/utils/actions.js +9 -15
  114. package/ui/Blocks/CommonGrid/storybook/utils/columnDefinition.js +121 -156
  115. package/ui/Blocks/CommonGrid/storybook/utils/utils.js +106 -145
  116. package/ui/Blocks/CommonGrid/storybook/utils/withRedux.js +11 -14
  117. package/ui/Blocks/CommonGrid/storybook/utils/withRouter.js +5 -7
  118. package/ui/Blocks/CommonGrid/storybook/utils/withTheme.js +4 -5
  119. package/ui/Blocks/CommonGrid/styles.js +252 -97
  120. package/ui/Blocks/CommonGrid/types.js +22 -14
  121. package/ui/Blocks/CommonGrid/utils/constants.js +24 -22
  122. package/ui/Blocks/CommonGrid/utils/getExtendedExtraControlButtons.js +15 -44
  123. package/ui/Blocks/CommonGrid/utils/getRowsPerPage.js +8 -9
  124. package/ui/Blocks/CommonGrid/utils/hasSortTerminated.js +8 -9
  125. package/ui/Blocks/CommonGrid/utils/index.js +69 -107
  126. package/ui/Blocks/CornerDialog/CornerDialog.js +40 -94
  127. package/ui/Blocks/CornerDialog/index.js +3 -1
  128. package/ui/Blocks/CornerDialog/styles.js +56 -83
  129. package/ui/Blocks/CornerDialog/types.js +1 -0
  130. package/ui/Blocks/CornerDialog/utils.js +28 -26
  131. package/ui/Blocks/Header/components/MenuItems/components/MenuItem/index.js +12 -11
  132. package/ui/Blocks/Header/components/MenuItems/index.js +6 -11
  133. package/ui/Blocks/Header/components/MenuItems/styles.js +21 -35
  134. package/ui/Blocks/Header/components/UserMenu/components/UserInfo/index.js +20 -28
  135. package/ui/Blocks/Header/components/UserMenu/components/UserInfo/styles.js +13 -31
  136. package/ui/Blocks/Header/components/UserMenu/hooks/index.js +1 -1
  137. package/ui/Blocks/Header/components/UserMenu/hooks/useLogout.js +8 -9
  138. package/ui/Blocks/Header/components/UserMenu/index.js +45 -99
  139. package/ui/Blocks/Header/components/UserMenu/styles.js +24 -44
  140. package/ui/Blocks/Header/hooks/useChangeLanguage.js +7 -8
  141. package/ui/Blocks/Header/index.js +41 -57
  142. package/ui/Blocks/Header/styles.js +33 -54
  143. package/ui/Blocks/Header/types.js +1 -0
  144. package/ui/Blocks/Header/utils/constants.js +3 -1
  145. package/ui/Blocks/Header/utils/languageItems.js +13 -18
  146. package/ui/Blocks/HidePrint/HidePrint.js +11 -28
  147. package/ui/Blocks/ImageList/ImageList.js +76 -131
  148. package/ui/Blocks/ImageList/components/AddPhoto/index.js +33 -182
  149. package/ui/Blocks/ImageList/components/AddPhoto/styles.js +29 -42
  150. package/ui/Blocks/ImageList/components/CloseButton/index.js +15 -13
  151. package/ui/Blocks/ImageList/components/CloseButton/styles.js +17 -25
  152. package/ui/Blocks/ImageList/components/ImageElement/index.js +26 -27
  153. package/ui/Blocks/ImageList/components/ImageElement/styles.js +21 -63
  154. package/ui/Blocks/ImageList/components/ImageTag/index.js +12 -15
  155. package/ui/Blocks/ImageList/components/ImageTag/styles.js +8 -21
  156. package/ui/Blocks/ImageList/hooks/useControls.js +12 -66
  157. package/ui/Blocks/ImageList/hooks/useOnElementClick.js +12 -70
  158. package/ui/Blocks/ImageList/index.js +3 -1
  159. package/ui/Blocks/ImageList/styles.js +28 -47
  160. package/ui/Blocks/ImageList/types.js +1 -0
  161. package/ui/Blocks/LanguageSwitch/LanguageSwitch.js +50 -136
  162. package/ui/Blocks/LanguageSwitch/index.js +3 -1
  163. package/ui/Blocks/LanguageSwitch/styles.js +31 -49
  164. package/ui/Blocks/LanguageSwitch/types.js +1 -0
  165. package/ui/Blocks/LightBox/LightBox.js +37 -46
  166. package/ui/Blocks/LightBox/hooks/useLightBox.js +14 -19
  167. package/ui/Blocks/LightBox/index.js +4 -2
  168. package/ui/Blocks/LightBox/styles.js +27 -51
  169. package/ui/Blocks/LightBox/types.js +1 -0
  170. package/ui/Blocks/LoginPage/LoginPage.js +60 -77
  171. package/ui/Blocks/LoginPage/components/LoginForm.js +165 -220
  172. package/ui/Blocks/LoginPage/components/SocialLinks.js +78 -98
  173. package/ui/Blocks/LoginPage/index.js +4 -2
  174. package/ui/Blocks/LoginPage/styles.js +73 -93
  175. package/ui/Blocks/LoginPage/types.js +1 -0
  176. package/ui/Blocks/LoginPage/utils/links.js +9 -7
  177. package/ui/Blocks/Modal/Modal.js +122 -148
  178. package/ui/Blocks/Modal/hooks/useClickOutside.js +25 -35
  179. package/ui/Blocks/Modal/hooks/useModal.js +17 -64
  180. package/ui/Blocks/Modal/index.js +5 -3
  181. package/ui/Blocks/Modal/styles.js +181 -255
  182. package/ui/Blocks/Modal/types.js +1 -0
  183. package/ui/Blocks/Modal/utils.js +8 -6
  184. package/ui/Blocks/Popover/index.js +29 -50
  185. package/ui/Blocks/Scheduler/Scheduler.js +40 -104
  186. package/ui/Blocks/Scheduler/components/BookedTimeSlots/index.js +35 -123
  187. package/ui/Blocks/Scheduler/components/BookedTimeSlots/styles.js +34 -53
  188. package/ui/Blocks/Scheduler/components/CurrentTimeMarker/hooks/useCurrentTime.js +14 -61
  189. package/ui/Blocks/Scheduler/components/CurrentTimeMarker/index.js +11 -15
  190. package/ui/Blocks/Scheduler/components/CurrentTimeMarker/styles.js +29 -51
  191. package/ui/Blocks/Scheduler/components/DateChanger/index.js +46 -50
  192. package/ui/Blocks/Scheduler/components/DateChanger/styles.js +22 -35
  193. package/ui/Blocks/Scheduler/components/Groups/index.js +8 -14
  194. package/ui/Blocks/Scheduler/components/Groups/styles.js +31 -53
  195. package/ui/Blocks/Scheduler/components/TimeSlots/hooks/useRangeSelection.js +43 -114
  196. package/ui/Blocks/Scheduler/components/TimeSlots/hooks/useScroll.js +13 -17
  197. package/ui/Blocks/Scheduler/components/TimeSlots/index.js +45 -53
  198. package/ui/Blocks/Scheduler/components/TimeSlots/styles.js +51 -75
  199. package/ui/Blocks/Scheduler/hooks/useChangeDate.js +32 -83
  200. package/ui/Blocks/Scheduler/index.js +1 -1
  201. package/ui/Blocks/Scheduler/styles.js +21 -32
  202. package/ui/Blocks/Scheduler/types.js +1 -0
  203. package/ui/Blocks/Scheduler/utils/constants.js +8 -6
  204. package/ui/Blocks/Scheduler/utils/convertDateToTime.js +4 -4
  205. package/ui/Blocks/Scheduler/utils/convertIndexToISOString.js +9 -7
  206. package/ui/Blocks/Scheduler/utils/convertMinutesToDuration.js +8 -10
  207. package/ui/Blocks/Scheduler/utils/formatDate.js +7 -8
  208. package/ui/Blocks/Scheduler/utils/generateTimeArray.js +17 -15
  209. package/ui/Blocks/Scheduler/utils/getClosestStep.js +10 -8
  210. package/ui/Blocks/Scheduler/utils/getMinutesFromString.js +5 -5
  211. package/ui/Blocks/Scheduler/utils/getMinutesFromTime.js +5 -49
  212. package/ui/Blocks/Scheduler/utils/isActiveTime.js +9 -8
  213. package/ui/Blocks/Scheduler/utils/isToday.js +5 -3
  214. package/ui/Blocks/SideMenu/MenuItem.js +98 -191
  215. package/ui/Blocks/SideMenu/SideMenu.js +35 -80
  216. package/ui/Blocks/SideMenu/components/Footer.js +61 -95
  217. package/ui/Blocks/SideMenu/components/HamburgerMenu.js +49 -68
  218. package/ui/Blocks/SideMenu/components/SubitemTooltip.js +49 -133
  219. package/ui/Blocks/SideMenu/context/LeftMenuContext.js +17 -67
  220. package/ui/Blocks/SideMenu/context/useLeftMenuContext.js +7 -5
  221. package/ui/Blocks/SideMenu/hooks/useOutsideHover.js +23 -76
  222. package/ui/Blocks/SideMenu/index.js +5 -3
  223. package/ui/Blocks/SideMenu/stories/menuItems.js +106 -100
  224. package/ui/Blocks/SideMenu/styles.js +308 -415
  225. package/ui/Blocks/SideMenu/types.js +1 -0
  226. package/ui/Blocks/SideMenu/utils/constants.js +4 -2
  227. package/ui/Blocks/Stepper/Stepper.js +31 -50
  228. package/ui/Blocks/Stepper/components/StepCircle/index.js +14 -13
  229. package/ui/Blocks/Stepper/components/StepCircle/styles.js +22 -47
  230. package/ui/Blocks/Stepper/components/StepItem/index.js +48 -58
  231. package/ui/Blocks/Stepper/components/StepItem/styles.js +77 -86
  232. package/ui/Blocks/Stepper/hooks/useStepper.js +30 -78
  233. package/ui/Blocks/Stepper/index.js +3 -3
  234. package/ui/Blocks/Stepper/styles.js +24 -39
  235. package/ui/Blocks/Stepper/types.js +1 -0
  236. package/ui/Blocks/Table/Table.js +10 -31
  237. package/ui/Blocks/Table/index.js +1 -1
  238. package/ui/Blocks/Table/types.js +1 -0
  239. package/ui/Blocks/Tabs/TabContent.js +7 -8
  240. package/ui/Blocks/Tabs/Tabs.js +42 -53
  241. package/ui/Blocks/Tabs/hooks/useTabs.js +11 -59
  242. package/ui/Blocks/Tabs/index.js +5 -3
  243. package/ui/Blocks/Tabs/styles.js +94 -109
  244. package/ui/Blocks/Tabs/types.js +1 -0
  245. package/ui/Elements/Alert/Alert.js +71 -95
  246. package/ui/Elements/Alert/index.js +3 -1
  247. package/ui/Elements/Alert/styles.js +81 -126
  248. package/ui/Elements/Alert/types.js +1 -0
  249. package/ui/Elements/AsyncSelect/AsyncSelect.js +31 -157
  250. package/ui/Elements/AsyncSelect/index.js +3 -1
  251. package/ui/Elements/Avatar/Avatar.js +35 -150
  252. package/ui/Elements/Avatar/index.js +4 -3
  253. package/ui/Elements/Avatar/types.js +1 -0
  254. package/ui/Elements/Badge/Badge.js +50 -105
  255. package/ui/Elements/Badge/index.js +3 -1
  256. package/ui/Elements/BarChartSymbol/BarChartSymbol.js +19 -22
  257. package/ui/Elements/BarChartSymbol/index.js +1 -1
  258. package/ui/Elements/BarChartSymbol/styles.js +8 -32
  259. package/ui/Elements/BorderedBox/BorderedBox.js +20 -124
  260. package/ui/Elements/BorderedBox/index.js +3 -1
  261. package/ui/Elements/BorderedBox/types.js +1 -0
  262. package/ui/Elements/Button/Button.js +43 -153
  263. package/ui/Elements/Button/index.js +3 -1
  264. package/ui/Elements/Button/styles.js +224 -95
  265. package/ui/Elements/Button/types.js +1 -0
  266. package/ui/Elements/Card/Card.js +13 -13
  267. package/ui/Elements/Card/index.js +3 -1
  268. package/ui/Elements/Card/styles.js +21 -49
  269. package/ui/Elements/Card/types.js +1 -0
  270. package/ui/Elements/CheckedCircle/index.js +12 -11
  271. package/ui/Elements/CheckedCircle/styles.js +14 -29
  272. package/ui/Elements/DatePicker/DatePicker.js +84 -206
  273. package/ui/Elements/DatePicker/Datetime/DateTime.js +422 -724
  274. package/ui/Elements/DatePicker/Datetime/components/DateRepeater.js +62 -126
  275. package/ui/Elements/DatePicker/Datetime/components/FooterRow.js +10 -24
  276. package/ui/Elements/DatePicker/Datetime/components/FooterRowLabel.js +14 -20
  277. package/ui/Elements/DatePicker/Datetime/components/TimeInput.js +15 -21
  278. package/ui/Elements/DatePicker/Datetime/components/Timepicker.js +160 -254
  279. package/ui/Elements/DatePicker/Datetime/components/ViewNavigation.js +28 -84
  280. package/ui/Elements/DatePicker/Datetime/types.js +13 -11
  281. package/ui/Elements/DatePicker/Datetime/views/DaysView.js +134 -334
  282. package/ui/Elements/DatePicker/Datetime/views/MonthsView.js +71 -265
  283. package/ui/Elements/DatePicker/Datetime/views/YearsView.js +81 -276
  284. package/ui/Elements/DatePicker/index.js +5 -3
  285. package/ui/Elements/DatePicker/styles.js +233 -35
  286. package/ui/Elements/DatePicker/utils/constants.js +27 -33
  287. package/ui/Elements/Dropdown/Dropdown.js +53 -88
  288. package/ui/Elements/Dropdown/index.js +3 -1
  289. package/ui/Elements/Dropdown/types.js +1 -0
  290. package/ui/Elements/DropdownMenu/DropdownMenu.js +32 -134
  291. package/ui/Elements/DropdownMenu/components/DefaultItem.js +30 -56
  292. package/ui/Elements/DropdownMenu/components/MenuItem.js +56 -103
  293. package/ui/Elements/DropdownMenu/components/MenuList.js +13 -14
  294. package/ui/Elements/DropdownMenu/index.js +1 -1
  295. package/ui/Elements/DropdownMenu/types.js +1 -0
  296. package/ui/Elements/DropdownSelect/DropdownSelect.js +126 -205
  297. package/ui/Elements/DropdownSelect/index.js +3 -2
  298. package/ui/Elements/ErrorMessage/ErrorMessage.js +62 -56
  299. package/ui/Elements/ErrorMessage/index.js +3 -1
  300. package/ui/Elements/ErrorMessage/types.js +1 -0
  301. package/ui/Elements/HighlightBox/HighlightBox.js +97 -99
  302. package/ui/Elements/HighlightBox/index.js +3 -1
  303. package/ui/Elements/Icon/BadgeIcon.js +26 -121
  304. package/ui/Elements/Icon/Icon.js +182 -255
  305. package/ui/Elements/Icon/icons/Add.js +31 -91
  306. package/ui/Elements/Icon/icons/AddPhoto.js +32 -84
  307. package/ui/Elements/Icon/icons/Admin.js +24 -79
  308. package/ui/Elements/Icon/icons/ArrowDown.js +16 -68
  309. package/ui/Elements/Icon/icons/ArrowForward.js +10 -64
  310. package/ui/Elements/Icon/icons/ArrowUp.js +16 -68
  311. package/ui/Elements/Icon/icons/ArrowUpRightDownLeft.js +19 -77
  312. package/ui/Elements/Icon/icons/ArrowsLeftRight.js +10 -64
  313. package/ui/Elements/Icon/icons/ArrowsUpDown.js +10 -64
  314. package/ui/Elements/Icon/icons/BarcodeScan.js +11 -65
  315. package/ui/Elements/Icon/icons/Box.js +15 -67
  316. package/ui/Elements/Icon/icons/Calendar.js +37 -89
  317. package/ui/Elements/Icon/icons/Cancel.js +16 -68
  318. package/ui/Elements/Icon/icons/CheckedBox.js +21 -76
  319. package/ui/Elements/Icon/icons/CircleHalfStroke.js +10 -64
  320. package/ui/Elements/Icon/icons/Company.js +80 -137
  321. package/ui/Elements/Icon/icons/Complaint.js +57 -114
  322. package/ui/Elements/Icon/icons/Consolidation.js +11 -65
  323. package/ui/Elements/Icon/icons/Container.js +11 -65
  324. package/ui/Elements/Icon/icons/Dashboard.js +34 -86
  325. package/ui/Elements/Icon/icons/Desktop.js +61 -118
  326. package/ui/Elements/Icon/icons/Dispatch.js +11 -65
  327. package/ui/Elements/Icon/icons/EmptyRack.js +32 -32
  328. package/ui/Elements/Icon/icons/Expeditions.js +60 -112
  329. package/ui/Elements/Icon/icons/Filter.js +15 -67
  330. package/ui/Elements/Icon/icons/FlagCZ.js +53 -108
  331. package/ui/Elements/Icon/icons/FlagEL.js +48 -100
  332. package/ui/Elements/Icon/icons/FlagESP.js +91 -143
  333. package/ui/Elements/Icon/icons/FlagHU.js +25 -77
  334. package/ui/Elements/Icon/icons/FlagITA.js +53 -108
  335. package/ui/Elements/Icon/icons/FlagNL.js +25 -77
  336. package/ui/Elements/Icon/icons/FlagRUS.js +53 -108
  337. package/ui/Elements/Icon/icons/FlagSVK.js +90 -145
  338. package/ui/Elements/Icon/icons/FlagUK.js +18 -73
  339. package/ui/Elements/Icon/icons/FlagUSA.js +104 -168
  340. package/ui/Elements/Icon/icons/Foldable.js +32 -84
  341. package/ui/Elements/Icon/icons/Fragile.js +40 -92
  342. package/ui/Elements/Icon/icons/Gift.js +39 -91
  343. package/ui/Elements/Icon/icons/Group.js +15 -67
  344. package/ui/Elements/Icon/icons/HamburgerMenu.js +39 -91
  345. package/ui/Elements/Icon/icons/HelpCircle1.js +30 -82
  346. package/ui/Elements/Icon/icons/HorizontalLines.js +34 -86
  347. package/ui/Elements/Icon/icons/ImagePlaceholder.js +15 -67
  348. package/ui/Elements/Icon/icons/Income.js +20 -75
  349. package/ui/Elements/Icon/icons/Info.js +31 -83
  350. package/ui/Elements/Icon/icons/Integrations.js +15 -67
  351. package/ui/Elements/Icon/icons/Inventory.js +43 -100
  352. package/ui/Elements/Icon/icons/Inventory2.js +64 -121
  353. package/ui/Elements/Icon/icons/Layout.js +41 -91
  354. package/ui/Elements/Icon/icons/Link.js +18 -73
  355. package/ui/Elements/Icon/icons/Liquid.js +20 -75
  356. package/ui/Elements/Icon/icons/Location.js +11 -65
  357. package/ui/Elements/Icon/icons/Logout1.js +30 -82
  358. package/ui/Elements/Icon/icons/MachinePackingForbidden.js +68 -120
  359. package/ui/Elements/Icon/icons/MakePhoto.js +33 -85
  360. package/ui/Elements/Icon/icons/MenuItems.js +37 -91
  361. package/ui/Elements/Icon/icons/Message.js +36 -96
  362. package/ui/Elements/Icon/icons/MobileCancel.js +20 -75
  363. package/ui/Elements/Icon/icons/MobilePhone.js +45 -97
  364. package/ui/Elements/Icon/icons/Moon.js +10 -64
  365. package/ui/Elements/Icon/icons/Notification2.js +23 -78
  366. package/ui/Elements/Icon/icons/OpenBox.js +35 -87
  367. package/ui/Elements/Icon/icons/Pallet.js +34 -93
  368. package/ui/Elements/Icon/icons/Plus1.js +15 -67
  369. package/ui/Elements/Icon/icons/Print.js +39 -91
  370. package/ui/Elements/Icon/icons/Product.js +15 -67
  371. package/ui/Elements/Icon/icons/Products.js +14 -66
  372. package/ui/Elements/Icon/icons/Profile.js +23 -78
  373. package/ui/Elements/Icon/icons/Puzzle1.js +16 -68
  374. package/ui/Elements/Icon/icons/QRCode.js +17 -69
  375. package/ui/Elements/Icon/icons/Rack.js +63 -115
  376. package/ui/Elements/Icon/icons/Reload.js +11 -65
  377. package/ui/Elements/Icon/icons/Return.js +17 -72
  378. package/ui/Elements/Icon/icons/Rows.js +37 -89
  379. package/ui/Elements/Icon/icons/Settings2.js +31 -91
  380. package/ui/Elements/Icon/icons/ShieldUser.js +7 -61
  381. package/ui/Elements/Icon/icons/ShoppingBag.js +16 -67
  382. package/ui/Elements/Icon/icons/Sort.js +21 -76
  383. package/ui/Elements/Icon/icons/Sun.js +10 -64
  384. package/ui/Elements/Icon/icons/ThreeDots.js +37 -89
  385. package/ui/Elements/Icon/icons/ToastError.js +25 -82
  386. package/ui/Elements/Icon/icons/ToastSuccess.js +25 -82
  387. package/ui/Elements/Icon/icons/Transfer.js +19 -74
  388. package/ui/Elements/Icon/icons/TrashBin.js +31 -83
  389. package/ui/Elements/Icon/icons/Truck.js +71 -127
  390. package/ui/Elements/Icon/icons/TwoBoxes.js +18 -73
  391. package/ui/Elements/Icon/icons/TwoCheckedBoxes.js +27 -27
  392. package/ui/Elements/Icon/icons/TwoUsers.js +40 -91
  393. package/ui/Elements/Icon/icons/UserCowboy.js +7 -61
  394. package/ui/Elements/Icon/icons/Valuable.js +32 -83
  395. package/ui/Elements/Icon/icons/Weight.js +10 -64
  396. package/ui/Elements/Icon/icons/index.js +188 -92
  397. package/ui/Elements/Icon/index.js +96 -4
  398. package/ui/Elements/Icon/types.js +1 -0
  399. package/ui/Elements/Image/Image.js +13 -154
  400. package/ui/Elements/Image/index.js +3 -1
  401. package/ui/Elements/Image/types.js +1 -0
  402. package/ui/Elements/Label/Label.js +22 -61
  403. package/ui/Elements/Label/index.js +4 -3
  404. package/ui/Elements/Line/Line.js +20 -44
  405. package/ui/Elements/Line/index.js +3 -1
  406. package/ui/Elements/Line/types.js +1 -0
  407. package/ui/Elements/Link/Link.js +42 -126
  408. package/ui/Elements/Link/index.js +3 -1
  409. package/ui/Elements/Logo/Logo.js +51 -148
  410. package/ui/Elements/Logo/index.js +3 -1
  411. package/ui/Elements/Logo/types.js +1 -0
  412. package/ui/Elements/Pagination/Pagination.js +61 -85
  413. package/ui/Elements/Pagination/index.js +3 -1
  414. package/ui/Elements/Pagination/styled.js +62 -89
  415. package/ui/Elements/Portal/index.js +20 -68
  416. package/ui/Elements/ProgressBar/ProgressBar.js +15 -19
  417. package/ui/Elements/ProgressBar/index.js +3 -1
  418. package/ui/Elements/ProgressBar/styles.js +69 -114
  419. package/ui/Elements/Select/Select.js +94 -442
  420. package/ui/Elements/Select/components/ChevronOption.js +29 -87
  421. package/ui/Elements/Select/components/ConnectedMenu.js +24 -85
  422. package/ui/Elements/Select/components/CountMultiValue.js +40 -132
  423. package/ui/Elements/Select/components/CustomInput.js +11 -61
  424. package/ui/Elements/Select/components/DropdownIndicator.js +28 -94
  425. package/ui/Elements/Select/components/IconValueContainer.js +27 -139
  426. package/ui/Elements/Select/components/SelectAll.js +87 -164
  427. package/ui/Elements/Select/components/SelectedIndicator.js +7 -23
  428. package/ui/Elements/Select/components/SimplifiedOption.js +15 -23
  429. package/ui/Elements/Select/index.js +3 -1
  430. package/ui/Elements/Select/styles.js +16 -44
  431. package/ui/Elements/Select/themes/index.js +37 -44
  432. package/ui/Elements/Select/themes/selectStyles.js +194 -302
  433. package/ui/Elements/Select/types.js +1 -0
  434. package/ui/Elements/SimpleLink/SimpleLink.js +35 -64
  435. package/ui/Elements/SimpleLink/index.js +5 -3
  436. package/ui/Elements/SingleSelect/SingleSelect.js +145 -509
  437. package/ui/Elements/SingleSelect/index.js +3 -1
  438. package/ui/Elements/SpaceAround/SpaceAround.js +31 -166
  439. package/ui/Elements/SpaceAround/index.js +3 -1
  440. package/ui/Elements/SpaceAround/types.js +1 -0
  441. package/ui/Elements/Spinner/Spinner.js +35 -36
  442. package/ui/Elements/Spinner/index.js +3 -1
  443. package/ui/Elements/Spinner/styles.js +35 -65
  444. package/ui/Elements/Spinner/types.js +1 -0
  445. package/ui/Elements/Table/Table.js +44 -77
  446. package/ui/Elements/Table/index.js +1 -1
  447. package/ui/Elements/Tag/Tag.js +47 -82
  448. package/ui/Elements/Tag/index.js +4 -2
  449. package/ui/Elements/Tag/palettes.js +50 -45
  450. package/ui/Elements/Tag/stories/components/predefinedTags.js +17 -18
  451. package/ui/Elements/Tag/types.js +1 -0
  452. package/ui/Elements/Text/Text.js +9 -75
  453. package/ui/Elements/Text/index.js +1 -1
  454. package/ui/Elements/Text/types.js +1 -0
  455. package/ui/Elements/Toast/Toast.js +33 -55
  456. package/ui/Elements/Toast/constants.js +17 -15
  457. package/ui/Elements/Toast/index.js +3 -1
  458. package/ui/Elements/Toast/styles.js +74 -104
  459. package/ui/Elements/Toggle/Toggle.js +120 -258
  460. package/ui/Elements/Toggle/index.js +3 -1
  461. package/ui/Elements/Toggle/types.js +1 -0
  462. package/ui/Elements/Tooltip/Tooltip.js +49 -119
  463. package/ui/Elements/Tooltip/index.js +3 -1
  464. package/ui/Elements/Typography/Typography.js +73 -158
  465. package/ui/Elements/Typography/index.js +4 -3
  466. package/ui/Forms/Checkbox/Checkbox.js +39 -40
  467. package/ui/Forms/Checkbox/index.js +5 -3
  468. package/ui/Forms/Checkbox/styles.js +92 -74
  469. package/ui/Forms/Checkbox/types.js +1 -0
  470. package/ui/Forms/Input/Input.js +125 -258
  471. package/ui/Forms/Input/index.js +3 -1
  472. package/ui/Forms/Input/styles.js +217 -201
  473. package/ui/Forms/Input/types.js +1 -0
  474. package/ui/Forms/RadioButton/RadioButton.js +22 -101
  475. package/ui/Forms/RadioButton/index.js +3 -1
  476. package/ui/Forms/RadioButton/styles.js +85 -75
  477. package/ui/Forms/RadioButton/types.js +1 -0
  478. package/ui/Forms/TextArea/TextArea.js +33 -153
  479. package/ui/Forms/TextArea/index.js +3 -1
  480. package/ui/Forms/TextArea/styles.js +75 -99
  481. package/ui/System/Fonts/index.js +47 -10
  482. package/ui/ThemeProvider/ThemeProvider.js +15 -18
  483. package/ui/ThemeProvider/index.js +5 -4
  484. package/ui/ThemeProvider/themes/default.js +185 -193
  485. package/ui/ThemeProvider/themes/index.js +10 -9
  486. package/ui/ThemeProvider/themes/light.js +7 -8
  487. package/ui/ThemeProvider/themes/mailwise.js +229 -236
  488. package/ui/ThemeProvider/types.js +1 -0
  489. package/ui/_virtual/_rolldown/runtime.js +13 -0
  490. package/ui/hooks/useToggleAndClose.js +15 -62
  491. package/ui/index.js +179 -94
  492. package/ui/utils/CheckDeviceWidth/checkDeviceWidth.js +14 -63
  493. package/ui/utils/CreateRgba/createRgba.js +11 -16
  494. package/ui/utils/CreateRgba/types.js +1 -0
  495. package/ui/utils/KeyPress/KeyPress.js +15 -22
  496. package/ui/utils/KeyPress/index.js +4 -2
  497. package/ui/utils/KeyPress/types.js +1 -0
  498. package/ui/utils/LinguiContainer/index.js +7 -6
  499. package/ui/utils/index.js +7 -5
  500. package/ui/utils/translations.js +334 -333
  501. package/ui/Blocks/CommonGrid/store/store.d.js +0 -0
  502. package/ui/Blocks/CornerDialog/index.d.js +0 -2
  503. package/ui/Blocks/ImageList/index.d.js +0 -2
  504. package/ui/Blocks/LightBox/index.d.js +0 -3
  505. package/ui/Blocks/Modal/index.d.js +0 -3
  506. package/ui/Blocks/Tabs/index.d.js +0 -3
  507. package/ui/Elements/Alert/index.d.js +0 -3
  508. package/ui/Elements/Avatar/index.d.js +0 -2
  509. package/ui/Elements/Badge/index.d.js +0 -2
  510. package/ui/Elements/BorderedBox/index.d.js +0 -3
  511. package/ui/Elements/Button/Button.d.js +0 -2
  512. package/ui/Elements/Button/index.d.js +0 -3
  513. package/ui/Elements/Card/index.d.js +0 -2
  514. package/ui/Elements/ErrorMessage/index.d.js +0 -3
  515. package/ui/Elements/Line/index.d.js +0 -3
  516. package/ui/Elements/Logo/default.d.js +0 -0
  517. package/ui/Elements/Logo/index.d.js +0 -2
  518. package/ui/Elements/Pagination/index.d.js +0 -3
  519. package/ui/Elements/Spinner/index.d.js +0 -2
  520. package/ui/Elements/Tag/index.d.js +0 -3
  521. package/ui/Elements/Text/index.d.js +0 -2
  522. package/ui/Elements/Toast/index.d.js +0 -3
  523. package/ui/Elements/Toggle/index.d.js +0 -2
  524. package/ui/Elements/Tooltip/index.d.js +0 -2
  525. package/ui/Elements/Typography/index.d.js +0 -2
  526. package/ui/Forms/Checkbox/index.d.js +0 -2
  527. package/ui/Forms/Input/index.d.js +0 -3
  528. package/ui/Forms/RadioButton/index.d.js +0 -2
  529. package/ui/System/Fonts/font.d.js +0 -0
  530. package/ui/ThemeProvider/ThemeProvider.d.js +0 -2
  531. package/ui/ThemeProvider/index.d.js +0 -3
  532. package/ui/utils/index.d.js +0 -3
@@ -1,116 +1,78 @@
1
- function _type_of(obj) {
2
- "@swc/helpers - typeof";
3
- return obj && typeof Symbol !== "undefined" && obj.constructor === Symbol ? "symbol" : typeof obj;
4
- }
5
- import ActionsFilter from "../components/Filters/ActionsFilter";
6
- import BooleanSelect from "../components/Filters/BooleanSelect";
7
- import DatePickerRange from "../components/Filters/DatePickerRange";
8
- import GridSelect from "../components/Filters/GridSelect";
9
- import NumberRange from "../components/Filters/NumberRange";
10
- import TextRange from "../components/Filters/TextRange";
11
- var isDefined = function isDefined(val) {
12
- return typeof val !== "undefined";
1
+ import ActionsFilter_default from "../components/Filters/ActionsFilter/index.js";
2
+ import GridSelect_default from "../components/Filters/GridSelect/index.js";
3
+ import BooleanSelect_default from "../components/Filters/BooleanSelect/index.js";
4
+ import DatePickerRange_default from "../components/Filters/DatePickerRange/index.js";
5
+ import NumberRange_default from "../components/Filters/NumberRange/index.js";
6
+ import TextRange_default from "../components/Filters/TextRange/index.js";
7
+ //#region packages/ui/Blocks/CommonGrid/utils/index.ts
8
+ const isDefined = (val) => typeof val !== "undefined";
9
+ const getCellSizeProps = (column, columnWidth) => {
10
+ if (!column) return {};
11
+ const { fixedSize, flexGrow, flexShrink, sticky } = column;
12
+ return {
13
+ flexBasis: columnWidth,
14
+ flexGrow: fixedSize ? 0 : isDefined(flexGrow) ? flexGrow : 1,
15
+ flexShrink: isDefined(flexShrink) ? flexShrink : 1,
16
+ maxWidth: sticky ? columnWidth : "auto"
17
+ };
13
18
  };
14
- var getCellSizeProps = function getCellSizeProps(column, columnWidth) {
15
- if (!column) return {};
16
- var fixedSize = column.fixedSize, flexGrow = column.flexGrow, flexShrink = column.flexShrink, sticky = column.sticky;
17
- return {
18
- flexBasis: columnWidth,
19
- flexGrow: fixedSize ? 0 : isDefined(flexGrow) ? flexGrow : 1,
20
- flexShrink: isDefined(flexShrink) ? flexShrink : 1,
21
- maxWidth: sticky ? columnWidth : "auto"
22
- };
19
+ const getSortName = (column) => {
20
+ return column.systemName || column.name;
23
21
  };
24
- var getSortName = function getSortName(column) {
25
- return column.systemName || column.name;
22
+ const getFilterName = (column) => {
23
+ return column.systemFilter || column.systemName || column.name;
26
24
  };
27
- var getFilterName = function getFilterName(column) {
28
- return column.systemFilter || column.systemName || column.name;
25
+ const isColumnOn = (column, columnConfig) => {
26
+ if (column.alwaysOn) return true;
27
+ if (column.alwaysOff) return false;
28
+ const isHidden = columnConfig?.[column.name]?.isHidden;
29
+ if (typeof isHidden === "boolean") return !isHidden;
30
+ if (!!column.defaultHidden && !!columnConfig?.[column.name]) return true;
31
+ else return !column.defaultHidden;
29
32
  };
30
- var isColumnOn = function isColumnOn(column, columnConfig) {
31
- var _columnConfig_column_name;
32
- if (column.alwaysOn) return true;
33
- if (column.alwaysOff) return false;
34
- var isHidden = columnConfig === null || columnConfig === void 0 ? void 0 : (_columnConfig_column_name = columnConfig[column.name]) === null || _columnConfig_column_name === void 0 ? void 0 : _columnConfig_column_name.isHidden;
35
- if (typeof isHidden === "boolean") return !isHidden;
36
- if (!!column.defaultHidden && !!(columnConfig === null || columnConfig === void 0 ? void 0 : columnConfig[column.name])) return true;
37
- else return !column.defaultHidden;
33
+ const calculatePaginator = (page, rowsPerPage) => ({
34
+ offset: rowsPerPage ? rowsPerPage * (page - 1) : rowsPerPage,
35
+ limit: rowsPerPage
36
+ });
37
+ const createFilterType = (columnDefinition) => {
38
+ if (columnDefinition.filterOptions || columnDefinition.asyncLoadKey) return "options";
39
+ else return columnDefinition.filteringType || "text";
38
40
  };
39
- var calculatePaginator = function calculatePaginator(page, rowsPerPage) {
40
- return {
41
- offset: rowsPerPage ? rowsPerPage * (page - 1) : rowsPerPage,
42
- limit: rowsPerPage
43
- };
41
+ const getGroups = (columns) => columns.map((column, key) => {
42
+ const previousGroup = key > 0 && columns[key - 1].group;
43
+ return {
44
+ name: column.group,
45
+ start: !!(column.group && (!previousGroup || previousGroup && previousGroup !== column.group)),
46
+ end: !!(column.group && (!columns[key + 1] || columns[key + 1].group !== column.group))
47
+ };
48
+ });
49
+ const getGroupClassNames = (group) => `${group?.start ? "group-start" : ""} ${group?.end ? "group-end" : ""}`;
50
+ const getStickyCollClassNames = (sticky, stickTo) => !sticky ? "" : `${stickTo ? ` sticky sticky-${stickTo}` : " sticky sticky-left"}`;
51
+ const getFilters = (optimizeFilters) => {
52
+ const filters = {
53
+ number: { CellComponent: NumberRange_default },
54
+ text: { CellComponent: TextRange_default },
55
+ date: { CellComponent: DatePickerRange_default },
56
+ flag: { CellComponent: BooleanSelect_default },
57
+ options: { CellComponent: GridSelect_default },
58
+ actions: { CellComponent: ActionsFilter_default }
59
+ };
60
+ if (optimizeFilters) filters.text.defaultExtraProps = { defaultComparator: "eq" };
61
+ return filters;
44
62
  };
45
- var createFilterType = function createFilterType(columnDefinition) {
46
- if (columnDefinition.filterOptions || columnDefinition.asyncLoadKey) return "options";
47
- else return columnDefinition.filteringType || "text";
63
+ /** Returns true when a filter value should be counted / applied */
64
+ const isFilterActive = (value) => {
65
+ if (value == null) return false;
66
+ if (Array.isArray(value)) return !!value.length;
67
+ if (typeof value === "object") return value.value != null && value.value !== "";
68
+ return value !== "";
48
69
  };
49
- var getGroups = function getGroups(columns) {
50
- return columns.map(function(column, key) {
51
- var previousGroup = key > 0 && columns[key - 1].group;
52
- return {
53
- name: column.group,
54
- start: !!(column.group && (!previousGroup || previousGroup && previousGroup !== column.group)),
55
- end: !!(column.group && (!columns[key + 1] || columns[key + 1].group !== column.group))
56
- };
57
- });
58
- };
59
- var getGroupClassNames = function getGroupClassNames(group) {
60
- return "".concat((group === null || group === void 0 ? void 0 : group.start) ? "group-start" : "", " ").concat((group === null || group === void 0 ? void 0 : group.end) ? "group-end" : "");
61
- };
62
- var getStickyCollClassNames = function getStickyCollClassNames(sticky, stickTo) {
63
- return !sticky ? "" : "".concat(stickTo ? " sticky sticky-".concat(stickTo) : " sticky sticky-left");
64
- };
65
- var getFilters = function getFilters(optimizeFilters) {
66
- var filters = {
67
- number: {
68
- CellComponent: NumberRange
69
- },
70
- text: {
71
- CellComponent: TextRange
72
- },
73
- date: {
74
- CellComponent: DatePickerRange
75
- },
76
- flag: {
77
- CellComponent: BooleanSelect
78
- },
79
- options: {
80
- CellComponent: GridSelect
81
- },
82
- actions: {
83
- CellComponent: ActionsFilter
84
- }
85
- };
86
- if (optimizeFilters) {
87
- filters.text.defaultExtraProps = {
88
- defaultComparator: "eq"
89
- };
90
- }
91
- return filters;
92
- };
93
- var isFilterActive = function isFilterActive(value) {
94
- if (value == null) return false;
95
- if (Array.isArray(value)) return !!value.length;
96
- if ((typeof value === "undefined" ? "undefined" : _type_of(value)) === "object") return value.value != null && value.value !== "";
97
- return value !== "";
98
- };
99
- var checksColumnsOrder = function checksColumnsOrder(colsOrder, columnsDefinitions) {
100
- var stickyRightColls = columnsDefinitions.filter(function(col) {
101
- return col.sticky === true && col.stickTo === "right";
102
- });
103
- var stickyLeftColls = columnsDefinitions.filter(function(col) {
104
- return col.sticky === true && col.stickTo !== "right";
105
- });
106
- if (stickyLeftColls.length > 1 || stickyRightColls.length > 1) {
107
- console.error("Grid can have only sticky column on each side.");
108
- }
109
- if (stickyLeftColls.length && colsOrder.indexOf(stickyLeftColls[0].name) !== 0 && stickyLeftColls[0].name !== "actions-cell-cg") {
110
- console.error("The left sticky column should be the first one in a row");
111
- }
112
- if (stickyRightColls.length && colsOrder.indexOf(stickyRightColls[0].name) !== colsOrder.length - 1 && stickyRightColls[0].name !== "actions-cell-cg") {
113
- console.error("The Right sticky column should be the last one in a row");
114
- }
70
+ const checksColumnsOrder = (colsOrder, columnsDefinitions) => {
71
+ const stickyRightColls = columnsDefinitions.filter((col) => col.sticky === true && col.stickTo === "right");
72
+ const stickyLeftColls = columnsDefinitions.filter((col) => col.sticky === true && col.stickTo !== "right");
73
+ if (stickyLeftColls.length > 1 || stickyRightColls.length > 1) console.error("Grid can have only sticky column on each side.");
74
+ if (stickyLeftColls.length && colsOrder.indexOf(stickyLeftColls[0].name) !== 0 && stickyLeftColls[0].name !== "actions-cell-cg") console.error("The left sticky column should be the first one in a row");
75
+ if (stickyRightColls.length && colsOrder.indexOf(stickyRightColls[0].name) !== colsOrder.length - 1 && stickyRightColls[0].name !== "actions-cell-cg") console.error("The Right sticky column should be the last one in a row");
115
76
  };
77
+ //#endregion
116
78
  export { calculatePaginator, checksColumnsOrder, createFilterType, getCellSizeProps, getFilterName, getFilters, getGroupClassNames, getGroups, getSortName, getStickyCollClassNames, isColumnOn, isFilterActive };
@@ -1,97 +1,43 @@
1
- function _array_like_to_array(arr, len) {
2
- if (len == null || len > arr.length) len = arr.length;
3
- for(var i = 0, arr2 = new Array(len); i < len; i++)arr2[i] = arr[i];
4
- return arr2;
5
- }
6
- function _array_with_holes(arr) {
7
- if (Array.isArray(arr)) return arr;
8
- }
9
- function _iterable_to_array_limit(arr, i) {
10
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
11
- if (_i == null) return;
12
- var _arr = [];
13
- var _n = true;
14
- var _d = false;
15
- var _s, _e;
16
- try {
17
- for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
18
- _arr.push(_s.value);
19
- if (i && _arr.length === i) break;
20
- }
21
- } catch (err) {
22
- _d = true;
23
- _e = err;
24
- } finally{
25
- try {
26
- if (!_n && _i["return"] != null) _i["return"]();
27
- } finally{
28
- if (_d) throw _e;
29
- }
30
- }
31
- return _arr;
32
- }
33
- function _non_iterable_rest() {
34
- throw new TypeError("Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
35
- }
36
- function _sliced_to_array(arr, i) {
37
- return _array_with_holes(arr) || _iterable_to_array_limit(arr, i) || _unsupported_iterable_to_array(arr, i) || _non_iterable_rest();
38
- }
39
- function _unsupported_iterable_to_array(o, minLen) {
40
- if (!o) return;
41
- if (typeof o === "string") return _array_like_to_array(o, minLen);
42
- var n = Object.prototype.toString.call(o).slice(8, -1);
43
- if (n === "Object" && o.constructor) n = o.constructor.name;
44
- if (n === "Map" || n === "Set") return Array.from(n);
45
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _array_like_to_array(o, minLen);
46
- }
47
- import { jsx, jsxs } from "react/jsx-runtime";
1
+ import Icon from "../../Elements/Icon/Icon.js";
2
+ import { Portal } from "../../Elements/Portal/index.js";
3
+ import { CloseBtn, Container, Header, Status, StatusText, Wrapper } from "./styles.js";
4
+ import { statusToColors, statusToIcon } from "./utils.js";
48
5
  import { useEffect, useState } from "react";
49
- import Icon from "../../Elements/Icon/Icon";
50
- import { Portal } from "../../Elements/Portal";
51
- import { Container, Header, Status, StatusText, Wrapper, CloseBtn } from "./styles";
52
- import { statusToColors, statusToIcon } from "./utils";
53
- var CornerDialog = function CornerDialog(param) {
54
- var title = param.title, children = param.children, onClose = param.onClose, statusToTitle = param.statusToTitle, _param_isOpen = param.isOpen, isOpen = _param_isOpen === void 0 ? true : _param_isOpen, _intent = param.intent;
55
- var _useState = _sliced_to_array(useState(false), 2), isMounted = _useState[0], setIsMounted = _useState[1];
56
- useEffect(function() {
57
- setIsMounted(true);
58
- }, []);
59
- var intent = _intent !== null && _intent !== void 0 ? _intent : "info";
60
- var _statusToColors_intent = statusToColors[intent], fontColor = _statusToColors_intent.fontColor, backgroundColor = _statusToColors_intent.backgroundColor, fill = _statusToColors_intent.fill;
61
- if (!isOpen) return null;
62
- return /* @__PURE__ */ jsx(Portal, {
63
- children: /* @__PURE__ */ jsxs(Container, {
64
- $mounted: isMounted,
65
- children: [
66
- /* @__PURE__ */ jsxs(Status, {
67
- background: backgroundColor,
68
- children: [
69
- /* @__PURE__ */ jsx(Icon, {
70
- icon: statusToIcon[intent],
71
- fill: fill
72
- }),
73
- /* @__PURE__ */ jsx(StatusText, {
74
- fontColor: fontColor,
75
- children: statusToTitle[intent]()
76
- })
77
- ]
78
- }),
79
- /* @__PURE__ */ jsx(Header, {
80
- children: title
81
- }),
82
- /* @__PURE__ */ jsx(CloseBtn, {
83
- onClick: onClose,
84
- "data-testid": "corner-dialog-close-btn",
85
- children: /* @__PURE__ */ jsx(Icon, {
86
- icon: "close",
87
- size: "25px"
88
- })
89
- }),
90
- /* @__PURE__ */ jsx(Wrapper, {
91
- children: children
92
- })
93
- ]
94
- })
95
- });
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ //#region packages/ui/Blocks/CornerDialog/CornerDialog.tsx
8
+ const CornerDialog = ({ title, children, onClose, statusToTitle, isOpen = true, intent: _intent }) => {
9
+ const [isMounted, setIsMounted] = useState(false);
10
+ useEffect(() => {
11
+ setIsMounted(true);
12
+ }, []);
13
+ const intent = _intent ?? "info";
14
+ const { fontColor, backgroundColor, fill } = statusToColors[intent];
15
+ if (!isOpen) return null;
16
+ return /* @__PURE__ */ jsx(Portal, { children: /* @__PURE__ */ jsxs(Container, {
17
+ $mounted: isMounted,
18
+ children: [
19
+ /* @__PURE__ */ jsxs(Status, {
20
+ background: backgroundColor,
21
+ children: [/* @__PURE__ */ jsx(Icon, {
22
+ icon: statusToIcon[intent],
23
+ fill
24
+ }), /* @__PURE__ */ jsx(StatusText, {
25
+ fontColor,
26
+ children: statusToTitle[intent]()
27
+ })]
28
+ }),
29
+ /* @__PURE__ */ jsx(Header, { children: title }),
30
+ /* @__PURE__ */ jsx(CloseBtn, {
31
+ onClick: onClose,
32
+ "data-testid": "corner-dialog-close-btn",
33
+ children: /* @__PURE__ */ jsx(Icon, {
34
+ icon: "close",
35
+ size: "25px"
36
+ })
37
+ }),
38
+ /* @__PURE__ */ jsx(Wrapper, { children })
39
+ ]
40
+ }) });
96
41
  };
42
+ //#endregion
97
43
  export { CornerDialog };
@@ -1,3 +1,5 @@
1
- import { CornerDialog } from "./CornerDialog";
1
+ import { CornerDialog } from "./CornerDialog.js";
2
+ //#region packages/ui/Blocks/CornerDialog/index.ts
2
3
  var CornerDialog_default = CornerDialog;
4
+ //#endregion
3
5
  export { CornerDialog_default as default };
@@ -1,84 +1,57 @@
1
- function _tagged_template_literal(strings, raw) {
2
- if (!raw) {
3
- raw = strings.slice(0);
4
- }
5
- return Object.freeze(Object.defineProperties(strings, {
6
- raw: {
7
- value: Object.freeze(raw)
8
- }
9
- }));
10
- }
11
- function _templateObject() {
12
- var data = _tagged_template_literal([
13
- "\n position: fixed;\n z-index: 10;\n bottom: 3rem;\n right: 0.6rem;\n background: white;\n border-radius: 12px;\n box-shadow: cornerDialogShadow;\n width: 95vw;\n max-width: 400px;\n padding: 50px 30px 30px;\n color: typoPrimary;\n transition: opacity 225ms linear;\n opacity: ",
14
- ";\n @media (min-width: 768px) {\n right: 3rem;\n width: 400px;\n }\n"
15
- ]);
16
- _templateObject = function _templateObject() {
17
- return data;
18
- };
19
- return data;
20
- }
21
- function _templateObject1() {
22
- var data = _tagged_template_literal([
23
- "\n margin-bottom: 15px;\n color: typoPrimary;\n font-size: 18px;\n font-weight: bold;\n display: flex;\n align-items: center;\n"
24
- ]);
25
- _templateObject1 = function _templateObject() {
26
- return data;
27
- };
28
- return data;
29
- }
30
- function _templateObject2() {
31
- var data = _tagged_template_literal([
32
- "\n font-size: 14px;\n font-weight: 400;\n"
33
- ]);
34
- _templateObject2 = function _templateObject() {
35
- return data;
36
- };
37
- return data;
38
- }
39
- function _templateObject3() {
40
- var data = _tagged_template_literal([
41
- "\n position: absolute;\n left: 0;\n top: 0;\n padding: 6px 10px;\n text-transform: uppercase;\n border-radius: 12px 0 12px 0;\n background-color: ",
42
- ";\n"
43
- ]);
44
- _templateObject3 = function _templateObject() {
45
- return data;
46
- };
47
- return data;
48
- }
49
- function _templateObject4() {
50
- var data = _tagged_template_literal([
51
- "\n cursor: pointer;\n position: absolute;\n top: 12px;\n right: 12px;\n"
52
- ]);
53
- _templateObject4 = function _templateObject() {
54
- return data;
55
- };
56
- return data;
57
- }
58
- function _templateObject5() {
59
- var data = _tagged_template_literal([
60
- "\n display: inline-block;\n margin-left: 6px;\n font-size: 14px;\n font-weight: 700;\n color: ",
61
- ";\n"
62
- ]);
63
- _templateObject5 = function _templateObject() {
64
- return data;
65
- };
66
- return data;
67
- }
68
- import styled, { th } from "@xstyled/styled-components";
69
- var Container = styled.div(_templateObject(), function(param) {
70
- var $mounted = param.$mounted;
71
- return $mounted ? 1 : 0;
72
- });
73
- var Header = styled.div(_templateObject1());
74
- var Wrapper = styled.div(_templateObject2());
75
- var Status = styled.div(_templateObject3(), function(param) {
76
- var background = param.background;
77
- return th.color(background);
78
- });
79
- var CloseBtn = styled.div(_templateObject4());
80
- var StatusText = styled.span(_templateObject5(), function(param) {
81
- var fontColor = param.fontColor;
82
- return th.color(fontColor);
83
- });
1
+ import styled$1, { th } from "@xstyled/styled-components";
2
+ //#region packages/ui/Blocks/CornerDialog/styles.ts
3
+ const Container = styled$1.div`
4
+ position: fixed;
5
+ z-index: 10;
6
+ bottom: 3rem;
7
+ right: 0.6rem;
8
+ background: white;
9
+ border-radius: 12px;
10
+ box-shadow: cornerDialogShadow;
11
+ width: 95vw;
12
+ max-width: 400px;
13
+ padding: 50px 30px 30px;
14
+ color: typoPrimary;
15
+ transition: opacity 225ms linear;
16
+ opacity: ${({ $mounted }) => $mounted ? 1 : 0};
17
+ @media (min-width: 768px) {
18
+ right: 3rem;
19
+ width: 400px;
20
+ }
21
+ `;
22
+ const Header = styled$1.div`
23
+ margin-bottom: 15px;
24
+ color: typoPrimary;
25
+ font-size: 18px;
26
+ font-weight: bold;
27
+ display: flex;
28
+ align-items: center;
29
+ `;
30
+ const Wrapper = styled$1.div`
31
+ font-size: 14px;
32
+ font-weight: 400;
33
+ `;
34
+ const Status = styled$1.div`
35
+ position: absolute;
36
+ left: 0;
37
+ top: 0;
38
+ padding: 6px 10px;
39
+ text-transform: uppercase;
40
+ border-radius: 12px 0 12px 0;
41
+ background-color: ${({ background }) => th.color(background)};
42
+ `;
43
+ const CloseBtn = styled$1.div`
44
+ cursor: pointer;
45
+ position: absolute;
46
+ top: 12px;
47
+ right: 12px;
48
+ `;
49
+ const StatusText = styled$1.span`
50
+ display: inline-block;
51
+ margin-left: 6px;
52
+ font-size: 14px;
53
+ font-weight: 700;
54
+ color: ${({ fontColor }) => th.color(fontColor)};
55
+ `;
56
+ //#endregion
84
57
  export { CloseBtn, Container, Header, Status, StatusText, Wrapper };
@@ -0,0 +1 @@
1
+ export {};
@@ -1,29 +1,31 @@
1
- var statusToColors = {
2
- info: {
3
- fontColor: "gray1",
4
- backgroundColor: "lightGray7",
5
- fill: "gray1"
6
- },
7
- success: {
8
- fontColor: "white",
9
- backgroundColor: "green",
10
- fill: "white"
11
- },
12
- error: {
13
- fontColor: "white",
14
- backgroundColor: "red1",
15
- fill: "white"
16
- },
17
- warning: {
18
- fontColor: "blue2",
19
- backgroundColor: "yellow1",
20
- fill: "blue2"
21
- }
1
+ //#region packages/ui/Blocks/CornerDialog/utils.ts
2
+ const statusToColors = {
3
+ info: {
4
+ fontColor: "gray1",
5
+ backgroundColor: "lightGray7",
6
+ fill: "gray1"
7
+ },
8
+ success: {
9
+ fontColor: "white",
10
+ backgroundColor: "green",
11
+ fill: "white"
12
+ },
13
+ error: {
14
+ fontColor: "white",
15
+ backgroundColor: "red1",
16
+ fill: "white"
17
+ },
18
+ warning: {
19
+ fontColor: "blue2",
20
+ backgroundColor: "yellow1",
21
+ fill: "blue2"
22
+ }
22
23
  };
23
- var statusToIcon = {
24
- info: "info",
25
- success: "circleCheck",
26
- error: "circleX",
27
- warning: "circleTriangle"
24
+ const statusToIcon = {
25
+ info: "info",
26
+ success: "circleCheck",
27
+ error: "circleX",
28
+ warning: "circleTriangle"
28
29
  };
30
+ //#endregion
29
31
  export { statusToColors, statusToIcon };
@@ -1,15 +1,16 @@
1
+ import { MenuItemsListItem } from "../../styles.js";
1
2
  import { jsx } from "react/jsx-runtime";
2
3
  import { Link } from "react-router-dom";
3
- import { MenuItemsListItem } from "../../styles";
4
- var MenuItem = function MenuItem(param) {
5
- var item = param.item;
6
- return /* @__PURE__ */ jsx(MenuItemsListItem, {
7
- onClick: item.onClick,
8
- pointer: !!item.onClick,
9
- children: item.link ? /* @__PURE__ */ jsx(Link, {
10
- to: item.link,
11
- children: item.title
12
- }) : item.title
13
- });
4
+ //#region packages/ui/Blocks/Header/components/MenuItems/components/MenuItem/index.tsx
5
+ const MenuItem = ({ item }) => {
6
+ return /* @__PURE__ */ jsx(MenuItemsListItem, {
7
+ onClick: item.onClick,
8
+ pointer: !!item.onClick,
9
+ children: item.link ? /* @__PURE__ */ jsx(Link, {
10
+ to: item.link,
11
+ children: item.title
12
+ }) : item.title
13
+ });
14
14
  };
15
+ //#endregion
15
16
  export { MenuItem };
@@ -1,14 +1,9 @@
1
+ import { MenuItemsList } from "./styles.js";
2
+ import { MenuItem } from "./components/MenuItem/index.js";
1
3
  import { jsx } from "react/jsx-runtime";
2
- import { MenuItem } from "./components/MenuItem";
3
- import { MenuItemsList } from "./styles";
4
- var MenuItems = function MenuItems(param) {
5
- var items = param.items;
6
- return /* @__PURE__ */ jsx(MenuItemsList, {
7
- children: items === null || items === void 0 ? void 0 : items.map(function(item, key) {
8
- return /* @__PURE__ */ jsx(MenuItem, {
9
- item: item
10
- }, key);
11
- })
12
- });
4
+ //#region packages/ui/Blocks/Header/components/MenuItems/index.tsx
5
+ const MenuItems = ({ items }) => {
6
+ return /* @__PURE__ */ jsx(MenuItemsList, { children: items?.map((item, key) => /* @__PURE__ */ jsx(MenuItem, { item }, key)) });
13
7
  };
8
+ //#endregion
14
9
  export { MenuItems };