@webiny/app-headless-cms 5.37.8 → 5.38.0-beta.1

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 (540) hide show
  1. package/HeadlessCMS.js +5 -2
  2. package/HeadlessCMS.js.map +1 -1
  3. package/admin/components/ContentEntries/BulkActions/ActionDelete.d.ts +4 -0
  4. package/admin/components/ContentEntries/BulkActions/ActionDelete.js +125 -0
  5. package/admin/components/ContentEntries/BulkActions/ActionDelete.js.map +1 -0
  6. package/admin/components/ContentEntries/BulkActions/ActionMove.d.ts +4 -0
  7. package/admin/components/ContentEntries/BulkActions/ActionMove.js +141 -0
  8. package/admin/components/ContentEntries/BulkActions/ActionMove.js.map +1 -0
  9. package/admin/components/ContentEntries/BulkActions/ActionPublish.d.ts +4 -0
  10. package/admin/components/ContentEntries/BulkActions/ActionPublish.js +131 -0
  11. package/admin/components/ContentEntries/BulkActions/ActionPublish.js.map +1 -0
  12. package/admin/components/ContentEntries/BulkActions/ActionUnpublish.d.ts +4 -0
  13. package/admin/components/ContentEntries/BulkActions/ActionUnpublish.js +131 -0
  14. package/admin/components/ContentEntries/BulkActions/ActionUnpublish.js.map +1 -0
  15. package/admin/components/ContentEntries/BulkActions/BulkActions.d.ts +3 -0
  16. package/admin/components/ContentEntries/BulkActions/BulkActions.js +53 -0
  17. package/admin/components/ContentEntries/BulkActions/BulkActions.js.map +1 -0
  18. package/admin/components/ContentEntries/BulkActions/BulkActions.styled.d.ts +15 -0
  19. package/admin/components/ContentEntries/BulkActions/BulkActions.styled.js +26 -0
  20. package/admin/components/ContentEntries/BulkActions/BulkActions.styled.js.map +1 -0
  21. package/admin/components/ContentEntries/BulkActions/index.d.ts +5 -0
  22. package/admin/components/ContentEntries/BulkActions/index.js +53 -0
  23. package/admin/components/ContentEntries/BulkActions/index.js.map +1 -0
  24. package/admin/components/ContentEntries/Empty/index.js +3 -1
  25. package/admin/components/ContentEntries/Empty/styled.js +3 -1
  26. package/admin/components/ContentEntries/Filters/FieldsMapper.d.ts +7 -0
  27. package/admin/components/ContentEntries/Filters/FieldsMapper.js +74 -0
  28. package/admin/components/ContentEntries/Filters/FieldsMapper.js.map +1 -0
  29. package/admin/components/ContentEntries/Filters/FilterByStatus.js +3 -1
  30. package/admin/components/ContentEntries/Filters/Filters.d.ts +1 -1
  31. package/admin/components/ContentEntries/Filters/Filters.js +36 -3
  32. package/admin/components/ContentEntries/Filters/Filters.js.map +1 -1
  33. package/admin/components/ContentEntries/Filters/index.js +3 -1
  34. package/admin/components/ContentEntries/Filters/styles.js +3 -1
  35. package/admin/components/ContentEntries/Header/ButtonFilters/ButtonFilters.js +3 -1
  36. package/admin/components/ContentEntries/Header/ButtonFilters/index.js +3 -1
  37. package/admin/components/ContentEntries/Header/ButtonsCreate/ButtonsCreate.js +3 -1
  38. package/admin/components/ContentEntries/Header/ButtonsCreate/index.js +3 -1
  39. package/admin/components/ContentEntries/Header/ButtonsCreate/styled.js +3 -1
  40. package/admin/components/ContentEntries/Header/Header.js +3 -1
  41. package/admin/components/ContentEntries/Header/Title/Title.js +3 -1
  42. package/admin/components/ContentEntries/Header/Title/index.js +3 -1
  43. package/admin/components/ContentEntries/Header/Title/styled.js +3 -1
  44. package/admin/components/ContentEntries/Header/index.js +3 -1
  45. package/admin/components/ContentEntries/Header/styled.js +3 -1
  46. package/admin/components/ContentEntries/LoadMoreButton/LoadMoreButton.js +3 -1
  47. package/admin/components/ContentEntries/LoadMoreButton/index.js +3 -1
  48. package/admin/components/ContentEntries/LoadMoreButton/styled.js +3 -1
  49. package/admin/components/ContentEntries/LoadingMore/index.js +3 -1
  50. package/admin/components/ContentEntries/LoadingMore/styled.js +3 -1
  51. package/admin/components/ContentEntries/Table/Row/Folder/FolderActionDelete.js +3 -1
  52. package/admin/components/ContentEntries/Table/Row/Folder/FolderActionEdit.js +3 -1
  53. package/admin/components/ContentEntries/Table/Row/Folder/FolderActionManagePermissions.d.ts +6 -0
  54. package/admin/components/ContentEntries/Table/Row/Folder/FolderActionManagePermissions.js +27 -0
  55. package/admin/components/ContentEntries/Table/Row/Folder/FolderActionManagePermissions.js.map +1 -0
  56. package/admin/components/ContentEntries/Table/Row/Name.js +12 -2
  57. package/admin/components/ContentEntries/Table/Row/Name.js.map +1 -1
  58. package/admin/components/ContentEntries/Table/Row/Record/RecordActionDelete.js +3 -1
  59. package/admin/components/ContentEntries/Table/Row/Record/RecordActionEdit.js +3 -1
  60. package/admin/components/ContentEntries/Table/Row/Record/RecordActionMove.js +3 -1
  61. package/admin/components/ContentEntries/Table/Row/Record/RecordActionPublish.js +3 -1
  62. package/admin/components/ContentEntries/Table/index.d.ts +8 -6
  63. package/admin/components/ContentEntries/Table/index.js +50 -18
  64. package/admin/components/ContentEntries/Table/index.js.map +1 -1
  65. package/admin/components/ContentEntries/Table/styled.js +3 -1
  66. package/admin/components/ContentEntries/Table/types.d.ts +1 -0
  67. package/admin/components/ContentEntries/Table/types.js +3 -1
  68. package/admin/components/ContentEntries/Table/types.js.map +1 -1
  69. package/admin/components/ContentEntryForm/ContentEntryForm.js +3 -1
  70. package/admin/components/ContentEntryForm/ContentEntryFormPreview.js +3 -1
  71. package/admin/components/ContentEntryForm/Fields.js +3 -1
  72. package/admin/components/ContentEntryForm/Header/ContentFormOptionsMenu/ContentFormOptionsMenu.js +3 -1
  73. package/admin/components/ContentEntryForm/Header/ContentFormOptionsMenu/ContentFormOptionsMenu.styles.js +3 -1
  74. package/admin/components/ContentEntryForm/Header/ContentFormOptionsMenu/index.js +3 -1
  75. package/admin/components/ContentEntryForm/Header/DeleteEntry/DeleteEntry.js +3 -1
  76. package/admin/components/ContentEntryForm/Header/DeleteEntry/index.js +3 -1
  77. package/admin/components/ContentEntryForm/Header/DeleteEntry/useDeleteEntry.js +3 -1
  78. package/admin/components/ContentEntryForm/Header/Header.js +3 -1
  79. package/admin/components/ContentEntryForm/Header/RevisionSelector/RevisionSelector.js +3 -1
  80. package/admin/components/ContentEntryForm/Header/RevisionSelector/RevisionSelector.styles.d.ts +4 -1
  81. package/admin/components/ContentEntryForm/Header/RevisionSelector/RevisionSelector.styles.js +3 -1
  82. package/admin/components/ContentEntryForm/Header/RevisionSelector/index.js +3 -1
  83. package/admin/components/ContentEntryForm/Header/SaveAndPublishContent/SaveAndPublishContent.js +3 -1
  84. package/admin/components/ContentEntryForm/Header/SaveAndPublishContent/index.js +3 -1
  85. package/admin/components/ContentEntryForm/Header/SaveAndPublishContent/useSaveAndPublish.js +3 -1
  86. package/admin/components/ContentEntryForm/Header/SaveContent/SaveContent.js +9 -2
  87. package/admin/components/ContentEntryForm/Header/SaveContent/SaveContent.js.map +1 -1
  88. package/admin/components/ContentEntryForm/Header/SaveContent/index.js +3 -1
  89. package/admin/components/ContentEntryForm/Header/index.js +3 -1
  90. package/admin/components/ContentEntryForm/Label.js +3 -1
  91. package/admin/components/ContentEntryForm/RenderFieldElement.js +3 -1
  92. package/admin/components/ContentEntryForm/functions/getValue.js +3 -1
  93. package/admin/components/ContentEntryForm/functions/setValue.js +3 -1
  94. package/admin/components/ContentEntryForm/useBind.js +4 -2
  95. package/admin/components/ContentEntryForm/useBind.js.map +1 -1
  96. package/admin/components/ContentEntryForm/useContentEntryForm.js +23 -13
  97. package/admin/components/ContentEntryForm/useContentEntryForm.js.map +1 -1
  98. package/admin/components/ContentEntryForm/useRenderPlugins.js +3 -1
  99. package/admin/components/ContentModelEditor/ContentModelEditorProvider.js +3 -1
  100. package/admin/components/ContentModelEditor/Editor.js +3 -1
  101. package/admin/components/ContentModelEditor/FieldsSidebar.js +3 -1
  102. package/admin/components/ContentModelEditor/Header.js +3 -1
  103. package/admin/components/ContentModelEditor/PreviewTab.js +3 -1
  104. package/admin/components/ContentModelEditor/index.js +3 -1
  105. package/admin/components/ContentModelEditor/useModelEditor.js +3 -1
  106. package/admin/components/DelayedOnChange.js +3 -1
  107. package/admin/components/Dialog.js +3 -1
  108. package/admin/components/DragPreview.js +3 -1
  109. package/admin/components/Draggable.js +3 -1
  110. package/admin/components/DropZone/Center.js +3 -1
  111. package/admin/components/DropZone/Horizontal.js +3 -1
  112. package/admin/components/DropZone/Vertical.js +3 -1
  113. package/admin/components/DropZone/index.js +3 -1
  114. package/admin/components/Droppable.js +3 -1
  115. package/admin/components/FieldEditor/EditFieldDialog/AppearanceTab.js +3 -1
  116. package/admin/components/FieldEditor/EditFieldDialog/GeneralTab.js +3 -1
  117. package/admin/components/FieldEditor/EditFieldDialog/PredefinedValues.js +3 -1
  118. package/admin/components/FieldEditor/EditFieldDialog/ValidationsSection.js +3 -1
  119. package/admin/components/FieldEditor/EditFieldDialog/ValidatorsList.js +3 -1
  120. package/admin/components/FieldEditor/EditFieldDialog/functions/getValue.js +3 -1
  121. package/admin/components/FieldEditor/EditFieldDialog/functions/setValue.js +3 -1
  122. package/admin/components/FieldEditor/EditFieldDialog/getValidators.js +3 -1
  123. package/admin/components/FieldEditor/EditFieldDialog.js +3 -1
  124. package/admin/components/FieldEditor/Field.js +3 -1
  125. package/admin/components/FieldEditor/FieldEditor.js +3 -1
  126. package/admin/components/FieldEditor/FieldEditorContext.js +3 -1
  127. package/admin/components/FieldEditor/Styled.js +3 -1
  128. package/admin/components/FieldEditor/index.js +3 -1
  129. package/admin/components/FieldEditor/useModelFieldEditor.js +3 -1
  130. package/admin/components/FieldEditor/utils/deleteField.js +3 -1
  131. package/admin/components/FieldEditor/utils/getFieldPosition.js +3 -1
  132. package/admin/components/FieldEditor/utils/index.js +3 -1
  133. package/admin/components/FieldEditor/utils/moveField.js +3 -1
  134. package/admin/components/FieldEditor/utils/moveRow.js +3 -1
  135. package/admin/components/IconPicker.js +3 -1
  136. package/admin/components/LexicalCmsEditor/LexicalCmsEditor.js +3 -1
  137. package/admin/components/LexicalCmsEditor/LexicalEditorCmsPlugin.js +3 -1
  138. package/admin/components/LexicalCmsEditor/TypographyDropDown.js +39 -28
  139. package/admin/components/LexicalCmsEditor/TypographyDropDown.js.map +1 -1
  140. package/admin/components/ModelFieldProvider/ModelFieldContext.js +3 -1
  141. package/admin/components/ModelFieldProvider/index.js +3 -1
  142. package/admin/components/ModelFieldProvider/useModelField.js +3 -1
  143. package/admin/components/ModelProvider/ModelContext.js +3 -1
  144. package/admin/components/ModelProvider/index.js +3 -1
  145. package/admin/components/ModelProvider/useModel.js +3 -1
  146. package/admin/config/contentEntries/editor/Actions/BaseAction.js +3 -1
  147. package/admin/config/contentEntries/editor/Actions/ButtonAction.js +3 -1
  148. package/admin/config/contentEntries/editor/Actions/MenuItemAction.js +3 -1
  149. package/admin/config/contentEntries/editor/Actions/index.js +3 -1
  150. package/admin/config/contentEntries/editor/ContentEntryEditorConfig.js +3 -1
  151. package/admin/config/contentEntries/editor/index.js +3 -1
  152. package/admin/config/contentEntries/index.js +3 -1
  153. package/admin/config/contentEntries/list/Browser/BulkAction.d.ts +27 -0
  154. package/admin/config/contentEntries/list/Browser/BulkAction.js +103 -0
  155. package/admin/config/contentEntries/list/Browser/BulkAction.js.map +1 -0
  156. package/admin/config/contentEntries/list/Browser/Filter.js +3 -1
  157. package/admin/config/contentEntries/list/Browser/FiltersToWhere.js +3 -1
  158. package/admin/config/contentEntries/list/Browser/index.d.ts +13 -0
  159. package/admin/config/contentEntries/list/Browser/index.js +5 -1
  160. package/admin/config/contentEntries/list/Browser/index.js.map +1 -1
  161. package/admin/config/contentEntries/list/ContentEntryListConfig.d.ts +12 -0
  162. package/admin/config/contentEntries/list/ContentEntryListConfig.js +4 -1
  163. package/admin/config/contentEntries/list/ContentEntryListConfig.js.map +1 -1
  164. package/admin/config/contentEntries/list/index.js +3 -1
  165. package/admin/constants/folders.js +3 -1
  166. package/admin/constants/statusLabels.js +3 -1
  167. package/admin/constants.js +3 -1
  168. package/admin/contexts/Cms/NetworkError.js +3 -1
  169. package/admin/contexts/Cms/index.d.ts +26 -3
  170. package/admin/contexts/Cms/index.js +40 -5
  171. package/admin/contexts/Cms/index.js.map +1 -1
  172. package/admin/elements/ContentGroupMenuElement.js +3 -1
  173. package/admin/elements/ContentModelMenuElement.js +3 -1
  174. package/admin/elements/NothingToShowElement.js +3 -1
  175. package/admin/graphql/contentModels.js +3 -1
  176. package/admin/hooks/index.js +3 -1
  177. package/admin/hooks/useApolloClient.js +3 -1
  178. package/admin/hooks/useCms.js +3 -1
  179. package/admin/hooks/useContentModels.js +3 -1
  180. package/admin/hooks/useLazyQuery.js +3 -1
  181. package/admin/hooks/useModelFieldGraphqlContext.js +3 -1
  182. package/admin/hooks/useMutation.js +3 -1
  183. package/admin/hooks/usePermission.js +3 -1
  184. package/admin/hooks/useQuery.js +3 -1
  185. package/admin/hooks/useQueryLocale.js +3 -1
  186. package/admin/lexicalConfig/LexicalEditorConfig.js +3 -1
  187. package/admin/menus/CmsMenuLoader.js +29 -9
  188. package/admin/menus/CmsMenuLoader.js.map +1 -1
  189. package/admin/menus/ContentGroupsMenuItems.js +3 -1
  190. package/admin/menus/GlobalSearchPlugins.js +3 -1
  191. package/admin/menus/NothingToShowElement.js +3 -1
  192. package/admin/plugins/apiInformation/index.js +3 -1
  193. package/admin/plugins/arrayUtils.js +3 -1
  194. package/admin/plugins/definitions/CmsEditorFieldValidatorFileTypePlugin.js +3 -1
  195. package/admin/plugins/definitions/CmsFieldValidatorFileTypePlugin.js +3 -1
  196. package/admin/plugins/editor/defaultBar/BackButton.js +3 -1
  197. package/admin/plugins/editor/defaultBar/CreateContentButton.js +3 -1
  198. package/admin/plugins/editor/defaultBar/Divider.js +3 -1
  199. package/admin/plugins/editor/defaultBar/FormSettings/FormSettings.js +3 -1
  200. package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsButton.js +3 -1
  201. package/admin/plugins/editor/defaultBar/FormSettings/FormSettingsStyled.js +3 -1
  202. package/admin/plugins/editor/defaultBar/FormSettings/index.js +3 -1
  203. package/admin/plugins/editor/defaultBar/Name/Name.js +3 -1
  204. package/admin/plugins/editor/defaultBar/Name/NameStyled.js +3 -1
  205. package/admin/plugins/editor/defaultBar/Name/index.js +3 -1
  206. package/admin/plugins/editor/defaultBar/SaveContentModelButton.js +3 -1
  207. package/admin/plugins/editor/defaultBar/index.js +3 -1
  208. package/admin/plugins/editor/formSettings/components/GeneralSettings.js +3 -1
  209. package/admin/plugins/editor/formSettings/components/GroupSelect.js +3 -1
  210. package/admin/plugins/editor/formSettings/index.js +3 -1
  211. package/admin/plugins/entry/DefaultOnEntryDelete.js +3 -1
  212. package/admin/plugins/entry/DefaultOnEntryPublish.js +3 -1
  213. package/admin/plugins/entry/DefaultOnEntryUnpublish.d.ts +2 -0
  214. package/admin/plugins/entry/DefaultOnEntryUnpublish.js +127 -0
  215. package/admin/plugins/entry/DefaultOnEntryUnpublish.js.map +1 -0
  216. package/admin/plugins/fieldRenderers/Accordion.js +3 -1
  217. package/admin/plugins/fieldRenderers/DynamicSection.js +3 -1
  218. package/admin/plugins/fieldRenderers/boolean/booleanSwitch.js +3 -1
  219. package/admin/plugins/fieldRenderers/boolean/index.js +3 -1
  220. package/admin/plugins/fieldRenderers/checkboxes.js +3 -1
  221. package/admin/plugins/fieldRenderers/dateTime/DateOnly.js +3 -1
  222. package/admin/plugins/fieldRenderers/dateTime/DateTimeWithTimezone.js +3 -1
  223. package/admin/plugins/fieldRenderers/dateTime/DateTimeWithoutTimezone.js +3 -1
  224. package/admin/plugins/fieldRenderers/dateTime/Input.js +3 -1
  225. package/admin/plugins/fieldRenderers/dateTime/Select.js +3 -1
  226. package/admin/plugins/fieldRenderers/dateTime/Time.js +3 -1
  227. package/admin/plugins/fieldRenderers/dateTime/dateTimeField.js +3 -1
  228. package/admin/plugins/fieldRenderers/dateTime/dateTimeFields.js +3 -1
  229. package/admin/plugins/fieldRenderers/dateTime/index.js +3 -1
  230. package/admin/plugins/fieldRenderers/dateTime/utils.js +3 -1
  231. package/admin/plugins/fieldRenderers/dynamicZone/AddTemplate.js +3 -1
  232. package/admin/plugins/fieldRenderers/dynamicZone/MultiValueDynamicZone.js +3 -1
  233. package/admin/plugins/fieldRenderers/dynamicZone/SingleValueDynamicZone.js +3 -1
  234. package/admin/plugins/fieldRenderers/dynamicZone/TemplateCard.js +3 -1
  235. package/admin/plugins/fieldRenderers/dynamicZone/TemplateGallery.js +3 -1
  236. package/admin/plugins/fieldRenderers/dynamicZone/TemplateIcon.js +3 -1
  237. package/admin/plugins/fieldRenderers/dynamicZone/dynamicZoneRenderer.d.ts +2 -2
  238. package/admin/plugins/fieldRenderers/dynamicZone/dynamicZoneRenderer.js +9 -1
  239. package/admin/plugins/fieldRenderers/dynamicZone/dynamicZoneRenderer.js.map +1 -1
  240. package/admin/plugins/fieldRenderers/file/File.js +3 -1
  241. package/admin/plugins/fieldRenderers/file/fileField.js +3 -1
  242. package/admin/plugins/fieldRenderers/file/fileFields.js +3 -1
  243. package/admin/plugins/fieldRenderers/file/index.js +3 -1
  244. package/admin/plugins/fieldRenderers/file/utils.js +3 -1
  245. package/admin/plugins/fieldRenderers/lexicalText/index.js +3 -1
  246. package/admin/plugins/fieldRenderers/lexicalText/lexicalTextInput.js +3 -1
  247. package/admin/plugins/fieldRenderers/lexicalText/lexicalTextInputs.js +3 -1
  248. package/admin/plugins/fieldRenderers/lexicalText/utils.js +3 -1
  249. package/admin/plugins/fieldRenderers/longText/index.js +3 -1
  250. package/admin/plugins/fieldRenderers/longText/longText.js +3 -1
  251. package/admin/plugins/fieldRenderers/longText/longTexts.js +3 -1
  252. package/admin/plugins/fieldRenderers/number/index.js +3 -1
  253. package/admin/plugins/fieldRenderers/number/numberInput.js +3 -1
  254. package/admin/plugins/fieldRenderers/number/numberInputs.js +3 -1
  255. package/admin/plugins/fieldRenderers/object/FieldSettings.d.ts +42 -0
  256. package/admin/plugins/fieldRenderers/object/FieldSettings.js +68 -0
  257. package/admin/plugins/fieldRenderers/object/FieldSettings.js.map +1 -0
  258. package/admin/plugins/fieldRenderers/object/StyledComponents.js +3 -1
  259. package/admin/plugins/fieldRenderers/object/index.js +3 -1
  260. package/admin/plugins/fieldRenderers/object/multipleObjects.d.ts +2 -2
  261. package/admin/plugins/fieldRenderers/object/multipleObjects.js +12 -3
  262. package/admin/plugins/fieldRenderers/object/multipleObjects.js.map +1 -1
  263. package/admin/plugins/fieldRenderers/object/multipleObjectsAccordion.d.ts +2 -2
  264. package/admin/plugins/fieldRenderers/object/multipleObjectsAccordion.js +12 -3
  265. package/admin/plugins/fieldRenderers/object/multipleObjectsAccordion.js.map +1 -1
  266. package/admin/plugins/fieldRenderers/object/singleObjectAccordion.d.ts +2 -2
  267. package/admin/plugins/fieldRenderers/object/singleObjectAccordion.js +10 -2
  268. package/admin/plugins/fieldRenderers/object/singleObjectAccordion.js.map +1 -1
  269. package/admin/plugins/fieldRenderers/object/singleObjectInline.d.ts +2 -2
  270. package/admin/plugins/fieldRenderers/object/singleObjectInline.js +12 -4
  271. package/admin/plugins/fieldRenderers/object/singleObjectInline.js.map +1 -1
  272. package/admin/plugins/fieldRenderers/radioButtons.js +3 -1
  273. package/admin/plugins/fieldRenderers/ref/advanced/components/AdvancedMultipleReferenceField.js +19 -8
  274. package/admin/plugins/fieldRenderers/ref/advanced/components/AdvancedMultipleReferenceField.js.map +1 -1
  275. package/admin/plugins/fieldRenderers/ref/advanced/components/AdvancedSingleReferenceField.js +11 -2
  276. package/admin/plugins/fieldRenderers/ref/advanced/components/AdvancedSingleReferenceField.js.map +1 -1
  277. package/admin/plugins/fieldRenderers/ref/advanced/components/Entries.js +3 -1
  278. package/admin/plugins/fieldRenderers/ref/advanced/components/Entry.js +3 -1
  279. package/admin/plugins/fieldRenderers/ref/advanced/components/Loader.js +3 -1
  280. package/admin/plugins/fieldRenderers/ref/advanced/components/Options.js +3 -1
  281. package/admin/plugins/fieldRenderers/ref/advanced/components/ReferencesDialog.js +3 -1
  282. package/admin/plugins/fieldRenderers/ref/advanced/components/Search.js +3 -1
  283. package/admin/plugins/fieldRenderers/ref/advanced/components/entry/Box.js +3 -1
  284. package/admin/plugins/fieldRenderers/ref/advanced/components/entry/CreatedBy.js +3 -1
  285. package/admin/plugins/fieldRenderers/ref/advanced/components/entry/Description.js +3 -1
  286. package/admin/plugins/fieldRenderers/ref/advanced/components/entry/Image.js +3 -1
  287. package/admin/plugins/fieldRenderers/ref/advanced/components/entry/ModelName.js +3 -1
  288. package/admin/plugins/fieldRenderers/ref/advanced/components/entry/ModifiedBy.js +3 -1
  289. package/admin/plugins/fieldRenderers/ref/advanced/components/entry/MoveDown.js +3 -1
  290. package/admin/plugins/fieldRenderers/ref/advanced/components/entry/MoveUp.js +3 -1
  291. package/admin/plugins/fieldRenderers/ref/advanced/components/entry/Remove.js +3 -1
  292. package/admin/plugins/fieldRenderers/ref/advanced/components/entry/Select.js +3 -1
  293. package/admin/plugins/fieldRenderers/ref/advanced/components/entry/Status.js +3 -1
  294. package/admin/plugins/fieldRenderers/ref/advanced/components/entry/Title.js +3 -1
  295. package/admin/plugins/fieldRenderers/ref/advanced/components/entry/View.js +3 -1
  296. package/admin/plugins/fieldRenderers/ref/advanced/components/entry/elements/ButtonLink.js +3 -1
  297. package/admin/plugins/fieldRenderers/ref/advanced/components/options/OptionsModelList.js +3 -1
  298. package/admin/plugins/fieldRenderers/ref/advanced/components/options/OptionsModelListItem.js +3 -1
  299. package/admin/plugins/fieldRenderers/ref/advanced/detailedReferenceRenderer.js +3 -1
  300. package/admin/plugins/fieldRenderers/ref/advanced/detailedReferencesRenderer.js +3 -1
  301. package/admin/plugins/fieldRenderers/ref/advanced/hooks/graphql.js +3 -1
  302. package/admin/plugins/fieldRenderers/ref/advanced/hooks/useEntries.js +3 -1
  303. package/admin/plugins/fieldRenderers/ref/advanced/hooks/useReferences.js +3 -1
  304. package/admin/plugins/fieldRenderers/ref/advanced/index.js +3 -1
  305. package/admin/plugins/fieldRenderers/ref/components/ContentEntriesAutocomplete.js +3 -1
  306. package/admin/plugins/fieldRenderers/ref/components/ContentEntriesMultiAutoComplete.js +3 -1
  307. package/admin/plugins/fieldRenderers/ref/components/EntryStatus.js +3 -1
  308. package/admin/plugins/fieldRenderers/ref/components/MissingEntryHelpText.js +3 -1
  309. package/admin/plugins/fieldRenderers/ref/components/NewEntryButton.js +3 -1
  310. package/admin/plugins/fieldRenderers/ref/components/NewReferencedEntryDialog.js +3 -1
  311. package/admin/plugins/fieldRenderers/ref/components/createEntryUrl.js +3 -1
  312. package/admin/plugins/fieldRenderers/ref/components/dialog/Dialog.js +3 -1
  313. package/admin/plugins/fieldRenderers/ref/components/dialog/DialogHeader.js +3 -1
  314. package/admin/plugins/fieldRenderers/ref/components/graphql.js +3 -1
  315. package/admin/plugins/fieldRenderers/ref/components/helpers.js +3 -1
  316. package/admin/plugins/fieldRenderers/ref/components/renderItem.js +3 -1
  317. package/admin/plugins/fieldRenderers/ref/components/types.js +3 -1
  318. package/admin/plugins/fieldRenderers/ref/components/useReference.js +3 -1
  319. package/admin/plugins/fieldRenderers/ref/components/useReferences.js +3 -1
  320. package/admin/plugins/fieldRenderers/ref/hooks/useNewRefEntry.js +3 -1
  321. package/admin/plugins/fieldRenderers/ref/index.js +3 -1
  322. package/admin/plugins/fieldRenderers/ref/refInput.js +3 -1
  323. package/admin/plugins/fieldRenderers/ref/refInputs.js +3 -1
  324. package/admin/plugins/fieldRenderers/ref/simple/components/SimpleItems.js +3 -1
  325. package/admin/plugins/fieldRenderers/ref/simple/components/SimpleMultipleRenderer.js +3 -1
  326. package/admin/plugins/fieldRenderers/ref/simple/components/SimpleSingleRenderer.js +3 -1
  327. package/admin/plugins/fieldRenderers/ref/simple/components/useContentModels.js +3 -1
  328. package/admin/plugins/fieldRenderers/ref/simple/components/useReferences.js +3 -1
  329. package/admin/plugins/fieldRenderers/ref/simple/index.js +3 -1
  330. package/admin/plugins/fieldRenderers/ref/simple/simpleMultipleRenderer.js +3 -1
  331. package/admin/plugins/fieldRenderers/ref/simple/simpleSingleRenderer.js +3 -1
  332. package/admin/plugins/fieldRenderers/richText/index.js +3 -1
  333. package/admin/plugins/fieldRenderers/richText/richTextInput.js +3 -1
  334. package/admin/plugins/fieldRenderers/richText/richTextInputs.js +3 -1
  335. package/admin/plugins/fieldRenderers/richText/utils.js +3 -1
  336. package/admin/plugins/fieldRenderers/select.js +3 -1
  337. package/admin/plugins/fieldRenderers/text/index.js +3 -1
  338. package/admin/plugins/fieldRenderers/text/textInput.js +3 -1
  339. package/admin/plugins/fieldRenderers/text/textInputs.js +3 -1
  340. package/admin/plugins/fieldValidators/date/availableValidators.js +3 -1
  341. package/admin/plugins/fieldValidators/date/createDateInputField.js +3 -1
  342. package/admin/plugins/fieldValidators/dateGte.js +3 -1
  343. package/admin/plugins/fieldValidators/dateLte.js +3 -1
  344. package/admin/plugins/fieldValidators/dynamicZone.js +3 -1
  345. package/admin/plugins/fieldValidators/gte.js +3 -1
  346. package/admin/plugins/fieldValidators/in.js +3 -1
  347. package/admin/plugins/fieldValidators/lte.js +3 -1
  348. package/admin/plugins/fieldValidators/maxLength.js +3 -1
  349. package/admin/plugins/fieldValidators/minLength.js +3 -1
  350. package/admin/plugins/fieldValidators/pattern.js +3 -1
  351. package/admin/plugins/fieldValidators/patternPlugins/email.js +3 -1
  352. package/admin/plugins/fieldValidators/patternPlugins/lowerCase.js +3 -1
  353. package/admin/plugins/fieldValidators/patternPlugins/lowerCaseSpace.js +3 -1
  354. package/admin/plugins/fieldValidators/patternPlugins/upperCase.js +3 -1
  355. package/admin/plugins/fieldValidators/patternPlugins/upperCaseSpace.js +3 -1
  356. package/admin/plugins/fieldValidators/patternPlugins/url.js +3 -1
  357. package/admin/plugins/fieldValidators/required.js +3 -1
  358. package/admin/plugins/fieldValidators/unique.js +3 -1
  359. package/admin/plugins/fields/PredefinedValuesDynamicFieldset.js +3 -1
  360. package/admin/plugins/fields/boolean.js +3 -1
  361. package/admin/plugins/fields/dateTime.js +3 -1
  362. package/admin/plugins/fields/dynamicZone/AddTemplate.js +3 -1
  363. package/admin/plugins/fields/dynamicZone/DynamicZone.js +3 -1
  364. package/admin/plugins/fields/dynamicZone/DynamicZoneTemplate.js +3 -1
  365. package/admin/plugins/fields/dynamicZone/TemplateDialog.js +3 -1
  366. package/admin/plugins/fields/dynamicZone/commonValidators.js +3 -1
  367. package/admin/plugins/fields/dynamicZone.js +14 -9
  368. package/admin/plugins/fields/dynamicZone.js.map +1 -1
  369. package/admin/plugins/fields/file.js +3 -1
  370. package/admin/plugins/fields/longText.js +3 -1
  371. package/admin/plugins/fields/number.js +3 -1
  372. package/admin/plugins/fields/object/ObjectFields.js +3 -1
  373. package/admin/plugins/fields/object.js +11 -8
  374. package/admin/plugins/fields/object.js.map +1 -1
  375. package/admin/plugins/fields/ref/graphql.js +3 -1
  376. package/admin/plugins/fields/ref/renderInfo.js +3 -1
  377. package/admin/plugins/fields/ref.js +3 -1
  378. package/admin/plugins/fields/richText.js +3 -1
  379. package/admin/plugins/fields/text.js +3 -1
  380. package/admin/plugins/getObjectId.js +3 -1
  381. package/admin/plugins/icons.js +3 -1
  382. package/admin/plugins/index.d.ts +2 -2
  383. package/admin/plugins/index.js +3 -1
  384. package/admin/plugins/install.js +17 -21
  385. package/admin/plugins/install.js.map +1 -1
  386. package/admin/plugins/permissionRenderer/CmsPermissions.js +3 -1
  387. package/admin/plugins/permissionRenderer/components/ContentEntryPermission.js +3 -1
  388. package/admin/plugins/permissionRenderer/components/ContentModelGroupPermission.js +3 -1
  389. package/admin/plugins/permissionRenderer/components/ContentModelList.js +3 -1
  390. package/admin/plugins/permissionRenderer/components/ContentModelPermission.js +3 -1
  391. package/admin/plugins/permissionRenderer/components/PermissionRendererWrapper.js +3 -1
  392. package/admin/plugins/permissionRenderer/components/PermissionSelector.js +3 -1
  393. package/admin/plugins/permissionRenderer/components/StyledComponents.js +3 -1
  394. package/admin/plugins/permissionRenderer/components/types.js +3 -1
  395. package/admin/plugins/permissionRenderer/components/useCmsData.js +3 -1
  396. package/admin/plugins/permissionRenderer/index.js +3 -1
  397. package/admin/plugins/routes.js +3 -1
  398. package/admin/plugins/routes.js.map +1 -1
  399. package/admin/plugins/transformers/dateTransformer.js +3 -2
  400. package/admin/plugins/transformers/dateTransformer.js.map +1 -1
  401. package/admin/plugins/transformers/dynamicZoneTransformer.js +6 -5
  402. package/admin/plugins/transformers/dynamicZoneTransformer.js.map +1 -1
  403. package/admin/plugins/transformers/index.js +5 -2
  404. package/admin/plugins/transformers/index.js.map +1 -1
  405. package/admin/plugins/transformers/numberTransformer.js +11 -2
  406. package/admin/plugins/transformers/numberTransformer.js.map +1 -1
  407. package/admin/plugins/transformers/objectTransformer.d.ts +2 -0
  408. package/admin/plugins/transformers/objectTransformer.js +25 -0
  409. package/admin/plugins/transformers/objectTransformer.js.map +1 -0
  410. package/admin/plugins/welcomeScreenWidget.js +3 -1
  411. package/admin/views/contentEntries/ContentEntries.js +3 -1
  412. package/admin/views/contentEntries/ContentEntriesContainer.js +3 -1
  413. package/admin/views/contentEntries/ContentEntriesContext.js +3 -1
  414. package/admin/views/contentEntries/ContentEntriesModule.js +16 -1
  415. package/admin/views/contentEntries/ContentEntriesModule.js.map +1 -1
  416. package/admin/views/contentEntries/ContentEntry/ContentEntryContext.d.ts +2 -1
  417. package/admin/views/contentEntries/ContentEntry/ContentEntryContext.js +3 -1
  418. package/admin/views/contentEntries/ContentEntry/ContentEntryContext.js.map +1 -1
  419. package/admin/views/contentEntries/ContentEntry/PublishEntryRevisionListItem.js +3 -1
  420. package/admin/views/contentEntries/ContentEntry/RevisionListItem.js +4 -2
  421. package/admin/views/contentEntries/ContentEntry/RevisionListItem.js.map +1 -1
  422. package/admin/views/contentEntries/ContentEntry/RevisionsList.js +3 -1
  423. package/admin/views/contentEntries/ContentEntry/useRevision.js +3 -1
  424. package/admin/views/contentEntries/ContentEntry.js +3 -1
  425. package/admin/views/contentEntries/Table/Main.js +8 -3
  426. package/admin/views/contentEntries/Table/Main.js.map +1 -1
  427. package/admin/views/contentEntries/Table/Sidebar.js +3 -1
  428. package/admin/views/contentEntries/Table/index.js +5 -2
  429. package/admin/views/contentEntries/Table/index.js.map +1 -1
  430. package/admin/views/contentEntries/Table/styled.js +3 -1
  431. package/admin/views/contentEntries/hooks/index.js +3 -1
  432. package/admin/views/contentEntries/hooks/useContentEntries.js +3 -1
  433. package/admin/views/contentEntries/hooks/useContentEntriesList.d.ts +13 -2
  434. package/admin/views/contentEntries/hooks/useContentEntriesList.js +37 -8
  435. package/admin/views/contentEntries/hooks/useContentEntriesList.js.map +1 -1
  436. package/admin/views/contentEntries/hooks/useContentEntry.js +3 -1
  437. package/admin/views/contentEntries/hooks/useMoveContentEntryToFolder.js +3 -1
  438. package/admin/views/contentModelGroups/ContentModelGroups.js +3 -1
  439. package/admin/views/contentModelGroups/ContentModelGroupsDataList.js +3 -1
  440. package/admin/views/contentModelGroups/ContentModelGroupsForm.js +3 -1
  441. package/admin/views/contentModelGroups/graphql.js +3 -1
  442. package/admin/views/contentModels/CloneContentModelDialog.js +3 -1
  443. package/admin/views/contentModels/ContentModelEditor.js +3 -1
  444. package/admin/views/contentModels/ContentModels.js +19 -3
  445. package/admin/views/contentModels/ContentModels.js.map +1 -1
  446. package/admin/views/contentModels/ContentModelsDataList.d.ts +1 -0
  447. package/admin/views/contentModels/ContentModelsDataList.js +46 -13
  448. package/admin/views/contentModels/ContentModelsDataList.js.map +1 -1
  449. package/admin/views/contentModels/NewContentModelDialog.js +3 -1
  450. package/admin/views/contentModels/OptionsMenu.d.ts +13 -0
  451. package/admin/views/contentModels/OptionsMenu.js +50 -0
  452. package/admin/views/contentModels/OptionsMenu.js.map +1 -0
  453. package/admin/views/contentModels/cache.js +3 -1
  454. package/admin/views/contentModels/exporting/download.d.ts +7 -0
  455. package/admin/views/contentModels/exporting/download.js +32 -0
  456. package/admin/views/contentModels/exporting/download.js.map +1 -0
  457. package/admin/views/contentModels/exporting/graphql.d.ts +1 -0
  458. package/admin/views/contentModels/exporting/graphql.js +14 -0
  459. package/admin/views/contentModels/exporting/graphql.js.map +1 -0
  460. package/admin/views/contentModels/exporting/runExport.d.ts +16 -0
  461. package/admin/views/contentModels/exporting/runExport.js +95 -0
  462. package/admin/views/contentModels/exporting/runExport.js.map +1 -0
  463. package/admin/views/contentModels/exporting/useModelExport.d.ts +5 -0
  464. package/admin/views/contentModels/exporting/useModelExport.js +65 -0
  465. package/admin/views/contentModels/exporting/useModelExport.js.map +1 -0
  466. package/admin/views/contentModels/helpers/apiNameValidator.js +3 -1
  467. package/admin/views/contentModels/helpers/nameValidator.js +3 -1
  468. package/admin/views/contentModels/importing/ImportContentModelsDialog.d.ts +5 -0
  469. package/admin/views/contentModels/importing/ImportContentModelsDialog.js +55 -0
  470. package/admin/views/contentModels/importing/ImportContentModelsDialog.js.map +1 -0
  471. package/admin/views/contentModels/importing/ImportContext.d.ts +58 -0
  472. package/admin/views/contentModels/importing/ImportContext.js +495 -0
  473. package/admin/views/contentModels/importing/ImportContext.js.map +1 -0
  474. package/admin/views/contentModels/importing/components/DataList.d.ts +2 -0
  475. package/admin/views/contentModels/importing/components/DataList.js +36 -0
  476. package/admin/views/contentModels/importing/components/DataList.js.map +1 -0
  477. package/admin/views/contentModels/importing/components/DataListGroup.d.ts +8 -0
  478. package/admin/views/contentModels/importing/components/DataListGroup.js +42 -0
  479. package/admin/views/contentModels/importing/components/DataListGroup.js.map +1 -0
  480. package/admin/views/contentModels/importing/components/Errors.d.ts +8 -0
  481. package/admin/views/contentModels/importing/components/Errors.js +50 -0
  482. package/admin/views/contentModels/importing/components/Errors.js.map +1 -0
  483. package/admin/views/contentModels/importing/components/FileUpload.d.ts +2 -0
  484. package/admin/views/contentModels/importing/components/FileUpload.js +75 -0
  485. package/admin/views/contentModels/importing/components/FileUpload.js.map +1 -0
  486. package/admin/views/contentModels/importing/components/ImportButton.d.ts +8 -0
  487. package/admin/views/contentModels/importing/components/ImportButton.js +26 -0
  488. package/admin/views/contentModels/importing/components/ImportButton.js.map +1 -0
  489. package/admin/views/contentModels/importing/components/Model/DataListInstructions.d.ts +2 -0
  490. package/admin/views/contentModels/importing/components/Model/DataListInstructions.js +24 -0
  491. package/admin/views/contentModels/importing/components/Model/DataListInstructions.js.map +1 -0
  492. package/admin/views/contentModels/importing/components/Model/DataListModelItem.d.ts +10 -0
  493. package/admin/views/contentModels/importing/components/Model/DataListModelItem.js +160 -0
  494. package/admin/views/contentModels/importing/components/Model/DataListModelItem.js.map +1 -0
  495. package/admin/views/contentModels/importing/components/Model/DataListModelItemError.d.ts +7 -0
  496. package/admin/views/contentModels/importing/components/Model/DataListModelItemError.js +75 -0
  497. package/admin/views/contentModels/importing/components/Model/DataListModelItemError.js.map +1 -0
  498. package/admin/views/contentModels/importing/components/Model/DataListModelItemInfo.d.ts +7 -0
  499. package/admin/views/contentModels/importing/components/Model/DataListModelItemInfo.js +37 -0
  500. package/admin/views/contentModels/importing/components/Model/DataListModelItemInfo.js.map +1 -0
  501. package/admin/views/contentModels/importing/components/Model/DataListModels.d.ts +7 -0
  502. package/admin/views/contentModels/importing/components/Model/DataListModels.js +37 -0
  503. package/admin/views/contentModels/importing/components/Model/DataListModels.js.map +1 -0
  504. package/admin/views/contentModels/importing/components/Model/index.d.ts +1 -0
  505. package/admin/views/contentModels/importing/components/Model/index.js +18 -0
  506. package/admin/views/contentModels/importing/components/Model/index.js.map +1 -0
  507. package/admin/views/contentModels/importing/graphql.d.ts +46 -0
  508. package/admin/views/contentModels/importing/graphql.js +17 -0
  509. package/admin/views/contentModels/importing/graphql.js.map +1 -0
  510. package/admin/views/contentModels/importing/types.d.ts +50 -0
  511. package/admin/views/contentModels/importing/types.js +16 -0
  512. package/admin/views/contentModels/importing/types.js.map +1 -0
  513. package/admin/views/contentModels/importing/useImport.d.ts +1 -0
  514. package/admin/views/contentModels/importing/useImport.js +19 -0
  515. package/admin/views/contentModels/importing/useImport.js.map +1 -0
  516. package/admin/views/contentModels/types.js +3 -1
  517. package/admin/views/utils.js +3 -1
  518. package/admin/viewsGraphql.js +3 -1
  519. package/allPlugins.d.ts +2 -2
  520. package/allPlugins.js +3 -1
  521. package/index.d.ts +1 -0
  522. package/index.js +11 -1
  523. package/index.js.map +1 -1
  524. package/package.json +29 -24
  525. package/types.js +3 -1
  526. package/utils/CmsModelFieldValidatorConfigAdapter.js +3 -1
  527. package/utils/acoRecordTransform.js +5 -1
  528. package/utils/acoRecordTransform.js.map +1 -1
  529. package/utils/allowCmsLegacyRichTextInput.js +3 -1
  530. package/utils/createTypeName.js +3 -1
  531. package/utils/createValidators.js +8 -1
  532. package/utils/createValidators.js.map +1 -1
  533. package/utils/getFetchPolicy.js +3 -1
  534. package/utils/getModelTitleFieldId.js +3 -1
  535. package/admin/graphql/createFieldsList.d.ts +0 -7
  536. package/admin/graphql/createFieldsList.js +0 -33
  537. package/admin/graphql/createFieldsList.js.map +0 -1
  538. package/admin/views/contentEntries/ContentEntry/prepareFormData.d.ts +0 -2
  539. package/admin/views/contentEntries/ContentEntry/prepareFormData.js +0 -115
  540. package/admin/views/contentEntries/ContentEntry/prepareFormData.js.map +0 -1
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+
3
+ var _interopRequireWildcard = require("@babel/runtime/helpers/interopRequireWildcard").default;
4
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.BulkAction = exports.BaseBulkAction = void 0;
9
+ var _regeneratorRuntime2 = _interopRequireDefault(require("@babel/runtime/helpers/regeneratorRuntime"));
10
+ var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
11
+ var _react = _interopRequireWildcard(require("react"));
12
+ var _appAdmin = require("@webiny/app-admin");
13
+ var _reactProperties = require("@webiny/react-properties");
14
+ var _hooks = require("../../../../hooks");
15
+ var BaseBulkAction = function BaseBulkAction(_ref) {
16
+ var name = _ref.name,
17
+ _ref$after = _ref.after,
18
+ after = _ref$after === void 0 ? undefined : _ref$after,
19
+ _ref$before = _ref.before,
20
+ before = _ref$before === void 0 ? undefined : _ref$before,
21
+ _ref$remove = _ref.remove,
22
+ remove = _ref$remove === void 0 ? false : _ref$remove,
23
+ _ref$modelIds = _ref.modelIds,
24
+ modelIds = _ref$modelIds === void 0 ? [] : _ref$modelIds,
25
+ element = _ref.element;
26
+ var _useModel = (0, _hooks.useModel)(),
27
+ model = _useModel.model;
28
+ var getId = (0, _reactProperties.useIdGenerator)("bulkAction");
29
+ if (modelIds.length > 0 && !modelIds.includes(model.modelId)) {
30
+ return null;
31
+ }
32
+ var placeAfter = after !== undefined ? getId(after) : undefined;
33
+ var placeBefore = before !== undefined ? getId(before) : undefined;
34
+ return /*#__PURE__*/_react.default.createElement(_reactProperties.Property, {
35
+ id: "browser",
36
+ name: "browser"
37
+ }, /*#__PURE__*/_react.default.createElement(_reactProperties.Property, {
38
+ id: getId(name),
39
+ name: "bulkActions",
40
+ remove: remove,
41
+ array: true,
42
+ before: placeBefore,
43
+ after: placeAfter
44
+ }, /*#__PURE__*/_react.default.createElement(_reactProperties.Property, {
45
+ id: getId(name, "name"),
46
+ name: "name",
47
+ value: name
48
+ }), /*#__PURE__*/_react.default.createElement(_reactProperties.Property, {
49
+ id: getId(name, "element"),
50
+ name: "element",
51
+ value: element
52
+ })));
53
+ };
54
+ exports.BaseBulkAction = BaseBulkAction;
55
+ var useWorker = function useWorker() {
56
+ var _useContentEntriesLis = (0, _hooks.useContentEntriesList)(),
57
+ selected = _useContentEntriesLis.selected,
58
+ setSelected = _useContentEntriesLis.setSelected;
59
+ var _useRef = (0, _react.useRef)(new _appAdmin.Worker()),
60
+ worker = _useRef.current;
61
+ (0, _react.useEffect)(function () {
62
+ worker.items = selected;
63
+ }, [selected.length]);
64
+
65
+ // Reset selected items in both useContentEntriesList and Worker
66
+ var resetItems = (0, _react.useCallback)(function () {
67
+ worker.items = [];
68
+ setSelected([]);
69
+ }, []);
70
+ return {
71
+ items: selected,
72
+ process: function process(callback) {
73
+ return worker.process(callback);
74
+ },
75
+ processInSeries: function () {
76
+ var _processInSeries = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee(callback, chunkSize) {
77
+ return (0, _regeneratorRuntime2.default)().wrap(function _callee$(_context) {
78
+ while (1) switch (_context.prev = _context.next) {
79
+ case 0:
80
+ return _context.abrupt("return", worker.processInSeries(callback, chunkSize));
81
+ case 1:
82
+ case "end":
83
+ return _context.stop();
84
+ }
85
+ }, _callee);
86
+ }));
87
+ function processInSeries(_x, _x2) {
88
+ return _processInSeries.apply(this, arguments);
89
+ }
90
+ return processInSeries;
91
+ }(),
92
+ resetItems: resetItems,
93
+ results: worker.results
94
+ };
95
+ };
96
+ var BulkAction = Object.assign(BaseBulkAction, {
97
+ useButtons: _appAdmin.useButtons,
98
+ useWorker: useWorker,
99
+ useDialog: _appAdmin.useDialogWithReport
100
+ });
101
+ exports.BulkAction = BulkAction;
102
+
103
+ //# sourceMappingURL=BulkAction.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_appAdmin","_reactProperties","_hooks","BaseBulkAction","_ref","name","_ref$after","after","undefined","_ref$before","before","_ref$remove","remove","_ref$modelIds","modelIds","element","_useModel","useModel","model","getId","useIdGenerator","length","includes","modelId","placeAfter","placeBefore","default","createElement","Property","id","array","value","exports","useWorker","_useContentEntriesLis","useContentEntriesList","selected","setSelected","_useRef","useRef","Worker","worker","current","useEffect","items","resetItems","useCallback","process","callback","processInSeries","_processInSeries","_asyncToGenerator2","_regeneratorRuntime2","mark","_callee","chunkSize","wrap","_callee$","_context","prev","next","abrupt","stop","_x","_x2","apply","arguments","results","BulkAction","Object","assign","useButtons","useDialog","useDialogWithReport"],"sources":["BulkAction.tsx"],"sourcesContent":["import React, { useCallback, useEffect, useRef } from \"react\";\nimport { CallbackParams, useButtons, useDialogWithReport, Worker } from \"@webiny/app-admin\";\nimport { Property, useIdGenerator } from \"@webiny/react-properties\";\nimport { useContentEntriesList, useModel } from \"~/admin/hooks\";\nimport { CmsContentEntry } from \"@webiny/app-headless-cms-common/types\";\n\nexport interface BulkActionConfig {\n name: string;\n element: React.ReactElement;\n}\n\nexport interface BulkActionProps {\n name: string;\n remove?: boolean;\n before?: string;\n after?: string;\n modelIds?: string[];\n element: React.ReactElement;\n}\n\nexport const BaseBulkAction: React.FC<BulkActionProps> = ({\n name,\n after = undefined,\n before = undefined,\n remove = false,\n modelIds = [],\n element\n}) => {\n const { model } = useModel();\n const getId = useIdGenerator(\"bulkAction\");\n\n if (modelIds.length > 0 && !modelIds.includes(model.modelId)) {\n return null;\n }\n\n const placeAfter = after !== undefined ? getId(after) : undefined;\n const placeBefore = before !== undefined ? getId(before) : undefined;\n\n return (\n <Property id=\"browser\" name={\"browser\"}>\n <Property\n id={getId(name)}\n name={\"bulkActions\"}\n remove={remove}\n array={true}\n before={placeBefore}\n after={placeAfter}\n >\n <Property id={getId(name, \"name\")} name={\"name\"} value={name} />\n <Property id={getId(name, \"element\")} name={\"element\"} value={element} />\n </Property>\n </Property>\n );\n};\n\nconst useWorker = () => {\n const { selected, setSelected } = useContentEntriesList();\n const { current: worker } = useRef(new Worker<CmsContentEntry>());\n\n useEffect(() => {\n worker.items = selected;\n }, [selected.length]);\n\n // Reset selected items in both useContentEntriesList and Worker\n const resetItems = useCallback(() => {\n worker.items = [];\n setSelected([]);\n }, []);\n\n return {\n items: selected,\n process: (callback: (items: CmsContentEntry[]) => void) => worker.process(callback),\n processInSeries: async (\n callback: ({\n item,\n allItems,\n report\n }: CallbackParams<CmsContentEntry>) => Promise<void>,\n chunkSize?: number\n ) => worker.processInSeries(callback, chunkSize),\n resetItems: resetItems,\n results: worker.results\n };\n};\n\nexport const BulkAction = Object.assign(BaseBulkAction, {\n useButtons,\n useWorker,\n useDialog: useDialogWithReport\n});\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,gBAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAiBO,IAAMI,cAAyC,GAAG,SAA5CA,cAAyCA,CAAAC,IAAA,EAOhD;EAAA,IANFC,IAAI,GAAAD,IAA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e;MAAA,IAAAC,gBAAA,OAAAC,kBAAA,CAAAzB,OAAA,oBAAA0B,oBAAA,CAAA1B,OAAA,IAAA2B,IAAA,CAAE,SAAAC,QACbN,QAIoD,EACpDO,SAAkB;QAAA,WAAAH,oBAAA,CAAA1B,OAAA,IAAA8B,IAAA,UAAAC,SAAAC,QAAA;UAAA,kBAAAA,QAAA,CAAAC,IAAA,GAAAD,QAAA,CAAAE,IAAA;YAAA;cAAA,OAAAF,QAAA,CAAAG,MAAA,WACjBpB,MAAM,CAACQ,eAAe,CAACD,QAAQ,EAAEO,SAAS,CAAC;YAAA;YAAA;cAAA,OAAAG,QAAA,CAAAI,IAAA;UAAA;QAAA,GAAAR,OAAA;MAAA;MAAA,SAAAL,gBAAAc,EAAA,EAAAC,GAAA;QAAA,OAAAd,gBAAA,CAAAe,KAAA,OAAAC,SAAA;MAAA;MAAA,OAAAjB,eAAA;IAAA;IAChDJ,UAAU,EAAEA,UAAU;IACtBsB,OAAO,EAAE1B,MAAM,CAAC0B;EACpB,CAAC;AACL,CAAC;AAEM,IAAMC,UAAU,GAAGC,MAAM,CAACC,MAAM,CAACnE,cAAc,EAAE;EACpDoE,UAAU,EAAVA,oBAAU;EACVtC,SAAS,EAATA,SAAS;EACTuC,SAAS,EAAEC;AACf,CAAC,CAAC;AAACzC,OAAA,CAAAoC,UAAA,GAAAA,UAAA"}
@@ -63,4 +63,6 @@ var createDecorator = (0, _reactComposition.createDecoratorFactory)()(BaseFilter
63
63
  var Filter = Object.assign(BaseFilter, {
64
64
  createDecorator: createDecorator
65
65
  });
66
- exports.Filter = Filter;
66
+ exports.Filter = Filter;
67
+
68
+ //# sourceMappingURL=Filter.js.map
@@ -26,4 +26,6 @@ var FiltersToWhere = function FiltersToWhere(_ref) {
26
26
  value: converter
27
27
  }));
