@mailstep/design-system 0.8.52 → 0.9.1

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 (290) hide show
  1. package/package.json +22 -6
  2. package/ui/Blocks/CommonGrid/components/ActionHead/ActionHead.js +1 -1
  3. package/ui/Blocks/CommonGrid/hooks/useManageColumn.js +1 -1
  4. package/ui/Blocks/Header/components/UserMenu/index.js +1 -1
  5. package/ui/Blocks/Header/styles.js +1 -1
  6. package/ui/Elements/Avatar/Avatar.js +1 -1
  7. package/ui/Elements/Avatar/styles.js +1 -1
  8. package/ui/Elements/Button/styles.js +1 -1
  9. package/ui/Modules/Dashboard/Hoc/LoadingBoundary.d.ts +8 -0
  10. package/ui/Modules/Dashboard/Hoc/LoadingBoundary.js +11 -0
  11. package/ui/Modules/Dashboard/Hoc/index.d.ts +3 -0
  12. package/ui/Modules/Dashboard/Hoc/index.js +4 -0
  13. package/ui/Modules/Dashboard/Hoc/storybook/withReduxProvider.d.ts +4 -0
  14. package/ui/Modules/Dashboard/Hoc/storybook/withReduxProvider.js +14 -0
  15. package/ui/Modules/Dashboard/Hoc/withConfig.d.ts +7 -0
  16. package/ui/Modules/Dashboard/Hoc/withConfig.js +22 -0
  17. package/ui/Modules/Dashboard/Hoc/withFetch.d.ts +26 -0
  18. package/ui/Modules/Dashboard/Hoc/withFetch.js +50 -0
  19. package/ui/Modules/Dashboard/Hoc/withProps.d.ts +4 -0
  20. package/ui/Modules/Dashboard/Hoc/withProps.js +25 -0
  21. package/ui/Modules/Dashboard/assets/BarChartPreview.png +0 -0
  22. package/ui/Modules/Dashboard/assets/ColorBoxPreview.png +0 -0
  23. package/ui/Modules/Dashboard/assets/HorizontalBarPreview.png +0 -0
  24. package/ui/Modules/Dashboard/assets/NumberBoxPreview.png +0 -0
  25. package/ui/Modules/Dashboard/assets/PieChartPreview.png +0 -0
  26. package/ui/Modules/Dashboard/assets/TablePreview.png +0 -0
  27. package/ui/Modules/Dashboard/assets/TextBoxPreview.png +0 -0
  28. package/ui/Modules/Dashboard/assets/move.svg +18 -0
  29. package/ui/Modules/Dashboard/components/Config/MultiConfig.d.ts +6 -0
  30. package/ui/Modules/Dashboard/components/Config/MultiConfig.js +51 -0
  31. package/ui/Modules/Dashboard/components/Config/components/CommonConfig.d.ts +4 -0
  32. package/ui/Modules/Dashboard/components/Config/components/CommonConfig.js +20 -0
  33. package/ui/Modules/Dashboard/components/Config/components/InputConfig.d.ts +5 -0
  34. package/ui/Modules/Dashboard/components/Config/components/InputConfig.js +104 -0
  35. package/ui/Modules/Dashboard/components/Config/types.d.ts +1 -0
  36. package/ui/Modules/Dashboard/components/Config/types.js +1 -0
  37. package/ui/Modules/Dashboard/components/Dashboard/Dashboard.d.ts +9 -0
  38. package/ui/Modules/Dashboard/components/Dashboard/Dashboard.js +16 -0
  39. package/ui/Modules/Dashboard/components/Dashboard/DashboardContainer.d.ts +4 -0
  40. package/ui/Modules/Dashboard/components/Dashboard/DashboardContainer.js +31 -0
  41. package/ui/Modules/Dashboard/components/Dashboard/components/Body.d.ts +7 -0
  42. package/ui/Modules/Dashboard/components/Dashboard/components/Body.js +7 -0
  43. package/ui/Modules/Dashboard/components/Dashboard/components/HandleChange.d.ts +6 -0
  44. package/ui/Modules/Dashboard/components/Dashboard/components/HandleChange.js +25 -0
  45. package/ui/Modules/Dashboard/components/Dashboard/components/LayoutErrorBoundary.d.ts +13 -0
  46. package/ui/Modules/Dashboard/components/Dashboard/components/LayoutErrorBoundary.js +19 -0
  47. package/ui/Modules/Dashboard/components/Dashboard/dashboard2.css +124 -0
  48. package/ui/Modules/Dashboard/components/Dashboard/index.d.ts +2 -0
  49. package/ui/Modules/Dashboard/components/Dashboard/index.js +5 -0
  50. package/ui/Modules/Dashboard/components/Header/Header.d.ts +8 -0
  51. package/ui/Modules/Dashboard/components/Header/Header.js +9 -0
  52. package/ui/Modules/Dashboard/components/Header/index.d.ts +2 -0
  53. package/ui/Modules/Dashboard/components/Header/index.js +5 -0
  54. package/ui/Modules/Dashboard/components/Layout/Layout.d.ts +18 -0
  55. package/ui/Modules/Dashboard/components/Layout/Layout.js +39 -0
  56. package/ui/Modules/Dashboard/components/Layout/LayoutContainer.d.ts +7 -0
  57. package/ui/Modules/Dashboard/components/Layout/LayoutContainer.js +40 -0
  58. package/ui/Modules/Dashboard/components/Layout/components/Item/Item.d.ts +18 -0
  59. package/ui/Modules/Dashboard/components/Layout/components/Item/Item.js +79 -0
  60. package/ui/Modules/Dashboard/components/Layout/components/Item/ItemContainer.d.ts +11 -0
  61. package/ui/Modules/Dashboard/components/Layout/components/Item/ItemContainer.js +64 -0
  62. package/ui/Modules/Dashboard/components/Layout/components/Item/WidgetErrorBoundary.d.ts +14 -0
  63. package/ui/Modules/Dashboard/components/Layout/components/Item/WidgetErrorBoundary.js +28 -0
  64. package/ui/Modules/Dashboard/components/Layout/components/Item/index.d.ts +2 -0
  65. package/ui/Modules/Dashboard/components/Layout/components/Item/index.js +5 -0
  66. package/ui/Modules/Dashboard/components/Layout/components/ItemConfig/ItemConfig.d.ts +13 -0
  67. package/ui/Modules/Dashboard/components/Layout/components/ItemConfig/ItemConfig.js +18 -0
  68. package/ui/Modules/Dashboard/components/Layout/components/ItemConfig/ItemConfigControls.d.ts +8 -0
  69. package/ui/Modules/Dashboard/components/Layout/components/ItemConfig/ItemConfigControls.js +31 -0
  70. package/ui/Modules/Dashboard/components/Layout/components/ItemConfig/index.d.ts +2 -0
  71. package/ui/Modules/Dashboard/components/Layout/components/ItemConfig/index.js +5 -0
  72. package/ui/Modules/Dashboard/components/Layout/components/ItemHeader/ItemHeader.d.ts +12 -0
  73. package/ui/Modules/Dashboard/components/Layout/components/ItemHeader/ItemHeader.js +27 -0
  74. package/ui/Modules/Dashboard/components/Layout/components/ItemHeader/index.d.ts +2 -0
  75. package/ui/Modules/Dashboard/components/Layout/components/ItemHeader/index.js +5 -0
  76. package/ui/Modules/Dashboard/components/Layout/index.d.ts +2 -0
  77. package/ui/Modules/Dashboard/components/Layout/index.js +5 -0
  78. package/ui/Modules/Dashboard/components/NoData/NoData.d.ts +2 -0
  79. package/ui/Modules/Dashboard/components/NoData/NoData.js +14 -0
  80. package/ui/Modules/Dashboard/components/NoData/index.d.ts +2 -0
  81. package/ui/Modules/Dashboard/components/NoData/index.js +5 -0
  82. package/ui/Modules/Dashboard/components/Picker/Picker.d.ts +8 -0
  83. package/ui/Modules/Dashboard/components/Picker/Picker.js +38 -0
  84. package/ui/Modules/Dashboard/components/Picker/PickerContainer.d.ts +7 -0
  85. package/ui/Modules/Dashboard/components/Picker/PickerContainer.js +38 -0
  86. package/ui/Modules/Dashboard/components/Picker/components/PickerItem.d.ts +8 -0
  87. package/ui/Modules/Dashboard/components/Picker/components/PickerItem.js +25 -0
  88. package/ui/Modules/Dashboard/components/Picker/index.d.ts +2 -0
  89. package/ui/Modules/Dashboard/components/Picker/index.js +5 -0
  90. package/ui/Modules/Dashboard/components/Text/Text.d.ts +7 -0
  91. package/ui/Modules/Dashboard/components/Text/Text.js +14 -0
  92. package/ui/Modules/Dashboard/components/Text/index.d.ts +1 -0
  93. package/ui/Modules/Dashboard/components/Text/index.js +2 -0
  94. package/ui/Modules/Dashboard/components/Widgets/BarChart/BarChart.d.ts +19 -0
  95. package/ui/Modules/Dashboard/components/Widgets/BarChart/BarChart.js +52 -0
  96. package/ui/Modules/Dashboard/components/Widgets/BarChart/Config.d.ts +1 -0
  97. package/ui/Modules/Dashboard/components/Widgets/BarChart/Config.js +5 -0
  98. package/ui/Modules/Dashboard/components/Widgets/BarChart/index.d.ts +4 -0
  99. package/ui/Modules/Dashboard/components/Widgets/BarChart/index.js +6 -0
  100. package/ui/Modules/Dashboard/components/Widgets/BarChart/styles.d.ts +12 -0
  101. package/ui/Modules/Dashboard/components/Widgets/BarChart/styles.js +39 -0
  102. package/ui/Modules/Dashboard/components/Widgets/ColorBox/ColorBox.d.ts +7 -0
  103. package/ui/Modules/Dashboard/components/Widgets/ColorBox/ColorBox.js +21 -0
  104. package/ui/Modules/Dashboard/components/Widgets/ColorBox/Config.d.ts +3 -0
  105. package/ui/Modules/Dashboard/components/Widgets/ColorBox/Config.js +23 -0
  106. package/ui/Modules/Dashboard/components/Widgets/ColorBox/index.d.ts +4 -0
  107. package/ui/Modules/Dashboard/components/Widgets/ColorBox/index.js +6 -0
  108. package/ui/Modules/Dashboard/components/Widgets/EmptyWidget/EmptyWidget.d.ts +7 -0
  109. package/ui/Modules/Dashboard/components/Widgets/EmptyWidget/EmptyWidget.js +10 -0
  110. package/ui/Modules/Dashboard/components/Widgets/EmptyWidget/index.d.ts +2 -0
  111. package/ui/Modules/Dashboard/components/Widgets/EmptyWidget/index.js +5 -0
  112. package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/Config.d.ts +1 -0
  113. package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/Config.js +5 -0
  114. package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/HorizontalBar.d.ts +4 -0
  115. package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/HorizontalBar.js +38 -0
  116. package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/components/LabelsLine.d.ts +8 -0
  117. package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/components/LabelsLine.js +14 -0
  118. package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/components/ProgressLine.d.ts +7 -0
  119. package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/components/ProgressLine.js +14 -0
  120. package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/index.d.ts +4 -0
  121. package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/index.js +6 -0
  122. package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/storybook.sample.d.ts +2 -0
  123. package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/storybook.sample.js +33 -0
  124. package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/styles.d.ts +18 -0
  125. package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/styles.js +58 -0
  126. package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/types.d.ts +13 -0
  127. package/ui/Modules/Dashboard/components/Widgets/HorizontalBar/types.js +1 -0
  128. package/ui/Modules/Dashboard/components/Widgets/NumberBox/Config.d.ts +4 -0
  129. package/ui/Modules/Dashboard/components/Widgets/NumberBox/Config.js +38 -0
  130. package/ui/Modules/Dashboard/components/Widgets/NumberBox/NumberBox.d.ts +5 -0
  131. package/ui/Modules/Dashboard/components/Widgets/NumberBox/NumberBox.js +38 -0
  132. package/ui/Modules/Dashboard/components/Widgets/NumberBox/index.d.ts +4 -0
  133. package/ui/Modules/Dashboard/components/Widgets/NumberBox/index.js +6 -0
  134. package/ui/Modules/Dashboard/components/Widgets/NumberBox/styles.d.ts +4 -0
  135. package/ui/Modules/Dashboard/components/Widgets/NumberBox/styles.js +25 -0
  136. package/ui/Modules/Dashboard/components/Widgets/PieChart/Config.d.ts +1 -0
  137. package/ui/Modules/Dashboard/components/Widgets/PieChart/Config.js +5 -0
  138. package/ui/Modules/Dashboard/components/Widgets/PieChart/PieChart.d.ts +21 -0
  139. package/ui/Modules/Dashboard/components/Widgets/PieChart/PieChart.js +59 -0
  140. package/ui/Modules/Dashboard/components/Widgets/PieChart/components/CenteredMetric.d.ts +10 -0
  141. package/ui/Modules/Dashboard/components/Widgets/PieChart/components/CenteredMetric.js +24 -0
  142. package/ui/Modules/Dashboard/components/Widgets/PieChart/index.d.ts +4 -0
  143. package/ui/Modules/Dashboard/components/Widgets/PieChart/index.js +6 -0
  144. package/ui/Modules/Dashboard/components/Widgets/PieChart/styles.d.ts +14 -0
  145. package/ui/Modules/Dashboard/components/Widgets/PieChart/styles.js +47 -0
  146. package/ui/Modules/Dashboard/components/Widgets/Table/Config.d.ts +9 -0
  147. package/ui/Modules/Dashboard/components/Widgets/Table/Config.js +87 -0
  148. package/ui/Modules/Dashboard/components/Widgets/Table/Table.d.ts +4 -0
  149. package/ui/Modules/Dashboard/components/Widgets/Table/Table.js +93 -0
  150. package/ui/Modules/Dashboard/components/Widgets/Table/components/IconLabelCell.d.ts +8 -0
  151. package/ui/Modules/Dashboard/components/Widgets/Table/components/IconLabelCell.js +19 -0
  152. package/ui/Modules/Dashboard/components/Widgets/Table/components/PaginatorList.d.ts +9 -0
  153. package/ui/Modules/Dashboard/components/Widgets/Table/components/PaginatorList.js +31 -0
  154. package/ui/Modules/Dashboard/components/Widgets/Table/components/PaginatorLocation.d.ts +8 -0
  155. package/ui/Modules/Dashboard/components/Widgets/Table/components/PaginatorLocation.js +15 -0
  156. package/ui/Modules/Dashboard/components/Widgets/Table/components/TableCell.d.ts +6 -0
  157. package/ui/Modules/Dashboard/components/Widgets/Table/components/TableCell.js +33 -0
  158. package/ui/Modules/Dashboard/components/Widgets/Table/hooks/useCondition.d.ts +10 -0
  159. package/ui/Modules/Dashboard/components/Widgets/Table/hooks/useCondition.js +27 -0
  160. package/ui/Modules/Dashboard/components/Widgets/Table/hooks/usePages.d.ts +17 -0
  161. package/ui/Modules/Dashboard/components/Widgets/Table/hooks/usePages.js +27 -0
  162. package/ui/Modules/Dashboard/components/Widgets/Table/hooks/useSort.d.ts +10 -0
  163. package/ui/Modules/Dashboard/components/Widgets/Table/hooks/useSort.js +31 -0
  164. package/ui/Modules/Dashboard/components/Widgets/Table/index.d.ts +5 -0
  165. package/ui/Modules/Dashboard/components/Widgets/Table/index.js +7 -0
  166. package/ui/Modules/Dashboard/components/Widgets/Table/storybook.sample.d.ts +73 -0
  167. package/ui/Modules/Dashboard/components/Widgets/Table/storybook.sample.js +211 -0
  168. package/ui/Modules/Dashboard/components/Widgets/Table/styles.d.ts +23 -0
  169. package/ui/Modules/Dashboard/components/Widgets/Table/styles.js +69 -0
  170. package/ui/Modules/Dashboard/components/Widgets/Table/types.d.ts +52 -0
  171. package/ui/Modules/Dashboard/components/Widgets/Table/types.js +1 -0
  172. package/ui/Modules/Dashboard/components/Widgets/TextBox/TextBox.d.ts +10 -0
  173. package/ui/Modules/Dashboard/components/Widgets/TextBox/TextBox.js +12 -0
  174. package/ui/Modules/Dashboard/components/Widgets/TextBox/index.d.ts +3 -0
  175. package/ui/Modules/Dashboard/components/Widgets/TextBox/index.js +5 -0
  176. package/ui/Modules/Dashboard/components/Widgets/index.d.ts +11 -0
  177. package/ui/Modules/Dashboard/components/Widgets/index.js +108 -0
  178. package/ui/Modules/Dashboard/components/Widgets/utils/generic.d.ts +5 -0
  179. package/ui/Modules/Dashboard/components/Widgets/utils/generic.js +20 -0
  180. package/ui/Modules/Dashboard/components/Widgets/utils/helpers.d.ts +3 -0
  181. package/ui/Modules/Dashboard/components/Widgets/utils/helpers.js +25 -0
  182. package/ui/Modules/Dashboard/components/Widgets/utils/legends.d.ts +20 -0
  183. package/ui/Modules/Dashboard/components/Widgets/utils/legends.js +57 -0
  184. package/ui/Modules/Dashboard/context/ComponentContext.d.ts +5 -0
  185. package/ui/Modules/Dashboard/context/ComponentContext.js +15 -0
  186. package/ui/Modules/Dashboard/context/LangContext.d.ts +3 -0
  187. package/ui/Modules/Dashboard/context/LangContext.js +5 -0
  188. package/ui/Modules/Dashboard/errors/ErrorMessage.d.ts +7 -0
  189. package/ui/Modules/Dashboard/errors/ErrorMessage.js +12 -0
  190. package/ui/Modules/Dashboard/errors/WidgetError.d.ts +5 -0
  191. package/ui/Modules/Dashboard/errors/WidgetError.js +10 -0
  192. package/ui/Modules/Dashboard/hooks/usePrevious.d.ts +5 -0
  193. package/ui/Modules/Dashboard/hooks/usePrevious.js +14 -0
  194. package/ui/Modules/Dashboard/hooks/useRefWithCallback.d.ts +2 -0
  195. package/ui/Modules/Dashboard/hooks/useRefWithCallback.js +16 -0
  196. package/ui/Modules/Dashboard/hooks/useResize.d.ts +6 -0
  197. package/ui/Modules/Dashboard/hooks/useResize.js +19 -0
  198. package/ui/Modules/Dashboard/index.d.ts +7 -0
  199. package/ui/Modules/Dashboard/index.js +12 -0
  200. package/ui/Modules/Dashboard/locale/cs.d.ts +24 -0
  201. package/ui/Modules/Dashboard/locale/cs.js +26 -0
  202. package/ui/Modules/Dashboard/locale/en.d.ts +24 -0
  203. package/ui/Modules/Dashboard/locale/en.js +26 -0
  204. package/ui/Modules/Dashboard/locale/index.d.ts +4 -0
  205. package/ui/Modules/Dashboard/locale/index.js +13 -0
  206. package/ui/Modules/Dashboard/locale/it.d.ts +24 -0
  207. package/ui/Modules/Dashboard/locale/it.js +26 -0
  208. package/ui/Modules/Dashboard/locale/uk.d.ts +24 -0
  209. package/ui/Modules/Dashboard/locale/uk.js +26 -0
  210. package/ui/Modules/Dashboard/store/reducers/index.d.ts +9 -0
  211. package/ui/Modules/Dashboard/store/reducers/index.js +6 -0
  212. package/ui/Modules/Dashboard/store/reducers/widgetListReducer.d.ts +41 -0
  213. package/ui/Modules/Dashboard/store/reducers/widgetListReducer.js +76 -0
  214. package/ui/Modules/Dashboard/stories/storybook.sample.d.ts +50 -0
  215. package/ui/Modules/Dashboard/stories/storybook.sample.js +237 -0
  216. package/ui/Modules/Dashboard/styles.d.ts +63 -0
  217. package/ui/Modules/Dashboard/styles.js +358 -0
  218. package/ui/Modules/Dashboard/types.d.ts +185 -0
  219. package/ui/Modules/Dashboard/types.js +1 -0
  220. package/ui/Modules/index.d.ts +1 -0
  221. package/ui/Modules/index.js +8 -0
  222. package/ui/ThemeProvider/themes/index.d.ts +224 -0
  223. package/ui/ThemeProvider/themes/index.js +3 -1
  224. package/ui/ThemeProvider/themes/mailwiseDark.d.ts +225 -0
  225. package/ui/ThemeProvider/themes/mailwiseDark.js +16 -0
  226. package/ui/ThemeProvider/types.d.ts +1 -1
  227. package/ui/Blocks/CommonGrid/storybook/stories/complexWithPaginationAndRedux.stories.d.ts +0 -41
  228. package/ui/Blocks/CommonGrid/storybook/stories/default.stories.d.ts +0 -6
  229. package/ui/Blocks/CommonGrid/storybook/stories/gridStates.stories.d.ts +0 -8
  230. package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNoScrollLayout.stories.d.ts +0 -10
  231. package/ui/Blocks/CommonGrid/storybook/stories/manyColumnsNormalLayout.stories.d.ts +0 -10
  232. package/ui/Blocks/CommonGrid/storybook/stories/styledCommonGrid.stories.d.ts +0 -6
  233. package/ui/Blocks/CommonGrid/storybook/stories/withCustomGridActions.stories.d.ts +0 -10
  234. package/ui/Blocks/CommonGrid/storybook/stories/withForcedCheckboxes.stories.d.ts +0 -14
  235. package/ui/Blocks/CommonGrid/storybook/stories/withQuickFilter.stories.d.ts +0 -11
  236. package/ui/Blocks/CornerDialog/stories/CornerDialog.stories.d.ts +0 -13
  237. package/ui/Blocks/Header/stories/Header.stories.d.ts +0 -52
  238. package/ui/Blocks/HidePrint/stories/HidePrint.stories.d.ts +0 -12
  239. package/ui/Blocks/ImageList/stories/ImageList.stories.d.ts +0 -14
  240. package/ui/Blocks/LanguageSwitch/stories/LanguageSwith.stories.d.ts +0 -10
  241. package/ui/Blocks/LightBox/stories/LightBox.stories.d.ts +0 -10
  242. package/ui/Blocks/LoginPage/stories/LoginPage.stories.d.ts +0 -10
  243. package/ui/Blocks/Modal/stories/Modal.stories.d.ts +0 -28
  244. package/ui/Blocks/Popover/stories/Popover.stories.d.ts +0 -16
  245. package/ui/Blocks/Scheduler/stories/Scheduler.stories.d.ts +0 -7
  246. package/ui/Blocks/SideMenu/stories/SideMenu.stories.d.ts +0 -11
  247. package/ui/Blocks/Stepper/stories/Stepper.stories.d.ts +0 -9
  248. package/ui/Blocks/Table/stories/Table.stories.d.ts +0 -12
  249. package/ui/Blocks/Tabs/stories/Tabs.stories.d.ts +0 -12
  250. package/ui/Elements/Alert/stories/Alert.stories.d.ts +0 -17
  251. package/ui/Elements/AsyncSelect/stories/AsyncSelect.stories.d.ts +0 -10
  252. package/ui/Elements/Avatar/stories/Avatar.stories.d.ts +0 -11
  253. package/ui/Elements/Badge/stories/Badge.stories.d.ts +0 -12
  254. package/ui/Elements/BarChartSymbol/stories/BarChartSymbol.stories.d.ts +0 -12
  255. package/ui/Elements/BorderedBox/stories/BorderedBox.stories.d.ts +0 -10
  256. package/ui/Elements/Button/stories/Button.stories.d.ts +0 -28
  257. package/ui/Elements/Card/stories/Card.stories.d.ts +0 -13
  258. package/ui/Elements/CheckedCircle/storries/CheckedCircle.stories.d.ts +0 -16
  259. package/ui/Elements/DatePicker/stories/DatePicker.stories.d.ts +0 -11
  260. package/ui/Elements/Dropdown/stories/Dropdown.stories.d.ts +0 -10
  261. package/ui/Elements/DropdownMenu/stories/DropdownMenu.stories.d.ts +0 -10
  262. package/ui/Elements/DropdownSelect/stories/DropdownSelect.stories.d.ts +0 -22
  263. package/ui/Elements/ErrorMessage/stories/ErrorMessage.stories.d.ts +0 -11
  264. package/ui/Elements/HighlightBox/stories/HighlightBox.stories.d.ts +0 -31
  265. package/ui/Elements/Icon/stories/BadgeIcon.stories.d.ts +0 -28
  266. package/ui/Elements/Icon/stories/Icon.stories.d.ts +0 -15
  267. package/ui/Elements/Image/stories/Image.stories.d.ts +0 -13
  268. package/ui/Elements/Label/stories/Label.stories.d.ts +0 -13
  269. package/ui/Elements/Line/stories/Line.stories.d.ts +0 -16
  270. package/ui/Elements/Link/stories/Link.stories.d.ts +0 -30
  271. package/ui/Elements/Logo/stories/Logo.stories.d.ts +0 -37
  272. package/ui/Elements/Pagination/stories/Pagination.stories.d.ts +0 -13
  273. package/ui/Elements/Portal/stories/Portal.stories.d.ts +0 -11
  274. package/ui/Elements/ProgressBar/stories/ProgressBar.stories.d.ts +0 -18
  275. package/ui/Elements/Select/stories/Select.stories.d.ts +0 -9
  276. package/ui/Elements/SimpleLink/stories/SimpleLink.stories.d.ts +0 -13
  277. package/ui/Elements/SingleSelect/stories/SingleSelect.stories.d.ts +0 -10
  278. package/ui/Elements/SpaceAround/stories/SpaceAround.stories.d.ts +0 -11
  279. package/ui/Elements/Spinner/stories/Spinner.stories.d.ts +0 -19
  280. package/ui/Elements/Table/stories/Table.stories.d.ts +0 -8
  281. package/ui/Elements/Tag/stories/Tag.stories.d.ts +0 -19
  282. package/ui/Elements/Text/stories/Text.stories.d.ts +0 -15
  283. package/ui/Elements/Toast/stories/Toast.stories.d.ts +0 -13
  284. package/ui/Elements/Toggle/stories/Toggle.stories.d.ts +0 -16
  285. package/ui/Elements/Tooltip/stories/Tooltip.stories.d.ts +0 -10
  286. package/ui/Elements/Typography/stories/Typography.stories.d.ts +0 -20
  287. package/ui/Forms/Checkbox/stories/Checkbox.stories.d.ts +0 -13
  288. package/ui/Forms/Input/stories/Input.stories.d.ts +0 -18
  289. package/ui/Forms/RadioButton/stories/RadioButton.stories.d.ts +0 -13
  290. package/ui/utils/KeyPress/KeyPress.stories.d.ts +0 -10
