@mailstep/design-system 0.4.21 → 0.5.0-beta.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (285) hide show
  1. package/package.json +33 -2
  2. package/ui/Blocks/CommonGrid/CommonGrid.d.ts +3 -0
  3. package/ui/Blocks/CommonGrid/CommonGrid.js +106 -0
  4. package/ui/Blocks/CommonGrid/CommonGridContainer.d.ts +3 -0
  5. package/ui/Blocks/CommonGrid/CommonGridContainer.js +67 -0
  6. package/ui/Blocks/CommonGrid/CommonGridContext.d.ts +9 -0
  7. package/ui/Blocks/CommonGrid/CommonGridContext.js +32 -0
  8. package/ui/Blocks/CommonGrid/HoC/withReduxActions.d.ts +2 -0
  9. package/ui/Blocks/CommonGrid/HoC/withReduxActions.js +36 -0
  10. package/ui/Blocks/CommonGrid/StandardButtons.d.ts +6 -0
  11. package/ui/Blocks/CommonGrid/StandardButtons.js +50 -0
  12. package/ui/Blocks/CommonGrid/components/ActionHead/ActionHead.d.ts +11 -0
  13. package/ui/Blocks/CommonGrid/components/ActionHead/ActionHead.js +53 -0
  14. package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownMenu.d.ts +11 -0
  15. package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownMenu.js +18 -0
  16. package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownSelect.d.ts +12 -0
  17. package/ui/Blocks/CommonGrid/components/ActionHead/components/ActionDropdownSelect.js +45 -0
  18. package/ui/Blocks/CommonGrid/components/ActionHead/index.d.ts +2 -0
  19. package/ui/Blocks/CommonGrid/components/ActionHead/index.js +2 -0
  20. package/ui/Blocks/CommonGrid/components/BooleanSelect/BooleanSelect.d.ts +6 -0
  21. package/ui/Blocks/CommonGrid/components/BooleanSelect/BooleanSelect.js +35 -0
  22. package/ui/Blocks/CommonGrid/components/BooleanSelect/index.d.ts +2 -0
  23. package/ui/Blocks/CommonGrid/components/BooleanSelect/index.js +2 -0
  24. package/ui/Blocks/CommonGrid/components/ButtonMore/ButtonMore.d.ts +13 -0
  25. package/ui/Blocks/CommonGrid/components/ButtonMore/ButtonMore.js +32 -0
  26. package/ui/Blocks/CommonGrid/components/ButtonMore/index.d.ts +2 -0
  27. package/ui/Blocks/CommonGrid/components/ButtonMore/index.js +2 -0
  28. package/ui/Blocks/CommonGrid/components/ColumnFilterCell.d.ts +11 -0
  29. package/ui/Blocks/CommonGrid/components/ColumnFilterCell.js +41 -0
  30. package/ui/Blocks/CommonGrid/components/ColumnTitle/ColumnTitle.d.ts +5 -0
  31. package/ui/Blocks/CommonGrid/components/ColumnTitle/ColumnTitle.js +58 -0
  32. package/ui/Blocks/CommonGrid/components/ColumnTitle/index.d.ts +2 -0
  33. package/ui/Blocks/CommonGrid/components/ColumnTitle/index.js +2 -0
  34. package/ui/Blocks/CommonGrid/components/ColumnTitle.d.ts +9 -0
  35. package/ui/Blocks/CommonGrid/components/ColumnTitle.js +20 -0
  36. package/ui/Blocks/CommonGrid/components/ControlButtons/ControlButtons.d.ts +11 -0
  37. package/ui/Blocks/CommonGrid/components/ControlButtons/ControlButtons.js +20 -0
  38. package/ui/Blocks/CommonGrid/components/ControlButtons/index.d.ts +2 -0
  39. package/ui/Blocks/CommonGrid/components/ControlButtons/index.js +2 -0
  40. package/ui/Blocks/CommonGrid/components/DataCell.d.ts +11 -0
  41. package/ui/Blocks/CommonGrid/components/DataCell.js +52 -0
  42. package/ui/Blocks/CommonGrid/components/DataRow.d.ts +21 -0
  43. package/ui/Blocks/CommonGrid/components/DataRow.js +110 -0
  44. package/ui/Blocks/CommonGrid/components/DatePickerRange/DatePickerRange.d.ts +12 -0
  45. package/ui/Blocks/CommonGrid/components/DatePickerRange/DatePickerRange.js +113 -0
  46. package/ui/Blocks/CommonGrid/components/DatePickerRange/index.d.ts +2 -0
  47. package/ui/Blocks/CommonGrid/components/DatePickerRange/index.js +2 -0
  48. package/ui/Blocks/CommonGrid/components/DatePickerRange/utils/sameDate.d.ts +1 -0
  49. package/ui/Blocks/CommonGrid/components/DatePickerRange/utils/sameDate.js +3 -0
  50. package/ui/Blocks/CommonGrid/components/DropdownSelect/DropdownSelect.d.ts +21 -0
  51. package/ui/Blocks/CommonGrid/components/DropdownSelect/DropdownSelect.js +47 -0
  52. package/ui/Blocks/CommonGrid/components/DropdownSelect/index.d.ts +4 -0
  53. package/ui/Blocks/CommonGrid/components/DropdownSelect/index.js +3 -0
  54. package/ui/Blocks/CommonGrid/components/ExtraControlButtons/ExtraControlButtons.d.ts +8 -0
  55. package/ui/Blocks/CommonGrid/components/ExtraControlButtons/ExtraControlButtons.js +43 -0
  56. package/ui/Blocks/CommonGrid/components/ExtraControlButtons/index.d.ts +2 -0
  57. package/ui/Blocks/CommonGrid/components/ExtraControlButtons/index.js +2 -0
  58. package/ui/Blocks/CommonGrid/components/FilterDropdown.d.ts +3 -0
  59. package/ui/Blocks/CommonGrid/components/FilterDropdown.js +36 -0
  60. package/ui/Blocks/CommonGrid/components/FilterRow.d.ts +15 -0
  61. package/ui/Blocks/CommonGrid/components/FilterRow.js +34 -0
  62. package/ui/Blocks/CommonGrid/components/FloatingButton/FloatingButton.d.ts +7 -0
  63. package/ui/Blocks/CommonGrid/components/FloatingButton/FloatingButton.js +45 -0
  64. package/ui/Blocks/CommonGrid/components/FloatingButton/index.d.ts +2 -0
  65. package/ui/Blocks/CommonGrid/components/FloatingButton/index.js +2 -0
  66. package/ui/Blocks/CommonGrid/components/GridSelect/GridSelect.d.ts +10 -0
  67. package/ui/Blocks/CommonGrid/components/GridSelect/GridSelect.js +19 -0
  68. package/ui/Blocks/CommonGrid/components/GridSelect/index.d.ts +2 -0
  69. package/ui/Blocks/CommonGrid/components/GridSelect/index.js +2 -0
  70. package/ui/Blocks/CommonGrid/components/GroupRow.d.ts +9 -0
  71. package/ui/Blocks/CommonGrid/components/GroupRow.js +27 -0
  72. package/ui/Blocks/CommonGrid/components/HeadCell.d.ts +27 -0
  73. package/ui/Blocks/CommonGrid/components/HeadCell.js +40 -0
  74. package/ui/Blocks/CommonGrid/components/HeadRow.d.ts +15 -0
  75. package/ui/Blocks/CommonGrid/components/HeadRow.js +69 -0
  76. package/ui/Blocks/CommonGrid/components/HidePrint/HidePrint.d.ts +6 -0
  77. package/ui/Blocks/CommonGrid/components/HidePrint/HidePrint.js +13 -0
  78. package/ui/Blocks/CommonGrid/components/IconList/IconList.d.ts +18 -0
  79. package/ui/Blocks/CommonGrid/components/IconList/IconList.js +29 -0
  80. package/ui/Blocks/CommonGrid/components/IconList/index.d.ts +2 -0
  81. package/ui/Blocks/CommonGrid/components/IconList/index.js +2 -0
  82. package/ui/Blocks/CommonGrid/components/ManageColumnForm/ManageColumnForm.d.ts +11 -0
  83. package/ui/Blocks/CommonGrid/components/ManageColumnForm/ManageColumnForm.js +20 -0
  84. package/ui/Blocks/CommonGrid/components/ManageColumnForm/components/ActionRow.d.ts +12 -0
  85. package/ui/Blocks/CommonGrid/components/ManageColumnForm/components/ActionRow.js +47 -0
  86. package/ui/Blocks/CommonGrid/components/ManageColumnForm/index.d.ts +2 -0
  87. package/ui/Blocks/CommonGrid/components/ManageColumnForm/index.js +2 -0
  88. package/ui/Blocks/CommonGrid/components/NumberRange/NumberRange.d.ts +3 -0
  89. package/ui/Blocks/CommonGrid/components/NumberRange/NumberRange.js +76 -0
  90. package/ui/Blocks/CommonGrid/components/NumberRange/index.d.ts +2 -0
  91. package/ui/Blocks/CommonGrid/components/NumberRange/index.js +2 -0
  92. package/ui/Blocks/CommonGrid/components/NumberRange/types.d.ts +17 -0
  93. package/ui/Blocks/CommonGrid/components/NumberRange/types.js +1 -0
  94. package/ui/Blocks/CommonGrid/components/OversizedScroll.d.ts +11 -0
  95. package/ui/Blocks/CommonGrid/components/OversizedScroll.js +21 -0
  96. package/ui/Blocks/CommonGrid/components/ReadEditButtonCell/ReadEditButtonCell.d.ts +6 -0
  97. package/ui/Blocks/CommonGrid/components/ReadEditButtonCell/ReadEditButtonCell.js +26 -0
  98. package/ui/Blocks/CommonGrid/components/ReadEditButtonCell/index.d.ts +2 -0
  99. package/ui/Blocks/CommonGrid/components/ReadEditButtonCell/index.js +2 -0
  100. package/ui/Blocks/CommonGrid/components/Resize.d.ts +7 -0
  101. package/ui/Blocks/CommonGrid/components/Resize.js +33 -0
  102. package/ui/Blocks/CommonGrid/components/Table.d.ts +10 -0
  103. package/ui/Blocks/CommonGrid/components/Table.js +25 -0
  104. package/ui/Blocks/CommonGrid/components/TablePagination/TablePagination.d.ts +7 -0
  105. package/ui/Blocks/CommonGrid/components/TablePagination/TablePagination.js +31 -0
  106. package/ui/Blocks/CommonGrid/components/TablePagination/index.d.ts +2 -0
  107. package/ui/Blocks/CommonGrid/components/TablePagination/index.js +2 -0
  108. package/ui/Blocks/CommonGrid/components/TextRange/TextRange.d.ts +4 -0
  109. package/ui/Blocks/CommonGrid/components/TextRange/TextRange.js +89 -0
  110. package/ui/Blocks/CommonGrid/components/TextRange/index.d.ts +2 -0
  111. package/ui/Blocks/CommonGrid/components/TextRange/index.js +2 -0
  112. package/ui/Blocks/CommonGrid/components/TextRange/types.d.ts +21 -0
  113. package/ui/Blocks/CommonGrid/components/TextRange/types.js +1 -0
  114. package/ui/Blocks/CommonGrid/components/gridCells/BoolIcon.d.ts +5 -0
  115. package/ui/Blocks/CommonGrid/components/gridCells/BoolIcon.js +22 -0
  116. package/ui/Blocks/CommonGrid/components/gridCells/ButtonInCell.d.ts +4 -0
  117. package/ui/Blocks/CommonGrid/components/gridCells/ButtonInCell.js +16 -0
  118. package/ui/Blocks/CommonGrid/components/gridCells/Date.d.ts +4 -0
  119. package/ui/Blocks/CommonGrid/components/gridCells/Date.js +8 -0
  120. package/ui/Blocks/CommonGrid/components/gridCells/DateTime.d.ts +4 -0
  121. package/ui/Blocks/CommonGrid/components/gridCells/DateTime.js +13 -0
  122. package/ui/Blocks/CommonGrid/components/gridCells/EnumInCell.d.ts +9 -0
  123. package/ui/Blocks/CommonGrid/components/gridCells/EnumInCell.js +33 -0
  124. package/ui/Blocks/CommonGrid/components/gridCells/HoverBubble.d.ts +5 -0
  125. package/ui/Blocks/CommonGrid/components/gridCells/HoverBubble.js +19 -0
  126. package/ui/Blocks/CommonGrid/components/gridCells/IconButtonInCell.d.ts +9 -0
  127. package/ui/Blocks/CommonGrid/components/gridCells/IconButtonInCell.js +15 -0
  128. package/ui/Blocks/CommonGrid/components/gridCells/ImageCell.d.ts +6 -0
  129. package/ui/Blocks/CommonGrid/components/gridCells/ImageCell.js +23 -0
  130. package/ui/Blocks/CommonGrid/components/gridCells/LinkInCell.d.ts +1 -0
  131. package/ui/Blocks/CommonGrid/components/gridCells/LinkInCell.js +8 -0
  132. package/ui/Blocks/CommonGrid/components/gridCells/RemoveItem.d.ts +5 -0
  133. package/ui/Blocks/CommonGrid/components/gridCells/RemoveItem.js +24 -0
  134. package/ui/Blocks/CommonGrid/components/gridCells/RowActionsCell.d.ts +7 -0
  135. package/ui/Blocks/CommonGrid/components/gridCells/RowActionsCell.js +30 -0
  136. package/ui/Blocks/CommonGrid/components/gridCells/StringJoin.d.ts +4 -0
  137. package/ui/Blocks/CommonGrid/components/gridCells/StringJoin.js +7 -0
  138. package/ui/Blocks/CommonGrid/components/gridCells/SwitchInCell.d.ts +2 -0
  139. package/ui/Blocks/CommonGrid/components/gridCells/SwitchInCell.js +16 -0
  140. package/ui/Blocks/CommonGrid/components/gridCells/index.d.ts +12 -0
  141. package/ui/Blocks/CommonGrid/components/gridCells/index.js +12 -0
  142. package/ui/Blocks/CommonGrid/components/icons/ArrowSimple.d.ts +2 -0
  143. package/ui/Blocks/CommonGrid/components/icons/ArrowSimple.js +14 -0
  144. package/ui/Blocks/CommonGrid/components/icons/Edit.d.ts +2 -0
  145. package/ui/Blocks/CommonGrid/components/icons/Edit.js +14 -0
  146. package/ui/Blocks/CommonGrid/components/icons/EyeOpen.d.ts +2 -0
  147. package/ui/Blocks/CommonGrid/components/icons/EyeOpen.js +14 -0
  148. package/ui/Blocks/CommonGrid/components/icons/Sorting.d.ts +2 -0
  149. package/ui/Blocks/CommonGrid/components/icons/Sorting.js +14 -0
  150. package/ui/Blocks/CommonGrid/components/utils.d.ts +8 -0
  151. package/ui/Blocks/CommonGrid/components/utils.js +22 -0
  152. package/ui/Blocks/CommonGrid/hooks/useColumnSizes.d.ts +12 -0
  153. package/ui/Blocks/CommonGrid/hooks/useColumnSizes.js +83 -0
  154. package/ui/Blocks/CommonGrid/hooks/useEditReadAsColumn.d.ts +15 -0
  155. package/ui/Blocks/CommonGrid/hooks/useEditReadAsColumn.js +70 -0
  156. package/ui/Blocks/CommonGrid/hooks/useGetGridHeight.d.ts +7 -0
  157. package/ui/Blocks/CommonGrid/hooks/useGetGridHeight.js +33 -0
  158. package/ui/Blocks/CommonGrid/hooks/useManageColumn.d.ts +19 -0
  159. package/ui/Blocks/CommonGrid/hooks/useManageColumn.js +34 -0
  160. package/ui/Blocks/CommonGrid/hooks/useRowsKeyControls.d.ts +4 -0
  161. package/ui/Blocks/CommonGrid/hooks/useRowsKeyControls.js +21 -0
  162. package/ui/Blocks/CommonGrid/hooks/useUxReset.d.ts +3 -0
  163. package/ui/Blocks/CommonGrid/hooks/useUxReset.js +15 -0
  164. package/ui/Blocks/CommonGrid/index.d.ts +7 -0
  165. package/ui/Blocks/CommonGrid/index.js +7 -0
  166. package/ui/Blocks/CommonGrid/store/index.d.ts +58 -0
  167. package/ui/Blocks/CommonGrid/store/index.js +230 -0
  168. package/ui/Blocks/CommonGrid/store/migrateState.d.ts +3 -0
  169. package/ui/Blocks/CommonGrid/store/migrateState.js +14 -0
  170. package/ui/Blocks/CommonGrid/storybook/stories/complexWithPaginationAndRedux.stories.d.ts +11 -0
  171. package/ui/Blocks/CommonGrid/storybook/stories/complexWithPaginationAndRedux.stories.js +31 -0
  172. package/ui/Blocks/CommonGrid/storybook/stories/customControllButtons.stories.d.ts +13 -0
  173. package/ui/Blocks/CommonGrid/storybook/stories/customControllButtons.stories.js +49 -0
  174. package/ui/Blocks/CommonGrid/storybook/stories/default.stories.d.ts +6 -0
  175. package/ui/Blocks/CommonGrid/storybook/stories/default.stories.js +14 -0
  176. package/ui/Blocks/CommonGrid/storybook/stories/loading.stories.d.ts +10 -0
  177. package/ui/Blocks/CommonGrid/storybook/stories/loading.stories.js +11 -0
  178. package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNoScrollLayout.stories.d.ts +10 -0
  179. package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNoScrollLayout.stories.js +12 -0
  180. package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNormalLayout.stories.d.ts +10 -0
  181. package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNormalLayout.stories.js +12 -0
  182. package/ui/Blocks/CommonGrid/storybook/stories/styledCommonGrid.stories.d.ts +6 -0
  183. package/ui/Blocks/CommonGrid/storybook/stories/styledCommonGrid.stories.js +15 -0
  184. package/ui/Blocks/CommonGrid/storybook/stories/withCustomGridActions.stories.d.ts +10 -0
  185. package/ui/Blocks/CommonGrid/storybook/stories/withCustomGridActions.stories.js +15 -0
  186. package/ui/Blocks/CommonGrid/storybook/stories/withForcedCheckboxes.stories.d.ts +14 -0
  187. package/ui/Blocks/CommonGrid/storybook/stories/withForcedCheckboxes.stories.js +24 -0
  188. package/ui/Blocks/CommonGrid/storybook/utils/actions.d.ts +4 -0
  189. package/ui/Blocks/CommonGrid/storybook/utils/actions.js +6 -0
  190. package/ui/Blocks/CommonGrid/storybook/utils/columnDefinition.d.ts +10 -0
  191. package/ui/Blocks/CommonGrid/storybook/utils/columnDefinition.js +97 -0
  192. package/ui/Blocks/CommonGrid/storybook/utils/filters.d.ts +2 -0
  193. package/ui/Blocks/CommonGrid/storybook/utils/filters.js +23 -0
  194. package/ui/Blocks/CommonGrid/storybook/utils/utils.d.ts +17 -0
  195. package/ui/Blocks/CommonGrid/storybook/utils/utils.js +66 -0
  196. package/ui/Blocks/CommonGrid/storybook/utils/withRedux.d.ts +2 -0
  197. package/ui/Blocks/CommonGrid/storybook/utils/withRedux.js +12 -0
  198. package/ui/Blocks/CommonGrid/storybook/utils/withRouter.d.ts +2 -0
  199. package/ui/Blocks/CommonGrid/storybook/utils/withRouter.js +4 -0
  200. package/ui/Blocks/CommonGrid/storybook/utils/withTheme.d.ts +2 -0
  201. package/ui/Blocks/CommonGrid/storybook/utils/withTheme.js +18 -0
  202. package/ui/Blocks/CommonGrid/styles.d.ts +12 -0
  203. package/ui/Blocks/CommonGrid/styles.js +33 -0
  204. package/ui/Blocks/CommonGrid/translations.d.ts +1 -0
  205. package/ui/Blocks/CommonGrid/translations.js +6 -0
  206. package/ui/Blocks/CommonGrid/types.d.ts +313 -0
  207. package/ui/Blocks/CommonGrid/types.js +8 -0
  208. package/ui/Blocks/CommonGrid/utils/index.d.ts +19 -0
  209. package/ui/Blocks/CommonGrid/utils/index.js +78 -0
  210. package/ui/Blocks/CommonGrid/utils/public.d.ts +16 -0
  211. package/ui/Blocks/CommonGrid/utils/public.js +52 -0
  212. package/ui/Blocks/Popover/index.d.ts +10 -0
  213. package/ui/Blocks/Popover/index.js +19 -0
  214. package/ui/Elements/DatePicker/DatePicker.d.ts +20 -0
  215. package/ui/Elements/DatePicker/DatePicker.js +65 -0
  216. package/ui/Elements/DatePicker/Datetime/DateTime.d.ts +95 -0
  217. package/ui/Elements/DatePicker/Datetime/DateTime.js +516 -0
  218. package/ui/Elements/DatePicker/Datetime/components/Timepicker.d.ts +8 -0
  219. package/ui/Elements/DatePicker/Datetime/components/Timepicker.js +57 -0
  220. package/ui/Elements/DatePicker/Datetime/components/ViewNavigation.d.ts +9 -0
  221. package/ui/Elements/DatePicker/Datetime/components/ViewNavigation.js +16 -0
  222. package/ui/Elements/DatePicker/Datetime/types.d.ts +61 -0
  223. package/ui/Elements/DatePicker/Datetime/types.js +7 -0
  224. package/ui/Elements/DatePicker/Datetime/views/DaysView.d.ts +14 -0
  225. package/ui/Elements/DatePicker/Datetime/views/DaysView.js +145 -0
  226. package/ui/Elements/DatePicker/Datetime/views/MonthsView.d.ts +10 -0
  227. package/ui/Elements/DatePicker/Datetime/views/MonthsView.js +111 -0
  228. package/ui/Elements/DatePicker/Datetime/views/YearsView.d.ts +15 -0
  229. package/ui/Elements/DatePicker/Datetime/views/YearsView.js +117 -0
  230. package/ui/Elements/DatePicker/index.d.ts +2 -0
  231. package/ui/Elements/DatePicker/index.js +2 -0
  232. package/ui/Elements/DatePicker/styles.d.ts +2 -0
  233. package/ui/Elements/DatePicker/styles.js +8 -0
  234. package/ui/Elements/DatePicker/utils/getLanguage.d.ts +1 -0
  235. package/ui/Elements/DatePicker/utils/getLanguage.js +10 -0
  236. package/ui/Elements/DropdownMenu/DropdownMenu.d.ts +2 -0
  237. package/ui/Elements/DropdownMenu/DropdownMenu.js +36 -0
  238. package/ui/Elements/DropdownMenu/components/DefaultItem.d.ts +3 -0
  239. package/ui/Elements/DropdownMenu/components/DefaultItem.js +16 -0
  240. package/ui/Elements/DropdownMenu/components/MenuItem.d.ts +3 -0
  241. package/ui/Elements/DropdownMenu/components/MenuItem.js +51 -0
  242. package/ui/Elements/DropdownMenu/components/MenuList.d.ts +3 -0
  243. package/ui/Elements/DropdownMenu/components/MenuList.js +10 -0
  244. package/ui/Elements/DropdownMenu/index.d.ts +1 -0
  245. package/ui/Elements/DropdownMenu/index.js +1 -0
  246. package/ui/Elements/DropdownMenu/types.d.ts +41 -0
  247. package/ui/Elements/DropdownMenu/types.js +1 -0
  248. package/ui/Elements/HighlightBox/HighlightBox.d.ts +50 -0
  249. package/ui/Elements/HighlightBox/HighlightBox.js +65 -0
  250. package/ui/Elements/HighlightBox/index.d.ts +2 -0
  251. package/ui/Elements/HighlightBox/index.js +2 -0
  252. package/ui/Elements/MultiSelect/MultiSelect.d.ts +6 -0
  253. package/ui/Elements/MultiSelect/MultiSelect.js +29 -0
  254. package/ui/Elements/MultiSelect/index.d.ts +2 -0
  255. package/ui/Elements/MultiSelect/index.js +2 -0
  256. package/ui/Elements/Pagination/Pagination.d.ts +1 -1
  257. package/ui/Elements/Pagination/Pagination.js +6 -2
  258. package/ui/Elements/Pagination/styled.js +6 -6
  259. package/ui/Elements/Select/Select.d.ts +3 -0
  260. package/ui/Elements/Select/Select.js +69 -0
  261. package/ui/Elements/Select/index.d.ts +2 -0
  262. package/ui/Elements/Select/index.js +2 -0
  263. package/ui/Elements/Select/styles.d.ts +5 -0
  264. package/ui/Elements/Select/styles.js +12 -0
  265. package/ui/Elements/Select/themes/CustomComponents.d.ts +9 -0
  266. package/ui/Elements/Select/themes/CustomComponents.js +131 -0
  267. package/ui/Elements/Select/themes/baseStyles.d.ts +28 -0
  268. package/ui/Elements/Select/themes/baseStyles.js +70 -0
  269. package/ui/Elements/Select/themes/formStyles.d.ts +23 -0
  270. package/ui/Elements/Select/themes/formStyles.js +104 -0
  271. package/ui/Elements/Select/themes/headingStyles.d.ts +17 -0
  272. package/ui/Elements/Select/themes/headingStyles.js +99 -0
  273. package/ui/Elements/Select/themes/index.d.ts +3 -0
  274. package/ui/Elements/Select/themes/index.js +61 -0
  275. package/ui/Elements/Select/themes/leftMenuStyles.d.ts +18 -0
  276. package/ui/Elements/Select/themes/leftMenuStyles.js +57 -0
  277. package/ui/Elements/Select/types.d.ts +54 -0
  278. package/ui/Elements/Select/types.js +1 -0
  279. package/ui/Elements/SingleSelect/SingleSelect.d.ts +20 -0
  280. package/ui/Elements/SingleSelect/SingleSelect.js +197 -0
  281. package/ui/Elements/SingleSelect/index.d.ts +2 -0
  282. package/ui/Elements/SingleSelect/index.js +2 -0
  283. package/ui/Forms/Input/types.d.ts +2 -2
  284. package/ui/index.es.js +868 -1104
  285. package/ui/index.umd.js +8 -5
