@sqrzro/admin 2.0.0 → 2.1.0-bz.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (704) hide show
  1. package/.babelrc.json +16 -0
  2. package/.eslintignore +6 -0
  3. package/.eslintrc +1 -4
  4. package/.sqrzrorc +5 -0
  5. package/.storybook/main.js +10 -11
  6. package/.turbo/turbo-build.log +20 -0
  7. package/.turbo/turbo-prettier.log +41 -213
  8. package/COMPONENTS.md +45 -0
  9. package/dist/components/AppLayout/index.d.ts +2 -2
  10. package/dist/components/AppLayout/index.js +7 -15
  11. package/dist/components/AppNavigation/index.d.ts +3 -0
  12. package/dist/components/AppNavigation/index.js +15 -0
  13. package/dist/components/BooleanFilter/index.d.ts +5 -0
  14. package/dist/components/BooleanFilter/index.js +19 -0
  15. package/dist/components/Config/index.d.ts +6 -0
  16. package/dist/components/Config/index.js +9 -0
  17. package/dist/components/Dashboard/index.d.ts +7 -0
  18. package/dist/components/Dashboard/index.js +5 -0
  19. package/dist/components/DateFilter/index.d.ts +6 -0
  20. package/dist/components/DateFilter/index.js +32 -0
  21. package/dist/components/DropdownFilter/index.d.ts +6 -0
  22. package/dist/components/DropdownFilter/index.js +9 -0
  23. package/dist/components/FilterBar/index.d.ts +8 -0
  24. package/dist/components/FilterBar/index.js +12 -0
  25. package/dist/components/FilterBarItem/index.d.ts +14 -0
  26. package/dist/components/FilterBarItem/index.js +31 -0
  27. package/dist/components/GridList/index.d.ts +5 -0
  28. package/dist/components/GridList/index.js +7 -0
  29. package/dist/components/GridListItem/index.d.ts +4 -0
  30. package/dist/components/GridListItem/index.js +7 -0
  31. package/dist/components/Icon/index.d.ts +8 -0
  32. package/dist/components/Icon/index.js +22 -0
  33. package/dist/components/List/index.d.ts +19 -33
  34. package/dist/components/List/index.js +19 -43
  35. package/dist/components/ListAction/index.d.ts +7 -0
  36. package/dist/components/ListAction/index.js +9 -0
  37. package/dist/components/ListActions/index.d.ts +6 -16
  38. package/dist/components/ListActions/index.js +9 -11
  39. package/dist/components/ListItem/index.d.ts +14 -0
  40. package/dist/components/ListItem/index.js +12 -0
  41. package/dist/components/LoginForm/index.d.ts +5 -2
  42. package/dist/components/LoginForm/index.js +4 -44
  43. package/dist/components/MeActions/index.d.ts +3 -0
  44. package/dist/components/MeActions/index.js +13 -0
  45. package/dist/components/MePanel/index.d.ts +3 -0
  46. package/dist/components/MePanel/index.js +9 -0
  47. package/dist/components/Page/index.d.ts +12 -0
  48. package/dist/components/Page/index.js +8 -0
  49. package/dist/components/PageActions/index.d.ts +6 -0
  50. package/dist/components/PageActions/index.js +13 -0
  51. package/dist/components/Panel/index.d.ts +7 -0
  52. package/dist/components/Panel/index.js +5 -0
  53. package/dist/components/RootLayout/index.d.ts +5 -3
  54. package/dist/components/RootLayout/index.js +12 -5
  55. package/dist/components/Table/index.d.ts +7 -26
  56. package/dist/components/Table/index.js +14 -52
  57. package/dist/components/TableClientComponent/index.d.ts +16 -0
  58. package/dist/components/TableClientComponent/index.js +44 -0
  59. package/dist/components/Tabs/index.d.ts +8 -0
  60. package/dist/components/Tabs/index.js +6 -0
  61. package/dist/components/index.d.ts +24 -0
  62. package/dist/components/index.js +13 -0
  63. package/dist/icons/ErrorIcon/index.d.ts +3 -0
  64. package/dist/icons/ErrorIcon/index.js +5 -0
  65. package/dist/icons/InfoIcon/index.d.ts +3 -0
  66. package/dist/icons/InfoIcon/index.js +5 -0
  67. package/dist/icons/SuccessIcon/index.d.ts +3 -0
  68. package/dist/icons/SuccessIcon/index.js +5 -0
  69. package/dist/icons/WarningIcon/index.d.ts +3 -0
  70. package/dist/icons/WarningIcon/index.js +5 -0
  71. package/dist/index.d.ts +2 -208
  72. package/dist/index.js +2 -212
  73. package/dist/interfaces.d.ts +4 -0
  74. package/dist/services/ConfigService.d.ts +7 -40
  75. package/dist/services/ConfigService.js +10 -48
  76. package/dist/styles/config.d.ts +3 -0
  77. package/dist/styles/config.js +82 -0
  78. package/dist/styles.css +873 -134
  79. package/dist/utility/formatters.d.ts +1 -0
  80. package/dist/utility/formatters.js +8 -0
  81. package/next-env.d.ts +5 -0
  82. package/package.json +75 -64
  83. package/src/components/AppLayout/index.tsx +21 -11
  84. package/src/components/AppNavigation/index.tsx +39 -0
  85. package/src/components/BooleanFilter/index.tsx +28 -0
  86. package/src/components/Config/index.tsx +17 -0
  87. package/src/components/Dashboard/index.tsx +15 -0
  88. package/src/components/DateFilter/index.tsx +49 -0
  89. package/src/components/DropdownFilter/index.tsx +19 -0
  90. package/src/components/FilterBar/index.tsx +35 -0
  91. package/src/components/FilterBarItem/index.tsx +126 -0
  92. package/src/components/GridList/index.tsx +11 -0
  93. package/src/components/GridListItem/index.tsx +31 -0
  94. package/src/components/Icon/index.tsx +33 -0
  95. package/src/components/List/index.tsx +52 -72
  96. package/src/components/ListAction/index.tsx +25 -0
  97. package/src/components/ListActions/index.tsx +32 -19
  98. package/src/components/ListItem/index.tsx +56 -0
  99. package/src/components/LoginForm/index.tsx +25 -105
  100. package/src/components/MeActions/index.tsx +21 -0
  101. package/src/components/MePanel/index.tsx +21 -0
  102. package/src/components/Page/index.tsx +60 -0
  103. package/src/components/PageActions/index.tsx +22 -0
  104. package/src/components/Panel/Panel.spec.tsx +10 -0
  105. package/src/components/Panel/Panel.stories.tsx +9 -0
  106. package/src/components/Panel/index.tsx +15 -0
  107. package/src/components/RootLayout/index.tsx +23 -29
  108. package/src/components/Table/index.tsx +22 -111
  109. package/src/components/TableClientComponent/index.tsx +112 -0
  110. package/src/components/Tabs/index.tsx +25 -0
  111. package/src/components/index.ts +68 -0
  112. package/src/icons/ErrorIcon/index.tsx +19 -0
  113. package/src/icons/InfoIcon/index.tsx +19 -0
  114. package/src/icons/SuccessIcon/index.tsx +19 -0
  115. package/src/icons/WarningIcon/index.tsx +19 -0
  116. package/src/index.ts +2 -214
  117. package/src/interfaces.ts +3 -0
  118. package/src/react.d.ts +12 -0
  119. package/src/services/ConfigService.ts +15 -84
  120. package/src/styles/config.ts +95 -0
  121. package/src/styles/tailwind.css +25 -35
  122. package/src/utility/formatters.ts +9 -0
  123. package/tailwind.config.js +8 -3
  124. package/tsconfig.build.json +4 -0
  125. package/tsconfig.json +3 -3
  126. package/.turbo/turbo-docs.log +0 -0
  127. package/.turbo/turbo-lint.log +0 -112
  128. package/.turbo/turbo-test.log +0 -6
  129. package/dist/components/Alert/index.d.ts +0 -4
  130. package/dist/components/Alert/index.js +0 -15
  131. package/dist/components/Allow/index.d.ts +0 -20
  132. package/dist/components/Allow/index.js +0 -29
  133. package/dist/components/AppLayout/AppLayout.stories.d.ts +0 -5
  134. package/dist/components/AppLayout/AppLayout.stories.js +0 -11
  135. package/dist/components/AutoSuggest/index.d.ts +0 -74
  136. package/dist/components/AutoSuggest/index.js +0 -143
  137. package/dist/components/Button/Button.stories.d.ts +0 -11
  138. package/dist/components/Button/Button.stories.js +0 -41
  139. package/dist/components/Button/index.d.ts +0 -49
  140. package/dist/components/Button/index.js +0 -50
  141. package/dist/components/CalendarInput/index.d.ts +0 -24
  142. package/dist/components/CalendarInput/index.js +0 -54
  143. package/dist/components/CheckboxList/index.d.ts +0 -17
  144. package/dist/components/CheckboxList/index.js +0 -25
  145. package/dist/components/CodeInput/index.d.ts +0 -9
  146. package/dist/components/CodeInput/index.js +0 -51
  147. package/dist/components/ConnectedDropdown/index.d.ts +0 -14
  148. package/dist/components/ConnectedDropdown/index.js +0 -36
  149. package/dist/components/ConnectedList/index.d.ts +0 -5
  150. package/dist/components/ConnectedList/index.js +0 -7
  151. package/dist/components/ConnectedTable/index.d.ts +0 -5
  152. package/dist/components/ConnectedTable/index.js +0 -7
  153. package/dist/components/ContentBlock/index.d.ts +0 -16
  154. package/dist/components/ContentBlock/index.js +0 -13
  155. package/dist/components/DataPanel/index.d.ts +0 -8
  156. package/dist/components/DataPanel/index.js +0 -8
  157. package/dist/components/DateInput/index.d.ts +0 -18
  158. package/dist/components/DateInput/index.js +0 -81
  159. package/dist/components/Dropdown/index.d.ts +0 -36
  160. package/dist/components/Dropdown/index.js +0 -122
  161. package/dist/components/ErrorMessage/index.d.ts +0 -16
  162. package/dist/components/ErrorMessage/index.js +0 -17
  163. package/dist/components/Fieldset/index.d.ts +0 -18
  164. package/dist/components/Fieldset/index.js +0 -19
  165. package/dist/components/FileInput/index.d.ts +0 -10
  166. package/dist/components/FileInput/index.js +0 -26
  167. package/dist/components/FilterLink/index.d.ts +0 -14
  168. package/dist/components/FilterLink/index.js +0 -15
  169. package/dist/components/Form/index.d.ts +0 -14
  170. package/dist/components/Form/index.js +0 -15
  171. package/dist/components/FormActions/index.d.ts +0 -18
  172. package/dist/components/FormActions/index.js +0 -14
  173. package/dist/components/FormField/index.d.ts +0 -14
  174. package/dist/components/FormField/index.js +0 -40
  175. package/dist/components/FormRepeater/index.d.ts +0 -18
  176. package/dist/components/FormRepeater/index.js +0 -65
  177. package/dist/components/ImageInput/index.d.ts +0 -13
  178. package/dist/components/ImageInput/index.js +0 -45
  179. package/dist/components/InfoPanel/index.d.ts +0 -14
  180. package/dist/components/InfoPanel/index.js +0 -11
  181. package/dist/components/Link/__mocks__/index.d.ts +0 -6
  182. package/dist/components/Link/__mocks__/index.js +0 -12
  183. package/dist/components/Link/index.d.ts +0 -23
  184. package/dist/components/Link/index.js +0 -21
  185. package/dist/components/Message/index.d.ts +0 -14
  186. package/dist/components/Message/index.js +0 -14
  187. package/dist/components/Modal/index.d.ts +0 -4
  188. package/dist/components/Modal/index.js +0 -18
  189. package/dist/components/ModalActions/index.d.ts +0 -21
  190. package/dist/components/ModalActions/index.js +0 -18
  191. package/dist/components/MoneyInput/index.d.ts +0 -10
  192. package/dist/components/MoneyInput/index.js +0 -13
  193. package/dist/components/PasswordForm/index.d.ts +0 -35
  194. package/dist/components/PasswordForm/index.js +0 -21
  195. package/dist/components/PasswordInput/index.d.ts +0 -4
  196. package/dist/components/PasswordInput/index.js +0 -12
  197. package/dist/components/RadioList/index.d.ts +0 -9
  198. package/dist/components/RadioList/index.js +0 -7
  199. package/dist/components/SummaryList/index.d.ts +0 -18
  200. package/dist/components/SummaryList/index.js +0 -15
  201. package/dist/components/Switch/index.d.ts +0 -21
  202. package/dist/components/Switch/index.js +0 -31
  203. package/dist/components/Tag/index.d.ts +0 -15
  204. package/dist/components/Tag/index.js +0 -13
  205. package/dist/components/TextArea/index.d.ts +0 -18
  206. package/dist/components/TextArea/index.js +0 -26
  207. package/dist/components/TextInput/index.d.ts +0 -14
  208. package/dist/components/TextInput/index.js +0 -27
  209. package/dist/components/WebsiteInput/index.d.ts +0 -10
  210. package/dist/components/WebsiteInput/index.js +0 -13
  211. package/dist/components/WeekCalendar/index.d.ts +0 -24
  212. package/dist/components/WeekCalendar/index.js +0 -48
  213. package/dist/core/AlertComponent/index.d.ts +0 -26
  214. package/dist/core/AlertComponent/index.js +0 -35
  215. package/dist/core/AppHeader/index.d.ts +0 -3
  216. package/dist/core/AppHeader/index.js +0 -17
  217. package/dist/core/AppLogo/index.d.ts +0 -12
  218. package/dist/core/AppLogo/index.js +0 -16
  219. package/dist/core/AppLogoImage/index.d.ts +0 -3
  220. package/dist/core/AppLogoImage/index.js +0 -11
  221. package/dist/core/AppLogoPlaceholder/index.d.ts +0 -3
  222. package/dist/core/AppLogoPlaceholder/index.js +0 -10
  223. package/dist/core/Assistive/index.d.ts +0 -12
  224. package/dist/core/Assistive/index.js +0 -9
  225. package/dist/core/AuthForm/index.d.ts +0 -10
  226. package/dist/core/AuthForm/index.js +0 -13
  227. package/dist/core/Banner/index.d.ts +0 -3
  228. package/dist/core/Banner/index.js +0 -14
  229. package/dist/core/Calendar/index.d.ts +0 -21
  230. package/dist/core/Calendar/index.js +0 -69
  231. package/dist/core/CalendarDay/index.d.ts +0 -30
  232. package/dist/core/CalendarDay/index.js +0 -30
  233. package/dist/core/CalendarMonth/index.d.ts +0 -23
  234. package/dist/core/CalendarMonth/index.js +0 -45
  235. package/dist/core/CalendarNavigation/index.d.ts +0 -17
  236. package/dist/core/CalendarNavigation/index.js +0 -24
  237. package/dist/core/CalendarWeek/index.d.ts +0 -28
  238. package/dist/core/CalendarWeek/index.js +0 -46
  239. package/dist/core/ChkRad/index.d.ts +0 -26
  240. package/dist/core/ChkRad/index.js +0 -33
  241. package/dist/core/ChkRadIcon/index.d.ts +0 -14
  242. package/dist/core/ChkRadIcon/index.js +0 -12
  243. package/dist/core/ChkRadList/index.d.ts +0 -32
  244. package/dist/core/ChkRadList/index.js +0 -37
  245. package/dist/core/CloseButton/index.d.ts +0 -17
  246. package/dist/core/CloseButton/index.js +0 -12
  247. package/dist/core/ConfirmModal/index.d.ts +0 -3
  248. package/dist/core/ConfirmModal/index.js +0 -38
  249. package/dist/core/ConnectedRepeater/index.d.ts +0 -50
  250. package/dist/core/ConnectedRepeater/index.js +0 -154
  251. package/dist/core/ConnectedRepeaterComponent/index.d.ts +0 -24
  252. package/dist/core/ConnectedRepeaterComponent/index.js +0 -25
  253. package/dist/core/Container/index.d.ts +0 -14
  254. package/dist/core/Container/index.js +0 -12
  255. package/dist/core/DataPanelItem/index.d.ts +0 -8
  256. package/dist/core/DataPanelItem/index.js +0 -7
  257. package/dist/core/DropdownPanel/index.d.ts +0 -31
  258. package/dist/core/DropdownPanel/index.js +0 -32
  259. package/dist/core/EmptyMessage/index.d.ts +0 -21
  260. package/dist/core/EmptyMessage/index.js +0 -21
  261. package/dist/core/FilterItem/index.d.ts +0 -25
  262. package/dist/core/FilterItem/index.js +0 -82
  263. package/dist/core/Filters/index.d.ts +0 -31
  264. package/dist/core/Filters/index.js +0 -85
  265. package/dist/core/FixedActions/index.d.ts +0 -24
  266. package/dist/core/FixedActions/index.js +0 -22
  267. package/dist/core/FormError/index.d.ts +0 -12
  268. package/dist/core/FormError/index.js +0 -9
  269. package/dist/core/FormLabel/index.d.ts +0 -16
  270. package/dist/core/FormLabel/index.js +0 -13
  271. package/dist/core/FormLegend/index.d.ts +0 -12
  272. package/dist/core/FormLegend/index.js +0 -9
  273. package/dist/core/Header/Header.stories.d.ts +0 -5
  274. package/dist/core/Header/Header.stories.js +0 -11
  275. package/dist/core/Header/index.d.ts +0 -14
  276. package/dist/core/Header/index.js +0 -12
  277. package/dist/core/Icon/index.d.ts +0 -14
  278. package/dist/core/Icon/index.js +0 -32
  279. package/dist/core/IconButton/index.d.ts +0 -22
  280. package/dist/core/IconButton/index.js +0 -20
  281. package/dist/core/InputPanel/index.d.ts +0 -16
  282. package/dist/core/InputPanel/index.js +0 -11
  283. package/dist/core/ListItem/index.d.ts +0 -39
  284. package/dist/core/ListItem/index.js +0 -44
  285. package/dist/core/ListItemAction/index.d.ts +0 -11
  286. package/dist/core/ListItemAction/index.js +0 -13
  287. package/dist/core/ListItemActions/index.d.ts +0 -8
  288. package/dist/core/ListItemActions/index.js +0 -16
  289. package/dist/core/ListItemMetaItem/index.d.ts +0 -19
  290. package/dist/core/ListItemMetaItem/index.js +0 -29
  291. package/dist/core/ListItemTitle/index.d.ts +0 -19
  292. package/dist/core/ListItemTitle/index.js +0 -44
  293. package/dist/core/Loader/index.d.ts +0 -15
  294. package/dist/core/Loader/index.js +0 -16
  295. package/dist/core/MeActions/index.d.ts +0 -3
  296. package/dist/core/MeActions/index.js +0 -48
  297. package/dist/core/MePanel/index.d.ts +0 -19
  298. package/dist/core/MePanel/index.js +0 -29
  299. package/dist/core/ModalComponent/index.d.ts +0 -22
  300. package/dist/core/ModalComponent/index.js +0 -29
  301. package/dist/core/Navigation/index.d.ts +0 -3
  302. package/dist/core/Navigation/index.js +0 -33
  303. package/dist/core/NavigationDivider/index.d.ts +0 -3
  304. package/dist/core/NavigationDivider/index.js +0 -8
  305. package/dist/core/NavigationItem/index.d.ts +0 -16
  306. package/dist/core/NavigationItem/index.js +0 -21
  307. package/dist/core/Pagination/index.d.ts +0 -15
  308. package/dist/core/Pagination/index.js +0 -64
  309. package/dist/core/PaginationItem/index.d.ts +0 -10
  310. package/dist/core/PaginationItem/index.js +0 -17
  311. package/dist/core/Panel/index.d.ts +0 -17
  312. package/dist/core/Panel/index.js +0 -13
  313. package/dist/core/PasswordForgotForm/index.d.ts +0 -7
  314. package/dist/core/PasswordForgotForm/index.js +0 -40
  315. package/dist/core/PasswordResetForm/index.d.ts +0 -7
  316. package/dist/core/PasswordResetForm/index.js +0 -34
  317. package/dist/core/RadialProgress/index.d.ts +0 -16
  318. package/dist/core/RadialProgress/index.js +0 -23
  319. package/dist/core/SettingsForm/index.d.ts +0 -3
  320. package/dist/core/SettingsForm/index.js +0 -14
  321. package/dist/core/StaticTextInput/index.d.ts +0 -29
  322. package/dist/core/StaticTextInput/index.js +0 -39
  323. package/dist/core/Styled/index.d.ts +0 -6
  324. package/dist/core/Styled/index.js +0 -39
  325. package/dist/core/SummaryListItem/index.d.ts +0 -23
  326. package/dist/core/SummaryListItem/index.js +0 -31
  327. package/dist/core/TabItem/index.d.ts +0 -4
  328. package/dist/core/TabItem/index.js +0 -13
  329. package/dist/core/TableActionsCell/index.d.ts +0 -8
  330. package/dist/core/TableActionsCell/index.js +0 -8
  331. package/dist/core/TableCell/index.d.ts +0 -15
  332. package/dist/core/TableCell/index.js +0 -20
  333. package/dist/core/TableHead/index.d.ts +0 -18
  334. package/dist/core/TableHead/index.js +0 -18
  335. package/dist/core/TableRow/index.d.ts +0 -13
  336. package/dist/core/TableRow/index.js +0 -18
  337. package/dist/core/Tabs/index.d.ts +0 -7
  338. package/dist/core/Tabs/index.js +0 -13
  339. package/dist/core/TextInputAncillary/index.d.ts +0 -29
  340. package/dist/core/TextInputAncillary/index.js +0 -31
  341. package/dist/core/Toast/index.d.ts +0 -3
  342. package/dist/core/Toast/index.js +0 -47
  343. package/dist/core/TwoFactor/index.d.ts +0 -13
  344. package/dist/core/TwoFactor/index.js +0 -49
  345. package/dist/core/TwoFactorAuthenticator/index.d.ts +0 -10
  346. package/dist/core/TwoFactorAuthenticator/index.js +0 -9
  347. package/dist/core/TwoFactorMethodList/index.d.ts +0 -10
  348. package/dist/core/TwoFactorMethodList/index.js +0 -22
  349. package/dist/core/TwoFactorSetup/index.d.ts +0 -12
  350. package/dist/core/TwoFactorSetup/index.js +0 -43
  351. package/dist/core/TwoFactorSetupAuthenticator/index.d.ts +0 -20
  352. package/dist/core/TwoFactorSetupAuthenticator/index.js +0 -42
  353. package/dist/core/TwoFactorSetupYubikey/index.d.ts +0 -16
  354. package/dist/core/TwoFactorSetupYubikey/index.js +0 -14
  355. package/dist/core/TwoFactorYubikey/index.d.ts +0 -9
  356. package/dist/core/TwoFactorYubikey/index.js +0 -14
  357. package/dist/core/WeekCalendarDay/index.d.ts +0 -27
  358. package/dist/core/WeekCalendarDay/index.js +0 -35
  359. package/dist/core/YubikeyInput/index.d.ts +0 -4
  360. package/dist/core/YubikeyInput/index.js +0 -14
  361. package/dist/filters/BooleanFilter/index.d.ts +0 -14
  362. package/dist/filters/BooleanFilter/index.js +0 -35
  363. package/dist/filters/DateFilter/index.d.ts +0 -5
  364. package/dist/filters/DateFilter/index.js +0 -24
  365. package/dist/filters/DropdownFilter/index.d.ts +0 -17
  366. package/dist/filters/DropdownFilter/index.js +0 -32
  367. package/dist/filters/QuickDateFilter/index.d.ts +0 -13
  368. package/dist/filters/QuickDateFilter/index.js +0 -40
  369. package/dist/filters/interfaces.d.ts +0 -35
  370. package/dist/hooks/useAlert.d.ts +0 -12
  371. package/dist/hooks/useAlert.js +0 -18
  372. package/dist/hooks/useAppConfig.d.ts +0 -3
  373. package/dist/hooks/useAppConfig.js +0 -5
  374. package/dist/hooks/useConnectedList.d.ts +0 -7
  375. package/dist/hooks/useConnectedList.js +0 -6
  376. package/dist/hooks/useConnectedRepeater.d.ts +0 -7
  377. package/dist/hooks/useConnectedRepeater.js +0 -14
  378. package/dist/hooks/useConnectedTable.d.ts +0 -7
  379. package/dist/hooks/useConnectedTable.js +0 -6
  380. package/dist/hooks/useFilters.d.ts +0 -9
  381. package/dist/hooks/useFilters.js +0 -24
  382. package/dist/hooks/useLayout.d.ts +0 -7
  383. package/dist/hooks/useLayout.js +0 -10
  384. package/dist/hooks/useLayout.spec.d.ts +0 -1
  385. package/dist/hooks/useLayout.spec.js +0 -24
  386. package/dist/hooks/useModal.d.ts +0 -12
  387. package/dist/hooks/useModal.js +0 -39
  388. package/dist/hooks/useModalOffset.d.ts +0 -2
  389. package/dist/hooks/useModalOffset.js +0 -16
  390. package/dist/hooks/useModalOffset.spec.d.ts +0 -1
  391. package/dist/hooks/useModalOffset.spec.js +0 -19
  392. package/dist/hooks/useNavigation.d.ts +0 -7
  393. package/dist/hooks/useNavigation.js +0 -113
  394. package/dist/hooks/useRemote.d.ts +0 -7
  395. package/dist/hooks/useRemote.js +0 -29
  396. package/dist/hooks/useVariant.d.ts +0 -9
  397. package/dist/hooks/useVariant.js +0 -14
  398. package/dist/scenes/Error404Scene.d.ts +0 -3
  399. package/dist/scenes/Error404Scene.js +0 -5
  400. package/dist/services/AppService.d.ts +0 -5
  401. package/dist/services/AppService.js +0 -11
  402. package/dist/services/ConfirmService.d.ts +0 -12
  403. package/dist/services/ConfirmService.js +0 -10
  404. package/dist/services/DateService.d.ts +0 -26
  405. package/dist/services/DateService.js +0 -132
  406. package/dist/services/DateService.spec.d.ts +0 -1
  407. package/dist/services/DateService.spec.js +0 -83
  408. package/dist/services/DownloadService.d.ts +0 -7
  409. package/dist/services/DownloadService.js +0 -16
  410. package/dist/services/DownloadService.spec.d.ts +0 -1
  411. package/dist/services/DownloadService.spec.js +0 -18
  412. package/dist/services/FilterComponentService.d.ts +0 -25
  413. package/dist/services/FilterComponentService.js +0 -54
  414. package/dist/services/FilterService.d.ts +0 -34
  415. package/dist/services/FilterService.js +0 -58
  416. package/dist/services/FilterService.spec.d.ts +0 -1
  417. package/dist/services/FilterService.spec.js +0 -67
  418. package/dist/services/FormatService.d.ts +0 -11
  419. package/dist/services/FormatService.js +0 -45
  420. package/dist/services/FormatService.spec.d.ts +0 -1
  421. package/dist/services/FormatService.spec.js +0 -66
  422. package/dist/services/ToastService.d.ts +0 -7
  423. package/dist/services/ToastService.js +0 -17
  424. package/dist/services/ToastService.spec.d.ts +0 -1
  425. package/dist/services/ToastService.spec.js +0 -34
  426. package/dist/utility/MockRouter/index.d.ts +0 -2
  427. package/dist/utility/MockRouter/index.js +0 -37
  428. package/dist/utility/StorybookPanel/index.d.ts +0 -14
  429. package/dist/utility/StorybookPanel/index.js +0 -12
  430. package/dist/utility/TestChangeHandler/index.d.ts +0 -15
  431. package/dist/utility/TestChangeHandler/index.js +0 -30
  432. package/dist/utility/icons.d.ts +0 -3
  433. package/dist/utility/icons.js +0 -12
  434. package/dist/utility/interfaces.d.ts +0 -79
  435. package/dist/utility/interfaces.js +0 -18
  436. package/dist/utility/middleware.d.ts +0 -4
  437. package/dist/utility/middleware.js +0 -9
  438. package/dist/utility/prop-types.d.ts +0 -57
  439. package/dist/utility/prop-types.js +0 -77
  440. package/dist/utility/register.d.ts +0 -3
  441. package/dist/utility/register.js +0 -9
  442. package/src/components/Alert/index.tsx +0 -111
  443. package/src/components/Allow/Allow.spec.tsx +0 -37
  444. package/src/components/Allow/index.tsx +0 -42
  445. package/src/components/AppLayout/AppLayout.stories.tsx +0 -20
  446. package/src/components/AutoSuggest/AutoSuggest.module.css +0 -8
  447. package/src/components/AutoSuggest/AutoSuggest.spec.tsx +0 -222
  448. package/src/components/AutoSuggest/AutoSuggest.story.tsx +0 -32
  449. package/src/components/AutoSuggest/index.tsx +0 -215
  450. package/src/components/Button/Button.spec.tsx +0 -61
  451. package/src/components/Button/Button.stories.tsx +0 -62
  452. package/src/components/Button/index.tsx +0 -15
  453. package/src/components/CalendarInput/CalendarInput.module.css +0 -8
  454. package/src/components/CalendarInput/CalendarInput.spec.tsx +0 -222
  455. package/src/components/CalendarInput/CalendarInput.story.tsx +0 -62
  456. package/src/components/CalendarInput/index.tsx +0 -126
  457. package/src/components/CheckboxList/CheckboxList.spec.tsx +0 -93
  458. package/src/components/CheckboxList/index.tsx +0 -51
  459. package/src/components/ConnectedDropdown/index.tsx +0 -53
  460. package/src/components/ConnectedList/index.tsx +0 -19
  461. package/src/components/ConnectedTable/index.tsx +0 -21
  462. package/src/components/ContentBlock/ContentBlock.module.css +0 -17
  463. package/src/components/ContentBlock/ContentBlock.spec.tsx +0 -25
  464. package/src/components/ContentBlock/index.tsx +0 -28
  465. package/src/components/DataPanel/index.tsx +0 -25
  466. package/src/components/DateInput/DateInput.module.css +0 -15
  467. package/src/components/DateInput/DateInput.spec.tsx +0 -87
  468. package/src/components/DateInput/index.tsx +0 -145
  469. package/src/components/ErrorMessage/ErrorMessage.module.css +0 -25
  470. package/src/components/ErrorMessage/ErrorMessage.spec.tsx +0 -31
  471. package/src/components/ErrorMessage/index.tsx +0 -36
  472. package/src/components/Fieldset/Fieldset.spec.tsx +0 -22
  473. package/src/components/Fieldset/Fieldset.story.tsx +0 -25
  474. package/src/components/Fieldset/index.tsx +0 -32
  475. package/src/components/FileInput/FileInput.module.css +0 -18
  476. package/src/components/FileInput/FileInput.spec.tsx +0 -52
  477. package/src/components/FileInput/FileInput.story.tsx +0 -8
  478. package/src/components/FileInput/index.tsx +0 -75
  479. package/src/components/FilterLink/FilterLink.module.css +0 -9
  480. package/src/components/FilterLink/FilterLink.spec.tsx +0 -34
  481. package/src/components/FilterLink/index.tsx +0 -36
  482. package/src/components/Form/Form.spec.tsx +0 -39
  483. package/src/components/Form/index.tsx +0 -25
  484. package/src/components/FormActions/FormActions.spec.tsx +0 -10
  485. package/src/components/FormActions/FormActions.story.tsx +0 -27
  486. package/src/components/FormActions/index.tsx +0 -35
  487. package/src/components/FormField/FormField.module.css +0 -71
  488. package/src/components/FormField/FormField.spec.tsx +0 -177
  489. package/src/components/FormField/FormField.stories.tsx +0 -44
  490. package/src/components/FormField/index.tsx +0 -14
  491. package/src/components/FormRepeater/FormRepeater.module.css +0 -7
  492. package/src/components/FormRepeater/FormRepeater.spec.tsx +0 -156
  493. package/src/components/FormRepeater/index.tsx +0 -121
  494. package/src/components/ImageInput/ImageInput.module.css +0 -74
  495. package/src/components/ImageInput/ImageInput.spec.tsx +0 -47
  496. package/src/components/ImageInput/ImageInput.story.tsx +0 -8
  497. package/src/components/ImageInput/index.tsx +0 -93
  498. package/src/components/InfoPanel/InfoPanel.module.css +0 -20
  499. package/src/components/InfoPanel/InfoPanel.spec.tsx +0 -15
  500. package/src/components/InfoPanel/InfoPanel.story.tsx +0 -32
  501. package/src/components/InfoPanel/index.tsx +0 -25
  502. package/src/components/Link/Link.spec.tsx +0 -64
  503. package/src/components/Link/__mocks__/index.tsx +0 -24
  504. package/src/components/Link/index.tsx +0 -60
  505. package/src/components/List/List.module.css +0 -9
  506. package/src/components/List/List.spec.tsx +0 -379
  507. package/src/components/List/List.story.tsx +0 -119
  508. package/src/components/ListActions/ListActions.spec.tsx +0 -10
  509. package/src/components/ListActions/ListActions.story.tsx +0 -8
  510. package/src/components/LoginForm/LoginForm.spec.tsx +0 -68
  511. package/src/components/LoginForm/LoginForm.story.tsx +0 -25
  512. package/src/components/Message/Message.module.css +0 -14
  513. package/src/components/Message/Message.spec.tsx +0 -20
  514. package/src/components/Message/index.tsx +0 -29
  515. package/src/components/Modal/index.tsx +0 -27
  516. package/src/components/ModalActions/ModalActions.module.css +0 -5
  517. package/src/components/ModalActions/ModalActions.spec.tsx +0 -49
  518. package/src/components/ModalActions/ModalActions.story.tsx +0 -8
  519. package/src/components/ModalActions/index.tsx +0 -51
  520. package/src/components/MoneyInput/MoneyInput.spec.tsx +0 -17
  521. package/src/components/MoneyInput/MoneyInput.story.tsx +0 -8
  522. package/src/components/MoneyInput/index.tsx +0 -18
  523. package/src/components/PasswordForm/index.tsx +0 -36
  524. package/src/components/RadioList/RadioList.spec.tsx +0 -47
  525. package/src/components/RadioList/index.tsx +0 -19
  526. package/src/components/SummaryList/SummaryList.module.css +0 -31
  527. package/src/components/SummaryList/SummaryList.spec.tsx +0 -89
  528. package/src/components/SummaryList/SummaryList.story.tsx +0 -13
  529. package/src/components/SummaryList/index.tsx +0 -39
  530. package/src/components/Switch/Switch.module.css +0 -86
  531. package/src/components/Switch/Switch.spec.tsx +0 -64
  532. package/src/components/Switch/index.tsx +0 -89
  533. package/src/components/Table/Table.module.css +0 -14
  534. package/src/components/Table/Table.spec.tsx +0 -136
  535. package/src/components/Table/Table.story.tsx +0 -108
  536. package/src/components/TextArea/TextArea.module.css +0 -23
  537. package/src/components/TextArea/TextArea.spec.tsx +0 -77
  538. package/src/components/TextArea/index.tsx +0 -61
  539. package/src/components/TextInput/TextInput.module.css +0 -62
  540. package/src/components/TextInput/TextInput.spec.tsx +0 -127
  541. package/src/components/TextInput/TextInput.stories.tsx +0 -46
  542. package/src/components/TextInput/index.tsx +0 -11
  543. package/src/components/WebsiteInput/WebsiteInput.spec.tsx +0 -17
  544. package/src/components/WebsiteInput/index.tsx +0 -18
  545. package/src/components/WeekCalendar/WeekCalendar.module.css +0 -19
  546. package/src/components/WeekCalendar/index.tsx +0 -80
  547. package/src/core/AlertComponent/AlertComponent.module.css +0 -110
  548. package/src/core/AlertComponent/AlertComponent.spec.tsx +0 -85
  549. package/src/core/AlertComponent/AlertComponent.story.tsx +0 -29
  550. package/src/core/AlertComponent/index.tsx +0 -109
  551. package/src/core/AppHeader/index.tsx +0 -25
  552. package/src/core/AppLogo/AppLogo.module.css +0 -18
  553. package/src/core/AppLogo/index.tsx +0 -35
  554. package/src/core/AppLogoImage/index.tsx +0 -19
  555. package/src/core/AppLogoPlaceholder/index.tsx +0 -32
  556. package/src/core/Assistive/index.tsx +0 -1
  557. package/src/core/AuthForm/AuthForm.module.css +0 -35
  558. package/src/core/AuthForm/AuthForm.spec.tsx +0 -72
  559. package/src/core/AuthForm/index.tsx +0 -63
  560. package/src/core/Banner/Banner.module.css +0 -34
  561. package/src/core/Banner/index.tsx +0 -25
  562. package/src/core/Calendar/index.tsx +0 -118
  563. package/src/core/CalendarDay/CalendarDay.module.css +0 -61
  564. package/src/core/CalendarDay/index.tsx +0 -82
  565. package/src/core/CalendarMonth/CalendarMonth.module.css +0 -13
  566. package/src/core/CalendarMonth/index.tsx +0 -103
  567. package/src/core/CalendarNavigation/CalendarNavigation.module.css +0 -26
  568. package/src/core/CalendarNavigation/index.tsx +0 -55
  569. package/src/core/CalendarWeek/index.tsx +0 -97
  570. package/src/core/ChkRadList/ChkRadList.module.css +0 -12
  571. package/src/core/ChkRadList/index.tsx +0 -88
  572. package/src/core/CloseButton/CloseButton.spec.tsx +0 -38
  573. package/src/core/CloseButton/index.tsx +0 -33
  574. package/src/core/ConfirmModal/ConfirmModal.spec.tsx +0 -94
  575. package/src/core/ConfirmModal/index.tsx +0 -59
  576. package/src/core/ConnectedRepeater/index.tsx +0 -284
  577. package/src/core/ConnectedRepeaterComponent/index.tsx +0 -71
  578. package/src/core/Container/Container.module.css +0 -13
  579. package/src/core/Container/index.tsx +0 -29
  580. package/src/core/DataPanelItem/index.tsx +0 -19
  581. package/src/core/EmptyMessage/EmptyMessage.module.css +0 -18
  582. package/src/core/EmptyMessage/EmptyMessage.stories.tsx +0 -33
  583. package/src/core/EmptyMessage/index.tsx +0 -15
  584. package/src/core/FilterItem/FilterItem.module.css +0 -104
  585. package/src/core/FilterItem/index.tsx +0 -172
  586. package/src/core/Filters/Filters.module.css +0 -86
  587. package/src/core/Filters/Filters.spec.tsx +0 -573
  588. package/src/core/Filters/index.tsx +0 -168
  589. package/src/core/FixedActions/FixedActions.module.css +0 -23
  590. package/src/core/FixedActions/FixedActions.spec.tsx +0 -53
  591. package/src/core/FixedActions/index.tsx +0 -54
  592. package/src/core/FormLegend/FormLegend.module.css +0 -13
  593. package/src/core/FormLegend/index.tsx +0 -18
  594. package/src/core/Header/Header.stories.tsx +0 -20
  595. package/src/core/Header/index.tsx +0 -32
  596. package/src/core/Icon/Icon.spec.tsx +0 -30
  597. package/src/core/Icon/index.tsx +0 -70
  598. package/src/core/IconButton/IconButton.module.css +0 -32
  599. package/src/core/IconButton/index.tsx +0 -53
  600. package/src/core/ListItem/ListItem.module.css +0 -28
  601. package/src/core/ListItem/ListItem.story.tsx +0 -32
  602. package/src/core/ListItem/index.tsx +0 -109
  603. package/src/core/ListItemAction/ListItemAction.module.css +0 -33
  604. package/src/core/ListItemAction/index.tsx +0 -30
  605. package/src/core/ListItemActions/ListItemActions.module.css +0 -94
  606. package/src/core/ListItemActions/index.tsx +0 -42
  607. package/src/core/ListItemMetaItem/ListItemMetaItem.module.css +0 -18
  608. package/src/core/ListItemMetaItem/index.tsx +0 -54
  609. package/src/core/ListItemTitle/ListItemTitle.module.css +0 -22
  610. package/src/core/ListItemTitle/ListItemTitle.spec.tsx +0 -53
  611. package/src/core/ListItemTitle/index.tsx +0 -82
  612. package/src/core/Loader/Loader.module.css +0 -57
  613. package/src/core/Loader/Loader.stories.tsx +0 -22
  614. package/src/core/Loader/index.tsx +0 -2
  615. package/src/core/MeActions/MeActions.module.css +0 -47
  616. package/src/core/MeActions/index.tsx +0 -74
  617. package/src/core/MePanel/MePanel.module.css +0 -79
  618. package/src/core/MePanel/index.tsx +0 -58
  619. package/src/core/ModalComponent/ModalComponent.module.css +0 -86
  620. package/src/core/ModalComponent/ModalComponent.spec.tsx +0 -55
  621. package/src/core/ModalComponent/index.tsx +0 -66
  622. package/src/core/Navigation/Navigation.module.css +0 -89
  623. package/src/core/Navigation/Navigation.spec.tsx +0 -121
  624. package/src/core/Navigation/index.tsx +0 -69
  625. package/src/core/NavigationDivider/NavigationDivider.module.css +0 -3
  626. package/src/core/NavigationDivider/index.tsx +0 -13
  627. package/src/core/NavigationItem/NavigationItem.module.css +0 -46
  628. package/src/core/NavigationItem/index.tsx +0 -50
  629. package/src/core/Panel/Panel.module.css +0 -26
  630. package/src/core/Panel/Panel.spec.tsx +0 -16
  631. package/src/core/Panel/index.tsx +0 -35
  632. package/src/core/PasswordForgotForm/index.tsx +0 -62
  633. package/src/core/PasswordResetForm/index.tsx +0 -65
  634. package/src/core/RadialProgress/RadialProgress.module.css +0 -78
  635. package/src/core/RadialProgress/index.tsx +0 -49
  636. package/src/core/SettingsForm/index.tsx +0 -26
  637. package/src/core/SummaryListItem/SummaryListItem.module.css +0 -20
  638. package/src/core/SummaryListItem/index.tsx +0 -65
  639. package/src/core/TabItem/TabItem.module.css +0 -28
  640. package/src/core/TabItem/index.tsx +0 -42
  641. package/src/core/Tabs/Tabs.module.css +0 -19
  642. package/src/core/Tabs/Tabs.spec.tsx +0 -30
  643. package/src/core/Tabs/index.tsx +0 -36
  644. package/src/core/Toast/Toast.module.css +0 -54
  645. package/src/core/Toast/Toast.spec.tsx +0 -80
  646. package/src/core/Toast/index.tsx +0 -79
  647. package/src/core/TwoFactor/TwoFactor.spec.tsx +0 -183
  648. package/src/core/TwoFactor/index.tsx +0 -102
  649. package/src/core/TwoFactorAuthenticator/index.tsx +0 -39
  650. package/src/core/TwoFactorMethodList/TwoFactorMethodList.module.css +0 -50
  651. package/src/core/TwoFactorMethodList/index.tsx +0 -49
  652. package/src/core/TwoFactorSetup/index.tsx +0 -91
  653. package/src/core/TwoFactorSetupAuthenticator/TwoFactorSetupAuthenticator.module.css +0 -6
  654. package/src/core/TwoFactorSetupAuthenticator/index.tsx +0 -100
  655. package/src/core/TwoFactorSetupYubikey/index.tsx +0 -49
  656. package/src/core/TwoFactorYubikey/index.tsx +0 -41
  657. package/src/core/WeekCalendarDay/WeekCalendarDay.module.css +0 -32
  658. package/src/core/WeekCalendarDay/index.tsx +0 -68
  659. package/src/core/YubikeyInput/YubikeyInput.module.css +0 -27
  660. package/src/core/YubikeyInput/YubikeyInput.spec.tsx +0 -77
  661. package/src/core/YubikeyInput/index.tsx +0 -76
  662. package/src/filters/BooleanFilter/index.tsx +0 -47
  663. package/src/filters/DateFilter/index.tsx +0 -36
  664. package/src/filters/DropdownFilter/index.tsx +0 -51
  665. package/src/filters/QuickDateFilter/index.tsx +0 -74
  666. package/src/filters/interfaces.ts +0 -39
  667. package/src/hooks/useAlert.spec.tsx +0 -72
  668. package/src/hooks/useAlert.ts +0 -37
  669. package/src/hooks/useConfig.ts +0 -31
  670. package/src/hooks/useConnectedList.ts +0 -15
  671. package/src/hooks/useConnectedRepeater.ts +0 -25
  672. package/src/hooks/useConnectedTable.ts +0 -15
  673. package/src/hooks/useFilters.ts +0 -34
  674. package/src/hooks/useLayout.spec.ts +0 -31
  675. package/src/hooks/useLayout.ts +0 -23
  676. package/src/hooks/useModal.spec.tsx +0 -72
  677. package/src/hooks/useModal.ts +0 -62
  678. package/src/hooks/useModalOffset.spec.ts +0 -27
  679. package/src/hooks/useModalOffset.ts +0 -26
  680. package/src/hooks/useNavigation.ts +0 -160
  681. package/src/hooks/useRemote.ts +0 -43
  682. package/src/scenes/Error404Scene.tsx +0 -7
  683. package/src/services/AppService.ts +0 -16
  684. package/src/services/ConfirmService.ts +0 -26
  685. package/src/services/DateService.spec.ts +0 -102
  686. package/src/services/DateService.ts +0 -182
  687. package/src/services/DownloadService.spec.ts +0 -23
  688. package/src/services/DownloadService.ts +0 -21
  689. package/src/services/FilterComponentService.tsx +0 -67
  690. package/src/services/FilterService.spec.ts +0 -105
  691. package/src/services/FilterService.ts +0 -80
  692. package/src/services/FormatService.spec.ts +0 -85
  693. package/src/services/FormatService.ts +0 -60
  694. package/src/services/ToastService.spec.ts +0 -44
  695. package/src/services/ToastService.ts +0 -24
  696. package/src/typings.d.ts +0 -4
  697. package/src/utility/MockRouter/index.ts +0 -46
  698. package/src/utility/icons.tsx +0 -51
  699. package/src/utility/interfaces.ts +0 -142
  700. package/src/utility/middleware.ts +0 -10
  701. package/src/utility/prop-types.ts +0 -89
  702. package/src/utility/register.tsx +0 -11
  703. package/tsconfig.eslint.json +0 -4
  704. /package/dist/{filters/interfaces.js → interfaces.js} +0 -0
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import type { StyleVariant } from '../../utility/interfaces';
4
- export interface InfoPanelProps {
5
- children: React.ReactNode;
6
- variant?: StyleVariant;
7
- }
8
- declare function InfoPanel({ children, variant }: InfoPanelProps): React.ReactElement;
9
- declare namespace InfoPanel {
10
- var propTypes: {
11
- children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
12
- };
13
- }
14
- export default InfoPanel;
@@ -1,11 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import useVariant from '../../hooks/useVariant';
4
- function InfoPanel({ children, variant }) {
5
- const { applyVariantClassName } = useVariant(variant);
6
- return React.createElement("div", { className: "/*clsx(styles.root, applyVariantClassName(styles))*/" }, children);
7
- }
8
- InfoPanel.propTypes = {
9
- children: PropTypes.node.isRequired,
10
- };
11
- export default InfoPanel;
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- interface LinkProps {
3
- onClick?: React.MouseEventHandler<HTMLAnchorElement>;
4
- }
5
- declare function Link({ onClick, ...props }: LinkProps): React.ReactElement;
6
- export default Link;
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- function Link({ onClick, ...props }) {
3
- const { default: ActualLink } = jest.requireActual('@/components/Link');
4
- const handleClick = (event) => {
5
- event.preventDefault();
6
- if (onClick) {
7
- onClick(event);
8
- }
9
- };
10
- return React.createElement(ActualLink, { ...props, onClick: handleClick });
11
- }
12
- export default Link;
@@ -1,23 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- interface DataProps {
4
- 'data-test-id'?: string;
5
- }
6
- interface LinkProps extends DataProps {
7
- children: React.ReactNode;
8
- className?: string;
9
- isNewWindow?: boolean;
10
- to: string;
11
- onClick?: React.MouseEventHandler<HTMLAnchorElement>;
12
- }
13
- declare function Link({ children, className, isNewWindow, onClick, to, ...dataProps }: LinkProps): React.ReactElement;
14
- declare namespace Link {
15
- var propTypes: {
16
- children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
17
- to: PropTypes.Validator<string>;
18
- className: PropTypes.Requireable<string>;
19
- isNewWindow: PropTypes.Requireable<boolean>;
20
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
21
- };
22
- }
23
- export default Link;
@@ -1,21 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import NextLink from 'next/link';
4
- function Link({ children, className, isNewWindow, onClick, to, ...dataProps }) {
5
- const newWindowProps = isNewWindow
6
- ? { target: '_blank', rel: 'noopener noreferrer' }
7
- : {};
8
- const props = { ...newWindowProps, ...dataProps, className, onClick };
9
- if (/^http/u.exec(to) || /^mailto:/u.exec(to) || /^tel:/u.exec(to)) {
10
- return (React.createElement("a", { href: to, ...props }, children));
11
- }
12
- return (React.createElement(NextLink, { href: /^\//u.exec(to) ? to : `/${to}`, ...props }, children));
13
- }
14
- Link.propTypes = {
15
- children: PropTypes.node.isRequired,
16
- to: PropTypes.string.isRequired,
17
- className: PropTypes.string,
18
- isNewWindow: PropTypes.bool,
19
- onClick: PropTypes.func,
20
- };
21
- export default Link;
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- interface MessageProps {
4
- children: React.ReactNode;
5
- title?: string | null;
6
- }
7
- declare function Message({ children, title }: MessageProps): React.ReactElement;
8
- declare namespace Message {
9
- var propTypes: {
10
- children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
11
- title: PropTypes.Requireable<string>;
12
- };
13
- }
14
- export default Message;
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import Panel from '../../core/Panel';
4
- function Message({ children, title }) {
5
- return (React.createElement(Panel, { isPadded: true, isSpaced: true },
6
- React.createElement("div", { className: "/*styles.root*/" },
7
- title ? React.createElement("h3", { className: "/*styles.title*/" }, title) : null,
8
- children)));
9
- }
10
- Message.propTypes = {
11
- children: PropTypes.node.isRequired,
12
- title: PropTypes.string,
13
- };
14
- export default Message;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import type { ModalComponentProps } from '../../core/ModalComponent';
3
- declare function Modal(props: ModalComponentProps): React.ReactElement | null;
4
- export default Modal;
@@ -1,18 +0,0 @@
1
- /* istanbul ignore file */
2
- import React from 'react';
3
- import { createPortal } from 'react-dom';
4
- import ModalComponent from '../../core/ModalComponent';
5
- import { ifWindow } from '@sqrzro/utility';
6
- function Modal(props) {
7
- return ifWindow(() => {
8
- if (typeof window === 'undefined') {
9
- return null;
10
- }
11
- const portalElement = document.getElementById('modal-portal');
12
- if (!portalElement) {
13
- return null;
14
- }
15
- return createPortal(React.createElement(ModalComponent, { ...props }), portalElement);
16
- }, null);
17
- }
18
- export default Modal;
@@ -1,21 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import type { ButtonVariant } from '../../utility/interfaces';
4
- interface ModalActionsProps {
5
- isDisabled?: boolean;
6
- isLoading?: boolean;
7
- label: string;
8
- onClick?: React.MouseEventHandler<HTMLButtonElement>;
9
- variant?: ButtonVariant | ButtonVariant[];
10
- }
11
- declare function ModalActions({ label, isDisabled, isLoading, onClick, variant, }: ModalActionsProps): React.ReactElement;
12
- declare namespace ModalActions {
13
- var propTypes: {
14
- label: PropTypes.Validator<string>;
15
- isDisabled: PropTypes.Requireable<boolean>;
16
- isLoading: PropTypes.Requireable<boolean>;
17
- variant: PropTypes.Requireable<NonNullable<NonNullable<ButtonVariant> | NonNullable<ButtonVariant>[] | null | undefined>>;
18
- onClick: PropTypes.Requireable<(...args: any[]) => any>;
19
- };
20
- }
21
- export default ModalActions;
@@ -1,18 +0,0 @@
1
- 'use client';
2
- import React from 'react';
3
- import PropTypes from 'prop-types';
4
- import Button from '../../components/Button';
5
- import { ButtonVariantPropType } from '../../utility/prop-types';
6
- function ModalActions({ label, isDisabled, isLoading, onClick, variant, }) {
7
- return (React.createElement("div", { className: "/*styles.root*/" },
8
- React.createElement("div", null,
9
- React.createElement(Button, { isDisabled: isDisabled || isLoading, onClick: onClick, type: onClick ? 'button' : 'submit', variant: variant }, isLoading ? 'Saving...' : label))));
10
- }
11
- ModalActions.propTypes = {
12
- label: PropTypes.string.isRequired,
13
- isDisabled: PropTypes.bool,
14
- isLoading: PropTypes.bool,
15
- variant: ButtonVariantPropType,
16
- onClick: PropTypes.func,
17
- };
18
- export default ModalActions;
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import type { TextInputProps } from '../../components/TextInput';
3
- /**
4
- * A `TextInput` component with a pre-defined `prefix` prop set to a pound sign. All other props are
5
- * simply passed through to the TextInput. Technically, the order of the props is such that the
6
- * prefix can be overridden or removed all together. If this is the case, the component is no
7
- * different to a `TextInput`.
8
- */
9
- declare function MoneyInput(props: TextInputProps): React.ReactElement;
10
- export default MoneyInput;
@@ -1,13 +0,0 @@
1
- 'use client';
2
- import React from 'react';
3
- import TextInput from '../../components/TextInput';
4
- /**
5
- * A `TextInput` component with a pre-defined `prefix` prop set to a pound sign. All other props are
6
- * simply passed through to the TextInput. Technically, the order of the props is such that the
7
- * prefix can be overridden or removed all together. If this is the case, the component is no
8
- * different to a `TextInput`.
9
- */
10
- function MoneyInput(props) {
11
- return React.createElement(TextInput, { prefix: "\u00A3", ...props });
12
- }
13
- export default MoneyInput;
@@ -1,35 +0,0 @@
1
- import React from 'react';
2
- import type { NextRouter } from 'next/router';
3
- interface PasswordFormProps {
4
- router: Omit<NextRouter, 'events'>;
5
- }
6
- declare function PasswordForm({ router }: PasswordFormProps): React.ReactElement;
7
- declare namespace PasswordForm {
8
- var hasLayout: boolean;
9
- var propTypes: {
10
- router: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{
11
- asPath: import("prop-types").Validator<string>;
12
- back: import("prop-types").Validator<(...args: any[]) => any>;
13
- basePath: import("prop-types").Validator<string>;
14
- beforePopState: import("prop-types").Validator<(...args: any[]) => any>;
15
- events: import("prop-types").Requireable<import("prop-types").InferProps<{
16
- emit: import("prop-types").Validator<(...args: any[]) => any>;
17
- off: import("prop-types").Validator<(...args: any[]) => any>;
18
- on: import("prop-types").Validator<(...args: any[]) => any>;
19
- }>>;
20
- forward: import("prop-types").Validator<(...args: any[]) => any>;
21
- isFallback: import("prop-types").Validator<boolean>;
22
- isLocaleDomain: import("prop-types").Validator<boolean>;
23
- isPreview: import("prop-types").Validator<boolean>;
24
- isReady: import("prop-types").Validator<boolean>;
25
- pathname: import("prop-types").Validator<string>;
26
- prefetch: import("prop-types").Validator<(...args: any[]) => any>;
27
- push: import("prop-types").Validator<(...args: any[]) => any>;
28
- query: import("prop-types").Validator<NonNullable<import("prop-types").InferProps<{}>>>;
29
- reload: import("prop-types").Validator<(...args: any[]) => any>;
30
- replace: import("prop-types").Validator<(...args: any[]) => any>;
31
- route: import("prop-types").Validator<string>;
32
- }>>>;
33
- };
34
- }
35
- export default PasswordForm;
@@ -1,21 +0,0 @@
1
- import React, { Fragment } from 'react';
2
- import Head from 'next/head';
3
- import PasswordForgotForm from '../../core/PasswordForgotForm';
4
- import PasswordResetForm from '../../core/PasswordResetForm';
5
- import useAppConfig from '../../hooks/useAppConfig';
6
- import { NextRouterPropType } from '../../utility/prop-types';
7
- function PasswordForm({ router }) {
8
- const { name } = useAppConfig();
9
- const { token } = router.query;
10
- return (React.createElement(Fragment, null,
11
- React.createElement(Head, null,
12
- React.createElement("title", null,
13
- "Reset Password | ",
14
- name)),
15
- token ? React.createElement(PasswordResetForm, { router: router }) : React.createElement(PasswordForgotForm, { router: router })));
16
- }
17
- PasswordForm.hasLayout = false;
18
- PasswordForm.propTypes = {
19
- router: NextRouterPropType.isRequired,
20
- };
21
- export default PasswordForm;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- import type { TextInputProps } from '../../components/TextInput';
3
- declare function PasswordInput(props: TextInputProps): React.ReactElement;
4
- export default PasswordInput;
@@ -1,12 +0,0 @@
1
- 'use client';
2
- import React, { useState } from 'react';
3
- import TextInput from '../../components/TextInput';
4
- // Import styles from './PasswordInput.module.css';
5
- function PasswordInput(props) {
6
- const [isVisible, setIsVisible] = useState(false);
7
- const toggleVisible = () => setIsVisible(!isVisible);
8
- return (React.createElement("div", { className: "/*styles.root*/" },
9
- React.createElement(TextInput, { type: isVisible ? 'text' : 'password', ...props }),
10
- React.createElement("button", { className: "/*styles.control*/", onClick: toggleVisible, type: "button" }, isVisible ? 'Hide' : 'Show')));
11
- }
12
- export default PasswordInput;
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import type { ChkRadDataItem } from '../../core/ChkRadList';
3
- import type { InputProps } from '../../utility/interfaces';
4
- interface RadioListProps extends InputProps<string> {
5
- columns?: number;
6
- data: ChkRadDataItem[];
7
- }
8
- declare function RadioList(props: RadioListProps): React.ReactElement;
9
- export default RadioList;
@@ -1,7 +0,0 @@
1
- 'use client';
2
- import React from 'react';
3
- import ChkRadList from '../../core/ChkRadList';
4
- function RadioList(props) {
5
- return React.createElement(ChkRadList, { ...props, type: "radio" });
6
- }
7
- export default RadioList;
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import type { SummaryListObject } from '../../core/SummaryListItem';
4
- interface SummaryListProps {
5
- data: SummaryListObject[];
6
- isDisabled?: boolean;
7
- }
8
- declare function SummaryList({ data, isDisabled }: SummaryListProps): React.ReactElement;
9
- declare namespace SummaryList {
10
- var propTypes: {
11
- data: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
12
- label: PropTypes.Validator<string>;
13
- value: PropTypes.Validator<NonNullable<PropTypes.InferPropsInner<Pick<{}, never>> & Partial<PropTypes.InferPropsInner<Pick<{}, never>>>>>;
14
- }>>[]>;
15
- isDisabled: PropTypes.Requireable<boolean>;
16
- };
17
- }
18
- export default SummaryList;
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import SummaryListItem from '../../core/SummaryListItem';
4
- function SummaryList({ data, isDisabled }) {
5
- return (React.createElement("dl", { className: "/*clsx(styles.root, styles[`rootHas${data.length`], {[styles.rootIsDisabled]: isDisabled})*/", "data-testid": "summary-list-root" }, data.map((item) => (React.createElement(SummaryListItem, { key: item.label, label: item.label, value: item.value })))));
6
- }
7
- SummaryList.propTypes = {
8
- data: PropTypes.arrayOf(PropTypes.shape({
9
- label: PropTypes.string.isRequired,
10
- value: PropTypes.oneOfType([PropTypes.number, PropTypes.string, PropTypes.shape({})])
11
- .isRequired,
12
- }).isRequired).isRequired,
13
- isDisabled: PropTypes.bool,
14
- };
15
- export default SummaryList;
@@ -1,21 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import type { InputProps } from '../../utility/interfaces';
4
- interface SwitchProps extends InputProps<boolean> {
5
- extra?: string;
6
- label: React.ReactNode | string;
7
- isMultiline?: boolean;
8
- }
9
- declare function Switch({ extra, name, label, value, isDisabled, isMultiline, onChange, }: SwitchProps): React.ReactElement;
10
- declare namespace Switch {
11
- var propTypes: {
12
- label: PropTypes.Validator<NonNullable<NonNullable<PropTypes.ReactNodeLike>>>;
13
- name: PropTypes.Validator<string>;
14
- extra: PropTypes.Requireable<string>;
15
- isDisabled: PropTypes.Requireable<boolean>;
16
- isMultiline: PropTypes.Requireable<boolean>;
17
- value: PropTypes.Requireable<boolean>;
18
- onChange: PropTypes.Requireable<(...args: any[]) => any>;
19
- };
20
- }
21
- export default Switch;
@@ -1,31 +0,0 @@
1
- 'use client';
2
- import React from 'react';
3
- import PropTypes from 'prop-types';
4
- import Assistive from '../../core/Assistive';
5
- function Switch({ extra, name, label, value, isDisabled, isMultiline, onChange, }) {
6
- const handleChange = (event) => {
7
- if (onChange) {
8
- const inputEvent = {
9
- target: { name, value: event.target.checked },
10
- };
11
- onChange(inputEvent);
12
- }
13
- };
14
- return (React.createElement("label", { className: "/*clsx(\n styles.root,\n isDisabled && styles.rootIsDisabled,\n (isMultiline || extra) && styles.rootIsMultiline\n )*/", "data-testid": "switch-root" },
15
- React.createElement("input", { "aria-checked": Boolean(value), checked: Boolean(value), className: "/*styles.input*/", disabled: isDisabled, id: name, name: name, onChange: handleChange, type: "checkbox", value: "1" }),
16
- React.createElement("i", { className: "/*clsx(\n styles.icon,\n (isMultiline || extra) && styles.iconIsMultiline\n )*/", id: `${name}_icon` },
17
- React.createElement(Assistive, null, "Yes")),
18
- React.createElement("div", null,
19
- React.createElement("span", { className: "/*clsx(styles.label, isDisabled && styles.labelIsDisabled)*/", "aria-hidden": true }, label),
20
- extra ? React.createElement("small", { className: "/*styles.extra*/" }, extra) : null)));
21
- }
22
- Switch.propTypes = {
23
- label: PropTypes.oneOfType([PropTypes.string, PropTypes.node]).isRequired,
24
- name: PropTypes.string.isRequired,
25
- extra: PropTypes.string,
26
- isDisabled: PropTypes.bool,
27
- isMultiline: PropTypes.bool,
28
- value: PropTypes.bool,
29
- onChange: PropTypes.func,
30
- };
31
- export default Switch;
@@ -1,15 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import type { StyleVariant } from '../../utility/interfaces';
4
- export interface TagProps {
5
- children: React.ReactNode;
6
- variant?: StyleVariant | StyleVariant[];
7
- }
8
- declare function Tag({ children, variant }: TagProps): React.ReactElement;
9
- declare namespace Tag {
10
- var propTypes: {
11
- children: PropTypes.Validator<NonNullable<PropTypes.ReactNodeLike>>;
12
- variant: PropTypes.Requireable<NonNullable<NonNullable<StyleVariant> | NonNullable<StyleVariant>[] | null | undefined>>;
13
- };
14
- }
15
- export default Tag;
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import useVariant from '../../hooks/useVariant';
4
- import { StyleVariantPropType } from '../../utility/prop-types';
5
- function Tag({ children, variant }) {
6
- const { applyVariantClassName } = useVariant(variant);
7
- return (React.createElement("div", { className: "/*clsx(styles.root, applyVariantClassName(styles))*/", "data-testid": "tag-root" }, children));
8
- }
9
- Tag.propTypes = {
10
- children: PropTypes.node.isRequired,
11
- variant: StyleVariantPropType,
12
- };
13
- export default Tag;
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- import type { TextInputProps } from '../../components/TextInput';
4
- declare function TextArea({ name, placeholder, value, hasError, isDisabled, onChange, onKeyDown, }: TextInputProps): React.ReactElement;
5
- declare namespace TextArea {
6
- var propTypes: {
7
- /** The name of the field. An ID is also generated from this (`c_${name}`). */
8
- name: PropTypes.Validator<string>;
9
- /** If set to trute, the `TextArea` will be styled to indicate this */
10
- hasError: PropTypes.Requireable<boolean>;
11
- isDisabled: PropTypes.Requireable<boolean>;
12
- placeholder: PropTypes.Requireable<string>;
13
- value: PropTypes.Requireable<string>;
14
- onChange: PropTypes.Requireable<(...args: any[]) => any>;
15
- onKeyDown: PropTypes.Requireable<(...args: any[]) => any>;
16
- };
17
- }
18
- export default TextArea;
@@ -1,26 +0,0 @@
1
- 'use client';
2
- import React from 'react';
3
- import PropTypes from 'prop-types';
4
- // Import styles from './TextArea.module.css';
5
- function TextArea({ name, placeholder, value, hasError, isDisabled, onChange, onKeyDown, }) {
6
- const handleChange = (event) => {
7
- const target = event.target;
8
- const simpleEvent = { target: { name, value: target.value } };
9
- if (onChange) {
10
- onChange(simpleEvent);
11
- }
12
- };
13
- return (React.createElement("textarea", { className: "/*clsx(\n styles.root,\n hasError && styles.rootHasError,\n isDisabled && styles.rootIsDisabled\n )*/", disabled: isDisabled, id: `c_${name}`, name: name, onChange: handleChange, onKeyDown: onKeyDown, placeholder: placeholder, rows: 6, value: value?.toString() }));
14
- }
15
- TextArea.propTypes = {
16
- /** The name of the field. An ID is also generated from this (`c_${name}`). */
17
- name: PropTypes.string.isRequired,
18
- /** If set to trute, the `TextArea` will be styled to indicate this */
19
- hasError: PropTypes.bool,
20
- isDisabled: PropTypes.bool,
21
- placeholder: PropTypes.string,
22
- value: PropTypes.string,
23
- onChange: PropTypes.func,
24
- onKeyDown: PropTypes.func,
25
- };
26
- export default TextArea;
@@ -1,14 +0,0 @@
1
- import React from 'react';
2
- import type { InputEvent, InputProps } from '../../utility/interfaces';
3
- export interface TextInputProps extends InputProps<string, string, HTMLInputElement | HTMLTextAreaElement> {
4
- isAutocomplete?: boolean;
5
- isClearable?: boolean;
6
- isLoading?: boolean;
7
- onClear?: (event: InputEvent) => void;
8
- placeholder?: string;
9
- prefix?: string | null;
10
- suffix?: string | null;
11
- type?: string;
12
- }
13
- declare function TextInput({ hasError, id, isAutocomplete, isAutoFocus, isClearable, isDisabled, isLoading, name, onChange, onClear, onKeyDown, placeholder, prefix, suffix, value, type, }: TextInputProps): React.ReactElement;
14
- export default TextInput;
@@ -1,27 +0,0 @@
1
- 'use client';
2
- import React from 'react';
3
- import TextInputAncillary from '../../core/TextInputAncillary';
4
- function TextInput({ hasError, id, isAutocomplete, isAutoFocus, isClearable, isDisabled, isLoading, name, onChange, onClear, onKeyDown, placeholder, prefix, suffix, value, type, }) {
5
- const handleChange = (event) => {
6
- if (onChange) {
7
- const target = { name, value: event.target.value };
8
- onChange({ target });
9
- }
10
- };
11
- const handleClear = () => {
12
- const target = { name, value: '' };
13
- if (onClear) {
14
- onClear({ target });
15
- return;
16
- }
17
- if (onChange) {
18
- onChange({ target });
19
- }
20
- };
21
- return (React.createElement("div", { className: "/*clsx(\n styles.root,\n prefix && styles.rootHasPrefix,\n ((!prefix && suffix) || (isClearable && value)) && styles.rootHasSuffix,\n isDisabled && styles.rootIsDisabled\n )*/", "data-testid": "text-input-root" },
22
- React.createElement("input", { autoComplete: isAutocomplete === false
23
- ? 'off'
24
- : undefined /* eslint-disable-line no-undefined */, autoFocus: isAutoFocus, className: "/*clsx(\n styles.input,\n hasError && styles.inputHasError,\n prefix && styles.inputHasPrefix,\n ((!prefix && suffix) || (isClearable && value)) && styles.inputHasSuffix\n )*/", disabled: isDisabled, id: id || name, name: name, onChange: handleChange, onKeyDown: onKeyDown, placeholder: placeholder, type: type, value: value || '' }),
25
- React.createElement(TextInputAncillary, { hasError: hasError, isClearable: isClearable, isLoading: isLoading, onClear: handleClear, prefix: prefix, suffix: suffix, value: value || '' })));
26
- }
27
- export default TextInput;
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import type { TextInputProps } from '../../components/TextInput';
3
- /**
4
- * A `TextInput` component with a pre-defined `prefix` prop set to a 'http://'. All other props are
5
- * simply passed through to the TextInput. Technically, the order of the props is such that the
6
- * prefix can be overridden or removed all together. If this is the case, the component is no
7
- * different to a `TextInput`.
8
- */
9
- declare function WebsiteInput(props: TextInputProps): React.ReactElement;
10
- export default WebsiteInput;
@@ -1,13 +0,0 @@
1
- 'use client';
2
- import React from 'react';
3
- import TextInput from '../../components/TextInput';
4
- /**
5
- * A `TextInput` component with a pre-defined `prefix` prop set to a 'http://'. All other props are
6
- * simply passed through to the TextInput. Technically, the order of the props is such that the
7
- * prefix can be overridden or removed all together. If this is the case, the component is no
8
- * different to a `TextInput`.
9
- */
10
- function WebsiteInput(props) {
11
- return React.createElement(TextInput, { prefix: "http://", ...props });
12
- }
13
- export default WebsiteInput;
@@ -1,24 +0,0 @@
1
- import React from 'react';
2
- import PropTypes from 'prop-types';
3
- interface WeekCalendarProps {
4
- data: {
5
- id: number;
6
- datetime: string;
7
- patient: {
8
- name: string;
9
- };
10
- }[];
11
- }
12
- declare function WeekCalendar({ data }: WeekCalendarProps): React.ReactElement;
13
- declare namespace WeekCalendar {
14
- var propTypes: {
15
- data: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
16
- id: PropTypes.Validator<number>;
17
- datetime: PropTypes.Validator<string>;
18
- patient: PropTypes.Validator<NonNullable<PropTypes.InferProps<{
19
- name: PropTypes.Validator<string>;
20
- }>>>;
21
- }>>[]>;
22
- };
23
- }
24
- export default WeekCalendar;
@@ -1,48 +0,0 @@
1
- import React, { useMemo } from 'react';
2
- import { addDays, getWeek } from 'date-fns';
3
- import PropTypes from 'prop-types';
4
- import FormatService from '../../services/FormatService';
5
- import WeekCalendarDay from '../../core/WeekCalendarDay';
6
- // Import styles from './WeekCalendar.module.css';
7
- /*
8
- * This function gets the first date of a week number. It 'Just Works', but it uses a lot of magic
9
- * numbers, so it's easiest to just disable the eslint rule.
10
- */
11
- /* eslint-disable @typescript-eslint/no-magic-numbers */
12
- const getFirstDayOfWeek = (week, year) => {
13
- const weekInDays = 7 * week;
14
- const firstDayOfWeek = new Date(year, 0, weekInDays - 6);
15
- const dow = firstDayOfWeek.getDay();
16
- const ISOweekStart = firstDayOfWeek;
17
- if (dow <= 4) {
18
- ISOweekStart.setDate(firstDayOfWeek.getDate() - firstDayOfWeek.getDay() + 1);
19
- }
20
- else {
21
- ISOweekStart.setDate(firstDayOfWeek.getDate() + 8 - firstDayOfWeek.getDay());
22
- }
23
- return ISOweekStart;
24
- };
25
- /* eslint-enable */
26
- const formatHour = (hour) => `${FormatService.twoDigits(hour)}00`;
27
- const DAYS_IN_WEEK = 7;
28
- const FIRST_HOUR = 8;
29
- function WeekCalendar({ data }) {
30
- const week = useMemo(() => getWeek(new Date()), []);
31
- let days = [getFirstDayOfWeek(week, new Date().getFullYear())];
32
- for (let index = 1; index < DAYS_IN_WEEK; index += 1) {
33
- days = [...days, addDays(days[0], index)];
34
- }
35
- return (React.createElement("div", { className: "/*styles.root*/" },
36
- React.createElement("div", { className: "/*styles.scale*/" }, Array.from({ length: 12 }).map((_item, index) => (React.createElement("div", { key: index, className: "/*styles.hour*/" }, formatHour(index + FIRST_HOUR))))),
37
- days.map((item) => (React.createElement(WeekCalendarDay, { key: item.toString(), data: data, date: item })))));
38
- }
39
- WeekCalendar.propTypes = {
40
- data: PropTypes.arrayOf(PropTypes.shape({
41
- id: PropTypes.number.isRequired,
42
- datetime: PropTypes.string.isRequired,
43
- patient: PropTypes.shape({
44
- name: PropTypes.string.isRequired,
45
- }).isRequired,
46
- }).isRequired).isRequired,
47
- };
48
- export default WeekCalendar;