@@ -0,0 +1,93 @@
1
+ import styles_default from "../../../styles.js";
2
+ import LoadingBoundary from "../../../Hoc/LoadingBoundary.js";
3
+ import NoData_default from "../../NoData/index.js";
4
+ import PaginatorLocation from "./components/PaginatorLocation.js";
5
+ import styles_default$1 from "./styles.js";
6
+ import PaginatorList from "./components/PaginatorList.js";
7
+ import TableCell, { getColor } from "./components/TableCell.js";
8
+ import { usePages } from "./hooks/usePages.js";
9
+ import { useSort } from "./hooks/useSort.js";
10
+ import React, { useCallback, useRef } from "react";
11
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
12
+ //#region packages/ui/Modules/Dashboard/components/Widgets/Table/Table.tsx
13
+ const Table = ({ data = [], columns = [], isLoading, error, onValueClick, onChange, onSaveConfigProps, config = {}, hasPages = true, hasServerPages = false, hasSorting = true, hasServerSorting = false, innerRef, returnWidgetWithPaginationHeight, minRows, serverTotal, components }) => {
14
+ const onClick = useCallback((row, columnName) => () => onValueClick?.(row, columnName, config), [onValueClick, config]);
15
+ const { toggleSort, sort, sortedData } = useSort(data, !hasServerSorting, config?.sort);
16
+ const [tableRowRef, tHeadRef, paginatorRef] = [
17
+ useRef(null),
18
+ useRef(null),
19
+ useRef(null)
20
+ ];
21
+ const { slicedData, page, from, to, perPage, setPage, pages, totalHeight } = usePages(sortedData, hasPages, innerRef, tHeadRef, paginatorRef, tableRowRef, minRows, hasServerPages, serverTotal);
22
+ const CustomPagination = components?.pagination;
23
+ React.useEffect(() => {
24
+ onChange?.(sort, {
25
+ page,
26
+ from,
27
+ to,
28
+ perPage
29
+ });
30
+ }, [
31
+ sort,
32
+ pages,
33
+ page,
34
+ from,
35
+ to,
36
+ perPage
37
+ ]);
38
+ React.useEffect(() => {
39
+ returnWidgetWithPaginationHeight?.(totalHeight);
40
+ }, [totalHeight]);
41
+ React.useEffect(() => {
42
+ if (perPage > 0) onSaveConfigProps?.({
43
+ perPage,
44
+ ...Object.keys(sort || {}).length > 0 ? { sort } : {}
45
+ });
46
+ }, [perPage, sort]);
47
+ return /* @__PURE__ */ jsx(LoadingBoundary, {
48
+ isLoading,
49
+ error,
50
+ children: /* @__PURE__ */ jsxs(styles_default.ItemContent, {
51
+ ref: innerRef,
52
+ children: [
53
+ (!data || data.length === 0) && /* @__PURE__ */ jsx(NoData_default, {}),
54
+ /* @__PURE__ */ jsxs(styles_default$1.Table, {
55
+ cellSpacing: "0",
56
+ cellPadding: "0",
57
+ children: [/* @__PURE__ */ jsx("thead", { children: /* @__PURE__ */ jsx("tr", {
58
+ ref: tHeadRef,
59
+ children: columns?.map?.((column, i) => /* @__PURE__ */ jsx(styles_default$1.Th, {
60
+ onClick: hasSorting ? toggleSort(column.key) : void 0,
61
+ sort: sort?.[column.key],
62
+ children: column.label
63
+ }, `column-${column.key}-${i}`))
64
+ }) }), /* @__PURE__ */ jsx("tbody", { children: slicedData.map((row) => /* @__PURE__ */ jsx(styles_default$1.Tr, {
65
+ ref: tableRowRef,
66
+ children: columns?.map?.((column) => /* @__PURE__ */ jsx(styles_default$1.Td, {
67
+ onClick: onValueClick && onClick(row, column.key),
68
+ color: getColor(config, column.key, row[column.key]),
69
+ children: /* @__PURE__ */ jsx(TableCell, {
70
+ data: row[column.key],
71
+ component: column.component
72
+ })
73
+ }, `row-${row.id}-column-${column.label}`))
74
+ }, `row-${row.id}`)) })]
75
+ }),
76
+ /* @__PURE__ */ jsxs(styles_default$1.Paginator, {
77
+ ref: paginatorRef,
78
+ children: [hasPages && perPage > 0 && !components?.pagination && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(PaginatorLocation, {
79
+ from,
80
+ to,
81
+ total: serverTotal || data.length
82
+ }), /* @__PURE__ */ jsx(PaginatorList, {
83
+ total: pages,
84
+ page,
85
+ onChange: setPage
86
+ })] }), hasPages && perPage > 0 && components?.pagination && /* @__PURE__ */ jsx(CustomPagination, { perPage })]
87
+ })
88
+ ]
89
+ })
90
+ });
91
+ };
92
+ //#endregion
93
+ export { Table as default };
@@ -0,0 +1,8 @@
1
+ import type { JSX } from 'react';
2
+ export interface IconLabelCellProps {
3
+ icon?: string;
4
+ label?: string;
5
+ text?: string;
6
+ iconRight?: boolean;
7
+ }
8
+ export declare const IconLabelCell: ({ icon, label, text, iconRight }: IconLabelCellProps) => JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { __exportAll } from "../../../../../../_virtual/_rolldown/runtime.js";
2
+ import styles_default from "../styles.js";
3
+ import "react";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ //#region packages/ui/Modules/Dashboard/components/Widgets/Table/components/IconLabelCell.tsx
6
+ var IconLabelCell_exports = /* @__PURE__ */ __exportAll({ IconLabelCell: () => IconLabelCell });
7
+ const IconLabelCell = ({ icon, label, text, iconRight = false }) => /* @__PURE__ */ jsxs(styles_default.IconLabelCell, { children: [
8
+ icon && !iconRight && /* @__PURE__ */ jsx(styles_default.CellIcon, {
9
+ iconRight,
10
+ children: icon
11
+ }),
12
+ /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx(styles_default.CellLabel, { children: label }), /* @__PURE__ */ jsx(styles_default.CellText, { children: text })] }),
13
+ icon && iconRight && /* @__PURE__ */ jsx(styles_default.CellIcon, {
14
+ iconRight,
15
+ children: icon
16
+ })
17
+ ] });
18
+ //#endregion
19
+ export { IconLabelCell, IconLabelCell_exports };
@@ -0,0 +1,9 @@
1
+ import type { JSX } from 'react';
2
+ interface PaginatorListProps {
3
+ total: number;
4
+ page: number;
5
+ pagins?: number;
6
+ onChange: (page: number) => void;
7
+ }
8
+ declare const PaginatorList: ({ total, pagins, onChange, page }: PaginatorListProps) => JSX.Element | null;
9
+ export default PaginatorList;
@@ -0,0 +1,31 @@
1
+ import styles_default from "../styles.js";
2
+ import { useCallback } from "react";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
+ //#region packages/ui/Modules/Dashboard/components/Widgets/Table/components/PaginatorList.tsx
5
+ const PaginatorList = ({ total, pagins = 7, onChange, page }) => {
6
+ const max = Math.min(page + pagins + 1, total);
7
+ const min = Math.round(Math.max(page - pagins / 2, 0));
8
+ const pages = Math.min(max - min, pagins);
9
+ const items = new Array(pages).fill(1).map((_, i) => i + min);
10
+ const onClick = useCallback((index) => () => onChange(index), [onChange]);
11
+ const onPreviousClick = useCallback(() => onChange(items[0] - 1), [items, onChange]);
12
+ const onNextClick = useCallback(() => onChange(page + 1), [page, onChange]);
13
+ if (total <= 1) return null;
14
+ return /* @__PURE__ */ jsxs("div", { children: [
15
+ items[0] > 0 && /* @__PURE__ */ jsx(styles_default.PaginatorItem, {
16
+ onClick: onPreviousClick,
17
+ children: "❮ "
18
+ }),
19
+ items.map((value) => /* @__PURE__ */ jsxs(styles_default.PaginatorItem, {
20
+ onClick: onClick(value),
21
+ selected: value === page,
22
+ children: [value + 1, " "]
23
+ }, value)),
24
+ page + 1 < total && /* @__PURE__ */ jsx(styles_default.PaginatorItem, {
25
+ onClick: onNextClick,
26
+ children: "❯"
27
+ })
28
+ ] });
29
+ };
30
+ //#endregion
31
+ export { PaginatorList as default };
@@ -0,0 +1,8 @@
1
+ import type { JSX } from 'react';
2
+ interface PaginatorLocationProps {
3
+ from: number;
4
+ to: number;
5
+ total: number;
6
+ }
7
+ declare const PaginatorLocation: ({ from, to, total }: PaginatorLocationProps) => JSX.Element;
8
+ export default PaginatorLocation;
@@ -0,0 +1,15 @@
1
+ import "react";
2
+ import { jsxs } from "react/jsx-runtime";
3
+ //#region packages/ui/Modules/Dashboard/components/Widgets/Table/components/PaginatorLocation.tsx
4
+ const PaginatorLocation = ({ from, to, total }) => /* @__PURE__ */ jsxs("span", { children: [
5
+ /* @__PURE__ */ jsxs("b", { children: [
6
+ from + 1,
7
+ "–",
8
+ to
9
+ ] }),
10
+ " ",
11
+ "of ",
12
+ total
13
+ ] });
14
+ //#endregion
15
+ export { PaginatorLocation as default };
@@ -0,0 +1,6 @@
1
+ import type { JSX } from 'react';
2
+ import { WidgetConfig } from '../../../../types';
3
+ import { TableCellProps } from '../types';
4
+ declare const TableCell: ({ component: Cell, data }: TableCellProps) => JSX.Element;
5
+ export declare const getColor: (config: WidgetConfig, columnKey: string, columnValue: any) => string;
6
+ export default TableCell;
@@ -0,0 +1,33 @@
1
+ import { IconLabelCell } from "./IconLabelCell.js";
2
+ import "react";
3
+ import { jsx } from "react/jsx-runtime";
4
+ //#region packages/ui/Modules/Dashboard/components/Widgets/Table/components/TableCell.tsx
5
+ const TableCell = ({ component: Cell = IconLabelCell, data }) => /* @__PURE__ */ jsx(Cell, { ...data });
6
+ const getColor = (config, columnKey, columnValue) => {
7
+ const isAllColumns = config?.conditions?.[0]?.column === "all";
8
+ const conditions = config?.conditions?.filter((c) => c.column === columnKey);
9
+ const value = columnValue !== void 0 && "value" in columnValue ? columnValue.value : columnValue;
10
+ let color = "";
11
+ const setColor = (condition) => {
12
+ const isNumberComparison = !Number.isNaN(Number(value)) && !Number.isNaN(Number(condition.value));
13
+ switch (condition.comparator) {
14
+ case ">":
15
+ if (isNumberComparison && value > condition.value) color = condition.color;
16
+ break;
17
+ case "<":
18
+ if (isNumberComparison && value < condition.value) color = condition.color;
19
+ break;
20
+ case "=":
21
+ if (String(value) === String(condition.value)) color = condition.color;
22
+ break;
23
+ default: break;
24
+ }
25
+ };
26
+ conditions?.forEach((condition) => {
27
+ setColor(condition);
28
+ });
29
+ if (isAllColumns) setColor(config.conditions[0]);
30
+ return color;
31
+ };
32
+ //#endregion
33
+ export { TableCell as default, getColor };
@@ -0,0 +1,10 @@
1
+ import { ConfigProps } from '../../../../types';
2
+ interface UseCondition {
3
+ (onChange: ConfigProps['onChange'], config: ConfigProps['config']): [
4
+ (e: React.MouseEvent<HTMLElement>) => void,
5
+ (index: number) => (e: React.MouseEvent<HTMLElement>) => void,
6
+ (index: number, name: string) => (e: React.ChangeEvent<HTMLSelectElement | HTMLInputElement>) => void
7
+ ];
8
+ }
9
+ declare const useCondition: UseCondition;
10
+ export default useCondition;
@@ -0,0 +1,27 @@
1
+ import { useCallback } from "react";
2
+ //#region packages/ui/Modules/Dashboard/components/Widgets/Table/hooks/useCondition.ts
3
+ const useCondition = (onChange, config) => {
4
+ return [
5
+ useCallback(() => onChange({
6
+ ...config,
7
+ conditions: [...config?.conditions || [], {}]
8
+ }), [onChange, config]),
9
+ useCallback((index) => () => onChange({
10
+ ...config,
11
+ conditions: config.conditions.filter((_, i) => i !== index)
12
+ }), [onChange, config]),
13
+ useCallback((index, name) => (e) => {
14
+ const newConditions = [...config.conditions];
15
+ newConditions[index] = {
16
+ ...newConditions[index],
17
+ [name]: e.target.value
18
+ };
19
+ onChange({
20
+ ...config,
21
+ conditions: newConditions
22
+ });
23
+ }, [config])
24
+ ];
25
+ };
26
+ //#endregion
27
+ export { useCondition as default };
@@ -0,0 +1,17 @@
1
+ import { RefObject } from 'react';
2
+ import { TableRow } from '../types';
3
+ interface UsePagesProps {
4
+ (data: TableRow[], enabled: boolean, wrapperRef: RefObject<HTMLDivElement> | ((node: HTMLDivElement) => void) | undefined, tHeadRef: RefObject<HTMLTableRowElement | null>, paginatorRef: RefObject<HTMLDivElement | null>, tableRowRef: RefObject<HTMLTableRowElement | null>, minRows?: number, useServer?: boolean, serverTotal?: number): Paginator;
5
+ }
6
+ type Paginator = {
7
+ slicedData: TableRow[];
8
+ pages: number;
9
+ page: number;
10
+ from: number;
11
+ to: number;
12
+ perPage: number;
13
+ setPage: (page: number) => void;
14
+ totalHeight: number;
15
+ };
16
+ export declare const usePages: UsePagesProps;
17
+ export {};
@@ -0,0 +1,27 @@
1
+ import { useResize } from "../../../../hooks/useResize.js";
2
+ import { useState } from "react";
3
+ //#region packages/ui/Modules/Dashboard/components/Widgets/Table/hooks/usePages.ts
4
+ const usePages = (data, enabled, wrapperRef, tHeadRef, paginatorRef, tableRowRef, minRows = 1, useServer, serverTotal) => {
5
+ const { height: wrapperHeight } = useResize(wrapperRef);
6
+ const { height: tableHeadHeight } = useResize(tHeadRef);
7
+ const { height: paginatorHeight } = useResize(paginatorRef);
8
+ const { height: rowHeight } = useResize(tableRowRef);
9
+ const [page, setPage] = useState(0);
10
+ const total = useServer ? serverTotal || 0 : data.length;
11
+ const space = Math.max(wrapperHeight - tableHeadHeight - paginatorHeight - 8, 0);
12
+ const perPage = rowHeight ? Math.floor(space / (rowHeight || 1)) || minRows : 0;
13
+ const from = page * perPage;
14
+ const to = Math.min(from + perPage, total);
15
+ return {
16
+ slicedData: enabled && perPage > 0 && !useServer ? data.slice(from, to) : data,
17
+ pages: Math.ceil(total / perPage),
18
+ page,
19
+ from,
20
+ to,
21
+ perPage,
22
+ setPage,
23
+ totalHeight: tableHeadHeight + paginatorHeight + (to - from) * rowHeight
24
+ };
25
+ };
26
+ //#endregion
27
+ export { usePages };
@@ -0,0 +1,10 @@
1
+ import { TableRow, WidgetSort } from '../types';
2
+ interface UseSort {
3
+ (data: TableRow[], enabled: boolean, initialSort: WidgetSort | undefined): {
4
+ toggleSort: (column: string) => () => void;
5
+ sort: WidgetSort | null;
6
+ sortedData: TableRow[];
7
+ };
8
+ }
9
+ export declare const useSort: UseSort;
10
+ export {};
@@ -0,0 +1,31 @@
1
+ import React, { useEffect } from "react";
2
+ import omit from "lodash/omit";
3
+ import orderBy from "lodash/orderBy";
4
+ //#region packages/ui/Modules/Dashboard/components/Widgets/Table/hooks/useSort.ts
5
+ const initialSortValue = {};
6
+ const useSort = (data, enabled, initialSort = initialSortValue) => {
7
+ const [sort, setSort] = React.useState(initialSort);
8
+ const toggleSort = React.useCallback((column) => () => {
9
+ if (sort[column] === "desc") setSort(omit(sort, [column]));
10
+ else if (sort[column] === "asc") setSort({
11
+ ...sort,
12
+ [column]: "desc"
13
+ });
14
+ else setSort({ [column]: "asc" });
15
+ }, [sort]);
16
+ useEffect(() => {
17
+ setSort(initialSort);
18
+ }, [initialSort]);
19
+ if (enabled) return {
20
+ toggleSort,
21
+ sort,
22
+ sortedData: orderBy(data, Object.keys(sort).map((column) => `${column}.value`), Object.values(sort))
23
+ };
24
+ return {
25
+ toggleSort,
26
+ sort,
27
+ sortedData: data
28
+ };
29
+ };
30
+ //#endregion
31
+ export { useSort };
@@ -0,0 +1,5 @@
1
+ import Table from './Table';
2
+ export * from './Table';
3
+ export * as components from './components/IconLabelCell';
4
+ export * from './Config';
5
+ export default Table;
@@ -0,0 +1,7 @@
1
+ import { IconLabelCell_exports } from "./components/IconLabelCell.js";
2
+ import Table from "./Table.js";
3
+ import { Config } from "./Config.js";
4
+ //#region packages/ui/Modules/Dashboard/components/Widgets/Table/index.tsx
5
+ var Table_default = Table;
6
+ //#endregion
7
+ export { Config, IconLabelCell_exports as components, Table_default as default };
@@ -0,0 +1,73 @@
1
+ import { components } from '.';
2
+ export declare const tableData: {
3
+ id: string;
4
+ company: {
5
+ icon: string;
6
+ label: string;
7
+ value: string;
8
+ text: string;
9
+ };
10
+ category: {
11
+ icon: string;
12
+ label: string;
13
+ value: string;
14
+ };
15
+ views: {
16
+ label: string;
17
+ value: number;
18
+ text: string;
19
+ };
20
+ revenue: {
21
+ label: string;
22
+ value: number;
23
+ };
24
+ sales: {
25
+ icon: string;
26
+ label: string;
27
+ value: number;
28
+ };
29
+ }[];
30
+ export declare const tableBigData: {
31
+ id: number;
32
+ readableId: {
33
+ text: number;
34
+ };
35
+ company: {
36
+ icon: string;
37
+ label: string;
38
+ value: string;
39
+ text: string;
40
+ };
41
+ category: {
42
+ icon: string;
43
+ label: string;
44
+ value: string;
45
+ };
46
+ views: {
47
+ label: number;
48
+ value: number;
49
+ text: string;
50
+ };
51
+ revenue: {
52
+ label: string;
53
+ value: number;
54
+ };
55
+ sales: {
56
+ icon: string;
57
+ label: string;
58
+ value: number;
59
+ };
60
+ }[];
61
+ export declare const tableColumns: ({
62
+ key: string;
63
+ label: string;
64
+ component?: undefined;
65
+ } | {
66
+ key: string;
67
+ label: string;
68
+ component: ({ icon, label, text, iconRight }: components.IconLabelCellProps) => import("react").JSX.Element;
69
+ } | {
70
+ key: string;
71
+ label: string;
72
+ component: import("react").ComponentType<components.IconLabelCellProps>;
73
+ })[];
@@ -0,0 +1,211 @@
1
+ import { IconLabelCell } from "./components/IconLabelCell.js";
2
+ import "./index.js";
3
+ import { withProps } from "../../../Hoc/withProps.js";
4
+ //#region packages/ui/Modules/Dashboard/components/Widgets/Table/storybook.sample.ts
5
+ const tableData = [
6
+ {
7
+ id: "1",
8
+ company: {
9
+ icon: "🎸",
10
+ label: "Dixons",
11
+ value: "Dixons",
12
+ text: "meguc@ruj.io"
13
+ },
14
+ category: {
15
+ icon: "📕",
16
+ label: "Technology",
17
+ value: "Technology"
18
+ },
19
+ views: {
20
+ label: "23.5k",
21
+ value: 23500,
22
+ text: "in 24 hours"
23
+ },
24
+ revenue: {
25
+ label: "$891.2",
26
+ value: 891.2
27
+ },
28
+ sales: {
29
+ icon: "📈",
30
+ label: "68%",
31
+ value: 68
32
+ }
33
+ },
34
+ {
35
+ id: "2",
36
+ company: {
37
+ icon: "🧯",
38
+ label: "Motels",
39
+ value: "Motels",
40
+ text: "vaxav@hodzi.co.uk"
41
+ },
42
+ category: {
43
+ icon: "📗",
44
+ label: "Technology",
45
+ value: "Technology"
46
+ },
47
+ views: {
48
+ label: "78k",
49
+ value: 78e3,
50
+ text: "in 2 days"
51
+ },
52
+ revenue: {
53
+ label: "$668.51",
54
+ value: 668.51
55
+ },
56
+ sales: {
57
+ icon: "📉",
58
+ label: "68%",
59
+ value: 68
60
+ }
61
+ },
62
+ {
63
+ id: "3",
64
+ company: {
65
+ icon: "🪆",
66
+ label: "Zipcar",
67
+ value: "Zipcar",
68
+ text: "davcilse@is.gov"
69
+ },
70
+ category: {
71
+ icon: "📘",
72
+ label: "Technology",
73
+ value: "Technology"
74
+ },
75
+ views: {
76
+ label: "162",
77
+ value: 162,
78
+ text: "in 5 days"
79
+ },
80
+ revenue: {
81
+ label: "$422.29",
82
+ value: 422.29
83
+ },
84
+ sales: {
85
+ icon: "📉",
86
+ label: "68%",
87
+ value: 68
88
+ }
89
+ },
90
+ {
91
+ id: "4",
92
+ company: {
93
+ icon: "🧸",
94
+ label: "Owning",
95
+ value: "Owning",
96
+ text: "us@cuhil.gov"
97
+ },
98
+ category: {
99
+ icon: "📕",
100
+ label: "Technology",
101
+ value: "Technology"
102
+ },
103
+ views: {
104
+ label: "214",
105
+ value: 214,
106
+ text: "in 24 hours"
107
+ },
108
+ revenue: {
109
+ label: "$291.01",
110
+ value: 291.01
111
+ },
112
+ sales: {
113
+ icon: "📉",
114
+ label: "68%",
115
+ value: 68
116
+ }
117
+ }
118
+ ];
119
+ const tableBigData = Array.from({ length: 101 }, (i, k) => {
120
+ const company = [
121
+ "Google",
122
+ "Dixons",
123
+ "Motels",
124
+ "Owning",
125
+ "Zipcar"
126
+ ][Math.round(Math.random() * 4)];
127
+ const category = [
128
+ "Tea",
129
+ "Coffee",
130
+ "Beer",
131
+ "Water",
132
+ "Milk"
133
+ ][Math.round(Math.random() * 4)];
134
+ const views = Math.round(Math.random() * 240);
135
+ const revenue = Math.round(Math.random() * 540);
136
+ const sales = Math.round(Math.random() * 100);
137
+ return {
138
+ id: k,
139
+ readableId: { text: k },
140
+ company: {
141
+ icon: [
142
+ "🧸",
143
+ "🪆",
144
+ "🧯",
145
+ "🎸",
146
+ "📕"
147
+ ][Math.round(Math.random() * 4)],
148
+ label: company,
149
+ value: company,
150
+ text: "us@cuhil.gov"
151
+ },
152
+ category: {
153
+ icon: [
154
+ "🧸",
155
+ "🪆",
156
+ "🧯",
157
+ "🎸",
158
+ "📕"
159
+ ][Math.round(Math.random() * 4)],
160
+ label: category,
161
+ value: category
162
+ },
163
+ views: {
164
+ label: views,
165
+ value: views,
166
+ text: "in 24 hours"
167
+ },
168
+ revenue: {
169
+ label: `${revenue}`,
170
+ value: revenue
171
+ },
172
+ sales: {
173
+ icon: "📉",
174
+ label: `${sales}%`,
175
+ value: sales
176
+ }
177
+ };
178
+ });
179
+ const tableColumns = [
180
+ {
181
+ key: "readableId",
182
+ label: "id"
183
+ },
184
+ {
185
+ key: "company",
186
+ label: "COMPANY",
187
+ component: IconLabelCell
188
+ },
189
+ {
190
+ key: "category",
191
+ label: "CATEGORY",
192
+ component: IconLabelCell
193
+ },
194
+ {
195
+ key: "views",
196
+ label: "VIEWS",
197
+ component: IconLabelCell
198
+ },
199
+ {
200
+ key: "revenue",
201
+ label: "REVENUE",
202
+ component: IconLabelCell
203
+ },
204
+ {
205
+ key: "sales",
206
+ label: "SALES",
207
+ component: withProps({ iconRight: true })(IconLabelCell)
208
+ }
209
+ ];
210
+ //#endregion
211
+ export { tableBigData, tableColumns, tableData };