@webiny/app-admin 6.6.0-alpha.0 → 6.6.0-alpha.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (912) hide show
  1. package/base/Admin.js +34 -2
  2. package/base/Admin.js.map +1 -1
  3. package/base/Base/DefaultFieldRenderers.js +21 -2
  4. package/base/Base/DefaultFieldRenderers.js.map +1 -1
  5. package/base/Base/FieldRenderers/AutoCompleteRenderer.d.ts +13 -0
  6. package/base/Base/FieldRenderers/AutoCompleteRenderer.js +30 -0
  7. package/base/Base/FieldRenderers/AutoCompleteRenderer.js.map +1 -0
  8. package/base/Base/FieldRenderers/BirthdayInputRenderer.d.ts +21 -0
  9. package/base/Base/FieldRenderers/BirthdayInputRenderer.js +39 -0
  10. package/base/Base/FieldRenderers/BirthdayInputRenderer.js.map +1 -0
  11. package/base/Base/FieldRenderers/BirthdayInputRenderer.test.d.ts +1 -0
  12. package/base/Base/FieldRenderers/BirthdayInputRenderer.test.js +123 -0
  13. package/base/Base/FieldRenderers/BirthdayInputRenderer.test.js.map +1 -0
  14. package/base/Base/FieldRenderers/HorizontalTabsRenderer.d.ts +2 -2
  15. package/base/Base/FieldRenderers/LexicalRenderer.js +10 -6
  16. package/base/Base/FieldRenderers/LexicalRenderer.js.map +1 -1
  17. package/base/Base/FieldRenderers/MultiFilePickerRenderer.js +8 -5
  18. package/base/Base/FieldRenderers/MultiFilePickerRenderer.js.map +1 -1
  19. package/base/Base/FieldRenderers/MultiSelectRenderer.d.ts +15 -0
  20. package/base/Base/FieldRenderers/MultiSelectRenderer.js +31 -0
  21. package/base/Base/FieldRenderers/MultiSelectRenderer.js.map +1 -0
  22. package/base/Base/FieldRenderers/ObjectRenderer/DynamicZoneRenderer.d.ts +2 -0
  23. package/base/Base/FieldRenderers/ObjectRenderer/DynamicZoneRenderer.js +5 -2
  24. package/base/Base/FieldRenderers/ObjectRenderer/DynamicZoneRenderer.js.map +1 -1
  25. package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/MultiValueDynamicZone.d.ts +11 -0
  26. package/base/Base/FieldRenderers/ObjectRenderer/{MultiValueDynamicZone.js → MultiValueDynamicZone/MultiValueDynamicZone.js} +83 -15
  27. package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/MultiValueDynamicZone.js.map +1 -0
  28. package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/MultiValueDynamicZonePresenter.d.ts +13 -0
  29. package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/MultiValueDynamicZonePresenter.js +28 -0
  30. package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/MultiValueDynamicZonePresenter.js.map +1 -0
  31. package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/abstractions.d.ts +15 -0
  32. package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/abstractions.js +5 -0
  33. package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/abstractions.js.map +1 -0
  34. package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/feature.d.ts +1 -0
  35. package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/feature.js +11 -0
  36. package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/feature.js.map +1 -0
  37. package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/index.d.ts +2 -0
  38. package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/index.js +2 -0
  39. package/base/Base/FieldRenderers/ObjectRenderer/ObjectAccordionMultipleRenderer.d.ts +1 -1
  40. package/base/Base/FieldRenderers/ObjectRenderer/ObjectAccordionMultipleRenderer.js +29 -4
  41. package/base/Base/FieldRenderers/ObjectRenderer/ObjectAccordionMultipleRenderer.js.map +1 -1
  42. package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.d.ts +12 -8
  43. package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.js +48 -8
  44. package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.js.map +1 -1
  45. package/base/Base/FieldRenderers/ObjectRenderer/ObjectRenderer.js +16 -25
  46. package/base/Base/FieldRenderers/ObjectRenderer/ObjectRenderer.js.map +1 -1
  47. package/base/Base/FieldRenderers/ObjectRenderer/SingleValueDynamicZone.d.ts +3 -2
  48. package/base/Base/FieldRenderers/ObjectRenderer/SingleValueDynamicZone.js +29 -8
  49. package/base/Base/FieldRenderers/ObjectRenderer/SingleValueDynamicZone.js.map +1 -1
  50. package/base/Base/FieldRenderers/ObjectRenderer/{TemplatePicker.d.ts → TemplatePicker/AddTemplateButton.d.ts} +1 -1
  51. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/AddTemplateButton.js +24 -0
  52. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/AddTemplateButton.js.map +1 -0
  53. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/SelectableTemplate.d.ts +13 -0
  54. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/SelectableTemplate.js +21 -0
  55. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/SelectableTemplate.js.map +1 -0
  56. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateCard.d.ts +3 -0
  57. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateCard.js +35 -0
  58. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateCard.js.map +1 -0
  59. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateGallery.d.ts +8 -0
  60. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateGallery.js +22 -0
  61. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateGallery.js.map +1 -0
  62. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateGalleryToolbar.d.ts +10 -0
  63. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateGalleryToolbar.js +52 -0
  64. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateGalleryToolbar.js.map +1 -0
  65. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateIcon.d.ts +8 -0
  66. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateIcon.js +16 -0
  67. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateIcon.js.map +1 -0
  68. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateList.d.ts +10 -0
  69. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateList.js +22 -0
  70. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateList.js.map +1 -0
  71. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateListItem.d.ts +3 -0
  72. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateListItem.js +35 -0
  73. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateListItem.js.map +1 -0
  74. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/index.d.ts +1 -0
  75. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/index.js +1 -0
  76. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/types.d.ts +6 -0
  77. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/types.js +0 -0
  78. package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.d.ts +8 -3
  79. package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.js +25 -17
  80. package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.js.map +1 -1
  81. package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.test.d.ts +1 -0
  82. package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.test.js +106 -0
  83. package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.test.js.map +1 -0
  84. package/base/Base/FieldRenderers/RadioButtonsRenderer.js +3 -2
  85. package/base/Base/FieldRenderers/RadioButtonsRenderer.js.map +1 -1
  86. package/base/Base/FieldRenderers/SelectRenderer.d.ts +6 -0
  87. package/base/Base/FieldRenderers/SelectRenderer.js +4 -2
  88. package/base/Base/FieldRenderers/SelectRenderer.js.map +1 -1
  89. package/base/Base/FieldRenderers/VerticalTabsRenderer.d.ts +2 -2
  90. package/base/Base/Menus.js +4 -4
  91. package/base/Base/Menus.js.map +1 -1
  92. package/base/Base.js +2 -1
  93. package/base/Base.js.map +1 -1
  94. package/base/createRootContainer.js +8 -2
  95. package/base/createRootContainer.js.map +1 -1
  96. package/base/resolveApiUrl.d.ts +10 -0
  97. package/base/resolveApiUrl.js +11 -3
  98. package/base/resolveApiUrl.js.map +1 -1
  99. package/base/ui/AssumedPermissionsSelector.d.ts +47 -0
  100. package/base/ui/AssumedPermissionsSelector.js +7 -0
  101. package/base/ui/AssumedPermissionsSelector.js.map +1 -0
  102. package/base/ui/DebuggerIndicator.d.ts +23 -0
  103. package/base/ui/DebuggerIndicator.js +5 -0
  104. package/base/ui/DebuggerIndicator.js.map +1 -0
  105. package/base/ui/Layout.d.ts +20 -0
  106. package/base/ui/Layout.js +2 -1
  107. package/base/ui/Layout.js.map +1 -1
  108. package/components/DeveloperMode/DeveloperMode.d.ts +1 -3
  109. package/components/DeveloperMode/DeveloperMode.js.map +1 -1
  110. package/components/Drawers/DrawerParamsContext.d.ts +6 -0
  111. package/components/Drawers/DrawerParamsContext.js +10 -0
  112. package/components/Drawers/DrawerParamsContext.js.map +1 -0
  113. package/components/Drawers/DrawersContext.d.ts +13 -0
  114. package/components/Drawers/DrawersContext.js +50 -0
  115. package/components/Drawers/DrawersContext.js.map +1 -0
  116. package/components/Drawers/useDrawers.d.ts +2 -0
  117. package/components/Drawers/useDrawers.js +10 -0
  118. package/components/Drawers/useDrawers.js.map +1 -0
  119. package/components/Filters/Filters.js +10 -3
  120. package/components/Filters/Filters.js.map +1 -1
  121. package/components/IconPicker/IconPickerComponent.d.ts +2 -2
  122. package/components/IconPicker/IconPickerComponent.js +1 -1
  123. package/components/IconPicker/IconPickerComponent.js.map +1 -1
  124. package/components/LexicalEditor/LexicalLinkForm.js +3 -0
  125. package/components/LexicalEditor/LexicalLinkForm.js.map +1 -1
  126. package/components/ListView/ListViewBulkActions.d.ts +2 -2
  127. package/components/ListView/ListViewContent.d.ts +2 -2
  128. package/components/ListView/ListViewFilters.d.ts +2 -2
  129. package/components/ListView/index.d.ts +6 -6
  130. package/components/OverlayLayout/OverlayLayout.js +4 -2
  131. package/components/OverlayLayout/OverlayLayout.js.map +1 -1
  132. package/components/OverlayLayout/components/OverlayContent.js +1 -0
  133. package/components/OverlayLayout/components/OverlayContent.js.map +1 -1
  134. package/components/RolesMultiAutocomplete/index.d.ts +4 -2
  135. package/components/SplitView/SplitView.d.ts +2 -2
  136. package/components/SplitView/SplitView.js +8 -8
  137. package/components/SplitView/SplitView.js.map +1 -1
  138. package/components/Table/components/Table/TableInner.d.ts +2 -2
  139. package/components/TeamAutocomplete/index.d.ts +4 -2
  140. package/components/TeamsMultiAutocomplete/index.d.ts +4 -2
  141. package/components/index.d.ts +0 -1
  142. package/components/index.js +0 -1
  143. package/config/AdminConfig/Breadcrumbs.d.ts +42 -0
  144. package/config/AdminConfig/Breadcrumbs.js +24 -0
  145. package/config/AdminConfig/Breadcrumbs.js.map +1 -0
  146. package/config/AdminConfig/Drawer.d.ts +10 -0
  147. package/config/AdminConfig/Drawer.js +19 -0
  148. package/config/AdminConfig/Drawer.js.map +1 -0
  149. package/config/AdminConfig/LexicalTheme/AllowCustomColors.d.ts +5 -0
  150. package/config/AdminConfig/LexicalTheme/AllowCustomColors.js +18 -0
  151. package/config/AdminConfig/LexicalTheme/AllowCustomColors.js.map +1 -0
  152. package/config/AdminConfig/LexicalTheme.d.ts +2 -0
  153. package/config/AdminConfig/LexicalTheme.js +2 -0
  154. package/config/AdminConfig/LexicalTheme.js.map +1 -1
  155. package/config/AdminConfig/Widget.d.ts +9 -1
  156. package/config/AdminConfig/Widget.js +6 -2
  157. package/config/AdminConfig/Widget.js.map +1 -1
  158. package/config/AdminConfig.d.ts +8 -0
  159. package/config/AdminConfig.js +8 -1
  160. package/config/AdminConfig.js.map +1 -1
  161. package/domain/Identity.js +1 -1
  162. package/domain/Identity.js.map +1 -1
  163. package/exports/admin/ui.d.ts +4 -0
  164. package/exports/admin/ui.js +4 -1
  165. package/exports/admin.d.ts +7 -0
  166. package/exports/admin.js +5 -0
  167. package/features/accessManagement/types.d.ts +3 -3
  168. package/features/adminAssistant/AdminAssistantGateway.d.ts +30 -0
  169. package/features/adminAssistant/AdminAssistantGateway.js +41 -0
  170. package/features/adminAssistant/AdminAssistantGateway.js.map +1 -0
  171. package/features/adminAssistant/AdminAssistantPresenter.d.ts +60 -0
  172. package/features/adminAssistant/AdminAssistantPresenter.js +377 -0
  173. package/features/adminAssistant/AdminAssistantPresenter.js.map +1 -0
  174. package/features/adminAssistant/abstractions.d.ts +176 -0
  175. package/features/adminAssistant/abstractions.js +6 -0
  176. package/features/adminAssistant/abstractions.js.map +1 -0
  177. package/features/adminAssistant/feature.d.ts +3 -0
  178. package/features/adminAssistant/feature.js +19 -0
  179. package/features/adminAssistant/feature.js.map +1 -0
  180. package/features/adminAssistant/index.d.ts +6 -0
  181. package/features/adminAssistant/index.js +3 -0
  182. package/features/adminAssistant/turnsFromMessages.d.ts +15 -0
  183. package/features/adminAssistant/turnsFromMessages.js +77 -0
  184. package/features/adminAssistant/turnsFromMessages.js.map +1 -0
  185. package/features/adminUsers/account/getCurrentUser/GetCurrentUserGateway.d.ts +11 -0
  186. package/features/adminUsers/account/getCurrentUser/GetCurrentUserGateway.js +44 -0
  187. package/features/adminUsers/account/getCurrentUser/GetCurrentUserGateway.js.map +1 -0
  188. package/features/adminUsers/account/getCurrentUser/GetCurrentUserUseCase.d.ts +10 -0
  189. package/features/adminUsers/account/getCurrentUser/GetCurrentUserUseCase.js +19 -0
  190. package/features/adminUsers/account/getCurrentUser/GetCurrentUserUseCase.js.map +1 -0
  191. package/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserGateway.d.ts +16 -0
  192. package/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserGateway.js +5 -0
  193. package/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserGateway.js.map +1 -0
  194. package/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserUseCase.d.ts +10 -0
  195. package/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserUseCase.js +5 -0
  196. package/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserUseCase.js.map +1 -0
  197. package/features/adminUsers/account/getCurrentUser/abstractions/index.d.ts +6 -0
  198. package/features/adminUsers/account/getCurrentUser/abstractions/index.js +2 -0
  199. package/features/adminUsers/account/getCurrentUser/feature.d.ts +3 -0
  200. package/features/adminUsers/account/getCurrentUser/feature.js +19 -0
  201. package/features/adminUsers/account/getCurrentUser/feature.js.map +1 -0
  202. package/features/adminUsers/account/getCurrentUser/index.d.ts +1 -0
  203. package/features/adminUsers/account/getCurrentUser/index.js +1 -0
  204. package/features/adminUsers/account/updateCurrentUser/UpdateCurrentUserGateway.d.ts +11 -0
  205. package/features/adminUsers/account/updateCurrentUser/UpdateCurrentUserGateway.js +48 -0
  206. package/features/adminUsers/account/updateCurrentUser/UpdateCurrentUserGateway.js.map +1 -0
  207. package/features/adminUsers/account/updateCurrentUser/UpdateCurrentUserUseCase.d.ts +10 -0
  208. package/features/adminUsers/account/updateCurrentUser/UpdateCurrentUserUseCase.js +19 -0
  209. package/features/adminUsers/account/updateCurrentUser/UpdateCurrentUserUseCase.js.map +1 -0
  210. package/features/adminUsers/account/updateCurrentUser/abstractions/UpdateCurrentUserGateway.d.ts +26 -0
  211. package/features/adminUsers/account/updateCurrentUser/abstractions/UpdateCurrentUserGateway.js +5 -0
  212. package/features/adminUsers/account/updateCurrentUser/abstractions/UpdateCurrentUserGateway.js.map +1 -0
  213. package/features/adminUsers/account/updateCurrentUser/abstractions/UpdateCurrentUserUseCase.d.ts +13 -0
  214. package/features/adminUsers/account/updateCurrentUser/abstractions/UpdateCurrentUserUseCase.js +5 -0
  215. package/features/adminUsers/account/updateCurrentUser/abstractions/UpdateCurrentUserUseCase.js.map +1 -0
  216. package/features/adminUsers/account/updateCurrentUser/abstractions/index.d.ts +8 -0
  217. package/features/adminUsers/account/updateCurrentUser/abstractions/index.js +2 -0
  218. package/features/adminUsers/account/updateCurrentUser/feature.d.ts +3 -0
  219. package/features/adminUsers/account/updateCurrentUser/feature.js +19 -0
  220. package/features/adminUsers/account/updateCurrentUser/feature.js.map +1 -0
  221. package/features/adminUsers/account/updateCurrentUser/index.d.ts +1 -0
  222. package/features/adminUsers/account/updateCurrentUser/index.js +1 -0
  223. package/features/adminUsers/passwordPolicy/RulesPasswordPolicy.d.ts +6 -0
  224. package/features/adminUsers/passwordPolicy/RulesPasswordPolicy.js +22 -0
  225. package/features/adminUsers/passwordPolicy/RulesPasswordPolicy.js.map +1 -0
  226. package/features/adminUsers/passwordPolicy/abstractions.d.ts +20 -0
  227. package/features/adminUsers/passwordPolicy/abstractions.js +5 -0
  228. package/features/adminUsers/passwordPolicy/abstractions.js.map +1 -0
  229. package/features/adminUsers/passwordPolicy/feature.d.ts +8 -0
  230. package/features/adminUsers/passwordPolicy/feature.js +18 -0
  231. package/features/adminUsers/passwordPolicy/feature.js.map +1 -0
  232. package/features/adminUsers/passwordPolicy/index.d.ts +3 -0
  233. package/features/adminUsers/passwordPolicy/index.js +3 -0
  234. package/features/adminUsers/passwordPolicy/readPasswordPolicyRules.d.ts +10 -0
  235. package/features/adminUsers/passwordPolicy/readPasswordPolicyRules.js +11 -0
  236. package/features/adminUsers/passwordPolicy/readPasswordPolicyRules.js.map +1 -0
  237. package/features/adminUsers/permissions/abstractions.d.ts +17 -0
  238. package/features/adminUsers/permissions/abstractions.js +6 -0
  239. package/features/adminUsers/permissions/abstractions.js.map +1 -0
  240. package/features/adminUsers/permissions/feature.d.ts +14 -0
  241. package/features/adminUsers/permissions/feature.js +7 -0
  242. package/features/adminUsers/permissions/feature.js.map +1 -0
  243. package/features/adminUsers/permissionsSchema.d.ts +10 -0
  244. package/features/adminUsers/permissionsSchema.js +18 -0
  245. package/features/adminUsers/permissionsSchema.js.map +1 -0
  246. package/features/adminUsers/users/createUser/CreateUserGateway.d.ts +11 -0
  247. package/features/adminUsers/users/createUser/CreateUserGateway.js +49 -0
  248. package/features/adminUsers/users/createUser/CreateUserGateway.js.map +1 -0
  249. package/features/adminUsers/users/createUser/CreateUserUseCase.d.ts +10 -0
  250. package/features/adminUsers/users/createUser/CreateUserUseCase.js +18 -0
  251. package/features/adminUsers/users/createUser/CreateUserUseCase.js.map +1 -0
  252. package/features/adminUsers/users/createUser/abstractions/CreateUserGateway.d.ts +21 -0
  253. package/features/adminUsers/users/createUser/abstractions/CreateUserGateway.js +5 -0
  254. package/features/adminUsers/users/createUser/abstractions/CreateUserGateway.js.map +1 -0
  255. package/features/adminUsers/users/createUser/abstractions/CreateUserUseCase.d.ts +14 -0
  256. package/features/adminUsers/users/createUser/abstractions/CreateUserUseCase.js +5 -0
  257. package/features/adminUsers/users/createUser/abstractions/CreateUserUseCase.js.map +1 -0
  258. package/features/adminUsers/users/createUser/abstractions/index.d.ts +2 -0
  259. package/features/adminUsers/users/createUser/abstractions/index.js +2 -0
  260. package/features/adminUsers/users/createUser/feature.d.ts +3 -0
  261. package/features/adminUsers/users/createUser/feature.js +19 -0
  262. package/features/adminUsers/users/createUser/feature.js.map +1 -0
  263. package/features/adminUsers/users/createUser/index.d.ts +2 -0
  264. package/features/adminUsers/users/createUser/index.js +2 -0
  265. package/features/adminUsers/users/deleteUser/DeleteUserGateway.d.ts +11 -0
  266. package/features/adminUsers/users/deleteUser/DeleteUserGateway.js +40 -0
  267. package/features/adminUsers/users/deleteUser/DeleteUserGateway.js.map +1 -0
  268. package/features/adminUsers/users/deleteUser/DeleteUserUseCase.d.ts +10 -0
  269. package/features/adminUsers/users/deleteUser/DeleteUserUseCase.js +18 -0
  270. package/features/adminUsers/users/deleteUser/DeleteUserUseCase.js.map +1 -0
  271. package/features/adminUsers/users/deleteUser/abstractions/DeleteUserGateway.d.ts +11 -0
  272. package/features/adminUsers/users/deleteUser/abstractions/DeleteUserGateway.js +5 -0
  273. package/features/adminUsers/users/deleteUser/abstractions/DeleteUserGateway.js.map +1 -0
  274. package/features/adminUsers/users/deleteUser/abstractions/DeleteUserUseCase.d.ts +11 -0
  275. package/features/adminUsers/users/deleteUser/abstractions/DeleteUserUseCase.js +5 -0
  276. package/features/adminUsers/users/deleteUser/abstractions/DeleteUserUseCase.js.map +1 -0
  277. package/features/adminUsers/users/deleteUser/abstractions/index.d.ts +2 -0
  278. package/features/adminUsers/users/deleteUser/abstractions/index.js +2 -0
  279. package/features/adminUsers/users/deleteUser/feature.d.ts +3 -0
  280. package/features/adminUsers/users/deleteUser/feature.js +19 -0
  281. package/features/adminUsers/users/deleteUser/feature.js.map +1 -0
  282. package/features/adminUsers/users/deleteUser/index.d.ts +2 -0
  283. package/features/adminUsers/users/deleteUser/index.js +2 -0
  284. package/features/adminUsers/users/getUser/GetUserGateway.d.ts +11 -0
  285. package/features/adminUsers/users/getUser/GetUserGateway.js +57 -0
  286. package/features/adminUsers/users/getUser/GetUserGateway.js.map +1 -0
  287. package/features/adminUsers/users/getUser/GetUserUseCase.d.ts +10 -0
  288. package/features/adminUsers/users/getUser/GetUserUseCase.js +18 -0
  289. package/features/adminUsers/users/getUser/GetUserUseCase.js.map +1 -0
  290. package/features/adminUsers/users/getUser/abstractions/GetUserGateway.d.ts +32 -0
  291. package/features/adminUsers/users/getUser/abstractions/GetUserGateway.js +5 -0
  292. package/features/adminUsers/users/getUser/abstractions/GetUserGateway.js.map +1 -0
  293. package/features/adminUsers/users/getUser/abstractions/GetUserUseCase.d.ts +14 -0
  294. package/features/adminUsers/users/getUser/abstractions/GetUserUseCase.js +5 -0
  295. package/features/adminUsers/users/getUser/abstractions/GetUserUseCase.js.map +1 -0
  296. package/features/adminUsers/users/getUser/abstractions/index.d.ts +2 -0
  297. package/features/adminUsers/users/getUser/abstractions/index.js +2 -0
  298. package/features/adminUsers/users/getUser/feature.d.ts +3 -0
  299. package/features/adminUsers/users/getUser/feature.js +19 -0
  300. package/features/adminUsers/users/getUser/feature.js.map +1 -0
  301. package/features/adminUsers/users/getUser/index.d.ts +2 -0
  302. package/features/adminUsers/users/getUser/index.js +2 -0
  303. package/features/adminUsers/users/listUsers/ListUsersGateway.d.ts +11 -0
  304. package/features/adminUsers/users/listUsers/ListUsersGateway.js +39 -0
  305. package/features/adminUsers/users/listUsers/ListUsersGateway.js.map +1 -0
  306. package/features/adminUsers/users/listUsers/ListUsersUseCase.d.ts +10 -0
  307. package/features/adminUsers/users/listUsers/ListUsersUseCase.js +18 -0
  308. package/features/adminUsers/users/listUsers/ListUsersUseCase.js.map +1 -0
  309. package/features/adminUsers/users/listUsers/abstractions/ListUsersGateway.d.ts +17 -0
  310. package/features/adminUsers/users/listUsers/abstractions/ListUsersGateway.js +5 -0
  311. package/features/adminUsers/users/listUsers/abstractions/ListUsersGateway.js.map +1 -0
  312. package/features/adminUsers/users/listUsers/abstractions/ListUsersUseCase.d.ts +10 -0
  313. package/features/adminUsers/users/listUsers/abstractions/ListUsersUseCase.js +5 -0
  314. package/features/adminUsers/users/listUsers/abstractions/ListUsersUseCase.js.map +1 -0
  315. package/features/adminUsers/users/listUsers/abstractions/index.d.ts +2 -0
  316. package/features/adminUsers/users/listUsers/abstractions/index.js +2 -0
  317. package/features/adminUsers/users/listUsers/feature.d.ts +3 -0
  318. package/features/adminUsers/users/listUsers/feature.js +19 -0
  319. package/features/adminUsers/users/listUsers/feature.js.map +1 -0
  320. package/features/adminUsers/users/listUsers/index.d.ts +2 -0
  321. package/features/adminUsers/users/listUsers/index.js +2 -0
  322. package/features/adminUsers/users/updateUser/UpdateUserGateway.d.ts +11 -0
  323. package/features/adminUsers/users/updateUser/UpdateUserGateway.js +59 -0
  324. package/features/adminUsers/users/updateUser/UpdateUserGateway.js.map +1 -0
  325. package/features/adminUsers/users/updateUser/UpdateUserUseCase.d.ts +10 -0
  326. package/features/adminUsers/users/updateUser/UpdateUserUseCase.js +18 -0
  327. package/features/adminUsers/users/updateUser/UpdateUserUseCase.js.map +1 -0
  328. package/features/adminUsers/users/updateUser/abstractions/UpdateUserGateway.d.ts +33 -0
  329. package/features/adminUsers/users/updateUser/abstractions/UpdateUserGateway.js +5 -0
  330. package/features/adminUsers/users/updateUser/abstractions/UpdateUserGateway.js.map +1 -0
  331. package/features/adminUsers/users/updateUser/abstractions/UpdateUserUseCase.d.ts +15 -0
  332. package/features/adminUsers/users/updateUser/abstractions/UpdateUserUseCase.js +5 -0
  333. package/features/adminUsers/users/updateUser/abstractions/UpdateUserUseCase.js.map +1 -0
  334. package/features/adminUsers/users/updateUser/abstractions/index.d.ts +2 -0
  335. package/features/adminUsers/users/updateUser/abstractions/index.js +2 -0
  336. package/features/adminUsers/users/updateUser/feature.d.ts +3 -0
  337. package/features/adminUsers/users/updateUser/feature.js +19 -0
  338. package/features/adminUsers/users/updateUser/feature.js.map +1 -0
  339. package/features/adminUsers/users/updateUser/index.d.ts +2 -0
  340. package/features/adminUsers/users/updateUser/index.js +2 -0
  341. package/features/aiChats/AiChatSaveError.d.ts +6 -0
  342. package/features/aiChats/AiChatSaveError.js +8 -0
  343. package/features/aiChats/AiChatSaveError.js.map +1 -0
  344. package/features/aiChats/AiChatsGateway.d.ts +18 -0
  345. package/features/aiChats/AiChatsGateway.js +132 -0
  346. package/features/aiChats/AiChatsGateway.js.map +1 -0
  347. package/features/aiChats/AiChatsRepository.d.ts +36 -0
  348. package/features/aiChats/AiChatsRepository.js +110 -0
  349. package/features/aiChats/AiChatsRepository.js.map +1 -0
  350. package/features/aiChats/AiChatsRequestError.d.ts +9 -0
  351. package/features/aiChats/AiChatsRequestError.js +8 -0
  352. package/features/aiChats/AiChatsRequestError.js.map +1 -0
  353. package/features/aiChats/abstractions.d.ts +76 -0
  354. package/features/aiChats/abstractions.js +6 -0
  355. package/features/aiChats/abstractions.js.map +1 -0
  356. package/features/aiChats/feature.d.ts +3 -0
  357. package/features/aiChats/feature.js +19 -0
  358. package/features/aiChats/feature.js.map +1 -0
  359. package/features/aiChats/index.d.ts +9 -0
  360. package/features/aiChats/index.js +3 -0
  361. package/features/aiChats/messageOf.d.ts +2 -0
  362. package/features/aiChats/messageOf.js +7 -0
  363. package/features/aiChats/messageOf.js.map +1 -0
  364. package/features/aiSettings/abstractions.d.ts +16 -0
  365. package/features/aiSettings/abstractions.js +5 -0
  366. package/features/aiSettings/abstractions.js.map +1 -0
  367. package/features/aiSettings/index.d.ts +2 -0
  368. package/features/aiSettings/index.js +1 -0
  369. package/features/assumePermissions/ApiStreamClientDecorator.d.ts +16 -0
  370. package/features/assumePermissions/ApiStreamClientDecorator.js +29 -0
  371. package/features/assumePermissions/ApiStreamClientDecorator.js.map +1 -0
  372. package/features/assumePermissions/AssumePermissionsContext.d.ts +17 -0
  373. package/features/assumePermissions/AssumePermissionsContext.js +32 -0
  374. package/features/assumePermissions/AssumePermissionsContext.js.map +1 -0
  375. package/features/assumePermissions/AssumePermissionsUseCase.d.ts +33 -0
  376. package/features/assumePermissions/AssumePermissionsUseCase.js +48 -0
  377. package/features/assumePermissions/AssumePermissionsUseCase.js.map +1 -0
  378. package/features/assumePermissions/GraphQLClientDecorator.d.ts +16 -0
  379. package/features/assumePermissions/GraphQLClientDecorator.js +29 -0
  380. package/features/assumePermissions/GraphQLClientDecorator.js.map +1 -0
  381. package/features/assumePermissions/ListAssumableTargetsGateway.d.ts +13 -0
  382. package/features/assumePermissions/ListAssumableTargetsGateway.js +74 -0
  383. package/features/assumePermissions/ListAssumableTargetsGateway.js.map +1 -0
  384. package/features/assumePermissions/ListAssumableTargetsUseCase.d.ts +16 -0
  385. package/features/assumePermissions/ListAssumableTargetsUseCase.js +38 -0
  386. package/features/assumePermissions/ListAssumableTargetsUseCase.js.map +1 -0
  387. package/features/assumePermissions/LogInUseCaseDecorator.d.ts +33 -0
  388. package/features/assumePermissions/LogInUseCaseDecorator.js +36 -0
  389. package/features/assumePermissions/LogInUseCaseDecorator.js.map +1 -0
  390. package/features/assumePermissions/LogOutUseCaseDecorator.d.ts +16 -0
  391. package/features/assumePermissions/LogOutUseCaseDecorator.js +21 -0
  392. package/features/assumePermissions/LogOutUseCaseDecorator.js.map +1 -0
  393. package/features/assumePermissions/abstractions.d.ts +78 -0
  394. package/features/assumePermissions/abstractions.js +8 -0
  395. package/features/assumePermissions/abstractions.js.map +1 -0
  396. package/features/assumePermissions/assumePermissionsHeader.d.ts +3 -0
  397. package/features/assumePermissions/assumePermissionsHeader.js +7 -0
  398. package/features/assumePermissions/assumePermissionsHeader.js.map +1 -0
  399. package/features/assumePermissions/feature.d.ts +4 -0
  400. package/features/assumePermissions/feature.js +32 -0
  401. package/features/assumePermissions/feature.js.map +1 -0
  402. package/features/assumePermissions/index.d.ts +4 -0
  403. package/features/assumePermissions/index.js +2 -0
  404. package/features/banners/Banners.d.ts +15 -0
  405. package/features/banners/Banners.js +39 -0
  406. package/features/banners/Banners.js.map +1 -0
  407. package/features/banners/abstractions.d.ts +34 -0
  408. package/features/banners/abstractions.js +5 -0
  409. package/features/banners/abstractions.js.map +1 -0
  410. package/features/banners/feature.d.ts +3 -0
  411. package/features/banners/feature.js +17 -0
  412. package/features/banners/feature.js.map +1 -0
  413. package/features/banners/index.d.ts +2 -0
  414. package/features/banners/index.js +2 -0
  415. package/features/dateFormatter/DefaultDateFormatter.d.ts +8 -0
  416. package/features/dateFormatter/DefaultDateFormatter.js +25 -0
  417. package/features/dateFormatter/DefaultDateFormatter.js.map +1 -0
  418. package/features/dateFormatter/abstractions.d.ts +13 -0
  419. package/features/dateFormatter/abstractions.js +5 -0
  420. package/features/dateFormatter/abstractions.js.map +1 -0
  421. package/features/dateFormatter/feature.d.ts +3 -0
  422. package/features/dateFormatter/feature.js +17 -0
  423. package/features/dateFormatter/feature.js.map +1 -0
  424. package/features/dateFormatter/formatUtcOffset.d.ts +1 -0
  425. package/features/dateFormatter/formatUtcOffset.js +11 -0
  426. package/features/dateFormatter/formatUtcOffset.js.map +1 -0
  427. package/features/dateFormatter/index.d.ts +4 -0
  428. package/features/dateFormatter/index.js +4 -0
  429. package/features/dateFormatter/useDateFormatter.d.ts +5 -0
  430. package/features/dateFormatter/useDateFormatter.js +8 -0
  431. package/features/dateFormatter/useDateFormatter.js.map +1 -0
  432. package/features/debugger/DebugSessionsRepository.d.ts +35 -0
  433. package/features/debugger/DebugSessionsRepository.js +57 -0
  434. package/features/debugger/DebugSessionsRepository.js.map +1 -0
  435. package/features/debugger/GraphQLExtensionsDebugHandler.d.ts +17 -0
  436. package/features/debugger/GraphQLExtensionsDebugHandler.js +21 -0
  437. package/features/debugger/GraphQLExtensionsDebugHandler.js.map +1 -0
  438. package/features/debugger/GraphQLExtensionsDebugHandler.test.d.ts +1 -0
  439. package/features/debugger/GraphQLExtensionsDebugHandler.test.js +112 -0
  440. package/features/debugger/GraphQLExtensionsDebugHandler.test.js.map +1 -0
  441. package/features/debugger/abstractions.d.ts +50 -0
  442. package/features/debugger/abstractions.js +5 -0
  443. package/features/debugger/abstractions.js.map +1 -0
  444. package/features/debugger/constants.d.ts +1 -0
  445. package/features/debugger/constants.js +4 -0
  446. package/features/debugger/constants.js.map +1 -0
  447. package/features/debugger/feature.d.ts +3 -0
  448. package/features/debugger/feature.js +19 -0
  449. package/features/debugger/feature.js.map +1 -0
  450. package/features/debugger/index.d.ts +3 -0
  451. package/features/debugger/index.js +3 -0
  452. package/features/featureFlags/FeatureFlagsGateway.d.ts +10 -0
  453. package/features/featureFlags/FeatureFlagsGateway.js +40 -0
  454. package/features/featureFlags/FeatureFlagsGateway.js.map +1 -0
  455. package/features/featureFlags/FeatureFlagsService.d.ts +16 -0
  456. package/features/featureFlags/FeatureFlagsService.js +64 -0
  457. package/features/featureFlags/FeatureFlagsService.js.map +1 -0
  458. package/features/featureFlags/abstractions.d.ts +19 -0
  459. package/features/featureFlags/abstractions.js +6 -0
  460. package/features/featureFlags/abstractions.js.map +1 -0
  461. package/features/featureFlags/feature.d.ts +3 -0
  462. package/features/featureFlags/feature.js +19 -0
  463. package/features/featureFlags/feature.js.map +1 -0
  464. package/features/formModel/AccessControlRuleEvaluator.d.ts +12 -0
  465. package/features/formModel/AccessControlRuleEvaluator.js +30 -0
  466. package/features/formModel/AccessControlRuleEvaluator.js.map +1 -0
  467. package/features/formModel/AccessControlRuleEvaluator.test.d.ts +1 -0
  468. package/features/formModel/AccessControlRuleEvaluator.test.js +219 -0
  469. package/features/formModel/AccessControlRuleEvaluator.test.js.map +1 -0
  470. package/features/formModel/ConditionRuleEvaluator.js +34 -4
  471. package/features/formModel/ConditionRuleEvaluator.js.map +1 -1
  472. package/features/formModel/Field.d.ts +14 -1
  473. package/features/formModel/Field.js +49 -3
  474. package/features/formModel/Field.js.map +1 -1
  475. package/features/formModel/FieldBuilder.d.ts +3 -3
  476. package/features/formModel/FieldBuilder.js +3 -2
  477. package/features/formModel/FieldBuilder.js.map +1 -1
  478. package/features/formModel/FieldBuilder.test.js +162 -5
  479. package/features/formModel/FieldBuilder.test.js.map +1 -1
  480. package/features/formModel/FocusManager.js +10 -3
  481. package/features/formModel/FocusManager.js.map +1 -1
  482. package/features/formModel/FormErrors.d.ts +2 -2
  483. package/features/formModel/FormErrors.js +1 -1
  484. package/features/formModel/FormErrors.js.map +1 -1
  485. package/features/formModel/FormModel.d.ts +2 -0
  486. package/features/formModel/FormModel.js +32 -9
  487. package/features/formModel/FormModel.js.map +1 -1
  488. package/features/formModel/FormModel.test.js +883 -2
  489. package/features/formModel/FormModel.test.js.map +1 -1
  490. package/features/formModel/FormView.d.ts +8 -4
  491. package/features/formModel/ObjectField.d.ts +12 -1
  492. package/features/formModel/ObjectField.js +70 -20
  493. package/features/formModel/ObjectField.js.map +1 -1
  494. package/features/formModel/PresenterErrors.d.ts +2 -2
  495. package/features/formModel/Rules.test.js +224 -16
  496. package/features/formModel/Rules.test.js.map +1 -1
  497. package/features/formModel/abstractions.d.ts +56 -4
  498. package/features/formModel/abstractions.js +2 -1
  499. package/features/formModel/abstractions.js.map +1 -1
  500. package/features/formModel/createFieldRenderer.d.ts +42 -0
  501. package/features/formModel/createFieldRenderer.js +33 -10
  502. package/features/formModel/createFieldRenderer.js.map +1 -1
  503. package/features/formModel/demo/FormModelDemo.d.ts +2 -2
  504. package/features/formModel/feature.js +2 -0
  505. package/features/formModel/feature.js.map +1 -1
  506. package/features/formModel/fieldTypes/DateTimeFieldType.d.ts +67 -4
  507. package/features/formModel/fieldTypes/DateTimeFieldType.js +88 -22
  508. package/features/formModel/fieldTypes/DateTimeFieldType.js.map +1 -1
  509. package/features/formModel/fieldTypes/ObjectFieldType.d.ts +3 -1
  510. package/features/formModel/fieldTypes/ObjectFieldType.js +23 -1
  511. package/features/formModel/fieldTypes/ObjectFieldType.js.map +1 -1
  512. package/features/formModel/fieldTypes/dateLimits.d.ts +37 -0
  513. package/features/formModel/fieldTypes/dateLimits.js +64 -0
  514. package/features/formModel/fieldTypes/dateLimits.js.map +1 -0
  515. package/features/formModel/fieldTypes/dateLimits.test.d.ts +1 -0
  516. package/features/formModel/fieldTypes/dateLimits.test.js +60 -0
  517. package/features/formModel/fieldTypes/dateLimits.test.js.map +1 -0
  518. package/features/formModel/hasSubtreeFocusRequest.d.ts +12 -0
  519. package/features/formModel/hasSubtreeFocusRequest.js +15 -0
  520. package/features/formModel/hasSubtreeFocusRequest.js.map +1 -0
  521. package/features/formModel/index.d.ts +3 -2
  522. package/features/formModel/index.js +2 -1
  523. package/features/formModel/jsonSchema/JsonSchema.d.ts +18 -0
  524. package/features/formModel/jsonSchema/JsonSchema.js +0 -0
  525. package/features/formModel/jsonSchema/JsonSchemaFieldOptions.d.ts +4 -0
  526. package/features/formModel/jsonSchema/JsonSchemaFieldOptions.js +0 -0
  527. package/features/formModel/jsonSchema/JsonSchemaIssue.d.ts +4 -0
  528. package/features/formModel/jsonSchema/JsonSchemaIssue.js +0 -0
  529. package/features/formModel/jsonSchema/JsonSchemaValidationResult.d.ts +5 -0
  530. package/features/formModel/jsonSchema/JsonSchemaValidationResult.js +0 -0
  531. package/features/formModel/jsonSchema/JsonSchemaValidator.d.ts +4 -0
  532. package/features/formModel/jsonSchema/JsonSchemaValidator.js +0 -0
  533. package/features/formModel/jsonSchema/PlainObject.d.ts +1 -0
  534. package/features/formModel/jsonSchema/PlainObject.js +0 -0
  535. package/features/formModel/jsonSchema/buildFieldsFromJsonSchema.d.ts +5 -0
  536. package/features/formModel/jsonSchema/buildFieldsFromJsonSchema.js +154 -0
  537. package/features/formModel/jsonSchema/buildFieldsFromJsonSchema.js.map +1 -0
  538. package/features/formModel/jsonSchema/buildFieldsFromJsonSchema.test.d.ts +1 -0
  539. package/features/formModel/jsonSchema/buildFieldsFromJsonSchema.test.js +643 -0
  540. package/features/formModel/jsonSchema/buildFieldsFromJsonSchema.test.js.map +1 -0
  541. package/features/formModel/jsonSchema/createJsonSchemaValidator.d.ts +3 -0
  542. package/features/formModel/jsonSchema/createJsonSchemaValidator.js +40 -0
  543. package/features/formModel/jsonSchema/createJsonSchemaValidator.js.map +1 -0
  544. package/features/formModel/jsonSchema/createJsonSchemaValidator.test.d.ts +1 -0
  545. package/features/formModel/jsonSchema/createJsonSchemaValidator.test.js +141 -0
  546. package/features/formModel/jsonSchema/createJsonSchemaValidator.test.js.map +1 -0
  547. package/features/formModel/jsonSchema/formDataToJsonSchemaValue.d.ts +3 -0
  548. package/features/formModel/jsonSchema/formDataToJsonSchemaValue.js +52 -0
  549. package/features/formModel/jsonSchema/formDataToJsonSchemaValue.js.map +1 -0
  550. package/features/formModel/jsonSchema/formDataToJsonSchemaValue.test.d.ts +1 -0
  551. package/features/formModel/jsonSchema/formDataToJsonSchemaValue.test.js +250 -0
  552. package/features/formModel/jsonSchema/formDataToJsonSchemaValue.test.js.map +1 -0
  553. package/features/formModel/jsonSchema/getJsonSchemaKind.d.ts +3 -0
  554. package/features/formModel/jsonSchema/getJsonSchemaKind.js +31 -0
  555. package/features/formModel/jsonSchema/getJsonSchemaKind.js.map +1 -0
  556. package/features/formModel/jsonSchema/getJsonSchemaKind.test.d.ts +1 -0
  557. package/features/formModel/jsonSchema/getJsonSchemaKind.test.js +123 -0
  558. package/features/formModel/jsonSchema/getJsonSchemaKind.test.js.map +1 -0
  559. package/features/formModel/jsonSchema/isPlainObject.d.ts +2 -0
  560. package/features/formModel/jsonSchema/isPlainObject.js +4 -0
  561. package/features/formModel/jsonSchema/isPlainObject.js.map +1 -0
  562. package/features/formModel/jsonSchema/jsonSchemaValueToFormData.d.ts +3 -0
  563. package/features/formModel/jsonSchema/jsonSchemaValueToFormData.js +30 -0
  564. package/features/formModel/jsonSchema/jsonSchemaValueToFormData.js.map +1 -0
  565. package/features/formModel/jsonSchema/jsonSchemaValueToFormData.test.d.ts +1 -0
  566. package/features/formModel/jsonSchema/jsonSchemaValueToFormData.test.js +207 -0
  567. package/features/formModel/jsonSchema/jsonSchemaValueToFormData.test.js.map +1 -0
  568. package/features/formModel/jsonSchema/normalizeJsonSchema.d.ts +2 -0
  569. package/features/formModel/jsonSchema/normalizeJsonSchema.js +10 -0
  570. package/features/formModel/jsonSchema/normalizeJsonSchema.js.map +1 -0
  571. package/features/formModel/renderers.d.ts +2 -0
  572. package/features/formModel/renderers.js +2 -0
  573. package/features/notifications/Notifications.d.ts +1 -0
  574. package/features/notifications/Notifications.js +3 -0
  575. package/features/notifications/Notifications.js.map +1 -1
  576. package/features/notifications/Notifications.test.d.ts +1 -0
  577. package/features/notifications/Notifications.test.js +106 -0
  578. package/features/notifications/Notifications.test.js.map +1 -0
  579. package/features/notifications/NotificationsRenderer.d.ts +3 -2
  580. package/features/notifications/NotificationsRenderer.js +23 -4
  581. package/features/notifications/NotificationsRenderer.js.map +1 -1
  582. package/features/notifications/NotificationsRenderer.test.d.ts +1 -0
  583. package/features/notifications/NotificationsRenderer.test.js +261 -0
  584. package/features/notifications/NotificationsRenderer.test.js.map +1 -0
  585. package/features/notifications/abstractions.d.ts +13 -2
  586. package/features/notifications/abstractions.js.map +1 -1
  587. package/features/security/AuthenticationContext/ApiStreamClientDecorator.d.ts +22 -0
  588. package/features/security/AuthenticationContext/ApiStreamClientDecorator.js +32 -0
  589. package/features/security/AuthenticationContext/ApiStreamClientDecorator.js.map +1 -0
  590. package/features/security/AuthenticationContext/feature.js +2 -0
  591. package/features/security/AuthenticationContext/feature.js.map +1 -1
  592. package/features/security/LogIn/LogInUseCase.d.ts +0 -1
  593. package/features/security/LogIn/LogInUseCase.js +2 -5
  594. package/features/security/LogIn/LogInUseCase.js.map +1 -1
  595. package/features/security/LogIn/hasAppPermissions.d.ts +2 -0
  596. package/features/security/LogIn/hasAppPermissions.js +8 -0
  597. package/features/security/LogIn/hasAppPermissions.js.map +1 -0
  598. package/features/slugify/DefaultSlugify.d.ts +8 -0
  599. package/features/slugify/DefaultSlugify.js +20 -0
  600. package/features/slugify/DefaultSlugify.js.map +1 -0
  601. package/features/slugify/abstractions.d.ts +12 -0
  602. package/features/slugify/abstractions.js +5 -0
  603. package/features/slugify/abstractions.js.map +1 -0
  604. package/features/slugify/feature.d.ts +1 -0
  605. package/features/slugify/feature.js +11 -0
  606. package/features/slugify/feature.js.map +1 -0
  607. package/features/slugify/index.d.ts +3 -0
  608. package/features/slugify/index.js +3 -0
  609. package/features/stringFormatter/DefaultStringFormatter.d.ts +17 -0
  610. package/features/stringFormatter/DefaultStringFormatter.js +19 -0
  611. package/features/stringFormatter/DefaultStringFormatter.js.map +1 -0
  612. package/features/stringFormatter/abstractions.d.ts +11 -0
  613. package/features/stringFormatter/abstractions.js +5 -0
  614. package/features/stringFormatter/abstractions.js.map +1 -0
  615. package/features/stringFormatter/feature.d.ts +3 -0
  616. package/features/stringFormatter/feature.js +19 -0
  617. package/features/stringFormatter/feature.js.map +1 -0
  618. package/features/stringFormatter/index.d.ts +4 -0
  619. package/features/stringFormatter/index.js +4 -0
  620. package/features/stringFormatter/useStringFormatter.d.ts +5 -0
  621. package/features/stringFormatter/useStringFormatter.js +8 -0
  622. package/features/stringFormatter/useStringFormatter.js.map +1 -0
  623. package/features/tenancy/ApiStreamClientDecorator.d.ts +16 -0
  624. package/features/tenancy/ApiStreamClientDecorator.js +30 -0
  625. package/features/tenancy/ApiStreamClientDecorator.js.map +1 -0
  626. package/features/tenancy/feature.js +2 -0
  627. package/features/tenancy/feature.js.map +1 -1
  628. package/features/wcp/ReactLicense.d.ts +11 -0
  629. package/features/wcp/ReactLicense.js +33 -0
  630. package/features/wcp/ReactLicense.js.map +1 -1
  631. package/features/wcp/WcpGateway.js +7 -0
  632. package/features/wcp/WcpGateway.js.map +1 -1
  633. package/hooks/index.d.ts +3 -0
  634. package/hooks/index.js +3 -0
  635. package/hooks/useDrawer.d.ts +9 -0
  636. package/hooks/useDrawer.js +19 -0
  637. package/hooks/useDrawer.js.map +1 -0
  638. package/hooks/useHotkeys.js +11 -7
  639. package/hooks/useHotkeys.js.map +1 -1
  640. package/hooks/useOpenDrawer.d.ts +7 -0
  641. package/hooks/useOpenDrawer.js +18 -0
  642. package/hooks/useOpenDrawer.js.map +1 -0
  643. package/hooks/useSnackbar.js.map +1 -1
  644. package/index.d.ts +43 -2
  645. package/index.js +43 -15
  646. package/modules/AccessManagementExtension.js +49 -23
  647. package/modules/AccessManagementExtension.js.map +1 -1
  648. package/modules/DebuggerExtension.d.ts +2 -0
  649. package/modules/DebuggerExtension.js +55 -0
  650. package/modules/DebuggerExtension.js.map +1 -0
  651. package/package.json +41 -38
  652. package/presentation/accessManagement/SecurityPermissions.js +3 -3
  653. package/presentation/accessManagement/SecurityPermissions.js.map +1 -1
  654. package/presentation/accessManagement/apiKeys/ApiKeysPresenter.d.ts +3 -1
  655. package/presentation/accessManagement/apiKeys/ApiKeysPresenter.js +14 -18
  656. package/presentation/accessManagement/apiKeys/ApiKeysPresenter.js.map +1 -1
  657. package/presentation/accessManagement/apiKeys/components/ApiKeysView.d.ts +2 -2
  658. package/presentation/accessManagement/apiKeys/components/ApiKeysView.js +13 -7
  659. package/presentation/accessManagement/apiKeys/components/ApiKeysView.js.map +1 -1
  660. package/presentation/accessManagement/roles/RolesPresenter.d.ts +3 -1
  661. package/presentation/accessManagement/roles/RolesPresenter.js +12 -16
  662. package/presentation/accessManagement/roles/RolesPresenter.js.map +1 -1
  663. package/presentation/accessManagement/roles/components/RolesDataList.d.ts +10 -0
  664. package/presentation/accessManagement/roles/components/RolesDataList.js +146 -0
  665. package/presentation/accessManagement/roles/components/RolesDataList.js.map +1 -0
  666. package/presentation/accessManagement/roles/components/RolesForm.d.ts +13 -0
  667. package/presentation/accessManagement/roles/components/RolesForm.js +114 -0
  668. package/presentation/accessManagement/roles/components/RolesForm.js.map +1 -0
  669. package/presentation/accessManagement/roles/components/RolesView.d.ts +2 -2
  670. package/presentation/accessManagement/roles/components/RolesView.js +6 -212
  671. package/presentation/accessManagement/roles/components/RolesView.js.map +1 -1
  672. package/presentation/accessManagement/teams/TeamsPresenter.d.ts +3 -1
  673. package/presentation/accessManagement/teams/TeamsPresenter.js +12 -16
  674. package/presentation/accessManagement/teams/TeamsPresenter.js.map +1 -1
  675. package/presentation/accessManagement/teams/components/TeamsDataList.d.ts +10 -0
  676. package/presentation/accessManagement/teams/components/TeamsDataList.js +146 -0
  677. package/presentation/accessManagement/teams/components/TeamsDataList.js.map +1 -0
  678. package/presentation/accessManagement/teams/components/TeamsForm.d.ts +13 -0
  679. package/presentation/accessManagement/teams/components/TeamsForm.js +96 -0
  680. package/presentation/accessManagement/teams/components/TeamsForm.js.map +1 -0
  681. package/presentation/accessManagement/teams/components/TeamsView.d.ts +2 -2
  682. package/presentation/accessManagement/teams/components/TeamsView.js +6 -194
  683. package/presentation/accessManagement/teams/components/TeamsView.js.map +1 -1
  684. package/presentation/adminUsers/AdminUsers.d.ts +10 -0
  685. package/presentation/adminUsers/AdminUsers.js +77 -0
  686. package/presentation/adminUsers/AdminUsers.js.map +1 -0
  687. package/presentation/adminUsers/SecurityPermission.d.ts +2 -0
  688. package/presentation/adminUsers/SecurityPermission.js +15 -0
  689. package/presentation/adminUsers/SecurityPermission.js.map +1 -0
  690. package/presentation/adminUsers/UserItem.d.ts +10 -0
  691. package/presentation/adminUsers/UserItem.js +0 -0
  692. package/presentation/adminUsers/components/AvatarImage/AvatarImage.d.ts +3 -0
  693. package/presentation/adminUsers/components/AvatarImage/AvatarImage.js +31 -0
  694. package/presentation/adminUsers/components/AvatarImage/AvatarImage.js.map +1 -0
  695. package/presentation/adminUsers/components/AvatarImage/AvatarImagePreview.d.ts +10 -0
  696. package/presentation/adminUsers/components/AvatarImage/AvatarImagePreview.js +53 -0
  697. package/presentation/adminUsers/components/AvatarImage/AvatarImagePreview.js.map +1 -0
  698. package/presentation/adminUsers/components/AvatarImage/AvatarImageTrigger.d.ts +7 -0
  699. package/presentation/adminUsers/components/AvatarImage/AvatarImageTrigger.js +28 -0
  700. package/presentation/adminUsers/components/AvatarImage/AvatarImageTrigger.js.map +1 -0
  701. package/presentation/adminUsers/components/AvatarImage/index.d.ts +1 -0
  702. package/presentation/adminUsers/components/AvatarImage/index.js +1 -0
  703. package/presentation/adminUsers/routes.d.ts +10 -0
  704. package/presentation/adminUsers/routes.js +20 -0
  705. package/presentation/adminUsers/routes.js.map +1 -0
  706. package/presentation/adminUsers/userMenu/AccountDetails.d.ts +6 -0
  707. package/presentation/adminUsers/userMenu/AccountDetails.js +20 -0
  708. package/presentation/adminUsers/userMenu/AccountDetails.js.map +1 -0
  709. package/presentation/adminUsers/userMenu/useIsDefaultTenant.d.ts +1 -0
  710. package/presentation/adminUsers/userMenu/useIsDefaultTenant.js +9 -0
  711. package/presentation/adminUsers/userMenu/useIsDefaultTenant.js.map +1 -0
  712. package/presentation/adminUsers/views/Account/Account.d.ts +2 -0
  713. package/presentation/adminUsers/views/Account/Account.js +137 -0
  714. package/presentation/adminUsers/views/Account/Account.js.map +1 -0
  715. package/presentation/adminUsers/views/Account/index.d.ts +1 -0
  716. package/presentation/adminUsers/views/Account/index.js +1 -0
  717. package/presentation/adminUsers/views/Users/UsersDataList.d.ts +3 -0
  718. package/presentation/adminUsers/views/Users/UsersDataList.js +180 -0
  719. package/presentation/adminUsers/views/Users/UsersDataList.js.map +1 -0
  720. package/presentation/adminUsers/views/Users/UsersForm.d.ts +5 -0
  721. package/presentation/adminUsers/views/Users/UsersForm.js +175 -0
  722. package/presentation/adminUsers/views/Users/UsersForm.js.map +1 -0
  723. package/presentation/adminUsers/views/Users/UsersView.d.ts +2 -0
  724. package/presentation/adminUsers/views/Users/UsersView.js +15 -0
  725. package/presentation/adminUsers/views/Users/UsersView.js.map +1 -0
  726. package/presentation/adminUsers/views/Users/components/DeleteAction.d.ts +7 -0
  727. package/presentation/adminUsers/views/Users/components/DeleteAction.js +29 -0
  728. package/presentation/adminUsers/views/Users/components/DeleteAction.js.map +1 -0
  729. package/presentation/adminUsers/views/Users/hooks/useUserForm.d.ts +27 -0
  730. package/presentation/adminUsers/views/Users/hooks/useUserForm.js +101 -0
  731. package/presentation/adminUsers/views/Users/hooks/useUserForm.js.map +1 -0
  732. package/presentation/adminUsers/views/Users/search.js +21 -0
  733. package/presentation/adminUsers/views/Users/search.js.map +1 -0
  734. package/presentation/adminUsers/views/Users/search.svg +20 -0
  735. package/presentation/adminUsers/views/utils.d.ts +3 -0
  736. package/presentation/adminUsers/views/utils.js +12 -0
  737. package/presentation/adminUsers/views/utils.js.map +1 -0
  738. package/presentation/aiChats/AiChatsPanelPresenter.d.ts +28 -0
  739. package/presentation/aiChats/AiChatsPanelPresenter.js +132 -0
  740. package/presentation/aiChats/AiChatsPanelPresenter.js.map +1 -0
  741. package/presentation/aiChats/abstractions.d.ts +69 -0
  742. package/presentation/aiChats/abstractions.js +5 -0
  743. package/presentation/aiChats/abstractions.js.map +1 -0
  744. package/presentation/aiChats/feature.d.ts +3 -0
  745. package/presentation/aiChats/feature.js +17 -0
  746. package/presentation/aiChats/feature.js.map +1 -0
  747. package/presentation/aiChats/index.d.ts +2 -0
  748. package/presentation/aiChats/index.js +2 -0
  749. package/presentation/assumePermissions/AssumePermissionsPresenter.d.ts +36 -0
  750. package/presentation/assumePermissions/AssumePermissionsPresenter.js +153 -0
  751. package/presentation/assumePermissions/AssumePermissionsPresenter.js.map +1 -0
  752. package/presentation/assumePermissions/abstractions.d.ts +30 -0
  753. package/presentation/assumePermissions/abstractions.js +5 -0
  754. package/presentation/assumePermissions/abstractions.js.map +1 -0
  755. package/presentation/assumePermissions/components/AssumePermissionsButton.d.ts +14 -0
  756. package/presentation/assumePermissions/components/AssumePermissionsButton.js +42 -0
  757. package/presentation/assumePermissions/components/AssumePermissionsButton.js.map +1 -0
  758. package/presentation/assumePermissions/components/AssumedPermissionsBanner.d.ts +11 -0
  759. package/presentation/assumePermissions/components/AssumedPermissionsBanner.js +25 -0
  760. package/presentation/assumePermissions/components/AssumedPermissionsBanner.js.map +1 -0
  761. package/presentation/assumePermissions/components/AssumedPermissionsSelector.d.ts +2 -0
  762. package/presentation/assumePermissions/components/AssumedPermissionsSelector.js +68 -0
  763. package/presentation/assumePermissions/components/AssumedPermissionsSelector.js.map +1 -0
  764. package/presentation/assumePermissions/feature.d.ts +3 -0
  765. package/presentation/assumePermissions/feature.js +17 -0
  766. package/presentation/assumePermissions/feature.js.map +1 -0
  767. package/presentation/assumePermissions/index.d.ts +4 -0
  768. package/presentation/assumePermissions/index.js +4 -0
  769. package/presentation/banners/BannersPresenter.d.ts +14 -0
  770. package/presentation/banners/BannersPresenter.js +60 -0
  771. package/presentation/banners/BannersPresenter.js.map +1 -0
  772. package/presentation/banners/abstractions.d.ts +24 -0
  773. package/presentation/banners/abstractions.js +5 -0
  774. package/presentation/banners/abstractions.js.map +1 -0
  775. package/presentation/banners/components/Banner.d.ts +10 -0
  776. package/presentation/banners/components/Banner.js +32 -0
  777. package/presentation/banners/components/Banner.js.map +1 -0
  778. package/presentation/banners/components/BannerBar.d.ts +11 -0
  779. package/presentation/banners/components/BannerBar.js +51 -0
  780. package/presentation/banners/components/BannerBar.js.map +1 -0
  781. package/presentation/banners/feature.d.ts +3 -0
  782. package/presentation/banners/feature.js +17 -0
  783. package/presentation/banners/feature.js.map +1 -0
  784. package/presentation/banners/index.d.ts +6 -0
  785. package/presentation/banners/index.js +4 -0
  786. package/presentation/banners/useBanner.d.ts +10 -0
  787. package/presentation/banners/useBanner.js +15 -0
  788. package/presentation/banners/useBanner.js.map +1 -0
  789. package/presentation/commandPalette/CommandPalettePresenter.d.ts +21 -0
  790. package/presentation/commandPalette/CommandPalettePresenter.js +93 -0
  791. package/presentation/commandPalette/CommandPalettePresenter.js.map +1 -0
  792. package/presentation/commandPalette/abstractions.d.ts +81 -0
  793. package/presentation/commandPalette/abstractions.js +7 -0
  794. package/presentation/commandPalette/abstractions.js.map +1 -0
  795. package/presentation/commandPalette/commands/AiChatsCommand.d.ts +24 -0
  796. package/presentation/commandPalette/commands/AiChatsCommand.js +41 -0
  797. package/presentation/commandPalette/commands/AiChatsCommand.js.map +1 -0
  798. package/presentation/commandPalette/commands/AskAiCommand.d.ts +26 -0
  799. package/presentation/commandPalette/commands/AskAiCommand.js +34 -0
  800. package/presentation/commandPalette/commands/AskAiCommand.js.map +1 -0
  801. package/presentation/commandPalette/commands/CopyCurrentUrlCommand.d.ts +15 -0
  802. package/presentation/commandPalette/commands/CopyCurrentUrlCommand.js +33 -0
  803. package/presentation/commandPalette/commands/CopyCurrentUrlCommand.js.map +1 -0
  804. package/presentation/commandPalette/commands/SendMessageCommand.d.ts +23 -0
  805. package/presentation/commandPalette/commands/SendMessageCommand.js +66 -0
  806. package/presentation/commandPalette/commands/SendMessageCommand.js.map +1 -0
  807. package/presentation/commandPalette/commands/SignOutCommand.d.ts +18 -0
  808. package/presentation/commandPalette/commands/SignOutCommand.js +37 -0
  809. package/presentation/commandPalette/commands/SignOutCommand.js.map +1 -0
  810. package/presentation/commandPalette/commands/feature.d.ts +5 -0
  811. package/presentation/commandPalette/commands/feature.js +19 -0
  812. package/presentation/commandPalette/commands/feature.js.map +1 -0
  813. package/presentation/commandPalette/feature.d.ts +3 -0
  814. package/presentation/commandPalette/feature.js +17 -0
  815. package/presentation/commandPalette/feature.js.map +1 -0
  816. package/presentation/commandPalette/index.d.ts +3 -0
  817. package/presentation/commandPalette/index.js +2 -0
  818. package/presentation/createReactiveComponent.d.ts +1 -0
  819. package/presentation/createReactiveComponent.js +1 -0
  820. package/presentation/debugger/DebuggerPresenter.d.ts +14 -0
  821. package/presentation/debugger/DebuggerPresenter.js +45 -0
  822. package/presentation/debugger/DebuggerPresenter.js.map +1 -0
  823. package/presentation/debugger/abstractions.d.ts +17 -0
  824. package/presentation/debugger/abstractions.js +5 -0
  825. package/presentation/debugger/abstractions.js.map +1 -0
  826. package/presentation/debugger/components/DebuggerIndicator.d.ts +2 -0
  827. package/presentation/debugger/components/DebuggerIndicator.js +45 -0
  828. package/presentation/debugger/components/DebuggerIndicator.js.map +1 -0
  829. package/presentation/debugger/components/DebuggerView.d.ts +4 -0
  830. package/presentation/debugger/components/DebuggerView.js +44 -0
  831. package/presentation/debugger/components/DebuggerView.js.map +1 -0
  832. package/presentation/debugger/downloadJson.d.ts +7 -0
  833. package/presentation/debugger/downloadJson.js +17 -0
  834. package/presentation/debugger/downloadJson.js.map +1 -0
  835. package/presentation/debugger/feature.d.ts +3 -0
  836. package/presentation/debugger/feature.js +17 -0
  837. package/presentation/debugger/feature.js.map +1 -0
  838. package/presentation/debugger/routes.d.ts +4 -0
  839. package/presentation/debugger/routes.js +10 -0
  840. package/presentation/debugger/routes.js.map +1 -0
  841. package/presentation/featureFlags/FeatureFlagsProvider.d.ts +7 -0
  842. package/presentation/featureFlags/FeatureFlagsProvider.js +22 -0
  843. package/presentation/featureFlags/FeatureFlagsProvider.js.map +1 -0
  844. package/presentation/featureFlags/useFeatureFlags.d.ts +2 -0
  845. package/presentation/featureFlags/useFeatureFlags.js +17 -0
  846. package/presentation/featureFlags/useFeatureFlags.js.map +1 -0
  847. package/presentation/installation/components/SystemInstaller/SystemInstaller.d.ts +2 -2
  848. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep.js +4 -3
  849. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep.js.map +1 -1
  850. package/presentation/installation/components/SystemInstaller/steps/FinishSetup/handleStartUsing.js +0 -3
  851. package/presentation/installation/components/SystemInstaller/steps/FinishSetup/handleStartUsing.js.map +1 -1
  852. package/presentation/installation/presenters/SystemInstaller/SystemInstallerPresenter.js.map +1 -1
  853. package/presentation/listPresenter/FolderAwareDataSource.d.ts +5 -0
  854. package/presentation/listPresenter/FolderAwareDataSource.js +8 -4
  855. package/presentation/listPresenter/FolderAwareDataSource.js.map +1 -1
  856. package/presentation/listPresenter/QueryMatcher.d.ts +28 -5
  857. package/presentation/listPresenter/QueryMatcher.js +74 -4
  858. package/presentation/listPresenter/QueryMatcher.js.map +1 -1
  859. package/presentation/listPresenter/QueryMatcher.test.d.ts +1 -0
  860. package/presentation/listPresenter/QueryMatcher.test.js +345 -0
  861. package/presentation/listPresenter/QueryMatcher.test.js.map +1 -0
  862. package/presentation/sortable/SortablePresenter.d.ts +23 -0
  863. package/presentation/sortable/SortablePresenter.js +175 -0
  864. package/presentation/sortable/SortablePresenter.js.map +1 -0
  865. package/presentation/sortable/abstractions.d.ts +24 -0
  866. package/presentation/sortable/abstractions.js +5 -0
  867. package/presentation/sortable/abstractions.js.map +1 -0
  868. package/presentation/sortable/feature.d.ts +1 -0
  869. package/presentation/sortable/feature.js +11 -0
  870. package/presentation/sortable/feature.js.map +1 -0
  871. package/presentation/sortable/index.d.ts +2 -0
  872. package/presentation/sortable/index.js +2 -0
  873. package/presentation/trashBin/TrashBinPresenter.js +3 -1
  874. package/presentation/trashBin/TrashBinPresenter.js.map +1 -1
  875. package/presentation/trashBin/TrashBinPresenter.test.d.ts +1 -0
  876. package/presentation/trashBin/TrashBinPresenter.test.js +91 -0
  877. package/presentation/trashBin/TrashBinPresenter.test.js.map +1 -0
  878. package/presentation/trashBin/abstractions.d.ts +1 -1
  879. package/presentation/trashBin/abstractions.js.map +1 -1
  880. package/presentation/trashBin/components/BulkActions/DeleteItems.d.ts +2 -2
  881. package/presentation/trashBin/components/BulkActions/DeleteItems.js +5 -1
  882. package/presentation/trashBin/components/BulkActions/DeleteItems.js.map +1 -1
  883. package/presentation/trashBin/components/BulkActions/DeleteItems.test.d.ts +1 -0
  884. package/presentation/trashBin/components/BulkActions/DeleteItems.test.js +100 -0
  885. package/presentation/trashBin/components/BulkActions/DeleteItems.test.js.map +1 -0
  886. package/presentation/trashBin/components/BulkActions/RestoreItems.d.ts +2 -2
  887. package/presentation/trashBin/components/TrashBinOverlay.d.ts +2 -2
  888. package/presentation/trashBin/hooks/useDeleteTrashBinItem.js +2 -1
  889. package/presentation/trashBin/hooks/useDeleteTrashBinItem.js.map +1 -1
  890. package/presentation/trashBin/hooks/useDeleteTrashBinItem.test.d.ts +1 -0
  891. package/presentation/trashBin/hooks/useDeleteTrashBinItem.test.js +67 -0
  892. package/presentation/trashBin/hooks/useDeleteTrashBinItem.test.js.map +1 -0
  893. package/static/svg/search.43fa797c.svg +20 -0
  894. package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone.d.ts +0 -10
  895. package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone.js.map +0 -1
  896. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker.js +0 -68
  897. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker.js.map +0 -1
  898. package/base/Base/Menus/WebinyVersion.d.ts +0 -2
  899. package/base/Base/Menus/WebinyVersion.js +0 -23
  900. package/base/Base/Menus/WebinyVersion.js.map +0 -1
  901. package/base/WebinyVersion.d.ts +0 -2
  902. package/base/WebinyVersion.js +0 -23
  903. package/base/WebinyVersion.js.map +0 -1
  904. package/components/Wcp.d.ts +0 -19
  905. package/components/Wcp.js +0 -37
  906. package/components/Wcp.js.map +0 -1
  907. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.d.ts +0 -8
  908. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.js +0 -17
  909. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.js.map +0 -1
  910. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/usePasswordValidator.d.ts +0 -1
  911. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/usePasswordValidator.js +0 -16
  912. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/usePasswordValidator.js.map +0 -1
