@uxf/cms 6.0.0-beta.8 → 10.0.0-beta.5

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 (587) hide show
  1. package/api/index.d.ts +25 -18
  2. package/api/index.js +36 -95
  3. package/config/{Config.d.ts → config.d.ts} +1 -1
  4. package/config/config.js +22 -0
  5. package/config/{Container.d.ts → container.d.ts} +6 -7
  6. package/config/container.js +29 -0
  7. package/config/index.d.ts +2 -2
  8. package/config/index.js +5 -5
  9. package/deprecated/api/api-client.d.ts +15 -0
  10. package/deprecated/api/api-client.js +86 -0
  11. package/deprecated/hoc/{withAuthenticate.d.ts → with-authenticate.d.ts} +1 -1
  12. package/deprecated/hoc/with-authenticate.js +61 -0
  13. package/deprecated/redux/configure-store.js +16 -0
  14. package/deprecated/redux/entities/actions.d.ts +9 -9
  15. package/deprecated/redux/entities/actions.js +4 -11
  16. package/deprecated/redux/entities/index.js +5 -2
  17. package/deprecated/redux/entities/reducer.js +20 -19
  18. package/deprecated/redux/entities/selectors.d.ts +1 -1
  19. package/deprecated/redux/entities/selectors.js +6 -27
  20. package/deprecated/redux/index.js +5 -2
  21. package/deprecated/redux/{reduxHelper.d.ts → redux-helper.d.ts} +2 -2
  22. package/deprecated/redux/redux-helper.js +7 -0
  23. package/deprecated/redux/types.d.ts +1 -1
  24. package/deprecated/redux/types.js +0 -1
  25. package/deprecated/redux/user/actions.d.ts +6 -6
  26. package/deprecated/redux/user/actions.js +3 -4
  27. package/deprecated/redux/user/index.js +5 -2
  28. package/deprecated/redux/user/reducer.js +11 -17
  29. package/deprecated/redux/user/selectors.js +1 -2
  30. package/deprecated/redux/with-redux-store.js +53 -105
  31. package/deprecated/security/cms-authorizator.js +8 -0
  32. package/deprecated/types/app.js +2 -0
  33. package/deprecated/types/form.js +16 -0
  34. package/errors/BadRequestError.js +6 -26
  35. package/errors/ForbiddenError.js +5 -24
  36. package/errors/NetworkError.js +5 -24
  37. package/errors/UnauthorizedError.js +5 -24
  38. package/errors/ValidationError.d.ts +3 -3
  39. package/errors/ValidationError.js +9 -32
  40. package/forms/change-password-form/change-password-form.js +26 -0
  41. package/forms/change-password-form/index.d.ts +2 -0
  42. package/{ui/Label → forms/change-password-form}/index.js +6 -3
  43. package/forms/change-password-form/types.d.ts +13 -0
  44. package/forms/change-password-form/types.js +2 -0
  45. package/forms/components/wysiwyg-input/index.d.ts +1 -0
  46. package/forms/components/{DropZone → wysiwyg-input}/index.js +6 -3
  47. package/forms/components/wysiwyg-input/wysiwyg-input.d.ts +25 -0
  48. package/forms/components/wysiwyg-input/wysiwyg-input.js +83 -0
  49. package/forms/forgotten-password-form/forgotten-password-form.d.ts +3 -0
  50. package/forms/forgotten-password-form/forgotten-password-form.js +50 -0
  51. package/forms/forgotten-password-form/index.d.ts +2 -0
  52. package/{ui/Paper → forms/forgotten-password-form}/index.js +6 -3
  53. package/forms/forgotten-password-form/types.d.ts +10 -0
  54. package/forms/forgotten-password-form/types.js +2 -0
  55. package/forms/invite-user-form/index.d.ts +2 -0
  56. package/{lib/Layout → forms/invite-user-form}/index.js +6 -3
  57. package/forms/invite-user-form/invite-user-form.js +30 -0
  58. package/forms/invite-user-form/types.d.ts +15 -0
  59. package/forms/invite-user-form/types.js +2 -0
  60. package/forms/login-form/index.d.ts +2 -0
  61. package/{ui/Button → forms/login-form}/index.js +6 -3
  62. package/forms/login-form/login-form.js +49 -0
  63. package/forms/login-form/types.d.ts +11 -0
  64. package/forms/login-form/types.js +2 -0
  65. package/forms/renew-password-form/index.d.ts +2 -0
  66. package/forms/renew-password-form/index.js +18 -0
  67. package/forms/renew-password-form/renew-password-form.d.ts +3 -0
  68. package/forms/renew-password-form/renew-password-form.js +48 -0
  69. package/forms/renew-password-form/types.d.ts +11 -0
  70. package/forms/renew-password-form/types.js +2 -0
  71. package/forms/utils/on-upload-dropzone-file.d.ts +2 -0
  72. package/forms/utils/on-upload-dropzone-file.js +8 -0
  73. package/forms/utils/on-upload-file.d.ts +2 -0
  74. package/forms/utils/on-upload-file.js +8 -0
  75. package/lib/api/create-axios-instance.d.ts +6 -0
  76. package/lib/api/create-axios-instance.js +19 -0
  77. package/lib/api/create-axios-request.d.ts +2 -0
  78. package/lib/api/create-axios-request.js +40 -0
  79. package/lib/api/create-use-axios-request.d.ts +4 -0
  80. package/lib/api/create-use-axios-request.js +36 -0
  81. package/lib/api/index.d.ts +1 -1
  82. package/lib/api/index.js +7 -3
  83. package/lib/api/types.d.ts +9 -6
  84. package/lib/api/types.js +0 -1
  85. package/lib/layout/breadcrumbs.d.ts +9 -0
  86. package/lib/layout/breadcrumbs.js +19 -0
  87. package/lib/layout/index.d.ts +3 -0
  88. package/lib/layout/index.js +19 -0
  89. package/lib/layout/layout-container.d.ts +3 -0
  90. package/lib/layout/layout-container.js +22 -0
  91. package/lib/layout/layout.js +43 -0
  92. package/lib/layout/sidebar.js +62 -0
  93. package/lib/layout/styles.d.ts +1 -0
  94. package/lib/layout/styles.js +4 -0
  95. package/lib/layout/types.d.ts +33 -0
  96. package/lib/layout/types.js +2 -0
  97. package/lib/login-layout/index.d.ts +2 -0
  98. package/lib/login-layout/index.js +18 -0
  99. package/lib/login-layout/login-layout.js +21 -0
  100. package/lib/login-layout/types.js +2 -0
  101. package/lib/menu/active-item-resolver.js +30 -0
  102. package/lib/{Menu → menu}/factory.d.ts +5 -1
  103. package/lib/menu/factory.js +39 -0
  104. package/lib/menu/index.d.ts +5 -0
  105. package/{forms/InviteUserForm → lib/menu}/index.js +9 -3
  106. package/lib/menu/mobile-bar.d.ts +6 -0
  107. package/lib/menu/mobile-bar.js +56 -0
  108. package/lib/{Menu → menu}/model.d.ts +22 -3
  109. package/lib/menu/model.js +104 -0
  110. package/lib/menu/types.d.ts +5 -0
  111. package/lib/menu/types.js +2 -0
  112. package/lib/menu/ui/list-item/index.d.ts +2 -0
  113. package/lib/menu/ui/list-item/index.js +18 -0
  114. package/lib/menu/ui/list-item/list-item.d.ts +3 -0
  115. package/lib/menu/ui/list-item/list-item.js +36 -0
  116. package/{ui/ListItem → lib/menu/ui/list-item}/types.d.ts +5 -1
  117. package/lib/menu/ui/list-item/types.js +2 -0
  118. package/lib/menu/ui/menu-custom-item.d.ts +6 -0
  119. package/lib/menu/ui/menu-custom-item.js +19 -0
  120. package/lib/{Menu/ui/MenuItem.d.ts → menu/ui/menu-item.d.ts} +0 -5
  121. package/lib/menu/ui/menu-item.js +56 -0
  122. package/lib/menu/ui/menu-super-section-item.d.ts +6 -0
  123. package/lib/menu/ui/menu-super-section-item.js +42 -0
  124. package/lib/menu/ui/menu.js +37 -0
  125. package/lib/menu/ui/sub-menu/sub-menu-mobile.d.ts +8 -0
  126. package/lib/menu/ui/sub-menu/sub-menu-mobile.js +48 -0
  127. package/lib/menu/ui/sub-menu/sub-menu.d.ts +7 -0
  128. package/lib/menu/ui/sub-menu/sub-menu.js +46 -0
  129. package/lib/menu/ui/sub-menu/sub-menuItem.d.ts +7 -0
  130. package/lib/menu/ui/sub-menu/sub-menuItem.js +25 -0
  131. package/lib/menu/ui/sub-menu/use-sub-menu.d.ts +39 -0
  132. package/lib/menu/ui/sub-menu/use-sub-menu.js +46 -0
  133. package/lib/menu/ui/user-menu.d.ts +6 -0
  134. package/lib/menu/ui/user-menu.js +51 -0
  135. package/package.json +54 -75
  136. package/pages/{ChangePasswordPage/ChangePasswordPage.d.ts → change-password-page/change-password-page.d.ts} +1 -1
  137. package/pages/change-password-page/change-password-page.js +55 -0
  138. package/pages/change-password-page/index.d.ts +2 -0
  139. package/pages/change-password-page/index.js +18 -0
  140. package/pages/change-password-page/types.d.ts +10 -0
  141. package/pages/change-password-page/types.js +2 -0
  142. package/pages/content-builder/components/form-content.d.ts +12 -0
  143. package/pages/content-builder/components/form-content.js +63 -0
  144. package/pages/{ContentBuilder/components/FormRootFields.d.ts → content-builder/components/form-root-fields.d.ts} +4 -2
  145. package/pages/content-builder/components/form-root-fields.js +68 -0
  146. package/pages/content-builder/components/form.d.ts +10 -0
  147. package/pages/content-builder/components/form.js +54 -0
  148. package/pages/content-builder/components/header.d.ts +6 -0
  149. package/pages/content-builder/components/header.js +44 -0
  150. package/pages/content-builder/constants.d.ts +2 -0
  151. package/pages/content-builder/constants.js +5 -0
  152. package/pages/{ContentBuilder/content/FeatureSection.d.ts → content-builder/content/feature-section.d.ts} +4 -4
  153. package/pages/content-builder/content/feature-section.js +58 -0
  154. package/pages/content-builder/content/gallery.d.ts +9 -0
  155. package/pages/content-builder/content/gallery.js +25 -0
  156. package/pages/{ContentBuilder/content/HeroSection.d.ts → content-builder/content/hero-section.d.ts} +3 -3
  157. package/pages/content-builder/content/hero-section.js +31 -0
  158. package/pages/{ContentBuilder/content/People.d.ts → content-builder/content/people.d.ts} +5 -5
  159. package/pages/content-builder/content/people.js +56 -0
  160. package/pages/content-builder/content/wysiwyg.d.ts +15 -0
  161. package/pages/content-builder/content/wysiwyg.js +28 -0
  162. package/pages/{ContentBuilder/ContentBuilderPage.d.ts → content-builder/content-builder-page.d.ts} +1 -1
  163. package/pages/content-builder/content-builder-page.js +106 -0
  164. package/pages/content-builder/content-field.d.ts +10 -0
  165. package/pages/content-builder/content-field.js +61 -0
  166. package/pages/content-builder/content-header.d.ts +3 -0
  167. package/pages/content-builder/content-header.js +71 -0
  168. package/pages/content-builder/context/details-visibility-context.d.ts +4 -0
  169. package/pages/content-builder/context/details-visibility-context.js +57 -0
  170. package/pages/content-builder/hooks/use-sortable.d.ts +15 -0
  171. package/pages/content-builder/hooks/use-sortable.js +57 -0
  172. package/pages/content-builder/index.d.ts +5 -0
  173. package/{forms/ChangePasswordForm → pages/content-builder}/index.js +9 -3
  174. package/pages/content-builder/mapper.js +67 -0
  175. package/pages/{ContentBuilder → content-builder}/types.d.ts +17 -15
  176. package/pages/content-builder/types.js +2 -0
  177. package/pages/forgotten-password-page/forgotten-password-page.js +50 -0
  178. package/pages/forgotten-password-page/index.d.ts +2 -0
  179. package/pages/forgotten-password-page/index.js +18 -0
  180. package/pages/forgotten-password-page/types.js +2 -0
  181. package/pages/form-page/base-field.d.ts +3 -0
  182. package/pages/form-page/base-field.js +88 -0
  183. package/pages/form-page/field/content.d.ts +6 -0
  184. package/pages/form-page/field/content.js +17 -0
  185. package/pages/form-page/field-array.d.ts +10 -0
  186. package/pages/form-page/field-array.js +53 -0
  187. package/pages/{FormPage/FormPage.d.ts → form-page/form-page.d.ts} +1 -1
  188. package/pages/form-page/form-page.js +105 -0
  189. package/pages/form-page/form.d.ts +18 -0
  190. package/pages/form-page/form.js +26 -0
  191. package/pages/form-page/index.d.ts +5 -0
  192. package/{forms/ForgottenPasswordForm → pages/form-page}/index.js +9 -3
  193. package/pages/form-page/mapper.js +26 -0
  194. package/pages/{FormPage → form-page}/types.d.ts +4 -2
  195. package/pages/form-page/types.js +2 -0
  196. package/pages/grid-page/get-initial-props-helper.js +21 -0
  197. package/pages/{GridPage/GridPage.d.ts → grid-page/grid-page.d.ts} +1 -1
  198. package/pages/grid-page/grid-page.js +109 -0
  199. package/pages/grid-page/index.d.ts +1 -0
  200. package/pages/grid-page/index.js +5 -0
  201. package/pages/{GridPage → grid-page}/types.d.ts +11 -11
  202. package/pages/grid-page/types.js +2 -0
  203. package/pages/grid-page/use-hidden-columns.js +17 -0
  204. package/pages/invite-user-page/index.d.ts +2 -0
  205. package/pages/invite-user-page/index.js +18 -0
  206. package/pages/{InviteUserPage/InviteUserPage.d.ts → invite-user-page/invite-user-page.d.ts} +1 -1
  207. package/pages/invite-user-page/invite-user-page.js +57 -0
  208. package/pages/{InviteUserPage → invite-user-page}/types.d.ts +3 -1
  209. package/pages/invite-user-page/types.js +2 -0
  210. package/pages/login-page/index.d.ts +2 -0
  211. package/pages/login-page/index.js +18 -0
  212. package/pages/login-page/login-page.js +80 -0
  213. package/pages/login-page/types.js +2 -0
  214. package/pages/renew-password-page/index.d.ts +2 -0
  215. package/pages/renew-password-page/index.js +18 -0
  216. package/pages/renew-password-page/renew-password-page.js +53 -0
  217. package/pages/renew-password-page/types.d.ts +14 -0
  218. package/pages/renew-password-page/types.js +2 -0
  219. package/ui/copy-to-clipboard/copy-to-clipboard.d.ts +3 -0
  220. package/ui/copy-to-clipboard/copy-to-clipboard.js +45 -0
  221. package/ui/copy-to-clipboard/index.d.ts +2 -0
  222. package/ui/copy-to-clipboard/index.js +18 -0
  223. package/ui/{CopyToClipboard → copy-to-clipboard}/types.d.ts +2 -2
  224. package/ui/copy-to-clipboard/types.js +2 -0
  225. package/ui/copy-to-clipboard-button/copy-to-clipboard-button.d.ts +3 -0
  226. package/ui/copy-to-clipboard-button/copy-to-clipboard-button.js +44 -0
  227. package/ui/copy-to-clipboard-button/index.d.ts +2 -0
  228. package/ui/copy-to-clipboard-button/index.js +18 -0
  229. package/ui/copy-to-clipboard-button/types.d.ts +6 -0
  230. package/ui/copy-to-clipboard-button/types.js +2 -0
  231. package/ui/index.js +0 -1
  232. package/ui/tw-tokens/tw-box-shadow.d.ts +12 -0
  233. package/ui/tw-tokens/tw-box-shadow.js +15 -0
  234. package/ui/tw-tokens/tw-colors.d.ts +361 -0
  235. package/ui/tw-tokens/tw-colors.js +360 -0
  236. package/ui/tw-tokens/tw-containers.d.ts +8 -0
  237. package/ui/tw-tokens/tw-containers.js +11 -0
  238. package/ui/tw-tokens/tw-font-size.d.ts +55 -0
  239. package/ui/tw-tokens/tw-font-size.js +32 -0
  240. package/ui/tw-tokens/tw-font-weight.d.ts +12 -0
  241. package/ui/tw-tokens/tw-font-weight.js +15 -0
  242. package/ui/tw-tokens/tw-line-height.d.ts +17 -0
  243. package/ui/tw-tokens/tw-line-height.js +20 -0
  244. package/ui/tw-tokens/tw-screens.d.ts +8 -0
  245. package/ui/tw-tokens/tw-screens.js +11 -0
  246. package/ui/tw-tokens/tw-spacing.d.ts +39 -0
  247. package/ui/tw-tokens/tw-spacing.js +42 -0
  248. package/ui/tw-tokens/tw-z-index.d.ts +19 -0
  249. package/ui/tw-tokens/tw-z-index.js +22 -0
  250. package/ui/widget/index.d.ts +2 -0
  251. package/ui/widget/index.js +18 -0
  252. package/ui/widget/types.d.ts +6 -0
  253. package/ui/widget/types.js +2 -0
  254. package/ui/widget/widget.d.ts +3 -0
  255. package/ui/widget/widget.js +15 -0
  256. package/utils/icons.config.js +37 -0
  257. package/utils/styles.css +43 -0
  258. package/utils/tailwind.config.js +4 -4
  259. package/utils/use-viewport-height.d.ts +1 -0
  260. package/utils/use-viewport-height.js +29 -0
  261. package/README.md +0 -142
  262. package/config/Config.js +0 -24
  263. package/config/Container.js +0 -30
  264. package/config/icons-config.d.ts +0 -2
  265. package/config/icons-config.js +0 -6
  266. package/config/icons.d.ts +0 -77
  267. package/config/icons.js +0 -21
  268. package/deprecated/api/ApiClient.d.ts +0 -15
  269. package/deprecated/api/ApiClient.js +0 -106
  270. package/deprecated/hoc/withAuthenticate.js +0 -133
  271. package/deprecated/redux/configureStore.js +0 -20
  272. package/deprecated/redux/reduxHelper.js +0 -8
  273. package/deprecated/security/CmsAuthorizator.js +0 -12
  274. package/deprecated/types/App.js +0 -3
  275. package/deprecated/types/Form.js +0 -17
  276. package/forms/ChangePasswordForm/ChangePasswordForm.js +0 -30
  277. package/forms/ChangePasswordForm/index.d.ts +0 -2
  278. package/forms/ChangePasswordForm/types.d.ts +0 -7
  279. package/forms/ChangePasswordForm/types.js +0 -3
  280. package/forms/ForgottenPasswordForm/ForgottenPasswordForm.d.ts +0 -3
  281. package/forms/ForgottenPasswordForm/ForgottenPasswordForm.js +0 -79
  282. package/forms/ForgottenPasswordForm/index.d.ts +0 -2
  283. package/forms/ForgottenPasswordForm/types.d.ts +0 -7
  284. package/forms/ForgottenPasswordForm/types.js +0 -3
  285. package/forms/InviteUserForm/InviteUserForm.js +0 -32
  286. package/forms/InviteUserForm/index.d.ts +0 -2
  287. package/forms/InviteUserForm/types.d.ts +0 -8
  288. package/forms/InviteUserForm/types.js +0 -3
  289. package/forms/LoginForm/LoginForm.js +0 -80
  290. package/forms/LoginForm/index.d.ts +0 -2
  291. package/forms/LoginForm/index.js +0 -15
  292. package/forms/LoginForm/types.d.ts +0 -8
  293. package/forms/LoginForm/types.js +0 -3
  294. package/forms/RenewPasswordForm/RenewPasswordForm.d.ts +0 -3
  295. package/forms/RenewPasswordForm/RenewPasswordForm.js +0 -65
  296. package/forms/RenewPasswordForm/index.d.ts +0 -2
  297. package/forms/RenewPasswordForm/index.js +0 -15
  298. package/forms/RenewPasswordForm/types.d.ts +0 -6
  299. package/forms/RenewPasswordForm/types.js +0 -3
  300. package/forms/UserInvitationForm/UserInvitationForm.d.ts +0 -3
  301. package/forms/UserInvitationForm/UserInvitationForm.js +0 -54
  302. package/forms/UserInvitationForm/index.d.ts +0 -2
  303. package/forms/UserInvitationForm/index.js +0 -15
  304. package/forms/UserInvitationForm/types.d.ts +0 -12
  305. package/forms/UserInvitationForm/types.js +0 -3
  306. package/forms/components/Autocomplete/Autocomplete.d.ts +0 -4
  307. package/forms/components/Autocomplete/Autocomplete.js +0 -80
  308. package/forms/components/Autocomplete/index.d.ts +0 -2
  309. package/forms/components/Autocomplete/index.js +0 -15
  310. package/forms/components/Autocomplete/types.d.ts +0 -8
  311. package/forms/components/Autocomplete/types.js +0 -3
  312. package/forms/components/AutocompleteMultiple/AutocompleteMultiple.d.ts +0 -4
  313. package/forms/components/AutocompleteMultiple/AutocompleteMultiple.js +0 -75
  314. package/forms/components/AutocompleteMultiple/index.d.ts +0 -2
  315. package/forms/components/AutocompleteMultiple/index.js +0 -15
  316. package/forms/components/AutocompleteMultiple/types.d.ts +0 -7
  317. package/forms/components/AutocompleteMultiple/types.js +0 -3
  318. package/forms/components/Checkbox/Checkbox.d.ts +0 -3
  319. package/forms/components/Checkbox/Checkbox.js +0 -25
  320. package/forms/components/Checkbox/index.d.ts +0 -2
  321. package/forms/components/Checkbox/index.js +0 -15
  322. package/forms/components/Checkbox/types.d.ts +0 -9
  323. package/forms/components/Checkbox/types.js +0 -3
  324. package/forms/components/DatePicker/DatePicker.d.ts +0 -3
  325. package/forms/components/DatePicker/DatePicker.js +0 -101
  326. package/forms/components/DatePicker/index.d.ts +0 -2
  327. package/forms/components/DatePicker/index.js +0 -15
  328. package/forms/components/DatePicker/types.d.ts +0 -7
  329. package/forms/components/DatePicker/types.js +0 -3
  330. package/forms/components/DateTimePicker/DateTimePicker.d.ts +0 -3
  331. package/forms/components/DateTimePicker/DateTimePicker.js +0 -89
  332. package/forms/components/DateTimePicker/index.d.ts +0 -2
  333. package/forms/components/DateTimePicker/index.js +0 -15
  334. package/forms/components/DateTimePicker/types.d.ts +0 -11
  335. package/forms/components/DateTimePicker/types.js +0 -3
  336. package/forms/components/DropZone/DropZone.d.ts +0 -7
  337. package/forms/components/DropZone/DropZone.js +0 -159
  338. package/forms/components/DropZone/index.d.ts +0 -1
  339. package/forms/components/FileUploadInput/FileUploadInput.d.ts +0 -3
  340. package/forms/components/FileUploadInput/FileUploadInput.js +0 -42
  341. package/forms/components/FileUploadInput/index.d.ts +0 -2
  342. package/forms/components/FileUploadInput/index.js +0 -15
  343. package/forms/components/FileUploadInput/types.d.ts +0 -4
  344. package/forms/components/FileUploadInput/types.js +0 -3
  345. package/forms/components/GpsInput/GpsInput.d.ts +0 -3
  346. package/forms/components/GpsInput/GpsInput.js +0 -167
  347. package/forms/components/GpsInput/index.d.ts +0 -2
  348. package/forms/components/GpsInput/index.js +0 -15
  349. package/forms/components/GpsInput/types.d.ts +0 -13
  350. package/forms/components/GpsInput/types.js +0 -3
  351. package/forms/components/NumberInput/NumberInput.d.ts +0 -3
  352. package/forms/components/NumberInput/NumberInput.js +0 -100
  353. package/forms/components/NumberInput/index.d.ts +0 -2
  354. package/forms/components/NumberInput/index.js +0 -15
  355. package/forms/components/NumberInput/types.d.ts +0 -8
  356. package/forms/components/NumberInput/types.js +0 -3
  357. package/forms/components/RadioGroup/RadioGroup.d.ts +0 -3
  358. package/forms/components/RadioGroup/RadioGroup.js +0 -90
  359. package/forms/components/RadioGroup/index.d.ts +0 -2
  360. package/forms/components/RadioGroup/index.js +0 -15
  361. package/forms/components/RadioGroup/types.d.ts +0 -17
  362. package/forms/components/RadioGroup/types.js +0 -3
  363. package/forms/components/Select/Select.d.ts +0 -3
  364. package/forms/components/Select/Select.js +0 -80
  365. package/forms/components/Select/index.d.ts +0 -2
  366. package/forms/components/Select/index.js +0 -15
  367. package/forms/components/Select/types.d.ts +0 -8
  368. package/forms/components/Select/types.js +0 -3
  369. package/forms/components/TextInput/TextInput.d.ts +0 -3
  370. package/forms/components/TextInput/TextInput.js +0 -108
  371. package/forms/components/TextInput/index.d.ts +0 -2
  372. package/forms/components/TextInput/index.js +0 -15
  373. package/forms/components/TextInput/types.d.ts +0 -9
  374. package/forms/components/TextInput/types.js +0 -3
  375. package/forms/components/WysiwygField/WysiwygField.d.ts +0 -8
  376. package/forms/components/WysiwygField/WysiwygField.js +0 -27
  377. package/forms/components/WysiwygField/index.d.ts +0 -1
  378. package/forms/components/WysiwygField/index.js +0 -14
  379. package/lib/CmsProvider/CmsProvider.d.ts +0 -6
  380. package/lib/CmsProvider/CmsProvider.js +0 -64
  381. package/lib/CmsProvider/index.d.ts +0 -2
  382. package/lib/CmsProvider/index.js +0 -15
  383. package/lib/CmsProvider/types.d.ts +0 -7
  384. package/lib/CmsProvider/types.js +0 -3
  385. package/lib/Layout/AppBar.d.ts +0 -3
  386. package/lib/Layout/AppBar.js +0 -39
  387. package/lib/Layout/Layout.js +0 -45
  388. package/lib/Layout/Sidebar.js +0 -25
  389. package/lib/Layout/index.d.ts +0 -2
  390. package/lib/Layout/styles.d.ts +0 -6
  391. package/lib/Layout/styles.js +0 -17
  392. package/lib/Layout/types.d.ts +0 -24
  393. package/lib/Layout/types.js +0 -3
  394. package/lib/LoginLayout/LoginLayout.js +0 -21
  395. package/lib/LoginLayout/index.d.ts +0 -2
  396. package/lib/LoginLayout/index.js +0 -15
  397. package/lib/LoginLayout/types.js +0 -3
  398. package/lib/Menu/activeItemResolver.js +0 -35
  399. package/lib/Menu/factory.js +0 -28
  400. package/lib/Menu/index.d.ts +0 -5
  401. package/lib/Menu/index.js +0 -18
  402. package/lib/Menu/model.js +0 -131
  403. package/lib/Menu/types.d.ts +0 -5
  404. package/lib/Menu/types.js +0 -3
  405. package/lib/Menu/ui/Menu.js +0 -14
  406. package/lib/Menu/ui/MenuItem.js +0 -34
  407. package/lib/api/createAxiosInstance.d.ts +0 -6
  408. package/lib/api/createAxiosInstance.js +0 -20
  409. package/lib/api/createAxiosRequest.d.ts +0 -2
  410. package/lib/api/createAxiosRequest.js +0 -47
  411. package/lib/api/createUseAxiosRequest.d.ts +0 -4
  412. package/lib/api/createUseAxiosRequest.js +0 -58
  413. package/pages/ChangePasswordPage/ChangePasswordPage.js +0 -98
  414. package/pages/ChangePasswordPage/index.d.ts +0 -2
  415. package/pages/ChangePasswordPage/index.js +0 -15
  416. package/pages/ChangePasswordPage/types.d.ts +0 -8
  417. package/pages/ChangePasswordPage/types.js +0 -3
  418. package/pages/ContentBuilder/ContentBuilderPage.js +0 -198
  419. package/pages/ContentBuilder/ContentField.d.ts +0 -8
  420. package/pages/ContentBuilder/ContentField.js +0 -35
  421. package/pages/ContentBuilder/ContentHeader.d.ts +0 -3
  422. package/pages/ContentBuilder/ContentHeader.js +0 -80
  423. package/pages/ContentBuilder/components/Form.d.ts +0 -8
  424. package/pages/ContentBuilder/components/Form.js +0 -69
  425. package/pages/ContentBuilder/components/FormContent.d.ts +0 -7
  426. package/pages/ContentBuilder/components/FormContent.js +0 -40
  427. package/pages/ContentBuilder/components/FormRootFields.js +0 -71
  428. package/pages/ContentBuilder/content/FeatureSection.js +0 -73
  429. package/pages/ContentBuilder/content/Gallery.d.ts +0 -9
  430. package/pages/ContentBuilder/content/Gallery.js +0 -33
  431. package/pages/ContentBuilder/content/HeroSection.js +0 -42
  432. package/pages/ContentBuilder/content/People.js +0 -70
  433. package/pages/ContentBuilder/content/Wysiwyg.d.ts +0 -13
  434. package/pages/ContentBuilder/content/Wysiwyg.js +0 -100
  435. package/pages/ContentBuilder/index.d.ts +0 -5
  436. package/pages/ContentBuilder/index.js +0 -18
  437. package/pages/ContentBuilder/mapper.js +0 -67
  438. package/pages/ContentBuilder/types.js +0 -3
  439. package/pages/ForgottenPasswordPage/ForgottenPasswordPage.js +0 -93
  440. package/pages/ForgottenPasswordPage/index.d.ts +0 -2
  441. package/pages/ForgottenPasswordPage/index.js +0 -15
  442. package/pages/ForgottenPasswordPage/types.js +0 -3
  443. package/pages/FormPage/BaseField.d.ts +0 -3
  444. package/pages/FormPage/BaseField.js +0 -124
  445. package/pages/FormPage/Field/Content.d.ts +0 -6
  446. package/pages/FormPage/Field/Content.js +0 -17
  447. package/pages/FormPage/Form.d.ts +0 -18
  448. package/pages/FormPage/Form.js +0 -43
  449. package/pages/FormPage/FormPage.js +0 -195
  450. package/pages/FormPage/index.d.ts +0 -5
  451. package/pages/FormPage/index.js +0 -18
  452. package/pages/FormPage/mapper.js +0 -60
  453. package/pages/FormPage/styles.d.ts +0 -1
  454. package/pages/FormPage/styles.js +0 -23
  455. package/pages/FormPage/types.js +0 -3
  456. package/pages/GridPage/GridPage.js +0 -188
  457. package/pages/GridPage/getInitialPropsHelper.js +0 -83
  458. package/pages/GridPage/index.d.ts +0 -1
  459. package/pages/GridPage/index.js +0 -6
  460. package/pages/GridPage/types.js +0 -3
  461. package/pages/GridPage/useHiddenColumns.js +0 -34
  462. package/pages/InviteUserPage/InviteUserPage.js +0 -99
  463. package/pages/InviteUserPage/index.d.ts +0 -2
  464. package/pages/InviteUserPage/index.js +0 -15
  465. package/pages/InviteUserPage/types.js +0 -3
  466. package/pages/LoginPage/LoginPage.js +0 -135
  467. package/pages/LoginPage/index.d.ts +0 -2
  468. package/pages/LoginPage/index.js +0 -15
  469. package/pages/LoginPage/types.js +0 -3
  470. package/pages/RenewPasswordPage/RenewPasswordPage.js +0 -101
  471. package/pages/RenewPasswordPage/index.d.ts +0 -2
  472. package/pages/RenewPasswordPage/index.js +0 -15
  473. package/pages/RenewPasswordPage/types.d.ts +0 -13
  474. package/pages/RenewPasswordPage/types.js +0 -3
  475. package/styles/theme.d.ts +0 -3
  476. package/styles/theme.js +0 -48
  477. package/ui/Autocomplete/Autocomplete.d.ts +0 -3
  478. package/ui/Autocomplete/Autocomplete.js +0 -93
  479. package/ui/Autocomplete/index.d.ts +0 -2
  480. package/ui/Autocomplete/index.js +0 -17
  481. package/ui/Autocomplete/reducer.d.ts +0 -22
  482. package/ui/Autocomplete/reducer.js +0 -28
  483. package/ui/Autocomplete/types.d.ts +0 -12
  484. package/ui/Autocomplete/types.js +0 -3
  485. package/ui/AutocompleteMultiple/AutocompleteMultiple.d.ts +0 -3
  486. package/ui/AutocompleteMultiple/AutocompleteMultiple.js +0 -93
  487. package/ui/AutocompleteMultiple/index.d.ts +0 -2
  488. package/ui/AutocompleteMultiple/index.js +0 -17
  489. package/ui/AutocompleteMultiple/reducer.d.ts +0 -22
  490. package/ui/AutocompleteMultiple/reducer.js +0 -28
  491. package/ui/AutocompleteMultiple/types.d.ts +0 -12
  492. package/ui/AutocompleteMultiple/types.js +0 -3
  493. package/ui/Button/Button.d.ts +0 -3
  494. package/ui/Button/Button.js +0 -39
  495. package/ui/Button/index.d.ts +0 -2
  496. package/ui/Button/types.d.ts +0 -8
  497. package/ui/Button/types.js +0 -3
  498. package/ui/CopyToClipboard/CopyToClipboard.d.ts +0 -3
  499. package/ui/CopyToClipboard/CopyToClipboard.js +0 -72
  500. package/ui/CopyToClipboard/index.d.ts +0 -2
  501. package/ui/CopyToClipboard/index.js +0 -15
  502. package/ui/CopyToClipboard/types.js +0 -3
  503. package/ui/CopyToClipboardButton/CopyToClipboardButton.d.ts +0 -3
  504. package/ui/CopyToClipboardButton/CopyToClipboardButton.js +0 -85
  505. package/ui/CopyToClipboardButton/index.d.ts +0 -2
  506. package/ui/CopyToClipboardButton/index.js +0 -15
  507. package/ui/CopyToClipboardButton/types.d.ts +0 -6
  508. package/ui/CopyToClipboardButton/types.js +0 -3
  509. package/ui/DatePicker/DatePicker.d.ts +0 -3
  510. package/ui/DatePicker/DatePicker.js +0 -39
  511. package/ui/DatePicker/index.d.ts +0 -2
  512. package/ui/DatePicker/index.js +0 -15
  513. package/ui/DatePicker/types.d.ts +0 -11
  514. package/ui/DatePicker/types.js +0 -3
  515. package/ui/FileInput/FileInput.d.ts +0 -3
  516. package/ui/FileInput/FileInput.js +0 -89
  517. package/ui/FileInput/index.d.ts +0 -2
  518. package/ui/FileInput/index.js +0 -15
  519. package/ui/FileInput/types.d.ts +0 -10
  520. package/ui/FileInput/types.js +0 -3
  521. package/ui/FileUploadInput/FileUploadInput.d.ts +0 -3
  522. package/ui/FileUploadInput/FileUploadInput.js +0 -199
  523. package/ui/FileUploadInput/index.d.ts +0 -2
  524. package/ui/FileUploadInput/index.js +0 -15
  525. package/ui/FileUploadInput/types.d.ts +0 -23
  526. package/ui/FileUploadInput/types.js +0 -3
  527. package/ui/Label/Label.d.ts +0 -3
  528. package/ui/Label/Label.js +0 -36
  529. package/ui/Label/index.d.ts +0 -2
  530. package/ui/Label/styles.d.ts +0 -1
  531. package/ui/Label/styles.js +0 -54
  532. package/ui/Label/types.d.ts +0 -12
  533. package/ui/Label/types.js +0 -3
  534. package/ui/ListItem/ListItem.d.ts +0 -3
  535. package/ui/ListItem/ListItem.js +0 -26
  536. package/ui/ListItem/index.d.ts +0 -2
  537. package/ui/ListItem/index.js +0 -15
  538. package/ui/ListItem/types.js +0 -3
  539. package/ui/MenuItem/MenuItem.d.ts +0 -3
  540. package/ui/MenuItem/MenuItem.js +0 -26
  541. package/ui/MenuItem/index.d.ts +0 -2
  542. package/ui/MenuItem/index.js +0 -15
  543. package/ui/MenuItem/types.d.ts +0 -10
  544. package/ui/MenuItem/types.js +0 -3
  545. package/ui/NumberInput/NumberInput.d.ts +0 -4
  546. package/ui/NumberInput/NumberInput.js +0 -79
  547. package/ui/NumberInput/index.d.ts +0 -2
  548. package/ui/NumberInput/index.js +0 -15
  549. package/ui/NumberInput/types.d.ts +0 -6
  550. package/ui/NumberInput/types.js +0 -3
  551. package/ui/Paper/Paper.d.ts +0 -3
  552. package/ui/Paper/Paper.js +0 -26
  553. package/ui/Paper/index.d.ts +0 -2
  554. package/ui/Paper/types.d.ts +0 -9
  555. package/ui/Paper/types.js +0 -3
  556. package/ui/Select/Select.d.ts +0 -3
  557. package/ui/Select/Select.js +0 -42
  558. package/ui/Select/index.d.ts +0 -2
  559. package/ui/Select/index.js +0 -15
  560. package/ui/Select/types.d.ts +0 -9
  561. package/ui/Select/types.js +0 -3
  562. package/utils/composeValidators.d.ts +0 -1
  563. package/utils/composeValidators.js +0 -43
  564. package/utils/createEmotionCache.d.ts +0 -1
  565. package/utils/createEmotionCache.js +0 -11
  566. /package/deprecated/redux/{configureStore.d.ts → configure-store.d.ts} +0 -0
  567. /package/deprecated/security/{CmsAuthorizator.d.ts → cms-authorizator.d.ts} +0 -0
  568. /package/deprecated/types/{App.d.ts → app.d.ts} +0 -0
  569. /package/deprecated/types/{Form.d.ts → form.d.ts} +0 -0
  570. /package/forms/{ChangePasswordForm/ChangePasswordForm.d.ts → change-password-form/change-password-form.d.ts} +0 -0
  571. /package/forms/{InviteUserForm/InviteUserForm.d.ts → invite-user-form/invite-user-form.d.ts} +0 -0
  572. /package/forms/{LoginForm/LoginForm.d.ts → login-form/login-form.d.ts} +0 -0
  573. /package/lib/{Layout/Layout.d.ts → layout/layout.d.ts} +0 -0
  574. /package/lib/{Layout/Sidebar.d.ts → layout/sidebar.d.ts} +0 -0
  575. /package/lib/{LoginLayout/LoginLayout.d.ts → login-layout/login-layout.d.ts} +0 -0
  576. /package/lib/{LoginLayout → login-layout}/types.d.ts +0 -0
  577. /package/lib/{Menu/activeItemResolver.d.ts → menu/active-item-resolver.d.ts} +0 -0
  578. /package/lib/{Menu/ui/Menu.d.ts → menu/ui/menu.d.ts} +0 -0
  579. /package/pages/{ContentBuilder → content-builder}/mapper.d.ts +0 -0
  580. /package/pages/{ForgottenPasswordPage/ForgottenPasswordPage.d.ts → forgotten-password-page/forgotten-password-page.d.ts} +0 -0
  581. /package/pages/{ForgottenPasswordPage → forgotten-password-page}/types.d.ts +0 -0
  582. /package/pages/{FormPage → form-page}/mapper.d.ts +0 -0
  583. /package/pages/{GridPage/getInitialPropsHelper.d.ts → grid-page/get-initial-props-helper.d.ts} +0 -0
  584. /package/pages/{GridPage/useHiddenColumns.d.ts → grid-page/use-hidden-columns.d.ts} +0 -0
  585. /package/pages/{LoginPage/LoginPage.d.ts → login-page/login-page.d.ts} +0 -0
  586. /package/pages/{LoginPage → login-page}/types.d.ts +0 -0
  587. /package/pages/{RenewPasswordPage/RenewPasswordPage.d.ts → renew-password-page/renew-password-page.d.ts} +0 -0
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./renew-password-form"), exports);
18
+ __exportStar(require("./types"), exports);
@@ -0,0 +1,3 @@
1
+ import { FC } from "react";
2
+ import { RenewPasswordFormProps } from "./types";
3
+ export declare const RenewPasswordForm: FC<RenewPasswordFormProps>;
@@ -0,0 +1,48 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.RenewPasswordForm = void 0;
27
+ const form_1 = require("@uxf/form/form");
28
+ const text_input_1 = require("@uxf/form/text-input");
29
+ const button_1 = require("@uxf/ui/button");
30
+ const react_1 = __importStar(require("react"));
31
+ const react_hook_form_1 = require("react-hook-form");
32
+ const RenewPasswordForm = (props) => {
33
+ // eslint-disable-next-line react/destructuring-assignment
34
+ const { defaultValues, ...formProps } = props;
35
+ const [formDisabled, setFormDisabled] = (0, react_1.useState)(true);
36
+ const formApi = (0, react_hook_form_1.useForm)({
37
+ defaultValues,
38
+ });
39
+ (0, react_1.useEffect)(() => {
40
+ setFormDisabled(false);
41
+ }, []);
42
+ return (react_1.default.createElement(form_1.Form, { formApi: formApi, id: "renew-password-form", ...formProps },
43
+ react_1.default.createElement("div", { className: "space-y-6" },
44
+ react_1.default.createElement(text_input_1.TextInput, { control: formApi.control, isDisabled: formDisabled, isRequired: true, label: "Nov\u00E9 heslo", name: "password", rules: props.passwordRules, type: "password" }),
45
+ react_1.default.createElement(text_input_1.TextInput, { control: formApi.control, isDisabled: formDisabled, isRequired: true, label: "Znovu nov\u00E9 heslo", name: "passwordAgain", rules: { validate: (v) => v === formApi.getValues("password") || "Hesla musí být stejná" }, type: "password" }),
46
+ react_1.default.createElement(button_1.Button, { disabled: formDisabled || formApi.formState.isSubmitting, isFullWidth: true, loading: formApi.formState.isSubmitting, type: "submit" }, "Zm\u011Bnit heslo"))));
47
+ };
48
+ exports.RenewPasswordForm = RenewPasswordForm;
@@ -0,0 +1,11 @@
1
+ import { DefaultValues, SubmitHandler, UseControllerProps } from "react-hook-form";
2
+ export interface RenewPasswordFormData {
3
+ password: string;
4
+ passwordAgain: string;
5
+ }
6
+ export interface RenewPasswordFormProps<TFieldValues extends RenewPasswordFormData = RenewPasswordFormData> {
7
+ className?: string;
8
+ defaultValues?: DefaultValues<TFieldValues>;
9
+ onSubmit: SubmitHandler<TFieldValues>;
10
+ passwordRules?: UseControllerProps<RenewPasswordFormData>["rules"];
11
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ import { FileResponse } from "@uxf/ui/types";
2
+ export declare const onUploadDropzoneFile: (file: File) => Promise<FileResponse>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.onUploadDropzoneFile = void 0;
4
+ const config_1 = require("../../config");
5
+ const onUploadDropzoneFile = async (file) => {
6
+ return await config_1.container.get("api.uploadFile")(file);
7
+ };
8
+ exports.onUploadDropzoneFile = onUploadDropzoneFile;
@@ -0,0 +1,2 @@
1
+ import { FileResponse } from "@uxf/ui/types";
2
+ export declare const onUploadFile: (file: File, namespace?: string) => Promise<FileResponse>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.onUploadFile = void 0;
4
+ const config_1 = require("../../config");
5
+ const onUploadFile = async (file, namespace = "default") => {
6
+ return await config_1.container.get("api.uploadFile")(file, namespace);
7
+ };
8
+ exports.onUploadFile = onUploadFile;
@@ -0,0 +1,6 @@
1
+ import { AxiosRequestConfig } from "axios";
2
+ export declare function createAxiosInstance(requestConfig?: AxiosRequestConfig): {
3
+ axiosInstance: import("axios").AxiosInstance;
4
+ axiosRequest: <Response_1>(ctx: any, url: string, method: import("axios").Method, body: object | null, query: object | null) => Promise<import("axios").AxiosResponse<Response_1, any>>;
5
+ useAxiosRequest: <Response_2 extends boolean | Record<string, any>, RequestBody extends Record<string, any> | null, RequestQuery extends Record<string, any> | null, RequestPath extends Record<string, any> | null>(url: string, method: import("axios").Method, config: import("./types").RequestConfig<RequestBody, RequestQuery, RequestPath>) => [import("axios-hooks").ResponseValues<Response_2, any, any>, import("./types").Execute<Response_2, RequestBody, RequestQuery, RequestPath>];
6
+ };
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.createAxiosInstance = void 0;
7
+ const axios_1 = __importDefault(require("axios"));
8
+ // eslint-disable-next-line import/no-cycle
9
+ const create_axios_request_1 = require("./create-axios-request");
10
+ const create_use_axios_request_1 = require("./create-use-axios-request");
11
+ function createAxiosInstance(requestConfig = {}) {
12
+ const instance = axios_1.default.create();
13
+ return {
14
+ axiosInstance: instance,
15
+ axiosRequest: (0, create_axios_request_1.createAxiosRequest)(instance, requestConfig),
16
+ useAxiosRequest: (0, create_use_axios_request_1.createUseAxiosRequest)(instance, requestConfig),
17
+ };
18
+ }
19
+ exports.createAxiosInstance = createAxiosInstance;
@@ -0,0 +1,2 @@
1
+ import { AxiosInstance, AxiosRequestConfig, Method } from "axios";
2
+ export declare const createAxiosRequest: (axiosInstance: AxiosInstance, requestConfig: AxiosRequestConfig) => <Response_1>(ctx: any, url: string, method: Method, body: object | null, query: object | null) => Promise<import("axios").AxiosResponse<Response_1, any>>;
@@ -0,0 +1,40 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createAxiosRequest = void 0;
4
+ const qs_1 = require("qs");
5
+ // eslint-disable-next-line import/no-cycle
6
+ const config_1 = require("../../config");
7
+ const BadRequestError_1 = require("../../errors/BadRequestError");
8
+ const ForbiddenError_1 = require("../../errors/ForbiddenError");
9
+ const NetworkError_1 = require("../../errors/NetworkError");
10
+ const UnauthorizedError_1 = require("../../errors/UnauthorizedError");
11
+ const createAxiosRequest = (axiosInstance, requestConfig) => (ctx, url, method, body, query) => {
12
+ var _a;
13
+ return axiosInstance
14
+ .request({
15
+ baseURL: config_1.config.get("api-url"),
16
+ headers: ((_a = ctx === null || ctx === void 0 ? void 0 : ctx.req) === null || _a === void 0 ? void 0 : _a.headers.cookie) ? { cookie: ctx.req.headers.cookie } : {},
17
+ ...requestConfig,
18
+ url: query && Object.keys(query).length > 0 ? `${url}?${(0, qs_1.stringify)(query)}` : url,
19
+ method,
20
+ data: body,
21
+ })
22
+ .catch((error) => {
23
+ if (error.response) {
24
+ if (error.response.status === 400) {
25
+ throw new BadRequestError_1.BadRequestError(error.response.data);
26
+ }
27
+ else if (error.response.status === 401) {
28
+ throw new UnauthorizedError_1.UnauthorizedError();
29
+ }
30
+ else if (error.response.status === 403) {
31
+ throw new ForbiddenError_1.ForbiddenError();
32
+ }
33
+ }
34
+ else if (error.request) {
35
+ throw new NetworkError_1.NetworkError();
36
+ }
37
+ throw error;
38
+ });
39
+ };
40
+ exports.createAxiosRequest = createAxiosRequest;
@@ -0,0 +1,4 @@
1
+ import { AxiosInstance, AxiosRequestConfig, Method } from "axios";
2
+ import { ResponseValues } from "axios-hooks";
3
+ import { Execute, RequestConfig } from "./types";
4
+ export declare const createUseAxiosRequest: (axiosInstance: AxiosInstance, requestConfig: AxiosRequestConfig) => <Response_1 extends boolean | Record<string, any>, RequestBody extends Record<string, any> | null, RequestQuery extends Record<string, any> | null, RequestPath extends Record<string, any> | null>(url: string, method: Method, config: RequestConfig<RequestBody, RequestQuery, RequestPath>) => [ResponseValues<Response_1, any, any>, Execute<Response_1, RequestBody, RequestQuery, RequestPath>];
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createUseAxiosRequest = void 0;
4
+ const axios_hooks_1 = require("axios-hooks");
5
+ // eslint-disable-next-line import/no-cycle
6
+ const config_1 = require("../../config");
7
+ const react_1 = require("react");
8
+ const createUseAxiosRequest = (axiosInstance, requestConfig) => {
9
+ const useAxios = (0, axios_hooks_1.makeUseAxios)({
10
+ axios: axiosInstance,
11
+ defaultOptions: {
12
+ ssr: false,
13
+ },
14
+ });
15
+ return (url, method, config) => {
16
+ // TODO Vejvis!!! nějaká demence s typem configu
17
+ const { body, query, skip } = config;
18
+ const [result, executeHandler] = useAxios({
19
+ baseURL: config_1.config.get("api-url"),
20
+ ...requestConfig,
21
+ url,
22
+ method,
23
+ params: query,
24
+ data: body,
25
+ }, { useCache: false, manual: skip });
26
+ const execute = (0, react_1.useCallback)((c) => executeHandler({
27
+ url,
28
+ method,
29
+ // TODO Vejvis!!! nějaká demence s typem configu
30
+ params: c.query,
31
+ data: c.body,
32
+ }), [url, method, executeHandler]);
33
+ return [result, execute];
34
+ };
35
+ };
36
+ exports.createUseAxiosRequest = createUseAxiosRequest;
@@ -1,2 +1,2 @@
1
- export * from "./createAxiosInstance";
1
+ export * from "./create-axios-instance";
2
2
  export * from "./types";
package/lib/api/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
@@ -10,6 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
15
  };
