@webiny/app-admin 0.0.0-unstable.d7f521b032 → 0.0.0-unstable.dbdf5d6258

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 (1170) hide show
  1. package/README.md +7 -17
  2. package/assets/icons/add-18px.svg +1 -1
  3. package/assets/icons/arrow_drop_down-24px.svg +1 -1
  4. package/assets/icons/file_download.svg +1 -0
  5. package/assets/icons/file_upload.svg +1 -0
  6. package/assets/icons/filter-24px.svg +1 -1
  7. package/assets/icons/highlight-24px.svg +1 -1
  8. package/assets/icons/info.svg +1 -1
  9. package/assets/icons/insert_drive_file-24px.svg +1 -1
  10. package/assets/icons/insert_photo-24px.svg +1 -1
  11. package/assets/icons/label-24px.svg +1 -1
  12. package/assets/icons/round-account_circle-24px.svg +1 -1
  13. package/assets/icons/round-arrow_drop_down-24px.svg +1 -1
  14. package/assets/icons/round-help-24px.svg +1 -1
  15. package/assets/icons/round-settings-24px.svg +1 -1
  16. package/assets/icons/today-24px.svg +1 -1
  17. package/assets/icons/touch_app.svg +1 -1
  18. package/base/Admin.d.ts +5 -2
  19. package/base/Admin.js +43 -40
  20. package/base/Admin.js.map +1 -1
  21. package/base/Base/LexicalPreset.d.ts +2 -0
  22. package/base/Base/LexicalPreset.js +67 -0
  23. package/base/Base/LexicalPreset.js.map +1 -0
  24. package/base/Base/Menus/SupportMenuItems.d.ts +2 -0
  25. package/base/Base/Menus/SupportMenuItems.js +18 -0
  26. package/base/Base/Menus/SupportMenuItems.js.map +1 -0
  27. package/base/Base/Menus/WebinyVersion.d.ts +2 -0
  28. package/base/Base/Menus/WebinyVersion.js +24 -0
  29. package/base/Base/Menus/WebinyVersion.js.map +1 -0
  30. package/base/Base/Menus.d.ts +2 -0
  31. package/base/Base/Menus.js +114 -0
  32. package/base/Base/Menus.js.map +1 -0
  33. package/base/Base/RoutesConfig.d.ts +2 -0
  34. package/base/Base/RoutesConfig.js +30 -0
  35. package/base/Base/RoutesConfig.js.map +1 -0
  36. package/base/Base/Tenant/wby-horizontal.svg +23 -0
  37. package/base/Base/Tenant/wby-square.svg +3 -0
  38. package/base/Base/Tenant.d.ts +2 -0
  39. package/base/Base/Tenant.js +24 -0
  40. package/base/Base/Tenant.js.map +1 -0
  41. package/base/Base/UserMenu/ExitTenant.d.ts +20 -0
  42. package/base/Base/UserMenu/ExitTenant.js +37 -0
  43. package/base/Base/UserMenu/ExitTenant.js.map +1 -0
  44. package/base/Base/UserMenu/SignOut.d.ts +2 -0
  45. package/base/Base/UserMenu/SignOut.js +19 -0
  46. package/base/Base/UserMenu/SignOut.js.map +1 -0
  47. package/base/Base/UserMenu/UserInfo.d.ts +6 -0
  48. package/base/Base/UserMenu/UserInfo.js +43 -0
  49. package/base/Base/UserMenu/UserInfo.js.map +1 -0
  50. package/base/Base/UserMenu.d.ts +2 -0
  51. package/base/Base/UserMenu.js +21 -0
  52. package/base/Base/UserMenu.js.map +1 -0
  53. package/base/Base.d.ts +1 -1
  54. package/base/Base.js +12 -90
  55. package/base/Base.js.map +1 -1
  56. package/base/TelemetryAdminAppStart.d.ts +1 -0
  57. package/base/TelemetryAdminAppStart.js +19 -0
  58. package/base/TelemetryAdminAppStart.js.map +1 -0
  59. package/base/WebinyVersion.d.ts +2 -0
  60. package/base/WebinyVersion.js +24 -0
  61. package/base/WebinyVersion.js.map +1 -0
  62. package/base/createRootContainer.d.ts +2 -0
  63. package/base/createRootContainer.js +55 -0
  64. package/base/createRootContainer.js.map +1 -0
  65. package/base/plugins/AddGraphQLQuerySelection.d.ts +2 -3
  66. package/base/plugins/AddGraphQLQuerySelection.js +13 -18
  67. package/base/plugins/AddGraphQLQuerySelection.js.map +1 -1
  68. package/base/providers/AdminUiStateProvider.d.ts +1 -0
  69. package/base/providers/AdminUiStateProvider.js +14 -0
  70. package/base/providers/AdminUiStateProvider.js.map +1 -0
  71. package/base/providers/ApolloProvider.d.ts +5 -2
  72. package/base/providers/ApolloProvider.js +10 -18
  73. package/base/providers/ApolloProvider.js.map +1 -1
  74. package/base/providers/UiProviders.d.ts +1 -0
  75. package/base/providers/UiProviders.js +35 -0
  76. package/base/providers/UiProviders.js.map +1 -0
  77. package/base/providers/UiStateProvider.d.ts +1 -2
  78. package/base/providers/UiStateProvider.js +12 -16
  79. package/base/providers/UiStateProvider.js.map +1 -1
  80. package/base/ui/Brand.d.ts +39 -2
  81. package/base/ui/Brand.js +7 -14
  82. package/base/ui/Brand.js.map +1 -1
  83. package/base/ui/CenteredView.d.ts +21 -1
  84. package/base/ui/CenteredView.js +14 -34
  85. package/base/ui/CenteredView.js.map +1 -1
  86. package/base/ui/Dashboard.d.ts +39 -2
  87. package/base/ui/Dashboard.js +7 -14
  88. package/base/ui/Dashboard.js.map +1 -1
  89. package/base/ui/FileManager.d.ts +74 -0
  90. package/base/ui/FileManager.js +66 -0
  91. package/base/ui/FileManager.js.map +1 -0
  92. package/base/ui/Layout.d.ts +40 -2
  93. package/base/ui/Layout.js +10 -18
  94. package/base/ui/Layout.js.map +1 -1
  95. package/base/ui/LoginScreen.d.ts +40 -2
  96. package/base/ui/LoginScreen.js +22 -17
  97. package/base/ui/LoginScreen.js.map +1 -1
  98. package/base/ui/Logo.d.ts +38 -7
  99. package/base/ui/Logo.js +7 -29
  100. package/base/ui/Logo.js.map +1 -1
  101. package/base/ui/Navigation.d.ts +39 -23
  102. package/base/ui/Navigation.js +14 -146
  103. package/base/ui/Navigation.js.map +1 -1
  104. package/base/ui/NotFound.d.ts +39 -2
  105. package/base/ui/NotFound.js +7 -14
  106. package/base/ui/NotFound.js.map +1 -1
  107. package/base/ui/Tags.d.ts +2 -2
  108. package/base/ui/Tags.js +16 -18
  109. package/base/ui/Tags.js.map +1 -1
  110. package/base/ui/TenantSelector.d.ts +39 -0
  111. package/base/ui/TenantSelector.js +8 -0
  112. package/base/ui/TenantSelector.js.map +1 -0
  113. package/base/ui/UserMenu/UserMenu.d.ts +39 -0
  114. package/base/ui/UserMenu/UserMenu.js +8 -0
  115. package/base/ui/UserMenu/UserMenu.js.map +1 -0
  116. package/base/ui/UserMenu/UserMenuHandle.d.ts +39 -0
  117. package/base/ui/UserMenu/UserMenuHandle.js +8 -0
  118. package/base/ui/UserMenu/UserMenuHandle.js.map +1 -0
  119. package/base/ui/UserMenu/UserMenuItem.d.ts +81 -0
  120. package/base/ui/UserMenu/UserMenuItem.js +19 -0
  121. package/base/ui/UserMenu/UserMenuItem.js.map +1 -0
  122. package/base/ui/UserMenu/UserMenuLink.d.ts +81 -0
  123. package/base/ui/UserMenu/UserMenuLink.js +19 -0
  124. package/base/ui/UserMenu/UserMenuLink.js.map +1 -0
  125. package/base/ui/UserMenu/UserMenuSeparator.d.ts +42 -0
  126. package/base/ui/UserMenu/UserMenuSeparator.js +9 -0
  127. package/base/ui/UserMenu/UserMenuSeparator.js.map +1 -0
  128. package/base/ui/UserMenu.d.ts +79 -29
  129. package/base/ui/UserMenu.js +16 -110
  130. package/base/ui/UserMenu.js.map +1 -1
  131. package/components/AdminLayout.d.ts +2 -1
  132. package/components/AdminLayout.js +9 -14
  133. package/components/AdminLayout.js.map +1 -1
  134. package/components/BulkActions/Worker.d.ts +82 -0
  135. package/components/BulkActions/Worker.js +126 -0
  136. package/components/BulkActions/Worker.js.map +1 -0
  137. package/components/BulkActions/index.d.ts +2 -0
  138. package/components/BulkActions/index.js +4 -0
  139. package/components/BulkActions/index.js.map +1 -0
  140. package/components/BulkActions/useDialogWithReport/DialogMessage.d.ts +5 -0
  141. package/components/BulkActions/useDialogWithReport/DialogMessage.js +23 -0
  142. package/components/BulkActions/useDialogWithReport/DialogMessage.js.map +1 -0
  143. package/components/BulkActions/useDialogWithReport/index.d.ts +1 -0
  144. package/components/BulkActions/useDialogWithReport/index.js +3 -0
  145. package/components/BulkActions/useDialogWithReport/index.js.map +1 -0
  146. package/components/BulkActions/useDialogWithReport/useDialogWithReport.d.ts +19 -0
  147. package/components/BulkActions/useDialogWithReport/useDialogWithReport.js +51 -0
  148. package/components/BulkActions/useDialogWithReport/useDialogWithReport.js.map +1 -0
  149. package/components/Buttons/Buttons.d.ts +24 -0
  150. package/components/Buttons/Buttons.js +77 -0
  151. package/components/Buttons/Buttons.js.map +1 -0
  152. package/components/Buttons/Buttons.styles.d.ts +4 -0
  153. package/components/Buttons/Buttons.styles.js +17 -0
  154. package/components/Buttons/Buttons.styles.js.map +1 -0
  155. package/components/Buttons/index.d.ts +2 -0
  156. package/components/Buttons/index.js +4 -0
  157. package/components/Buttons/index.js.map +1 -0
  158. package/components/Buttons/useButtons.d.ts +14 -0
  159. package/components/Buttons/useButtons.js +24 -0
  160. package/components/Buttons/useButtons.js.map +1 -0
  161. package/components/DeveloperMode/DeveloperMode.d.ts +11 -0
  162. package/components/DeveloperMode/DeveloperMode.js +17 -0
  163. package/components/DeveloperMode/DeveloperMode.js.map +1 -0
  164. package/components/DeveloperMode/index.d.ts +2 -0
  165. package/components/DeveloperMode/index.js +3 -0
  166. package/components/DeveloperMode/index.js.map +1 -0
  167. package/components/Dialogs/Dialog.d.ts +21 -0
  168. package/components/Dialogs/Dialog.js +62 -0
  169. package/components/Dialogs/Dialog.js.map +1 -0
  170. package/components/Dialogs/DialogsContext.d.ts +38 -0
  171. package/components/Dialogs/DialogsContext.js +132 -0
  172. package/components/Dialogs/DialogsContext.js.map +1 -0
  173. package/components/Dialogs/useDialogs.d.ts +2 -0
  174. package/components/Dialogs/useDialogs.js +11 -0
  175. package/components/Dialogs/useDialogs.js.map +1 -0
  176. package/components/EmptyView.d.ts +4 -4
  177. package/components/EmptyView.js +30 -58
  178. package/components/EmptyView.js.map +1 -1
  179. package/components/Filters/Filters.d.ts +16 -0
  180. package/components/Filters/Filters.js +21 -0
  181. package/components/Filters/Filters.js.map +1 -0
  182. package/components/Filters/FiltersToggle.d.ts +7 -0
  183. package/components/Filters/FiltersToggle.js +26 -0
  184. package/components/Filters/FiltersToggle.js.map +1 -0
  185. package/components/Filters/index.d.ts +2 -0
  186. package/components/Filters/index.js +4 -0
  187. package/components/Filters/index.js.map +1 -0
  188. package/components/FloatingActionButton.d.ts +4 -1
  189. package/components/FloatingActionButton.js +9 -14
  190. package/components/FloatingActionButton.js.map +1 -1
  191. package/components/FloatingPanel.d.ts +13 -0
  192. package/components/FloatingPanel.js +94 -0
  193. package/components/FloatingPanel.js.map +1 -0
  194. package/components/IconPicker/IconPicker.d.ts +13 -0
  195. package/components/IconPicker/IconPicker.js +39 -0
  196. package/components/IconPicker/IconPicker.js.map +1 -0
  197. package/components/IconPicker/IconPickerComponent.d.ts +17 -0
  198. package/components/IconPicker/IconPickerComponent.js +81 -0
  199. package/components/IconPicker/IconPickerComponent.js.map +1 -0
  200. package/components/IconPicker/IconPickerPresenter.d.ts +53 -0
  201. package/components/IconPicker/IconPickerPresenter.js +77 -0
  202. package/components/IconPicker/IconPickerPresenter.js.map +1 -0
  203. package/components/IconPicker/IconPickerPresenter.test.d.ts +1 -0
  204. package/components/IconPicker/IconPickerPresenter.test.js +110 -0
  205. package/components/IconPicker/IconPickerPresenter.test.js.map +1 -0
  206. package/components/IconPicker/IconPickerPresenterProvider.d.ts +9 -0
  207. package/components/IconPicker/IconPickerPresenterProvider.js +19 -0
  208. package/components/IconPicker/IconPickerPresenterProvider.js.map +1 -0
  209. package/components/IconPicker/IconPickerTab.d.ts +33 -0
  210. package/components/IconPicker/IconPickerTab.js +159 -0
  211. package/components/IconPicker/IconPickerTab.js.map +1 -0
  212. package/components/IconPicker/IconRenderer.d.ts +34 -0
  213. package/components/IconPicker/IconRenderer.js +27 -0
  214. package/components/IconPicker/IconRenderer.js.map +1 -0
  215. package/components/IconPicker/IconRepository.d.ts +19 -0
  216. package/components/IconPicker/IconRepository.js +47 -0
  217. package/components/IconPicker/IconRepository.js.map +1 -0
  218. package/components/IconPicker/IconRepository.test.d.ts +1 -0
  219. package/components/IconPicker/IconRepository.test.js +67 -0
  220. package/components/IconPicker/IconRepository.test.js.map +1 -0
  221. package/components/IconPicker/IconRepositoryFactory.d.ts +9 -0
  222. package/components/IconPicker/IconRepositoryFactory.js +17 -0
  223. package/components/IconPicker/IconRepositoryFactory.js.map +1 -0
  224. package/components/IconPicker/Loading.d.ts +14 -0
  225. package/components/IconPicker/Loading.js +50 -0
  226. package/components/IconPicker/Loading.js.map +1 -0
  227. package/components/IconPicker/components/IconPickerCell.d.ts +12 -0
  228. package/components/IconPicker/components/IconPickerCell.js +27 -0
  229. package/components/IconPicker/components/IconPickerCell.js.map +1 -0
  230. package/components/IconPicker/components/IconPickerContent.d.ts +11 -0
  231. package/components/IconPicker/components/IconPickerContent.js +41 -0
  232. package/components/IconPicker/components/IconPickerContent.js.map +1 -0
  233. package/components/IconPicker/components/IconPickerRow.d.ts +4 -0
  234. package/components/IconPicker/components/IconPickerRow.js +14 -0
  235. package/components/IconPicker/components/IconPickerRow.js.map +1 -0
  236. package/components/IconPicker/components/IconPickerTrigger.d.ts +13 -0
  237. package/components/IconPicker/components/IconPickerTrigger.js +52 -0
  238. package/components/IconPicker/components/IconPickerTrigger.js.map +1 -0
  239. package/components/IconPicker/components/index.d.ts +4 -0
  240. package/components/IconPicker/components/index.js +6 -0
  241. package/components/IconPicker/components/index.js.map +1 -0
  242. package/components/IconPicker/config/Emojis.d.ts +2 -0
  243. package/components/IconPicker/config/Emojis.js +24 -0
  244. package/components/IconPicker/config/Emojis.js.map +1 -0
  245. package/components/IconPicker/config/FontAwesomeIcons.d.ts +2 -0
  246. package/components/IconPicker/config/FontAwesomeIcons.js +61 -0
  247. package/components/IconPicker/config/FontAwesomeIcons.js.map +1 -0
  248. package/components/IconPicker/config/IconPackProvider.d.ts +7 -0
  249. package/components/IconPicker/config/IconPackProvider.js +23 -0
  250. package/components/IconPicker/config/IconPackProvider.js.map +1 -0
  251. package/components/IconPicker/config/IconType.d.ts +32 -0
  252. package/components/IconPicker/config/IconType.js +89 -0
  253. package/components/IconPicker/config/IconType.js.map +1 -0
  254. package/components/IconPicker/config/index.d.ts +31 -0
  255. package/components/IconPicker/config/index.js +45 -0
  256. package/components/IconPicker/config/index.js.map +1 -0
  257. package/components/IconPicker/defaultIcon.d.ts +6 -0
  258. package/components/IconPicker/defaultIcon.js +8 -0
  259. package/components/IconPicker/defaultIcon.js.map +1 -0
  260. package/components/IconPicker/index.d.ts +7 -0
  261. package/components/IconPicker/index.js +8 -0
  262. package/components/IconPicker/index.js.map +1 -0
  263. package/components/IconPicker/plugins/customPlugin.d.ts +2 -0
  264. package/components/IconPicker/plugins/customPlugin.js +127 -0
  265. package/components/IconPicker/plugins/customPlugin.js.map +1 -0
  266. package/components/IconPicker/plugins/emojisPlugin.d.ts +2 -0
  267. package/components/IconPicker/plugins/emojisPlugin.js +127 -0
  268. package/components/IconPicker/plugins/emojisPlugin.js.map +1 -0
  269. package/components/IconPicker/plugins/graphql.d.ts +20 -0
  270. package/components/IconPicker/plugins/graphql.js +27 -0
  271. package/components/IconPicker/plugins/graphql.js.map +1 -0
  272. package/components/IconPicker/plugins/iconsPlugin.d.ts +2 -0
  273. package/components/IconPicker/plugins/iconsPlugin.js +115 -0
  274. package/components/IconPicker/plugins/iconsPlugin.js.map +1 -0
  275. package/components/IconPicker/types.d.ts +22 -0
  276. package/components/IconPicker/types.js +10 -0
  277. package/components/IconPicker/types.js.map +1 -0
  278. package/components/LexicalEditor/LexicalEditor.d.ts +12 -0
  279. package/components/LexicalEditor/LexicalEditor.js +40 -0
  280. package/components/LexicalEditor/LexicalEditor.js.map +1 -0
  281. package/components/LexicalEditor/LexicalLinkForm.d.ts +6 -0
  282. package/components/LexicalEditor/LexicalLinkForm.js +92 -0
  283. package/components/LexicalEditor/LexicalLinkForm.js.map +1 -0
  284. package/components/LexicalEditor/index.d.ts +3 -0
  285. package/components/LexicalEditor/index.js +5 -0
  286. package/components/LexicalEditor/index.js.map +1 -0
  287. package/components/LexicalEditor/lexicalValueWithHtml.d.ts +7 -0
  288. package/components/LexicalEditor/lexicalValueWithHtml.js +36 -0
  289. package/components/LexicalEditor/lexicalValueWithHtml.js.map +1 -0
  290. package/components/MultiImageUpload.d.ts +1 -1
  291. package/components/MultiImageUpload.js +14 -32
  292. package/components/MultiImageUpload.js.map +1 -1
  293. package/components/NavigationPrompt.d.ts +27 -0
  294. package/components/NavigationPrompt.js +39 -0
  295. package/components/NavigationPrompt.js.map +1 -0
  296. package/components/NotAuthorizedError/NotAuthorizedError.d.ts +2 -0
  297. package/components/NotAuthorizedError/NotAuthorizedError.js +20 -0
  298. package/components/NotAuthorizedError/NotAuthorizedError.js.map +1 -0
  299. package/components/NotAuthorizedError/SecureRouteError.svg +1 -0
  300. package/components/NotAuthorizedError/index.d.ts +1 -0
  301. package/components/NotAuthorizedError/index.js +3 -0
  302. package/components/NotAuthorizedError/index.js.map +1 -0
  303. package/components/OptionsMenu/OptionsMenu.d.ts +10 -0
  304. package/components/OptionsMenu/OptionsMenu.js +23 -0
  305. package/components/OptionsMenu/OptionsMenu.js.map +1 -0
  306. package/components/OptionsMenu/OptionsMenuItem.d.ts +10 -0
  307. package/components/OptionsMenu/OptionsMenuItem.js +17 -0
  308. package/components/OptionsMenu/OptionsMenuItem.js.map +1 -0
  309. package/components/OptionsMenu/OptionsMenuLink.d.ts +12 -0
  310. package/components/OptionsMenu/OptionsMenuLink.js +17 -0
  311. package/components/OptionsMenu/OptionsMenuLink.js.map +1 -0
  312. package/components/OptionsMenu/index.d.ts +4 -0
  313. package/components/OptionsMenu/index.js +6 -0
  314. package/components/OptionsMenu/index.js.map +1 -0
  315. package/components/OptionsMenu/useOptionsMenuItem.d.ts +13 -0
  316. package/components/OptionsMenu/useOptionsMenuItem.js +23 -0
  317. package/components/OptionsMenu/useOptionsMenuItem.js.map +1 -0
  318. package/components/OverlayLayout/OverlayLayout.d.ts +6 -17
  319. package/components/OverlayLayout/OverlayLayout.js +43 -154
  320. package/components/OverlayLayout/OverlayLayout.js.map +1 -1
  321. package/components/OverlayLayout/components/OverlayBackdrop.d.ts +7 -0
  322. package/components/OverlayLayout/components/OverlayBackdrop.js +15 -0
  323. package/components/OverlayLayout/components/OverlayBackdrop.js.map +1 -0
  324. package/components/OverlayLayout/components/OverlayContent.d.ts +6 -0
  325. package/components/OverlayLayout/components/OverlayContent.js +21 -0
  326. package/components/OverlayLayout/components/OverlayContent.js.map +1 -0
  327. package/components/OverlayLayout/components/OverlayHeader.d.ts +13 -0
  328. package/components/OverlayLayout/components/OverlayHeader.js +44 -0
  329. package/components/OverlayLayout/components/OverlayHeader.js.map +1 -0
  330. package/components/OverlayLayout/components/OverlayRoot.d.ts +9 -0
  331. package/components/OverlayLayout/components/OverlayRoot.js +19 -0
  332. package/components/OverlayLayout/components/OverlayRoot.js.map +1 -0
  333. package/components/OverlayLayout/components/index.d.ts +4 -0
  334. package/components/OverlayLayout/components/index.js +6 -0
  335. package/components/OverlayLayout/components/index.js.map +1 -0
  336. package/components/OverlayLayout/index.d.ts +1 -1
  337. package/components/OverlayLayout/index.js +2 -15
  338. package/components/OverlayLayout/index.js.map +1 -1
  339. package/components/Permissions/CannotUseAaclAlert.d.ts +2 -0
  340. package/components/Permissions/CannotUseAaclAlert.js +14 -0
  341. package/components/Permissions/CannotUseAaclAlert.js.map +1 -0
  342. package/components/Permissions/Permissions.d.ts +2 -4
  343. package/components/Permissions/Permissions.js +46 -50
  344. package/components/Permissions/Permissions.js.map +1 -1
  345. package/components/Permissions/PermissionsGroup.d.ts +6 -0
  346. package/components/Permissions/PermissionsGroup.js +18 -0
  347. package/components/Permissions/PermissionsGroup.js.map +1 -0
  348. package/components/Permissions/StyledComponents.d.ts +2 -3
  349. package/components/Permissions/StyledComponents.js +14 -28
  350. package/components/Permissions/StyledComponents.js.map +1 -1
  351. package/components/Permissions/index.d.ts +4 -2
  352. package/components/Permissions/index.js +5 -26
  353. package/components/Permissions/index.js.map +1 -1
  354. package/components/RegisterFeature.d.ts +11 -0
  355. package/components/RegisterFeature.js +26 -0
  356. package/components/RegisterFeature.js.map +1 -0
  357. package/components/ResizablePanels/index.d.ts +1 -0
  358. package/components/ResizablePanels/index.js +3 -0
  359. package/components/ResizablePanels/index.js.map +1 -0
  360. package/components/RoleAutocomplete/graphql.d.ts +1 -0
  361. package/components/RoleAutocomplete/graphql.js +18 -0
  362. package/components/RoleAutocomplete/graphql.js.map +1 -0
  363. package/components/RoleAutocomplete/index.d.ts +5 -0
  364. package/components/RoleAutocomplete/index.js +18 -0
  365. package/components/RoleAutocomplete/index.js.map +1 -0
  366. package/components/RolesMultiAutocomplete/graphql.d.ts +1 -0
  367. package/components/RolesMultiAutocomplete/graphql.js +23 -0
  368. package/components/RolesMultiAutocomplete/graphql.js.map +1 -0
  369. package/components/RolesMultiAutocomplete/index.d.ts +5 -0
  370. package/components/RolesMultiAutocomplete/index.js +19 -0
  371. package/components/RolesMultiAutocomplete/index.js.map +1 -0
  372. package/components/SearchUI.d.ts +2 -2
  373. package/components/SearchUI.js +24 -69
  374. package/components/SearchUI.js.map +1 -1
  375. package/components/SimpleForm/SimpleForm.d.ts +19 -8
  376. package/components/SimpleForm/SimpleForm.js +74 -70
  377. package/components/SimpleForm/SimpleForm.js.map +1 -1
  378. package/components/SimpleForm/index.d.ts +1 -1
  379. package/components/SimpleForm/index.js +2 -29
  380. package/components/SimpleForm/index.js.map +1 -1
  381. package/components/SimpleUI/InputField.d.ts +3 -3
  382. package/components/SimpleUI/InputField.js +43 -50
  383. package/components/SimpleUI/InputField.js.map +1 -1
  384. package/components/SingleImageUpload.d.ts +21 -8
  385. package/components/SingleImageUpload.js +41 -77
  386. package/components/SingleImageUpload.js.map +1 -1
  387. package/components/SplitView/SplitView.d.ts +11 -9
  388. package/components/SplitView/SplitView.js +61 -71
  389. package/components/SplitView/SplitView.js.map +1 -1
  390. package/components/SplitView/index.d.ts +1 -1
  391. package/components/SplitView/index.js +2 -23
  392. package/components/SplitView/index.js.map +1 -1
  393. package/components/StateInspector.d.ts +8 -0
  394. package/components/StateInspector.js +36 -0
  395. package/components/StateInspector.js.map +1 -0
  396. package/components/TeamAutocomplete/graphql.d.ts +1 -0
  397. package/components/TeamAutocomplete/graphql.js +18 -0
  398. package/components/TeamAutocomplete/graphql.js.map +1 -0
  399. package/components/TeamAutocomplete/index.d.ts +5 -0
  400. package/components/TeamAutocomplete/index.js +18 -0
  401. package/components/TeamAutocomplete/index.js.map +1 -0
  402. package/components/TeamsMultiAutocomplete/graphql.d.ts +1 -0
  403. package/components/TeamsMultiAutocomplete/graphql.js +23 -0
  404. package/components/TeamsMultiAutocomplete/graphql.js.map +1 -0
  405. package/components/TeamsMultiAutocomplete/index.d.ts +5 -0
  406. package/components/TeamsMultiAutocomplete/index.js +19 -0
  407. package/components/TeamsMultiAutocomplete/index.js.map +1 -0
  408. package/components/Wcp.d.ts +15 -0
  409. package/components/Wcp.js +34 -0
  410. package/components/Wcp.js.map +1 -0
  411. package/components/index.d.ts +30 -1
  412. package/components/index.js +30 -11
  413. package/components/index.js.map +1 -1
  414. package/config/AdminConfig/Dashboard.d.ts +3 -0
  415. package/config/AdminConfig/Dashboard.js +6 -0
  416. package/config/AdminConfig/Dashboard.js.map +1 -0
  417. package/config/AdminConfig/LexicalTheme/Color.d.ts +11 -0
  418. package/config/AdminConfig/LexicalTheme/Color.js +45 -0
  419. package/config/AdminConfig/LexicalTheme/Color.js.map +1 -0
  420. package/config/AdminConfig/LexicalTheme/Typography.d.ts +30 -0
  421. package/config/AdminConfig/LexicalTheme/Typography.js +79 -0
  422. package/config/AdminConfig/LexicalTheme/Typography.js.map +1 -0
  423. package/config/AdminConfig/LexicalTheme.d.ts +9 -0
  424. package/config/AdminConfig/LexicalTheme.js +8 -0
  425. package/config/AdminConfig/LexicalTheme.js.map +1 -0
  426. package/config/AdminConfig/Logo.d.ts +24 -0
  427. package/config/AdminConfig/Logo.js +21 -0
  428. package/config/AdminConfig/Logo.js.map +1 -0
  429. package/config/AdminConfig/Menu/MenuGroup.d.ts +62 -0
  430. package/config/AdminConfig/Menu/MenuGroup.js +14 -0
  431. package/config/AdminConfig/Menu/MenuGroup.js.map +1 -0
  432. package/config/AdminConfig/Menu/MenuItem.d.ts +43 -0
  433. package/config/AdminConfig/Menu/MenuItem.js +14 -0
  434. package/config/AdminConfig/Menu/MenuItem.js.map +1 -0
  435. package/config/AdminConfig/Menu/MenuLink.d.ts +43 -0
  436. package/config/AdminConfig/Menu/MenuLink.js +24 -0
  437. package/config/AdminConfig/Menu/MenuLink.js.map +1 -0
  438. package/config/AdminConfig/Menu/SupportMenu/SupportMenuItem.d.ts +43 -0
  439. package/config/AdminConfig/Menu/SupportMenu/SupportMenuItem.js +13 -0
  440. package/config/AdminConfig/Menu/SupportMenu/SupportMenuItem.js.map +1 -0
  441. package/config/AdminConfig/Menu/SupportMenu/SupportMenuLink.d.ts +24 -0
  442. package/config/AdminConfig/Menu/SupportMenu/SupportMenuLink.js +13 -0
  443. package/config/AdminConfig/Menu/SupportMenu/SupportMenuLink.js.map +1 -0
  444. package/config/AdminConfig/Menu/SupportMenu.d.ts +72 -0
  445. package/config/AdminConfig/Menu/SupportMenu.js +49 -0
  446. package/config/AdminConfig/Menu/SupportMenu.js.map +1 -0
  447. package/config/AdminConfig/Menu/UserMenu/UserMenuItem.d.ts +40 -0
  448. package/config/AdminConfig/Menu/UserMenu/UserMenuItem.js +7 -0
  449. package/config/AdminConfig/Menu/UserMenu/UserMenuItem.js.map +1 -0
  450. package/config/AdminConfig/Menu/UserMenu/UserMenuLink.d.ts +40 -0
  451. package/config/AdminConfig/Menu/UserMenu/UserMenuLink.js +7 -0
  452. package/config/AdminConfig/Menu/UserMenu/UserMenuLink.js.map +1 -0
  453. package/config/AdminConfig/Menu/UserMenu/UserMenuSeparator.d.ts +1 -0
  454. package/config/AdminConfig/Menu/UserMenu/UserMenuSeparator.js +3 -0
  455. package/config/AdminConfig/Menu/UserMenu/UserMenuSeparator.js.map +1 -0
  456. package/config/AdminConfig/Menu/UserMenu/types.d.ts +7 -0
  457. package/config/AdminConfig/Menu/UserMenu/types.js +3 -0
  458. package/config/AdminConfig/Menu/UserMenu/types.js.map +1 -0
  459. package/config/AdminConfig/Menu/UserMenu.d.ts +129 -0
  460. package/config/AdminConfig/Menu/UserMenu.js +61 -0
  461. package/config/AdminConfig/Menu/UserMenu.js.map +1 -0
  462. package/config/AdminConfig/Menu/types.d.ts +7 -0
  463. package/config/AdminConfig/Menu/types.js +3 -0
  464. package/config/AdminConfig/Menu/types.js.map +1 -0
  465. package/config/AdminConfig/Menu.d.ts +352 -0
  466. package/config/AdminConfig/Menu.js +85 -0
  467. package/config/AdminConfig/Menu.js.map +1 -0
  468. package/config/AdminConfig/Route.d.ts +3 -0
  469. package/config/AdminConfig/Route.js +8 -0
  470. package/config/AdminConfig/Route.js.map +1 -0
  471. package/config/AdminConfig/Security.d.ts +3 -0
  472. package/config/AdminConfig/Security.js +6 -0
  473. package/config/AdminConfig/Security.js.map +1 -0
  474. package/config/AdminConfig/SecurityPermissions.d.ts +17 -0
  475. package/config/AdminConfig/SecurityPermissions.js +31 -0
  476. package/config/AdminConfig/SecurityPermissions.js.map +1 -0
  477. package/config/AdminConfig/Tenant/TenantLogo.d.ts +24 -0
  478. package/config/AdminConfig/Tenant/TenantLogo.js +24 -0
  479. package/config/AdminConfig/Tenant/TenantLogo.js.map +1 -0
  480. package/config/AdminConfig/Tenant/TenantName.d.ts +23 -0
  481. package/config/AdminConfig/Tenant/TenantName.js +19 -0
  482. package/config/AdminConfig/Tenant/TenantName.js.map +1 -0
  483. package/config/AdminConfig/Tenant.d.ts +49 -0
  484. package/config/AdminConfig/Tenant.js +14 -0
  485. package/config/AdminConfig/Tenant.js.map +1 -0
  486. package/config/AdminConfig/Theme/assignColor.d.ts +2 -0
  487. package/config/AdminConfig/Theme/assignColor.js +22 -0
  488. package/config/AdminConfig/Theme/assignColor.js.map +1 -0
  489. package/config/AdminConfig/Theme/consts.d.ts +2 -0
  490. package/config/AdminConfig/Theme/consts.js +4 -0
  491. package/config/AdminConfig/Theme/consts.js.map +1 -0
  492. package/config/AdminConfig/Theme/types.d.ts +3 -0
  493. package/config/AdminConfig/Theme/types.js +3 -0
  494. package/config/AdminConfig/Theme/types.js.map +1 -0
  495. package/config/AdminConfig/Theme.d.ts +16 -0
  496. package/config/AdminConfig/Theme.js +22 -0
  497. package/config/AdminConfig/Theme.js.map +1 -0
  498. package/config/AdminConfig/Title.d.ts +23 -0
  499. package/config/AdminConfig/Title.js +16 -0
  500. package/config/AdminConfig/Title.js.map +1 -0
  501. package/config/AdminConfig/Widget.d.ts +15 -0
  502. package/config/AdminConfig/Widget.js +36 -0
  503. package/config/AdminConfig/Widget.js.map +1 -0
  504. package/config/AdminConfig.d.ts +485 -0
  505. package/config/AdminConfig.js +71 -0
  506. package/config/AdminConfig.js.map +1 -0
  507. package/config/createAdminConfig.d.ts +57 -0
  508. package/config/createAdminConfig.js +94 -0
  509. package/config/createAdminConfig.js.map +1 -0
  510. package/css/tokens.css +379 -0
  511. package/css/typography.css +70 -0
  512. package/domain/Identity.d.ts +59 -0
  513. package/domain/Identity.js +96 -0
  514. package/domain/Identity.js.map +1 -0
  515. package/errors/ErrorOverlayNetworkErrorHandler.d.ts +11 -0
  516. package/errors/ErrorOverlayNetworkErrorHandler.js +66 -0
  517. package/errors/ErrorOverlayNetworkErrorHandler.js.map +1 -0
  518. package/errors/TenantIsDisabled.d.ts +2 -0
  519. package/errors/TenantIsDisabled.js +23 -0
  520. package/errors/TenantIsDisabled.js.map +1 -0
  521. package/exports/admin/buildParams.d.ts +1 -0
  522. package/exports/admin/buildParams.js +3 -0
  523. package/exports/admin/buildParams.js.map +1 -0
  524. package/exports/admin/configs.d.ts +1 -0
  525. package/exports/admin/configs.js +3 -0
  526. package/exports/admin/configs.js.map +1 -0
  527. package/exports/admin/form.d.ts +11 -0
  528. package/exports/admin/form.js +12 -0
  529. package/exports/admin/form.js.map +1 -0
  530. package/exports/admin/security.d.ts +8 -0
  531. package/exports/admin/security.js +10 -0
  532. package/exports/admin/security.js.map +1 -0
  533. package/exports/admin/tenancy.d.ts +2 -0
  534. package/exports/admin/tenancy.js +4 -0
  535. package/exports/admin/tenancy.js.map +1 -0
  536. package/exports/admin/ui.d.ts +4 -0
  537. package/exports/admin/ui.js +6 -0
  538. package/exports/admin/ui.js.map +1 -0
  539. package/exports/admin.d.ts +6 -0
  540. package/exports/admin.js +8 -0
  541. package/exports/admin.js.map +1 -0
  542. package/features/apolloClient/abstraction.d.ts +5 -0
  543. package/features/apolloClient/abstraction.js +4 -0
  544. package/features/apolloClient/abstraction.js.map +1 -0
  545. package/features/apolloClient/feature.d.ts +2 -0
  546. package/features/apolloClient/feature.js +39 -0
  547. package/features/apolloClient/feature.js.map +1 -0
  548. package/features/buildParams/BuildParams.d.ts +9 -0
  549. package/features/buildParams/BuildParams.js +18 -0
  550. package/features/buildParams/BuildParams.js.map +1 -0
  551. package/features/buildParams/abstractions.d.ts +15 -0
  552. package/features/buildParams/abstractions.js +5 -0
  553. package/features/buildParams/abstractions.js.map +1 -0
  554. package/features/buildParams/feature.d.ts +1 -0
  555. package/features/buildParams/feature.js +10 -0
  556. package/features/buildParams/feature.js.map +1 -0
  557. package/features/buildParams/index.d.ts +2 -0
  558. package/features/buildParams/index.js +4 -0
  559. package/features/buildParams/index.js.map +1 -0
  560. package/features/security/AuthenticationContext/AuthenticationContext.d.ts +15 -0
  561. package/features/security/AuthenticationContext/AuthenticationContext.js +31 -0
  562. package/features/security/AuthenticationContext/AuthenticationContext.js.map +1 -0
  563. package/features/security/AuthenticationContext/GraphQLClientDecorator.d.ts +12 -0
  564. package/features/security/AuthenticationContext/GraphQLClientDecorator.js +30 -0
  565. package/features/security/AuthenticationContext/GraphQLClientDecorator.js.map +1 -0
  566. package/features/security/AuthenticationContext/InternalIdTokenProvider.d.ts +10 -0
  567. package/features/security/AuthenticationContext/InternalIdTokenProvider.js +17 -0
  568. package/features/security/AuthenticationContext/InternalIdTokenProvider.js.map +1 -0
  569. package/features/security/AuthenticationContext/abstractions.d.ts +26 -0
  570. package/features/security/AuthenticationContext/abstractions.js +5 -0
  571. package/features/security/AuthenticationContext/abstractions.js.map +1 -0
  572. package/features/security/AuthenticationContext/feature.d.ts +3 -0
  573. package/features/security/AuthenticationContext/feature.js +20 -0
  574. package/features/security/AuthenticationContext/feature.js.map +1 -0
  575. package/features/security/AuthenticationContext/index.d.ts +1 -0
  576. package/features/security/AuthenticationContext/index.js +3 -0
  577. package/features/security/AuthenticationContext/index.js.map +1 -0
  578. package/features/security/AuthenticationContext/types.d.ts +11 -0
  579. package/features/security/AuthenticationContext/types.js +3 -0
  580. package/features/security/AuthenticationContext/types.js.map +1 -0
  581. package/features/security/IdentityContext/IdentityContext.d.ts +13 -0
  582. package/features/security/IdentityContext/IdentityContext.js +24 -0
  583. package/features/security/IdentityContext/IdentityContext.js.map +1 -0
  584. package/features/security/IdentityContext/abstractions.d.ts +10 -0
  585. package/features/security/IdentityContext/abstractions.js +4 -0
  586. package/features/security/IdentityContext/abstractions.js.map +1 -0
  587. package/features/security/IdentityContext/feature.d.ts +3 -0
  588. package/features/security/IdentityContext/feature.js +16 -0
  589. package/features/security/IdentityContext/feature.js.map +1 -0
  590. package/features/security/IdentityContext/index.d.ts +2 -0
  591. package/features/security/IdentityContext/index.js +4 -0
  592. package/features/security/IdentityContext/index.js.map +1 -0
  593. package/features/security/LogIn/IdentityMapper.d.ts +9 -0
  594. package/features/security/LogIn/IdentityMapper.js +13 -0
  595. package/features/security/LogIn/IdentityMapper.js.map +1 -0
  596. package/features/security/LogIn/LogInGateway.d.ts +11 -0
  597. package/features/security/LogIn/LogInGateway.js +27 -0
  598. package/features/security/LogIn/LogInGateway.js.map +1 -0
  599. package/features/security/LogIn/LogInRepository.d.ts +14 -0
  600. package/features/security/LogIn/LogInRepository.js +19 -0
  601. package/features/security/LogIn/LogInRepository.js.map +1 -0
  602. package/features/security/LogIn/LogInUseCase.d.ts +15 -0
  603. package/features/security/LogIn/LogInUseCase.js +40 -0
  604. package/features/security/LogIn/LogInUseCase.js.map +1 -0
  605. package/features/security/LogIn/abstractions.d.ts +48 -0
  606. package/features/security/LogIn/abstractions.js +19 -0
  607. package/features/security/LogIn/abstractions.js.map +1 -0
  608. package/features/security/LogIn/createLoginMutation.d.ts +1 -0
  609. package/features/security/LogIn/createLoginMutation.js +49 -0
  610. package/features/security/LogIn/createLoginMutation.js.map +1 -0
  611. package/features/security/LogIn/feature.d.ts +3 -0
  612. package/features/security/LogIn/feature.js +22 -0
  613. package/features/security/LogIn/feature.js.map +1 -0
  614. package/features/security/LogIn/index.d.ts +1 -0
  615. package/features/security/LogIn/index.js +3 -0
  616. package/features/security/LogIn/index.js.map +1 -0
  617. package/features/security/LogOut/LogOutUseCase.d.ts +13 -0
  618. package/features/security/LogOut/LogOutUseCase.js +23 -0
  619. package/features/security/LogOut/LogOutUseCase.js.map +1 -0
  620. package/features/security/LogOut/abstractions.d.ts +7 -0
  621. package/features/security/LogOut/abstractions.js +4 -0
  622. package/features/security/LogOut/abstractions.js.map +1 -0
  623. package/features/security/LogOut/feature.d.ts +3 -0
  624. package/features/security/LogOut/feature.js +16 -0
  625. package/features/security/LogOut/feature.js.map +1 -0
  626. package/features/security/LogOut/index.d.ts +2 -0
  627. package/features/security/LogOut/index.js +4 -0
  628. package/features/security/LogOut/index.js.map +1 -0
  629. package/features/security/SecurityFeature.d.ts +1 -0
  630. package/features/security/SecurityFeature.js +16 -0
  631. package/features/security/SecurityFeature.js.map +1 -0
  632. package/features/telemetry/TelemetryService.d.ts +6 -0
  633. package/features/telemetry/TelemetryService.js +20 -0
  634. package/features/telemetry/TelemetryService.js.map +1 -0
  635. package/features/telemetry/abstractions.d.ts +7 -0
  636. package/features/telemetry/abstractions.js +4 -0
  637. package/features/telemetry/abstractions.js.map +1 -0
  638. package/features/telemetry/feature.d.ts +3 -0
  639. package/features/telemetry/feature.js +16 -0
  640. package/features/telemetry/feature.js.map +1 -0
  641. package/features/telemetry/index.d.ts +2 -0
  642. package/features/telemetry/index.js +4 -0
  643. package/features/telemetry/index.js.map +1 -0
  644. package/features/tenancy/GraphQLClientDecorator.d.ts +12 -0
  645. package/features/tenancy/GraphQLClientDecorator.js +27 -0
  646. package/features/tenancy/GraphQLClientDecorator.js.map +1 -0
  647. package/features/tenancy/TenantContext.d.ts +17 -0
  648. package/features/tenancy/TenantContext.js +61 -0
  649. package/features/tenancy/TenantContext.js.map +1 -0
  650. package/features/tenancy/abstractions.d.ts +14 -0
  651. package/features/tenancy/abstractions.js +4 -0
  652. package/features/tenancy/abstractions.js.map +1 -0
  653. package/features/tenancy/feature.d.ts +5 -0
  654. package/features/tenancy/feature.js +41 -0
  655. package/features/tenancy/feature.js.map +1 -0
  656. package/features/tenancy/types.d.ts +4 -0
  657. package/features/tenancy/types.js +3 -0
  658. package/features/tenancy/types.js.map +1 -0
  659. package/features/wcp/ReactLicense.d.ts +18 -0
  660. package/features/wcp/ReactLicense.js +43 -0
  661. package/features/wcp/ReactLicense.js.map +1 -0
  662. package/features/wcp/WcpGateway.d.ts +10 -0
  663. package/features/wcp/WcpGateway.js +73 -0
  664. package/features/wcp/WcpGateway.js.map +1 -0
  665. package/features/wcp/WcpService.d.ts +20 -0
  666. package/features/wcp/WcpService.js +84 -0
  667. package/features/wcp/WcpService.js.map +1 -0
  668. package/features/wcp/abstractions.d.ts +19 -0
  669. package/features/wcp/abstractions.js +5 -0
  670. package/features/wcp/abstractions.js.map +1 -0
  671. package/features/wcp/feature.d.ts +3 -0
  672. package/features/wcp/feature.js +18 -0
  673. package/features/wcp/feature.js.map +1 -0
  674. package/features/wcp/types.d.ts +21 -0
  675. package/features/wcp/types.js +3 -0
  676. package/features/wcp/types.js.map +1 -0
  677. package/hooks/index.d.ts +11 -0
  678. package/hooks/index.js +13 -0
  679. package/hooks/index.js.map +1 -0
  680. package/hooks/useConfirmationDialog.d.ts +5 -3
  681. package/hooks/useConfirmationDialog.js +28 -34
  682. package/hooks/useConfirmationDialog.js.map +1 -1
  683. package/hooks/useDialog.d.ts +21 -2
  684. package/hooks/useDialog.js +18 -22
  685. package/hooks/useDialog.js.map +1 -1
  686. package/hooks/useIsMounted.d.ts +3 -0
  687. package/hooks/useIsMounted.js +15 -0
  688. package/hooks/useIsMounted.js.map +1 -0
  689. package/hooks/useKeyHandler.d.ts +8 -0
  690. package/hooks/useKeyHandler.js +64 -0
  691. package/hooks/useKeyHandler.js.map +1 -0
  692. package/hooks/useModKey.d.ts +1 -0
  693. package/hooks/useModKey.js +29 -0
  694. package/hooks/useModKey.js.map +1 -0
  695. package/hooks/useShiftKey.d.ts +1 -0
  696. package/hooks/useShiftKey.js +33 -0
  697. package/hooks/useShiftKey.js.map +1 -0
  698. package/hooks/useSnackbar.d.ts +1 -0
  699. package/hooks/useSnackbar.js +25 -26
  700. package/hooks/useSnackbar.js.map +1 -1
  701. package/hooks/useStateIfMounted.d.ts +1 -0
  702. package/hooks/useStateIfMounted.js +16 -0
  703. package/hooks/useStateIfMounted.js.map +1 -0
  704. package/hooks/useStateWithCallback.d.ts +5 -0
  705. package/hooks/useStateWithCallback.js +18 -0
  706. package/hooks/useStateWithCallback.js.map +1 -0
  707. package/hooks/useToggler.d.ts +7 -0
  708. package/hooks/useToggler.js +15 -0
  709. package/hooks/useToggler.js.map +1 -0
  710. package/index.d.ts +34 -33
  711. package/index.js +45 -324
  712. package/index.js.map +1 -1
  713. package/lexical.css +2 -0
  714. package/package.json +65 -61
  715. package/permissions/PermissionRenderer.d.ts +6 -0
  716. package/permissions/PermissionRenderer.js +211 -0
  717. package/permissions/PermissionRenderer.js.map +1 -0
  718. package/permissions/PermissionValueContext.d.ts +11 -0
  719. package/permissions/PermissionValueContext.js +23 -0
  720. package/permissions/PermissionValueContext.js.map +1 -0
  721. package/permissions/createHasPermission.d.ts +3 -0
  722. package/permissions/createHasPermission.js +36 -0
  723. package/permissions/createHasPermission.js.map +1 -0
  724. package/permissions/createPermissionSchema.d.ts +2 -0
  725. package/permissions/createPermissionSchema.js +8 -0
  726. package/permissions/createPermissionSchema.js.map +1 -0
  727. package/permissions/index.d.ts +8 -0
  728. package/permissions/index.js +8 -0
  729. package/permissions/index.js.map +1 -0
  730. package/permissions/types.d.ts +224 -0
  731. package/permissions/types.js +3 -0
  732. package/permissions/types.js.map +1 -0
  733. package/permissions/usePermissionForm.d.ts +17 -0
  734. package/permissions/usePermissionForm.js +216 -0
  735. package/permissions/usePermissionForm.js.map +1 -0
  736. package/permissions/usePermissions.d.ts +3 -0
  737. package/permissions/usePermissions.js +179 -0
  738. package/permissions/usePermissions.js.map +1 -0
  739. package/plugins/MenuPlugin.d.ts +1 -1
  740. package/plugins/MenuPlugin.js +17 -41
  741. package/plugins/MenuPlugin.js.map +1 -1
  742. package/presentation/installation/components/SystemInstaller/SystemInstaller.d.ts +8 -0
  743. package/presentation/installation/components/SystemInstaller/SystemInstaller.js +70 -0
  744. package/presentation/installation/components/SystemInstaller/SystemInstaller.js.map +1 -0
  745. package/presentation/installation/components/SystemInstaller/SystemInstallerProvider.d.ts +2 -0
  746. package/presentation/installation/components/SystemInstaller/SystemInstallerProvider.js +17 -0
  747. package/presentation/installation/components/SystemInstaller/SystemInstallerProvider.js.map +1 -0
  748. package/presentation/installation/components/SystemInstaller/index.d.ts +1 -0
  749. package/presentation/installation/components/SystemInstaller/index.js +3 -0
  750. package/presentation/installation/components/SystemInstaller/index.js.map +1 -0
  751. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.d.ts +8 -0
  752. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.js +32 -0
  753. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.js.map +1 -0
  754. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/usePasswordValidator.d.ts +1 -0
  755. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/usePasswordValidator.js +15 -0
  756. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/usePasswordValidator.js.map +1 -0
  757. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep.d.ts +7 -0
  758. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep.js +69 -0
  759. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep.js.map +1 -0
  760. package/presentation/installation/components/SystemInstaller/steps/BasicInfoStep.d.ts +7 -0
  761. package/presentation/installation/components/SystemInstaller/steps/BasicInfoStep.js +95 -0
  762. package/presentation/installation/components/SystemInstaller/steps/BasicInfoStep.js.map +1 -0
  763. package/presentation/installation/components/SystemInstaller/steps/Center.d.ts +4 -0
  764. package/presentation/installation/components/SystemInstaller/steps/Center.js +10 -0
  765. package/presentation/installation/components/SystemInstaller/steps/Center.js.map +1 -0
  766. package/presentation/installation/components/SystemInstaller/steps/Container.d.ts +8 -0
  767. package/presentation/installation/components/SystemInstaller/steps/Container.js +28 -0
  768. package/presentation/installation/components/SystemInstaller/steps/Container.js.map +1 -0
  769. package/presentation/installation/components/SystemInstaller/steps/FinishSetup.d.ts +11 -0
  770. package/presentation/installation/components/SystemInstaller/steps/FinishSetup.js +58 -0
  771. package/presentation/installation/components/SystemInstaller/steps/FinishSetup.js.map +1 -0
  772. package/presentation/installation/components/SystemInstaller/steps/IntroductionStep.d.ts +7 -0
  773. package/presentation/installation/components/SystemInstaller/steps/IntroductionStep.js +21 -0
  774. package/presentation/installation/components/SystemInstaller/steps/IntroductionStep.js.map +1 -0
  775. package/presentation/installation/components/SystemInstaller/steps/introduction.svg +154 -0
  776. package/presentation/installation/components/SystemInstaller/steps/referralSources.d.ts +1 -0
  777. package/presentation/installation/components/SystemInstaller/steps/referralSources.js +3 -0
  778. package/presentation/installation/components/SystemInstaller/steps/referralSources.js.map +1 -0
  779. package/presentation/installation/presenters/SystemInstaller/SystemInstallerGateway.d.ts +10 -0
  780. package/presentation/installation/presenters/SystemInstaller/SystemInstallerGateway.js +63 -0
  781. package/presentation/installation/presenters/SystemInstaller/SystemInstallerGateway.js.map +1 -0
  782. package/presentation/installation/presenters/SystemInstaller/SystemInstallerPresenter.d.ts +24 -0
  783. package/presentation/installation/presenters/SystemInstaller/SystemInstallerPresenter.js +138 -0
  784. package/presentation/installation/presenters/SystemInstaller/SystemInstallerPresenter.js.map +1 -0
  785. package/presentation/installation/presenters/SystemInstaller/SystemInstallerRepository.d.ts +11 -0
  786. package/presentation/installation/presenters/SystemInstaller/SystemInstallerRepository.js +30 -0
  787. package/presentation/installation/presenters/SystemInstaller/SystemInstallerRepository.js.map +1 -0
  788. package/presentation/installation/presenters/SystemInstaller/abstractions.d.ts +59 -0
  789. package/presentation/installation/presenters/SystemInstaller/abstractions.js +6 -0
  790. package/presentation/installation/presenters/SystemInstaller/abstractions.js.map +1 -0
  791. package/presentation/installation/presenters/SystemInstaller/feature.d.ts +3 -0
  792. package/presentation/installation/presenters/SystemInstaller/feature.js +20 -0
  793. package/presentation/installation/presenters/SystemInstaller/feature.js.map +1 -0
  794. package/presentation/installation/presenters/SystemInstaller/index.d.ts +3 -0
  795. package/presentation/installation/presenters/SystemInstaller/index.js +4 -0
  796. package/presentation/installation/presenters/SystemInstaller/index.js.map +1 -0
  797. package/presentation/security/components/HasPermission.d.ts +10 -0
  798. package/presentation/security/components/HasPermission.js +31 -0
  799. package/presentation/security/components/HasPermission.js.map +1 -0
  800. package/presentation/security/components/SecureRoute.d.ts +7 -0
  801. package/presentation/security/components/SecureRoute.js +16 -0
  802. package/presentation/security/components/SecureRoute.js.map +1 -0
  803. package/presentation/security/hooks/useAuthentication.d.ts +9 -0
  804. package/presentation/security/hooks/useAuthentication.js +24 -0
  805. package/presentation/security/hooks/useAuthentication.js.map +1 -0
  806. package/presentation/security/hooks/useIdentity.d.ts +6 -0
  807. package/presentation/security/hooks/useIdentity.js +25 -0
  808. package/presentation/security/hooks/useIdentity.js.map +1 -0
  809. package/presentation/security/hooks/useSecurity.d.ts +10 -0
  810. package/presentation/security/hooks/useSecurity.js +28 -0
  811. package/presentation/security/hooks/useSecurity.js.map +1 -0
  812. package/presentation/tenancy/TenancyProvider.d.ts +6 -0
  813. package/presentation/tenancy/TenancyProvider.js +43 -0
  814. package/presentation/tenancy/TenancyProvider.js.map +1 -0
  815. package/presentation/tenancy/createTenancyProvider.d.ts +1 -0
  816. package/presentation/tenancy/createTenancyProvider.js +14 -0
  817. package/presentation/tenancy/createTenancyProvider.js.map +1 -0
  818. package/presentation/tenancy/useTenantContext.d.ts +5 -0
  819. package/presentation/tenancy/useTenantContext.js +24 -0
  820. package/presentation/tenancy/useTenantContext.js.map +1 -0
  821. package/presentation/wcp/WcpProvider.d.ts +7 -0
  822. package/presentation/wcp/WcpProvider.js +26 -0
  823. package/presentation/wcp/WcpProvider.js.map +1 -0
  824. package/presentation/wcp/useWcp.d.ts +2 -0
  825. package/presentation/wcp/useWcp.js +18 -0
  826. package/presentation/wcp/useWcp.js.map +1 -0
  827. package/routes.d.ts +6 -0
  828. package/routes.js +17 -0
  829. package/routes.js.map +1 -0
  830. package/styles.scss +7 -2
  831. package/types.d.ts +8 -92
  832. package/types.js +2 -4
  833. package/types.js.map +1 -1
  834. package/assets/images/icons.png +0 -0
  835. package/assets/images/icons_retina.png +0 -0
  836. package/assets/images/swich.png +0 -0
  837. package/base/providers/TelemetryProvider.d.ts +0 -2
  838. package/base/providers/TelemetryProvider.js +0 -31
  839. package/base/providers/TelemetryProvider.js.map +0 -1
  840. package/base/providers/ViewCompositionProvider.d.ts +0 -17
  841. package/base/providers/ViewCompositionProvider.js +0 -57
  842. package/base/providers/ViewCompositionProvider.js.map +0 -1
  843. package/base/ui/LocaleSelector.d.ts +0 -2
  844. package/base/ui/LocaleSelector.js +0 -15
  845. package/base/ui/LocaleSelector.js.map +0 -1
  846. package/base/ui/Menu.d.ts +0 -31
  847. package/base/ui/Menu.js +0 -137
  848. package/base/ui/Menu.js.map +0 -1
  849. package/base/ui/Search.d.ts +0 -19
  850. package/base/ui/Search.js +0 -63
  851. package/base/ui/Search.js.map +0 -1
  852. package/components/AppInstaller/AppInstaller.d.ts +0 -7
  853. package/components/AppInstaller/AppInstaller.js +0 -149
  854. package/components/AppInstaller/AppInstaller.js.map +0 -1
  855. package/components/AppInstaller/Sidebar.d.ts +0 -9
  856. package/components/AppInstaller/Sidebar.js +0 -155
  857. package/components/AppInstaller/Sidebar.js.map +0 -1
  858. package/components/AppInstaller/assets/sign-in-divider.svg +0 -19
  859. package/components/AppInstaller/index.d.ts +0 -2
  860. package/components/AppInstaller/index.js +0 -22
  861. package/components/AppInstaller/index.js.map +0 -1
  862. package/components/AppInstaller/styled.d.ts +0 -9
  863. package/components/AppInstaller/styled.js +0 -87
  864. package/components/AppInstaller/styled.js.map +0 -1
  865. package/components/AppInstaller/useInstaller.d.ts +0 -31
  866. package/components/AppInstaller/useInstaller.js +0 -265
  867. package/components/AppInstaller/useInstaller.js.map +0 -1
  868. package/components/FileManager/BottomInfoBar/SupportedFileTypes.d.ts +0 -6
  869. package/components/FileManager/BottomInfoBar/SupportedFileTypes.js +0 -41
  870. package/components/FileManager/BottomInfoBar/SupportedFileTypes.js.map +0 -1
  871. package/components/FileManager/BottomInfoBar/UploadStatus.d.ts +0 -6
  872. package/components/FileManager/BottomInfoBar/UploadStatus.js +0 -51
  873. package/components/FileManager/BottomInfoBar/UploadStatus.js.map +0 -1
  874. package/components/FileManager/BottomInfoBar.d.ts +0 -5
  875. package/components/FileManager/BottomInfoBar.js +0 -48
  876. package/components/FileManager/BottomInfoBar.js.map +0 -1
  877. package/components/FileManager/DropFilesHere.d.ts +0 -10
  878. package/components/FileManager/DropFilesHere.js +0 -67
  879. package/components/FileManager/DropFilesHere.js.map +0 -1
  880. package/components/FileManager/File.d.ts +0 -17
  881. package/components/FileManager/File.js +0 -142
  882. package/components/FileManager/File.js.map +0 -1
  883. package/components/FileManager/FileDetails/Name.d.ts +0 -8
  884. package/components/FileManager/FileDetails/Name.js +0 -108
  885. package/components/FileManager/FileDetails/Name.js.map +0 -1
  886. package/components/FileManager/FileDetails/Tags.d.ts +0 -10
  887. package/components/FileManager/FileDetails/Tags.js +0 -286
  888. package/components/FileManager/FileDetails/Tags.js.map +0 -1
  889. package/components/FileManager/FileDetails.d.ts +0 -24
  890. package/components/FileManager/FileDetails.js +0 -407
  891. package/components/FileManager/FileDetails.js.map +0 -1
  892. package/components/FileManager/FileManagerContext.d.ts +0 -42
  893. package/components/FileManager/FileManagerContext.js +0 -191
  894. package/components/FileManager/FileManagerContext.js.map +0 -1
  895. package/components/FileManager/FileManagerView.d.ts +0 -18
  896. package/components/FileManager/FileManagerView.js +0 -611
  897. package/components/FileManager/FileManagerView.js.map +0 -1
  898. package/components/FileManager/LeftSidebar.d.ts +0 -10
  899. package/components/FileManager/LeftSidebar.js +0 -108
  900. package/components/FileManager/LeftSidebar.js.map +0 -1
  901. package/components/FileManager/NoPermissionView.d.ts +0 -3
  902. package/components/FileManager/NoPermissionView.js +0 -74
  903. package/components/FileManager/NoPermissionView.js.map +0 -1
  904. package/components/FileManager/NoResults.d.ts +0 -3
  905. package/components/FileManager/NoResults.js +0 -22
  906. package/components/FileManager/NoResults.js.map +0 -1
  907. package/components/FileManager/getFileTypePlugin.d.ts +0 -4
  908. package/components/FileManager/getFileTypePlugin.js +0 -51
  909. package/components/FileManager/getFileTypePlugin.js.map +0 -1
  910. package/components/FileManager/getFileUploader.d.ts +0 -3
  911. package/components/FileManager/getFileUploader.js +0 -15
  912. package/components/FileManager/getFileUploader.js.map +0 -1
  913. package/components/FileManager/graphql.d.ts +0 -96
  914. package/components/FileManager/graphql.js +0 -47
  915. package/components/FileManager/graphql.js.map +0 -1
  916. package/components/FileManager/icons/content_copy-black-24px.svg +0 -1
  917. package/components/FileManager/icons/delete.svg +0 -12
  918. package/components/FileManager/icons/privacy_tip-24px.svg +0 -10
  919. package/components/FileManager/icons/round-check_box-24px.svg +0 -4
  920. package/components/FileManager/icons/round-check_box_outline_blank-24px.svg +0 -4
  921. package/components/FileManager/icons/round-cloud_download-24px.svg +0 -4
  922. package/components/FileManager/icons/round-cloud_upload-24px.svg +0 -4
  923. package/components/FileManager/icons/round-description-24px.svg +0 -4
  924. package/components/FileManager/icons/round-edit-24px.svg +0 -4
  925. package/components/FileManager/icons/round-info-24px.svg +0 -4
  926. package/components/FileManager/icons/round-label-24px.svg +0 -4
  927. package/components/FileManager/icons/round-more_vert-24px.svg +0 -4
  928. package/components/FileManager/icons/round-search-24px.svg +0 -20
  929. package/components/FileManager/outputFileSelectionError.d.ts +0 -7
  930. package/components/FileManager/outputFileSelectionError.js +0 -40
  931. package/components/FileManager/outputFileSelectionError.js.map +0 -1
  932. package/components/FileManager/types.d.ts +0 -21
  933. package/components/FileManager/types.js +0 -5
  934. package/components/FileManager/types.js.map +0 -1
  935. package/components/FileManager.d.ts +0 -67
  936. package/components/FileManager.js +0 -118
  937. package/components/FileManager.js.map +0 -1
  938. package/components/OverlayLayout/icons/close.svg +0 -13
  939. package/components/OverlayLayout/icons/navigate_before.svg +0 -16
  940. package/components/RichTextEditor/RichTextEditor.d.ts +0 -3
  941. package/components/RichTextEditor/RichTextEditor.js +0 -23
  942. package/components/RichTextEditor/RichTextEditor.js.map +0 -1
  943. package/components/RichTextEditor/index.d.ts +0 -2
  944. package/components/RichTextEditor/index.js +0 -19
  945. package/components/RichTextEditor/index.js.map +0 -1
  946. package/components/RichTextEditor/styles.scss +0 -96
  947. package/components/RichTextEditor/tools/header/index.d.ts +0 -229
  948. package/components/RichTextEditor/tools/header/index.js +0 -691
  949. package/components/RichTextEditor/tools/header/index.js.map +0 -1
  950. package/components/RichTextEditor/tools/header/styles.scss +0 -48
  951. package/components/RichTextEditor/tools/image/index.d.ts +0 -124
  952. package/components/RichTextEditor/tools/image/index.js +0 -244
  953. package/components/RichTextEditor/tools/image/index.js.map +0 -1
  954. package/components/RichTextEditor/tools/image/styles.scss +0 -90
  955. package/components/RichTextEditor/tools/image/svgs.d.ts +0 -6
  956. package/components/RichTextEditor/tools/image/svgs.js +0 -12
  957. package/components/RichTextEditor/tools/image/svgs.js.map +0 -1
  958. package/components/RichTextEditor/tools/image/tunes.d.ts +0 -57
  959. package/components/RichTextEditor/tools/image/tunes.js +0 -129
  960. package/components/RichTextEditor/tools/image/tunes.js.map +0 -1
  961. package/components/RichTextEditor/tools/image/types.d.ts +0 -29
  962. package/components/RichTextEditor/tools/image/types.js +0 -5
  963. package/components/RichTextEditor/tools/image/types.js.map +0 -1
  964. package/components/RichTextEditor/tools/image/ui.d.ts +0 -122
  965. package/components/RichTextEditor/tools/image/ui.js +0 -278
  966. package/components/RichTextEditor/tools/image/ui.js.map +0 -1
  967. package/components/RichTextEditor/tools/paragraph/index.d.ts +0 -209
  968. package/components/RichTextEditor/tools/paragraph/index.js +0 -488
  969. package/components/RichTextEditor/tools/paragraph/index.js.map +0 -1
  970. package/components/RichTextEditor/tools/paragraph/styles.scss +0 -29
  971. package/components/RichTextEditor/tools/textColor/index.d.ts +0 -64
  972. package/components/RichTextEditor/tools/textColor/index.js +0 -245
  973. package/components/RichTextEditor/tools/textColor/index.js.map +0 -1
  974. package/components/RichTextEditor/tools/textColor/styles.scss +0 -21
  975. package/components/RichTextEditor/tools/utils.d.ts +0 -19
  976. package/components/RichTextEditor/tools/utils.js +0 -31
  977. package/components/RichTextEditor/tools/utils.js.map +0 -1
  978. package/components/Routes.d.ts +0 -6
  979. package/components/Routes.js +0 -42
  980. package/components/Routes.js.map +0 -1
  981. package/plugins/FileManagerFileTypePlugin.d.ts +0 -33
  982. package/plugins/FileManagerFileTypePlugin.js +0 -48
  983. package/plugins/FileManagerFileTypePlugin.js.map +0 -1
  984. package/plugins/PermissionRendererPlugin.d.ts +0 -22
  985. package/plugins/PermissionRendererPlugin.js +0 -43
  986. package/plugins/PermissionRendererPlugin.js.map +0 -1
  987. package/plugins/fileManager/fileDefault.d.ts +0 -2
  988. package/plugins/fileManager/fileDefault.js +0 -28
  989. package/plugins/fileManager/fileDefault.js.map +0 -1
  990. package/plugins/fileManager/fileImage/DeleteAction.d.ts +0 -7
  991. package/plugins/fileManager/fileImage/DeleteAction.js +0 -59
  992. package/plugins/fileManager/fileImage/DeleteAction.js.map +0 -1
  993. package/plugins/fileManager/fileImage/EditAction.d.ts +0 -10
  994. package/plugins/fileManager/fileImage/EditAction.js +0 -143
  995. package/plugins/fileManager/fileImage/EditAction.js.map +0 -1
  996. package/plugins/fileManager/fileImage/index.d.ts +0 -2
  997. package/plugins/fileManager/fileImage/index.js +0 -38
  998. package/plugins/fileManager/fileImage/index.js.map +0 -1
  999. package/plugins/fileManager/icons/edit.svg +0 -17
  1000. package/plugins/fileManager/icons/round-description-24px.svg +0 -1
  1001. package/plugins/fileManager/index.d.ts +0 -2
  1002. package/plugins/fileManager/index.js +0 -19
  1003. package/plugins/fileManager/index.js.map +0 -1
  1004. package/plugins/globalSearch/SearchBar.d.ts +0 -15
  1005. package/plugins/globalSearch/SearchBar.js +0 -225
  1006. package/plugins/globalSearch/SearchBar.js.map +0 -1
  1007. package/plugins/globalSearch/SearchBarDropdown.d.ts +0 -23
  1008. package/plugins/globalSearch/SearchBarDropdown.js +0 -83
  1009. package/plugins/globalSearch/SearchBarDropdown.js.map +0 -1
  1010. package/plugins/globalSearch/icons/round-search-24px.svg +0 -20
  1011. package/plugins/globalSearch/index.d.ts +0 -7
  1012. package/plugins/globalSearch/index.js +0 -16
  1013. package/plugins/globalSearch/index.js.map +0 -1
  1014. package/plugins/globalSearch/styled.d.ts +0 -11
  1015. package/plugins/globalSearch/styled.js +0 -131
  1016. package/plugins/globalSearch/styled.js.map +0 -1
  1017. package/plugins/uiLayoutRenderer/index.d.ts +0 -2
  1018. package/plugins/uiLayoutRenderer/index.js +0 -61
  1019. package/plugins/uiLayoutRenderer/index.js.map +0 -1
  1020. package/styles/material-theme-assignments.scss +0 -350
  1021. package/styles/material.scss +0 -43
  1022. package/styles/theme.scss +0 -76
  1023. package/ui/UIElement.d.ts +0 -2
  1024. package/ui/UIElement.js +0 -18
  1025. package/ui/UIElement.js.map +0 -1
  1026. package/ui/UILayout.d.ts +0 -1
  1027. package/ui/UILayout.js +0 -18
  1028. package/ui/UILayout.js.map +0 -1
  1029. package/ui/UIRenderer.d.ts +0 -2
  1030. package/ui/UIRenderer.js +0 -12
  1031. package/ui/UIRenderer.js.map +0 -1
  1032. package/ui/UIView.d.ts +0 -2
  1033. package/ui/UIView.js +0 -24
  1034. package/ui/UIView.js.map +0 -1
  1035. package/ui/elements/AccordionElement.d.ts +0 -27
  1036. package/ui/elements/AccordionElement.js +0 -84
  1037. package/ui/elements/AccordionElement.js.map +0 -1
  1038. package/ui/elements/ButtonElement.d.ts +0 -24
  1039. package/ui/elements/ButtonElement.js +0 -86
  1040. package/ui/elements/ButtonElement.js.map +0 -1
  1041. package/ui/elements/ButtonGroupElement.d.ts +0 -6
  1042. package/ui/elements/ButtonGroupElement.js +0 -48
  1043. package/ui/elements/ButtonGroupElement.js.map +0 -1
  1044. package/ui/elements/GenericElement.d.ts +0 -1
  1045. package/ui/elements/GenericElement.js +0 -16
  1046. package/ui/elements/GenericElement.js.map +0 -1
  1047. package/ui/elements/LabelElement.d.ts +0 -16
  1048. package/ui/elements/LabelElement.js +0 -46
  1049. package/ui/elements/LabelElement.js.map +0 -1
  1050. package/ui/elements/NavigationMenuElement.d.ts +0 -33
  1051. package/ui/elements/NavigationMenuElement.js +0 -144
  1052. package/ui/elements/NavigationMenuElement.js.map +0 -1
  1053. package/ui/elements/PanelElement.d.ts +0 -3
  1054. package/ui/elements/PanelElement.js +0 -22
  1055. package/ui/elements/PanelElement.js.map +0 -1
  1056. package/ui/elements/PlaceholderElement.d.ts +0 -6
  1057. package/ui/elements/PlaceholderElement.js +0 -33
  1058. package/ui/elements/PlaceholderElement.js.map +0 -1
  1059. package/ui/elements/SmallButtonElement.d.ts +0 -6
  1060. package/ui/elements/SmallButtonElement.js +0 -45
  1061. package/ui/elements/SmallButtonElement.js.map +0 -1
  1062. package/ui/elements/TypographyElement.d.ts +0 -13
  1063. package/ui/elements/TypographyElement.js +0 -48
  1064. package/ui/elements/TypographyElement.js.map +0 -1
  1065. package/ui/elements/ViewElement.d.ts +0 -1
  1066. package/ui/elements/ViewElement.js +0 -16
  1067. package/ui/elements/ViewElement.js.map +0 -1
  1068. package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.d.ts +0 -6
  1069. package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.js +0 -44
  1070. package/ui/elements/form/DynamicFieldsetElement/DynamicFieldsetRowElement.js.map +0 -1
  1071. package/ui/elements/form/DynamicFieldsetElement.d.ts +0 -43
  1072. package/ui/elements/form/DynamicFieldsetElement.js +0 -135
  1073. package/ui/elements/form/DynamicFieldsetElement.js.map +0 -1
  1074. package/ui/elements/form/FileManagerElement/EmptyStateElement.d.ts +0 -4
  1075. package/ui/elements/form/FileManagerElement/EmptyStateElement.js +0 -26
  1076. package/ui/elements/form/FileManagerElement/EmptyStateElement.js.map +0 -1
  1077. package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.d.ts +0 -7
  1078. package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.js +0 -73
  1079. package/ui/elements/form/FileManagerElement/EmptyStateElementRenderer.js.map +0 -1
  1080. package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.d.ts +0 -13
  1081. package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.js +0 -104
  1082. package/ui/elements/form/FileManagerElement/FileManagerElementRenderer.js.map +0 -1
  1083. package/ui/elements/form/FileManagerElement/styled.d.ts +0 -20
  1084. package/ui/elements/form/FileManagerElement/styled.js +0 -115
  1085. package/ui/elements/form/FileManagerElement/styled.js.map +0 -1
  1086. package/ui/elements/form/FileManagerElement.d.ts +0 -24
  1087. package/ui/elements/form/FileManagerElement.js +0 -88
  1088. package/ui/elements/form/FileManagerElement.js.map +0 -1
  1089. package/ui/elements/form/FormElement.d.ts +0 -21
  1090. package/ui/elements/form/FormElement.js +0 -45
  1091. package/ui/elements/form/FormElement.js.map +0 -1
  1092. package/ui/elements/form/FormFieldElement.d.ts +0 -56
  1093. package/ui/elements/form/FormFieldElement.js +0 -173
  1094. package/ui/elements/form/FormFieldElement.js.map +0 -1
  1095. package/ui/elements/form/HiddenElement.d.ts +0 -6
  1096. package/ui/elements/form/HiddenElement.js +0 -47
  1097. package/ui/elements/form/HiddenElement.js.map +0 -1
  1098. package/ui/elements/form/InputElement.d.ts +0 -7
  1099. package/ui/elements/form/InputElement.js +0 -54
  1100. package/ui/elements/form/InputElement.js.map +0 -1
  1101. package/ui/elements/form/PasswordElement.d.ts +0 -6
  1102. package/ui/elements/form/PasswordElement.js +0 -51
  1103. package/ui/elements/form/PasswordElement.js.map +0 -1
  1104. package/ui/elements/form/README.md +0 -2
  1105. package/ui/elements/form/SelectElement.d.ts +0 -15
  1106. package/ui/elements/form/SelectElement.js +0 -69
  1107. package/ui/elements/form/SelectElement.js.map +0 -1
  1108. package/ui/elements/form/TextareaElement.d.ts +0 -15
  1109. package/ui/elements/form/TextareaElement.js +0 -55
  1110. package/ui/elements/form/TextareaElement.js.map +0 -1
  1111. package/ui/views/AdminView/ContentElement.d.ts +0 -4
  1112. package/ui/views/AdminView/ContentElement.js +0 -54
  1113. package/ui/views/AdminView/ContentElement.js.map +0 -1
  1114. package/ui/views/AdminView/HeaderElement.d.ts +0 -13
  1115. package/ui/views/AdminView/HeaderElement.js +0 -104
  1116. package/ui/views/AdminView/HeaderElement.js.map +0 -1
  1117. package/ui/views/AdminView/HeaderSectionCenterElement.d.ts +0 -6
  1118. package/ui/views/AdminView/HeaderSectionCenterElement.js +0 -42
  1119. package/ui/views/AdminView/HeaderSectionCenterElement.js.map +0 -1
  1120. package/ui/views/AdminView/HeaderSectionLeftElement.d.ts +0 -6
  1121. package/ui/views/AdminView/HeaderSectionLeftElement.js +0 -42
  1122. package/ui/views/AdminView/HeaderSectionLeftElement.js.map +0 -1
  1123. package/ui/views/AdminView/HeaderSectionRightElement.d.ts +0 -6
  1124. package/ui/views/AdminView/HeaderSectionRightElement.js +0 -42
  1125. package/ui/views/AdminView/HeaderSectionRightElement.js.map +0 -1
  1126. package/ui/views/AdminView/components/Dialog.d.ts +0 -2
  1127. package/ui/views/AdminView/components/Dialog.js +0 -46
  1128. package/ui/views/AdminView/components/Dialog.js.map +0 -1
  1129. package/ui/views/AdminView/components/Hamburger.d.ts +0 -3
  1130. package/ui/views/AdminView/components/Hamburger.js +0 -31
  1131. package/ui/views/AdminView/components/Hamburger.js.map +0 -1
  1132. package/ui/views/AdminView/components/Snackbar.d.ts +0 -3
  1133. package/ui/views/AdminView/components/Snackbar.js +0 -32
  1134. package/ui/views/AdminView/components/Snackbar.js.map +0 -1
  1135. package/ui/views/FormView/FormContainerElement.d.ts +0 -12
  1136. package/ui/views/FormView/FormContainerElement.js +0 -50
  1137. package/ui/views/FormView/FormContainerElement.js.map +0 -1
  1138. package/ui/views/FormView/FormContentElement.d.ts +0 -3
  1139. package/ui/views/FormView/FormContentElement.js +0 -22
  1140. package/ui/views/FormView/FormContentElement.js.map +0 -1
  1141. package/ui/views/FormView/FormFooterElement.d.ts +0 -6
  1142. package/ui/views/FormView/FormFooterElement.js +0 -49
  1143. package/ui/views/FormView/FormFooterElement.js.map +0 -1
  1144. package/ui/views/FormView/FormHeaderElement.d.ts +0 -14
  1145. package/ui/views/FormView/FormHeaderElement.js +0 -81
  1146. package/ui/views/FormView/FormHeaderElement.js.map +0 -1
  1147. package/ui/views/FormView.d.ts +0 -40
  1148. package/ui/views/FormView.js +0 -167
  1149. package/ui/views/FormView.js.map +0 -1
  1150. package/ui/views/OverlayView/ContentElement.d.ts +0 -6
  1151. package/ui/views/OverlayView/ContentElement.js +0 -42
  1152. package/ui/views/OverlayView/ContentElement.js.map +0 -1
  1153. package/ui/views/OverlayView/HeaderElement.d.ts +0 -24
  1154. package/ui/views/OverlayView/HeaderElement.js +0 -112
  1155. package/ui/views/OverlayView/HeaderElement.js.map +0 -1
  1156. package/ui/views/OverlayView/HeaderTitleElement.d.ts +0 -13
  1157. package/ui/views/OverlayView/HeaderTitleElement.js +0 -51
  1158. package/ui/views/OverlayView/HeaderTitleElement.js.map +0 -1
  1159. package/ui/views/OverlayView/useOverlayView.d.ts +0 -5
  1160. package/ui/views/OverlayView/useOverlayView.js +0 -44
  1161. package/ui/views/OverlayView/useOverlayView.js.map +0 -1
  1162. package/ui/views/OverlayView.d.ts +0 -29
  1163. package/ui/views/OverlayView.js +0 -165
  1164. package/ui/views/OverlayView.js.map +0 -1
  1165. package/ui/views/SplitView/SplitViewPanelElement.d.ts +0 -11
  1166. package/ui/views/SplitView/SplitViewPanelElement.js +0 -71
  1167. package/ui/views/SplitView/SplitViewPanelElement.js.map +0 -1
  1168. package/ui/views/SplitView.d.ts +0 -21
  1169. package/ui/views/SplitView.js +0 -122
  1170. package/ui/views/SplitView.js.map +0 -1
