@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,57 @@
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 { useCallback, useEffect, useState } from 'react';
7
+ import styled, { x } from '@xstyled/styled-components';
8
+ import { th } from '@xstyled/system';
9
+ var Btn = styled.button(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n transform: rotate(90deg);\n font-size: 24px;\n margin: -4px 0;\n background-color: transparent !important;\n border: none;\n color: ", ";\n &:disabled:hover {\n color: ", ";\n cursor: default;\n }\n &:hover {\n color: ", ";\n background-color: transparent !important;\n }\n"], ["\n transform: rotate(90deg);\n font-size: 24px;\n margin: -4px 0;\n background-color: transparent !important;\n border: none;\n color: ", ";\n &:disabled:hover {\n color: ", ";\n cursor: default;\n }\n &:hover {\n color: ", ";\n background-color: transparent !important;\n }\n"])), th('colors.lightGray4'), th('colors.lightGray4'), th('colors.red2'));
10
+ var TimeWrapper = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n align-items: baseline;\n justify-content: center;\n border: 1px solid ", ";\n border-radius: 0.7rem;\n padding: 4px 10px;\n margin: 0 10px;\n"], ["\n display: flex;\n align-items: baseline;\n justify-content: center;\n border: 1px solid ", ";\n border-radius: 0.7rem;\n padding: 4px 10px;\n margin: 0 10px;\n"])), th('colors.lightGray2'));
11
+ var Hours = styled.input(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n font-size: 22px;\n font-weight: 700;\n width: 24px;\n margin: 0;\n padding: 0;\n border: none;\n outline: none;\n &:disabled {\n opacity: 0.5;\n }\n"], ["\n font-size: 22px;\n font-weight: 700;\n width: 24px;\n margin: 0;\n padding: 0;\n border: none;\n outline: none;\n &:disabled {\n opacity: 0.5;\n }\n"])));
12
+ var Minutes = styled.input(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-weight: 700;\n font-size: 16px;\n width: 20px;\n margin: 0;\n padding: 0;\n border: none;\n outline: none;\n &:disabled {\n opacity: 0.5;\n }\n"], ["\n font-weight: 700;\n font-size: 16px;\n width: 20px;\n margin: 0;\n padding: 0;\n border: none;\n outline: none;\n &:disabled {\n opacity: 0.5;\n }\n"])));
13
+ export var Timepicker = function (_a) {
14
+ var _b, _c;
15
+ var setTime = _a.setTime, value = _a.value, disabled = _a.disabled;
16
+ var initialHours = (_b = value === null || value === void 0 ? void 0 : value.getHours()) !== null && _b !== void 0 ? _b : 0;
17
+ var initialMinutes = (_c = value === null || value === void 0 ? void 0 : value.getMinutes()) !== null && _c !== void 0 ? _c : 0;
18
+ var regExp = '^[0-9]*$';
19
+ var _d = useState(initialHours), hours = _d[0], setHours = _d[1];
20
+ var _e = useState(initialMinutes), minutes = _e[0], setMinutes = _e[1];
21
+ var increaseHour = useCallback(function () {
22
+ hours === 23 ? setHours(0) : setHours(hours + 1);
23
+ }, [hours]);
24
+ var decreaseHour = useCallback(function () {
25
+ hours === 0 ? setHours(23) : setHours(hours - 1);
26
+ }, [hours]);
27
+ var increaseMinutes = useCallback(function () {
28
+ minutes >= 55 ? setMinutes(minutes - 55) : setMinutes(minutes + 5);
29
+ }, [minutes]);
30
+ var decreaseMinutes = useCallback(function () {
31
+ minutes <= 5 ? setMinutes(minutes + 55) : setMinutes(minutes - 5);
32
+ }, [minutes]);
33
+ var onHoursChange = useCallback(function (e) {
34
+ if (e.target.value.match(regExp) && Number(e.target.value) <= 23) {
35
+ setHours(Number(e.target.value));
36
+ }
37
+ else {
38
+ setHours(0);
39
+ }
40
+ }, []);
41
+ var onMinutesChange = useCallback(function (e) {
42
+ if (e.target.value.match(regExp) && Number(e.target.value) <= 59) {
43
+ setMinutes(Number(e.target.value));
44
+ }
45
+ else {
46
+ setMinutes(0);
47
+ }
48
+ }, []);
49
+ useEffect(function () {
50
+ !!value && setTime('hours', hours);
51
+ }, [hours]);
52
+ useEffect(function () {
53
+ !!value && setTime('minutes', minutes);
54
+ }, [minutes]);
55
+ return (_jsx("td", { colSpan: 7, children: _jsx(x.div, { display: "flex", flexDirection: "column", alignItems: "flex-start", pt: "1rem", w: "fit-content", children: _jsxs(x.div, { display: "flex", alignItems: "center", children: [_jsxs(x.div, { display: "flex", flexDirection: "column", children: [_jsx(Btn, { disabled: disabled, onClick: increaseHour, children: "\u2039" }), _jsx(Btn, { disabled: disabled, onClick: decreaseHour, children: "\u203A" })] }), _jsxs(TimeWrapper, { children: [_jsx(Hours, { value: hours < 10 ? "0".concat(hours) : hours, disabled: disabled, onChange: onHoursChange }), _jsx(x.div, { mx: "7px", color: "lightGray4", children: "|" }), _jsx(Minutes, { value: minutes < 10 ? "0".concat(minutes) : minutes, disabled: disabled, onChange: onMinutesChange })] }), _jsxs(x.div, { display: "flex", flexDirection: "column", children: [_jsx(Btn, { disabled: disabled, onClick: increaseMinutes, children: "\u2039" }), _jsx(Btn, { disabled: disabled, onClick: decreaseMinutes, children: "\u203A" })] })] }) }) }));
56
+ };
57
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
@@ -0,0 +1,9 @@
1
+ export default function ViewNavigation({ onClickPrev, onClickSwitch, onClickNext, switchContent, switchColSpan, switchProps, label, }: {
2
+ onClickPrev: any;
3
+ onClickSwitch: any;
4
+ onClickNext: any;
5
+ switchContent: any;
6
+ switchColSpan: any;
7
+ switchProps: any;
8
+ label: any;
9
+ }): import("react/jsx-runtime").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, jsxs as _jsxs } from "react/jsx-runtime";
13
+ export default function ViewNavigation(_a) {
14
+ var onClickPrev = _a.onClickPrev, onClickSwitch = _a.onClickSwitch, onClickNext = _a.onClickNext, switchContent = _a.switchContent, switchColSpan = _a.switchColSpan, switchProps = _a.switchProps, label = _a.label;
15
+ return (_jsxs("tr", { children: [_jsx("th", { className: "rdtPrev", onClick: onClickPrev, children: _jsx("span", { children: "\u2039" }) }), _jsx("th", __assign({ className: "rdtSwitch", colSpan: switchColSpan, onClick: onClickSwitch }, switchProps, { children: switchContent })), _jsx("th", { className: "rdtNext", onClick: onClickNext, children: _jsx("span", { children: "\u203A" }) }), _jsx("th", { colSpan: 2, className: "rdtLabel", children: label && label })] }));
16
+ }
@@ -0,0 +1,61 @@
1
+ import { FocusEvent, FocusEventHandler } from 'react';
2
+ import { Moment } from 'moment';
3
+ export type ViewMode = 'years' | 'months' | 'days' | 'time';
4
+ export interface TimeConstraint {
5
+ min: number;
6
+ max: number;
7
+ step: number;
8
+ }
9
+ export interface TimeConstraints {
10
+ hours?: TimeConstraint;
11
+ minutes?: TimeConstraint;
12
+ seconds?: TimeConstraint;
13
+ milliseconds?: TimeConstraint;
14
+ }
15
+ type EventOrValueHandler<Event> = (event: Event | Moment | string) => void;
16
+ export interface DatetimepickerProps {
17
+ value?: Date | string | Moment;
18
+ initialValue?: Date | string | Moment;
19
+ initialViewDate?: Date | string | Moment;
20
+ initialViewMode?: ViewMode;
21
+ updateOnView?: string;
22
+ dateFormat?: boolean | string;
23
+ timeFormat?: boolean | string;
24
+ input?: boolean;
25
+ open?: boolean;
26
+ locale?: string;
27
+ utc?: boolean;
28
+ displayTimeZone?: string;
29
+ onChange?: (value: Moment | string) => void;
30
+ onOpen?: FocusEventHandler<any>;
31
+ onClose?: EventOrValueHandler<FocusEvent<any>>;
32
+ onNavigate?: (viewMode: string) => void;
33
+ onBeforeNavigate?: (nextView: string, currentView: string, viewDate: Moment) => string;
34
+ onNavigateBack?: (amount: number, type: string) => void;
35
+ onNavigateForward?: (amount: number, type: string) => void;
36
+ className?: string;
37
+ inputProps?: React.HTMLProps<HTMLInputElement>;
38
+ isValidDate?: (currentDate: any, selectedDate: any) => boolean;
39
+ renderView?: (viewMode: string, renderCalendar: Function) => JSX.Element;
40
+ renderDay?: (props: any, currentDate: any, selectedDate: any) => JSX.Element;
41
+ renderMonth?: (props: any, month: number, year: number, selectedDate: any) => JSX.Element;
42
+ renderYear?: (props: any, year: number, selectedDate: any) => JSX.Element;
43
+ renderInput?: (props: any, openCalendar: Function, closeCalendar: Function) => JSX.Element;
44
+ strictParsing?: boolean;
45
+ closeOnSelect?: boolean;
46
+ timeConstraints?: TimeConstraints;
47
+ closeOnClickOutside?: boolean;
48
+ secondValue?: Date | null;
49
+ label?: string;
50
+ }
51
+ export interface DatetimepickerState {
52
+ updateOn: string;
53
+ inputFormat: string;
54
+ viewDate: Moment;
55
+ selectedDate: Moment;
56
+ inputValue: string;
57
+ open: boolean;
58
+ secondValue?: Date | null;
59
+ label?: string;
60
+ }
61
+ export {};
@@ -0,0 +1,7 @@
1
+ // Type definitions for react-datetime
2
+ // Project: https://github.com/arqex/react-datetime
3
+ // Definitions by: Ivan Verevkin <vereva@x-root.org>
4
+ // Updates by: Aaron Spaulding <aaron@sachimp.com>,
5
+ // Karol Janyst <http://github.com/LKay>,
6
+ // Javier Marquez <javi@arqex.com>
7
+ export {};
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ export default class DaysView extends React.Component {
3
+ static defaultProps: {
4
+ isValidDate: () => boolean;
5
+ renderDay: (props: any, date: any) => import("react/jsx-runtime").JSX.Element;
6
+ };
7
+ render(): import("react/jsx-runtime").JSX.Element;
8
+ renderNavigation(): import("react/jsx-runtime").JSX.Element;
9
+ renderDayHeaders(): import("react/jsx-runtime").JSX.Element;
10
+ renderDays(): import("react/jsx-runtime").JSX.Element[];
11
+ renderDay(date: any, startOfMonth: any, endOfMonth: any): any;
12
+ renderFooter(): import("react/jsx-runtime").JSX.Element | undefined;
13
+ _setDate: (e: any) => void;
14
+ }
@@ -0,0 +1,145 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
+ extendStatics(d, b);
12
+ function __() { this.constructor = d; }
13
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
+ };
15
+ })();
16
+ var __assign = (this && this.__assign) || function () {
17
+ __assign = Object.assign || function(t) {
18
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
19
+ s = arguments[i];
20
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
21
+ t[p] = s[p];
22
+ }
23
+ return t;
24
+ };
25
+ return __assign.apply(this, arguments);
26
+ };
27
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
28
+ // @ts-nocheck
29
+ import React from 'react';
30
+ import { Timepicker } from '../components/Timepicker';
31
+ import ViewNavigation from '../components/ViewNavigation';
32
+ var DaysView = /** @class */ (function (_super) {
33
+ __extends(DaysView, _super);
34
+ function DaysView() {
35
+ var _this = _super !== null && _super.apply(this, arguments) || this;
36
+ _this._setDate = function (e) {
37
+ _this.props.updateDate(e);
38
+ };
39
+ return _this;
40
+ }
41
+ DaysView.prototype.render = function () {
42
+ return (_jsx("div", { className: "rdtDays", children: _jsxs("table", { children: [_jsxs("thead", { children: [this.renderNavigation(), this.renderDayHeaders()] }), _jsx("tbody", { children: this.renderDays() }), this.renderFooter()] }) }));
43
+ };
44
+ DaysView.prototype.renderNavigation = function () {
45
+ var _this = this;
46
+ var date = this.props.viewDate;
47
+ var locale = date.localeData();
48
+ var label = this.props.label;
49
+ return (_jsx(ViewNavigation, { onClickPrev: function () { return _this.props.navigate(-1, 'months'); }, onClickSwitch: function () { return _this.props.showView('months'); }, onClickNext: function () { return _this.props.navigate(1, 'months'); }, switchContent: locale.months(date, 'DD[]MMMM') + ' ' + date.year(), switchColSpan: 3, label: label, switchProps: { 'data-value': this.props.viewDate.month() } }));
50
+ };
51
+ DaysView.prototype.renderDayHeaders = function () {
52
+ var locale = this.props.viewDate.localeData();
53
+ var dayItems = getDaysOfWeek(locale).map(function (day, index) { return (_jsx("th", { className: "dow", children: day }, day + index)); });
54
+ return _jsx("tr", { children: dayItems });
55
+ };
56
+ DaysView.prototype.renderDays = function () {
57
+ var date = this.props.viewDate;
58
+ var startOfMonth = date.clone().startOf('month');
59
+ var endOfMonth = date.clone().endOf('month');
60
+ // We need 42 days in 6 rows
61
+ // starting in the last week of the previous month
62
+ var rows = [[], [], [], [], [], []];
63
+ var startDate = date.clone().subtract(1, 'months');
64
+ startDate.date(startDate.daysInMonth()).startOf('week');
65
+ var endDate = startDate.clone().add(42, 'd');
66
+ var i = 0;
67
+ while (startDate.isBefore(endDate)) {
68
+ var row = getRow(rows, i++);
69
+ row.push(this.renderDay(startDate, startOfMonth, endOfMonth));
70
+ startDate.add(1, 'd');
71
+ }
72
+ return rows.map(function (r, i) { return _jsx("tr", { children: r }, "".concat(endDate.month(), "_").concat(i)); });
73
+ };
74
+ DaysView.prototype.renderDay = function (date, startOfMonth, endOfMonth) {
75
+ var selectedDate = this.props.selectedDate;
76
+ var secondValue = this.props.secondValue;
77
+ var dayProps = {
78
+ key: date.format('M_D'),
79
+ 'data-value': date.date(),
80
+ 'data-month': date.month(),
81
+ 'data-year': date.year(),
82
+ };
83
+ var className = 'rdtDay';
84
+ if (date.isBefore(startOfMonth)) {
85
+ className += ' rdtOld';
86
+ }
87
+ else if (date.isAfter(endOfMonth)) {
88
+ className += ' rdtNew';
89
+ }
90
+ if (secondValue && date.isBefore(secondValue) && date.isAfter(selectedDate)) {
91
+ className += ' rdtActiveRange';
92
+ }
93
+ if (secondValue && date.isAfter(secondValue) && date.isBefore(selectedDate)) {
94
+ className += ' rdtActiveRange';
95
+ }
96
+ if (selectedDate && date.isSame(selectedDate, 'day')) {
97
+ className += ' rdtActive';
98
+ }
99
+ if (secondValue && date.isSame(secondValue, 'day')) {
100
+ className += ' rdtActiveSecond';
101
+ }
102
+ if (date.isSame(this.props.moment(), 'day')) {
103
+ className += ' rdtToday';
104
+ }
105
+ if (this.props.isValidDate(date)) {
106
+ dayProps.onClick = this._setDate;
107
+ }
108
+ else {
109
+ className += ' rdtDisabled';
110
+ }
111
+ dayProps.className = className;
112
+ return this.props.renderDay(dayProps, date.clone(), selectedDate && selectedDate.clone());
113
+ };
114
+ DaysView.prototype.renderFooter = function () {
115
+ if (!this.props.timeFormat)
116
+ return;
117
+ var setTime = this.props.setTime;
118
+ var value = this.props.value;
119
+ var disabled = this.props.disabled;
120
+ return (_jsx("tfoot", { children: _jsx("tr", { children: _jsx(Timepicker, { setTime: setTime, value: value, disabled: disabled }) }) }));
121
+ };
122
+ DaysView.defaultProps = {
123
+ isValidDate: function () { return true; },
124
+ renderDay: function (props, date) { return _jsx("td", __assign({}, props, { children: date.date() })); },
125
+ };
126
+ return DaysView;
127
+ }(React.Component));
128
+ export default DaysView;
129
+ function getRow(rows, day) {
130
+ return rows[Math.floor(day / 7)];
131
+ }
132
+ /**
133
+ * Get a list of the days of the week
134
+ * depending on the current locale
135
+ * @return {array} A list with the shortname of the days
136
+ */
137
+ function getDaysOfWeek(locale) {
138
+ var first = locale.firstDayOfWeek();
139
+ var dow = [];
140
+ var i = 0;
141
+ locale._weekdaysMin.forEach(function (day) {
142
+ dow[(7 + i++ - first) % 7] = day;
143
+ });
144
+ return dow;
145
+ }
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ export default class MonthsView extends React.Component {
3
+ render(): import("react/jsx-runtime").JSX.Element;
4
+ renderNavigation(): import("react/jsx-runtime").JSX.Element;
5
+ renderMonths(): import("react/jsx-runtime").JSX.Element[];
6
+ renderMonth(month: any): any;
7
+ isDisabledMonth(month: any): boolean;
8
+ getMonthText(month: any): any;
9
+ _updateSelectedMonth: (event: any) => void;
10
+ }
@@ -0,0 +1,111 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
+ extendStatics(d, b);
12
+ function __() { this.constructor = d; }
13
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
+ };
15
+ })();
16
+ var __assign = (this && this.__assign) || function () {
17
+ __assign = Object.assign || function(t) {
18
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
19
+ s = arguments[i];
20
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
21
+ t[p] = s[p];
22
+ }
23
+ return t;
24
+ };
25
+ return __assign.apply(this, arguments);
26
+ };
27
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
28
+ // @ts-nocheck
29
+ import React from 'react';
30
+ import ViewNavigation from '../components/ViewNavigation';
31
+ var MonthsView = /** @class */ (function (_super) {
32
+ __extends(MonthsView, _super);
33
+ function MonthsView() {
34
+ var _this = _super !== null && _super.apply(this, arguments) || this;
35
+ _this._updateSelectedMonth = function (event) {
36
+ _this.props.updateDate(event);
37
+ };
38
+ return _this;
39
+ }
40
+ MonthsView.prototype.render = function () {
41
+ return (_jsxs("div", { className: "rdtMonths", children: [_jsx("table", { children: _jsx("thead", { children: this.renderNavigation() }) }), _jsx("table", { children: _jsx("tbody", { children: this.renderMonths() }) })] }));
42
+ };
43
+ MonthsView.prototype.renderNavigation = function () {
44
+ var _this = this;
45
+ var year = this.props.viewDate.year();
46
+ return (_jsx(ViewNavigation, { onClickPrev: function () { return _this.props.navigate(-1, 'years'); }, onClickSwitch: function () { return _this.props.showView('years'); }, onClickNext: function () { return _this.props.navigate(1, 'years'); }, switchContent: year, switchColSpan: "2" }));
47
+ };
48
+ MonthsView.prototype.renderMonths = function () {
49
+ // 12 months in 3 rows for every view
50
+ var rows = [[], [], []];
51
+ for (var month = 0; month < 12; month++) {
52
+ var row = getRow(rows, month);
53
+ row.push(this.renderMonth(month));
54
+ }
55
+ return rows.map(function (months, i) { return _jsx("tr", { children: months }, i); });
56
+ };
57
+ MonthsView.prototype.renderMonth = function (month) {
58
+ var selectedDate = this.props.selectedDate;
59
+ var className = 'rdtMonth';
60
+ var onClick;
61
+ if (this.isDisabledMonth(month)) {
62
+ className += ' rdtDisabled';
63
+ }
64
+ else {
65
+ onClick = this._updateSelectedMonth;
66
+ }
67
+ if (selectedDate && selectedDate.year() === this.props.viewDate.year() && selectedDate.month() === month) {
68
+ className += ' rdtActive';
69
+ }
70
+ var props = { key: month, className: className, 'data-value': month, onClick: onClick };
71
+ if (this.props.renderMonth) {
72
+ return this.props.renderMonth(props, month, this.props.viewDate.year(), this.props.selectedDate && this.props.selectedDate.clone());
73
+ }
74
+ return _jsx("td", __assign({}, props, { children: this.getMonthText(month) }));
75
+ };
76
+ MonthsView.prototype.isDisabledMonth = function (month) {
77
+ var isValidDate = this.props.isValidDate;
78
+ if (!isValidDate) {
79
+ // If no validator is set, all days are valid
80
+ return false;
81
+ }
82
+ // If one day in the month is valid, the year should be clickable
83
+ var date = this.props.viewDate.clone().set({ month: month });
84
+ var day = date.endOf('month').date() + 1;
85
+ while (day-- > 1) {
86
+ if (isValidDate(date.date(day))) {
87
+ return false;
88
+ }
89
+ }
90
+ return true;
91
+ };
92
+ MonthsView.prototype.getMonthText = function (month) {
93
+ var localMoment = this.props.viewDate;
94
+ var monthStr = localMoment.localeData().monthsShort(localMoment.month(month));
95
+ return capitalize(monthStr.substring(0, 3));
96
+ };
97
+ return MonthsView;
98
+ }(React.Component));
99
+ export default MonthsView;
100
+ function getRow(rows, year) {
101
+ if (year < 4) {
102
+ return rows[0];
103
+ }
104
+ if (year < 8) {
105
+ return rows[1];
106
+ }
107
+ return rows[2];
108
+ }
109
+ function capitalize(str) {
110
+ return str.charAt(0).toUpperCase() + str.slice(1);
111
+ }
@@ -0,0 +1,15 @@
1
+ import React from 'react';
2
+ export default class YearsView extends React.Component {
3
+ static defaultProps: {
4
+ renderYear: (props: any, year: any) => import("react/jsx-runtime").JSX.Element;
5
+ };
6
+ render(): import("react/jsx-runtime").JSX.Element;
7
+ renderNavigation(): import("react/jsx-runtime").JSX.Element;
8
+ renderYears(): import("react/jsx-runtime").JSX.Element[];
9
+ renderYear(year: any): any;
10
+ getViewYear(): number;
11
+ getSelectedYear(): any;
12
+ disabledYearsCache: {};
13
+ isDisabledYear(year: any): any;
14
+ _updateSelectedYear: (event: any) => void;
15
+ }
@@ -0,0 +1,117 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
+ extendStatics(d, b);
12
+ function __() { this.constructor = d; }
13
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
+ };
15
+ })();
16
+ var __assign = (this && this.__assign) || function () {
17
+ __assign = Object.assign || function(t) {
18
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
19
+ s = arguments[i];
20
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
21
+ t[p] = s[p];
22
+ }
23
+ return t;
24
+ };
25
+ return __assign.apply(this, arguments);
26
+ };
27
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
28
+ // @ts-nocheck
29
+ import React from 'react';
30
+ import ViewNavigation from '../components/ViewNavigation';
31
+ var YearsView = /** @class */ (function (_super) {
32
+ __extends(YearsView, _super);
33
+ function YearsView() {
34
+ var _this = _super !== null && _super.apply(this, arguments) || this;
35
+ _this.disabledYearsCache = {};
36
+ _this._updateSelectedYear = function (event) {
37
+ _this.props.updateDate(event);
38
+ };
39
+ return _this;
40
+ }
41
+ YearsView.prototype.render = function () {
42
+ return (_jsxs("div", { className: "rdtYears", children: [_jsx("table", { children: _jsx("thead", { children: this.renderNavigation() }) }), _jsx("table", { children: _jsx("tbody", { children: this.renderYears() }) })] }));
43
+ };
44
+ YearsView.prototype.renderNavigation = function () {
45
+ var _this = this;
46
+ var viewYear = this.getViewYear();
47
+ return (_jsx(ViewNavigation, { onClickPrev: function () { return _this.props.navigate(-10, 'years'); }, onClickSwitch: function () { return _this.props.showView('years'); }, onClickNext: function () { return _this.props.navigate(10, 'years'); }, switchContent: "".concat(viewYear, "-").concat(viewYear + 9) }));
48
+ };
49
+ YearsView.prototype.renderYears = function () {
50
+ var viewYear = this.getViewYear();
51
+ // 12 years in 3 rows for every view
52
+ var rows = [[], [], []];
53
+ for (var year = viewYear - 1; year < viewYear + 11; year++) {
54
+ var row = getRow(rows, year - viewYear);
55
+ row.push(this.renderYear(year));
56
+ }
57
+ return rows.map(function (years, i) { return _jsx("tr", { children: years }, i); });
58
+ };
59
+ YearsView.prototype.renderYear = function (year) {
60
+ var selectedYear = this.getSelectedYear();
61
+ var className = 'rdtYear';
62
+ var onClick;
63
+ if (this.isDisabledYear(year)) {
64
+ className += ' rdtDisabled';
65
+ }
66
+ else {
67
+ onClick = this._updateSelectedYear;
68
+ }
69
+ if (selectedYear === year) {
70
+ className += ' rdtActive';
71
+ }
72
+ var props = { key: year, className: className, 'data-value': year, onClick: onClick };
73
+ return this.props.renderYear(props, year, this.props.selectedDate && this.props.selectedDate.clone());
74
+ };
75
+ YearsView.prototype.getViewYear = function () {
76
+ return parseInt(this.props.viewDate.year() / 10, 10) * 10;
77
+ };
78
+ YearsView.prototype.getSelectedYear = function () {
79
+ return this.props.selectedDate && this.props.selectedDate.year();
80
+ };
81
+ YearsView.prototype.isDisabledYear = function (year) {
82
+ var cache = this.disabledYearsCache;
83
+ if (cache[year] !== undefined) {
84
+ return cache[year];
85
+ }
86
+ var isValidDate = this.props.isValidDate;
87
+ if (!isValidDate) {
88
+ // If no validator is set, all days are valid
89
+ return false;
90
+ }
91
+ // If one day in the year is valid, the year should be clickable
92
+ var date = this.props.viewDate.clone().set({ year: year });
93
+ var day = date.endOf('year').dayOfYear() + 1;
94
+ while (day-- > 1) {
95
+ if (isValidDate(date.dayOfYear(day))) {
96
+ cache[year] = false;
97
+ return false;
98
+ }
99
+ }
100
+ cache[year] = true;
101
+ return true;
102
+ };
103
+ YearsView.defaultProps = {
104
+ renderYear: function (props, year) { return _jsx("td", __assign({}, props, { children: year })); },
105
+ };
106
+ return YearsView;
107
+ }(React.Component));
108
+ export default YearsView;
109
+ function getRow(rows, year) {
110
+ if (year < 3) {
111
+ return rows[0];
112
+ }
113
+ if (year < 7) {
114
+ return rows[1];
115
+ }
116
+ return rows[2];
117
+ }
@@ -0,0 +1,2 @@
1
+ import DatePicker from './DatePicker';
2
+ export default DatePicker;
@@ -0,0 +1,2 @@
1
+ import DatePicker from './DatePicker';
2
+ export default DatePicker;
@@ -0,0 +1,2 @@
1
+ /// <reference types="react" />
2
+ export declare const DatePickerBase: import("styled-components").StyledComponent<(props: Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "color">) => import("react").ReactElement<any, "div">, import("@xstyled/system").Theme, import("@xstyled/system").SystemProps<import("@xstyled/system").Theme>, "color">;
@@ -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, { x } from '@xstyled/styled-components';
6
+ import { th } from '@xstyled/system';
7
+ export var DatePickerBase = styled(x.div)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n .rdt {\n position: relative;\n }\n .rdtPicker {\n display: none;\n position: absolute;\n z-index: 1;\n min-width: 250px;\n color: ", ";\n background: ", ";\n border: 1px solid rgba(0, 0, 0, 0.15);\n border-radius: 10px;\n box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);\n padding: 0.5rem 1.2rem;\n margin: 0.125rem 0rem;\n }\n .rdtOpen .rdtPicker {\n display: block;\n }\n .rdtStatic .rdtPicker {\n position: static;\n }\n\n .rdtPicker .rdtTimeToggle {\n padding-top: 1rem;\n padding-bottom: 1rem;\n text-align: center;\n font-size: 1.25rem;\n }\n .rdtPicker table {\n width: 100%;\n margin: 0;\n border-collapse: collapse;\n }\n .rdtPicker td,\n .rdtPicker th {\n text-align: center;\n height: 30px;\n }\n .rdtPicker td {\n padding: 0 0.8rem;\n }\n .rdtPicker .rdtCounter .rdtBtn:hover,\n .rdtPicker .rdtYear:hover,\n .rdtPicker .rdtMonth:hover,\n .rdtPicker .rdtDay:hover,\n .rdtPicker .rdtHour:hover,\n .rdtPicker .rdtMinute:hover,\n .rdtPicker .rdtSecond:hover,\n .rdtPicker .rdtTimeToggle:hover,\n .rdtPicker .rdtSwitch:hover {\n background: #f8f9fa;\n cursor: pointer;\n }\n .rdtPicker .rdtOld,\n .rdtPicker .rdtNew {\n color: rgba(33, 37, 41, 0.3);\n }\n .rdtPicker .rdtToday {\n position: relative;\n }\n .rdtPicker .rdtToday:before {\n content: '';\n display: inline-block;\n border-left: 7px solid transparent;\n border-bottom: 7px solid ", ";\n position: absolute;\n bottom: 4px;\n right: 4px;\n }\n .rdtPicker th {\n border-bottom: 1px solid #e9ecef;\n }\n .rdtPicker .dow {\n width: 14.2857%;\n border-bottom: none;\n cursor: default;\n font-weight: 600;\n }\n .rdtPicker .rdtPrev,\n .rdtPicker .rdtSwitch,\n .rdtPicker .rdtNext {\n font-weight: 600;\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n }\n\n .rdtPicker .rdtNext,\n .rdtPicker .rdtPrev {\n width: 36px;\n font-size: 1.4rem;\n vertical-align: top;\n color: ", ";\n }\n .rdtPicker .rdtCounter .rdtBtn {\n font-size: 1rem;\n display: block;\n user-select: none;\n }\n .rdtPicker th.rdtDisabled,\n .rdtPicker th.rdtDisabled:hover {\n background: none;\n color: #6c757d;\n cursor: not-allowed;\n }\n .rdtPicker thead tr:first-child th {\n cursor: pointer;\n }\n .rdtPicker thead:first-child {\n line-height: 20px;\n }\n .rdtPicker thead tr:first-child th:hover {\n background: #f8f9fa;\n }\n .rdtPicker .rdtTimeToggle {\n border-top: 1px solid #e9ecef;\n }\n .rdtPicker button {\n border: none;\n background: none;\n cursor: pointer;\n }\n .rdtPicker button:hover {\n background-color: #f8f9fa;\n }\n .rdtPicker thead button {\n width: 100%;\n height: 100%;\n }\n .rdtPicker .rdtDays {\n min-width: 250px;\n }\n .rdtPicker .rdtMonth,\n .rdtPicker .rdtYear {\n height: 50px;\n width: 25%;\n cursor: pointer;\n }\n .rdtPicker .rdtMonth:hover,\n .rdtPicker .rdtYear:hover {\n color: #16181b;\n background: #f8f9fa;\n }\n .rdtPicker .rdtActiveSecond {\n background: ", " !important;\n color: ", " !important;\n border-radius: 0.5rem;\n font-weight: 600;\n text-decoration: none !important;\n }\n .rdtPicker .rdtLabel {\n cursor: default !important;\n background: transparent !important;\n font-weight: 600;\n text-align: right;\n }\n\n .rdtPicker .rdtActive {\n background-color: ", " !important;\n color: ", ";\n border-radius: 0.5rem;\n font-weight: 600;\n }\n .rdtPicker .rdtActive:hover {\n background-color: ", ";\n color: ", ";\n font-weight: 600;\n }\n .rdtPicker .rdtActive .rdtToday:before {\n border-bottom-color: ", ";\n }\n .rdtPicker .rdtDisabled,\n .rdtPicker .rdtDisabled:hover {\n background: none;\n color: #6c757d;\n text-decoration: line-through;\n cursor: not-allowed;\n }\n .rdtPicker .rdtDays {\n display: inline-block;\n }\n .rdtPicker .rdtCounters {\n display: inline-block;\n }\n .rdtPicker .rdtCounters > div {\n float: left;\n }\n\n .rdtPicker .rdtActiveRange {\n background: ", ";\n }\n\n .rdtPicker .rdtCounters > div :first-child {\n visibility: hidden;\n transform: rotate(-90deg);\n }\n .rdtPicker .rdtCounters > div :last-child {\n visibility: hidden;\n transform: rotate(90deg);\n }\n .rdtPicker .rdtCounters > div > span:before {\n left: 5px;\n visibility: visible;\n position: relative;\n content: '\u203A';\n font-size: 2rem;\n font-weight: 900;\n color: ", ";\n padding: 0 10px;\n }\n .rdtPicker .rdtCounter {\n width: 40px;\n }\n .rdtPicker .rdtCounter .rdtBtn {\n line-height: 40px;\n cursor: pointer;\n }\n .rdtPicker .rdtCounter .rdtBtn:hover {\n background: #f8f9fa;\n }\n .rdtPicker .rdtCounter .rdtCount {\n line-height: 20px;\n font-size: 1.25rem;\n }\n .rdtPicker .rdtCounterSeparator {\n line-height: 100px;\n }\n"], ["\n .rdt {\n position: relative;\n }\n .rdtPicker {\n display: none;\n position: absolute;\n z-index: 1;\n min-width: 250px;\n color: ", ";\n background: ", ";\n border: 1px solid rgba(0, 0, 0, 0.15);\n border-radius: 10px;\n box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);\n padding: 0.5rem 1.2rem;\n margin: 0.125rem 0rem;\n }\n .rdtOpen .rdtPicker {\n display: block;\n }\n .rdtStatic .rdtPicker {\n position: static;\n }\n\n .rdtPicker .rdtTimeToggle {\n padding-top: 1rem;\n padding-bottom: 1rem;\n text-align: center;\n font-size: 1.25rem;\n }\n .rdtPicker table {\n width: 100%;\n margin: 0;\n border-collapse: collapse;\n }\n .rdtPicker td,\n .rdtPicker th {\n text-align: center;\n height: 30px;\n }\n .rdtPicker td {\n padding: 0 0.8rem;\n }\n .rdtPicker .rdtCounter .rdtBtn:hover,\n .rdtPicker .rdtYear:hover,\n .rdtPicker .rdtMonth:hover,\n .rdtPicker .rdtDay:hover,\n .rdtPicker .rdtHour:hover,\n .rdtPicker .rdtMinute:hover,\n .rdtPicker .rdtSecond:hover,\n .rdtPicker .rdtTimeToggle:hover,\n .rdtPicker .rdtSwitch:hover {\n background: #f8f9fa;\n cursor: pointer;\n }\n .rdtPicker .rdtOld,\n .rdtPicker .rdtNew {\n color: rgba(33, 37, 41, 0.3);\n }\n .rdtPicker .rdtToday {\n position: relative;\n }\n .rdtPicker .rdtToday:before {\n content: '';\n display: inline-block;\n border-left: 7px solid transparent;\n border-bottom: 7px solid ", ";\n position: absolute;\n bottom: 4px;\n right: 4px;\n }\n .rdtPicker th {\n border-bottom: 1px solid #e9ecef;\n }\n .rdtPicker .dow {\n width: 14.2857%;\n border-bottom: none;\n cursor: default;\n font-weight: 600;\n }\n .rdtPicker .rdtPrev,\n .rdtPicker .rdtSwitch,\n .rdtPicker .rdtNext {\n font-weight: 600;\n padding-top: 0.25rem;\n padding-bottom: 0.25rem;\n }\n\n .rdtPicker .rdtNext,\n .rdtPicker .rdtPrev {\n width: 36px;\n font-size: 1.4rem;\n vertical-align: top;\n color: ", ";\n }\n .rdtPicker .rdtCounter .rdtBtn {\n font-size: 1rem;\n display: block;\n user-select: none;\n }\n .rdtPicker th.rdtDisabled,\n .rdtPicker th.rdtDisabled:hover {\n background: none;\n color: #6c757d;\n cursor: not-allowed;\n }\n .rdtPicker thead tr:first-child th {\n cursor: pointer;\n }\n .rdtPicker thead:first-child {\n line-height: 20px;\n }\n .rdtPicker thead tr:first-child th:hover {\n background: #f8f9fa;\n }\n .rdtPicker .rdtTimeToggle {\n border-top: 1px solid #e9ecef;\n }\n .rdtPicker button {\n border: none;\n background: none;\n cursor: pointer;\n }\n .rdtPicker button:hover {\n background-color: #f8f9fa;\n }\n .rdtPicker thead button {\n width: 100%;\n height: 100%;\n }\n .rdtPicker .rdtDays {\n min-width: 250px;\n }\n .rdtPicker .rdtMonth,\n .rdtPicker .rdtYear {\n height: 50px;\n width: 25%;\n cursor: pointer;\n }\n .rdtPicker .rdtMonth:hover,\n .rdtPicker .rdtYear:hover {\n color: #16181b;\n background: #f8f9fa;\n }\n .rdtPicker .rdtActiveSecond {\n background: ", " !important;\n color: ", " !important;\n border-radius: 0.5rem;\n font-weight: 600;\n text-decoration: none !important;\n }\n .rdtPicker .rdtLabel {\n cursor: default !important;\n background: transparent !important;\n font-weight: 600;\n text-align: right;\n }\n\n .rdtPicker .rdtActive {\n background-color: ", " !important;\n color: ", ";\n border-radius: 0.5rem;\n font-weight: 600;\n }\n .rdtPicker .rdtActive:hover {\n background-color: ", ";\n color: ", ";\n font-weight: 600;\n }\n .rdtPicker .rdtActive .rdtToday:before {\n border-bottom-color: ", ";\n }\n .rdtPicker .rdtDisabled,\n .rdtPicker .rdtDisabled:hover {\n background: none;\n color: #6c757d;\n text-decoration: line-through;\n cursor: not-allowed;\n }\n .rdtPicker .rdtDays {\n display: inline-block;\n }\n .rdtPicker .rdtCounters {\n display: inline-block;\n }\n .rdtPicker .rdtCounters > div {\n float: left;\n }\n\n .rdtPicker .rdtActiveRange {\n background: ", ";\n }\n\n .rdtPicker .rdtCounters > div :first-child {\n visibility: hidden;\n transform: rotate(-90deg);\n }\n .rdtPicker .rdtCounters > div :last-child {\n visibility: hidden;\n transform: rotate(90deg);\n }\n .rdtPicker .rdtCounters > div > span:before {\n left: 5px;\n visibility: visible;\n position: relative;\n content: '\u203A';\n font-size: 2rem;\n font-weight: 900;\n color: ", ";\n padding: 0 10px;\n }\n .rdtPicker .rdtCounter {\n width: 40px;\n }\n .rdtPicker .rdtCounter .rdtBtn {\n line-height: 40px;\n cursor: pointer;\n }\n .rdtPicker .rdtCounter .rdtBtn:hover {\n background: #f8f9fa;\n }\n .rdtPicker .rdtCounter .rdtCount {\n line-height: 20px;\n font-size: 1.25rem;\n }\n .rdtPicker .rdtCounterSeparator {\n line-height: 100px;\n }\n"])), th('colors.blue2'), th('colors.white'), th('colors.red2'), th('colors.red2'), th('colors.red1'), th('colors.white'), th('colors.red2'), th('colors.white'), th('colors.red2'), th('colors.white'), th('colors.white'), th('colors.lightGray2'), th('colors.red2'));
8
+ var templateObject_1;
@@ -0,0 +1 @@
1
+ export declare const getLanguage: () => string;
@@ -0,0 +1,10 @@
1
+ export var getLanguage = function () {
2
+ var _a;
3
+ if (typeof window === 'undefined')
4
+ return 'en';
5
+ var storedLang = localStorage.getItem('@@language');
6
+ if (storedLang)
7
+ return storedLang;
8
+ var isOnAdmin = (_a = window === null || window === void 0 ? void 0 : window.location) === null || _a === void 0 ? void 0 : _a.pathname.includes('/admin');
9
+ return isOnAdmin ? 'en' : 'cs';
10
+ };
@@ -0,0 +1,2 @@
1
+ import { DropdownMenuProps, Item } from './types';
2
+ export declare const DropdownMenu: <T extends Item>({ items, showMenu, className, ItemComponent, header, footer, ...rest }: DropdownMenuProps<T>) => JSX.Element;