@webiny/app-headless-cms-scheduler 6.0.0 → 6.1.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/Browser/BrowserConfig.d.ts +2 -0
- package/components/Browser/BrowserConfig.js +15 -0
- package/components/Browser/BrowserConfig.js.map +1 -0
- package/components/Browser/MenuItem.d.ts +2 -0
- package/components/Browser/MenuItem.js +53 -0
- package/components/Browser/MenuItem.js.map +1 -0
- package/components/Editor/EditorConfig.d.ts +2 -0
- package/components/Editor/EditorConfig.js +15 -0
- package/components/Editor/EditorConfig.js.map +1 -0
- package/components/Editor/MenuItem.d.ts +2 -0
- package/components/Editor/MenuItem.js +49 -0
- package/components/Editor/MenuItem.js.map +1 -0
- package/components/Sidebar/SchedulerButton.d.ts +5 -0
- package/components/Sidebar/SchedulerButton.js +17 -0
- package/components/Sidebar/SchedulerButton.js.map +1 -0
- package/components/Sidebar/Sidebar.d.ts +2 -0
- package/components/Sidebar/Sidebar.js +41 -0
- package/components/Sidebar/Sidebar.js.map +1 -0
- package/components/index.d.ts +3 -0
- package/components/index.js +5 -0
- package/components/index.js.map +1 -0
- package/hooks/usePermissions.d.ts +4 -0
- package/hooks/usePermissions.js +17 -0
- package/hooks/usePermissions.js.map +1 -0
- package/index.d.ts +2 -2
- package/index.js +5 -1
- package/index.js.map +1 -1
- package/package.json +9 -23
- package/utils/index.d.ts +1 -0
- package/utils/index.js +3 -0
- package/utils/index.js.map +1 -0
- package/utils/namespace.d.ts +7 -0
- package/utils/namespace.js +11 -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 -5
- 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 -4
- 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 -4
- 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 -28
- 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 -3
- 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 -3
- 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 -3
- 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 -3
- 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 -3
- 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 -3
- 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 -3
- 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 -3
- 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 -3
- 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 -3
- 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 -3
- 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 -3
- 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 -3
- 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 -20
- package/Presentation/components/BottomInfoBar/BottomInfoBar.styled.js +0 -69
- 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 -23
- 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 -11
- package/Presentation/components/Cells/CellRevision/CellRevision.styled.js +0 -44
- 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 -24
- package/Presentation/components/Cells/CellScheduledOn/CellScheduledOn.js +0 -24
- 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 -11
- package/Presentation/components/Cells/CellTitle/CellTitle.styled.js +0 -44
- 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 -18
- package/Presentation/components/Cells/CellType/CellType.js.map +0 -1
- package/Presentation/components/Cells/CellType/CellType.styled.d.ts +0 -11
- package/Presentation/components/Cells/CellType/CellType.styled.js +0 -44
- 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 -8
- package/Presentation/components/Empty/Empty.styled.js +0 -30
- 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 -43
- package/Presentation/components/ScheduleDialog/useScheduleDialog.js +0 -193
- 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 -34
- 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 -18
- 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 -18
- 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 -23
- 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 -31
- 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 -26
- package/Presentation/hooks/useScheduler.js +0 -51
- package/Presentation/hooks/useScheduler.js.map +0 -1
- package/Presentation/hooks/useSchedulerItem.d.ts +0 -11
- package/Presentation/hooks/useSchedulerItem.js +0 -9
- package/Presentation/hooks/useSchedulerItem.js.map +0 -1
- package/Presentation/index.d.ts +0 -28
- package/Presentation/index.js +0 -35
- 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 -3
- 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 -3
- 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 -3
- 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 -5
- 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 -3
- 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 -3
- 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 -3
- 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 -3
- 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 -3
- 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 -3
- 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 -3
- 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 -3
- 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
|
@@ -1,193 +0,0 @@
|
|
|
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
|
-
import { makeDecoratable } from "@webiny/react-composition";
|
|
9
|
-
const dateToLocaleStringFormatter = new Intl.DateTimeFormat(undefined, {
|
|
10
|
-
year: "numeric",
|
|
11
|
-
month: "2-digit",
|
|
12
|
-
day: "2-digit",
|
|
13
|
-
hour: "2-digit",
|
|
14
|
-
minute: "2-digit",
|
|
15
|
-
second: undefined,
|
|
16
|
-
hour12: false
|
|
17
|
-
});
|
|
18
|
-
const ReschedulingAlert = ({
|
|
19
|
-
scheduleOn,
|
|
20
|
-
type
|
|
21
|
-
}) => {
|
|
22
|
-
if (!scheduleOn || !type) {
|
|
23
|
-
return null;
|
|
24
|
-
}
|
|
25
|
-
const actionName = type === ScheduleType.publish ? "publish" : "unpublish";
|
|
26
|
-
return /*#__PURE__*/React.createElement(Alert, {
|
|
27
|
-
type: "danger"
|
|
28
|
-
}, /*#__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)), "."));
|
|
29
|
-
};
|
|
30
|
-
/**
|
|
31
|
-
* DO NOT use a library for this!
|
|
32
|
-
*/
|
|
33
|
-
const padLeft = num => {
|
|
34
|
-
return String(num).padStart(2, "0");
|
|
35
|
-
};
|
|
36
|
-
const formatDateForDateTimeLocal = date => {
|
|
37
|
-
if (!date) {
|
|
38
|
-
return undefined;
|
|
39
|
-
} else if (typeof date === "string") {
|
|
40
|
-
date = new Date(date);
|
|
41
|
-
}
|
|
42
|
-
const year = date.getFullYear();
|
|
43
|
-
const month = padLeft(date.getMonth() + 1);
|
|
44
|
-
const day = padLeft(date.getDate());
|
|
45
|
-
const hours = padLeft(date.getHours());
|
|
46
|
-
const minutes = padLeft(date.getMinutes());
|
|
47
|
-
return `${year}-${month}-${day}T${hours}:${minutes}`;
|
|
48
|
-
};
|
|
49
|
-
const minDateValidator = input => {
|
|
50
|
-
const value = new Date(input);
|
|
51
|
-
const minDate = new Date(new Date().getTime() + 120 * 1000);
|
|
52
|
-
if (minDate < value) {
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
throw new ValidationError(`The date must be at least 2 minutes in the future. Current minimum date is ${dateToLocaleStringFormatter.format(minDate)}.`);
|
|
56
|
-
};
|
|
57
|
-
minDateValidator.validatorName = "minDateValidator";
|
|
58
|
-
export const SchedulerDialogFormComponentDateTimeInput = makeDecoratable("SchedulerDialogFormComponentDateTimeInput", props => {
|
|
59
|
-
const {
|
|
60
|
-
bind
|
|
61
|
-
} = props;
|
|
62
|
-
return /*#__PURE__*/React.createElement(Input, Object.assign({}, bind, {
|
|
63
|
-
value: formatDateForDateTimeLocal(bind.value),
|
|
64
|
-
title: "Schedule On",
|
|
65
|
-
label: "Schedule On",
|
|
66
|
-
size: "lg",
|
|
67
|
-
type: "datetime-local",
|
|
68
|
-
required: true,
|
|
69
|
-
autoFocus: true
|
|
70
|
-
}));
|
|
71
|
-
});
|
|
72
|
-
const FormComponent = ({
|
|
73
|
-
scheduleOn,
|
|
74
|
-
onCancel,
|
|
75
|
-
type
|
|
76
|
-
}) => {
|
|
77
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ReschedulingAlert, {
|
|
78
|
-
type: type,
|
|
79
|
-
scheduleOn: scheduleOn,
|
|
80
|
-
onCancel: onCancel
|
|
81
|
-
}), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Grid.Column, {
|
|
82
|
-
span: 12
|
|
83
|
-
}, /*#__PURE__*/React.createElement(Bind, {
|
|
84
|
-
name: "scheduleOn",
|
|
85
|
-
validators: [validation.create("required"), minDateValidator]
|
|
86
|
-
}, bind => {
|
|
87
|
-
return /*#__PURE__*/React.createElement(SchedulerDialogFormComponentDateTimeInput, {
|
|
88
|
-
bind: bind
|
|
89
|
-
});
|
|
90
|
-
}))));
|
|
91
|
-
};
|
|
92
|
-
export const useScheduleDialog = () => {
|
|
93
|
-
const dialog = useDialogs();
|
|
94
|
-
const {
|
|
95
|
-
showSnackbar
|
|
96
|
-
} = useSnackbar();
|
|
97
|
-
const dialogClose = useRef(() => {
|
|
98
|
-
return;
|
|
99
|
-
});
|
|
100
|
-
const onAccept = useCallback(async params => {
|
|
101
|
-
const {
|
|
102
|
-
action,
|
|
103
|
-
entry,
|
|
104
|
-
scheduleOn,
|
|
105
|
-
type
|
|
106
|
-
} = params;
|
|
107
|
-
try {
|
|
108
|
-
await action.schedule({
|
|
109
|
-
id: entry.id,
|
|
110
|
-
modelId: entry.modelId,
|
|
111
|
-
scheduleOn,
|
|
112
|
-
type
|
|
113
|
-
});
|
|
114
|
-
showSnackbar(`Scheduled ${type} action for "${entry.title}"!`);
|
|
115
|
-
} catch (error) {
|
|
116
|
-
showSnackbar(error.message);
|
|
117
|
-
console.error(error);
|
|
118
|
-
}
|
|
119
|
-
}, []);
|
|
120
|
-
const onCancel = useCallback(async params => {
|
|
121
|
-
const {
|
|
122
|
-
action,
|
|
123
|
-
schedulerEntry
|
|
124
|
-
} = params;
|
|
125
|
-
try {
|
|
126
|
-
await action.cancel({
|
|
127
|
-
id: schedulerEntry.id,
|
|
128
|
-
modelId: schedulerEntry.model.modelId
|
|
129
|
-
});
|
|
130
|
-
showSnackbar(`Canceled scheduled ${schedulerEntry.type} on "${schedulerEntry.title}"!`);
|
|
131
|
-
} catch (error) {
|
|
132
|
-
showSnackbar(error.message);
|
|
133
|
-
}
|
|
134
|
-
if (!dialogClose.current) {
|
|
135
|
-
return;
|
|
136
|
-
}
|
|
137
|
-
dialogClose.current();
|
|
138
|
-
dialogClose.current = null;
|
|
139
|
-
}, []);
|
|
140
|
-
const showDialog = params => {
|
|
141
|
-
const {
|
|
142
|
-
schedulerEntry,
|
|
143
|
-
entry
|
|
144
|
-
} = params;
|
|
145
|
-
const scheduleOn = schedulerEntry?.publishOn || schedulerEntry?.unpublishOn;
|
|
146
|
-
dialogClose.current = dialog.showDialog({
|
|
147
|
-
title: `Schedule "${entry.title}"`,
|
|
148
|
-
content: /*#__PURE__*/React.createElement(FormComponent, {
|
|
149
|
-
type: schedulerEntry?.type,
|
|
150
|
-
scheduleOn: scheduleOn,
|
|
151
|
-
onCancel: onCancel
|
|
152
|
-
}),
|
|
153
|
-
formData: {
|
|
154
|
-
scheduleOn
|
|
155
|
-
},
|
|
156
|
-
acceptLabel: entry.status === "published" ? "Schedule Unpublish" : "Schedule Publish",
|
|
157
|
-
cancelLabel: "Discard",
|
|
158
|
-
loadingLabel: "Scheduling...",
|
|
159
|
-
onAccept: data => {
|
|
160
|
-
if (!data.scheduleOn) {
|
|
161
|
-
showSnackbar(`Missing "Schedule On" date!`);
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
/**
|
|
165
|
-
* We need to convert scheduleOn from local string to the ISO String (UTC) format.
|
|
166
|
-
* This is important because the date will be stored in the database in UTC format.
|
|
167
|
-
*
|
|
168
|
-
* We display the date (in the UI) in users timezone time.
|
|
169
|
-
*/
|
|
170
|
-
let scheduleOn;
|
|
171
|
-
try {
|
|
172
|
-
scheduleOn = new Date(data.scheduleOn);
|
|
173
|
-
} catch (ex) {
|
|
174
|
-
showSnackbar(`Invalid "Schedule On" date!`, {
|
|
175
|
-
value: data.scheduleOn
|
|
176
|
-
});
|
|
177
|
-
console.error(ex);
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
|
-
onAccept({
|
|
181
|
-
...params,
|
|
182
|
-
scheduleOn,
|
|
183
|
-
type: entry.status === "published" ? ScheduleType.unpublish : ScheduleType.publish
|
|
184
|
-
});
|
|
185
|
-
}
|
|
186
|
-
});
|
|
187
|
-
};
|
|
188
|
-
return {
|
|
189
|
-
showDialog
|
|
190
|
-
};
|
|
191
|
-
};
|
|
192
|
-
|
|
193
|
-
//# sourceMappingURL=useScheduleDialog.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","useCallback","useRef","Alert","Grid","Input","useDialogs","useSnackbar","Bind","validation","ScheduleType","ValidationError","makeDecoratable","dateToLocaleStringFormatter","Intl","DateTimeFormat","undefined","year","month","day","hour","minute","second","hour12","ReschedulingAlert","scheduleOn","type","actionName","publish","createElement","Fragment","format","padLeft","num","String","padStart","formatDateForDateTimeLocal","date","Date","getFullYear","getMonth","getDate","hours","getHours","minutes","getMinutes","minDateValidator","input","value","minDate","getTime","validatorName","SchedulerDialogFormComponentDateTimeInput","props","bind","Object","assign","title","label","size","required","autoFocus","FormComponent","onCancel","Column","span","name","validators","create","useScheduleDialog","dialog","showSnackbar","dialogClose","onAccept","params","action","entry","schedule","id","modelId","error","message","console","schedulerEntry","cancel","model","current","showDialog","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, type BindComponentRenderProp } from \"@webiny/form\";\nimport { validation } from \"@webiny/validation\";\nimport type { SchedulerEntry } from \"~/types.js\";\nimport type { CmsContentEntry } from \"@webiny/app-headless-cms-common/types/index.js\";\nimport type { IScheduleDialogAction } from \"./types.js\";\nimport { ScheduleType } from \"~/types.js\";\nimport type { Validator } from \"@webiny/validation/types.js\";\nimport ValidationError from \"@webiny/validation/validationError.js\";\nimport { makeDecoratable } from \"@webiny/react-composition\";\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/**\n * DO NOT use a library for this!\n */\nconst padLeft = (num: number) => {\n return String(num).padStart(2, \"0\");\n};\n\nconst formatDateForDateTimeLocal = (date?: Date | string): string | undefined => {\n if (!date) {\n return undefined;\n } else if (typeof date === \"string\") {\n date = new Date(date);\n }\n\n const year = date.getFullYear();\n const month = padLeft(date.getMonth() + 1);\n const day = padLeft(date.getDate());\n const hours = padLeft(date.getHours());\n const minutes = padLeft(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\nexport interface ISchedulerDialogFormComponentDateTimeInputProps {\n bind: BindComponentRenderProp<Date>;\n}\n\nexport const SchedulerDialogFormComponentDateTimeInput = makeDecoratable(\n \"SchedulerDialogFormComponentDateTimeInput\",\n (props: ISchedulerDialogFormComponentDateTimeInputProps) => {\n const { bind } = props;\n\n return (\n <Input\n {...bind}\n value={formatDateForDateTimeLocal(bind.value)}\n title={\"Schedule On\"}\n label={\"Schedule On\"}\n size={\"lg\"}\n type={\"datetime-local\"}\n required\n autoFocus\n />\n );\n }\n);\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 {bind => {\n return <SchedulerDialogFormComponentDateTimeInput bind={bind} />;\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 scheduleOn = 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={scheduleOn}\n onCancel={onCancel}\n />\n ),\n formData: {\n scheduleOn\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 value: data.scheduleOn\n });\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":[]}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import debounce from "lodash/debounce.js";
|
|
3
|
-
import { OverlayLayout } from "@webiny/app-admin";
|
|
4
|
-
import { Scrollbar } from "@webiny/ui/Scrollbar/index.js";
|
|
5
|
-
import { Title } from "../Title/index.js";
|
|
6
|
-
import { SearchInput } from "../SearchInput/index.js";
|
|
7
|
-
import { Empty } from "../Empty/index.js";
|
|
8
|
-
import { Table } from "../Table/index.js";
|
|
9
|
-
import { BottomInfoBar } from "../BottomInfoBar/index.js";
|
|
10
|
-
import { useScheduler } from "../../hooks/index.js";
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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.js\";\nimport { OverlayLayout } from \"@webiny/app-admin\";\nimport { Scrollbar } from \"@webiny/ui/Scrollbar/index.js\";\nimport { Title } from \"~/Presentation/components/Title/index.js\";\nimport { SearchInput } from \"~/Presentation/components/SearchInput/index.js\";\nimport { Empty } from \"~/Presentation/components/Empty/index.js\";\nimport { Table } from \"~/Presentation/components/Table/index.js\";\nimport { BottomInfoBar } from \"~/Presentation/components/BottomInfoBar/index.js\";\nimport { useScheduler } from \"~/Presentation/hooks/index.js\";\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,oBAAoB;AACzC,SAASC,aAAa,QAAQ,mBAAmB;AACjD,SAASC,SAAS,QAAQ,+BAA+B;AACzD,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":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./SchedulerOverlay.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./SchedulerOverlay.js\";\n"],"mappings":"AAAA","ignoreList":[]}
|
|
@@ -1,37 +0,0 @@
|
|
|
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/index.js";
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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/index.js\";\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":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./SearchInput.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./SearchInput.js\";\n"],"mappings":"AAAA","ignoreList":[]}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import React, { useMemo } from "react";
|
|
2
|
-
import { createRecordsData, Table as AcoTable } from "@webiny/app-aco";
|
|
3
|
-
import { useScheduler } from "../../hooks/index.js";
|
|
4
|
-
import { LoadingActions } from "../../../types.js";
|
|
5
|
-
import { useSchedulerListConfig } from "../../configs/index.js";
|
|
6
|
-
export const Table = () => {
|
|
7
|
-
const {
|
|
8
|
-
vm,
|
|
9
|
-
selectItems,
|
|
10
|
-
sortItems
|
|
11
|
-
} = useScheduler();
|
|
12
|
-
const {
|
|
13
|
-
browser
|
|
14
|
-
} = useSchedulerListConfig();
|
|
15
|
-
const data = useMemo(() => {
|
|
16
|
-
return createRecordsData(vm.items);
|
|
17
|
-
}, [vm.items]);
|
|
18
|
-
const selected = useMemo(() => {
|
|
19
|
-
return createRecordsData(vm.selectedItems);
|
|
20
|
-
}, [vm.selectedItems]);
|
|
21
|
-
return /*#__PURE__*/React.createElement(AcoTable, {
|
|
22
|
-
columns: browser.table.columns,
|
|
23
|
-
data: data,
|
|
24
|
-
loading: vm.loading[LoadingActions.list],
|
|
25
|
-
onSelectRow: entries => selectItems(entries.map(entry => entry.data)),
|
|
26
|
-
sorting: vm.sorting,
|
|
27
|
-
onSortingChange: sort => sortItems(sort),
|
|
28
|
-
selected: selected,
|
|
29
|
-
nameColumnId: vm.nameColumnId,
|
|
30
|
-
namespace: "scheduler/list"
|
|
31
|
-
});
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
//# sourceMappingURL=Table.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","useMemo","createRecordsData","Table","AcoTable","useScheduler","LoadingActions","useSchedulerListConfig","vm","selectItems","sortItems","browser","data","items","selected","selectedItems","createElement","columns","table","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/index.js\";\nimport { LoadingActions, type SchedulerEntryTableRow } from \"~/types.js\";\nimport { useSchedulerListConfig } from \"~/Presentation/configs/index.js\";\n\nexport const Table = () => {\n const { vm, selectItems, sortItems } = useScheduler();\n const { browser } = useSchedulerListConfig();\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 columns={browser.table.columns}\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/list\"}\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;AACvB,SAASC,sBAAsB;AAE/B,OAAO,MAAMJ,KAAK,GAAGA,CAAA,KAAM;EACvB,MAAM;IAAEK,EAAE;IAAEC,WAAW;IAAEC;EAAU,CAAC,GAAGL,YAAY,CAAC,CAAC;EACrD,MAAM;IAAEM;EAAQ,CAAC,GAAGJ,sBAAsB,CAAC,CAAC;EAE5C,MAAMK,IAAI,GAAGX,OAAO,CAA2B,MAAM;IACjD,OAAOC,iBAAiB,CAACM,EAAE,CAACK,KAAK,CAAC;EACtC,CAAC,EAAE,CAACL,EAAE,CAACK,KAAK,CAAC,CAAC;EAEd,MAAMC,QAAQ,GAAGb,OAAO,CAA2B,MAAM;IACrD,OAAOC,iBAAiB,CAACM,EAAE,CAACO,aAAa,CAAC;EAC9C,CAAC,EAAE,CAACP,EAAE,CAACO,aAAa,CAAC,CAAC;EAEtB,oBACIf,KAAA,CAAAgB,aAAA,CAACZ,QAAQ;IACLa,OAAO,EAAEN,OAAO,CAACO,KAAK,CAACD,OAAQ;IAC/BL,IAAI,EAAEA,IAAK;IACXO,OAAO,EAAEX,EAAE,CAACW,OAAO,CAACb,cAAc,CAACc,IAAI,CAAE;IACzCC,WAAW,EAAEC,OAAO,IAAIb,WAAW,CAACa,OAAO,CAACC,GAAG,CAACC,KAAK,IAAIA,KAAK,CAACZ,IAAI,CAAC,CAAE;IACtEa,OAAO,EAAEjB,EAAE,CAACiB,OAAQ;IACpBC,eAAe,EAAEC,IAAI,IAAIjB,SAAS,CAACiB,IAAI,CAAE;IACzCb,QAAQ,EAAEA,QAAS;IACnBc,YAAY,EAAEpB,EAAE,CAACoB,YAAa;IAC9BC,SAAS,EAAE;EAAiB,CAC/B,CAAC;AAEV,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./Table.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Table.js\";\n"],"mappings":"AAAA","ignoreList":[]}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { Skeleton } from "@webiny/ui/Skeleton/index.js";
|
|
3
|
-
import { Name } from "./Title.styled.js";
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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/index.js\";\nimport { Name } from \"./Title.styled.js\";\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,8BAA8B;AACvD,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":[]}
|
|
@@ -1,18 +0,0 @@
|
|
|
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/index.js";
|
|
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/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlRpdGxlLnN0eWxlZC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBSXVEIiwiZmlsZSI6IlRpdGxlLnN0eWxlZC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gXCJAZW1vdGlvbi9zdHlsZWRcIjtcbmltcG9ydCB0eXBlIHsgVHlwb2dyYXBoeVByb3BzIH0gZnJvbSBcIkB3ZWJpbnkvdWkvVHlwb2dyYXBoeS9pbmRleC5qc1wiO1xuaW1wb3J0IHsgVHlwb2dyYXBoeSB9IGZyb20gXCJAd2ViaW55L3VpL1R5cG9ncmFwaHkvaW5kZXguanNcIjtcblxuZXhwb3J0IGNvbnN0IE5hbWUgPSBzdHlsZWQoVHlwb2dyYXBoeSk8VHlwb2dyYXBoeVByb3BzPmBcbiAgICBjb2xvcjogdmFyKC0tbWRjLXRoZW1lLXRleHQtcHJpbWFyeS1vbi1iYWNrZ3JvdW5kKTtcbiAgICBwYWRkaW5nLWxlZnQ6IDhweDtcbiAgICBsaW5lLWhlaWdodDogNDhweDtcbiAgICB3aGl0ZS1zcGFjZTogbm93cmFwO1xuICAgIG92ZXJmbG93OiBoaWRkZW47XG4gICAgdGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG5gO1xuIl19 */",
|
|
15
|
-
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
//# sourceMappingURL=Title.styled.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["Typography","Name","_styled","process","env","NODE_ENV","target","label","name","styles","toString","_EMOTION_STRINGIFIED_CSS_ERROR__"],"sources":["Title.styled.tsx"],"sourcesContent":["import styled from \"@emotion/styled\";\nimport type { TypographyProps } from \"@webiny/ui/Typography/index.js\";\nimport { Typography } from \"@webiny/ui/Typography/index.js\";\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,gCAAgC;AAE3D,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,QAAA,EAAAC;AAAA,EAOrC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./Title.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.tsx"],"sourcesContent":["export * from \"./Title.js\";\n"],"mappings":"AAAA","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./list/index.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./list/index.js\";\n"],"mappings":"AAAA","ignoreList":[]}
|
|
@@ -1,7 +0,0 @@
|
|
|
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/components").OptionsMenuItemProps) => React.JSX.Element;
|
|
7
|
-
};
|
|
@@ -1,16 +0,0 @@
|
|
|
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(Record.Action, props));
|
|
11
|
-
};
|
|
12
|
-
export const EntryAction = Object.assign(BaseEntryAction, {
|
|
13
|
-
OptionsMenuItem: Record.Action.OptionsMenuItem
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
//# sourceMappingURL=EntryAction.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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 <Record.Action {...props} />\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,CAACH,MAAM,CAACK,MAAM,EAAKH,KAAQ,CACb,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":[]}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { AcoConfig, type TableColumnConfig as ColumnConfig } from "@webiny/app-aco";
|
|
3
|
-
import type { SchedulerEntryTableRow } from "../../../../../types.js";
|
|
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) => row is import("@webiny/app-aco").FolderTableRow;
|
|
14
|
-
};
|
|
@@ -1,14 +0,0 @@
|
|
|
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(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
|
|
@@ -1 +0,0 @@
|
|
|
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.js\";\n\nconst { Table } = AcoConfig;\n\nexport type { ColumnConfig };\n\ntype ColumnProps = React.ComponentProps<typeof AcoConfig.Table.Column>;\n\nconst BaseColumn = (props: ColumnProps) => {\n return <Table.Column {...props} />;\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,oBAAOJ,KAAA,CAAAK,aAAA,CAACH,KAAK,CAACI,MAAM,EAAKF,KAAQ,CAAC;AACtC,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":[]}
|
|
@@ -1,5 +0,0 @@
|
|
|
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;
|
|
@@ -1 +0,0 @@
|
|
|
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 <Table.Sorting {...props} />;\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,oBAAOJ,KAAA,CAAAK,aAAA,CAACH,KAAK,CAACC,OAAO,EAAKC,KAAQ,CAAC;AACvC,CAAC","ignoreList":[]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { ColumnConfig } from "./Column.js";
|
|
2
|
-
import type { SortingConfig } from "./Sorting.js";
|
|
3
|
-
export interface TableConfig {
|
|
4
|
-
columns: ColumnConfig[];
|
|
5
|
-
sorting: SortingConfig[];
|
|
6
|
-
}
|
|
7
|
-
export declare const Table: {
|
|
8
|
-
Column: ((props: import("@webiny/app-aco/config/table/Column.js").ColumnProps) => import("react").JSX.Element) & {
|
|
9
|
-
useTableRow: {
|
|
10
|
-
(): import("@webiny/app-aco/index.js").TableRowContextData<import("../../../../../types.js").SchedulerEntryTableRow>;
|
|
11
|
-
<TUserRow>(): import("@webiny/app-aco/index.js").TableRowContextData<import("../../../../../types.js").SchedulerEntryTableRow & {
|
|
12
|
-
data: TUserRow;
|
|
13
|
-
}>;
|
|
14
|
-
};
|
|
15
|
-
isFolderRow: (row: import("@webiny/app-aco/table.types.js").TableRow) => row is import("@webiny/app-aco/table.types.js").FolderTableRow;
|
|
16
|
-
};
|
|
17
|
-
Sorting: (props: import("@webiny/app-aco/config/table/Sorting.js").SortingProps) => import("react").JSX.Element;
|
|
18
|
-
};
|