@@ -0,0 +1,216 @@
1
+ import { useMemo, useCallback } from "react";
2
+ function hasAction(entity, name) {
3
+ return entity.actions?.some(a => a.name === name) ?? false;
4
+ }
5
+
6
+ /**
7
+ * Deserialize Permission[] into form data based on the schema.
8
+ */
9
+ function deserializePermissions(schema, value) {
10
+ if (!Array.isArray(value)) {
11
+ return {
12
+ accessLevel: "no"
13
+ };
14
+ }
15
+
16
+ // Check for full access: either wildcard or the schema's fullAccess permission.
17
+ const hasFullAccess = value.some(p => p.name === "*" || p.name === schema.fullAccess.name);
18
+ if (hasFullAccess) {
19
+ return {
20
+ accessLevel: "full"
21
+ };
22
+ }
23
+
24
+ // Filter permissions that belong to this schema's prefix.
25
+ const ownPermissions = value.filter(p => p.name.startsWith(schema.prefix));
26
+ if (ownPermissions.length === 0) {
27
+ return {
28
+ accessLevel: "no"
29
+ };
30
+ }
31
+
32
+ // Custom access level — extract per-entity form fields.
33
+ const data = {
34
+ accessLevel: "custom"
35
+ };
36
+ const entities = schema.entities || [];
37
+ for (const entity of entities) {
38
+ const perm = ownPermissions.find(p => p.name === entity.permission);
39
+ if (!perm) {
40
+ continue;
41
+ }
42
+
43
+ // Access scope: "own" if perm.own === true, else "full".
44
+ if (perm.own === true) {
45
+ data[`${entity.id}AccessScope`] = "own";
46
+ } else {
47
+ data[`${entity.id}AccessScope`] = "full";
48
+ }
49
+
50
+ // Process actions.
51
+ for (const action of entity.actions ?? []) {
52
+ if (action.name === "rwd") {
53
+ data[`${entity.id}RWD`] = perm.rwd || "r";
54
+ } else if (action.name === "pw") {
55
+ data[`${entity.id}PW`] = perm.pw ? perm.pw.split("") : [];
56
+ } else {
57
+ // Custom boolean action.
58
+ data[`${entity.id}Action_${action.name}`] = perm[action.name] === true;
59
+ }
60
+ }
61
+ }
62
+ return data;
63
+ }
64
+
65
+ /**
66
+ * Serialize form data into Permission[] based on the schema.
67
+ */
68
+ function serializePermissions(schema, formData, currentValue) {
69
+ // Start by filtering out all permissions belonging to this schema's prefix.
70
+ const filtered = Array.isArray(currentValue) ? currentValue.filter(p => !p.name.startsWith(schema.prefix)) : [];
71
+ if (formData.accessLevel === "no" || !formData.accessLevel) {
72
+ return filtered;
73
+ }
74
+ if (formData.accessLevel === "full") {
75
+ return [...filtered, {
76
+ ...schema.fullAccess
77
+ }];
78
+ }
79
+ const entities = schema.entities || [];
80
+
81
+ // Custom access — build entity permissions.
82
+ // First, build a map of entity definitions by ID for dependency lookups.
83
+ const entityMap = new Map();
84
+ for (const entity of entities) {
85
+ entityMap.set(entity.id, entity);
86
+ }
87
+
88
+ // Resolve cascading "own" scopes: if a parent is "own", children must be "own" too.
89
+ const resolvedScopes = new Map();
90
+ for (const entity of entities) {
91
+ const scope = formData[`${entity.id}AccessScope`];
92
+ if (!scope || scope === "no") {
93
+ continue;
94
+ }
95
+ let resolvedScope = scope;
96
+
97
+ // If this entity depends on a parent and the parent scope is "own",
98
+ // force this entity's scope to "own" as well.
99
+ if (entity.dependsOn) {
100
+ const parentScope = resolvedScopes.get(entity.dependsOn.entity);
101
+ if (parentScope === "own") {
102
+ resolvedScope = "own";
103
+ }
104
+ }
105
+ resolvedScopes.set(entity.id, resolvedScope);
106
+ }
107
+
108
+ // Prune resolved scopes based on dependencies (must run before building permissions
109
+ // so that transitive dependencies are properly pruned).
110
+ for (const entity of entities) {
111
+ if (!entity.dependsOn || !resolvedScopes.has(entity.id)) {
112
+ continue;
113
+ }
114
+ const parentScope = resolvedScopes.get(entity.dependsOn.entity);
115
+ if (!parentScope) {
116
+ // Parent entity is not enabled — prune child.
117
+ resolvedScopes.delete(entity.id);
118
+ continue;
119
+ }
120
+ const parentEntity = entityMap.get(entity.dependsOn.entity);
121
+ if (parentEntity && hasAction(parentEntity, "rwd")) {
122
+ const parentRwd = parentScope === "own" ? "rwd" : formData[`${entity.dependsOn.entity}RWD`] || "r";
123
+ if (!parentRwd.includes(entity.dependsOn.requires)) {
124
+ // Parent doesn't have the required action — prune child.
125
+ resolvedScopes.delete(entity.id);
126
+ }
127
+ }
128
+ }
129
+
130
+ // Build permissions from the pruned resolved scopes.
131
+ const permissions = [];
132
+ for (const entity of entities) {
133
+ const scope = resolvedScopes.get(entity.id);
134
+ if (!scope) {
135
+ continue;
136
+ }
137
+ const perm = {
138
+ name: entity.permission
139
+ };
140
+ if (scope === "own") {
141
+ perm.own = true;
142
+ if (hasAction(entity, "rwd")) {
143
+ perm.rwd = "rwd";
144
+ }
145
+ } else if (hasAction(entity, "rwd")) {
146
+ perm.rwd = formData[`${entity.id}RWD`] || "r";
147
+ }
148
+
149
+ // Process non-rwd actions.
150
+ for (const action of entity.actions ?? []) {
151
+ if (action.name === "rwd") {
152
+ continue; // Already handled above.
153
+ }
154
+ if (action.name === "pw") {
155
+ const pw = formData[`${entity.id}PW`] || [];
156
+ if (pw.length > 0) {
157
+ perm.pw = pw.join("");
158
+ }
159
+ } else {
160
+ // Custom boolean action.
161
+ if (formData[`${entity.id}Action_${action.name}`]) {
162
+ perm[action.name] = true;
163
+ }
164
+ }
165
+ }
166
+ permissions.push(perm);
167
+ }
168
+ return [...filtered, ...permissions];
169
+ }
170
+
171
+ /**
172
+ * Hook that bridges a permission schema with a Form component.
173
+ *
174
+ * Handles bidirectional transformation between Permission[] and form data,
175
+ * with optional custom serialize/deserialize callbacks for app-specific needs.
176
+ */
177
+ export function usePermissionForm(schema, options) {
178
+ const {
179
+ value,
180
+ onChange
181
+ } = options;
182
+ const formData = useMemo(() => {
183
+ let data = deserializePermissions(schema, value);
184
+
185
+ // Merge custom deserialized data if provided.
186
+ if (options.deserialize) {
187
+ const extra = options.deserialize(Array.isArray(value) ? value : []);
188
+ data = {
189
+ ...data,
190
+ ...extra
191
+ };
192
+ }
193
+ return data;
194
+ }, []);
195
+ const onFormChange = useCallback(data => {
196
+ let result = serializePermissions(schema, data, value);
197
+
198
+ // Apply custom serializer if provided.
199
+ if (options.serialize) {
200
+ result = options.serialize(data, result.filter(p => p.name.startsWith(schema.prefix)));
201
+ // Re-add non-schema permissions that were filtered out.
202
+ const nonSchemaPermissions = Array.isArray(value) ? value.filter(p => !p.name.startsWith(schema.prefix)) : [];
203
+ result = [...nonSchemaPermissions, ...result];
204
+ }
205
+ onChange(result);
206
+ }, [value]);
207
+ return {
208
+ formData,
209
+ onFormChange
210
+ };
211
+ }
212
+
213
+ // Export the pure functions for unit testing.
214
+ export { deserializePermissions, serializePermissions };
215
+
216
+ //# sourceMappingURL=usePermissionForm.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useMemo","useCallback","hasAction","entity","name","actions","some","a","deserializePermissions","schema","value","Array","isArray","accessLevel","hasFullAccess","p","fullAccess","ownPermissions","filter","startsWith","prefix","length","data","entities","perm","find","permission","own","id","action","rwd","pw","split","serializePermissions","formData","currentValue","filtered","entityMap","Map","set","resolvedScopes","scope","resolvedScope","dependsOn","parentScope","get","has","delete","parentEntity","parentRwd","includes","requires","permissions","join","push","usePermissionForm","options","onChange","deserialize","extra","onFormChange","result","serialize","nonSchemaPermissions"],"sources":["usePermissionForm.ts"],"sourcesContent":["import { useMemo, useCallback } from \"react\";\nimport type {\n Permission,\n PermissionSchema,\n EntityDefinition,\n UsePermissionFormOptions,\n UsePermissionFormResult\n} from \"./types.js\";\n\nfunction hasAction(entity: EntityDefinition, name: string): boolean {\n return entity.actions?.some(a => a.name === name) ?? false;\n}\n\n/**\n * Deserialize Permission[] into form data based on the schema.\n */\nfunction deserializePermissions(\n schema: PermissionSchema,\n value: Permission[]\n): Record<string, any> {\n if (!Array.isArray(value)) {\n return { accessLevel: \"no\" };\n }\n\n // Check for full access: either wildcard or the schema's fullAccess permission.\n const hasFullAccess = value.some(p => p.name === \"*\" || p.name === schema.fullAccess.name);\n if (hasFullAccess) {\n return { accessLevel: \"full\" };\n }\n\n // Filter permissions that belong to this schema's prefix.\n const ownPermissions = value.filter(p => p.name.startsWith(schema.prefix));\n if (ownPermissions.length === 0) {\n return { accessLevel: \"no\" };\n }\n\n // Custom access level — extract per-entity form fields.\n const data: Record<string, any> = { accessLevel: \"custom\" };\n const entities = schema.entities || [];\n\n for (const entity of entities) {\n const perm = ownPermissions.find(p => p.name === entity.permission);\n if (!perm) {\n continue;\n }\n\n // Access scope: \"own\" if perm.own === true, else \"full\".\n if (perm.own === true) {\n data[`${entity.id}AccessScope`] = \"own\";\n } else {\n data[`${entity.id}AccessScope`] = \"full\";\n }\n\n // Process actions.\n for (const action of entity.actions ?? []) {\n if (action.name === \"rwd\") {\n data[`${entity.id}RWD`] = perm.rwd || \"r\";\n } else if (action.name === \"pw\") {\n data[`${entity.id}PW`] = perm.pw ? perm.pw.split(\"\") : [];\n } else {\n // Custom boolean action.\n data[`${entity.id}Action_${action.name}`] = perm[action.name] === true;\n }\n }\n }\n\n return data;\n}\n\n/**\n * Serialize form data into Permission[] based on the schema.\n */\nfunction serializePermissions(\n schema: PermissionSchema,\n formData: Record<string, any>,\n currentValue: Permission[]\n): Permission[] {\n // Start by filtering out all permissions belonging to this schema's prefix.\n const filtered = Array.isArray(currentValue)\n ? currentValue.filter(p => !p.name.startsWith(schema.prefix))\n : [];\n\n if (formData.accessLevel === \"no\" || !formData.accessLevel) {\n return filtered;\n }\n\n if (formData.accessLevel === \"full\") {\n return [...filtered, { ...schema.fullAccess }];\n }\n\n const entities = schema.entities || [];\n\n // Custom access — build entity permissions.\n // First, build a map of entity definitions by ID for dependency lookups.\n const entityMap = new Map<string, EntityDefinition>();\n for (const entity of entities) {\n entityMap.set(entity.id, entity);\n }\n\n // Resolve cascading \"own\" scopes: if a parent is \"own\", children must be \"own\" too.\n const resolvedScopes = new Map<string, string>();\n for (const entity of entities) {\n const scope = formData[`${entity.id}AccessScope`];\n if (!scope || scope === \"no\") {\n continue;\n }\n\n let resolvedScope = scope;\n\n // If this entity depends on a parent and the parent scope is \"own\",\n // force this entity's scope to \"own\" as well.\n if (entity.dependsOn) {\n const parentScope = resolvedScopes.get(entity.dependsOn.entity);\n if (parentScope === \"own\") {\n resolvedScope = \"own\";\n }\n }\n\n resolvedScopes.set(entity.id, resolvedScope);\n }\n\n // Prune resolved scopes based on dependencies (must run before building permissions\n // so that transitive dependencies are properly pruned).\n for (const entity of entities) {\n if (!entity.dependsOn || !resolvedScopes.has(entity.id)) {\n continue;\n }\n\n const parentScope = resolvedScopes.get(entity.dependsOn.entity);\n if (!parentScope) {\n // Parent entity is not enabled — prune child.\n resolvedScopes.delete(entity.id);\n continue;\n }\n\n const parentEntity = entityMap.get(entity.dependsOn.entity);\n if (parentEntity && hasAction(parentEntity, \"rwd\")) {\n const parentRwd =\n parentScope === \"own\" ? \"rwd\" : formData[`${entity.dependsOn.entity}RWD`] || \"r\";\n if (!parentRwd.includes(entity.dependsOn.requires)) {\n // Parent doesn't have the required action — prune child.\n resolvedScopes.delete(entity.id);\n }\n }\n }\n\n // Build permissions from the pruned resolved scopes.\n const permissions: Permission[] = [];\n\n for (const entity of entities) {\n const scope = resolvedScopes.get(entity.id);\n if (!scope) {\n continue;\n }\n\n const perm: Permission = {\n name: entity.permission\n };\n\n if (scope === \"own\") {\n perm.own = true;\n if (hasAction(entity, \"rwd\")) {\n perm.rwd = \"rwd\";\n }\n } else if (hasAction(entity, \"rwd\")) {\n perm.rwd = formData[`${entity.id}RWD`] || \"r\";\n }\n\n // Process non-rwd actions.\n for (const action of entity.actions ?? []) {\n if (action.name === \"rwd\") {\n continue; // Already handled above.\n }\n\n if (action.name === \"pw\") {\n const pw: string[] = formData[`${entity.id}PW`] || [];\n if (pw.length > 0) {\n perm.pw = pw.join(\"\");\n }\n } else {\n // Custom boolean action.\n if (formData[`${entity.id}Action_${action.name}`]) {\n perm[action.name] = true;\n }\n }\n }\n\n permissions.push(perm);\n }\n\n return [...filtered, ...permissions];\n}\n\n/**\n * Hook that bridges a permission schema with a Form component.\n *\n * Handles bidirectional transformation between Permission[] and form data,\n * with optional custom serialize/deserialize callbacks for app-specific needs.\n */\nexport function usePermissionForm(\n schema: PermissionSchema,\n options: UsePermissionFormOptions\n): UsePermissionFormResult {\n const { value, onChange } = options;\n\n const formData = useMemo(() => {\n let data = deserializePermissions(schema, value);\n\n // Merge custom deserialized data if provided.\n if (options.deserialize) {\n const extra = options.deserialize(Array.isArray(value) ? value : []);\n data = { ...data, ...extra };\n }\n\n return data;\n }, []);\n\n const onFormChange = useCallback(\n (data: Record<string, any>) => {\n let result = serializePermissions(schema, data, value);\n\n // Apply custom serializer if provided.\n if (options.serialize) {\n result = options.serialize(\n data,\n result.filter(p => p.name.startsWith(schema.prefix))\n );\n // Re-add non-schema permissions that were filtered out.\n const nonSchemaPermissions = Array.isArray(value)\n ? value.filter(p => !p.name.startsWith(schema.prefix))\n : [];\n result = [...nonSchemaPermissions, ...result];\n }\n\n onChange(result);\n },\n [value]\n );\n\n return { formData, onFormChange };\n}\n\n// Export the pure functions for unit testing.\nexport { deserializePermissions, serializePermissions };\n"],"mappings":"AAAA,SAASA,OAAO,EAAEC,WAAW,QAAQ,OAAO;AAS5C,SAASC,SAASA,CAACC,MAAwB,EAAEC,IAAY,EAAW;EAChE,OAAOD,MAAM,CAACE,OAAO,EAAEC,IAAI,CAACC,CAAC,IAAIA,CAAC,CAACH,IAAI,KAAKA,IAAI,CAAC,IAAI,KAAK;AAC9D;;AAEA;AACA;AACA;AACA,SAASI,sBAAsBA,CAC3BC,MAAwB,EACxBC,KAAmB,EACA;EACnB,IAAI,CAACC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,EAAE;IACvB,OAAO;MAAEG,WAAW,EAAE;IAAK,CAAC;EAChC;;EAEA;EACA,MAAMC,aAAa,GAAG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V,MAAM,CAACW,MAAM,CAAC,CACvD,CAAC;MACD;MACA,MAAM2C,oBAAoB,GAAGpD,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,GAC3CA,KAAK,CAACQ,MAAM,CAACH,CAAC,IAAI,CAACA,CAAC,CAACX,IAAI,CAACe,UAAU,CAACV,MAAM,CAACW,MAAM,CAAC,CAAC,GACpD,EAAE;MACRyC,MAAM,GAAG,CAAC,GAAGE,oBAAoB,EAAE,GAAGF,MAAM,CAAC;IACjD;IAEAJ,QAAQ,CAACI,MAAM,CAAC;EACpB,CAAC,EACD,CAACnD,KAAK,CACV,CAAC;EAED,OAAO;IAAEwB,QAAQ;IAAE0B;EAAa,CAAC;AACrC;;AAEA;AACA,SAASpD,sBAAsB,EAAEyB,oBAAoB","ignoreList":[]}
@@ -0,0 +1,3 @@
1
+ import type { PermissionSchemaConfig } from "./types.js";
2
+ import type { UsePermissionsResult } from "./types.js";
3
+ export declare function createUsePermissions<const S extends PermissionSchemaConfig>(schema: S): () => UsePermissionsResult<S>;
@@ -0,0 +1,179 @@
1
+ import { useIdentity } from "../presentation/security/hooks/useIdentity.js";
2
+ // Module-level cache: schema -> identityId -> result.
3
+ const cache = new WeakMap();
4
+ function buildEntityMap(schema) {
5
+ const map = new Map();
6
+ for (const entity of schema.entities ?? []) {
7
+ const actions = new Set();
8
+ for (const action of entity.actions ?? []) {
9
+ actions.add(action.name);
10
+ }
11
+ map.set(entity.id, {
12
+ permission: entity.permission,
13
+ actions,
14
+ hasOwn: entity.scopes.includes("own")
15
+ });
16
+ }
17
+ return map;
18
+ }
19
+ function getEntity(entityMap, entityId) {
20
+ const entity = entityMap.get(entityId);
21
+ if (!entity) {
22
+ throw new Error(`Unknown entity "${entityId}" in permission schema.`);
23
+ }
24
+ return entity;
25
+ }
26
+ function buildResult(schema, identity) {
27
+ const hasFullAccess = !!identity.getPermission(schema.fullAccess.name);
28
+ const entityMap = buildEntityMap(schema);
29
+ const canAccess = entityId => {
30
+ if (hasFullAccess) {
31
+ return true;
32
+ }
33
+ const entity = getEntity(entityMap, entityId);
34
+ const permissions = identity.getPermissions(entity.permission);
35
+ return permissions.length > 0;
36
+ };
37
+ const canRead = entityId => {
38
+ if (hasFullAccess) {
39
+ return true;
40
+ }
41
+ const entity = getEntity(entityMap, entityId);
42
+ const permissions = identity.getPermissions(entity.permission);
43
+ if (!permissions.length) {
44
+ return false;
45
+ }
46
+ return permissions.some(permission => {
47
+ if (typeof permission.rwd !== "string") {
48
+ return true;
49
+ }
50
+ return permission.rwd.includes("r");
51
+ });
52
+ };
53
+ const canCreate = entityId => {
54
+ if (hasFullAccess) {
55
+ return true;
56
+ }
57
+ const entity = getEntity(entityMap, entityId);
58
+ const permissions = identity.getPermissions(entity.permission);
59
+ if (!permissions.length) {
60
+ return false;
61
+ }
62
+ return permissions.some(permission => {
63
+ if (typeof permission.rwd !== "string") {
64
+ return true;
65
+ }
66
+ return permission.rwd.includes("w");
67
+ });
68
+ };
69
+ const canEdit = (entityId, item) => {
70
+ if (hasFullAccess) {
71
+ return true;
72
+ }
73
+ const entity = getEntity(entityMap, entityId);
74
+ const permissions = identity.getPermissions(entity.permission);
75
+ if (!permissions.length) {
76
+ return false;
77
+ }
78
+ return permissions.some(permission => {
79
+ if (permission.own) {
80
+ if (!item?.createdBy) {
81
+ return true;
82
+ }
83
+ return item.createdBy.id === identity.id;
84
+ }
85
+ if (typeof permission.rwd !== "string") {
86
+ return true;
87
+ }
88
+ return permission.rwd.includes("w");
89
+ });
90
+ };
91
+ const canDelete = (entityId, item) => {
92
+ if (hasFullAccess) {
93
+ return true;
94
+ }
95
+ const entity = getEntity(entityMap, entityId);
96
+ const permissions = identity.getPermissions(entity.permission);
97
+ if (!permissions.length) {
98
+ return false;
99
+ }
100
+ return permissions.some(permission => {
101
+ if (permission.own) {
102
+ return item?.createdBy?.id === identity.id;
103
+ }
104
+ if (typeof permission.rwd !== "string") {
105
+ return true;
106
+ }
107
+ return permission.rwd.includes("d");
108
+ });
109
+ };
110
+ const canPublish = entityId => {
111
+ if (hasFullAccess) {
112
+ return true;
113
+ }
114
+ const entity = getEntity(entityMap, entityId);
115
+ const permissions = identity.getPermissions(entity.permission);
116
+ if (!permissions.length) {
117
+ return false;
118
+ }
119
+ return permissions.some(permission => {
120
+ return permission.pw?.includes("p");
121
+ });
122
+ };
123
+ const canUnpublish = entityId => {
124
+ if (hasFullAccess) {
125
+ return true;
126
+ }
127
+ const entity = getEntity(entityMap, entityId);
128
+ const permissions = identity.getPermissions(entity.permission);
129
+ if (!permissions.length) {
130
+ return false;
131
+ }
132
+ return permissions.some(permission => {
133
+ return permission.pw?.includes("u");
134
+ });
135
+ };
136
+ const canAction = (action, entityId) => {
137
+ if (hasFullAccess) {
138
+ return true;
139
+ }
140
+ const entity = getEntity(entityMap, entityId);
141
+ const permissions = identity.getPermissions(entity.permission);
142
+ if (!permissions.length) {
143
+ return false;
144
+ }
145
+ return permissions.some(permission => {
146
+ return permission[action] === true;
147
+ });
148
+ };
149
+ return {
150
+ canAccess,
151
+ canRead,
152
+ canCreate,
153
+ canEdit,
154
+ canDelete,
155
+ canPublish,
156
+ canUnpublish,
157
+ canAction
158
+ };
159
+ }
160
+ export function createUsePermissions(schema) {
161
+ return function usePermissions() {
162
+ const {
163
+ identity
164
+ } = useIdentity();
165
+ let byIdentityId = cache.get(schema);
166
+ if (!byIdentityId) {
167
+ byIdentityId = new Map();
168
+ cache.set(schema, byIdentityId);
169
+ }
170
+ let result = byIdentityId.get(identity.id);
171
+ if (!result) {
172
+ result = buildResult(schema, identity);
173
+ byIdentityId.set(identity.id, result);
174
+ }
175
+ return result;
176
+ };
177
+ }
178
+
179
+ //# sourceMappingURL=usePermissions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useIdentity","cache","WeakMap","buildEntityMap","schema","map","Map","entity","entities","actions","Set","action","add","name","set","id","permission","hasOwn","scopes","includes","getEntity","entityMap","entityId","get","Error","buildResult","identity","hasFullAccess","getPermission","fullAccess","canAccess","permissions","getPermissions","length","canRead","some","rwd","canCreate","canEdit","item","own","createdBy","canDelete","canPublish","pw","canUnpublish","canAction","createUsePermissions","usePermissions","byIdentityId","result"],"sources":["usePermissions.ts"],"sourcesContent":["import { useIdentity } from \"~/presentation/security/hooks/useIdentity.js\";\nimport type { Identity } from \"~/domain/Identity.js\";\nimport type { PermissionSchemaConfig } from \"./types.js\";\nimport type { OwnableItem } from \"./types.js\";\nimport type { UsePermissionsResult } from \"./types.js\";\n\ninterface EntityLookup {\n permission: string;\n actions: Set<string>;\n hasOwn: boolean;\n}\n\n// Module-level cache: schema -> identityId -> result.\nconst cache = new WeakMap<PermissionSchemaConfig, Map<string, UsePermissionsResult<any>>>();\n\nfunction buildEntityMap(schema: PermissionSchemaConfig): Map<string, EntityLookup> {\n const map = new Map<string, EntityLookup>();\n for (const entity of schema.entities ?? []) {\n const actions = new Set<string>();\n for (const action of entity.actions ?? []) {\n actions.add(action.name);\n }\n map.set(entity.id, {\n permission: entity.permission,\n actions,\n hasOwn: entity.scopes.includes(\"own\")\n });\n }\n return map;\n}\n\nfunction getEntity(entityMap: Map<string, EntityLookup>, entityId: string): EntityLookup {\n const entity = entityMap.get(entityId);\n if (!entity) {\n throw new Error(`Unknown entity \"${entityId}\" in permission schema.`);\n }\n return entity;\n}\n\nfunction buildResult<S extends PermissionSchemaConfig>(\n schema: S,\n identity: Identity\n): UsePermissionsResult<S> {\n const hasFullAccess = !!identity.getPermission(schema.fullAccess.name);\n const entityMap = buildEntityMap(schema);\n\n const canAccess = (entityId: string): boolean => {\n if (hasFullAccess) {\n return true;\n }\n const entity = getEntity(entityMap, entityId);\n const permissions = identity.getPermissions(entity.permission);\n return permissions.length > 0;\n };\n\n const canRead = (entityId: string): boolean => {\n if (hasFullAccess) {\n return true;\n }\n const entity = getEntity(entityMap, entityId);\n const permissions = identity.getPermissions(entity.permission);\n if (!permissions.length) {\n return false;\n }\n return permissions.some(permission => {\n if (typeof permission.rwd !== \"string\") {\n return true;\n }\n return permission.rwd.includes(\"r\");\n });\n };\n\n const canCreate = (entityId: string): boolean => {\n if (hasFullAccess) {\n return true;\n }\n const entity = getEntity(entityMap, entityId);\n const permissions = identity.getPermissions(entity.permission);\n if (!permissions.length) {\n return false;\n }\n return permissions.some(permission => {\n if (typeof permission.rwd !== \"string\") {\n return true;\n }\n return permission.rwd.includes(\"w\");\n });\n };\n\n const canEdit = (entityId: string, item?: OwnableItem): boolean => {\n if (hasFullAccess) {\n return true;\n }\n const entity = getEntity(entityMap, entityId);\n const permissions = identity.getPermissions(entity.permission);\n if (!permissions.length) {\n return false;\n }\n return permissions.some(permission => {\n if (permission.own) {\n if (!item?.createdBy) {\n return true;\n }\n return item.createdBy.id === identity.id;\n }\n if (typeof permission.rwd !== \"string\") {\n return true;\n }\n return permission.rwd.includes(\"w\");\n });\n };\n\n const canDelete = (entityId: string, item?: OwnableItem): boolean => {\n if (hasFullAccess) {\n return true;\n }\n const entity = getEntity(entityMap, entityId);\n const permissions = identity.getPermissions(entity.permission);\n if (!permissions.length) {\n return false;\n }\n return permissions.some(permission => {\n if (permission.own) {\n return item?.createdBy?.id === identity.id;\n }\n if (typeof permission.rwd !== \"string\") {\n return true;\n }\n return permission.rwd.includes(\"d\");\n });\n };\n\n const canPublish = (entityId: string): boolean => {\n if (hasFullAccess) {\n return true;\n }\n const entity = getEntity(entityMap, entityId);\n const permissions = identity.getPermissions(entity.permission);\n if (!permissions.length) {\n return false;\n }\n return permissions.some(permission => {\n return permission.pw?.includes(\"p\");\n });\n };\n\n const canUnpublish = (entityId: string): boolean => {\n if (hasFullAccess) {\n return true;\n }\n const entity = getEntity(entityMap, entityId);\n const permissions = identity.getPermissions(entity.permission);\n if (!permissions.length) {\n return false;\n }\n return permissions.some(permission => {\n return permission.pw?.includes(\"u\");\n });\n };\n\n const canAction = (action: string, entityId: string): boolean => {\n if (hasFullAccess) {\n return true;\n }\n const entity = getEntity(entityMap, entityId);\n const permissions = identity.getPermissions(entity.permission);\n if (!permissions.length) {\n return false;\n }\n return permissions.some(permission => {\n return permission[action] === true;\n });\n };\n\n return {\n canAccess,\n canRead,\n canCreate,\n canEdit,\n canDelete,\n canPublish,\n canUnpublish,\n canAction\n } as UsePermissionsResult<S>;\n}\n\nexport function createUsePermissions<const S extends PermissionSchemaConfig>(\n schema: S\n): () => UsePermissionsResult<S> {\n return function usePermissions(): UsePermissionsResult<S> {\n const { identity } = useIdentity();\n\n let byIdentityId = cache.get(schema);\n if (!byIdentityId) {\n byIdentityId = new Map();\n cache.set(schema, byIdentityId);\n }\n\n let result = byIdentityId.get(identity.id) as UsePermissionsResult<S> | undefined;\n if (!result) {\n result = buildResult(schema, identity);\n byIdentityId.set(identity.id, result as UsePermissionsResult<any>);\n }\n\n return result;\n };\n}\n"],"mappings":"AAAA,SAASA,WAAW;AAYpB;AACA,MAAMC,KAAK,GAAG,IAAIC,OAAO,CAAiE,CAAC;AAE3F,SAASC,cAAcA,CAACC,MAA8B,EAA6B;EAC/E,MAAMC,GAAG,GAAG,IAAIC,GAAG,CAAuB,CAAC;EAC3C,KAAK,MAAMC,MAAM,IAAIH,MAAM,CAACI,QAAQ,IAAI,EAAE,EAAE;IACxC,MAAMC,OAAO,GAAG,IAAIC,GAAG,CAAS,CAAC;IACjC,KAAK,MAAMC,MAAM,IAAIJ,MAAM,CAACE,OAAO,IAAI,EAAE,EAAE;MACvCA,OAAO,CAACG,GAAG,CAACD,MAAM,CAACE,IAAI,CAAC;IAC5B;IACAR,GAAG,CAACS,GAAG,CAACP,MAAM,CAACQ,EAAE,EAAE;MACfC,UAAU,EAAET,MAAM,CAACS,UAAU;MAC7BP,OAAO;MACPQ,MAAM,EAAEV,MAAM,CAACW,MAAM,CAACC,QAAQ,CAAC,KAAK;IACxC,CAAC,CAAC;EACN;EACA,OAAOd,GAAG;AACd;AAEA,SAASe,SAASA,CAACC,SAAoC,EAAEC,QAAgB,EAAgB;EACrF,MAAMf,MAAM,GAAGc,SAAS,CAACE,GAAG,CAACD,QAAQ,CAAC;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CAACX,EAAE,CAAwC;IACjF,IAAI,CAACmC,MAAM,EAAE;MACTA,MAAM,GAAGzB,WAAW,CAACrB,MAAM,EAAEsB,QAAQ,CAAC;MACtCuB,YAAY,CAACnC,GAAG,CAACY,QAAQ,CAACX,EAAE,EAAEmC,MAAmC,CAAC;IACtE;IAEA,OAAOA,MAAM;EACjB,CAAC;AACL","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import * as React from "react";
1
+ import type * as React from "react";
2
2
  import { Plugin } from "@webiny/plugins";
