@webiny/app-admin 6.6.0-alpha.1 → 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 (718) hide show
  1. package/base/Admin.js +19 -2
  2. package/base/Admin.js.map +1 -1
  3. package/base/Base/DefaultFieldRenderers.js +4 -0
  4. package/base/Base/DefaultFieldRenderers.js.map +1 -1
  5. package/base/Base/FieldRenderers/AutoCompleteRenderer.js +1 -0
  6. package/base/Base/FieldRenderers/AutoCompleteRenderer.js.map +1 -1
  7. package/base/Base/FieldRenderers/BirthdayInputRenderer.d.ts +21 -0
  8. package/base/Base/FieldRenderers/BirthdayInputRenderer.js +39 -0
  9. package/base/Base/FieldRenderers/BirthdayInputRenderer.js.map +1 -0
  10. package/base/Base/FieldRenderers/BirthdayInputRenderer.test.d.ts +1 -0
  11. package/base/Base/FieldRenderers/BirthdayInputRenderer.test.js +123 -0
  12. package/base/Base/FieldRenderers/BirthdayInputRenderer.test.js.map +1 -0
  13. package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/MultiValueDynamicZone.js +21 -4
  14. package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone/MultiValueDynamicZone.js.map +1 -1
  15. package/base/Base/FieldRenderers/ObjectRenderer/ObjectAccordionMultipleRenderer.js +11 -2
  16. package/base/Base/FieldRenderers/ObjectRenderer/ObjectAccordionMultipleRenderer.js.map +1 -1
  17. package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.d.ts +2 -0
  18. package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.js +14 -5
  19. package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.js.map +1 -1
  20. package/base/Base/FieldRenderers/ObjectRenderer/ObjectRenderer.js +16 -25
  21. package/base/Base/FieldRenderers/ObjectRenderer/ObjectRenderer.js.map +1 -1
  22. package/base/Base/FieldRenderers/ObjectRenderer/SingleValueDynamicZone.js +18 -3
  23. package/base/Base/FieldRenderers/ObjectRenderer/SingleValueDynamicZone.js.map +1 -1
  24. package/base/Base/FieldRenderers/ObjectRenderer/{TemplatePicker.d.ts → TemplatePicker/AddTemplateButton.d.ts} +1 -1
  25. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/AddTemplateButton.js +24 -0
  26. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/AddTemplateButton.js.map +1 -0
  27. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/SelectableTemplate.d.ts +13 -0
  28. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/SelectableTemplate.js +21 -0
  29. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/SelectableTemplate.js.map +1 -0
  30. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateCard.d.ts +3 -0
  31. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateCard.js +35 -0
  32. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateCard.js.map +1 -0
  33. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateGallery.d.ts +8 -0
  34. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateGallery.js +22 -0
  35. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateGallery.js.map +1 -0
  36. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateGalleryToolbar.d.ts +10 -0
  37. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateGalleryToolbar.js +52 -0
  38. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateGalleryToolbar.js.map +1 -0
  39. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateIcon.d.ts +8 -0
  40. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateIcon.js +16 -0
  41. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateIcon.js.map +1 -0
  42. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateList.d.ts +10 -0
  43. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateList.js +22 -0
  44. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateList.js.map +1 -0
  45. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateListItem.d.ts +3 -0
  46. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateListItem.js +35 -0
  47. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/TemplateListItem.js.map +1 -0
  48. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/index.d.ts +1 -0
  49. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/index.js +1 -0
  50. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/types.d.ts +6 -0
  51. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker/types.js +0 -0
  52. package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.d.ts +8 -3
  53. package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.js +25 -17
  54. package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.js.map +1 -1
  55. package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.test.d.ts +1 -0
  56. package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.test.js +106 -0
  57. package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.test.js.map +1 -0
  58. package/base/Base/FieldRenderers/RadioButtonsRenderer.js +3 -2
  59. package/base/Base/FieldRenderers/RadioButtonsRenderer.js.map +1 -1
  60. package/base/Base/FieldRenderers/SelectRenderer.js +4 -2
  61. package/base/Base/FieldRenderers/SelectRenderer.js.map +1 -1
  62. package/base/Base.js +2 -1
  63. package/base/Base.js.map +1 -1
  64. package/base/createRootContainer.js +4 -0
  65. package/base/createRootContainer.js.map +1 -1
  66. package/base/resolveApiUrl.d.ts +10 -0
  67. package/base/resolveApiUrl.js +11 -3
  68. package/base/resolveApiUrl.js.map +1 -1
  69. package/base/ui/AssumedPermissionsSelector.d.ts +47 -0
  70. package/base/ui/AssumedPermissionsSelector.js +7 -0
  71. package/base/ui/AssumedPermissionsSelector.js.map +1 -0
  72. package/base/ui/DebuggerIndicator.d.ts +23 -0
  73. package/base/ui/DebuggerIndicator.js +5 -0
  74. package/base/ui/DebuggerIndicator.js.map +1 -0
  75. package/base/ui/Layout.d.ts +20 -0
  76. package/base/ui/Layout.js +2 -1
  77. package/base/ui/Layout.js.map +1 -1
  78. package/components/DeveloperMode/DeveloperMode.d.ts +1 -3
  79. package/components/DeveloperMode/DeveloperMode.js.map +1 -1
  80. package/components/Filters/Filters.js +7 -1
  81. package/components/Filters/Filters.js.map +1 -1
  82. package/components/IconPicker/IconPickerComponent.js +1 -1
  83. package/components/IconPicker/IconPickerComponent.js.map +1 -1
  84. package/components/SplitView/SplitView.d.ts +2 -2
  85. package/components/SplitView/SplitView.js +7 -7
  86. package/components/SplitView/SplitView.js.map +1 -1
  87. package/config/AdminConfig/Widget.d.ts +9 -1
  88. package/config/AdminConfig/Widget.js +6 -2
  89. package/config/AdminConfig/Widget.js.map +1 -1
  90. package/domain/Identity.js +1 -1
  91. package/domain/Identity.js.map +1 -1
  92. package/exports/admin/ui.d.ts +4 -0
  93. package/exports/admin/ui.js +4 -1
  94. package/exports/admin.d.ts +4 -0
  95. package/exports/admin.js +2 -0
  96. package/features/{aiChat/AiChatGateway.d.ts → adminAssistant/AdminAssistantGateway.d.ts} +7 -7
  97. package/features/{aiChat/AiChatGateway.js → adminAssistant/AdminAssistantGateway.js} +8 -8
  98. package/features/adminAssistant/AdminAssistantGateway.js.map +1 -0
  99. package/features/adminAssistant/AdminAssistantPresenter.d.ts +60 -0
  100. package/features/adminAssistant/AdminAssistantPresenter.js +377 -0
  101. package/features/adminAssistant/AdminAssistantPresenter.js.map +1 -0
  102. package/features/adminAssistant/abstractions.d.ts +176 -0
  103. package/features/adminAssistant/abstractions.js +6 -0
  104. package/features/adminAssistant/abstractions.js.map +1 -0
  105. package/features/adminAssistant/feature.d.ts +3 -0
  106. package/features/adminAssistant/feature.js +19 -0
  107. package/features/adminAssistant/feature.js.map +1 -0
  108. package/features/adminAssistant/index.d.ts +6 -0
  109. package/features/adminAssistant/index.js +3 -0
  110. package/features/adminAssistant/turnsFromMessages.d.ts +15 -0
  111. package/features/adminAssistant/turnsFromMessages.js +77 -0
  112. package/features/adminAssistant/turnsFromMessages.js.map +1 -0
  113. package/features/adminUsers/account/getCurrentUser/GetCurrentUserGateway.d.ts +11 -0
  114. package/features/adminUsers/account/getCurrentUser/GetCurrentUserGateway.js +44 -0
  115. package/features/adminUsers/account/getCurrentUser/GetCurrentUserGateway.js.map +1 -0
  116. package/features/adminUsers/account/getCurrentUser/GetCurrentUserUseCase.d.ts +10 -0
  117. package/features/adminUsers/account/getCurrentUser/GetCurrentUserUseCase.js +19 -0
  118. package/features/adminUsers/account/getCurrentUser/GetCurrentUserUseCase.js.map +1 -0
  119. package/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserGateway.d.ts +16 -0
  120. package/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserGateway.js +5 -0
  121. package/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserGateway.js.map +1 -0
  122. package/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserUseCase.d.ts +10 -0
  123. package/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserUseCase.js +5 -0
  124. package/features/adminUsers/account/getCurrentUser/abstractions/GetCurrentUserUseCase.js.map +1 -0
  125. package/features/adminUsers/account/getCurrentUser/abstractions/index.d.ts +6 -0
  126. package/features/adminUsers/account/getCurrentUser/abstractions/index.js +2 -0
  127. package/features/adminUsers/account/getCurrentUser/feature.d.ts +3 -0
  128. package/features/adminUsers/account/getCurrentUser/feature.js +19 -0
  129. package/features/adminUsers/account/getCurrentUser/feature.js.map +1 -0
  130. package/features/adminUsers/account/getCurrentUser/index.d.ts +1 -0
  131. package/features/adminUsers/account/getCurrentUser/index.js +1 -0
  132. package/features/adminUsers/account/updateCurrentUser/UpdateCurrentUserGateway.d.ts +11 -0
  133. package/features/adminUsers/account/updateCurrentUser/UpdateCurrentUserGateway.js +48 -0
  134. package/features/adminUsers/account/updateCurrentUser/UpdateCurrentUserGateway.js.map +1 -0
  135. package/features/adminUsers/account/updateCurrentUser/UpdateCurrentUserUseCase.d.ts +10 -0
  136. package/features/adminUsers/account/updateCurrentUser/UpdateCurrentUserUseCase.js +19 -0
  137. package/features/adminUsers/account/updateCurrentUser/UpdateCurrentUserUseCase.js.map +1 -0
  138. package/features/adminUsers/account/updateCurrentUser/abstractions/UpdateCurrentUserGateway.d.ts +26 -0
  139. package/features/adminUsers/account/updateCurrentUser/abstractions/UpdateCurrentUserGateway.js +5 -0
  140. package/features/adminUsers/account/updateCurrentUser/abstractions/UpdateCurrentUserGateway.js.map +1 -0
  141. package/features/adminUsers/account/updateCurrentUser/abstractions/UpdateCurrentUserUseCase.d.ts +13 -0
  142. package/features/adminUsers/account/updateCurrentUser/abstractions/UpdateCurrentUserUseCase.js +5 -0
  143. package/features/adminUsers/account/updateCurrentUser/abstractions/UpdateCurrentUserUseCase.js.map +1 -0
  144. package/features/adminUsers/account/updateCurrentUser/abstractions/index.d.ts +8 -0
  145. package/features/adminUsers/account/updateCurrentUser/abstractions/index.js +2 -0
  146. package/features/adminUsers/account/updateCurrentUser/feature.d.ts +3 -0
  147. package/features/adminUsers/account/updateCurrentUser/feature.js +19 -0
  148. package/features/adminUsers/account/updateCurrentUser/feature.js.map +1 -0
  149. package/features/adminUsers/account/updateCurrentUser/index.d.ts +1 -0
  150. package/features/adminUsers/account/updateCurrentUser/index.js +1 -0
  151. package/features/adminUsers/passwordPolicy/RulesPasswordPolicy.d.ts +6 -0
  152. package/features/adminUsers/passwordPolicy/RulesPasswordPolicy.js +22 -0
  153. package/features/adminUsers/passwordPolicy/RulesPasswordPolicy.js.map +1 -0
  154. package/features/adminUsers/passwordPolicy/abstractions.d.ts +20 -0
  155. package/features/adminUsers/passwordPolicy/abstractions.js +5 -0
  156. package/features/adminUsers/passwordPolicy/abstractions.js.map +1 -0
  157. package/features/adminUsers/passwordPolicy/feature.d.ts +8 -0
  158. package/features/adminUsers/passwordPolicy/feature.js +18 -0
  159. package/features/adminUsers/passwordPolicy/feature.js.map +1 -0
  160. package/features/adminUsers/passwordPolicy/index.d.ts +3 -0
  161. package/features/adminUsers/passwordPolicy/index.js +3 -0
  162. package/features/adminUsers/passwordPolicy/readPasswordPolicyRules.d.ts +10 -0
  163. package/features/adminUsers/passwordPolicy/readPasswordPolicyRules.js +11 -0
  164. package/features/adminUsers/passwordPolicy/readPasswordPolicyRules.js.map +1 -0
  165. package/features/adminUsers/permissions/abstractions.d.ts +17 -0
  166. package/features/adminUsers/permissions/abstractions.js +6 -0
  167. package/features/adminUsers/permissions/abstractions.js.map +1 -0
  168. package/features/adminUsers/permissions/feature.d.ts +14 -0
  169. package/features/adminUsers/permissions/feature.js +7 -0
  170. package/features/adminUsers/permissions/feature.js.map +1 -0
  171. package/features/adminUsers/permissionsSchema.d.ts +10 -0
  172. package/features/adminUsers/permissionsSchema.js +18 -0
  173. package/features/adminUsers/permissionsSchema.js.map +1 -0
  174. package/features/adminUsers/users/createUser/CreateUserGateway.d.ts +11 -0
  175. package/features/adminUsers/users/createUser/CreateUserGateway.js +49 -0
  176. package/features/adminUsers/users/createUser/CreateUserGateway.js.map +1 -0
  177. package/features/adminUsers/users/createUser/CreateUserUseCase.d.ts +10 -0
  178. package/features/adminUsers/users/createUser/CreateUserUseCase.js +18 -0
  179. package/features/adminUsers/users/createUser/CreateUserUseCase.js.map +1 -0
  180. package/features/adminUsers/users/createUser/abstractions/CreateUserGateway.d.ts +21 -0
  181. package/features/adminUsers/users/createUser/abstractions/CreateUserGateway.js +5 -0
  182. package/features/adminUsers/users/createUser/abstractions/CreateUserGateway.js.map +1 -0
  183. package/features/adminUsers/users/createUser/abstractions/CreateUserUseCase.d.ts +14 -0
  184. package/features/adminUsers/users/createUser/abstractions/CreateUserUseCase.js +5 -0
  185. package/features/adminUsers/users/createUser/abstractions/CreateUserUseCase.js.map +1 -0
  186. package/features/adminUsers/users/createUser/abstractions/index.d.ts +2 -0
  187. package/features/adminUsers/users/createUser/abstractions/index.js +2 -0
  188. package/features/adminUsers/users/createUser/feature.d.ts +3 -0
  189. package/features/adminUsers/users/createUser/feature.js +19 -0
  190. package/features/adminUsers/users/createUser/feature.js.map +1 -0
  191. package/features/adminUsers/users/createUser/index.d.ts +2 -0
  192. package/features/adminUsers/users/createUser/index.js +2 -0
  193. package/features/adminUsers/users/deleteUser/DeleteUserGateway.d.ts +11 -0
  194. package/features/adminUsers/users/deleteUser/DeleteUserGateway.js +40 -0
  195. package/features/adminUsers/users/deleteUser/DeleteUserGateway.js.map +1 -0
  196. package/features/adminUsers/users/deleteUser/DeleteUserUseCase.d.ts +10 -0
  197. package/features/adminUsers/users/deleteUser/DeleteUserUseCase.js +18 -0
  198. package/features/adminUsers/users/deleteUser/DeleteUserUseCase.js.map +1 -0
  199. package/features/adminUsers/users/deleteUser/abstractions/DeleteUserGateway.d.ts +11 -0
  200. package/features/adminUsers/users/deleteUser/abstractions/DeleteUserGateway.js +5 -0
  201. package/features/adminUsers/users/deleteUser/abstractions/DeleteUserGateway.js.map +1 -0
  202. package/features/adminUsers/users/deleteUser/abstractions/DeleteUserUseCase.d.ts +11 -0
  203. package/features/adminUsers/users/deleteUser/abstractions/DeleteUserUseCase.js +5 -0
  204. package/features/adminUsers/users/deleteUser/abstractions/DeleteUserUseCase.js.map +1 -0
  205. package/features/adminUsers/users/deleteUser/abstractions/index.d.ts +2 -0
  206. package/features/adminUsers/users/deleteUser/abstractions/index.js +2 -0
  207. package/features/adminUsers/users/deleteUser/feature.d.ts +3 -0
  208. package/features/adminUsers/users/deleteUser/feature.js +19 -0
  209. package/features/adminUsers/users/deleteUser/feature.js.map +1 -0
  210. package/features/adminUsers/users/deleteUser/index.d.ts +2 -0
  211. package/features/adminUsers/users/deleteUser/index.js +2 -0
  212. package/features/adminUsers/users/getUser/GetUserGateway.d.ts +11 -0
  213. package/features/adminUsers/users/getUser/GetUserGateway.js +57 -0
  214. package/features/adminUsers/users/getUser/GetUserGateway.js.map +1 -0
  215. package/features/adminUsers/users/getUser/GetUserUseCase.d.ts +10 -0
  216. package/features/adminUsers/users/getUser/GetUserUseCase.js +18 -0
  217. package/features/adminUsers/users/getUser/GetUserUseCase.js.map +1 -0
  218. package/features/adminUsers/users/getUser/abstractions/GetUserGateway.d.ts +32 -0
  219. package/features/adminUsers/users/getUser/abstractions/GetUserGateway.js +5 -0
  220. package/features/adminUsers/users/getUser/abstractions/GetUserGateway.js.map +1 -0
  221. package/features/adminUsers/users/getUser/abstractions/GetUserUseCase.d.ts +14 -0
  222. package/features/adminUsers/users/getUser/abstractions/GetUserUseCase.js +5 -0
  223. package/features/adminUsers/users/getUser/abstractions/GetUserUseCase.js.map +1 -0
  224. package/features/adminUsers/users/getUser/abstractions/index.d.ts +2 -0
  225. package/features/adminUsers/users/getUser/abstractions/index.js +2 -0
  226. package/features/adminUsers/users/getUser/feature.d.ts +3 -0
  227. package/features/adminUsers/users/getUser/feature.js +19 -0
  228. package/features/adminUsers/users/getUser/feature.js.map +1 -0
  229. package/features/adminUsers/users/getUser/index.d.ts +2 -0
  230. package/features/adminUsers/users/getUser/index.js +2 -0
  231. package/features/adminUsers/users/listUsers/ListUsersGateway.d.ts +11 -0
  232. package/features/adminUsers/users/listUsers/ListUsersGateway.js +39 -0
  233. package/features/adminUsers/users/listUsers/ListUsersGateway.js.map +1 -0
  234. package/features/adminUsers/users/listUsers/ListUsersUseCase.d.ts +10 -0
  235. package/features/adminUsers/users/listUsers/ListUsersUseCase.js +18 -0
  236. package/features/adminUsers/users/listUsers/ListUsersUseCase.js.map +1 -0
  237. package/features/adminUsers/users/listUsers/abstractions/ListUsersGateway.d.ts +17 -0
  238. package/features/adminUsers/users/listUsers/abstractions/ListUsersGateway.js +5 -0
  239. package/features/adminUsers/users/listUsers/abstractions/ListUsersGateway.js.map +1 -0
  240. package/features/adminUsers/users/listUsers/abstractions/ListUsersUseCase.d.ts +10 -0
  241. package/features/adminUsers/users/listUsers/abstractions/ListUsersUseCase.js +5 -0
  242. package/features/adminUsers/users/listUsers/abstractions/ListUsersUseCase.js.map +1 -0
  243. package/features/adminUsers/users/listUsers/abstractions/index.d.ts +2 -0
  244. package/features/adminUsers/users/listUsers/abstractions/index.js +2 -0
  245. package/features/adminUsers/users/listUsers/feature.d.ts +3 -0
  246. package/features/adminUsers/users/listUsers/feature.js +19 -0
  247. package/features/adminUsers/users/listUsers/feature.js.map +1 -0
  248. package/features/adminUsers/users/listUsers/index.d.ts +2 -0
  249. package/features/adminUsers/users/listUsers/index.js +2 -0
  250. package/features/adminUsers/users/updateUser/UpdateUserGateway.d.ts +11 -0
  251. package/features/adminUsers/users/updateUser/UpdateUserGateway.js +59 -0
  252. package/features/adminUsers/users/updateUser/UpdateUserGateway.js.map +1 -0
  253. package/features/adminUsers/users/updateUser/UpdateUserUseCase.d.ts +10 -0
  254. package/features/adminUsers/users/updateUser/UpdateUserUseCase.js +18 -0
  255. package/features/adminUsers/users/updateUser/UpdateUserUseCase.js.map +1 -0
  256. package/features/adminUsers/users/updateUser/abstractions/UpdateUserGateway.d.ts +33 -0
  257. package/features/adminUsers/users/updateUser/abstractions/UpdateUserGateway.js +5 -0
  258. package/features/adminUsers/users/updateUser/abstractions/UpdateUserGateway.js.map +1 -0
  259. package/features/adminUsers/users/updateUser/abstractions/UpdateUserUseCase.d.ts +15 -0
  260. package/features/adminUsers/users/updateUser/abstractions/UpdateUserUseCase.js +5 -0
  261. package/features/adminUsers/users/updateUser/abstractions/UpdateUserUseCase.js.map +1 -0
  262. package/features/adminUsers/users/updateUser/abstractions/index.d.ts +2 -0
  263. package/features/adminUsers/users/updateUser/abstractions/index.js +2 -0
  264. package/features/adminUsers/users/updateUser/feature.d.ts +3 -0
  265. package/features/adminUsers/users/updateUser/feature.js +19 -0
  266. package/features/adminUsers/users/updateUser/feature.js.map +1 -0
  267. package/features/adminUsers/users/updateUser/index.d.ts +2 -0
  268. package/features/adminUsers/users/updateUser/index.js +2 -0
  269. package/features/aiChats/AiChatSaveError.d.ts +6 -0
  270. package/features/aiChats/AiChatSaveError.js +8 -0
  271. package/features/aiChats/AiChatSaveError.js.map +1 -0
  272. package/features/aiChats/AiChatsGateway.d.ts +18 -0
  273. package/features/aiChats/AiChatsGateway.js +132 -0
  274. package/features/aiChats/AiChatsGateway.js.map +1 -0
  275. package/features/aiChats/AiChatsRepository.d.ts +36 -0
  276. package/features/aiChats/AiChatsRepository.js +110 -0
  277. package/features/aiChats/AiChatsRepository.js.map +1 -0
  278. package/features/aiChats/AiChatsRequestError.d.ts +9 -0
  279. package/features/aiChats/AiChatsRequestError.js +8 -0
  280. package/features/aiChats/AiChatsRequestError.js.map +1 -0
  281. package/features/aiChats/abstractions.d.ts +76 -0
  282. package/features/aiChats/abstractions.js +6 -0
  283. package/features/aiChats/abstractions.js.map +1 -0
  284. package/features/aiChats/feature.d.ts +3 -0
  285. package/features/aiChats/feature.js +19 -0
  286. package/features/aiChats/feature.js.map +1 -0
  287. package/features/aiChats/index.d.ts +9 -0
  288. package/features/aiChats/index.js +3 -0
  289. package/features/aiChats/messageOf.d.ts +2 -0
  290. package/features/aiChats/messageOf.js +7 -0
  291. package/features/aiChats/messageOf.js.map +1 -0
  292. package/features/aiSettings/abstractions.d.ts +16 -0
  293. package/features/aiSettings/abstractions.js +5 -0
  294. package/features/aiSettings/abstractions.js.map +1 -0
  295. package/features/aiSettings/index.d.ts +2 -0
  296. package/features/aiSettings/index.js +1 -0
  297. package/features/assumePermissions/ApiStreamClientDecorator.d.ts +16 -0
  298. package/features/assumePermissions/ApiStreamClientDecorator.js +29 -0
  299. package/features/assumePermissions/ApiStreamClientDecorator.js.map +1 -0
  300. package/features/assumePermissions/AssumePermissionsContext.d.ts +17 -0
  301. package/features/assumePermissions/AssumePermissionsContext.js +32 -0
  302. package/features/assumePermissions/AssumePermissionsContext.js.map +1 -0
  303. package/features/assumePermissions/AssumePermissionsUseCase.d.ts +33 -0
  304. package/features/assumePermissions/AssumePermissionsUseCase.js +48 -0
  305. package/features/assumePermissions/AssumePermissionsUseCase.js.map +1 -0
  306. package/features/assumePermissions/GraphQLClientDecorator.d.ts +16 -0
  307. package/features/assumePermissions/GraphQLClientDecorator.js +29 -0
  308. package/features/assumePermissions/GraphQLClientDecorator.js.map +1 -0
  309. package/features/assumePermissions/ListAssumableTargetsGateway.d.ts +13 -0
  310. package/features/assumePermissions/ListAssumableTargetsGateway.js +74 -0
  311. package/features/assumePermissions/ListAssumableTargetsGateway.js.map +1 -0
  312. package/features/assumePermissions/ListAssumableTargetsUseCase.d.ts +16 -0
  313. package/features/assumePermissions/ListAssumableTargetsUseCase.js +38 -0
  314. package/features/assumePermissions/ListAssumableTargetsUseCase.js.map +1 -0
  315. package/features/assumePermissions/LogInUseCaseDecorator.d.ts +33 -0
  316. package/features/assumePermissions/LogInUseCaseDecorator.js +36 -0
  317. package/features/assumePermissions/LogInUseCaseDecorator.js.map +1 -0
  318. package/features/assumePermissions/LogOutUseCaseDecorator.d.ts +16 -0
  319. package/features/assumePermissions/LogOutUseCaseDecorator.js +21 -0
  320. package/features/assumePermissions/LogOutUseCaseDecorator.js.map +1 -0
  321. package/features/assumePermissions/abstractions.d.ts +78 -0
  322. package/features/assumePermissions/abstractions.js +8 -0
  323. package/features/assumePermissions/abstractions.js.map +1 -0
  324. package/features/assumePermissions/assumePermissionsHeader.d.ts +3 -0
  325. package/features/assumePermissions/assumePermissionsHeader.js +7 -0
  326. package/features/assumePermissions/assumePermissionsHeader.js.map +1 -0
  327. package/features/assumePermissions/feature.d.ts +4 -0
  328. package/features/assumePermissions/feature.js +32 -0
  329. package/features/assumePermissions/feature.js.map +1 -0
  330. package/features/assumePermissions/index.d.ts +4 -0
  331. package/features/assumePermissions/index.js +2 -0
  332. package/features/banners/Banners.d.ts +15 -0
  333. package/features/banners/Banners.js +39 -0
  334. package/features/banners/Banners.js.map +1 -0
  335. package/features/banners/abstractions.d.ts +34 -0
  336. package/features/banners/abstractions.js +5 -0
  337. package/features/banners/abstractions.js.map +1 -0
  338. package/features/banners/feature.d.ts +3 -0
  339. package/features/banners/feature.js +17 -0
  340. package/features/banners/feature.js.map +1 -0
  341. package/features/banners/index.d.ts +2 -0
  342. package/features/banners/index.js +2 -0
  343. package/features/dateFormatter/formatUtcOffset.d.ts +1 -0
  344. package/features/dateFormatter/formatUtcOffset.js +11 -0
  345. package/features/dateFormatter/formatUtcOffset.js.map +1 -0
  346. package/features/debugger/DebugSessionsRepository.d.ts +35 -0
  347. package/features/debugger/DebugSessionsRepository.js +57 -0
  348. package/features/debugger/DebugSessionsRepository.js.map +1 -0
  349. package/features/debugger/GraphQLExtensionsDebugHandler.d.ts +17 -0
  350. package/features/debugger/GraphQLExtensionsDebugHandler.js +21 -0
  351. package/features/debugger/GraphQLExtensionsDebugHandler.js.map +1 -0
  352. package/features/debugger/GraphQLExtensionsDebugHandler.test.d.ts +1 -0
  353. package/features/debugger/GraphQLExtensionsDebugHandler.test.js +112 -0
  354. package/features/debugger/GraphQLExtensionsDebugHandler.test.js.map +1 -0
  355. package/features/debugger/abstractions.d.ts +50 -0
  356. package/features/debugger/abstractions.js +5 -0
  357. package/features/debugger/abstractions.js.map +1 -0
  358. package/features/debugger/constants.d.ts +1 -0
  359. package/features/debugger/constants.js +4 -0
  360. package/features/debugger/constants.js.map +1 -0
  361. package/features/debugger/feature.d.ts +3 -0
  362. package/features/debugger/feature.js +19 -0
  363. package/features/debugger/feature.js.map +1 -0
  364. package/features/debugger/index.d.ts +3 -0
  365. package/features/debugger/index.js +3 -0
  366. package/features/formModel/AccessControlRuleEvaluator.d.ts +12 -0
  367. package/features/formModel/AccessControlRuleEvaluator.js +30 -0
  368. package/features/formModel/AccessControlRuleEvaluator.js.map +1 -0
  369. package/features/formModel/AccessControlRuleEvaluator.test.d.ts +1 -0
  370. package/features/formModel/AccessControlRuleEvaluator.test.js +219 -0
  371. package/features/formModel/AccessControlRuleEvaluator.test.js.map +1 -0
  372. package/features/formModel/ConditionRuleEvaluator.js +34 -4
  373. package/features/formModel/ConditionRuleEvaluator.js.map +1 -1
  374. package/features/formModel/Field.d.ts +14 -1
  375. package/features/formModel/Field.js +41 -5
  376. package/features/formModel/Field.js.map +1 -1
  377. package/features/formModel/FieldBuilder.d.ts +3 -3
  378. package/features/formModel/FieldBuilder.js +2 -1
  379. package/features/formModel/FieldBuilder.js.map +1 -1
  380. package/features/formModel/FieldBuilder.test.js +158 -1
  381. package/features/formModel/FieldBuilder.test.js.map +1 -1
  382. package/features/formModel/FocusManager.js +10 -3
  383. package/features/formModel/FocusManager.js.map +1 -1
  384. package/features/formModel/FormErrors.js +1 -1
  385. package/features/formModel/FormErrors.js.map +1 -1
  386. package/features/formModel/FormModel.d.ts +2 -0
  387. package/features/formModel/FormModel.js +32 -9
  388. package/features/formModel/FormModel.js.map +1 -1
  389. package/features/formModel/FormModel.test.js +835 -4
  390. package/features/formModel/FormModel.test.js.map +1 -1
  391. package/features/formModel/ObjectField.d.ts +12 -1
  392. package/features/formModel/ObjectField.js +70 -20
  393. package/features/formModel/ObjectField.js.map +1 -1
  394. package/features/formModel/Rules.test.js +224 -16
  395. package/features/formModel/Rules.test.js.map +1 -1
  396. package/features/formModel/abstractions.d.ts +56 -4
  397. package/features/formModel/abstractions.js +2 -1
  398. package/features/formModel/abstractions.js.map +1 -1
  399. package/features/formModel/createFieldRenderer.d.ts +42 -0
  400. package/features/formModel/createFieldRenderer.js +33 -10
  401. package/features/formModel/createFieldRenderer.js.map +1 -1
  402. package/features/formModel/feature.js +2 -0
  403. package/features/formModel/feature.js.map +1 -1
  404. package/features/formModel/fieldTypes/DateTimeFieldType.d.ts +67 -4
  405. package/features/formModel/fieldTypes/DateTimeFieldType.js +88 -22
  406. package/features/formModel/fieldTypes/DateTimeFieldType.js.map +1 -1
  407. package/features/formModel/fieldTypes/ObjectFieldType.d.ts +3 -1
  408. package/features/formModel/fieldTypes/ObjectFieldType.js +23 -1
  409. package/features/formModel/fieldTypes/ObjectFieldType.js.map +1 -1
  410. package/features/formModel/fieldTypes/dateLimits.d.ts +37 -0
  411. package/features/formModel/fieldTypes/dateLimits.js +64 -0
  412. package/features/formModel/fieldTypes/dateLimits.js.map +1 -0
  413. package/features/formModel/fieldTypes/dateLimits.test.d.ts +1 -0
  414. package/features/formModel/fieldTypes/dateLimits.test.js +60 -0
  415. package/features/formModel/fieldTypes/dateLimits.test.js.map +1 -0
  416. package/features/formModel/hasSubtreeFocusRequest.d.ts +12 -0
  417. package/features/formModel/hasSubtreeFocusRequest.js +15 -0
  418. package/features/formModel/hasSubtreeFocusRequest.js.map +1 -0
  419. package/features/formModel/index.d.ts +3 -2
  420. package/features/formModel/index.js +2 -1
  421. package/features/formModel/jsonSchema/JsonSchema.d.ts +18 -0
  422. package/features/formModel/jsonSchema/JsonSchema.js +0 -0
  423. package/features/formModel/jsonSchema/JsonSchemaFieldOptions.d.ts +4 -0
  424. package/features/formModel/jsonSchema/JsonSchemaFieldOptions.js +0 -0
  425. package/features/formModel/jsonSchema/JsonSchemaIssue.d.ts +4 -0
  426. package/features/formModel/jsonSchema/JsonSchemaIssue.js +0 -0
  427. package/features/formModel/jsonSchema/JsonSchemaValidationResult.d.ts +5 -0
  428. package/features/formModel/jsonSchema/JsonSchemaValidationResult.js +0 -0
  429. package/features/formModel/jsonSchema/JsonSchemaValidator.d.ts +4 -0
  430. package/features/formModel/jsonSchema/JsonSchemaValidator.js +0 -0
  431. package/features/formModel/jsonSchema/PlainObject.d.ts +1 -0
  432. package/features/formModel/jsonSchema/PlainObject.js +0 -0
  433. package/features/formModel/jsonSchema/buildFieldsFromJsonSchema.d.ts +5 -0
  434. package/features/formModel/jsonSchema/buildFieldsFromJsonSchema.js +154 -0
  435. package/features/formModel/jsonSchema/buildFieldsFromJsonSchema.js.map +1 -0
  436. package/features/formModel/jsonSchema/buildFieldsFromJsonSchema.test.d.ts +1 -0
  437. package/features/formModel/jsonSchema/buildFieldsFromJsonSchema.test.js +643 -0
  438. package/features/formModel/jsonSchema/buildFieldsFromJsonSchema.test.js.map +1 -0
  439. package/features/formModel/jsonSchema/createJsonSchemaValidator.d.ts +3 -0
  440. package/features/formModel/jsonSchema/createJsonSchemaValidator.js +40 -0
  441. package/features/formModel/jsonSchema/createJsonSchemaValidator.js.map +1 -0
  442. package/features/formModel/jsonSchema/createJsonSchemaValidator.test.d.ts +1 -0
  443. package/features/formModel/jsonSchema/createJsonSchemaValidator.test.js +141 -0
  444. package/features/formModel/jsonSchema/createJsonSchemaValidator.test.js.map +1 -0
  445. package/features/formModel/jsonSchema/formDataToJsonSchemaValue.d.ts +3 -0
  446. package/features/formModel/jsonSchema/formDataToJsonSchemaValue.js +52 -0
  447. package/features/formModel/jsonSchema/formDataToJsonSchemaValue.js.map +1 -0
  448. package/features/formModel/jsonSchema/formDataToJsonSchemaValue.test.d.ts +1 -0
  449. package/features/formModel/jsonSchema/formDataToJsonSchemaValue.test.js +250 -0
  450. package/features/formModel/jsonSchema/formDataToJsonSchemaValue.test.js.map +1 -0
  451. package/features/formModel/jsonSchema/getJsonSchemaKind.d.ts +3 -0
  452. package/features/formModel/jsonSchema/getJsonSchemaKind.js +31 -0
  453. package/features/formModel/jsonSchema/getJsonSchemaKind.js.map +1 -0
  454. package/features/formModel/jsonSchema/getJsonSchemaKind.test.d.ts +1 -0
  455. package/features/formModel/jsonSchema/getJsonSchemaKind.test.js +123 -0
  456. package/features/formModel/jsonSchema/getJsonSchemaKind.test.js.map +1 -0
  457. package/features/formModel/jsonSchema/isPlainObject.d.ts +2 -0
  458. package/features/formModel/jsonSchema/isPlainObject.js +4 -0
  459. package/features/formModel/jsonSchema/isPlainObject.js.map +1 -0
  460. package/features/formModel/jsonSchema/jsonSchemaValueToFormData.d.ts +3 -0
  461. package/features/formModel/jsonSchema/jsonSchemaValueToFormData.js +30 -0
  462. package/features/formModel/jsonSchema/jsonSchemaValueToFormData.js.map +1 -0
  463. package/features/formModel/jsonSchema/jsonSchemaValueToFormData.test.d.ts +1 -0
  464. package/features/formModel/jsonSchema/jsonSchemaValueToFormData.test.js +207 -0
  465. package/features/formModel/jsonSchema/jsonSchemaValueToFormData.test.js.map +1 -0
  466. package/features/formModel/jsonSchema/normalizeJsonSchema.d.ts +2 -0
  467. package/features/formModel/jsonSchema/normalizeJsonSchema.js +10 -0
  468. package/features/formModel/jsonSchema/normalizeJsonSchema.js.map +1 -0
  469. package/features/formModel/renderers.d.ts +1 -0
  470. package/features/formModel/renderers.js +1 -0
  471. package/features/notifications/Notifications.d.ts +1 -0
  472. package/features/notifications/Notifications.js +3 -0
  473. package/features/notifications/Notifications.js.map +1 -1
  474. package/features/notifications/Notifications.test.d.ts +1 -0
  475. package/features/notifications/Notifications.test.js +106 -0
  476. package/features/notifications/Notifications.test.js.map +1 -0
  477. package/features/notifications/NotificationsRenderer.d.ts +2 -1
  478. package/features/notifications/NotificationsRenderer.js +23 -4
  479. package/features/notifications/NotificationsRenderer.js.map +1 -1
  480. package/features/notifications/NotificationsRenderer.test.d.ts +1 -0
  481. package/features/notifications/NotificationsRenderer.test.js +261 -0
  482. package/features/notifications/NotificationsRenderer.test.js.map +1 -0
  483. package/features/notifications/abstractions.d.ts +13 -2
  484. package/features/notifications/abstractions.js.map +1 -1
  485. package/features/security/LogIn/LogInUseCase.d.ts +0 -1
  486. package/features/security/LogIn/LogInUseCase.js +2 -5
  487. package/features/security/LogIn/LogInUseCase.js.map +1 -1
  488. package/features/security/LogIn/hasAppPermissions.d.ts +2 -0
  489. package/features/security/LogIn/hasAppPermissions.js +8 -0
  490. package/features/security/LogIn/hasAppPermissions.js.map +1 -0
  491. package/features/wcp/ReactLicense.d.ts +6 -1
  492. package/features/wcp/ReactLicense.js +17 -2
  493. package/features/wcp/ReactLicense.js.map +1 -1
  494. package/features/wcp/WcpGateway.js +4 -0
  495. package/features/wcp/WcpGateway.js.map +1 -1
  496. package/hooks/useHotkeys.js +6 -4
  497. package/hooks/useHotkeys.js.map +1 -1
  498. package/index.d.ts +27 -3
  499. package/index.js +23 -6
  500. package/modules/AccessManagementExtension.js +3 -1
  501. package/modules/AccessManagementExtension.js.map +1 -1
  502. package/modules/DebuggerExtension.d.ts +2 -0
  503. package/modules/DebuggerExtension.js +55 -0
  504. package/modules/DebuggerExtension.js.map +1 -0
  505. package/package.json +41 -41
  506. package/presentation/accessManagement/apiKeys/ApiKeysPresenter.js +1 -2
  507. package/presentation/accessManagement/apiKeys/ApiKeysPresenter.js.map +1 -1
  508. package/presentation/accessManagement/roles/RolesPresenter.js +1 -2
  509. package/presentation/accessManagement/roles/RolesPresenter.js.map +1 -1
  510. package/presentation/accessManagement/roles/components/RolesDataList.d.ts +10 -0
  511. package/presentation/accessManagement/roles/components/RolesDataList.js +146 -0
  512. package/presentation/accessManagement/roles/components/RolesDataList.js.map +1 -0
  513. package/presentation/accessManagement/roles/components/RolesForm.d.ts +13 -0
  514. package/presentation/accessManagement/roles/components/RolesForm.js +114 -0
  515. package/presentation/accessManagement/roles/components/RolesForm.js.map +1 -0
  516. package/presentation/accessManagement/roles/components/RolesView.js +6 -216
  517. package/presentation/accessManagement/roles/components/RolesView.js.map +1 -1
  518. package/presentation/accessManagement/teams/TeamsPresenter.js +1 -2
  519. package/presentation/accessManagement/teams/TeamsPresenter.js.map +1 -1
  520. package/presentation/accessManagement/teams/components/TeamsDataList.d.ts +10 -0
  521. package/presentation/accessManagement/teams/components/TeamsDataList.js +146 -0
  522. package/presentation/accessManagement/teams/components/TeamsDataList.js.map +1 -0
  523. package/presentation/accessManagement/teams/components/TeamsForm.d.ts +13 -0
  524. package/presentation/accessManagement/teams/components/TeamsForm.js +96 -0
  525. package/presentation/accessManagement/teams/components/TeamsForm.js.map +1 -0
  526. package/presentation/accessManagement/teams/components/TeamsView.js +6 -198
  527. package/presentation/accessManagement/teams/components/TeamsView.js.map +1 -1
  528. package/presentation/adminUsers/AdminUsers.d.ts +10 -0
  529. package/presentation/adminUsers/AdminUsers.js +77 -0
  530. package/presentation/adminUsers/AdminUsers.js.map +1 -0
  531. package/presentation/adminUsers/SecurityPermission.d.ts +2 -0
  532. package/presentation/adminUsers/SecurityPermission.js +15 -0
  533. package/presentation/adminUsers/SecurityPermission.js.map +1 -0
  534. package/presentation/adminUsers/UserItem.d.ts +10 -0
  535. package/presentation/adminUsers/UserItem.js +0 -0
  536. package/presentation/adminUsers/components/AvatarImage/AvatarImage.d.ts +3 -0
  537. package/presentation/adminUsers/components/AvatarImage/AvatarImage.js +31 -0
  538. package/presentation/adminUsers/components/AvatarImage/AvatarImage.js.map +1 -0
  539. package/presentation/adminUsers/components/AvatarImage/AvatarImagePreview.d.ts +10 -0
  540. package/presentation/adminUsers/components/AvatarImage/AvatarImagePreview.js +53 -0
  541. package/presentation/adminUsers/components/AvatarImage/AvatarImagePreview.js.map +1 -0
  542. package/presentation/adminUsers/components/AvatarImage/AvatarImageTrigger.d.ts +7 -0
  543. package/presentation/adminUsers/components/AvatarImage/AvatarImageTrigger.js +28 -0
  544. package/presentation/adminUsers/components/AvatarImage/AvatarImageTrigger.js.map +1 -0
  545. package/presentation/adminUsers/components/AvatarImage/index.d.ts +1 -0
  546. package/presentation/adminUsers/components/AvatarImage/index.js +1 -0
  547. package/presentation/adminUsers/routes.d.ts +10 -0
  548. package/presentation/adminUsers/routes.js +20 -0
  549. package/presentation/adminUsers/routes.js.map +1 -0
  550. package/presentation/adminUsers/userMenu/AccountDetails.d.ts +6 -0
  551. package/presentation/adminUsers/userMenu/AccountDetails.js +20 -0
  552. package/presentation/adminUsers/userMenu/AccountDetails.js.map +1 -0
  553. package/presentation/adminUsers/userMenu/useIsDefaultTenant.d.ts +1 -0
  554. package/presentation/adminUsers/userMenu/useIsDefaultTenant.js +9 -0
  555. package/presentation/adminUsers/userMenu/useIsDefaultTenant.js.map +1 -0
  556. package/presentation/adminUsers/views/Account/Account.d.ts +2 -0
  557. package/presentation/adminUsers/views/Account/Account.js +137 -0
  558. package/presentation/adminUsers/views/Account/Account.js.map +1 -0
  559. package/presentation/adminUsers/views/Account/index.d.ts +1 -0
  560. package/presentation/adminUsers/views/Account/index.js +1 -0
  561. package/presentation/adminUsers/views/Users/UsersDataList.d.ts +3 -0
  562. package/presentation/adminUsers/views/Users/UsersDataList.js +180 -0
  563. package/presentation/adminUsers/views/Users/UsersDataList.js.map +1 -0
  564. package/presentation/adminUsers/views/Users/UsersForm.d.ts +5 -0
  565. package/presentation/adminUsers/views/Users/UsersForm.js +175 -0
  566. package/presentation/adminUsers/views/Users/UsersForm.js.map +1 -0
  567. package/presentation/adminUsers/views/Users/UsersView.d.ts +2 -0
  568. package/presentation/adminUsers/views/Users/UsersView.js +15 -0
  569. package/presentation/adminUsers/views/Users/UsersView.js.map +1 -0
  570. package/presentation/adminUsers/views/Users/components/DeleteAction.d.ts +7 -0
  571. package/presentation/adminUsers/views/Users/components/DeleteAction.js +29 -0
  572. package/presentation/adminUsers/views/Users/components/DeleteAction.js.map +1 -0
  573. package/presentation/adminUsers/views/Users/hooks/useUserForm.d.ts +27 -0
  574. package/presentation/adminUsers/views/Users/hooks/useUserForm.js +101 -0
  575. package/presentation/adminUsers/views/Users/hooks/useUserForm.js.map +1 -0
  576. package/presentation/adminUsers/views/Users/search.js +21 -0
  577. package/presentation/adminUsers/views/Users/search.js.map +1 -0
  578. package/presentation/adminUsers/views/Users/search.svg +20 -0
  579. package/presentation/adminUsers/views/utils.d.ts +3 -0
  580. package/presentation/adminUsers/views/utils.js +12 -0
  581. package/presentation/adminUsers/views/utils.js.map +1 -0
  582. package/presentation/aiChats/AiChatsPanelPresenter.d.ts +28 -0
  583. package/presentation/aiChats/AiChatsPanelPresenter.js +132 -0
  584. package/presentation/aiChats/AiChatsPanelPresenter.js.map +1 -0
  585. package/presentation/aiChats/abstractions.d.ts +69 -0
  586. package/presentation/aiChats/abstractions.js +5 -0
  587. package/presentation/aiChats/abstractions.js.map +1 -0
  588. package/presentation/aiChats/feature.d.ts +3 -0
  589. package/presentation/aiChats/feature.js +17 -0
  590. package/presentation/aiChats/feature.js.map +1 -0
  591. package/presentation/aiChats/index.d.ts +2 -0
  592. package/presentation/aiChats/index.js +2 -0
  593. package/presentation/assumePermissions/AssumePermissionsPresenter.d.ts +36 -0
  594. package/presentation/assumePermissions/AssumePermissionsPresenter.js +153 -0
  595. package/presentation/assumePermissions/AssumePermissionsPresenter.js.map +1 -0
  596. package/presentation/assumePermissions/abstractions.d.ts +30 -0
  597. package/presentation/assumePermissions/abstractions.js +5 -0
  598. package/presentation/assumePermissions/abstractions.js.map +1 -0
  599. package/presentation/assumePermissions/components/AssumePermissionsButton.d.ts +14 -0
  600. package/presentation/assumePermissions/components/AssumePermissionsButton.js +42 -0
  601. package/presentation/assumePermissions/components/AssumePermissionsButton.js.map +1 -0
  602. package/presentation/assumePermissions/components/AssumedPermissionsBanner.d.ts +11 -0
  603. package/presentation/assumePermissions/components/AssumedPermissionsBanner.js +25 -0
  604. package/presentation/assumePermissions/components/AssumedPermissionsBanner.js.map +1 -0
  605. package/presentation/assumePermissions/components/AssumedPermissionsSelector.d.ts +2 -0
  606. package/presentation/assumePermissions/components/AssumedPermissionsSelector.js +68 -0
  607. package/presentation/assumePermissions/components/AssumedPermissionsSelector.js.map +1 -0
  608. package/presentation/assumePermissions/feature.d.ts +3 -0
  609. package/presentation/assumePermissions/feature.js +17 -0
  610. package/presentation/assumePermissions/feature.js.map +1 -0
  611. package/presentation/assumePermissions/index.d.ts +4 -0
  612. package/presentation/assumePermissions/index.js +4 -0
  613. package/presentation/banners/BannersPresenter.d.ts +14 -0
  614. package/presentation/banners/BannersPresenter.js +60 -0
  615. package/presentation/banners/BannersPresenter.js.map +1 -0
  616. package/presentation/banners/abstractions.d.ts +24 -0
  617. package/presentation/banners/abstractions.js +5 -0
  618. package/presentation/banners/abstractions.js.map +1 -0
  619. package/presentation/banners/components/Banner.d.ts +10 -0
  620. package/presentation/banners/components/Banner.js +32 -0
  621. package/presentation/banners/components/Banner.js.map +1 -0
  622. package/presentation/banners/components/BannerBar.d.ts +11 -0
  623. package/presentation/banners/components/BannerBar.js +51 -0
  624. package/presentation/banners/components/BannerBar.js.map +1 -0
  625. package/presentation/banners/feature.d.ts +3 -0
  626. package/presentation/banners/feature.js +17 -0
  627. package/presentation/banners/feature.js.map +1 -0
  628. package/presentation/banners/index.d.ts +6 -0
  629. package/presentation/banners/index.js +4 -0
  630. package/presentation/banners/useBanner.d.ts +10 -0
  631. package/presentation/banners/useBanner.js +15 -0
  632. package/presentation/banners/useBanner.js.map +1 -0
  633. package/presentation/commandPalette/CommandPalettePresenter.js +3 -1
  634. package/presentation/commandPalette/CommandPalettePresenter.js.map +1 -1
  635. package/presentation/commandPalette/abstractions.d.ts +5 -0
  636. package/presentation/commandPalette/abstractions.js.map +1 -1
  637. package/presentation/commandPalette/commands/AiChatsCommand.d.ts +24 -0
  638. package/presentation/commandPalette/commands/AiChatsCommand.js +41 -0
  639. package/presentation/commandPalette/commands/AiChatsCommand.js.map +1 -0
  640. package/presentation/commandPalette/commands/AskAiCommand.d.ts +1 -0
  641. package/presentation/commandPalette/commands/AskAiCommand.js +3 -2
  642. package/presentation/commandPalette/commands/AskAiCommand.js.map +1 -1
  643. package/presentation/commandPalette/commands/feature.js +2 -0
  644. package/presentation/commandPalette/commands/feature.js.map +1 -1
  645. package/presentation/createReactiveComponent.d.ts +1 -0
  646. package/presentation/createReactiveComponent.js +1 -0
  647. package/presentation/debugger/DebuggerPresenter.d.ts +14 -0
  648. package/presentation/debugger/DebuggerPresenter.js +45 -0
  649. package/presentation/debugger/DebuggerPresenter.js.map +1 -0
  650. package/presentation/debugger/abstractions.d.ts +17 -0
  651. package/presentation/debugger/abstractions.js +5 -0
  652. package/presentation/debugger/abstractions.js.map +1 -0
  653. package/presentation/debugger/components/DebuggerIndicator.d.ts +2 -0
  654. package/presentation/debugger/components/DebuggerIndicator.js +45 -0
  655. package/presentation/debugger/components/DebuggerIndicator.js.map +1 -0
  656. package/presentation/debugger/components/DebuggerView.d.ts +4 -0
  657. package/presentation/debugger/components/DebuggerView.js +44 -0
  658. package/presentation/debugger/components/DebuggerView.js.map +1 -0
  659. package/presentation/debugger/downloadJson.d.ts +7 -0
  660. package/presentation/debugger/downloadJson.js +17 -0
  661. package/presentation/debugger/downloadJson.js.map +1 -0
  662. package/presentation/debugger/feature.d.ts +3 -0
  663. package/presentation/debugger/feature.js +17 -0
  664. package/presentation/debugger/feature.js.map +1 -0
  665. package/presentation/debugger/routes.d.ts +4 -0
  666. package/presentation/debugger/routes.js +10 -0
  667. package/presentation/debugger/routes.js.map +1 -0
  668. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep.js +4 -3
  669. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep.js.map +1 -1
  670. package/presentation/installation/components/SystemInstaller/steps/FinishSetup/handleStartUsing.js.map +1 -1
  671. package/presentation/installation/presenters/SystemInstaller/SystemInstallerPresenter.js.map +1 -1
  672. package/presentation/listPresenter/FolderAwareDataSource.d.ts +5 -0
  673. package/presentation/listPresenter/FolderAwareDataSource.js +4 -3
  674. package/presentation/listPresenter/FolderAwareDataSource.js.map +1 -1
  675. package/presentation/listPresenter/QueryMatcher.d.ts +28 -5
  676. package/presentation/listPresenter/QueryMatcher.js +72 -2
  677. package/presentation/listPresenter/QueryMatcher.js.map +1 -1
  678. package/presentation/listPresenter/QueryMatcher.test.d.ts +1 -0
  679. package/presentation/listPresenter/QueryMatcher.test.js +345 -0
  680. package/presentation/listPresenter/QueryMatcher.test.js.map +1 -0
  681. package/presentation/trashBin/TrashBinPresenter.js +3 -1
  682. package/presentation/trashBin/TrashBinPresenter.js.map +1 -1
  683. package/presentation/trashBin/TrashBinPresenter.test.d.ts +1 -0
  684. package/presentation/trashBin/TrashBinPresenter.test.js +91 -0
  685. package/presentation/trashBin/TrashBinPresenter.test.js.map +1 -0
  686. package/presentation/trashBin/abstractions.d.ts +1 -1
  687. package/presentation/trashBin/abstractions.js.map +1 -1
  688. package/presentation/trashBin/components/BulkActions/DeleteItems.js +5 -1
  689. package/presentation/trashBin/components/BulkActions/DeleteItems.js.map +1 -1
  690. package/presentation/trashBin/components/BulkActions/DeleteItems.test.d.ts +1 -0
  691. package/presentation/trashBin/components/BulkActions/DeleteItems.test.js +100 -0
  692. package/presentation/trashBin/components/BulkActions/DeleteItems.test.js.map +1 -0
  693. package/presentation/trashBin/hooks/useDeleteTrashBinItem.js +2 -1
  694. package/presentation/trashBin/hooks/useDeleteTrashBinItem.js.map +1 -1
  695. package/presentation/trashBin/hooks/useDeleteTrashBinItem.test.d.ts +1 -0
  696. package/presentation/trashBin/hooks/useDeleteTrashBinItem.test.js +67 -0
  697. package/presentation/trashBin/hooks/useDeleteTrashBinItem.test.js.map +1 -0
  698. package/static/svg/search.43fa797c.svg +20 -0
  699. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker.js +0 -68
  700. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker.js.map +0 -1
  701. package/features/aiChat/AiChatGateway.js.map +0 -1
  702. package/features/aiChat/AiChatPresenter.d.ts +0 -32
  703. package/features/aiChat/AiChatPresenter.js +0 -220
  704. package/features/aiChat/AiChatPresenter.js.map +0 -1
  705. package/features/aiChat/abstractions.d.ts +0 -124
  706. package/features/aiChat/abstractions.js +0 -6
  707. package/features/aiChat/abstractions.js.map +0 -1
  708. package/features/aiChat/feature.d.ts +0 -3
  709. package/features/aiChat/feature.js +0 -19
  710. package/features/aiChat/feature.js.map +0 -1
  711. package/features/aiChat/index.d.ts +0 -6
  712. package/features/aiChat/index.js +0 -3
  713. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.d.ts +0 -8
  714. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.js +0 -17
  715. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.js.map +0 -1
  716. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/usePasswordValidator.d.ts +0 -1
  717. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/usePasswordValidator.js +0 -16
  718. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/usePasswordValidator.js.map +0 -1
