@webiny/app-scheduler 0.0.0-unstable.c27f4d8a31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Domain/Models/SchedulerItem/SchedulerItem.d.ts +13 -0
- package/Domain/Models/SchedulerItem/SchedulerItem.js +17 -0
- package/Domain/Models/SchedulerItem/SchedulerItem.js.map +1 -0
- package/Domain/Models/SchedulerItem/index.d.ts +1 -0
- package/Domain/Models/SchedulerItem/index.js +3 -0
- package/Domain/Models/SchedulerItem/index.js.map +1 -0
- package/Domain/Models/index.d.ts +1 -0
- package/Domain/Models/index.js +3 -0
- package/Domain/Models/index.js.map +1 -0
- package/Domain/Repositories/SchedulerItems/ISchedulerItemsRepository.d.ts +14 -0
- package/Domain/Repositories/SchedulerItems/ISchedulerItemsRepository.js +3 -0
- package/Domain/Repositories/SchedulerItems/ISchedulerItemsRepository.js.map +1 -0
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.d.ts +36 -0
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.js +128 -0
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.js.map +1 -0
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.d.ts +19 -0
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.js +17 -0
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.js.map +1 -0
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.d.ts +17 -0
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.js +38 -0
- package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.js.map +1 -0
- package/Domain/Repositories/SchedulerItems/index.d.ts +4 -0
- package/Domain/Repositories/SchedulerItems/index.js +5 -0
- package/Domain/Repositories/SchedulerItems/index.js.map +1 -0
- package/Domain/Repositories/Search/ISearchRepository.d.ts +4 -0
- package/Domain/Repositories/Search/ISearchRepository.js +3 -0
- package/Domain/Repositories/Search/ISearchRepository.js.map +1 -0
- package/Domain/Repositories/Search/SearchRepository.d.ts +7 -0
- package/Domain/Repositories/Search/SearchRepository.js +15 -0
- package/Domain/Repositories/Search/SearchRepository.js.map +1 -0
- package/Domain/Repositories/Search/SearchRepositoryFactory.d.ts +7 -0
- package/Domain/Repositories/Search/SearchRepositoryFactory.js +17 -0
- package/Domain/Repositories/Search/SearchRepositoryFactory.js.map +1 -0
- package/Domain/Repositories/Search/index.d.ts +3 -0
- package/Domain/Repositories/Search/index.js +4 -0
- package/Domain/Repositories/Search/index.js.map +1 -0
- package/Domain/Repositories/SelectedItems/ISelectedItemsRepository.d.ts +8 -0
- package/Domain/Repositories/SelectedItems/ISelectedItemsRepository.js +3 -0
- package/Domain/Repositories/SelectedItems/ISelectedItemsRepository.js.map +1 -0
- package/Domain/Repositories/SelectedItems/SelectedItemsRepository.d.ts +12 -0
- package/Domain/Repositories/SelectedItems/SelectedItemsRepository.js +27 -0
- package/Domain/Repositories/SelectedItems/SelectedItemsRepository.js.map +1 -0
- package/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.d.ts +7 -0
- package/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.js +17 -0
- package/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.js.map +1 -0
- package/Domain/Repositories/SelectedItems/index.d.ts +3 -0
- package/Domain/Repositories/SelectedItems/index.js +4 -0
- package/Domain/Repositories/SelectedItems/index.js.map +1 -0
- package/Domain/Repositories/Sorting/SortingRepositoryWithDefaults.d.ts +8 -0
- package/Domain/Repositories/Sorting/SortingRepositoryWithDefaults.js +22 -0
- package/Domain/Repositories/Sorting/SortingRepositoryWithDefaults.js.map +1 -0
- package/Domain/Repositories/Sorting/index.d.ts +1 -0
- package/Domain/Repositories/Sorting/index.js +3 -0
- package/Domain/Repositories/Sorting/index.js.map +1 -0
- package/Domain/Repositories/index.d.ts +4 -0
- package/Domain/Repositories/index.js +6 -0
- package/Domain/Repositories/index.js.map +1 -0
- package/Domain/index.d.ts +2 -0
- package/Domain/index.js +4 -0
- package/Domain/index.js.map +1 -0
- package/Gateways/SchedulerCancelGraphQLGateway.d.ts +7 -0
- package/Gateways/SchedulerCancelGraphQLGateway.js +48 -0
- package/Gateways/SchedulerCancelGraphQLGateway.js.map +1 -0
- package/Gateways/SchedulerGetGraphQLGateway.d.ts +21 -0
- package/Gateways/SchedulerGetGraphQLGateway.js +72 -0
- package/Gateways/SchedulerGetGraphQLGateway.js.map +1 -0
- package/Gateways/SchedulerListGraphQLGateway.d.ts +7 -0
- package/Gateways/SchedulerListGraphQLGateway.js +92 -0
- package/Gateways/SchedulerListGraphQLGateway.js.map +1 -0
- package/Gateways/SchedulerPublishGraphQLGateway.d.ts +7 -0
- package/Gateways/SchedulerPublishGraphQLGateway.js +67 -0
- package/Gateways/SchedulerPublishGraphQLGateway.js.map +1 -0
- package/Gateways/SchedulerUnpublishGraphQLGateway.d.ts +23 -0
- package/Gateways/SchedulerUnpublishGraphQLGateway.js +69 -0
- package/Gateways/SchedulerUnpublishGraphQLGateway.js.map +1 -0
- package/Gateways/abstractions/CancelScheduledActionGateway.d.ts +7 -0
- package/Gateways/abstractions/CancelScheduledActionGateway.js +3 -0
- package/Gateways/abstractions/CancelScheduledActionGateway.js.map +1 -0
- package/Gateways/abstractions/GetScheduledActionGateway.d.ts +9 -0
- package/Gateways/abstractions/GetScheduledActionGateway.js +3 -0
- package/Gateways/abstractions/GetScheduledActionGateway.js.map +1 -0
- package/Gateways/abstractions/ListScheduledActionsGateway.d.ts +27 -0
- package/Gateways/abstractions/ListScheduledActionsGateway.js +3 -0
- package/Gateways/abstractions/ListScheduledActionsGateway.js.map +1 -0
- package/Gateways/abstractions/SchedulePublishActionGateway.d.ts +12 -0
- package/Gateways/abstractions/SchedulePublishActionGateway.js +3 -0
- package/Gateways/abstractions/SchedulePublishActionGateway.js.map +1 -0
- package/Gateways/abstractions/ScheduleUnpublishActionGateway.d.ts +12 -0
- package/Gateways/abstractions/ScheduleUnpublishActionGateway.js +3 -0
- package/Gateways/abstractions/ScheduleUnpublishActionGateway.js.map +1 -0
- package/Gateways/graphql/fields.d.ts +1 -0
- package/Gateways/graphql/fields.js +18 -0
- package/Gateways/graphql/fields.js.map +1 -0
- package/Gateways/index.d.ts +5 -0
- package/Gateways/index.js +3 -0
- package/Gateways/index.js.map +1 -0
- package/Gateways/schema/schedulerEntry.d.ts +16 -0
- package/Gateways/schema/schedulerEntry.js +22 -0
- package/Gateways/schema/schedulerEntry.js.map +1 -0
- package/LICENSE +21 -0
- package/Presentation/Scheduler/Scheduler.d.ts +17 -0
- package/Presentation/Scheduler/Scheduler.js +67 -0
- package/Presentation/Scheduler/Scheduler.js.map +1 -0
- package/Presentation/Scheduler/SchedulerControllers.d.ts +30 -0
- package/Presentation/Scheduler/SchedulerControllers.js +72 -0
- package/Presentation/Scheduler/SchedulerControllers.js.map +1 -0
- package/Presentation/Scheduler/SchedulerPresenter.d.ts +32 -0
- package/Presentation/Scheduler/SchedulerPresenter.js +44 -0
- package/Presentation/Scheduler/SchedulerPresenter.js.map +1 -0
- package/Presentation/Scheduler/controllers/CancelItem/CancelItemController.d.ts +7 -0
- package/Presentation/Scheduler/controllers/CancelItem/CancelItemController.js +11 -0
- package/Presentation/Scheduler/controllers/CancelItem/CancelItemController.js.map +1 -0
- package/Presentation/Scheduler/controllers/CancelItem/ICancelItemController.d.ts +3 -0
- package/Presentation/Scheduler/controllers/CancelItem/ICancelItemController.js +3 -0
- package/Presentation/Scheduler/controllers/CancelItem/ICancelItemController.js.map +1 -0
- package/Presentation/Scheduler/controllers/CancelItem/index.d.ts +2 -0
- package/Presentation/Scheduler/controllers/CancelItem/index.js +3 -0
- package/Presentation/Scheduler/controllers/CancelItem/index.js.map +1 -0
- package/Presentation/Scheduler/controllers/GetItem/GetItemController.d.ts +8 -0
- package/Presentation/Scheduler/controllers/GetItem/GetItemController.js +11 -0
- package/Presentation/Scheduler/controllers/GetItem/GetItemController.js.map +1 -0
- package/Presentation/Scheduler/controllers/GetItem/IGetItemController.d.ts +4 -0
- package/Presentation/Scheduler/controllers/GetItem/IGetItemController.js +3 -0
- package/Presentation/Scheduler/controllers/GetItem/IGetItemController.js.map +1 -0
- package/Presentation/Scheduler/controllers/GetItem/index.d.ts +2 -0
- package/Presentation/Scheduler/controllers/GetItem/index.js +3 -0
- package/Presentation/Scheduler/controllers/GetItem/index.js.map +1 -0
- package/Presentation/Scheduler/controllers/ListItems/IListItemsController.d.ts +4 -0
- package/Presentation/Scheduler/controllers/ListItems/IListItemsController.js +3 -0
- package/Presentation/Scheduler/controllers/ListItems/IListItemsController.js.map +1 -0
- package/Presentation/Scheduler/controllers/ListItems/ListItemsController.d.ts +8 -0
- package/Presentation/Scheduler/controllers/ListItems/ListItemsController.js +11 -0
- package/Presentation/Scheduler/controllers/ListItems/ListItemsController.js.map +1 -0
- package/Presentation/Scheduler/controllers/ListItems/index.d.ts +2 -0
- package/Presentation/Scheduler/controllers/ListItems/index.js +3 -0
- package/Presentation/Scheduler/controllers/ListItems/index.js.map +1 -0
- package/Presentation/Scheduler/controllers/ListMoreItems/IListMoreItemsController.d.ts +3 -0
- package/Presentation/Scheduler/controllers/ListMoreItems/IListMoreItemsController.js +3 -0
- package/Presentation/Scheduler/controllers/ListMoreItems/IListMoreItemsController.js.map +1 -0
- package/Presentation/Scheduler/controllers/ListMoreItems/ListMoreItemsController.d.ts +7 -0
- package/Presentation/Scheduler/controllers/ListMoreItems/ListMoreItemsController.js +11 -0
- package/Presentation/Scheduler/controllers/ListMoreItems/ListMoreItemsController.js.map +1 -0
- package/Presentation/Scheduler/controllers/ListMoreItems/index.d.ts +2 -0
- package/Presentation/Scheduler/controllers/ListMoreItems/index.js +3 -0
- package/Presentation/Scheduler/controllers/ListMoreItems/index.js.map +1 -0
- package/Presentation/Scheduler/controllers/PublishItem/IPublishItemController.d.ts +3 -0
- package/Presentation/Scheduler/controllers/PublishItem/IPublishItemController.js +3 -0
- package/Presentation/Scheduler/controllers/PublishItem/IPublishItemController.js.map +1 -0
- package/Presentation/Scheduler/controllers/PublishItem/PublishItemController.d.ts +7 -0
- package/Presentation/Scheduler/controllers/PublishItem/PublishItemController.js +11 -0
- package/Presentation/Scheduler/controllers/PublishItem/PublishItemController.js.map +1 -0
- package/Presentation/Scheduler/controllers/PublishItem/index.d.ts +2 -0
- package/Presentation/Scheduler/controllers/PublishItem/index.js +3 -0
- package/Presentation/Scheduler/controllers/PublishItem/index.js.map +1 -0
- package/Presentation/Scheduler/controllers/SearchItems/ISearchItemsController.d.ts +3 -0
- package/Presentation/Scheduler/controllers/SearchItems/ISearchItemsController.js +3 -0
- package/Presentation/Scheduler/controllers/SearchItems/ISearchItemsController.js.map +1 -0
- package/Presentation/Scheduler/controllers/SearchItems/SearchItemsController.d.ts +8 -0
- package/Presentation/Scheduler/controllers/SearchItems/SearchItemsController.js +14 -0
- package/Presentation/Scheduler/controllers/SearchItems/SearchItemsController.js.map +1 -0
- package/Presentation/Scheduler/controllers/SearchItems/index.d.ts +2 -0
- package/Presentation/Scheduler/controllers/SearchItems/index.js +3 -0
- package/Presentation/Scheduler/controllers/SearchItems/index.js.map +1 -0
- package/Presentation/Scheduler/controllers/SelectAllItems/ISelectAllItemsController.d.ts +3 -0
- package/Presentation/Scheduler/controllers/SelectAllItems/ISelectAllItemsController.js +3 -0
- package/Presentation/Scheduler/controllers/SelectAllItems/ISelectAllItemsController.js.map +1 -0
- package/Presentation/Scheduler/controllers/SelectAllItems/SelectAllItemsController.d.ts +7 -0
- package/Presentation/Scheduler/controllers/SelectAllItems/SelectAllItemsController.js +11 -0
- package/Presentation/Scheduler/controllers/SelectAllItems/SelectAllItemsController.js.map +1 -0
- package/Presentation/Scheduler/controllers/SelectAllItems/index.d.ts +2 -0
- package/Presentation/Scheduler/controllers/SelectAllItems/index.js +3 -0
- package/Presentation/Scheduler/controllers/SelectAllItems/index.js.map +1 -0
- package/Presentation/Scheduler/controllers/SelectItems/ISelectItemsController.d.ts +4 -0
- package/Presentation/Scheduler/controllers/SelectItems/ISelectItemsController.js +3 -0
- package/Presentation/Scheduler/controllers/SelectItems/ISelectItemsController.js.map +1 -0
- package/Presentation/Scheduler/controllers/SelectItems/SelectItemsController.d.ts +8 -0
- package/Presentation/Scheduler/controllers/SelectItems/SelectItemsController.js +13 -0
- package/Presentation/Scheduler/controllers/SelectItems/SelectItemsController.js.map +1 -0
- package/Presentation/Scheduler/controllers/SelectItems/index.d.ts +2 -0
- package/Presentation/Scheduler/controllers/SelectItems/index.js +3 -0
- package/Presentation/Scheduler/controllers/SelectItems/index.js.map +1 -0
- package/Presentation/Scheduler/controllers/SortItems/ISortItemsController.d.ts +4 -0
- package/Presentation/Scheduler/controllers/SortItems/ISortItemsController.js +3 -0
- package/Presentation/Scheduler/controllers/SortItems/ISortItemsController.js.map +1 -0
- package/Presentation/Scheduler/controllers/SortItems/SortItemsController.d.ts +9 -0
- package/Presentation/Scheduler/controllers/SortItems/SortItemsController.js +19 -0
- package/Presentation/Scheduler/controllers/SortItems/SortItemsController.js.map +1 -0
- package/Presentation/Scheduler/controllers/SortItems/index.d.ts +2 -0
- package/Presentation/Scheduler/controllers/SortItems/index.js +3 -0
- package/Presentation/Scheduler/controllers/SortItems/index.js.map +1 -0
- package/Presentation/Scheduler/controllers/UnpublishItem/IUnpublishItemController.d.ts +3 -0
- package/Presentation/Scheduler/controllers/UnpublishItem/IUnpublishItemController.js +3 -0
- package/Presentation/Scheduler/controllers/UnpublishItem/IUnpublishItemController.js.map +1 -0
- package/Presentation/Scheduler/controllers/UnpublishItem/UnpublishItemController.d.ts +7 -0
- package/Presentation/Scheduler/controllers/UnpublishItem/UnpublishItemController.js +11 -0
- package/Presentation/Scheduler/controllers/UnpublishItem/UnpublishItemController.js.map +1 -0
- package/Presentation/Scheduler/controllers/UnpublishItem/index.d.ts +2 -0
- package/Presentation/Scheduler/controllers/UnpublishItem/index.js +3 -0
- package/Presentation/Scheduler/controllers/UnpublishItem/index.js.map +1 -0
- package/Presentation/Scheduler/controllers/UnselectAllItems/IUnselectAllItemsController.d.ts +3 -0
- package/Presentation/Scheduler/controllers/UnselectAllItems/IUnselectAllItemsController.js +3 -0
- package/Presentation/Scheduler/controllers/UnselectAllItems/IUnselectAllItemsController.js.map +1 -0
- package/Presentation/Scheduler/controllers/UnselectAllItems/UnselectAllItemsController.d.ts +7 -0
- package/Presentation/Scheduler/controllers/UnselectAllItems/UnselectAllItemsController.js +11 -0
- package/Presentation/Scheduler/controllers/UnselectAllItems/UnselectAllItemsController.js.map +1 -0
- package/Presentation/Scheduler/controllers/UnselectAllItems/index.d.ts +2 -0
- package/Presentation/Scheduler/controllers/UnselectAllItems/index.js +3 -0
- package/Presentation/Scheduler/controllers/UnselectAllItems/index.js.map +1 -0
- package/Presentation/Scheduler/controllers/index.d.ts +11 -0
- package/Presentation/Scheduler/controllers/index.js +13 -0
- package/Presentation/Scheduler/controllers/index.js.map +1 -0
- package/Presentation/Scheduler/index.d.ts +1 -0
- package/Presentation/Scheduler/index.js +3 -0
- package/Presentation/Scheduler/index.js.map +1 -0
- package/Presentation/SchedulerConfigs/SchedulerConfigs.d.ts +2 -0
- package/Presentation/SchedulerConfigs/SchedulerConfigs.js +55 -0
- package/Presentation/SchedulerConfigs/SchedulerConfigs.js.map +1 -0
- package/Presentation/SchedulerConfigs/index.d.ts +1 -0
- package/Presentation/SchedulerConfigs/index.js +3 -0
- package/Presentation/SchedulerConfigs/index.js.map +1 -0
- package/Presentation/SchedulerRenderer/SchedulerRenderer.d.ts +6 -0
- package/Presentation/SchedulerRenderer/SchedulerRenderer.js +21 -0
- package/Presentation/SchedulerRenderer/SchedulerRenderer.js.map +1 -0
- package/Presentation/SchedulerRenderer/index.d.ts +1 -0
- package/Presentation/SchedulerRenderer/index.js +3 -0
- package/Presentation/SchedulerRenderer/index.js.map +1 -0
- package/Presentation/abstractions/ISchedulerControllers.d.ts +14 -0
- package/Presentation/abstractions/ISchedulerControllers.js +3 -0
- package/Presentation/abstractions/ISchedulerControllers.js.map +1 -0
- package/Presentation/abstractions/ISchedulerPresenter.d.ts +20 -0
- package/Presentation/abstractions/ISchedulerPresenter.js +3 -0
- package/Presentation/abstractions/ISchedulerPresenter.js.map +1 -0
- package/Presentation/abstractions/index.d.ts +2 -0
- package/Presentation/abstractions/index.js +3 -0
- package/Presentation/abstractions/index.js.map +1 -0
- package/Presentation/components/Actions/CancelItem/CancelItem.d.ts +2 -0
- package/Presentation/components/Actions/CancelItem/CancelItem.js +24 -0
- package/Presentation/components/Actions/CancelItem/CancelItem.js.map +1 -0
- package/Presentation/components/Actions/CancelItem/index.d.ts +1 -0
- package/Presentation/components/Actions/CancelItem/index.js +3 -0
- package/Presentation/components/Actions/CancelItem/index.js.map +1 -0
- package/Presentation/components/Actions/index.d.ts +1 -0
- package/Presentation/components/Actions/index.js +3 -0
- package/Presentation/components/Actions/index.js.map +1 -0
- package/Presentation/components/BottomInfoBar/BottomInfoBar.d.ts +2 -0
- package/Presentation/components/BottomInfoBar/BottomInfoBar.js +20 -0
- package/Presentation/components/BottomInfoBar/BottomInfoBar.js.map +1 -0
- package/Presentation/components/BottomInfoBar/BottomInfoBar.styled.d.ts +20 -0
- package/Presentation/components/BottomInfoBar/BottomInfoBar.styled.js +69 -0
- package/Presentation/components/BottomInfoBar/BottomInfoBar.styled.js.map +1 -0
- package/Presentation/components/BottomInfoBar/ListMeta.d.ts +7 -0
- package/Presentation/components/BottomInfoBar/ListMeta.js +12 -0
- package/Presentation/components/BottomInfoBar/ListMeta.js.map +1 -0
- package/Presentation/components/BottomInfoBar/ListStatus.d.ts +5 -0
- package/Presentation/components/BottomInfoBar/ListStatus.js +16 -0
- package/Presentation/components/BottomInfoBar/ListStatus.js.map +1 -0
- package/Presentation/components/BottomInfoBar/index.d.ts +1 -0
- package/Presentation/components/BottomInfoBar/index.js +3 -0
- package/Presentation/components/BottomInfoBar/index.js.map +1 -0
- package/Presentation/components/Cells/CellActions/CellActions.d.ts +2 -0
- package/Presentation/components/Cells/CellActions/CellActions.js +23 -0
- package/Presentation/components/Cells/CellActions/CellActions.js.map +1 -0
- package/Presentation/components/Cells/CellActions/index.d.ts +1 -0
- package/Presentation/components/Cells/CellActions/index.js +3 -0
- package/Presentation/components/Cells/CellActions/index.js.map +1 -0
- package/Presentation/components/Cells/CellRevision/CellRevision.d.ts +2 -0
- package/Presentation/components/Cells/CellRevision/CellRevision.js +20 -0
- package/Presentation/components/Cells/CellRevision/CellRevision.js.map +1 -0
- package/Presentation/components/Cells/CellRevision/CellRevision.styled.d.ts +11 -0
- package/Presentation/components/Cells/CellRevision/CellRevision.styled.js +44 -0
- package/Presentation/components/Cells/CellRevision/CellRevision.styled.js.map +1 -0
- package/Presentation/components/Cells/CellRevision/index.d.ts +1 -0
- package/Presentation/components/Cells/CellRevision/index.js +3 -0
- package/Presentation/components/Cells/CellRevision/index.js.map +1 -0
- package/Presentation/components/Cells/CellScheduledBy/CellScheduledBy.d.ts +2 -0
- package/Presentation/components/Cells/CellScheduledBy/CellScheduledBy.js +13 -0
- package/Presentation/components/Cells/CellScheduledBy/CellScheduledBy.js.map +1 -0
- package/Presentation/components/Cells/CellScheduledBy/index.d.ts +1 -0
- package/Presentation/components/Cells/CellScheduledBy/index.js +3 -0
- package/Presentation/components/Cells/CellScheduledBy/index.js.map +1 -0
- package/Presentation/components/Cells/CellScheduledOn/CellScheduledOn.d.ts +24 -0
- package/Presentation/components/Cells/CellScheduledOn/CellScheduledOn.js +24 -0
- package/Presentation/components/Cells/CellScheduledOn/CellScheduledOn.js.map +1 -0
- package/Presentation/components/Cells/CellScheduledOn/index.d.ts +1 -0
- package/Presentation/components/Cells/CellScheduledOn/index.js +3 -0
- package/Presentation/components/Cells/CellScheduledOn/index.js.map +1 -0
- package/Presentation/components/Cells/CellTitle/CellTitle.d.ts +2 -0
- package/Presentation/components/Cells/CellTitle/CellTitle.js +17 -0
- package/Presentation/components/Cells/CellTitle/CellTitle.js.map +1 -0
- package/Presentation/components/Cells/CellTitle/CellTitle.styled.d.ts +11 -0
- package/Presentation/components/Cells/CellTitle/CellTitle.styled.js +44 -0
- package/Presentation/components/Cells/CellTitle/CellTitle.styled.js.map +1 -0
- package/Presentation/components/Cells/CellTitle/index.d.ts +1 -0
- package/Presentation/components/Cells/CellTitle/index.js +3 -0
- package/Presentation/components/Cells/CellTitle/index.js.map +1 -0
- package/Presentation/components/Cells/CellType/CellActionType.d.ts +2 -0
- package/Presentation/components/Cells/CellType/CellActionType.js +18 -0
- package/Presentation/components/Cells/CellType/CellActionType.js.map +1 -0
- package/Presentation/components/Cells/CellType/CellActionType.styled.d.ts +11 -0
- package/Presentation/components/Cells/CellType/CellActionType.styled.js +44 -0
- package/Presentation/components/Cells/CellType/CellActionType.styled.js.map +1 -0
- package/Presentation/components/Cells/CellType/index.d.ts +1 -0
- package/Presentation/components/Cells/CellType/index.js +3 -0
- package/Presentation/components/Cells/CellType/index.js.map +1 -0
- package/Presentation/components/Cells/index.d.ts +6 -0
- package/Presentation/components/Cells/index.js +8 -0
- package/Presentation/components/Cells/index.js.map +1 -0
- package/Presentation/components/Empty/Empty.d.ts +2 -0
- package/Presentation/components/Empty/Empty.js +22 -0
- package/Presentation/components/Empty/Empty.js.map +1 -0
- package/Presentation/components/Empty/Empty.styled.d.ts +8 -0
- package/Presentation/components/Empty/Empty.styled.js +30 -0
- package/Presentation/components/Empty/Empty.styled.js.map +1 -0
- package/Presentation/components/Empty/index.d.ts +1 -0
- package/Presentation/components/Empty/index.js +3 -0
- package/Presentation/components/Empty/index.js.map +1 -0
- package/Presentation/components/ScheduleDialog/ScheduleDialogAction.d.ts +15 -0
- package/Presentation/components/ScheduleDialog/ScheduleDialogAction.js +51 -0
- package/Presentation/components/ScheduleDialog/ScheduleDialogAction.js.map +1 -0
- package/Presentation/components/ScheduleDialog/index.d.ts +2 -0
- package/Presentation/components/ScheduleDialog/index.js +4 -0
- package/Presentation/components/ScheduleDialog/index.js.map +1 -0
- package/Presentation/components/ScheduleDialog/types.d.ts +15 -0
- package/Presentation/components/ScheduleDialog/types.js +3 -0
- package/Presentation/components/ScheduleDialog/types.js.map +1 -0
- package/Presentation/components/ScheduleDialog/useGetScheduledAction.d.ts +7 -0
- package/Presentation/components/ScheduleDialog/useGetScheduledAction.js +31 -0
- package/Presentation/components/ScheduleDialog/useGetScheduledAction.js.map +1 -0
- package/Presentation/components/ScheduleDialog/useScheduleDialog.d.ts +42 -0
- package/Presentation/components/ScheduleDialog/useScheduleDialog.js +221 -0
- package/Presentation/components/ScheduleDialog/useScheduleDialog.js.map +1 -0
- package/Presentation/components/SchedulerOverlay/SchedulerOverlay.d.ts +7 -0
- package/Presentation/components/SchedulerOverlay/SchedulerOverlay.js +36 -0
- package/Presentation/components/SchedulerOverlay/SchedulerOverlay.js.map +1 -0
- package/Presentation/components/SchedulerOverlay/index.d.ts +1 -0
- package/Presentation/components/SchedulerOverlay/index.js +3 -0
- package/Presentation/components/SchedulerOverlay/index.js.map +1 -0
- package/Presentation/components/SearchInput/SearchInput.d.ts +2 -0
- package/Presentation/components/SearchInput/SearchInput.js +37 -0
- package/Presentation/components/SearchInput/SearchInput.js.map +1 -0
- package/Presentation/components/SearchInput/index.d.ts +1 -0
- package/Presentation/components/SearchInput/index.js +3 -0
- package/Presentation/components/SearchInput/index.js.map +1 -0
- package/Presentation/components/Table/Table.d.ts +2 -0
- package/Presentation/components/Table/Table.js +34 -0
- package/Presentation/components/Table/Table.js.map +1 -0
- package/Presentation/components/Table/index.d.ts +1 -0
- package/Presentation/components/Table/index.js +3 -0
- package/Presentation/components/Table/index.js.map +1 -0
- package/Presentation/components/Title/Title.d.ts +5 -0
- package/Presentation/components/Title/Title.js +15 -0
- package/Presentation/components/Title/Title.js.map +1 -0
- package/Presentation/components/Title/Title.styled.d.ts +4 -0
- package/Presentation/components/Title/Title.styled.js +18 -0
- package/Presentation/components/Title/Title.styled.js.map +1 -0
- package/Presentation/components/Title/index.d.ts +1 -0
- package/Presentation/components/Title/index.js +3 -0
- package/Presentation/components/Title/index.js.map +1 -0
- package/Presentation/configs/index.d.ts +1 -0
- package/Presentation/configs/index.js +3 -0
- package/Presentation/configs/index.js.map +1 -0
- package/Presentation/configs/list/Browser/EntryAction.d.ts +7 -0
- package/Presentation/configs/list/Browser/EntryAction.js +16 -0
- package/Presentation/configs/list/Browser/EntryAction.js.map +1 -0
- package/Presentation/configs/list/Browser/Table/Column.d.ts +14 -0
- package/Presentation/configs/list/Browser/Table/Column.js +14 -0
- package/Presentation/configs/list/Browser/Table/Column.js.map +1 -0
- package/Presentation/configs/list/Browser/Table/Sorting.d.ts +5 -0
- package/Presentation/configs/list/Browser/Table/Sorting.js +10 -0
- package/Presentation/configs/list/Browser/Table/Sorting.js.map +1 -0
- package/Presentation/configs/list/Browser/Table/index.d.ts +18 -0
- package/Presentation/configs/list/Browser/Table/index.js +8 -0
- package/Presentation/configs/list/Browser/Table/index.js.map +1 -0
- package/Presentation/configs/list/Browser/index.d.ts +23 -0
- package/Presentation/configs/list/Browser/index.js +8 -0
- package/Presentation/configs/list/Browser/index.js.map +1 -0
- package/Presentation/configs/list/SchedulerListConfig.d.ts +33 -0
- package/Presentation/configs/list/SchedulerListConfig.js +31 -0
- package/Presentation/configs/list/SchedulerListConfig.js.map +1 -0
- package/Presentation/configs/list/index.d.ts +1 -0
- package/Presentation/configs/list/index.js +3 -0
- package/Presentation/configs/list/index.js.map +1 -0
- package/Presentation/hooks/index.d.ts +3 -0
- package/Presentation/hooks/index.js +5 -0
- package/Presentation/hooks/index.js.map +1 -0
- package/Presentation/hooks/useCancelSchedulerItem.d.ts +8 -0
- package/Presentation/hooks/useCancelSchedulerItem.js +32 -0
- package/Presentation/hooks/useCancelSchedulerItem.js.map +1 -0
- package/Presentation/hooks/useScheduler.d.ts +28 -0
- package/Presentation/hooks/useScheduler.js +52 -0
- package/Presentation/hooks/useScheduler.js.map +1 -0
- package/Presentation/hooks/useSchedulerItem.d.ts +11 -0
- package/Presentation/hooks/useSchedulerItem.js +9 -0
- package/Presentation/hooks/useSchedulerItem.js.map +1 -0
- package/Presentation/index.d.ts +25 -0
- package/Presentation/index.js +56 -0
- package/Presentation/index.js.map +1 -0
- package/README.md +11 -0
- package/UseCases/CancelItem/CancelItemUseCase.d.ts +7 -0
- package/UseCases/CancelItem/CancelItemUseCase.js +12 -0
- package/UseCases/CancelItem/CancelItemUseCase.js.map +1 -0
- package/UseCases/CancelItem/ICancelItemUseCase.d.ts +3 -0
- package/UseCases/CancelItem/ICancelItemUseCase.js +3 -0
- package/UseCases/CancelItem/ICancelItemUseCase.js.map +1 -0
- package/UseCases/CancelItem/index.d.ts +2 -0
- package/UseCases/CancelItem/index.js +3 -0
- package/UseCases/CancelItem/index.js.map +1 -0
- package/UseCases/GetItem/GetItemUseCase.d.ts +8 -0
- package/UseCases/GetItem/GetItemUseCase.js +12 -0
- package/UseCases/GetItem/GetItemUseCase.js.map +1 -0
- package/UseCases/GetItem/IGetItemUseCase.d.ts +4 -0
- package/UseCases/GetItem/IGetItemUseCase.js +3 -0
- package/UseCases/GetItem/IGetItemUseCase.js.map +1 -0
- package/UseCases/GetItem/index.d.ts +2 -0
- package/UseCases/GetItem/index.js +3 -0
- package/UseCases/GetItem/index.js.map +1 -0
- package/UseCases/GetScheduledItem/GetScheduledItemUseCase.d.ts +7 -0
- package/UseCases/GetScheduledItem/GetScheduledItemUseCase.js +13 -0
- package/UseCases/GetScheduledItem/GetScheduledItemUseCase.js.map +1 -0
- package/UseCases/GetScheduledItem/IGetScheduledItemUseCase.d.ts +4 -0
- package/UseCases/GetScheduledItem/IGetScheduledItemUseCase.js +3 -0
- package/UseCases/GetScheduledItem/IGetScheduledItemUseCase.js.map +1 -0
- package/UseCases/GetScheduledItem/index.d.ts +2 -0
- package/UseCases/GetScheduledItem/index.js +3 -0
- package/UseCases/GetScheduledItem/index.js.map +1 -0
- package/UseCases/ListItems/IListItemsUseCase.d.ts +4 -0
- package/UseCases/ListItems/IListItemsUseCase.js +3 -0
- package/UseCases/ListItems/IListItemsUseCase.js.map +1 -0
- package/UseCases/ListItems/ListItemsUseCase.d.ts +8 -0
- package/UseCases/ListItems/ListItemsUseCase.js +12 -0
- package/UseCases/ListItems/ListItemsUseCase.js.map +1 -0
- package/UseCases/ListItems/ListItemsUseCaseWithSearch.d.ts +9 -0
- package/UseCases/ListItems/ListItemsUseCaseWithSearch.js +22 -0
- package/UseCases/ListItems/ListItemsUseCaseWithSearch.js.map +1 -0
- package/UseCases/ListItems/ListItemsUseCaseWithSorting.d.ts +9 -0
- package/UseCases/ListItems/ListItemsUseCaseWithSorting.js +22 -0
- package/UseCases/ListItems/ListItemsUseCaseWithSorting.js.map +1 -0
- package/UseCases/ListItems/index.d.ts +4 -0
- package/UseCases/ListItems/index.js +5 -0
- package/UseCases/ListItems/index.js.map +1 -0
- package/UseCases/ListMoreItems/IListMoreItemsUseCase.d.ts +3 -0
- package/UseCases/ListMoreItems/IListMoreItemsUseCase.js +3 -0
- package/UseCases/ListMoreItems/IListMoreItemsUseCase.js.map +1 -0
- package/UseCases/ListMoreItems/ListMoreItemsUseCase.d.ts +7 -0
- package/UseCases/ListMoreItems/ListMoreItemsUseCase.js +12 -0
- package/UseCases/ListMoreItems/ListMoreItemsUseCase.js.map +1 -0
- package/UseCases/ListMoreItems/index.d.ts +2 -0
- package/UseCases/ListMoreItems/index.js +3 -0
- package/UseCases/ListMoreItems/index.js.map +1 -0
- package/UseCases/PublishItem/IPublishItemUseCase.d.ts +3 -0
- package/UseCases/PublishItem/IPublishItemUseCase.js +3 -0
- package/UseCases/PublishItem/IPublishItemUseCase.js.map +1 -0
- package/UseCases/PublishItem/PublishItemUseCase.d.ts +7 -0
- package/UseCases/PublishItem/PublishItemUseCase.js +12 -0
- package/UseCases/PublishItem/PublishItemUseCase.js.map +1 -0
- package/UseCases/PublishItem/index.d.ts +2 -0
- package/UseCases/PublishItem/index.js +3 -0
- package/UseCases/PublishItem/index.js.map +1 -0
- package/UseCases/SearchItems/ISearchItemsUseCase.d.ts +3 -0
- package/UseCases/SearchItems/ISearchItemsUseCase.js +3 -0
- package/UseCases/SearchItems/ISearchItemsUseCase.js.map +1 -0
- package/UseCases/SearchItems/SearchItemsUseCase.d.ts +7 -0
- package/UseCases/SearchItems/SearchItemsUseCase.js +12 -0
- package/UseCases/SearchItems/SearchItemsUseCase.js.map +1 -0
- package/UseCases/SearchItems/index.d.ts +2 -0
- package/UseCases/SearchItems/index.js +3 -0
- package/UseCases/SearchItems/index.js.map +1 -0
- package/UseCases/SelectAllItems/ISelectAllItemsUseCase.d.ts +3 -0
- package/UseCases/SelectAllItems/ISelectAllItemsUseCase.js +3 -0
- package/UseCases/SelectAllItems/ISelectAllItemsUseCase.js.map +1 -0
- package/UseCases/SelectAllItems/SelectAllItemsUseCase.d.ts +7 -0
- package/UseCases/SelectAllItems/SelectAllItemsUseCase.js +12 -0
- package/UseCases/SelectAllItems/SelectAllItemsUseCase.js.map +1 -0
- package/UseCases/SelectAllItems/index.d.ts +2 -0
- package/UseCases/SelectAllItems/index.js +3 -0
- package/UseCases/SelectAllItems/index.js.map +1 -0
- package/UseCases/SelectItems/ISelectItemsUseCase.d.ts +4 -0
- package/UseCases/SelectItems/ISelectItemsUseCase.js +3 -0
- package/UseCases/SelectItems/ISelectItemsUseCase.js.map +1 -0
- package/UseCases/SelectItems/SelectItemsUseCase.d.ts +7 -0
- package/UseCases/SelectItems/SelectItemsUseCase.js +12 -0
- package/UseCases/SelectItems/SelectItemsUseCase.js.map +1 -0
- package/UseCases/SelectItems/index.d.ts +2 -0
- package/UseCases/SelectItems/index.js +3 -0
- package/UseCases/SelectItems/index.js.map +1 -0
- package/UseCases/SortItems/ISortItemsUseCase.d.ts +4 -0
- package/UseCases/SortItems/ISortItemsUseCase.js +3 -0
- package/UseCases/SortItems/ISortItemsUseCase.js.map +1 -0
- package/UseCases/SortItems/SortItemsUseCase.d.ts +7 -0
- package/UseCases/SortItems/SortItemsUseCase.js +12 -0
- package/UseCases/SortItems/SortItemsUseCase.js.map +1 -0
- package/UseCases/SortItems/index.d.ts +2 -0
- package/UseCases/SortItems/index.js +3 -0
- package/UseCases/SortItems/index.js.map +1 -0
- package/UseCases/UnSelectAllItems/IUnselectAllItemsUseCase.d.ts +3 -0
- package/UseCases/UnSelectAllItems/IUnselectAllItemsUseCase.js +3 -0
- package/UseCases/UnSelectAllItems/IUnselectAllItemsUseCase.js.map +1 -0
- package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.d.ts +7 -0
- package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.js +12 -0
- package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.js.map +1 -0
- package/UseCases/UnSelectAllItems/index.d.ts +2 -0
- package/UseCases/UnSelectAllItems/index.js +3 -0
- package/UseCases/UnSelectAllItems/index.js.map +1 -0
- package/UseCases/UnpublishItem/IUnpublishItemUseCase.d.ts +3 -0
- package/UseCases/UnpublishItem/IUnpublishItemUseCase.js +3 -0
- package/UseCases/UnpublishItem/IUnpublishItemUseCase.js.map +1 -0
- package/UseCases/UnpublishItem/UnpublishItemUseCase.d.ts +7 -0
- package/UseCases/UnpublishItem/UnpublishItemUseCase.js +12 -0
- package/UseCases/UnpublishItem/UnpublishItemUseCase.js.map +1 -0
- package/UseCases/UnpublishItem/index.d.ts +2 -0
- package/UseCases/UnpublishItem/index.js +3 -0
- package/UseCases/UnpublishItem/index.js.map +1 -0
- package/UseCases/index.d.ts +11 -0
- package/UseCases/index.js +13 -0
- package/UseCases/index.js.map +1 -0
- package/index.d.ts +1 -0
- package/index.js +3 -0
- package/index.js.map +1 -0
- package/package.json +55 -0
- package/types.d.ts +37 -0
- package/types.js +15 -0
- package/types.js.map +1 -0
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ScheduleActionType } from "../../../types.js";
|
|
2
|
+
export interface IScheduleDialogScheduledActionExecuteParams {
|
|
3
|
+
targetId: string;
|
|
4
|
+
namespace: string;
|
|
5
|
+
scheduleOn: Date;
|
|
6
|
+
actionType: ScheduleActionType;
|
|
7
|
+
}
|
|
8
|
+
export interface IScheduleDialogCancelActionExecuteParams {
|
|
9
|
+
id: string;
|
|
10
|
+
namespace: string;
|
|
11
|
+
}
|
|
12
|
+
export interface IScheduleDialogAction {
|
|
13
|
+
schedule(params: IScheduleDialogScheduledActionExecuteParams): Promise<void>;
|
|
14
|
+
cancel(params: IScheduleDialogCancelActionExecuteParams): Promise<void>;
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { ScheduleActionType } from \"~/types.js\";\n\nexport interface IScheduleDialogScheduledActionExecuteParams {\n targetId: string;\n namespace: string;\n scheduleOn: Date;\n actionType: ScheduleActionType;\n}\n\nexport interface IScheduleDialogCancelActionExecuteParams {\n id: string;\n namespace: string;\n}\n\nexport interface IScheduleDialogAction {\n schedule(params: IScheduleDialogScheduledActionExecuteParams): Promise<void>;\n cancel(params: IScheduleDialogCancelActionExecuteParams): Promise<void>;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { IGetScheduledActionGateway, IGetScheduledActionGatewayResponse } from "../../../Gateways/index.js";
|
|
2
|
+
export interface IGetScheduledActionParams {
|
|
3
|
+
namespace: string;
|
|
4
|
+
id: string;
|
|
5
|
+
gateway: IGetScheduledActionGateway;
|
|
6
|
+
}
|
|
7
|
+
export declare const useGetScheduledAction: (params: IGetScheduledActionParams) => IGetScheduledActionGatewayResponse | null;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { useEffect, useState } from "react";
|
|
2
|
+
import { useSnackbar } from "@webiny/app-admin";
|
|
3
|
+
export const useGetScheduledAction = params => {
|
|
4
|
+
const {
|
|
5
|
+
gateway,
|
|
6
|
+
namespace,
|
|
7
|
+
id
|
|
8
|
+
} = params;
|
|
9
|
+
const {
|
|
10
|
+
showSnackbar
|
|
11
|
+
} = useSnackbar();
|
|
12
|
+
const [response, setResponse] = useState(null);
|
|
13
|
+
useEffect(() => {
|
|
14
|
+
const fetchData = async () => {
|
|
15
|
+
try {
|
|
16
|
+
const data = await gateway.execute({
|
|
17
|
+
namespace,
|
|
18
|
+
id
|
|
19
|
+
});
|
|
20
|
+
setResponse(data);
|
|
21
|
+
} catch (err) {
|
|
22
|
+
console.error(err);
|
|
23
|
+
showSnackbar(err.message);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
fetchData();
|
|
27
|
+
}, []);
|
|
28
|
+
return response;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
//# sourceMappingURL=useGetScheduledAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useEffect","useState","useSnackbar","useGetScheduledAction","params","gateway","namespace","id","showSnackbar","response","setResponse","fetchData","data","execute","err","console","error","message"],"sources":["useGetScheduledAction.ts"],"sourcesContent":["import type {\n IGetScheduledActionGateway,\n IGetScheduledActionGatewayResponse\n} from \"~/Gateways/index.js\";\nimport { useEffect, useState } from \"react\";\nimport { useSnackbar } from \"@webiny/app-admin\";\n\nexport interface IGetScheduledActionParams {\n namespace: string;\n id: string;\n gateway: IGetScheduledActionGateway;\n}\n\nexport const useGetScheduledAction = (\n params: IGetScheduledActionParams\n): IGetScheduledActionGatewayResponse | null => {\n const { gateway, namespace, id } = params;\n\n const { showSnackbar } = useSnackbar();\n\n const [response, setResponse] = useState<IGetScheduledActionGatewayResponse | null>(null);\n\n useEffect(() => {\n const fetchData = async () => {\n try {\n const data = await gateway.execute({\n namespace,\n id\n });\n setResponse(data);\n } catch (err) {\n console.error(err);\n showSnackbar(err.message);\n }\n };\n fetchData();\n }, []);\n\n return response;\n};\n"],"mappings":"AAIA,SAASA,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAC3C,SAASC,WAAW,QAAQ,mBAAmB;AAQ/C,OAAO,MAAMC,qBAAqB,GAC9BC,MAAiC,IACW;EAC5C,MAAM;IAAEC,OAAO;IAAEC,SAAS;IAAEC;EAAG,CAAC,GAAGH,MAAM;EAEzC,MAAM;IAAEI;EAAa,CAAC,GAAGN,WAAW,CAAC,CAAC;EAEtC,MAAM,CAACO,QAAQ,EAAEC,WAAW,CAAC,GAAGT,QAAQ,CAA4C,IAAI,CAAC;EAEzFD,SAAS,CAAC,MAAM;IACZ,MAAMW,SAAS,GAAG,MAAAA,CAAA,KAAY;MAC1B,IAAI;QACA,MAAMC,IAAI,GAAG,MAAMP,OAAO,CAACQ,OAAO,CAAC;UAC/BP,SAAS;UACTC;QACJ,CAAC,CAAC;QACFG,WAAW,CAACE,IAAI,CAAC;MACrB,CAAC,CAAC,OAAOE,GAAG,EAAE;QACVC,OAAO,CAACC,KAAK,CAACF,GAAG,CAAC;QAClBN,YAAY,CAACM,GAAG,CAACG,OAAO,CAAC;MAC7B;IACJ,CAAC;IACDN,SAAS,CAAC,CAAC;EACf,CAAC,EAAE,EAAE,CAAC;EAEN,OAAOF,QAAQ;AACnB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { type BindComponentRenderProp } from "@webiny/form";
|
|
3
|
+
import type { CmsContentEntryStatusType } from "@webiny/app-headless-cms-common/types/index.js";
|
|
4
|
+
import ApolloClient from "apollo-client/ApolloClient.js";
|
|
5
|
+
export type ShowDialogParamsEntryStatus = CmsContentEntryStatusType;
|
|
6
|
+
export interface IShowDialogParamsEntry {
|
|
7
|
+
id: string;
|
|
8
|
+
status: ShowDialogParamsEntryStatus;
|
|
9
|
+
title: string;
|
|
10
|
+
}
|
|
11
|
+
interface UseShowScheduleDialogResponse {
|
|
12
|
+
showDialog: () => void;
|
|
13
|
+
}
|
|
14
|
+
export interface ISchedulerDialogFormComponentDateTimeInputProps {
|
|
15
|
+
bind: BindComponentRenderProp<Date>;
|
|
16
|
+
}
|
|
17
|
+
export declare const SchedulerDialogFormComponentDateTimeInput: ((props: ISchedulerDialogFormComponentDateTimeInputProps) => React.JSX.Element) & {
|
|
18
|
+
original: (props: ISchedulerDialogFormComponentDateTimeInputProps) => React.JSX.Element;
|
|
19
|
+
originalName: string;
|
|
20
|
+
displayName: string;
|
|
21
|
+
} & {
|
|
22
|
+
original: ((props: ISchedulerDialogFormComponentDateTimeInputProps) => React.JSX.Element) & {
|
|
23
|
+
original: (props: ISchedulerDialogFormComponentDateTimeInputProps) => React.JSX.Element;
|
|
24
|
+
originalName: string;
|
|
25
|
+
displayName: string;
|
|
26
|
+
};
|
|
27
|
+
originalName: string;
|
|
28
|
+
displayName: string;
|
|
29
|
+
} & {
|
|
30
|
+
createDecorator: (decorator: import("@webiny/app-admin").ComponentDecorator<((props: ISchedulerDialogFormComponentDateTimeInputProps) => React.JSX.Element) & {
|
|
31
|
+
original: (props: ISchedulerDialogFormComponentDateTimeInputProps) => React.JSX.Element;
|
|
32
|
+
originalName: string;
|
|
33
|
+
displayName: string;
|
|
34
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
35
|
+
};
|
|
36
|
+
export interface IUseScheduleDialogProps {
|
|
37
|
+
client: ApolloClient<object>;
|
|
38
|
+
namespace: string;
|
|
39
|
+
target: IShowDialogParamsEntry;
|
|
40
|
+
}
|
|
41
|
+
export declare const useScheduleDialog: (props: IUseScheduleDialogProps) => UseShowScheduleDialogResponse;
|
|
42
|
+
export {};
|
|
@@ -0,0 +1,221 @@
|
|
|
1
|
+
import React, { useCallback, useMemo, useRef } from "react";
|
|
2
|
+
import { Alert, Grid, Input } from "@webiny/admin-ui";
|
|
3
|
+
import { useDialogs, useSnackbar } from "@webiny/app-admin";
|
|
4
|
+
import { Bind } from "@webiny/form";
|
|
5
|
+
import { validation } from "@webiny/validation";
|
|
6
|
+
import { ScheduleActionType } from "../../../types.js";
|
|
7
|
+
import ValidationError from "@webiny/validation/validationError.js";
|
|
8
|
+
import { makeDecoratable } from "@webiny/react-composition";
|
|
9
|
+
import { ScheduleDialogAction } from "../../index.js";
|
|
10
|
+
import { SchedulerCancelGraphQLGateway } from "../../../Gateways/SchedulerCancelGraphQLGateway.js";
|
|
11
|
+
import { SchedulerPublishGraphQLGateway } from "../../../Gateways/SchedulerPublishGraphQLGateway.js";
|
|
12
|
+
import { SchedulerUnpublishGraphQLGateway } from "../../../Gateways/SchedulerUnpublishGraphQLGateway.js";
|
|
13
|
+
import { useGetScheduledAction } from "./useGetScheduledAction.js";
|
|
14
|
+
import { SchedulerGetGraphQLGateway } from "../../../Gateways/SchedulerGetGraphQLGateway.js";
|
|
15
|
+
const dateToLocaleStringFormatter = new Intl.DateTimeFormat(undefined, {
|
|
16
|
+
year: "numeric",
|
|
17
|
+
month: "2-digit",
|
|
18
|
+
day: "2-digit",
|
|
19
|
+
hour: "2-digit",
|
|
20
|
+
minute: "2-digit",
|
|
21
|
+
second: undefined,
|
|
22
|
+
hour12: false
|
|
23
|
+
});
|
|
24
|
+
const ReschedulingAlert = ({
|
|
25
|
+
scheduleOn,
|
|
26
|
+
actionType
|
|
27
|
+
}) => {
|
|
28
|
+
if (!scheduleOn || !actionType) {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
const actionName = actionType === ScheduleActionType.publish ? "publish" : "unpublish";
|
|
32
|
+
return /*#__PURE__*/React.createElement(Alert, {
|
|
33
|
+
type: "danger"
|
|
34
|
+
}, /*#__PURE__*/React.createElement(React.Fragment, null, "A ", actionName, " is already scheduled at", /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("strong", null, dateToLocaleStringFormatter.format(scheduleOn)), "."));
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* DO NOT use a library for this!
|
|
38
|
+
*/
|
|
39
|
+
const padLeft = num => {
|
|
40
|
+
return String(num).padStart(2, "0");
|
|
41
|
+
};
|
|
42
|
+
const formatDateForDateTimeLocal = date => {
|
|
43
|
+
if (!date) {
|
|
44
|
+
return undefined;
|
|
45
|
+
} else if (typeof date === "string") {
|
|
46
|
+
date = new Date(date);
|
|
47
|
+
}
|
|
48
|
+
const year = date.getFullYear();
|
|
49
|
+
const month = padLeft(date.getMonth() + 1);
|
|
50
|
+
const day = padLeft(date.getDate());
|
|
51
|
+
const hours = padLeft(date.getHours());
|
|
52
|
+
const minutes = padLeft(date.getMinutes());
|
|
53
|
+
return `${year}-${month}-${day}T${hours}:${minutes}`;
|
|
54
|
+
};
|
|
55
|
+
const minDateValidator = input => {
|
|
56
|
+
const value = new Date(input);
|
|
57
|
+
const minDate = new Date(new Date().getTime() + 120 * 1000);
|
|
58
|
+
if (minDate < value) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
throw new ValidationError(`The date must be at least 2 minutes in the future. Current minimum date is ${dateToLocaleStringFormatter.format(minDate)}.`);
|
|
62
|
+
};
|
|
63
|
+
minDateValidator.validatorName = "minDateValidator";
|
|
64
|
+
export const SchedulerDialogFormComponentDateTimeInput = makeDecoratable("SchedulerDialogFormComponentDateTimeInput", props => {
|
|
65
|
+
const {
|
|
66
|
+
bind
|
|
67
|
+
} = props;
|
|
68
|
+
return /*#__PURE__*/React.createElement(Input, Object.assign({}, bind, {
|
|
69
|
+
value: formatDateForDateTimeLocal(bind.value),
|
|
70
|
+
title: "Schedule On",
|
|
71
|
+
label: "Schedule On",
|
|
72
|
+
size: "lg",
|
|
73
|
+
type: "datetime-local",
|
|
74
|
+
required: true,
|
|
75
|
+
autoFocus: true
|
|
76
|
+
}));
|
|
77
|
+
});
|
|
78
|
+
const FormComponent = ({
|
|
79
|
+
scheduleOn,
|
|
80
|
+
onCancel,
|
|
81
|
+
actionType
|
|
82
|
+
}) => {
|
|
83
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ReschedulingAlert, {
|
|
84
|
+
actionType: actionType,
|
|
85
|
+
scheduleOn: scheduleOn,
|
|
86
|
+
onCancel: onCancel
|
|
87
|
+
}), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Grid.Column, {
|
|
88
|
+
span: 12
|
|
89
|
+
}, /*#__PURE__*/React.createElement(Bind, {
|
|
90
|
+
name: "scheduleOn",
|
|
91
|
+
validators: [validation.create("required"), minDateValidator]
|
|
92
|
+
}, bind => {
|
|
93
|
+
return /*#__PURE__*/React.createElement(SchedulerDialogFormComponentDateTimeInput, {
|
|
94
|
+
bind: bind
|
|
95
|
+
});
|
|
96
|
+
}))));
|
|
97
|
+
};
|
|
98
|
+
export const useScheduleDialog = props => {
|
|
99
|
+
const {
|
|
100
|
+
client,
|
|
101
|
+
target,
|
|
102
|
+
namespace
|
|
103
|
+
} = props;
|
|
104
|
+
const dialog = useDialogs();
|
|
105
|
+
const {
|
|
106
|
+
showSnackbar
|
|
107
|
+
} = useSnackbar();
|
|
108
|
+
const action = useMemo(() => {
|
|
109
|
+
const cancelGateway = new SchedulerCancelGraphQLGateway(client);
|
|
110
|
+
const publishGateway = new SchedulerPublishGraphQLGateway(client);
|
|
111
|
+
const unpublishGateway = new SchedulerUnpublishGraphQLGateway(client);
|
|
112
|
+
return new ScheduleDialogAction({
|
|
113
|
+
cancelGateway,
|
|
114
|
+
publishGateway,
|
|
115
|
+
unpublishGateway
|
|
116
|
+
});
|
|
117
|
+
}, [client]);
|
|
118
|
+
const getGateway = useMemo(() => {
|
|
119
|
+
return new SchedulerGetGraphQLGateway(client);
|
|
120
|
+
}, [client]);
|
|
121
|
+
const schedulerEntry = useGetScheduledAction({
|
|
122
|
+
gateway: getGateway,
|
|
123
|
+
namespace,
|
|
124
|
+
id: target.id
|
|
125
|
+
});
|
|
126
|
+
const dialogClose = useRef(() => {
|
|
127
|
+
return;
|
|
128
|
+
});
|
|
129
|
+
const onAccept = useCallback(async params => {
|
|
130
|
+
const {
|
|
131
|
+
scheduleOn,
|
|
132
|
+
actionType
|
|
133
|
+
} = params;
|
|
134
|
+
try {
|
|
135
|
+
await action.schedule({
|
|
136
|
+
targetId: target.id,
|
|
137
|
+
namespace,
|
|
138
|
+
scheduleOn,
|
|
139
|
+
actionType
|
|
140
|
+
});
|
|
141
|
+
showSnackbar(`Scheduled ${actionType} action for "${target.title}"!`);
|
|
142
|
+
} catch (error) {
|
|
143
|
+
showSnackbar(error.message);
|
|
144
|
+
console.error(error);
|
|
145
|
+
}
|
|
146
|
+
}, []);
|
|
147
|
+
const onCancel = useCallback(async () => {
|
|
148
|
+
if (!schedulerEntry) {
|
|
149
|
+
showSnackbar(`No scheduled action found for "${target.title}"!`);
|
|
150
|
+
if (dialogClose.current) {
|
|
151
|
+
dialogClose.current();
|
|
152
|
+
dialogClose.current = null;
|
|
153
|
+
}
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
try {
|
|
157
|
+
await action.cancel({
|
|
158
|
+
id: schedulerEntry.id,
|
|
159
|
+
namespace: schedulerEntry.namespace
|
|
160
|
+
});
|
|
161
|
+
showSnackbar(`Canceled scheduled ${schedulerEntry.actionType} on "${schedulerEntry.title}"!`);
|
|
162
|
+
} catch (error) {
|
|
163
|
+
showSnackbar(error.message);
|
|
164
|
+
}
|
|
165
|
+
if (!dialogClose.current) {
|
|
166
|
+
return;
|
|
167
|
+
}
|
|
168
|
+
dialogClose.current();
|
|
169
|
+
dialogClose.current = null;
|
|
170
|
+
}, []);
|
|
171
|
+
const showDialog = () => {
|
|
172
|
+
const isPublished = target.status === "published";
|
|
173
|
+
const scheduleOn = schedulerEntry?.publishOn || schedulerEntry?.unpublishOn;
|
|
174
|
+
dialogClose.current = dialog.showDialog({
|
|
175
|
+
title: `Schedule "${target.title}"`,
|
|
176
|
+
content: /*#__PURE__*/React.createElement(FormComponent, {
|
|
177
|
+
actionType: schedulerEntry?.actionType,
|
|
178
|
+
scheduleOn: scheduleOn,
|
|
179
|
+
onCancel: onCancel
|
|
180
|
+
}),
|
|
181
|
+
formData: {
|
|
182
|
+
scheduleOn
|
|
183
|
+
},
|
|
184
|
+
acceptLabel: isPublished ? "Schedule Unpublish" : "Schedule Publish",
|
|
185
|
+
cancelLabel: "Discard",
|
|
186
|
+
loadingLabel: "Scheduling...",
|
|
187
|
+
onAccept: data => {
|
|
188
|
+
if (!data.scheduleOn) {
|
|
189
|
+
showSnackbar(`Missing "Schedule On" date!`);
|
|
190
|
+
return;
|
|
191
|
+
}
|
|
192
|
+
/**
|
|
193
|
+
* We need to convert scheduleOn from local string to the ISO String (UTC) format.
|
|
194
|
+
* This is important because the date will be stored in the database in UTC format.
|
|
195
|
+
*
|
|
196
|
+
* We display the date (in the UI) in users timezone time.
|
|
197
|
+
*/
|
|
198
|
+
let scheduleOn;
|
|
199
|
+
try {
|
|
200
|
+
scheduleOn = new Date(data.scheduleOn);
|
|
201
|
+
} catch (ex) {
|
|
202
|
+
showSnackbar(`Invalid "Schedule On" date!`, {
|
|
203
|
+
value: data.scheduleOn
|
|
204
|
+
});
|
|
205
|
+
console.error(ex);
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
const actionType = isPublished ? ScheduleActionType.unpublish : ScheduleActionType.publish;
|
|
209
|
+
return onAccept({
|
|
210
|
+
scheduleOn,
|
|
211
|
+
actionType
|
|
212
|
+
});
|
|
213
|
+
}
|
|
214
|
+
});
|
|
215
|
+
};
|
|
216
|
+
return {
|
|
217
|
+
showDialog
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
//# sourceMappingURL=useScheduleDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useCallback","useMemo","useRef","Alert","Grid","Input","useDialogs","useSnackbar","Bind","validation","ScheduleActionType","ValidationError","makeDecoratable","ScheduleDialogAction","SchedulerCancelGraphQLGateway","SchedulerPublishGraphQLGateway","SchedulerUnpublishGraphQLGateway","useGetScheduledAction","SchedulerGetGraphQLGateway","dateToLocaleStringFormatter","Intl","DateTimeFormat","undefined","year","month","day","hour","minute","second","hour12","ReschedulingAlert","scheduleOn","actionType","actionName","publish","createElement","type","Fragment","format","padLeft","num","String","padStart","formatDateForDateTimeLocal","date","Date","getFullYear","getMonth","getDate","hours","getHours","minutes","getMinutes","minDateValidator","input","value","minDate","getTime","validatorName","SchedulerDialogFormComponentDateTimeInput","props","bind","Object","assign","title","label","size","required","autoFocus","FormComponent","onCancel","Column","span","name","validators","create","useScheduleDialog","client","target","namespace","dialog","showSnackbar","action","cancelGateway","publishGateway","unpublishGateway","getGateway","schedulerEntry","gateway","id","dialogClose","onAccept","params","schedule","targetId","error","message","console","current","cancel","showDialog","isPublished","status","publishOn","unpublishOn","content","formData","acceptLabel","cancelLabel","loadingLabel","data","ex","unpublish"],"sources":["useScheduleDialog.tsx"],"sourcesContent":["import React, { useCallback, useMemo, useRef } from \"react\";\nimport { Alert, Grid, Input } from \"@webiny/admin-ui\";\nimport { useDialogs, useSnackbar } from \"@webiny/app-admin\";\nimport { Bind, type BindComponentRenderProp } from \"@webiny/form\";\nimport { validation } from \"@webiny/validation\";\nimport { ScheduleActionType } from \"~/types.js\";\nimport type { CmsContentEntryStatusType } from \"@webiny/app-headless-cms-common/types/index.js\";\nimport type { Validator } from \"@webiny/validation/types.js\";\nimport ValidationError from \"@webiny/validation/validationError.js\";\nimport { makeDecoratable } from \"@webiny/react-composition\";\nimport ApolloClient from \"apollo-client/ApolloClient.js\";\nimport { ScheduleDialogAction } from \"~/Presentation/index.js\";\nimport { SchedulerCancelGraphQLGateway } from \"~/Gateways/SchedulerCancelGraphQLGateway.js\";\nimport { SchedulerPublishGraphQLGateway } from \"~/Gateways/SchedulerPublishGraphQLGateway.js\";\nimport { SchedulerUnpublishGraphQLGateway } from \"~/Gateways/SchedulerUnpublishGraphQLGateway.js\";\nimport { useGetScheduledAction } from \"~/Presentation/components/ScheduleDialog/useGetScheduledAction.js\";\nimport { SchedulerGetGraphQLGateway } from \"~/Gateways/SchedulerGetGraphQLGateway.js\";\n\nexport type ShowDialogParamsEntryStatus = CmsContentEntryStatusType;\n\nexport interface IShowDialogParamsEntry {\n id: string;\n status: ShowDialogParamsEntryStatus;\n title: string;\n}\n\ninterface UseShowScheduleDialogResponse {\n showDialog: () => void;\n}\n\ninterface FormComponentProps {\n scheduleOn: Date | undefined;\n actionType: ScheduleActionType | undefined;\n onCancel: OnCancelCallable;\n}\n\nconst dateToLocaleStringFormatter = new Intl.DateTimeFormat(undefined, {\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: undefined,\n hour12: false\n});\n\nconst ReschedulingAlert = ({ scheduleOn, actionType }: FormComponentProps) => {\n if (!scheduleOn || !actionType) {\n return null;\n }\n const actionName = actionType === ScheduleActionType.publish ? \"publish\" : \"unpublish\";\n return (\n <Alert type={\"danger\"}>\n <>\n A {actionName} is already scheduled at\n <br />\n <strong>{dateToLocaleStringFormatter.format(scheduleOn)}</strong>.\n </>\n </Alert>\n );\n};\n/**\n * DO NOT use a library for this!\n */\nconst padLeft = (num: number) => {\n return String(num).padStart(2, \"0\");\n};\n\nconst formatDateForDateTimeLocal = (date?: Date | string): string | undefined => {\n if (!date) {\n return undefined;\n } else if (typeof date === \"string\") {\n date = new Date(date);\n }\n\n const year = date.getFullYear();\n const month = padLeft(date.getMonth() + 1);\n const day = padLeft(date.getDate());\n const hours = padLeft(date.getHours());\n const minutes = padLeft(date.getMinutes());\n\n return `${year}-${month}-${day}T${hours}:${minutes}`;\n};\n\nconst minDateValidator: Validator = (input: string) => {\n const value = new Date(input);\n const minDate = new Date(new Date().getTime() + 120 * 1000);\n if (minDate < value) {\n return;\n }\n throw new ValidationError(\n `The date must be at least 2 minutes in the future. Current minimum date is ${dateToLocaleStringFormatter.format(\n minDate\n )}.`\n );\n};\n\nminDateValidator.validatorName = \"minDateValidator\";\n\nexport interface ISchedulerDialogFormComponentDateTimeInputProps {\n bind: BindComponentRenderProp<Date>;\n}\n\nexport const SchedulerDialogFormComponentDateTimeInput = makeDecoratable(\n \"SchedulerDialogFormComponentDateTimeInput\",\n (props: ISchedulerDialogFormComponentDateTimeInputProps) => {\n const { bind } = props;\n\n return (\n <Input\n {...bind}\n value={formatDateForDateTimeLocal(bind.value)}\n title={\"Schedule On\"}\n label={\"Schedule On\"}\n size={\"lg\"}\n type={\"datetime-local\"}\n required\n autoFocus\n />\n );\n }\n);\n\nconst FormComponent = ({ scheduleOn, onCancel, actionType }: FormComponentProps) => {\n return (\n <>\n {\n <ReschedulingAlert\n actionType={actionType}\n scheduleOn={scheduleOn}\n onCancel={onCancel}\n />\n }\n <Grid>\n <Grid.Column span={12}>\n <Bind\n name={\"scheduleOn\"}\n validators={[validation.create(\"required\"), minDateValidator]}\n >\n {bind => {\n return <SchedulerDialogFormComponentDateTimeInput bind={bind} />;\n }}\n </Bind>\n </Grid.Column>\n </Grid>\n </>\n );\n};\n\ninterface ScheduleFormData {\n scheduleOn?: string;\n}\n\ninterface IOnAcceptParams {\n scheduleOn: Date;\n actionType: ScheduleActionType;\n}\n\ninterface OnCancelCallable {\n (): Promise<void>;\n}\n\nexport interface IUseScheduleDialogProps {\n client: ApolloClient<object>;\n namespace: string;\n target: IShowDialogParamsEntry;\n}\n\nexport const useScheduleDialog = (\n props: IUseScheduleDialogProps\n): UseShowScheduleDialogResponse => {\n const { client, target, namespace } = props;\n const dialog = useDialogs();\n const { showSnackbar } = useSnackbar();\n\n const action = useMemo(() => {\n const cancelGateway = new SchedulerCancelGraphQLGateway(client);\n const publishGateway = new SchedulerPublishGraphQLGateway(client);\n const unpublishGateway = new SchedulerUnpublishGraphQLGateway(client);\n\n return new ScheduleDialogAction({\n cancelGateway,\n publishGateway,\n unpublishGateway\n });\n }, [client]);\n\n const getGateway = useMemo(() => {\n return new SchedulerGetGraphQLGateway(client);\n }, [client]);\n\n const schedulerEntry = useGetScheduledAction({\n gateway: getGateway,\n namespace,\n id: target.id\n });\n\n const dialogClose = useRef<null | (() => void)>(() => {\n return;\n });\n\n const onAccept = useCallback(async (params: IOnAcceptParams) => {\n const { scheduleOn, actionType } = params;\n\n try {\n await action.schedule({\n targetId: target.id,\n namespace,\n scheduleOn,\n actionType\n });\n showSnackbar(`Scheduled ${actionType} action for \"${target.title}\"!`);\n } catch (error) {\n showSnackbar(error.message);\n console.error(error);\n }\n }, []);\n\n const onCancel = useCallback(async () => {\n if (!schedulerEntry) {\n showSnackbar(`No scheduled action found for \"${target.title}\"!`);\n if (dialogClose.current) {\n dialogClose.current();\n dialogClose.current = null;\n }\n return;\n }\n try {\n await action.cancel({\n id: schedulerEntry.id,\n namespace: schedulerEntry.namespace\n });\n showSnackbar(\n `Canceled scheduled ${schedulerEntry.actionType} on \"${schedulerEntry.title}\"!`\n );\n } catch (error) {\n showSnackbar(error.message);\n }\n if (!dialogClose.current) {\n return;\n }\n dialogClose.current();\n dialogClose.current = null;\n }, []);\n\n const showDialog = () => {\n const isPublished = target.status === \"published\";\n const scheduleOn = schedulerEntry?.publishOn || schedulerEntry?.unpublishOn;\n\n dialogClose.current = dialog.showDialog({\n title: `Schedule \"${target.title}\"`,\n content: (\n <FormComponent\n actionType={schedulerEntry?.actionType}\n scheduleOn={scheduleOn}\n onCancel={onCancel}\n />\n ),\n formData: {\n scheduleOn\n },\n acceptLabel: isPublished ? \"Schedule Unpublish\" : \"Schedule Publish\",\n cancelLabel: \"Discard\",\n loadingLabel: \"Scheduling...\",\n onAccept: (data: Partial<ScheduleFormData>) => {\n if (!data.scheduleOn) {\n showSnackbar(`Missing \"Schedule On\" date!`);\n return;\n }\n /**\n * We need to convert scheduleOn from local string to the ISO String (UTC) format.\n * This is important because the date will be stored in the database in UTC format.\n *\n * We display the date (in the UI) in users timezone time.\n */\n let scheduleOn: Date;\n try {\n scheduleOn = new Date(data.scheduleOn);\n } catch (ex) {\n showSnackbar(`Invalid \"Schedule On\" date!`, {\n value: data.scheduleOn\n });\n console.error(ex);\n return;\n }\n\n const actionType = isPublished\n ? ScheduleActionType.unpublish\n : ScheduleActionType.publish;\n\n return onAccept({\n scheduleOn,\n actionType\n });\n }\n });\n };\n\n return {\n showDialog\n };\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,OAAO,EAAEC,MAAM,QAAQ,OAAO;AAC3D,SAASC,KAAK,EAAE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AEvD,UAAW;QACvCD,UAAU,EAAEA,UAAW;QACvBuC,QAAQ,EAAEA;MAAS,CACtB,CACJ;MACDoC,QAAQ,EAAE;QACN3E;MACJ,CAAC;MACD4E,WAAW,EAAEN,WAAW,GAAG,oBAAoB,GAAG,kBAAkB;MACpEO,WAAW,EAAE,SAAS;MACtBC,YAAY,EAAE,eAAe;MAC7BlB,QAAQ,EAAGmB,IAA+B,IAAK;QAC3C,IAAI,CAACA,IAAI,CAAC/E,UAAU,EAAE;UAClBkD,YAAY,CAAC,6BAA6B,CAAC;UAC3C;QACJ;QACA;AAChB;AACA;AACA;AACA;AACA;QACgB,IAAIlD,UAAgB;QACpB,IAAI;UACAA,UAAU,GAAG,IAAIc,IAAI,CAACiE,IAAI,CAAC/E,UAAU,CAAC;QAC1C,CAAC,CAAC,OAAOgF,EAAE,EAAE;UACT9B,YAAY,CAAC,6BAA6B,EAAE;YACxC1B,KAAK,EAAEuD,IAAI,CAAC/E;UAChB,CAAC,CAAC;UACFkE,OAAO,CAACF,KAAK,CAACgB,EAAE,CAAC;UACjB;QACJ;QAEA,MAAM/E,UAAU,GAAGqE,WAAW,GACxB3F,kBAAkB,CAACsG,SAAS,GAC5BtG,kBAAkB,CAACwB,OAAO;QAEhC,OAAOyD,QAAQ,CAAC;UACZ5D,UAAU;UACVC;QACJ,CAAC,CAAC;MACN;IACJ,CAAC,CAAC;EACN,CAAC;EAED,OAAO;IACHoE;EACJ,CAAC;AACL,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import debounce from "lodash/debounce.js";
|
|
3
|
+
import { OverlayLayout } from "@webiny/app-admin";
|
|
4
|
+
import { Scrollbar } from "@webiny/ui/Scrollbar/index.js";
|
|
5
|
+
import { Title } from "../Title/index.js";
|
|
6
|
+
import { SearchInput } from "../SearchInput/index.js";
|
|
7
|
+
import { Empty } from "../Empty/index.js";
|
|
8
|
+
import { Table } from "../Table/index.js";
|
|
9
|
+
import { BottomInfoBar } from "../BottomInfoBar/index.js";
|
|
10
|
+
import { useScheduler } from "../../hooks/index.js";
|
|
11
|
+
export const SchedulerOverlay = props => {
|
|
12
|
+
const {
|
|
13
|
+
listMoreItems,
|
|
14
|
+
vm
|
|
15
|
+
} = useScheduler();
|
|
16
|
+
const onTableScroll = debounce(async ({
|
|
17
|
+
scrollFrame
|
|
18
|
+
}) => {
|
|
19
|
+
if (scrollFrame.top > 0.8) {
|
|
20
|
+
await listMoreItems();
|
|
21
|
+
}
|
|
22
|
+
}, 200);
|
|
23
|
+
return /*#__PURE__*/React.createElement(OverlayLayout, {
|
|
24
|
+
onExited: props.onExited,
|
|
25
|
+
barLeft: /*#__PURE__*/React.createElement(Title, {
|
|
26
|
+
title: props.title
|
|
27
|
+
}),
|
|
28
|
+
barMiddle: /*#__PURE__*/React.createElement(SearchInput, null)
|
|
29
|
+
}, /*#__PURE__*/React.createElement(Scrollbar, {
|
|
30
|
+
onScrollFrame: scrollFrame => onTableScroll({
|
|
31
|
+
scrollFrame
|
|
32
|
+
})
|
|
33
|
+
}, vm.isEmptyView ? /*#__PURE__*/React.createElement(Empty, null) : /*#__PURE__*/React.createElement(Table, null)), /*#__PURE__*/React.createElement(BottomInfoBar, null));
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=SchedulerOverlay.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","debounce","OverlayLayout","Scrollbar","Title","SearchInput","Empty","Table","BottomInfoBar","useScheduler","SchedulerOverlay","props","listMoreItems","vm","onTableScroll","scrollFrame","top","createElement","onExited","barLeft","title","barMiddle","onScrollFrame","isEmptyView"],"sources":["SchedulerOverlay.tsx"],"sourcesContent":["import React from \"react\";\nimport debounce from \"lodash/debounce.js\";\nimport { OverlayLayout } from \"@webiny/app-admin\";\nimport { Scrollbar } from \"@webiny/ui/Scrollbar/index.js\";\nimport { Title } from \"~/Presentation/components/Title/index.js\";\nimport { SearchInput } from \"~/Presentation/components/SearchInput/index.js\";\nimport { Empty } from \"~/Presentation/components/Empty/index.js\";\nimport { Table } from \"~/Presentation/components/Table/index.js\";\nimport { BottomInfoBar } from \"~/Presentation/components/BottomInfoBar/index.js\";\nimport { useScheduler } from \"~/Presentation/hooks/index.js\";\n\ninterface SchedulerOverlayProps {\n title: string;\n onExited: () => void;\n}\n\nexport const SchedulerOverlay = (props: SchedulerOverlayProps) => {\n const { listMoreItems, vm } = useScheduler();\n\n const onTableScroll = debounce(async ({ scrollFrame }) => {\n if (scrollFrame.top > 0.8) {\n await listMoreItems();\n }\n }, 200);\n\n return (\n <OverlayLayout\n onExited={props.onExited}\n barLeft={<Title title={props.title} />}\n barMiddle={<SearchInput />}\n >\n <Scrollbar onScrollFrame={scrollFrame => onTableScroll({ scrollFrame })}>\n {vm.isEmptyView ? <Empty /> : <Table />}\n </Scrollbar>\n <BottomInfoBar />\n </OverlayLayout>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,QAAQ,MAAM,oBAAoB;AACzC,SAASC,aAAa,QAAQ,mBAAmB;AACjD,SAASC,SAAS,QAAQ,+BAA+B;AACzD,SAASC,KAAK;AACd,SAASC,WAAW;AACpB,SAASC,KAAK;AACd,SAASC,KAAK;AACd,SAASC,aAAa;AACtB,SAASC,YAAY;AAOrB,OAAO,MAAMC,gBAAgB,GAAIC,KAA4B,IAAK;EAC9D,MAAM;IAAEC,aAAa;IAAEC;EAAG,CAAC,GAAGJ,YAAY,CAAC,CAAC;EAE5C,MAAMK,aAAa,GAAGb,QAAQ,CAAC,OAAO;IAAEc;EAAY,CAAC,KAAK;IACtD,IAAIA,WAAW,CAACC,GAAG,GAAG,GAAG,EAAE;MACvB,MAAMJ,aAAa,CAAC,CAAC;IACzB;EACJ,CAAC,EAAE,GAAG,CAAC;EAEP,oBACIZ,KAAA,CAAAiB,aAAA,CAACf,aAAa;IACVgB,QAAQ,EAAEP,KAAK,CAACO,QAAS;IACzBC,OAAO,eAAEnB,KAAA,CAAAiB,aAAA,CAACb,KAAK;MAACgB,KAAK,EAAET,KAAK,CAACS;IAAM,CAAE,CAAE;IACvCC,SAAS,eAAErB,KAAA,CAAAiB,aAAA,CAACZ,WAAW,MAAE;EAAE,gBAE3BL,KAAA,CAAAiB,aAAA,CAACd,SAAS;IAACmB,aAAa,EAAEP,WAAW,IAAID,aAAa,CAAC;MAAEC;IAAY,CAAC;EAAE,GACnEF,EAAE,CAACU,WAAW,gBAAGvB,KAAA,CAAAiB,aAAA,CAACX,KAAK,MAAE,CAAC,gBAAGN,KAAA,CAAAiB,aAAA,CAACV,KAAK,MAAE,CAC/B,CAAC,eACZP,KAAA,CAAAiB,aAAA,CAACT,aAAa,MAAE,CACL,CAAC;AAExB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./SchedulerOverlay.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./SchedulerOverlay.js\";\n"],"mappings":"AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { ReactComponent as SearchIcon } from "@webiny/icons/search.svg";
|
|
3
|
+
import { DelayedOnChange, Icon, Input } from "@webiny/admin-ui";
|
|
4
|
+
import { useScheduler } from "../../hooks/index.js";
|
|
5
|
+
export const SearchInput = () => {
|
|
6
|
+
const {
|
|
7
|
+
vm,
|
|
8
|
+
searchItems
|
|
9
|
+
} = useScheduler();
|
|
10
|
+
return /*#__PURE__*/React.createElement(DelayedOnChange, {
|
|
11
|
+
value: vm.searchQuery,
|
|
12
|
+
onChange: value => {
|
|
13
|
+
if (value === vm.searchQuery) {
|
|
14
|
+
return;
|
|
15
|
+
}
|
|
16
|
+
searchItems(value);
|
|
17
|
+
}
|
|
18
|
+
}, ({
|
|
19
|
+
value,
|
|
20
|
+
onChange
|
|
21
|
+
}) => /*#__PURE__*/React.createElement(Input, {
|
|
22
|
+
id: "scheduler__search-input",
|
|
23
|
+
value: value,
|
|
24
|
+
onChange: e => onChange(e.target.value),
|
|
25
|
+
forwardEventOnChange: true,
|
|
26
|
+
placeholder: vm.searchLabel,
|
|
27
|
+
"data-testid": "scheduler.search-input",
|
|
28
|
+
startIcon: /*#__PURE__*/React.createElement(Icon, {
|
|
29
|
+
icon: /*#__PURE__*/React.createElement(SearchIcon, null),
|
|
30
|
+
label: "Search"
|
|
31
|
+
}),
|
|
32
|
+
size: "md",
|
|
33
|
+
variant: "ghost"
|
|
34
|
+
}));
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=SearchInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","ReactComponent","SearchIcon","DelayedOnChange","Icon","Input","useScheduler","SearchInput","vm","searchItems","createElement","value","searchQuery","onChange","id","e","target","forwardEventOnChange","placeholder","searchLabel","startIcon","icon","label","size","variant"],"sources":["SearchInput.tsx"],"sourcesContent":["import React from \"react\";\nimport { ReactComponent as SearchIcon } from \"@webiny/icons/search.svg\";\nimport { DelayedOnChange, Icon, Input } from \"@webiny/admin-ui\";\nimport { useScheduler } from \"~/Presentation/hooks/index.js\";\n\nexport const SearchInput = () => {\n const { vm, searchItems } = useScheduler();\n\n return (\n <DelayedOnChange\n value={vm.searchQuery}\n onChange={value => {\n if (value === vm.searchQuery) {\n return;\n }\n searchItems(value);\n }}\n >\n {({ value, onChange }) => (\n <Input\n id={\"scheduler__search-input\"}\n value={value}\n onChange={e => onChange(e.target.value)}\n forwardEventOnChange={true}\n placeholder={vm.searchLabel}\n data-testid={\"scheduler.search-input\"}\n startIcon={<Icon icon={<SearchIcon />} label=\"Search\" />}\n size={\"md\"}\n variant={\"ghost\"}\n />\n )}\n </DelayedOnChange>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,IAAIC,UAAU,QAAQ,0BAA0B;AACvE,SAASC,eAAe,EAAEC,IAAI,EAAEC,KAAK,QAAQ,kBAAkB;AAC/D,SAASC,YAAY;AAErB,OAAO,MAAMC,WAAW,GAAGA,CAAA,KAAM;EAC7B,MAAM;IAAEC,EAAE;IAAEC;EAAY,CAAC,GAAGH,YAAY,CAAC,CAAC;EAE1C,oBACIN,KAAA,CAAAU,aAAA,CAACP,eAAe;IACZQ,KAAK,EAAEH,EAAE,CAACI,WAAY;IACtBC,QAAQ,EAAEF,KAAK,IAAI;MACf,IAAIA,KAAK,KAAKH,EAAE,CAACI,WAAW,EAAE;QAC1B;MACJ;MACAH,WAAW,CAACE,KAAK,CAAC;IACtB;EAAE,GAED,CAAC;IAAEA,KAAK;IAAEE;EAAS,CAAC,kBACjBb,KAAA,CAAAU,aAAA,CAACL,KAAK;IACFS,EAAE,EAAE,yBAA0B;IAC9BH,KAAK,EAAEA,KAAM;IACbE,QAAQ,EAAEE,CAAC,IAAIF,QAAQ,CAACE,CAAC,CAACC,MAAM,CAACL,KAAK,CAAE;IACxCM,oBAAoB,EAAE,IAAK;IAC3BC,WAAW,EAAEV,EAAE,CAACW,WAAY;IAC5B,eAAa,wBAAyB;IACtCC,SAAS,eAAEpB,KAAA,CAAAU,aAAA,CAACN,IAAI;MAACiB,IAAI,eAAErB,KAAA,CAAAU,aAAA,CAACR,UAAU,MAAE,CAAE;MAACoB,KAAK,EAAC;IAAQ,CAAE,CAAE;IACzDC,IAAI,EAAE,IAAK;IACXC,OAAO,EAAE;EAAQ,CACpB,CAEQ,CAAC;AAE1B,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./SearchInput.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./SearchInput.js\";\n"],"mappings":"AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React, { useMemo } from "react";
|
|
2
|
+
import { createRecordsData, Table as AcoTable } from "@webiny/app-aco";
|
|
3
|
+
import { useScheduler } from "../../hooks/index.js";
|
|
4
|
+
import { LoadingActions } from "../../../types.js";
|
|
5
|
+
import { useSchedulerListConfig } from "../../configs/index.js";
|
|
6
|
+
export const Table = () => {
|
|
7
|
+
const {
|
|
8
|
+
vm,
|
|
9
|
+
selectItems,
|
|
10
|
+
sortItems
|
|
11
|
+
} = useScheduler();
|
|
12
|
+
const {
|
|
13
|
+
browser
|
|
14
|
+
} = useSchedulerListConfig();
|
|
15
|
+
const data = useMemo(() => {
|
|
16
|
+
return createRecordsData(vm.items);
|
|
17
|
+
}, [vm.items]);
|
|
18
|
+
const selected = useMemo(() => {
|
|
19
|
+
return createRecordsData(vm.selectedItems);
|
|
20
|
+
}, [vm.selectedItems]);
|
|
21
|
+
return /*#__PURE__*/React.createElement(AcoTable, {
|
|
22
|
+
columns: browser.table.columns,
|
|
23
|
+
data: data,
|
|
24
|
+
loading: vm.loading[LoadingActions.list],
|
|
25
|
+
onSelectRow: entries => selectItems(entries.map(entry => entry.data)),
|
|
26
|
+
sorting: vm.sorting,
|
|
27
|
+
onSortingChange: sort => sortItems(sort),
|
|
28
|
+
selected: selected,
|
|
29
|
+
nameColumnId: vm.nameColumnId,
|
|
30
|
+
namespace: "scheduler/list"
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=Table.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useMemo","createRecordsData","Table","AcoTable","useScheduler","LoadingActions","useSchedulerListConfig","vm","selectItems","sortItems","browser","data","items","selected","selectedItems","createElement","columns","table","loading","list","onSelectRow","entries","map","entry","sorting","onSortingChange","sort","nameColumnId","namespace"],"sources":["Table.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport { createRecordsData, Table as AcoTable } from \"@webiny/app-aco\";\nimport { useScheduler } from \"~/Presentation/hooks/index.js\";\nimport { LoadingActions, type SchedulerEntryTableRow } from \"~/types.js\";\nimport { useSchedulerListConfig } from \"~/Presentation/configs/index.js\";\n\nexport const Table = () => {\n const { vm, selectItems, sortItems } = useScheduler();\n const { browser } = useSchedulerListConfig();\n\n const data = useMemo<SchedulerEntryTableRow[]>(() => {\n return createRecordsData(vm.items);\n }, [vm.items]);\n\n const selected = useMemo<SchedulerEntryTableRow[]>(() => {\n return createRecordsData(vm.selectedItems);\n }, [vm.selectedItems]);\n\n return (\n <AcoTable<SchedulerEntryTableRow>\n columns={browser.table.columns}\n data={data}\n loading={vm.loading[LoadingActions.list]}\n onSelectRow={entries => selectItems(entries.map(entry => entry.data))}\n sorting={vm.sorting}\n onSortingChange={sort => sortItems(sort)}\n selected={selected}\n nameColumnId={vm.nameColumnId}\n namespace={\"scheduler/list\"}\n />\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,iBAAiB,EAAEC,KAAK,IAAIC,QAAQ,QAAQ,iBAAiB;AACtE,SAASC,YAAY;AACrB,SAASC,cAAc;AACvB,SAASC,sBAAsB;AAE/B,OAAO,MAAMJ,KAAK,GAAGA,CAAA,KAAM;EACvB,MAAM;IAAEK,EAAE;IAAEC,WAAW;IAAEC;EAAU,CAAC,GAAGL,YAAY,CAAC,CAAC;EACrD,MAAM;IAAEM;EAAQ,CAAC,GAAGJ,sBAAsB,CAAC,CAAC;EAE5C,MAAMK,IAAI,GAAGX,OAAO,CAA2B,MAAM;IACjD,OAAOC,iBAAiB,CAACM,EAAE,CAACK,KAAK,CAAC;EACtC,CAAC,EAAE,CAACL,EAAE,CAACK,KAAK,CAAC,CAAC;EAEd,MAAMC,QAAQ,GAAGb,OAAO,CAA2B,MAAM;IACrD,OAAOC,iBAAiB,CAACM,EAAE,CAACO,aAAa,CAAC;EAC9C,CAAC,EAAE,CAACP,EAAE,CAACO,aAAa,CAAC,CAAC;EAEtB,oBACIf,KAAA,CAAAgB,aAAA,CAACZ,QAAQ;IACLa,OAAO,EAAEN,OAAO,CAACO,KAAK,CAACD,OAAQ;IAC/BL,IAAI,EAAEA,IAAK;IACXO,OAAO,EAAEX,EAAE,CAACW,OAAO,CAACb,cAAc,CAACc,IAAI,CAAE;IACzCC,WAAW,EAAEC,OAAO,IAAIb,WAAW,CAACa,OAAO,CAACC,GAAG,CAACC,KAAK,IAAIA,KAAK,CAACZ,IAAI,CAAC,CAAE;IACtEa,OAAO,EAAEjB,EAAE,CAACiB,OAAQ;IACpBC,eAAe,EAAEC,IAAI,IAAIjB,SAAS,CAACiB,IAAI,CAAE;IACzCb,QAAQ,EAAEA,QAAS;IACnBc,YAAY,EAAEpB,EAAE,CAACoB,YAAa;IAC9BC,SAAS,EAAE;EAAiB,CAC/B,CAAC;AAEV,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Table.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Table.js\";\n"],"mappings":"AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Skeleton } from "@webiny/ui/Skeleton/index.js";
|
|
3
|
+
import { Name } from "./Title.styled.js";
|
|
4
|
+
export const Title = ({
|
|
5
|
+
title
|
|
6
|
+
}) => {
|
|
7
|
+
return /*#__PURE__*/React.createElement(Name, {
|
|
8
|
+
use: "headline6",
|
|
9
|
+
tag: "h1"
|
|
10
|
+
}, title || /*#__PURE__*/React.createElement(Skeleton, {
|
|
11
|
+
theme: "dark"
|
|
12
|
+
}));
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=Title.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","Skeleton","Name","Title","title","createElement","use","tag","theme"],"sources":["Title.tsx"],"sourcesContent":["import React from \"react\";\nimport { Skeleton } from \"@webiny/ui/Skeleton/index.js\";\nimport { Name } from \"./Title.styled.js\";\n\nexport interface TitleProps {\n title?: string;\n}\n\nexport const Title = ({ title }: TitleProps) => {\n return (\n <Name use={\"headline6\"} tag={\"h1\"}>\n {title || <Skeleton theme={\"dark\"} />}\n </Name>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,8BAA8B;AACvD,SAASC,IAAI;AAMb,OAAO,MAAMC,KAAK,GAAGA,CAAC;EAAEC;AAAkB,CAAC,KAAK;EAC5C,oBACIJ,KAAA,CAAAK,aAAA,CAACH,IAAI;IAACI,GAAG,EAAE,WAAY;IAACC,GAAG,EAAE;EAAK,GAC7BH,KAAK,iBAAIJ,KAAA,CAAAK,aAAA,CAACJ,QAAQ;IAACO,KAAK,EAAE;EAAO,CAAE,CAClC,CAAC;AAEf,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import _styled from "@emotion/styled/base";
|
|
2
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
3
|
+
import { Typography } from "@webiny/ui/Typography/index.js";
|
|
4
|
+
export const Name = /*#__PURE__*/_styled(Typography, process.env.NODE_ENV === "production" ? {
|
|
5
|
+
target: "e1k7ad610"
|
|
6
|
+
} : {
|
|
7
|
+
target: "e1k7ad610",
|
|
8
|
+
label: "Name"
|
|
9
|
+
})(process.env.NODE_ENV === "production" ? {
|
|
10
|
+
name: "jtvt2b",
|
|
11
|
+
styles: "color:var(--mdc-theme-text-primary-on-background);padding-left:8px;line-height:48px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis"
|
|
12
|
+
} : {
|
|
13
|
+
name: "jtvt2b",
|
|
14
|
+
styles: "color:var(--mdc-theme-text-primary-on-background);padding-left:8px;line-height:48px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlRpdGxlLnN0eWxlZC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBSXVEIiwiZmlsZSI6IlRpdGxlLnN0eWxlZC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gXCJAZW1vdGlvbi9zdHlsZWRcIjtcbmltcG9ydCB0eXBlIHsgVHlwb2dyYXBoeVByb3BzIH0gZnJvbSBcIkB3ZWJpbnkvdWkvVHlwb2dyYXBoeS9pbmRleC5qc1wiO1xuaW1wb3J0IHsgVHlwb2dyYXBoeSB9IGZyb20gXCJAd2ViaW55L3VpL1R5cG9ncmFwaHkvaW5kZXguanNcIjtcblxuZXhwb3J0IGNvbnN0IE5hbWUgPSBzdHlsZWQoVHlwb2dyYXBoeSk8VHlwb2dyYXBoeVByb3BzPmBcbiAgICBjb2xvcjogdmFyKC0tbWRjLXRoZW1lLXRleHQtcHJpbWFyeS1vbi1iYWNrZ3JvdW5kKTtcbiAgICBwYWRkaW5nLWxlZnQ6IDhweDtcbiAgICBsaW5lLWhlaWdodDogNDhweDtcbiAgICB3aGl0ZS1zcGFjZTogbm93cmFwO1xuICAgIG92ZXJmbG93OiBoaWRkZW47XG4gICAgdGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG5gO1xuIl19 */",
|
|
15
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=Title.styled.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Typography","Name","_styled","process","env","NODE_ENV","target","label","name","styles","toString","_EMOTION_STRINGIFIED_CSS_ERROR__"],"sources":["Title.styled.tsx"],"sourcesContent":["import styled from \"@emotion/styled\";\nimport type { TypographyProps } from \"@webiny/ui/Typography/index.js\";\nimport { Typography } from \"@webiny/ui/Typography/index.js\";\n\nexport const Name = styled(Typography)<TypographyProps>`\n color: var(--mdc-theme-text-primary-on-background);\n padding-left: 8px;\n line-height: 48px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n`;\n"],"mappings":";;AAEA,SAASA,UAAU,QAAQ,gCAAgC;AAE3D,OAAO,MAAMC,IAAI,gBAAGC,OAAA,CAAOF,UAAU,EAAAG,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,EAAC,CAAAJ,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAG,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,QAAA,EAAAC;AAAA,EAOrC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Title.js";
|