@webiny/app-admin 0.0.0-unstable.e622468070 → 0.0.0-unstable.e6f0dc8ca7

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 (504) hide show
  1. package/base/Admin.js +7 -1
  2. package/base/Admin.js.map +1 -1
  3. package/base/Base/DefaultFieldRenderers.d.ts +2 -0
  4. package/base/Base/DefaultFieldRenderers.js +99 -0
  5. package/base/Base/DefaultFieldRenderers.js.map +1 -0
  6. package/base/Base/DefaultLayoutRenderers.d.ts +2 -0
  7. package/base/Base/DefaultLayoutRenderers.js +15 -0
  8. package/base/Base/DefaultLayoutRenderers.js.map +1 -0
  9. package/base/Base/FieldRenderers/CheckboxesRenderer.d.ts +13 -0
  10. package/base/Base/FieldRenderers/CheckboxesRenderer.js +28 -0
  11. package/base/Base/FieldRenderers/CheckboxesRenderer.js.map +1 -0
  12. package/base/Base/FieldRenderers/CodeEditorRenderer.d.ts +15 -0
  13. package/base/Base/FieldRenderers/CodeEditorRenderer.js +17 -0
  14. package/base/Base/FieldRenderers/CodeEditorRenderer.js.map +1 -0
  15. package/base/Base/FieldRenderers/DateTimeInputsRenderer.d.ts +17 -0
  16. package/base/Base/FieldRenderers/DateTimeInputsRenderer.js +66 -0
  17. package/base/Base/FieldRenderers/DateTimeInputsRenderer.js.map +1 -0
  18. package/base/Base/FieldRenderers/DateTimeRenderer.d.ts +21 -0
  19. package/base/Base/FieldRenderers/DateTimeRenderer.js +46 -0
  20. package/base/Base/FieldRenderers/DateTimeRenderer.js.map +1 -0
  21. package/base/Base/FieldRenderers/FilePickerRenderer.d.ts +13 -0
  22. package/base/Base/FieldRenderers/FilePickerRenderer.js +51 -0
  23. package/base/Base/FieldRenderers/FilePickerRenderer.js.map +1 -0
  24. package/base/Base/FieldRenderers/FileUrlPickerRenderer.d.ts +12 -0
  25. package/base/Base/FieldRenderers/FileUrlPickerRenderer.js +25 -0
  26. package/base/Base/FieldRenderers/FileUrlPickerRenderer.js.map +1 -0
  27. package/base/Base/FieldRenderers/HiddenRenderer.d.ts +12 -0
  28. package/base/Base/FieldRenderers/HiddenRenderer.js +5 -0
  29. package/base/Base/FieldRenderers/HiddenRenderer.js.map +1 -0
  30. package/base/Base/FieldRenderers/HorizontalTabsRenderer.d.ts +5 -0
  31. package/base/Base/FieldRenderers/HorizontalTabsRenderer.js +27 -0
  32. package/base/Base/FieldRenderers/HorizontalTabsRenderer.js.map +1 -0
  33. package/base/Base/FieldRenderers/InputRenderer.d.ts +12 -0
  34. package/base/Base/FieldRenderers/InputRenderer.js +23 -0
  35. package/base/Base/FieldRenderers/InputRenderer.js.map +1 -0
  36. package/base/Base/FieldRenderers/MultiFilePickerRenderer.d.ts +13 -0
  37. package/base/Base/FieldRenderers/MultiFilePickerRenderer.js +68 -0
  38. package/base/Base/FieldRenderers/MultiFilePickerRenderer.js.map +1 -0
  39. package/base/Base/FieldRenderers/NumberInputRenderer.d.ts +12 -0
  40. package/base/Base/FieldRenderers/NumberInputRenderer.js +23 -0
  41. package/base/Base/FieldRenderers/NumberInputRenderer.js.map +1 -0
  42. package/base/Base/FieldRenderers/NumberInputsRenderer.d.ts +14 -0
  43. package/base/Base/FieldRenderers/NumberInputsRenderer.js +49 -0
  44. package/base/Base/FieldRenderers/NumberInputsRenderer.js.map +1 -0
  45. package/base/Base/FieldRenderers/ObjectRenderer/DynamicZoneRenderer.d.ts +14 -0
  46. package/base/Base/FieldRenderers/ObjectRenderer/DynamicZoneRenderer.js +20 -0
  47. package/base/Base/FieldRenderers/ObjectRenderer/DynamicZoneRenderer.js.map +1 -0
  48. package/base/Base/FieldRenderers/ObjectRenderer/KeyValueTagsRenderer.d.ts +14 -0
  49. package/base/Base/FieldRenderers/ObjectRenderer/KeyValueTagsRenderer.js +65 -0
  50. package/base/Base/FieldRenderers/ObjectRenderer/KeyValueTagsRenderer.js.map +1 -0
  51. package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone.d.ts +10 -0
  52. package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone.js +109 -0
  53. package/base/Base/FieldRenderers/ObjectRenderer/MultiValueDynamicZone.js.map +1 -0
  54. package/base/Base/FieldRenderers/ObjectRenderer/ObjectAccordionMultipleRenderer.d.ts +17 -0
  55. package/base/Base/FieldRenderers/ObjectRenderer/ObjectAccordionMultipleRenderer.js +55 -0
  56. package/base/Base/FieldRenderers/ObjectRenderer/ObjectAccordionMultipleRenderer.js.map +1 -0
  57. package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.d.ts +28 -0
  58. package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.js +89 -0
  59. package/base/Base/FieldRenderers/ObjectRenderer/ObjectFieldComponents.js.map +1 -0
  60. package/base/Base/FieldRenderers/ObjectRenderer/ObjectRenderer.d.ts +14 -0
  61. package/base/Base/FieldRenderers/ObjectRenderer/ObjectRenderer.js +20 -0
  62. package/base/Base/FieldRenderers/ObjectRenderer/ObjectRenderer.js.map +1 -0
  63. package/base/Base/FieldRenderers/ObjectRenderer/SingleValueDynamicZone.d.ts +10 -0
  64. package/base/Base/FieldRenderers/ObjectRenderer/SingleValueDynamicZone.js +64 -0
  65. package/base/Base/FieldRenderers/ObjectRenderer/SingleValueDynamicZone.js.map +1 -0
  66. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker.d.ts +10 -0
  67. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker.js +85 -0
  68. package/base/Base/FieldRenderers/ObjectRenderer/TemplatePicker.js.map +1 -0
  69. package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.d.ts +4 -0
  70. package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.js +22 -0
  71. package/base/Base/FieldRenderers/ObjectRenderer/resolveItemTitle.js.map +1 -0
  72. package/base/Base/FieldRenderers/PassthroughRenderer.d.ts +12 -0
  73. package/base/Base/FieldRenderers/PassthroughRenderer.js +15 -0
  74. package/base/Base/FieldRenderers/PassthroughRenderer.js.map +1 -0
  75. package/base/Base/FieldRenderers/RadioButtonsRenderer.d.ts +13 -0
  76. package/base/Base/FieldRenderers/RadioButtonsRenderer.js +27 -0
  77. package/base/Base/FieldRenderers/RadioButtonsRenderer.js.map +1 -0
  78. package/base/Base/FieldRenderers/SelectRenderer.d.ts +13 -0
  79. package/base/Base/FieldRenderers/SelectRenderer.js +29 -0
  80. package/base/Base/FieldRenderers/SelectRenderer.js.map +1 -0
  81. package/base/Base/FieldRenderers/SwitchRenderer.d.ts +12 -0
  82. package/base/Base/FieldRenderers/SwitchRenderer.js +19 -0
  83. package/base/Base/FieldRenderers/SwitchRenderer.js.map +1 -0
  84. package/base/Base/FieldRenderers/TagsRenderer.d.ts +12 -0
  85. package/base/Base/FieldRenderers/TagsRenderer.js +21 -0
  86. package/base/Base/FieldRenderers/TagsRenderer.js.map +1 -0
  87. package/base/Base/FieldRenderers/TextInputsRenderer.d.ts +14 -0
  88. package/base/Base/FieldRenderers/TextInputsRenderer.js +48 -0
  89. package/base/Base/FieldRenderers/TextInputsRenderer.js.map +1 -0
  90. package/base/Base/FieldRenderers/TextareaRenderer.d.ts +14 -0
  91. package/base/Base/FieldRenderers/TextareaRenderer.js +24 -0
  92. package/base/Base/FieldRenderers/TextareaRenderer.js.map +1 -0
  93. package/base/Base/FieldRenderers/TextareasRenderer.d.ts +14 -0
  94. package/base/Base/FieldRenderers/TextareasRenderer.js +51 -0
  95. package/base/Base/FieldRenderers/TextareasRenderer.js.map +1 -0
  96. package/base/Base/FieldRenderers/VerticalTabsRenderer.d.ts +5 -0
  97. package/base/Base/FieldRenderers/VerticalTabsRenderer.js +41 -0
  98. package/base/Base/FieldRenderers/VerticalTabsRenderer.js.map +1 -0
  99. package/base/Base/LexicalPreset.js +4 -5
  100. package/base/Base/LexicalPreset.js.map +1 -1
  101. package/base/Base/Menus.js +32 -74
  102. package/base/Base/Menus.js.map +1 -1
  103. package/base/Base/RoutesConfig.js +6 -0
  104. package/base/Base/RoutesConfig.js.map +1 -1
  105. package/base/Base.js +3 -2
  106. package/base/Base.js.map +1 -1
  107. package/base/createRootContainer.js +7 -1
  108. package/base/createRootContainer.js.map +1 -1
  109. package/base/providers/UiProviders.js +19 -1
  110. package/base/providers/UiProviders.js.map +1 -1
  111. package/base/ui/Brand.d.ts +6 -6
  112. package/base/ui/Dashboard.d.ts +6 -6
  113. package/base/ui/FileManager.d.ts +6 -6
  114. package/base/ui/Layout.d.ts +6 -6
  115. package/base/ui/LoginScreen.d.ts +12 -12
  116. package/base/ui/Logo.d.ts +6 -6
  117. package/base/ui/Navigation.d.ts +6 -6
  118. package/base/ui/NotFound.d.ts +6 -6
  119. package/base/ui/TenantSelector.d.ts +6 -6
  120. package/base/ui/UserMenu/UserMenu.d.ts +6 -6
  121. package/base/ui/UserMenu/UserMenuHandle.d.ts +6 -6
  122. package/base/ui/UserMenu/UserMenuItem.d.ts +12 -12
  123. package/base/ui/UserMenu/UserMenuLink.d.ts +12 -12
  124. package/base/ui/UserMenu/UserMenuSeparator.d.ts +6 -6
  125. package/base/ui/UserMenu.d.ts +12 -12
  126. package/components/DeveloperMode/DeveloperMode.d.ts +11 -0
  127. package/components/DeveloperMode/DeveloperMode.js +17 -0
  128. package/components/DeveloperMode/DeveloperMode.js.map +1 -0
  129. package/components/DeveloperMode/index.d.ts +2 -0
  130. package/components/DeveloperMode/index.js +3 -0
  131. package/components/DeveloperMode/index.js.map +1 -0
  132. package/components/Dialogs/Dialog.d.ts +3 -2
  133. package/components/Dialogs/Dialog.js +8 -6
  134. package/components/Dialogs/Dialog.js.map +1 -1
  135. package/components/Dialogs/DialogParamsContext.d.ts +6 -0
  136. package/components/Dialogs/DialogParamsContext.js +11 -0
  137. package/components/Dialogs/DialogParamsContext.js.map +1 -0
  138. package/components/Dialogs/DialogsContext.d.ts +8 -5
  139. package/components/Dialogs/DialogsContext.js +34 -4
  140. package/components/Dialogs/DialogsContext.js.map +1 -1
  141. package/components/Filters/Filters.js.map +1 -1
  142. package/components/FloatingActionButton.js +2 -2
  143. package/components/FloatingActionButton.js.map +1 -1
  144. package/components/IconPicker/IconRenderer.d.ts +6 -6
  145. package/components/IconPicker/components/IconPickerCell.d.ts +1 -1
  146. package/components/IconPicker/components/IconPickerTrigger.d.ts +1 -1
  147. package/components/IconPicker/components/IconPickerTrigger.js.map +1 -1
  148. package/components/LexicalEditor/LexicalEditor.js +7 -1
  149. package/components/LexicalEditor/LexicalEditor.js.map +1 -1
  150. package/components/LexicalEditor/LexicalLinkForm.d.ts +6 -0
  151. package/components/LexicalEditor/LexicalLinkForm.js +94 -0
  152. package/components/LexicalEditor/LexicalLinkForm.js.map +1 -0
  153. package/components/LexicalEditor/index.d.ts +1 -0
  154. package/components/LexicalEditor/index.js +1 -0
  155. package/components/LexicalEditor/index.js.map +1 -1
  156. package/components/LexicalEditor/lexicalValueFromHtml.d.ts +7 -0
  157. package/components/LexicalEditor/lexicalValueFromHtml.js +35 -0
  158. package/components/LexicalEditor/lexicalValueFromHtml.js.map +1 -0
  159. package/components/OptionsMenu/OptionsMenu.d.ts +6 -0
  160. package/components/OptionsMenu/OptionsMenu.js +3 -3
  161. package/components/OptionsMenu/OptionsMenu.js.map +1 -1
  162. package/components/OverlayLayout/components/OverlayHeader.d.ts +1 -1
  163. package/components/OverlayLayout/components/OverlayHeader.js.map +1 -1
  164. package/components/OverlayLayout/components/OverlayRoot.js +3 -0
  165. package/components/OverlayLayout/components/OverlayRoot.js.map +1 -1
  166. package/components/Permissions/Permissions.d.ts +1 -3
  167. package/components/Permissions/Permissions.js +37 -31
  168. package/components/Permissions/Permissions.js.map +1 -1
  169. package/components/Permissions/StyledComponents.js +9 -3
  170. package/components/Permissions/StyledComponents.js.map +1 -1
  171. package/components/RegisterFeature.js +5 -5
  172. package/components/RegisterFeature.js.map +1 -1
  173. package/components/RoleAutocomplete/index.d.ts +5 -3
  174. package/components/RoleAutocomplete/index.js +15 -6
  175. package/components/RoleAutocomplete/index.js.map +1 -1
  176. package/components/RolesMultiAutocomplete/index.d.ts +5 -3
  177. package/components/RolesMultiAutocomplete/index.js +15 -7
  178. package/components/RolesMultiAutocomplete/index.js.map +1 -1
  179. package/components/SimpleForm/SimpleForm.d.ts +3 -3
  180. package/components/SimpleForm/SimpleForm.js +1 -0
  181. package/components/SimpleForm/SimpleForm.js.map +1 -1
  182. package/components/SimpleUI/InputField.js +25 -46
  183. package/components/SimpleUI/InputField.js.map +1 -1
  184. package/components/SingleImageUpload.d.ts +1 -1
  185. package/components/SingleImageUpload.js.map +1 -1
  186. package/components/TeamAutocomplete/index.d.ts +5 -3
  187. package/components/TeamAutocomplete/index.js +15 -6
  188. package/components/TeamAutocomplete/index.js.map +1 -1
  189. package/components/TeamsMultiAutocomplete/index.d.ts +5 -3
  190. package/components/TeamsMultiAutocomplete/index.js +15 -7
  191. package/components/TeamsMultiAutocomplete/index.js.map +1 -1
  192. package/components/Wcp.d.ts +4 -0
  193. package/components/Wcp.js +15 -1
  194. package/components/Wcp.js.map +1 -1
  195. package/components/index.d.ts +5 -5
  196. package/components/index.js +4 -5
  197. package/components/index.js.map +1 -1
  198. package/config/AdminConfig/Dialog.d.ts +10 -0
  199. package/config/AdminConfig/Dialog.js +21 -0
  200. package/config/AdminConfig/Dialog.js.map +1 -0
  201. package/config/AdminConfig/FieldRenderer.d.ts +11 -0
  202. package/config/AdminConfig/FieldRenderer.js +21 -0
  203. package/config/AdminConfig/FieldRenderer.js.map +1 -0
  204. package/config/AdminConfig/Form.d.ts +4 -0
  205. package/config/AdminConfig/Form.js +8 -0
  206. package/config/AdminConfig/Form.js.map +1 -0
  207. package/config/AdminConfig/LayoutRenderer.d.ts +10 -0
  208. package/config/AdminConfig/LayoutRenderer.js +21 -0
  209. package/config/AdminConfig/LayoutRenderer.js.map +1 -0
  210. package/config/AdminConfig/Menu/MenuLink.d.ts +2 -2
  211. package/config/AdminConfig/Security.d.ts +3 -0
  212. package/config/AdminConfig/Security.js +6 -0
  213. package/config/AdminConfig/Security.js.map +1 -0
  214. package/config/AdminConfig/SecurityPermissions.d.ts +17 -0
  215. package/config/AdminConfig/SecurityPermissions.js +31 -0
  216. package/config/AdminConfig/SecurityPermissions.js.map +1 -0
  217. package/config/AdminConfig.d.ts +22 -1
  218. package/config/AdminConfig.js +16 -4
  219. package/config/AdminConfig.js.map +1 -1
  220. package/domain/Identity.js +1 -1
  221. package/domain/Identity.js.map +1 -1
  222. package/exports/admin/build-params.d.ts +4 -0
  223. package/exports/admin/build-params.js +7 -0
  224. package/exports/admin/build-params.js.map +1 -0
  225. package/exports/admin/form.d.ts +16 -0
  226. package/exports/admin/form.js +20 -0
  227. package/exports/admin/form.js.map +1 -0
  228. package/exports/admin/security.d.ts +6 -0
  229. package/exports/admin/security.js +5 -0
  230. package/exports/admin/security.js.map +1 -1
  231. package/exports/admin/ui.d.ts +5 -0
  232. package/exports/admin/ui.js +5 -0
  233. package/exports/admin/ui.js.map +1 -1
  234. package/exports/admin.d.ts +6 -0
  235. package/exports/admin.js +6 -0
  236. package/exports/admin.js.map +1 -1
  237. package/features/buildParams/feature.d.ts +1 -1
  238. package/features/buildParams/feature.js +4 -0
  239. package/features/buildParams/feature.js.map +1 -1
  240. package/features/formModel/ConditionRuleEvaluator.d.ts +9 -0
  241. package/features/formModel/ConditionRuleEvaluator.js +56 -0
  242. package/features/formModel/ConditionRuleEvaluator.js.map +1 -0
  243. package/features/formModel/Field.d.ts +99 -0
  244. package/features/formModel/Field.js +433 -0
  245. package/features/formModel/Field.js.map +1 -0
  246. package/features/formModel/FieldBuilder.d.ts +44 -0
  247. package/features/formModel/FieldBuilder.js +182 -0
  248. package/features/formModel/FieldBuilder.js.map +1 -0
  249. package/features/formModel/FieldBuilder.test.d.ts +1 -0
  250. package/features/formModel/FieldBuilder.test.js +220 -0
  251. package/features/formModel/FieldBuilder.test.js.map +1 -0
  252. package/features/formModel/FieldBuilderRegistry.d.ts +4 -0
  253. package/features/formModel/FieldBuilderRegistry.js +31 -0
  254. package/features/formModel/FieldBuilderRegistry.js.map +1 -0
  255. package/features/formModel/FocusManager.d.ts +14 -0
  256. package/features/formModel/FocusManager.js +109 -0
  257. package/features/formModel/FocusManager.js.map +1 -0
  258. package/features/formModel/FormErrors.d.ts +9 -0
  259. package/features/formModel/FormErrors.js +38 -0
  260. package/features/formModel/FormErrors.js.map +1 -0
  261. package/features/formModel/FormModel.d.ts +59 -0
  262. package/features/formModel/FormModel.js +461 -0
  263. package/features/formModel/FormModel.js.map +1 -0
  264. package/features/formModel/FormModel.test.d.ts +1 -0
  265. package/features/formModel/FormModel.test.js +3374 -0
  266. package/features/formModel/FormModel.test.js.map +1 -0
  267. package/features/formModel/FormModelFactory.d.ts +11 -0
  268. package/features/formModel/FormModelFactory.js +23 -0
  269. package/features/formModel/FormModelFactory.js.map +1 -0
  270. package/features/formModel/FormView.d.ts +46 -0
  271. package/features/formModel/FormView.js +234 -0
  272. package/features/formModel/FormView.js.map +1 -0
  273. package/features/formModel/LayoutBuilderFactory.d.ts +61 -0
  274. package/features/formModel/LayoutBuilderFactory.js +386 -0
  275. package/features/formModel/LayoutBuilderFactory.js.map +1 -0
  276. package/features/formModel/LayoutMutator.d.ts +11 -0
  277. package/features/formModel/LayoutMutator.js +136 -0
  278. package/features/formModel/LayoutMutator.js.map +1 -0
  279. package/features/formModel/LayoutResolver.d.ts +26 -0
  280. package/features/formModel/LayoutResolver.js +239 -0
  281. package/features/formModel/LayoutResolver.js.map +1 -0
  282. package/features/formModel/ObjectField.d.ts +97 -0
  283. package/features/formModel/ObjectField.js +763 -0
  284. package/features/formModel/ObjectField.js.map +1 -0
  285. package/features/formModel/PresenterErrors.d.ts +9 -0
  286. package/features/formModel/PresenterErrors.js +36 -0
  287. package/features/formModel/PresenterErrors.js.map +1 -0
  288. package/features/formModel/Rules.test.d.ts +1 -0
  289. package/features/formModel/Rules.test.js +289 -0
  290. package/features/formModel/Rules.test.js.map +1 -0
  291. package/features/formModel/abstractions.d.ts +715 -0
  292. package/features/formModel/abstractions.js +117 -0
  293. package/features/formModel/abstractions.js.map +1 -0
  294. package/features/formModel/createFieldRenderer.d.ts +20 -0
  295. package/features/formModel/createFieldRenderer.js +44 -0
  296. package/features/formModel/createFieldRenderer.js.map +1 -0
  297. package/features/formModel/demo/FieldRenderersDemoPresenter.d.ts +18 -0
  298. package/features/formModel/demo/FieldRenderersDemoPresenter.js +225 -0
  299. package/features/formModel/demo/FieldRenderersDemoPresenter.js.map +1 -0
  300. package/features/formModel/demo/FormModelDemo.d.ts +4 -0
  301. package/features/formModel/demo/FormModelDemo.js +234 -0
  302. package/features/formModel/demo/FormModelDemo.js.map +1 -0
  303. package/features/formModel/demo/FormModelDemoPresenter.d.ts +22 -0
  304. package/features/formModel/demo/FormModelDemoPresenter.js +121 -0
  305. package/features/formModel/demo/FormModelDemoPresenter.js.map +1 -0
  306. package/features/formModel/demo/FormModelPhase11Presenter.d.ts +25 -0
  307. package/features/formModel/demo/FormModelPhase11Presenter.js +104 -0
  308. package/features/formModel/demo/FormModelPhase11Presenter.js.map +1 -0
  309. package/features/formModel/demo/FormModelPhase8c1Presenter.d.ts +23 -0
  310. package/features/formModel/demo/FormModelPhase8c1Presenter.js +62 -0
  311. package/features/formModel/demo/FormModelPhase8c1Presenter.js.map +1 -0
  312. package/features/formModel/feature.d.ts +3 -0
  313. package/features/formModel/feature.js +28 -0
  314. package/features/formModel/feature.js.map +1 -0
  315. package/features/formModel/fieldTypes/BooleanFieldType.d.ts +19 -0
  316. package/features/formModel/fieldTypes/BooleanFieldType.js +23 -0
  317. package/features/formModel/fieldTypes/BooleanFieldType.js.map +1 -0
  318. package/features/formModel/fieldTypes/DateTimeFieldType.d.ts +173 -0
  319. package/features/formModel/fieldTypes/DateTimeFieldType.js +369 -0
  320. package/features/formModel/fieldTypes/DateTimeFieldType.js.map +1 -0
  321. package/features/formModel/fieldTypes/FileFieldType.d.ts +29 -0
  322. package/features/formModel/fieldTypes/FileFieldType.js +55 -0
  323. package/features/formModel/fieldTypes/FileFieldType.js.map +1 -0
  324. package/features/formModel/fieldTypes/FileUrlFieldType.d.ts +18 -0
  325. package/features/formModel/fieldTypes/FileUrlFieldType.js +20 -0
  326. package/features/formModel/fieldTypes/FileUrlFieldType.js.map +1 -0
  327. package/features/formModel/fieldTypes/NumberFieldType.d.ts +19 -0
  328. package/features/formModel/fieldTypes/NumberFieldType.js +27 -0
  329. package/features/formModel/fieldTypes/NumberFieldType.js.map +1 -0
  330. package/features/formModel/fieldTypes/ObjectFieldType.d.ts +34 -0
  331. package/features/formModel/fieldTypes/ObjectFieldType.js +109 -0
  332. package/features/formModel/fieldTypes/ObjectFieldType.js.map +1 -0
  333. package/features/formModel/fieldTypes/TextFieldType.d.ts +18 -0
  334. package/features/formModel/fieldTypes/TextFieldType.js +20 -0
  335. package/features/formModel/fieldTypes/TextFieldType.js.map +1 -0
  336. package/features/formModel/fieldTypes/index.d.ts +7 -0
  337. package/features/formModel/fieldTypes/index.js +9 -0
  338. package/features/formModel/fieldTypes/index.js.map +1 -0
  339. package/features/formModel/index.d.ts +24 -0
  340. package/features/formModel/index.js +42 -0
  341. package/features/formModel/index.js.map +1 -0
  342. package/features/formModel/renderers.d.ts +20 -0
  343. package/features/formModel/renderers.js +24 -0
  344. package/features/formModel/renderers.js.map +1 -0
  345. package/features/formModel/useFieldRenderers.d.ts +2 -0
  346. package/features/formModel/useFieldRenderers.js +19 -0
  347. package/features/formModel/useFieldRenderers.js.map +1 -0
  348. package/features/formModel/useLayoutRenderers.d.ts +2 -0
  349. package/features/formModel/useLayoutRenderers.js +19 -0
  350. package/features/formModel/useLayoutRenderers.js.map +1 -0
  351. package/features/security/LogIn/LogInGateway.d.ts +2 -2
  352. package/features/security/LogIn/LogInGateway.js +2 -2
  353. package/features/security/LogIn/LogInGateway.js.map +1 -1
  354. package/features/tools/LexicalContext/LexicalContext.d.ts +14 -0
  355. package/features/tools/LexicalContext/LexicalContext.js +22 -0
  356. package/features/tools/LexicalContext/LexicalContext.js.map +1 -0
  357. package/features/tools/LexicalContext/abstractions.d.ts +11 -0
  358. package/features/tools/LexicalContext/abstractions.js +4 -0
  359. package/features/tools/LexicalContext/abstractions.js.map +1 -0
  360. package/features/tools/LexicalContext/index.d.ts +2 -0
  361. package/features/tools/LexicalContext/index.js +3 -0
  362. package/features/tools/LexicalContext/index.js.map +1 -0
  363. package/features/tools/ToolPipelineRunner.d.ts +10 -0
  364. package/features/tools/ToolPipelineRunner.js +33 -0
  365. package/features/tools/ToolPipelineRunner.js.map +1 -0
  366. package/features/tools/ToolRegistry.d.ts +12 -0
  367. package/features/tools/ToolRegistry.js +29 -0
  368. package/features/tools/ToolRegistry.js.map +1 -0
  369. package/features/tools/abstractions.d.ts +28 -0
  370. package/features/tools/abstractions.js +6 -0
  371. package/features/tools/abstractions.js.map +1 -0
  372. package/features/tools/feature.d.ts +4 -0
  373. package/features/tools/feature.js +21 -0
  374. package/features/tools/feature.js.map +1 -0
  375. package/features/tools/index.d.ts +3 -0
  376. package/features/tools/index.js +5 -0
  377. package/features/tools/index.js.map +1 -0
  378. package/features/wcp/ReactLicense.d.ts +4 -0
  379. package/features/wcp/ReactLicense.js +12 -0
  380. package/features/wcp/ReactLicense.js.map +1 -1
  381. package/features/wcp/WcpGateway.d.ts +2 -2
  382. package/features/wcp/WcpGateway.js +6 -2
  383. package/features/wcp/WcpGateway.js.map +1 -1
  384. package/features/webinySdk/WebinySdk.d.ts +11 -0
  385. package/features/webinySdk/WebinySdk.js +27 -0
  386. package/features/webinySdk/WebinySdk.js.map +1 -0
  387. package/features/webinySdk/abstractions.d.ts +6 -0
  388. package/features/webinySdk/abstractions.js +8 -0
  389. package/features/webinySdk/abstractions.js.map +1 -0
  390. package/features/webinySdk/feature.d.ts +3 -0
  391. package/features/webinySdk/feature.js +16 -0
  392. package/features/webinySdk/feature.js.map +1 -0
  393. package/features/webinySdk/index.d.ts +2 -0
  394. package/features/webinySdk/index.js +4 -0
  395. package/features/webinySdk/index.js.map +1 -0
  396. package/hooks/index.d.ts +2 -0
  397. package/hooks/index.js +2 -0
  398. package/hooks/index.js.map +1 -1
  399. package/hooks/useConfirmationDialog.d.ts +1 -1
  400. package/hooks/useConfirmationDialog.js +5 -4
  401. package/hooks/useConfirmationDialog.js.map +1 -1
  402. package/hooks/useDialog.d.ts +9 -29
  403. package/hooks/useDialog.js +16 -24
  404. package/hooks/useDialog.js.map +1 -1
  405. package/hooks/useHotkeys.d.ts +9 -0
  406. package/hooks/useHotkeys.js +99 -0
  407. package/hooks/useHotkeys.js.map +1 -0
  408. package/hooks/useKeyHandler.js +1 -1
  409. package/hooks/useKeyHandler.js.map +1 -1
  410. package/hooks/useModKey.js +1 -1
  411. package/hooks/useModKey.js.map +1 -1
  412. package/hooks/useOpenDialog.d.ts +7 -0
  413. package/hooks/useOpenDialog.js +18 -0
  414. package/hooks/useOpenDialog.js.map +1 -0
  415. package/hooks/useShiftKey.js +1 -1
  416. package/hooks/useShiftKey.js.map +1 -1
  417. package/index.d.ts +22 -1
  418. package/index.js +23 -3
  419. package/index.js.map +1 -1
  420. package/package.json +47 -47
  421. package/permissions/PermissionRenderer.d.ts +6 -0
  422. package/permissions/PermissionRenderer.js +219 -0
  423. package/permissions/PermissionRenderer.js.map +1 -0
  424. package/permissions/PermissionValueContext.d.ts +11 -0
  425. package/permissions/PermissionValueContext.js +23 -0
  426. package/permissions/PermissionValueContext.js.map +1 -0
  427. package/permissions/createHasPermission.d.ts +4 -0
  428. package/permissions/createHasPermission.js +47 -0
  429. package/permissions/createHasPermission.js.map +1 -0
  430. package/permissions/createPermissionSchema.d.ts +2 -0
  431. package/permissions/createPermissionSchema.js +8 -0
  432. package/permissions/createPermissionSchema.js.map +1 -0
  433. package/permissions/createPermissions.d.ts +6 -0
  434. package/permissions/createPermissions.js +201 -0
  435. package/permissions/createPermissions.js.map +1 -0
  436. package/permissions/createPermissions.test.d.ts +1 -0
  437. package/permissions/createPermissions.test.js +177 -0
  438. package/permissions/createPermissions.test.js.map +1 -0
  439. package/permissions/index.d.ts +9 -0
  440. package/permissions/index.js +9 -0
  441. package/permissions/index.js.map +1 -0
  442. package/permissions/types.d.ts +267 -0
  443. package/permissions/types.js +3 -0
  444. package/permissions/types.js.map +1 -0
  445. package/permissions/usePermissionForm.d.ts +17 -0
  446. package/permissions/usePermissionForm.js +256 -0
  447. package/permissions/usePermissionForm.js.map +1 -0
  448. package/permissions/usePermissions.d.ts +4 -0
  449. package/permissions/usePermissions.js +9 -0
  450. package/permissions/usePermissions.js.map +1 -0
  451. package/presentation/buildParams/useBuildParams.d.ts +1 -0
  452. package/presentation/buildParams/useBuildParams.js +7 -0
  453. package/presentation/buildParams/useBuildParams.js.map +1 -0
  454. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.js +1 -1
  455. package/presentation/installation/components/SystemInstaller/steps/AdminUserStep/createPasswordValidator.js.map +1 -1
  456. package/presentation/installation/presenters/SystemInstaller/SystemInstallerGateway.d.ts +2 -2
  457. package/presentation/installation/presenters/SystemInstaller/SystemInstallerGateway.js +2 -2
  458. package/presentation/installation/presenters/SystemInstaller/SystemInstallerGateway.js.map +1 -1
  459. package/presentation/lexicalContext/useLexicalContext.d.ts +3 -0
  460. package/presentation/lexicalContext/useLexicalContext.js +14 -0
  461. package/presentation/lexicalContext/useLexicalContext.js.map +1 -0
  462. package/presentation/textToLexicalTool/TextToLexicalTool.d.ts +30 -0
  463. package/presentation/textToLexicalTool/TextToLexicalTool.js +29 -0
  464. package/presentation/textToLexicalTool/TextToLexicalTool.js.map +1 -0
  465. package/presentation/textToLexicalTool/feature.d.ts +1 -0
  466. package/presentation/textToLexicalTool/feature.js +10 -0
  467. package/presentation/textToLexicalTool/feature.js.map +1 -0
  468. package/presentation/textToLexicalTool/textToLexicalState.d.ts +6 -0
  469. package/presentation/textToLexicalTool/textToLexicalState.js +31 -0
  470. package/presentation/textToLexicalTool/textToLexicalState.js.map +1 -0
  471. package/presentation/wcp/WcpProvider.js +8 -1
  472. package/presentation/wcp/WcpProvider.js.map +1 -1
  473. package/routes.d.ts +1 -0
  474. package/routes.js +4 -0
  475. package/routes.js.map +1 -1
  476. package/types.d.ts +0 -7
  477. package/types.js.map +1 -1
  478. package/base/Base/LexicalPreset/LinkEditForm.d.ts +0 -6
  479. package/base/Base/LexicalPreset/LinkEditForm.js +0 -63
  480. package/base/Base/LexicalPreset/LinkEditForm.js.map +0 -1
  481. package/components/FloatingPanel.d.ts +0 -13
  482. package/components/FloatingPanel.js +0 -94
  483. package/components/FloatingPanel.js.map +0 -1
  484. package/components/NavigationPrompt.d.ts +0 -27
  485. package/components/NavigationPrompt.js +0 -39
  486. package/components/NavigationPrompt.js.map +0 -1
  487. package/components/StateInspector.d.ts +0 -8
  488. package/components/StateInspector.js +0 -36
  489. package/components/StateInspector.js.map +0 -1
  490. package/exports/admin/buildParams.d.ts +0 -1
  491. package/exports/admin/buildParams.js +0 -3
  492. package/exports/admin/buildParams.js.map +0 -1
  493. package/extensions/AdminBuildParam.d.ts +0 -11
  494. package/extensions/AdminBuildParam.js +0 -184
  495. package/extensions/AdminBuildParam.js.map +0 -1
  496. package/extensions/AdminExtension.d.ts +0 -11
  497. package/extensions/AdminExtension.js +0 -105
  498. package/extensions/AdminExtension.js.map +0 -1
  499. package/extensions/index.d.ts +0 -23
  500. package/extensions/index.js +0 -7
  501. package/extensions/index.js.map +0 -1
  502. package/plugins/PermissionRendererPlugin.d.ts +0 -22
  503. package/plugins/PermissionRendererPlugin.js +0 -19
  504. package/plugins/PermissionRendererPlugin.js.map +0 -1