@@ -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) & import("react").NamedExoticComponent<unknown> & {
6
+ export declare const NotificationsRenderer: (() => null) & React.NamedExoticComponent<unknown> & {
6
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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,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,oBAA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ER,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"}
@@ -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>;
@@ -1,21 +1,18 @@
1
1
  import { LogInRepository, LogInUseCase } from "./abstractions.js";
2
2
  import { AuthenticationContext } from "../AuthenticationContext/index.js";
3
3
  import { IdentityContext } from "../IdentityContext/index.js";
4
+ import { hasAppPermissions } from "./hasAppPermissions.js";
4
5
  class LoginUseCaseImpl {
5
6
  constructor(authContext, identityContext, logInRepository){
6
7
  this.authContext = authContext;
7
8
  this.identityContext = identityContext;
8
9
  this.logInRepository = logInRepository;
9
- this.validatePermissions = (permissions)=>{
10
- const appPermissions = permissions.filter((p)=>"aacl" !== p.name);
11
- if (0 === appPermissions.length) throw new Error("You have no permissions on this tenant!");
12
- };
13
10
  }
14
11
  async execute(params) {
15
12
  this.authContext.setIdTokenProvider(params.idTokenProvider);
16
13
  if (params.logoutCallback) this.authContext.setLogoutCallback(params.logoutCallback);
17
14
  const identity = await this.logInRepository.login();
18
- this.validatePermissions(identity.getPermissions());
15
+ if (!hasAppPermissions(identity)) throw new Error("You have no permissions on this tenant!");
19
16
  this.identityContext.setIdentity(identity);
20
17
  }
21
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"features/security/LogIn/LogInUseCase.js","sources":["../../../../src/features/security/LogIn/LogInUseCase.ts"],"sourcesContent":["import { LogInRepository, LogInUseCase as UseCase } from \"./abstractions.js\";\nimport { AuthenticationContext } from \"~/features/security/AuthenticationContext/index.js\";\nimport { IdentityContext } from \"~/features/security/IdentityContext/index.js\";\nimport type { Identity } from \"~/domain/Identity.js\";\n\nclass LoginUseCaseImpl implements UseCase.Interface {\n constructor(\n private authContext: AuthenticationContext.Interface,\n private identityContext: IdentityContext.Interface,\n private logInRepository: LogInRepository.Interface\n ) {}\n\n async execute(params: UseCase.Params): Promise<void> {\n // 1. Set authentication providers\n this.authContext.setIdTokenProvider(params.idTokenProvider);\n if (params.logoutCallback) {\n this.authContext.setLogoutCallback(params.logoutCallback);\n }\n\n // TODO: if it's a multi-tenant system, and current tenant is not known (no URL param, no localStorage),\n // execute the GET_DEFAULT_TENANT query to first determine the tenant. Only then login the user.\n\n const identity = await this.logInRepository.login();\n\n // 3. Ensure identity has some permissions\n this.validatePermissions(identity.getPermissions());\n\n // 4. Set identity (user is now \"logged in\")\n this.identityContext.setIdentity(identity);\n }\n\n private validatePermissions = (permissions: Identity.Permission[]) => {\n const appPermissions = permissions.filter(p => p.name !== \"aacl\");\n if (appPermissions.length === 0) {\n throw new Error(\"You have no permissions on this tenant!\");\n }\n };\n}\n\nexport const LogInUseCase = UseCase.createImplementation({\n implementation: LoginUseCaseImpl,\n dependencies: [AuthenticationContext, IdentityContext, LogInRepository]\n});\n"],"names":["LoginUseCaseImpl","authContext","identityContext","logInRepository","permissions","appPermissions","p","Error","params","identity","LogInUseCase","UseCase","AuthenticationContext","IdentityContext","LogInRepository"],"mappings":";;;AAKA,MAAMA;IACF,YACYC,WAA4C,EAC5CC,eAA0C,EAC1CC,eAA0C,CACpD;aAHUF,WAAW,GAAXA;aACAC,eAAe,GAAfA;aACAC,eAAe,GAAfA;aAsBJ,mBAAmB,GAAG,CAACC;YAC3B,MAAMC,iBAAiBD,YAAY,MAAM,CAACE,CAAAA,IAAKA,AAAW,WAAXA,EAAE,IAAI;YACrD,IAAID,AAA0B,MAA1BA,eAAe,MAAM,EACrB,MAAM,IAAIE,MAAM;QAExB;IA1BG;IAEH,MAAM,QAAQC,MAAsB,EAAiB;QAEjD,IAAI,CAAC,WAAW,CAAC,kBAAkB,CAACA,OAAO,eAAe;QAC1D,IAAIA,OAAO,cAAc,EACrB,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAACA,OAAO,cAAc;QAM5D,MAAMC,WAAW,MAAM,IAAI,CAAC,eAAe,CAAC,KAAK;QAGjD,IAAI,CAAC,mBAAmB,CAACA,SAAS,cAAc;QAGhD,IAAI,CAAC,eAAe,CAAC,WAAW,CAACA;IACrC;AAQJ;AAEO,MAAMC,4BAAeC,aAAAA,oBAA4B,CAAC;IACrD,gBAAgBX;IAChB,cAAc;QAACY;QAAuBC;QAAiBC;KAAgB;AAC3E"}
1
+ {"version":3,"file":"features/security/LogIn/LogInUseCase.js","sources":["../../../../src/features/security/LogIn/LogInUseCase.ts"],"sourcesContent":["import { LogInRepository, LogInUseCase as UseCase } from \"./abstractions.js\";\nimport { AuthenticationContext } from \"~/features/security/AuthenticationContext/index.js\";\nimport { IdentityContext } from \"~/features/security/IdentityContext/index.js\";\nimport { hasAppPermissions } from \"./hasAppPermissions.js\";\n\nclass LoginUseCaseImpl implements UseCase.Interface {\n constructor(\n private authContext: AuthenticationContext.Interface,\n private identityContext: IdentityContext.Interface,\n private logInRepository: LogInRepository.Interface\n ) {}\n\n async execute(params: UseCase.Params): Promise<void> {\n // 1. Set authentication providers\n this.authContext.setIdTokenProvider(params.idTokenProvider);\n if (params.logoutCallback) {\n this.authContext.setLogoutCallback(params.logoutCallback);\n }\n\n // TODO: if it's a multi-tenant system, and current tenant is not known (no URL param, no localStorage),\n // execute the GET_DEFAULT_TENANT query to first determine the tenant. Only then login the user.\n\n const identity = await this.logInRepository.login();\n\n // 3. Ensure identity has some permissions\n if (!hasAppPermissions(identity)) {\n throw new Error(\"You have no permissions on this tenant!\");\n }\n\n // 4. Set identity (user is now \"logged in\")\n this.identityContext.setIdentity(identity);\n }\n}\n\nexport const LogInUseCase = UseCase.createImplementation({\n implementation: LoginUseCaseImpl,\n dependencies: [AuthenticationContext, IdentityContext, LogInRepository]\n});\n"],"names":["LoginUseCaseImpl","authContext","identityContext","logInRepository","params","identity","hasAppPermissions","Error","LogInUseCase","UseCase","AuthenticationContext","IdentityContext","LogInRepository"],"mappings":";;;;AAKA,MAAMA;IACF,YACYC,WAA4C,EAC5CC,eAA0C,EAC1CC,eAA0C,CACpD;aAHUF,WAAW,GAAXA;aACAC,eAAe,GAAfA;aACAC,eAAe,GAAfA;IACT;IAEH,MAAM,QAAQC,MAAsB,EAAiB;QAEjD,IAAI,CAAC,WAAW,CAAC,kBAAkB,CAACA,OAAO,eAAe;QAC1D,IAAIA,OAAO,cAAc,EACrB,IAAI,CAAC,WAAW,CAAC,iBAAiB,CAACA,OAAO,cAAc;QAM5D,MAAMC,WAAW,MAAM,IAAI,CAAC,eAAe,CAAC,KAAK;QAGjD,IAAI,CAACC,kBAAkBD,WACnB,MAAM,IAAIE,MAAM;QAIpB,IAAI,CAAC,eAAe,CAAC,WAAW,CAACF;IACrC;AACJ;AAEO,MAAMG,4BAAeC,aAAAA,oBAA4B,CAAC;IACrD,gBAAgBT;IAChB,cAAc;QAACU;QAAuBC;QAAiBC;KAAgB;AAC3E"}
@@ -0,0 +1,2 @@
1
+ import type { Identity } from "../../../domain/Identity.js";
2
+ export declare function hasAppPermissions(identity: Identity): boolean;
@@ -0,0 +1,8 @@
1
+ function hasAppPermissions(identity) {
2
+ const permissions = identity.getPermissions();
3
+ const appPermissions = permissions.filter((permission)=>"aacl" !== permission.name);
4
+ return appPermissions.length > 0;
5
+ }
6
+ export { hasAppPermissions };
7
+
8
+ //# sourceMappingURL=hasAppPermissions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/security/LogIn/hasAppPermissions.js","sources":["../../../../src/features/security/LogIn/hasAppPermissions.ts"],"sourcesContent":["import type { Identity } from \"~/domain/Identity.js\";\n\n/*\n * `aacl` is granted to every identity that can reach the Admin, so it says nothing about whether\n * the identity can use any app. An identity with nothing else cannot log in.\n */\nexport function hasAppPermissions(identity: Identity): boolean {\n const permissions = identity.getPermissions();\n const appPermissions = permissions.filter(permission => permission.name !== \"aacl\");\n\n return appPermissions.length > 0;\n}\n"],"names":["hasAppPermissions","identity","permissions","appPermissions","permission"],"mappings":"AAMO,SAASA,kBAAkBC,QAAkB;IAChD,MAAMC,cAAcD,SAAS,cAAc;IAC3C,MAAME,iBAAiBD,YAAY,MAAM,CAACE,CAAAA,aAAcA,AAAoB,WAApBA,WAAW,IAAI;IAEvE,OAAOD,eAAe,MAAM,GAAG;AACnC"}
@@ -19,10 +19,15 @@ export declare class ReactLicense implements ILicense {
19
19
  canUseAiPageGeneration(): boolean;
20
20
  canUseAiPageTranslation(): boolean;
21
21
  canUseAiLexicalGeneration(): boolean;
22
+ canUseAiAdminAssistant(): boolean;
22
23
  canUseAiEntryGeneration(): boolean;
23
24
  canUseAiEntryComparison(): boolean;
24
25
  canUseAiEntryTranslation(): boolean;
26
+ canUseAiPowerups(): boolean;
25
27
  canUseAbTesting(): boolean;
26
- canUseRemoteComponents(): boolean;
28
+ canUseCollaboration(): boolean;
29
+ canUseComments(): boolean;
30
+ canUseActivityLog(): boolean;
31
+ canUseLanguages(): boolean;
27
32
  toDto(): DecryptedWcpProjectLicense | null;
28
33
  }
@@ -50,6 +50,9 @@ class ReactLicense {
50
50
  canUseAiLexicalGeneration() {
51
51
  return this.license.canUseAiLexicalGeneration();
52
52
  }
53
+ canUseAiAdminAssistant() {
54
+ return this.license.canUseAiAdminAssistant();
55
+ }
53
56
  canUseAiEntryGeneration() {
54
57
  return this.license.canUseAiEntryGeneration();
55
58
  }
@@ -59,11 +62,23 @@ class ReactLicense {
59
62
  canUseAiEntryTranslation() {
60
63
  return this.license.canUseAiEntryTranslation();
61
64
  }
65
+ canUseAiPowerups() {
66
+ return this.license.canUseAiPowerups();
67
+ }
62
68
  canUseAbTesting() {
63
69
  return this.license.canUseAbTesting();
64
70
  }
65
- canUseRemoteComponents() {
66
- return this.license.canUseRemoteComponents();
71
+ canUseCollaboration() {
72
+ return this.license.canUseCollaboration();
73
+ }
74
+ canUseComments() {
75
+ return this.license.canUseComments();
76
+ }
77
+ canUseActivityLog() {
78
+ return this.license.canUseActivityLog();
79
+ }
80
+ canUseLanguages() {
81
+ return this.license.canUseLanguages();
67
82
  }
68
83
  toDto() {
69
84
  return this.license.toDto();
@@ -1 +1 @@
1
- {"version":3,"file":"features/wcp/ReactLicense.js","sources":["../../../src/features/wcp/ReactLicense.ts"],"sourcesContent":["import type { DecryptedWcpProjectLicense, ILicense, WcpProject } from \"@webiny/wcp/types.js\";\nimport type { WCP_FEATURE_LABEL } from \"@webiny/wcp\";\n\nexport class ReactLicense implements ILicense {\n private readonly license: ILicense;\n\n constructor(license: ILicense) {\n this.license = license;\n }\n\n getProject(): WcpProject | null {\n return this.license.getProject();\n }\n\n canUseAacl(): boolean {\n return this.license.canUseAacl();\n }\n\n canUseAuditLogs(): boolean {\n return this.license.canUseAuditLogs();\n }\n\n canUseFeature(featureId: keyof typeof WCP_FEATURE_LABEL): boolean {\n return this.license.canUseFeature(featureId);\n }\n\n canUseFileManagerThreatDetection(): boolean {\n return this.license.canUseFileManagerThreatDetection();\n }\n\n canUseFolderLevelPermissions(): boolean {\n return this.license.canUseFolderLevelPermissions();\n }\n\n canUseHcmsFieldPermissions(): boolean {\n return this.license.canUseHcmsFieldPermissions();\n }\n\n canUsePrivateFiles(): boolean {\n return this.license.canUsePrivateFiles();\n }\n\n canUseRecordLocking(): boolean {\n return this.license.canUseRecordLocking();\n }\n\n canUseTeams(): boolean {\n return this.license.canUseTeams();\n }\n\n getRawLicense(): DecryptedWcpProjectLicense | null {\n return this.license.getRawLicense();\n }\n\n public canUseWorkflows(): boolean {\n return this.license.canUseWorkflows();\n }\n\n canUseAiImageEnrichment(): boolean {\n return this.license.canUseAiImageEnrichment();\n }\n\n canUseAiPageGeneration(): boolean {\n return this.license.canUseAiPageGeneration();\n }\n\n canUseAiPageTranslation(): boolean {\n return this.license.canUseAiPageTranslation();\n }\n\n canUseAiLexicalGeneration(): boolean {\n return this.license.canUseAiLexicalGeneration();\n }\n\n canUseAiEntryGeneration(): boolean {\n return this.license.canUseAiEntryGeneration();\n }\n\n canUseAiEntryComparison(): boolean {\n return this.license.canUseAiEntryComparison();\n }\n\n canUseAiEntryTranslation(): boolean {\n return this.license.canUseAiEntryTranslation();\n }\n\n canUseAbTesting(): boolean {\n return this.license.canUseAbTesting();\n }\n\n canUseRemoteComponents(): boolean {\n return this.license.canUseRemoteComponents();\n }\n\n toDto(): DecryptedWcpProjectLicense | null {\n return this.license.toDto();\n }\n}\n"],"names":["ReactLicense","license","featureId"],"mappings":"AAGO,MAAMA;IAGT,YAAYC,OAAiB,CAAE;QAC3B,IAAI,CAAC,OAAO,GAAGA;IACnB;IAEA,aAAgC;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU;IAClC;IAEA,aAAsB;QAClB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU;IAClC;IAEA,kBAA2B;QACvB,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe;IACvC;IAEA,cAAcC,SAAyC,EAAW;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,CAACA;IACtC;IAEA,mCAA4C;QACxC,OAAO,IAAI,CAAC,OAAO,CAAC,gCAAgC;IACxD;IAEA,+BAAwC;QACpC,OAAO,IAAI,CAAC,OAAO,CAAC,4BAA4B;IACpD;IAEA,6BAAsC;QAClC,OAAO,IAAI,CAAC,OAAO,CAAC,0BAA0B;IAClD;IAEA,qBAA8B;QAC1B,OAAO,IAAI,CAAC,OAAO,CAAC,kBAAkB;IAC1C;IAEA,sBAA+B;QAC3B,OAAO,IAAI,CAAC,OAAO,CAAC,mBAAmB;IAC3C;IAEA,cAAuB;QACnB,OAAO,IAAI,CAAC,OAAO,CAAC,WAAW;IACnC;IAEA,gBAAmD;QAC/C,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa;IACrC;IAEO,kBAA2B;QAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe;IACvC;IAEA,0BAAmC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,uBAAuB;IAC/C;IAEA,yBAAkC;QAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,sBAAsB;IAC9C;IAEA,0BAAmC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,uBAAuB;IAC/C;IAEA,4BAAqC;QACjC,OAAO,IAAI,CAAC,OAAO,CAAC,yBAAyB;IACjD;IAEA,0BAAmC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,uBAAuB;IAC/C;IAEA,0BAAmC;QAC/B,OAAO,IAAI,CAAC,OAAO,CAAC,uBAAuB;IAC/C;IAEA,2BAAoC;QAChC,OAAO,IAAI,CAAC,OAAO,CAAC,wBAAwB;IAChD;IAEA,kBAA2B;QACvB,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe;IACvC;IAEA,yBAAkC;QAC9B,OAAO,IAAI,CAAC,OAAO,CAAC,sBAAsB;IAC9C;IAEA,QAA2C;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK;IAC7B;AACJ"}
1
+ {"version":3,"file":"features/wcp/ReactLicense.js","sources":["../../../src/features/wcp/ReactLicense.ts"],"sourcesContent":["import type { DecryptedWcpProjectLicense, ILicense, WcpProject } from \"@webiny/wcp/types.js\";\nimport type { WCP_FEATURE_LABEL } from \"@webiny/wcp\";\n\nexport class ReactLicense implements ILicense {\n private readonly license: ILicense;\n\n constructor(license: ILicense) {\n this.license = license;\n }\n\n getProject(): WcpProject | null {\n return this.license.getProject();\n }\n\n canUseAacl(): boolean {\n return this.license.canUseAacl();\n }\n\n canUseAuditLogs(): boolean {\n return this.license.canUseAuditLogs();\n }\n\n canUseFeature(featureId: keyof typeof WCP_FEATURE_LABEL): boolean {\n return this.license.canUseFeature(featureId);\n }\n\n canUseFileManagerThreatDetection(): boolean {\n return this.license.canUseFileManagerThreatDetection();\n }\n\n canUseFolderLevelPermissions(): boolean {\n return this.license.canUseFolderLevelPermissions();\n }\n\n canUseHcmsFieldPermissions(): boolean {\n return this.license.canUseHcmsFieldPermissions();\n }\n\n canUsePrivateFiles(): boolean {\n return this.license.canUsePrivateFiles();\n }\n\n canUseRecordLocking(): boolean {\n return this.license.canUseRecordLocking();\n }\n\n canUseTeams(): boolean {\n return this.license.canUseTeams();\n }\n\n getRawLicense(): DecryptedWcpProjectLicense | null {\n return this.license.getRawLicense();\n }\n\n public canUseWorkflows(): boolean {\n return this.license.canUseWorkflows();\n }\n\n canUseAiImageEnrichment(): boolean {\n return this.license.canUseAiImageEnrichment();\n }\n\n canUseAiPageGeneration(): boolean {\n return this.license.canUseAiPageGeneration();\n }\n\n canUseAiPageTranslation(): boolean {\n return this.license.canUseAiPageTranslation();\n }\n\n canUseAiLexicalGeneration(): boolean {\n return this.license.canUseAiLexicalGeneration();\n }\n\n canUseAiAdminAssistant(): boolean {\n return this.license.canUseAiAdminAssistant();\n }\n\n canUseAiEntryGeneration(): boolean {\n return this.license.canUseAiEntryGeneration();\n }\n\n canUseAiEntryComparison(): boolean {\n return this.license.canUseAiEntryComparison();\n }\n\n canUseAiEntryTranslation(): boolean {\n return this.license.canUseAiEntryTranslation();\n }\n\n canUseAiPowerups(): boolean {\n return this.license.canUseAiPowerups();\n }\n\n canUseAbTesting(): boolean {\n return this.license.canUseAbTesting();\n }\n\n canUseCollaboration(): boolean {\n return this.license.canUseCollaboration();\n }\n\n canUseComments(): boolean {\n return this.license.canUseComments();\n }\n\n canUseActivityLog(): boolean {\n return this.license.canUseActivityLog();\n }\n\n canUseLanguages(): boolean {\n return this.license.canUseLanguages();\n }\n\n toDto(): DecryptedWcpProjectLicense | null {\n return this.license.toDto();\n }\n}\n"],"names":["ReactLicense","license","featureId"],"mappings":"AAGO,MAAMA;IAGT,YAAYC,OAAiB,CAAE;QAC3B,IAAI,CAAC,OAAO,GAAGA;IACnB;IAEA,aAAgC;QAC5B,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU;IAClC;IAEA,aAAsB;QAClB,OAAO,IAAI,CAAC,OAAO,CAAC,UAAU;IAClC;IAEA,kBAA2B;QACvB,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe;IACvC;IAEA,cAAcC,SAAyC,EAAW;QAC9D,OAAO,IAAI,CAAC,OAAO,CAAC,aAAa,CAACA;IACtC;IAEA,m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;IAC3C;IAEA,iBAA0B;QACtB,OAAO,IAAI,CAAC,OAAO,CAAC,cAAc;IACtC;IAEA,oBAA6B;QACzB,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB;IACzC;IAEA,kBAA2B;QACvB,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe;IACvC;IAEA,QAA2C;QACvC,OAAO,IAAI,CAAC,OAAO,CAAC,KAAK;IAC7B;AACJ"}
@@ -42,6 +42,10 @@ const GET_WCP_PROJECT = `
42
42
  abTesting {
43
43
  enabled
44
44
  }
45
+ collaboration {
46
+ enabled
47
+ options
48
+ }
45
49
  }
46
50
  }
47
51
  }
@@ -1 +1 @@
1
- {"version":3,"file":"features/wcp/WcpGateway.js","sources":["../../../src/features/wcp/WcpGateway.ts"],"sourcesContent":["import { createImplementation } from \"@webiny/di\";\nimport { WcpGateway as WcpGatewayAbstraction } from \"./abstractions.js\";\nimport { MainGraphQLClient } from \"@webiny/app/features/mainGraphQLClient/index.js\";\nimport type { GetWcpProjectResponse, WcpProjectData } from \"./types.js\";\n\nconst GET_WCP_PROJECT = /* GraphQL */ `\n query GetWcpProject {\n wcp {\n getProject {\n data {\n orgId\n projectId\n package {\n features {\n seats {\n enabled\n options\n }\n multiTenancy {\n enabled\n options\n }\n advancedPublishingWorkflow {\n enabled\n }\n advancedAccessControlLayer {\n enabled\n options\n }\n auditLogs {\n enabled\n }\n recordLocking {\n enabled\n }\n fileManager {\n enabled\n options\n }\n aiPowerups {\n enabled\n options\n }\n abTesting {\n enabled\n }\n }\n }\n }\n error {\n message\n code\n data\n }\n }\n }\n }\n`;\n\nclass WcpGraphQLGateway implements WcpGatewayAbstraction.Interface {\n constructor(private client: MainGraphQLClient.Interface) {}\n\n async fetchProject(): Promise<WcpProjectData | null> {\n const response = await this.client.execute<GetWcpProjectResponse>({\n query: GET_WCP_PROJECT,\n headers: {\n \"x-tenant\": \"root\"\n }\n });\n\n if (response.wcp.getProject.error) {\n throw new Error(response.wcp.getProject.error.message);\n }\n\n return response.wcp.getProject.data;\n }\n}\n\nexport const WcpGateway = createImplementation({\n abstraction: WcpGatewayAbstraction,\n implementation: WcpGraphQLGateway,\n dependencies: [MainGraphQLClient]\n});\n"],"names":["GET_WCP_PROJECT","WcpGraphQLGateway","client","response","Error","WcpGateway","createImplementation","WcpGatewayAbstraction","MainGraphQLClient"],"mappings":";;;AAKA,MAAMA,kBAAgC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDvC,CAAC;AAED,MAAMC;IACF,YAAoBC,MAAmC,CAAE;aAArCA,MAAM,GAANA;IAAsC;IAE1D,MAAM,eAA+C;QACjD,MAAMC,WAAW,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAwB;YAC9D,OAAOH;YACP,SAAS;gBACL,YAAY;YAChB;QACJ;QAEA,IAAIG,SAAS,GAAG,CAAC,UAAU,CAAC,KAAK,EAC7B,MAAM,IAAIC,MAAMD,SAAS,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO;QAGzD,OAAOA,SAAS,GAAG,CAAC,UAAU,CAAC,IAAI;IACvC;AACJ;AAEO,MAAME,wBAAaC,qBAAqB;IAC3C,aAAaC;IACb,gBAAgBN;IAChB,cAAc;QAACO;KAAkB;AACrC"}
1
+ {"version":3,"file":"features/wcp/WcpGateway.js","sources":["../../../src/features/wcp/WcpGateway.ts"],"sourcesContent":["import { createImplementation } from \"@webiny/di\";\nimport { WcpGateway as WcpGatewayAbstraction } from \"./abstractions.js\";\nimport { MainGraphQLClient } from \"@webiny/app/features/mainGraphQLClient/index.js\";\nimport type { GetWcpProjectResponse, WcpProjectData } from \"./types.js\";\n\nconst GET_WCP_PROJECT = /* GraphQL */ `\n query GetWcpProject {\n wcp {\n getProject {\n data {\n orgId\n projectId\n package {\n features {\n seats {\n enabled\n options\n }\n multiTenancy {\n enabled\n options\n }\n advancedPublishingWorkflow {\n enabled\n }\n advancedAccessControlLayer {\n enabled\n options\n }\n auditLogs {\n enabled\n }\n recordLocking {\n enabled\n }\n fileManager {\n enabled\n options\n }\n aiPowerups {\n enabled\n options\n }\n abTesting {\n enabled\n }\n collaboration {\n enabled\n options\n }\n }\n }\n }\n error {\n message\n code\n data\n }\n }\n }\n }\n`;\n\nclass WcpGraphQLGateway implements WcpGatewayAbstraction.Interface {\n constructor(private client: MainGraphQLClient.Interface) {}\n\n async fetchProject(): Promise<WcpProjectData | null> {\n const response = await this.client.execute<GetWcpProjectResponse>({\n query: GET_WCP_PROJECT,\n headers: {\n \"x-tenant\": \"root\"\n }\n });\n\n if (response.wcp.getProject.error) {\n throw new Error(response.wcp.getProject.error.message);\n }\n\n return response.wcp.getProject.data;\n }\n}\n\nexport const WcpGateway = createImplementation({\n abstraction: WcpGatewayAbstraction,\n implementation: WcpGraphQLGateway,\n dependencies: [MainGraphQLClient]\n});\n"],"names":["GET_WCP_PROJECT","WcpGraphQLGateway","client","response","Error","WcpGateway","createImplementation","WcpGatewayAbstraction","MainGraphQLClient"],"mappings":";;;AAKA,MAAMA,kBAAgC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwDvC,CAAC;AAED,MAAMC;IACF,YAAoBC,MAAmC,CAAE;aAArCA,MAAM,GAANA;IAAsC;IAE1D,MAAM,eAA+C;QACjD,MAAMC,WAAW,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAwB;YAC9D,OAAOH;YACP,SAAS;gBACL,YAAY;YAChB;QACJ;QAEA,IAAIG,SAAS,GAAG,CAAC,UAAU,CAAC,KAAK,EAC7B,MAAM,IAAIC,MAAMD,SAAS,GAAG,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO;QAGzD,OAAOA,SAAS,GAAG,CAAC,UAAU,CAAC,IAAI;IACvC;AACJ;AAEO,MAAME,wBAAaC,qBAAqB;IAC3C,aAAaC;IACb,gBAAgBN;IAChB,cAAc;QAACO;KAAkB;AACrC"}