28
28
  };
29
- exports.FiltersToWhere = FiltersToWhere;
29
+ exports.FiltersToWhere = FiltersToWhere;
30
+
31
+ //# sourceMappingURL=FiltersToWhere.js.map
@@ -1,11 +1,24 @@
1
1
  /// <reference types="react" />
2
+ import { BulkActionConfig } from "./BulkAction";
2
3
  import { FilterConfig } from "./Filter";
3
4
  import { FiltersToWhereConverter } from "./FiltersToWhere";
4
5
  export interface BrowserConfig {
6
+ bulkActions: BulkActionConfig[];
5
7
  filters: FilterConfig[];
6
8
  filtersToWhere: FiltersToWhereConverter[];
7
9
  }
8
10
  export declare const Browser: {
11
+ BulkAction: import("react").FC<import("./BulkAction").BulkActionProps> & {
12
+ useButtons: () => import("@webiny/app-admin/components/Buttons/useButtons").ButtonsProviderContext;
13
+ useWorker: () => {
14
+ items: import("@webiny/app-headless-cms-common/types").CmsContentEntry[];
15
+ process: (callback: (items: import("@webiny/app-headless-cms-common/types").CmsContentEntry[]) => void) => void;
16
+ processInSeries: (callback: ({ item, allItems, report }: import("@webiny/app-admin").CallbackParams<import("@webiny/app-headless-cms-common/types").CmsContentEntry>) => Promise<void>, chunkSize?: number | undefined) => Promise<void>;
17
+ resetItems: () => void;
18
+ results: import("@webiny/app-admin").Result[];
19
+ };
20
+ useDialog: () => import("@webiny/app-admin").UseDialogWithReportResponse;
21
+ };
9
22
  Filter: import("@webiny/react-composition").ComposableFC<import("./Filter").FilterProps> & {
10
23
  createDecorator: (decorator: import("@webiny/react-composition").Decorator<import("./Filter").FilterProps>) => (props: import("./Filter").CreateDecoratorParams) => JSX.Element;
11
24
  };
@@ -4,10 +4,14 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.Browser = void 0;
7
+ var _BulkAction = require("./BulkAction");
7
8
  var _Filter = require("./Filter");
8
9
  var _FiltersToWhere = require("./FiltersToWhere");
9
10
  var Browser = {
11
+ BulkAction: _BulkAction.BulkAction,
10
12
  Filter: _Filter.Filter,
11
13
  FiltersToWhere: _FiltersToWhere.FiltersToWhere
12
14
  };
13
- exports.Browser = Browser;
15
+ exports.Browser = Browser;
16
+
17
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_Filter","require","_FiltersToWhere","Browser","Filter","FiltersToWhere","exports"],"sources":["index.ts"],"sourcesContent":["import { Filter, FilterConfig } from \"./Filter\";\nimport { FiltersToWhere, FiltersToWhereConverter } from \"./FiltersToWhere\";\n\nexport interface BrowserConfig {\n filters: FilterConfig[];\n filtersToWhere: FiltersToWhereConverter[];\n}\n\nexport const Browser = {\n Filter,\n FiltersToWhere\n};\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AAOO,IAAME,OAAO,GAAG;EACnBC,MAAM,EAANA,cAAM;EACNC,cAAc,EAAdA;AACJ,CAAC;AAACC,OAAA,CAAAH,OAAA,GAAAA,OAAA"}
1
+ {"version":3,"names":["_BulkAction","require","_Filter","_FiltersToWhere","Browser","BulkAction","Filter","FiltersToWhere","exports"],"sources":["index.ts"],"sourcesContent":["import { BulkAction, BulkActionConfig } from \"./BulkAction\";\nimport { Filter, FilterConfig } from \"./Filter\";\nimport { FiltersToWhere, FiltersToWhereConverter } from \"./FiltersToWhere\";\n\nexport interface BrowserConfig {\n bulkActions: BulkActionConfig[];\n filters: FilterConfig[];\n filtersToWhere: FiltersToWhereConverter[];\n}\n\nexport const Browser = {\n BulkAction,\n Filter,\n FiltersToWhere\n};\n"],"mappings":";;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AAQO,IAAMG,OAAO,GAAG;EACnBC,UAAU,EAAVA,sBAAU;EACVC,MAAM,EAANA,cAAM;EACNC,cAAc,EAAdA;AACJ,CAAC;AAACC,OAAA,CAAAJ,OAAA,GAAAA,OAAA"}
@@ -3,6 +3,17 @@ export declare const ContentEntryListConfig: (({ children }: {
3
3
  children: import("react").ReactNode;
4
4
  }) => JSX.Element) & {
5
5
  Browser: {
6
+ BulkAction: import("react").FC<import("./Browser/BulkAction").BulkActionProps> & {
7
+ useButtons: () => import("@webiny/app-admin/components/Buttons/useButtons").ButtonsProviderContext;
8
+ useWorker: () => {
9
+ items: import("@webiny/app-headless-cms-common/types").CmsContentEntry[];
10
+ process: (callback: (items: import("@webiny/app-headless-cms-common/types").CmsContentEntry[]) => void) => void;
11
+ processInSeries: (callback: ({ item, allItems, report }: import("@webiny/app-admin").CallbackParams<import("@webiny/app-headless-cms-common/types").CmsContentEntry>) => Promise<void>, chunkSize?: number | undefined) => Promise<void>;
12
+ resetItems: () => void;
13
+ results: import("@webiny/app-admin").Result[];
14
+ };
15
+ useDialog: () => import("@webiny/app-admin").UseDialogWithReportResponse;
16
+ };
6
17
  Filter: import("@webiny/react-composition").ComposableFC<import("./Browser/Filter").FilterProps> & {
7
18
  createDecorator: (decorator: import("@webiny/react-composition").Decorator<import("./Browser/Filter").FilterProps>) => (props: import("./Browser/Filter").CreateDecoratorParams) => JSX.Element;
8
19
  };
@@ -12,6 +23,7 @@ export declare const ContentEntryListConfig: (({ children }: {
12
23
  export declare const ContentEntryListWithConfig: ({ onProperties, children }: import("@webiny/react-properties").WithConfigProps) => JSX.Element;
13
24
  export declare function useContentEntryListConfig(): {
14
25
  browser: {
26
+ bulkActions: import("./Browser/BulkAction").BulkActionConfig[];
15
27
  filters: import("./Browser/Filter").FilterConfig[];
16
28
  filtersToWhere: import("./Browser/FiltersToWhere").FiltersToWhereConverter[];
17
29
  };
@@ -24,9 +24,12 @@ function useContentEntryListConfig() {
24
24
  return (0, _react.useMemo)(function () {
25
25
  return {
26
26
  browser: (0, _objectSpread2.default)((0, _objectSpread2.default)({}, browser), {}, {
27
+ bulkActions: (0, _toConsumableArray2.default)(browser.bulkActions || []),
27
28
  filters: (0, _toConsumableArray2.default)(browser.filters || []),
28
29
  filtersToWhere: (0, _toConsumableArray2.default)(browser.filtersToWhere || [])
29
30
  })
30
31
  };
31
32
  }, [config]);
32
- }
33
+ }
34
+
35
+ //# sourceMappingURL=ContentEntryListConfig.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_reactProperties","_Browser","base","createConfigurableComponent","ContentEntryListConfig","Object","assign","Config","Browser","exports","ContentEntryListWithConfig","WithConfig","useContentEntryListConfig","config","useConfig","browser","useMemo","_objectSpread2","default","filters","_toConsumableArray2","filtersToWhere"],"sources":["ContentEntryListConfig.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport { createConfigurableComponent } from \"@webiny/react-properties\";\nimport { Browser, BrowserConfig } from \"./Browser\";\n\nconst base = createConfigurableComponent<ContentEntryListConfig>(\"ContentEntryListConfig\");\n\nexport const ContentEntryListConfig = Object.assign(base.Config, { Browser });\nexport const ContentEntryListWithConfig = base.WithConfig;\n\ninterface ContentEntryListConfig {\n browser: BrowserConfig;\n}\n\nexport function useContentEntryListConfig() {\n const config = base.useConfig();\n\n const browser = config.browser || {};\n\n return useMemo(\n () => ({\n browser: {\n ...browser,\n filters: [...(browser.filters || [])],\n filtersToWhere: [...(browser.filtersToWhere || [])]\n }\n }),\n [config]\n );\n}\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAEA,IAAMG,IAAI,GAAG,IAAAC,4CAA2B,EAAyB,wBAAwB,CAAC;AAEnF,IAAMC,sBAAsB,GAAGC,MAAM,CAACC,MAAM,CAACJ,IAAI,CAACK,MAAM,EAAE;EAAEC,OAAO,EAAPA;AAAQ,CAAC,CAAC;AAACC,OAAA,CAAAL,sBAAA,GAAAA,sBAAA;AACvE,IAAMM,0BAA0B,GAAGR,IAAI,CAACS,UAAU;AAACF,OAAA,CAAAC,0BAAA,GAAAA,0BAAA;AAMnD,SAASE,yBAAyBA,CAAA,EAAG;EACxC,IAAMC,MAAM,GAAGX,IAAI,CAACY,SAAS,CAAC,CAAC;EAE/B,IAAMC,OAAO,GAAGF,MAAM,CAACE,OAAO,IAAI,CAAC,CAAC;EAEpC,OAAO,IAAAC,cAAO,EACV;IAAA,OAAO;MACHD,OAAO,MAAAE,cAAA,CAAAC,OAAA,MAAAD,cAAA,CAAAC,OAAA,MACAH,OAAO;QACVI,OAAO,MAAAC,mBAAA,CAAAF,OAAA,EAAOH,OAAO,CAACI,OAAO,IAAI,EAAE,CAAE;QACrCE,cAAc,MAAAD,mBAAA,CAAAF,OAAA,EAAOH,OAAO,CAACM,cAAc,IAAI,EAAE;MAAE;IAE3D,CAAC;EAAA,CAAC,EACF,CAACR,MAAM,CACX,CAAC;AACL"}
1
+ {"version":3,"names":["_react","require","_reactProperties","_Browser","base","createConfigurableComponent","ContentEntryListConfig","Object","assign","Config","Browser","exports","ContentEntryListWithConfig","WithConfig","useContentEntryListConfig","config","useConfig","browser","useMemo","_objectSpread2","default","bulkActions","_toConsumableArray2","filters","filtersToWhere"],"sources":["ContentEntryListConfig.tsx"],"sourcesContent":["import { useMemo } from \"react\";\nimport { createConfigurableComponent } from \"@webiny/react-properties\";\nimport { Browser, BrowserConfig } from \"./Browser\";\n\nconst base = createConfigurableComponent<ContentEntryListConfig>(\"ContentEntryListConfig\");\n\nexport const ContentEntryListConfig = Object.assign(base.Config, { Browser });\nexport const ContentEntryListWithConfig = base.WithConfig;\n\ninterface ContentEntryListConfig {\n browser: BrowserConfig;\n}\n\nexport function useContentEntryListConfig() {\n const config = base.useConfig();\n\n const browser = config.browser || {};\n\n return useMemo(\n () => ({\n browser: {\n ...browser,\n bulkActions: [...(browser.bulkActions || [])],\n filters: [...(browser.filters || [])],\n filtersToWhere: [...(browser.filtersToWhere || [])]\n }\n }),\n [config]\n );\n}\n"],"mappings":";;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAD,OAAA;AACA,IAAAE,QAAA,GAAAF,OAAA;AAEA,IAAMG,IAAI,GAAG,IAAAC,4CAA2B,EAAyB,wBAAwB,CAAC;AAEnF,IAAMC,sBAAsB,GAAGC,MAAM,CAACC,MAAM,CAACJ,IAAI,CAACK,MAAM,EAAE;EAAEC,OAAO,EAAPA;AAAQ,CAAC,CAAC;AAACC,OAAA,CAAAL,sBAAA,GAAAA,sBAAA;AACvE,IAAMM,0BAA0B,GAAGR,IAAI,CAACS,UAAU;AAACF,OAAA,CAAAC,0BAAA,GAAAA,0BAAA;AAMnD,SAASE,yBAAyBA,CAAA,EAAG;EACxC,IAAMC,MAAM,GAAGX,IAAI,CAACY,SAAS,CAAC,CAAC;EAE/B,IAAMC,OAAO,GAAGF,MAAM,CAACE,OAAO,IAAI,CAAC,CAAC;EAEpC,OAAO,IAAAC,cAAO,EACV;IAAA,OAAO;MACHD,OAAO,MAAAE,cAAA,CAAAC,OAAA,MAAAD,cAAA,CAAAC,OAAA,MACAH,OAAO;QACVI,WAAW,MAAAC,mBAAA,CAAAF,OAAA,EAAOH,OAAO,CAACI,WAAW,IAAI,EAAE,CAAE;QAC7CE,OAAO,MAAAD,mBAAA,CAAAF,OAAA,EAAOH,OAAO,CAACM,OAAO,IAAI,EAAE,CAAE;QACrCC,cAAc,MAAAF,mBAAA,CAAAF,OAAA,EAAOH,OAAO,CAACO,cAAc,IAAI,EAAE;MAAE;IAE3D,CAAC;EAAA,CAAC,EACF,CAACT,MAAM,CACX,CAAC;AACL"}
@@ -13,4 +13,6 @@ Object.keys(_ContentEntryListConfig).forEach(function (key) {
13
13
  return _ContentEntryListConfig[key];
14
14
  }
15
15
  });
16
- });
16
+ });
17
+
18
+ //# sourceMappingURL=index.js.map
@@ -5,4 +5,6 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.FOLDER_TYPE = void 0;
7
7
  var FOLDER_TYPE = "CmsEntry";