12
16
  Object.defineProperty(exports, "__esModule", { value: true });
13
- __exportStar(require("./createAxiosInstance"), exports);
17
+ // eslint-disable-next-line import/no-cycle
18
+ __exportStar(require("./create-axios-instance"), exports);
14
19
  __exportStar(require("./types"), exports);
15
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvbGliL2FwaS9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7QUFBQSx3REFBc0M7QUFDdEMsMENBQXdCIn0=
@@ -1,15 +1,18 @@
1
1
  import { AxiosPromise } from "axios";
2
2
  import { ResponseValues } from "axios-hooks";
3
- declare type RequestConfigBody<T extends {} | null> = T extends null ? {} : {
3
+ type RequestConfigBody<T extends Record<string, any> | null> = T extends null ? Record<string, any> : {
4
4
  body: T;
5
5
  };
6
- declare type RequestConfigQuery<T extends {} | null> = T extends null ? {} : {
6
+ type RequestConfigQuery<T extends Record<string, any> | null> = T extends null ? Record<string, any> : {
7
7
  query: T;
8
8
  };
9
- declare type RequestConfigPath<T extends {} | null> = T extends null ? {} : {
9
+ type RequestConfigPath<T extends Record<string, any> | null> = T extends null ? Record<string, any> : {
10
10
  path: T;
11
11
  };
12
- export declare type RequestConfig<RequestBody extends {} | null, RequestQuery extends {} | null, RequestPath extends {} | null> = {} & RequestConfigBody<RequestBody> & RequestConfigQuery<RequestQuery> & RequestConfigPath<RequestPath>;
13
- export declare type Execute<Response extends {}, RequestBody extends {} | null, RequestQuery extends {} | null, RequestPath extends {} | null> = (config: RequestConfig<RequestBody, RequestQuery, RequestPath>) => AxiosPromise<Response>;
14
- export declare type UseAxiosRequest<Response extends {}, RequestBody extends {}, RequestQuery extends {}, RequestPath extends {}> = (config: RequestConfig<RequestBody, RequestQuery, RequestPath>) => [ResponseValues<Response, any>, Execute<Response, RequestBody, RequestQuery, RequestPath>];
12
+ type RequestConfigOptions = {
13
+ skip?: boolean;
14
+ };
15
+ export type RequestConfig<RequestBody extends Record<string, any> | null, RequestQuery extends Record<string, any> | null, RequestPath extends Record<string, any> | null> = Record<string, any> & RequestConfigBody<RequestBody> & RequestConfigQuery<RequestQuery> & RequestConfigPath<RequestPath> & RequestConfigOptions;
16
+ export type Execute<Response extends Record<string, any> | boolean, RequestBody extends Record<string, any> | null, RequestQuery extends Record<string, any> | null, RequestPath extends Record<string, any> | null> = (config: RequestConfig<RequestBody, RequestQuery, RequestPath>) => AxiosPromise<Response>;
17
+ export type UseAxiosRequest<Response extends Record<string, any> | boolean, RequestBody extends Record<string, any>, RequestQuery extends Record<string, any>, RequestPath extends Record<string, any>> = (config: RequestConfig<RequestBody, RequestQuery, RequestPath>) => [ResponseValues<Response, any, any>, Execute<Response, RequestBody, RequestQuery, RequestPath>];
15
18
  export {};
package/lib/api/types.js CHANGED
@@ -1,3 +1,2 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9zcmMvbGliL2FwaS90eXBlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiIn0=
@@ -0,0 +1,9 @@
1
+ import { FC } from "react";
2
+ export interface BreadcrumbItemProps {
3
+ href?: string;
4
+ title: string;
5
+ }
6
+ export type BreadcrumbsProps = {
7
+ items: BreadcrumbItemProps[];
8
+ };
9
+ export declare const Breadcrumbs: FC<BreadcrumbsProps>;
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Breadcrumbs = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const link_1 = __importDefault(require("next/link"));
9
+ const icon_1 = require("@uxf/ui/icon");
10
+ const Breadcrumbs = (props) => {
11
+ if (props.items.length === 0) {
12
+ return null;
13
+ }
14
+ return (react_1.default.createElement("div", { className: "uxf-typo-body mb-4 flex flex-wrap items-center text-lightLow" }, props.items.map((item, index) => (react_1.default.createElement("span", { className: "mr-2 last:mr-0", key: index },
15
+ !!index && react_1.default.createElement(icon_1.Icon, { className: "mr-2 inline", name: "angleRight", size: 16 }),
16
+ item.href ? (react_1.default.createElement(link_1.default, { href: item.href, className: "transition-colors hover:text-lightHigh" },
17
+ react_1.default.createElement("span", null, item.title))) : (react_1.default.createElement("span", null, item.title)))))));
18
+ };
19
+ exports.Breadcrumbs = Breadcrumbs;
@@ -0,0 +1,3 @@
1
+ export * from "./layout";
2
+ export * from "./breadcrumbs";
3
+ export * from "./types";
@@ -0,0 +1,19 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./layout"), exports);
18
+ __exportStar(require("./breadcrumbs"), exports);
19
+ __exportStar(require("./types"), exports);
@@ -0,0 +1,3 @@
1
+ import { FC, PropsWithChildren } from "react";
2
+ import { LayoutContainerProps } from "./types";
3
+ export declare const LayoutContainer: FC<PropsWithChildren<LayoutContainerProps>>;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.LayoutContainer = void 0;
7
+ const react_1 = __importDefault(require("react"));
8
+ const maxWidthClassName = {
9
+ narrow: "max-w-[788px]",
10
+ wide: "max-w-[1024px]",
11
+ fullWidth: "",
12
+ none: "",
13
+ };
14
+ const LayoutContainer = (props) => {
15
+ var _a, _b;
16
+ const type = (_a = props.type) !== null && _a !== void 0 ? _a : "fullWidth";
17
+ if (type === "none") {
18
+ return react_1.default.createElement(react_1.default.Fragment, null, props.children);
19
+ }
20
+ return (react_1.default.createElement("div", { className: `${maxWidthClassName[type]} mx-auto px-4 md:px-10 ${(_b = props.className) !== null && _b !== void 0 ? _b : ""}` }, props.children));
21
+ };
22
+ exports.LayoutContainer = LayoutContainer;
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.Layout = void 0;
7
+ const head_1 = __importDefault(require("next/head"));
8
+ const react_1 = __importDefault(require("react"));
9
+ const config_1 = require("../../config");
10
+ const sidebar_1 = require("./sidebar");
11
+ const styles_1 = require("./styles");
12
+ const breadcrumbs_1 = require("./breadcrumbs");
13
+ const loader_1 = require("@uxf/ui/loader/loader");
14
+ const layout_container_1 = require("./layout-container");
15
+ const Layout = (props) => {
16
+ var _a;
17
+ // eslint-disable-next-line react/destructuring-assignment
18
+ const { Header, Logo, MessageBar, TitleRightContainer, ToolbarRight, breadcrumbs, children, containerType, headerContainerType, loading, mainClassName, menuConfiguration, subtitle, title, stickyHeader, CustomHeader, } = props;
19
+ return (react_1.default.createElement(react_1.default.Fragment, null,
20
+ react_1.default.createElement(head_1.default, null,
21
+ react_1.default.createElement("meta", { name: "viewport", content: "width=device-width, initial-scale=1" }),
22
+ react_1.default.createElement("meta", { charSet: "utf-8" }),
23
+ react_1.default.createElement("title", null, `${title} | ${(_a = config_1.config.get("app-name")) !== null && _a !== void 0 ? _a : ""}`)),
24
+ react_1.default.createElement("div", { className: "flex" },
25
+ react_1.default.createElement("div", { className: "flex w-full bg-gray-100 dark:bg-gray-900 dark:text-darkHigh" },
26
+ react_1.default.createElement(sidebar_1.Sidebar, { menuConfiguration: menuConfiguration, Logo: Logo }),
27
+ react_1.default.createElement("main", { className: `min-h-screen w-full pb-16 md:ml-[var(--drawerWidth)] md:w-[calc(100%_-_var(--drawerWidth))] md:pb-0 ${mainClassName !== null && mainClassName !== void 0 ? mainClassName : ""}`, style: { "--drawerWidth": `${styles_1.drawerWidth}px` } }, loading ? (react_1.default.createElement("div", { className: "flex h-96 flex-col items-center justify-center" },
28
+ react_1.default.createElement("div", { className: "text-center" },
29
+ react_1.default.createElement(loader_1.Loader, null),
30
+ react_1.default.createElement("p", { className: "mt-2" }, "Na\u010D\u00EDt\u00E1m\u2026")))) : (react_1.default.createElement(react_1.default.Fragment, null,
31
+ CustomHeader ? (CustomHeader) : (react_1.default.createElement("div", { className: `${Header ? "bg-white dark:bg-gray-950" : ""} ${stickyHeader ? "sticky top-0 z-10 bg-white shadow-md dark:bg-gray-950" : ""}` },
32
+ ToolbarRight && (react_1.default.createElement("div", { className: "flex h-12 items-center justify-end bg-sidebar-background px-6 text-darkMedium" }, ToolbarRight)),
33
+ MessageBar,
34
+ react_1.default.createElement(layout_container_1.LayoutContainer, { type: headerContainerType !== null && headerContainerType !== void 0 ? headerContainerType : containerType, className: "pb-9 pt-12" },
35
+ breadcrumbs && react_1.default.createElement(breadcrumbs_1.Breadcrumbs, { items: breadcrumbs }),
36
+ react_1.default.createElement("div", { className: "flex items-center justify-between" },
37
+ react_1.default.createElement("h1", { className: "uxf-typo-h4" }, title),
38
+ TitleRightContainer),
39
+ subtitle,
40
+ Header))),
41
+ react_1.default.createElement(layout_container_1.LayoutContainer, { type: containerType }, children))))))));
42
+ };
43
+ exports.Layout = Layout;
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.Sidebar = void 0;
27
+ const react_1 = __importStar(require("react"));
28
+ const menu_1 = require("../menu");
29
+ const styles_1 = require("./styles");
30
+ const user_menu_1 = require("../menu/ui/user-menu");
31
+ const mobile_bar_1 = require("../menu/mobile-bar");
32
+ const useOnMount_1 = require("@uxf/core/hooks/useOnMount");
33
+ const uxfLogo = (react_1.default.createElement("svg", { width: "134", height: "30", viewBox: "0 0 179 40" },
34
+ react_1.default.createElement("path", { fill: "#FFF", fillRule: "evenodd", d: "M33.563 12.874a9.103 9.103 0 0 0 0-12.874L20.69 12.874l.107.105a9.103 9.103 0 0 0 12.766-.105Zm-20.69-6.437a9.103 9.103 0 0 1 .106 12.766l-.105.107L0 6.437a9.103 9.103 0 0 1 12.874 0ZM40 33.563 27.127 20.69l-.106.107a9.103 9.103 0 0 0 12.98 12.766Zm-20.69-6.437-.107-.105A9.103 9.103 0 0 0 6.437 40l12.874-12.874Z", clipRule: "evenodd" }),
35
+ react_1.default.createElement("path", { fill: "#FFF", fillRule: "evenodd", d: "m84.325 7.295 5.133 8.675h.199l5.158-8.675h6.078l-7.768 12.727 7.942 12.727h-6.19l-5.22-8.687h-.199l-5.22 8.687h-6.165l7.967-12.727-7.818-12.727h6.103Zm-24.194 0v16.07c0 .97.214 1.832.64 2.586a4.58 4.58 0 0 0 1.809 1.777c.779.431 1.686.647 2.722.647 1.044 0 1.953-.216 2.728-.647a4.591 4.591 0 0 0 1.802-1.777c.427-.754.64-1.616.64-2.585V7.296h5.382v16.53c0 1.856-.441 3.48-1.324 4.872-.882 1.392-2.115 2.475-3.697 3.25-1.583.775-3.426 1.162-5.531 1.162-2.113 0-3.96-.387-5.543-1.162-1.583-.775-2.813-1.858-3.692-3.25-.878-1.392-1.317-3.016-1.317-4.872V7.296h5.381ZM170.25 13.41c2.411 0 4.311.51 5.698 1.529 1.388 1.019 2.198 2.407 2.43 4.164l-4.847.298a2.555 2.555 0 0 0-.534-1.125 2.942 2.942 0 0 0-1.075-.808c-.444-.203-.972-.304-1.585-.304-.821 0-1.512.172-2.076.515-.563.344-.845.802-.845 1.374 0 .456.182.84.547 1.156.364.315.99.567 1.877.758l3.455.696c1.856.381 3.24.994 4.151 1.84.912.845 1.367 1.955 1.367 3.33 0 1.252-.366 2.35-1.1 3.294-.733.945-1.736 1.68-3.007 2.206-1.272.526-2.737.79-4.394.79-2.527 0-4.539-.529-6.034-1.585-1.496-1.057-2.372-2.496-2.629-4.32l5.208-.273c.157.77.538 1.357 1.143 1.759.605.402 1.38.603 2.324.603.928 0 1.676-.18 2.244-.54.567-.361.855-.827.864-1.4-.009-.48-.212-.875-.609-1.186-.398-.31-1.011-.55-1.84-.715l-3.306-.659c-1.864-.372-3.25-1.019-4.157-1.938-.908-.92-1.361-2.093-1.361-3.518 0-1.226.333-2.283 1-3.17.667-.886 1.608-1.57 2.821-2.05 1.214-.48 2.637-.72 4.27-.72Zm-36.686.373a12.285 12.285 0 0 0-3.051-.373c-1.525 0-2.865.23-4.021.69-1.156.46-2.098 1.114-2.827 1.964-.73.849-1.219 1.854-1.467 3.014l4.897.397c.182-.63.555-1.153 1.119-1.572.563-.418 1.321-.627 2.274-.627.903 0 1.601.215 2.094.646.493.43.74 1.04.74 1.827v.075c0 .405-.153.712-.46.92-.307.206-.8.362-1.479.465-.68.104-1.574.214-2.685.33-.944.09-1.845.248-2.703.472a7.698 7.698 0 0 0-2.293.994 4.727 4.727 0 0 0-1.591 1.74c-.39.721-.584 1.612-.584 2.673 0 1.259.275 2.31.826 3.15a5.147 5.147 0 0 0 2.256 1.902c.953.427 2.038.64 3.257.64.944 0 1.777-.126 2.498-.38a5.55 5.55 0 0 0 1.852-1.055 5.31 5.31 0 0 0 1.23-1.573h.149v2.648h5.022V19.873c0-1.135-.22-2.11-.659-2.927a5.655 5.655 0 0 0-1.796-2.007 8.039 8.039 0 0 0-2.598-1.156Zm-13.424-2.05V7.294h-16.853v25.454h5.381V22.235h10.354v-4.438h-10.354v-6.065h11.472Zm32.603 1.677c1.326 0 2.482.29 3.468.87.986.58 1.753 1.407 2.3 2.48.546 1.073.82 2.35.82 3.834V32.75h-5.295V21.539c.008-1.169-.29-2.082-.895-2.74-.605-.66-1.437-.989-2.498-.989-.713 0-1.34.153-1.883.46a3.166 3.166 0 0 0-1.268 1.336c-.302.584-.458 1.286-.466 2.107V32.75h-5.295V13.659h5.047v3.368H147a5.358 5.358 0 0 1 2.126-2.641c.994-.65 2.2-.976 3.616-.976Zm-20.061 10.782c.286-.087.512-.184.678-.292v2.026c0 .671-.17 1.272-.51 1.802-.34.53-.808.951-1.404 1.262-.597.31-1.285.466-2.064.466-.812 0-1.481-.189-2.007-.566-.526-.377-.789-.925-.789-1.646 0-.497.128-.914.385-1.25.257-.335.617-.602 1.082-.801a6.547 6.547 0 0 1 1.628-.435l.969-.143a24.15 24.15 0 0 0 1.069-.186c.356-.071.677-.15.963-.237Z", clipRule: "evenodd" })));
36
+ const Sidebar = (props) => {
37
+ // eslint-disable-next-line react/destructuring-assignment
38
+ const { menuConfiguration, Logo, CustomSidebar } = props;
39
+ const [deviceHeight, setDeviceHeight] = (0, react_1.useState)(0);
40
+ const [isMenuOpen, setIsMenuOpen] = (0, react_1.useState)(false);
41
+ const toggleMenu = () => setIsMenuOpen((prev) => !prev);
42
+ (0, useOnMount_1.useOnMount)(() => {
43
+ const handleDeviceHeight = () => {
44
+ var _a, _b;
45
+ setDeviceHeight((_b = (_a = window.visualViewport) === null || _a === void 0 ? void 0 : _a.height) !== null && _b !== void 0 ? _b : window.innerHeight);
46
+ };
47
+ handleDeviceHeight();
48
+ window.addEventListener("resize", handleDeviceHeight);
49
+ return () => {
50
+ window.removeEventListener("resize", handleDeviceHeight);
51
+ };
52
+ });
53
+ return (CustomSidebar !== null && CustomSidebar !== void 0 ? CustomSidebar : (react_1.default.createElement("div", { className: "sidebar fixed z-1 flex w-full flex-col max-md:z-[15] md:w-[var(--drawerWidth)]", style: { "--drawerWidth": `${styles_1.drawerWidth}px` } },
54
+ react_1.default.createElement("div", { className: `h-[calc(var(--deviceHeight)_-_48px)] flex-col bg-sidebar-background pt-5 md:h-screen ${isMenuOpen ? "flex" : "hidden md:flex"}`, style: { "--deviceHeight": `${deviceHeight}px` } },
55
+ react_1.default.createElement("div", { className: "sidebar__logo px-4" }, Logo !== null && Logo !== void 0 ? Logo : uxfLogo),
56
+ menuConfiguration && menuConfiguration.length > 0 && (react_1.default.createElement(react_1.default.Fragment, null,
57
+ react_1.default.createElement("div", { className: `sidebar__nav grow overflow-auto px-2 md:px-0 ${menuConfiguration[0].type === "super-section" ? "mt-4" : "mt-8"}` },
58
+ react_1.default.createElement(menu_1.Menu, { menu: menuConfiguration })),
59
+ react_1.default.createElement(user_menu_1.UserMenu, { menu: menuConfiguration })))),
60
+ menuConfiguration && react_1.default.createElement(mobile_bar_1.MobileBar, { menuConfiguration: menuConfiguration, toggleMenu: toggleMenu }))));
61
+ };
62
+ exports.Sidebar = Sidebar;
@@ -0,0 +1 @@
1
+ export declare const drawerWidth = 264;
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.drawerWidth = void 0;
4
+ exports.drawerWidth = 264;
@@ -0,0 +1,33 @@
1
+ import { HTMLAttributes, ReactElement, ReactNode } from "react";
2
+ import { MenuItem } from "../menu/model";
3
+ import { BreadcrumbItemProps } from "./breadcrumbs";
4
+ export type LayoutContainerType = "fullWidth" | "wide" | "narrow" | "none";
5
+ export interface LayoutContainerProps extends HTMLAttributes<HTMLDivElement> {
6
+ type?: LayoutContainerType;
7
+ }
8
+ export type LayoutProps = SidebarProps & {
9
+ children?: ReactNode;
10
+ containerType?: LayoutContainerType;
11
+ headerContainerType?: LayoutContainerType;
12
+ breadcrumbs?: BreadcrumbItemProps[];
13
+ Header?: ReactNode;
14
+ loading?: boolean;
15
+ Logo?: ReactNode;
16
+ mainClassName?: string;
17
+ MessageBar?: ReactNode;
18
+ subtitle?: ReactNode;
19
+ title?: string;
20
+ ToolbarRight?: ReactNode;
21
+ TitleRightContainer?: ReactNode;
22
+ stickyHeader?: boolean;
23
+ CustomHeader?: ReactNode;
24
+ };
25
+ export interface AppBarProps {
26
+ Logo?: ReactNode;
27
+ ToolbarRight?: ReactNode;
28
+ }
29
+ export interface SidebarProps {
30
+ Logo?: ReactNode;
31
+ menuConfiguration?: MenuItem[];
32
+ CustomSidebar?: ReactElement;
33
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export * from "./login-layout";
2
+ export * from "./types";
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./login-layout"), exports);
18
+ __exportStar(require("./types"), exports);
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.LoginLayout = void 0;
7
+ const head_1 = __importDefault(require("next/head"));
8
+ const react_1 = __importDefault(require("react"));
9
+ const paper_1 = require("@uxf/ui/paper/paper");
10
+ const LoginLayout = (props) => {
11
+ // eslint-disable-next-line react/destructuring-assignment
12
+ const { hideTitle, title, subTitle, pageTitle, children, Logo } = props;
13
+ return (react_1.default.createElement("div", { className: "flex min-h-screen flex-col items-center justify-center bg-gray-100 p-4 dark:bg-gray-900 dark:text-darkHigh" },
14
+ react_1.default.createElement(head_1.default, null,
15
+ react_1.default.createElement("title", null, pageTitle || "")),
16
+ Logo && react_1.default.createElement("div", { className: "mb-8" }, Logo),
17
+ title && react_1.default.createElement("h1", { className: hideTitle ? "sr-only" : "uxf-typo-h4" }, title),
18
+ subTitle && react_1.default.createElement("p", { className: "uxf-typo-body mt-2 text-lightMedium" }, subTitle),
19
+ react_1.default.createElement(paper_1.Paper, { className: "mt-8 w-[448px] max-w-full p-6 dark:bg-gray-950" }, children)));
20
+ };
21
+ exports.LoginLayout = LoginLayout;
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ActiveItemResolver = void 0;
4
+ const exactMatch = () => (menuItem) => (_, activeRoute) => {
5
+ return activeRoute === menuItem.route;
6
+ };
7
+ const exactMatchWithParams = () => (menuItem) => (router, activeRoute) => {
8
+ const isQueryEqual = JSON.stringify(router.query) === JSON.stringify(menuItem.routeParams);
9
+ return activeRoute === menuItem.route && isQueryEqual;
10
+ };
11
+ const anyOf = (routeNames) => (menuItem) => (_, activeRoute) => {
12
+ if (activeRoute === menuItem.route) {
13
+ return true;
14
+ }
15
+ return routeNames.some((routeName) => routeName === activeRoute);
16
+ };
17
+ const tableLink = () => (menuItem) => (router, activeRoute) => {
18
+ var _a;
19
+ const isQueryEqual = router.query.entityAlias === ((_a = menuItem.routeParams) === null || _a === void 0 ? void 0 : _a.entityAlias);
20
+ if (activeRoute === menuItem.route && isQueryEqual) {
21
+ return true;
22
+ }
23
+ return activeRoute === "cms/table-form" && isQueryEqual;
24
+ };
25
+ exports.ActiveItemResolver = {
26
+ anyOf,
27
+ exactMatch,
28
+ exactMatchWithParams,
29
+ tableLink,
30
+ };