@webiny/app-headless-cms-scheduler 0.0.0-unstable.eb196ccd2f → 0.0.0-unstable.eb81deee7e
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.
- package/README.md +6 -17
- package/components/Browser/BrowserConfig.d.ts +2 -0
- package/components/Browser/BrowserConfig.js +23 -0
- package/components/Browser/BrowserConfig.js.map +1 -0
- package/components/Browser/CellLive.d.ts +11 -0
- package/components/Browser/CellLive.js +37 -0
- package/components/Browser/CellLive.js.map +1 -0
- package/components/Browser/LiveTag.d.ts +7 -0
- package/components/Browser/LiveTag.js +19 -0
- package/components/Browser/LiveTag.js.map +1 -0
- package/components/Browser/MenuItem.d.ts +4 -0
- package/components/Browser/MenuItem.js +45 -0
- package/components/Browser/MenuItem.js.map +1 -0
- package/components/Browser/ScheduledTag.d.ts +5 -0
- package/components/Browser/ScheduledTag.js +24 -0
- package/components/Browser/ScheduledTag.js.map +1 -0
- package/components/Browser/SchedulerButton.d.ts +5 -0
- package/components/Browser/SchedulerButton.js +16 -0
- package/components/Browser/SchedulerButton.js.map +1 -0
- package/components/Browser/SchedulerMenuItem.d.ts +2 -0
- package/components/Browser/SchedulerMenuItem.js +26 -0
- package/components/Browser/SchedulerMenuItem.js.map +1 -0
- package/components/Browser/isScheduleRedundant.d.ts +12 -0
- package/components/Browser/isScheduleRedundant.js +8 -0
- package/components/Browser/isScheduleRedundant.js.map +1 -0
- package/components/Dialogs/PublishScheduleNotice.d.ts +6 -0
- package/components/Dialogs/PublishScheduleNotice.js +17 -0
- package/components/Dialogs/PublishScheduleNotice.js.map +1 -0
- package/components/Dialogs/ScheduleNoticeAlert.d.ts +14 -0
- package/components/Dialogs/ScheduleNoticeAlert.js +22 -0
- package/components/Dialogs/ScheduleNoticeAlert.js.map +1 -0
- package/components/Dialogs/UnpublishScheduleNotice.d.ts +6 -0
- package/components/Dialogs/UnpublishScheduleNotice.js +17 -0
- package/components/Dialogs/UnpublishScheduleNotice.js.map +1 -0
- package/components/Editor/EditorConfig.d.ts +2 -0
- package/components/Editor/EditorConfig.js +12 -0
- package/components/Editor/EditorConfig.js.map +1 -0
- package/components/Editor/MenuItem.d.ts +4 -0
- package/components/Editor/MenuItem.js +60 -0
- package/components/Editor/MenuItem.js.map +1 -0
- package/components/Editor/ScheduledActionAlert.d.ts +6 -0
- package/components/Editor/ScheduledActionAlert.js +43 -0
- package/components/Editor/ScheduledActionAlert.js.map +1 -0
- package/components/index.d.ts +5 -0
- package/components/index.js +5 -0
- package/hooks/usePermissions.d.ts +4 -0
- package/hooks/usePermissions.js +18 -0
- package/hooks/usePermissions.js.map +1 -0
- package/hooks/useScheduledActionsPresenter.d.ts +6 -0
- package/hooks/useScheduledActionsPresenter.js +12 -0
- package/hooks/useScheduledActionsPresenter.js.map +1 -0
- package/index.d.ts +2 -2
- package/index.js +8 -2
- package/index.js.map +1 -1
- package/package.json +27 -36
- package/presentation/scheduledActions/ContentEntriesPresenterSchedulingDecorator.d.ts +31 -0
- package/presentation/scheduledActions/ContentEntriesPresenterSchedulingDecorator.js +70 -0
- package/presentation/scheduledActions/ContentEntriesPresenterSchedulingDecorator.js.map +1 -0
- package/presentation/scheduledActions/ScheduledActionsPresenter.d.ts +28 -0
- package/presentation/scheduledActions/ScheduledActionsPresenter.js +90 -0
- package/presentation/scheduledActions/ScheduledActionsPresenter.js.map +1 -0
- package/presentation/scheduledActions/abstractions.d.ts +16 -0
- package/presentation/scheduledActions/abstractions.js +5 -0
- package/presentation/scheduledActions/abstractions.js.map +1 -0
- package/presentation/scheduledActions/feature.d.ts +3 -0
- package/presentation/scheduledActions/feature.js +19 -0
- package/presentation/scheduledActions/feature.js.map +1 -0
- package/utils/index.d.ts +1 -0
- package/utils/index.js +1 -0
- package/utils/namespace.d.ts +7 -0
- package/utils/namespace.js +5 -0
- package/utils/namespace.js.map +1 -0
- package/Domain/Models/SchedulerItem/SchedulerItem.d.ts +0 -14
- package/Domain/Models/SchedulerItem/SchedulerItem.js +0 -17
- package/Domain/Models/SchedulerItem/SchedulerItem.js.map +0 -1
- package/Domain/Models/SchedulerItem/index.d.ts +0 -1
- package/Domain/Models/SchedulerItem/index.js +0 -3
- package/Domain/Models/SchedulerItem/index.js.map +0 -1
- package/Domain/Models/index.d.ts +0 -1
- package/Domain/Models/index.js +0 -3
- package/Domain/Models/index.js.map +0 -1
- package/Domain/Repositories/SchedulerItems/ISchedulerItemsRepository.d.ts +0 -14
- package/Domain/Repositories/SchedulerItems/ISchedulerItemsRepository.js +0 -3
- package/Domain/Repositories/SchedulerItems/ISchedulerItemsRepository.js.map +0 -1
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.d.ts +0 -37
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.js +0 -125
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.js.map +0 -1
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.d.ts +0 -20
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.js +0 -17
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.js.map +0 -1
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.d.ts +0 -17
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.js +0 -38
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.js.map +0 -1
- package/Domain/Repositories/SchedulerItems/index.d.ts +0 -4
- package/Domain/Repositories/SchedulerItems/index.js +0 -6
- package/Domain/Repositories/SchedulerItems/index.js.map +0 -1
- package/Domain/Repositories/Search/ISearchRepository.d.ts +0 -4
- package/Domain/Repositories/Search/ISearchRepository.js +0 -3
- package/Domain/Repositories/Search/ISearchRepository.js.map +0 -1
- package/Domain/Repositories/Search/SearchRepository.d.ts +0 -7
- package/Domain/Repositories/Search/SearchRepository.js +0 -15
- package/Domain/Repositories/Search/SearchRepository.js.map +0 -1
- package/Domain/Repositories/Search/SearchRepositoryFactory.d.ts +0 -7
- package/Domain/Repositories/Search/SearchRepositoryFactory.js +0 -17
- package/Domain/Repositories/Search/SearchRepositoryFactory.js.map +0 -1
- package/Domain/Repositories/Search/index.d.ts +0 -3
- package/Domain/Repositories/Search/index.js +0 -5
- package/Domain/Repositories/Search/index.js.map +0 -1
- package/Domain/Repositories/SelectedItems/ISelectedItemsRepository.d.ts +0 -8
- package/Domain/Repositories/SelectedItems/ISelectedItemsRepository.js +0 -3
- package/Domain/Repositories/SelectedItems/ISelectedItemsRepository.js.map +0 -1
- package/Domain/Repositories/SelectedItems/SelectedItemsRepository.d.ts +0 -12
- package/Domain/Repositories/SelectedItems/SelectedItemsRepository.js +0 -27
- package/Domain/Repositories/SelectedItems/SelectedItemsRepository.js.map +0 -1
- package/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.d.ts +0 -7
- package/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.js +0 -17
- package/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.js.map +0 -1
- package/Domain/Repositories/SelectedItems/index.d.ts +0 -3
- package/Domain/Repositories/SelectedItems/index.js +0 -5
- package/Domain/Repositories/SelectedItems/index.js.map +0 -1
- package/Domain/Repositories/Sorting/SortingRepositoryWithDefaults.d.ts +0 -8
- package/Domain/Repositories/Sorting/SortingRepositoryWithDefaults.js +0 -22
- package/Domain/Repositories/Sorting/SortingRepositoryWithDefaults.js.map +0 -1
- package/Domain/Repositories/Sorting/index.d.ts +0 -1
- package/Domain/Repositories/Sorting/index.js +0 -3
- package/Domain/Repositories/Sorting/index.js.map +0 -1
- package/Domain/Repositories/index.d.ts +0 -4
- package/Domain/Repositories/index.js +0 -6
- package/Domain/Repositories/index.js.map +0 -1
- package/Domain/index.d.ts +0 -2
- package/Domain/index.js +0 -4
- package/Domain/index.js.map +0 -1
- package/Gateways/SchedulerCancelGateway.d.ts +0 -7
- package/Gateways/SchedulerCancelGateway.js +0 -3
- package/Gateways/SchedulerCancelGateway.js.map +0 -1
- package/Gateways/SchedulerGetGateway.d.ts +0 -9
- package/Gateways/SchedulerGetGateway.js +0 -3
- package/Gateways/SchedulerGetGateway.js.map +0 -1
- package/Gateways/SchedulerListGateway.d.ts +0 -29
- package/Gateways/SchedulerListGateway.js +0 -3
- package/Gateways/SchedulerListGateway.js.map +0 -1
- package/Gateways/SchedulerPublishGateway.d.ts +0 -12
- package/Gateways/SchedulerPublishGateway.js +0 -3
- package/Gateways/SchedulerPublishGateway.js.map +0 -1
- package/Gateways/SchedulerUnpublishGateway.d.ts +0 -12
- package/Gateways/SchedulerUnpublishGateway.js +0 -3
- package/Gateways/SchedulerUnpublishGateway.js.map +0 -1
- package/Gateways/index.d.ts +0 -5
- package/Gateways/index.js +0 -7
- package/Gateways/index.js.map +0 -1
- package/Presentation/Scheduler/Scheduler.d.ts +0 -18
- package/Presentation/Scheduler/Scheduler.js +0 -66
- package/Presentation/Scheduler/Scheduler.js.map +0 -1
- package/Presentation/Scheduler/SchedulerControllers.d.ts +0 -30
- package/Presentation/Scheduler/SchedulerControllers.js +0 -72
- package/Presentation/Scheduler/SchedulerControllers.js.map +0 -1
- package/Presentation/Scheduler/SchedulerPresenter.d.ts +0 -32
- package/Presentation/Scheduler/SchedulerPresenter.js +0 -44
- package/Presentation/Scheduler/SchedulerPresenter.js.map +0 -1
- package/Presentation/Scheduler/controllers/CancelItem/CancelItemController.d.ts +0 -7
- package/Presentation/Scheduler/controllers/CancelItem/CancelItemController.js +0 -11
- package/Presentation/Scheduler/controllers/CancelItem/CancelItemController.js.map +0 -1
- package/Presentation/Scheduler/controllers/CancelItem/ICancelItemController.d.ts +0 -3
- package/Presentation/Scheduler/controllers/CancelItem/ICancelItemController.js +0 -3
- package/Presentation/Scheduler/controllers/CancelItem/ICancelItemController.js.map +0 -1
- package/Presentation/Scheduler/controllers/CancelItem/index.d.ts +0 -2
- package/Presentation/Scheduler/controllers/CancelItem/index.js +0 -4
- package/Presentation/Scheduler/controllers/CancelItem/index.js.map +0 -1
- package/Presentation/Scheduler/controllers/GetItem/GetItemController.d.ts +0 -8
- package/Presentation/Scheduler/controllers/GetItem/GetItemController.js +0 -11
- package/Presentation/Scheduler/controllers/GetItem/GetItemController.js.map +0 -1
- package/Presentation/Scheduler/controllers/GetItem/IGetItemController.d.ts +0 -4
- package/Presentation/Scheduler/controllers/GetItem/IGetItemController.js +0 -3
- package/Presentation/Scheduler/controllers/GetItem/IGetItemController.js.map +0 -1
- package/Presentation/Scheduler/controllers/GetItem/index.d.ts +0 -2
- package/Presentation/Scheduler/controllers/GetItem/index.js +0 -4
- package/Presentation/Scheduler/controllers/GetItem/index.js.map +0 -1
- package/Presentation/Scheduler/controllers/ListItems/IListItemsController.d.ts +0 -4
- package/Presentation/Scheduler/controllers/ListItems/IListItemsController.js +0 -3
- package/Presentation/Scheduler/controllers/ListItems/IListItemsController.js.map +0 -1
- package/Presentation/Scheduler/controllers/ListItems/ListItemsController.d.ts +0 -8
- package/Presentation/Scheduler/controllers/ListItems/ListItemsController.js +0 -11
- package/Presentation/Scheduler/controllers/ListItems/ListItemsController.js.map +0 -1
- package/Presentation/Scheduler/controllers/ListItems/index.d.ts +0 -2
- package/Presentation/Scheduler/controllers/ListItems/index.js +0 -4
- package/Presentation/Scheduler/controllers/ListItems/index.js.map +0 -1
- package/Presentation/Scheduler/controllers/ListMoreItems/IListMoreItemsController.d.ts +0 -3
- package/Presentation/Scheduler/controllers/ListMoreItems/IListMoreItemsController.js +0 -3
- package/Presentation/Scheduler/controllers/ListMoreItems/IListMoreItemsController.js.map +0 -1
- package/Presentation/Scheduler/controllers/ListMoreItems/ListMoreItemsController.d.ts +0 -7
- package/Presentation/Scheduler/controllers/ListMoreItems/ListMoreItemsController.js +0 -11
- package/Presentation/Scheduler/controllers/ListMoreItems/ListMoreItemsController.js.map +0 -1
- package/Presentation/Scheduler/controllers/ListMoreItems/index.d.ts +0 -2
- package/Presentation/Scheduler/controllers/ListMoreItems/index.js +0 -4
- package/Presentation/Scheduler/controllers/ListMoreItems/index.js.map +0 -1
- package/Presentation/Scheduler/controllers/PublishItem/IPublishItemController.d.ts +0 -3
- package/Presentation/Scheduler/controllers/PublishItem/IPublishItemController.js +0 -3
- package/Presentation/Scheduler/controllers/PublishItem/IPublishItemController.js.map +0 -1
- package/Presentation/Scheduler/controllers/PublishItem/PublishItemController.d.ts +0 -7
- package/Presentation/Scheduler/controllers/PublishItem/PublishItemController.js +0 -11
- package/Presentation/Scheduler/controllers/PublishItem/PublishItemController.js.map +0 -1
- package/Presentation/Scheduler/controllers/PublishItem/index.d.ts +0 -2
- package/Presentation/Scheduler/controllers/PublishItem/index.js +0 -4
- package/Presentation/Scheduler/controllers/PublishItem/index.js.map +0 -1
- package/Presentation/Scheduler/controllers/SearchItems/ISearchItemsController.d.ts +0 -3
- package/Presentation/Scheduler/controllers/SearchItems/ISearchItemsController.js +0 -3
- package/Presentation/Scheduler/controllers/SearchItems/ISearchItemsController.js.map +0 -1
- package/Presentation/Scheduler/controllers/SearchItems/SearchItemsController.d.ts +0 -8
- package/Presentation/Scheduler/controllers/SearchItems/SearchItemsController.js +0 -14
- package/Presentation/Scheduler/controllers/SearchItems/SearchItemsController.js.map +0 -1
- package/Presentation/Scheduler/controllers/SearchItems/index.d.ts +0 -2
- package/Presentation/Scheduler/controllers/SearchItems/index.js +0 -4
- package/Presentation/Scheduler/controllers/SearchItems/index.js.map +0 -1
- package/Presentation/Scheduler/controllers/SelectAllItems/ISelectAllItemsController.d.ts +0 -3
- package/Presentation/Scheduler/controllers/SelectAllItems/ISelectAllItemsController.js +0 -3
- package/Presentation/Scheduler/controllers/SelectAllItems/ISelectAllItemsController.js.map +0 -1
- package/Presentation/Scheduler/controllers/SelectAllItems/SelectAllItemsController.d.ts +0 -7
- package/Presentation/Scheduler/controllers/SelectAllItems/SelectAllItemsController.js +0 -11
- package/Presentation/Scheduler/controllers/SelectAllItems/SelectAllItemsController.js.map +0 -1
- package/Presentation/Scheduler/controllers/SelectAllItems/index.d.ts +0 -2
- package/Presentation/Scheduler/controllers/SelectAllItems/index.js +0 -4
- package/Presentation/Scheduler/controllers/SelectAllItems/index.js.map +0 -1
- package/Presentation/Scheduler/controllers/SelectItems/ISelectItemsController.d.ts +0 -4
- package/Presentation/Scheduler/controllers/SelectItems/ISelectItemsController.js +0 -3
- package/Presentation/Scheduler/controllers/SelectItems/ISelectItemsController.js.map +0 -1
- package/Presentation/Scheduler/controllers/SelectItems/SelectItemsController.d.ts +0 -8
- package/Presentation/Scheduler/controllers/SelectItems/SelectItemsController.js +0 -13
- package/Presentation/Scheduler/controllers/SelectItems/SelectItemsController.js.map +0 -1
- package/Presentation/Scheduler/controllers/SelectItems/index.d.ts +0 -2
- package/Presentation/Scheduler/controllers/SelectItems/index.js +0 -4
- package/Presentation/Scheduler/controllers/SelectItems/index.js.map +0 -1
- package/Presentation/Scheduler/controllers/SortItems/ISortItemsController.d.ts +0 -4
- package/Presentation/Scheduler/controllers/SortItems/ISortItemsController.js +0 -3
- package/Presentation/Scheduler/controllers/SortItems/ISortItemsController.js.map +0 -1
- package/Presentation/Scheduler/controllers/SortItems/SortItemsController.d.ts +0 -9
- package/Presentation/Scheduler/controllers/SortItems/SortItemsController.js +0 -19
- package/Presentation/Scheduler/controllers/SortItems/SortItemsController.js.map +0 -1
- package/Presentation/Scheduler/controllers/SortItems/index.d.ts +0 -2
- package/Presentation/Scheduler/controllers/SortItems/index.js +0 -4
- package/Presentation/Scheduler/controllers/SortItems/index.js.map +0 -1
- package/Presentation/Scheduler/controllers/UnpublishItem/IUnpublishItemController.d.ts +0 -3
- package/Presentation/Scheduler/controllers/UnpublishItem/IUnpublishItemController.js +0 -3
- package/Presentation/Scheduler/controllers/UnpublishItem/IUnpublishItemController.js.map +0 -1
- package/Presentation/Scheduler/controllers/UnpublishItem/UnpublishItemController.d.ts +0 -7
- package/Presentation/Scheduler/controllers/UnpublishItem/UnpublishItemController.js +0 -11
- package/Presentation/Scheduler/controllers/UnpublishItem/UnpublishItemController.js.map +0 -1
- package/Presentation/Scheduler/controllers/UnpublishItem/index.d.ts +0 -2
- package/Presentation/Scheduler/controllers/UnpublishItem/index.js +0 -4
- package/Presentation/Scheduler/controllers/UnpublishItem/index.js.map +0 -1
- package/Presentation/Scheduler/controllers/UnselectAllItems/IUnselectAllItemsController.d.ts +0 -3
- package/Presentation/Scheduler/controllers/UnselectAllItems/IUnselectAllItemsController.js +0 -3
- package/Presentation/Scheduler/controllers/UnselectAllItems/IUnselectAllItemsController.js.map +0 -1
- package/Presentation/Scheduler/controllers/UnselectAllItems/UnselectAllItemsController.d.ts +0 -7
- package/Presentation/Scheduler/controllers/UnselectAllItems/UnselectAllItemsController.js +0 -11
- package/Presentation/Scheduler/controllers/UnselectAllItems/UnselectAllItemsController.js.map +0 -1
- package/Presentation/Scheduler/controllers/UnselectAllItems/index.d.ts +0 -2
- package/Presentation/Scheduler/controllers/UnselectAllItems/index.js +0 -4
- package/Presentation/Scheduler/controllers/UnselectAllItems/index.js.map +0 -1
- package/Presentation/Scheduler/controllers/index.d.ts +0 -11
- package/Presentation/Scheduler/controllers/index.js +0 -13
- package/Presentation/Scheduler/controllers/index.js.map +0 -1
- package/Presentation/Scheduler/index.d.ts +0 -1
- package/Presentation/Scheduler/index.js +0 -3
- package/Presentation/Scheduler/index.js.map +0 -1
- package/Presentation/SchedulerConfigs/SchedulerConfigs.d.ts +0 -2
- package/Presentation/SchedulerConfigs/SchedulerConfigs.js +0 -55
- package/Presentation/SchedulerConfigs/SchedulerConfigs.js.map +0 -1
- package/Presentation/SchedulerConfigs/index.d.ts +0 -1
- package/Presentation/SchedulerConfigs/index.js +0 -3
- package/Presentation/SchedulerConfigs/index.js.map +0 -1
- package/Presentation/SchedulerRenderer/SchedulerRenderer.d.ts +0 -6
- package/Presentation/SchedulerRenderer/SchedulerRenderer.js +0 -21
- package/Presentation/SchedulerRenderer/SchedulerRenderer.js.map +0 -1
- package/Presentation/SchedulerRenderer/index.d.ts +0 -1
- package/Presentation/SchedulerRenderer/index.js +0 -3
- package/Presentation/SchedulerRenderer/index.js.map +0 -1
- package/Presentation/abstractions/ISchedulerControllers.d.ts +0 -14
- package/Presentation/abstractions/ISchedulerControllers.js +0 -3
- package/Presentation/abstractions/ISchedulerControllers.js.map +0 -1
- package/Presentation/abstractions/ISchedulerPresenter.d.ts +0 -20
- package/Presentation/abstractions/ISchedulerPresenter.js +0 -3
- package/Presentation/abstractions/ISchedulerPresenter.js.map +0 -1
- package/Presentation/abstractions/index.d.ts +0 -2
- package/Presentation/abstractions/index.js +0 -4
- package/Presentation/abstractions/index.js.map +0 -1
- package/Presentation/components/Actions/CancelItem/CancelItem.d.ts +0 -2
- package/Presentation/components/Actions/CancelItem/CancelItem.js +0 -24
- package/Presentation/components/Actions/CancelItem/CancelItem.js.map +0 -1
- package/Presentation/components/Actions/CancelItem/index.d.ts +0 -1
- package/Presentation/components/Actions/CancelItem/index.js +0 -3
- package/Presentation/components/Actions/CancelItem/index.js.map +0 -1
- package/Presentation/components/Actions/index.d.ts +0 -1
- package/Presentation/components/Actions/index.js +0 -3
- package/Presentation/components/Actions/index.js.map +0 -1
- package/Presentation/components/BottomInfoBar/BottomInfoBar.d.ts +0 -2
- package/Presentation/components/BottomInfoBar/BottomInfoBar.js +0 -20
- package/Presentation/components/BottomInfoBar/BottomInfoBar.js.map +0 -1
- package/Presentation/components/BottomInfoBar/BottomInfoBar.styled.d.ts +0 -21
- package/Presentation/components/BottomInfoBar/BottomInfoBar.styled.js +0 -74
- package/Presentation/components/BottomInfoBar/BottomInfoBar.styled.js.map +0 -1
- package/Presentation/components/BottomInfoBar/ListMeta.d.ts +0 -7
- package/Presentation/components/BottomInfoBar/ListMeta.js +0 -12
- package/Presentation/components/BottomInfoBar/ListMeta.js.map +0 -1
- package/Presentation/components/BottomInfoBar/ListStatus.d.ts +0 -5
- package/Presentation/components/BottomInfoBar/ListStatus.js +0 -16
- package/Presentation/components/BottomInfoBar/ListStatus.js.map +0 -1
- package/Presentation/components/BottomInfoBar/index.d.ts +0 -1
- package/Presentation/components/BottomInfoBar/index.js +0 -3
- package/Presentation/components/BottomInfoBar/index.js.map +0 -1
- package/Presentation/components/Cells/CellActions/CellActions.d.ts +0 -2
- package/Presentation/components/Cells/CellActions/CellActions.js +0 -24
- package/Presentation/components/Cells/CellActions/CellActions.js.map +0 -1
- package/Presentation/components/Cells/CellActions/index.d.ts +0 -1
- package/Presentation/components/Cells/CellActions/index.js +0 -3
- package/Presentation/components/Cells/CellActions/index.js.map +0 -1
- package/Presentation/components/Cells/CellRevision/CellRevision.d.ts +0 -2
- package/Presentation/components/Cells/CellRevision/CellRevision.js +0 -20
- package/Presentation/components/Cells/CellRevision/CellRevision.js.map +0 -1
- package/Presentation/components/Cells/CellRevision/CellRevision.styled.d.ts +0 -12
- package/Presentation/components/Cells/CellRevision/CellRevision.styled.js +0 -47
- package/Presentation/components/Cells/CellRevision/CellRevision.styled.js.map +0 -1
- package/Presentation/components/Cells/CellRevision/index.d.ts +0 -1
- package/Presentation/components/Cells/CellRevision/index.js +0 -3
- package/Presentation/components/Cells/CellRevision/index.js.map +0 -1
- package/Presentation/components/Cells/CellScheduledBy/CellScheduledBy.d.ts +0 -2
- package/Presentation/components/Cells/CellScheduledBy/CellScheduledBy.js +0 -13
- package/Presentation/components/Cells/CellScheduledBy/CellScheduledBy.js.map +0 -1
- package/Presentation/components/Cells/CellScheduledBy/index.d.ts +0 -1
- package/Presentation/components/Cells/CellScheduledBy/index.js +0 -3
- package/Presentation/components/Cells/CellScheduledBy/index.js.map +0 -1
- package/Presentation/components/Cells/CellScheduledOn/CellScheduledOn.d.ts +0 -2
- package/Presentation/components/Cells/CellScheduledOn/CellScheduledOn.js +0 -20
- package/Presentation/components/Cells/CellScheduledOn/CellScheduledOn.js.map +0 -1
- package/Presentation/components/Cells/CellScheduledOn/index.d.ts +0 -1
- package/Presentation/components/Cells/CellScheduledOn/index.js +0 -3
- package/Presentation/components/Cells/CellScheduledOn/index.js.map +0 -1
- package/Presentation/components/Cells/CellTitle/CellTitle.d.ts +0 -2
- package/Presentation/components/Cells/CellTitle/CellTitle.js +0 -17
- package/Presentation/components/Cells/CellTitle/CellTitle.js.map +0 -1
- package/Presentation/components/Cells/CellTitle/CellTitle.styled.d.ts +0 -12
- package/Presentation/components/Cells/CellTitle/CellTitle.styled.js +0 -47
- package/Presentation/components/Cells/CellTitle/CellTitle.styled.js.map +0 -1
- package/Presentation/components/Cells/CellTitle/index.d.ts +0 -1
- package/Presentation/components/Cells/CellTitle/index.js +0 -3
- package/Presentation/components/Cells/CellTitle/index.js.map +0 -1
- package/Presentation/components/Cells/CellType/CellType.d.ts +0 -2
- package/Presentation/components/Cells/CellType/CellType.js +0 -17
- package/Presentation/components/Cells/CellType/CellType.js.map +0 -1
- package/Presentation/components/Cells/CellType/CellType.styled.d.ts +0 -12
- package/Presentation/components/Cells/CellType/CellType.styled.js +0 -47
- package/Presentation/components/Cells/CellType/CellType.styled.js.map +0 -1
- package/Presentation/components/Cells/CellType/index.d.ts +0 -1
- package/Presentation/components/Cells/CellType/index.js +0 -3
- package/Presentation/components/Cells/CellType/index.js.map +0 -1
- package/Presentation/components/Cells/index.d.ts +0 -6
- package/Presentation/components/Cells/index.js +0 -8
- package/Presentation/components/Cells/index.js.map +0 -1
- package/Presentation/components/Empty/Empty.d.ts +0 -2
- package/Presentation/components/Empty/Empty.js +0 -22
- package/Presentation/components/Empty/Empty.js.map +0 -1
- package/Presentation/components/Empty/Empty.styled.d.ts +0 -9
- package/Presentation/components/Empty/Empty.styled.js +0 -32
- package/Presentation/components/Empty/Empty.styled.js.map +0 -1
- package/Presentation/components/Empty/index.d.ts +0 -1
- package/Presentation/components/Empty/index.js +0 -3
- package/Presentation/components/Empty/index.js.map +0 -1
- package/Presentation/components/ScheduleDialog/ScheduleDialogAction.d.ts +0 -15
- package/Presentation/components/ScheduleDialog/ScheduleDialogAction.js +0 -51
- package/Presentation/components/ScheduleDialog/ScheduleDialogAction.js.map +0 -1
- package/Presentation/components/ScheduleDialog/index.d.ts +0 -2
- package/Presentation/components/ScheduleDialog/index.js +0 -4
- package/Presentation/components/ScheduleDialog/index.js.map +0 -1
- package/Presentation/components/ScheduleDialog/types.d.ts +0 -15
- package/Presentation/components/ScheduleDialog/types.js +0 -3
- package/Presentation/components/ScheduleDialog/types.js.map +0 -1
- package/Presentation/components/ScheduleDialog/useScheduleDialog.d.ts +0 -19
- package/Presentation/components/ScheduleDialog/useScheduleDialog.js +0 -174
- package/Presentation/components/ScheduleDialog/useScheduleDialog.js.map +0 -1
- package/Presentation/components/SchedulerOverlay/SchedulerOverlay.d.ts +0 -7
- package/Presentation/components/SchedulerOverlay/SchedulerOverlay.js +0 -36
- package/Presentation/components/SchedulerOverlay/SchedulerOverlay.js.map +0 -1
- package/Presentation/components/SchedulerOverlay/index.d.ts +0 -1
- package/Presentation/components/SchedulerOverlay/index.js +0 -3
- package/Presentation/components/SchedulerOverlay/index.js.map +0 -1
- package/Presentation/components/SearchInput/SearchInput.d.ts +0 -2
- package/Presentation/components/SearchInput/SearchInput.js +0 -37
- package/Presentation/components/SearchInput/SearchInput.js.map +0 -1
- package/Presentation/components/SearchInput/index.d.ts +0 -1
- package/Presentation/components/SearchInput/index.js +0 -3
- package/Presentation/components/SearchInput/index.js.map +0 -1
- package/Presentation/components/Table/Table.d.ts +0 -2
- package/Presentation/components/Table/Table.js +0 -29
- package/Presentation/components/Table/Table.js.map +0 -1
- package/Presentation/components/Table/index.d.ts +0 -1
- package/Presentation/components/Table/index.js +0 -3
- package/Presentation/components/Table/index.js.map +0 -1
- package/Presentation/components/Title/Title.d.ts +0 -5
- package/Presentation/components/Title/Title.js +0 -15
- package/Presentation/components/Title/Title.js.map +0 -1
- package/Presentation/components/Title/Title.styled.d.ts +0 -4
- package/Presentation/components/Title/Title.styled.js +0 -19
- package/Presentation/components/Title/Title.styled.js.map +0 -1
- package/Presentation/components/Title/index.d.ts +0 -1
- package/Presentation/components/Title/index.js +0 -3
- package/Presentation/components/Title/index.js.map +0 -1
- package/Presentation/configs/index.d.ts +0 -1
- package/Presentation/configs/index.js +0 -3
- package/Presentation/configs/index.js.map +0 -1
- package/Presentation/configs/list/Browser/EntryAction.d.ts +0 -7
- package/Presentation/configs/list/Browser/EntryAction.js +0 -16
- package/Presentation/configs/list/Browser/EntryAction.js.map +0 -1
- package/Presentation/configs/list/Browser/Table/Column.d.ts +0 -14
- package/Presentation/configs/list/Browser/Table/Column.js +0 -14
- package/Presentation/configs/list/Browser/Table/Column.js.map +0 -1
- package/Presentation/configs/list/Browser/Table/Sorting.d.ts +0 -5
- package/Presentation/configs/list/Browser/Table/Sorting.js +0 -10
- package/Presentation/configs/list/Browser/Table/Sorting.js.map +0 -1
- package/Presentation/configs/list/Browser/Table/index.d.ts +0 -19
- package/Presentation/configs/list/Browser/Table/index.js +0 -8
- package/Presentation/configs/list/Browser/Table/index.js.map +0 -1
- package/Presentation/configs/list/Browser/index.d.ts +0 -24
- package/Presentation/configs/list/Browser/index.js +0 -8
- package/Presentation/configs/list/Browser/index.js.map +0 -1
- package/Presentation/configs/list/SchedulerListConfig.d.ts +0 -33
- package/Presentation/configs/list/SchedulerListConfig.js +0 -29
- package/Presentation/configs/list/SchedulerListConfig.js.map +0 -1
- package/Presentation/configs/list/index.d.ts +0 -1
- package/Presentation/configs/list/index.js +0 -3
- package/Presentation/configs/list/index.js.map +0 -1
- package/Presentation/hooks/index.d.ts +0 -3
- package/Presentation/hooks/index.js +0 -5
- package/Presentation/hooks/index.js.map +0 -1
- package/Presentation/hooks/useCancelSchedulerItem.d.ts +0 -8
- package/Presentation/hooks/useCancelSchedulerItem.js +0 -32
- package/Presentation/hooks/useCancelSchedulerItem.js.map +0 -1
- package/Presentation/hooks/useScheduler.d.ts +0 -27
- package/Presentation/hooks/useScheduler.js +0 -51
- package/Presentation/hooks/useScheduler.js.map +0 -1
- package/Presentation/hooks/useSchedulerItem.d.ts +0 -12
- package/Presentation/hooks/useSchedulerItem.js +0 -9
- package/Presentation/hooks/useSchedulerItem.js.map +0 -1
- package/Presentation/index.d.ts +0 -24
- package/Presentation/index.js +0 -31
- package/Presentation/index.js.map +0 -1
- package/UseCases/CancelItem/CancelItemUseCase.d.ts +0 -7
- package/UseCases/CancelItem/CancelItemUseCase.js +0 -12
- package/UseCases/CancelItem/CancelItemUseCase.js.map +0 -1
- package/UseCases/CancelItem/ICancelItemUseCase.d.ts +0 -3
- package/UseCases/CancelItem/ICancelItemUseCase.js +0 -3
- package/UseCases/CancelItem/ICancelItemUseCase.js.map +0 -1
- package/UseCases/CancelItem/index.d.ts +0 -2
- package/UseCases/CancelItem/index.js +0 -4
- package/UseCases/CancelItem/index.js.map +0 -1
- package/UseCases/GetItem/GetItemUseCase.d.ts +0 -8
- package/UseCases/GetItem/GetItemUseCase.js +0 -12
- package/UseCases/GetItem/GetItemUseCase.js.map +0 -1
- package/UseCases/GetItem/IGetItemUseCase.d.ts +0 -4
- package/UseCases/GetItem/IGetItemUseCase.js +0 -3
- package/UseCases/GetItem/IGetItemUseCase.js.map +0 -1
- package/UseCases/GetItem/index.d.ts +0 -2
- package/UseCases/GetItem/index.js +0 -4
- package/UseCases/GetItem/index.js.map +0 -1
- package/UseCases/GetScheduledItem/GetScheduledItemUseCase.d.ts +0 -7
- package/UseCases/GetScheduledItem/GetScheduledItemUseCase.js +0 -13
- package/UseCases/GetScheduledItem/GetScheduledItemUseCase.js.map +0 -1
- package/UseCases/GetScheduledItem/IGetScheduledItemUseCase.d.ts +0 -4
- package/UseCases/GetScheduledItem/IGetScheduledItemUseCase.js +0 -3
- package/UseCases/GetScheduledItem/IGetScheduledItemUseCase.js.map +0 -1
- package/UseCases/GetScheduledItem/index.d.ts +0 -2
- package/UseCases/GetScheduledItem/index.js +0 -4
- package/UseCases/GetScheduledItem/index.js.map +0 -1
- package/UseCases/ListItems/IListItemsUseCase.d.ts +0 -4
- package/UseCases/ListItems/IListItemsUseCase.js +0 -3
- package/UseCases/ListItems/IListItemsUseCase.js.map +0 -1
- package/UseCases/ListItems/ListItemsUseCase.d.ts +0 -8
- package/UseCases/ListItems/ListItemsUseCase.js +0 -12
- package/UseCases/ListItems/ListItemsUseCase.js.map +0 -1
- package/UseCases/ListItems/ListItemsUseCaseWithSearch.d.ts +0 -9
- package/UseCases/ListItems/ListItemsUseCaseWithSearch.js +0 -20
- package/UseCases/ListItems/ListItemsUseCaseWithSearch.js.map +0 -1
- package/UseCases/ListItems/ListItemsUseCaseWithSorting.d.ts +0 -9
- package/UseCases/ListItems/ListItemsUseCaseWithSorting.js +0 -18
- package/UseCases/ListItems/ListItemsUseCaseWithSorting.js.map +0 -1
- package/UseCases/ListItems/index.d.ts +0 -4
- package/UseCases/ListItems/index.js +0 -6
- package/UseCases/ListItems/index.js.map +0 -1
- package/UseCases/ListMoreItems/IListMoreItemsUseCase.d.ts +0 -3
- package/UseCases/ListMoreItems/IListMoreItemsUseCase.js +0 -3
- package/UseCases/ListMoreItems/IListMoreItemsUseCase.js.map +0 -1
- package/UseCases/ListMoreItems/ListMoreItemsUseCase.d.ts +0 -7
- package/UseCases/ListMoreItems/ListMoreItemsUseCase.js +0 -12
- package/UseCases/ListMoreItems/ListMoreItemsUseCase.js.map +0 -1
- package/UseCases/ListMoreItems/index.d.ts +0 -2
- package/UseCases/ListMoreItems/index.js +0 -4
- package/UseCases/ListMoreItems/index.js.map +0 -1
- package/UseCases/PublishItem/IPublishItemUseCase.d.ts +0 -3
- package/UseCases/PublishItem/IPublishItemUseCase.js +0 -3
- package/UseCases/PublishItem/IPublishItemUseCase.js.map +0 -1
- package/UseCases/PublishItem/PublishItemUseCase.d.ts +0 -7
- package/UseCases/PublishItem/PublishItemUseCase.js +0 -12
- package/UseCases/PublishItem/PublishItemUseCase.js.map +0 -1
- package/UseCases/PublishItem/index.d.ts +0 -2
- package/UseCases/PublishItem/index.js +0 -4
- package/UseCases/PublishItem/index.js.map +0 -1
- package/UseCases/SearchItems/ISearchItemsUseCase.d.ts +0 -3
- package/UseCases/SearchItems/ISearchItemsUseCase.js +0 -3
- package/UseCases/SearchItems/ISearchItemsUseCase.js.map +0 -1
- package/UseCases/SearchItems/SearchItemsUseCase.d.ts +0 -7
- package/UseCases/SearchItems/SearchItemsUseCase.js +0 -12
- package/UseCases/SearchItems/SearchItemsUseCase.js.map +0 -1
- package/UseCases/SearchItems/index.d.ts +0 -2
- package/UseCases/SearchItems/index.js +0 -4
- package/UseCases/SearchItems/index.js.map +0 -1
- package/UseCases/SelectAllItems/ISelectAllItemsUseCase.d.ts +0 -3
- package/UseCases/SelectAllItems/ISelectAllItemsUseCase.js +0 -3
- package/UseCases/SelectAllItems/ISelectAllItemsUseCase.js.map +0 -1
- package/UseCases/SelectAllItems/SelectAllItemsUseCase.d.ts +0 -7
- package/UseCases/SelectAllItems/SelectAllItemsUseCase.js +0 -12
- package/UseCases/SelectAllItems/SelectAllItemsUseCase.js.map +0 -1
- package/UseCases/SelectAllItems/index.d.ts +0 -2
- package/UseCases/SelectAllItems/index.js +0 -4
- package/UseCases/SelectAllItems/index.js.map +0 -1
- package/UseCases/SelectItems/ISelectItemsUseCase.d.ts +0 -4
- package/UseCases/SelectItems/ISelectItemsUseCase.js +0 -3
- package/UseCases/SelectItems/ISelectItemsUseCase.js.map +0 -1
- package/UseCases/SelectItems/SelectItemsUseCase.d.ts +0 -7
- package/UseCases/SelectItems/SelectItemsUseCase.js +0 -12
- package/UseCases/SelectItems/SelectItemsUseCase.js.map +0 -1
- package/UseCases/SelectItems/index.d.ts +0 -2
- package/UseCases/SelectItems/index.js +0 -4
- package/UseCases/SelectItems/index.js.map +0 -1
- package/UseCases/SortItems/ISortItemsUseCase.d.ts +0 -4
- package/UseCases/SortItems/ISortItemsUseCase.js +0 -3
- package/UseCases/SortItems/ISortItemsUseCase.js.map +0 -1
- package/UseCases/SortItems/SortItemsUseCase.d.ts +0 -7
- package/UseCases/SortItems/SortItemsUseCase.js +0 -12
- package/UseCases/SortItems/SortItemsUseCase.js.map +0 -1
- package/UseCases/SortItems/index.d.ts +0 -2
- package/UseCases/SortItems/index.js +0 -4
- package/UseCases/SortItems/index.js.map +0 -1
- package/UseCases/UnSelectAllItems/IUnselectAllItemsUseCase.d.ts +0 -3
- package/UseCases/UnSelectAllItems/IUnselectAllItemsUseCase.js +0 -3
- package/UseCases/UnSelectAllItems/IUnselectAllItemsUseCase.js.map +0 -1
- package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.d.ts +0 -7
- package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.js +0 -12
- package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.js.map +0 -1
- package/UseCases/UnSelectAllItems/index.d.ts +0 -2
- package/UseCases/UnSelectAllItems/index.js +0 -4
- package/UseCases/UnSelectAllItems/index.js.map +0 -1
- package/UseCases/UnpublishItem/IUnpublishItemUseCase.d.ts +0 -3
- package/UseCases/UnpublishItem/IUnpublishItemUseCase.js +0 -3
- package/UseCases/UnpublishItem/IUnpublishItemUseCase.js.map +0 -1
- package/UseCases/UnpublishItem/UnpublishItemUseCase.d.ts +0 -7
- package/UseCases/UnpublishItem/UnpublishItemUseCase.js +0 -12
- package/UseCases/UnpublishItem/UnpublishItemUseCase.js.map +0 -1
- package/UseCases/UnpublishItem/index.d.ts +0 -2
- package/UseCases/UnpublishItem/index.js +0 -4
- package/UseCases/UnpublishItem/index.js.map +0 -1
- package/UseCases/index.d.ts +0 -11
- package/UseCases/index.js +0 -13
- package/UseCases/index.js.map +0 -1
- package/types.d.ts +0 -36
- package/types.js +0 -15
- package/types.js.map +0 -1
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import react, { useEffect } from "react";
|
|
2
|
+
import { observer } from "mobx-react-lite";
|
|
3
|
+
import { ReactComponent } from "@webiny/icons/access_time.svg";
|
|
4
|
+
import { Alert } from "@webiny/admin-ui";
|
|
5
|
+
import { ContentEntryFormContent } from "@webiny/app-headless-cms/presentation/contentEntries/views/layout/index.js";
|
|
6
|
+
import { useContentEntryFormPresenter } from "@webiny/app-headless-cms/exports/admin/cms/entry/editor.js";
|
|
7
|
+
import { ScheduleActionType } from "@webiny/app-scheduler/types.js";
|
|
8
|
+
import { formatUtcOffset, useDateFormatter } from "@webiny/app-admin";
|
|
9
|
+
import { useScheduledActionsPresenter } from "../../hooks/useScheduledActionsPresenter.js";
|
|
10
|
+
const ScheduledActionBar = observer(()=>{
|
|
11
|
+
const formPresenter = useContentEntryFormPresenter();
|
|
12
|
+
const presenter = useScheduledActionsPresenter();
|
|
13
|
+
const dateFormatter = useDateFormatter();
|
|
14
|
+
const vm = formPresenter.vm;
|
|
15
|
+
const entryId = vm.entry?.id;
|
|
16
|
+
const modelId = vm.model?.modelId;
|
|
17
|
+
useEffect(()=>{
|
|
18
|
+
if (entryId && modelId) presenter.loadForEntry(modelId, entryId);
|
|
19
|
+
}, [
|
|
20
|
+
presenter,
|
|
21
|
+
entryId,
|
|
22
|
+
modelId
|
|
23
|
+
]);
|
|
24
|
+
const scheduled = entryId ? presenter.getScheduledAction(entryId) : void 0;
|
|
25
|
+
const status = vm.entry?.meta?.status;
|
|
26
|
+
const redundant = !!scheduled && (scheduled.actionType === ScheduleActionType.unpublish ? "unpublished" === status : "published" === status);
|
|
27
|
+
if (!scheduled || redundant) return null;
|
|
28
|
+
const goLiveOn = scheduled.publishOn || scheduled.unpublishOn;
|
|
29
|
+
const actionLabel = scheduled.actionType === ScheduleActionType.unpublish ? "unpublish" : "publish";
|
|
30
|
+
return /*#__PURE__*/ react.createElement("div", {
|
|
31
|
+
className: "max-w-screen bg-white p-sm border-solid border-b-sm border-neutral-dimmed"
|
|
32
|
+
}, /*#__PURE__*/ react.createElement(Alert, {
|
|
33
|
+
type: "warning",
|
|
34
|
+
variant: "subtle",
|
|
35
|
+
icon: /*#__PURE__*/ react.createElement(ReactComponent, null)
|
|
36
|
+
}, goLiveOn ? /*#__PURE__*/ react.createElement(react.Fragment, null, "This entry is scheduled to ", actionLabel, " on", " ", /*#__PURE__*/ react.createElement("strong", null, dateFormatter.format(goLiveOn), " (", formatUtcOffset(), ")"), ".") : /*#__PURE__*/ react.createElement(react.Fragment, null, "This entry is scheduled to ", actionLabel, ".")));
|
|
37
|
+
});
|
|
38
|
+
const ScheduledActionAlertDecorator = ContentEntryFormContent.createDecorator((Original)=>function(props) {
|
|
39
|
+
return /*#__PURE__*/ react.createElement(react.Fragment, null, /*#__PURE__*/ react.createElement(ScheduledActionBar, null), /*#__PURE__*/ react.createElement(Original, props));
|
|
40
|
+
});
|
|
41
|
+
export { ScheduledActionAlertDecorator };
|
|
42
|
+
|
|
43
|
+
//# sourceMappingURL=ScheduledActionAlert.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"components/Editor/ScheduledActionAlert.js","sources":["../../../src/components/Editor/ScheduledActionAlert.tsx"],"sourcesContent":["import React, { useEffect } from \"react\";\nimport { observer } from \"mobx-react-lite\";\nimport { ReactComponent as ScheduledIcon } from \"@webiny/icons/access_time.svg\";\nimport { Alert } from \"@webiny/admin-ui\";\nimport { ContentEntryFormContent } from \"@webiny/app-headless-cms/presentation/contentEntries/views/layout/index.js\";\nimport { useContentEntryFormPresenter } from \"@webiny/app-headless-cms/exports/admin/cms/entry/editor.js\";\nimport { ScheduleActionType } from \"@webiny/app-scheduler/types.js\";\nimport { useDateFormatter } from \"@webiny/app-admin\";\nimport { useScheduledActionsPresenter } from \"~/hooks/useScheduledActionsPresenter.js\";\nimport { formatUtcOffset } from \"@webiny/app-admin\";\n\n/**\n * Full-width bar shown below the entry-form header (above the form content) when the entry has a\n * scheduled publish/unpublish. Positioned like the workflow bar for visual consistency.\n */\nconst ScheduledActionBar = observer(() => {\n const formPresenter = useContentEntryFormPresenter();\n const presenter = useScheduledActionsPresenter();\n const dateFormatter = useDateFormatter();\n\n const vm = formPresenter.vm;\n const entryId = vm.entry?.id;\n const modelId = vm.model?.modelId;\n\n useEffect(() => {\n if (entryId && modelId) {\n presenter.loadForEntry(modelId, entryId);\n }\n }, [presenter, entryId, modelId]);\n\n const scheduled = entryId ? presenter.getScheduledAction(entryId) : undefined;\n\n // Reconcile against the entry's current status: a direct publish/unpublish supersedes the\n // scheduled action (the API cancels it asynchronously), so hide the bar immediately.\n const status = vm.entry?.meta?.status;\n const redundant =\n !!scheduled &&\n (scheduled.actionType === ScheduleActionType.unpublish\n ? status === \"unpublished\"\n : status === \"published\");\n\n if (!scheduled || redundant) {\n return null;\n }\n\n const goLiveOn = scheduled.publishOn || scheduled.unpublishOn;\n const actionLabel =\n scheduled.actionType === ScheduleActionType.unpublish ? \"unpublish\" : \"publish\";\n\n // Match the workflow bar: a full-width white strip (below the header) containing the alert.\n return (\n <div\n className={\"max-w-screen bg-white p-sm border-solid border-b-sm border-neutral-dimmed\"}\n >\n <Alert type={\"warning\"} variant={\"subtle\"} icon={<ScheduledIcon />}>\n {goLiveOn ? (\n <>\n This entry is scheduled to {actionLabel} on{\" \"}\n <strong>\n {dateFormatter.format(goLiveOn)} ({formatUtcOffset()})\n </strong>\n .\n </>\n ) : (\n <>This entry is scheduled to {actionLabel}.</>\n )}\n </Alert>\n </div>\n );\n});\n\n/**\n * Decorates the content entry form layout to render the scheduled-action bar below the header,\n * above the form content (mirroring how the workflow bar is positioned).\n */\nexport const ScheduledActionAlertDecorator = ContentEntryFormContent.createDecorator(Original => {\n return function ContentEntryFormContentWithScheduledBar(props) {\n return (\n <>\n <ScheduledActionBar />\n <Original {...props} />\n </>\n );\n };\n});\n"],"names":["ScheduledActionBar","observer","formPresenter","useContentEntryFormPresenter","presenter","useScheduledActionsPresenter","dateFormatter","useDateFormatter","vm","entryId","modelId","useEffect","scheduled","undefined","status","redundant","ScheduleActionType","goLiveOn","actionLabel","Alert","ScheduledIcon","formatUtcOffset","ScheduledActionAlertDecorator","ContentEntryFormContent","Original","props"],"mappings":";;;;;;;;;AAeA,MAAMA,qBAAqBC,SAAS;IAChC,MAAMC,gBAAgBC;IACtB,MAAMC,YAAYC;IAClB,MAAMC,gBAAgBC;IAEtB,MAAMC,KAAKN,cAAc,EAAE;IAC3B,MAAMO,UAAUD,GAAG,KAAK,EAAE;IAC1B,MAAME,UAAUF,GAAG,KAAK,EAAE;IAE1BG,UAAU;QACN,IAAIF,WAAWC,SACXN,UAAU,YAAY,CAACM,SAASD;IAExC,GAAG;QAACL;QAAWK;QAASC;KAAQ;IAEhC,MAAME,YAAYH,UAAUL,UAAU,kBAAkB,CAACK,WAAWI;IAIpE,MAAMC,SAASN,GAAG,KAAK,EAAE,MAAM;IAC/B,MAAMO,YACF,CAAC,CAACH,aACDA,CAAAA,UAAU,UAAU,KAAKI,mBAAmB,SAAS,GAChDF,AAAW,kBAAXA,SACAA,AAAW,gBAAXA,MAAqB;IAE/B,IAAI,CAACF,aAAaG,WACd,OAAO;IAGX,MAAME,WAAWL,UAAU,SAAS,IAAIA,UAAU,WAAW;IAC7D,MAAMM,cACFN,UAAU,UAAU,KAAKI,mBAAmB,SAAS,GAAG,cAAc;IAG1E,OAAO,WAAP,GACI,oBAAC;QACG,WAAW;qBAEX,oBAACG,OAAKA;QAAC,MAAM;QAAW,SAAS;QAAU,oBAAM,oBAACC,gBAAaA;OAC1DH,WAAW,WAAXA,GACG,0CAAE,+BAC8BC,aAAY,OAAI,mBAC5C,oBAAC,gBACIZ,cAAc,MAAM,CAACW,WAAU,MAAGI,mBAAkB,MAChD,qBAIb,0CAAE,+BAA4BH,aAAY;AAK9D;AAMO,MAAMI,gCAAgCC,wBAAwB,eAAe,CAACC,CAAAA,WAC1E,SAAiDC,KAAK;QACzD,OAAO,WAAP,GACI,wDACI,oBAACzB,oBAAkBA,OAAAA,WAAAA,GACnB,oBAACwB,UAAaC;IAG1B"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { usePermission } from "@webiny/app-headless-cms/exports/admin/cms.js";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
const usePermissions = ()=>{
|
|
4
|
+
const permission = usePermission();
|
|
5
|
+
const canPublish = useMemo(()=>permission.canPublish("cms.contentEntry"), [
|
|
6
|
+
permission.canPublish
|
|
7
|
+
]);
|
|
8
|
+
const canUnpublish = useMemo(()=>permission.canUnpublish("cms.contentEntry"), [
|
|
9
|
+
permission.canUnpublish
|
|
10
|
+
]);
|
|
11
|
+
return {
|
|
12
|
+
canPublish,
|
|
13
|
+
canUnpublish
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export { usePermissions };
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=usePermissions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks/usePermissions.js","sources":["../../src/hooks/usePermissions.ts"],"sourcesContent":["import { usePermission } from \"@webiny/app-headless-cms/exports/admin/cms.js\";\nimport { useMemo } from \"react\";\n\nexport const usePermissions = () => {\n const permission = usePermission();\n\n const canPublish = useMemo(() => {\n return permission.canPublish(\"cms.contentEntry\");\n }, [permission.canPublish]);\n\n const canUnpublish = useMemo(() => {\n return permission.canUnpublish(\"cms.contentEntry\");\n }, [permission.canUnpublish]);\n\n return {\n canPublish,\n canUnpublish\n };\n};\n"],"names":["usePermissions","permission","usePermission","canPublish","useMemo","canUnpublish"],"mappings":";;AAGO,MAAMA,iBAAiB;IAC1B,MAAMC,aAAaC;IAEnB,MAAMC,aAAaC,QAAQ,IAChBH,WAAW,UAAU,CAAC,qBAC9B;QAACA,WAAW,UAAU;KAAC;IAE1B,MAAMI,eAAeD,QAAQ,IAClBH,WAAW,YAAY,CAAC,qBAChC;QAACA,WAAW,YAAY;KAAC;IAE5B,OAAO;QACHE;QACAE;IACJ;AACJ"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ScheduledActionsPresenter } from "../presentation/scheduledActions/abstractions.js";
|
|
2
|
+
/**
|
|
3
|
+
* Resolves the shared ScheduledActionsPresenter — the source of scheduled-action state for the
|
|
4
|
+
* Live column, the entry-form bar and the publish/unpublish dialog notices.
|
|
5
|
+
*/
|
|
6
|
+
export declare const useScheduledActionsPresenter: () => ScheduledActionsPresenter.Interface;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { useMemo } from "react";
|
|
2
|
+
import { useContainer } from "@webiny/app";
|
|
3
|
+
import { ScheduledActionsPresenter } from "../presentation/scheduledActions/abstractions.js";
|
|
4
|
+
const useScheduledActionsPresenter = ()=>{
|
|
5
|
+
const container = useContainer();
|
|
6
|
+
return useMemo(()=>container.resolve(ScheduledActionsPresenter), [
|
|
7
|
+
container
|
|
8
|
+
]);
|
|
9
|
+
};
|
|
10
|
+
export { useScheduledActionsPresenter };
|
|
11
|
+
|
|
12
|
+
//# sourceMappingURL=useScheduledActionsPresenter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"hooks/useScheduledActionsPresenter.js","sources":["../../src/hooks/useScheduledActionsPresenter.ts"],"sourcesContent":["import { useMemo } from \"react\";\nimport { useContainer } from \"@webiny/app\";\nimport { ScheduledActionsPresenter } from \"~/presentation/scheduledActions/abstractions.js\";\n\n/**\n * Resolves the shared ScheduledActionsPresenter — the source of scheduled-action state for the\n * Live column, the entry-form bar and the publish/unpublish dialog notices.\n */\nexport const useScheduledActionsPresenter = (): ScheduledActionsPresenter.Interface => {\n const container = useContainer();\n return useMemo(() => container.resolve(ScheduledActionsPresenter), [container]);\n};\n"],"names":["useScheduledActionsPresenter","container","useContainer","useMemo","ScheduledActionsPresenter"],"mappings":";;;AAQO,MAAMA,+BAA+B;IACxC,MAAMC,YAAYC;IAClB,OAAOC,QAAQ,IAAMF,UAAU,OAAO,CAACG,4BAA4B;QAACH;KAAU;AAClF"}
|
package/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
export
|
|
1
|
+
import React from "react";
|
|
2
|
+
export declare const CmsScheduler: () => React.JSX.Element;
|
package/index.js
CHANGED
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import react from "react";
|
|
2
|
+
import { RegisterFeature } from "@webiny/app-admin";
|
|
3
|
+
import { ScheduledActionsPresenterFeature } from "./presentation/scheduledActions/feature.js";
|
|
4
|
+
import { BrowserConfig, EditorConfig, PublishScheduleNoticeDecorator, ScheduledActionAlertDecorator, UnpublishScheduleNoticeDecorator } from "./components/index.js";
|
|
5
|
+
const CmsScheduler = ()=>/*#__PURE__*/ react.createElement(react.Fragment, null, /*#__PURE__*/ react.createElement(RegisterFeature, {
|
|
6
|
+
feature: ScheduledActionsPresenterFeature
|
|
7
|
+
}), /*#__PURE__*/ react.createElement(BrowserConfig, null), /*#__PURE__*/ react.createElement(EditorConfig, null), /*#__PURE__*/ react.createElement(ScheduledActionAlertDecorator, null), /*#__PURE__*/ react.createElement(PublishScheduleNoticeDecorator, null), /*#__PURE__*/ react.createElement(UnpublishScheduleNoticeDecorator, null));
|
|
8
|
+
export { CmsScheduler };
|
|
3
9
|
|
|
4
10
|
//# sourceMappingURL=index.js.map
|
package/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../src/index.tsx"],"sourcesContent":["import React from \"react\";\nimport { RegisterFeature } from \"@webiny/app-admin\";\nimport { ScheduledActionsPresenterFeature } from \"./presentation/scheduledActions/feature.js\";\nimport {\n EditorConfig,\n BrowserConfig,\n ScheduledActionAlertDecorator,\n PublishScheduleNoticeDecorator,\n UnpublishScheduleNoticeDecorator\n} from \"./components/index.js\";\n\nexport const CmsScheduler = () => {\n return (\n <>\n <RegisterFeature feature={ScheduledActionsPresenterFeature} />\n <BrowserConfig />\n <EditorConfig />\n <ScheduledActionAlertDecorator />\n <PublishScheduleNoticeDecorator />\n <UnpublishScheduleNoticeDecorator />\n </>\n );\n};\n"],"names":["CmsScheduler","RegisterFeature","ScheduledActionsPresenterFeature","BrowserConfig","EditorConfig","ScheduledActionAlertDecorator","PublishScheduleNoticeDecorator","UnpublishScheduleNoticeDecorator"],"mappings":";;;;AAWO,MAAMA,eAAe,IACjB,WAAP,GACI,wDACI,oBAACC,iBAAeA;QAAC,SAASC;sBAC1B,oBAACC,eAAaA,OAAAA,WAAAA,GACd,oBAACC,cAAYA,OAAAA,WAAAA,GACb,oBAACC,+BAA6BA,OAAAA,WAAAA,GAC9B,oBAACC,gCAA8BA,OAAAA,WAAAA,GAC/B,oBAACC,kCAAgCA"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app-headless-cms-scheduler",
|
|
3
|
-
"version": "0.0.0-unstable.
|
|
4
|
-
"
|
|
3
|
+
"version": "0.0.0-unstable.eb81deee7e",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"exports": {
|
|
6
|
+
".": "./index.js",
|
|
7
|
+
"./*": "./*"
|
|
8
|
+
},
|
|
5
9
|
"repository": {
|
|
6
10
|
"type": "git",
|
|
7
11
|
"url": "https://github.com/webiny/webiny-js.git"
|
|
@@ -9,48 +13,35 @@
|
|
|
9
13
|
"author": "Webiny Ltd",
|
|
10
14
|
"license": "MIT",
|
|
11
15
|
"dependencies": {
|
|
12
|
-
"@
|
|
13
|
-
"@
|
|
14
|
-
"@
|
|
15
|
-
"@webiny/
|
|
16
|
-
"@webiny/app-
|
|
17
|
-
"@webiny/app-
|
|
18
|
-
"@webiny/
|
|
19
|
-
"@webiny/
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"@webiny/ui": "0.0.0-unstable.eb196ccd2f",
|
|
25
|
-
"@webiny/utils": "0.0.0-unstable.eb196ccd2f",
|
|
26
|
-
"@webiny/validation": "0.0.0-unstable.eb196ccd2f",
|
|
27
|
-
"apollo-client": "2.6.10",
|
|
28
|
-
"lodash": "4.17.21",
|
|
29
|
-
"mobx": "6.9.0",
|
|
30
|
-
"mobx-react-lite": "3.4.3",
|
|
31
|
-
"prop-types": "15.8.1",
|
|
32
|
-
"react": "18.2.0",
|
|
33
|
-
"react-dom": "18.2.0"
|
|
16
|
+
"@webiny/admin-ui": "0.0.0-unstable.eb81deee7e",
|
|
17
|
+
"@webiny/app": "0.0.0-unstable.eb81deee7e",
|
|
18
|
+
"@webiny/app-admin": "0.0.0-unstable.eb81deee7e",
|
|
19
|
+
"@webiny/app-headless-cms": "0.0.0-unstable.eb81deee7e",
|
|
20
|
+
"@webiny/app-headless-cms-common": "0.0.0-unstable.eb81deee7e",
|
|
21
|
+
"@webiny/app-scheduler": "0.0.0-unstable.eb81deee7e",
|
|
22
|
+
"@webiny/feature": "0.0.0-unstable.eb81deee7e",
|
|
23
|
+
"@webiny/icons": "0.0.0-unstable.eb81deee7e",
|
|
24
|
+
"mobx": "7.0.3",
|
|
25
|
+
"mobx-react-lite": "5.0.3",
|
|
26
|
+
"react": "18.3.1",
|
|
27
|
+
"react-dom": "18.3.1"
|
|
34
28
|
},
|
|
35
29
|
"devDependencies": {
|
|
36
|
-
"@
|
|
37
|
-
"@
|
|
38
|
-
"
|
|
39
|
-
"
|
|
40
|
-
"typescript": "5.3.3"
|
|
30
|
+
"@types/react": "18.3.31",
|
|
31
|
+
"@webiny/build-tools": "0.0.0-unstable.eb81deee7e",
|
|
32
|
+
"rimraf": "6.1.3",
|
|
33
|
+
"typescript": "7.0.2"
|
|
41
34
|
},
|
|
42
35
|
"publishConfig": {
|
|
43
|
-
"access": "public"
|
|
44
|
-
"directory": "dist"
|
|
45
|
-
},
|
|
46
|
-
"scripts": {
|
|
47
|
-
"build": "node ../cli/bin.js run build",
|
|
48
|
-
"watch": "node ../cli/bin.js run watch"
|
|
36
|
+
"access": "public"
|
|
49
37
|
},
|
|
50
38
|
"svgo": {
|
|
51
39
|
"plugins": {
|
|
52
40
|
"removeViewBox": false
|
|
53
41
|
}
|
|
54
42
|
},
|
|
55
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "b8aec8a1be3f25c3b428b357fe1e352c7cbff9ae",
|
|
44
|
+
"webiny": {
|
|
45
|
+
"publishFrom": "dist"
|
|
46
|
+
}
|
|
56
47
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { type IContentEntriesPresenter, type IContentEntriesInitConfig } from "@webiny/app-headless-cms/presentation/contentEntries/list/abstractions.js";
|
|
2
|
+
import { ScheduledActionsPresenter } from "./abstractions.js";
|
|
3
|
+
/**
|
|
4
|
+
* Decorates the content-entries list presenter so the scheduled actions for the current model are
|
|
5
|
+
* (re)loaded whenever the visible rows change. The reaction key includes each row's status/live,
|
|
6
|
+
* so a direct publish/unpublish (which changes those, and lets the API cancel a schedule) triggers
|
|
7
|
+
* a refresh without any extra signalling.
|
|
8
|
+
*/
|
|
9
|
+
declare class ContentEntriesPresenterWithScheduling implements IContentEntriesPresenter {
|
|
10
|
+
private scheduledActions;
|
|
11
|
+
private original;
|
|
12
|
+
private _disposeReaction;
|
|
13
|
+
constructor(scheduledActions: ScheduledActionsPresenter.Interface, original: IContentEntriesPresenter);
|
|
14
|
+
get vm(): import("@webiny/app-headless-cms/presentation/contentEntries/list/abstractions.js").IContentEntriesViewModel;
|
|
15
|
+
get list(): import("@webiny/app-admin/presentation/listPresenter/abstractions.js").IListPresenter<import("@webiny/app-headless-cms/types.js").CmsContentEntry<import("@webiny/app/types.js").GenericRecord>>;
|
|
16
|
+
get folders(): import("@webiny/app-aco/index.js").IFolderTreePresenter;
|
|
17
|
+
init(config?: IContentEntriesInitConfig): void;
|
|
18
|
+
dispose(): void;
|
|
19
|
+
selectEntry(id: string): void;
|
|
20
|
+
deselectEntry(): void;
|
|
21
|
+
createEntry(): void;
|
|
22
|
+
deleteEntry(id: string): Promise<boolean>;
|
|
23
|
+
publishEntry(id: string): Promise<boolean>;
|
|
24
|
+
unpublishEntry(id: string): Promise<boolean>;
|
|
25
|
+
moveEntry(id: string, folderId: string): Promise<boolean>;
|
|
26
|
+
duplicateEntry(entry: Parameters<IContentEntriesPresenter["duplicateEntry"]>[0]): Promise<false | import("@webiny/app-headless-cms/presentation/contentEntries/list/abstractions.js").IDuplicateEntryResult>;
|
|
27
|
+
}
|
|
28
|
+
export declare const ContentEntriesPresenterSchedulingDecorator: typeof ContentEntriesPresenterWithScheduling & {
|
|
29
|
+
__abstraction: import("@webiny/di").Abstraction<IContentEntriesPresenter>;
|
|
30
|
+
};
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { compareStructural, reaction } from "mobx";
|
|
2
|
+
import { ContentEntriesPresenter } from "@webiny/app-headless-cms/presentation/contentEntries/list/abstractions.js";
|
|
3
|
+
import { ScheduledActionsPresenter } from "./abstractions.js";
|
|
4
|
+
class ContentEntriesPresenterWithScheduling {
|
|
5
|
+
constructor(scheduledActions, original){
|
|
6
|
+
this.scheduledActions = scheduledActions;
|
|
7
|
+
this.original = original;
|
|
8
|
+
this._disposeReaction = null;
|
|
9
|
+
}
|
|
10
|
+
get vm() {
|
|
11
|
+
return this.original.vm;
|
|
12
|
+
}
|
|
13
|
+
get list() {
|
|
14
|
+
return this.original.list;
|
|
15
|
+
}
|
|
16
|
+
get folders() {
|
|
17
|
+
return this.original.folders;
|
|
18
|
+
}
|
|
19
|
+
init(config) {
|
|
20
|
+
this.original.init(config);
|
|
21
|
+
this._disposeReaction = reaction(()=>this.original.list.vm.rows.map((row)=>`${row.id}:${row.meta?.status ?? ""}:${row.live?.version ?? ""}`), (keys)=>{
|
|
22
|
+
if (0 === keys.length) return;
|
|
23
|
+
this.scheduledActions.loadForModel(this.original.vm.model.modelId);
|
|
24
|
+
}, {
|
|
25
|
+
fireImmediately: true,
|
|
26
|
+
equals: compareStructural
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
dispose() {
|
|
30
|
+
if (this._disposeReaction) {
|
|
31
|
+
this._disposeReaction();
|
|
32
|
+
this._disposeReaction = null;
|
|
33
|
+
}
|
|
34
|
+
this.scheduledActions.dispose();
|
|
35
|
+
this.original.dispose();
|
|
36
|
+
}
|
|
37
|
+
selectEntry(id) {
|
|
38
|
+
this.original.selectEntry(id);
|
|
39
|
+
}
|
|
40
|
+
deselectEntry() {
|
|
41
|
+
this.original.deselectEntry();
|
|
42
|
+
}
|
|
43
|
+
createEntry() {
|
|
44
|
+
this.original.createEntry();
|
|
45
|
+
}
|
|
46
|
+
deleteEntry(id) {
|
|
47
|
+
return this.original.deleteEntry(id);
|
|
48
|
+
}
|
|
49
|
+
publishEntry(id) {
|
|
50
|
+
return this.original.publishEntry(id);
|
|
51
|
+
}
|
|
52
|
+
unpublishEntry(id) {
|
|
53
|
+
return this.original.unpublishEntry(id);
|
|
54
|
+
}
|
|
55
|
+
moveEntry(id, folderId) {
|
|
56
|
+
return this.original.moveEntry(id, folderId);
|
|
57
|
+
}
|
|
58
|
+
duplicateEntry(entry) {
|
|
59
|
+
return this.original.duplicateEntry(entry);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
const ContentEntriesPresenterSchedulingDecorator = ContentEntriesPresenter.createDecorator({
|
|
63
|
+
decorator: ContentEntriesPresenterWithScheduling,
|
|
64
|
+
dependencies: [
|
|
65
|
+
ScheduledActionsPresenter
|
|
66
|
+
]
|
|
67
|
+
});
|
|
68
|
+
export { ContentEntriesPresenterSchedulingDecorator };
|
|
69
|
+
|
|
70
|
+
//# sourceMappingURL=ContentEntriesPresenterSchedulingDecorator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/scheduledActions/ContentEntriesPresenterSchedulingDecorator.js","sources":["../../../src/presentation/scheduledActions/ContentEntriesPresenterSchedulingDecorator.ts"],"sourcesContent":["import { compareStructural, reaction } from \"mobx\";\nimport type { IReactionDisposer } from \"mobx\";\nimport {\n ContentEntriesPresenter,\n type IContentEntriesPresenter,\n type IContentEntriesInitConfig\n} from \"@webiny/app-headless-cms/presentation/contentEntries/list/abstractions.js\";\nimport { ScheduledActionsPresenter } from \"./abstractions.js\";\n\n/**\n * Decorates the content-entries list presenter so the scheduled actions for the current model are\n * (re)loaded whenever the visible rows change. The reaction key includes each row's status/live,\n * so a direct publish/unpublish (which changes those, and lets the API cancel a schedule) triggers\n * a refresh without any extra signalling.\n */\nclass ContentEntriesPresenterWithScheduling implements IContentEntriesPresenter {\n private _disposeReaction: IReactionDisposer | null = null;\n\n constructor(\n private scheduledActions: ScheduledActionsPresenter.Interface,\n private original: IContentEntriesPresenter\n ) {}\n\n get vm() {\n return this.original.vm;\n }\n\n get list() {\n return this.original.list;\n }\n\n get folders() {\n return this.original.folders;\n }\n\n init(config?: IContentEntriesInitConfig): void {\n this.original.init(config);\n\n this._disposeReaction = reaction(\n () =>\n this.original.list.vm.rows.map(\n row => `${row.id}:${row.meta?.status ?? \"\"}:${row.live?.version ?? \"\"}`\n ),\n keys => {\n if (keys.length === 0) {\n return;\n }\n this.scheduledActions.loadForModel(this.original.vm.model.modelId);\n },\n { fireImmediately: true, equals: compareStructural }\n );\n }\n\n dispose(): void {\n if (this._disposeReaction) {\n this._disposeReaction();\n this._disposeReaction = null;\n }\n this.scheduledActions.dispose();\n this.original.dispose();\n }\n\n selectEntry(id: string) {\n this.original.selectEntry(id);\n }\n\n deselectEntry() {\n this.original.deselectEntry();\n }\n\n createEntry() {\n this.original.createEntry();\n }\n\n deleteEntry(id: string) {\n return this.original.deleteEntry(id);\n }\n\n publishEntry(id: string) {\n return this.original.publishEntry(id);\n }\n\n unpublishEntry(id: string) {\n return this.original.unpublishEntry(id);\n }\n\n moveEntry(id: string, folderId: string) {\n return this.original.moveEntry(id, folderId);\n }\n\n duplicateEntry(entry: Parameters<IContentEntriesPresenter[\"duplicateEntry\"]>[0]) {\n return this.original.duplicateEntry(entry);\n }\n}\n\nexport const ContentEntriesPresenterSchedulingDecorator = ContentEntriesPresenter.createDecorator({\n decorator: ContentEntriesPresenterWithScheduling,\n dependencies: [ScheduledActionsPresenter]\n});\n"],"names":["ContentEntriesPresenterWithScheduling","scheduledActions","original","config","reaction","row","keys","compareStructural","id","folderId","entry","ContentEntriesPresenterSchedulingDecorator","ContentEntriesPresenter","ScheduledActionsPresenter"],"mappings":";;;AAeA,MAAMA;IAGF,YACYC,gBAAqD,EACrDC,QAAkC,CAC5C;aAFUD,gBAAgB,GAAhBA;aACAC,QAAQ,GAARA;aAJJ,gBAAgB,GAA6B;IAKlD;IAEH,IAAI,KAAK;QACL,OAAO,IAAI,CAAC,QAAQ,CAAC,EAAE;IAC3B;IAEA,IAAI,OAAO;QACP,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI;IAC7B;IAEA,IAAI,UAAU;QACV,OAAO,IAAI,CAAC,QAAQ,CAAC,OAAO;IAChC;IAEA,KAAKC,MAAkC,EAAQ;QAC3C,IAAI,CAAC,QAAQ,CAAC,IAAI,CAACA;QAEnB,IAAI,CAAC,gBAAgB,GAAGC,SACpB,IACI,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG,CAC1BC,CAAAA,MAAO,GAAGA,IAAI,EAAE,CAAC,CAAC,EAAEA,IAAI,IAAI,EAAE,UAAU,GAAG,CAAC,EAAEA,IAAI,IAAI,EAAE,WAAW,IAAI,GAE/EC,CAAAA;YACI,IAAIA,AAAgB,MAAhBA,KAAK,MAAM,EACX;YAEJ,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,OAAO;QACrE,GACA;YAAE,iBAAiB;YAAM,QAAQC;QAAkB;IAE3D;IAEA,UAAgB;QACZ,IAAI,IAAI,CAAC,gBAAgB,EAAE;YACvB,IAAI,CAAC,gBAAgB;YACrB,IAAI,CAAC,gBAAgB,GAAG;QAC5B;QACA,IAAI,CAAC,gBAAgB,CAAC,OAAO;QAC7B,IAAI,CAAC,QAAQ,CAAC,OAAO;IACzB;IAEA,YAAYC,EAAU,EAAE;QACpB,IAAI,CAAC,QAAQ,CAAC,WAAW,CAACA;IAC9B;IAEA,gBAAgB;QACZ,IAAI,CAAC,QAAQ,CAAC,aAAa;IAC/B;IAEA,cAAc;QACV,IAAI,CAAC,QAAQ,CAAC,WAAW;IAC7B;IAEA,YAAYA,EAAU,EAAE;QACpB,OAAO,IAAI,CAAC,QAAQ,CAAC,WAAW,CAACA;IACrC;IAEA,aAAaA,EAAU,EAAE;QACrB,OAAO,IAAI,CAAC,QAAQ,CAAC,YAAY,CAACA;IACtC;IAEA,eAAeA,EAAU,EAAE;QACvB,OAAO,IAAI,CAAC,QAAQ,CAAC,cAAc,CAACA;IACxC;IAEA,UAAUA,EAAU,EAAEC,QAAgB,EAAE;QACpC,OAAO,IAAI,CAAC,QAAQ,CAAC,SAAS,CAACD,IAAIC;IACvC;IAEA,eAAeC,KAAgE,EAAE;QAC7E,OAAO,IAAI,CAAC,QAAQ,CAAC,cAAc,CAACA;IACxC;AACJ;AAEO,MAAMC,6CAA6CC,wBAAwB,eAAe,CAAC;IAC9F,WAAWZ;IACX,cAAc;QAACa;KAA0B;AAC7C"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ListScheduledActionsGateway } from "@webiny/app-scheduler/features/listScheduledActions/abstractions.js";
|
|
2
|
+
import { GetScheduledActionGateway } from "@webiny/app-scheduler/features/getScheduledAction/abstractions.js";
|
|
3
|
+
import type { SchedulerEntry } from "@webiny/app-scheduler/types.js";
|
|
4
|
+
import { type IScheduledActionsPresenter } from "./abstractions.js";
|
|
5
|
+
/**
|
|
6
|
+
* Holds the scheduled actions relevant to the current view (entries list or a single entry),
|
|
7
|
+
* keyed by target (entry) id. Fetching is driven by the presenters that own the view — the list
|
|
8
|
+
* presenter decorator reloads on row changes, the form alert loads the open entry — so this holds
|
|
9
|
+
* no invalidation logic of its own beyond `reload()`.
|
|
10
|
+
*/
|
|
11
|
+
declare class ScheduledActionsPresenterImpl implements IScheduledActionsPresenter {
|
|
12
|
+
private listGateway;
|
|
13
|
+
private getGateway;
|
|
14
|
+
private _scheduledActions;
|
|
15
|
+
private _lastLoad;
|
|
16
|
+
constructor(listGateway: ListScheduledActionsGateway.Interface, getGateway: GetScheduledActionGateway.Interface);
|
|
17
|
+
getScheduledAction(targetId: string): SchedulerEntry | undefined;
|
|
18
|
+
loadForModel(modelId: string): Promise<void>;
|
|
19
|
+
loadForEntry(modelId: string, entryId: string): Promise<void>;
|
|
20
|
+
reload(): Promise<void>;
|
|
21
|
+
dispose(): void;
|
|
22
|
+
private fetchModel;
|
|
23
|
+
private fetchEntry;
|
|
24
|
+
}
|
|
25
|
+
export declare const ScheduledActionsPresenter: typeof ScheduledActionsPresenterImpl & {
|
|
26
|
+
__abstraction: import("@webiny/di").Abstraction<IScheduledActionsPresenter>;
|
|
27
|
+
};
|
|
28
|
+
export {};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { makeAutoObservable, observable, runInAction } from "mobx";
|
|
2
|
+
import { ListScheduledActionsGateway } from "@webiny/app-scheduler/features/listScheduledActions/abstractions.js";
|
|
3
|
+
import { GetScheduledActionGateway } from "@webiny/app-scheduler/features/getScheduledAction/abstractions.js";
|
|
4
|
+
import { createNamespace } from "../../utils/index.js";
|
|
5
|
+
import { ScheduledActionsPresenter } from "./abstractions.js";
|
|
6
|
+
const PAGE_SIZE = 100;
|
|
7
|
+
class ScheduledActionsPresenterImpl {
|
|
8
|
+
constructor(listGateway, getGateway){
|
|
9
|
+
this.listGateway = listGateway;
|
|
10
|
+
this.getGateway = getGateway;
|
|
11
|
+
this._scheduledActions = observable.map();
|
|
12
|
+
this._lastLoad = null;
|
|
13
|
+
makeAutoObservable(this, {
|
|
14
|
+
listGateway: false,
|
|
15
|
+
getGateway: false,
|
|
16
|
+
_lastLoad: false
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
getScheduledAction(targetId) {
|
|
20
|
+
return this._scheduledActions.get(targetId);
|
|
21
|
+
}
|
|
22
|
+
loadForModel(modelId) {
|
|
23
|
+
const namespace = createNamespace({
|
|
24
|
+
modelId
|
|
25
|
+
});
|
|
26
|
+
this._lastLoad = ()=>this.fetchModel(namespace);
|
|
27
|
+
return this._lastLoad();
|
|
28
|
+
}
|
|
29
|
+
loadForEntry(modelId, entryId) {
|
|
30
|
+
const namespace = createNamespace({
|
|
31
|
+
modelId
|
|
32
|
+
});
|
|
33
|
+
this._lastLoad = ()=>this.fetchEntry(namespace, entryId);
|
|
34
|
+
return this._lastLoad();
|
|
35
|
+
}
|
|
36
|
+
reload() {
|
|
37
|
+
return this._lastLoad ? this._lastLoad() : Promise.resolve();
|
|
38
|
+
}
|
|
39
|
+
dispose() {
|
|
40
|
+
runInAction(()=>this._scheduledActions.clear());
|
|
41
|
+
this._lastLoad = null;
|
|
42
|
+
}
|
|
43
|
+
async fetchModel(namespace) {
|
|
44
|
+
try {
|
|
45
|
+
const actions = new Map();
|
|
46
|
+
let after;
|
|
47
|
+
do {
|
|
48
|
+
const response = await this.listGateway.execute({
|
|
49
|
+
namespace,
|
|
50
|
+
limit: PAGE_SIZE,
|
|
51
|
+
after,
|
|
52
|
+
sort: [
|
|
53
|
+
"scheduledFor_ASC"
|
|
54
|
+
]
|
|
55
|
+
});
|
|
56
|
+
for (const item of response.items)actions.set(item.targetId, item);
|
|
57
|
+
after = response.meta.hasMoreItems ? response.meta.cursor ?? void 0 : void 0;
|
|
58
|
+
}while (after)
|
|
59
|
+
runInAction(()=>{
|
|
60
|
+
this._scheduledActions.replace(actions);
|
|
61
|
+
});
|
|
62
|
+
} catch (error) {
|
|
63
|
+
console.error(error);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
async fetchEntry(namespace, entryId) {
|
|
67
|
+
try {
|
|
68
|
+
const action = await this.getGateway.execute({
|
|
69
|
+
namespace,
|
|
70
|
+
id: entryId
|
|
71
|
+
});
|
|
72
|
+
runInAction(()=>{
|
|
73
|
+
if (action) this._scheduledActions.set(entryId, action);
|
|
74
|
+
else this._scheduledActions.delete(entryId);
|
|
75
|
+
});
|
|
76
|
+
} catch (error) {
|
|
77
|
+
console.error(error);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
const ScheduledActionsPresenter_ScheduledActionsPresenter = ScheduledActionsPresenter.createImplementation({
|
|
82
|
+
implementation: ScheduledActionsPresenterImpl,
|
|
83
|
+
dependencies: [
|
|
84
|
+
ListScheduledActionsGateway,
|
|
85
|
+
GetScheduledActionGateway
|
|
86
|
+
]
|
|
87
|
+
});
|
|
88
|
+
export { ScheduledActionsPresenter_ScheduledActionsPresenter as ScheduledActionsPresenter };
|
|
89
|
+
|
|
90
|
+
//# sourceMappingURL=ScheduledActionsPresenter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/scheduledActions/ScheduledActionsPresenter.js","sources":["../../../src/presentation/scheduledActions/ScheduledActionsPresenter.ts"],"sourcesContent":["import { makeAutoObservable, observable, runInAction } from \"mobx\";\nimport { ListScheduledActionsGateway } from \"@webiny/app-scheduler/features/listScheduledActions/abstractions.js\";\nimport { GetScheduledActionGateway } from \"@webiny/app-scheduler/features/getScheduledAction/abstractions.js\";\nimport type { SchedulerEntry } from \"@webiny/app-scheduler/types.js\";\nimport { createNamespace } from \"~/utils/index.js\";\nimport {\n ScheduledActionsPresenter as Abstraction,\n type IScheduledActionsPresenter\n} from \"./abstractions.js\";\n\nconst PAGE_SIZE = 100;\n\n/**\n * Holds the scheduled actions relevant to the current view (entries list or a single entry),\n * keyed by target (entry) id. Fetching is driven by the presenters that own the view — the list\n * presenter decorator reloads on row changes, the form alert loads the open entry — so this holds\n * no invalidation logic of its own beyond `reload()`.\n */\nclass ScheduledActionsPresenterImpl implements IScheduledActionsPresenter {\n private _scheduledActions = observable.map<string, SchedulerEntry>();\n private _lastLoad: (() => Promise<void>) | null = null;\n\n constructor(\n private listGateway: ListScheduledActionsGateway.Interface,\n private getGateway: GetScheduledActionGateway.Interface\n ) {\n makeAutoObservable<\n ScheduledActionsPresenterImpl,\n \"listGateway\" | \"getGateway\" | \"_lastLoad\"\n >(this, {\n listGateway: false,\n getGateway: false,\n _lastLoad: false\n });\n }\n\n getScheduledAction(targetId: string): SchedulerEntry | undefined {\n return this._scheduledActions.get(targetId);\n }\n\n loadForModel(modelId: string): Promise<void> {\n const namespace = createNamespace({ modelId });\n this._lastLoad = () => this.fetchModel(namespace);\n return this._lastLoad();\n }\n\n loadForEntry(modelId: string, entryId: string): Promise<void> {\n const namespace = createNamespace({ modelId });\n this._lastLoad = () => this.fetchEntry(namespace, entryId);\n return this._lastLoad();\n }\n\n reload(): Promise<void> {\n return this._lastLoad ? this._lastLoad() : Promise.resolve();\n }\n\n dispose(): void {\n runInAction(() => this._scheduledActions.clear());\n this._lastLoad = null;\n }\n\n private async fetchModel(namespace: string): Promise<void> {\n try {\n const actions = new Map<string, SchedulerEntry>();\n let after: string | undefined = undefined;\n\n do {\n const response = await this.listGateway.execute({\n namespace,\n limit: PAGE_SIZE,\n after,\n sort: [\"scheduledFor_ASC\"]\n });\n for (const item of response.items) {\n actions.set(item.targetId, item);\n }\n after = response.meta.hasMoreItems\n ? (response.meta.cursor ?? undefined)\n : undefined;\n } while (after);\n\n runInAction(() => {\n this._scheduledActions.replace(actions);\n });\n } catch (error) {\n console.error(error);\n }\n }\n\n private async fetchEntry(namespace: string, entryId: string): Promise<void> {\n try {\n const action = await this.getGateway.execute({ namespace, id: entryId });\n runInAction(() => {\n if (action) {\n this._scheduledActions.set(entryId, action);\n } else {\n this._scheduledActions.delete(entryId);\n }\n });\n } catch (error) {\n console.error(error);\n }\n }\n}\n\nexport const ScheduledActionsPresenter = Abstraction.createImplementation({\n implementation: ScheduledActionsPresenterImpl,\n dependencies: [ListScheduledActionsGateway, GetScheduledActionGateway]\n});\n"],"names":["PAGE_SIZE","ScheduledActionsPresenterImpl","listGateway","getGateway","observable","makeAutoObservable","targetId","modelId","namespace","createNamespace","entryId","Promise","runInAction","actions","Map","after","response","item","undefined","error","console","action","ScheduledActionsPresenter","Abstraction","ListScheduledActionsGateway","GetScheduledActionGateway"],"mappings":";;;;;AAUA,MAAMA,YAAY;AAQlB,MAAMC;IAIF,YACYC,WAAkD,EAClDC,UAA+C,CACzD;aAFUD,WAAW,GAAXA;aACAC,UAAU,GAAVA;aALJ,iBAAiB,GAAGC,WAAW,GAAG;aAClC,SAAS,GAAiC;QAM9CC,mBAGE,IAAI,EAAE;YACJ,aAAa;YACb,YAAY;YACZ,WAAW;QACf;IACJ;IAEA,mBAAmBC,QAAgB,EAA8B;QAC7D,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAACA;IACtC;IAEA,aAAaC,OAAe,EAAiB;QACzC,MAAMC,YAAYC,gBAAgB;YAAEF;QAAQ;QAC5C,IAAI,CAAC,SAAS,GAAG,IAAM,IAAI,CAAC,UAAU,CAACC;QACvC,OAAO,IAAI,CAAC,SAAS;IACzB;IAEA,aAAaD,OAAe,EAAEG,OAAe,EAAiB;QAC1D,MAAMF,YAAYC,gBAAgB;YAAEF;QAAQ;QAC5C,IAAI,CAAC,SAAS,GAAG,IAAM,IAAI,CAAC,UAAU,CAACC,WAAWE;QAClD,OAAO,IAAI,CAAC,SAAS;IACzB;IAEA,SAAwB;QACpB,OAAO,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,SAAS,KAAKC,QAAQ,OAAO;IAC9D;IAEA,UAAgB;QACZC,YAAY,IAAM,IAAI,CAAC,iBAAiB,CAAC,KAAK;QAC9C,IAAI,CAAC,SAAS,GAAG;IACrB;IAEA,MAAc,WAAWJ,SAAiB,EAAiB;QACvD,IAAI;YACA,MAAMK,UAAU,IAAIC;YACpB,IAAIC;YAEJ,GAAG;gBACC,MAAMC,WAAW,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;oBAC5CR;oBACA,OAAOR;oBACPe;oBACA,MAAM;wBAAC;qBAAmB;gBAC9B;gBACA,KAAK,MAAME,QAAQD,SAAS,KAAK,CAC7BH,QAAQ,GAAG,CAACI,KAAK,QAAQ,EAAEA;gBAE/BF,QAAQC,SAAS,IAAI,CAAC,YAAY,GAC3BA,SAAS,IAAI,CAAC,MAAM,IAAIE,SACzBA;YACV,QAASH,MAAO;YAEhBH,YAAY;gBACR,IAAI,CAAC,iBAAiB,CAAC,OAAO,CAACC;YACnC;QACJ,EAAE,OAAOM,OAAO;YACZC,QAAQ,KAAK,CAACD;QAClB;IACJ;IAEA,MAAc,WAAWX,SAAiB,EAAEE,OAAe,EAAiB;QACxE,IAAI;YACA,MAAMW,SAAS,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;gBAAEb;gBAAW,IAAIE;YAAQ;YACtEE,YAAY;gBACR,IAAIS,QACA,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAACX,SAASW;qBAEpC,IAAI,CAAC,iBAAiB,CAAC,MAAM,CAACX;YAEtC;QACJ,EAAE,OAAOS,OAAO;YACZC,QAAQ,KAAK,CAACD;QAClB;IACJ;AACJ;AAEO,MAAMG,sDAA4BC,0BAAAA,oBAAgC,CAAC;IACtE,gBAAgBtB;IAChB,cAAc;QAACuB;QAA6BC;KAA0B;AAC1E"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SchedulerEntry } from "@webiny/app-scheduler/types.js";
|
|
2
|
+
export interface IScheduledActionsPresenter {
|
|
3
|
+
/** Loads all scheduled actions for a model (used by the entries list). */
|
|
4
|
+
loadForModel(modelId: string): Promise<void>;
|
|
5
|
+
/** Loads the scheduled action for a single entry (used by the entry form). */
|
|
6
|
+
loadForEntry(modelId: string, entryId: string): Promise<void>;
|
|
7
|
+
/** Re-runs the last load. Call after a schedule/cancel to reflect the change. */
|
|
8
|
+
reload(): Promise<void>;
|
|
9
|
+
/** Returns the scheduled action for a target (entry) id, if any. */
|
|
10
|
+
getScheduledAction(targetId: string): SchedulerEntry | undefined;
|
|
11
|
+
dispose(): void;
|
|
12
|
+
}
|
|
13
|
+
export declare const ScheduledActionsPresenter: import("@webiny/di").Abstraction<IScheduledActionsPresenter>;
|
|
14
|
+
export declare namespace ScheduledActionsPresenter {
|
|
15
|
+
type Interface = IScheduledActionsPresenter;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/scheduledActions/abstractions.js","sources":["../../../src/presentation/scheduledActions/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\nimport type { SchedulerEntry } from \"@webiny/app-scheduler/types.js\";\n\nexport interface IScheduledActionsPresenter {\n /** Loads all scheduled actions for a model (used by the entries list). */\n loadForModel(modelId: string): Promise<void>;\n /** Loads the scheduled action for a single entry (used by the entry form). */\n loadForEntry(modelId: string, entryId: string): Promise<void>;\n /** Re-runs the last load. Call after a schedule/cancel to reflect the change. */\n reload(): Promise<void>;\n /** Returns the scheduled action for a target (entry) id, if any. */\n getScheduledAction(targetId: string): SchedulerEntry | undefined;\n dispose(): void;\n}\n\nexport const ScheduledActionsPresenter = createAbstraction<IScheduledActionsPresenter>(\n \"ScheduledActionsPresenter\"\n);\n\nexport namespace ScheduledActionsPresenter {\n export type Interface = IScheduledActionsPresenter;\n}\n"],"names":["ScheduledActionsPresenter","createAbstraction"],"mappings":";AAeO,MAAMA,4BAA4BC,kBACrC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { createFeature } from "@webiny/feature/admin";
|
|
2
|
+
import { ScheduledActionsPresenter } from "./abstractions.js";
|
|
3
|
+
import { ScheduledActionsPresenter as external_ScheduledActionsPresenter_js_ScheduledActionsPresenter } from "./ScheduledActionsPresenter.js";
|
|
4
|
+
import { ContentEntriesPresenterSchedulingDecorator } from "./ContentEntriesPresenterSchedulingDecorator.js";
|
|
5
|
+
const ScheduledActionsPresenterFeature = createFeature({
|
|
6
|
+
name: "Scheduler/ScheduledActionsPresenter",
|
|
7
|
+
register (container) {
|
|
8
|
+
container.register(external_ScheduledActionsPresenter_js_ScheduledActionsPresenter).inSingletonScope();
|
|
9
|
+
container.registerDecorator(ContentEntriesPresenterSchedulingDecorator);
|
|
10
|
+
},
|
|
11
|
+
resolve (container) {
|
|
12
|
+
return {
|
|
13
|
+
presenter: container.resolve(ScheduledActionsPresenter)
|
|
14
|
+
};
|
|
15
|
+
}
|
|
16
|
+
});
|
|
17
|
+
export { ScheduledActionsPresenterFeature };
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/scheduledActions/feature.js","sources":["../../../src/presentation/scheduledActions/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { ScheduledActionsPresenter as Abstraction } from \"./abstractions.js\";\nimport { ScheduledActionsPresenter } from \"./ScheduledActionsPresenter.js\";\nimport { ContentEntriesPresenterSchedulingDecorator } from \"./ContentEntriesPresenterSchedulingDecorator.js\";\n\nexport const ScheduledActionsPresenterFeature = createFeature({\n name: \"Scheduler/ScheduledActionsPresenter\",\n register(container) {\n container.register(ScheduledActionsPresenter).inSingletonScope();\n container.registerDecorator(ContentEntriesPresenterSchedulingDecorator);\n },\n resolve(container) {\n return {\n presenter: container.resolve(Abstraction)\n };\n }\n});\n"],"names":["ScheduledActionsPresenterFeature","createFeature","container","ScheduledActionsPresenter","ContentEntriesPresenterSchedulingDecorator","Abstraction"],"mappings":";;;;AAKO,MAAMA,mCAAmCC,cAAc;IAC1D,MAAM;IACN,UAASC,SAAS;QACdA,UAAU,QAAQ,CAACC,iEAA2B,gBAAgB;QAC9DD,UAAU,iBAAiB,CAACE;IAChC;IACA,SAAQF,SAAS;QACb,OAAO;YACH,WAAWA,UAAU,OAAO,CAACG;QACjC;IACJ;AACJ"}
|
package/utils/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./namespace.js";
|
package/utils/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./namespace.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { CmsModel } from "@webiny/app-headless-cms-common/types/index.js";
|
|
2
|
+
export declare const CMS_NAMESPACE = "Cms/Entry/";
|
|
3
|
+
/**
|
|
4
|
+
* Namespace must be exactly like in the API, or it will not match - scheduling will fail.
|
|
5
|
+
* @param model
|
|
6
|
+
*/
|
|
7
|
+
export declare const createNamespace: (model: Pick<CmsModel, "modelId">) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils/namespace.js","sources":["../../src/utils/namespace.ts"],"sourcesContent":["import type { CmsModel } from \"@webiny/app-headless-cms-common/types/index.js\";\n\nexport const CMS_NAMESPACE = \"Cms/Entry/\";\n\n/**\n * Namespace must be exactly like in the API, or it will not match - scheduling will fail.\n * @param model\n */\nexport const createNamespace = (model: Pick<CmsModel, \"modelId\">): string => {\n return `${CMS_NAMESPACE}${model.modelId}`;\n};\n"],"names":["CMS_NAMESPACE","createNamespace","model"],"mappings":"AAEO,MAAMA,gBAAgB;AAMtB,MAAMC,kBAAkB,CAACC,QACrB,GAAGF,gBAAgBE,MAAM,OAAO,EAAE"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { CmsIdentity, CmsModel, SchedulerEntry } from "../../../types";
|
|
2
|
-
import type { ScheduleType } from "../../../types";
|
|
3
|
-
export declare class SchedulerItem {
|
|
4
|
-
readonly id: string;
|
|
5
|
-
readonly title: string;
|
|
6
|
-
readonly type: ScheduleType;
|
|
7
|
-
readonly targetId: string;
|
|
8
|
-
readonly model: Pick<CmsModel, "modelId">;
|
|
9
|
-
readonly scheduledBy: CmsIdentity;
|
|
10
|
-
readonly publishOn?: Date;
|
|
11
|
-
readonly unpublishOn?: Date;
|
|
12
|
-
protected constructor(item: SchedulerEntry);
|
|
13
|
-
static create(item: SchedulerEntry): SchedulerItem;
|
|
14
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export class SchedulerItem {
|
|
2
|
-
constructor(item) {
|
|
3
|
-
this.id = item.id;
|
|
4
|
-
this.title = item.title;
|
|
5
|
-
this.type = item.type;
|
|
6
|
-
this.targetId = item.targetId;
|
|
7
|
-
this.model = item.model;
|
|
8
|
-
this.scheduledBy = item.scheduledBy;
|
|
9
|
-
this.publishOn = item.publishOn;
|
|
10
|
-
this.unpublishOn = item.unpublishOn;
|
|
11
|
-
}
|
|
12
|
-
static create(item) {
|
|
13
|
-
return new SchedulerItem(item);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
//# sourceMappingURL=SchedulerItem.js.map
|