8
- exports.FOLDER_TYPE = FOLDER_TYPE;
8
+ exports.FOLDER_TYPE = FOLDER_TYPE;
9
+
10
+ //# sourceMappingURL=folders.js.map
@@ -14,4 +14,6 @@ var statuses = {
14
14
  published: t(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["Published"]))),
15
15
  unpublished: t(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["Unpublished"])))
16
16
  };
17
- exports.statuses = statuses;
17
+ exports.statuses = statuses;
18
+
19
+ //# sourceMappingURL=statusLabels.js.map
@@ -14,4 +14,6 @@ var _constants = require("@webiny/app-aco/constants");
14
14
  var CMS_ENTRY_LIST_LINK = "/cms/content-entries";
15
15
  exports.CMS_ENTRY_LIST_LINK = CMS_ENTRY_LIST_LINK;
16
16
  var LOCAL_STORAGE_LATEST_VISITED_FOLDER = "webiny_cms_entry_latest_visited_folder";
17
- exports.LOCAL_STORAGE_LATEST_VISITED_FOLDER = LOCAL_STORAGE_LATEST_VISITED_FOLDER;
17
+ exports.LOCAL_STORAGE_LATEST_VISITED_FOLDER = LOCAL_STORAGE_LATEST_VISITED_FOLDER;
18
+
19
+ //# sourceMappingURL=constants.js.map
@@ -9,4 +9,6 @@ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/hel
9
9
  var _graphqlTag = _interopRequireDefault(require("graphql-tag"));
