@webiny/app-scheduler 6.3.0-beta.4 → 6.4.0-beta.0
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.js +15 -14
- package/Domain/Models/SchedulerItem/SchedulerItem.js.map +1 -1
- package/Domain/Models/SchedulerItem/index.js +0 -2
- package/Domain/Models/index.js +0 -2
- package/Domain/Repositories/SchedulerItems/ISchedulerItemsRepository.js +0 -3
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.js +107 -116
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.js.map +1 -1
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.js +13 -12
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.js.map +1 -1
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.js +34 -33
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.js.map +1 -1
- package/Domain/Repositories/SchedulerItems/index.js +0 -2
- package/Domain/Repositories/Search/ISearchRepository.js +0 -3
- package/Domain/Repositories/Search/SearchRepository.js +12 -11
- package/Domain/Repositories/Search/SearchRepository.js.map +1 -1
- package/Domain/Repositories/Search/SearchRepositoryFactory.js +13 -12
- package/Domain/Repositories/Search/SearchRepositoryFactory.js.map +1 -1
- package/Domain/Repositories/Search/index.js +0 -2
- package/Domain/Repositories/SelectedItems/ISelectedItemsRepository.js +0 -3
- package/Domain/Repositories/SelectedItems/SelectedItemsRepository.js +24 -23
- package/Domain/Repositories/SelectedItems/SelectedItemsRepository.js.map +1 -1
- package/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.js +13 -12
- package/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.js.map +1 -1
- package/Domain/Repositories/SelectedItems/index.js +0 -2
- package/Domain/Repositories/Sorting/SortingRepositoryWithDefaults.js +16 -17
- package/Domain/Repositories/Sorting/SortingRepositoryWithDefaults.js.map +1 -1
- package/Domain/Repositories/Sorting/index.js +0 -2
- package/Domain/Repositories/index.js +0 -2
- package/Domain/index.js +0 -2
- package/Gateways/SchedulerCancelGraphQLGateway.js +23 -29
- package/Gateways/SchedulerCancelGraphQLGateway.js.map +1 -1
- package/Gateways/SchedulerGetGraphQLGateway.js +41 -45
- package/Gateways/SchedulerGetGraphQLGateway.js.map +1 -1
- package/Gateways/SchedulerListGraphQLGateway.js +42 -48
- package/Gateways/SchedulerListGraphQLGateway.js.map +1 -1
- package/Gateways/SchedulerPublishGraphQLGateway.js +31 -39
- package/Gateways/SchedulerPublishGraphQLGateway.js.map +1 -1
- package/Gateways/SchedulerUnpublishGraphQLGateway.js +35 -41
- package/Gateways/SchedulerUnpublishGraphQLGateway.js.map +1 -1
- package/Gateways/abstractions/CancelScheduledActionGateway.js +0 -3
- package/Gateways/abstractions/GetScheduledActionGateway.js +0 -3
- package/Gateways/abstractions/ListScheduledActionsGateway.js +0 -3
- package/Gateways/abstractions/SchedulePublishActionGateway.js +0 -3
- package/Gateways/abstractions/ScheduleUnpublishActionGateway.js +0 -3
- package/Gateways/graphql/fields.js +2 -3
- package/Gateways/graphql/fields.js.map +1 -1
- package/Gateways/index.js +0 -3
- package/Gateways/schema/schedulerEntry.js +13 -16
- package/Gateways/schema/schedulerEntry.js.map +1 -1
- package/Presentation/Scheduler/Scheduler.js +69 -58
- package/Presentation/Scheduler/Scheduler.js.map +1 -1
- package/Presentation/Scheduler/SchedulerControllers.js +49 -67
- package/Presentation/Scheduler/SchedulerControllers.js.map +1 -1
- package/Presentation/Scheduler/SchedulerPresenter.js +39 -38
- package/Presentation/Scheduler/SchedulerPresenter.js.map +1 -1
- package/Presentation/Scheduler/controllers/CancelItem/CancelItemController.js +9 -8
- package/Presentation/Scheduler/controllers/CancelItem/CancelItemController.js.map +1 -1
- package/Presentation/Scheduler/controllers/CancelItem/ICancelItemController.js +0 -3
- package/Presentation/Scheduler/controllers/CancelItem/index.js +0 -2
- package/Presentation/Scheduler/controllers/GetItem/GetItemController.js +9 -8
- package/Presentation/Scheduler/controllers/GetItem/GetItemController.js.map +1 -1
- package/Presentation/Scheduler/controllers/GetItem/IGetItemController.js +0 -3
- package/Presentation/Scheduler/controllers/GetItem/index.js +0 -2
- package/Presentation/Scheduler/controllers/ListItems/IListItemsController.js +0 -3
- package/Presentation/Scheduler/controllers/ListItems/ListItemsController.js +9 -8
- package/Presentation/Scheduler/controllers/ListItems/ListItemsController.js.map +1 -1
- package/Presentation/Scheduler/controllers/ListItems/index.js +0 -2
- package/Presentation/Scheduler/controllers/ListMoreItems/IListMoreItemsController.js +0 -3
- package/Presentation/Scheduler/controllers/ListMoreItems/ListMoreItemsController.js +9 -8
- package/Presentation/Scheduler/controllers/ListMoreItems/ListMoreItemsController.js.map +1 -1
- package/Presentation/Scheduler/controllers/ListMoreItems/index.js +0 -2
- package/Presentation/Scheduler/controllers/PublishItem/IPublishItemController.js +0 -3
- package/Presentation/Scheduler/controllers/PublishItem/PublishItemController.js +9 -8
- package/Presentation/Scheduler/controllers/PublishItem/PublishItemController.js.map +1 -1
- package/Presentation/Scheduler/controllers/PublishItem/index.js +0 -2
- package/Presentation/Scheduler/controllers/SearchItems/ISearchItemsController.js +0 -3
- package/Presentation/Scheduler/controllers/SearchItems/SearchItemsController.js +12 -11
- package/Presentation/Scheduler/controllers/SearchItems/SearchItemsController.js.map +1 -1
- package/Presentation/Scheduler/controllers/SearchItems/index.js +0 -2
- package/Presentation/Scheduler/controllers/SelectAllItems/ISelectAllItemsController.js +0 -3
- package/Presentation/Scheduler/controllers/SelectAllItems/SelectAllItemsController.js +9 -8
- package/Presentation/Scheduler/controllers/SelectAllItems/SelectAllItemsController.js.map +1 -1
- package/Presentation/Scheduler/controllers/SelectAllItems/index.js +0 -2
- package/Presentation/Scheduler/controllers/SelectItems/ISelectItemsController.js +0 -3
- package/Presentation/Scheduler/controllers/SelectItems/SelectItemsController.js +10 -9
- package/Presentation/Scheduler/controllers/SelectItems/SelectItemsController.js.map +1 -1
- package/Presentation/Scheduler/controllers/SelectItems/index.js +0 -2
- package/Presentation/Scheduler/controllers/SortItems/ISortItemsController.d.ts +2 -2
- package/Presentation/Scheduler/controllers/SortItems/ISortItemsController.js +0 -3
- package/Presentation/Scheduler/controllers/SortItems/SortItemsController.d.ts +2 -2
- package/Presentation/Scheduler/controllers/SortItems/SortItemsController.js +13 -14
- package/Presentation/Scheduler/controllers/SortItems/SortItemsController.js.map +1 -1
- package/Presentation/Scheduler/controllers/SortItems/index.js +0 -2
- package/Presentation/Scheduler/controllers/UnpublishItem/IUnpublishItemController.js +0 -3
- package/Presentation/Scheduler/controllers/UnpublishItem/UnpublishItemController.js +9 -8
- package/Presentation/Scheduler/controllers/UnpublishItem/UnpublishItemController.js.map +1 -1
- package/Presentation/Scheduler/controllers/UnpublishItem/index.js +0 -2
- package/Presentation/Scheduler/controllers/UnselectAllItems/IUnselectAllItemsController.js +0 -3
- package/Presentation/Scheduler/controllers/UnselectAllItems/UnselectAllItemsController.js +9 -8
- package/Presentation/Scheduler/controllers/UnselectAllItems/UnselectAllItemsController.js.map +1 -1
- package/Presentation/Scheduler/controllers/UnselectAllItems/index.js +0 -2
- package/Presentation/Scheduler/controllers/index.js +0 -2
- package/Presentation/Scheduler/index.js +0 -2
- package/Presentation/SchedulerConfigs/SchedulerConfigs.js +48 -51
- package/Presentation/SchedulerConfigs/SchedulerConfigs.js.map +1 -1
- package/Presentation/SchedulerConfigs/index.js +0 -2
- package/Presentation/SchedulerRenderer/SchedulerRenderer.js +10 -15
- package/Presentation/SchedulerRenderer/SchedulerRenderer.js.map +1 -1
- package/Presentation/SchedulerRenderer/index.js +0 -2
- package/Presentation/abstractions/ISchedulerControllers.js +0 -3
- package/Presentation/abstractions/ISchedulerPresenter.js +0 -3
- package/Presentation/abstractions/index.js +0 -3
- package/Presentation/components/Actions/CancelItem/CancelItem.js +14 -19
- package/Presentation/components/Actions/CancelItem/CancelItem.js.map +1 -1
- package/Presentation/components/Actions/CancelItem/index.js +0 -2
- package/Presentation/components/Actions/index.js +0 -2
- package/Presentation/components/BottomInfoBar/BottomInfoBar.js +11 -12
- package/Presentation/components/BottomInfoBar/BottomInfoBar.js.map +1 -1
- package/Presentation/components/BottomInfoBar/BottomInfoBar.styled.js +41 -67
- package/Presentation/components/BottomInfoBar/BottomInfoBar.styled.js.map +1 -1
- package/Presentation/components/BottomInfoBar/ListMeta.js +6 -9
- package/Presentation/components/BottomInfoBar/ListMeta.js.map +1 -1
- package/Presentation/components/BottomInfoBar/ListStatus.js +8 -12
- package/Presentation/components/BottomInfoBar/ListStatus.js.map +1 -1
- package/Presentation/components/BottomInfoBar/index.js +0 -2
- package/Presentation/components/Cells/CellActions/CellActions.js +12 -17
- package/Presentation/components/Cells/CellActions/CellActions.js.map +1 -1
- package/Presentation/components/Cells/CellActions/index.js +0 -2
- package/Presentation/components/Cells/CellRevision/CellRevision.js +9 -14
- package/Presentation/components/Cells/CellRevision/CellRevision.js.map +1 -1
- package/Presentation/components/Cells/CellRevision/CellRevision.styled.d.ts +1 -1
- package/Presentation/components/Cells/CellRevision/CellRevision.styled.js +16 -42
- package/Presentation/components/Cells/CellRevision/CellRevision.styled.js.map +1 -1
- package/Presentation/components/Cells/CellRevision/index.js +0 -2
- package/Presentation/components/Cells/CellScheduledBy/CellScheduledBy.js +6 -9
- package/Presentation/components/Cells/CellScheduledBy/CellScheduledBy.js.map +1 -1
- package/Presentation/components/Cells/CellScheduledBy/index.js +0 -2
- package/Presentation/components/Cells/CellScheduledOn/CellScheduledOn.js +11 -18
- package/Presentation/components/Cells/CellScheduledOn/CellScheduledOn.js.map +1 -1
- package/Presentation/components/Cells/CellScheduledOn/index.js +0 -2
- package/Presentation/components/Cells/CellTitle/CellTitle.js +9 -12
- package/Presentation/components/Cells/CellTitle/CellTitle.js.map +1 -1
- package/Presentation/components/Cells/CellTitle/CellTitle.styled.d.ts +1 -1
- package/Presentation/components/Cells/CellTitle/CellTitle.styled.js +16 -42
- package/Presentation/components/Cells/CellTitle/CellTitle.styled.js.map +1 -1
- package/Presentation/components/Cells/CellTitle/index.js +0 -2
- package/Presentation/components/Cells/CellType/CellActionType.js +10 -13
- package/Presentation/components/Cells/CellType/CellActionType.js.map +1 -1
- package/Presentation/components/Cells/CellType/CellActionType.styled.d.ts +1 -1
- package/Presentation/components/Cells/CellType/CellActionType.styled.js +16 -42
- package/Presentation/components/Cells/CellType/CellActionType.styled.js.map +1 -1
- package/Presentation/components/Cells/CellType/index.js +0 -2
- package/Presentation/components/Cells/index.js +0 -2
- package/Presentation/components/Empty/Empty.js +15 -16
- package/Presentation/components/Empty/Empty.js.map +1 -1
- package/Presentation/components/Empty/Empty.styled.js +14 -28
- package/Presentation/components/Empty/Empty.styled.js.map +1 -1
- package/Presentation/components/Empty/index.js +0 -2
- package/Presentation/components/ScheduleDialog/IScheduleDialogPresenter.js +0 -3
- package/Presentation/components/ScheduleDialog/ScheduleDialogPresenter.js +75 -79
- package/Presentation/components/ScheduleDialog/ScheduleDialogPresenter.js.map +1 -1
- package/Presentation/components/ScheduleDialog/index.js +0 -2
- package/Presentation/components/ScheduleDialog/types.js +0 -3
- package/Presentation/components/ScheduleDialog/useScheduleDialog.js +165 -207
- package/Presentation/components/ScheduleDialog/useScheduleDialog.js.map +1 -1
- package/Presentation/components/SchedulerOverlay/SchedulerOverlay.js +19 -25
- package/Presentation/components/SchedulerOverlay/SchedulerOverlay.js.map +1 -1
- package/Presentation/components/SchedulerOverlay/index.js +0 -2
- package/Presentation/components/SearchInput/SearchInput.js +25 -32
- package/Presentation/components/SearchInput/SearchInput.js.map +1 -1
- package/Presentation/components/SearchInput/index.js +0 -2
- package/Presentation/components/Table/Table.js +23 -28
- package/Presentation/components/Table/Table.js.map +1 -1
- package/Presentation/components/Table/index.js +0 -2
- package/Presentation/components/Title/Title.js +7 -12
- package/Presentation/components/Title/Title.js.map +1 -1
- package/Presentation/components/Title/Title.styled.d.ts +1 -2
- package/Presentation/components/Title/Title.styled.js +11 -16
- package/Presentation/components/Title/Title.styled.js.map +1 -1
- package/Presentation/components/Title/index.js +0 -2
- package/Presentation/configs/index.js +0 -2
- package/Presentation/configs/list/Browser/EntryAction.js +8 -11
- package/Presentation/configs/list/Browser/EntryAction.js.map +1 -1
- package/Presentation/configs/list/Browser/Table/Column.js +7 -10
- package/Presentation/configs/list/Browser/Table/Column.js.map +1 -1
- package/Presentation/configs/list/Browser/Table/Sorting.js +4 -7
- package/Presentation/configs/list/Browser/Table/Sorting.js.map +1 -1
- package/Presentation/configs/list/Browser/Table/index.js +4 -3
- package/Presentation/configs/list/Browser/Table/index.js.map +1 -1
- package/Presentation/configs/list/Browser/index.js +4 -3
- package/Presentation/configs/list/Browser/index.js.map +1 -1
- package/Presentation/configs/list/SchedulerListConfig.js +20 -21
- package/Presentation/configs/list/SchedulerListConfig.js.map +1 -1
- package/Presentation/configs/list/index.js +0 -2
- package/Presentation/hooks/index.js +0 -2
- package/Presentation/hooks/useCancelSchedulerItem.js +22 -27
- package/Presentation/hooks/useCancelSchedulerItem.js.map +1 -1
- package/Presentation/hooks/useScheduler.js +62 -46
- package/Presentation/hooks/useScheduler.js.map +1 -1
- package/Presentation/hooks/useSchedulerItem.js +4 -6
- package/Presentation/hooks/useSchedulerItem.js.map +1 -1
- package/Presentation/index.js +35 -42
- package/Presentation/index.js.map +1 -1
- package/UseCases/CancelItem/CancelItemUseCase.js +9 -8
- package/UseCases/CancelItem/CancelItemUseCase.js.map +1 -1
- package/UseCases/CancelItem/ICancelItemUseCase.js +0 -3
- package/UseCases/CancelItem/index.js +0 -2
- package/UseCases/GetItem/GetItemUseCase.js +9 -8
- package/UseCases/GetItem/GetItemUseCase.js.map +1 -1
- package/UseCases/GetItem/IGetItemUseCase.js +0 -3
- package/UseCases/GetItem/index.js +0 -2
- package/UseCases/GetScheduledItem/GetScheduledItemUseCase.js +10 -9
- package/UseCases/GetScheduledItem/GetScheduledItemUseCase.js.map +1 -1
- package/UseCases/GetScheduledItem/IGetScheduledItemUseCase.js +0 -3
- package/UseCases/GetScheduledItem/index.js +0 -2
- package/UseCases/ListItems/IListItemsUseCase.js +0 -3
- package/UseCases/ListItems/ListItemsUseCase.js +9 -8
- package/UseCases/ListItems/ListItemsUseCase.js.map +1 -1
- package/UseCases/ListItems/ListItemsUseCaseWithSearch.js +19 -18
- package/UseCases/ListItems/ListItemsUseCaseWithSearch.js.map +1 -1
- package/UseCases/ListItems/ListItemsUseCaseWithSorting.js +16 -17
- package/UseCases/ListItems/ListItemsUseCaseWithSorting.js.map +1 -1
- package/UseCases/ListItems/index.js +0 -2
- package/UseCases/ListMoreItems/IListMoreItemsUseCase.js +0 -3
- package/UseCases/ListMoreItems/ListMoreItemsUseCase.js +9 -8
- package/UseCases/ListMoreItems/ListMoreItemsUseCase.js.map +1 -1
- package/UseCases/ListMoreItems/index.js +0 -2
- package/UseCases/PublishItem/IPublishItemUseCase.js +0 -3
- package/UseCases/PublishItem/PublishItemUseCase.js +9 -8
- package/UseCases/PublishItem/PublishItemUseCase.js.map +1 -1
- package/UseCases/PublishItem/index.js +0 -2
- package/UseCases/SearchItems/ISearchItemsUseCase.js +0 -3
- package/UseCases/SearchItems/SearchItemsUseCase.js +9 -8
- package/UseCases/SearchItems/SearchItemsUseCase.js.map +1 -1
- package/UseCases/SearchItems/index.js +0 -2
- package/UseCases/SelectAllItems/ISelectAllItemsUseCase.js +0 -3
- package/UseCases/SelectAllItems/SelectAllItemsUseCase.js +9 -8
- package/UseCases/SelectAllItems/SelectAllItemsUseCase.js.map +1 -1
- package/UseCases/SelectAllItems/index.js +0 -2
- package/UseCases/SelectItems/ISelectItemsUseCase.js +0 -3
- package/UseCases/SelectItems/SelectItemsUseCase.js +9 -8
- package/UseCases/SelectItems/SelectItemsUseCase.js.map +1 -1
- package/UseCases/SelectItems/index.js +0 -2
- package/UseCases/SortItems/ISortItemsUseCase.js +0 -3
- package/UseCases/SortItems/SortItemsUseCase.js +9 -8
- package/UseCases/SortItems/SortItemsUseCase.js.map +1 -1
- package/UseCases/SortItems/index.js +0 -2
- package/UseCases/UnSelectAllItems/IUnselectAllItemsUseCase.js +0 -3
- package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.js +9 -8
- package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.js.map +1 -1
- package/UseCases/UnSelectAllItems/index.js +0 -2
- package/UseCases/UnpublishItem/IUnpublishItemUseCase.js +0 -3
- package/UseCases/UnpublishItem/UnpublishItemUseCase.js +9 -8
- package/UseCases/UnpublishItem/UnpublishItemUseCase.js.map +1 -1
- package/UseCases/UnpublishItem/index.js +0 -2
- package/UseCases/index.js +0 -2
- package/index.js +1 -3
- package/package.json +16 -18
- package/types.js +12 -11
- package/types.js.map +1 -1
- package/Domain/Models/SchedulerItem/index.js.map +0 -1
- package/Domain/Models/index.js.map +0 -1
- package/Domain/Repositories/SchedulerItems/ISchedulerItemsRepository.js.map +0 -1
- package/Domain/Repositories/SchedulerItems/index.js.map +0 -1
- package/Domain/Repositories/Search/ISearchRepository.js.map +0 -1
- package/Domain/Repositories/Search/index.js.map +0 -1
- package/Domain/Repositories/SelectedItems/ISelectedItemsRepository.js.map +0 -1
- package/Domain/Repositories/SelectedItems/index.js.map +0 -1
- package/Domain/Repositories/Sorting/index.js.map +0 -1
- package/Domain/Repositories/index.js.map +0 -1
- package/Domain/index.js.map +0 -1
- package/Gateways/abstractions/CancelScheduledActionGateway.js.map +0 -1
- package/Gateways/abstractions/GetScheduledActionGateway.js.map +0 -1
- package/Gateways/abstractions/ListScheduledActionsGateway.js.map +0 -1
- package/Gateways/abstractions/SchedulePublishActionGateway.js.map +0 -1
- package/Gateways/abstractions/ScheduleUnpublishActionGateway.js.map +0 -1
- package/Gateways/index.js.map +0 -1
- package/Presentation/Scheduler/controllers/CancelItem/ICancelItemController.js.map +0 -1
- package/Presentation/Scheduler/controllers/CancelItem/index.js.map +0 -1
- package/Presentation/Scheduler/controllers/GetItem/IGetItemController.js.map +0 -1
- package/Presentation/Scheduler/controllers/GetItem/index.js.map +0 -1
- package/Presentation/Scheduler/controllers/ListItems/IListItemsController.js.map +0 -1
- package/Presentation/Scheduler/controllers/ListItems/index.js.map +0 -1
- package/Presentation/Scheduler/controllers/ListMoreItems/IListMoreItemsController.js.map +0 -1
- package/Presentation/Scheduler/controllers/ListMoreItems/index.js.map +0 -1
- package/Presentation/Scheduler/controllers/PublishItem/IPublishItemController.js.map +0 -1
- package/Presentation/Scheduler/controllers/PublishItem/index.js.map +0 -1
- package/Presentation/Scheduler/controllers/SearchItems/ISearchItemsController.js.map +0 -1
- package/Presentation/Scheduler/controllers/SearchItems/index.js.map +0 -1
- package/Presentation/Scheduler/controllers/SelectAllItems/ISelectAllItemsController.js.map +0 -1
- package/Presentation/Scheduler/controllers/SelectAllItems/index.js.map +0 -1
- package/Presentation/Scheduler/controllers/SelectItems/ISelectItemsController.js.map +0 -1
- package/Presentation/Scheduler/controllers/SelectItems/index.js.map +0 -1
- package/Presentation/Scheduler/controllers/SortItems/ISortItemsController.js.map +0 -1
- package/Presentation/Scheduler/controllers/SortItems/index.js.map +0 -1
- package/Presentation/Scheduler/controllers/UnpublishItem/IUnpublishItemController.js.map +0 -1
- package/Presentation/Scheduler/controllers/UnpublishItem/index.js.map +0 -1
- package/Presentation/Scheduler/controllers/UnselectAllItems/IUnselectAllItemsController.js.map +0 -1
- package/Presentation/Scheduler/controllers/UnselectAllItems/index.js.map +0 -1
- package/Presentation/Scheduler/controllers/index.js.map +0 -1
- package/Presentation/Scheduler/index.js.map +0 -1
- package/Presentation/SchedulerConfigs/index.js.map +0 -1
- package/Presentation/SchedulerRenderer/index.js.map +0 -1
- package/Presentation/abstractions/ISchedulerControllers.js.map +0 -1
- package/Presentation/abstractions/ISchedulerPresenter.js.map +0 -1
- package/Presentation/abstractions/index.js.map +0 -1
- package/Presentation/components/Actions/CancelItem/index.js.map +0 -1
- package/Presentation/components/Actions/index.js.map +0 -1
- package/Presentation/components/BottomInfoBar/index.js.map +0 -1
- package/Presentation/components/Cells/CellActions/index.js.map +0 -1
- package/Presentation/components/Cells/CellRevision/index.js.map +0 -1
- package/Presentation/components/Cells/CellScheduledBy/index.js.map +0 -1
- package/Presentation/components/Cells/CellScheduledOn/index.js.map +0 -1
- package/Presentation/components/Cells/CellTitle/index.js.map +0 -1
- package/Presentation/components/Cells/CellType/index.js.map +0 -1
- package/Presentation/components/Cells/index.js.map +0 -1
- package/Presentation/components/Empty/index.js.map +0 -1
- package/Presentation/components/ScheduleDialog/IScheduleDialogPresenter.js.map +0 -1
- package/Presentation/components/ScheduleDialog/index.js.map +0 -1
- package/Presentation/components/ScheduleDialog/types.js.map +0 -1
- package/Presentation/components/SchedulerOverlay/index.js.map +0 -1
- package/Presentation/components/SearchInput/index.js.map +0 -1
- package/Presentation/components/Table/index.js.map +0 -1
- package/Presentation/components/Title/index.js.map +0 -1
- package/Presentation/configs/index.js.map +0 -1
- package/Presentation/configs/list/index.js.map +0 -1
- package/Presentation/hooks/index.js.map +0 -1
- package/UseCases/CancelItem/ICancelItemUseCase.js.map +0 -1
- package/UseCases/CancelItem/index.js.map +0 -1
- package/UseCases/GetItem/IGetItemUseCase.js.map +0 -1
- package/UseCases/GetItem/index.js.map +0 -1
- package/UseCases/GetScheduledItem/IGetScheduledItemUseCase.js.map +0 -1
- package/UseCases/GetScheduledItem/index.js.map +0 -1
- package/UseCases/ListItems/IListItemsUseCase.js.map +0 -1
- package/UseCases/ListItems/index.js.map +0 -1
- package/UseCases/ListMoreItems/IListMoreItemsUseCase.js.map +0 -1
- package/UseCases/ListMoreItems/index.js.map +0 -1
- package/UseCases/PublishItem/IPublishItemUseCase.js.map +0 -1
- package/UseCases/PublishItem/index.js.map +0 -1
- package/UseCases/SearchItems/ISearchItemsUseCase.js.map +0 -1
- package/UseCases/SearchItems/index.js.map +0 -1
- package/UseCases/SelectAllItems/ISelectAllItemsUseCase.js.map +0 -1
- package/UseCases/SelectAllItems/index.js.map +0 -1
- package/UseCases/SelectItems/ISelectItemsUseCase.js.map +0 -1
- package/UseCases/SelectItems/index.js.map +0 -1
- package/UseCases/SortItems/ISortItemsUseCase.js.map +0 -1
- package/UseCases/SortItems/index.js.map +0 -1
- package/UseCases/UnSelectAllItems/IUnselectAllItemsUseCase.js.map +0 -1
- package/UseCases/UnSelectAllItems/index.js.map +0 -1
- package/UseCases/UnpublishItem/IUnpublishItemUseCase.js.map +0 -1
- package/UseCases/UnpublishItem/index.js.map +0 -1
- package/UseCases/index.js.map +0 -1
- package/index.js.map +0 -1
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
class SchedulerItem {
|
|
2
|
+
constructor(item){
|
|
3
|
+
this.id = item.id;
|
|
4
|
+
this.title = item.title;
|
|
5
|
+
this.actionType = item.actionType;
|
|
6
|
+
this.targetId = item.targetId;
|
|
7
|
+
this.namespace = item.namespace;
|
|
8
|
+
this.scheduledBy = item.scheduledBy;
|
|
9
|
+
this.publishOn = item.publishOn;
|
|
10
|
+
this.unpublishOn = item.unpublishOn;
|
|
11
|
+
}
|
|
12
|
+
static create(item) {
|
|
13
|
+
return new SchedulerItem(item);
|
|
14
|
+
}
|
|
15
15
|
}
|
|
16
|
+
export { SchedulerItem };
|
|
16
17
|
|
|
17
18
|
//# sourceMappingURL=SchedulerItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Domain/Models/SchedulerItem/SchedulerItem.js","sources":["../../../../src/Domain/Models/SchedulerItem/SchedulerItem.ts"],"sourcesContent":["import type { SchedulerIdentity, SchedulerEntry, ScheduleActionType } from \"~/types.js\";\n\nexport class SchedulerItem {\n public readonly id: string;\n public readonly title: string;\n public readonly actionType: ScheduleActionType;\n public readonly targetId: string;\n public readonly namespace: string;\n public readonly scheduledBy: SchedulerIdentity;\n public readonly publishOn?: Date;\n public readonly unpublishOn?: Date;\n\n protected constructor(item: SchedulerEntry) {\n this.id = item.id;\n this.title = item.title;\n this.actionType = item.actionType;\n this.targetId = item.targetId;\n this.namespace = item.namespace;\n this.scheduledBy = item.scheduledBy;\n this.publishOn = item.publishOn;\n this.unpublishOn = item.unpublishOn;\n }\n\n public static create(item: SchedulerEntry) {\n return new SchedulerItem(item);\n }\n}\n"],"names":["SchedulerItem","item"],"mappings":"AAEO,MAAMA;IAUT,YAAsBC,IAAoB,CAAE;QACxC,IAAI,CAAC,EAAE,GAAGA,KAAK,EAAE;QACjB,IAAI,CAAC,KAAK,GAAGA,KAAK,KAAK;QACvB,IAAI,CAAC,UAAU,GAAGA,KAAK,UAAU;QACjC,IAAI,CAAC,QAAQ,GAAGA,KAAK,QAAQ;QAC7B,IAAI,CAAC,SAAS,GAAGA,KAAK,SAAS;QAC/B,IAAI,CAAC,WAAW,GAAGA,KAAK,WAAW;QACnC,IAAI,CAAC,SAAS,GAAGA,KAAK,SAAS;QAC/B,IAAI,CAAC,WAAW,GAAGA,KAAK,WAAW;IACvC;IAEA,OAAc,OAAOA,IAAoB,EAAE;QACvC,OAAO,IAAID,cAAcC;IAC7B;AACJ"}
|
package/Domain/Models/index.js
CHANGED
|
@@ -1,128 +1,119 @@
|
|
|
1
1
|
import { makeAutoObservable, runInAction } from "mobx";
|
|
2
2
|
import uniqBy from "lodash/uniqBy.js";
|
|
3
3
|
import { Meta } from "@webiny/app-utils";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
getItems() {
|
|
20
|
-
return this.items;
|
|
21
|
-
}
|
|
22
|
-
getMeta() {
|
|
23
|
-
return this.metaRepository.get();
|
|
24
|
-
}
|
|
25
|
-
getLoading() {
|
|
26
|
-
return {};
|
|
27
|
-
}
|
|
28
|
-
async getItem(params) {
|
|
29
|
-
const item = await this.getGateway.execute({
|
|
30
|
-
id: params.id,
|
|
31
|
-
namespace: this.namespace
|
|
32
|
-
});
|
|
33
|
-
/**
|
|
34
|
-
* TODO Do we want to reset the items list?
|
|
35
|
-
*/
|
|
36
|
-
runInAction(() => {
|
|
37
|
-
this.items = [];
|
|
38
|
-
});
|
|
39
|
-
if (!item) {
|
|
40
|
-
return;
|
|
4
|
+
class SchedulerItemsRepository {
|
|
5
|
+
constructor(params){
|
|
6
|
+
this.items = [];
|
|
7
|
+
this.metaRepository = params.metaRepository;
|
|
8
|
+
this.listGateway = params.listGateway;
|
|
9
|
+
this.getGateway = params.getGateway;
|
|
10
|
+
this.cancelGateway = params.cancelGateway;
|
|
11
|
+
this.unpublishGateway = params.unpublishGateway;
|
|
12
|
+
this.publishGateway = params.publishGateway;
|
|
13
|
+
this.namespace = params.namespace;
|
|
14
|
+
this.params = {
|
|
15
|
+
namespace: this.namespace
|
|
16
|
+
};
|
|
17
|
+
makeAutoObservable(this);
|
|
41
18
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
async listItems(params) {
|
|
47
|
-
this.params = {
|
|
48
|
-
where: params?.where,
|
|
49
|
-
limit: params?.limit,
|
|
50
|
-
sort: params?.sort,
|
|
51
|
-
after: params?.after,
|
|
52
|
-
namespace: this.namespace
|
|
53
|
-
};
|
|
54
|
-
const response = await this.listGateway.execute({
|
|
55
|
-
...this.params
|
|
56
|
-
});
|
|
57
|
-
if (!response) {
|
|
58
|
-
return;
|
|
19
|
+
getItems() {
|
|
20
|
+
return this.items;
|
|
59
21
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
this.metaRepository.set(Meta.create(response.meta));
|
|
63
|
-
});
|
|
64
|
-
}
|
|
65
|
-
async listMoreItems() {
|
|
66
|
-
const {
|
|
67
|
-
cursor
|
|
68
|
-
} = this.metaRepository.get();
|
|
69
|
-
if (!cursor) {
|
|
70
|
-
return;
|
|
22
|
+
getMeta() {
|
|
23
|
+
return this.metaRepository.get();
|
|
71
24
|
}
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
after: cursor
|
|
75
|
-
});
|
|
76
|
-
if (!response) {
|
|
77
|
-
return;
|
|
25
|
+
getLoading() {
|
|
26
|
+
return {};
|
|
78
27
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
94
|
-
async schedulePublishItem(targetId, scheduleOn) {
|
|
95
|
-
const {
|
|
96
|
-
item
|
|
97
|
-
} = await this.publishGateway.execute({
|
|
98
|
-
namespace: this.namespace,
|
|
99
|
-
targetId,
|
|
100
|
-
scheduleOn
|
|
101
|
-
});
|
|
102
|
-
if (!item) {
|
|
103
|
-
return;
|
|
28
|
+
async getItem(params) {
|
|
29
|
+
const item = await this.getGateway.execute({
|
|
30
|
+
id: params.id,
|
|
31
|
+
namespace: this.namespace
|
|
32
|
+
});
|
|
33
|
+
runInAction(()=>{
|
|
34
|
+
this.items = [];
|
|
35
|
+
});
|
|
36
|
+
if (!item) return;
|
|
37
|
+
runInAction(()=>{
|
|
38
|
+
this.items = [
|
|
39
|
+
item
|
|
40
|
+
];
|
|
41
|
+
});
|
|
104
42
|
}
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
43
|
+
async listItems(params) {
|
|
44
|
+
this.params = {
|
|
45
|
+
where: params?.where,
|
|
46
|
+
limit: params?.limit,
|
|
47
|
+
sort: params?.sort,
|
|
48
|
+
after: params?.after,
|
|
49
|
+
namespace: this.namespace
|
|
50
|
+
};
|
|
51
|
+
const response = await this.listGateway.execute({
|
|
52
|
+
...this.params
|
|
53
|
+
});
|
|
54
|
+
if (!response) return;
|
|
55
|
+
runInAction(()=>{
|
|
56
|
+
this.items = response.items;
|
|
57
|
+
this.metaRepository.set(Meta.create(response.meta));
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
async listMoreItems() {
|
|
61
|
+
const { cursor } = this.metaRepository.get();
|
|
62
|
+
if (!cursor) return;
|
|
63
|
+
const response = await this.listGateway.execute({
|
|
64
|
+
...this.params,
|
|
65
|
+
after: cursor
|
|
66
|
+
});
|
|
67
|
+
if (!response) return;
|
|
68
|
+
runInAction(()=>{
|
|
69
|
+
this.items = uniqBy([
|
|
70
|
+
...this.items,
|
|
71
|
+
...response.items
|
|
72
|
+
], "id");
|
|
73
|
+
this.metaRepository.set(Meta.create(response.meta));
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
async scheduleCancelItem(id) {
|
|
77
|
+
await this.cancelGateway.execute({
|
|
78
|
+
namespace: this.namespace,
|
|
79
|
+
id
|
|
80
|
+
});
|
|
81
|
+
runInAction(()=>{
|
|
82
|
+
this.items = this.items.filter((item)=>item.id !== id);
|
|
83
|
+
this.metaRepository.decreaseTotalCount(1);
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
async schedulePublishItem(targetId, scheduleOn) {
|
|
87
|
+
const { item } = await this.publishGateway.execute({
|
|
88
|
+
namespace: this.namespace,
|
|
89
|
+
targetId,
|
|
90
|
+
scheduleOn
|
|
91
|
+
});
|
|
92
|
+
if (!item) return;
|
|
93
|
+
runInAction(()=>{
|
|
94
|
+
this.items = [
|
|
95
|
+
...this.items,
|
|
96
|
+
item
|
|
97
|
+
];
|
|
98
|
+
this.metaRepository.increaseTotalCount(1);
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
async scheduleUnpublishItem(targetId, scheduleOn) {
|
|
102
|
+
const { item } = await this.unpublishGateway.execute({
|
|
103
|
+
namespace: this.namespace,
|
|
104
|
+
targetId,
|
|
105
|
+
scheduleOn
|
|
106
|
+
});
|
|
107
|
+
if (!item) return;
|
|
108
|
+
runInAction(()=>{
|
|
109
|
+
this.items = [
|
|
110
|
+
...this.items,
|
|
111
|
+
item
|
|
112
|
+
];
|
|
113
|
+
this.metaRepository.increaseTotalCount(1);
|
|
114
|
+
});
|
|
120
115
|
}
|
|
121
|
-
runInAction(() => {
|
|
122
|
-
this.items = [...this.items, item];
|
|
123
|
-
this.metaRepository.increaseTotalCount(1);
|
|
124
|
-
});
|
|
125
|
-
}
|
|
126
116
|
}
|
|
117
|
+
export { SchedulerItemsRepository };
|
|
127
118
|
|
|
128
119
|
//# sourceMappingURL=SchedulerItemsRepository.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Domain/Repositories/SchedulerItems/SchedulerItemsRepository.js","sources":["../../../../src/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.ts"],"sourcesContent":["import { makeAutoObservable, runInAction } from \"mobx\";\nimport uniqBy from \"lodash/uniqBy.js\";\nimport type { SchedulerItem } from \"~/Domain/index.js\";\nimport type {\n ICancelScheduledActionGateway,\n IListScheduledActionsGateway,\n ISchedulePublishActionGateway,\n IScheduleUnpublishActionGateway\n} from \"~/Gateways/index.js\";\nimport {\n type IGetScheduledActionGatewayExecuteParams,\n type IGetScheduledActionGateway,\n type IListScheduledActionsGatewayExecuteParams\n} from \"~/Gateways/index.js\";\nimport type { IMetaRepository } from \"@webiny/app-utils\";\nimport { Meta } from \"@webiny/app-utils\";\nimport type { ISchedulerItemsRepository } from \"./ISchedulerItemsRepository.js\";\n\nexport interface ISchedulerItemsRepositoryParams {\n metaRepository: IMetaRepository;\n getGateway: IGetScheduledActionGateway;\n listGateway: IListScheduledActionsGateway;\n cancelGateway: ICancelScheduledActionGateway;\n unpublishGateway: IScheduleUnpublishActionGateway;\n publishGateway: ISchedulePublishActionGateway;\n namespace: string;\n}\n\nexport class SchedulerItemsRepository implements ISchedulerItemsRepository {\n private readonly metaRepository: IMetaRepository;\n private readonly getGateway: IGetScheduledActionGateway;\n private readonly listGateway: IListScheduledActionsGateway;\n private readonly cancelGateway: ICancelScheduledActionGateway;\n private readonly unpublishGateway: IScheduleUnpublishActionGateway;\n private readonly publishGateway: ISchedulePublishActionGateway;\n private readonly namespace: string;\n private items: SchedulerItem[] = [];\n private params: IListScheduledActionsGatewayExecuteParams;\n\n public constructor(params: ISchedulerItemsRepositoryParams) {\n this.metaRepository = params.metaRepository;\n this.listGateway = params.listGateway;\n this.getGateway = params.getGateway;\n this.cancelGateway = params.cancelGateway;\n this.unpublishGateway = params.unpublishGateway;\n this.publishGateway = params.publishGateway;\n this.namespace = params.namespace;\n this.params = {\n namespace: this.namespace\n };\n makeAutoObservable(this);\n }\n\n public getItems() {\n return this.items;\n }\n\n public getMeta() {\n return this.metaRepository.get();\n }\n\n public getLoading() {\n return {};\n }\n\n public async getItem(params: Omit<IGetScheduledActionGatewayExecuteParams, \"namespace\">) {\n const item = await this.getGateway.execute({\n id: params.id,\n namespace: this.namespace\n });\n /**\n * TODO Do we want to reset the items list?\n */\n runInAction(() => {\n this.items = [];\n });\n\n if (!item) {\n return;\n }\n\n runInAction(() => {\n this.items = [item];\n });\n }\n\n public async listItems(params?: Omit<IListScheduledActionsGatewayExecuteParams, \"namespace\">) {\n this.params = {\n where: params?.where,\n limit: params?.limit,\n sort: params?.sort,\n after: params?.after,\n namespace: this.namespace\n };\n\n const response = await this.listGateway.execute({ ...this.params });\n\n if (!response) {\n return;\n }\n\n runInAction(() => {\n this.items = response.items;\n this.metaRepository.set(Meta.create(response.meta));\n });\n }\n\n public async listMoreItems() {\n const { cursor } = this.metaRepository.get();\n\n if (!cursor) {\n return;\n }\n\n const response = await this.listGateway.execute({ ...this.params, after: cursor });\n\n if (!response) {\n return;\n }\n\n runInAction(() => {\n this.items = uniqBy([...this.items, ...response.items], \"id\");\n this.metaRepository.set(Meta.create(response.meta));\n });\n }\n\n public async scheduleCancelItem(id: string) {\n await this.cancelGateway.execute({\n namespace: this.namespace,\n id\n });\n\n runInAction(() => {\n this.items = this.items.filter(item => item.id !== id);\n this.metaRepository.decreaseTotalCount(1);\n });\n }\n\n public async schedulePublishItem(targetId: string, scheduleOn: Date) {\n const { item } = await this.publishGateway.execute({\n namespace: this.namespace,\n targetId,\n scheduleOn\n });\n\n if (!item) {\n return;\n }\n\n runInAction(() => {\n this.items = [...this.items, item];\n this.metaRepository.increaseTotalCount(1);\n });\n }\n\n public async scheduleUnpublishItem(targetId: string, scheduleOn: Date) {\n const { item } = await this.unpublishGateway.execute({\n namespace: this.namespace,\n targetId,\n scheduleOn\n });\n\n if (!item) {\n return;\n }\n\n runInAction(() => {\n this.items = [...this.items, item];\n this.metaRepository.increaseTotalCount(1);\n });\n }\n}\n"],"names":["SchedulerItemsRepository","params","makeAutoObservable","item","runInAction","response","Meta","cursor","uniqBy","id","targetId","scheduleOn"],"mappings":"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"}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { SchedulerItemsRepository } from "./SchedulerItemsRepository.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
class SchedulerItemsRepositoryFactory {
|
|
3
|
+
getRepository(params) {
|
|
4
|
+
const cacheKey = this.getCacheKey();
|
|
5
|
+
if (!this.cache.has(cacheKey)) this.cache.set(cacheKey, new SchedulerItemsRepository(params));
|
|
6
|
+
return this.cache.get(cacheKey);
|
|
7
|
+
}
|
|
8
|
+
getCacheKey() {
|
|
9
|
+
return Date.now().toString();
|
|
10
|
+
}
|
|
11
|
+
constructor(){
|
|
12
|
+
this.cache = new Map();
|
|
8
13
|
}
|
|
9
|
-
return this.cache.get(cacheKey);
|
|
10
|
-
}
|
|
11
|
-
getCacheKey() {
|
|
12
|
-
return Date.now().toString();
|
|
13
|
-
}
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
const schedulerItemsRepositoryFactory = new SchedulerItemsRepositoryFactory();
|
|
16
|
+
export { SchedulerItemsRepositoryFactory, schedulerItemsRepositoryFactory };
|
|
16
17
|
|
|
17
18
|
//# sourceMappingURL=SchedulerItemsRepositoryFactory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.js","sources":["../../../../src/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.ts"],"sourcesContent":["import type { IMetaRepository } from \"@webiny/app-utils\";\nimport type { IListScheduledActionsGateway } from \"~/Gateways/index.js\";\nimport {\n type ICancelScheduledActionGateway,\n type IGetScheduledActionGateway,\n type ISchedulePublishActionGateway,\n type IScheduleUnpublishActionGateway\n} from \"~/Gateways/index.js\";\nimport { SchedulerItemsRepository } from \"./SchedulerItemsRepository.js\";\n\nexport interface ISchedulerItemsRepositoryFactoryGetParams {\n metaRepository: IMetaRepository;\n getGateway: IGetScheduledActionGateway;\n listGateway: IListScheduledActionsGateway;\n cancelGateway: ICancelScheduledActionGateway;\n publishGateway: ISchedulePublishActionGateway;\n unpublishGateway: IScheduleUnpublishActionGateway;\n namespace: string;\n}\n\nexport class SchedulerItemsRepositoryFactory {\n private readonly cache: Map<string, SchedulerItemsRepository> = new Map();\n\n public getRepository(params: ISchedulerItemsRepositoryFactoryGetParams) {\n const cacheKey = this.getCacheKey();\n\n if (!this.cache.has(cacheKey)) {\n this.cache.set(cacheKey, new SchedulerItemsRepository(params));\n }\n\n return this.cache.get(cacheKey) as SchedulerItemsRepository;\n }\n\n private getCacheKey() {\n return Date.now().toString();\n }\n}\n\nexport const schedulerItemsRepositoryFactory = new SchedulerItemsRepositoryFactory();\n"],"names":["SchedulerItemsRepositoryFactory","params","cacheKey","SchedulerItemsRepository","Date","Map","schedulerItemsRepositoryFactory"],"mappings":";AAoBO,MAAMA;IAGF,cAAcC,MAAiD,EAAE;QACpE,MAAMC,WAAW,IAAI,CAAC,WAAW;QAEjC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAACA,WAChB,IAAI,CAAC,KAAK,CAAC,GAAG,CAACA,UAAU,IAAIC,yBAAyBF;QAG1D,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAACC;IAC1B;IAEQ,cAAc;QAClB,OAAOE,KAAK,GAAG,GAAG,QAAQ;IAC9B;;aAdiB,KAAK,GAA0C,IAAIC;;AAexE;AAEO,MAAMC,kCAAkC,IAAIN"}
|
|
@@ -1,38 +1,39 @@
|
|
|
1
1
|
import { makeAutoObservable } from "mobx";
|
|
2
2
|
import { LoadingActions } from "../../../types.js";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
3
|
+
class SchedulerItemsRepositoryWithLoading {
|
|
4
|
+
constructor(loadingRepository, schedulerItemsRepository){
|
|
5
|
+
this.loadingRepository = loadingRepository;
|
|
6
|
+
this.schedulerItemsRepository = schedulerItemsRepository;
|
|
7
|
+
makeAutoObservable(this);
|
|
8
|
+
}
|
|
9
|
+
getItems() {
|
|
10
|
+
return this.schedulerItemsRepository.getItems();
|
|
11
|
+
}
|
|
12
|
+
getMeta() {
|
|
13
|
+
return this.schedulerItemsRepository.getMeta();
|
|
14
|
+
}
|
|
15
|
+
getLoading() {
|
|
16
|
+
return this.loadingRepository.get();
|
|
17
|
+
}
|
|
18
|
+
async getItem(params) {
|
|
19
|
+
await this.loadingRepository.runCallBack(this.schedulerItemsRepository.getItem(params), LoadingActions.get);
|
|
20
|
+
}
|
|
21
|
+
async listItems(params) {
|
|
22
|
+
await this.loadingRepository.runCallBack(this.schedulerItemsRepository.listItems(params), LoadingActions.list);
|
|
23
|
+
}
|
|
24
|
+
async listMoreItems() {
|
|
25
|
+
await this.loadingRepository.runCallBack(this.schedulerItemsRepository.listMoreItems(), LoadingActions.listMore);
|
|
26
|
+
}
|
|
27
|
+
async scheduleCancelItem(id) {
|
|
28
|
+
await this.loadingRepository.runCallBack(this.schedulerItemsRepository.scheduleCancelItem(id), LoadingActions["delete"]);
|
|
29
|
+
}
|
|
30
|
+
async schedulePublishItem(id) {
|
|
31
|
+
await this.loadingRepository.runCallBack(this.schedulerItemsRepository.scheduleCancelItem(id), LoadingActions.create);
|
|
32
|
+
}
|
|
33
|
+
async scheduleUnpublishItem(id) {
|
|
34
|
+
await this.loadingRepository.runCallBack(this.schedulerItemsRepository.scheduleCancelItem(id), LoadingActions.create);
|
|
35
|
+
}
|
|
36
36
|
}
|
|
37
|
+
export { SchedulerItemsRepositoryWithLoading };
|
|
37
38
|
|
|
38
39
|
//# sourceMappingURL=SchedulerItemsRepositoryWithLoading.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.js","sources":["../../../../src/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.ts"],"sourcesContent":["import { makeAutoObservable } from \"mobx\";\nimport type { ILoadingRepository } from \"@webiny/app-utils\";\nimport type { ISchedulerItemsRepository } from \"./ISchedulerItemsRepository.js\";\nimport { LoadingActions } from \"~/types.js\";\nimport type {\n IGetScheduledActionGatewayExecuteParams,\n IListScheduledActionsGatewayExecuteParams\n} from \"~/Gateways/index.js\";\n\nexport class SchedulerItemsRepositoryWithLoading implements ISchedulerItemsRepository {\n private readonly loadingRepository: ILoadingRepository;\n private readonly schedulerItemsRepository: ISchedulerItemsRepository;\n\n public constructor(\n loadingRepository: ILoadingRepository,\n schedulerItemsRepository: ISchedulerItemsRepository\n ) {\n this.loadingRepository = loadingRepository;\n this.schedulerItemsRepository = schedulerItemsRepository;\n makeAutoObservable(this);\n }\n\n public getItems() {\n return this.schedulerItemsRepository.getItems();\n }\n\n public getMeta() {\n return this.schedulerItemsRepository.getMeta();\n }\n\n public getLoading() {\n return this.loadingRepository.get();\n }\n\n public async getItem(params: Omit<IGetScheduledActionGatewayExecuteParams, \"namespace\">) {\n await this.loadingRepository.runCallBack(\n this.schedulerItemsRepository.getItem(params),\n LoadingActions.get\n );\n }\n\n public async listItems(params?: Omit<IListScheduledActionsGatewayExecuteParams, \"namespace\">) {\n await this.loadingRepository.runCallBack(\n this.schedulerItemsRepository.listItems(params),\n LoadingActions.list\n );\n }\n\n public async listMoreItems() {\n await this.loadingRepository.runCallBack(\n this.schedulerItemsRepository.listMoreItems(),\n LoadingActions.listMore\n );\n }\n\n public async scheduleCancelItem(id: string) {\n await this.loadingRepository.runCallBack(\n this.schedulerItemsRepository.scheduleCancelItem(id),\n LoadingActions.delete\n );\n }\n\n public async schedulePublishItem(id: string) {\n await this.loadingRepository.runCallBack(\n this.schedulerItemsRepository.scheduleCancelItem(id),\n LoadingActions.create\n );\n }\n\n public async scheduleUnpublishItem(id: string) {\n await this.loadingRepository.runCallBack(\n this.schedulerItemsRepository.scheduleCancelItem(id),\n LoadingActions.create\n );\n }\n}\n"],"names":["SchedulerItemsRepositoryWithLoading","loadingRepository","schedulerItemsRepository","makeAutoObservable","params","LoadingActions","id"],"mappings":";;AASO,MAAMA;IAIT,YACIC,iBAAqC,EACrCC,wBAAmD,CACrD;QACE,IAAI,CAAC,iBAAiB,GAAGD;QACzB,IAAI,CAAC,wBAAwB,GAAGC;QAChCC,mBAAmB,IAAI;IAC3B;IAEO,WAAW;QACd,OAAO,IAAI,CAAC,wBAAwB,CAAC,QAAQ;IACjD;IAEO,UAAU;QACb,OAAO,IAAI,CAAC,wBAAwB,CAAC,OAAO;IAChD;IAEO,aAAa;QAChB,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG;IACrC;IAEA,MAAa,QAAQC,MAAkE,EAAE;QACrF,MAAM,IAAI,CAAC,iBAAiB,CAAC,WAAW,CACpC,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAACA,SACtCC,eAAe,GAAG;IAE1B;IAEA,MAAa,UAAUD,MAAqE,EAAE;QAC1F,MAAM,IAAI,CAAC,iBAAiB,CAAC,WAAW,CACpC,IAAI,CAAC,wBAAwB,CAAC,SAAS,CAACA,SACxCC,eAAe,IAAI;IAE3B;IAEA,MAAa,gBAAgB;QACzB,MAAM,IAAI,CAAC,iBAAiB,CAAC,WAAW,CACpC,IAAI,CAAC,wBAAwB,CAAC,aAAa,IAC3CA,eAAe,QAAQ;IAE/B;IAEA,MAAa,mBAAmBC,EAAU,EAAE;QACxC,MAAM,IAAI,CAAC,iBAAiB,CAAC,WAAW,CACpC,IAAI,CAAC,wBAAwB,CAAC,kBAAkB,CAACA,KACjDD,cAAc,CAAdA,SAAqB;IAE7B;IAEA,MAAa,oBAAoBC,EAAU,EAAE;QACzC,MAAM,IAAI,CAAC,iBAAiB,CAAC,WAAW,CACpC,IAAI,CAAC,wBAAwB,CAAC,kBAAkB,CAACA,KACjDD,eAAe,MAAM;IAE7B;IAEA,MAAa,sBAAsBC,EAAU,EAAE;QAC3C,MAAM,IAAI,CAAC,iBAAiB,CAAC,WAAW,CACpC,IAAI,CAAC,wBAAwB,CAAC,kBAAkB,CAACA,KACjDD,eAAe,MAAM;IAE7B;AACJ"}
|
|
@@ -1,15 +1,16 @@
|
|
|
1
1
|
import { makeAutoObservable } from "mobx";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
2
|
+
class SearchRepository {
|
|
3
|
+
constructor(){
|
|
4
|
+
this.query = "";
|
|
5
|
+
makeAutoObservable(this);
|
|
6
|
+
}
|
|
7
|
+
get() {
|
|
8
|
+
return this.query;
|
|
9
|
+
}
|
|
10
|
+
async set(query) {
|
|
11
|
+
this.query = query;
|
|
12
|
+
}
|
|
13
13
|
}
|
|
14
|
+
export { SearchRepository };
|
|
14
15
|
|
|
15
16
|
//# sourceMappingURL=SearchRepository.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Domain/Repositories/Search/SearchRepository.js","sources":["../../../../src/Domain/Repositories/Search/SearchRepository.ts"],"sourcesContent":["import { makeAutoObservable } from \"mobx\";\nimport type { ISearchRepository } from \"./ISearchRepository.js\";\n\nexport class SearchRepository implements ISearchRepository {\n private query = \"\";\n\n public constructor() {\n makeAutoObservable(this);\n }\n\n public get() {\n return this.query;\n }\n\n public async set(query: string) {\n this.query = query;\n }\n}\n"],"names":["SearchRepository","makeAutoObservable","query"],"mappings":";AAGO,MAAMA;IAGT,aAAqB;aAFb,KAAK,GAAG;QAGZC,mBAAmB,IAAI;IAC3B;IAEO,MAAM;QACT,OAAO,IAAI,CAAC,KAAK;IACrB;IAEA,MAAa,IAAIC,KAAa,EAAE;QAC5B,IAAI,CAAC,KAAK,GAAGA;IACjB;AACJ"}
|
|
@@ -1,17 +1,18 @@
|
|
|
1
1
|
import { SearchRepository } from "./SearchRepository.js";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
2
|
+
class SearchRepositoryFactory {
|
|
3
|
+
getRepository() {
|
|
4
|
+
const cacheKey = this.getCacheKey();
|
|
5
|
+
if (!this.cache.has(cacheKey)) this.cache.set(cacheKey, new SearchRepository());
|
|
6
|
+
return this.cache.get(cacheKey);
|
|
7
|
+
}
|
|
8
|
+
getCacheKey() {
|
|
9
|
+
return Date.now().toString();
|
|
10
|
+
}
|
|
11
|
+
constructor(){
|
|
12
|
+
this.cache = new Map();
|
|
8
13
|
}
|
|
9
|
-
return this.cache.get(cacheKey);
|
|
10
|
-
}
|
|
11
|
-
getCacheKey() {
|
|
12
|
-
return Date.now().toString();
|
|
13
|
-
}
|
|
14
14
|
}
|
|
15
|
-
|
|
15
|
+
const searchRepositoryFactory = new SearchRepositoryFactory();
|
|
16
|
+
export { SearchRepositoryFactory, searchRepositoryFactory };
|
|
16
17
|
|
|
17
18
|
//# sourceMappingURL=SearchRepositoryFactory.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"file":"Domain/Repositories/Search/SearchRepositoryFactory.js","sources":["../../../../src/Domain/Repositories/Search/SearchRepositoryFactory.ts"],"sourcesContent":["import { SearchRepository } from \"./SearchRepository.js\";\n\nexport class SearchRepositoryFactory {\n private readonly cache: Map<string, SearchRepository> = new Map();\n\n public getRepository() {\n const cacheKey = this.getCacheKey();\n\n if (!this.cache.has(cacheKey)) {\n this.cache.set(cacheKey, new SearchRepository());\n }\n\n return this.cache.get(cacheKey) as SearchRepository;\n }\n\n private getCacheKey() {\n return Date.now().toString();\n }\n}\n\nexport const searchRepositoryFactory = new SearchRepositoryFactory();\n"],"names":["SearchRepositoryFactory","cacheKey","SearchRepository","Date","Map","searchRepositoryFactory"],"mappings":";AAEO,MAAMA;IAGF,gBAAgB;QACnB,MAAMC,WAAW,IAAI,CAAC,WAAW;QAEjC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAACA,WAChB,IAAI,CAAC,KAAK,CAAC,GAAG,CAACA,UAAU,IAAIC;QAGjC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAACD;IAC1B;IAEQ,cAAc;QAClB,OAAOE,KAAK,GAAG,GAAG,QAAQ;IAC9B;;aAdiB,KAAK,GAAkC,IAAIC;;AAehE;AAEO,MAAMC,0BAA0B,IAAIL"}
|