@@ -1,21 +1,21 @@
1
1
  import React from "react";
2
2
  import type { DropdownMenuItemIconProps, DropdownMenuItemButtonProps } from "@webiny/admin-ui/DropdownMenu/components/DropdownMenuItem.js";
3
3
  type UserMenuItemRendererProps = DropdownMenuItemButtonProps;
4
- declare const UserMenuItemRenderer: ((props: DropdownMenuItemButtonProps) => JSX.Element | null) & {
5
- original: (props: DropdownMenuItemButtonProps) => JSX.Element | null;
4
+ declare const UserMenuItemRenderer: ((props: DropdownMenuItemButtonProps) => React.JSX.Element | null) & {
5
+ original: (props: DropdownMenuItemButtonProps) => React.JSX.Element | null;
6
6
  originalName: string;
7
7
  displayName: string;
8
8
  } & {
9
- original: ((props: DropdownMenuItemButtonProps) => JSX.Element | null) & {
10
- original: (props: DropdownMenuItemButtonProps) => JSX.Element | null;
9
+ original: ((props: DropdownMenuItemButtonProps) => React.JSX.Element | null) & {
10
+ original: (props: DropdownMenuItemButtonProps) => React.JSX.Element | null;
11
11
  originalName: string;
12
12
  displayName: string;
13
13
  };
14
14
  originalName: string;
15
15
  displayName: string;
16
16
  } & {
17
- createDecorator: (decorator: import("~/index.js").ComponentDecorator<((props: DropdownMenuItemButtonProps) => JSX.Element | null) & {
18
- original: (props: DropdownMenuItemButtonProps) => JSX.Element | null;
17
+ createDecorator: (decorator: import("~/index.js").ComponentDecorator<((props: DropdownMenuItemButtonProps) => React.JSX.Element | null) & {
18
+ original: (props: DropdownMenuItemButtonProps) => React.JSX.Element | null;
19
19
  originalName: string;
20
20
  displayName: string;
21
21
  }>) => (props: unknown) => React.JSX.Element;
@@ -40,21 +40,21 @@ declare const UserMenuItem: ((props: UserMenuItemRendererProps) => React.JSX.Ele
40
40
  }>) => (props: unknown) => React.JSX.Element;
41
41
  };
42
42
  type UserMenuItemIconRendererProps = DropdownMenuItemIconProps;
43
- declare const UserMenuItemIconRenderer: ((props: DropdownMenuItemIconProps) => JSX.Element | null) & {
44
- original: (props: DropdownMenuItemIconProps) => JSX.Element | null;
43
+ declare const UserMenuItemIconRenderer: ((props: DropdownMenuItemIconProps) => React.JSX.Element | null) & {
44
+ original: (props: DropdownMenuItemIconProps) => React.JSX.Element | null;
45
45
  originalName: string;
46
46
  displayName: string;
47
47
  } & {
48
- original: ((props: DropdownMenuItemIconProps) => JSX.Element | null) & {
49
- original: (props: DropdownMenuItemIconProps) => JSX.Element | null;
48
+ original: ((props: DropdownMenuItemIconProps) => React.JSX.Element | null) & {
49
+ original: (props: DropdownMenuItemIconProps) => React.JSX.Element | null;
50
50
  originalName: string;
51
51
  displayName: string;
52
52
  };
53
53
  originalName: string;
54
54
  displayName: string;
55
55
  } & {
56
- createDecorator: (decorator: import("~/index.js").ComponentDecorator<((props: DropdownMenuItemIconProps) => JSX.Element | null) & {
57
- original: (props: DropdownMenuItemIconProps) => JSX.Element | null;
56
+ createDecorator: (decorator: import("~/index.js").ComponentDecorator<((props: DropdownMenuItemIconProps) => React.JSX.Element | null) & {
57
+ original: (props: DropdownMenuItemIconProps) => React.JSX.Element | null;
58
58
  originalName: string;
59
59
  displayName: string;
60
60
  }>) => (props: unknown) => React.JSX.Element;
@@ -1,21 +1,21 @@
1
1
  import React from "react";
2
2
  import type { DropdownMenuItemIconProps, DropdownMenuItemLinkProps } from "@webiny/admin-ui/DropdownMenu/components/DropdownMenuLink.js";
3
3
  type UserMenuLinkRendererProps = DropdownMenuItemLinkProps;
4
- declare const UserMenuLinkRenderer: ((props: DropdownMenuItemLinkProps) => JSX.Element | null) & {
5
- original: (props: DropdownMenuItemLinkProps) => JSX.Element | null;
4
+ declare const UserMenuLinkRenderer: ((props: DropdownMenuItemLinkProps) => React.JSX.Element | null) & {
5
+ original: (props: DropdownMenuItemLinkProps) => React.JSX.Element | null;
6
6
  originalName: string;
7
7
  displayName: string;
8
8
  } & {
9
- original: ((props: DropdownMenuItemLinkProps) => JSX.Element | null) & {
10
- original: (props: DropdownMenuItemLinkProps) => JSX.Element | null;
9
+ original: ((props: DropdownMenuItemLinkProps) => React.JSX.Element | null) & {
10
+ original: (props: DropdownMenuItemLinkProps) => React.JSX.Element | null;
11
11
  originalName: string;
12
12
  displayName: string;
13
13
  };
14
14
  originalName: string;
15
15
  displayName: string;
16
16
  } & {
17
- createDecorator: (decorator: import("~/index.js").ComponentDecorator<((props: DropdownMenuItemLinkProps) => JSX.Element | null) & {
18
- original: (props: DropdownMenuItemLinkProps) => JSX.Element | null;
17
+ createDecorator: (decorator: import("~/index.js").ComponentDecorator<((props: DropdownMenuItemLinkProps) => React.JSX.Element | null) & {
18
+ original: (props: DropdownMenuItemLinkProps) => React.JSX.Element | null;
19
19
  originalName: string;
20
20
  displayName: string;
21
21
  }>) => (props: unknown) => React.JSX.Element;
@@ -40,21 +40,21 @@ declare const UserMenuLink: ((props: UserMenuLinkRendererProps) => React.JSX.Ele
40
40
  }>) => (props: unknown) => React.JSX.Element;
41
41
  };
42
42
  type DropdownMenuItemIconRendererProps = DropdownMenuItemIconProps;
43
- declare const UserMenuLinkIconRenderer: ((props: DropdownMenuItemIconProps) => JSX.Element | null) & {
44
- original: (props: DropdownMenuItemIconProps) => JSX.Element | null;
43
+ declare const UserMenuLinkIconRenderer: ((props: DropdownMenuItemIconProps) => React.JSX.Element | null) & {
44
+ original: (props: DropdownMenuItemIconProps) => React.JSX.Element | null;
45
45
  originalName: string;
46
46
  displayName: string;
47
47
  } & {
48
- original: ((props: DropdownMenuItemIconProps) => JSX.Element | null) & {
49
- original: (props: DropdownMenuItemIconProps) => JSX.Element | null;
48
+ original: ((props: DropdownMenuItemIconProps) => React.JSX.Element | null) & {
49
+ original: (props: DropdownMenuItemIconProps) => React.JSX.Element | null;
50
50
  originalName: string;
51
51
  displayName: string;
52
52
  };
53
53
  originalName: string;
54
54
  displayName: string;
55
55
  } & {
56
- createDecorator: (decorator: import("~/index.js").ComponentDecorator<((props: DropdownMenuItemIconProps) => JSX.Element | null) & {
57
- original: (props: DropdownMenuItemIconProps) => JSX.Element | null;
56
+ createDecorator: (decorator: import("~/index.js").ComponentDecorator<((props: DropdownMenuItemIconProps) => React.JSX.Element | null) & {
57
+ original: (props: DropdownMenuItemIconProps) => React.JSX.Element | null;
58
58
  originalName: string;
59
59
  displayName: string;
60
60
  }>) => (props: unknown) => React.JSX.Element;
@@ -1,21 +1,21 @@
1
1
  import React from "react";
2
2
  import type { DropdownMenuSeparatorProps } from "@webiny/admin-ui/DropdownMenu/components/DropdownMenuSeparator.js";
3
3
  type UserMenuSeparatorRendererProps = DropdownMenuSeparatorProps;
4
- declare const UserMenuSeparatorRenderer: ((props: import("@webiny/admin-ui/Separator").SeparatorProps) => JSX.Element | null) & {
5
- original: (props: import("@webiny/admin-ui/Separator").SeparatorProps) => JSX.Element | null;
4
+ declare const UserMenuSeparatorRenderer: ((props: import("@webiny/admin-ui/Separator").SeparatorProps) => React.JSX.Element | null) & {
5
+ original: (props: import("@webiny/admin-ui/Separator").SeparatorProps) => React.JSX.Element | null;
6
6
  originalName: string;
7
7
  displayName: string;
8
8
  } & {
9
- original: ((props: import("@webiny/admin-ui/Separator").SeparatorProps) => JSX.Element | null) & {
10
- original: (props: import("@webiny/admin-ui/Separator").SeparatorProps) => JSX.Element | null;
9
+ original: ((props: import("@webiny/admin-ui/Separator").SeparatorProps) => React.JSX.Element | null) & {
10
+ original: (props: import("@webiny/admin-ui/Separator").SeparatorProps) => React.JSX.Element | null;
11
11
  originalName: string;
12
12
  displayName: string;
13
13
  };
14
14
  originalName: string;
15
15
  displayName: string;
16
16
  } & {
17
- createDecorator: (decorator: import("~/index.js").ComponentDecorator<((props: import("@webiny/admin-ui/Separator").SeparatorProps) => JSX.Element | null) & {
18
- original: (props: import("@webiny/admin-ui/Separator").SeparatorProps) => JSX.Element | null;
17
+ createDecorator: (decorator: import("~/index.js").ComponentDecorator<((props: import("@webiny/admin-ui/Separator").SeparatorProps) => React.JSX.Element | null) & {
18
+ original: (props: import("@webiny/admin-ui/Separator").SeparatorProps) => React.JSX.Element | null;
19
19
  originalName: string;
20
20
  displayName: string;
21
21
  }>) => (props: unknown) => React.JSX.Element;
@@ -21,21 +21,21 @@ export declare const UserMenu: (() => React.JSX.Element) & {
21
21
  displayName: string;
22
22
  }>) => (props: unknown) => React.JSX.Element;
23
23
  };
24
- export declare const UserMenuRenderer: ((props: unknown) => JSX.Element | null) & {
25
- original: (props: unknown) => JSX.Element | null;
24
+ export declare const UserMenuRenderer: ((props: unknown) => React.JSX.Element | null) & {
25
+ original: (props: unknown) => React.JSX.Element | null;
26
26
  originalName: string;
27
27
  displayName: string;
28
28
  } & {
29
- original: ((props: unknown) => JSX.Element | null) & {
30
- original: (props: unknown) => JSX.Element | null;
29
+ original: ((props: unknown) => React.JSX.Element | null) & {
30
+ original: (props: unknown) => React.JSX.Element | null;
31
31
  originalName: string;
32
32
  displayName: string;
33
33
  };
34
34
  originalName: string;
35
35
  displayName: string;
36
36
  } & {
37
- createDecorator: (decorator: import("@webiny/app").ComponentDecorator<((props: unknown) => JSX.Element | null) & {
38
- original: (props: unknown) => JSX.Element | null;
37
+ createDecorator: (decorator: import("@webiny/app").ComponentDecorator<((props: unknown) => React.JSX.Element | null) & {
38
+ original: (props: unknown) => React.JSX.Element | null;
39
39
  originalName: string;
40
40
  displayName: string;
41
41
  }>) => (props: unknown) => React.JSX.Element;
@@ -59,21 +59,21 @@ export declare const UserMenuHandle: (() => React.JSX.Element) & {
59
59
  displayName: string;
60
60
  }>) => (props: unknown) => React.JSX.Element;
61
61
  };
62
- export declare const UserMenuHandleRenderer: ((props: unknown) => JSX.Element | null) & {
63
- original: (props: unknown) => JSX.Element | null;
62
+ export declare const UserMenuHandleRenderer: ((props: unknown) => React.JSX.Element | null) & {
63
+ original: (props: unknown) => React.JSX.Element | null;
64
64
  originalName: string;
65
65
  displayName: string;
66
66
  } & {
67
- original: ((props: unknown) => JSX.Element | null) & {
68
- original: (props: unknown) => JSX.Element | null;
67
+ original: ((props: unknown) => React.JSX.Element | null) & {
68
+ original: (props: unknown) => React.JSX.Element | null;
69
69
  originalName: string;
70
70
  displayName: string;
71
71
  };
72
72
  originalName: string;
73
73
  displayName: string;
74
74
  } & {
75
- createDecorator: (decorator: import("@webiny/app").ComponentDecorator<((props: unknown) => JSX.Element | null) & {
76
- original: (props: unknown) => JSX.Element | null;
75
+ createDecorator: (decorator: import("@webiny/app").ComponentDecorator<((props: unknown) => React.JSX.Element | null) & {
76
+ original: (props: unknown) => React.JSX.Element | null;
77
77
  originalName: string;
78
78
  displayName: string;
79
79
  }>) => (props: unknown) => React.JSX.Element;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Component is used to display something that you want to be hidden to everyone except Webiny team.
3
+ * Example usage is in Workflow State Bar, where we need some button to be present only while developing the feature - and debugging.
4
+ * @see packages/app-workflows/src/Components/WorkflowState/Bar/Bars/WorkflowStateBarApproved.tsx
5
+ * @see packages/app-workflows/src/Components/WorkflowState/Bar/Bars/WorkflowStateBarRejected.tsx
6
+ */
7
+ import React from "react";
8
+ export interface IDeveloperModeProps {
9
+ children: React.ReactNode;
10
+ }
11
+ export declare const DeveloperMode: ({ children }: IDeveloperModeProps) => React.JSX.Element | null;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Component is used to display something that you want to be hidden to everyone except Webiny team.
3
+ * Example usage is in Workflow State Bar, where we need some button to be present only while developing the feature - and debugging.
4
+ * @see packages/app-workflows/src/Components/WorkflowState/Bar/Bars/WorkflowStateBarApproved.tsx
5
+ * @see packages/app-workflows/src/Components/WorkflowState/Bar/Bars/WorkflowStateBarRejected.tsx
6
+ */
7
+ import React from "react";
8
+ export const DeveloperMode = ({
9
+ children
10
+ }) => {
11
+ if (process.env.WEBINY_ADMIN_DEV_MODE !== "true") {
12
+ return null;
13
+ }
14
+ return /*#__PURE__*/React.createElement(React.Fragment, null, children);
15
+ };
16
+
17
+ //# sourceMappingURL=DeveloperMode.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","DeveloperMode","children","process","env","WEBINY_ADMIN_DEV_MODE","createElement","Fragment"],"sources":["DeveloperMode.tsx"],"sourcesContent":["/**\n * Component is used to display something that you want to be hidden to everyone except Webiny team.\n * Example usage is in Workflow State Bar, where we need some button to be present only while developing the feature - and debugging.\n * @see packages/app-workflows/src/Components/WorkflowState/Bar/Bars/WorkflowStateBarApproved.tsx\n * @see packages/app-workflows/src/Components/WorkflowState/Bar/Bars/WorkflowStateBarRejected.tsx\n */\nimport React from \"react\";\n\nexport interface IDeveloperModeProps {\n children: React.ReactNode;\n}\n\nexport const DeveloperMode = ({ children }: IDeveloperModeProps) => {\n if (process.env.WEBINY_ADMIN_DEV_MODE !== \"true\") {\n return null;\n }\n return <>{children}</>;\n};\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA,OAAOA,KAAK,MAAM,OAAO;AAMzB,OAAO,MAAMC,aAAa,GAAGA,CAAC;EAAEC;AAA8B,CAAC,KAAK;EAChE,IAAIC,OAAO,CAACC,GAAG,CAACC,qBAAqB,KAAK,MAAM,EAAE;IAC9C,OAAO,IAAI;EACf;EACA,oBAAOL,KAAA,CAAAM,aAAA,CAAAN,KAAA,CAAAO,QAAA,QAAGL,QAAW,CAAC;AAC1B,CAAC","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export { DeveloperMode } from "./DeveloperMode.js";
2
+ export type { IDeveloperModeProps } from "./DeveloperMode.js";
@@ -0,0 +1,3 @@
1
+ export { DeveloperMode } from "./DeveloperMode.js";
2
+
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["DeveloperMode"],"sources":["index.ts"],"sourcesContent":["export { DeveloperMode } from \"./DeveloperMode.js\";\nexport type { IDeveloperModeProps } from \"./DeveloperMode.js\";\n"],"mappings":"AAAA,SAASA,aAAa","ignoreList":[]}
@@ -6,11 +6,12 @@ export interface DialogProps {
6
6
  description: ReactNode;
7
7
  dismissible: boolean;
8
8
  content: ReactNode;
9
+ info?: ReactNode;
9
10
  icon: ReactNode;
10
11
  acceptLabel?: ReactNode;
11
12
  cancelLabel?: ReactNode;
12
- loadingLabel?: ReactNode;
13
- dataLoadingLabel?: ReactNode;
13
+ loadingLabel?: string;
14
+ dataLoadingLabel?: string;
14
15
  onSubmit: (data: GenericFormData) => void;
15
16
  closeDialog: () => void;
16
17
  loading: boolean;
@@ -1,5 +1,5 @@
1
1
  import React, { useEffect, useState } from "react";
2
- import { Dialog as AdminDialog, OverlayLoader } from "@webiny/admin-ui";
2
+ import { Dialog as AdminDialog } from "@webiny/admin-ui";
3
3
  import { Form } from "@webiny/form";
4
4
  export const Dialog = ({
5
5
  open,
@@ -45,6 +45,12 @@ export const Dialog = ({
45
45
  label: ""
46
46
  }),
47
47
  dismissible: props.dismissible,
48
+ info: props.info,
49
+ loading: loading ? {
50
+ text: loadingLabel
51
+ } : dataIsLoading ? {
52
+ text: dataLoadingLabel
53
+ } : false,
48
54
  actions: /*#__PURE__*/React.createElement(React.Fragment, null, cancelLabel ? /*#__PURE__*/React.createElement(AdminDialog.CancelAction, {
49
55
  onClick: closeDialog,
50
56
  text: cancelLabel
@@ -52,11 +58,7 @@ export const Dialog = ({
52
58
  onClick: submit,
53
59
  text: acceptLabel
54
60
  }) : null)
55
- }, open ? /*#__PURE__*/React.createElement(React.Fragment, null, loading && /*#__PURE__*/React.createElement(OverlayLoader, {
56
- text: loadingLabel
57
- }), dataIsLoading && /*#__PURE__*/React.createElement(OverlayLoader, {
58
- text: dataLoadingLabel
59
- }), content) : null));
61
+ }, open ? content : null));
60
62
  };
61
63
 
62
64
  //# sourceMappingURL=Dialog.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["React","useEffect","useState","Dialog","AdminDialog","OverlayLoader","Form","open","loading","title","content","acceptLabel","cancelLabel","loadingLabel","dataLoadingLabel","closeDialog","onSubmit","size","props","handleSubmit","data","dataIsLoading","setDataIsLoading","formData","setFormData","undefined","then","createElement","submit","onClose","description","icon","Icon","label","dismissible","actions","Fragment","CancelAction","onClick","text","ConfirmAction"],"sources":["Dialog.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport React, { useEffect, useState } from \"react\";\nimport { Dialog as AdminDialog, OverlayLoader } from \"@webiny/admin-ui\";\nimport type { FormOnSubmit, GenericFormData } from \"@webiny/form\";\nimport { Form } from \"@webiny/form\";\n\nexport interface DialogProps {\n title: ReactNode;\n description: ReactNode;\n dismissible: boolean;\n content: ReactNode;\n icon: ReactNode;\n acceptLabel?: ReactNode;\n cancelLabel?: ReactNode;\n loadingLabel?: ReactNode;\n dataLoadingLabel?: ReactNode;\n onSubmit: (data: GenericFormData) => void;\n closeDialog: () => void;\n loading: boolean;\n open: boolean;\n formData?: GenericFormData | (() => Promise<GenericFormData>);\n size?: \"sm\" | \"md\" | \"lg\" | \"xl\" | \"full\";\n}\n\nexport const Dialog = ({\n open,\n loading,\n title,\n content,\n acceptLabel,\n cancelLabel,\n loadingLabel = \"Loading...\",\n dataLoadingLabel = \"Loading...\",\n closeDialog,\n onSubmit,\n size,\n ...props\n}: DialogProps) => {\n const handleSubmit: FormOnSubmit = data => {\n return onSubmit(data);\n };\n\n const [dataIsLoading, setDataIsLoading] = useState(false);\n\n const [formData, setFormData] = useState<GenericFormData | undefined>(\n typeof props.formData === \"function\" ? undefined : props.formData\n );\n\n useEffect(() => {\n if (typeof props.formData === \"function\") {\n setDataIsLoading(true);\n props.formData().then((data: GenericFormData) => {\n setFormData(data);\n setDataIsLoading(false);\n });\n }\n }, [props.formData]);\n\n return (\n <Form onSubmit={handleSubmit} data={formData}>\n {({ submit }) => (\n <AdminDialog\n open={open}\n onClose={closeDialog}\n size={size}\n title={title}\n description={props.description}\n icon={<AdminDialog.Icon icon={props.icon} label={\"\"} />}\n dismissible={props.dismissible}\n actions={\n <>\n {cancelLabel ? (\n <AdminDialog.CancelAction\n onClick={closeDialog}\n text={cancelLabel}\n />\n ) : null}\n {acceptLabel ? (\n <AdminDialog.ConfirmAction onClick={submit} text={acceptLabel} />\n ) : null}\n </>\n }\n >\n {open ? (\n <>\n {loading && <OverlayLoader text={loadingLabel} />}\n {dataIsLoading && <OverlayLoader text={dataLoadingLabel} />}\n {content}\n </>\n ) : null}\n </AdminDialog>\n )}\n </Form>\n );\n};\n"],"mappings":"AACA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SAASC,MAAM,IAAIC,WAAW,EAAEC,aAAa,QAAQ,kBAAkB;AAEvE,SAASC,IAAI,QAAQ,cAAc;AAoBnC,OAAO,MAAMH,MAAM,GAAGA,CAAC;EACnBI,IAAI;EACJC,OAAO;EACPC,KAAK;EACLC,OA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AAK;MAACE,KAAK,EAAE;IAAG,CAAE,CAAE;IACxDC,WAAW,EAAEhB,KAAK,CAACgB,WAAY;IAC/BC,OAAO,eACHnC,KAAA,CAAA2B,aAAA,CAAA3B,KAAA,CAAAoC,QAAA,QACKxB,WAAW,gBACRZ,KAAA,CAAA2B,aAAA,CAACvB,WAAW,CAACiC,YAAY;MACrBC,OAAO,EAAEvB,WAAY;MACrBwB,IAAI,EAAE3B;IAAY,CACrB,CAAC,GACF,IAAI,EACPD,WAAW,gBACRX,KAAA,CAAA2B,aAAA,CAACvB,WAAW,CAACoC,aAAa;MAACF,OAAO,EAAEV,MAAO;MAACW,IAAI,EAAE5B;IAAY,CAAE,CAAC,GACjE,IACN;EACL,GAEAJ,IAAI,gBACDP,KAAA,CAAA2B,aAAA,CAAA3B,KAAA,CAAAoC,QAAA,QACK5B,OAAO,iBAAIR,KAAA,CAAA2B,aAAA,CAACtB,aAAa;IAACkC,IAAI,EAAE1B;EAAa,CAAE,CAAC,EAChDQ,aAAa,iBAAIrB,KAAA,CAAA2B,aAAA,CAACtB,aAAa;IAACkC,IAAI,EAAEzB;EAAiB,CAAE,CAAC,EAC1DJ,OACH,CAAC,GACH,IACK,CAEf,CAAC;AAEf,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useEffect","useState","Dialog","AdminDialog","Form","open","loading","title","content","acceptLabel","cancelLabel","loadingLabel","dataLoadingLabel","closeDialog","onSubmit","size","props","handleSubmit","data","dataIsLoading","setDataIsLoading","formData","setFormData","undefined","then","createElement","submit","onClose","description","icon","Icon","label","dismissible","info","text","actions","Fragment","CancelAction","onClick","ConfirmAction"],"sources":["Dialog.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport React, { useEffect, useState } from \"react\";\nimport { Dialog as AdminDialog } from \"@webiny/admin-ui\";\nimport type { FormOnSubmit, GenericFormData } from \"@webiny/form\";\nimport { Form } from \"@webiny/form\";\n\nexport interface DialogProps {\n title: ReactNode;\n description: ReactNode;\n dismissible: boolean;\n content: ReactNode;\n info?: ReactNode;\n icon: ReactNode;\n acceptLabel?: ReactNode;\n cancelLabel?: ReactNode;\n loadingLabel?: string;\n dataLoadingLabel?: string;\n onSubmit: (data: GenericFormData) => void;\n closeDialog: () => void;\n loading: boolean;\n open: boolean;\n formData?: GenericFormData | (() => Promise<GenericFormData>);\n size?: \"sm\" | \"md\" | \"lg\" | \"xl\" | \"full\";\n}\n\nexport const Dialog = ({\n open,\n loading,\n title,\n content,\n acceptLabel,\n cancelLabel,\n loadingLabel = \"Loading...\",\n dataLoadingLabel = \"Loading...\",\n closeDialog,\n onSubmit,\n size,\n ...props\n}: DialogProps) => {\n const handleSubmit: FormOnSubmit = data => {\n return onSubmit(data);\n };\n\n const [dataIsLoading, setDataIsLoading] = useState(false);\n\n const [formData, setFormData] = useState<GenericFormData | undefined>(\n typeof props.formData === \"function\" ? undefined : props.formData\n );\n\n useEffect(() => {\n if (typeof props.formData === \"function\") {\n setDataIsLoading(true);\n props.formData().then((data: GenericFormData) => {\n setFormData(data);\n setDataIsLoading(false);\n });\n }\n }, [props.formData]);\n\n return (\n <Form onSubmit={handleSubmit} data={formData}>\n {({ submit }) => (\n <AdminDialog\n open={open}\n onClose={closeDialog}\n size={size}\n title={title}\n description={props.description}\n icon={<AdminDialog.Icon icon={props.icon} label={\"\"} />}\n dismissible={props.dismissible}\n info={props.info}\n loading={\n loading\n ? { text: loadingLabel }\n : dataIsLoading\n ? { text: dataLoadingLabel }\n : false\n }\n actions={\n <>\n {cancelLabel ? (\n <AdminDialog.CancelAction\n onClick={closeDialog}\n text={cancelLabel}\n />\n ) : null}\n {acceptLabel ? (\n <AdminDialog.ConfirmAction onClick={submit} text={acceptLabel} />\n ) : null}\n </>\n }\n >\n {open ? content : null}\n </AdminDialog>\n )}\n </Form>\n );\n};\n"],"mappings":"AACA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SAASC,MAAM,IAAIC,WAAW,QAAQ,kBAA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AK,CAACY,WAAY;IAC/BC,IAAI,eAAE9B,KAAA,CAAA0B,aAAA,CAACtB,WAAW,CAAC2B,IAAI;MAACD,IAAI,EAAEb,KAAK,CAACa,IAAK;MAACE,KAAK,EAAE;IAAG,CAAE,CAAE;IACxDC,WAAW,EAAEhB,KAAK,CAACgB,WAAY;IAC/BC,IAAI,EAAEjB,KAAK,CAACiB,IAAK;IACjB3B,OAAO,EACHA,OAAO,GACD;MAAE4B,IAAI,EAAEvB;IAAa,CAAC,GACtBQ,aAAa,GACX;MAAEe,IAAI,EAAEtB;IAAiB,CAAC,GAC1B,KACX;IACDuB,OAAO,eACHpC,KAAA,CAAA0B,aAAA,CAAA1B,KAAA,CAAAqC,QAAA,QACK1B,WAAW,gBACRX,KAAA,CAAA0B,aAAA,CAACtB,WAAW,CAACkC,YAAY;MACrBC,OAAO,EAAEzB,WAAY;MACrBqB,IAAI,EAAExB;IAAY,CACrB,CAAC,GACF,IAAI,EACPD,WAAW,gBACRV,KAAA,CAAA0B,aAAA,CAACtB,WAAW,CAACoC,aAAa;MAACD,OAAO,EAAEZ,MAAO;MAACQ,IAAI,EAAEzB;IAAY,CAAE,CAAC,GACjE,IACN;EACL,GAEAJ,IAAI,GAAGG,OAAO,GAAG,IACT,CAEf,CAAC;AAEf,CAAC","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ export interface DialogParamsContextValue {
2
+ params: Record<string, unknown>;
3
+ closeDialog: () => void;
4
+ }
5
+ export declare const DialogParamsContext: import("react").Context<DialogParamsContextValue | undefined>;
6
+ export declare const useDialogParamsContext: () => DialogParamsContextValue;
@@ -0,0 +1,11 @@
1
+ import { createContext, useContext } from "react";
2
+ export const DialogParamsContext = /*#__PURE__*/createContext(undefined);
3
+ export const useDialogParamsContext = () => {
4
+ const context = useContext(DialogParamsContext);
5
+ if (!context) {
6
+ throw new Error("useDialog must be used inside a named dialog registered via AdminConfig.Dialog");
7
+ }
8
+ return context;
9
+ };
10
+
11
+ //# sourceMappingURL=DialogParamsContext.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createContext","useContext","DialogParamsContext","undefined","useDialogParamsContext","context","Error"],"sources":["DialogParamsContext.tsx"],"sourcesContent":["import { createContext, useContext } from \"react\";\n\nexport interface DialogParamsContextValue {\n params: Record<string, unknown>;\n closeDialog: () => void;\n}\n\nexport const DialogParamsContext = createContext<DialogParamsContextValue | undefined>(undefined);\n\nexport const useDialogParamsContext = () => {\n const context = useContext(DialogParamsContext);\n\n if (!context) {\n throw new Error(\n \"useDialog must be used inside a named dialog registered via AdminConfig.Dialog\"\n );\n }\n\n return context;\n};\n"],"mappings":"AAAA,SAASA,aAAa,EAAEC,UAAU,QAAQ,OAAO;AAOjD,OAAO,MAAMC,mBAAmB,gBAAGF,aAAa,CAAuCG,SAAS,CAAC;AAEjG,OAAO,MAAMC,sBAAsB,GAAGA,CAAA,KAAM;EACxC,MAAMC,OAAO,GAAGJ,UAAU,CAACC,mBAAmB,CAAC;EAE/C,IAAI,CAACG,OAAO,EAAE;IACV,MAAM,IAAIC,KAAK,CACX,gFACJ,CAAC;EACL;EAEA,OAAOD,OAAO;AAClB,CAAC","ignoreList":[]}
@@ -7,12 +7,13 @@ interface ShowDialogParams {
7
7
  description?: ReactNode;
8
8
  dismissible?: boolean;
9
9
  content: ReactNode;
10
- actions?: JSX.Element;
11
- icon?: JSX.Element;
10
+ actions?: React.JSX.Element;
11
+ icon?: React.JSX.Element;
12
+ info?: ReactNode;
12
13
  acceptLabel?: ReactNode;
13
14
  cancelLabel?: ReactNode;
14
- loadingLabel?: ReactNode;
15
- dataLoadingLabel?: ReactNode;
15
+ loadingLabel?: string;
16
+ dataLoadingLabel?: string;
16
17
  onAccept?: (data: GenericFormData) => void;
17
18
  onClose?: () => void;
18
19
  formData?: DialogProps["formData"];
@@ -21,6 +22,8 @@ interface ShowDialogParams {
21
22
  export interface DialogsContext {
22
23
  showDialog: (params: ShowDialogParams) => () => void;
23
24
  closeAllDialogs: () => void;
25
+ openNamedDialog: (name: string, params: Record<string, unknown>) => void;
26
+ closeNamedDialog: () => void;
24
27
  }
25
28
  interface DialogsProviderProps {
26
29
  children: ReactNode;
@@ -29,7 +32,7 @@ interface DialogState extends ShowDialogParams {
29
32
  id: string;
30
33
  open: boolean;
31
34
  loading: boolean;
32
- element?: JSX.Element;
35
+ element?: React.JSX.Element;
33
36
  }
34
37
  export declare const initializeState: (params?: Partial<DialogState>) => DialogState;
35
38
  export declare const DialogsContext: React.Context<DialogsContext | undefined>;
@@ -1,14 +1,17 @@
1
1
  import React, { useState } from "react";
2
- import { useSnackbar } from "../../hooks/index.js";
3
- import { Dialog } from "./Dialog.js";
4
2
  import { createProvider } from "@webiny/app";
5
3
  import { generateId } from "@webiny/utils";
4
+ import { useSnackbar } from "../../hooks/index.js";
5
+ import { Dialog } from "./Dialog.js";
6
+ import { DialogParamsContext } from "./DialogParamsContext.js";
7
+ import { useAdminConfig } from "../../config/AdminConfig.js";
6
8
  export const initializeState = (params = {}) => ({
7
9
  id: `dialog-${generateId()}`,
8
10
  title: params.title ?? `Confirmation`,
9
11
  description: params.description,
10
12
  dismissible: params.dismissible,
11
13
  icon: params.icon,
14
+ info: params.info,
12
15
  content: params.content,
13
16
  acceptLabel: params.acceptLabel === null ? null : params.acceptLabel ?? `Confirm`,
14
17
  cancelLabel: params.cancelLabel === null ? null : params.cancelLabel ?? `Cancel`,
@@ -30,6 +33,10 @@ export const DialogsProvider = ({
30
33
  showSnackbar
31
34
  } = useSnackbar();
32
35
  const [dialogs, setDialogs] = useState(new Map());
36
+ const [namedDialogIntent, setNamedDialogIntent] = useState(null);
37
+ const {
38
+ dialogs: registeredDialogs
39
+ } = useAdminConfig();
33
40
  const showDialog = params => {
34
41
  const newDialog = initializeState({
35
42
  ...params,
@@ -59,6 +66,15 @@ export const DialogsProvider = ({
59
66
  const closeAllDialogs = () => {
60
67
  setDialogs(new Map());
61
68
  };
69
+ const openNamedDialog = (name, params) => {
70
+ setNamedDialogIntent({
71
+ name,
72
+ params
73
+ });
74
+ };
75
+ const closeNamedDialog = () => {
76
+ setNamedDialogIntent(null);
77
+ };
62
78
  const onSubmit = async (id, data) => {
63
79
  const dialog = dialogs.get(id);
64
80
  if (!dialog) {
@@ -93,7 +109,9 @@ export const DialogsProvider = ({
93
109
  const context = {
94
110
  showDialog,
95
111
  closeDialog,
96
- closeAllDialogs
112
+ closeAllDialogs,
113
+ openNamedDialog,
114
+ closeNamedDialog
97
115
  };
98
116
  return /*#__PURE__*/React.createElement(DialogsContext.Provider, {
99
117
  value: context
@@ -105,6 +123,7 @@ export const DialogsProvider = ({
105
123
  title: dialog.title,
106
124
  content: dialog.content,
107
125
  open: dialog.open,
126
+ info: dialog.info,
108
127
  acceptLabel: dialog.acceptLabel,
109
128
  cancelLabel: dialog.cancelLabel,
110
129
  loadingLabel: dialog.loadingLabel,
@@ -117,7 +136,18 @@ export const DialogsProvider = ({
117
136
  onSubmit: data => onSubmit(dialog.id, data),
118
137
  formData: dialog.formData,
119
138
  size: dialog.size
120
- })));
139
+ })), namedDialogIntent && (() => {
140
+ const registration = registeredDialogs.find(d => d.name === namedDialogIntent.name);
141
+ if (!registration) {
142
+ return null;
143
+ }
144
+ return /*#__PURE__*/React.createElement(DialogParamsContext.Provider, {
145
+ value: {
146
+ params: namedDialogIntent.params,
147
+ closeDialog: closeNamedDialog
148
+ }
149
+ }, registration.element);
150
+ })());
121
151
  };
122
152
  export const createDialogsProvider = () => {
123
153
  return createProvider(Component => {
@@ -1 +1 @@
1
- {"version":3,"names":["React","useState","useSnackbar","Dialog","createProvider","generateId","initializeState","params","id","title","description","dismissible","icon","content","acceptLabel","cancelLabel","loadingLabel","dataLoadingLabel","onAccept","onClose","open","loading","element","formData","size","DialogsContext","createContext","undefined","DialogsProvider","children","showSnackbar","dialogs","setDialogs","Map","showDialog","newDialog","set","closeDialog","dialog","get","error","console","newDialogs","delete","closeAllDialogs","onSubmit","data","message","context","createElement","Provider","value","Array","from","values","map","key","Fragment","createDialogsProvider","Component","DialogsProviderDecorator"],"sources":["DialogsContext.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport React, { useState } from \"react\";\nimport type { GenericFormData } from \"@webiny/form\";\nimport { useSnackbar } from \"~/hooks/index.js\";\nimport { Dialog, type DialogProps } from \"./Dialog.js\";\nimport { createProvider } from \"@webiny/app\";\nimport { generateId } from \"@webiny/utils\";\n\ninterface ShowDialogParams {\n title: ReactNode;\n description?: ReactNode;\n dismissible?: boolean;\n content: ReactNode;\n actions?: JSX.Element;\n icon?: JSX.Element;\n acceptLabel?: ReactNode;\n cancelLabel?: ReactNode;\n loadingLabel?: ReactNode;\n dataLoadingLabel?: ReactNode;\n onAccept?: (data: GenericFormData) => void;\n onClose?: () => void;\n formData?: DialogProps[\"formData\"];\n size?: \"sm\" | \"md\" | \"lg\" | \"xl\" | \"full\";\n}\n\nexport interface DialogsContext {\n showDialog: (params: ShowDialogParams) => () => void;\n closeAllDialogs: () => void;\n}\n\ninterface DialogsProviderProps {\n children: ReactNode;\n}\n\ninterface DialogState extends ShowDialogParams {\n id: string;\n open: boolean;\n loading: boolean;\n element?: JSX.Element;\n}\n\nexport const initializeState = (params: Partial<DialogState> = {}): DialogState => ({\n id: `dialog-${generateId()}`,\n title: params.title ?? `Confirmation`,\n description: params.description,\n dismissible: params.dismissible,\n icon: params.icon,\n content: params.content,\n acceptLabel: params.acceptLabel === null ? null : (params.acceptLabel ?? `Confirm`),\n cancelLabel: params.cancelLabel === null ? null : (params.cancelLabel ?? `Cancel`),\n loadingLabel: params.loadingLabel ?? `Loading...`,\n dataLoadingLabel: params.dataLoadingLabel ?? `Loading...`,\n onAccept: params.onAccept,\n onClose: params.onClose,\n open: params.open ?? false,\n loading: params.loading ?? false,\n element: params.element,\n formData: params.formData ?? {},\n size: params.size ?? \"md\"\n});\n\nexport const DialogsContext = React.createContext<DialogsContext | undefined>(undefined);\n\nexport const DialogsProvider = ({ children }: DialogsProviderProps) => {\n const { showSnackbar } = useSnackbar();\n const [dialogs, setDialogs] = useState<Map<string, DialogState>>(new Map());\n\n const showDialog = (params: ShowDialogParams) => {\n const newDialog = initializeState({ ...params, open: true });\n setDialogs(dialogs => new Map(dialogs).set(newDialog.id, newDialog));\n return () => closeDialog(newDialog.id);\n };\n\n const closeDialog = (id: string) => {\n const dialog = dialogs.get(id);\n\n // Call the onClose callback if it exists\n if (dialog?.onClose && typeof dialog.onClose === \"function\") {\n try {\n dialog.onClose();\n } catch (error) {\n // Log error but don't prevent dialog cleanup\n console.error(\"Error in dialog onClose callback:\", error);\n }\n }\n\n setDialogs(dialogs => {\n const newDialogs = new Map(dialogs);\n newDialogs.delete(id);\n return newDialogs;\n });\n };\n\n const closeAllDialogs = () => {\n setDialogs(new Map());\n };\n\n const onSubmit = async (id: string, data: GenericFormData) => {\n const dialog = dialogs.get(id);\n if (!dialog) {\n return;\n }\n\n try {\n if (typeof dialog.onAccept === \"function\") {\n setDialogs(dialogs => {\n const newDialogs = new Map(dialogs);\n newDialogs.set(id, { ...dialog, loading: true });\n return newDialogs;\n });\n\n await dialog.onAccept(data);\n }\n } catch (error) {\n showSnackbar(error.message);\n } finally {\n setDialogs(dialogs => {\n const newDialogs = new Map(dialogs);\n newDialogs.set(id, { ...dialog, loading: false });\n return newDialogs;\n });\n closeDialog(id);\n }\n };\n\n const context = {\n showDialog,\n closeDialog,\n closeAllDialogs\n };\n\n return (\n <DialogsContext.Provider value={context}>\n {children}\n {Array.from(dialogs.values()).map(dialog => (\n <Dialog\n key={dialog.id}\n description={dialog.description}\n dismissible={dialog.dismissible ?? true}\n icon={dialog.icon ?? <></>}\n title={dialog.title}\n content={dialog.content}\n open={dialog.open}\n acceptLabel={dialog.acceptLabel}\n cancelLabel={dialog.cancelLabel}\n loadingLabel={dialog.loadingLabel}\n dataLoadingLabel={dialog.dataLoadingLabel}\n loading={dialog.loading}\n closeDialog={() => {\n closeDialog(dialog.id);\n dialog.onClose && dialog.onClose();\n }}\n onSubmit={data => onSubmit(dialog.id, data)}\n formData={dialog.formData}\n size={dialog.size}\n />\n ))}\n </DialogsContext.Provider>\n );\n};\n\nexport const createDialogsProvider = () => {\n return createProvider(Component => {\n return function DialogsProviderDecorator({ children }: DialogsProviderProps) {\n return (\n <DialogsProvider>\n <Component>{children}</Component>\n </DialogsProvider>\n );\n };\n });\n};\n"],"mappings":"AACA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AAEvC,SAASC,WAAW;AACpB,SAASC,MAAM;AACf,SAASC,cAAc,QAAQ,aAAa;AAC5C,SAASC,UAAU,QAAQ,eAAe;AAmC1C,OAAO,MAAMC,eAAe,GAAGA,CAACC,MAA4B,GAAG,CAAC,CAAC,MAAmB;EAChFC,EAAE,EAAE,UAAUH,UAAU,CAAC,CAAC,EAAE;EAC5BI,KAAK,EAAEF,MAAM,CAACE,KAAK,IAAI,cAAc;EACrCC,WAAW,EAAEH,MAAM,CAACG,WAAW;EAC/BC,WAAW,EAAEJ,MAAM,CAACI,WAAW;EAC/BC,IAAI,EAAEL,MAAM,CAACK,IAAI;EACjBC,OAAO,EAAEN,MAAM,CAACM,OAAO;EACvBC,WAAW,EAAEP,MAAM,CAACO,WAAW,KAAK,IAAI,GAAG,IAAI,GAAIP,MAAM,CAACO,WAAW,IAAI,SAAU;EACnFC,WAAW,EAAER,MAAM,CAACQ,WAAW,KAAK,IAAI,GAAG,IAAI,GAAIR,MAAM,CAACQ,WAAW,IAAI,QAAS;EAClFC,YAAY,EAAET,MAAM,CAACS,YAAY,IAAI,YAAY;EACjDC,gBAAgB,EAAEV,MAAM,CAACU,gBAAgB,IAAI,YAAY;EACzDC,QAAQ,EAAEX,MAAM,CAACW,QAAQ;EACzBC,OAAO,EAAEZ,MAAM,CAACY,OAAO;EACvBC,IAAI,EAAEb,MAAM,CAACa,IAAI,IAAI,KAAK;EAC1BC,OAAO,EAAEd,MAAM,CAACc,OAAO,IAAI,KAAK;EAChCC,OAAO,EAAEf,MAAM,CAACe,OAAO;EACvBC,QAAQ,EAAEhB,M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AAE/B;IAA+B,CAAC,EAAE;MACzE,oBACI7B,KAAA,CAAAiD,aAAA,CAACrB,eAAe,qBACZ5B,KAAA,CAAAiD,aAAA,CAACU,SAAS,QAAE9B,QAAoB,CACnB,CAAC;IAE1B,CAAC;EACL,CAAC,CAAC;AACN,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useState","createProvider","generateId","useSnackbar","Dialog","DialogParamsContext","useAdminConfig","initializeState","params","id","title","description","dismissible","icon","info","content","acceptLabel","cancelLabel","loadingLabel","dataLoadingLabel","onAccept","onClose","open","loading","element","formData","size","DialogsContext","createContext","undefined","DialogsProvider","children","showSnackbar","dialogs","setDialogs","Map","namedDialogIntent","setNamedDialogIntent","registeredDialogs","showDialog","newDialog","set","closeDialog","dialog","get","error","console","newDialogs","delete","closeAllDialogs","openNamedDialog","name","closeNamedDialog","onSubmit","data","message","context","createElement","Provider","value","Array","from","values","map","key","Fragment","registration","find","d","createDialogsProvider","Component","DialogsProviderDecorator"],"sources":["DialogsContext.tsx"],"sourcesContent":["import type { ReactNode } from \"react\";\nimport React, { useState } from \"react\";\nimport type { GenericFormData } from \"@webiny/form\";\nimport { createProvider } from \"@webiny/app\";\nimport { generateId } from \"@webiny/utils\";\nimport { useSnackbar } from \"~/hooks/index.js\";\nimport { Dialog, type DialogProps } from \"./Dialog.js\";\nimport { DialogParamsContext } from \"./DialogParamsContext.js\";\nimport { useAdminConfig } from \"~/config/AdminConfig.js\";\n\ninterface ShowDialogParams {\n title: ReactNode;\n description?: ReactNode;\n dismissible?: boolean;\n content: ReactNode;\n actions?: React.JSX.Element;\n icon?: React.JSX.Element;\n info?: ReactNode;\n acceptLabel?: ReactNode;\n cancelLabel?: ReactNode;\n loadingLabel?: string;\n dataLoadingLabel?: string;\n onAccept?: (data: GenericFormData) => void;\n onClose?: () => void;\n formData?: DialogProps[\"formData\"];\n size?: \"sm\" | \"md\" | \"lg\" | \"xl\" | \"full\";\n}\n\nexport interface DialogsContext {\n showDialog: (params: ShowDialogParams) => () => void;\n closeAllDialogs: () => void;\n openNamedDialog: (name: string, params: Record<string, unknown>) => void;\n closeNamedDialog: () => void;\n}\n\ninterface DialogsProviderProps {\n children: ReactNode;\n}\n\ninterface DialogState extends ShowDialogParams {\n id: string;\n open: boolean;\n loading: boolean;\n element?: React.JSX.Element;\n}\n\nexport const initializeState = (params: Partial<DialogState> = {}): DialogState => ({\n id: `dialog-${generateId()}`,\n title: params.title ?? `Confirmation`,\n description: params.description,\n dismissible: params.dismissible,\n icon: params.icon,\n info: params.info,\n content: params.content,\n acceptLabel: params.acceptLabel === null ? null : (params.acceptLabel ?? `Confirm`),\n cancelLabel: params.cancelLabel === null ? null : (params.cancelLabel ?? `Cancel`),\n loadingLabel: params.loadingLabel ?? `Loading...`,\n dataLoadingLabel: params.dataLoadingLabel ?? `Loading...`,\n onAccept: params.onAccept,\n onClose: params.onClose,\n open: params.open ?? false,\n loading: params.loading ?? false,\n element: params.element,\n formData: params.formData ?? {},\n size: params.size ?? \"md\"\n});\n\nexport const DialogsContext = React.createContext<DialogsContext | undefined>(undefined);\n\ninterface NamedDialogIntent {\n name: string;\n params: Record<string, unknown>;\n}\n\nexport const DialogsProvider = ({ children }: DialogsProviderProps) => {\n const { showSnackbar } = useSnackbar();\n const [dialogs, setDialogs] = useState<Map<string, DialogState>>(new Map());\n const [namedDialogIntent, setNamedDialogIntent] = useState<NamedDialogIntent | null>(null);\n const { dialogs: registeredDialogs } = useAdminConfig();\n\n const showDialog = (params: ShowDialogParams) => {\n const newDialog = initializeState({ ...params, open: true });\n setDialogs(dialogs => new Map(dialogs).set(newDialog.id, newDialog));\n return () => closeDialog(newDialog.id);\n };\n\n const closeDialog = (id: string) => {\n const dialog = dialogs.get(id);\n\n // Call the onClose callback if it exists\n if (dialog?.onClose && typeof dialog.onClose === \"function\") {\n try {\n dialog.onClose();\n } catch (error) {\n // Log error but don't prevent dialog cleanup\n console.error(\"Error in dialog onClose callback:\", error);\n }\n }\n\n setDialogs(dialogs => {\n const newDialogs = new Map(dialogs);\n newDialogs.delete(id);\n return newDialogs;\n });\n };\n\n const closeAllDialogs = () => {\n setDialogs(new Map());\n };\n\n const openNamedDialog = (name: string, params: Record<string, unknown>) => {\n setNamedDialogIntent({ name, params });\n };\n\n const closeNamedDialog = () => {\n setNamedDialogIntent(null);\n };\n\n const onSubmit = async (id: string, data: GenericFormData) => {\n const dialog = dialogs.get(id);\n if (!dialog) {\n return;\n }\n\n try {\n if (typeof dialog.onAccept === \"function\") {\n setDialogs(dialogs => {\n const newDialogs = new Map(dialogs);\n newDialogs.set(id, { ...dialog, loading: true });\n return newDialogs;\n });\n\n await dialog.onAccept(data);\n }\n } catch (error) {\n showSnackbar(error.message);\n } finally {\n setDialogs(dialogs => {\n const newDialogs = new Map(dialogs);\n newDialogs.set(id, { ...dialog, loading: false });\n return newDialogs;\n });\n closeDialog(id);\n }\n };\n\n const context = {\n showDialog,\n closeDialog,\n closeAllDialogs,\n openNamedDialog,\n closeNamedDialog\n };\n\n return (\n <DialogsContext.Provider value={context}>\n {children}\n {Array.from(dialogs.values()).map(dialog => (\n <Dialog\n key={dialog.id}\n description={dialog.description}\n dismissible={dialog.dismissible ?? true}\n icon={dialog.icon ?? <></>}\n title={dialog.title}\n content={dialog.content}\n open={dialog.open}\n info={dialog.info}\n acceptLabel={dialog.acceptLabel}\n cancelLabel={dialog.cancelLabel}\n loadingLabel={dialog.loadingLabel}\n dataLoadingLabel={dialog.dataLoadingLabel}\n loading={dialog.loading}\n closeDialog={() => {\n closeDialog(dialog.id);\n dialog.onClose && dialog.onClose();\n }}\n onSubmit={data => onSubmit(dialog.id, data)}\n formData={dialog.formData}\n size={dialog.size}\n />\n ))}\n {namedDialogIntent &&\n (() => {\n const registration = registeredDialogs.find(\n d => d.name === namedDialogIntent.name\n );\n if (!registration) {\n return null;\n }\n return (\n <DialogParamsContext.Provider\n value={{\n params: namedDialogIntent.params,\n closeDialog: closeNamedDialog\n }}\n >\n {registration.element}\n </DialogParamsContext.Provider>\n );\n })()}\n </DialogsContext.Provider>\n );\n};\n\nexport const createDialogsProvider = () => {\n return createProvider(Component => {\n return function DialogsProviderDecorator({ children }: DialogsProviderProps) {\n return (\n <DialogsProvider>\n <Component>{children}</Component>\n </DialogsProvider>\n );\n };\n });\n};\n"],"mappings":"AACA,OAAOA,KAAK,IAAIC,QAAQ,QAAQ,OAAO;AAEvC,SAASC,cAAc,QAAQ,aAAa;AAC5C,SAASC,UAAU,QAAQ,eAAe;AAC1C,SAASC,WAAW;AACpB,SAASC,MAAM;AACf,SAASC,mBAAmB;AAC5B,SAASC,cAAc;AAsCvB,OAAO,MAAMC,eAAe,GAAGA,CAACC,MAA4B,GAAG,CAAC,CAAC,MAAmB;EAChFC,EAAE,EAAE,UAAUP,UAAU,CAAC,CAAC,EAAE;EAC5BQ,KAAK,EAAEF,MAAM,CAACE,KAAK,IAAI,cAAc;EACrCC,WAAW,EAAEH,MAAM,CAACG,WAAW;EAC/BC,WAAW,EAAEJ,MAAM,CAACI,WAAW;EAC/BC,IAAI,EAAEL,MAAM,CAACK,IAAI;EACjBC,IAAI,EAAEN,MAAM,CAACM,IAAI;EACjBC,OAAO,EAAEP,MAAM,CAACO,OAAO;EACvBC,WAAW,EAAER,MAAM,CAACQ,WAAW,KAAK,IAAI,GAAG,IAAI,GAAIR,MAAM,CAACQ,WAAW,IAAI,SAAU;EACnFC,WAAW,EAAET,MAAM,CAACS,WAAW,KAAK,IAAI,GAAG,IAAI,GAAIT,MAAM,CAACS,WAAW,IAAI,QAAS;EAClFC,YAAY,EAAEV,MAAM,CAACU,YAAY,IAAI,YAAY;EACjDC,gBAAgB,EAAEX,MAAM,CAACW,gBAAgB,IAAI,YAAY;EACzDC,QAAQ,EAAEZ,MAAM,CAACY,QAAQ;EACzBC,OAAO,EAAEb,MAAM,CAACa,OAAO;EACvBC,IAAI,EAAEd,MAAM,CAACc,IAAI,IAAI,KAAK;EAC1BC,OAAO,EAAEf,MAAM,CAACe,OAAO,IAAI,KAAK;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,EAAEoB,MAAM,CAACpB,OAAQ;IACxBmB,WAAW,EAAEA,CAAA,KAAM;MACfA,WAAW,CAACC,MAAM,CAAClC,EAAE,CAAC;MACtBkC,MAAM,CAACtB,OAAO,IAAIsB,MAAM,CAACtB,OAAO,CAAC,CAAC;IACtC,CAAE;IACFgC,QAAQ,EAAEC,IAAI,IAAID,QAAQ,CAACV,MAAM,CAAClC,EAAE,EAAE6C,IAAI,CAAE;IAC5C7B,QAAQ,EAAEkB,MAAM,CAAClB,QAAS;IAC1BC,IAAI,EAAEiB,MAAM,CAACjB;EAAK,CACrB,CACJ,CAAC,EACDU,iBAAiB,IACd,CAAC,MAAM;IACH,MAAM8B,YAAY,GAAG5B,iBAAiB,CAAC6B,IAAI,CACvCC,CAAC,IAAIA,CAAC,CAACjB,IAAI,KAAKf,iBAAiB,CAACe,IACtC,CAAC;IACD,IAAI,CAACe,YAAY,EAAE;MACf,OAAO,IAAI;IACf;IACA,oBACInE,KAAA,CAAA0D,aAAA,CAACpD,mBAAmB,CAACqD,QAAQ;MACzBC,KAAK,EAAE;QACHnD,MAAM,EAAE4B,iBAAiB,CAAC5B,MAAM;QAChCkC,WAAW,EAAEU;MACjB;IAAE,GAEDc,YAAY,CAAC1C,OACY,CAAC;EAEvC,CAAC,EAAE,CACc,CAAC;AAElC,CAAC;AAED,OAAO,MAAM6C,qBAAqB,GAAGA,CAAA,KAAM;EACvC,OAAOpE,cAAc,CAACqE,SAAS,IAAI;IAC/B,OAAO,SAASC,wBAAwBA,CAAC;MAAExC;IAA+B,CAAC,EAAE;MACzE,oBACIhC,KAAA,CAAA0D,aAAA,CAAC3B,eAAe,qBACZ/B,KAAA,CAAA0D,aAAA,CAACa,SAAS,QAAEvC,QAAoB,CACnB,CAAC;IAE1B,CAAC;EACL,CAAC,CAAC;AACN,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["React","Separator","Form","Filters","props","show","filters","length","createElement","Fragment","className","data","onChange","map","filter","key","name","element","children"],"sources":["Filters.tsx"],"sourcesContent":["import React from \"react\";\nimport { Separator } from \"@webiny/admin-ui\";\nimport type { FormOnSubmit, FormProps, GenericFormData } from \"@webiny/form\";\nimport { Form } from \"@webiny/form\";\n\ntype Filter = {\n name: string;\n element: React.ReactElement;\n};\n\nexport type GenericFiltersData = GenericFormData;\n\nexport type FiltersOnSubmit<T extends GenericFiltersData = GenericFiltersData> = FormOnSubmit<T>;\n\nexport interface FiltersProps<T extends GenericFormData = GenericFormData>\n extends Pick<FormProps<T>, \"data\" | \"onChange\"> {\n filters: Filter[];\n show: boolean;\n children?: React.ReactNode;\n [\"data-testid\"]?: string;\n}\n\nexport const Filters = <T extends GenericFiltersData = GenericFiltersData>(\n props: FiltersProps<T>\n) => {\n if (!props.show || !props.filters.length) {\n return null;\n }\n\n return (\n <>\n <div\n className={\"w-full bg-neutral-base px-md my-sm\"}\n data-testid={props[\"data-testid\"] || \"filters-container\"}\n >\n <Form data={props.data} onChange={props.onChange}>\n {() => (\n <div className={\"w-full flex gap-sm flex-wrap\"}>\n {props.filters.map(filter => (\n <div key={filter.name}>{filter.element}</div>\n ))}\n {props.children}\n </div>\n )}\n </Form>\n </div>\n <Separator />\n </>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,QAAQ,kBAAkB;AAE5C,SAASC,IAAI,QAAQ,cAAc;AAmBnC,OAAO,MAAMC,OAAO,GAChBC,KAAsB,IACrB;EACD,IAAI,CAACA,KAAK,CAACC,IAAI,IAAI,CAACD,KAAK,CAACE,OAAO,CAACC,MAAM,EAAE;IACtC,OAAO,IAAI;EACf;EAEA,oBACIP,KAAA,CAAAQ,aAAA,CAAAR,KAAA,CAAAS,QAAA,qBACIT,KAAA,CAAAQ,aAAA;IACIE,SAAS,EAAE,oCAAqC;IAChD,eAAaN,KAAK,CAAC,aAAa,CAAC,IAAI;EAAoB,gBAEzDJ,KAAA,CAAAQ,aAAA,CAACN,IAAI;IAACS,IAAI,EAAEP,KAAK,CAACO,IAAK;IAACC,QAAQ,EAAER,KAAK,CAACQ;EAAS,GAC5C,mBACGZ,KAAA,CAAAQ,aAAA;IAAKE,SAAS,EAAE;EAA+B,GAC1CN,KAAK,CAACE,OAAO,CAACO,GAAG,CAACC,MAAM,iBACrBd,KAAA,CAAAQ,aAAA;IAAKO,GAAG,EAAED,MAAM,CAACE;EAAK,GAAEF,MAAM,CAACG,OAAa,CAC/C,CAAC,EACDb,KAAK,CAACc,QACN,CAEP,CACL,CAAC,eACNlB,KAAA,CAAAQ,aAAA,CAACP,SAAS,MAAE,CACd,CAAC;AAEX,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","Separator","Form","Filters","props","show","filters","length","createElement","Fragment","className","data","onChange","map","filter","key","name","element","children"],"sources":["Filters.tsx"],"sourcesContent":["import React from \"react\";\nimport { Separator } from \"@webiny/admin-ui\";\nimport type { FormOnSubmit, FormProps, GenericFormData } from \"@webiny/form\";\nimport { Form } from \"@webiny/form\";\n\ntype Filter = {\n name: string;\n element: React.ReactElement;\n};\n\nexport type GenericFiltersData = GenericFormData;\n\nexport type FiltersOnSubmit<T extends GenericFiltersData = GenericFiltersData> = FormOnSubmit<T>;\n\nexport interface FiltersProps<T extends GenericFormData = GenericFormData> extends Pick<\n FormProps<T>,\n \"data\" | \"onChange\"\n> {\n filters: Filter[];\n show: boolean;\n children?: React.ReactNode;\n [\"data-testid\"]?: string;\n}\n\nexport const Filters = <T extends GenericFiltersData = GenericFiltersData>(\n props: FiltersProps<T>\n) => {\n if (!props.show || !props.filters.length) {\n return null;\n }\n\n return (\n <>\n <div\n className={\"w-full bg-neutral-base px-md my-sm\"}\n data-testid={props[\"data-testid\"] || \"filters-container\"}\n >\n <Form data={props.data} onChange={props.onChange}>\n {() => (\n <div className={\"w-full flex gap-sm flex-wrap\"}>\n {props.filters.map(filter => (\n <div key={filter.name}>{filter.element}</div>\n ))}\n {props.children}\n </div>\n )}\n </Form>\n </div>\n <Separator />\n </>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,QAAQ,kBAAkB;AAE5C,SAASC,IAAI,QAAQ,cAAc;AAqBnC,OAAO,MAAMC,OAAO,GAChBC,KAAsB,IACrB;EACD,IAAI,CAACA,KAAK,CAACC,IAAI,IAAI,CAACD,KAAK,CAACE,OAAO,CAACC,MAAM,EAAE;IACtC,OAAO,IAAI;EACf;EAEA,oBACIP,KAAA,CAAAQ,aAAA,CAAAR,KAAA,CAAAS,QAAA,qBACIT,KAAA,CAAAQ,aAAA;IACIE,SAAS,EAAE,oCAAqC;IAChD,eAAaN,KAAK,CAAC,aAAa,CAAC,IAAI;EAAoB,gBAEzDJ,KAAA,CAAAQ,aAAA,CAACN,IAAI;IAACS,IAAI,EAAEP,KAAK,CAACO,IAAK;IAACC,QAAQ,EAAER,KAAK,CAACQ;EAAS,GAC5C,mBACGZ,KAAA,CAAAQ,aAAA;IAAKE,SAAS,EAAE;EAA+B,GAC1CN,KAAK,CAACE,OAAO,CAACO,GAAG,CAACC,MAAM,iBACrBd,KAAA,CAAAQ,aAAA;IAAKO,GAAG,EAAED,MAAM,CAACE;EAAK,GAAEF,MAAM,CAACG,OAAa,CAC/C,CAAC,EACDb,KAAK,CAACc,QACN,CAEP,CACL,CAAC,eACNlB,KAAA,CAAAQ,aAAA,CAACP,SAAS,MAAE,CACd,CAAC;AAEX,CAAC","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { ButtonFloating } from "@webiny/ui/Button/index.js";
2
+ import { IconButton } from "@webiny/admin-ui";
3
3
  import { ReactComponent as AddIcon } from "@webiny/icons/add.svg";
4
4
  // Set "styles" inline, since no customizations are possible / needed here.
5
5
  const FloatingActionButton = props => {
@@ -9,7 +9,7 @@ const FloatingActionButton = props => {
9
9
  bottom: 20,
10
10
  right: 20
11
11
  }
12
- }, /*#__PURE__*/React.createElement(ButtonFloating, Object.assign({}, props, {
12
+ }, /*#__PURE__*/React.createElement(IconButton, Object.assign({}, props, {
13
13
  icon: /*#__PURE__*/React.createElement(AddIcon, null)
14
14
  })));
15
15
  };
@@ -1 +1 @@
1
- {"version":3,"names":["React","ButtonFloating","ReactComponent","AddIcon","FloatingActionButton","props","createElement","style","position","bottom","right","Object","assign","icon"],"sources":["FloatingActionButton.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { ButtonFloating } from \"@webiny/ui/Button/index.js\";\nimport { ReactComponent as AddIcon } from \"@webiny/icons/add.svg\";\n\ninterface FloatingActionButtonProps {\n children: React.ReactNode;\n}\n\n// Set \"styles\" inline, since no customizations are possible / needed here.\nconst FloatingActionButton = (props: FloatingActionButtonProps) => {\n return (\n <div\n style={{\n position: \"absolute\",\n bottom: 20,\n right: 20\n }}\n >\n <ButtonFloating {...props} icon={<AddIcon />} />\n </div>\n );\n};\n\nexport { FloatingActionButton };\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,cAAc,QAAQ,4BAA4B;AAC3D,SAASC,cAAc,IAAIC,OAAO,QAAQ,uBAAuB;AAMjE;AACA,MAAMC,oBAAoB,GAAIC,KAAgC,IAAK;EAC/D,oBACIL,KAAA,CAAAM,aAAA;IACIC,KAAK,EAAE;MACHC,QAAQ,EAAE,UAAU;MACpBC,MAAM,EAAE,EAAE;MACVC,KAAK,EAAE;IACX;EAAE,gBAEFV,KAAA,CAAAM,aAAA,CAACL,cAAc,EAAAU,MAAA,CAAAC,MAAA,KAAKP,KAAK;IAAEQ,IAAI,eAAEb,KAAA,CAAAM,aAAA,CAACH,OAAO,MAAE;EAAE,EAAE,CAC9C,CAAC;AAEd,CAAC;AAED,SAASC,oBAAoB","ignoreList":[]}
1
+ {"version":3,"names":["React","IconButton","ReactComponent","AddIcon","FloatingActionButton","props","createElement","style","position","bottom","right","Object","assign","icon"],"sources":["FloatingActionButton.tsx"],"sourcesContent":["import * as React from \"react\";\nimport { IconButton } from \"@webiny/admin-ui\";\nimport { ReactComponent as AddIcon } from \"@webiny/icons/add.svg\";\n\ninterface FloatingActionButtonProps {\n children: React.ReactNode;\n}\n\n// Set \"styles\" inline, since no customizations are possible / needed here.\nconst FloatingActionButton = (props: FloatingActionButtonProps) => {\n return (\n <div\n style={{\n position: \"absolute\",\n bottom: 20,\n right: 20\n }}\n >\n <IconButton {...props} icon={<AddIcon />} />\n </div>\n );\n};\n\nexport { FloatingActionButton };\n"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,SAASC,UAAU,QAAQ,kBAAkB;AAC7C,SAASC,cAAc,IAAIC,OAAO,QAAQ,uBAAuB;AAMjE;AACA,MAAMC,oBAAoB,GAAIC,KAAgC,IAAK;EAC/D,oBACIL,KAAA,CAAAM,aAAA;IACIC,KAAK,EAAE;MACHC,QAAQ,EAAE,UAAU;MACpBC,MAAM,EAAE,EAAE;MACVC,KAAK,EAAE;IACX;EAAE,gBAEFV,KAAA,CAAAM,aAAA,CAACL,UAAU,EAAAU,MAAA,CAAAC,MAAA,KAAKP,KAAK;IAAEQ,IAAI,eAAEb,KAAA,CAAAM,aAAA,CAACH,OAAO,MAAE;EAAE,EAAE,CAC1C,CAAC;AAEd,CAAC;AAED,SAASC,oBAAoB","ignoreList":[]}
@@ -1,20 +1,20 @@
1
1
  import React from "react";
2
2
  import type { Icon } from "./types.js";
3
- export declare const IconRenderer: ((props: unknown) => JSX.Element | null) & {
4
- original: (props: unknown) => JSX.Element | null;
3
+ export declare const IconRenderer: ((props: unknown) => React.JSX.Element | null) & {
4
+ original: (props: unknown) => React.JSX.Element | null;
5
5
  originalName: string;
6
6
  displayName: string;
7
7
  } & {
8
- original: ((props: unknown) => JSX.Element | null) & {
9
- original: (props: unknown) => JSX.Element | null;
8
+ original: ((props: unknown) => React.JSX.Element | null) & {
9
+ original: (props: unknown) => React.JSX.Element | null;
10
10
  originalName: string;
11
11
  displayName: string;
12
12
  };
13
13
  originalName: string;
14
14
  displayName: string;
15
15
  } & {
16
- createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<((props: unknown) => JSX.Element | null) & {
17
- original: (props: unknown) => JSX.Element | null;
16
+ createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<((props: unknown) => React.JSX.Element | null) & {
17
+ original: (props: unknown) => React.JSX.Element | null;
18
18
  originalName: string;
19
19
  displayName: string;
20
20
  }>) => (props: unknown) => React.JSX.Element;
@@ -3,7 +3,7 @@ import { type VariantProps } from "@webiny/admin-ui";
3
3
  import type { Icon } from "../../../components/IconPicker/index.js";
4
4
  declare const iconPickerCellVariants: (props?: ({
5
5
  isActive?: boolean | null | undefined;
6
- } & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
6
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
7
7
  interface IconPickerCellProps extends VariantProps<typeof iconPickerCellVariants> {
8
8
  icon: Icon;
9
9
  onIconClick: (icon: Icon) => void;