@@ -0,0 +1,106 @@
1
+ import { beforeEach, describe, expect, it } from "vitest";
2
+ import { Container } from "@webiny/di";
3
+ import { NotificationsFeature } from "./feature.js";
4
+ import { Notifications } from "./abstractions.js";
5
+ const createNotifications = ()=>{
6
+ const container = new Container();
7
+ NotificationsFeature.register(container);
8
+ return container.resolve(Notifications);
9
+ };
10
+ describe("Notifications", ()=>{
11
+ let notifications;
12
+ beforeEach(()=>{
13
+ notifications = createNotifications();
14
+ });
15
+ it("queues a plain notification with exactly its own fields", ()=>{
16
+ notifications.notify({
17
+ title: "Saved",
18
+ description: "All good."
19
+ });
20
+ expect(notifications.getNotifications()).toEqual([
21
+ {
22
+ id: "notification-1",
23
+ variant: "default",
24
+ title: "Saved",
25
+ description: "All good."
26
+ }
27
+ ]);
28
+ });
29
+ it("queues success and warning notifications with their variant", ()=>{
30
+ notifications.success({
31
+ title: "Done"
32
+ });
33
+ notifications.warning({
34
+ title: "Careful"
35
+ });
36
+ const queued = notifications.getNotifications();
37
+ expect(queued.map((item)=>item.variant)).toEqual([
38
+ "success",
39
+ "warning"
40
+ ]);
41
+ expect(queued.map((item)=>item.id)).toEqual([
42
+ "notification-1",
43
+ "notification-2"
44
+ ]);
45
+ });
46
+ it("queues an error notification with the error variant", ()=>{
47
+ notifications.error({
48
+ title: "Failed",
49
+ description: "Try again."
50
+ });
51
+ expect(notifications.getNotifications()).toEqual([
52
+ {
53
+ id: "notification-1",
54
+ variant: "error",
55
+ title: "Failed",
56
+ description: "Try again."
57
+ }
58
+ ]);
59
+ });
60
+ it("keeps link, duration, position and dismissible on the queued notification", ()=>{
61
+ notifications.success({
62
+ title: "Requested",
63
+ description: "Spring launch",
64
+ link: {
65
+ label: "Open Content Reviews",
66
+ url: "/cms/content-reviews"
67
+ },
68
+ duration: 8000,
69
+ position: "bottom-right",
70
+ dismissible: true
71
+ });
72
+ expect(notifications.getNotifications()).toEqual([
73
+ {
74
+ id: "notification-1",
75
+ variant: "success",
76
+ title: "Requested",
77
+ description: "Spring launch",
78
+ link: {
79
+ label: "Open Content Reviews",
80
+ url: "/cms/content-reviews"
81
+ },
82
+ duration: 8000,
83
+ position: "bottom-right",
84
+ dismissible: true
85
+ }
86
+ ]);
87
+ });
88
+ it("removes a notification by id and leaves the others", ()=>{
89
+ notifications.notify({
90
+ title: "One"
91
+ });
92
+ notifications.error({
93
+ title: "Two"
94
+ });
95
+ notifications.warning({
96
+ title: "Three"
97
+ });
98
+ notifications.remove("notification-2");
99
+ expect(notifications.getNotifications().map((item)=>item.title)).toEqual([
100
+ "One",
101
+ "Three"
102
+ ]);
103
+ });
104
+ });
105
+
106
+ //# sourceMappingURL=Notifications.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/notifications/Notifications.test.js","sources":["../../../src/features/notifications/Notifications.test.ts"],"sourcesContent":["import { beforeEach } from \"vitest\";\nimport { describe } from \"vitest\";\nimport { expect } from \"vitest\";\nimport { it } from \"vitest\";\nimport { Container } from \"@webiny/di\";\nimport { NotificationsFeature } from \"./feature.js\";\nimport { Notifications } from \"./abstractions.js\";\n\nconst createNotifications = (): Notifications.Interface => {\n const container = new Container();\n NotificationsFeature.register(container);\n return container.resolve(Notifications);\n};\n\ndescribe(\"Notifications\", () => {\n let notifications: Notifications.Interface;\n\n beforeEach(() => {\n notifications = createNotifications();\n });\n\n it(\"queues a plain notification with exactly its own fields\", () => {\n notifications.notify({ title: \"Saved\", description: \"All good.\" });\n\n expect(notifications.getNotifications()).toEqual([\n { id: \"notification-1\", variant: \"default\", title: \"Saved\", description: \"All good.\" }\n ]);\n });\n\n it(\"queues success and warning notifications with their variant\", () => {\n notifications.success({ title: \"Done\" });\n notifications.warning({ title: \"Careful\" });\n\n const queued = notifications.getNotifications();\n expect(queued.map(item => item.variant)).toEqual([\"success\", \"warning\"]);\n expect(queued.map(item => item.id)).toEqual([\"notification-1\", \"notification-2\"]);\n });\n\n it(\"queues an error notification with the error variant\", () => {\n notifications.error({ title: \"Failed\", description: \"Try again.\" });\n\n expect(notifications.getNotifications()).toEqual([\n { id: \"notification-1\", variant: \"error\", title: \"Failed\", description: \"Try again.\" }\n ]);\n });\n\n it(\"keeps link, duration, position and dismissible on the queued notification\", () => {\n notifications.success({\n title: \"Requested\",\n description: \"Spring launch\",\n link: { label: \"Open Content Reviews\", url: \"/cms/content-reviews\" },\n duration: 8000,\n position: \"bottom-right\",\n dismissible: true\n });\n\n expect(notifications.getNotifications()).toEqual([\n {\n id: \"notification-1\",\n variant: \"success\",\n title: \"Requested\",\n description: \"Spring launch\",\n link: { label: \"Open Content Reviews\", url: \"/cms/content-reviews\" },\n duration: 8000,\n position: \"bottom-right\",\n dismissible: true\n }\n ]);\n });\n\n it(\"removes a notification by id and leaves the others\", () => {\n notifications.notify({ title: \"One\" });\n notifications.error({ title: \"Two\" });\n notifications.warning({ title: \"Three\" });\n\n notifications.remove(\"notification-2\");\n\n expect(notifications.getNotifications().map(item => item.title)).toEqual([\"One\", \"Three\"]);\n });\n});\n"],"names":["createNotifications","container","Container","NotificationsFeature","Notifications","describe","notifications","beforeEach","it","expect","queued","item"],"mappings":";;;;AAQA,MAAMA,sBAAsB;IACxB,MAAMC,YAAY,IAAIC;IACtBC,qBAAqB,QAAQ,CAACF;IAC9B,OAAOA,UAAU,OAAO,CAACG;AAC7B;AAEAC,SAAS,iBAAiB;IACtB,IAAIC;IAEJC,WAAW;QACPD,gBAAgBN;IACpB;IAEAQ,GAAG,2DAA2D;QAC1DF,cAAc,MAAM,CAAC;YAAE,OAAO;YAAS,aAAa;QAAY;QAEhEG,OAAOH,cAAc,gBAAgB,IAAI,OAAO,CAAC;YAC7C;gBAAE,IAAI;gBAAkB,SAAS;gBAAW,OAAO;gBAAS,aAAa;YAAY;SACxF;IACL;IAEAE,GAAG,+DAA+D;QAC9DF,cAAc,OAAO,CAAC;YAAE,OAAO;QAAO;QACtCA,cAAc,OAAO,CAAC;YAAE,OAAO;QAAU;QAEzC,MAAMI,SAASJ,cAAc,gBAAgB;QAC7CG,OAAOC,OAAO,GAAG,CAACC,CAAAA,OAAQA,KAAK,OAAO,GAAG,OAAO,CAAC;YAAC;YAAW;SAAU;QACvEF,OAAOC,OAAO,GAAG,CAACC,CAAAA,OAAQA,KAAK,EAAE,GAAG,OAAO,CAAC;YAAC;YAAkB;SAAiB;IACpF;IAEAH,GAAG,uDAAuD;QACtDF,cAAc,KAAK,CAAC;YAAE,OAAO;YAAU,aAAa;QAAa;QAEjEG,OAAOH,cAAc,gBAAgB,IAAI,OAAO,CAAC;YAC7C;gBAAE,IAAI;gBAAkB,SAAS;gBAAS,OAAO;gBAAU,aAAa;YAAa;SACxF;IACL;IAEAE,GAAG,6EAA6E;QAC5EF,cAAc,OAAO,CAAC;YAClB,OAAO;YACP,aAAa;YACb,MAAM;gBAAE,OAAO;gBAAwB,KAAK;YAAuB;YACnE,UAAU;YACV,UAAU;YACV,aAAa;QACjB;QAEAG,OAAOH,cAAc,gBAAgB,IAAI,OAAO,CAAC;YAC7C;gBACI,IAAI;gBACJ,SAAS;gBACT,OAAO;gBACP,aAAa;gBACb,MAAM;oBAAE,OAAO;oBAAwB,KAAK;gBAAuB;gBACnE,UAAU;gBACV,UAAU;gBACV,aAAa;YACjB;SACH;IACL;IAEAE,GAAG,sDAAsD;QACrDF,cAAc,MAAM,CAAC;YAAE,OAAO;QAAM;QACpCA,cAAc,KAAK,CAAC;YAAE,OAAO;QAAM;QACnCA,cAAc,OAAO,CAAC;YAAE,OAAO;QAAQ;QAEvCA,cAAc,MAAM,CAAC;QAErBG,OAAOH,cAAc,gBAAgB,GAAG,GAAG,CAACK,CAAAA,OAAQA,KAAK,KAAK,GAAG,OAAO,CAAC;YAAC;YAAO;SAAQ;IAC7F;AACJ"}
@@ -1,7 +1,8 @@
1
+ import React from "react";
1
2
  /**
2
3
  * Standalone consumer of the Notifications queue. Drains queued notifications oldest-first
3
4
  * and shows each one as a toast, then removes it from the queue. Mounted once, app-wide.
4
5
  */
