@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,8 @@
1
+ import type { JSX } from 'react';
2
+ interface ItemConfigProps {
3
+ onRemove: () => void;
4
+ onSave: () => void;
5
+ onCancel: () => void;
6
+ }
7
+ declare const ItemConfigControls: ({ onCancel, onSave, onRemove }: ItemConfigProps) => JSX.Element;
8
+ export default ItemConfigControls;
@@ -0,0 +1,31 @@
1
+ import styles_default from "../../../../styles.js";
2
+ import Text from "../../../Text/Text.js";
3
+ import ComponentContext from "../../../../context/ComponentContext.js";
4
+ import React from "react";
5
+ import { x } from "@xstyled/styled-components";
6
+ import { jsx, jsxs } from "react/jsx-runtime";
7
+ //#region packages/ui/Modules/Dashboard/components/Layout/components/ItemConfig/ItemConfigControls.tsx
8
+ const ItemConfigControls = ({ onCancel, onSave, onRemove }) => {
9
+ const { Button } = React.useContext(ComponentContext);
10
+ return /* @__PURE__ */ jsxs(styles_default.WidgetConfigButtons, { children: [/* @__PURE__ */ jsx(Button, {
11
+ onClick: onRemove,
12
+ children: /* @__PURE__ */ jsx(Text, { code: "buttons.removeWidget" })
13
+ }), /* @__PURE__ */ jsxs(x.div, {
14
+ display: "flex",
15
+ gap: "8px",
16
+ children: [
17
+ /* @__PURE__ */ jsx(Button, {
18
+ onClick: onCancel,
19
+ appearance: "secondary",
20
+ children: /* @__PURE__ */ jsx(Text, { code: "buttons.cancel" })
21
+ }),
22
+ /* @__PURE__ */ jsx(Button, {
23
+ onClick: onSave,
24
+ children: /* @__PURE__ */ jsx(Text, { code: "buttons.save" })
25
+ }),
26
+ " "
27
+ ]
28
+ })] });
29
+ };
30
+ //#endregion
31
+ export { ItemConfigControls as default };
@@ -0,0 +1,2 @@
1
+ import ItemConfig from './ItemConfig';
2
+ export default ItemConfig;
@@ -0,0 +1,5 @@
1
+ import ItemConfig from "./ItemConfig.js";
2
+ //#region packages/ui/Modules/Dashboard/components/Layout/components/ItemConfig/index.ts
3
+ var ItemConfig_default = ItemConfig;
4
+ //#endregion
5
+ export { ItemConfig_default as default };
@@ -0,0 +1,12 @@
1
+ import { RefObject } from 'react';
2
+ import type { JSX } from 'react';
3
+ import { WidgetDefinition, WidgetConfig } from '../../../../types';
4
+ type DashboardItemProps = {
5
+ widget: WidgetDefinition;
6
+ config: WidgetConfig;
7
+ toggleConfigOpen: () => void;
8
+ dragHandleClassName: string;
9
+ headerRef: RefObject<HTMLDivElement>;
10
+ };
11
+ declare const ItemHeader: ({ widget, config, toggleConfigOpen, dragHandleClassName, headerRef, }: DashboardItemProps) => JSX.Element;
12
+ export default ItemHeader;
@@ -0,0 +1,27 @@
1
+ import styles_default from "../../../../styles.js";
2
+ import { jsx, jsxs } from "react/jsx-runtime";
3
+ import MoveSvg from "../../../../assets/move.svg";
4
+ //#region packages/ui/Modules/Dashboard/components/Layout/components/ItemHeader/ItemHeader.tsx
5
+ const ItemHeader = ({ widget, config, toggleConfigOpen, dragHandleClassName, headerRef }) => {
6
+ const name = config?.name || widget.name;
7
+ const widgetIcon = widget.icon || null;
8
+ return /* @__PURE__ */ jsxs("div", {
9
+ ref: headerRef,
10
+ children: [
11
+ /* @__PURE__ */ jsx(styles_default.ItemMoveWrapper, {
12
+ className: dragHandleClassName,
13
+ children: /* @__PURE__ */ jsx("img", {
14
+ src: MoveSvg,
15
+ alt: "move-icon"
16
+ })
17
+ }),
18
+ /* @__PURE__ */ jsx(styles_default.ItemPanelButton, {
19
+ onClick: toggleConfigOpen,
20
+ children: "⋯"
21
+ }),
22
+ name && /* @__PURE__ */ jsxs(styles_default.ItemName, { children: [widgetIcon, name] })
23
+ ]
24
+ });
25
+ };
26
+ //#endregion
27
+ export { ItemHeader as default };
@@ -0,0 +1,2 @@
1
+ import ItemHeader from './ItemHeader';
2
+ export default ItemHeader;
@@ -0,0 +1,5 @@
1
+ import ItemHeader from "./ItemHeader.js";
2
+ //#region packages/ui/Modules/Dashboard/components/Layout/components/ItemHeader/index.tsx
3
+ var ItemHeader_default = ItemHeader;
4
+ //#endregion
5
+ export { ItemHeader_default as default };
@@ -0,0 +1,2 @@
1
+ import LayoutContainer from './LayoutContainer';
2
+ export default LayoutContainer;
@@ -0,0 +1,5 @@
1
+ import LayoutContainer from "./LayoutContainer.js";
2
+ //#region packages/ui/Modules/Dashboard/components/Layout/index.tsx
3
+ var Layout_default = LayoutContainer;
4
+ //#endregion
5
+ export { Layout_default as default };
@@ -0,0 +1,2 @@
1
+ declare const NoData: () => import("react/jsx-runtime").JSX.Element;
2
+ export default NoData;
@@ -0,0 +1,14 @@
1
+ import Icon from "../../../../Elements/Icon/Icon.js";
2
+ import styles_default from "../../styles.js";
3
+ import Text from "../Text/Text.js";
4
+ import "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ //#region packages/ui/Modules/Dashboard/components/NoData/NoData.tsx
7
+ const NoData = () => {
8
+ return /* @__PURE__ */ jsxs(styles_default.NoData, { children: [/* @__PURE__ */ jsx(Icon, {
9
+ icon: "search",
10
+ size: "64px"
11
+ }), /* @__PURE__ */ jsx(Text, { code: "widgets.noData" })] });
12
+ };
13
+ //#endregion
14
+ export { NoData as default };
@@ -0,0 +1,2 @@
1
+ import NoData from './NoData';
2
+ export default NoData;
@@ -0,0 +1,5 @@
1
+ import NoData from "./NoData.js";
2
+ //#region packages/ui/Modules/Dashboard/components/NoData/index.ts
3
+ var NoData_default = NoData;
4
+ //#endregion
5
+ export { NoData_default as default };
@@ -0,0 +1,8 @@
1
+ import type { JSX } from 'react';
2
+ import type { WidgetDefinition } from '../../types';
3
+ export interface PickerProps {
4
+ onAdd: (code: string) => void;
5
+ widgetDefinitions: WidgetDefinition[];
6
+ }
7
+ declare const DashboardPicker: ({ onAdd, widgetDefinitions }: PickerProps) => JSX.Element;
8
+ export default DashboardPicker;
@@ -0,0 +1,38 @@
1
+ import Icon from "../../../../Elements/Icon/Icon.js";
2
+ import styles_default from "../../styles.js";
3
+ import Text from "../Text/Text.js";
4
+ import DashboardPickerItem from "./components/PickerItem.js";
5
+ import ComponentContext from "../../context/ComponentContext.js";
6
+ import React from "react";
7
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
8
+ //#region packages/ui/Modules/Dashboard/components/Picker/Picker.tsx
9
+ const DashboardPicker = ({ onAdd, widgetDefinitions }) => {
10
+ const { Button } = React.useContext(ComponentContext);
11
+ const [isPickerOpen, setIsPickerOpen] = React.useState(false);
12
+ const onPickerOpen = React.useCallback(() => {
13
+ setIsPickerOpen(true);
14
+ }, []);
15
+ const onClose = React.useCallback(() => {
16
+ setIsPickerOpen(false);
17
+ }, []);
18
+ const handleOnAdd = React.useCallback((code) => {
19
+ onAdd(code);
20
+ onClose();
21
+ }, []);
22
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Button, {
23
+ onClick: onPickerOpen,
24
+ children: /* @__PURE__ */ jsx(Text, { code: "buttons.addWidget" })
25
+ }), isPickerOpen && /* @__PURE__ */ jsx(styles_default.PickerWrapper, { children: /* @__PURE__ */ jsxs(styles_default.Picker, { children: [/* @__PURE__ */ jsxs(styles_default.PickerHeader, { children: [/* @__PURE__ */ jsx(Text, { code: "picker.header" }), /* @__PURE__ */ jsx(styles_default.PickerClose, {
26
+ onClick: onClose,
27
+ children: /* @__PURE__ */ jsx(Icon, {
28
+ icon: "close",
29
+ size: "16px",
30
+ fill: "gray5"
31
+ })
32
+ })] }), /* @__PURE__ */ jsx(styles_default.PickerBody, { children: (widgetDefinitions || []).map((widget) => /* @__PURE__ */ jsx(DashboardPickerItem, {
33
+ widget,
34
+ onAdd: handleOnAdd
35
+ }, widget.code)) })] }) })] });
36
+ };
37
+ //#endregion
38
+ export { DashboardPicker as default };
@@ -0,0 +1,7 @@
1
+ import type { JSX } from 'react';
2
+ import type { WidgetDefinition } from '../../types';
3
+ type PickerPropsContainer = {
4
+ widgetDefinitions: WidgetDefinition[];
5
+ };
6
+ declare const PickerContainer: ({ widgetDefinitions }: PickerPropsContainer) => JSX.Element | null;
7
+ export default PickerContainer;
@@ -0,0 +1,38 @@
1
+ import { actions } from "../../store/reducers/widgetListReducer.js";
2
+ import ComponentContext from "../../context/ComponentContext.js";
3
+ import React from "react";
4
+ import { jsx } from "react/jsx-runtime";
5
+ import { nanoid } from "nanoid";
6
+ import { useDispatch } from "react-redux";
7
+ //#region packages/ui/Modules/Dashboard/components/Picker/PickerContainer.tsx
8
+ const PickerContainer = ({ widgetDefinitions }) => {
9
+ const { Picker } = React.useContext(ComponentContext);
10
+ const dispatch = useDispatch();
11
+ return /* @__PURE__ */ jsx(Picker, {
12
+ onAdd: React.useCallback((code) => {
13
+ const widget = widgetDefinitions.find((widget) => widget.code === code);
14
+ const id = nanoid();
15
+ const layout = {
16
+ w: widget?.initWidth,
17
+ h: widget?.initHeight,
18
+ x: 0,
19
+ y: 0,
20
+ i: id,
21
+ minW: widget?.minWidth,
22
+ maxW: widget?.maxWidth,
23
+ minH: widget?.minHeight,
24
+ maxH: widget?.maxHeight,
25
+ moved: false,
26
+ resizeHandles: void 0,
27
+ static: false,
28
+ isDraggable: true,
29
+ isResizable: true,
30
+ isBounded: false
31
+ };
32
+ dispatch(actions.addWidget(code, id, layout, null));
33
+ }, [dispatch, widgetDefinitions]),
34
+ widgetDefinitions
35
+ });
36
+ };
37
+ //#endregion
38
+ export { PickerContainer as default };
@@ -0,0 +1,8 @@
1
+ import type { JSX } from 'react';
2
+ import type { WidgetDefinition } from '../../../types';
3
+ interface DashboardPickerItemProps {
4
+ widget: WidgetDefinition;
5
+ onAdd: (code: string) => void;
6
+ }
7
+ declare const DashboardPickerItem: ({ widget, onAdd }: DashboardPickerItemProps) => JSX.Element;
8
+ export default DashboardPickerItem;
@@ -0,0 +1,25 @@
1
+ import styles_default from "../../../styles.js";
2
+ import Text from "../../Text/Text.js";
3
+ import ComponentContext from "../../../context/ComponentContext.js";
4
+ import React from "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ //#region packages/ui/Modules/Dashboard/components/Picker/components/PickerItem.tsx
7
+ const DashboardPickerItem = ({ widget, onAdd }) => {
8
+ const { Button } = React.useContext(ComponentContext);
9
+ const onAddWidget = React.useCallback(() => onAdd(widget.code), [onAdd, widget.code]);
10
+ return /* @__PURE__ */ jsxs(styles_default.PickerItem, { children: [
11
+ /* @__PURE__ */ jsx("img", {
12
+ src: widget.preview,
13
+ width: "50",
14
+ height: "50",
15
+ alt: widget.name
16
+ }),
17
+ /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("span", { children: widget.name }), /* @__PURE__ */ jsx("p", { children: widget.description })] }),
18
+ /* @__PURE__ */ jsx(Button, {
19
+ onClick: onAddWidget,
20
+ children: /* @__PURE__ */ jsx(Text, { code: "buttons.addWidget" })
21
+ })
22
+ ] });
23
+ };
24
+ //#endregion
25
+ export { DashboardPickerItem as default };
@@ -0,0 +1,2 @@
1
+ import PickerContainer from './PickerContainer';
2
+ export default PickerContainer;
@@ -0,0 +1,5 @@
1
+ import PickerContainer from "./PickerContainer.js";
2
+ //#region packages/ui/Modules/Dashboard/components/Picker/index.ts
3
+ var Picker_default = PickerContainer;
4
+ //#endregion
5
+ export { Picker_default as default };
@@ -0,0 +1,7 @@
1
+ import type { JSX } from 'react';
2
+ interface TextProps {
3
+ code: string;
4
+ }
5
+ declare const Text: ({ code }: TextProps) => JSX.Element;
6
+ export declare const useText: (code: string) => string;
7
+ export default Text;
@@ -0,0 +1,14 @@
1
+ import LangContext from "../../context/LangContext.js";
2
+ import translations from "../../locale/index.js";
3
+ import React from "react";
4
+ import { Fragment, jsx } from "react/jsx-runtime";
5
+ //#region packages/ui/Modules/Dashboard/components/Text/Text.tsx
6
+ const Text = ({ code }) => {
7
+ const text = translations[React.useContext(LangContext)]?.[code];
8
+ return /* @__PURE__ */ jsx(Fragment, { children: text || code });
9
+ };
10
+ const useText = (code) => {
11
+ return translations[React.useContext(LangContext)]?.[code] || code;
12
+ };
13
+ //#endregion
14
+ export { Text as default, useText };
@@ -0,0 +1 @@
1
+ export { default } from './Text';
@@ -0,0 +1,2 @@
1
+ import Text from "./Text.js";
2
+ export { Text as default };
@@ -0,0 +1,19 @@
1
+ import React from 'react';
2
+ import type { JSX } from 'react';
3
+ import { BarDatum } from '@nivo/bar';
4
+ import { WidgetComponentProps } from '../../../types';
5
+ interface BarDataRow extends BarDatum {
6
+ id: string | number;
7
+ value: number;
8
+ label: string;
9
+ }
10
+ export type Props = WidgetComponentProps<BarDataRow[]> & {
11
+ title?: string;
12
+ subtitle?: string;
13
+ description?: string;
14
+ text?: string;
15
+ hasLegend?: boolean;
16
+ legendRowMaxLength?: number;
17
+ };
18
+ declare const _default: React.MemoExoticComponent<({ data, isLoading, error, title, subtitle, description, text, hasLegend, legendRowMaxLength, innerRef, ...barProps }: Props) => JSX.Element>;
19
+ export default _default;
@@ -0,0 +1,52 @@
1
+ import styles_default from "../../../styles.js";
2
+ import LoadingBoundary from "../../../Hoc/LoadingBoundary.js";
3
+ import NoData_default from "../../NoData/index.js";
4
+ import { createLegendData } from "../utils/legends.js";
5
+ import { createWidgetColors } from "../utils/generic.js";
6
+ import { Description, OtherText, Subtitle, Title, Wrapper, WrapperText, margin } from "./styles.js";
7
+ import React from "react";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
+ import { ResponsiveBar } from "@nivo/bar";
10
+ //#region packages/ui/Modules/Dashboard/components/Widgets/BarChart/BarChart.tsx
11
+ const defaultLegendRowMaxLength = 4;
12
+ const Bar = ({ data = [], isLoading, error, title, subtitle, description, text, hasLegend = true, legendRowMaxLength = defaultLegendRowMaxLength, innerRef, ...barProps }) => {
13
+ const colors = createWidgetColors("barChartColor", 5);
14
+ const hasText = title || subtitle || description || text;
15
+ const legends = React.useMemo(() => {
16
+ if (!hasLegend) return void 0;
17
+ return createLegendData(data, colors, legendRowMaxLength, { translateY: 70 });
18
+ }, [
19
+ hasLegend,
20
+ data,
21
+ colors
22
+ ]);
23
+ return /* @__PURE__ */ jsx(LoadingBoundary, {
24
+ isLoading,
25
+ error,
26
+ children: /* @__PURE__ */ jsx(styles_default.ItemContent, {
27
+ ref: innerRef,
28
+ children: /* @__PURE__ */ jsxs(Wrapper, { children: [
29
+ hasText && /* @__PURE__ */ jsxs(WrapperText, { children: [
30
+ /* @__PURE__ */ jsx(Title, { children: title }),
31
+ /* @__PURE__ */ jsx(Subtitle, { children: subtitle }),
32
+ /* @__PURE__ */ jsx(Description, { children: description }),
33
+ /* @__PURE__ */ jsx(OtherText, { children: text })
34
+ ] }),
35
+ (!data || data.length === 0) && /* @__PURE__ */ jsx(NoData_default, {}),
36
+ data && data.length > 0 && /* @__PURE__ */ jsx(ResponsiveBar, {
37
+ data,
38
+ isInteractive: true,
39
+ animate: true,
40
+ margin,
41
+ colors,
42
+ colorBy: "indexValue",
43
+ legends,
44
+ ...barProps
45
+ })
46
+ ] })
47
+ })
48
+ });
49
+ };
50
+ var BarChart_default = React.memo(Bar);
51
+ //#endregion
52
+ export { BarChart_default as default };
@@ -0,0 +1 @@
1
+ export declare const Config: ({ onChange, config, sources }: import("../../..").MultiConfigProps) => import("react").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { MultiConfig } from "../../Config/MultiConfig.js";
2
+ //#region packages/ui/Modules/Dashboard/components/Widgets/BarChart/Config.tsx
3
+ const Config = MultiConfig;
4
+ //#endregion
5
+ export { Config };
@@ -0,0 +1,4 @@
1
+ import BarChart from './BarChart';
2
+ export * from './BarChart';
3
+ export * from './Config';
4
+ export default BarChart;
@@ -0,0 +1,6 @@
1
+ import BarChart_default$1 from "./BarChart.js";
2
+ import { Config } from "./Config.js";
3
+ //#region packages/ui/Modules/Dashboard/components/Widgets/BarChart/index.tsx
4
+ var BarChart_default = BarChart_default$1;
5
+ //#endregion
6
+ export { Config, BarChart_default as default };
@@ -0,0 +1,12 @@
1
+ export declare const margin: {
2
+ top: number;
3
+ bottom: number;
4
+ right: number;
5
+ left: number;
6
+ };
7
+ export declare const Title: import("styled-components").StyledComponent<"div", any, {}, never>;
8
+ export declare const Subtitle: import("styled-components").StyledComponent<"div", any, {}, never>;
9
+ export declare const Description: import("styled-components").StyledComponent<"div", any, {}, never>;
10
+ export declare const OtherText: import("styled-components").StyledComponent<"div", any, {}, never>;
11
+ export declare const Wrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
12
+ export declare const WrapperText: import("styled-components").StyledComponent<"div", any, {}, never>;
@@ -0,0 +1,39 @@
1
+ import styled from "styled-components";
2
+ //#region packages/ui/Modules/Dashboard/components/Widgets/BarChart/styles.ts
3
+ const margin = {
4
+ top: 20,
5
+ bottom: 120,
6
+ right: 20,
7
+ left: 100
8
+ };
9
+ const Title = styled.div`
10
+ font-size: 30px;
11
+ color: #333;
12
+ margin-bottom: 35px;
13
+ `;
14
+ const Subtitle = styled.div`
15
+ font-size: 20px;
16
+ color: #999;
17
+ margin-bottom: 5px;
18
+ `;
19
+ const Description = styled.div`
20
+ font-size: 22px;
21
+ color: #333;
22
+ margin-bottom: 15px;
23
+ `;
24
+ const OtherText = styled.div`
25
+ font-size: 15px;
26
+ color: #aaa;
27
+ `;
28
+ const Wrapper = styled.div`
29
+ width: 100%;
30
+ height: 100%;
31
+ display: flex;
32
+ `;
33
+ const WrapperText = styled.div`
34
+ margin-right: 20px;
35
+ padding-left: 30px;
36
+ padding-top: 30px;
37
+ `;
38
+ //#endregion
39
+ export { Description, OtherText, Subtitle, Title, Wrapper, WrapperText, margin };
@@ -0,0 +1,7 @@
1
+ import React from 'react';
2
+ import { WidgetComponentProps } from '../../../types';
3
+ /**
4
+ * This is only example of widget
5
+ */
6
+ declare const ColorBox: ({ config, innerRef }: WidgetComponentProps) => React.ReactElement;
7
+ export default ColorBox;
@@ -0,0 +1,21 @@
1
+ import React from "react";
2
+ import { jsx } from "react/jsx-runtime";
3
+ //#region packages/ui/Modules/Dashboard/components/Widgets/ColorBox/ColorBox.tsx
4
+ /**
5
+ * This is only example of widget
6
+ */
7
+ const ColorBox = ({ config = {}, innerRef }) => {
8
+ return /* @__PURE__ */ jsx("div", {
9
+ style: React.useMemo(() => ({
10
+ backgroundColor: config?.color || "transparent",
11
+ border: "1px solid #ccc",
12
+ width: 50,
13
+ height: 50,
14
+ borderRadius: "100%"
15
+ }), [config]),
16
+ ref: innerRef,
17
+ children: config?.name
18
+ });
19
+ };
20
+ //#endregion
21
+ export { ColorBox as default };
@@ -0,0 +1,3 @@
1
+ import type { JSX } from 'react';
2
+ import { ConfigProps } from '../../../types';
3
+ export declare const Config: ({ onChange, config }: ConfigProps) => JSX.Element;
@@ -0,0 +1,23 @@
1
+ import styles_default from "../../../styles.js";
2
+ import { useCallback } from "react";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ //#region packages/ui/Modules/Dashboard/components/Widgets/ColorBox/Config.tsx
5
+ const Config = ({ onChange, config }) => {
6
+ const onChangeInput = useCallback((e) => onChange({
7
+ ...config,
8
+ [e.target.name]: e.target.value
9
+ }), [onChange, config]);
10
+ return /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs(styles_default.ConfigRow, { children: [/* @__PURE__ */ jsx(styles_default.ConfigLabel, { children: "Name: " }), /* @__PURE__ */ jsx(styles_default.ConfigInput, { children: /* @__PURE__ */ jsx("input", {
11
+ name: "name",
12
+ type: "text",
13
+ onChange: onChangeInput,
14
+ value: config?.name || ""
15
+ }) })] }), /* @__PURE__ */ jsxs(styles_default.ConfigRow, { children: [/* @__PURE__ */ jsx(styles_default.ConfigLabel, { children: "Color: " }), /* @__PURE__ */ jsx(styles_default.ConfigInput, { children: /* @__PURE__ */ jsx("input", {
16
+ name: "color",
17
+ type: "color",
18
+ onChange: onChangeInput,
19
+ value: config?.color || ""
20
+ }) })] })] });
21
+ };
22
+ //#endregion
23
+ export { Config };
@@ -0,0 +1,4 @@
1
+ import ColorBox from './ColorBox';
2
+ export * from './ColorBox';
3
+ export * from './Config';
4
+ export default ColorBox;
@@ -0,0 +1,6 @@
1
+ import ColorBox from "./ColorBox.js";
2
+ import { Config } from "./Config.js";
3
+ //#region packages/ui/Modules/Dashboard/components/Widgets/ColorBox/index.tsx
4
+ var ColorBox_default = ColorBox;
5
+ //#endregion
6
+ export { Config, ColorBox_default as default };
@@ -0,0 +1,7 @@
1
+ import type { JSX } from 'react';
2
+ /**
3
+ * Empty widget
4
+ * This is only for error case, invalid widget definition etc...
5
+ */
6
+ declare const EmptyWidget: () => JSX.Element;
7
+ export default EmptyWidget;
@@ -0,0 +1,10 @@
1
+ import "react";
2
+ import { jsx } from "react/jsx-runtime";
3
+ //#region packages/ui/Modules/Dashboard/components/Widgets/EmptyWidget/EmptyWidget.tsx
4
+ /**
5
+ * Empty widget
6
+ * This is only for error case, invalid widget definition etc...
7
+ */
8
+ const EmptyWidget = () => /* @__PURE__ */ jsx("span", { children: "Error" });
9
+ //#endregion
10
+ export { EmptyWidget as default };
@@ -0,0 +1,2 @@
1
+ import EmptyWidget from './EmptyWidget';
2
+ export default EmptyWidget;
@@ -0,0 +1,5 @@
1
+ import EmptyWidget from "./EmptyWidget.js";
2
+ //#region packages/ui/Modules/Dashboard/components/Widgets/EmptyWidget/index.ts
3
+ var EmptyWidget_default = EmptyWidget;
4
+ //#endregion
5
+ export { EmptyWidget_default as default };
@@ -0,0 +1 @@
1
+ export declare const Config: ({ onChange, config, sources }: import("../../..").MultiConfigProps) => import("react").JSX.Element;
@@ -0,0 +1,5 @@
1
+ import { MultiConfig } from "../../Config/MultiConfig.js";
2
+ //#region packages/ui/Modules/Dashboard/components/Widgets/HorizontalBar/Config.tsx
3
+ const Config = MultiConfig;
4
+ //#endregion
5
+ export { Config };
@@ -0,0 +1,4 @@
1
+ import type { JSX } from 'react';
2
+ import { HorizontalBarProps } from './types';
3
+ declare const HorizontalBar: ({ data, title, description, isLoading, error, innerRef }: HorizontalBarProps) => JSX.Element;
4
+ export default HorizontalBar;
@@ -0,0 +1,38 @@
1
+ import styles_default from "../../../styles.js";
2
+ import LoadingBoundary from "../../../Hoc/LoadingBoundary.js";
3
+ import NoData_default from "../../NoData/index.js";
4
+ import styles_default$1 from "./styles.js";
5
+ import { ProgressLine } from "./components/ProgressLine.js";
6
+ import { LabelsLine } from "./components/LabelsLine.js";
7
+ import React from "react";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
+ //#region packages/ui/Modules/Dashboard/components/Widgets/HorizontalBar/HorizontalBar.tsx
10
+ const fallbackFillColor = "#000";
11
+ const fallbackBgColor = "#ebedf2";
12
+ const HorizontalBar = ({ data = [], title, description, isLoading, error, innerRef }) => /* @__PURE__ */ jsx(LoadingBoundary, {
13
+ isLoading,
14
+ error,
15
+ children: /* @__PURE__ */ jsx(styles_default.ItemContent, { children: /* @__PURE__ */ jsxs("div", {
16
+ ref: innerRef,
17
+ children: [
18
+ title && /* @__PURE__ */ jsx(styles_default$1.Title, { children: title }),
19
+ description && /* @__PURE__ */ jsx(styles_default$1.Description, { children: description }),
20
+ (!data || data.length === 0) && /* @__PURE__ */ jsx(NoData_default, {}),
21
+ data.map((row) => {
22
+ const { id, label, percent, value, color = fallbackFillColor, backgroundColor = fallbackBgColor } = row;
23
+ const validPercent = percent >= 0 && percent <= 100 ? percent : 0;
24
+ return /* @__PURE__ */ jsxs(React.Fragment, { children: [/* @__PURE__ */ jsx(LabelsLine, {
25
+ value,
26
+ label,
27
+ color
28
+ }), /* @__PURE__ */ jsx(ProgressLine, {
29
+ percent: validPercent,
30
+ color,
31
+ backgroundColor
32
+ })] }, id);
33
+ })
34
+ ]
35
+ }) })
36
+ });
37
+ //#endregion
38
+ export { HorizontalBar as default };