@@ -0,0 +1,89 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
23
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
+ import { useCallback, useState } from 'react';
25
+ import { t } from '@lingui/macro';
26
+ import { Trans } from '@lingui/react';
27
+ import { useClickOutside } from '../../../Modal/hooks/useClickOutside';
28
+ import { Input } from '../../../../Forms/Input/Input';
29
+ import IconList from '../IconList/IconList';
30
+ var OverlayComponentDefault = function (_a) {
31
+ var children = _a.children;
32
+ return _jsx("div", { children: children });
33
+ };
34
+ export var ipv4 = /^([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\.([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\.([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])\.([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])$/;
35
+ var createTextComparators = function () { return [
36
+ { label: t({ id: 'dataGrid.comparator.contains', message: 'Contains' }), value: 'like', icon: 'check' },
37
+ { label: t({ id: 'dataGrid.comparator.notContains', message: 'Not contains' }), value: 'notLike', icon: 'false' },
38
+ { label: t({ id: 'dataGrid.comparator.equals', message: 'Equals' }), value: 'eq', icon: 'equals' },
39
+ { label: t({ id: 'dataGrid.comparator.notEquals', message: 'Not equal' }), value: 'neq', icon: 'notEqual' },
40
+ { label: t({ id: 'dataGrid.comparator.startsWith', message: 'Starts with' }), value: 'startsWith', icon: 'startsWith' },
41
+ { label: t({ id: 'dataGrid.comparator.endsWith', message: 'Ends with' }), value: 'endsWith', icon: 'endsWith' },
42
+ ]; };
43
+ var createPresentTextComparators = function () { return [
44
+ { label: t({ id: 'dataGrid.comparator.contains', message: 'Contains' }), value: 'like', icon: 'check' },
45
+ { label: t({ id: 'dataGrid.comparator.equals', message: 'Equals' }), value: 'in', icon: 'equals' },
46
+ ]; };
47
+ var createEqualComparators = function () { return [
48
+ { label: t({ id: 'dataGrid.comparator.equals', message: 'Equals' }), value: 'eq', icon: 'equals' },
49
+ { label: t({ id: 'dataGrid.comparator.notEquals', message: 'Not equal' }), value: 'neq', icon: 'notEqual' },
50
+ ]; };
51
+ var validations = {
52
+ ip: {
53
+ check: function (value) { return ipv4.test(value.trim()); },
54
+ errorMsg: _jsx(Trans, { id: "dataGrid.errors.ipValidationError", message: "Value is not valid ip" }),
55
+ },
56
+ };
57
+ var TextRange = function (props) {
58
+ var name = props.name, _a = props.value, value = _a === void 0 ? {} : _a, label = props.label, onChange = props.onChange, className = props.className, _b = props.OverlayComponent, OverlayComponent = _b === void 0 ? OverlayComponentDefault : _b, eqOnly = props.eqOnly, isPresent = props.isPresent, isEqual = props.isEqual, defaultComparator = props.defaultComparator, validationKey = props.validation, rest = __rest(props, ["name", "value", "label", "onChange", "className", "OverlayComponent", "eqOnly", "isPresent", "isEqual", "defaultComparator", "validation"]);
59
+ var eqOnlyTxt = t({ id: 'dataGrid.filterTxtEqWarning', message: 'This filter can only do exact match' });
60
+ var _c = useState(false), isOpen = _c[0], setOpen = _c[1];
61
+ var textComparators = createTextComparators();
62
+ var presentTextComparators = createPresentTextComparators();
63
+ var equalComparators = createEqualComparators();
64
+ var fallbackComparator = defaultComparator || textComparators[0].value;
65
+ var comparator = eqOnly ? 'eq' : (value === null || value === void 0 ? void 0 : value.comparator) || fallbackComparator;
66
+ var renderedComparator = isEqual ? equalComparators : isPresent ? presentTextComparators : textComparators;
67
+ var fieldValue = (value === null || value === void 0 ? void 0 : value.value) || '';
68
+ var onClose = useCallback(function () {
69
+ setOpen(false);
70
+ }, []);
71
+ var pickerRef = useClickOutside({ onClose: onClose });
72
+ var togglePicker = useCallback(function () { return setOpen(!isOpen); }, [isOpen, setOpen]);
73
+ var validation = !!validationKey && validations[validationKey];
74
+ var isInvalid = validation && Boolean(fieldValue && !validation.check(String(fieldValue)));
75
+ var onChangeTextInput = useCallback(function (event) {
76
+ var txtValue = event.target.value;
77
+ if (txtValue) {
78
+ onChange({ comparator: comparator, value: txtValue, isInvalid: validation && !validation.check(txtValue) });
79
+ }
80
+ else {
81
+ onChange(null);
82
+ }
83
+ }, [onChange, comparator, validation]);
84
+ var onChangeComparator = useCallback(function (option) {
85
+ onChange({ comparator: option.value, value: fieldValue, isInvalid: isInvalid });
86
+ }, []);
87
+ return (_jsxs("div", { ref: pickerRef, children: [_jsx(Input, __assign({ name: name, "data-test": name, "data-cy": "".concat(name, "Inp"), value: fieldValue, label: label, onChange: onChangeTextInput, iconOnClick: !eqOnly ? togglePicker : undefined, appearance: "grid", icon: !eqOnly ? 'ellipsisVertical' : 'warning', iconPlacement: "right", iconTooltip: eqOnly ? eqOnlyTxt : undefined, type: "text", className: className, error: (!!validation && isInvalid && validation.errorMsg) || '', errorAppearance: 'tooltip', autoComplete: "off" }, rest)), isOpen && (_jsx(OverlayComponent, { children: _jsx(IconList, { list: renderedComparator, selected: comparator, onClick: onChangeComparator }) }))] }));
88
+ };
89
+ export default TextRange;
@@ -0,0 +1,2 @@
1
+ import TextRange from './TextRange';
2
+ export default TextRange;
@@ -0,0 +1,2 @@
1
+ import TextRange from './TextRange';
2
+ export default TextRange;
@@ -0,0 +1,21 @@
1
+ import { FilterComponentProps } from '../../types';
2
+ export type TextRangeComparator = 'like' | 'notLike' | 'eq' | 'neq' | 'startsWith' | 'endsWith';
3
+ export type TextRangeValue = {
4
+ comparator?: TextRangeComparator;
5
+ value?: string | number;
6
+ isInvalid?: boolean;
7
+ };
8
+ export type Comparator = {
9
+ label: string;
10
+ value: string;
11
+ icon: string;
12
+ };
13
+ export type Props = FilterComponentProps<TextRangeValue> & {
14
+ eqOnly?: boolean;
15
+ isPresent?: boolean;
16
+ label?: string;
17
+ defaultComparator?: TextRangeValue['comparator'] & 'in';
18
+ validation?: string;
19
+ className?: string;
20
+ isEqual?: boolean;
21
+ };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import { DataCellProps } from '../../types';
3
+ type Props = DataCellProps<{}>;
4
+ export declare const BoolIconCell: React.MemoExoticComponent<({ rowData, column }: Props) => JSX.Element>;
5
+ export {};
@@ -0,0 +1,22 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ import React from 'react';
7
+ import styled, { useTheme } from '@xstyled/styled-components';
8
+ import { th } from '@xstyled/system';
9
+ import get from 'lodash/fp/get';
10
+ import Icon from '../../../../Elements/Icon/Icon';
11
+ var Center = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n width: 100%;\n"], ["\n display: flex;\n justify-content: center;\n width: 100%;\n"])));
12
+ var BoolIcon = function (_a) {
13
+ var rowData = _a.rowData, column = _a.column;
14
+ var theme = useTheme();
15
+ var value = get(column.name, rowData);
16
+ var icon = value ? 'check' : 'false';
17
+ var colorName = value ? 'green' : 'lightGray3';
18
+ var themeColor = th.color(colorName)({ theme: theme });
19
+ return (_jsx(Center, { children: _jsx(Icon, { icon: icon, fill: themeColor, size: "14px" }) }));
20
+ };
21
+ export var BoolIconCell = React.memo(BoolIcon);
22
+ var templateObject_1;
@@ -0,0 +1,4 @@
1
+ import { DataCellProps } from '../../types';
2
+ type Props = DataCellProps<{}>;
3
+ export declare const ButtonInCell: (props: Props) => JSX.Element;
4
+ export {};
@@ -0,0 +1,16 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import Button from '../../../../Elements/Button/Button';
14
+ export var ButtonInCell = function (props) {
15
+ return _jsx(Button, __assign({}, props, { appearance: "secondaryLg", sizing: "grid" }));
16
+ };
@@ -0,0 +1,4 @@
1
+ import { DataCellProps } from '../../types';
2
+ type Props = DataCellProps<{}>;
3
+ export declare const DateCell: ({ rowData, column }: Props) => JSX.Element | null;
4
+ export {};
@@ -0,0 +1,8 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import get from 'lodash/fp/get';
3
+ import { DateTime } from 'luxon';
4
+ export var DateCell = function (_a) {
5
+ var rowData = _a.rowData, column = _a.column;
6
+ var value = get(column.name, rowData);
7
+ return value ? _jsx("span", { className: "cell", children: DateTime.fromISO(value).toFormat('dd. MM. yyyy') }) : null;
8
+ };
@@ -0,0 +1,4 @@
1
+ import { DataCellProps } from '../../types';
2
+ type Props = DataCellProps<{}>;
3
+ export declare const DateTimeCell: ({ rowData, column }: Props) => JSX.Element | null;
4
+ export {};
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import get from 'lodash/fp/get';
3
+ import { DateTime } from 'luxon';
4
+ var defaultProps = {
5
+ dateTimeFormat: 'dd. MM. yyyy HH:mm',
6
+ };
7
+ export var DateTimeCell = function (_a) {
8
+ var _b;
9
+ var rowData = _a.rowData, column = _a.column;
10
+ var value = get(column.name, rowData);
11
+ var dateTimeFormat = ((_b = column === null || column === void 0 ? void 0 : column.passProps) !== null && _b !== void 0 ? _b : defaultProps).dateTimeFormat;
12
+ return value ? _jsx("span", { className: "cell", children: DateTime.fromISO(value, { setZone: true }).toFormat(dateTimeFormat) }) : null;
13
+ };
@@ -0,0 +1,9 @@
1
+ import { FlagAppearanceType } from '../../../../Elements/HighlightBox/HighlightBox';
2
+ type Props = {
3
+ value: string;
4
+ appearanceMap: Record<string, FlagAppearanceType>;
5
+ enumObj: Record<string, () => string>;
6
+ size?: 'default' | 'small' | 'wide' | 'fitContent';
7
+ };
8
+ export declare const EnumInCell: ({ value, enumObj, appearanceMap, size }: Props) => JSX.Element | null;
9
+ export {};
@@ -0,0 +1,33 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ var __assign = (this && this.__assign) || function () {
6
+ __assign = Object.assign || function(t) {
7
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
8
+ s = arguments[i];
9
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
10
+ t[p] = s[p];
11
+ }
12
+ return t;
13
+ };
14
+ return __assign.apply(this, arguments);
15
+ };
16
+ import { jsx as _jsx } from "react/jsx-runtime";
17
+ import { useMemo } from 'react';
18
+ import styled from '@xstyled/styled-components';
19
+ import HighlightBox from '../../../../Elements/HighlightBox';
20
+ var Center = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n justify-content: flex-start;\n width: 100%;\n"], ["\n display: flex;\n justify-content: flex-start;\n width: 100%;\n"])));
21
+ export var EnumInCell = function (_a) {
22
+ var value = _a.value, enumObj = _a.enumObj, appearanceMap = _a.appearanceMap, size = _a.size;
23
+ var finalLabel = useMemo(function () {
24
+ return enumObj[value] ? enumObj[value]() : value;
25
+ }, [enumObj, value]);
26
+ var coloringProp = useMemo(function () {
27
+ return { appearance: appearanceMap[value] };
28
+ }, [appearanceMap, value]);
29
+ if (!finalLabel)
30
+ return null;
31
+ return (_jsx(Center, { children: _jsx(HighlightBox, __assign({}, coloringProp, { size: size, prefix: "grid", children: finalLabel })) }));
32
+ };
33
+ var templateObject_1;
@@ -0,0 +1,5 @@
1
+ import { DataCellProps } from '../../types';
2
+ type Props = DataCellProps<{}>;
3
+ export declare const Tooltip: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {}, never>;
4
+ declare const Image: ({ rowData, column }: Props) => JSX.Element | null;
5
+ export default Image;
@@ -0,0 +1,19 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
+ import styled from '@xstyled/styled-components';
7
+ import get from 'lodash/fp/get';
8
+ var Wrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis;\n\n :hover {\n cursor: pointer;\n .tooltip {\n display: block;\n }\n }\n"], ["\n text-align: center;\n overflow: hidden;\n text-overflow: ellipsis;\n\n :hover {\n cursor: pointer;\n .tooltip {\n display: block;\n }\n }\n"])));
9
+ export var Tooltip = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n align-content: center;\n justify-content: center;\n margin-bottom: 2;\n\n div {\n display: none;\n position: absolute;\n background-color: white;\n color: gray;\n border-color: gray;\n border: 1px solid;\n border-radius: md;\n padding: 2 3;\n margin: 1;\n z-index: 1;\n box-shadow: tooltipBoxShadow;\n transform: translateY(-100%);\n\n max-width: 400px;\n line-break: anywhere;\n white-space: initial;\n }\n"], ["\n display: flex;\n align-content: center;\n justify-content: center;\n margin-bottom: 2;\n\n div {\n display: none;\n position: absolute;\n background-color: white;\n color: gray;\n border-color: gray;\n border: 1px solid;\n border-radius: md;\n padding: 2 3;\n margin: 1;\n z-index: 1;\n box-shadow: tooltipBoxShadow;\n transform: translateY(-100%);\n\n max-width: 400px;\n line-break: anywhere;\n white-space: initial;\n }\n"])));
10
+ var Image = function (_a) {
11
+ var rowData = _a.rowData, column = _a.column;
12
+ var value = get(column.name, rowData);
13
+ if (value) {
14
+ return (_jsxs(Wrapper, { children: [_jsx(Tooltip, { children: _jsx("div", { className: "tooltip", children: value }) }), value] }));
15
+ }
16
+ return null;
17
+ };
18
+ export default Image;
19
+ var templateObject_1, templateObject_2;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ type Props = {
3
+ icon?: string;
4
+ isLoading?: boolean;
5
+ onClick: React.HTMLProps<HTMLButtonElement>['onClick'];
6
+ linkTo?: string;
7
+ };
8
+ export declare const IconButtonInCell: ({ icon, isLoading, onClick, linkTo }: Props) => JSX.Element;
9
+ export {};
@@ -0,0 +1,15 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ import styled from '@xstyled/styled-components';
7
+ import { Link as ReactLink } from 'react-router-dom';
8
+ import Spinner from '../../../../Elements/Spinner/Spinner';
9
+ import Icon from '../../../../Elements/Icon/Icon';
10
+ var Center = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n width: 100%;\n & > * {\n cursor: pointer;\n color: gray1;\n :hover {\n color: blue2;\n }\n }\n"], ["\n display: flex;\n justify-content: center;\n width: 100%;\n & > * {\n cursor: pointer;\n color: gray1;\n :hover {\n color: blue2;\n }\n }\n"])));
11
+ export var IconButtonInCell = function (_a) {
12
+ var icon = _a.icon, isLoading = _a.isLoading, onClick = _a.onClick, linkTo = _a.linkTo;
13
+ return (_jsx(Center, { children: isLoading ? (_jsx(Spinner, { variant: "sm" })) : linkTo ? (_jsx(ReactLink, { to: linkTo, "data-cy": "".concat(icon, "IconBtn"), children: _jsx(Icon, { icon: icon || 'warning', size: "16px" }) })) : (_jsx("span", { onClick: onClick, "data-cy": "".concat(icon, "IconBtn"), children: _jsx(Icon, { icon: icon || 'warning', size: "16px" }) })) }));
14
+ };
15
+ var templateObject_1;
@@ -0,0 +1,6 @@
1
+ import { DataCellProps } from '../../types';
2
+ type Props = DataCellProps<{}> & {
3
+ onClick?: () => void;
4
+ };
5
+ export declare const ImageCell: ({ rowData, column, onClick }: Props) => JSX.Element | null;
6
+ export {};
@@ -0,0 +1,23 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ import styled from '@xstyled/styled-components';
7
+ import get from 'lodash/fp/get';
8
+ import Image from '../../../../Elements/Image/Image';
9
+ var ImageWrapper = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n height: 100%;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n"], ["\n ", "\n height: 100%;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n"])), function (_a) {
10
+ var onClick = _a.onClick;
11
+ return (onClick ? 'cursor: pointer;' : '');
12
+ });
13
+ var StyledImage = styled(Image)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n max-width: 100%;\n height: 30px;\n border: 1x solid;\n border-radius: md;\n border-color: lightGray3;\n"], ["\n max-width: 100%;\n height: 30px;\n border: 1x solid;\n border-radius: md;\n border-color: lightGray3;\n"])));
14
+ export var ImageCell = function (_a) {
15
+ var _b;
16
+ var rowData = _a.rowData, column = _a.column, onClick = _a.onClick;
17
+ var value = get(column.name, rowData);
18
+ if ((_b = value === null || value === void 0 ? void 0 : value[0]) === null || _b === void 0 ? void 0 : _b.urlSmall) {
19
+ return (_jsx(ImageWrapper, { onClick: onClick, children: _jsx(StyledImage, { src: value[0].urlSmall }) }));
20
+ }
21
+ return null;
22
+ };
23
+ var templateObject_1, templateObject_2;
@@ -0,0 +1 @@
1
+ export declare const LinkInCell: import("styled-components").StyledComponent<typeof import("react-router-dom").Link, import("@xstyled/system").Theme, import("../../../../Elements/SimpleLink/SimpleLink").Props, never>;
@@ -0,0 +1,8 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ import styled from '@xstyled/styled-components';
6
+ import { SimpleLink } from '../../../../Elements/SimpleLink';
7
+ export var LinkInCell = styled(SimpleLink)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n text-decoration: underline;\n"], ["\n text-decoration: underline;\n"])));
8
+ var templateObject_1;
@@ -0,0 +1,5 @@
1
+ import { DataCellProps } from '../../types';
2
+ type Props = DataCellProps<any>;
3
+ export declare const Wrap: import("styled-components").StyledComponent<"div", import("@xstyled/system").Theme, {}, never>;
4
+ export declare const RemoveCell: ({ rowData, onRowAction }: Props) => JSX.Element;
5
+ export {};
@@ -0,0 +1,24 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
6
+ import React from 'react';
7
+ import styled from '@xstyled/styled-components';
8
+ import { Trans } from '@lingui/react';
9
+ import Icon from '../../../../Elements/Icon/Icon';
10
+ export var Wrap = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n"], ["\n width: 100%;\n"])));
11
+ var Trigger = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n cursor: pointer;\n color: gray;\n font-weight: bold;\n font-size: 10px;\n & .faIcon {\n margin-right: 4px;\n }\n"], ["\n display: flex;\n justify-content: center;\n cursor: pointer;\n color: gray;\n font-weight: bold;\n font-size: 10px;\n & .faIcon {\n margin-right: 4px;\n }\n"])));
12
+ export var RemoveCell = function (_a) {
13
+ var _b;
14
+ var rowData = _a.rowData, onRowAction = _a.onRowAction;
15
+ var onRemoveClick = React.useCallback(function () {
16
+ if (onRowAction)
17
+ onRowAction(rowData.id, 'remove', rowData);
18
+ }, [rowData, onRowAction]);
19
+ if (((_b = rowData === null || rowData === void 0 ? void 0 : rowData.product) === null || _b === void 0 ? void 0 : _b.type) === 'virtual') {
20
+ return _jsx(Trans, { id: "dataGrid.columnLot.NA", message: "N/A" });
21
+ }
22
+ return (_jsx(Wrap, { children: _jsxs(Trigger, { onClick: onRemoveClick, children: [_jsx(Icon, { icon: "deleteX", size: "12px" }), _jsx(Trans, { id: "dataGrid.deleteItem", message: "Delete" })] }) }));
23
+ };
24
+ var templateObject_1, templateObject_2;
@@ -0,0 +1,7 @@
1
+ type Props = {
2
+ canEdit: boolean;
3
+ onClick: () => void;
4
+ linkTo?: string;
5
+ };
6
+ export declare const RowActionsCell: ({ canEdit, onClick, linkTo }: Props) => JSX.Element;
7
+ export {};
@@ -0,0 +1,30 @@
1
+ var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
2
+ if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
3
+ return cooked;
4
+ };
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ import { useCallback, useMemo } from 'react';
7
+ import styled from '@xstyled/styled-components';
8
+ import { isFunction } from 'lodash/fp';
9
+ import { IconButtonInCell } from './IconButtonInCell';
10
+ var Center = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n cursor: pointer;\n width: 100%;\n\n svg {\n color: blue2;\n }\n"], ["\n display: flex;\n justify-content: center;\n cursor: pointer;\n width: 100%;\n\n svg {\n color: blue2;\n }\n"])));
11
+ export var RowActionsCell = function (_a) {
12
+ var canEdit = _a.canEdit, onClick = _a.onClick, linkTo = _a.linkTo;
13
+ var handleOnClick = useCallback(function () {
14
+ if (isFunction(onClick)) {
15
+ onClick();
16
+ }
17
+ }, [onClick]);
18
+ var actions = useMemo(function () {
19
+ var actionOptions = [];
20
+ if (canEdit) {
21
+ actionOptions.push(_jsx(IconButtonInCell, { icon: "pen", onClick: handleOnClick, linkTo: linkTo }, "edit"));
22
+ }
23
+ else {
24
+ actionOptions.push(_jsx(IconButtonInCell, { icon: "chevronRight", onClick: handleOnClick, linkTo: linkTo }, "read"));
25
+ }
26
+ return actionOptions;
27
+ }, [canEdit, handleOnClick, linkTo]);
28
+ return _jsx(Center, { onClick: handleOnClick, children: actions });
29
+ };
30
+ var templateObject_1;
@@ -0,0 +1,4 @@
1
+ import { DataCellProps } from '../../types';
2
+ type Props = DataCellProps<{}>;
3
+ export declare const StringJoinCell: ({ rowData, column }: Props) => JSX.Element | null;
4
+ export {};
@@ -0,0 +1,7 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import get from 'lodash/fp/get';
3
+ export var StringJoinCell = function (_a) {
4
+ var rowData = _a.rowData, column = _a.column;
5
+ var values = get(column.name, rowData);
6
+ return values && values.length ? _jsx("span", { className: "cell", children: values.join(', ') }) : null;
7
+ };
@@ -0,0 +1,2 @@
1
+ import { Props } from '../../../../Elements/Toggle/types';
2
+ export declare const SwitchInCell: (props: Props) => JSX.Element;
@@ -0,0 +1,16 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ import Toggle from '../../../../Elements/Toggle/Toggle';
14
+ export var SwitchInCell = function (props) {
15
+ return _jsx(Toggle, __assign({}, props, { variant: "grid" }));
16
+ };
@@ -0,0 +1,12 @@
1
+ export { DateCell } from './Date';
2
+ export { DateTimeCell } from './DateTime';
3
+ export { StringJoinCell } from './StringJoin';
4
+ export { BoolIconCell } from './BoolIcon';
5
+ export { RemoveCell } from './RemoveItem';
6
+ export { LinkInCell } from './LinkInCell';
7
+ export { ButtonInCell } from './ButtonInCell';
8
+ export { IconButtonInCell } from './IconButtonInCell';
9
+ export { SwitchInCell } from './SwitchInCell';
10
+ export { ImageCell } from './ImageCell';
11
+ export { EnumInCell } from './EnumInCell';
12
+ export { RowActionsCell } from './RowActionsCell';
@@ -0,0 +1,12 @@
1
+ export { DateCell } from './Date';
2
+ export { DateTimeCell } from './DateTime';
3
+ export { StringJoinCell } from './StringJoin';
4
+ export { BoolIconCell } from './BoolIcon';
5
+ export { RemoveCell } from './RemoveItem';
6
+ export { LinkInCell } from './LinkInCell';
7
+ export { ButtonInCell } from './ButtonInCell';
8
+ export { IconButtonInCell } from './IconButtonInCell';
9
+ export { SwitchInCell } from './SwitchInCell';
10
+ export { ImageCell } from './ImageCell';
11
+ export { EnumInCell } from './EnumInCell';
12
+ export { RowActionsCell } from './RowActionsCell';
@@ -0,0 +1,2 @@
1
+ declare const SvgArrowSimple: (props: any) => JSX.Element;
2
+ export default SvgArrowSimple;
@@ -0,0 +1,14 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ var SvgArrowSimple = function (props) { return (_jsx("svg", __assign({ width: "1em", height: "1em", viewBox: "0 0 24 24", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round", className: "arrow-simple_svg__menu-toggle-icon" }, props, { children: _jsx("path", { d: "M9 18l6-6-6-6", fill: "none" }) }))); };
14
+ export default SvgArrowSimple;
@@ -0,0 +1,2 @@
1
+ declare const Edit: (props: any) => JSX.Element;
2
+ export default Edit;
@@ -0,0 +1,14 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ var Edit = function (props) { return (_jsx("svg", __assign({ "data-icon": "edit", viewBox: "0 0 16 16" }, props, { children: _jsx("path", { d: "M3.25 10.26l2.47 2.47 6.69-6.69-2.46-2.48-6.7 6.7zM.99 14.99l3.86-1.39-2.46-2.44-1.4 3.83zm12.25-14c-.48 0-.92.2-1.24.51l-1.44 1.44 2.47 2.47 1.44-1.44c.32-.32.51-.75.51-1.24.01-.95-.77-1.74-1.74-1.74z", fillRule: "evenodd" }) }))); };
14
+ export default Edit;
@@ -0,0 +1,2 @@
1
+ declare const EyeOpen: (props: any) => JSX.Element;
2
+ export default EyeOpen;
@@ -0,0 +1,14 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ var EyeOpen = function (props) { return (_jsx("svg", __assign({ "data-icon": "eye-open", viewBox: "0 0 16 16" }, props, { children: _jsx("path", { d: "M8.002 7.003a1.003 1.003 0 000 2.005 1.003 1.003 0 000-2.005zm7.988.972v-.02-.01-.02-.02a.675.675 0 00-.17-.36c-.509-.673-1.118-1.264-1.737-1.806-1.328-1.173-2.846-2.155-4.523-2.546a6.702 6.702 0 00-2.925-.06c-.889.18-1.738.541-2.546.992C2.84 4.837 1.692 5.81.694 6.902c-.18.211-.36.411-.53.632a.742.742 0 000 .932c.51.672 1.119 1.264 1.738 1.805 1.328 1.173 2.846 2.156 4.523 2.547.968.23 1.947.24 2.925.04.889-.18 1.738-.542 2.546-.993 1.248-.712 2.397-1.684 3.395-2.777.18-.2.37-.411.54-.632.09-.1.149-.23.169-.36v-.02-.02-.01-.02-.03c0-.01-.01-.01-.01-.02zm-7.988 3.038a2.998 2.998 0 01-2.995-3.008 2.998 2.998 0 012.995-3.008 2.998 2.998 0 012.996 3.008 2.998 2.998 0 01-2.996 3.008z", fillRule: "evenodd" }) }))); };
14
+ export default EyeOpen;
@@ -0,0 +1,2 @@
1
+ export declare const SortingUp: (props: any) => JSX.Element;
2
+ export declare const SortingDown: (props: any) => JSX.Element;
@@ -0,0 +1,14 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx } from "react/jsx-runtime";
13
+ export var SortingUp = function (props) { return (_jsx("svg", __assign({ viewBox: "0 0 16 16" }, props, { children: _jsx("path", { d: "M12.71 9.29l-4-4C8.53 5.11 8.28 5 8 5s-.53.11-.71.29l-4 4a1.003 1.003 0 001.42 1.42L8 7.41l3.29 3.29c.18.19.43.3.71.3a1.003 1.003 0 00.71-1.71z", fillRule: "evenodd" }) }))); };
14
+ export var SortingDown = function (props) { return (_jsx("svg", __assign({ viewBox: "0 0 16 16" }, props, { children: _jsx("path", { d: "M12 5c-.28 0-.53.11-.71.29L8 8.59l-3.29-3.3a1.003 1.003 0 00-1.42 1.42l4 4c.18.18.43.29.71.29s.53-.11.71-.29l4-4A1.003 1.003 0 0012 5z", fillRule: "evenodd" }) }))); };
@@ -0,0 +1,8 @@
1
+ type Props = {
2
+ handleRowClick: (e: MouseEvent) => void;
3
+ };
4
+ export declare const useTimeMeasurement: ({ handleRowClick }: Props) => {
5
+ handleMouseDown: () => void;
6
+ handleMouseUp: (e: MouseEvent) => void;
7
+ };
8
+ export {};
@@ -0,0 +1,22 @@
1
+ import { useState } from 'react';
2
+ export var useTimeMeasurement = function (_a) {
3
+ var handleRowClick = _a.handleRowClick;
4
+ var _b = useState(0), startTime = _b[0], setStartTime = _b[1];
5
+ var handleMouseDown = function () {
6
+ // Set the start time when mouse is pressed
7
+ var start = Date.now();
8
+ setStartTime(start);
9
+ };
10
+ var handleMouseUp = function (e) {
11
+ if (startTime !== 0) {
12
+ // Calculate the time difference between mouse down and up
13
+ var endTime = Date.now();
14
+ var duration = endTime - startTime;
15
+ if (duration > 0 && duration < 200) {
16
+ handleRowClick(e);
17
+ }
18
+ setStartTime(0);
19
+ }
20
+ };
21
+ return { handleMouseDown: handleMouseDown, handleMouseUp: handleMouseUp };
22
+ };