@webiny/app-trash-bin 0.0.0-unstable.e53eceafb5
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/TrashBinItem/ITrashBinItemMapper.d.ts +4 -0
- package/Domain/Models/TrashBinItem/ITrashBinItemMapper.js +3 -0
- package/Domain/Models/TrashBinItem/ITrashBinItemMapper.js.map +1 -0
- package/Domain/Models/TrashBinItem/TrashBinItem.d.ts +20 -0
- package/Domain/Models/TrashBinItem/TrashBinItem.js +15 -0
- package/Domain/Models/TrashBinItem/TrashBinItem.js.map +1 -0
- package/Domain/Models/TrashBinItem/index.d.ts +2 -0
- package/Domain/Models/TrashBinItem/index.js +4 -0
- package/Domain/Models/TrashBinItem/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/Search/ISearchRepository.d.ts +4 -0
- package/Domain/Repositories/Search/ISearchRepository.js +3 -0
- package/Domain/Repositories/Search/ISearchRepository.js.map +1 -0
- package/Domain/Repositories/Search/SearchRepository.d.ts +7 -0
- package/Domain/Repositories/Search/SearchRepository.js +15 -0
- package/Domain/Repositories/Search/SearchRepository.js.map +1 -0
- package/Domain/Repositories/Search/SearchRepositoryFactory.d.ts +7 -0
- package/Domain/Repositories/Search/SearchRepositoryFactory.js +17 -0
- package/Domain/Repositories/Search/SearchRepositoryFactory.js.map +1 -0
- package/Domain/Repositories/Search/index.d.ts +3 -0
- package/Domain/Repositories/Search/index.js +5 -0
- package/Domain/Repositories/Search/index.js.map +1 -0
- package/Domain/Repositories/SelectedItems/ISelectedItemsRepository.d.ts +8 -0
- package/Domain/Repositories/SelectedItems/ISelectedItemsRepository.js +3 -0
- package/Domain/Repositories/SelectedItems/ISelectedItemsRepository.js.map +1 -0
- package/Domain/Repositories/SelectedItems/SelectedItemsRepository.d.ts +12 -0
- package/Domain/Repositories/SelectedItems/SelectedItemsRepository.js +27 -0
- package/Domain/Repositories/SelectedItems/SelectedItemsRepository.js.map +1 -0
- package/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.d.ts +7 -0
- package/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.js +17 -0
- package/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.js.map +1 -0
- package/Domain/Repositories/SelectedItems/index.d.ts +3 -0
- package/Domain/Repositories/SelectedItems/index.js +5 -0
- package/Domain/Repositories/SelectedItems/index.js.map +1 -0
- package/Domain/Repositories/Sorting/SortingRepositoryWithDefaults.d.ts +8 -0
- package/Domain/Repositories/Sorting/SortingRepositoryWithDefaults.js +22 -0
- package/Domain/Repositories/Sorting/SortingRepositoryWithDefaults.js.map +1 -0
- package/Domain/Repositories/Sorting/index.d.ts +1 -0
- package/Domain/Repositories/Sorting/index.js +3 -0
- package/Domain/Repositories/Sorting/index.js.map +1 -0
- package/Domain/Repositories/TrashBinItems/ITrashBinItemsRepository.d.ts +14 -0
- package/Domain/Repositories/TrashBinItems/ITrashBinItemsRepository.js +3 -0
- package/Domain/Repositories/TrashBinItems/ITrashBinItemsRepository.js.map +1 -0
- package/Domain/Repositories/TrashBinItems/TrashBinItemMapper.d.ts +16 -0
- package/Domain/Repositories/TrashBinItems/TrashBinItemMapper.js +19 -0
- package/Domain/Repositories/TrashBinItems/TrashBinItemMapper.js.map +1 -0
- package/Domain/Repositories/TrashBinItems/TrashBinItemsRepository.d.ts +28 -0
- package/Domain/Repositories/TrashBinItems/TrashBinItemsRepository.js +102 -0
- package/Domain/Repositories/TrashBinItems/TrashBinItemsRepository.js.map +1 -0
- package/Domain/Repositories/TrashBinItems/TrashBinItemsRepositoryFactory.d.ts +10 -0
- package/Domain/Repositories/TrashBinItems/TrashBinItemsRepositoryFactory.js +17 -0
- package/Domain/Repositories/TrashBinItems/TrashBinItemsRepositoryFactory.js.map +1 -0
- package/Domain/Repositories/TrashBinItems/TrashBinItemsRepositoryWithLoading.d.ts +17 -0
- package/Domain/Repositories/TrashBinItems/TrashBinItemsRepositoryWithLoading.js +38 -0
- package/Domain/Repositories/TrashBinItems/TrashBinItemsRepositoryWithLoading.js.map +1 -0
- package/Domain/Repositories/TrashBinItems/index.d.ts +5 -0
- package/Domain/Repositories/TrashBinItems/index.js +7 -0
- package/Domain/Repositories/TrashBinItems/index.js.map +1 -0
- package/Domain/Repositories/index.d.ts +5 -0
- package/Domain/Repositories/index.js +7 -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/TrashBinBulkActions/ITrashBinBulkActionsGateway.d.ts +4 -0
- package/Gateways/TrashBinBulkActions/ITrashBinBulkActionsGateway.js +3 -0
- package/Gateways/TrashBinBulkActions/ITrashBinBulkActionsGateway.js.map +1 -0
- package/Gateways/TrashBinBulkActions/index.d.ts +1 -0
- package/Gateways/TrashBinBulkActions/index.js +3 -0
- package/Gateways/TrashBinBulkActions/index.js.map +1 -0
- package/Gateways/TrashBinDeleteItem/ITrashBinDeleteItemGateway.d.ts +3 -0
- package/Gateways/TrashBinDeleteItem/ITrashBinDeleteItemGateway.js +3 -0
- package/Gateways/TrashBinDeleteItem/ITrashBinDeleteItemGateway.js.map +1 -0
- package/Gateways/TrashBinDeleteItem/index.d.ts +1 -0
- package/Gateways/TrashBinDeleteItem/index.js +3 -0
- package/Gateways/TrashBinDeleteItem/index.js.map +1 -0
- package/Gateways/TrashBinListItems/ITrashBinListGateway.d.ts +4 -0
- package/Gateways/TrashBinListItems/ITrashBinListGateway.js +3 -0
- package/Gateways/TrashBinListItems/ITrashBinListGateway.js.map +1 -0
- package/Gateways/TrashBinListItems/index.d.ts +1 -0
- package/Gateways/TrashBinListItems/index.js +3 -0
- package/Gateways/TrashBinListItems/index.js.map +1 -0
- package/Gateways/TrashBinRestoreItem/ITrashBinRestoreItemGateway.d.ts +3 -0
- package/Gateways/TrashBinRestoreItem/ITrashBinRestoreItemGateway.js +3 -0
- package/Gateways/TrashBinRestoreItem/ITrashBinRestoreItemGateway.js.map +1 -0
- package/Gateways/TrashBinRestoreItem/index.d.ts +1 -0
- package/Gateways/TrashBinRestoreItem/index.js +3 -0
- package/Gateways/TrashBinRestoreItem/index.js.map +1 -0
- package/Gateways/index.d.ts +4 -0
- package/Gateways/index.js +6 -0
- package/Gateways/index.js.map +1 -0
- package/LICENSE +21 -0
- package/Presentation/TrashBin/TrashBin.d.ts +22 -0
- package/Presentation/TrashBin/TrashBin.js +49 -0
- package/Presentation/TrashBin/TrashBin.js.map +1 -0
- package/Presentation/TrashBin/TrashBin.test.d.ts +1 -0
- package/Presentation/TrashBin/TrashBin.test.js +822 -0
- package/Presentation/TrashBin/TrashBin.test.js.map +1 -0
- package/Presentation/TrashBin/TrashBinControllers.d.ts +26 -0
- package/Presentation/TrashBin/TrashBinControllers.js +80 -0
- package/Presentation/TrashBin/TrashBinControllers.js.map +1 -0
- package/Presentation/TrashBin/TrashBinPresenter.d.ts +33 -0
- package/Presentation/TrashBin/TrashBinPresenter.js +59 -0
- package/Presentation/TrashBin/TrashBinPresenter.js.map +1 -0
- package/Presentation/TrashBin/controllers/BulkAction/BulkActionsController.d.ts +9 -0
- package/Presentation/TrashBin/controllers/BulkAction/BulkActionsController.js +12 -0
- package/Presentation/TrashBin/controllers/BulkAction/BulkActionsController.js.map +1 -0
- package/Presentation/TrashBin/controllers/BulkAction/IBulkActionsController.d.ts +4 -0
- package/Presentation/TrashBin/controllers/BulkAction/IBulkActionsController.js +3 -0
- package/Presentation/TrashBin/controllers/BulkAction/IBulkActionsController.js.map +1 -0
- package/Presentation/TrashBin/controllers/BulkAction/index.d.ts +2 -0
- package/Presentation/TrashBin/controllers/BulkAction/index.js +4 -0
- package/Presentation/TrashBin/controllers/BulkAction/index.js.map +1 -0
- package/Presentation/TrashBin/controllers/DeleteItem/DeleteItemController.d.ts +7 -0
- package/Presentation/TrashBin/controllers/DeleteItem/DeleteItemController.js +11 -0
- package/Presentation/TrashBin/controllers/DeleteItem/DeleteItemController.js.map +1 -0
- package/Presentation/TrashBin/controllers/DeleteItem/IDeleteItemController.d.ts +3 -0
- package/Presentation/TrashBin/controllers/DeleteItem/IDeleteItemController.js +3 -0
- package/Presentation/TrashBin/controllers/DeleteItem/IDeleteItemController.js.map +1 -0
- package/Presentation/TrashBin/controllers/DeleteItem/index.d.ts +2 -0
- package/Presentation/TrashBin/controllers/DeleteItem/index.js +4 -0
- package/Presentation/TrashBin/controllers/DeleteItem/index.js.map +1 -0
- package/Presentation/TrashBin/controllers/GetRestoredItemById/GetRestoredItemByIdController.d.ts +20 -0
- package/Presentation/TrashBin/controllers/GetRestoredItemById/GetRestoredItemByIdController.js +14 -0
- package/Presentation/TrashBin/controllers/GetRestoredItemById/GetRestoredItemByIdController.js.map +1 -0
- package/Presentation/TrashBin/controllers/GetRestoredItemById/IGetRestoredItemByIdController.d.ts +4 -0
- package/Presentation/TrashBin/controllers/GetRestoredItemById/IGetRestoredItemByIdController.js +3 -0
- package/Presentation/TrashBin/controllers/GetRestoredItemById/IGetRestoredItemByIdController.js.map +1 -0
- package/Presentation/TrashBin/controllers/GetRestoredItemById/index.d.ts +2 -0
- package/Presentation/TrashBin/controllers/GetRestoredItemById/index.js +4 -0
- package/Presentation/TrashBin/controllers/GetRestoredItemById/index.js.map +1 -0
- package/Presentation/TrashBin/controllers/ListItems/IListItemsController.d.ts +3 -0
- package/Presentation/TrashBin/controllers/ListItems/IListItemsController.js +3 -0
- package/Presentation/TrashBin/controllers/ListItems/IListItemsController.js.map +1 -0
- package/Presentation/TrashBin/controllers/ListItems/ListItemsController.d.ts +7 -0
- package/Presentation/TrashBin/controllers/ListItems/ListItemsController.js +11 -0
- package/Presentation/TrashBin/controllers/ListItems/ListItemsController.js.map +1 -0
- package/Presentation/TrashBin/controllers/ListItems/index.d.ts +2 -0
- package/Presentation/TrashBin/controllers/ListItems/index.js +4 -0
- package/Presentation/TrashBin/controllers/ListItems/index.js.map +1 -0
- package/Presentation/TrashBin/controllers/ListMoreItems/IListMoreItemsController.d.ts +3 -0
- package/Presentation/TrashBin/controllers/ListMoreItems/IListMoreItemsController.js +3 -0
- package/Presentation/TrashBin/controllers/ListMoreItems/IListMoreItemsController.js.map +1 -0
- package/Presentation/TrashBin/controllers/ListMoreItems/ListMoreItemsController.d.ts +7 -0
- package/Presentation/TrashBin/controllers/ListMoreItems/ListMoreItemsController.js +11 -0
- package/Presentation/TrashBin/controllers/ListMoreItems/ListMoreItemsController.js.map +1 -0
- package/Presentation/TrashBin/controllers/ListMoreItems/index.d.ts +2 -0
- package/Presentation/TrashBin/controllers/ListMoreItems/index.js +4 -0
- package/Presentation/TrashBin/controllers/ListMoreItems/index.js.map +1 -0
- package/Presentation/TrashBin/controllers/RestoreItem/IRestoreItemController.d.ts +3 -0
- package/Presentation/TrashBin/controllers/RestoreItem/IRestoreItemController.js +3 -0
- package/Presentation/TrashBin/controllers/RestoreItem/IRestoreItemController.js.map +1 -0
- package/Presentation/TrashBin/controllers/RestoreItem/RestoreItemController.d.ts +7 -0
- package/Presentation/TrashBin/controllers/RestoreItem/RestoreItemController.js +11 -0
- package/Presentation/TrashBin/controllers/RestoreItem/RestoreItemController.js.map +1 -0
- package/Presentation/TrashBin/controllers/RestoreItem/index.d.ts +2 -0
- package/Presentation/TrashBin/controllers/RestoreItem/index.js +4 -0
- package/Presentation/TrashBin/controllers/RestoreItem/index.js.map +1 -0
- package/Presentation/TrashBin/controllers/SearchItems/ISearchItemsController.d.ts +3 -0
- package/Presentation/TrashBin/controllers/SearchItems/ISearchItemsController.js +3 -0
- package/Presentation/TrashBin/controllers/SearchItems/ISearchItemsController.js.map +1 -0
- package/Presentation/TrashBin/controllers/SearchItems/SearchItemsController.d.ts +8 -0
- package/Presentation/TrashBin/controllers/SearchItems/SearchItemsController.js +14 -0
- package/Presentation/TrashBin/controllers/SearchItems/SearchItemsController.js.map +1 -0
- package/Presentation/TrashBin/controllers/SearchItems/index.d.ts +2 -0
- package/Presentation/TrashBin/controllers/SearchItems/index.js +4 -0
- package/Presentation/TrashBin/controllers/SearchItems/index.js.map +1 -0
- package/Presentation/TrashBin/controllers/SelectAllItems/ISelectAllItemsController.d.ts +3 -0
- package/Presentation/TrashBin/controllers/SelectAllItems/ISelectAllItemsController.js +3 -0
- package/Presentation/TrashBin/controllers/SelectAllItems/ISelectAllItemsController.js.map +1 -0
- package/Presentation/TrashBin/controllers/SelectAllItems/SelectAllItemsController.d.ts +7 -0
- package/Presentation/TrashBin/controllers/SelectAllItems/SelectAllItemsController.js +11 -0
- package/Presentation/TrashBin/controllers/SelectAllItems/SelectAllItemsController.js.map +1 -0
- package/Presentation/TrashBin/controllers/SelectAllItems/index.d.ts +2 -0
- package/Presentation/TrashBin/controllers/SelectAllItems/index.js +4 -0
- package/Presentation/TrashBin/controllers/SelectAllItems/index.js.map +1 -0
- package/Presentation/TrashBin/controllers/SelectItems/ISelectItemsController.d.ts +4 -0
- package/Presentation/TrashBin/controllers/SelectItems/ISelectItemsController.js +3 -0
- package/Presentation/TrashBin/controllers/SelectItems/ISelectItemsController.js.map +1 -0
- package/Presentation/TrashBin/controllers/SelectItems/SelectItemsController.d.ts +8 -0
- package/Presentation/TrashBin/controllers/SelectItems/SelectItemsController.js +13 -0
- package/Presentation/TrashBin/controllers/SelectItems/SelectItemsController.js.map +1 -0
- package/Presentation/TrashBin/controllers/SelectItems/index.d.ts +2 -0
- package/Presentation/TrashBin/controllers/SelectItems/index.js +4 -0
- package/Presentation/TrashBin/controllers/SelectItems/index.js.map +1 -0
- package/Presentation/TrashBin/controllers/SortItems/ISortItemsController.d.ts +4 -0
- package/Presentation/TrashBin/controllers/SortItems/ISortItemsController.js +3 -0
- package/Presentation/TrashBin/controllers/SortItems/ISortItemsController.js.map +1 -0
- package/Presentation/TrashBin/controllers/SortItems/SortItemsController.d.ts +9 -0
- package/Presentation/TrashBin/controllers/SortItems/SortItemsController.js +19 -0
- package/Presentation/TrashBin/controllers/SortItems/SortItemsController.js.map +1 -0
- package/Presentation/TrashBin/controllers/SortItems/index.d.ts +2 -0
- package/Presentation/TrashBin/controllers/SortItems/index.js +4 -0
- package/Presentation/TrashBin/controllers/SortItems/index.js.map +1 -0
- package/Presentation/TrashBin/controllers/UnselectAllItems/IUnselectAllItemsController.d.ts +3 -0
- package/Presentation/TrashBin/controllers/UnselectAllItems/IUnselectAllItemsController.js +3 -0
- package/Presentation/TrashBin/controllers/UnselectAllItems/IUnselectAllItemsController.js.map +1 -0
- package/Presentation/TrashBin/controllers/UnselectAllItems/UnselectAllItemsController.d.ts +7 -0
- package/Presentation/TrashBin/controllers/UnselectAllItems/UnselectAllItemsController.js +11 -0
- package/Presentation/TrashBin/controllers/UnselectAllItems/UnselectAllItemsController.js.map +1 -0
- package/Presentation/TrashBin/controllers/UnselectAllItems/index.d.ts +2 -0
- package/Presentation/TrashBin/controllers/UnselectAllItems/index.js +4 -0
- package/Presentation/TrashBin/controllers/UnselectAllItems/index.js.map +1 -0
- package/Presentation/TrashBin/controllers/index.d.ts +11 -0
- package/Presentation/TrashBin/controllers/index.js +13 -0
- package/Presentation/TrashBin/controllers/index.js.map +1 -0
- package/Presentation/TrashBin/index.d.ts +1 -0
- package/Presentation/TrashBin/index.js +3 -0
- package/Presentation/TrashBin/index.js.map +1 -0
- package/Presentation/TrashBinConfigs/TrashBinConfigs.d.ts +2 -0
- package/Presentation/TrashBinConfigs/TrashBinConfigs.js +57 -0
- package/Presentation/TrashBinConfigs/TrashBinConfigs.js.map +1 -0
- package/Presentation/TrashBinConfigs/index.d.ts +1 -0
- package/Presentation/TrashBinConfigs/index.js +3 -0
- package/Presentation/TrashBinConfigs/index.js.map +1 -0
- package/Presentation/TrashBinRenderer/TrashBinRenderer.d.ts +9 -0
- package/Presentation/TrashBinRenderer/TrashBinRenderer.js +21 -0
- package/Presentation/TrashBinRenderer/TrashBinRenderer.js.map +1 -0
- package/Presentation/TrashBinRenderer/index.d.ts +1 -0
- package/Presentation/TrashBinRenderer/index.js +3 -0
- package/Presentation/TrashBinRenderer/index.js.map +1 -0
- package/Presentation/abstractions/ITrashBinControllers.d.ts +15 -0
- package/Presentation/abstractions/ITrashBinControllers.js +3 -0
- package/Presentation/abstractions/ITrashBinControllers.js.map +1 -0
- package/Presentation/abstractions/ITrashBinPresenter.d.ts +22 -0
- package/Presentation/abstractions/ITrashBinPresenter.js +3 -0
- package/Presentation/abstractions/ITrashBinPresenter.js.map +1 -0
- package/Presentation/abstractions/index.d.ts +2 -0
- package/Presentation/abstractions/index.js +4 -0
- package/Presentation/abstractions/index.js.map +1 -0
- package/Presentation/components/Actions/DeleteItem/DeleteItem.d.ts +2 -0
- package/Presentation/components/Actions/DeleteItem/DeleteItem.js +25 -0
- package/Presentation/components/Actions/DeleteItem/DeleteItem.js.map +1 -0
- package/Presentation/components/Actions/DeleteItem/index.d.ts +1 -0
- package/Presentation/components/Actions/DeleteItem/index.js +3 -0
- package/Presentation/components/Actions/DeleteItem/index.js.map +1 -0
- package/Presentation/components/Actions/RestoreItem/RestoreItem.d.ts +2 -0
- package/Presentation/components/Actions/RestoreItem/RestoreItem.js +24 -0
- package/Presentation/components/Actions/RestoreItem/RestoreItem.js.map +1 -0
- package/Presentation/components/Actions/RestoreItem/index.d.ts +1 -0
- package/Presentation/components/Actions/RestoreItem/index.js +3 -0
- package/Presentation/components/Actions/RestoreItem/index.js.map +1 -0
- package/Presentation/components/Actions/index.d.ts +2 -0
- package/Presentation/components/Actions/index.js +4 -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 +24 -0
- package/Presentation/components/BottomInfoBar/BottomInfoBar.js.map +1 -0
- package/Presentation/components/BottomInfoBar/ListMeta.d.ts +7 -0
- package/Presentation/components/BottomInfoBar/ListMeta.js +17 -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 +20 -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/BulkActions/BulkActions/BulkActions.d.ts +3 -0
- package/Presentation/components/BulkActions/BulkActions/BulkActions.js +63 -0
- package/Presentation/components/BulkActions/BulkActions/BulkActions.js.map +1 -0
- package/Presentation/components/BulkActions/BulkActions/index.d.ts +1 -0
- package/Presentation/components/BulkActions/BulkActions/index.js +3 -0
- package/Presentation/components/BulkActions/BulkActions/index.js.map +1 -0
- package/Presentation/components/BulkActions/DeleteItems/DeleteItems.d.ts +4 -0
- package/Presentation/components/BulkActions/DeleteItems/DeleteItems.js +83 -0
- package/Presentation/components/BulkActions/DeleteItems/DeleteItems.js.map +1 -0
- package/Presentation/components/BulkActions/DeleteItems/index.d.ts +1 -0
- package/Presentation/components/BulkActions/DeleteItems/index.js +3 -0
- package/Presentation/components/BulkActions/DeleteItems/index.js.map +1 -0
- package/Presentation/components/BulkActions/RestoreItems/RestoreItems.d.ts +4 -0
- package/Presentation/components/BulkActions/RestoreItems/RestoreItems.js +94 -0
- package/Presentation/components/BulkActions/RestoreItems/RestoreItems.js.map +1 -0
- package/Presentation/components/BulkActions/RestoreItems/RestoreItemsReportMessage.d.ts +5 -0
- package/Presentation/components/BulkActions/RestoreItems/RestoreItemsReportMessage.js +13 -0
- package/Presentation/components/BulkActions/RestoreItems/RestoreItemsReportMessage.js.map +1 -0
- package/Presentation/components/BulkActions/RestoreItems/index.d.ts +1 -0
- package/Presentation/components/BulkActions/RestoreItems/index.js +3 -0
- package/Presentation/components/BulkActions/RestoreItems/index.js.map +1 -0
- package/Presentation/components/BulkActions/index.d.ts +3 -0
- package/Presentation/components/BulkActions/index.js +5 -0
- package/Presentation/components/BulkActions/index.js.map +1 -0
- package/Presentation/components/Cells/CellActions/CellActions.d.ts +2 -0
- package/Presentation/components/Cells/CellActions/CellActions.js +24 -0
- package/Presentation/components/Cells/CellActions/CellActions.js.map +1 -0
- package/Presentation/components/Cells/CellActions/index.d.ts +1 -0
- package/Presentation/components/Cells/CellActions/index.js +3 -0
- package/Presentation/components/Cells/CellActions/index.js.map +1 -0
- package/Presentation/components/Cells/CellCreatedBy/CellCreatedBy.d.ts +2 -0
- package/Presentation/components/Cells/CellCreatedBy/CellCreatedBy.js +13 -0
- package/Presentation/components/Cells/CellCreatedBy/CellCreatedBy.js.map +1 -0
- package/Presentation/components/Cells/CellCreatedBy/index.d.ts +1 -0
- package/Presentation/components/Cells/CellCreatedBy/index.js +3 -0
- package/Presentation/components/Cells/CellCreatedBy/index.js.map +1 -0
- package/Presentation/components/Cells/CellDeletedBy/CellDeletedBy.d.ts +2 -0
- package/Presentation/components/Cells/CellDeletedBy/CellDeletedBy.js +13 -0
- package/Presentation/components/Cells/CellDeletedBy/CellDeletedBy.js.map +1 -0
- package/Presentation/components/Cells/CellDeletedBy/index.d.ts +1 -0
- package/Presentation/components/Cells/CellDeletedBy/index.js +3 -0
- package/Presentation/components/Cells/CellDeletedBy/index.js.map +1 -0
- package/Presentation/components/Cells/CellDeletedOn/CellDeletedOn.d.ts +2 -0
- package/Presentation/components/Cells/CellDeletedOn/CellDeletedOn.js +16 -0
- package/Presentation/components/Cells/CellDeletedOn/CellDeletedOn.js.map +1 -0
- package/Presentation/components/Cells/CellDeletedOn/index.d.ts +1 -0
- package/Presentation/components/Cells/CellDeletedOn/index.js +3 -0
- package/Presentation/components/Cells/CellDeletedOn/index.js.map +1 -0
- package/Presentation/components/Cells/CellTitle/CellTitle.d.ts +2 -0
- package/Presentation/components/Cells/CellTitle/CellTitle.js +24 -0
- package/Presentation/components/Cells/CellTitle/CellTitle.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/index.d.ts +5 -0
- package/Presentation/components/Cells/index.js +7 -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 +25 -0
- package/Presentation/components/Empty/Empty.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/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 +23 -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 +14 -0
- package/Presentation/components/Title/Title.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/components/TrashBinOverlay/TrashBinOverlay.d.ts +7 -0
- package/Presentation/components/TrashBinOverlay/TrashBinOverlay.js +37 -0
- package/Presentation/components/TrashBinOverlay/TrashBinOverlay.js.map +1 -0
- package/Presentation/components/TrashBinOverlay/index.d.ts +1 -0
- package/Presentation/components/TrashBinOverlay/index.js +3 -0
- package/Presentation/components/TrashBinOverlay/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/BulkAction.d.ts +29 -0
- package/Presentation/configs/list/Browser/BulkAction.js +73 -0
- package/Presentation/configs/list/Browser/BulkAction.js.map +1 -0
- package/Presentation/configs/list/Browser/EntryAction.d.ts +7 -0
- package/Presentation/configs/list/Browser/EntryAction.js +17 -0
- package/Presentation/configs/list/Browser/EntryAction.js.map +1 -0
- package/Presentation/configs/list/Browser/Table/Column.d.ts +9 -0
- package/Presentation/configs/list/Browser/Table/Column.js +15 -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 +11 -0
- package/Presentation/configs/list/Browser/Table/Sorting.js.map +1 -0
- package/Presentation/configs/list/Browser/Table/index.d.ts +14 -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 +34 -0
- package/Presentation/configs/list/Browser/index.js +10 -0
- package/Presentation/configs/list/Browser/index.js.map +1 -0
- package/Presentation/configs/list/TrashBinListConfig.d.ts +41 -0
- package/Presentation/configs/list/TrashBinListConfig.js +29 -0
- package/Presentation/configs/list/TrashBinListConfig.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 +4 -0
- package/Presentation/hooks/index.js +6 -0
- package/Presentation/hooks/index.js.map +1 -0
- package/Presentation/hooks/useDeleteTrashBinItem.d.ts +8 -0
- package/Presentation/hooks/useDeleteTrashBinItem.js +32 -0
- package/Presentation/hooks/useDeleteTrashBinItem.js.map +1 -0
- package/Presentation/hooks/useRestoreTrashBinItem.d.ts +8 -0
- package/Presentation/hooks/useRestoreTrashBinItem.js +41 -0
- package/Presentation/hooks/useRestoreTrashBinItem.js.map +1 -0
- package/Presentation/hooks/useTrashBin.d.ts +31 -0
- package/Presentation/hooks/useTrashBin.js +49 -0
- package/Presentation/hooks/useTrashBin.js.map +1 -0
- package/Presentation/hooks/useTrashBinItem.d.ts +12 -0
- package/Presentation/hooks/useTrashBinItem.js +9 -0
- package/Presentation/hooks/useTrashBinItem.js.map +1 -0
- package/Presentation/index.d.ts +26 -0
- package/Presentation/index.js +51 -0
- package/Presentation/index.js.map +1 -0
- package/README.md +17 -0
- package/UseCases/BulkAction/BulkActionUseCase.d.ts +8 -0
- package/UseCases/BulkAction/BulkActionUseCase.js +12 -0
- package/UseCases/BulkAction/BulkActionUseCase.js.map +1 -0
- package/UseCases/BulkAction/IBulkActionUseCase.d.ts +4 -0
- package/UseCases/BulkAction/IBulkActionUseCase.js +3 -0
- package/UseCases/BulkAction/IBulkActionUseCase.js.map +1 -0
- package/UseCases/BulkAction/index.d.ts +2 -0
- package/UseCases/BulkAction/index.js +4 -0
- package/UseCases/BulkAction/index.js.map +1 -0
- package/UseCases/DeleteItem/DeleteItemUseCase.d.ts +7 -0
- package/UseCases/DeleteItem/DeleteItemUseCase.js +12 -0
- package/UseCases/DeleteItem/DeleteItemUseCase.js.map +1 -0
- package/UseCases/DeleteItem/IDeleteItemUseCase.d.ts +3 -0
- package/UseCases/DeleteItem/IDeleteItemUseCase.js +3 -0
- package/UseCases/DeleteItem/IDeleteItemUseCase.js.map +1 -0
- package/UseCases/DeleteItem/index.d.ts +2 -0
- package/UseCases/DeleteItem/index.js +4 -0
- package/UseCases/DeleteItem/index.js.map +1 -0
- package/UseCases/GetRestoredItem/GetRestoredItemUseCase.d.ts +7 -0
- package/UseCases/GetRestoredItem/GetRestoredItemUseCase.js +13 -0
- package/UseCases/GetRestoredItem/GetRestoredItemUseCase.js.map +1 -0
- package/UseCases/GetRestoredItem/IGetRestoredItemUseCase.d.ts +4 -0
- package/UseCases/GetRestoredItem/IGetRestoredItemUseCase.js +3 -0
- package/UseCases/GetRestoredItem/IGetRestoredItemUseCase.js.map +1 -0
- package/UseCases/GetRestoredItem/index.d.ts +2 -0
- package/UseCases/GetRestoredItem/index.js +4 -0
- package/UseCases/GetRestoredItem/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 +14 -0
- package/UseCases/ListItems/ListItemsUseCase.js.map +1 -0
- package/UseCases/ListItems/ListItemsUseCaseWithSearch.d.ts +9 -0
- package/UseCases/ListItems/ListItemsUseCaseWithSearch.js +17 -0
- package/UseCases/ListItems/ListItemsUseCaseWithSearch.js.map +1 -0
- package/UseCases/ListItems/ListItemsUseCaseWithSorting.d.ts +9 -0
- package/UseCases/ListItems/ListItemsUseCaseWithSorting.js +18 -0
- package/UseCases/ListItems/ListItemsUseCaseWithSorting.js.map +1 -0
- package/UseCases/ListItems/index.d.ts +4 -0
- package/UseCases/ListItems/index.js +6 -0
- package/UseCases/ListItems/index.js.map +1 -0
- package/UseCases/ListMoreItems/IListMoreItemsUseCase.d.ts +3 -0
- package/UseCases/ListMoreItems/IListMoreItemsUseCase.js +3 -0
- package/UseCases/ListMoreItems/IListMoreItemsUseCase.js.map +1 -0
- package/UseCases/ListMoreItems/ListMoreItemsUseCase.d.ts +7 -0
- package/UseCases/ListMoreItems/ListMoreItemsUseCase.js +12 -0
- package/UseCases/ListMoreItems/ListMoreItemsUseCase.js.map +1 -0
- package/UseCases/ListMoreItems/index.d.ts +2 -0
- package/UseCases/ListMoreItems/index.js +4 -0
- package/UseCases/ListMoreItems/index.js.map +1 -0
- package/UseCases/RestoreItem/IRestoreItemUseCase.d.ts +3 -0
- package/UseCases/RestoreItem/IRestoreItemUseCase.js +3 -0
- package/UseCases/RestoreItem/IRestoreItemUseCase.js.map +1 -0
- package/UseCases/RestoreItem/RestoreItemUseCase.d.ts +7 -0
- package/UseCases/RestoreItem/RestoreItemUseCase.js +12 -0
- package/UseCases/RestoreItem/RestoreItemUseCase.js.map +1 -0
- package/UseCases/RestoreItem/index.d.ts +2 -0
- package/UseCases/RestoreItem/index.js +4 -0
- package/UseCases/RestoreItem/index.js.map +1 -0
- package/UseCases/SearchItems/ISearchItemsUseCase.d.ts +3 -0
- package/UseCases/SearchItems/ISearchItemsUseCase.js +3 -0
- package/UseCases/SearchItems/ISearchItemsUseCase.js.map +1 -0
- package/UseCases/SearchItems/SearchItemsUseCase.d.ts +7 -0
- package/UseCases/SearchItems/SearchItemsUseCase.js +12 -0
- package/UseCases/SearchItems/SearchItemsUseCase.js.map +1 -0
- package/UseCases/SearchItems/index.d.ts +2 -0
- package/UseCases/SearchItems/index.js +4 -0
- package/UseCases/SearchItems/index.js.map +1 -0
- package/UseCases/SelectAllItems/ISelectAllItemsUseCase.d.ts +3 -0
- package/UseCases/SelectAllItems/ISelectAllItemsUseCase.js +3 -0
- package/UseCases/SelectAllItems/ISelectAllItemsUseCase.js.map +1 -0
- package/UseCases/SelectAllItems/SelectAllItemsUseCase.d.ts +7 -0
- package/UseCases/SelectAllItems/SelectAllItemsUseCase.js +12 -0
- package/UseCases/SelectAllItems/SelectAllItemsUseCase.js.map +1 -0
- package/UseCases/SelectAllItems/index.d.ts +2 -0
- package/UseCases/SelectAllItems/index.js +4 -0
- package/UseCases/SelectAllItems/index.js.map +1 -0
- package/UseCases/SelectItems/ISelectItemsUseCase.d.ts +4 -0
- package/UseCases/SelectItems/ISelectItemsUseCase.js +3 -0
- package/UseCases/SelectItems/ISelectItemsUseCase.js.map +1 -0
- package/UseCases/SelectItems/SelectItemsUseCase.d.ts +7 -0
- package/UseCases/SelectItems/SelectItemsUseCase.js +12 -0
- package/UseCases/SelectItems/SelectItemsUseCase.js.map +1 -0
- package/UseCases/SelectItems/index.d.ts +2 -0
- package/UseCases/SelectItems/index.js +4 -0
- package/UseCases/SelectItems/index.js.map +1 -0
- package/UseCases/SortItems/ISortItemsUseCase.d.ts +4 -0
- package/UseCases/SortItems/ISortItemsUseCase.js +3 -0
- package/UseCases/SortItems/ISortItemsUseCase.js.map +1 -0
- package/UseCases/SortItems/SortItemsUseCase.d.ts +7 -0
- package/UseCases/SortItems/SortItemsUseCase.js +12 -0
- package/UseCases/SortItems/SortItemsUseCase.js.map +1 -0
- package/UseCases/SortItems/index.d.ts +2 -0
- package/UseCases/SortItems/index.js +4 -0
- package/UseCases/SortItems/index.js.map +1 -0
- package/UseCases/UnSelectAllItems/IUnselectAllItemsUseCase.d.ts +3 -0
- package/UseCases/UnSelectAllItems/IUnselectAllItemsUseCase.js +3 -0
- package/UseCases/UnSelectAllItems/IUnselectAllItemsUseCase.js.map +1 -0
- package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.d.ts +7 -0
- package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.js +12 -0
- package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.js.map +1 -0
- package/UseCases/UnSelectAllItems/index.d.ts +2 -0
- package/UseCases/UnSelectAllItems/index.js +4 -0
- package/UseCases/UnSelectAllItems/index.js.map +1 -0
- package/UseCases/index.d.ts +11 -0
- package/UseCases/index.js +13 -0
- package/UseCases/index.js.map +1 -0
- package/index.d.ts +3 -0
- package/index.js +5 -0
- package/index.js.map +1 -0
- package/package.json +46 -0
- package/types.d.ts +43 -0
- package/types.js +9 -0
- package/types.js.map +1 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["ITrashBinItemMapper.ts"],"sourcesContent":["import type { TrashBinItemDTO } from \"./TrashBinItem\";\n\nexport interface ITrashBinItemMapper<TItem extends Record<string, any>> {\n toDTO: (data: TItem) => TrashBinItemDTO;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { TrashBinIdentity, TrashBinLocation } from "../../../types";
|
|
2
|
+
export interface TrashBinItemDTO {
|
|
3
|
+
id: string;
|
|
4
|
+
title: string;
|
|
5
|
+
createdBy: TrashBinIdentity;
|
|
6
|
+
deletedBy: TrashBinIdentity;
|
|
7
|
+
deletedOn: string;
|
|
8
|
+
location: TrashBinLocation;
|
|
9
|
+
[key: string]: any;
|
|
10
|
+
}
|
|
11
|
+
export declare class TrashBinItem {
|
|
12
|
+
id: string;
|
|
13
|
+
title: string;
|
|
14
|
+
location: TrashBinLocation;
|
|
15
|
+
createdBy: TrashBinIdentity;
|
|
16
|
+
deletedOn: string;
|
|
17
|
+
deletedBy: TrashBinIdentity;
|
|
18
|
+
protected constructor(item: TrashBinItemDTO);
|
|
19
|
+
static create(item: TrashBinItemDTO): TrashBinItem;
|
|
20
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export class TrashBinItem {
|
|
2
|
+
constructor(item) {
|
|
3
|
+
this.id = item.id;
|
|
4
|
+
this.title = item.title;
|
|
5
|
+
this.location = item.location;
|
|
6
|
+
this.createdBy = item.createdBy;
|
|
7
|
+
this.deletedOn = item.deletedOn;
|
|
8
|
+
this.deletedBy = item.deletedBy;
|
|
9
|
+
}
|
|
10
|
+
static create(item) {
|
|
11
|
+
return new TrashBinItem(item);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=TrashBinItem.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TrashBinItem","constructor","item","id","title","location","createdBy","deletedOn","deletedBy","create"],"sources":["TrashBinItem.ts"],"sourcesContent":["import type { TrashBinIdentity, TrashBinLocation } from \"~/types\";\n\nexport interface TrashBinItemDTO {\n id: string;\n title: string;\n createdBy: TrashBinIdentity;\n deletedBy: TrashBinIdentity;\n deletedOn: string;\n location: TrashBinLocation;\n [key: string]: any;\n}\n\nexport class TrashBinItem {\n public id: string;\n public title: string;\n public location: TrashBinLocation;\n public createdBy: TrashBinIdentity;\n public deletedOn: string;\n public deletedBy: TrashBinIdentity;\n\n protected constructor(item: TrashBinItemDTO) {\n this.id = item.id;\n this.title = item.title;\n this.location = item.location;\n this.createdBy = item.createdBy;\n this.deletedOn = item.deletedOn;\n this.deletedBy = item.deletedBy;\n }\n\n static create(item: TrashBinItemDTO) {\n return new TrashBinItem(item);\n }\n}\n"],"mappings":"AAYA,OAAO,MAAMA,YAAY,CAAC;EAQZC,WAAWA,CAACC,IAAqB,EAAE;IACzC,IAAI,CAACC,EAAE,GAAGD,IAAI,CAACC,EAAE;IACjB,IAAI,CAACC,KAAK,GAAGF,IAAI,CAACE,KAAK;IACvB,IAAI,CAACC,QAAQ,GAAGH,IAAI,CAACG,QAAQ;IAC7B,IAAI,CAACC,SAAS,GAAGJ,IAAI,CAACI,SAAS;IAC/B,IAAI,CAACC,SAAS,GAAGL,IAAI,CAACK,SAAS;IAC/B,IAAI,CAACC,SAAS,GAAGN,IAAI,CAACM,SAAS;EACnC;EAEA,OAAOC,MAAMA,CAACP,IAAqB,EAAE;IACjC,OAAO,IAAIF,YAAY,CAACE,IAAI,CAAC;EACjC;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./ITrashBinItemMapper\";\nexport * from \"./TrashBinItem\";\n"],"mappings":"AAAA;AACA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./TrashBinItem";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./TrashBinItem\";\n"],"mappings":"AAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["ISearchRepository.ts"],"sourcesContent":["export interface ISearchRepository {\n get: () => string;\n set: (query: string) => Promise<void>;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { makeAutoObservable } from "mobx";
|
|
2
|
+
export class SearchRepository {
|
|
3
|
+
query = "";
|
|
4
|
+
constructor() {
|
|
5
|
+
makeAutoObservable(this);
|
|
6
|
+
}
|
|
7
|
+
get() {
|
|
8
|
+
return this.query;
|
|
9
|
+
}
|
|
10
|
+
async set(query) {
|
|
11
|
+
this.query = query;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=SearchRepository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["makeAutoObservable","SearchRepository","query","constructor","get","set"],"sources":["SearchRepository.ts"],"sourcesContent":["import { makeAutoObservable } from \"mobx\";\nimport type { ISearchRepository } from \"./ISearchRepository\";\n\nexport class SearchRepository implements ISearchRepository {\n private query = \"\";\n\n constructor() {\n makeAutoObservable(this);\n }\n\n get() {\n return this.query;\n }\n\n async set(query: string) {\n this.query = query;\n }\n}\n"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,MAAM;AAGzC,OAAO,MAAMC,gBAAgB,CAA8B;EAC/CC,KAAK,GAAG,EAAE;EAElBC,WAAWA,CAAA,EAAG;IACVH,kBAAkB,CAAC,IAAI,CAAC;EAC5B;EAEAI,GAAGA,CAAA,EAAG;IACF,OAAO,IAAI,CAACF,KAAK;EACrB;EAEA,MAAMG,GAAGA,CAACH,KAAa,EAAE;IACrB,IAAI,CAACA,KAAK,GAAGA,KAAK;EACtB;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SearchRepository } from "./SearchRepository";
|
|
2
|
+
export class SearchRepositoryFactory {
|
|
3
|
+
cache = new Map();
|
|
4
|
+
getRepository() {
|
|
5
|
+
const cacheKey = this.getCacheKey();
|
|
6
|
+
if (!this.cache.has(cacheKey)) {
|
|
7
|
+
this.cache.set(cacheKey, new SearchRepository());
|
|
8
|
+
}
|
|
9
|
+
return this.cache.get(cacheKey);
|
|
10
|
+
}
|
|
11
|
+
getCacheKey() {
|
|
12
|
+
return Date.now().toString();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export const searchRepositoryFactory = new SearchRepositoryFactory();
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=SearchRepositoryFactory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["SearchRepository","SearchRepositoryFactory","cache","Map","getRepository","cacheKey","getCacheKey","has","set","get","Date","now","toString","searchRepositoryFactory"],"sources":["SearchRepositoryFactory.ts"],"sourcesContent":["import { SearchRepository } from \"./SearchRepository\";\n\nexport class SearchRepositoryFactory {\n private cache: Map<string, SearchRepository> = new Map();\n\n getRepository() {\n const cacheKey = this.getCacheKey();\n\n if (!this.cache.has(cacheKey)) {\n this.cache.set(cacheKey, new SearchRepository());\n }\n\n return this.cache.get(cacheKey) as SearchRepository;\n }\n\n private getCacheKey() {\n return Date.now().toString();\n }\n}\n\nexport const searchRepositoryFactory = new SearchRepositoryFactory();\n"],"mappings":"AAAA,SAASA,gBAAgB;AAEzB,OAAO,MAAMC,uBAAuB,CAAC;EACzBC,KAAK,GAAkC,IAAIC,GAAG,CAAC,CAAC;EAExDC,aAAaA,CAAA,EAAG;IACZ,MAAMC,QAAQ,GAAG,IAAI,CAACC,WAAW,CAAC,CAAC;IAEnC,IAAI,CAAC,IAAI,CAACJ,KAAK,CAACK,GAAG,CAACF,QAAQ,CAAC,EAAE;MAC3B,IAAI,CAACH,KAAK,CAACM,GAAG,CAACH,QAAQ,EAAE,IAAIL,gBAAgB,CAAC,CAAC,CAAC;IACpD;IAEA,OAAO,IAAI,CAACE,KAAK,CAACO,GAAG,CAACJ,QAAQ,CAAC;EACnC;EAEQC,WAAWA,CAAA,EAAG;IAClB,OAAOI,IAAI,CAACC,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAChC;AACJ;AAEA,OAAO,MAAMC,uBAAuB,GAAG,IAAIZ,uBAAuB,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./ISearchRepository\";\nexport * from \"./SearchRepository\";\nexport * from \"./SearchRepositoryFactory\";\n"],"mappings":"AAAA;AACA;AACA","ignoreList":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { TrashBinItem } from "../..";
|
|
2
|
+
export interface ISelectedItemsRepository {
|
|
3
|
+
selectItems: (items: TrashBinItem[]) => Promise<void>;
|
|
4
|
+
selectAllItems: () => Promise<void>;
|
|
5
|
+
unselectAllItems: () => Promise<void>;
|
|
6
|
+
getSelectedItems: () => TrashBinItem[];
|
|
7
|
+
getSelectedAllItems: () => boolean;
|
|
8
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["ISelectedItemsRepository.ts"],"sourcesContent":["import type { TrashBinItem } from \"~/Domain\";\n\nexport interface ISelectedItemsRepository {\n selectItems: (items: TrashBinItem[]) => Promise<void>;\n selectAllItems: () => Promise<void>;\n unselectAllItems: () => Promise<void>;\n getSelectedItems: () => TrashBinItem[];\n getSelectedAllItems: () => boolean;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { TrashBinItem } from "../..";
|
|
2
|
+
import type { ISelectedItemsRepository } from "./ISelectedItemsRepository";
|
|
3
|
+
export declare class SelectedItemsRepository implements ISelectedItemsRepository {
|
|
4
|
+
private items;
|
|
5
|
+
private selectedAll;
|
|
6
|
+
constructor();
|
|
7
|
+
getSelectedItems(): TrashBinItem[];
|
|
8
|
+
getSelectedAllItems(): boolean;
|
|
9
|
+
selectItems(items: TrashBinItem[]): Promise<void>;
|
|
10
|
+
selectAllItems(): Promise<void>;
|
|
11
|
+
unselectAllItems(): Promise<void>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { makeAutoObservable } from "mobx";
|
|
2
|
+
export class SelectedItemsRepository {
|
|
3
|
+
items = [];
|
|
4
|
+
selectedAll = false;
|
|
5
|
+
constructor() {
|
|
6
|
+
makeAutoObservable(this);
|
|
7
|
+
}
|
|
8
|
+
getSelectedItems() {
|
|
9
|
+
return this.items;
|
|
10
|
+
}
|
|
11
|
+
getSelectedAllItems() {
|
|
12
|
+
return this.selectedAll;
|
|
13
|
+
}
|
|
14
|
+
async selectItems(items) {
|
|
15
|
+
this.items = items;
|
|
16
|
+
this.selectedAll = false;
|
|
17
|
+
}
|
|
18
|
+
async selectAllItems() {
|
|
19
|
+
this.selectedAll = true;
|
|
20
|
+
}
|
|
21
|
+
async unselectAllItems() {
|
|
22
|
+
this.items = [];
|
|
23
|
+
this.selectedAll = false;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=SelectedItemsRepository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["makeAutoObservable","SelectedItemsRepository","items","selectedAll","constructor","getSelectedItems","getSelectedAllItems","selectItems","selectAllItems","unselectAllItems"],"sources":["SelectedItemsRepository.ts"],"sourcesContent":["import { makeAutoObservable } from \"mobx\";\nimport type { TrashBinItem } from \"~/Domain\";\nimport type { ISelectedItemsRepository } from \"./ISelectedItemsRepository\";\n\nexport class SelectedItemsRepository implements ISelectedItemsRepository {\n private items: TrashBinItem[] = [];\n private selectedAll = false;\n\n constructor() {\n makeAutoObservable(this);\n }\n\n getSelectedItems() {\n return this.items;\n }\n\n getSelectedAllItems() {\n return this.selectedAll;\n }\n\n async selectItems(items: TrashBinItem[]) {\n this.items = items;\n this.selectedAll = false;\n }\n\n async selectAllItems() {\n this.selectedAll = true;\n }\n\n async unselectAllItems() {\n this.items = [];\n this.selectedAll = false;\n }\n}\n"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,MAAM;AAIzC,OAAO,MAAMC,uBAAuB,CAAqC;EAC7DC,KAAK,GAAmB,EAAE;EAC1BC,WAAW,GAAG,KAAK;EAE3BC,WAAWA,CAAA,EAAG;IACVJ,kBAAkB,CAAC,IAAI,CAAC;EAC5B;EAEAK,gBAAgBA,CAAA,EAAG;IACf,OAAO,IAAI,CAACH,KAAK;EACrB;EAEAI,mBAAmBA,CAAA,EAAG;IAClB,OAAO,IAAI,CAACH,WAAW;EAC3B;EAEA,MAAMI,WAAWA,CAACL,KAAqB,EAAE;IACrC,IAAI,CAACA,KAAK,GAAGA,KAAK;IAClB,IAAI,CAACC,WAAW,GAAG,KAAK;EAC5B;EAEA,MAAMK,cAAcA,CAAA,EAAG;IACnB,IAAI,CAACL,WAAW,GAAG,IAAI;EAC3B;EAEA,MAAMM,gBAAgBA,CAAA,EAAG;IACrB,IAAI,CAACP,KAAK,GAAG,EAAE;IACf,IAAI,CAACC,WAAW,GAAG,KAAK;EAC5B;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SelectedItemsRepository } from "./SelectedItemsRepository";
|
|
2
|
+
export declare class SelectedItemsRepositoryFactory {
|
|
3
|
+
private cache;
|
|
4
|
+
getRepository(): SelectedItemsRepository;
|
|
5
|
+
private getCacheKey;
|
|
6
|
+
}
|
|
7
|
+
export declare const selectedItemsRepositoryFactory: SelectedItemsRepositoryFactory;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SelectedItemsRepository } from "./SelectedItemsRepository";
|
|
2
|
+
export class SelectedItemsRepositoryFactory {
|
|
3
|
+
cache = new Map();
|
|
4
|
+
getRepository() {
|
|
5
|
+
const cacheKey = this.getCacheKey();
|
|
6
|
+
if (!this.cache.has(cacheKey)) {
|
|
7
|
+
this.cache.set(cacheKey, new SelectedItemsRepository());
|
|
8
|
+
}
|
|
9
|
+
return this.cache.get(cacheKey);
|
|
10
|
+
}
|
|
11
|
+
getCacheKey() {
|
|
12
|
+
return Date.now().toString();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export const selectedItemsRepositoryFactory = new SelectedItemsRepositoryFactory();
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=SelectedItemsRepositoryFactory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["SelectedItemsRepository","SelectedItemsRepositoryFactory","cache","Map","getRepository","cacheKey","getCacheKey","has","set","get","Date","now","toString","selectedItemsRepositoryFactory"],"sources":["SelectedItemsRepositoryFactory.ts"],"sourcesContent":["import { SelectedItemsRepository } from \"./SelectedItemsRepository\";\n\nexport class SelectedItemsRepositoryFactory {\n private cache: Map<string, SelectedItemsRepository> = new Map();\n\n getRepository() {\n const cacheKey = this.getCacheKey();\n\n if (!this.cache.has(cacheKey)) {\n this.cache.set(cacheKey, new SelectedItemsRepository());\n }\n\n return this.cache.get(cacheKey) as SelectedItemsRepository;\n }\n\n private getCacheKey() {\n return Date.now().toString();\n }\n}\n\nexport const selectedItemsRepositoryFactory = new SelectedItemsRepositoryFactory();\n"],"mappings":"AAAA,SAASA,uBAAuB;AAEhC,OAAO,MAAMC,8BAA8B,CAAC;EAChCC,KAAK,GAAyC,IAAIC,GAAG,CAAC,CAAC;EAE/DC,aAAaA,CAAA,EAAG;IACZ,MAAMC,QAAQ,GAAG,IAAI,CAACC,WAAW,CAAC,CAAC;IAEnC,IAAI,CAAC,IAAI,CAACJ,KAAK,CAACK,GAAG,CAACF,QAAQ,CAAC,EAAE;MAC3B,IAAI,CAACH,KAAK,CAACM,GAAG,CAACH,QAAQ,EAAE,IAAIL,uBAAuB,CAAC,CAAC,CAAC;IAC3D;IAEA,OAAO,IAAI,CAACE,KAAK,CAACO,GAAG,CAACJ,QAAQ,CAAC;EACnC;EAEQC,WAAWA,CAAA,EAAG;IAClB,OAAOI,IAAI,CAACC,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAChC;AACJ;AAEA,OAAO,MAAMC,8BAA8B,GAAG,IAAIZ,8BAA8B,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./ISelectedItemsRepository\";\nexport * from \"./SelectedItemsRepository\";\nexport * from \"./SelectedItemsRepositoryFactory\";\n"],"mappings":"AAAA;AACA;AACA","ignoreList":[]}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { ISortingRepository, Sorting } from "@webiny/app-utils";
|
|
2
|
+
export declare class SortingRepositoryWithDefaults implements ISortingRepository {
|
|
3
|
+
private defaults;
|
|
4
|
+
private repository;
|
|
5
|
+
constructor(defaults: Sorting[], repository: ISortingRepository);
|
|
6
|
+
get(): Sorting[];
|
|
7
|
+
set(sorts: Sorting[]): Promise<void>;
|
|
8
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { makeAutoObservable, runInAction } from "mobx";
|
|
2
|
+
export class SortingRepositoryWithDefaults {
|
|
3
|
+
constructor(defaults, repository) {
|
|
4
|
+
this.defaults = defaults;
|
|
5
|
+
this.repository = repository;
|
|
6
|
+
makeAutoObservable(this);
|
|
7
|
+
}
|
|
8
|
+
get() {
|
|
9
|
+
const existingSort = this.repository.get();
|
|
10
|
+
if (existingSort.length === 0) {
|
|
11
|
+
runInAction(() => {
|
|
12
|
+
this.set(this.defaults);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
return this.repository.get();
|
|
16
|
+
}
|
|
17
|
+
async set(sorts) {
|
|
18
|
+
return this.repository.set(sorts);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
//# sourceMappingURL=SortingRepositoryWithDefaults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["makeAutoObservable","runInAction","SortingRepositoryWithDefaults","constructor","defaults","repository","get","existingSort","length","set","sorts"],"sources":["SortingRepositoryWithDefaults.ts"],"sourcesContent":["import { makeAutoObservable, runInAction } from \"mobx\";\nimport type { ISortingRepository, Sorting } from \"@webiny/app-utils\";\n\nexport class SortingRepositoryWithDefaults implements ISortingRepository {\n private defaults: Sorting[];\n private repository: ISortingRepository;\n\n constructor(defaults: Sorting[], repository: ISortingRepository) {\n this.defaults = defaults;\n this.repository = repository;\n makeAutoObservable(this);\n }\n\n get() {\n const existingSort = this.repository.get();\n\n if (existingSort.length === 0) {\n runInAction(() => {\n this.set(this.defaults);\n });\n }\n\n return this.repository.get();\n }\n\n async set(sorts: Sorting[]) {\n return this.repository.set(sorts);\n }\n}\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,WAAW,QAAQ,MAAM;AAGtD,OAAO,MAAMC,6BAA6B,CAA+B;EAIrEC,WAAWA,CAACC,QAAmB,EAAEC,UAA8B,EAAE;IAC7D,IAAI,CAACD,QAAQ,GAAGA,QAAQ;IACxB,IAAI,CAACC,UAAU,GAAGA,UAAU;IAC5BL,kBAAkB,CAAC,IAAI,CAAC;EAC5B;EAEAM,GAAGA,CAAA,EAAG;IACF,MAAMC,YAAY,GAAG,IAAI,CAACF,UAAU,CAACC,GAAG,CAAC,CAAC;IAE1C,IAAIC,YAAY,CAACC,MAAM,KAAK,CAAC,EAAE;MAC3BP,WAAW,CAAC,MAAM;QACd,IAAI,CAACQ,GAAG,CAAC,IAAI,CAACL,QAAQ,CAAC;MAC3B,CAAC,CAAC;IACN;IAEA,OAAO,IAAI,CAACC,UAAU,CAACC,GAAG,CAAC,CAAC;EAChC;EAEA,MAAMG,GAAGA,CAACC,KAAgB,EAAE;IACxB,OAAO,IAAI,CAACL,UAAU,CAACI,GAAG,CAACC,KAAK,CAAC;EACrC;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./SortingRepositoryWithDefaults";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./SortingRepositoryWithDefaults\";\n"],"mappings":"AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Meta } from "@webiny/app-utils";
|
|
2
|
+
import type { TrashBinItem } from "../..";
|
|
3
|
+
import type { TrashBinBulkActionsParams, TrashBinListQueryVariables } from "../../../types";
|
|
4
|
+
export interface ITrashBinItemsRepository {
|
|
5
|
+
listItems: (params?: TrashBinListQueryVariables) => Promise<void>;
|
|
6
|
+
listMoreItems: () => Promise<void>;
|
|
7
|
+
deleteItem: (id: string) => Promise<void>;
|
|
8
|
+
restoreItem: (id: string) => Promise<void>;
|
|
9
|
+
bulkAction: (action: string, params: TrashBinBulkActionsParams) => Promise<void>;
|
|
10
|
+
getItems: () => TrashBinItem[];
|
|
11
|
+
getRestoredItems: () => TrashBinItem[];
|
|
12
|
+
getMeta: () => Meta;
|
|
13
|
+
getLoading: () => Record<string, any>;
|
|
14
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sources":["ITrashBinItemsRepository.ts"],"sourcesContent":["import type { Meta } from \"@webiny/app-utils\";\nimport type { TrashBinItem } from \"~/Domain\";\nimport type { TrashBinBulkActionsParams, TrashBinListQueryVariables } from \"~/types\";\n\nexport interface ITrashBinItemsRepository {\n listItems: (params?: TrashBinListQueryVariables) => Promise<void>;\n listMoreItems: () => Promise<void>;\n deleteItem: (id: string) => Promise<void>;\n restoreItem: (id: string) => Promise<void>;\n bulkAction: (action: string, params: TrashBinBulkActionsParams) => Promise<void>;\n getItems: () => TrashBinItem[];\n getRestoredItems: () => TrashBinItem[];\n getMeta: () => Meta;\n getLoading: () => Record<string, any>;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { ITrashBinItemMapper, TrashBinItem } from "../..";
|
|
2
|
+
export declare class TrashBinItemMapper implements ITrashBinItemMapper<TrashBinItem> {
|
|
3
|
+
toDTO(data: TrashBinItem): {
|
|
4
|
+
id: string;
|
|
5
|
+
$selectable: boolean;
|
|
6
|
+
title: string;
|
|
7
|
+
location: import("../../../types").TrashBinLocation;
|
|
8
|
+
createdBy: import("../../../types").TrashBinIdentity;
|
|
9
|
+
deletedBy: {
|
|
10
|
+
id: string;
|
|
11
|
+
displayName: string;
|
|
12
|
+
type: string;
|
|
13
|
+
};
|
|
14
|
+
deletedOn: string;
|
|
15
|
+
};
|
|
16
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export class TrashBinItemMapper {
|
|
2
|
+
toDTO(data) {
|
|
3
|
+
return {
|
|
4
|
+
id: data.id,
|
|
5
|
+
$selectable: true,
|
|
6
|
+
title: data.title,
|
|
7
|
+
location: data.location,
|
|
8
|
+
createdBy: data.createdBy,
|
|
9
|
+
deletedBy: {
|
|
10
|
+
id: data.deletedBy?.id || "",
|
|
11
|
+
displayName: data.deletedBy?.displayName || "",
|
|
12
|
+
type: data.deletedBy?.type || ""
|
|
13
|
+
},
|
|
14
|
+
deletedOn: data.deletedOn || ""
|
|
15
|
+
};
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=TrashBinItemMapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TrashBinItemMapper","toDTO","data","id","$selectable","title","location","createdBy","deletedBy","displayName","type","deletedOn"],"sources":["TrashBinItemMapper.ts"],"sourcesContent":["import type { ITrashBinItemMapper, TrashBinItem } from \"~/Domain\";\n\nexport class TrashBinItemMapper implements ITrashBinItemMapper<TrashBinItem> {\n toDTO(data: TrashBinItem) {\n return {\n id: data.id,\n $selectable: true,\n title: data.title,\n location: data.location,\n createdBy: data.createdBy,\n deletedBy: {\n id: data.deletedBy?.id || \"\",\n displayName: data.deletedBy?.displayName || \"\",\n type: data.deletedBy?.type || \"\"\n },\n deletedOn: data.deletedOn || \"\"\n };\n }\n}\n"],"mappings":"AAEA,OAAO,MAAMA,kBAAkB,CAA8C;EACzEC,KAAKA,CAACC,IAAkB,EAAE;IACtB,OAAO;MACHC,EAAE,EAAED,IAAI,CAACC,EAAE;MACXC,WAAW,EAAE,IAAI;MACjBC,KAAK,EAAEH,IAAI,CAACG,KAAK;MACjBC,QAAQ,EAAEJ,IAAI,CAACI,QAAQ;MACvBC,SAAS,EAAEL,IAAI,CAACK,SAAS;MACzBC,SAAS,EAAE;QACPL,EAAE,EAAED,IAAI,CAACM,SAAS,EAAEL,EAAE,IAAI,EAAE;QAC5BM,WAAW,EAAEP,IAAI,CAACM,SAAS,EAAEC,WAAW,IAAI,EAAE;QAC9CC,IAAI,EAAER,IAAI,CAACM,SAAS,EAAEE,IAAI,IAAI;MAClC,CAAC;MACDC,SAAS,EAAET,IAAI,CAACS,SAAS,IAAI;IACjC,CAAC;EACL;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { ITrashBinItemMapper } from "../..";
|
|
2
|
+
import { TrashBinItem } from "../..";
|
|
3
|
+
import type { ITrashBinListGateway, ITrashBinDeleteItemGateway, ITrashBinRestoreItemGateway, ITrashBinBulkActionsGateway } from "../../../Gateways";
|
|
4
|
+
import type { IMetaRepository } from "@webiny/app-utils";
|
|
5
|
+
import { Meta } from "@webiny/app-utils";
|
|
6
|
+
import type { TrashBinBulkActionsParams, TrashBinListQueryVariables } from "../../../types";
|
|
7
|
+
import type { ITrashBinItemsRepository } from "./ITrashBinItemsRepository";
|
|
8
|
+
export declare class TrashBinItemsRepository<TItem extends Record<string, any>> implements ITrashBinItemsRepository {
|
|
9
|
+
private metaRepository;
|
|
10
|
+
private listGateway;
|
|
11
|
+
private deleteGateway;
|
|
12
|
+
private restoreGateway;
|
|
13
|
+
private bulkActionsGateway;
|
|
14
|
+
private itemMapper;
|
|
15
|
+
private items;
|
|
16
|
+
private restoredItems;
|
|
17
|
+
private params;
|
|
18
|
+
constructor(metaRepository: IMetaRepository, listGateway: ITrashBinListGateway<TItem>, deleteGateway: ITrashBinDeleteItemGateway, restoreGateway: ITrashBinRestoreItemGateway<TItem>, bulkActionsGateway: ITrashBinBulkActionsGateway, entryMapper: ITrashBinItemMapper<TItem>);
|
|
19
|
+
getItems(): TrashBinItem[];
|
|
20
|
+
getRestoredItems(): TrashBinItem[];
|
|
21
|
+
getMeta(): Meta;
|
|
22
|
+
getLoading(): {};
|
|
23
|
+
listItems(params?: TrashBinListQueryVariables): Promise<void>;
|
|
24
|
+
listMoreItems(): Promise<void>;
|
|
25
|
+
deleteItem(id: string): Promise<void>;
|
|
26
|
+
restoreItem(id: string): Promise<void>;
|
|
27
|
+
bulkAction(action: string, params: TrashBinBulkActionsParams): Promise<void>;
|
|
28
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
import { makeAutoObservable, runInAction } from "mobx";
|
|
2
|
+
import uniqBy from "lodash/uniqBy";
|
|
3
|
+
import { TrashBinItem } from "../..";
|
|
4
|
+
import { Meta } from "@webiny/app-utils";
|
|
5
|
+
export class TrashBinItemsRepository {
|
|
6
|
+
items = [];
|
|
7
|
+
restoredItems = [];
|
|
8
|
+
params = {};
|
|
9
|
+
constructor(metaRepository, listGateway, deleteGateway, restoreGateway, bulkActionsGateway, entryMapper) {
|
|
10
|
+
this.metaRepository = metaRepository;
|
|
11
|
+
this.listGateway = listGateway;
|
|
12
|
+
this.deleteGateway = deleteGateway;
|
|
13
|
+
this.restoreGateway = restoreGateway;
|
|
14
|
+
this.bulkActionsGateway = bulkActionsGateway;
|
|
15
|
+
this.itemMapper = entryMapper;
|
|
16
|
+
this.params = {};
|
|
17
|
+
makeAutoObservable(this);
|
|
18
|
+
}
|
|
19
|
+
getItems() {
|
|
20
|
+
return this.items;
|
|
21
|
+
}
|
|
22
|
+
getRestoredItems() {
|
|
23
|
+
return this.restoredItems;
|
|
24
|
+
}
|
|
25
|
+
getMeta() {
|
|
26
|
+
return this.metaRepository.get();
|
|
27
|
+
}
|
|
28
|
+
getLoading() {
|
|
29
|
+
return {};
|
|
30
|
+
}
|
|
31
|
+
async listItems(params) {
|
|
32
|
+
this.params = params || {};
|
|
33
|
+
const response = await this.listGateway.execute({
|
|
34
|
+
...params
|
|
35
|
+
});
|
|
36
|
+
if (!response) {
|
|
37
|
+
return;
|
|
38
|
+
}
|
|
39
|
+
runInAction(() => {
|
|
40
|
+
const [items, meta] = response;
|
|
41
|
+
this.items = items.map(entry => TrashBinItem.create(this.itemMapper.toDTO(entry)));
|
|
42
|
+
this.metaRepository.set(Meta.create(meta));
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
async listMoreItems() {
|
|
46
|
+
const {
|
|
47
|
+
cursor
|
|
48
|
+
} = this.metaRepository.get();
|
|
49
|
+
if (!cursor) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
const response = await this.listGateway.execute({
|
|
53
|
+
...this.params,
|
|
54
|
+
after: cursor
|
|
55
|
+
});
|
|
56
|
+
if (!response) {
|
|
57
|
+
return;
|
|
58
|
+
}
|
|
59
|
+
runInAction(() => {
|
|
60
|
+
const [items, meta] = response;
|
|
61
|
+
const itemsDTO = items.map(entry => TrashBinItem.create(this.itemMapper.toDTO(entry)));
|
|
62
|
+
this.items = uniqBy([...this.items, ...itemsDTO], "id");
|
|
63
|
+
this.metaRepository.set(Meta.create(meta));
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
async deleteItem(id) {
|
|
67
|
+
const response = await this.deleteGateway.execute(id);
|
|
68
|
+
if (!response) {
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
runInAction(() => {
|
|
72
|
+
this.items = this.items.filter(item => item.id !== id);
|
|
73
|
+
this.metaRepository.decreaseTotalCount(1);
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
async restoreItem(id) {
|
|
77
|
+
const item = await this.restoreGateway.execute(id);
|
|
78
|
+
if (!item) {
|
|
79
|
+
return;
|
|
80
|
+
}
|
|
81
|
+
runInAction(() => {
|
|
82
|
+
this.items = this.items.filter(item => item.id !== id);
|
|
83
|
+
this.restoredItems = [...this.restoredItems, TrashBinItem.create(this.itemMapper.toDTO(item))];
|
|
84
|
+
this.metaRepository.decreaseTotalCount(1);
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
async bulkAction(action, params) {
|
|
88
|
+
const {
|
|
89
|
+
where,
|
|
90
|
+
search,
|
|
91
|
+
data
|
|
92
|
+
} = params;
|
|
93
|
+
await this.bulkActionsGateway.execute({
|
|
94
|
+
action,
|
|
95
|
+
where,
|
|
96
|
+
search,
|
|
97
|
+
data
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
//# sourceMappingURL=TrashBinItemsRepository.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["makeAutoObservable","runInAction","uniqBy","TrashBinItem","Meta","TrashBinItemsRepository","items","restoredItems","params","constructor","metaRepository","listGateway","deleteGateway","restoreGateway","bulkActionsGateway","entryMapper","itemMapper","getItems","getRestoredItems","getMeta","get","getLoading","listItems","response","execute","meta","map","entry","create","toDTO","set","listMoreItems","cursor","after","itemsDTO","deleteItem","id","filter","item","decreaseTotalCount","restoreItem","bulkAction","action","where","search","data"],"sources":["TrashBinItemsRepository.ts"],"sourcesContent":["import { makeAutoObservable, runInAction } from \"mobx\";\nimport uniqBy from \"lodash/uniqBy\";\nimport type { ITrashBinItemMapper } from \"~/Domain\";\nimport { TrashBinItem } from \"~/Domain\";\nimport type {\n ITrashBinListGateway,\n ITrashBinDeleteItemGateway,\n ITrashBinRestoreItemGateway,\n ITrashBinBulkActionsGateway\n} from \"~/Gateways\";\nimport type { IMetaRepository } from \"@webiny/app-utils\";\nimport { Meta } from \"@webiny/app-utils\";\nimport type { TrashBinBulkActionsParams, TrashBinListQueryVariables } from \"~/types\";\nimport type { ITrashBinItemsRepository } from \"./ITrashBinItemsRepository\";\n\nexport class TrashBinItemsRepository<TItem extends Record<string, any>>\n implements ITrashBinItemsRepository\n{\n private metaRepository: IMetaRepository;\n private listGateway: ITrashBinListGateway<TItem>;\n private deleteGateway: ITrashBinDeleteItemGateway;\n private restoreGateway: ITrashBinRestoreItemGateway<TItem>;\n private bulkActionsGateway: ITrashBinBulkActionsGateway;\n private itemMapper: ITrashBinItemMapper<TItem>;\n private items: TrashBinItem[] = [];\n private restoredItems: TrashBinItem[] = [];\n private params: TrashBinListQueryVariables = {};\n\n constructor(\n metaRepository: IMetaRepository,\n listGateway: ITrashBinListGateway<TItem>,\n deleteGateway: ITrashBinDeleteItemGateway,\n restoreGateway: ITrashBinRestoreItemGateway<TItem>,\n bulkActionsGateway: ITrashBinBulkActionsGateway,\n entryMapper: ITrashBinItemMapper<TItem>\n ) {\n this.metaRepository = metaRepository;\n this.listGateway = listGateway;\n this.deleteGateway = deleteGateway;\n this.restoreGateway = restoreGateway;\n this.bulkActionsGateway = bulkActionsGateway;\n this.itemMapper = entryMapper;\n this.params = {};\n makeAutoObservable(this);\n }\n\n getItems() {\n return this.items;\n }\n\n getRestoredItems() {\n return this.restoredItems;\n }\n\n getMeta() {\n return this.metaRepository.get();\n }\n\n getLoading() {\n return {};\n }\n\n async listItems(params?: TrashBinListQueryVariables) {\n this.params = params || {};\n\n const response = await this.listGateway.execute({ ...params });\n\n if (!response) {\n return;\n }\n\n runInAction(() => {\n const [items, meta] = response;\n this.items = items.map(entry => TrashBinItem.create(this.itemMapper.toDTO(entry)));\n this.metaRepository.set(Meta.create(meta));\n });\n }\n\n 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 const [items, meta] = response;\n const itemsDTO = items.map(entry => TrashBinItem.create(this.itemMapper.toDTO(entry)));\n this.items = uniqBy([...this.items, ...itemsDTO], \"id\");\n this.metaRepository.set(Meta.create(meta));\n });\n }\n\n async deleteItem(id: string) {\n const response = await this.deleteGateway.execute(id);\n\n if (!response) {\n return;\n }\n\n runInAction(() => {\n this.items = this.items.filter(item => item.id !== id);\n this.metaRepository.decreaseTotalCount(1);\n });\n }\n\n async restoreItem(id: string) {\n const item = await this.restoreGateway.execute(id);\n\n if (!item) {\n return;\n }\n\n runInAction(() => {\n this.items = this.items.filter(item => item.id !== id);\n this.restoredItems = [\n ...this.restoredItems,\n TrashBinItem.create(this.itemMapper.toDTO(item))\n ];\n this.metaRepository.decreaseTotalCount(1);\n });\n }\n\n async bulkAction(action: string, params: TrashBinBulkActionsParams) {\n const { where, search, data } = params;\n await this.bulkActionsGateway.execute({ action, where, search, data });\n }\n}\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { IMetaRepository } from "@webiny/app-utils";
|
|
2
|
+
import type { ITrashBinItemMapper } from "../..";
|
|
3
|
+
import type { ITrashBinBulkActionsGateway, ITrashBinDeleteItemGateway, ITrashBinListGateway, ITrashBinRestoreItemGateway } from "../../../Gateways";
|
|
4
|
+
import { TrashBinItemsRepository } from "./TrashBinItemsRepository";
|
|
5
|
+
export declare class TrashBinItemsRepositoryFactory<TEntry extends Record<string, any>> {
|
|
6
|
+
private cache;
|
|
7
|
+
getRepository(metaRepository: IMetaRepository, listGateway: ITrashBinListGateway<TEntry>, deleteGateway: ITrashBinDeleteItemGateway, restoreGateway: ITrashBinRestoreItemGateway<TEntry>, bulkActionsGateway: ITrashBinBulkActionsGateway, itemMapper: ITrashBinItemMapper<TEntry>): TrashBinItemsRepository<TEntry>;
|
|
8
|
+
private getCacheKey;
|
|
9
|
+
}
|
|
10
|
+
export declare const trashBinItemsRepositoryFactory: TrashBinItemsRepositoryFactory<Record<string, any>>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { TrashBinItemsRepository } from "./TrashBinItemsRepository";
|
|
2
|
+
export class TrashBinItemsRepositoryFactory {
|
|
3
|
+
cache = new Map();
|
|
4
|
+
getRepository(metaRepository, listGateway, deleteGateway, restoreGateway, bulkActionsGateway, itemMapper) {
|
|
5
|
+
const cacheKey = this.getCacheKey();
|
|
6
|
+
if (!this.cache.has(cacheKey)) {
|
|
7
|
+
this.cache.set(cacheKey, new TrashBinItemsRepository(metaRepository, listGateway, deleteGateway, restoreGateway, bulkActionsGateway, itemMapper));
|
|
8
|
+
}
|
|
9
|
+
return this.cache.get(cacheKey);
|
|
10
|
+
}
|
|
11
|
+
getCacheKey() {
|
|
12
|
+
return Date.now().toString();
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
export const trashBinItemsRepositoryFactory = new TrashBinItemsRepositoryFactory();
|
|
16
|
+
|
|
17
|
+
//# sourceMappingURL=TrashBinItemsRepositoryFactory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["TrashBinItemsRepository","TrashBinItemsRepositoryFactory","cache","Map","getRepository","metaRepository","listGateway","deleteGateway","restoreGateway","bulkActionsGateway","itemMapper","cacheKey","getCacheKey","has","set","get","Date","now","toString","trashBinItemsRepositoryFactory"],"sources":["TrashBinItemsRepositoryFactory.ts"],"sourcesContent":["import type { IMetaRepository } from \"@webiny/app-utils\";\nimport type { ITrashBinItemMapper } from \"~/Domain\";\nimport type {\n ITrashBinBulkActionsGateway,\n ITrashBinDeleteItemGateway,\n ITrashBinListGateway,\n ITrashBinRestoreItemGateway\n} from \"~/Gateways\";\nimport { TrashBinItemsRepository } from \"./TrashBinItemsRepository\";\n\nexport class TrashBinItemsRepositoryFactory<TEntry extends Record<string, any>> {\n private cache: Map<string, TrashBinItemsRepository<TEntry>> = new Map();\n\n getRepository(\n metaRepository: IMetaRepository,\n listGateway: ITrashBinListGateway<TEntry>,\n deleteGateway: ITrashBinDeleteItemGateway,\n restoreGateway: ITrashBinRestoreItemGateway<TEntry>,\n bulkActionsGateway: ITrashBinBulkActionsGateway,\n itemMapper: ITrashBinItemMapper<TEntry>\n ) {\n const cacheKey = this.getCacheKey();\n\n if (!this.cache.has(cacheKey)) {\n this.cache.set(\n cacheKey,\n new TrashBinItemsRepository(\n metaRepository,\n listGateway,\n deleteGateway,\n restoreGateway,\n bulkActionsGateway,\n itemMapper\n )\n );\n }\n\n return this.cache.get(cacheKey) as TrashBinItemsRepository<TEntry>;\n }\n\n private getCacheKey() {\n return Date.now().toString();\n }\n}\n\nexport const trashBinItemsRepositoryFactory = new TrashBinItemsRepositoryFactory();\n"],"mappings":"AAQA,SAASA,uBAAuB;AAEhC,OAAO,MAAMC,8BAA8B,CAAqC;EACpEC,KAAK,GAAiD,IAAIC,GAAG,CAAC,CAAC;EAEvEC,aAAaA,CACTC,cAA+B,EAC/BC,WAAyC,EACzCC,aAAyC,EACzCC,cAAmD,EACnDC,kBAA+C,EAC/CC,UAAuC,EACzC;IACE,MAAMC,QAAQ,GAAG,IAAI,CAACC,WAAW,CAAC,CAAC;IAEnC,IAAI,CAAC,IAAI,CAACV,KAAK,CAACW,GAAG,CAACF,QAAQ,CAAC,EAAE;MAC3B,IAAI,CAACT,KAAK,CAACY,GAAG,CACVH,QAAQ,EACR,IAAIX,uBAAuB,CACvBK,cAAc,EACdC,WAAW,EACXC,aAAa,EACbC,cAAc,EACdC,kBAAkB,EAClBC,UACJ,CACJ,CAAC;IACL;IAEA,OAAO,IAAI,CAACR,KAAK,CAACa,GAAG,CAACJ,QAAQ,CAAC;EACnC;EAEQC,WAAWA,CAAA,EAAG;IAClB,OAAOI,IAAI,CAACC,GAAG,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAChC;AACJ;AAEA,OAAO,MAAMC,8BAA8B,GAAG,IAAIlB,8BAA8B,CAAC,CAAC","ignoreList":[]}
|