5
- export declare const NotificationsRenderer: (() => null) & {
6
- displayName: string;
6
+ export declare const NotificationsRenderer: (() => null) & React.NamedExoticComponent<unknown> & {
7
+ readonly type: () => null;
7
8
  };
@@ -1,13 +1,24 @@
1
- import { useEffect } from "react";
1
+ import react, { useEffect } from "react";
2
2
  import { observer } from "mobx-react-lite";
3
- import { useFeature } from "@webiny/app";
4
- import { useToast } from "@webiny/admin-ui";
3
+ import { SimpleLink, useFeature } from "@webiny/app";
4
+ import { Icon, useToast } from "@webiny/admin-ui";
5
+ import { ReactComponent } from "@webiny/icons/error.svg";
5
6
  import { NotificationsFeature } from "./feature.js";
6
- const showNotification = (toast, notification)=>{
7
+ const getToastParams = (notification)=>{
7
8
  const params = {
8
9
  title: notification.title,
9
10
  description: notification.description
10
11
  };
12
+ if (void 0 !== notification.duration) params.duration = notification.duration;
13
+ if (void 0 !== notification.position) params.position = notification.position;
14
+ if (void 0 !== notification.dismissible) params.dismissible = notification.dismissible;
15
+ if (notification.link) params.actions = /*#__PURE__*/ react.createElement(SimpleLink, {
16
+ to: notification.link.url
17
+ }, notification.link.label);
18
+ return params;
19
+ };
20
+ const showNotification = (toast, notification)=>{
21
+ const params = getToastParams(notification);
11
22
  switch(notification.variant){
12
23
  case "success":
13
24
  toast.showSuccessToast(params);
@@ -15,6 +26,14 @@ const showNotification = (toast, notification)=>{
15
26
  case "warning":
16
27
  toast.showWarningToast(params);
17
28
  break;
29
+ case "error":
30
+ params.icon = /*#__PURE__*/ react.createElement(Icon, {
31
+ icon: /*#__PURE__*/ react.createElement(ReactComponent, null),
32
+ label: "",
33
+ className: "fill-destructive"
34
+ });
35
+ toast.showToast(params);
36
+ break;
18
37
  default:
19
38
  toast.showToast(params);
20
39
  }
@@ -1 +1 @@
1
- {"version":3,"file":"features/notifications/NotificationsRenderer.js","sources":["../../../src/features/notifications/NotificationsRenderer.tsx"],"sourcesContent":["import { useEffect } from \"react\";\nimport { observer } from \"mobx-react-lite\";\nimport { useFeature } from \"@webiny/app\";\nimport { useToast } from \"@webiny/admin-ui\";\nimport { NotificationsFeature } from \"./feature.js\";\nimport type { INotification } from \"./abstractions.js\";\n\ntype Toast = ReturnType<typeof useToast>;\n\nconst showNotification = (toast: Toast, notification: INotification) => {\n const params = { title: notification.title, description: notification.description };\n switch (notification.variant) {\n case \"success\":\n toast.showSuccessToast(params);\n break;\n case \"warning\":\n toast.showWarningToast(params);\n break;\n default:\n toast.showToast(params);\n }\n};\n\n/**\n * Standalone consumer of the Notifications queue. Drains queued notifications oldest-first\n * and shows each one as a toast, then removes it from the queue. Mounted once, app-wide.\n */\nexport const NotificationsRenderer = observer(() => {\n const { presenter } = useFeature(NotificationsFeature);\n const toast = useToast();\n\n const ids = presenter.vm.notifications.map(notification => notification.id).join(\"|\");\n\n useEffect(() => {\n presenter.vm.notifications.forEach(notification => {\n showNotification(toast, notification);\n presenter.markShown(notification.id);\n });\n // `ids` captures queue changes; `toast`/`presenter` are stable singletons.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [ids]);\n\n return null;\n});\n"],"names":["showNotification","toast","notification","params","NotificationsRenderer","observer","presenter","useFeature","NotificationsFeature","useToast","ids","useEffect"],"mappings":";;;;;AASA,MAAMA,mBAAmB,CAACC,OAAcC;IACpC,MAAMC,SAAS;QAAE,OAAOD,aAAa,KAAK;QAAE,aAAaA,aAAa,WAAW;IAAC;IAClF,OAAQA,aAAa,OAAO;QACxB,KAAK;YACDD,MAAM,gBAAgB,CAACE;YACvB;QACJ,KAAK;YACDF,MAAM,gBAAgB,CAACE;YACvB;QACJ;YACIF,MAAM,SAAS,CAACE;IACxB;AACJ;AAMO,MAAMC,wBAAwBC,SAAS;IAC1C,MAAM,EAAEC,SAAS,EAAE,GAAGC,WAAWC;IACjC,MAAMP,QAAQQ;IAEd,MAAMC,MAAMJ,UAAU,EAAE,CAAC,aAAa,CAAC,GAAG,CAACJ,CAAAA,eAAgBA,aAAa,EAAE,EAAE,IAAI,CAAC;IAEjFS,UAAU;QACNL,UAAU,EAAE,CAAC,aAAa,CAAC,OAAO,CAACJ,CAAAA;YAC/BF,iBAAiBC,OAAOC;YACxBI,UAAU,SAAS,CAACJ,aAAa,EAAE;QACvC;IAGJ,GAAG;QAACQ;KAAI;IAER,OAAO;AACX"}
1
+ {"version":3,"file":"features/notifications/NotificationsRenderer.js","sources":["../../../src/features/notifications/NotificationsRenderer.tsx"],"sourcesContent":["import React from \"react\";\nimport { useEffect } from \"react\";\nimport { observer } from \"mobx-react-lite\";\nimport { SimpleLink } from \"@webiny/app\";\nimport { useFeature } from \"@webiny/app\";\nimport { Icon } from \"@webiny/admin-ui\";\nimport { useToast } from \"@webiny/admin-ui\";\nimport type { ShowToastParams } from \"@webiny/admin-ui\";\nimport { ReactComponent as ErrorIcon } from \"@webiny/icons/error.svg\";\nimport { NotificationsFeature } from \"./feature.js\";\nimport type { INotification } from \"./abstractions.js\";\n\ntype Toast = ReturnType<typeof useToast>;\n\nconst getToastParams = (notification: INotification): ShowToastParams => {\n const params: ShowToastParams = {\n title: notification.title,\n description: notification.description\n };\n\n if (notification.duration !== undefined) {\n params.duration = notification.duration;\n }\n\n if (notification.position !== undefined) {\n params.position = notification.position;\n }\n\n if (notification.dismissible !== undefined) {\n params.dismissible = notification.dismissible;\n }\n\n if (notification.link) {\n params.actions = (\n <SimpleLink to={notification.link.url}>{notification.link.label}</SimpleLink>\n );\n }\n\n return params;\n};\n\nconst showNotification = (toast: Toast, notification: INotification) => {\n const params = getToastParams(notification);\n\n switch (notification.variant) {\n case \"success\":\n toast.showSuccessToast(params);\n break;\n case \"warning\":\n toast.showWarningToast(params);\n break;\n case \"error\":\n params.icon = <Icon icon={<ErrorIcon />} label={\"\"} className={\"fill-destructive\"} />;\n toast.showToast(params);\n break;\n default:\n toast.showToast(params);\n }\n};\n\n/**\n * Standalone consumer of the Notifications queue. Drains queued notifications oldest-first\n * and shows each one as a toast, then removes it from the queue. Mounted once, app-wide.\n */\nexport const NotificationsRenderer = observer(() => {\n const { presenter } = useFeature(NotificationsFeature);\n const toast = useToast();\n\n const ids = presenter.vm.notifications.map(notification => notification.id).join(\"|\");\n\n useEffect(() => {\n presenter.vm.notifications.forEach(notification => {\n showNotification(toast, notification);\n presenter.markShown(notification.id);\n });\n // `ids` captures queue changes; `toast`/`presenter` are stable singletons.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [ids]);\n\n return null;\n});\n"],"names":["getToastParams","notification","params","undefined","SimpleLink","showNotification","toast","Icon","ErrorIcon","NotificationsRenderer","observer","presenter","useFeature","NotificationsFeature","useToast","ids","useEffect"],"mappings":";;;;;;AAcA,MAAMA,iBAAiB,CAACC;IACpB,MAAMC,SAA0B;QAC5B,OAAOD,aAAa,KAAK;QACzB,aAAaA,aAAa,WAAW;IACzC;IAEA,IAAIA,AAA0BE,WAA1BF,aAAa,QAAQ,EACrBC,OAAO,QAAQ,GAAGD,aAAa,QAAQ;IAG3C,IAAIA,AAA0BE,WAA1BF,aAAa,QAAQ,EACrBC,OAAO,QAAQ,GAAGD,aAAa,QAAQ;IAG3C,IAAIA,AAA6BE,WAA7BF,aAAa,WAAW,EACxBC,OAAO,WAAW,GAAGD,aAAa,WAAW;IAGjD,IAAIA,aAAa,IAAI,EACjBC,OAAO,OAAO,GAAG,WAAH,GACV,oBAACE,YAAUA;QAAC,IAAIH,aAAa,IAAI,CAAC,GAAG;OAAGA,aAAa,IAAI,CAAC,KAAK;IAIvE,OAAOC;AACX;AAEA,MAAMG,mBAAmB,CAACC,OAAcL;IACpC,MAAMC,SAASF,eAAeC;IAE9B,OAAQA,aAAa,OAAO;QACxB,KAAK;YACDK,MAAM,gBAAgB,CAACJ;YACvB;QACJ,KAAK;YACDI,MAAM,gBAAgB,CAACJ;YACvB;QACJ,KAAK;YACDA,OAAO,IAAI,GAAG,WAAH,GAAG,oBAACK,MAAIA;gBAAC,oBAAM,oBAACC,gBAASA;gBAAK,OAAO;gBAAI,WAAW;;YAC/DF,MAAM,SAAS,CAACJ;YAChB;QACJ;YACII,MAAM,SAAS,CAACJ;IACxB;AACJ;AAMO,MAAMO,wBAAwBC,SAAS;IAC1C,MAAM,EAAEC,SAAS,EAAE,GAAGC,WAAWC;IACjC,MAAMP,QAAQQ;IAEd,MAAMC,MAAMJ,UAAU,EAAE,CAAC,aAAa,CAAC,GAAG,CAACV,CAAAA,eAAgBA,aAAa,EAAE,EAAE,IAAI,CAAC;IAEjFe,UAAU;QACNL,UAAU,EAAE,CAAC,aAAa,CAAC,OAAO,CAACV,CAAAA;YAC/BI,iBAAiBC,OAAOL;YACxBU,UAAU,SAAS,CAACV,aAAa,EAAE;QACvC;IAGJ,GAAG;QAACc;KAAI;IAER,OAAO;AACX"}
@@ -0,0 +1,261 @@
1
+ import react_0 from "react";
2
+ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
3
+ import { cleanup, render, screen } from "@testing-library/react";
4
+ import { NotificationsRenderer } from "./NotificationsRenderer.js";
5
+ const mocks = vi.hoisted(()=>({
6
+ toast: {
7
+ showToast: vi.fn(),
8
+ showSuccessToast: vi.fn(),
9
+ showWarningToast: vi.fn()
10
+ },
11
+ presenter: {
12
+ vm: {
13
+ notifications: []
14
+ },
15
+ markShown: vi.fn()
16
+ }
17
+ }));
18
+ vi.mock("@webiny/admin-ui", async ()=>{
19
+ const react = await import("react");
20
+ return {
21
+ useToast: ()=>mocks.toast,
22
+ Icon: (props)=>react.createElement("span", {
23
+ "data-testid": "toast-icon",
24
+ className: props.className
25
+ })
26
+ };
27
+ });
28
+ vi.mock("@webiny/app", async ()=>{
29
+ const react = await import("react");
30
+ return {
31
+ useFeature: ()=>({
32
+ presenter: mocks.presenter
33
+ }),
34
+ SimpleLink: (props)=>react.createElement("a", {
35
+ href: props.to
36
+ }, props.children)
37
+ };
38
+ });
39
+ vi.mock("@webiny/icons/error.svg", ()=>({
40
+ ReactComponent: ()=>null
41
+ }));
42
+ vi.mock("./feature.js", ()=>({
43
+ NotificationsFeature: {}
44
+ }));
45
+ const notificationOf = (overrides)=>({
46
+ id: "notification-1",
47
+ variant: "default",
48
+ title: "Title",
49
+ ...overrides
50
+ });
51
+ const renderQueue = (notifications)=>{
52
+ mocks.presenter.vm = {
53
+ notifications
54
+ };
55
+ render(/*#__PURE__*/ react_0.createElement(NotificationsRenderer, null));
56
+ };
57
+ describe("NotificationsRenderer", ()=>{
58
+ beforeEach(()=>{
59
+ mocks.toast.showToast.mockReset();
60
+ mocks.toast.showSuccessToast.mockReset();
61
+ mocks.toast.showWarningToast.mockReset();
62
+ mocks.presenter.markShown.mockReset();
63
+ });
64
+ afterEach(()=>{
65
+ cleanup();
66
+ });
67
+ describe("a notification without the new fields keeps today's call", ()=>{
68
+ it("default calls showToast with title and description only", ()=>{
69
+ renderQueue([
70
+ notificationOf({
71
+ description: "Body"
72
+ })
73
+ ]);
74
+ expect(mocks.toast.showToast).toHaveBeenCalledTimes(1);
75
+ expect(mocks.toast.showToast.mock.calls[0][0]).toStrictEqual({
76
+ title: "Title",
77
+ description: "Body"
78
+ });
79
+ expect(mocks.toast.showSuccessToast).not.toHaveBeenCalled();
80
+ expect(mocks.toast.showWarningToast).not.toHaveBeenCalled();
81
+ expect(mocks.presenter.markShown).toHaveBeenCalledTimes(1);
82
+ expect(mocks.presenter.markShown).toHaveBeenCalledWith("notification-1");
83
+ });
84
+ it("default without a description keeps the description key undefined", ()=>{
85
+ renderQueue([
86
+ notificationOf({})
87
+ ]);
88
+ expect(mocks.toast.showToast.mock.calls[0][0]).toStrictEqual({
89
+ title: "Title",
90
+ description: void 0
91
+ });
92
+ });
93
+ it("success calls showSuccessToast with title and description only", ()=>{
94
+ renderQueue([
95
+ notificationOf({
96
+ variant: "success",
97
+ description: "Body"
98
+ })
99
+ ]);
100
+ expect(mocks.toast.showSuccessToast).toHaveBeenCalledTimes(1);
101
+ expect(mocks.toast.showSuccessToast.mock.calls[0][0]).toStrictEqual({
102
+ title: "Title",
103
+ description: "Body"
104
+ });
105
+ expect(mocks.toast.showToast).not.toHaveBeenCalled();
106
+ expect(mocks.presenter.markShown).toHaveBeenCalledTimes(1);
107
+ });
108
+ it("warning calls showWarningToast with title and description only", ()=>{
109
+ renderQueue([
110
+ notificationOf({
111
+ variant: "warning",
112
+ description: "Body"
113
+ })
114
+ ]);
115
+ expect(mocks.toast.showWarningToast).toHaveBeenCalledTimes(1);
116
+ expect(mocks.toast.showWarningToast.mock.calls[0][0]).toStrictEqual({
117
+ title: "Title",
118
+ description: "Body"
119
+ });
120
+ expect(mocks.toast.showToast).not.toHaveBeenCalled();
121
+ expect(mocks.presenter.markShown).toHaveBeenCalledTimes(1);
122
+ });
123
+ });
124
+ describe("a notification with the new fields", ()=>{
125
+ it("passes duration, position and dismissible through", ()=>{
126
+ renderQueue([
127
+ notificationOf({
128
+ variant: "success",
129
+ description: "Body",
130
+ duration: 8000,
131
+ position: "bottom-right",
132
+ dismissible: true
133
+ })
134
+ ]);
135
+ expect(mocks.toast.showSuccessToast.mock.calls[0][0]).toStrictEqual({
136
+ title: "Title",
137
+ description: "Body",
138
+ duration: 8000,
139
+ position: "bottom-right",
140
+ dismissible: true
141
+ });
142
+ });
143
+ it("forwards an explicit dismissible false and a zero duration", ()=>{
144
+ renderQueue([
145
+ notificationOf({
146
+ dismissible: false,
147
+ duration: 0
148
+ })
149
+ ]);
150
+ expect(mocks.toast.showToast.mock.calls[0][0]).toStrictEqual({
151
+ title: "Title",
152
+ description: void 0,
153
+ duration: 0,
154
+ dismissible: false
155
+ });
156
+ });
157
+ it("passes only the fields that are set", ()=>{
158
+ renderQueue([
159
+ notificationOf({
160
+ position: "top-center"
161
+ })
162
+ ]);
163
+ expect(mocks.toast.showToast.mock.calls[0][0]).toStrictEqual({
164
+ title: "Title",
165
+ description: void 0,
166
+ position: "top-center"
167
+ });
168
+ });
169
+ it("renders the link as an in-app link action", ()=>{
170
+ renderQueue([
171
+ notificationOf({
172
+ variant: "success",
173
+ link: {
174
+ label: "Open Content Reviews",
175
+ url: "/cms/content-reviews"
176
+ }
177
+ })
178
+ ]);
179
+ const params = mocks.toast.showSuccessToast.mock.calls[0][0];
180
+ expect(/*#__PURE__*/ react_0.isValidElement(params.actions)).toBe(true);
181
+ render(/*#__PURE__*/ react_0.createElement("div", null, params.actions));
182
+ const link = screen.getByRole("link", {
183
+ name: "Open Content Reviews"
184
+ });
185
+ expect(link.getAttribute("href")).toBe("/cms/content-reviews");
186
+ });
187
+ it("adds no actions without a link", ()=>{
188
+ renderQueue([
189
+ notificationOf({
190
+ duration: 8000
191
+ })
192
+ ]);
193
+ expect(mocks.toast.showToast.mock.calls[0][0]).not.toHaveProperty("actions");
194
+ });
195
+ it("error calls showToast with the destructive error icon and the other fields", ()=>{
196
+ renderQueue([
197
+ notificationOf({
198
+ variant: "error",
199
+ description: "Body",
200
+ duration: 8000,
201
+ position: "bottom-right",
202
+ dismissible: true
203
+ })
204
+ ]);
205
+ expect(mocks.toast.showToast).toHaveBeenCalledTimes(1);
206
+ expect(mocks.toast.showSuccessToast).not.toHaveBeenCalled();
207
+ expect(mocks.toast.showWarningToast).not.toHaveBeenCalled();
208
+ const params = mocks.toast.showToast.mock.calls[0][0];
209
+ expect(params.title).toBe("Title");
210
+ expect(params.description).toBe("Body");
211
+ expect(params.duration).toBe(8000);
212
+ expect(params.position).toBe("bottom-right");
213
+ expect(params.dismissible).toBe(true);
214
+ expect(/*#__PURE__*/ react_0.isValidElement(params.icon)).toBe(true);
215
+ expect(params.icon.props.className).toBe("fill-destructive");
216
+ });
217
+ it("error without the new fields still shows through showToast with the icon", ()=>{
218
+ renderQueue([
219
+ notificationOf({
220
+ variant: "error"
221
+ })
222
+ ]);
223
+ const params = mocks.toast.showToast.mock.calls[0][0];
224
+ expect(Object.keys(params).sort()).toEqual([
225
+ "description",
226
+ "icon",
227
+ "title"
228
+ ]);
229
+ });
230
+ });
231
+ it("shows every queued notification oldest first and marks each shown once", ()=>{
232
+ renderQueue([
233
+ notificationOf({
234
+ id: "notification-1",
235
+ title: "One"
236
+ }),
237
+ notificationOf({
238
+ id: "notification-2",
239
+ variant: "warning",
240
+ title: "Two"
241
+ }),
242
+ notificationOf({
243
+ id: "notification-3",
244
+ variant: "error",
245
+ title: "Three"
246
+ })
247
+ ]);
248
+ expect(mocks.toast.showToast.mock.calls.map((call)=>call[0].title)).toEqual([
249
+ "One",
250
+ "Three"
251
+ ]);
252
+ expect(mocks.toast.showWarningToast.mock.calls[0][0].title).toBe("Two");
253
+ expect(mocks.presenter.markShown.mock.calls.map((call)=>call[0])).toEqual([
254
+ "notification-1",
255
+ "notification-2",
256
+ "notification-3"
257
+ ]);
258
+ });
259
+ });
260
+
261
+ //# sourceMappingURL=NotificationsRenderer.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/notifications/NotificationsRenderer.test.js","sources":["../../../src/features/notifications/NotificationsRenderer.test.tsx"],"sourcesContent":["import React from \"react\";\nimport { afterEach } from \"vitest\";\nimport type { Mock } from \"vitest\";\nimport { beforeEach } from \"vitest\";\nimport { describe } from \"vitest\";\nimport { expect } from \"vitest\";\nimport { it } from \"vitest\";\nimport { vi } from \"vitest\";\nimport { cleanup } from \"@testing-library/react\";\nimport { render } from \"@testing-library/react\";\nimport { screen } from \"@testing-library/react\";\nimport { NotificationsRenderer } from \"./NotificationsRenderer.js\";\nimport type { INotification } from \"./abstractions.js\";\n\ninterface RendererMocks {\n toast: {\n showToast: Mock;\n showSuccessToast: Mock;\n showWarningToast: Mock;\n };\n presenter: {\n vm: { notifications: INotification[] };\n markShown: Mock;\n };\n}\n\nconst mocks = vi.hoisted((): RendererMocks => {\n return {\n toast: {\n showToast: vi.fn(),\n showSuccessToast: vi.fn(),\n showWarningToast: vi.fn()\n },\n presenter: {\n vm: { notifications: [] },\n markShown: vi.fn()\n }\n };\n});\n\nvi.mock(\"@webiny/admin-ui\", async () => {\n const react = await import(\"react\");\n return {\n useToast: () => mocks.toast,\n Icon: (props: { className?: string }) => {\n return react.createElement(\"span\", {\n \"data-testid\": \"toast-icon\",\n className: props.className\n });\n }\n };\n});\n\nvi.mock(\"@webiny/app\", async () => {\n const react = await import(\"react\");\n return {\n useFeature: () => ({ presenter: mocks.presenter }),\n SimpleLink: (props: { to: string; children?: React.ReactNode }) => {\n return react.createElement(\"a\", { href: props.to }, props.children);\n }\n };\n});\n\nvi.mock(\"@webiny/icons/error.svg\", () => {\n return { ReactComponent: () => null };\n});\n\nvi.mock(\"./feature.js\", () => {\n return { NotificationsFeature: {} };\n});\n\nconst notificationOf = (overrides: Partial<INotification>): INotification => {\n return { id: \"notification-1\", variant: \"default\", title: \"Title\", ...overrides };\n};\n\nconst renderQueue = (notifications: INotification[]): void => {\n mocks.presenter.vm = { notifications };\n render(<NotificationsRenderer />);\n};\n\ndescribe(\"NotificationsRenderer\", () => {\n beforeEach(() => {\n mocks.toast.showToast.mockReset();\n mocks.toast.showSuccessToast.mockReset();\n mocks.toast.showWarningToast.mockReset();\n mocks.presenter.markShown.mockReset();\n });\n\n afterEach(() => {\n cleanup();\n });\n\n describe(\"a notification without the new fields keeps today's call\", () => {\n it(\"default calls showToast with title and description only\", () => {\n renderQueue([notificationOf({ description: \"Body\" })]);\n\n expect(mocks.toast.showToast).toHaveBeenCalledTimes(1);\n expect(mocks.toast.showToast.mock.calls[0][0]).toStrictEqual({\n title: \"Title\",\n description: \"Body\"\n });\n expect(mocks.toast.showSuccessToast).not.toHaveBeenCalled();\n expect(mocks.toast.showWarningToast).not.toHaveBeenCalled();\n expect(mocks.presenter.markShown).toHaveBeenCalledTimes(1);\n expect(mocks.presenter.markShown).toHaveBeenCalledWith(\"notification-1\");\n });\n\n it(\"default without a description keeps the description key undefined\", () => {\n renderQueue([notificationOf({})]);\n\n expect(mocks.toast.showToast.mock.calls[0][0]).toStrictEqual({\n title: \"Title\",\n description: undefined\n });\n });\n\n it(\"success calls showSuccessToast with title and description only\", () => {\n renderQueue([notificationOf({ variant: \"success\", description: \"Body\" })]);\n\n expect(mocks.toast.showSuccessToast).toHaveBeenCalledTimes(1);\n expect(mocks.toast.showSuccessToast.mock.calls[0][0]).toStrictEqual({\n title: \"Title\",\n description: \"Body\"\n });\n expect(mocks.toast.showToast).not.toHaveBeenCalled();\n expect(mocks.presenter.markShown).toHaveBeenCalledTimes(1);\n });\n\n it(\"warning calls showWarningToast with title and description only\", () => {\n renderQueue([notificationOf({ variant: \"warning\", description: \"Body\" })]);\n\n expect(mocks.toast.showWarningToast).toHaveBeenCalledTimes(1);\n expect(mocks.toast.showWarningToast.mock.calls[0][0]).toStrictEqual({\n title: \"Title\",\n description: \"Body\"\n });\n expect(mocks.toast.showToast).not.toHaveBeenCalled();\n expect(mocks.presenter.markShown).toHaveBeenCalledTimes(1);\n });\n });\n\n describe(\"a notification with the new fields\", () => {\n it(\"passes duration, position and dismissible through\", () => {\n renderQueue([\n notificationOf({\n variant: \"success\",\n description: \"Body\",\n duration: 8000,\n position: \"bottom-right\",\n dismissible: true\n })\n ]);\n\n expect(mocks.toast.showSuccessToast.mock.calls[0][0]).toStrictEqual({\n title: \"Title\",\n description: \"Body\",\n duration: 8000,\n position: \"bottom-right\",\n dismissible: true\n });\n });\n\n it(\"forwards an explicit dismissible false and a zero duration\", () => {\n renderQueue([notificationOf({ dismissible: false, duration: 0 })]);\n\n expect(mocks.toast.showToast.mock.calls[0][0]).toStrictEqual({\n title: \"Title\",\n description: undefined,\n duration: 0,\n dismissible: false\n });\n });\n\n it(\"passes only the fields that are set\", () => {\n renderQueue([notificationOf({ position: \"top-center\" })]);\n\n expect(mocks.toast.showToast.mock.calls[0][0]).toStrictEqual({\n title: \"Title\",\n description: undefined,\n position: \"top-center\"\n });\n });\n\n it(\"renders the link as an in-app link action\", () => {\n renderQueue([\n notificationOf({\n variant: \"success\",\n link: { label: \"Open Content Reviews\", url: \"/cms/content-reviews\" }\n })\n ]);\n\n const params = mocks.toast.showSuccessToast.mock.calls[0][0];\n expect(React.isValidElement(params.actions)).toBe(true);\n\n render(<div>{params.actions}</div>);\n\n const link = screen.getByRole(\"link\", { name: \"Open Content Reviews\" });\n expect(link.getAttribute(\"href\")).toBe(\"/cms/content-reviews\");\n });\n\n it(\"adds no actions without a link\", () => {\n renderQueue([notificationOf({ duration: 8000 })]);\n\n expect(mocks.toast.showToast.mock.calls[0][0]).not.toHaveProperty(\"actions\");\n });\n\n it(\"error calls showToast with the destructive error icon and the other fields\", () => {\n renderQueue([\n notificationOf({\n variant: \"error\",\n description: \"Body\",\n duration: 8000,\n position: \"bottom-right\",\n dismissible: true\n })\n ]);\n\n expect(mocks.toast.showToast).toHaveBeenCalledTimes(1);\n expect(mocks.toast.showSuccessToast).not.toHaveBeenCalled();\n expect(mocks.toast.showWarningToast).not.toHaveBeenCalled();\n\n const params = mocks.toast.showToast.mock.calls[0][0];\n expect(params.title).toBe(\"Title\");\n expect(params.description).toBe(\"Body\");\n expect(params.duration).toBe(8000);\n expect(params.position).toBe(\"bottom-right\");\n expect(params.dismissible).toBe(true);\n expect(React.isValidElement(params.icon)).toBe(true);\n expect(params.icon.props.className).toBe(\"fill-destructive\");\n });\n\n it(\"error without the new fields still shows through showToast with the icon\", () => {\n renderQueue([notificationOf({ variant: \"error\" })]);\n\n const params = mocks.toast.showToast.mock.calls[0][0];\n expect(Object.keys(params).sort()).toEqual([\"description\", \"icon\", \"title\"]);\n });\n });\n\n it(\"shows every queued notification oldest first and marks each shown once\", () => {\n renderQueue([\n notificationOf({ id: \"notification-1\", title: \"One\" }),\n notificationOf({ id: \"notification-2\", variant: \"warning\", title: \"Two\" }),\n notificationOf({ id: \"notification-3\", variant: \"error\", title: \"Three\" })\n ]);\n\n expect(mocks.toast.showToast.mock.calls.map(call => call[0].title)).toEqual([\n \"One\",\n \"Three\"\n ]);\n expect(mocks.toast.showWarningToast.mock.calls[0][0].title).toBe(\"Two\");\n expect(mocks.presenter.markShown.mock.calls.map(call => call[0])).toEqual([\n \"notification-1\",\n \"notification-2\",\n \"notification-3\"\n ]);\n });\n});\n"],"names":["mocks","vi","react","props","notificationOf","overrides","renderQueue","notifications","render","NotificationsRenderer","describe","beforeEach","afterEach","cleanup","it","expect","undefined","params","React","link","screen","Object","call"],"mappings":";;;;AA0BA,MAAMA,QAAQC,GAAG,OAAO,CAAC,IACd;QACH,OAAO;YACH,WAAWA,GAAG,EAAE;YAChB,kBAAkBA,GAAG,EAAE;YACvB,kBAAkBA,GAAG,EAAE;QAC3B;QACA,WAAW;YACP,IAAI;gBAAE,eAAe,EAAE;YAAC;YACxB,WAAWA,GAAG,EAAE;QACpB;IACJ;AAGJA,GAAG,IAAI,CAAC,oBAAoB;IACxB,MAAMC,QAAQ,MAAM,MAAM,CAAC;IAC3B,OAAO;QACH,UAAU,IAAMF,MAAM,KAAK;QAC3B,MAAM,CAACG,QACID,MAAM,aAAa,CAAC,QAAQ;gBAC/B,eAAe;gBACf,WAAWC,MAAM,SAAS;YAC9B;IAER;AACJ;AAEAF,GAAG,IAAI,CAAC,eAAe;IACnB,MAAMC,QAAQ,MAAM,MAAM,CAAC;IAC3B,OAAO;QACH,YAAY,IAAO;gBAAE,WAAWF,MAAM,SAAS;YAAC;QAChD,YAAY,CAACG,QACFD,MAAM,aAAa,CAAC,KAAK;gBAAE,MAAMC,MAAM,EAAE;YAAC,GAAGA,MAAM,QAAQ;IAE1E;AACJ;AAEAF,GAAG,IAAI,CAAC,2BAA2B,IACxB;QAAE,gBAAgB,IAAM;IAAK;AAGxCA,GAAG,IAAI,CAAC,gBAAgB,IACb;QAAE,sBAAsB,CAAC;IAAE;AAGtC,MAAMG,iBAAiB,CAACC,YACb;QAAE,IAAI;QAAkB,SAAS;QAAW,OAAO;QAAS,GAAGA,SAAS;IAAC;AAGpF,MAAMC,cAAc,CAACC;IACjBP,MAAM,SAAS,CAAC,EAAE,GAAG;QAAEO;IAAc;IACrCC,OAAO,WAADA,GAAC,sBAACC,uBAAqBA;AACjC;AAEAC,SAAS,yBAAyB;IAC9BC,WAAW;QACPX,MAAM,KAAK,CAAC,SAAS,CAAC,SAAS;QAC/BA,MAAM,KAAK,CAAC,gBAAgB,CAAC,SAAS;QACtCA,MAAM,KAAK,CAAC,gBAAgB,CAAC,SAAS;QACtCA,MAAM,SAAS,CAAC,SAAS,CAAC,SAAS;IACvC;IAEAY,UAAU;QACNC;IACJ;IAEAH,SAAS,4DAA4D;QACjEI,GAAG,2DAA2D;YAC1DR,YAAY;gBAACF,eAAe;oBAAE,aAAa;gBAAO;aAAG;YAErDW,OAAOf,MAAM,KAAK,CAAC,SAAS,EAAE,qBAAqB,CAAC;YACpDe,OAAOf,MAAM,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,aAAa,CAAC;gBACzD,OAAO;gBACP,aAAa;YACjB;YACAe,OAAOf,MAAM,KAAK,CAAC,gBAAgB,EAAE,GAAG,CAAC,gBAAgB;YACzDe,OAAOf,MAAM,KAAK,CAAC,gBAAgB,EAAE,GAAG,CAAC,gBAAgB;YACzDe,OAAOf,MAAM,SAAS,CAAC,SAAS,EAAE,qBAAqB,CAAC;YACxDe,OAAOf,MAAM,SAAS,CAAC,SAAS,EAAE,oBAAoB,CAAC;QAC3D;QAEAc,GAAG,qEAAqE;YACpER,YAAY;gBAACF,eAAe,CAAC;aAAG;YAEhCW,OAAOf,MAAM,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,aAAa,CAAC;gBACzD,OAAO;gBACP,aAAagB;YACjB;QACJ;QAEAF,GAAG,kEAAkE;YACjER,YAAY;gBAACF,eAAe;oBAAE,SAAS;oBAAW,aAAa;gBAAO;aAAG;YAEzEW,OAAOf,MAAM,KAAK,CAAC,gBAAgB,EAAE,qBAAqB,CAAC;YAC3De,OAAOf,MAAM,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,aAAa,CAAC;gBAChE,OAAO;gBACP,aAAa;YACjB;YACAe,OAAOf,MAAM,KAAK,CAAC,SAAS,EAAE,GAAG,CAAC,gBAAgB;YAClDe,OAAOf,MAAM,SAAS,CAAC,SAAS,EAAE,qBAAqB,CAAC;QAC5D;QAEAc,GAAG,kEAAkE;YACjER,YAAY;gBAACF,eAAe;oBAAE,SAAS;oBAAW,aAAa;gBAAO;aAAG;YAEzEW,OAAOf,MAAM,KAAK,CAAC,gBAAgB,EAAE,qBAAqB,CAAC;YAC3De,OAAOf,MAAM,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,aAAa,CAAC;gBAChE,OAAO;gBACP,aAAa;YACjB;YACAe,OAAOf,MAAM,KAAK,CAAC,SAAS,EAAE,GAAG,CAAC,gBAAgB;YAClDe,OAAOf,MAAM,SAAS,CAAC,SAAS,EAAE,qBAAqB,CAAC;QAC5D;IACJ;IAEAU,SAAS,sCAAsC;QAC3CI,GAAG,qDAAqD;YACpDR,YAAY;gBACRF,eAAe;oBACX,SAAS;oBACT,aAAa;oBACb,UAAU;oBACV,UAAU;oBACV,aAAa;gBACjB;aACH;YAEDW,OAAOf,MAAM,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,aAAa,CAAC;gBAChE,OAAO;gBACP,aAAa;gBACb,UAAU;gBACV,UAAU;gBACV,aAAa;YACjB;QACJ;QAEAc,GAAG,8DAA8D;YAC7DR,YAAY;gBAACF,eAAe;oBAAE,aAAa;oBAAO,UAAU;gBAAE;aAAG;YAEjEW,OAAOf,MAAM,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,aAAa,CAAC;gBACzD,OAAO;gBACP,aAAagB;gBACb,UAAU;gBACV,aAAa;YACjB;QACJ;QAEAF,GAAG,uCAAuC;YACtCR,YAAY;gBAACF,eAAe;oBAAE,UAAU;gBAAa;aAAG;YAExDW,OAAOf,MAAM,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,aAAa,CAAC;gBACzD,OAAO;gBACP,aAAagB;gBACb,UAAU;YACd;QACJ;QAEAF,GAAG,6CAA6C;YAC5CR,YAAY;gBACRF,eAAe;oBACX,SAAS;oBACT,MAAM;wBAAE,OAAO;wBAAwB,KAAK;oBAAuB;gBACvE;aACH;YAED,MAAMa,SAASjB,MAAM,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE;YAC5De,OAAO,WAADA,GAACG,QAAAA,cAAoB,CAACD,OAAO,OAAO,GAAG,IAAI,CAAC;YAElDT,OAAO,WAADA,GAAC,sBAAC,aAAKS,OAAO,OAAO;YAE3B,MAAME,OAAOC,OAAO,SAAS,CAAC,QAAQ;gBAAE,MAAM;YAAuB;YACrEL,OAAOI,KAAK,YAAY,CAAC,SAAS,IAAI,CAAC;QAC3C;QAEAL,GAAG,kCAAkC;YACjCR,YAAY;gBAACF,eAAe;oBAAE,UAAU;gBAAK;aAAG;YAEhDW,OAAOf,MAAM,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,EAAE,GAAG,CAAC,cAAc,CAAC;QACtE;QAEAc,GAAG,8EAA8E;YAC7ER,YAAY;gBACRF,eAAe;oBACX,SAAS;oBACT,aAAa;oBACb,UAAU;oBACV,UAAU;oBACV,aAAa;gBACjB;aACH;YAEDW,OAAOf,MAAM,KAAK,CAAC,SAAS,EAAE,qBAAqB,CAAC;YACpDe,OAAOf,MAAM,KAAK,CAAC,gBAAgB,EAAE,GAAG,CAAC,gBAAgB;YACzDe,OAAOf,MAAM,KAAK,CAAC,gBAAgB,EAAE,GAAG,CAAC,gBAAgB;YAEzD,MAAMiB,SAASjB,MAAM,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE;YACrDe,OAAOE,OAAO,KAAK,EAAE,IAAI,CAAC;YAC1BF,OAAOE,OAAO,WAAW,EAAE,IAAI,CAAC;YAChCF,OAAOE,OAAO,QAAQ,EAAE,IAAI,CAAC;YAC7BF,OAAOE,OAAO,QAAQ,EAAE,IAAI,CAAC;YAC7BF,OAAOE,OAAO,WAAW,EAAE,IAAI,CAAC;YAChCF,OAAO,WAADA,GAACG,QAAAA,cAAoB,CAACD,OAAO,IAAI,GAAG,IAAI,CAAC;YAC/CF,OAAOE,OAAO,IAAI,CAAC,KAAK,CAAC,SAAS,EAAE,IAAI,CAAC;QAC7C;QAEAH,GAAG,4EAA4E;YAC3ER,YAAY;gBAACF,eAAe;oBAAE,SAAS;gBAAQ;aAAG;YAElD,MAAMa,SAASjB,MAAM,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE;YACrDe,OAAOM,OAAO,IAAI,CAACJ,QAAQ,IAAI,IAAI,OAAO,CAAC;gBAAC;gBAAe;gBAAQ;aAAQ;QAC/E;IACJ;IAEAH,GAAG,0EAA0E;QACzER,YAAY;YACRF,eAAe;gBAAE,IAAI;gBAAkB,OAAO;YAAM;YACpDA,eAAe;gBAAE,IAAI;gBAAkB,SAAS;gBAAW,OAAO;YAAM;YACxEA,eAAe;gBAAE,IAAI;gBAAkB,SAAS;gBAAS,OAAO;YAAQ;SAC3E;QAEDW,OAAOf,MAAM,KAAK,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAACsB,CAAAA,OAAQA,IAAI,CAAC,EAAE,CAAC,KAAK,GAAG,OAAO,CAAC;YACxE;YACA;SACH;QACDP,OAAOf,MAAM,KAAK,CAAC,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,KAAK,EAAE,IAAI,CAAC;QACjEe,OAAOf,MAAM,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAACsB,CAAAA,OAAQA,IAAI,CAAC,EAAE,GAAG,OAAO,CAAC;YACtE;YACA;YACA;SACH;IACL;AACJ"}
@@ -1,7 +1,16 @@
1
- export type NotificationVariant = "default" | "success" | "warning";
1
+ export type NotificationVariant = "default" | "success" | "warning" | "error";
2
+ export type NotificationPosition = "top-left" | "top-center" | "top-right" | "bottom-left" | "bottom-center" | "bottom-right";
3
+ export interface INotificationLink {
4
+ label: string;
5
+ url: string;
6
+ }
2
7
  export interface INotificationInput {
3
8
  title: string;
4
9
  description?: string;
10
+ link?: INotificationLink;
11
+ duration?: number;
12
+ position?: NotificationPosition;
13
+ dismissible?: boolean;
5
14
  }
6
15
  export interface INotification extends INotificationInput {
7
16
  id: string;
@@ -9,12 +18,14 @@ export interface INotification extends INotificationInput {
9
18
  }
10
19
  /**
11
20
  * App-wide notification queue. Any feature can inject this and call `notify()` / `success()` /
12
- * `warning()` to surface a notification on screen, without depending on React or the toast UI.
21
+ * `warning()` / `error()` to surface a notification on screen, without depending on React or the
22
+ * toast UI.
13
23
  */
14
24
  export interface INotifications {
15
25
  notify(notification: INotificationInput): void;
16
26
  success(notification: INotificationInput): void;
17
27
  warning(notification: INotificationInput): void;
28
+ error(notification: INotificationInput): void;
18
29
  getNotifications(): INotification[];
19
30
  remove(id: string): void;
20
31
  }
@@ -1 +1 @@
1
- {"version":3,"file":"features/notifications/abstractions.js","sources":["../../../src/features/notifications/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\n\nexport type NotificationVariant = \"default\" | \"success\" | \"warning\";\n\nexport interface INotificationInput {\n title: string;\n description?: string;\n}\n\nexport interface INotification extends INotificationInput {\n id: string;\n variant: NotificationVariant;\n}\n\n/**\n * App-wide notification queue. Any feature can inject this and call `notify()` / `success()` /\n * `warning()` to surface a notification on screen, without depending on React or the toast UI.\n */\nexport interface INotifications {\n notify(notification: INotificationInput): void;\n success(notification: INotificationInput): void;\n warning(notification: INotificationInput): void;\n getNotifications(): INotification[];\n remove(id: string): void;\n}\n\nexport const Notifications = createAbstraction<INotifications>(\"Notifications\");\n\nexport namespace Notifications {\n export type Interface = INotifications;\n}\n\nexport interface INotificationsViewModel {\n notifications: INotification[];\n}\n\n/**\n * Presents queued notifications (oldest first) to the UI layer, which renders them in order.\n */\nexport interface INotificationsPresenter {\n readonly vm: INotificationsViewModel;\n markShown(id: string): void;\n}\n\nexport const NotificationsPresenter =\n createAbstraction<INotificationsPresenter>(\"NotificationsPresenter\");\n\nexport namespace NotificationsPresenter {\n export type Interface = INotificationsPresenter;\n}\n"],"names":["Notifications","createAbstraction","NotificationsPresenter"],"mappings":";AA0BO,MAAMA,gBAAgBC,kBAAkC;AAkBxD,MAAMC,yBACTD,kBAA2C"}
1
+ {"version":3,"file":"features/notifications/abstractions.js","sources":["../../../src/features/notifications/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\n\nexport type NotificationVariant = \"default\" | \"success\" | \"warning\" | \"error\";\n\nexport type NotificationPosition =\n | \"top-left\"\n | \"top-center\"\n | \"top-right\"\n | \"bottom-left\"\n | \"bottom-center\"\n | \"bottom-right\";\n\nexport interface INotificationLink {\n label: string;\n url: string;\n}\n\nexport interface INotificationInput {\n title: string;\n description?: string;\n link?: INotificationLink;\n duration?: number;\n position?: NotificationPosition;\n dismissible?: boolean;\n}\n\nexport interface INotification extends INotificationInput {\n id: string;\n variant: NotificationVariant;\n}\n\n/**\n * App-wide notification queue. Any feature can inject this and call `notify()` / `success()` /\n * `warning()` / `error()` to surface a notification on screen, without depending on React or the\n * toast UI.\n */\nexport interface INotifications {\n notify(notification: INotificationInput): void;\n success(notification: INotificationInput): void;\n warning(notification: INotificationInput): void;\n error(notification: INotificationInput): void;\n getNotifications(): INotification[];\n remove(id: string): void;\n}\n\nexport const Notifications = createAbstraction<INotifications>(\"Notifications\");\n\nexport namespace Notifications {\n export type Interface = INotifications;\n}\n\nexport interface INotificationsViewModel {\n notifications: INotification[];\n}\n\n/**\n * Presents queued notifications (oldest first) to the UI layer, which renders them in order.\n */\nexport interface INotificationsPresenter {\n readonly vm: INotificationsViewModel;\n markShown(id: string): void;\n}\n\nexport const NotificationsPresenter =\n createAbstraction<INotificationsPresenter>(\"NotificationsPresenter\");\n\nexport namespace NotificationsPresenter {\n export type Interface = INotificationsPresenter;\n}\n"],"names":["Notifications","createAbstraction","NotificationsPresenter"],"mappings":";AA6CO,MAAMA,gBAAgBC,kBAAkC;AAkBxD,MAAMC,yBACTD,kBAA2C"}
@@ -0,0 +1,22 @@
1
+ import { ApiStreamClient } from "@webiny/app/features/apiStreamClient/index.js";
2
+ import { InternalIdTokenProvider } from "../../../features/security/AuthenticationContext/abstractions.js";
3
+ export declare const WEBINY_AUTHORIZATION_HEADER = "x-webiny-authorization";
4
+ /**
5
+ * Attaches the admin id token to streaming API requests. Mirrors `GraphQLClientDecorator` — the two
6
+ * clients are separate abstractions, so neither decorator covers the other.
7
+ *
8
+ * Uses `x-webiny-authorization` rather than `Authorization`, because on AWS the streaming route is
9
+ * served by a Lambda Function URL behind CloudFront with Origin Access Control: OAC signs the request
10
+ * with SigV4, which occupies the `Authorization` header, so a bearer token there would not survive to
11
+ * the origin. Both the AWS and the self-hosted identity extractors read this header first.
12
+ */
13
+ declare class ApiStreamClientWithIdToken implements ApiStreamClient.Interface {
14
+ private idTokenProvider;
15
+ private decoratee;
16
+ constructor(idTokenProvider: InternalIdTokenProvider.Interface, decoratee: ApiStreamClient.Interface);
17
+ execute(params: ApiStreamClient.Request): Promise<ApiStreamClient.Response>;
18
+ }
19
+ export declare const ApiStreamClientDecorator: typeof ApiStreamClientWithIdToken & {
20
+ __abstraction: import("@webiny/di").Abstraction<import("@webiny/app/features/apiStreamClient/abstractions").IApiStreamClient>;
21
+ };
22
+ export {};
@@ -0,0 +1,32 @@
1
+ import { ApiStreamClient } from "@webiny/app/features/apiStreamClient/index.js";
2
+ import { InternalIdTokenProvider } from "./abstractions.js";
3
+ const WEBINY_AUTHORIZATION_HEADER = "x-webiny-authorization";
4
+ class ApiStreamClientWithIdToken {
5
+ constructor(idTokenProvider, decoratee){
6
+ this.idTokenProvider = idTokenProvider;
7
+ this.decoratee = decoratee;
8
+ }
9
+ async execute(params) {
10
+ if (params.headers?.[WEBINY_AUTHORIZATION_HEADER]) return this.decoratee.execute(params);
11
+ const idToken = await this.idTokenProvider.getTokenProvider()();
12
+ const authHeaders = idToken ? {
13
+ [WEBINY_AUTHORIZATION_HEADER]: `Bearer ${idToken}`
14
+ } : {};
15
+ return this.decoratee.execute({
16
+ ...params,
17
+ headers: {
18
+ ...params.headers,
19
+ ...authHeaders
20
+ }
21
+ });
22
+ }
23
+ }
24
+ const ApiStreamClientDecorator = ApiStreamClient.createDecorator({
25
+ decorator: ApiStreamClientWithIdToken,
26
+ dependencies: [
27
+ InternalIdTokenProvider
28
+ ]
29
+ });
30
+ export { ApiStreamClientDecorator, WEBINY_AUTHORIZATION_HEADER };
31
+
32
+ //# sourceMappingURL=ApiStreamClientDecorator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/security/AuthenticationContext/ApiStreamClientDecorator.js","sources":["../../../../src/features/security/AuthenticationContext/ApiStreamClientDecorator.ts"],"sourcesContent":["import { ApiStreamClient } from \"@webiny/app/features/apiStreamClient/index.js\";\nimport { InternalIdTokenProvider } from \"~/features/security/AuthenticationContext/abstractions.js\";\n\nexport const WEBINY_AUTHORIZATION_HEADER = \"x-webiny-authorization\";\n\n/**\n * Attaches the admin id token to streaming API requests. Mirrors `GraphQLClientDecorator` — the two\n * clients are separate abstractions, so neither decorator covers the other.\n *\n * Uses `x-webiny-authorization` rather than `Authorization`, because on AWS the streaming route is\n * served by a Lambda Function URL behind CloudFront with Origin Access Control: OAC signs the request\n * with SigV4, which occupies the `Authorization` header, so a bearer token there would not survive to\n * the origin. Both the AWS and the self-hosted identity extractors read this header first.\n */\nclass ApiStreamClientWithIdToken implements ApiStreamClient.Interface {\n constructor(\n private idTokenProvider: InternalIdTokenProvider.Interface,\n private decoratee: ApiStreamClient.Interface\n ) {}\n\n async execute(params: ApiStreamClient.Request): Promise<ApiStreamClient.Response> {\n if (params.headers?.[WEBINY_AUTHORIZATION_HEADER]) {\n return this.decoratee.execute(params);\n }\n\n const idToken = await this.idTokenProvider.getTokenProvider()();\n\n const authHeaders = idToken ? { [WEBINY_AUTHORIZATION_HEADER]: `Bearer ${idToken}` } : {};\n\n return this.decoratee.execute({\n ...params,\n headers: { ...params.headers, ...authHeaders }\n });\n }\n}\n\nexport const ApiStreamClientDecorator = ApiStreamClient.createDecorator({\n decorator: ApiStreamClientWithIdToken,\n dependencies: [InternalIdTokenProvider]\n});\n"],"names":["WEBINY_AUTHORIZATION_HEADER","ApiStreamClientWithIdToken","idTokenProvider","decoratee","params","idToken","authHeaders","ApiStreamClientDecorator","ApiStreamClient","InternalIdTokenProvider"],"mappings":";;AAGO,MAAMA,8BAA8B;AAW3C,MAAMC;IACF,YACYC,eAAkD,EAClDC,SAAoC,CAC9C;aAFUD,eAAe,GAAfA;aACAC,SAAS,GAATA;IACT;IAEH,MAAM,QAAQC,MAA+B,EAAqC;QAC9E,IAAIA,OAAO,OAAO,EAAE,CAACJ,4BAA4B,EAC7C,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAACI;QAGlC,MAAMC,UAAU,MAAM,IAAI,CAAC,eAAe,CAAC,gBAAgB;QAE3D,MAAMC,cAAcD,UAAU;YAAE,CAACL,4BAA4B,EAAE,CAAC,OAAO,EAAEK,SAAS;QAAC,IAAI,CAAC;QAExF,OAAO,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC;YAC1B,GAAGD,MAAM;YACT,SAAS;gBAAE,GAAGA,OAAO,OAAO;gBAAE,GAAGE,WAAW;YAAC;QACjD;IACJ;AACJ;AAEO,MAAMC,2BAA2BC,gBAAgB,eAAe,CAAC;IACpE,WAAWP;IACX,cAAc;QAACQ;KAAwB;AAC3C"}
@@ -2,6 +2,7 @@ import { createFeature } from "@webiny/feature/admin";
2
2
  import { AuthenticationContext } from "./abstractions.js";
3
3
  import { AuthenticationContext as external_AuthenticationContext_js_AuthenticationContext } from "./AuthenticationContext.js";
4
4
  import { GraphQLClientDecorator } from "./GraphQLClientDecorator.js";
5
+ import { ApiStreamClientDecorator } from "./ApiStreamClientDecorator.js";
5
6
  import { InternalIdTokenProvider } from "./InternalIdTokenProvider.js";
6
7
  const AuthenticationContextFeature = createFeature({
7
8
  name: "AuthenticationContext",
@@ -9,6 +10,7 @@ const AuthenticationContextFeature = createFeature({
9
10
  container.register(InternalIdTokenProvider).inSingletonScope();
10
11
  container.register(external_AuthenticationContext_js_AuthenticationContext).inSingletonScope();
11
12
  container.registerDecorator(GraphQLClientDecorator);
13
+ container.registerDecorator(ApiStreamClientDecorator);
12
14
  },
13
15
  resolve (container) {
14
16
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"features/security/AuthenticationContext/feature.js","sources":["../../../../src/features/security/AuthenticationContext/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { AuthenticationContext as AuthenticationContextAbstraction } from \"./abstractions.js\";\nimport { AuthenticationContext } from \"./AuthenticationContext.js\";\nimport { GraphQLClientDecorator } from \"./GraphQLClientDecorator.js\";\nimport { InternalIdTokenProvider } from \"./InternalIdTokenProvider.js\";\n\nexport const AuthenticationContextFeature = createFeature({\n name: \"AuthenticationContext\",\n register(container) {\n container.register(InternalIdTokenProvider).inSingletonScope();\n container.register(AuthenticationContext).inSingletonScope();\n container.registerDecorator(GraphQLClientDecorator);\n },\n resolve(container) {\n return {\n authenticationContext: container.resolve(AuthenticationContextAbstraction)\n };\n }\n});\n"],"names":["AuthenticationContextFeature","createFeature","container","InternalIdTokenProvider","AuthenticationContext","GraphQLClientDecorator","AuthenticationContextAbstraction"],"mappings":";;;;;AAMO,MAAMA,+BAA+BC,cAAc;IACtD,MAAM;IACN,UAASC,SAAS;QACdA,UAAU,QAAQ,CAACC,yBAAyB,gBAAgB;QAC5DD,UAAU,QAAQ,CAACE,yDAAuB,gBAAgB;QAC1DF,UAAU,iBAAiB,CAACG;IAChC;IACA,SAAQH,SAAS;QACb,OAAO;YACH,uBAAuBA,UAAU,OAAO,CAACI;QAC7C;IACJ;AACJ"}
1
+ {"version":3,"file":"features/security/AuthenticationContext/feature.js","sources":["../../../../src/features/security/AuthenticationContext/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { AuthenticationContext as AuthenticationContextAbstraction } from \"./abstractions.js\";\nimport { AuthenticationContext } from \"./AuthenticationContext.js\";\nimport { GraphQLClientDecorator } from \"./GraphQLClientDecorator.js\";\nimport { ApiStreamClientDecorator } from \"./ApiStreamClientDecorator.js\";\nimport { InternalIdTokenProvider } from \"./InternalIdTokenProvider.js\";\n\nexport const AuthenticationContextFeature = createFeature({\n name: \"AuthenticationContext\",\n register(container) {\n container.register(InternalIdTokenProvider).inSingletonScope();\n container.register(AuthenticationContext).inSingletonScope();\n container.registerDecorator(GraphQLClientDecorator);\n container.registerDecorator(ApiStreamClientDecorator);\n },\n resolve(container) {\n return {\n authenticationContext: container.resolve(AuthenticationContextAbstraction)\n };\n }\n});\n"],"names":["AuthenticationContextFeature","createFeature","container","InternalIdTokenProvider","AuthenticationContext","GraphQLClientDecorator","ApiStreamClientDecorator","AuthenticationContextAbstraction"],"mappings":";;;;;;AAOO,MAAMA,+BAA+BC,cAAc;IACtD,MAAM;IACN,UAASC,SAAS;QACdA,UAAU,QAAQ,CAACC,yBAAyB,gBAAgB;QAC5DD,UAAU,QAAQ,CAACE,yDAAuB,gBAAgB;QAC1DF,UAAU,iBAAiB,CAACG;QAC5BH,UAAU,iBAAiB,CAACI;IAChC;IACA,SAAQJ,SAAS;QACb,OAAO;YACH,uBAAuBA,UAAU,OAAO,CAACK;QAC7C;IACJ;AACJ"}
@@ -7,7 +7,6 @@ declare class LoginUseCaseImpl implements UseCase.Interface {
7
7
  private logInRepository;
8
8
  constructor(authContext: AuthenticationContext.Interface, identityContext: IdentityContext.Interface, logInRepository: LogInRepository.Interface);
9
9
  execute(params: UseCase.Params): Promise<void>;
10
- private validatePermissions;
11
10
  }
12
11
  export declare const LogInUseCase: typeof LoginUseCaseImpl & {
13
12
  __abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").ILogInUseCase>;