10
10
  var _templateObject;
11
11
  var GET_ERROR = (0, _graphqlTag.default)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n {\n networkError\n }\n"])));
12
- exports.GET_ERROR = GET_ERROR;
12
+ exports.GET_ERROR = GET_ERROR;
13
+
14
+ //# sourceMappingURL=NetworkError.js.map
@@ -3,10 +3,12 @@ import ApolloClient from "apollo-client";
3
3
  import { CmsContentEntry, CmsModel } from "../../../types";
4
4
  import { MutationHookOptions } from "@apollo/react-hooks";
5
5
  import { AsyncProcessor } from "@webiny/utils";
6
- interface PublishEntryOptions {
6
+ interface MutationEntryOptions {
7
7
  mutationOptions?: MutationHookOptions;
8
8
  }
9
- declare type DeleteEntryOptions = PublishEntryOptions;
9
+ declare type PublishEntryOptions = MutationEntryOptions;
10
+ declare type UnpublishEntryOptions = MutationEntryOptions;
11
+ declare type DeleteEntryOptions = MutationEntryOptions;
10
12
  interface EntryError {
11
13
  message: string;
12
14
  code?: string;
@@ -28,7 +30,7 @@ export interface OnEntryDeleteRequest {
28
30
  model: CmsModel;
29
31
  entry: Pick<CmsContentEntry, "id">;
30
32
  id: string;
31
- options: PublishEntryOptions;
33
+ options: DeleteEntryOptions;
32
34
  error?: EntryError | null;
33
35
  locale: string;
34
36
  client: ApolloClient<any>;
@@ -36,8 +38,21 @@ export interface OnEntryDeleteRequest {
36
38
  export interface OnEntryDeleteResponse extends Omit<OnEntryDeleteRequest, "entry"> {
37
39
  entry: Pick<CmsContentEntry, "id"> | undefined;
38
40
  }
41
+ export interface OnEntryUnpublishRequest {
42
+ model: CmsModel;
43
+ entry: Pick<CmsContentEntry, "id">;
44
+ id: string;
45
+ options: UnpublishEntryOptions;
46
+ error?: EntryError | null;
47
+ locale: string;
48
+ client: ApolloClient<any>;
49
+ }
50
+ export interface OnEntryUnpublishResponse extends Omit<OnEntryUnpublishRequest, "entry"> {
51
+ entry: CmsContentEntry | undefined;
52
+ }
39
53
  declare type OnEntryRevisionPublishSubscriber = AsyncProcessor<OnEntryPublishRequest, OnEntryPublishResponse>;
40
54
  declare type OnEntryDeleteSubscriber = AsyncProcessor<OnEntryDeleteRequest, OnEntryDeleteResponse>;
55
+ declare type OnEntryRevisionUnpublishSubscriber = AsyncProcessor<OnEntryUnpublishRequest, OnEntryUnpublishResponse>;
41
56
  interface PublishEntryRevisionParams {
42
57
  model: CmsModel;
43
58
  entry: CmsContentEntry;
@@ -50,12 +65,20 @@ interface DeleteEntryParams {
50
65
  id: string;
51
66
  options?: DeleteEntryOptions;
52
67
  }
68
+ interface UnpublishEntryRevisionParams {
69
+ model: CmsModel;
70
+ entry: Pick<CmsContentEntry, "id">;
71
+ id: string;
72
+ options?: UnpublishEntryOptions;
73
+ }
53
74
  export interface CmsContext {
54
75
  getApolloClient(locale: string): ApolloClient<any>;
55
76
  createApolloClient: CmsProviderProps["createApolloClient"];
56
77
  apolloClient: ApolloClient<any>;
57
78
  publishEntryRevision: (params: PublishEntryRevisionParams) => Promise<OnEntryPublishResponse>;
58
79
  onEntryRevisionPublish: (fn: OnEntryRevisionPublishSubscriber) => () => void;
80
+ unpublishEntryRevision: (params: UnpublishEntryRevisionParams) => Promise<OnEntryUnpublishResponse>;
81
+ onEntryRevisionUnpublish: (fn: OnEntryRevisionUnpublishSubscriber) => () => void;
59
82
  deleteEntry: (params: DeleteEntryParams) => Promise<OnEntryDeleteResponse>;
60
83
  onEntryDelete: (fn: OnEntryDeleteSubscriber) => () => void;
61
84
  }
@@ -34,6 +34,7 @@ var CmsProvider = function CmsProvider(props) {
34
34
  var _useI18N = (0, _useI18N2.useI18N)(),
35
35
  getCurrentLocale = _useI18N.getCurrentLocale;
36
36
  var _onEntryRevisionPublish = (0, _react.useRef)([]);
37
+ var _onEntryRevisionUnpublish = (0, _react.useRef)([]);
37
38
  var _onEntryDelete = (0, _react.useRef)([]);
38
39
  var currentLocale = getCurrentLocale("content");
39
40
  if (currentLocale && !apolloClientsCache[currentLocale]) {
@@ -88,13 +89,13 @@ var CmsProvider = function CmsProvider(props) {
88
89
  _onEntryRevisionPublish.current.splice(index, 1);
89
90
  };
90
91
  },
91
- deleteEntry: function () {
92
- var _deleteEntry = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2(params) {
92
+ unpublishEntryRevision: function () {
93
+ var _unpublishEntryRevision = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee2(params) {
93
94
  return (0, _regeneratorRuntime2.default)().wrap(function _callee2$(_context2) {
94
95
  while (1) switch (_context2.prev = _context2.next) {
95
96
  case 0:
96
97
  _context2.next = 2;
97
- return (0, _utils.composeAsync)((0, _toConsumableArray2.default)(_onEntryDelete.current).reverse())((0, _objectSpread2.default)((0, _objectSpread2.default)({
98
+ return (0, _utils.composeAsync)((0, _toConsumableArray2.default)(_onEntryRevisionUnpublish.current).reverse())((0, _objectSpread2.default)((0, _objectSpread2.default)({
98
99
  locale: currentLocale
99
100
  }, params), {}, {
100
101
  client: getApolloClient(currentLocale),
@@ -108,7 +109,39 @@ var CmsProvider = function CmsProvider(props) {
108
109
  }
109
110
  }, _callee2);
110
111
  }));
111
- function deleteEntry(_x2) {
112
+ function unpublishEntryRevision(_x2) {
113
+ return _unpublishEntryRevision.apply(this, arguments);
114
+ }
115
+ return unpublishEntryRevision;
116
+ }(),
117
+ onEntryRevisionUnpublish: function onEntryRevisionUnpublish(fn) {
118
+ _onEntryRevisionUnpublish.current.push(fn);
119
+ return function () {
120
+ var index = _onEntryRevisionUnpublish.current.length;
121
+ _onEntryRevisionUnpublish.current.splice(index, 1);
122
+ };
123
+ },
124
+ deleteEntry: function () {
125
+ var _deleteEntry = (0, _asyncToGenerator2.default)( /*#__PURE__*/(0, _regeneratorRuntime2.default)().mark(function _callee3(params) {
126
+ return (0, _regeneratorRuntime2.default)().wrap(function _callee3$(_context3) {
127
+ while (1) switch (_context3.prev = _context3.next) {
128
+ case 0:
129
+ _context3.next = 2;
130
+ return (0, _utils.composeAsync)((0, _toConsumableArray2.default)(_onEntryDelete.current).reverse())((0, _objectSpread2.default)((0, _objectSpread2.default)({
131
+ locale: currentLocale
132
+ }, params), {}, {
133
+ client: getApolloClient(currentLocale),
134
+ options: params.options || {}
135
+ }));
136
+ case 2:
137
+ return _context3.abrupt("return", _context3.sent);
138
+ case 3:
139
+ case "end":
140
+ return _context3.stop();
141
+ }
142
+ }, _callee3);
143
+ }));
144
+ function deleteEntry(_x3) {
112
145
  return _deleteEntry.apply(this, arguments);
113
146
  }
114
147
  return deleteEntry;
@@ -125,4 +158,6 @@ var CmsProvider = function CmsProvider(props) {
125
158
  value: value
126
159
  }, props));
127
160
  };
128
- exports.CmsProvider = CmsProvider;
161
+ exports.CmsProvider = CmsProvider;
162
+
163
+ //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_useI18N2","_Progress","_config","_utils","CmsContext","React","createContext","getApolloClient","createApolloClient","apolloClient","exports","apolloClientsCache","CmsProvider","props","apiUrl","appConfig","getKey","process","env","REACT_APP_API_URL","_useI18N","useI18N","getCurrentLocale","onEntryRevisionPublish","useRef","onEntryDelete","currentLocale","uri","concat","default","createElement","CircularProgress","locale","value","publishEntryRevision","_publishEntryRevision","_asyncToGenerator2","_regeneratorRuntime2","mark","_callee","params","wrap","_callee$","_context","prev","next","composeAsync","_toConsumableArray2","current","reverse","_objectSpread2","client","options","abrupt","sent","stop","_x","apply","arguments","fn","push","index","length","splice","deleteEntry","_deleteEntry","_callee2","_callee2$","_context2","_x2","Provider","Object","assign"],"sources":["index.tsx"],"sourcesContent":["import React, { useRef } from \"react\";\nimport ApolloClient from \"apollo-client\";\nimport { useI18N } from \"@webiny/app-i18n/hooks/useI18N\";\nimport { CircularProgress } from \"@webiny/ui/Progress\";\nimport { config as appConfig } from \"@webiny/app/config\";\nimport { CmsContentEntry, CmsModel } from \"~/types\";\nimport { MutationHookOptions } from \"@apollo/react-hooks\";\nimport { AsyncProcessor, composeAsync } from \"@webiny/utils\";\n\ninterface PublishEntryOptions {\n mutationOptions?: MutationHookOptions;\n}\n\ntype DeleteEntryOptions = PublishEntryOptions;\n\ninterface EntryError {\n message: string;\n code?: string;\n data?: Record<string, any>;\n}\n\nexport interface OnEntryPublishRequest {\n model: CmsModel;\n entry: CmsContentEntry;\n id: string;\n options: PublishEntryOptions;\n // TODO: Maybe a different input and output type for compose.\n error?: EntryError | null;\n locale: string;\n client: ApolloClient<any>;\n}\n\nexport interface OnEntryPublishResponse extends Omit<OnEntryPublishRequest, \"entry\"> {\n entry: CmsContentEntry | undefined;\n}\n\nexport interface OnEntryDeleteRequest {\n model: CmsModel;\n entry: Pick<CmsContentEntry, \"id\">;\n id: string;\n options: PublishEntryOptions;\n // TODO: Maybe a different input and output type for compose.\n error?: EntryError | null;\n locale: string;\n client: ApolloClient<any>;\n}\n\nexport interface OnEntryDeleteResponse extends Omit<OnEntryDeleteRequest, \"entry\"> {\n entry: Pick<CmsContentEntry, \"id\"> | undefined;\n}\n\ntype OnEntryRevisionPublishSubscriber = AsyncProcessor<\n OnEntryPublishRequest,\n OnEntryPublishResponse\n>;\ntype OnEntryDeleteSubscriber = AsyncProcessor<OnEntryDeleteRequest, OnEntryDeleteResponse>;\n\ninterface PublishEntryRevisionParams {\n model: CmsModel;\n entry: CmsContentEntry;\n options?: PublishEntryOptions;\n id: string;\n}\ninterface DeleteEntryParams {\n model: CmsModel;\n entry: Pick<CmsContentEntry, \"id\">;\n id: string;\n options?: DeleteEntryOptions;\n}\nexport interface CmsContext {\n getApolloClient(locale: string): ApolloClient<any>;\n createApolloClient: CmsProviderProps[\"createApolloClient\"];\n apolloClient: ApolloClient<any>;\n publishEntryRevision: (params: PublishEntryRevisionParams) => Promise<OnEntryPublishResponse>;\n onEntryRevisionPublish: (fn: OnEntryRevisionPublishSubscriber) => () => void;\n deleteEntry: (params: DeleteEntryParams) => Promise<OnEntryDeleteResponse>;\n onEntryDelete: (fn: OnEntryDeleteSubscriber) => () => void;\n}\n\nexport const CmsContext = React.createContext<CmsContext>({\n getApolloClient: () => {\n return null;\n },\n createApolloClient: () => {\n return null;\n },\n apolloClient: null\n /**\n * Safe to cast.\n */\n} as unknown as CmsContext);\n\ninterface ApolloClientsCache {\n [locale: string]: ApolloClient<any>;\n}\n\nconst apolloClientsCache: ApolloClientsCache = {};\n\nexport interface CmsProviderProps {\n createApolloClient: (params: { uri: string }) => ApolloClient<any>;\n children: React.ReactNode;\n}\n\nexport const CmsProvider: React.FC<CmsProviderProps> = props => {\n const apiUrl = appConfig.getKey(\"API_URL\", process.env.REACT_APP_API_URL);\n const { getCurrentLocale } = useI18N();\n\n const onEntryRevisionPublish = useRef<OnEntryRevisionPublishSubscriber[]>([]);\n const onEntryDelete = useRef<OnEntryDeleteSubscriber[]>([]);\n\n const currentLocale = getCurrentLocale(\"content\");\n\n if (currentLocale && !apolloClientsCache[currentLocale]) {\n apolloClientsCache[currentLocale] = props.createApolloClient({\n uri: `${apiUrl}/cms/manage/${currentLocale}`\n });\n }\n\n if (!currentLocale) {\n return <CircularProgress />;\n }\n\n const getApolloClient = (locale: string) => {\n if (!apolloClientsCache[locale]) {\n apolloClientsCache[locale] = props.createApolloClient({\n uri: `${apiUrl}/cms/manage/${locale}`\n });\n }\n return apolloClientsCache[locale];\n };\n\n const value: CmsContext = {\n getApolloClient,\n createApolloClient: props.createApolloClient,\n apolloClient: getApolloClient(currentLocale),\n publishEntryRevision: async params => {\n return await composeAsync([...onEntryRevisionPublish.current].reverse())({\n locale: currentLocale,\n ...params,\n client: getApolloClient(currentLocale),\n options: params.options || {}\n });\n },\n onEntryRevisionPublish: fn => {\n onEntryRevisionPublish.current.push(fn);\n return () => {\n const index = onEntryRevisionPublish.current.length;\n onEntryRevisionPublish.current.splice(index, 1);\n };\n },\n deleteEntry: async params => {\n return await composeAsync([...onEntryDelete.current].reverse())({\n locale: currentLocale,\n ...params,\n client: getApolloClient(currentLocale),\n options: params.options || {}\n });\n },\n onEntryDelete: fn => {\n onEntryDelete.current.push(fn);\n return () => {\n const index = onEntryDelete.current.length;\n onEntryDelete.current.splice(index, 1);\n };\n }\n };\n\n return <CmsContext.Provider value={value} {...props} />;\n};\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAGA,IAAAI,MAAA,GAAAJ,OAAA;AAwEO,IAAMK,UAAU,gBAAGC,cAAK,CAACC,aAAa,CAAa;EACtDC,eAAe,EAAE,SAAAA,gBAAA,EAAM;IACnB,OAAO,IAAI;EACf,CAAC;EACDC,kBAAkB,EAAE,SAAAA,mBAAA,EAAM;IACtB,OAAO,IAAI;EACf,CAAC;EACDC,YAAY,EAAE;EACd;AACJ;AACA;AACA,CAA0B,CAAC;AAACC,OAAA,CAAAN,UAAA,GAAAA,UAAA;AAM5B,IAAMO,kB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ACkE,QAAQ,EAAAC,MAAA,CAAAC,MAAA;IAACvC,KAAK,EAAEA;EAAM,GAAKpB,KAAK,CAAG,CAAC;AAC3D,CAAC;AAACH,OAAA,CAAAE,WAAA,GAAAA,WAAA"}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_useI18N2","_Progress","_config","_utils","CmsContext","React","createContext","getApolloClient","createApolloClient","apolloClient","exports","apolloClientsCache","CmsProvider","props","apiUrl","appConfig","getKey","process","env","REACT_APP_API_URL","_useI18N","useI18N","getCurrentLocale","onEntryRevisionPublish","useRef","onEntryRevisionUnpublish","onEntryDelete","currentLocale","uri","concat","default","createElement","CircularProgress","locale","value","publishEntryRevision","_publishEntryRevision","_asyncToGenerator2","_regeneratorRuntime2","mark","_callee","params","wrap","_callee$","_context","prev","next","composeAsync","_toConsumableArray2","current","reverse","_objectSpread2","client","options","abrupt","sent","stop","_x","apply","arguments","fn","push","index","length","splice","unpublishEntryRevision","_unpublishEntryRevision","_callee2","_callee2$","_context2","_x2","deleteEntry","_deleteEntry","_callee3","_callee3$","_context3","_x3","Provider","Object","assign"],"sources":["index.tsx"],"sourcesContent":["import React, { useRef } from \"react\";\nimport ApolloClient from \"apollo-client\";\nimport { useI18N } from \"@webiny/app-i18n/hooks/useI18N\";\nimport { CircularProgress } from \"@webiny/ui/Progress\";\nimport { config as appConfig } from \"@webiny/app/config\";\nimport { CmsContentEntry, CmsModel } from \"~/types\";\nimport { MutationHookOptions } from \"@apollo/react-hooks\";\nimport { AsyncProcessor, composeAsync } from \"@webiny/utils\";\n\ninterface MutationEntryOptions {\n mutationOptions?: MutationHookOptions;\n}\n\ntype PublishEntryOptions = MutationEntryOptions;\ntype UnpublishEntryOptions = MutationEntryOptions;\ntype DeleteEntryOptions = MutationEntryOptions;\n\ninterface EntryError {\n message: string;\n code?: string;\n data?: Record<string, any>;\n}\n\nexport interface OnEntryPublishRequest {\n model: CmsModel;\n entry: CmsContentEntry;\n id: string;\n options: PublishEntryOptions;\n // TODO: Maybe a different input and output type for compose.\n error?: EntryError | null;\n locale: string;\n client: ApolloClient<any>;\n}\n\nexport interface OnEntryPublishResponse extends Omit<OnEntryPublishRequest, \"entry\"> {\n entry: CmsContentEntry | undefined;\n}\n\nexport interface OnEntryDeleteRequest {\n model: CmsModel;\n entry: Pick<CmsContentEntry, \"id\">;\n id: string;\n options: DeleteEntryOptions;\n // TODO: Maybe a different input and output type for compose.\n error?: EntryError | null;\n locale: string;\n client: ApolloClient<any>;\n}\n\nexport interface OnEntryDeleteResponse extends Omit<OnEntryDeleteRequest, \"entry\"> {\n entry: Pick<CmsContentEntry, \"id\"> | undefined;\n}\n\nexport interface OnEntryUnpublishRequest {\n model: CmsModel;\n entry: Pick<CmsContentEntry, \"id\">;\n id: string;\n options: UnpublishEntryOptions;\n // TODO: Maybe a different input and output type for compose.\n error?: EntryError | null;\n locale: string;\n client: ApolloClient<any>;\n}\n\nexport interface OnEntryUnpublishResponse extends Omit<OnEntryUnpublishRequest, \"entry\"> {\n entry: CmsContentEntry | undefined;\n}\n\ntype OnEntryRevisionPublishSubscriber = AsyncProcessor<\n OnEntryPublishRequest,\n OnEntryPublishResponse\n>;\ntype OnEntryDeleteSubscriber = AsyncProcessor<OnEntryDeleteRequest, OnEntryDeleteResponse>;\ntype OnEntryRevisionUnpublishSubscriber = AsyncProcessor<\n OnEntryUnpublishRequest,\n OnEntryUnpublishResponse\n>;\n\ninterface PublishEntryRevisionParams {\n model: CmsModel;\n entry: CmsContentEntry;\n options?: PublishEntryOptions;\n id: string;\n}\ninterface DeleteEntryParams {\n model: CmsModel;\n entry: Pick<CmsContentEntry, \"id\">;\n id: string;\n options?: DeleteEntryOptions;\n}\n\ninterface UnpublishEntryRevisionParams {\n model: CmsModel;\n entry: Pick<CmsContentEntry, \"id\">;\n id: string;\n options?: UnpublishEntryOptions;\n}\n\nexport interface CmsContext {\n getApolloClient(locale: string): ApolloClient<any>;\n createApolloClient: CmsProviderProps[\"createApolloClient\"];\n apolloClient: ApolloClient<any>;\n publishEntryRevision: (params: PublishEntryRevisionParams) => Promise<OnEntryPublishResponse>;\n onEntryRevisionPublish: (fn: OnEntryRevisionPublishSubscriber) => () => void;\n unpublishEntryRevision: (\n params: UnpublishEntryRevisionParams\n ) => Promise<OnEntryUnpublishResponse>;\n onEntryRevisionUnpublish: (fn: OnEntryRevisionUnpublishSubscriber) => () => void;\n deleteEntry: (params: DeleteEntryParams) => Promise<OnEntryDeleteResponse>;\n onEntryDelete: (fn: OnEntryDeleteSubscriber) => () => void;\n}\n\nexport const CmsContext = React.createContext<CmsContext>({\n getApolloClient: () => {\n return null;\n },\n createApolloClient: () => {\n return null;\n },\n apolloClient: null\n /**\n * Safe to cast.\n */\n} as unknown as CmsContext);\n\ninterface ApolloClientsCache {\n [locale: string]: ApolloClient<any>;\n}\n\nconst apolloClientsCache: ApolloClientsCache = {};\n\nexport interface CmsProviderProps {\n createApolloClient: (params: { uri: string }) => ApolloClient<any>;\n children: React.ReactNode;\n}\n\nexport const CmsProvider: React.FC<CmsProviderProps> = props => {\n const apiUrl = appConfig.getKey(\"API_URL\", process.env.REACT_APP_API_URL);\n const { getCurrentLocale } = useI18N();\n\n const onEntryRevisionPublish = useRef<OnEntryRevisionPublishSubscriber[]>([]);\n const onEntryRevisionUnpublish = useRef<OnEntryRevisionUnpublishSubscriber[]>([]);\n const onEntryDelete = useRef<OnEntryDeleteSubscriber[]>([]);\n\n const currentLocale = getCurrentLocale(\"content\");\n\n if (currentLocale && !apolloClientsCache[currentLocale]) {\n apolloClientsCache[currentLocale] = props.createApolloClient({\n uri: `${apiUrl}/cms/manage/${currentLocale}`\n });\n }\n\n if (!currentLocale) {\n return <CircularProgress />;\n }\n\n const getApolloClient = (locale: string) => {\n if (!apolloClientsCache[locale]) {\n apolloClientsCache[locale] = props.createApolloClient({\n uri: `${apiUrl}/cms/manage/${locale}`\n });\n }\n return apolloClientsCache[locale];\n };\n\n const value: CmsContext = {\n getApolloClient,\n createApolloClient: props.createApolloClient,\n apolloClient: getApolloClient(currentLocale),\n publishEntryRevision: async params => {\n return await composeAsync([...onEntryRevisionPublish.current].reverse())({\n locale: currentLocale,\n ...params,\n client: getApolloClient(currentLocale),\n options: params.options || {}\n });\n },\n onEntryRevisionPublish: fn => {\n onEntryRevisionPublish.current.push(fn);\n return () => {\n const index = onEntryRevisionPublish.current.length;\n onEntryRevisionPublish.current.splice(index, 1);\n };\n },\n unpublishEntryRevision: async params => {\n return await composeAsync([...onEntryRevisionUnpublish.current].reverse())({\n locale: currentLocale,\n ...params,\n client: getApolloClient(currentLocale),\n options: params.options || {}\n });\n },\n onEntryRevisionUnpublish: fn => {\n onEntryRevisionUnpublish.current.push(fn);\n return () => {\n const index = onEntryRevisionUnpublish.current.length;\n onEntryRevisionUnpublish.current.splice(index, 1);\n };\n },\n deleteEntry: async params => {\n return await composeAsync([...onEntryDelete.current].reverse())({\n locale: currentLocale,\n ...params,\n client: getApolloClient(currentLocale),\n options: params.options || {}\n });\n },\n onEntryDelete: fn => {\n onEntryDelete.current.push(fn);\n return () => {\n const index = onEntryDelete.current.length;\n onEntryDelete.current.splice(index, 1);\n };\n }\n };\n\n return <CmsContext.Provider value={value} {...props} />;\n};\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,SAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AAGA,IAAAI,MAAA,GAAAJ,OAAA;AAyGO,IAAMK,UAAU,gBAAGC,cAAK,CAACC,aAAa,CAAa;EACtDC,eAAe,EAAE,SAAAA,gBAAA,EAAM;IACnB,OAAO,IAAI;EACf,CAAC;EACDC,kBAAkB,EAAE,SAAAA,mBAAA,EAAM;IACtB,OAAO,IAAI;EACf,CAAC;EACDC,YAAY,EAAE;EACd;AACJ;AACA;AACA,CAA0B,CAAC;AAACC,OAAA,CAAAN,UAAA,GAAAA,UAAA;AAM5B,IAAMO,k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aAAA,CAAC3B,UAAU,CAACyE,QAAQ,EAAAC,MAAA,CAAAC,MAAA;IAAC7C,KAAK,EAAEA;EAAM,GAAKrB,KAAK,CAAG,CAAC;AAC3D,CAAC;AAACH,OAAA,CAAAE,WAAA,GAAAA,WAAA"}
@@ -20,4 +20,6 @@ var ContentGroupMenuElement = /*#__PURE__*/function (_NavigationMenuElemen) {
20
20
  }
21
21
  return (0, _createClass2.default)(ContentGroupMenuElement);
22
22
  }(_NavigationMenuElement.NavigationMenuElement);
23
- exports.ContentGroupMenuElement = ContentGroupMenuElement;
23
+ exports.ContentGroupMenuElement = ContentGroupMenuElement;
24
+
25
+ //# sourceMappingURL=ContentGroupMenuElement.js.map
@@ -20,4 +20,6 @@ var ContentModelMenuElement = /*#__PURE__*/function (_NavigationMenuElemen) {
20
20
  }
21
21
  return (0, _createClass2.default)(ContentModelMenuElement);
22
22
  }(_NavigationMenuElement.NavigationMenuElement);
23
- exports.ContentModelMenuElement = ContentModelMenuElement;
23
+ exports.ContentModelMenuElement = ContentModelMenuElement;
24
+
25
+ //# sourceMappingURL=ContentModelMenuElement.js.map
@@ -82,4 +82,6 @@ var NothingToShowRenderer = /*#__PURE__*/function (_UIRenderer) {
82
82
  }]);
83
83
  return NothingToShowRenderer;
84
84
  }(_UIRenderer2.UIRenderer);
85
- exports.NothingToShowRenderer = NothingToShowRenderer;
85
+ exports.NothingToShowRenderer = NothingToShowRenderer;
86
+
87
+ //# sourceMappingURL=NothingToShowElement.js.map
@@ -25,4 +25,6 @@ var GET_CONTENT_MODEL = (0, _graphqlTag.default)(_templateObject || (_templateOb
25
25
  */
26
26
  exports.GET_CONTENT_MODEL = GET_CONTENT_MODEL;
27
27
  var UPDATE_CONTENT_MODEL = (0, _graphqlTag.default)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n mutation CmsUpdateContentModel($modelId: ID!, $data: CmsContentModelUpdateInput!) {\n updateContentModel(modelId: $modelId, data: $data) {\n data {\n ", "\n }\n error {\n ", "\n }\n }\n }\n"])), MODEL_FIELDS, ERROR_FIELDS);
28
- exports.UPDATE_CONTENT_MODEL = UPDATE_CONTENT_MODEL;
28
+ exports.UPDATE_CONTENT_MODEL = UPDATE_CONTENT_MODEL;
29
+
30
+ //# sourceMappingURL=contentModels.js.map
@@ -133,4 +133,6 @@ Object.keys(_useModelFieldGraphqlContext).forEach(function (key) {
133
133
  return _useModelFieldGraphqlContext[key];
134
134
  }
135
135
  });
136
- });
136
+ });
137
+
138
+ //# sourceMappingURL=index.js.map
@@ -12,4 +12,6 @@ var useApolloClient = function useApolloClient() {
12
12
  return apolloClient;
13
13
  };
14
14
  var _default = useApolloClient;
15
- exports.default = _default;
15
+ exports.default = _default;
16
+
17
+ //# sourceMappingURL=useApolloClient.js.map
@@ -14,4 +14,6 @@ function useCms() {
14
14
  return context;
15
15
  }
16
16
  var _default = useCms;
17
- exports.default = _default;
17
+ exports.default = _default;
18
+
19
+ //# sourceMappingURL=useCms.js.map
@@ -39,4 +39,6 @@ exports.useContentModels = useContentModels;
39
39
  var useModels = function useModels() {
40
40
  return useContentModels();
41
41
  };
42
- exports.useModels = useModels;
42
+ exports.useModels = useModels;
43
+
44
+ //# sourceMappingURL=useContentModels.js.map
@@ -17,4 +17,6 @@ var useLazyQuery = function useLazyQuery(query) {
17
17
  }, options));
18
18
  };
19
19
  var _default = useLazyQuery;
20
- exports.default = _default;
20
+ exports.default = _default;
21
+
22
+ //# sourceMappingURL=useLazyQuery.js.map
@@ -17,4 +17,6 @@ var useModelFieldGraphqlContext = function useModelFieldGraphqlContext() {
17
17
  }
18
18
  };
19
19
  };
