@webiny/app-headless-cms-scheduler 0.0.0-unstable.06b2ede40f
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/Domain/Models/SchedulerItem/SchedulerItem.d.ts +14 -0
- package/Domain/Models/SchedulerItem/SchedulerItem.js +17 -0
- package/Domain/Models/SchedulerItem/SchedulerItem.js.map +1 -0
- package/Domain/Models/SchedulerItem/index.d.ts +1 -0
- package/Domain/Models/SchedulerItem/index.js +3 -0
- package/Domain/Models/SchedulerItem/index.js.map +1 -0
- package/Domain/Models/index.d.ts +1 -0
- package/Domain/Models/index.js +3 -0
- package/Domain/Models/index.js.map +1 -0
- package/Domain/Repositories/SchedulerItems/ISchedulerItemsRepository.d.ts +14 -0
- package/Domain/Repositories/SchedulerItems/ISchedulerItemsRepository.js +3 -0
- package/Domain/Repositories/SchedulerItems/ISchedulerItemsRepository.js.map +1 -0
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.d.ts +37 -0
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.js +125 -0
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.js.map +1 -0
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.d.ts +20 -0
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.js +17 -0
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.js.map +1 -0
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.d.ts +17 -0
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.js +38 -0
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.js.map +1 -0
- package/Domain/Repositories/SchedulerItems/index.d.ts +4 -0
- package/Domain/Repositories/SchedulerItems/index.js +6 -0
- package/Domain/Repositories/SchedulerItems/index.js.map +1 -0
- package/Domain/Repositories/Search/ISearchRepository.d.ts +4 -0
- package/Domain/Repositories/Search/ISearchRepository.js +3 -0
- package/Domain/Repositories/Search/ISearchRepository.js.map +1 -0
- package/Domain/Repositories/Search/SearchRepository.d.ts +7 -0
- package/Domain/Repositories/Search/SearchRepository.js +15 -0
- package/Domain/Repositories/Search/SearchRepository.js.map +1 -0
- package/Domain/Repositories/Search/SearchRepositoryFactory.d.ts +7 -0
- package/Domain/Repositories/Search/SearchRepositoryFactory.js +17 -0
- package/Domain/Repositories/Search/SearchRepositoryFactory.js.map +1 -0
- package/Domain/Repositories/Search/index.d.ts +3 -0
- package/Domain/Repositories/Search/index.js +5 -0
- package/Domain/Repositories/Search/index.js.map +1 -0
- package/Domain/Repositories/SelectedItems/ISelectedItemsRepository.d.ts +8 -0
- package/Domain/Repositories/SelectedItems/ISelectedItemsRepository.js +3 -0
- package/Domain/Repositories/SelectedItems/ISelectedItemsRepository.js.map +1 -0
- package/Domain/Repositories/SelectedItems/SelectedItemsRepository.d.ts +12 -0
- package/Domain/Repositories/SelectedItems/SelectedItemsRepository.js +27 -0
- package/Domain/Repositories/SelectedItems/SelectedItemsRepository.js.map +1 -0
- package/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.d.ts +7 -0
- package/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.js +17 -0
- package/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.js.map +1 -0
- package/Domain/Repositories/SelectedItems/index.d.ts +3 -0
- package/Domain/Repositories/SelectedItems/index.js +5 -0
- package/Domain/Repositories/SelectedItems/index.js.map +1 -0
- package/Domain/Repositories/Sorting/SortingRepositoryWithDefaults.d.ts +8 -0
- package/Domain/Repositories/Sorting/SortingRepositoryWithDefaults.js +22 -0
- package/Domain/Repositories/Sorting/SortingRepositoryWithDefaults.js.map +1 -0
- package/Domain/Repositories/Sorting/index.d.ts +1 -0
- package/Domain/Repositories/Sorting/index.js +3 -0
- package/Domain/Repositories/Sorting/index.js.map +1 -0
- package/Domain/Repositories/index.d.ts +4 -0
- package/Domain/Repositories/index.js +6 -0
- package/Domain/Repositories/index.js.map +1 -0
- package/Domain/index.d.ts +2 -0
- package/Domain/index.js +4 -0
- package/Domain/index.js.map +1 -0
- package/Gateways/SchedulerCancelGateway.d.ts +7 -0
- package/Gateways/SchedulerCancelGateway.js +3 -0
- package/Gateways/SchedulerCancelGateway.js.map +1 -0
- package/Gateways/SchedulerGetGateway.d.ts +9 -0
- package/Gateways/SchedulerGetGateway.js +3 -0
- package/Gateways/SchedulerGetGateway.js.map +1 -0
- package/Gateways/SchedulerListGateway.d.ts +29 -0
- package/Gateways/SchedulerListGateway.js +3 -0
- package/Gateways/SchedulerListGateway.js.map +1 -0
- package/Gateways/SchedulerPublishGateway.d.ts +12 -0
- package/Gateways/SchedulerPublishGateway.js +3 -0
- package/Gateways/SchedulerPublishGateway.js.map +1 -0
- package/Gateways/SchedulerUnpublishGateway.d.ts +12 -0
- package/Gateways/SchedulerUnpublishGateway.js +3 -0
- package/Gateways/SchedulerUnpublishGateway.js.map +1 -0
- package/Gateways/index.d.ts +5 -0
- package/Gateways/index.js +7 -0
- package/Gateways/index.js.map +1 -0
- package/LICENSE +21 -0
- package/Presentation/Scheduler/Scheduler.d.ts +18 -0
- package/Presentation/Scheduler/Scheduler.js +66 -0
- package/Presentation/Scheduler/Scheduler.js.map +1 -0
- package/Presentation/Scheduler/SchedulerControllers.d.ts +30 -0
- package/Presentation/Scheduler/SchedulerControllers.js +72 -0
- package/Presentation/Scheduler/SchedulerControllers.js.map +1 -0
- package/Presentation/Scheduler/SchedulerPresenter.d.ts +32 -0
- package/Presentation/Scheduler/SchedulerPresenter.js +44 -0
- package/Presentation/Scheduler/SchedulerPresenter.js.map +1 -0
- package/Presentation/Scheduler/controllers/CancelItem/CancelItemController.d.ts +7 -0
- package/Presentation/Scheduler/controllers/CancelItem/CancelItemController.js +11 -0
- package/Presentation/Scheduler/controllers/CancelItem/CancelItemController.js.map +1 -0
- package/Presentation/Scheduler/controllers/CancelItem/ICancelItemController.d.ts +3 -0
- package/Presentation/Scheduler/controllers/CancelItem/ICancelItemController.js +3 -0
- package/Presentation/Scheduler/controllers/CancelItem/ICancelItemController.js.map +1 -0
- package/Presentation/Scheduler/controllers/CancelItem/index.d.ts +2 -0
- package/Presentation/Scheduler/controllers/CancelItem/index.js +4 -0
- package/Presentation/Scheduler/controllers/CancelItem/index.js.map +1 -0
- package/Presentation/Scheduler/controllers/GetItem/GetItemController.d.ts +8 -0
- package/Presentation/Scheduler/controllers/GetItem/GetItemController.js +11 -0
- package/Presentation/Scheduler/controllers/GetItem/GetItemController.js.map +1 -0
- package/Presentation/Scheduler/controllers/GetItem/IGetItemController.d.ts +4 -0
- package/Presentation/Scheduler/controllers/GetItem/IGetItemController.js +3 -0
- package/Presentation/Scheduler/controllers/GetItem/IGetItemController.js.map +1 -0
- package/Presentation/Scheduler/controllers/GetItem/index.d.ts +2 -0
- package/Presentation/Scheduler/controllers/GetItem/index.js +4 -0
- package/Presentation/Scheduler/controllers/GetItem/index.js.map +1 -0
- package/Presentation/Scheduler/controllers/ListItems/IListItemsController.d.ts +4 -0
- package/Presentation/Scheduler/controllers/ListItems/IListItemsController.js +3 -0
- package/Presentation/Scheduler/controllers/ListItems/IListItemsController.js.map +1 -0
- package/Presentation/Scheduler/controllers/ListItems/ListItemsController.d.ts +8 -0
- package/Presentation/Scheduler/controllers/ListItems/ListItemsController.js +11 -0
- package/Presentation/Scheduler/controllers/ListItems/ListItemsController.js.map +1 -0
- package/Presentation/Scheduler/controllers/ListItems/index.d.ts +2 -0
- package/Presentation/Scheduler/controllers/ListItems/index.js +4 -0
- package/Presentation/Scheduler/controllers/ListItems/index.js.map +1 -0
- package/Presentation/Scheduler/controllers/ListMoreItems/IListMoreItemsController.d.ts +3 -0
- package/Presentation/Scheduler/controllers/ListMoreItems/IListMoreItemsController.js +3 -0
- package/Presentation/Scheduler/controllers/ListMoreItems/IListMoreItemsController.js.map +1 -0
- package/Presentation/Scheduler/controllers/ListMoreItems/ListMoreItemsController.d.ts +7 -0
- package/Presentation/Scheduler/controllers/ListMoreItems/ListMoreItemsController.js +11 -0
- package/Presentation/Scheduler/controllers/ListMoreItems/ListMoreItemsController.js.map +1 -0
- package/Presentation/Scheduler/controllers/ListMoreItems/index.d.ts +2 -0
- package/Presentation/Scheduler/controllers/ListMoreItems/index.js +4 -0
- package/Presentation/Scheduler/controllers/ListMoreItems/index.js.map +1 -0
- package/Presentation/Scheduler/controllers/PublishItem/IPublishItemController.d.ts +3 -0
- package/Presentation/Scheduler/controllers/PublishItem/IPublishItemController.js +3 -0
- package/Presentation/Scheduler/controllers/PublishItem/IPublishItemController.js.map +1 -0
- package/Presentation/Scheduler/controllers/PublishItem/PublishItemController.d.ts +7 -0
- package/Presentation/Scheduler/controllers/PublishItem/PublishItemController.js +11 -0
- package/Presentation/Scheduler/controllers/PublishItem/PublishItemController.js.map +1 -0
- package/Presentation/Scheduler/controllers/PublishItem/index.d.ts +2 -0
- package/Presentation/Scheduler/controllers/PublishItem/index.js +4 -0
- package/Presentation/Scheduler/controllers/PublishItem/index.js.map +1 -0
- package/Presentation/Scheduler/controllers/SearchItems/ISearchItemsController.d.ts +3 -0
- package/Presentation/Scheduler/controllers/SearchItems/ISearchItemsController.js +3 -0
- package/Presentation/Scheduler/controllers/SearchItems/ISearchItemsController.js.map +1 -0
- package/Presentation/Scheduler/controllers/SearchItems/SearchItemsController.d.ts +8 -0
- package/Presentation/Scheduler/controllers/SearchItems/SearchItemsController.js +14 -0
- package/Presentation/Scheduler/controllers/SearchItems/SearchItemsController.js.map +1 -0
- package/Presentation/Scheduler/controllers/SearchItems/index.d.ts +2 -0
- package/Presentation/Scheduler/controllers/SearchItems/index.js +4 -0
- package/Presentation/Scheduler/controllers/SearchItems/index.js.map +1 -0
- package/Presentation/Scheduler/controllers/SelectAllItems/ISelectAllItemsController.d.ts +3 -0
- package/Presentation/Scheduler/controllers/SelectAllItems/ISelectAllItemsController.js +3 -0
- package/Presentation/Scheduler/controllers/SelectAllItems/ISelectAllItemsController.js.map +1 -0
- package/Presentation/Scheduler/controllers/SelectAllItems/SelectAllItemsController.d.ts +7 -0
- package/Presentation/Scheduler/controllers/SelectAllItems/SelectAllItemsController.js +11 -0
- package/Presentation/Scheduler/controllers/SelectAllItems/SelectAllItemsController.js.map +1 -0
- package/Presentation/Scheduler/controllers/SelectAllItems/index.d.ts +2 -0
- package/Presentation/Scheduler/controllers/SelectAllItems/index.js +4 -0
- package/Presentation/Scheduler/controllers/SelectAllItems/index.js.map +1 -0
- package/Presentation/Scheduler/controllers/SelectItems/ISelectItemsController.d.ts +4 -0
- package/Presentation/Scheduler/controllers/SelectItems/ISelectItemsController.js +3 -0
- package/Presentation/Scheduler/controllers/SelectItems/ISelectItemsController.js.map +1 -0
- package/Presentation/Scheduler/controllers/SelectItems/SelectItemsController.d.ts +8 -0
- package/Presentation/Scheduler/controllers/SelectItems/SelectItemsController.js +13 -0
- package/Presentation/Scheduler/controllers/SelectItems/SelectItemsController.js.map +1 -0
- package/Presentation/Scheduler/controllers/SelectItems/index.d.ts +2 -0
- package/Presentation/Scheduler/controllers/SelectItems/index.js +4 -0
- package/Presentation/Scheduler/controllers/SelectItems/index.js.map +1 -0
- package/Presentation/Scheduler/controllers/SortItems/ISortItemsController.d.ts +4 -0
- package/Presentation/Scheduler/controllers/SortItems/ISortItemsController.js +3 -0
- package/Presentation/Scheduler/controllers/SortItems/ISortItemsController.js.map +1 -0
- package/Presentation/Scheduler/controllers/SortItems/SortItemsController.d.ts +9 -0
- package/Presentation/Scheduler/controllers/SortItems/SortItemsController.js +19 -0
- package/Presentation/Scheduler/controllers/SortItems/SortItemsController.js.map +1 -0
- package/Presentation/Scheduler/controllers/SortItems/index.d.ts +2 -0
- package/Presentation/Scheduler/controllers/SortItems/index.js +4 -0
- package/Presentation/Scheduler/controllers/SortItems/index.js.map +1 -0
- package/Presentation/Scheduler/controllers/UnpublishItem/IUnpublishItemController.d.ts +3 -0
- package/Presentation/Scheduler/controllers/UnpublishItem/IUnpublishItemController.js +3 -0
- package/Presentation/Scheduler/controllers/UnpublishItem/IUnpublishItemController.js.map +1 -0
- package/Presentation/Scheduler/controllers/UnpublishItem/UnpublishItemController.d.ts +7 -0
- package/Presentation/Scheduler/controllers/UnpublishItem/UnpublishItemController.js +11 -0
- package/Presentation/Scheduler/controllers/UnpublishItem/UnpublishItemController.js.map +1 -0
- package/Presentation/Scheduler/controllers/UnpublishItem/index.d.ts +2 -0
- package/Presentation/Scheduler/controllers/UnpublishItem/index.js +4 -0
- package/Presentation/Scheduler/controllers/UnpublishItem/index.js.map +1 -0
- package/Presentation/Scheduler/controllers/UnselectAllItems/IUnselectAllItemsController.d.ts +3 -0
- package/Presentation/Scheduler/controllers/UnselectAllItems/IUnselectAllItemsController.js +3 -0
- package/Presentation/Scheduler/controllers/UnselectAllItems/IUnselectAllItemsController.js.map +1 -0
- package/Presentation/Scheduler/controllers/UnselectAllItems/UnselectAllItemsController.d.ts +7 -0
- package/Presentation/Scheduler/controllers/UnselectAllItems/UnselectAllItemsController.js +11 -0
- package/Presentation/Scheduler/controllers/UnselectAllItems/UnselectAllItemsController.js.map +1 -0
- package/Presentation/Scheduler/controllers/UnselectAllItems/index.d.ts +2 -0
- package/Presentation/Scheduler/controllers/UnselectAllItems/index.js +4 -0
- package/Presentation/Scheduler/controllers/UnselectAllItems/index.js.map +1 -0
- package/Presentation/Scheduler/controllers/index.d.ts +11 -0
- package/Presentation/Scheduler/controllers/index.js +13 -0
- package/Presentation/Scheduler/controllers/index.js.map +1 -0
- package/Presentation/Scheduler/index.d.ts +1 -0
- package/Presentation/Scheduler/index.js +3 -0
- package/Presentation/Scheduler/index.js.map +1 -0
- package/Presentation/SchedulerConfigs/SchedulerConfigs.d.ts +2 -0
- package/Presentation/SchedulerConfigs/SchedulerConfigs.js +55 -0
- package/Presentation/SchedulerConfigs/SchedulerConfigs.js.map +1 -0
- package/Presentation/SchedulerConfigs/index.d.ts +1 -0
- package/Presentation/SchedulerConfigs/index.js +3 -0
- package/Presentation/SchedulerConfigs/index.js.map +1 -0
- package/Presentation/SchedulerRenderer/SchedulerRenderer.d.ts +6 -0
- package/Presentation/SchedulerRenderer/SchedulerRenderer.js +21 -0
- package/Presentation/SchedulerRenderer/SchedulerRenderer.js.map +1 -0
- package/Presentation/SchedulerRenderer/index.d.ts +1 -0
- package/Presentation/SchedulerRenderer/index.js +3 -0
- package/Presentation/SchedulerRenderer/index.js.map +1 -0
- package/Presentation/abstractions/ISchedulerControllers.d.ts +14 -0
- package/Presentation/abstractions/ISchedulerControllers.js +3 -0
- package/Presentation/abstractions/ISchedulerControllers.js.map +1 -0
- package/Presentation/abstractions/ISchedulerPresenter.d.ts +20 -0
- package/Presentation/abstractions/ISchedulerPresenter.js +3 -0
- package/Presentation/abstractions/ISchedulerPresenter.js.map +1 -0
- package/Presentation/abstractions/index.d.ts +2 -0
- package/Presentation/abstractions/index.js +4 -0
- package/Presentation/abstractions/index.js.map +1 -0
- package/Presentation/components/Actions/CancelItem/CancelItem.d.ts +2 -0
- package/Presentation/components/Actions/CancelItem/CancelItem.js +24 -0
- package/Presentation/components/Actions/CancelItem/CancelItem.js.map +1 -0
- package/Presentation/components/Actions/CancelItem/index.d.ts +1 -0
- package/Presentation/components/Actions/CancelItem/index.js +3 -0
- package/Presentation/components/Actions/CancelItem/index.js.map +1 -0
- package/Presentation/components/Actions/index.d.ts +1 -0
- package/Presentation/components/Actions/index.js +3 -0
- package/Presentation/components/Actions/index.js.map +1 -0
- package/Presentation/components/BottomInfoBar/BottomInfoBar.d.ts +2 -0
- package/Presentation/components/BottomInfoBar/BottomInfoBar.js +20 -0
- package/Presentation/components/BottomInfoBar/BottomInfoBar.js.map +1 -0
- package/Presentation/components/BottomInfoBar/BottomInfoBar.styled.d.ts +21 -0
- package/Presentation/components/BottomInfoBar/BottomInfoBar.styled.js +74 -0
- package/Presentation/components/BottomInfoBar/BottomInfoBar.styled.js.map +1 -0
- package/Presentation/components/BottomInfoBar/ListMeta.d.ts +7 -0
- package/Presentation/components/BottomInfoBar/ListMeta.js +12 -0
- package/Presentation/components/BottomInfoBar/ListMeta.js.map +1 -0
- package/Presentation/components/BottomInfoBar/ListStatus.d.ts +5 -0
- package/Presentation/components/BottomInfoBar/ListStatus.js +16 -0
- package/Presentation/components/BottomInfoBar/ListStatus.js.map +1 -0
- package/Presentation/components/BottomInfoBar/index.d.ts +1 -0
- package/Presentation/components/BottomInfoBar/index.js +3 -0
- package/Presentation/components/BottomInfoBar/index.js.map +1 -0
- package/Presentation/components/Cells/CellActions/CellActions.d.ts +2 -0
- package/Presentation/components/Cells/CellActions/CellActions.js +24 -0
- package/Presentation/components/Cells/CellActions/CellActions.js.map +1 -0
- package/Presentation/components/Cells/CellActions/index.d.ts +1 -0
- package/Presentation/components/Cells/CellActions/index.js +3 -0
- package/Presentation/components/Cells/CellActions/index.js.map +1 -0
- package/Presentation/components/Cells/CellRevision/CellRevision.d.ts +2 -0
- package/Presentation/components/Cells/CellRevision/CellRevision.js +20 -0
- package/Presentation/components/Cells/CellRevision/CellRevision.js.map +1 -0
- package/Presentation/components/Cells/CellRevision/CellRevision.styled.d.ts +12 -0
- package/Presentation/components/Cells/CellRevision/CellRevision.styled.js +47 -0
- package/Presentation/components/Cells/CellRevision/CellRevision.styled.js.map +1 -0
- package/Presentation/components/Cells/CellRevision/index.d.ts +1 -0
- package/Presentation/components/Cells/CellRevision/index.js +3 -0
- package/Presentation/components/Cells/CellRevision/index.js.map +1 -0
- package/Presentation/components/Cells/CellScheduledBy/CellScheduledBy.d.ts +2 -0
- package/Presentation/components/Cells/CellScheduledBy/CellScheduledBy.js +13 -0
- package/Presentation/components/Cells/CellScheduledBy/CellScheduledBy.js.map +1 -0
- package/Presentation/components/Cells/CellScheduledBy/index.d.ts +1 -0
- package/Presentation/components/Cells/CellScheduledBy/index.js +3 -0
- package/Presentation/components/Cells/CellScheduledBy/index.js.map +1 -0
- package/Presentation/components/Cells/CellScheduledOn/CellScheduledOn.d.ts +2 -0
- package/Presentation/components/Cells/CellScheduledOn/CellScheduledOn.js +20 -0
- package/Presentation/components/Cells/CellScheduledOn/CellScheduledOn.js.map +1 -0
- package/Presentation/components/Cells/CellScheduledOn/index.d.ts +1 -0
- package/Presentation/components/Cells/CellScheduledOn/index.js +3 -0
- package/Presentation/components/Cells/CellScheduledOn/index.js.map +1 -0
- package/Presentation/components/Cells/CellTitle/CellTitle.d.ts +2 -0
- package/Presentation/components/Cells/CellTitle/CellTitle.js +17 -0
- package/Presentation/components/Cells/CellTitle/CellTitle.js.map +1 -0
- package/Presentation/components/Cells/CellTitle/CellTitle.styled.d.ts +12 -0
- package/Presentation/components/Cells/CellTitle/CellTitle.styled.js +47 -0
- package/Presentation/components/Cells/CellTitle/CellTitle.styled.js.map +1 -0
- package/Presentation/components/Cells/CellTitle/index.d.ts +1 -0
- package/Presentation/components/Cells/CellTitle/index.js +3 -0
- package/Presentation/components/Cells/CellTitle/index.js.map +1 -0
- package/Presentation/components/Cells/CellType/CellType.d.ts +2 -0
- package/Presentation/components/Cells/CellType/CellType.js +17 -0
- package/Presentation/components/Cells/CellType/CellType.js.map +1 -0
- package/Presentation/components/Cells/CellType/CellType.styled.d.ts +12 -0
- package/Presentation/components/Cells/CellType/CellType.styled.js +47 -0
- package/Presentation/components/Cells/CellType/CellType.styled.js.map +1 -0
- package/Presentation/components/Cells/CellType/index.d.ts +1 -0
- package/Presentation/components/Cells/CellType/index.js +3 -0
- package/Presentation/components/Cells/CellType/index.js.map +1 -0
- package/Presentation/components/Cells/index.d.ts +6 -0
- package/Presentation/components/Cells/index.js +8 -0
- package/Presentation/components/Cells/index.js.map +1 -0
- package/Presentation/components/Empty/Empty.d.ts +2 -0
- package/Presentation/components/Empty/Empty.js +22 -0
- package/Presentation/components/Empty/Empty.js.map +1 -0
- package/Presentation/components/Empty/Empty.styled.d.ts +9 -0
- package/Presentation/components/Empty/Empty.styled.js +32 -0
- package/Presentation/components/Empty/Empty.styled.js.map +1 -0
- package/Presentation/components/Empty/index.d.ts +1 -0
- package/Presentation/components/Empty/index.js +3 -0
- package/Presentation/components/Empty/index.js.map +1 -0
- package/Presentation/components/ScheduleDialog/ScheduleDialogAction.d.ts +15 -0
- package/Presentation/components/ScheduleDialog/ScheduleDialogAction.js +51 -0
- package/Presentation/components/ScheduleDialog/ScheduleDialogAction.js.map +1 -0
- package/Presentation/components/ScheduleDialog/index.d.ts +2 -0
- package/Presentation/components/ScheduleDialog/index.js +4 -0
- package/Presentation/components/ScheduleDialog/index.js.map +1 -0
- package/Presentation/components/ScheduleDialog/types.d.ts +15 -0
- package/Presentation/components/ScheduleDialog/types.js +3 -0
- package/Presentation/components/ScheduleDialog/types.js.map +1 -0
- package/Presentation/components/ScheduleDialog/useScheduleDialog.d.ts +19 -0
- package/Presentation/components/ScheduleDialog/useScheduleDialog.js +174 -0
- package/Presentation/components/ScheduleDialog/useScheduleDialog.js.map +1 -0
- package/Presentation/components/SchedulerOverlay/SchedulerOverlay.d.ts +7 -0
- package/Presentation/components/SchedulerOverlay/SchedulerOverlay.js +36 -0
- package/Presentation/components/SchedulerOverlay/SchedulerOverlay.js.map +1 -0
- package/Presentation/components/SchedulerOverlay/index.d.ts +1 -0
- package/Presentation/components/SchedulerOverlay/index.js +3 -0
- package/Presentation/components/SchedulerOverlay/index.js.map +1 -0
- package/Presentation/components/SearchInput/SearchInput.d.ts +2 -0
- package/Presentation/components/SearchInput/SearchInput.js +37 -0
- package/Presentation/components/SearchInput/SearchInput.js.map +1 -0
- package/Presentation/components/SearchInput/index.d.ts +1 -0
- package/Presentation/components/SearchInput/index.js +3 -0
- package/Presentation/components/SearchInput/index.js.map +1 -0
- package/Presentation/components/Table/Table.d.ts +2 -0
- package/Presentation/components/Table/Table.js +29 -0
- package/Presentation/components/Table/Table.js.map +1 -0
- package/Presentation/components/Table/index.d.ts +1 -0
- package/Presentation/components/Table/index.js +3 -0
- package/Presentation/components/Table/index.js.map +1 -0
- package/Presentation/components/Title/Title.d.ts +5 -0
- package/Presentation/components/Title/Title.js +15 -0
- package/Presentation/components/Title/Title.js.map +1 -0
- package/Presentation/components/Title/Title.styled.d.ts +4 -0
- package/Presentation/components/Title/Title.styled.js +19 -0
- package/Presentation/components/Title/Title.styled.js.map +1 -0
- package/Presentation/components/Title/index.d.ts +1 -0
- package/Presentation/components/Title/index.js +3 -0
- package/Presentation/components/Title/index.js.map +1 -0
- package/Presentation/configs/index.d.ts +1 -0
- package/Presentation/configs/index.js +3 -0
- package/Presentation/configs/index.js.map +1 -0
- package/Presentation/configs/list/Browser/EntryAction.d.ts +7 -0
- package/Presentation/configs/list/Browser/EntryAction.js +16 -0
- package/Presentation/configs/list/Browser/EntryAction.js.map +1 -0
- package/Presentation/configs/list/Browser/Table/Column.d.ts +14 -0
- package/Presentation/configs/list/Browser/Table/Column.js +14 -0
- package/Presentation/configs/list/Browser/Table/Column.js.map +1 -0
- package/Presentation/configs/list/Browser/Table/Sorting.d.ts +5 -0
- package/Presentation/configs/list/Browser/Table/Sorting.js +10 -0
- package/Presentation/configs/list/Browser/Table/Sorting.js.map +1 -0
- package/Presentation/configs/list/Browser/Table/index.d.ts +19 -0
- package/Presentation/configs/list/Browser/Table/index.js +8 -0
- package/Presentation/configs/list/Browser/Table/index.js.map +1 -0
- package/Presentation/configs/list/Browser/index.d.ts +24 -0
- package/Presentation/configs/list/Browser/index.js +8 -0
- package/Presentation/configs/list/Browser/index.js.map +1 -0
- package/Presentation/configs/list/SchedulerListConfig.d.ts +33 -0
- package/Presentation/configs/list/SchedulerListConfig.js +29 -0
- package/Presentation/configs/list/SchedulerListConfig.js.map +1 -0
- package/Presentation/configs/list/index.d.ts +1 -0
- package/Presentation/configs/list/index.js +3 -0
- package/Presentation/configs/list/index.js.map +1 -0
- package/Presentation/hooks/index.d.ts +3 -0
- package/Presentation/hooks/index.js +5 -0
- package/Presentation/hooks/index.js.map +1 -0
- package/Presentation/hooks/useCancelSchedulerItem.d.ts +8 -0
- package/Presentation/hooks/useCancelSchedulerItem.js +32 -0
- package/Presentation/hooks/useCancelSchedulerItem.js.map +1 -0
- package/Presentation/hooks/useScheduler.d.ts +27 -0
- package/Presentation/hooks/useScheduler.js +51 -0
- package/Presentation/hooks/useScheduler.js.map +1 -0
- package/Presentation/hooks/useSchedulerItem.d.ts +12 -0
- package/Presentation/hooks/useSchedulerItem.js +9 -0
- package/Presentation/hooks/useSchedulerItem.js.map +1 -0
- package/Presentation/index.d.ts +24 -0
- package/Presentation/index.js +31 -0
- package/Presentation/index.js.map +1 -0
- package/README.md +22 -0
- package/UseCases/CancelItem/CancelItemUseCase.d.ts +7 -0
- package/UseCases/CancelItem/CancelItemUseCase.js +12 -0
- package/UseCases/CancelItem/CancelItemUseCase.js.map +1 -0
- package/UseCases/CancelItem/ICancelItemUseCase.d.ts +3 -0
- package/UseCases/CancelItem/ICancelItemUseCase.js +3 -0
- package/UseCases/CancelItem/ICancelItemUseCase.js.map +1 -0
- package/UseCases/CancelItem/index.d.ts +2 -0
- package/UseCases/CancelItem/index.js +4 -0
- package/UseCases/CancelItem/index.js.map +1 -0
- package/UseCases/GetItem/GetItemUseCase.d.ts +8 -0
- package/UseCases/GetItem/GetItemUseCase.js +12 -0
- package/UseCases/GetItem/GetItemUseCase.js.map +1 -0
- package/UseCases/GetItem/IGetItemUseCase.d.ts +4 -0
- package/UseCases/GetItem/IGetItemUseCase.js +3 -0
- package/UseCases/GetItem/IGetItemUseCase.js.map +1 -0
- package/UseCases/GetItem/index.d.ts +2 -0
- package/UseCases/GetItem/index.js +4 -0
- package/UseCases/GetItem/index.js.map +1 -0
- package/UseCases/GetScheduledItem/GetScheduledItemUseCase.d.ts +7 -0
- package/UseCases/GetScheduledItem/GetScheduledItemUseCase.js +13 -0
- package/UseCases/GetScheduledItem/GetScheduledItemUseCase.js.map +1 -0
- package/UseCases/GetScheduledItem/IGetScheduledItemUseCase.d.ts +4 -0
- package/UseCases/GetScheduledItem/IGetScheduledItemUseCase.js +3 -0
- package/UseCases/GetScheduledItem/IGetScheduledItemUseCase.js.map +1 -0
- package/UseCases/GetScheduledItem/index.d.ts +2 -0
- package/UseCases/GetScheduledItem/index.js +4 -0
- package/UseCases/GetScheduledItem/index.js.map +1 -0
- package/UseCases/ListItems/IListItemsUseCase.d.ts +4 -0
- package/UseCases/ListItems/IListItemsUseCase.js +3 -0
- package/UseCases/ListItems/IListItemsUseCase.js.map +1 -0
- package/UseCases/ListItems/ListItemsUseCase.d.ts +8 -0
- package/UseCases/ListItems/ListItemsUseCase.js +12 -0
- package/UseCases/ListItems/ListItemsUseCase.js.map +1 -0
- package/UseCases/ListItems/ListItemsUseCaseWithSearch.d.ts +9 -0
- package/UseCases/ListItems/ListItemsUseCaseWithSearch.js +20 -0
- package/UseCases/ListItems/ListItemsUseCaseWithSearch.js.map +1 -0
- package/UseCases/ListItems/ListItemsUseCaseWithSorting.d.ts +9 -0
- package/UseCases/ListItems/ListItemsUseCaseWithSorting.js +18 -0
- package/UseCases/ListItems/ListItemsUseCaseWithSorting.js.map +1 -0
- package/UseCases/ListItems/index.d.ts +4 -0
- package/UseCases/ListItems/index.js +6 -0
- package/UseCases/ListItems/index.js.map +1 -0
- package/UseCases/ListMoreItems/IListMoreItemsUseCase.d.ts +3 -0
- package/UseCases/ListMoreItems/IListMoreItemsUseCase.js +3 -0
- package/UseCases/ListMoreItems/IListMoreItemsUseCase.js.map +1 -0
- package/UseCases/ListMoreItems/ListMoreItemsUseCase.d.ts +7 -0
- package/UseCases/ListMoreItems/ListMoreItemsUseCase.js +12 -0
- package/UseCases/ListMoreItems/ListMoreItemsUseCase.js.map +1 -0
- package/UseCases/ListMoreItems/index.d.ts +2 -0
- package/UseCases/ListMoreItems/index.js +4 -0
- package/UseCases/ListMoreItems/index.js.map +1 -0
- package/UseCases/PublishItem/IPublishItemUseCase.d.ts +3 -0
- package/UseCases/PublishItem/IPublishItemUseCase.js +3 -0
- package/UseCases/PublishItem/IPublishItemUseCase.js.map +1 -0
- package/UseCases/PublishItem/PublishItemUseCase.d.ts +7 -0
- package/UseCases/PublishItem/PublishItemUseCase.js +12 -0
- package/UseCases/PublishItem/PublishItemUseCase.js.map +1 -0
- package/UseCases/PublishItem/index.d.ts +2 -0
- package/UseCases/PublishItem/index.js +4 -0
- package/UseCases/PublishItem/index.js.map +1 -0
- package/UseCases/SearchItems/ISearchItemsUseCase.d.ts +3 -0
- package/UseCases/SearchItems/ISearchItemsUseCase.js +3 -0
- package/UseCases/SearchItems/ISearchItemsUseCase.js.map +1 -0
- package/UseCases/SearchItems/SearchItemsUseCase.d.ts +7 -0
- package/UseCases/SearchItems/SearchItemsUseCase.js +12 -0
- package/UseCases/SearchItems/SearchItemsUseCase.js.map +1 -0
- package/UseCases/SearchItems/index.d.ts +2 -0
- package/UseCases/SearchItems/index.js +4 -0
- package/UseCases/SearchItems/index.js.map +1 -0
- package/UseCases/SelectAllItems/ISelectAllItemsUseCase.d.ts +3 -0
- package/UseCases/SelectAllItems/ISelectAllItemsUseCase.js +3 -0
- package/UseCases/SelectAllItems/ISelectAllItemsUseCase.js.map +1 -0
- package/UseCases/SelectAllItems/SelectAllItemsUseCase.d.ts +7 -0
- package/UseCases/SelectAllItems/SelectAllItemsUseCase.js +12 -0
- package/UseCases/SelectAllItems/SelectAllItemsUseCase.js.map +1 -0
- package/UseCases/SelectAllItems/index.d.ts +2 -0
- package/UseCases/SelectAllItems/index.js +4 -0
- package/UseCases/SelectAllItems/index.js.map +1 -0
- package/UseCases/SelectItems/ISelectItemsUseCase.d.ts +4 -0
- package/UseCases/SelectItems/ISelectItemsUseCase.js +3 -0
- package/UseCases/SelectItems/ISelectItemsUseCase.js.map +1 -0
- package/UseCases/SelectItems/SelectItemsUseCase.d.ts +7 -0
- package/UseCases/SelectItems/SelectItemsUseCase.js +12 -0
- package/UseCases/SelectItems/SelectItemsUseCase.js.map +1 -0
- package/UseCases/SelectItems/index.d.ts +2 -0
- package/UseCases/SelectItems/index.js +4 -0
- package/UseCases/SelectItems/index.js.map +1 -0
- package/UseCases/SortItems/ISortItemsUseCase.d.ts +4 -0
- package/UseCases/SortItems/ISortItemsUseCase.js +3 -0
- package/UseCases/SortItems/ISortItemsUseCase.js.map +1 -0
- package/UseCases/SortItems/SortItemsUseCase.d.ts +7 -0
- package/UseCases/SortItems/SortItemsUseCase.js +12 -0
- package/UseCases/SortItems/SortItemsUseCase.js.map +1 -0
- package/UseCases/SortItems/index.d.ts +2 -0
- package/UseCases/SortItems/index.js +4 -0
- package/UseCases/SortItems/index.js.map +1 -0
- package/UseCases/UnSelectAllItems/IUnselectAllItemsUseCase.d.ts +3 -0
- package/UseCases/UnSelectAllItems/IUnselectAllItemsUseCase.js +3 -0
- package/UseCases/UnSelectAllItems/IUnselectAllItemsUseCase.js.map +1 -0
- package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.d.ts +7 -0
- package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.js +12 -0
- package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.js.map +1 -0
- package/UseCases/UnSelectAllItems/index.d.ts +2 -0
- package/UseCases/UnSelectAllItems/index.js +4 -0
- package/UseCases/UnSelectAllItems/index.js.map +1 -0
- package/UseCases/UnpublishItem/IUnpublishItemUseCase.d.ts +3 -0
- package/UseCases/UnpublishItem/IUnpublishItemUseCase.js +3 -0
- package/UseCases/UnpublishItem/IUnpublishItemUseCase.js.map +1 -0
- package/UseCases/UnpublishItem/UnpublishItemUseCase.d.ts +7 -0
- package/UseCases/UnpublishItem/UnpublishItemUseCase.js +12 -0
- package/UseCases/UnpublishItem/UnpublishItemUseCase.js.map +1 -0
- package/UseCases/UnpublishItem/index.d.ts +2 -0
- package/UseCases/UnpublishItem/index.js +4 -0
- package/UseCases/UnpublishItem/index.js.map +1 -0
- package/UseCases/index.d.ts +11 -0
- package/UseCases/index.js +13 -0
- package/UseCases/index.js.map +1 -0
- package/index.d.ts +2 -0
- package/index.js +4 -0
- package/index.js.map +1 -0
- package/package.json +56 -0
- package/types.d.ts +36 -0
- package/types.js +15 -0
- package/types.js.map +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./ScheduleDialogAction.js\";\nexport * from \"./useScheduleDialog.js\";\n"],"mappings":"AAAA;AACA","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ScheduleType } from "../../../types";
|
|
2
|
+
export interface IScheduleDialogScheduleActionExecuteParams {
|
|
3
|
+
id: string;
|
|
4
|
+
modelId: string;
|
|
5
|
+
scheduleOn: Date;
|
|
6
|
+
type: ScheduleType;
|
|
7
|
+
}
|
|
8
|
+
export interface IScheduleDialogCancelActionExecuteParams {
|
|
9
|
+
id: string;
|
|
10
|
+
modelId: string;
|
|
11
|
+
}
|
|
12
|
+
export interface IScheduleDialogAction {
|
|
13
|
+
schedule(params: IScheduleDialogScheduleActionExecuteParams): Promise<void>;
|
|
14
|
+
cancel(params: IScheduleDialogCancelActionExecuteParams): Promise<void>;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { ScheduleType } from \"~/types\";\n\nexport interface IScheduleDialogScheduleActionExecuteParams {\n id: string;\n modelId: string;\n scheduleOn: Date;\n type: ScheduleType;\n}\n\nexport interface IScheduleDialogCancelActionExecuteParams {\n id: string;\n modelId: string;\n}\n\nexport interface IScheduleDialogAction {\n schedule(params: IScheduleDialogScheduleActionExecuteParams): Promise<void>;\n cancel(params: IScheduleDialogCancelActionExecuteParams): Promise<void>;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { SchedulerEntry } from "../../../types";
|
|
2
|
+
import type { CmsContentEntry } from "@webiny/app-headless-cms-common/types";
|
|
3
|
+
import type { IScheduleDialogAction } from "./types";
|
|
4
|
+
export interface ShowDialogParamsEntry {
|
|
5
|
+
id: string;
|
|
6
|
+
status: CmsContentEntry["meta"]["status"];
|
|
7
|
+
title: string;
|
|
8
|
+
modelId: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ShowDialogParams {
|
|
11
|
+
entry: ShowDialogParamsEntry;
|
|
12
|
+
schedulerEntry: SchedulerEntry | null;
|
|
13
|
+
action: IScheduleDialogAction;
|
|
14
|
+
}
|
|
15
|
+
interface UseShowScheduleDialogResponse {
|
|
16
|
+
showDialog: (params: ShowDialogParams) => void;
|
|
17
|
+
}
|
|
18
|
+
export declare const useScheduleDialog: () => UseShowScheduleDialogResponse;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
import React, { useCallback, useRef } from "react";
|
|
2
|
+
import { Alert, Grid, Input } from "@webiny/admin-ui";
|
|
3
|
+
import { useDialogs, useSnackbar } from "@webiny/app-admin";
|
|
4
|
+
import { Bind } from "@webiny/form";
|
|
5
|
+
import { validation } from "@webiny/validation";
|
|
6
|
+
import { ScheduleType } from "../../../types.js";
|
|
7
|
+
import ValidationError from "@webiny/validation/validationError.js";
|
|
8
|
+
const dateToLocaleStringFormatter = new Intl.DateTimeFormat(undefined, {
|
|
9
|
+
year: "numeric",
|
|
10
|
+
month: "2-digit",
|
|
11
|
+
day: "2-digit",
|
|
12
|
+
hour: "2-digit",
|
|
13
|
+
minute: "2-digit",
|
|
14
|
+
second: undefined,
|
|
15
|
+
hour12: false
|
|
16
|
+
});
|
|
17
|
+
const ReschedulingAlert = ({
|
|
18
|
+
scheduleOn,
|
|
19
|
+
type
|
|
20
|
+
}) => {
|
|
21
|
+
if (!scheduleOn || !type) {
|
|
22
|
+
return null;
|
|
23
|
+
}
|
|
24
|
+
const actionName = type === ScheduleType.publish ? "publish" : "unpublish";
|
|
25
|
+
return /*#__PURE__*/React.createElement(Alert, {
|
|
26
|
+
type: "danger"
|
|
27
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, "A ", actionName, " is already scheduled at", /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("strong", null, dateToLocaleStringFormatter.format(scheduleOn)), "."));
|
|
28
|
+
};
|
|
29
|
+
const formatDateForDateTimeLocal = date => {
|
|
30
|
+
if (!date) {
|
|
31
|
+
return undefined;
|
|
32
|
+
}
|
|
33
|
+
const pad = num => {
|
|
34
|
+
return String(num).padStart(2, "0");
|
|
35
|
+
};
|
|
36
|
+
const year = date.getFullYear();
|
|
37
|
+
const month = pad(date.getMonth() + 1);
|
|
38
|
+
const day = pad(date.getDate());
|
|
39
|
+
const hours = pad(date.getHours());
|
|
40
|
+
const minutes = pad(date.getMinutes());
|
|
41
|
+
return `${year}-${month}-${day}T${hours}:${minutes}`;
|
|
42
|
+
};
|
|
43
|
+
const minDateValidator = input => {
|
|
44
|
+
const value = new Date(input);
|
|
45
|
+
const minDate = new Date(new Date().getTime() + 120 * 1000);
|
|
46
|
+
if (minDate < value) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
throw new ValidationError(`The date must be at least 2 minutes in the future. Current minimum date is ${dateToLocaleStringFormatter.format(minDate)}.`);
|
|
50
|
+
};
|
|
51
|
+
minDateValidator.validatorName = "minDateValidator";
|
|
52
|
+
const FormComponent = ({
|
|
53
|
+
scheduleOn,
|
|
54
|
+
onCancel,
|
|
55
|
+
type
|
|
56
|
+
}) => {
|
|
57
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ReschedulingAlert, {
|
|
58
|
+
type: type,
|
|
59
|
+
scheduleOn: scheduleOn,
|
|
60
|
+
onCancel: onCancel
|
|
61
|
+
}), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Grid.Column, {
|
|
62
|
+
span: 12
|
|
63
|
+
}, /*#__PURE__*/React.createElement(Bind, {
|
|
64
|
+
name: "scheduleOn",
|
|
65
|
+
validators: [validation.create("required"), minDateValidator]
|
|
66
|
+
}, /*#__PURE__*/React.createElement(Input, {
|
|
67
|
+
title: "Schedule On",
|
|
68
|
+
label: "Schedule On",
|
|
69
|
+
size: "lg",
|
|
70
|
+
type: "datetime-local",
|
|
71
|
+
required: true,
|
|
72
|
+
autoFocus: true
|
|
73
|
+
})))));
|
|
74
|
+
};
|
|
75
|
+
export const useScheduleDialog = () => {
|
|
76
|
+
const dialog = useDialogs();
|
|
77
|
+
const {
|
|
78
|
+
showSnackbar
|
|
79
|
+
} = useSnackbar();
|
|
80
|
+
const dialogClose = useRef(() => {
|
|
81
|
+
return;
|
|
82
|
+
});
|
|
83
|
+
const onAccept = useCallback(async params => {
|
|
84
|
+
const {
|
|
85
|
+
action,
|
|
86
|
+
entry,
|
|
87
|
+
scheduleOn,
|
|
88
|
+
type
|
|
89
|
+
} = params;
|
|
90
|
+
try {
|
|
91
|
+
await action.schedule({
|
|
92
|
+
id: entry.id,
|
|
93
|
+
modelId: entry.modelId,
|
|
94
|
+
scheduleOn,
|
|
95
|
+
type
|
|
96
|
+
});
|
|
97
|
+
showSnackbar(`Scheduled ${type} action for "${entry.title}"!`);
|
|
98
|
+
} catch (error) {
|
|
99
|
+
showSnackbar(error.message);
|
|
100
|
+
console.error(error);
|
|
101
|
+
}
|
|
102
|
+
}, []);
|
|
103
|
+
const onCancel = useCallback(async params => {
|
|
104
|
+
const {
|
|
105
|
+
action,
|
|
106
|
+
schedulerEntry
|
|
107
|
+
} = params;
|
|
108
|
+
try {
|
|
109
|
+
await action.cancel({
|
|
110
|
+
id: schedulerEntry.id,
|
|
111
|
+
modelId: schedulerEntry.model.modelId
|
|
112
|
+
});
|
|
113
|
+
showSnackbar(`Canceled scheduled ${schedulerEntry.type} on "${schedulerEntry.title}"!`);
|
|
114
|
+
} catch (error) {
|
|
115
|
+
showSnackbar(error.message);
|
|
116
|
+
}
|
|
117
|
+
if (!dialogClose.current) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
dialogClose.current();
|
|
121
|
+
dialogClose.current = null;
|
|
122
|
+
}, []);
|
|
123
|
+
const showDialog = params => {
|
|
124
|
+
const {
|
|
125
|
+
schedulerEntry,
|
|
126
|
+
entry
|
|
127
|
+
} = params;
|
|
128
|
+
const scheduleOnValue = schedulerEntry?.publishOn || schedulerEntry?.unpublishOn;
|
|
129
|
+
dialogClose.current = dialog.showDialog({
|
|
130
|
+
title: `Schedule "${entry.title}"`,
|
|
131
|
+
content: /*#__PURE__*/React.createElement(FormComponent, {
|
|
132
|
+
type: schedulerEntry?.type,
|
|
133
|
+
scheduleOn: scheduleOnValue,
|
|
134
|
+
onCancel: onCancel
|
|
135
|
+
}),
|
|
136
|
+
formData: {
|
|
137
|
+
scheduleOn: formatDateForDateTimeLocal(scheduleOnValue)
|
|
138
|
+
},
|
|
139
|
+
acceptLabel: entry.status === "published" ? "Schedule Unpublish" : "Schedule Publish",
|
|
140
|
+
cancelLabel: "Discard",
|
|
141
|
+
loadingLabel: "Scheduling...",
|
|
142
|
+
onAccept: data => {
|
|
143
|
+
if (!data.scheduleOn) {
|
|
144
|
+
showSnackbar(`Missing "Schedule On" date!`);
|
|
145
|
+
return;
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* We need to convert scheduleOn from local string to the ISO String (UTC) format.
|
|
149
|
+
* This is important because the date will be stored in the database in UTC format.
|
|
150
|
+
*
|
|
151
|
+
* We display the date (in the UI) in users timezone time.
|
|
152
|
+
*/
|
|
153
|
+
let scheduleOn;
|
|
154
|
+
try {
|
|
155
|
+
scheduleOn = new Date(data.scheduleOn);
|
|
156
|
+
} catch (ex) {
|
|
157
|
+
showSnackbar(`Invalid "Schedule On" date!`);
|
|
158
|
+
console.error(ex);
|
|
159
|
+
return;
|
|
160
|
+
}
|
|
161
|
+
onAccept({
|
|
162
|
+
...params,
|
|
163
|
+
scheduleOn,
|
|
164
|
+
type: entry.status === "published" ? ScheduleType.unpublish : ScheduleType.publish
|
|
165
|
+
});
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
};
|
|
169
|
+
return {
|
|
170
|
+
showDialog
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
//# sourceMappingURL=useScheduleDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useCallback","useRef","Alert","Grid","Input","useDialogs","useSnackbar","Bind","validation","ScheduleType","ValidationError","dateToLocaleStringFormatter","Intl","DateTimeFormat","undefined","year","month","day","hour","minute","second","hour12","ReschedulingAlert","scheduleOn","type","actionName","publish","createElement","Fragment","format","formatDateForDateTimeLocal","date","pad","num","String","padStart","getFullYear","getMonth","getDate","hours","getHours","minutes","getMinutes","minDateValidator","input","value","Date","minDate","getTime","validatorName","FormComponent","onCancel","Column","span","name","validators","create","title","label","size","required","autoFocus","useScheduleDialog","dialog","showSnackbar","dialogClose","onAccept","params","action","entry","schedule","id","modelId","error","message","console","schedulerEntry","cancel","model","current","showDialog","scheduleOnValue","publishOn","unpublishOn","content","formData","acceptLabel","status","cancelLabel","loadingLabel","data","ex","unpublish"],"sources":["useScheduleDialog.tsx"],"sourcesContent":["import React, { useCallback, useRef } from \"react\";\nimport { Alert, Grid, Input } from \"@webiny/admin-ui\";\nimport { useDialogs, useSnackbar } from \"@webiny/app-admin\";\nimport { Bind } from \"@webiny/form\";\nimport { validation } from \"@webiny/validation\";\nimport type { SchedulerEntry } from \"~/types\";\nimport type { CmsContentEntry } from \"@webiny/app-headless-cms-common/types\";\nimport type { IScheduleDialogAction } from \"./types\";\nimport { ScheduleType } from \"~/types.js\";\nimport type { Validator } from \"@webiny/validation/types.js\";\nimport ValidationError from \"@webiny/validation/validationError.js\";\n\nexport interface ShowDialogParamsEntry {\n id: string;\n status: CmsContentEntry[\"meta\"][\"status\"];\n title: string;\n modelId: string;\n}\n\nexport interface ShowDialogParams {\n entry: ShowDialogParamsEntry;\n schedulerEntry: SchedulerEntry | null;\n action: IScheduleDialogAction;\n}\n\ninterface UseShowScheduleDialogResponse {\n showDialog: (params: ShowDialogParams) => void;\n}\n\ninterface FormComponentProps {\n scheduleOn: Date | undefined;\n type: ScheduleType | undefined;\n onCancel: OnCancelCallable;\n}\n\nconst dateToLocaleStringFormatter = new Intl.DateTimeFormat(undefined, {\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: undefined,\n hour12: false\n});\n\nconst ReschedulingAlert = ({ scheduleOn, type }: FormComponentProps) => {\n if (!scheduleOn || !type) {\n return null;\n }\n const actionName = type === ScheduleType.publish ? \"publish\" : \"unpublish\";\n return (\n <Alert type={\"danger\"}>\n <>\n A {actionName} is already scheduled at\n <br />\n <strong>{dateToLocaleStringFormatter.format(scheduleOn)}</strong>.\n </>\n </Alert>\n );\n};\n\nconst formatDateForDateTimeLocal = (date?: Date): string | undefined => {\n if (!date) {\n return undefined;\n }\n const pad = (num: number) => {\n return String(num).padStart(2, \"0\");\n };\n\n const year = date.getFullYear();\n const month = pad(date.getMonth() + 1);\n const day = pad(date.getDate());\n const hours = pad(date.getHours());\n const minutes = pad(date.getMinutes());\n\n return `${year}-${month}-${day}T${hours}:${minutes}`;\n};\n\nconst minDateValidator: Validator = (input: string) => {\n const value = new Date(input);\n const minDate = new Date(new Date().getTime() + 120 * 1000);\n if (minDate < value) {\n return;\n }\n throw new ValidationError(\n `The date must be at least 2 minutes in the future. Current minimum date is ${dateToLocaleStringFormatter.format(\n minDate\n )}.`\n );\n};\n\nminDateValidator.validatorName = \"minDateValidator\";\n\nconst FormComponent = ({ scheduleOn, onCancel, type }: FormComponentProps) => {\n return (\n <>\n {<ReschedulingAlert type={type} scheduleOn={scheduleOn} onCancel={onCancel} />}\n <Grid>\n <Grid.Column span={12}>\n <Bind\n name={\"scheduleOn\"}\n validators={[validation.create(\"required\"), minDateValidator]}\n >\n <Input\n title={\"Schedule On\"}\n label={\"Schedule On\"}\n size={\"lg\"}\n type={\"datetime-local\"}\n required\n autoFocus\n />\n </Bind>\n </Grid.Column>\n </Grid>\n </>\n );\n};\n\ninterface ScheduleFormData {\n scheduleOn?: string;\n}\n\ninterface IOnAcceptParams {\n action: IScheduleDialogAction;\n scheduleOn: Date;\n entry: ShowDialogParamsEntry;\n type: ScheduleType;\n}\n\ninterface IOnCancelParams {\n action: IScheduleDialogAction;\n schedulerEntry: SchedulerEntry;\n}\n\ninterface OnCancelCallable {\n (params: IOnCancelParams): Promise<void>;\n}\n\nexport const useScheduleDialog = (): UseShowScheduleDialogResponse => {\n const dialog = useDialogs();\n const { showSnackbar } = useSnackbar();\n\n const dialogClose = useRef<null | (() => void)>(() => {\n return;\n });\n\n const onAccept = useCallback(async (params: IOnAcceptParams) => {\n const { action, entry, scheduleOn, type } = params;\n\n try {\n await action.schedule({\n id: entry.id,\n modelId: entry.modelId,\n scheduleOn,\n type\n });\n showSnackbar(`Scheduled ${type} action for \"${entry.title}\"!`);\n } catch (error) {\n showSnackbar(error.message);\n console.error(error);\n }\n }, []);\n\n const onCancel = useCallback(async (params: IOnCancelParams) => {\n const { action, schedulerEntry } = params;\n\n try {\n await action.cancel({\n id: schedulerEntry.id,\n modelId: schedulerEntry.model.modelId\n });\n showSnackbar(`Canceled scheduled ${schedulerEntry.type} on \"${schedulerEntry.title}\"!`);\n } catch (error) {\n showSnackbar(error.message);\n }\n if (!dialogClose.current) {\n return;\n }\n dialogClose.current();\n dialogClose.current = null;\n }, []);\n\n const showDialog = (params: ShowDialogParams) => {\n const { schedulerEntry, entry } = params;\n\n const scheduleOnValue = schedulerEntry?.publishOn || schedulerEntry?.unpublishOn;\n\n dialogClose.current = dialog.showDialog({\n title: `Schedule \"${entry.title}\"`,\n content: (\n <FormComponent\n type={schedulerEntry?.type}\n scheduleOn={scheduleOnValue}\n onCancel={onCancel}\n />\n ),\n formData: {\n scheduleOn: formatDateForDateTimeLocal(scheduleOnValue)\n },\n acceptLabel: entry.status === \"published\" ? \"Schedule Unpublish\" : \"Schedule Publish\",\n cancelLabel: \"Discard\",\n loadingLabel: \"Scheduling...\",\n onAccept: (data: Partial<ScheduleFormData>) => {\n if (!data.scheduleOn) {\n showSnackbar(`Missing \"Schedule On\" date!`);\n return;\n }\n /**\n * We need to convert scheduleOn from local string to the ISO String (UTC) format.\n * This is important because the date will be stored in the database in UTC format.\n *\n * We display the date (in the UI) in users timezone time.\n */\n let scheduleOn: Date;\n try {\n scheduleOn = new Date(data.scheduleOn);\n } catch (ex) {\n showSnackbar(`Invalid \"Schedule On\" date!`);\n console.error(ex);\n return;\n }\n\n onAccept({\n ...params,\n scheduleOn,\n type:\n entry.status === \"published\" ? ScheduleType.unpublish : ScheduleType.publish\n });\n }\n });\n };\n\n return {\n showDialog\n };\n};\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import debounce from "lodash/debounce";
|
|
3
|
+
import { OverlayLayout } from "@webiny/app-admin";
|
|
4
|
+
import { Scrollbar } from "@webiny/ui/Scrollbar";
|
|
5
|
+
import { Title } from "../Title";
|
|
6
|
+
import { SearchInput } from "../SearchInput";
|
|
7
|
+
import { Empty } from "../Empty";
|
|
8
|
+
import { Table } from "../Table";
|
|
9
|
+
import { BottomInfoBar } from "../BottomInfoBar";
|
|
10
|
+
import { useScheduler } from "../../hooks";
|
|
11
|
+
export const SchedulerOverlay = props => {
|
|
12
|
+
const {
|
|
13
|
+
listMoreItems,
|
|
14
|
+
vm
|
|
15
|
+
} = useScheduler();
|
|
16
|
+
const onTableScroll = debounce(async ({
|
|
17
|
+
scrollFrame
|
|
18
|
+
}) => {
|
|
19
|
+
if (scrollFrame.top > 0.8) {
|
|
20
|
+
await listMoreItems();
|
|
21
|
+
}
|
|
22
|
+
}, 200);
|
|
23
|
+
return /*#__PURE__*/React.createElement(OverlayLayout, {
|
|
24
|
+
onExited: props.onExited,
|
|
25
|
+
barLeft: /*#__PURE__*/React.createElement(Title, {
|
|
26
|
+
title: props.title
|
|
27
|
+
}),
|
|
28
|
+
barMiddle: /*#__PURE__*/React.createElement(SearchInput, null)
|
|
29
|
+
}, /*#__PURE__*/React.createElement(Scrollbar, {
|
|
30
|
+
onScrollFrame: scrollFrame => onTableScroll({
|
|
31
|
+
scrollFrame
|
|
32
|
+
})
|
|
33
|
+
}, vm.isEmptyView ? /*#__PURE__*/React.createElement(Empty, null) : /*#__PURE__*/React.createElement(Table, null)), /*#__PURE__*/React.createElement(BottomInfoBar, null));
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=SchedulerOverlay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","debounce","OverlayLayout","Scrollbar","Title","SearchInput","Empty","Table","BottomInfoBar","useScheduler","SchedulerOverlay","props","listMoreItems","vm","onTableScroll","scrollFrame","top","createElement","onExited","barLeft","title","barMiddle","onScrollFrame","isEmptyView"],"sources":["SchedulerOverlay.tsx"],"sourcesContent":["import React from \"react\";\nimport debounce from \"lodash/debounce\";\nimport { OverlayLayout } from \"@webiny/app-admin\";\nimport { Scrollbar } from \"@webiny/ui/Scrollbar\";\nimport { Title } from \"~/Presentation/components/Title\";\nimport { SearchInput } from \"~/Presentation/components/SearchInput\";\nimport { Empty } from \"~/Presentation/components/Empty\";\nimport { Table } from \"~/Presentation/components/Table\";\nimport { BottomInfoBar } from \"~/Presentation/components/BottomInfoBar\";\nimport { useScheduler } from \"~/Presentation/hooks\";\n\ninterface SchedulerOverlayProps {\n title: string;\n onExited: () => void;\n}\n\nexport const SchedulerOverlay = (props: SchedulerOverlayProps) => {\n const { listMoreItems, vm } = useScheduler();\n\n const onTableScroll = debounce(async ({ scrollFrame }) => {\n if (scrollFrame.top > 0.8) {\n await listMoreItems();\n }\n }, 200);\n\n return (\n <OverlayLayout\n onExited={props.onExited}\n barLeft={<Title title={props.title} />}\n barMiddle={<SearchInput />}\n >\n <Scrollbar onScrollFrame={scrollFrame => onTableScroll({ scrollFrame })}>\n {vm.isEmptyView ? <Empty /> : <Table />}\n </Scrollbar>\n <BottomInfoBar />\n </OverlayLayout>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,QAAQ,MAAM,iBAAiB;AACtC,SAASC,aAAa,QAAQ,mBAAmB;AACjD,SAASC,SAAS,QAAQ,sBAAsB;AAChD,SAASC,KAAK;AACd,SAASC,WAAW;AACpB,SAASC,KAAK;AACd,SAASC,KAAK;AACd,SAASC,aAAa;AACtB,SAASC,YAAY;AAOrB,OAAO,MAAMC,gBAAgB,GAAIC,KAA4B,IAAK;EAC9D,MAAM;IAAEC,aAAa;IAAEC;EAAG,CAAC,GAAGJ,YAAY,CAAC,CAAC;EAE5C,MAAMK,aAAa,GAAGb,QAAQ,CAAC,OAAO;IAAEc;EAAY,CAAC,KAAK;IACtD,IAAIA,WAAW,CAACC,GAAG,GAAG,GAAG,EAAE;MACvB,MAAMJ,aAAa,CAAC,CAAC;IACzB;EACJ,CAAC,EAAE,GAAG,CAAC;EAEP,oBACIZ,KAAA,CAAAiB,aAAA,CAACf,aAAa;IACVgB,QAAQ,EAAEP,KAAK,CAACO,QAAS;IACzBC,OAAO,eAAEnB,KAAA,CAAAiB,aAAA,CAACb,KAAK;MAACgB,KAAK,EAAET,KAAK,CAACS;IAAM,CAAE,CAAE;IACvCC,SAAS,eAAErB,KAAA,CAAAiB,aAAA,CAACZ,WAAW,MAAE;EAAE,gBAE3BL,KAAA,CAAAiB,aAAA,CAACd,SAAS;IAACmB,aAAa,EAAEP,WAAW,IAAID,aAAa,CAAC;MAAEC;IAAY,CAAC;EAAE,GACnEF,EAAE,CAACU,WAAW,gBAAGvB,KAAA,CAAAiB,aAAA,CAACX,KAAK,MAAE,CAAC,gBAAGN,KAAA,CAAAiB,aAAA,CAACV,KAAK,MAAE,CAC/B,CAAC,eACZP,KAAA,CAAAiB,aAAA,CAACT,aAAa,MAAE,CACL,CAAC;AAExB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./SchedulerOverlay.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./SchedulerOverlay.js\";\n"],"mappings":"AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReactComponent as SearchIcon } from "@webiny/icons/search.svg";
|
|
3
|
+
import { DelayedOnChange, Icon, Input } from "@webiny/admin-ui";
|
|
4
|
+
import { useScheduler } from "../../hooks";
|
|
5
|
+
export const SearchInput = () => {
|
|
6
|
+
const {
|
|
7
|
+
vm,
|
|
8
|
+
searchItems
|
|
9
|
+
} = useScheduler();
|
|
10
|
+
return /*#__PURE__*/React.createElement(DelayedOnChange, {
|
|
11
|
+
value: vm.searchQuery,
|
|
12
|
+
onChange: value => {
|
|
13
|
+
if (value === vm.searchQuery) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
searchItems(value);
|
|
17
|
+
}
|
|
18
|
+
}, ({
|
|
19
|
+
value,
|
|
20
|
+
onChange
|
|
21
|
+
}) => /*#__PURE__*/React.createElement(Input, {
|
|
22
|
+
id: "scheduler__search-input",
|
|
23
|
+
value: value,
|
|
24
|
+
onChange: e => onChange(e.target.value),
|
|
25
|
+
forwardEventOnChange: true,
|
|
26
|
+
placeholder: vm.searchLabel,
|
|
27
|
+
"data-testid": "scheduler.search-input",
|
|
28
|
+
startIcon: /*#__PURE__*/React.createElement(Icon, {
|
|
29
|
+
icon: /*#__PURE__*/React.createElement(SearchIcon, null),
|
|
30
|
+
label: "Search"
|
|
31
|
+
}),
|
|
32
|
+
size: "md",
|
|
33
|
+
variant: "ghost"
|
|
34
|
+
}));
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=SearchInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","ReactComponent","SearchIcon","DelayedOnChange","Icon","Input","useScheduler","SearchInput","vm","searchItems","createElement","value","searchQuery","onChange","id","e","target","forwardEventOnChange","placeholder","searchLabel","startIcon","icon","label","size","variant"],"sources":["SearchInput.tsx"],"sourcesContent":["import React from \"react\";\nimport { ReactComponent as SearchIcon } from \"@webiny/icons/search.svg\";\nimport { DelayedOnChange, Icon, Input } from \"@webiny/admin-ui\";\nimport { useScheduler } from \"~/Presentation/hooks\";\n\nexport const SearchInput = () => {\n const { vm, searchItems } = useScheduler();\n\n return (\n <DelayedOnChange\n value={vm.searchQuery}\n onChange={value => {\n if (value === vm.searchQuery) {\n return;\n }\n searchItems(value);\n }}\n >\n {({ value, onChange }) => (\n <Input\n id={\"scheduler__search-input\"}\n value={value}\n onChange={e => onChange(e.target.value)}\n forwardEventOnChange={true}\n placeholder={vm.searchLabel}\n data-testid={\"scheduler.search-input\"}\n startIcon={<Icon icon={<SearchIcon />} label=\"Search\" />}\n size={\"md\"}\n variant={\"ghost\"}\n />\n )}\n </DelayedOnChange>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,IAAIC,UAAU,QAAQ,0BAA0B;AACvE,SAASC,eAAe,EAAEC,IAAI,EAAEC,KAAK,QAAQ,kBAAkB;AAC/D,SAASC,YAAY;AAErB,OAAO,MAAMC,WAAW,GAAGA,CAAA,KAAM;EAC7B,MAAM;IAAEC,EAAE;IAAEC;EAAY,CAAC,GAAGH,YAAY,CAAC,CAAC;EAE1C,oBACIN,KAAA,CAAAU,aAAA,CAACP,eAAe;IACZQ,KAAK,EAAEH,EAAE,CAACI,WAAY;IACtBC,QAAQ,EAAEF,KAAK,IAAI;MACf,IAAIA,KAAK,KAAKH,EAAE,CAACI,WAAW,EAAE;QAC1B;MACJ;MACAH,WAAW,CAACE,KAAK,CAAC;IACtB;EAAE,GAED,CAAC;IAAEA,KAAK;IAAEE;EAAS,CAAC,kBACjBb,KAAA,CAAAU,aAAA,CAACL,KAAK;IACFS,EAAE,EAAE,yBAA0B;IAC9BH,KAAK,EAAEA,KAAM;IACbE,QAAQ,EAAEE,CAAC,IAAIF,QAAQ,CAACE,CAAC,CAACC,MAAM,CAACL,KAAK,CAAE;IACxCM,oBAAoB,EAAE,IAAK;IAC3BC,WAAW,EAAEV,EAAE,CAACW,WAAY;IAC5B,eAAa,wBAAyB;IACtCC,SAAS,eAAEpB,KAAA,CAAAU,aAAA,CAACN,IAAI;MAACiB,IAAI,eAAErB,KAAA,CAAAU,aAAA,CAACR,UAAU,MAAE,CAAE;MAACoB,KAAK,EAAC;IAAQ,CAAE,CAAE;IACzDC,IAAI,EAAE,IAAK;IACXC,OAAO,EAAE;EAAQ,CACpB,CAEQ,CAAC;AAE1B,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./SearchInput";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./SearchInput\";\n"],"mappings":"AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import React, { useMemo } from "react";
|
|
2
|
+
import { createRecordsData, Table as AcoTable } from "@webiny/app-aco";
|
|
3
|
+
import { useScheduler } from "../../hooks";
|
|
4
|
+
import { LoadingActions } from "../../../types";
|
|
5
|
+
export const Table = () => {
|
|
6
|
+
const {
|
|
7
|
+
vm,
|
|
8
|
+
selectItems,
|
|
9
|
+
sortItems
|
|
10
|
+
} = useScheduler();
|
|
11
|
+
const data = useMemo(() => {
|
|
12
|
+
return createRecordsData(vm.items);
|
|
13
|
+
}, [vm.items]);
|
|
14
|
+
const selected = useMemo(() => {
|
|
15
|
+
return createRecordsData(vm.selectedItems);
|
|
16
|
+
}, [vm.selectedItems]);
|
|
17
|
+
return /*#__PURE__*/React.createElement(AcoTable, {
|
|
18
|
+
data: data,
|
|
19
|
+
loading: vm.loading[LoadingActions.list],
|
|
20
|
+
onSelectRow: entries => selectItems(entries.map(entry => entry.data)),
|
|
21
|
+
sorting: vm.sorting,
|
|
22
|
+
onSortingChange: sort => sortItems(sort),
|
|
23
|
+
selected: selected,
|
|
24
|
+
nameColumnId: vm.nameColumnId,
|
|
25
|
+
namespace: "scheduler"
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
//# sourceMappingURL=Table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useMemo","createRecordsData","Table","AcoTable","useScheduler","LoadingActions","vm","selectItems","sortItems","data","items","selected","selectedItems","createElement","loading","list","onSelectRow","entries","map","entry","sorting","onSortingChange","sort","nameColumnId","namespace"],"sources":["Table.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport { createRecordsData, Table as AcoTable } from \"@webiny/app-aco\";\nimport { useScheduler } from \"~/Presentation/hooks\";\nimport { LoadingActions, type SchedulerEntryTableRow } from \"~/types\";\n\nexport const Table = () => {\n const { vm, selectItems, sortItems } = useScheduler();\n\n const data = useMemo<SchedulerEntryTableRow[]>(() => {\n return createRecordsData(vm.items);\n }, [vm.items]);\n\n const selected = useMemo<SchedulerEntryTableRow[]>(() => {\n return createRecordsData(vm.selectedItems);\n }, [vm.selectedItems]);\n\n return (\n <AcoTable<SchedulerEntryTableRow>\n data={data}\n loading={vm.loading[LoadingActions.list]}\n onSelectRow={entries => selectItems(entries.map(entry => entry.data))}\n sorting={vm.sorting}\n onSortingChange={sort => sortItems(sort)}\n selected={selected}\n nameColumnId={vm.nameColumnId}\n namespace={\"scheduler\"}\n />\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,iBAAiB,EAAEC,KAAK,IAAIC,QAAQ,QAAQ,iBAAiB;AACtE,SAASC,YAAY;AACrB,SAASC,cAAc;AAEvB,OAAO,MAAMH,KAAK,GAAGA,CAAA,KAAM;EACvB,MAAM;IAAEI,EAAE;IAAEC,WAAW;IAAEC;EAAU,CAAC,GAAGJ,YAAY,CAAC,CAAC;EAErD,MAAMK,IAAI,GAAGT,OAAO,CAA2B,MAAM;IACjD,OAAOC,iBAAiB,CAACK,EAAE,CAACI,KAAK,CAAC;EACtC,CAAC,EAAE,CAACJ,EAAE,CAACI,KAAK,CAAC,CAAC;EAEd,MAAMC,QAAQ,GAAGX,OAAO,CAA2B,MAAM;IACrD,OAAOC,iBAAiB,CAACK,EAAE,CAACM,aAAa,CAAC;EAC9C,CAAC,EAAE,CAACN,EAAE,CAACM,aAAa,CAAC,CAAC;EAEtB,oBACIb,KAAA,CAAAc,aAAA,CAACV,QAAQ;IACLM,IAAI,EAAEA,IAAK;IACXK,OAAO,EAAER,EAAE,CAACQ,OAAO,CAACT,cAAc,CAACU,IAAI,CAAE;IACzCC,WAAW,EAAEC,OAAO,IAAIV,WAAW,CAACU,OAAO,CAACC,GAAG,CAACC,KAAK,IAAIA,KAAK,CAACV,IAAI,CAAC,CAAE;IACtEW,OAAO,EAAEd,EAAE,CAACc,OAAQ;IACpBC,eAAe,EAAEC,IAAI,IAAId,SAAS,CAACc,IAAI,CAAE;IACzCX,QAAQ,EAAEA,QAAS;IACnBY,YAAY,EAAEjB,EAAE,CAACiB,YAAa;IAC9BC,SAAS,EAAE;EAAY,CAC1B,CAAC;AAEV,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Table";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Table\";\n"],"mappings":"AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Skeleton } from "@webiny/ui/Skeleton";
|
|
3
|
+
import { Name } from "./Title.styled";
|
|
4
|
+
export const Title = ({
|
|
5
|
+
title
|
|
6
|
+
}) => {
|
|
7
|
+
return /*#__PURE__*/React.createElement(Name, {
|
|
8
|
+
use: "headline6",
|
|
9
|
+
tag: "h1"
|
|
10
|
+
}, title || /*#__PURE__*/React.createElement(Skeleton, {
|
|
11
|
+
theme: "dark"
|
|
12
|
+
}));
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=Title.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Skeleton","Name","Title","title","createElement","use","tag","theme"],"sources":["Title.tsx"],"sourcesContent":["import React from \"react\";\nimport { Skeleton } from \"@webiny/ui/Skeleton\";\nimport { Name } from \"./Title.styled\";\n\nexport interface TitleProps {\n title?: string;\n}\n\nexport const Title = ({ title }: TitleProps) => {\n return (\n <Name use={\"headline6\"} tag={\"h1\"}>\n {title || <Skeleton theme={\"dark\"} />}\n </Name>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,qBAAqB;AAC9C,SAASC,IAAI;AAMb,OAAO,MAAMC,KAAK,GAAGA,CAAC;EAAEC;AAAkB,CAAC,KAAK;EAC5C,oBACIJ,KAAA,CAAAK,aAAA,CAACH,IAAI;IAACI,GAAG,EAAE,WAAY;IAACC,GAAG,EAAE;EAAK,GAC7BH,KAAK,iBAAIJ,KAAA,CAAAK,aAAA,CAACJ,QAAQ;IAACO,KAAK,EAAE;EAAO,CAAE,CAClC,CAAC;AAEf,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import _styled from "@emotion/styled/base";
|
|
2
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
3
|
+
import { Typography } from "@webiny/ui/Typography";
|
|
4
|
+
export const Name = /*#__PURE__*/_styled(Typography, process.env.NODE_ENV === "production" ? {
|
|
5
|
+
target: "epwctpg0"
|
|
6
|
+
} : {
|
|
7
|
+
target: "epwctpg0",
|
|
8
|
+
label: "Name"
|
|
9
|
+
})(process.env.NODE_ENV === "production" ? {
|
|
10
|
+
name: "jtvt2b",
|
|
11
|
+
styles: "color:var(--mdc-theme-text-primary-on-background);padding-left:8px;line-height:48px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis"
|
|
12
|
+
} : {
|
|
13
|
+
name: "jtvt2b",
|
|
14
|
+
styles: "color:var(--mdc-theme-text-primary-on-background);padding-left:8px;line-height:48px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis",
|
|
15
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlRpdGxlLnN0eWxlZC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBSXVEIiwiZmlsZSI6IlRpdGxlLnN0eWxlZC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gXCJAZW1vdGlvbi9zdHlsZWRcIjtcbmltcG9ydCB0eXBlIHsgVHlwb2dyYXBoeVByb3BzIH0gZnJvbSBcIkB3ZWJpbnkvdWkvVHlwb2dyYXBoeVwiO1xuaW1wb3J0IHsgVHlwb2dyYXBoeSB9IGZyb20gXCJAd2ViaW55L3VpL1R5cG9ncmFwaHlcIjtcblxuZXhwb3J0IGNvbnN0IE5hbWUgPSBzdHlsZWQoVHlwb2dyYXBoeSk8VHlwb2dyYXBoeVByb3BzPmBcbiAgICBjb2xvcjogdmFyKC0tbWRjLXRoZW1lLXRleHQtcHJpbWFyeS1vbi1iYWNrZ3JvdW5kKTtcbiAgICBwYWRkaW5nLWxlZnQ6IDhweDtcbiAgICBsaW5lLWhlaWdodDogNDhweDtcbiAgICB3aGl0ZS1zcGFjZTogbm93cmFwO1xuICAgIG92ZXJmbG93OiBoaWRkZW47XG4gICAgdGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG5gO1xuIl19 */",
|
|
16
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=Title.styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Typography","Name","_styled","process","env","NODE_ENV","target","label","name","styles","map","toString","_EMOTION_STRINGIFIED_CSS_ERROR__"],"sources":["Title.styled.tsx"],"sourcesContent":["import styled from \"@emotion/styled\";\nimport type { TypographyProps } from \"@webiny/ui/Typography\";\nimport { Typography } from \"@webiny/ui/Typography\";\n\nexport const Name = styled(Typography)<TypographyProps>`\n color: var(--mdc-theme-text-primary-on-background);\n padding-left: 8px;\n line-height: 48px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n`;\n"],"mappings":";;AAEA,SAASA,UAAU,QAAQ,uBAAuB;AAElD,OAAO,MAAMC,IAAI,gBAAGC,OAAA,CAAOF,UAAU,EAAAG,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,EAAC,CAAAJ,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAG,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAC;AAAA,EAOrC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Title";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.tsx"],"sourcesContent":["export * from \"./Title\";\n"],"mappings":"AAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./list";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./list\";\n"],"mappings":"AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { AcoConfig, type RecordActionConfig } from "@webiny/app-aco";
|
|
3
|
+
export type { RecordActionConfig as EntryActionConfig };
|
|
4
|
+
type EntryActionProps = React.ComponentProps<typeof AcoConfig.Record.Action>;
|
|
5
|
+
export declare const EntryAction: ((props: EntryActionProps) => React.JSX.Element) & {
|
|
6
|
+
OptionsMenuItem: (props: import("@webiny/app-admin").OptionsMenuItemProps) => React.JSX.Element;
|
|
7
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { CompositionScope } from "@webiny/react-composition";
|
|
3
|
+
import { AcoConfig } from "@webiny/app-aco";
|
|
4
|
+
const {
|
|
5
|
+
Record
|
|
6
|
+
} = AcoConfig;
|
|
7
|
+
const BaseEntryAction = props => {
|
|
8
|
+
return /*#__PURE__*/React.createElement(CompositionScope, {
|
|
9
|
+
name: "scheduler"
|
|
10
|
+
}, /*#__PURE__*/React.createElement(AcoConfig, null, /*#__PURE__*/React.createElement(Record.Action, props)));
|
|
11
|
+
};
|
|
12
|
+
export const EntryAction = Object.assign(BaseEntryAction, {
|
|
13
|
+
OptionsMenuItem: Record.Action.OptionsMenuItem
|
|
14
|
+
});
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=EntryAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","CompositionScope","AcoConfig","Record","BaseEntryAction","props","createElement","name","Action","EntryAction","Object","assign","OptionsMenuItem"],"sources":["EntryAction.tsx"],"sourcesContent":["import React from \"react\";\nimport { CompositionScope } from \"@webiny/react-composition\";\nimport { AcoConfig, type RecordActionConfig } from \"@webiny/app-aco\";\n\nconst { Record } = AcoConfig;\n\nexport type { RecordActionConfig as EntryActionConfig };\n\ntype EntryActionProps = React.ComponentProps<typeof AcoConfig.Record.Action>;\n\nconst BaseEntryAction = (props: EntryActionProps) => {\n return (\n <CompositionScope name={\"scheduler\"}>\n <AcoConfig>\n <Record.Action {...props} />\n </AcoConfig>\n </CompositionScope>\n );\n};\n\nexport const EntryAction = Object.assign(BaseEntryAction, {\n OptionsMenuItem: Record.Action.OptionsMenuItem\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,gBAAgB,QAAQ,2BAA2B;AAC5D,SAASC,SAAS,QAAiC,iBAAiB;AAEpE,MAAM;EAAEC;AAAO,CAAC,GAAGD,SAAS;AAM5B,MAAME,eAAe,GAAIC,KAAuB,IAAK;EACjD,oBACIL,KAAA,CAAAM,aAAA,CAACL,gBAAgB;IAACM,IAAI,EAAE;EAAY,gBAChCP,KAAA,CAAAM,aAAA,CAACJ,SAAS,qBACNF,KAAA,CAAAM,aAAA,CAACH,MAAM,CAACK,MAAM,EAAKH,KAAQ,CACpB,CACG,CAAC;AAE3B,CAAC;AAED,OAAO,MAAMI,WAAW,GAAGC,MAAM,CAACC,MAAM,CAACP,eAAe,EAAE;EACtDQ,eAAe,EAAET,MAAM,CAACK,MAAM,CAACI;AACnC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { AcoConfig, type TableColumnConfig as ColumnConfig } from "@webiny/app-aco";
|
|
3
|
+
import type { SchedulerEntryTableRow } from "../../../../../types";
|
|
4
|
+
export type { ColumnConfig };
|
|
5
|
+
type ColumnProps = React.ComponentProps<typeof AcoConfig.Table.Column>;
|
|
6
|
+
export declare const Column: ((props: ColumnProps) => React.JSX.Element) & {
|
|
7
|
+
useTableRow: {
|
|
8
|
+
(): import("@webiny/app-aco").TableRowContextData<SchedulerEntryTableRow>;
|
|
9
|
+
<TUserRow>(): import("@webiny/app-aco").TableRowContextData<SchedulerEntryTableRow & {
|
|
10
|
+
data: TUserRow;
|
|
11
|
+
}>;
|
|
12
|
+
};
|
|
13
|
+
isFolderRow: (row: import("@webiny/app-aco").TableRow<unknown>) => row is import("@webiny/app-aco").FolderTableRow;
|
|
14
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { AcoConfig } from "@webiny/app-aco";
|
|
3
|
+
const {
|
|
4
|
+
Table
|
|
5
|
+
} = AcoConfig;
|
|
6
|
+
const BaseColumn = props => {
|
|
7
|
+
return /*#__PURE__*/React.createElement(AcoConfig, null, /*#__PURE__*/React.createElement(Table.Column, props));
|
|
8
|
+
};
|
|
9
|
+
export const Column = Object.assign(BaseColumn, {
|
|
10
|
+
useTableRow: Table.Column.createUseTableRow(),
|
|
11
|
+
isFolderRow: Table.Column.isFolderRow
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
//# sourceMappingURL=Column.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","AcoConfig","Table","BaseColumn","props","createElement","Column","Object","assign","useTableRow","createUseTableRow","isFolderRow"],"sources":["Column.tsx"],"sourcesContent":["import React from \"react\";\nimport { AcoConfig, type TableColumnConfig as ColumnConfig } from \"@webiny/app-aco\";\nimport type { SchedulerEntryTableRow } from \"~/types\";\n\nconst { Table } = AcoConfig;\n\nexport type { ColumnConfig };\n\ntype ColumnProps = React.ComponentProps<typeof AcoConfig.Table.Column>;\n\nconst BaseColumn = (props: ColumnProps) => {\n return (\n <AcoConfig>\n <Table.Column {...props} />\n </AcoConfig>\n );\n};\n\nexport const Column = Object.assign(BaseColumn, {\n useTableRow: Table.Column.createUseTableRow<SchedulerEntryTableRow>(),\n isFolderRow: Table.Column.isFolderRow\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,QAAgD,iBAAiB;AAGnF,MAAM;EAAEC;AAAM,CAAC,GAAGD,SAAS;AAM3B,MAAME,UAAU,GAAIC,KAAkB,IAAK;EACvC,oBACIJ,KAAA,CAAAK,aAAA,CAACJ,SAAS,qBACND,KAAA,CAAAK,aAAA,CAACH,KAAK,CAACI,MAAM,EAAKF,KAAQ,CACnB,CAAC;AAEpB,CAAC;AAED,OAAO,MAAME,MAAM,GAAGC,MAAM,CAACC,MAAM,CAACL,UAAU,EAAE;EAC5CM,WAAW,EAAEP,KAAK,CAACI,MAAM,CAACI,iBAAiB,CAAyB,CAAC;EACrEC,WAAW,EAAET,KAAK,CAACI,MAAM,CAACK;AAC9B,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { AcoConfig, type TableSortingConfig as SortingConfig } from "@webiny/app-aco";
|
|
3
|
+
export type { SortingConfig };
|
|
4
|
+
type SortingProps = React.ComponentProps<typeof AcoConfig.Table.Sorting>;
|
|
5
|
+
export declare const Sorting: (props: SortingProps) => React.JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { AcoConfig } from "@webiny/app-aco";
|
|
3
|
+
const {
|
|
4
|
+
Table
|
|
5
|
+
} = AcoConfig;
|
|
6
|
+
export const Sorting = props => {
|
|
7
|
+
return /*#__PURE__*/React.createElement(AcoConfig, null, /*#__PURE__*/React.createElement(Table.Sorting, props));
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
//# sourceMappingURL=Sorting.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","AcoConfig","Table","Sorting","props","createElement"],"sources":["Sorting.tsx"],"sourcesContent":["import React from \"react\";\nimport { AcoConfig, type TableSortingConfig as SortingConfig } from \"@webiny/app-aco\";\n\nconst { Table } = AcoConfig;\n\nexport type { SortingConfig };\n\ntype SortingProps = React.ComponentProps<typeof AcoConfig.Table.Sorting>;\n\nexport const Sorting = (props: SortingProps) => {\n return (\n <AcoConfig>\n <Table.Sorting {...props} />\n </AcoConfig>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,QAAkD,iBAAiB;AAErF,MAAM;EAAEC;AAAM,CAAC,GAAGD,SAAS;AAM3B,OAAO,MAAME,OAAO,GAAIC,KAAmB,IAAK;EAC5C,oBACIJ,KAAA,CAAAK,aAAA,CAACJ,SAAS,qBACND,KAAA,CAAAK,aAAA,CAACH,KAAK,CAACC,OAAO,EAAKC,KAAQ,CACpB,CAAC;AAEpB,CAAC","ignoreList":[]}
|