@webiny/app-scheduler 6.4.11 → 6.6.0-alpha.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/{Gateways/schema → domain}/schedulerEntry.d.ts +1 -1
- package/{Gateways/schema → domain}/schedulerEntry.js +1 -1
- package/domain/schedulerEntry.js.map +1 -0
- package/features/cancelScheduledAction/CancelScheduledActionGateway.d.ts +11 -0
- package/features/cancelScheduledAction/CancelScheduledActionGateway.js +41 -0
- package/features/cancelScheduledAction/CancelScheduledActionGateway.js.map +1 -0
- package/features/cancelScheduledAction/abstractions.d.ts +11 -0
- package/features/cancelScheduledAction/abstractions.js +5 -0
- package/features/cancelScheduledAction/abstractions.js.map +1 -0
- package/features/cancelScheduledAction/feature.d.ts +1 -0
- package/features/cancelScheduledAction/feature.js +11 -0
- package/features/cancelScheduledAction/feature.js.map +1 -0
- package/features/feature.d.ts +1 -0
- package/features/feature.js +19 -0
- package/features/feature.js.map +1 -0
- package/features/getScheduledAction/GetScheduledActionGateway.d.ts +11 -0
- package/features/getScheduledAction/GetScheduledActionGateway.js +57 -0
- package/features/getScheduledAction/GetScheduledActionGateway.js.map +1 -0
- package/{Gateways/abstractions/GetScheduledActionGateway.d.ts → features/getScheduledAction/abstractions.d.ts} +4 -0
- package/features/getScheduledAction/abstractions.js +5 -0
- package/features/getScheduledAction/abstractions.js.map +1 -0
- package/features/getScheduledAction/feature.d.ts +1 -0
- package/features/getScheduledAction/feature.js +11 -0
- package/features/getScheduledAction/feature.js.map +1 -0
- package/features/graphqlFields.d.ts +2 -0
- package/features/graphqlFields.js +23 -0
- package/features/graphqlFields.js.map +1 -0
- package/features/listScheduledActions/ListScheduledActionsGateway.d.ts +11 -0
- package/features/listScheduledActions/ListScheduledActionsGateway.js +84 -0
- package/features/listScheduledActions/ListScheduledActionsGateway.js.map +1 -0
- package/{Gateways/abstractions/ListScheduledActionsGateway.d.ts → features/listScheduledActions/abstractions.d.ts} +5 -2
- package/features/listScheduledActions/abstractions.js +5 -0
- package/features/listScheduledActions/abstractions.js.map +1 -0
- package/features/listScheduledActions/feature.d.ts +1 -0
- package/features/listScheduledActions/feature.js +11 -0
- package/features/listScheduledActions/feature.js.map +1 -0
- package/features/schedulePublishAction/SchedulePublishActionGateway.d.ts +11 -0
- package/features/schedulePublishAction/SchedulePublishActionGateway.js +67 -0
- package/features/schedulePublishAction/SchedulePublishActionGateway.js.map +1 -0
- package/{Gateways/abstractions/SchedulePublishActionGateway.d.ts → features/schedulePublishAction/abstractions.d.ts} +4 -0
- package/features/schedulePublishAction/abstractions.js +5 -0
- package/features/schedulePublishAction/abstractions.js.map +1 -0
- package/features/schedulePublishAction/feature.d.ts +1 -0
- package/features/schedulePublishAction/feature.js +11 -0
- package/features/schedulePublishAction/feature.js.map +1 -0
- package/features/scheduleUnpublishAction/ScheduleUnpublishActionGateway.d.ts +11 -0
- package/features/scheduleUnpublishAction/ScheduleUnpublishActionGateway.js +71 -0
- package/features/scheduleUnpublishAction/ScheduleUnpublishActionGateway.js.map +1 -0
- package/{Gateways/abstractions/ScheduleUnpublishActionGateway.d.ts → features/scheduleUnpublishAction/abstractions.d.ts} +4 -0
- package/features/scheduleUnpublishAction/abstractions.js +5 -0
- package/features/scheduleUnpublishAction/abstractions.js.map +1 -0
- package/features/scheduleUnpublishAction/feature.d.ts +1 -0
- package/features/scheduleUnpublishAction/feature.js +11 -0
- package/features/scheduleUnpublishAction/feature.js.map +1 -0
- package/index.d.ts +9 -1
- package/index.js +17 -1
- package/index.js.map +1 -0
- package/package.json +17 -18
- package/{Presentation → presentation}/SchedulerConfigs/SchedulerConfigs.js.map +1 -1
- package/{Presentation → presentation}/components/Actions/CancelItem/CancelItem.js +2 -3
- package/presentation/components/Actions/CancelItem/CancelItem.js.map +1 -0
- package/{Presentation → presentation}/components/BottomInfoBar/BottomInfoBar.styled.js.map +1 -1
- package/{Presentation → presentation}/components/BottomInfoBar/ListMeta.js.map +1 -1
- package/{Presentation → presentation}/components/BottomInfoBar/ListStatus.js.map +1 -1
- package/{Presentation → presentation}/components/Cells/CellActions/CellActions.js.map +1 -1
- package/{Presentation → presentation}/components/Cells/CellRevision/CellRevision.js.map +1 -1
- package/{Presentation → presentation}/components/Cells/CellRevision/CellRevision.styled.js.map +1 -1
- package/{Presentation → presentation}/components/Cells/CellScheduledBy/CellScheduledBy.js.map +1 -1
- package/{Presentation → presentation}/components/Cells/CellScheduledOn/CellScheduledOn.js +3 -1
- package/presentation/components/Cells/CellScheduledOn/CellScheduledOn.js.map +1 -0
- package/{Presentation → presentation}/components/Cells/CellTitle/CellTitle.js.map +1 -1
- package/{Presentation → presentation}/components/Cells/CellTitle/CellTitle.styled.js.map +1 -1
- package/{Presentation → presentation}/components/Cells/CellType/CellActionType.js.map +1 -1
- package/{Presentation → presentation}/components/Cells/CellType/CellActionType.styled.js.map +1 -1
- package/{Presentation → presentation}/components/Empty/Empty.styled.js.map +1 -1
- package/{Presentation → presentation}/components/Title/Title.js.map +1 -1
- package/{Presentation → presentation}/components/Title/Title.styled.js.map +1 -1
- package/{Presentation → presentation}/configs/list/Browser/EntryAction.d.ts +2 -1
- package/{Presentation → presentation}/configs/list/Browser/EntryAction.js.map +1 -1
- package/{Presentation → presentation}/configs/list/Browser/Table/Column.d.ts +4 -3
- package/{Presentation → presentation}/configs/list/Browser/Table/Column.js.map +1 -1
- package/{Presentation → presentation}/configs/list/Browser/Table/Sorting.js.map +1 -1
- package/presentation/configs/list/Browser/Table/index.d.ts +19 -0
- package/{Presentation → presentation}/configs/list/Browser/Table/index.js.map +1 -1
- package/presentation/configs/list/Browser/index.d.ts +23 -0
- package/{Presentation → presentation}/configs/list/Browser/index.js.map +1 -1
- package/{Presentation → presentation}/configs/list/SchedulerListConfig.d.ts +8 -6
- package/{Presentation → presentation}/configs/list/SchedulerListConfig.js.map +1 -1
- package/{Presentation → presentation}/hooks/index.d.ts +0 -1
- package/{Presentation → presentation}/hooks/index.js +0 -1
- package/{Presentation → presentation}/hooks/useCancelSchedulerItem.js +12 -7
- package/presentation/hooks/useCancelSchedulerItem.js.map +1 -0
- package/{Presentation → presentation}/hooks/useSchedulerItem.js.map +1 -1
- package/presentation/scheduleDialog/ScheduleDialogPresenter.d.ts +26 -0
- package/{Presentation/components/ScheduleDialog → presentation/scheduleDialog}/ScheduleDialogPresenter.js +38 -9
- package/presentation/scheduleDialog/ScheduleDialogPresenter.js.map +1 -0
- package/{Presentation/components/ScheduleDialog/IScheduleDialogPresenter.d.ts → presentation/scheduleDialog/abstractions.d.ts} +10 -1
- package/presentation/scheduleDialog/abstractions.js +5 -0
- package/presentation/scheduleDialog/abstractions.js.map +1 -0
- package/presentation/scheduleDialog/components/CancelButtonComponent.d.ts +10 -0
- package/presentation/scheduleDialog/components/CancelButtonComponent.js +20 -0
- package/presentation/scheduleDialog/components/CancelButtonComponent.js.map +1 -0
- package/presentation/scheduleDialog/components/FormComponent.d.ts +9 -0
- package/presentation/scheduleDialog/components/FormComponent.js +32 -0
- package/presentation/scheduleDialog/components/FormComponent.js.map +1 -0
- package/presentation/scheduleDialog/components/ReschedulingAlert.d.ts +7 -0
- package/presentation/scheduleDialog/components/ReschedulingAlert.js +14 -0
- package/presentation/scheduleDialog/components/ReschedulingAlert.js.map +1 -0
- package/{Presentation/components/ScheduleDialog/useScheduleDialog.d.ts → presentation/scheduleDialog/components/SchedulerDialogFormComponentDateTimeInput.d.ts} +1 -18
- package/presentation/scheduleDialog/components/SchedulerDialogFormComponentDateTimeInput.js +15 -0
- package/presentation/scheduleDialog/components/SchedulerDialogFormComponentDateTimeInput.js.map +1 -0
- package/presentation/scheduleDialog/createMinDateValidator.d.ts +7 -0
- package/presentation/scheduleDialog/createMinDateValidator.js +14 -0
- package/presentation/scheduleDialog/createMinDateValidator.js.map +1 -0
- package/presentation/scheduleDialog/feature.d.ts +3 -0
- package/presentation/scheduleDialog/feature.js +17 -0
- package/presentation/scheduleDialog/feature.js.map +1 -0
- package/presentation/scheduleDialog/useScheduleDialog.d.ts +20 -0
- package/presentation/scheduleDialog/useScheduleDialog.js +128 -0
- package/presentation/scheduleDialog/useScheduleDialog.js.map +1 -0
- package/{Presentation/index.d.ts → presentation/schedulerList/Scheduler.d.ts} +2 -9
- package/presentation/schedulerList/Scheduler.js +28 -0
- package/presentation/schedulerList/Scheduler.js.map +1 -0
- package/presentation/schedulerList/SchedulerListDataSource.d.ts +15 -0
- package/presentation/schedulerList/SchedulerListDataSource.js +41 -0
- package/presentation/schedulerList/SchedulerListDataSource.js.map +1 -0
- package/presentation/schedulerList/SchedulerListPresenter.d.ts +21 -0
- package/presentation/schedulerList/SchedulerListPresenter.js +47 -0
- package/presentation/schedulerList/SchedulerListPresenter.js.map +1 -0
- package/presentation/schedulerList/abstractions.d.ts +13 -0
- package/presentation/schedulerList/abstractions.js +5 -0
- package/presentation/schedulerList/abstractions.js.map +1 -0
- package/presentation/schedulerList/components/BottomInfoBar.d.ts +9 -0
- package/presentation/schedulerList/components/BottomInfoBar.js +18 -0
- package/presentation/schedulerList/components/BottomInfoBar.js.map +1 -0
- package/presentation/schedulerList/components/Empty.d.ts +9 -0
- package/{Presentation/components/Empty → presentation/schedulerList/components}/Empty.js +6 -6
- package/presentation/schedulerList/components/Empty.js.map +1 -0
- package/presentation/schedulerList/components/SchedulerListView.d.ts +8 -0
- package/presentation/schedulerList/components/SchedulerListView.js +40 -0
- package/presentation/schedulerList/components/SchedulerListView.js.map +1 -0
- package/presentation/schedulerList/components/SchedulerOverlay.d.ts +11 -0
- package/presentation/schedulerList/components/SchedulerOverlay.js +38 -0
- package/presentation/schedulerList/components/SchedulerOverlay.js.map +1 -0
- package/presentation/schedulerList/components/SchedulerTable.d.ts +9 -0
- package/presentation/schedulerList/components/SchedulerTable.js +48 -0
- package/presentation/schedulerList/components/SchedulerTable.js.map +1 -0
- package/presentation/schedulerList/components/SearchInput.d.ts +9 -0
- package/{Presentation/components/SearchInput → presentation/schedulerList/components}/SearchInput.js +8 -8
- package/presentation/schedulerList/components/SearchInput.js.map +1 -0
- package/presentation/schedulerList/feature.d.ts +3 -0
- package/presentation/schedulerList/feature.js +17 -0
- package/presentation/schedulerList/feature.js.map +1 -0
- package/presentation/schedulerList/useSchedulerListPresenter.d.ts +1 -0
- package/presentation/schedulerList/useSchedulerListPresenter.js +6 -0
- package/presentation/schedulerList/useSchedulerListPresenter.js.map +1 -0
- package/types.d.ts +0 -7
- package/types.js +1 -9
- package/types.js.map +1 -1
- package/Domain/Models/SchedulerItem/SchedulerItem.d.ts +0 -13
- package/Domain/Models/SchedulerItem/SchedulerItem.js +0 -18
- 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 -1
- package/Domain/Models/index.d.ts +0 -1
- package/Domain/Models/index.js +0 -1
- package/Domain/Repositories/SchedulerItems/ISchedulerItemsRepository.d.ts +0 -14
- package/Domain/Repositories/SchedulerItems/ISchedulerItemsRepository.js +0 -0
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.d.ts +0 -36
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.js +0 -119
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.js.map +0 -1
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.d.ts +0 -19
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.js +0 -18
- 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 -39
- 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 -3
- package/Domain/Repositories/Search/ISearchRepository.d.ts +0 -4
- package/Domain/Repositories/Search/ISearchRepository.js +0 -0
- package/Domain/Repositories/Search/SearchRepository.d.ts +0 -7
- package/Domain/Repositories/Search/SearchRepository.js +0 -16
- 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 -18
- 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 -2
- package/Domain/Repositories/SelectedItems/ISelectedItemsRepository.d.ts +0 -8
- package/Domain/Repositories/SelectedItems/ISelectedItemsRepository.js +0 -0
- package/Domain/Repositories/SelectedItems/SelectedItemsRepository.d.ts +0 -12
- package/Domain/Repositories/SelectedItems/SelectedItemsRepository.js +0 -28
- 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 -18
- 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 -2
- package/Domain/Repositories/Sorting/SortingRepositoryWithDefaults.d.ts +0 -8
- package/Domain/Repositories/Sorting/SortingRepositoryWithDefaults.js +0 -21
- 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 -1
- package/Domain/Repositories/index.d.ts +0 -4
- package/Domain/Repositories/index.js +0 -4
- package/Domain/index.d.ts +0 -2
- package/Domain/index.js +0 -2
- package/Gateways/SchedulerCancelGraphQLGateway.d.ts +0 -7
- package/Gateways/SchedulerCancelGraphQLGateway.js +0 -42
- package/Gateways/SchedulerCancelGraphQLGateway.js.map +0 -1
- package/Gateways/SchedulerGetGraphQLGateway.d.ts +0 -21
- package/Gateways/SchedulerGetGraphQLGateway.js +0 -68
- package/Gateways/SchedulerGetGraphQLGateway.js.map +0 -1
- package/Gateways/SchedulerListGraphQLGateway.d.ts +0 -7
- package/Gateways/SchedulerListGraphQLGateway.js +0 -86
- package/Gateways/SchedulerListGraphQLGateway.js.map +0 -1
- package/Gateways/SchedulerPublishGraphQLGateway.d.ts +0 -7
- package/Gateways/SchedulerPublishGraphQLGateway.js +0 -59
- package/Gateways/SchedulerPublishGraphQLGateway.js.map +0 -1
- package/Gateways/SchedulerUnpublishGraphQLGateway.d.ts +0 -23
- package/Gateways/SchedulerUnpublishGraphQLGateway.js +0 -63
- package/Gateways/SchedulerUnpublishGraphQLGateway.js.map +0 -1
- package/Gateways/abstractions/CancelScheduledActionGateway.d.ts +0 -7
- package/Gateways/abstractions/CancelScheduledActionGateway.js +0 -0
- package/Gateways/abstractions/GetScheduledActionGateway.js +0 -0
- package/Gateways/abstractions/ListScheduledActionsGateway.js +0 -0
- package/Gateways/abstractions/SchedulePublishActionGateway.js +0 -0
- package/Gateways/abstractions/ScheduleUnpublishActionGateway.js +0 -0
- package/Gateways/graphql/fields.d.ts +0 -1
- package/Gateways/graphql/fields.js +0 -17
- package/Gateways/graphql/fields.js.map +0 -1
- package/Gateways/index.d.ts +0 -5
- package/Gateways/index.js +0 -0
- package/Gateways/schema/schedulerEntry.js.map +0 -1
- package/Presentation/Scheduler/Scheduler.d.ts +0 -17
- package/Presentation/Scheduler/Scheduler.js +0 -78
- package/Presentation/Scheduler/Scheduler.js.map +0 -1
- package/Presentation/Scheduler/SchedulerControllers.d.ts +0 -30
- package/Presentation/Scheduler/SchedulerControllers.js +0 -54
- package/Presentation/Scheduler/SchedulerControllers.js.map +0 -1
- package/Presentation/Scheduler/SchedulerPresenter.d.ts +0 -32
- package/Presentation/Scheduler/SchedulerPresenter.js +0 -45
- 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 -12
- 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 -0
- package/Presentation/Scheduler/controllers/CancelItem/index.d.ts +0 -2
- package/Presentation/Scheduler/controllers/CancelItem/index.js +0 -1
- package/Presentation/Scheduler/controllers/GetItem/GetItemController.d.ts +0 -8
- package/Presentation/Scheduler/controllers/GetItem/GetItemController.js +0 -12
- 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 -0
- package/Presentation/Scheduler/controllers/GetItem/index.d.ts +0 -2
- package/Presentation/Scheduler/controllers/GetItem/index.js +0 -1
- package/Presentation/Scheduler/controllers/ListItems/IListItemsController.d.ts +0 -4
- package/Presentation/Scheduler/controllers/ListItems/IListItemsController.js +0 -0
- package/Presentation/Scheduler/controllers/ListItems/ListItemsController.d.ts +0 -8
- package/Presentation/Scheduler/controllers/ListItems/ListItemsController.js +0 -12
- 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 -1
- package/Presentation/Scheduler/controllers/ListMoreItems/IListMoreItemsController.d.ts +0 -3
- package/Presentation/Scheduler/controllers/ListMoreItems/IListMoreItemsController.js +0 -0
- package/Presentation/Scheduler/controllers/ListMoreItems/ListMoreItemsController.d.ts +0 -7
- package/Presentation/Scheduler/controllers/ListMoreItems/ListMoreItemsController.js +0 -12
- 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 -1
- package/Presentation/Scheduler/controllers/PublishItem/IPublishItemController.d.ts +0 -3
- package/Presentation/Scheduler/controllers/PublishItem/IPublishItemController.js +0 -0
- package/Presentation/Scheduler/controllers/PublishItem/PublishItemController.d.ts +0 -7
- package/Presentation/Scheduler/controllers/PublishItem/PublishItemController.js +0 -12
- 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 -1
- package/Presentation/Scheduler/controllers/SearchItems/ISearchItemsController.d.ts +0 -3
- package/Presentation/Scheduler/controllers/SearchItems/ISearchItemsController.js +0 -0
- package/Presentation/Scheduler/controllers/SearchItems/SearchItemsController.d.ts +0 -8
- package/Presentation/Scheduler/controllers/SearchItems/SearchItemsController.js +0 -15
- 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 -1
- package/Presentation/Scheduler/controllers/SelectAllItems/ISelectAllItemsController.d.ts +0 -3
- package/Presentation/Scheduler/controllers/SelectAllItems/ISelectAllItemsController.js +0 -0
- package/Presentation/Scheduler/controllers/SelectAllItems/SelectAllItemsController.d.ts +0 -7
- package/Presentation/Scheduler/controllers/SelectAllItems/SelectAllItemsController.js +0 -12
- 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 -1
- package/Presentation/Scheduler/controllers/SelectItems/ISelectItemsController.d.ts +0 -4
- package/Presentation/Scheduler/controllers/SelectItems/ISelectItemsController.js +0 -0
- package/Presentation/Scheduler/controllers/SelectItems/SelectItemsController.d.ts +0 -8
- package/Presentation/Scheduler/controllers/SelectItems/SelectItemsController.js +0 -14
- 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 -1
- package/Presentation/Scheduler/controllers/SortItems/ISortItemsController.d.ts +0 -4
- package/Presentation/Scheduler/controllers/SortItems/ISortItemsController.js +0 -0
- package/Presentation/Scheduler/controllers/SortItems/SortItemsController.d.ts +0 -9
- package/Presentation/Scheduler/controllers/SortItems/SortItemsController.js +0 -18
- 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 -1
- package/Presentation/Scheduler/controllers/UnpublishItem/IUnpublishItemController.d.ts +0 -3
- package/Presentation/Scheduler/controllers/UnpublishItem/IUnpublishItemController.js +0 -0
- package/Presentation/Scheduler/controllers/UnpublishItem/UnpublishItemController.d.ts +0 -7
- package/Presentation/Scheduler/controllers/UnpublishItem/UnpublishItemController.js +0 -12
- 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 -1
- package/Presentation/Scheduler/controllers/UnselectAllItems/IUnselectAllItemsController.d.ts +0 -3
- package/Presentation/Scheduler/controllers/UnselectAllItems/IUnselectAllItemsController.js +0 -0
- package/Presentation/Scheduler/controllers/UnselectAllItems/UnselectAllItemsController.d.ts +0 -7
- package/Presentation/Scheduler/controllers/UnselectAllItems/UnselectAllItemsController.js +0 -12
- 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 -1
- package/Presentation/Scheduler/controllers/index.d.ts +0 -11
- package/Presentation/Scheduler/controllers/index.js +0 -11
- package/Presentation/Scheduler/index.d.ts +0 -1
- package/Presentation/Scheduler/index.js +0 -1
- package/Presentation/SchedulerRenderer/SchedulerRenderer.d.ts +0 -6
- package/Presentation/SchedulerRenderer/SchedulerRenderer.js +0 -16
- package/Presentation/SchedulerRenderer/SchedulerRenderer.js.map +0 -1
- package/Presentation/SchedulerRenderer/index.d.ts +0 -1
- package/Presentation/SchedulerRenderer/index.js +0 -1
- package/Presentation/abstractions/ISchedulerControllers.d.ts +0 -14
- package/Presentation/abstractions/ISchedulerControllers.js +0 -0
- package/Presentation/abstractions/ISchedulerPresenter.d.ts +0 -20
- package/Presentation/abstractions/ISchedulerPresenter.js +0 -0
- package/Presentation/abstractions/index.d.ts +0 -2
- package/Presentation/abstractions/index.js +0 -0
- package/Presentation/components/Actions/CancelItem/CancelItem.js.map +0 -1
- package/Presentation/components/BottomInfoBar/BottomInfoBar.d.ts +0 -2
- package/Presentation/components/BottomInfoBar/BottomInfoBar.js +0 -19
- package/Presentation/components/BottomInfoBar/BottomInfoBar.js.map +0 -1
- package/Presentation/components/BottomInfoBar/index.d.ts +0 -1
- package/Presentation/components/BottomInfoBar/index.js +0 -1
- package/Presentation/components/Cells/CellScheduledOn/CellScheduledOn.js.map +0 -1
- package/Presentation/components/Empty/Empty.d.ts +0 -2
- package/Presentation/components/Empty/Empty.js.map +0 -1
- package/Presentation/components/Empty/index.d.ts +0 -1
- package/Presentation/components/Empty/index.js +0 -1
- package/Presentation/components/ScheduleDialog/IScheduleDialogPresenter.js +0 -0
- package/Presentation/components/ScheduleDialog/ScheduleDialogPresenter.d.ts +0 -22
- package/Presentation/components/ScheduleDialog/ScheduleDialogPresenter.js.map +0 -1
- package/Presentation/components/ScheduleDialog/index.d.ts +0 -1
- package/Presentation/components/ScheduleDialog/index.js +0 -1
- package/Presentation/components/ScheduleDialog/types.d.ts +0 -15
- package/Presentation/components/ScheduleDialog/types.js +0 -0
- package/Presentation/components/ScheduleDialog/useScheduleDialog.js +0 -192
- 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 -30
- 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 -1
- package/Presentation/components/SearchInput/SearchInput.d.ts +0 -2
- 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 -1
- package/Presentation/components/Table/Table.d.ts +0 -2
- package/Presentation/components/Table/Table.js +0 -29
- package/Presentation/components/Table/Table.js.map +0 -1
- package/Presentation/components/Table/index.d.ts +0 -1
- package/Presentation/components/Table/index.js +0 -1
- package/Presentation/configs/list/Browser/Table/index.d.ts +0 -18
- package/Presentation/configs/list/Browser/index.d.ts +0 -23
- package/Presentation/hooks/useCancelSchedulerItem.js.map +0 -1
- package/Presentation/hooks/useScheduler.d.ts +0 -28
- package/Presentation/hooks/useScheduler.js +0 -68
- package/Presentation/hooks/useScheduler.js.map +0 -1
- package/Presentation/index.js +0 -49
- package/Presentation/index.js.map +0 -1
- package/UseCases/CancelItem/CancelItemUseCase.d.ts +0 -7
- package/UseCases/CancelItem/CancelItemUseCase.js +0 -13
- package/UseCases/CancelItem/CancelItemUseCase.js.map +0 -1
- package/UseCases/CancelItem/ICancelItemUseCase.d.ts +0 -3
- package/UseCases/CancelItem/ICancelItemUseCase.js +0 -0
- package/UseCases/CancelItem/index.d.ts +0 -2
- package/UseCases/CancelItem/index.js +0 -1
- package/UseCases/GetItem/GetItemUseCase.d.ts +0 -8
- package/UseCases/GetItem/GetItemUseCase.js +0 -13
- package/UseCases/GetItem/GetItemUseCase.js.map +0 -1
- package/UseCases/GetItem/IGetItemUseCase.d.ts +0 -4
- package/UseCases/GetItem/IGetItemUseCase.js +0 -0
- package/UseCases/GetItem/index.d.ts +0 -2
- package/UseCases/GetItem/index.js +0 -1
- package/UseCases/GetScheduledItem/GetScheduledItemUseCase.d.ts +0 -7
- package/UseCases/GetScheduledItem/GetScheduledItemUseCase.js +0 -14
- package/UseCases/GetScheduledItem/GetScheduledItemUseCase.js.map +0 -1
- package/UseCases/GetScheduledItem/IGetScheduledItemUseCase.d.ts +0 -4
- package/UseCases/GetScheduledItem/IGetScheduledItemUseCase.js +0 -0
- package/UseCases/GetScheduledItem/index.d.ts +0 -2
- package/UseCases/GetScheduledItem/index.js +0 -1
- package/UseCases/ListItems/IListItemsUseCase.d.ts +0 -4
- package/UseCases/ListItems/IListItemsUseCase.js +0 -0
- package/UseCases/ListItems/ListItemsUseCase.d.ts +0 -8
- package/UseCases/ListItems/ListItemsUseCase.js +0 -13
- package/UseCases/ListItems/ListItemsUseCase.js.map +0 -1
- package/UseCases/ListItems/ListItemsUseCaseWithSearch.d.ts +0 -9
- package/UseCases/ListItems/ListItemsUseCaseWithSearch.js +0 -23
- package/UseCases/ListItems/ListItemsUseCaseWithSearch.js.map +0 -1
- package/UseCases/ListItems/ListItemsUseCaseWithSorting.d.ts +0 -9
- package/UseCases/ListItems/ListItemsUseCaseWithSorting.js +0 -21
- package/UseCases/ListItems/ListItemsUseCaseWithSorting.js.map +0 -1
- package/UseCases/ListItems/index.d.ts +0 -4
- package/UseCases/ListItems/index.js +0 -3
- package/UseCases/ListMoreItems/IListMoreItemsUseCase.d.ts +0 -3
- package/UseCases/ListMoreItems/IListMoreItemsUseCase.js +0 -0
- package/UseCases/ListMoreItems/ListMoreItemsUseCase.d.ts +0 -7
- package/UseCases/ListMoreItems/ListMoreItemsUseCase.js +0 -13
- package/UseCases/ListMoreItems/ListMoreItemsUseCase.js.map +0 -1
- package/UseCases/ListMoreItems/index.d.ts +0 -2
- package/UseCases/ListMoreItems/index.js +0 -1
- package/UseCases/PublishItem/IPublishItemUseCase.d.ts +0 -3
- package/UseCases/PublishItem/IPublishItemUseCase.js +0 -0
- package/UseCases/PublishItem/PublishItemUseCase.d.ts +0 -7
- package/UseCases/PublishItem/PublishItemUseCase.js +0 -13
- package/UseCases/PublishItem/PublishItemUseCase.js.map +0 -1
- package/UseCases/PublishItem/index.d.ts +0 -2
- package/UseCases/PublishItem/index.js +0 -1
- package/UseCases/SearchItems/ISearchItemsUseCase.d.ts +0 -3
- package/UseCases/SearchItems/ISearchItemsUseCase.js +0 -0
- package/UseCases/SearchItems/SearchItemsUseCase.d.ts +0 -7
- package/UseCases/SearchItems/SearchItemsUseCase.js +0 -13
- package/UseCases/SearchItems/SearchItemsUseCase.js.map +0 -1
- package/UseCases/SearchItems/index.d.ts +0 -2
- package/UseCases/SearchItems/index.js +0 -1
- package/UseCases/SelectAllItems/ISelectAllItemsUseCase.d.ts +0 -3
- package/UseCases/SelectAllItems/ISelectAllItemsUseCase.js +0 -0
- package/UseCases/SelectAllItems/SelectAllItemsUseCase.d.ts +0 -7
- package/UseCases/SelectAllItems/SelectAllItemsUseCase.js +0 -13
- package/UseCases/SelectAllItems/SelectAllItemsUseCase.js.map +0 -1
- package/UseCases/SelectAllItems/index.d.ts +0 -2
- package/UseCases/SelectAllItems/index.js +0 -1
- package/UseCases/SelectItems/ISelectItemsUseCase.d.ts +0 -4
- package/UseCases/SelectItems/ISelectItemsUseCase.js +0 -0
- package/UseCases/SelectItems/SelectItemsUseCase.d.ts +0 -7
- package/UseCases/SelectItems/SelectItemsUseCase.js +0 -13
- package/UseCases/SelectItems/SelectItemsUseCase.js.map +0 -1
- package/UseCases/SelectItems/index.d.ts +0 -2
- package/UseCases/SelectItems/index.js +0 -1
- package/UseCases/SortItems/ISortItemsUseCase.d.ts +0 -4
- package/UseCases/SortItems/ISortItemsUseCase.js +0 -0
- package/UseCases/SortItems/SortItemsUseCase.d.ts +0 -7
- package/UseCases/SortItems/SortItemsUseCase.js +0 -13
- package/UseCases/SortItems/SortItemsUseCase.js.map +0 -1
- package/UseCases/SortItems/index.d.ts +0 -2
- package/UseCases/SortItems/index.js +0 -1
- package/UseCases/UnSelectAllItems/IUnselectAllItemsUseCase.d.ts +0 -3
- package/UseCases/UnSelectAllItems/IUnselectAllItemsUseCase.js +0 -0
- package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.d.ts +0 -7
- package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.js +0 -13
- package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.js.map +0 -1
- package/UseCases/UnSelectAllItems/index.d.ts +0 -2
- package/UseCases/UnSelectAllItems/index.js +0 -1
- package/UseCases/UnpublishItem/IUnpublishItemUseCase.d.ts +0 -3
- package/UseCases/UnpublishItem/IUnpublishItemUseCase.js +0 -0
- package/UseCases/UnpublishItem/UnpublishItemUseCase.d.ts +0 -7
- package/UseCases/UnpublishItem/UnpublishItemUseCase.js +0 -13
- package/UseCases/UnpublishItem/UnpublishItemUseCase.js.map +0 -1
- package/UseCases/UnpublishItem/index.d.ts +0 -2
- package/UseCases/UnpublishItem/index.js +0 -1
- package/UseCases/index.d.ts +0 -11
- package/UseCases/index.js +0 -11
- /package/{Presentation → presentation}/SchedulerConfigs/SchedulerConfigs.d.ts +0 -0
- /package/{Presentation → presentation}/SchedulerConfigs/SchedulerConfigs.js +0 -0
- /package/{Presentation → presentation}/SchedulerConfigs/index.d.ts +0 -0
- /package/{Presentation → presentation}/SchedulerConfigs/index.js +0 -0
- /package/{Presentation → presentation}/components/Actions/CancelItem/CancelItem.d.ts +0 -0
- /package/{Presentation → presentation}/components/Actions/CancelItem/index.d.ts +0 -0
- /package/{Presentation → presentation}/components/Actions/CancelItem/index.js +0 -0
- /package/{Presentation → presentation}/components/Actions/index.d.ts +0 -0
- /package/{Presentation → presentation}/components/Actions/index.js +0 -0
- /package/{Presentation → presentation}/components/BottomInfoBar/BottomInfoBar.styled.d.ts +0 -0
- /package/{Presentation → presentation}/components/BottomInfoBar/BottomInfoBar.styled.js +0 -0
- /package/{Presentation → presentation}/components/BottomInfoBar/ListMeta.d.ts +0 -0
- /package/{Presentation → presentation}/components/BottomInfoBar/ListMeta.js +0 -0
- /package/{Presentation → presentation}/components/BottomInfoBar/ListStatus.d.ts +0 -0
- /package/{Presentation → presentation}/components/BottomInfoBar/ListStatus.js +0 -0
- /package/{Presentation → presentation}/components/Cells/CellActions/CellActions.d.ts +0 -0
- /package/{Presentation → presentation}/components/Cells/CellActions/CellActions.js +0 -0
- /package/{Presentation → presentation}/components/Cells/CellActions/index.d.ts +0 -0
- /package/{Presentation → presentation}/components/Cells/CellActions/index.js +0 -0
- /package/{Presentation → presentation}/components/Cells/CellRevision/CellRevision.d.ts +0 -0
- /package/{Presentation → presentation}/components/Cells/CellRevision/CellRevision.js +0 -0
- /package/{Presentation → presentation}/components/Cells/CellRevision/CellRevision.styled.d.ts +0 -0
- /package/{Presentation → presentation}/components/Cells/CellRevision/CellRevision.styled.js +0 -0
- /package/{Presentation → presentation}/components/Cells/CellRevision/index.d.ts +0 -0
- /package/{Presentation → presentation}/components/Cells/CellRevision/index.js +0 -0
- /package/{Presentation → presentation}/components/Cells/CellScheduledBy/CellScheduledBy.d.ts +0 -0
- /package/{Presentation → presentation}/components/Cells/CellScheduledBy/CellScheduledBy.js +0 -0
- /package/{Presentation → presentation}/components/Cells/CellScheduledBy/index.d.ts +0 -0
- /package/{Presentation → presentation}/components/Cells/CellScheduledBy/index.js +0 -0
- /package/{Presentation → presentation}/components/Cells/CellScheduledOn/CellScheduledOn.d.ts +0 -0
- /package/{Presentation → presentation}/components/Cells/CellScheduledOn/index.d.ts +0 -0
- /package/{Presentation → presentation}/components/Cells/CellScheduledOn/index.js +0 -0
- /package/{Presentation → presentation}/components/Cells/CellTitle/CellTitle.d.ts +0 -0
- /package/{Presentation → presentation}/components/Cells/CellTitle/CellTitle.js +0 -0
- /package/{Presentation → presentation}/components/Cells/CellTitle/CellTitle.styled.d.ts +0 -0
- /package/{Presentation → presentation}/components/Cells/CellTitle/CellTitle.styled.js +0 -0
- /package/{Presentation → presentation}/components/Cells/CellTitle/index.d.ts +0 -0
- /package/{Presentation → presentation}/components/Cells/CellTitle/index.js +0 -0
- /package/{Presentation → presentation}/components/Cells/CellType/CellActionType.d.ts +0 -0
- /package/{Presentation → presentation}/components/Cells/CellType/CellActionType.js +0 -0
- /package/{Presentation → presentation}/components/Cells/CellType/CellActionType.styled.d.ts +0 -0
- /package/{Presentation → presentation}/components/Cells/CellType/CellActionType.styled.js +0 -0
- /package/{Presentation → presentation}/components/Cells/CellType/index.d.ts +0 -0
- /package/{Presentation → presentation}/components/Cells/CellType/index.js +0 -0
- /package/{Presentation → presentation}/components/Cells/index.d.ts +0 -0
- /package/{Presentation → presentation}/components/Cells/index.js +0 -0
- /package/{Presentation → presentation}/components/Empty/Empty.styled.d.ts +0 -0
- /package/{Presentation → presentation}/components/Empty/Empty.styled.js +0 -0
- /package/{Presentation → presentation}/components/Title/Title.d.ts +0 -0
- /package/{Presentation → presentation}/components/Title/Title.js +0 -0
- /package/{Presentation → presentation}/components/Title/Title.styled.d.ts +0 -0
- /package/{Presentation → presentation}/components/Title/Title.styled.js +0 -0
- /package/{Presentation → presentation}/components/Title/index.d.ts +0 -0
- /package/{Presentation → presentation}/components/Title/index.js +0 -0
- /package/{Presentation → presentation}/configs/index.d.ts +0 -0
- /package/{Presentation → presentation}/configs/index.js +0 -0
- /package/{Presentation → presentation}/configs/list/Browser/EntryAction.js +0 -0
- /package/{Presentation → presentation}/configs/list/Browser/Table/Column.js +0 -0
- /package/{Presentation → presentation}/configs/list/Browser/Table/Sorting.d.ts +0 -0
- /package/{Presentation → presentation}/configs/list/Browser/Table/Sorting.js +0 -0
- /package/{Presentation → presentation}/configs/list/Browser/Table/index.js +0 -0
- /package/{Presentation → presentation}/configs/list/Browser/index.js +0 -0
- /package/{Presentation → presentation}/configs/list/SchedulerListConfig.js +0 -0
- /package/{Presentation → presentation}/configs/list/index.d.ts +0 -0
- /package/{Presentation → presentation}/configs/list/index.js +0 -0
- /package/{Presentation → presentation}/hooks/useCancelSchedulerItem.d.ts +0 -0
- /package/{Presentation → presentation}/hooks/useSchedulerItem.d.ts +0 -0
- /package/{Presentation → presentation}/hooks/useSchedulerItem.js +0 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import react, { useMemo } from "react";
|
|
2
|
+
import { observer } from "mobx-react-lite";
|
|
3
|
+
import { Table, createRecordsData } from "@webiny/app-aco";
|
|
4
|
+
import { useSchedulerListConfig } from "../../configs/index.js";
|
|
5
|
+
const SchedulerTable = observer(({ presenter })=>{
|
|
6
|
+
const { vm } = presenter.list;
|
|
7
|
+
const { browser } = useSchedulerListConfig();
|
|
8
|
+
const data = useMemo(()=>createRecordsData(vm.rows), [
|
|
9
|
+
vm.rows
|
|
10
|
+
]);
|
|
11
|
+
const selected = useMemo(()=>{
|
|
12
|
+
const selectedIds = vm.selection.selectedIds;
|
|
13
|
+
return data.filter((row)=>selectedIds.has(row.id));
|
|
14
|
+
}, [
|
|
15
|
+
data,
|
|
16
|
+
vm.selection.selectedIds
|
|
17
|
+
]);
|
|
18
|
+
const sorting = useMemo(()=>{
|
|
19
|
+
if (!vm.sort) return [];
|
|
20
|
+
return [
|
|
21
|
+
{
|
|
22
|
+
id: vm.sort.field,
|
|
23
|
+
desc: "DESC" === vm.sort.direction
|
|
24
|
+
}
|
|
25
|
+
];
|
|
26
|
+
}, [
|
|
27
|
+
vm.sort
|
|
28
|
+
]);
|
|
29
|
+
return /*#__PURE__*/ react.createElement(Table, {
|
|
30
|
+
columns: browser.table.columns,
|
|
31
|
+
data: data,
|
|
32
|
+
loading: vm.pagination.loading,
|
|
33
|
+
onSelectRow: (entries)=>presenter.list.actions.selection.selectRows(entries.map((entry)=>entry.id)),
|
|
34
|
+
sorting: sorting,
|
|
35
|
+
onSortingChange: (sort)=>{
|
|
36
|
+
if ("function" == typeof sort) {
|
|
37
|
+
const newSort = sort(sorting);
|
|
38
|
+
if (newSort.length > 0) presenter.list.actions.sort.set(newSort[0].id, newSort[0].desc ? "DESC" : "ASC");
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
selected: selected,
|
|
42
|
+
nameColumnId: "title",
|
|
43
|
+
namespace: "scheduler/list"
|
|
44
|
+
});
|
|
45
|
+
});
|
|
46
|
+
export { SchedulerTable };
|
|
47
|
+
|
|
48
|
+
//# sourceMappingURL=SchedulerTable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/schedulerList/components/SchedulerTable.js","sources":["../../../../src/presentation/schedulerList/components/SchedulerTable.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport { observer } from \"mobx-react-lite\";\nimport { createRecordsData, Table as AcoTable } from \"@webiny/app-aco\";\nimport { useSchedulerListConfig } from \"~/presentation/configs/index.js\";\nimport type { SchedulerEntryTableRow } from \"~/types.js\";\nimport type { ISchedulerListPresenter } from \"../abstractions.js\";\n\ninterface SchedulerTableProps {\n presenter: ISchedulerListPresenter;\n}\n\nexport const SchedulerTable = observer(({ presenter }: SchedulerTableProps) => {\n const { vm } = presenter.list;\n const { browser } = useSchedulerListConfig();\n\n const data = useMemo<SchedulerEntryTableRow[]>(() => {\n return createRecordsData(vm.rows);\n }, [vm.rows]);\n\n const selected = useMemo<SchedulerEntryTableRow[]>(() => {\n const selectedIds = vm.selection.selectedIds;\n return data.filter(row => selectedIds.has(row.id));\n }, [data, vm.selection.selectedIds]);\n\n const sorting = useMemo(() => {\n if (!vm.sort) {\n return [];\n }\n return [{ id: vm.sort.field, desc: vm.sort.direction === \"DESC\" }];\n }, [vm.sort]);\n\n return (\n <AcoTable<SchedulerEntryTableRow>\n columns={browser.table.columns}\n data={data}\n loading={vm.pagination.loading}\n onSelectRow={entries =>\n presenter.list.actions.selection.selectRows(entries.map(entry => entry.id))\n }\n sorting={sorting}\n onSortingChange={sort => {\n if (typeof sort === \"function\") {\n const newSort = sort(sorting);\n if (newSort.length > 0) {\n presenter.list.actions.sort.set(\n newSort[0].id,\n newSort[0].desc ? \"DESC\" : \"ASC\"\n );\n }\n }\n }}\n selected={selected}\n nameColumnId={\"title\"}\n namespace={\"scheduler/list\"}\n />\n );\n});\n"],"names":["SchedulerTable","observer","presenter","vm","browser","useSchedulerListConfig","data","useMemo","createRecordsData","selected","selectedIds","row","sorting","AcoTable","entries","entry","sort","newSort"],"mappings":";;;;AAWO,MAAMA,iBAAiBC,SAAS,CAAC,EAAEC,SAAS,EAAuB;IACtE,MAAM,EAAEC,EAAE,EAAE,GAAGD,UAAU,IAAI;IAC7B,MAAM,EAAEE,OAAO,EAAE,GAAGC;IAEpB,MAAMC,OAAOC,QAAkC,IACpCC,kBAAkBL,GAAG,IAAI,GACjC;QAACA,GAAG,IAAI;KAAC;IAEZ,MAAMM,WAAWF,QAAkC;QAC/C,MAAMG,cAAcP,GAAG,SAAS,CAAC,WAAW;QAC5C,OAAOG,KAAK,MAAM,CAACK,CAAAA,MAAOD,YAAY,GAAG,CAACC,IAAI,EAAE;IACpD,GAAG;QAACL;QAAMH,GAAG,SAAS,CAAC,WAAW;KAAC;IAEnC,MAAMS,UAAUL,QAAQ;QACpB,IAAI,CAACJ,GAAG,IAAI,EACR,OAAO,EAAE;QAEb,OAAO;YAAC;gBAAE,IAAIA,GAAG,IAAI,CAAC,KAAK;gBAAE,MAAMA,AAAsB,WAAtBA,GAAG,IAAI,CAAC,SAAS;YAAY;SAAE;IACtE,GAAG;QAACA,GAAG,IAAI;KAAC;IAEZ,OAAO,WAAP,GACI,oBAACU,OAAQA;QACL,SAAST,QAAQ,KAAK,CAAC,OAAO;QAC9B,MAAME;QACN,SAASH,GAAG,UAAU,CAAC,OAAO;QAC9B,aAAaW,CAAAA,UACTZ,UAAU,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,UAAU,CAACY,QAAQ,GAAG,CAACC,CAAAA,QAASA,MAAM,EAAE;QAE7E,SAASH;QACT,iBAAiBI,CAAAA;YACb,IAAI,AAAgB,cAAhB,OAAOA,MAAqB;gBAC5B,MAAMC,UAAUD,KAAKJ;gBACrB,IAAIK,QAAQ,MAAM,GAAG,GACjBf,UAAU,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,GAAG,CAC3Be,OAAO,CAAC,EAAE,CAAC,EAAE,EACbA,OAAO,CAAC,EAAE,CAAC,IAAI,GAAG,SAAS;YAGvC;QACJ;QACA,UAAUR;QACV,cAAc;QACd,WAAW;;AAGvB"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import type { ISchedulerListPresenter } from "../abstractions.js";
|
|
3
|
+
interface SearchInputProps {
|
|
4
|
+
presenter: ISchedulerListPresenter;
|
|
5
|
+
}
|
|
6
|
+
export declare const SearchInput: (({ presenter }: SearchInputProps) => React.JSX.Element) & React.NamedExoticComponent<SearchInputProps> & {
|
|
7
|
+
readonly type: ({ presenter }: SearchInputProps) => React.JSX.Element;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
package/{Presentation/components/SearchInput → presentation/schedulerList/components}/SearchInput.js
RENAMED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import react from "react";
|
|
2
|
+
import { observer } from "mobx-react-lite";
|
|
2
3
|
import { ReactComponent } from "@webiny/icons/search.svg";
|
|
3
4
|
import { DelayedOnChange, Icon, Input } from "@webiny/admin-ui";
|
|
4
|
-
|
|
5
|
-
const
|
|
6
|
-
const { vm, searchItems } = useScheduler();
|
|
5
|
+
const SearchInput = observer(({ presenter })=>{
|
|
6
|
+
const { vm } = presenter.list;
|
|
7
7
|
return /*#__PURE__*/ react.createElement(DelayedOnChange, {
|
|
8
|
-
value: vm.
|
|
8
|
+
value: vm.search,
|
|
9
9
|
onChange: (value)=>{
|
|
10
|
-
if (value === vm.
|
|
11
|
-
|
|
10
|
+
if (value === vm.search) return;
|
|
11
|
+
presenter.list.actions.search.set(value);
|
|
12
12
|
}
|
|
13
13
|
}, ({ value, onChange })=>/*#__PURE__*/ react.createElement(Input, {
|
|
14
14
|
id: "scheduler__search-input",
|
|
15
15
|
value: value,
|
|
16
16
|
onChange: (e)=>onChange(e.target.value),
|
|
17
17
|
forwardEventOnChange: true,
|
|
18
|
-
placeholder:
|
|
18
|
+
placeholder: "Search all items",
|
|
19
19
|
"data-testid": "scheduler.search-input",
|
|
20
20
|
startIcon: /*#__PURE__*/ react.createElement(Icon, {
|
|
21
21
|
icon: /*#__PURE__*/ react.createElement(ReactComponent, null),
|
|
@@ -24,7 +24,7 @@ const SearchInput = ()=>{
|
|
|
24
24
|
size: "md",
|
|
25
25
|
variant: "ghost"
|
|
26
26
|
}));
|
|
27
|
-
};
|
|
27
|
+
});
|
|
28
28
|
export { SearchInput };
|
|
29
29
|
|
|
30
30
|
//# sourceMappingURL=SearchInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/schedulerList/components/SearchInput.js","sources":["../../../../src/presentation/schedulerList/components/SearchInput.tsx"],"sourcesContent":["import React from \"react\";\nimport { observer } from \"mobx-react-lite\";\nimport { ReactComponent as SearchIcon } from \"@webiny/icons/search.svg\";\nimport { DelayedOnChange, Icon, Input } from \"@webiny/admin-ui\";\nimport type { ISchedulerListPresenter } from \"../abstractions.js\";\n\ninterface SearchInputProps {\n presenter: ISchedulerListPresenter;\n}\n\nexport const SearchInput = observer(({ presenter }: SearchInputProps) => {\n const { vm } = presenter.list;\n\n return (\n <DelayedOnChange\n value={vm.search}\n onChange={value => {\n if (value === vm.search) {\n return;\n }\n presenter.list.actions.search.set(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={\"Search all items\"}\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"],"names":["SearchInput","observer","presenter","vm","DelayedOnChange","value","onChange","Input","e","Icon","SearchIcon"],"mappings":";;;;AAUO,MAAMA,cAAcC,SAAS,CAAC,EAAEC,SAAS,EAAoB;IAChE,MAAM,EAAEC,EAAE,EAAE,GAAGD,UAAU,IAAI;IAE7B,OAAO,WAAP,GACI,oBAACE,iBAAeA;QACZ,OAAOD,GAAG,MAAM;QAChB,UAAUE,CAAAA;YACN,IAAIA,UAAUF,GAAG,MAAM,EACnB;YAEJD,UAAU,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,GAAG,CAACG;QACtC;OAEC,CAAC,EAAEA,KAAK,EAAEC,QAAQ,EAAE,iBACjB,oBAACC,OAAKA;YACF,IAAI;YACJ,OAAOF;YACP,UAAUG,CAAAA,IAAKF,SAASE,EAAE,MAAM,CAAC,KAAK;YACtC,sBAAsB;YACtB,aAAa;YACb,eAAa;YACb,yBAAW,oBAACC,MAAIA;gBAAC,oBAAM,oBAACC,gBAAUA;gBAAK,OAAM;;YAC7C,MAAM;YACN,SAAS;;AAK7B"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { createFeature } from "@webiny/feature/admin";
|
|
2
|
+
import { SchedulerListPresenter } from "./abstractions.js";
|
|
3
|
+
import { SchedulerListPresenter as external_SchedulerListPresenter_js_SchedulerListPresenter } from "./SchedulerListPresenter.js";
|
|
4
|
+
const SchedulerListPresenterFeature = createFeature({
|
|
5
|
+
name: "Scheduler/ListPresenter",
|
|
6
|
+
register (container) {
|
|
7
|
+
container.register(external_SchedulerListPresenter_js_SchedulerListPresenter).inSingletonScope();
|
|
8
|
+
},
|
|
9
|
+
resolve (container) {
|
|
10
|
+
return {
|
|
11
|
+
presenter: container.resolve(SchedulerListPresenter)
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
});
|
|
15
|
+
export { SchedulerListPresenterFeature };
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=feature.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/schedulerList/feature.js","sources":["../../../src/presentation/schedulerList/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { SchedulerListPresenter as PresenterAbstraction } from \"./abstractions.js\";\nimport { SchedulerListPresenter } from \"./SchedulerListPresenter.js\";\n\nexport const SchedulerListPresenterFeature = createFeature({\n name: \"Scheduler/ListPresenter\",\n register(container) {\n container.register(SchedulerListPresenter).inSingletonScope();\n },\n resolve(container) {\n return { presenter: container.resolve(PresenterAbstraction) };\n }\n});\n"],"names":["SchedulerListPresenterFeature","createFeature","container","SchedulerListPresenter","PresenterAbstraction"],"mappings":";;;AAIO,MAAMA,gCAAgCC,cAAc;IACvD,MAAM;IACN,UAASC,SAAS;QACdA,UAAU,QAAQ,CAACC,2DAAwB,gBAAgB;IAC/D;IACA,SAAQD,SAAS;QACb,OAAO;YAAE,WAAWA,UAAU,OAAO,CAACE;QAAsB;IAChE;AACJ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const useSchedulerListPresenter: () => import("./abstractions.js").ISchedulerListPresenter;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { useFeature } from "@webiny/app";
|
|
2
|
+
import { SchedulerListPresenterFeature } from "./feature.js";
|
|
3
|
+
const useSchedulerListPresenter = ()=>useFeature(SchedulerListPresenterFeature).presenter;
|
|
4
|
+
export { useSchedulerListPresenter };
|
|
5
|
+
|
|
6
|
+
//# sourceMappingURL=useSchedulerListPresenter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"presentation/schedulerList/useSchedulerListPresenter.js","sources":["../../../src/presentation/schedulerList/useSchedulerListPresenter.ts"],"sourcesContent":["import { useFeature } from \"@webiny/app\";\nimport { SchedulerListPresenterFeature } from \"./feature.js\";\n\nexport const useSchedulerListPresenter = () => {\n return useFeature(SchedulerListPresenterFeature).presenter;\n};\n"],"names":["useSchedulerListPresenter","useFeature","SchedulerListPresenterFeature"],"mappings":";;AAGO,MAAMA,4BAA4B,IAC9BC,WAAWC,+BAA+B,SAAS"}
|
package/types.d.ts
CHANGED
|
@@ -27,11 +27,4 @@ export interface SchedulerEntry {
|
|
|
27
27
|
actionType: ScheduleActionType;
|
|
28
28
|
title: string;
|
|
29
29
|
}
|
|
30
|
-
export declare enum LoadingActions {
|
|
31
|
-
get = "GET",
|
|
32
|
-
list = "LIST",
|
|
33
|
-
listMore = "LIST_MORE",
|
|
34
|
-
delete = "DELETE",
|
|
35
|
-
create = "CREATE"
|
|
36
|
-
}
|
|
37
30
|
export type SchedulerEntryTableRow = TableRow<SchedulerEntry>;
|
package/types.js
CHANGED
|
@@ -3,14 +3,6 @@ var types_ScheduleActionType = /*#__PURE__*/ function(ScheduleActionType) {
|
|
|
3
3
|
ScheduleActionType["unpublish"] = "unpublish";
|
|
4
4
|
return ScheduleActionType;
|
|
5
5
|
}({});
|
|
6
|
-
|
|
7
|
-
LoadingActions["get"] = "GET";
|
|
8
|
-
LoadingActions["list"] = "LIST";
|
|
9
|
-
LoadingActions["listMore"] = "LIST_MORE";
|
|
10
|
-
LoadingActions["delete"] = "DELETE";
|
|
11
|
-
LoadingActions["create"] = "CREATE";
|
|
12
|
-
return LoadingActions;
|
|
13
|
-
}({});
|
|
14
|
-
export { types_LoadingActions as LoadingActions, types_ScheduleActionType as ScheduleActionType };
|
|
6
|
+
export { types_ScheduleActionType as ScheduleActionType };
|
|
15
7
|
|
|
16
8
|
//# sourceMappingURL=types.js.map
|
package/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../src/types.ts"],"sourcesContent":["import type { CmsIdentity } from \"@webiny/app-headless-cms-common/types/index.js\";\nimport type { TableRow } from \"@webiny/app-aco\";\n\ntype SchedulerIdentity = Pick<CmsIdentity, \"id\" | \"displayName\" | \"type\">;\n\nexport type { SchedulerIdentity };\n\nexport enum ScheduleActionType {\n publish = \"publish\",\n unpublish = \"unpublish\"\n}\n\nexport interface SchedulerErrorResponse {\n code: string;\n message: string;\n data?: Record<string, any>;\n stack?: string;\n}\n\nexport interface SchedulerMetaResponse {\n totalCount: number;\n cursor: string | null;\n hasMoreItems: boolean;\n}\n\nexport interface SchedulerEntry {\n id: string;\n targetId: string;\n namespace: string;\n scheduledBy: SchedulerIdentity;\n publishOn?: Date;\n unpublishOn?: Date;\n actionType: ScheduleActionType;\n title: string;\n}\n\nexport
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../src/types.ts"],"sourcesContent":["import type { CmsIdentity } from \"@webiny/app-headless-cms-common/types/index.js\";\nimport type { TableRow } from \"@webiny/app-aco\";\n\ntype SchedulerIdentity = Pick<CmsIdentity, \"id\" | \"displayName\" | \"type\">;\n\nexport type { SchedulerIdentity };\n\nexport enum ScheduleActionType {\n publish = \"publish\",\n unpublish = \"unpublish\"\n}\n\nexport interface SchedulerErrorResponse {\n code: string;\n message: string;\n data?: Record<string, any>;\n stack?: string;\n}\n\nexport interface SchedulerMetaResponse {\n totalCount: number;\n cursor: string | null;\n hasMoreItems: boolean;\n}\n\nexport interface SchedulerEntry {\n id: string;\n targetId: string;\n namespace: string;\n scheduledBy: SchedulerIdentity;\n publishOn?: Date;\n unpublishOn?: Date;\n actionType: ScheduleActionType;\n title: string;\n}\n\nexport type SchedulerEntryTableRow = TableRow<SchedulerEntry>;\n"],"names":["ScheduleActionType"],"mappings":"AAOO,IAAKA,2BAAkBA,WAAAA,GAAAA,SAAlBA,kBAAkB;;;WAAlBA"}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { SchedulerIdentity, SchedulerEntry, ScheduleActionType } from "../../../types.js";
|
|
2
|
-
export declare class SchedulerItem {
|
|
3
|
-
readonly id: string;
|
|
4
|
-
readonly title: string;
|
|
5
|
-
readonly actionType: ScheduleActionType;
|
|
6
|
-
readonly targetId: string;
|
|
7
|
-
readonly namespace: string;
|
|
8
|
-
readonly scheduledBy: SchedulerIdentity;
|
|
9
|
-
readonly publishOn?: Date;
|
|
10
|
-
readonly unpublishOn?: Date;
|
|
11
|
-
protected constructor(item: SchedulerEntry);
|
|
12
|
-
static create(item: SchedulerEntry): SchedulerItem;
|
|
13
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
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
|
-
}
|
|
16
|
-
export { SchedulerItem };
|
|
17
|
-
|
|
18
|
-
//# sourceMappingURL=SchedulerItem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./SchedulerItem.js";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./SchedulerItem.js";
|
package/Domain/Models/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./SchedulerItem/index.js";
|
package/Domain/Models/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./SchedulerItem/index.js";
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import type { Meta } from "@webiny/app-utils";
|
|
2
|
-
import type { SchedulerItem } from "../../../Domain/index.js";
|
|
3
|
-
import type { IGetScheduledActionGatewayExecuteParams, IListScheduledActionsGatewayExecuteParams } from "../../../Gateways/index.js";
|
|
4
|
-
export interface ISchedulerItemsRepository {
|
|
5
|
-
getItem(params: Omit<IGetScheduledActionGatewayExecuteParams, "namespace">): Promise<void>;
|
|
6
|
-
listItems: (params?: Omit<IListScheduledActionsGatewayExecuteParams, "namespace">) => Promise<void>;
|
|
7
|
-
listMoreItems: () => Promise<void>;
|
|
8
|
-
scheduleCancelItem: (id: string) => Promise<void>;
|
|
9
|
-
schedulePublishItem: (targetId: string, scheduleOn: Date) => Promise<void>;
|
|
10
|
-
scheduleUnpublishItem: (targetId: string, scheduleOn: Date) => Promise<void>;
|
|
11
|
-
getItems: () => SchedulerItem[];
|
|
12
|
-
getMeta: () => Meta;
|
|
13
|
-
getLoading: () => Record<string, any>;
|
|
14
|
-
}
|
|
File without changes
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
import type { SchedulerItem } from "../../../Domain/index.js";
|
|
2
|
-
import type { ICancelScheduledActionGateway, IListScheduledActionsGateway, ISchedulePublishActionGateway, IScheduleUnpublishActionGateway } from "../../../Gateways/index.js";
|
|
3
|
-
import { type IGetScheduledActionGatewayExecuteParams, type IGetScheduledActionGateway, type IListScheduledActionsGatewayExecuteParams } from "../../../Gateways/index.js";
|
|
4
|
-
import type { IMetaRepository } from "@webiny/app-utils";
|
|
5
|
-
import { Meta } from "@webiny/app-utils";
|
|
6
|
-
import type { ISchedulerItemsRepository } from "./ISchedulerItemsRepository.js";
|
|
7
|
-
export interface ISchedulerItemsRepositoryParams {
|
|
8
|
-
metaRepository: IMetaRepository;
|
|
9
|
-
getGateway: IGetScheduledActionGateway;
|
|
10
|
-
listGateway: IListScheduledActionsGateway;
|
|
11
|
-
cancelGateway: ICancelScheduledActionGateway;
|
|
12
|
-
unpublishGateway: IScheduleUnpublishActionGateway;
|
|
13
|
-
publishGateway: ISchedulePublishActionGateway;
|
|
14
|
-
namespace: string;
|
|
15
|
-
}
|
|
16
|
-
export declare class SchedulerItemsRepository implements ISchedulerItemsRepository {
|
|
17
|
-
private readonly metaRepository;
|
|
18
|
-
private readonly getGateway;
|
|
19
|
-
private readonly listGateway;
|
|
20
|
-
private readonly cancelGateway;
|
|
21
|
-
private readonly unpublishGateway;
|
|
22
|
-
private readonly publishGateway;
|
|
23
|
-
private readonly namespace;
|
|
24
|
-
private items;
|
|
25
|
-
private params;
|
|
26
|
-
constructor(params: ISchedulerItemsRepositoryParams);
|
|
27
|
-
getItems(): SchedulerItem[];
|
|
28
|
-
getMeta(): Meta;
|
|
29
|
-
getLoading(): {};
|
|
30
|
-
getItem(params: Omit<IGetScheduledActionGatewayExecuteParams, "namespace">): Promise<void>;
|
|
31
|
-
listItems(params?: Omit<IListScheduledActionsGatewayExecuteParams, "namespace">): Promise<void>;
|
|
32
|
-
listMoreItems(): Promise<void>;
|
|
33
|
-
scheduleCancelItem(id: string): Promise<void>;
|
|
34
|
-
schedulePublishItem(targetId: string, scheduleOn: Date): Promise<void>;
|
|
35
|
-
scheduleUnpublishItem(targetId: string, scheduleOn: Date): Promise<void>;
|
|
36
|
-
}
|
|
@@ -1,119 +0,0 @@
|
|
|
1
|
-
import { makeAutoObservable, runInAction } from "mobx";
|
|
2
|
-
import uniqBy from "lodash/uniqBy.js";
|
|
3
|
-
import { Meta } from "@webiny/app-utils";
|
|
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);
|
|
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
|
-
runInAction(()=>{
|
|
34
|
-
this.items = [];
|
|
35
|
-
});
|
|
36
|
-
if (!item) return;
|
|
37
|
-
runInAction(()=>{
|
|
38
|
-
this.items = [
|
|
39
|
-
item
|
|
40
|
-
];
|
|
41
|
-
});
|
|
42
|
-
}
|
|
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
|
-
});
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
export { SchedulerItemsRepository };
|
|
118
|
-
|
|
119
|
-
//# sourceMappingURL=SchedulerItemsRepository.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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":";;;AA4BO,MAAMA;IAWT,YAAmBC,MAAuC,CAAE;aAHpD,KAAK,GAAoB,EAAE;QAI/B,IAAI,CAAC,cAAc,GAAGA,OAAO,cAAc;QAC3C,IAAI,CAAC,WAAW,GAAGA,OAAO,WAAW;QACrC,IAAI,CAAC,UAAU,GAAGA,OAAO,UAAU;QACnC,IAAI,CAAC,aAAa,GAAGA,OAAO,aAAa;QACzC,IAAI,CAAC,gBAAgB,GAAGA,OAAO,gBAAgB;QAC/C,IAAI,CAAC,cAAc,GAAGA,OAAO,cAAc;QAC3C,IAAI,CAAC,SAAS,GAAGA,OAAO,SAAS;QACjC,IAAI,CAAC,MAAM,GAAG;YACV,WAAW,IAAI,CAAC,SAAS;QAC7B;QACAC,mBAAmB,IAAI;IAC3B;IAEO,WAAW;QACd,OAAO,IAAI,CAAC,KAAK;IACrB;IAEO,UAAU;QACb,OAAO,IAAI,CAAC,cAAc,CAAC,GAAG;IAClC;IAEO,aAAa;QAChB,OAAO,CAAC;IACZ;IAEA,MAAa,QAAQD,MAAkE,EAAE;QACrF,MAAME,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;YACvC,IAAIF,OAAO,EAAE;YACb,WAAW,IAAI,CAAC,SAAS;QAC7B;QAIAG,YAAY;YACR,IAAI,CAAC,KAAK,GAAG,EAAE;QACnB;QAEA,IAAI,CAACD,MACD;QAGJC,YAAY;YACR,IAAI,CAAC,KAAK,GAAG;gBAACD;aAAK;QACvB;IACJ;IAEA,MAAa,UAAUF,MAAqE,EAAE;QAC1F,IAAI,CAAC,MAAM,GAAG;YACV,OAAOA,QAAQ;YACf,OAAOA,QAAQ;YACf,MAAMA,QAAQ;YACd,OAAOA,QAAQ;YACf,WAAW,IAAI,CAAC,SAAS;QAC7B;QAEA,MAAMI,WAAW,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAAE,GAAG,IAAI,CAAC,MAAM;QAAC;QAEjE,IAAI,CAACA,UACD;QAGJD,YAAY;YACR,IAAI,CAAC,KAAK,GAAGC,SAAS,KAAK;YAC3B,IAAI,CAAC,cAAc,CAAC,GAAG,CAACC,KAAK,MAAM,CAACD,SAAS,IAAI;QACrD;IACJ;IAEA,MAAa,gBAAgB;QACzB,MAAM,EAAEE,MAAM,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG;QAE1C,IAAI,CAACA,QACD;QAGJ,MAAMF,WAAW,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAAE,GAAG,IAAI,CAAC,MAAM;YAAE,OAAOE;QAAO;QAEhF,IAAI,CAACF,UACD;QAGJD,YAAY;YACR,IAAI,CAAC,KAAK,GAAGI,OAAO;mBAAI,IAAI,CAAC,KAAK;mBAAKH,SAAS,KAAK;aAAC,EAAE;YACxD,IAAI,CAAC,cAAc,CAAC,GAAG,CAACC,KAAK,MAAM,CAACD,SAAS,IAAI;QACrD;IACJ;IAEA,MAAa,mBAAmBI,EAAU,EAAE;QACxC,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC;YAC7B,WAAW,IAAI,CAAC,SAAS;YACzBA;QACJ;QAEAL,YAAY;YACR,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAACD,CAAAA,OAAQA,KAAK,EAAE,KAAKM;YACnD,IAAI,CAAC,cAAc,CAAC,kBAAkB,CAAC;QAC3C;IACJ;IAEA,MAAa,oBAAoBC,QAAgB,EAAEC,UAAgB,EAAE;QACjE,MAAM,EAAER,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;YAC/C,WAAW,IAAI,CAAC,SAAS;YACzBO;YACAC;QACJ;QAEA,IAAI,CAACR,MACD;QAGJC,YAAY;YACR,IAAI,CAAC,KAAK,GAAG;mBAAI,IAAI,CAAC,KAAK;gBAAED;aAAK;YAClC,IAAI,CAAC,cAAc,CAAC,kBAAkB,CAAC;QAC3C;IACJ;IAEA,MAAa,sBAAsBO,QAAgB,EAAEC,UAAgB,EAAE;QACnE,MAAM,EAAER,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC;YACjD,WAAW,IAAI,CAAC,SAAS;YACzBO;YACAC;QACJ;QAEA,IAAI,CAACR,MACD;QAGJC,YAAY;YACR,IAAI,CAAC,KAAK,GAAG;mBAAI,IAAI,CAAC,KAAK;gBAAED;aAAK;YAClC,IAAI,CAAC,cAAc,CAAC,kBAAkB,CAAC;QAC3C;IACJ;AACJ"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { IMetaRepository } from "@webiny/app-utils";
|
|
2
|
-
import type { IListScheduledActionsGateway } from "../../../Gateways/index.js";
|
|
3
|
-
import { type ICancelScheduledActionGateway, type IGetScheduledActionGateway, type ISchedulePublishActionGateway, type IScheduleUnpublishActionGateway } from "../../../Gateways/index.js";
|
|
4
|
-
import { SchedulerItemsRepository } from "./SchedulerItemsRepository.js";
|
|
5
|
-
export interface ISchedulerItemsRepositoryFactoryGetParams {
|
|
6
|
-
metaRepository: IMetaRepository;
|
|
7
|
-
getGateway: IGetScheduledActionGateway;
|
|
8
|
-
listGateway: IListScheduledActionsGateway;
|
|
9
|
-
cancelGateway: ICancelScheduledActionGateway;
|
|
10
|
-
publishGateway: ISchedulePublishActionGateway;
|
|
11
|
-
unpublishGateway: IScheduleUnpublishActionGateway;
|
|
12
|
-
namespace: string;
|
|
13
|
-
}
|
|
14
|
-
export declare class SchedulerItemsRepositoryFactory {
|
|
15
|
-
private readonly cache;
|
|
16
|
-
getRepository(params: ISchedulerItemsRepositoryFactoryGetParams): SchedulerItemsRepository;
|
|
17
|
-
private getCacheKey;
|
|
18
|
-
}
|
|
19
|
-
export declare const schedulerItemsRepositoryFactory: SchedulerItemsRepositoryFactory;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { SchedulerItemsRepository } from "./SchedulerItemsRepository.js";
|
|
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();
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
const schedulerItemsRepositoryFactory = new SchedulerItemsRepositoryFactory();
|
|
16
|
-
export { SchedulerItemsRepositoryFactory, schedulerItemsRepositoryFactory };
|
|
17
|
-
|
|
18
|
-
//# sourceMappingURL=SchedulerItemsRepositoryFactory.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,17 +0,0 @@
|
|
|
1
|
-
import type { ILoadingRepository } from "@webiny/app-utils";
|
|
2
|
-
import type { ISchedulerItemsRepository } from "./ISchedulerItemsRepository.js";
|
|
3
|
-
import type { IGetScheduledActionGatewayExecuteParams, IListScheduledActionsGatewayExecuteParams } from "../../../Gateways/index.js";
|
|
4
|
-
export declare class SchedulerItemsRepositoryWithLoading implements ISchedulerItemsRepository {
|
|
5
|
-
private readonly loadingRepository;
|
|
6
|
-
private readonly schedulerItemsRepository;
|
|
7
|
-
constructor(loadingRepository: ILoadingRepository, schedulerItemsRepository: ISchedulerItemsRepository);
|
|
8
|
-
getItems(): import("../../index.js").SchedulerItem[];
|
|
9
|
-
getMeta(): import("@webiny/app-utils").Meta;
|
|
10
|
-
getLoading(): Record<string, boolean>;
|
|
11
|
-
getItem(params: Omit<IGetScheduledActionGatewayExecuteParams, "namespace">): Promise<void>;
|
|
12
|
-
listItems(params?: Omit<IListScheduledActionsGatewayExecuteParams, "namespace">): Promise<void>;
|
|
13
|
-
listMoreItems(): Promise<void>;
|
|
14
|
-
scheduleCancelItem(id: string): Promise<void>;
|
|
15
|
-
schedulePublishItem(id: string): Promise<void>;
|
|
16
|
-
scheduleUnpublishItem(id: string): Promise<void>;
|
|
17
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { makeAutoObservable } from "mobx";
|
|
2
|
-
import { LoadingActions } from "../../../types.js";
|
|
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
|
-
}
|
|
37
|
-
export { SchedulerItemsRepositoryWithLoading };
|
|
38
|
-
|
|
39
|
-
//# sourceMappingURL=SchedulerItemsRepositoryWithLoading.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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"}
|
|
File without changes
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { makeAutoObservable } from "mobx";
|
|
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
|
-
}
|
|
14
|
-
export { SearchRepository };
|
|
15
|
-
|
|
16
|
-
//# sourceMappingURL=SearchRepository.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,7 +0,0 @@
|
|
|
1
|
-
import { SearchRepository } from "./SearchRepository.js";
|
|
2
|
-
export declare class SearchRepositoryFactory {
|
|
3
|
-
private readonly cache;
|
|
4
|
-
getRepository(): SearchRepository;
|
|
5
|
-
private getCacheKey;
|
|
6
|
-
}
|
|
7
|
-
export declare const searchRepositoryFactory: SearchRepositoryFactory;
|