3
3
  export interface MenuProps {
4
4
  name: string;
@@ -1,43 +1,19 @@
1
- "use strict";
2
-
3
- var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.MenuPlugin = void 0;
8
- var _classCallCheck2 = _interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));
9
- var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/createClass"));
10
- var _assertThisInitialized2 = _interopRequireDefault(require("@babel/runtime/helpers/assertThisInitialized"));
11
- var _inherits2 = _interopRequireDefault(require("@babel/runtime/helpers/inherits"));
12
- var _createSuper2 = _interopRequireDefault(require("@babel/runtime/helpers/createSuper"));
13
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
14
- var _plugins = require("@webiny/plugins");
15
- var MenuPlugin = /*#__PURE__*/function (_Plugin) {
16
- (0, _inherits2.default)(MenuPlugin, _Plugin);
17
- var _super = (0, _createSuper2.default)(MenuPlugin);
18
- function MenuPlugin(config) {
19
- var _this;
20
- (0, _classCallCheck2.default)(this, MenuPlugin);
21
- _this = _super.call(this);
22
- (0, _defineProperty2.default)((0, _assertThisInitialized2.default)(_this), "_config", void 0);
23
- _this._config = config || {};
24
- return _this;
1
+ import { Plugin } from "@webiny/plugins";
2
+ export class MenuPlugin extends Plugin {
3
+ static type = "admin-menu";
4
+ constructor(config) {
5
+ super();
6
+ this._config = config || {};
25
7
  }
26
- (0, _createClass2.default)(MenuPlugin, [{
27
- key: "order",
28
- get: function get() {
29
- return this._config.order;
30
- }
31
- }, {
32
- key: "render",
33
- value: function render(props) {
34
- if (!this._config.render) {
35
- return null;
36
- }
37
- return this._config.render(props);
8
+ get order() {
9
+ return this._config.order;
10
+ }
11
+ render(props) {
12
+ if (!this._config.render) {
13
+ return null;
38
14
  }
39
- }]);
40
- return MenuPlugin;
41
- }(_plugins.Plugin);
42
- exports.MenuPlugin = MenuPlugin;
43
- (0, _defineProperty2.default)(MenuPlugin, "type", "admin-menu");
15
+ return this._config.render(props);
16
+ }
17
+ }
18
+
19
+ //# sourceMappingURL=MenuPlugin.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["MenuPlugin","config","_config","order","props","render","Plugin"],"sources":["MenuPlugin.ts"],"sourcesContent":["import * as React from \"react\";\nimport { Plugin } from \"@webiny/plugins\";\n\nexport interface MenuProps {\n name: string;\n label: React.ReactNode;\n icon: React.ReactElement;\n children: React.ReactNode;\n onClick?: (toggleSection: () => void) => void;\n}\n\nexport interface SectionProps {\n label: React.ReactNode;\n children: React.ReactNode;\n icon?: React.ReactElement;\n}\n\nexport interface ItemProps {\n label: React.ReactNode;\n path: string;\n style?: React.CSSProperties;\n onClick?: () => any;\n}\n\ninterface Props {\n Menu: React.ComponentType<MenuProps>;\n Section: React.ComponentType<SectionProps>;\n Item: React.ComponentType<ItemProps>;\n}\n\ninterface Config {\n render(props: Props): React.ReactNode;\n order?: number;\n}\n\nexport class MenuPlugin extends Plugin {\n public static override readonly type: string = \"admin-menu\";\n private readonly _config: Partial<Config>;\n\n public constructor(config?: Config) {\n super();\n this._config = config || {};\n }\n\n get order() {\n return this._config.order;\n }\n\n public render(props: Props): React.ReactNode {\n if (!this._config.render) {\n return null;\n }\n return this._config.render(props);\n }\n}\n"],"mappings":";;;;;;;;;;;;;AACA;AAAyC,IAkC5BA,UAAU;EAAA;EAAA;EAInB,oBAAmBC,MAAe,EAAE;IAAA;IAAA;IAChC;IAAQ;IACR,MAAKC,OAAO,GAAGD,MAAM,IAAI,CAAC,CAAC;IAAC;EAChC;EAAC;IAAA;IAAA,KAED,eAAY;MACR,OAAO,IAAI,CAACC,OAAO,CAACC,KAAK;IAC7B;EAAC;IAAA;IAAA,OAED,gBAAcC,KAAY,EAAmB;MACzC,IAAI,CAAC,IAAI,CAACF,OAAO,CAACG,MAAM,EAAE;QACtB,OAAO,IAAI;MACf;MACA,OAAO,IAAI,CAACH,OAAO,CAACG,MAAM,CAACD,KAAK,CAAC;IACrC;EAAC;EAAA;AAAA,EAlB2BE,eAAM;AAAA;AAAA,8BAAzBN,UAAU,UAC4B,YAAY"}
1
+ {"version":3,"names":["Plugin","MenuPlugin","type","constructor","config","_config","order","render","props"],"sources":["MenuPlugin.ts"],"sourcesContent":["import type * as React from \"react\";\nimport { Plugin } from \"@webiny/plugins\";\n\nexport interface MenuProps {\n name: string;\n label: React.ReactNode;\n icon: React.ReactElement;\n children: React.ReactNode;\n onClick?: (toggleSection: () => void) => void;\n}\n\nexport interface SectionProps {\n label: React.ReactNode;\n children: React.ReactNode;\n icon?: React.ReactElement;\n}\n\nexport interface ItemProps {\n label: React.ReactNode;\n path: string;\n style?: React.CSSProperties;\n onClick?: () => any;\n}\n\ninterface Props {\n Menu: React.ComponentType<MenuProps>;\n Section: React.ComponentType<SectionProps>;\n Item: React.ComponentType<ItemProps>;\n}\n\ninterface Config {\n render(props: Props): React.ReactNode;\n order?: number;\n}\n\nexport class MenuPlugin extends Plugin {\n public static override readonly type: string = \"admin-menu\";\n private readonly _config: Partial<Config>;\n\n public constructor(config?: Config) {\n super();\n this._config = config || {};\n }\n\n get order() {\n return this._config.order;\n }\n\n public render(props: Props): React.ReactNode {\n if (!this._config.render) {\n return null;\n }\n return this._config.render(props);\n }\n}\n"],"mappings":"AACA,SAASA,MAAM,QAAQ,iBAAiB;AAkCxC,OAAO,MAAMC,UAAU,SAASD,MAAM,CAAC;EACnC,OAAgCE,IAAI,GAAW,YAAY;EAGpDC,WAAWA,CAACC,MAAe,EAAE;IAChC,KAAK,CAAC,CAAC;IACP,IAAI,CAACC,OAAO,GAAGD,MAAM,IAAI,CAAC,CAAC;EAC/B;EAEA,IAAIE,KAAKA,CAAA,EAAG;IACR,OAAO,IAAI,CAACD,OAAO,CAACC,KAAK;EAC7B;EAEOC,MAAMA,CAACC,KAAY,EAAmB;IACzC,IAAI,CAAC,IAAI,CAACH,OAAO,CAACE,MAAM,EAAE;MACtB,OAAO,IAAI;IACf;IACA,OAAO,IAAI,CAACF,OAAO,CAACE,MAAM,CAACC,KAAK,CAAC;EACrC;AACJ","ignoreList":[]}
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ interface SystemInstallerProps {
3
+ children: React.ReactNode;
4
+ }
5
+ export declare const SystemInstaller: (({ children }: SystemInstallerProps) => React.JSX.Element) & {
6
+ displayName: string;
7
+ };
8
+ export {};
@@ -0,0 +1,70 @@
1
+ import React from "react";
2
+ import { observer } from "mobx-react-lite";
3
+ import { useFeature } from "@webiny/app";
4
+ import { OverlayLoader, ProgressItemState, SteppedProgress, Text } from "@webiny/admin-ui";
5
+ import { SystemInstallerFeature } from "../../presenters/SystemInstaller/feature.js";
6
+ import { LoginScreen } from "../../../../base/ui/LoginScreen.js";
7
+ import { Tags } from "../../../../base/ui/Tags.js";
8
+ import { Logo } from "../../../../base/ui/Logo.js";
9
+ import { IntroductionStep } from "./steps/IntroductionStep.js";
10
+ import { BasicInfoStep } from "./steps/BasicInfoStep.js";
11
+ import { AdminUserStep } from "./steps/AdminUserStep.js";
12
+ import { FinishSetupStep } from "./steps/FinishSetup.js";
13
+ const stateMap = {
14
+ idle: ProgressItemState.IDLE,
15
+ current: ProgressItemState.IN_PROGRESS,
16
+ completed: ProgressItemState.COMPLETED_AFFIRMATIVE
17
+ };
18
+ export const SystemInstaller = observer(({
19
+ children
20
+ }) => {
21
+ const {
22
+ presenter
23
+ } = useFeature(SystemInstallerFeature);
24
+ const vm = presenter.vm;
25
+ if (vm.loading) {
26
+ return /*#__PURE__*/React.createElement(OverlayLoader, {
27
+ text: "Preparing system..."
28
+ });
29
+ }
30
+ if (vm.startUsing) {
31
+ return /*#__PURE__*/React.createElement(LoginScreen, null, children);
32
+ }
33
+ return /*#__PURE__*/React.createElement(Tags, {
34
+ tags: {
35
+ installer: true
36
+ }
37
+ }, /*#__PURE__*/React.createElement("div", {
38
+ className: "bg-neutral-light h-screen w-[312px] p-xl"
39
+ }, /*#__PURE__*/React.createElement("div", {
40
+ className: "w-[240px] p-"
41
+ }, /*#__PURE__*/React.createElement("div", {
42
+ className: "mb-lg"
43
+ }, /*#__PURE__*/React.createElement(Logo, null)), /*#__PURE__*/React.createElement(Text, {
44
+ as: "div",
45
+ size: "md",
46
+ className: "text-neutral-strong mb-lg"
47
+ }, "Follow these steps to create your very first Webiny project:"), /*#__PURE__*/React.createElement(SteppedProgress, {
48
+ items: vm.steps.map(step => ({
49
+ id: step.name,
50
+ label: step.label,
51
+ state: stateMap[step.state]
52
+ }))
53
+ }))), /*#__PURE__*/React.createElement("div", {
54
+ className: "flex h-screen w-full justify-center"
55
+ }, vm.currentStep === "introduction" ? /*#__PURE__*/React.createElement(IntroductionStep, {
56
+ nextStep: presenter.nextStep
57
+ }) : null, vm.currentStep === "basic-info" ? /*#__PURE__*/React.createElement(BasicInfoStep, {
58
+ nextStep: presenter.nextStep
59
+ }) : null, vm.currentStep === "admin-account" ? /*#__PURE__*/React.createElement(AdminUserStep, {
60
+ nextStep: presenter.nextStep
61
+ }) : null, vm.currentStep === "finish" ? /*#__PURE__*/React.createElement(FinishSetupStep, {
62
+ error: vm.error,
63
+ installing: vm.installing,
64
+ isInstalled: vm.isInstalled,
65
+ finishInstallation: presenter.finishInstallation,
66
+ installSystem: presenter.installSystem
67
+ }) : null));
68
+ });
69
+
70
+ //# sourceMappingURL=SystemInstaller.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","observer","useFeature","OverlayLoader","ProgressItemState","SteppedProgress","Text","SystemInstallerFeature","LoginScreen","Tags","Logo","IntroductionStep","BasicInfoStep","AdminUserStep","FinishSetupStep","stateMap","idle","IDLE","current","IN_PROGRESS","completed","COMPLETED_AFFIRMATIVE","SystemInstaller","children","presenter","vm","loading","createElement","text","startUsing","tags","installer","className","as","size","items","steps","map","step","id","name","label","state","currentStep","nextStep","error","installing","isInstalled","finishInstallation","installSystem"],"sources":["SystemInstaller.tsx"],"sourcesContent":["import React from \"react\";\nimport { observer } from \"mobx-react-lite\";\nimport { useFeature } from \"@webiny/app\";\nimport { OverlayLoader, ProgressItemState, SteppedProgress, Text } from \"@webiny/admin-ui\";\nimport { SystemInstallerFeature } from \"~/presentation/installation/presenters/SystemInstaller/feature.js\";\nimport { LoginScreen } from \"~/base/ui/LoginScreen.js\";\nimport { Tags } from \"~/base/ui/Tags.js\";\nimport { Logo } from \"~/base/ui/Logo.js\";\nimport { IntroductionStep } from \"./steps/IntroductionStep.js\";\nimport { BasicInfoStep } from \"./steps/BasicInfoStep.js\";\nimport { AdminUserStep } from \"./steps/AdminUserStep.js\";\nimport { FinishSetupStep } from \"~/presentation/installation/components/SystemInstaller/steps/FinishSetup.js\";\n\ninterface SystemInstallerProps {\n children: React.ReactNode;\n}\n\nconst stateMap = {\n idle: ProgressItemState.IDLE,\n current: ProgressItemState.IN_PROGRESS,\n completed: ProgressItemState.COMPLETED_AFFIRMATIVE\n};\n\nexport const SystemInstaller = observer(({ children }: SystemInstallerProps) => {\n const { presenter } = useFeature(SystemInstallerFeature);\n\n const vm = presenter.vm;\n\n if (vm.loading) {\n return <OverlayLoader text={\"Preparing system...\"} />;\n }\n\n if (vm.startUsing) {\n return <LoginScreen>{children}</LoginScreen>;\n }\n\n return (\n <Tags tags={{ installer: true }}>\n <div className={\"bg-neutral-light h-screen w-[312px] p-xl\"}>\n <div className={\"w-[240px] p-\"}>\n <div className={\"mb-lg\"}>\n <Logo />\n </div>\n <Text as=\"div\" size={\"md\"} className={\"text-neutral-strong mb-lg\"}>\n Follow these steps to create your very first Webiny project:\n </Text>\n <SteppedProgress\n items={vm.steps.map(step => ({\n id: step.name,\n label: step.label,\n state: stateMap[step.state]\n }))}\n />\n </div>\n </div>\n <div className={\"flex h-screen w-full justify-center\"}>\n {vm.currentStep === \"introduction\" ? (\n <IntroductionStep nextStep={presenter.nextStep} />\n ) : null}\n {vm.currentStep === \"basic-info\" ? (\n <BasicInfoStep nextStep={presenter.nextStep} />\n ) : null}\n {vm.currentStep === \"admin-account\" ? (\n <AdminUserStep nextStep={presenter.nextStep} />\n ) : null}\n {vm.currentStep === \"finish\" ? (\n <FinishSetupStep\n error={vm.error}\n installing={vm.installing}\n isInstalled={vm.isInstalled}\n finishInstallation={presenter.finishInstallation}\n installSystem={presenter.installSystem}\n />\n ) : null}\n </div>\n </Tags>\n );\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,iBAAiB;AAC1C,SAASC,UAAU,QAAQ,aAAa;AACxC,SAASC,aAAa,EAAEC,iBAAiB,EAAEC,eAAe,EAAEC,IAAI,QAAQ,kBAAkB;AAC1F,SAASC,sBAAsB;AAC/B,SAASC,WAAW;AACpB,SAASC,IAAI;AACb,SAASC,IAAI;AACb,SAASC,gBAAgB;AACzB,SAASC,aAAa;AACtB,SAASC,aAAa;AACtB,SAASC,eAAe;AAMxB,MAAMC,QAAQ,GAAG;EACbC,IAAI,EAAEZ,iBAAiB,CAACa,IAAI;EAC5BC,OAAO,EAAEd,iBAAiB,CAACe,WAAW;EACtCC,SAAS,EAAEhB,iBAAiB,CAACiB;AACjC,CAAC;AAED,OAAO,MAAMC,eAAe,GAAGrB,QAAQ,CAAC,CAAC;EAAEsB;AAA+B,CAAC,KAAK;EAC5E,MAAM;IAAEC;EAAU,CAAC,GAAGtB,UAAU,CAACK,sBAAsB,CAAC;EAExD,MAAMkB,EAAE,GAAGD,SAAS,CAACC,EAAE;EAEvB,IAAIA,EAAE,CAACC,OAAO,EAAE;IACZ,oB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AAa;IAACgC,QAAQ,EAAEpB,SAAS,CAACoB;EAAS,CAAE,CAAC,GAC/C,IAAI,EACPnB,EAAE,CAACkB,WAAW,KAAK,eAAe,gBAC/B3C,KAAA,CAAA2B,aAAA,CAACd,aAAa;IAAC+B,QAAQ,EAAEpB,SAAS,CAACoB;EAAS,CAAE,CAAC,GAC/C,IAAI,EACPnB,EAAE,CAACkB,WAAW,KAAK,QAAQ,gBACxB3C,KAAA,CAAA2B,aAAA,CAACb,eAAe;IACZ+B,KAAK,EAAEpB,EAAE,CAACoB,KAAM;IAChBC,UAAU,EAAErB,EAAE,CAACqB,UAAW;IAC1BC,WAAW,EAAEtB,EAAE,CAACsB,WAAY;IAC5BC,kBAAkB,EAAExB,SAAS,CAACwB,kBAAmB;IACjDC,aAAa,EAAEzB,SAAS,CAACyB;EAAc,CAC1C,CAAC,GACF,IACH,CACH,CAAC;AAEf,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ import React from "react";
2
+ export declare const SystemInstallerProvider: () => React.JSX.Element;