20
- exports.useModelFieldGraphqlContext = useModelFieldGraphqlContext;
20
+ exports.useModelFieldGraphqlContext = useModelFieldGraphqlContext;
21
+
22
+ //# sourceMappingURL=useModelFieldGraphqlContext.js.map
@@ -17,4 +17,6 @@ var useMutation = function useMutation(mutation) {
17
17
  }, options));
18
18
  };
19
19
  var _default = useMutation;
20
- exports.default = _default;
20
+ exports.default = _default;
21
+
22
+ //# sourceMappingURL=useMutation.js.map
@@ -229,4 +229,6 @@ var usePermission = function usePermission() {
229
229
  */
230
230
  exports.usePermission = usePermission;
231
231
  var _default = usePermission;
232
- exports.default = _default;
232
+ exports.default = _default;
233
+
234
+ //# sourceMappingURL=usePermission.js.map
@@ -18,4 +18,6 @@ var useQuery = function useQuery(query) {
18
18
  }, options));
19
19
  };
20
20
  var _default = useQuery;
21
- exports.default = _default;
21
+ exports.default = _default;
22
+
23
+ //# sourceMappingURL=useQuery.js.map
@@ -18,4 +18,6 @@ var useQueryLocale = function useQueryLocale(query, locale) {
18
18
  skip: !client
19
19
  }, options));
20
20
  };
21
- exports.useQueryLocale = useQueryLocale;
21
+ exports.useQueryLocale = useQueryLocale;
22
+
23
+ //# sourceMappingURL=useQueryLocale.js.map
@@ -34,4 +34,6 @@ var LexicalEditorConfig = function LexicalEditorConfig(_ref) {
34
34
  exports.LexicalEditorConfig = LexicalEditorConfig;
35
35
  LexicalEditorConfig.ToolbarAction = ToolbarAction;
36
36
  LexicalEditorConfig.Plugin = PluginConfig;
37
- LexicalEditorConfig.Node = NodeConfig;
37
+ LexicalEditorConfig.Node = NodeConfig;
38
+
39
+ //# sourceMappingURL=LexicalEditorConfig.js.map