@webiny/app-scheduler 6.3.0-beta.4 → 6.4.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (353) hide show
  1. package/Domain/Models/SchedulerItem/SchedulerItem.js +15 -14
  2. package/Domain/Models/SchedulerItem/SchedulerItem.js.map +1 -1
  3. package/Domain/Models/SchedulerItem/index.js +0 -2
  4. package/Domain/Models/index.js +0 -2
  5. package/Domain/Repositories/SchedulerItems/ISchedulerItemsRepository.js +0 -3
  6. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.js +107 -116
  7. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.js.map +1 -1
  8. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.js +13 -12
  9. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.js.map +1 -1
  10. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.js +34 -33
  11. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.js.map +1 -1
  12. package/Domain/Repositories/SchedulerItems/index.js +0 -2
  13. package/Domain/Repositories/Search/ISearchRepository.js +0 -3
  14. package/Domain/Repositories/Search/SearchRepository.js +12 -11
  15. package/Domain/Repositories/Search/SearchRepository.js.map +1 -1
  16. package/Domain/Repositories/Search/SearchRepositoryFactory.js +13 -12
  17. package/Domain/Repositories/Search/SearchRepositoryFactory.js.map +1 -1
  18. package/Domain/Repositories/Search/index.js +0 -2
  19. package/Domain/Repositories/SelectedItems/ISelectedItemsRepository.js +0 -3
  20. package/Domain/Repositories/SelectedItems/SelectedItemsRepository.js +24 -23
  21. package/Domain/Repositories/SelectedItems/SelectedItemsRepository.js.map +1 -1
  22. package/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.js +13 -12
  23. package/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.js.map +1 -1
  24. package/Domain/Repositories/SelectedItems/index.js +0 -2
  25. package/Domain/Repositories/Sorting/SortingRepositoryWithDefaults.js +16 -17
  26. package/Domain/Repositories/Sorting/SortingRepositoryWithDefaults.js.map +1 -1
  27. package/Domain/Repositories/Sorting/index.js +0 -2
  28. package/Domain/Repositories/index.js +0 -2
  29. package/Domain/index.js +0 -2
  30. package/Gateways/SchedulerCancelGraphQLGateway.js +23 -29
  31. package/Gateways/SchedulerCancelGraphQLGateway.js.map +1 -1
  32. package/Gateways/SchedulerGetGraphQLGateway.js +41 -45
  33. package/Gateways/SchedulerGetGraphQLGateway.js.map +1 -1
  34. package/Gateways/SchedulerListGraphQLGateway.js +42 -48
  35. package/Gateways/SchedulerListGraphQLGateway.js.map +1 -1
  36. package/Gateways/SchedulerPublishGraphQLGateway.js +31 -39
  37. package/Gateways/SchedulerPublishGraphQLGateway.js.map +1 -1
  38. package/Gateways/SchedulerUnpublishGraphQLGateway.js +35 -41
  39. package/Gateways/SchedulerUnpublishGraphQLGateway.js.map +1 -1
  40. package/Gateways/abstractions/CancelScheduledActionGateway.js +0 -3
  41. package/Gateways/abstractions/GetScheduledActionGateway.js +0 -3
  42. package/Gateways/abstractions/ListScheduledActionsGateway.js +0 -3
  43. package/Gateways/abstractions/SchedulePublishActionGateway.js +0 -3
  44. package/Gateways/abstractions/ScheduleUnpublishActionGateway.js +0 -3
  45. package/Gateways/graphql/fields.js +2 -3
  46. package/Gateways/graphql/fields.js.map +1 -1
  47. package/Gateways/index.js +0 -3
  48. package/Gateways/schema/schedulerEntry.js +13 -16
  49. package/Gateways/schema/schedulerEntry.js.map +1 -1
  50. package/Presentation/Scheduler/Scheduler.js +69 -58
  51. package/Presentation/Scheduler/Scheduler.js.map +1 -1
  52. package/Presentation/Scheduler/SchedulerControllers.js +49 -67
  53. package/Presentation/Scheduler/SchedulerControllers.js.map +1 -1
  54. package/Presentation/Scheduler/SchedulerPresenter.js +39 -38
  55. package/Presentation/Scheduler/SchedulerPresenter.js.map +1 -1
  56. package/Presentation/Scheduler/controllers/CancelItem/CancelItemController.js +9 -8
  57. package/Presentation/Scheduler/controllers/CancelItem/CancelItemController.js.map +1 -1
  58. package/Presentation/Scheduler/controllers/CancelItem/ICancelItemController.js +0 -3
  59. package/Presentation/Scheduler/controllers/CancelItem/index.js +0 -2
  60. package/Presentation/Scheduler/controllers/GetItem/GetItemController.js +9 -8
  61. package/Presentation/Scheduler/controllers/GetItem/GetItemController.js.map +1 -1
  62. package/Presentation/Scheduler/controllers/GetItem/IGetItemController.js +0 -3
  63. package/Presentation/Scheduler/controllers/GetItem/index.js +0 -2
  64. package/Presentation/Scheduler/controllers/ListItems/IListItemsController.js +0 -3
  65. package/Presentation/Scheduler/controllers/ListItems/ListItemsController.js +9 -8
  66. package/Presentation/Scheduler/controllers/ListItems/ListItemsController.js.map +1 -1
  67. package/Presentation/Scheduler/controllers/ListItems/index.js +0 -2
  68. package/Presentation/Scheduler/controllers/ListMoreItems/IListMoreItemsController.js +0 -3
  69. package/Presentation/Scheduler/controllers/ListMoreItems/ListMoreItemsController.js +9 -8
  70. package/Presentation/Scheduler/controllers/ListMoreItems/ListMoreItemsController.js.map +1 -1
  71. package/Presentation/Scheduler/controllers/ListMoreItems/index.js +0 -2
  72. package/Presentation/Scheduler/controllers/PublishItem/IPublishItemController.js +0 -3
  73. package/Presentation/Scheduler/controllers/PublishItem/PublishItemController.js +9 -8
  74. package/Presentation/Scheduler/controllers/PublishItem/PublishItemController.js.map +1 -1
  75. package/Presentation/Scheduler/controllers/PublishItem/index.js +0 -2
  76. package/Presentation/Scheduler/controllers/SearchItems/ISearchItemsController.js +0 -3
  77. package/Presentation/Scheduler/controllers/SearchItems/SearchItemsController.js +12 -11
  78. package/Presentation/Scheduler/controllers/SearchItems/SearchItemsController.js.map +1 -1
  79. package/Presentation/Scheduler/controllers/SearchItems/index.js +0 -2
  80. package/Presentation/Scheduler/controllers/SelectAllItems/ISelectAllItemsController.js +0 -3
  81. package/Presentation/Scheduler/controllers/SelectAllItems/SelectAllItemsController.js +9 -8
  82. package/Presentation/Scheduler/controllers/SelectAllItems/SelectAllItemsController.js.map +1 -1
  83. package/Presentation/Scheduler/controllers/SelectAllItems/index.js +0 -2
  84. package/Presentation/Scheduler/controllers/SelectItems/ISelectItemsController.js +0 -3
  85. package/Presentation/Scheduler/controllers/SelectItems/SelectItemsController.js +10 -9
  86. package/Presentation/Scheduler/controllers/SelectItems/SelectItemsController.js.map +1 -1
  87. package/Presentation/Scheduler/controllers/SelectItems/index.js +0 -2
  88. package/Presentation/Scheduler/controllers/SortItems/ISortItemsController.d.ts +2 -2
  89. package/Presentation/Scheduler/controllers/SortItems/ISortItemsController.js +0 -3
  90. package/Presentation/Scheduler/controllers/SortItems/SortItemsController.d.ts +2 -2
  91. package/Presentation/Scheduler/controllers/SortItems/SortItemsController.js +13 -14
  92. package/Presentation/Scheduler/controllers/SortItems/SortItemsController.js.map +1 -1
  93. package/Presentation/Scheduler/controllers/SortItems/index.js +0 -2
  94. package/Presentation/Scheduler/controllers/UnpublishItem/IUnpublishItemController.js +0 -3
  95. package/Presentation/Scheduler/controllers/UnpublishItem/UnpublishItemController.js +9 -8
  96. package/Presentation/Scheduler/controllers/UnpublishItem/UnpublishItemController.js.map +1 -1
  97. package/Presentation/Scheduler/controllers/UnpublishItem/index.js +0 -2
  98. package/Presentation/Scheduler/controllers/UnselectAllItems/IUnselectAllItemsController.js +0 -3
  99. package/Presentation/Scheduler/controllers/UnselectAllItems/UnselectAllItemsController.js +9 -8
  100. package/Presentation/Scheduler/controllers/UnselectAllItems/UnselectAllItemsController.js.map +1 -1
  101. package/Presentation/Scheduler/controllers/UnselectAllItems/index.js +0 -2
  102. package/Presentation/Scheduler/controllers/index.js +0 -2
  103. package/Presentation/Scheduler/index.js +0 -2
  104. package/Presentation/SchedulerConfigs/SchedulerConfigs.js +48 -51
  105. package/Presentation/SchedulerConfigs/SchedulerConfigs.js.map +1 -1
  106. package/Presentation/SchedulerConfigs/index.js +0 -2
  107. package/Presentation/SchedulerRenderer/SchedulerRenderer.js +10 -15
  108. package/Presentation/SchedulerRenderer/SchedulerRenderer.js.map +1 -1
  109. package/Presentation/SchedulerRenderer/index.js +0 -2
  110. package/Presentation/abstractions/ISchedulerControllers.js +0 -3
  111. package/Presentation/abstractions/ISchedulerPresenter.js +0 -3
  112. package/Presentation/abstractions/index.js +0 -3
  113. package/Presentation/components/Actions/CancelItem/CancelItem.js +14 -19
  114. package/Presentation/components/Actions/CancelItem/CancelItem.js.map +1 -1
  115. package/Presentation/components/Actions/CancelItem/index.js +0 -2
  116. package/Presentation/components/Actions/index.js +0 -2
  117. package/Presentation/components/BottomInfoBar/BottomInfoBar.js +11 -12
  118. package/Presentation/components/BottomInfoBar/BottomInfoBar.js.map +1 -1
  119. package/Presentation/components/BottomInfoBar/BottomInfoBar.styled.js +41 -67
  120. package/Presentation/components/BottomInfoBar/BottomInfoBar.styled.js.map +1 -1
  121. package/Presentation/components/BottomInfoBar/ListMeta.js +6 -9
  122. package/Presentation/components/BottomInfoBar/ListMeta.js.map +1 -1
  123. package/Presentation/components/BottomInfoBar/ListStatus.js +8 -12
  124. package/Presentation/components/BottomInfoBar/ListStatus.js.map +1 -1
  125. package/Presentation/components/BottomInfoBar/index.js +0 -2
  126. package/Presentation/components/Cells/CellActions/CellActions.js +12 -17
  127. package/Presentation/components/Cells/CellActions/CellActions.js.map +1 -1
  128. package/Presentation/components/Cells/CellActions/index.js +0 -2
  129. package/Presentation/components/Cells/CellRevision/CellRevision.js +9 -14
  130. package/Presentation/components/Cells/CellRevision/CellRevision.js.map +1 -1
  131. package/Presentation/components/Cells/CellRevision/CellRevision.styled.d.ts +1 -1
  132. package/Presentation/components/Cells/CellRevision/CellRevision.styled.js +16 -42
  133. package/Presentation/components/Cells/CellRevision/CellRevision.styled.js.map +1 -1
  134. package/Presentation/components/Cells/CellRevision/index.js +0 -2
  135. package/Presentation/components/Cells/CellScheduledBy/CellScheduledBy.js +6 -9
  136. package/Presentation/components/Cells/CellScheduledBy/CellScheduledBy.js.map +1 -1
  137. package/Presentation/components/Cells/CellScheduledBy/index.js +0 -2
  138. package/Presentation/components/Cells/CellScheduledOn/CellScheduledOn.js +11 -18
  139. package/Presentation/components/Cells/CellScheduledOn/CellScheduledOn.js.map +1 -1
  140. package/Presentation/components/Cells/CellScheduledOn/index.js +0 -2
  141. package/Presentation/components/Cells/CellTitle/CellTitle.js +9 -12
  142. package/Presentation/components/Cells/CellTitle/CellTitle.js.map +1 -1
  143. package/Presentation/components/Cells/CellTitle/CellTitle.styled.d.ts +1 -1
  144. package/Presentation/components/Cells/CellTitle/CellTitle.styled.js +16 -42
  145. package/Presentation/components/Cells/CellTitle/CellTitle.styled.js.map +1 -1
  146. package/Presentation/components/Cells/CellTitle/index.js +0 -2
  147. package/Presentation/components/Cells/CellType/CellActionType.js +10 -13
  148. package/Presentation/components/Cells/CellType/CellActionType.js.map +1 -1
  149. package/Presentation/components/Cells/CellType/CellActionType.styled.d.ts +1 -1
  150. package/Presentation/components/Cells/CellType/CellActionType.styled.js +16 -42
  151. package/Presentation/components/Cells/CellType/CellActionType.styled.js.map +1 -1
  152. package/Presentation/components/Cells/CellType/index.js +0 -2
  153. package/Presentation/components/Cells/index.js +0 -2
  154. package/Presentation/components/Empty/Empty.js +15 -16
  155. package/Presentation/components/Empty/Empty.js.map +1 -1
  156. package/Presentation/components/Empty/Empty.styled.js +14 -28
  157. package/Presentation/components/Empty/Empty.styled.js.map +1 -1
  158. package/Presentation/components/Empty/index.js +0 -2
  159. package/Presentation/components/ScheduleDialog/IScheduleDialogPresenter.js +0 -3
  160. package/Presentation/components/ScheduleDialog/ScheduleDialogPresenter.js +75 -79
  161. package/Presentation/components/ScheduleDialog/ScheduleDialogPresenter.js.map +1 -1
  162. package/Presentation/components/ScheduleDialog/index.js +0 -2
  163. package/Presentation/components/ScheduleDialog/types.js +0 -3
  164. package/Presentation/components/ScheduleDialog/useScheduleDialog.js +165 -207
  165. package/Presentation/components/ScheduleDialog/useScheduleDialog.js.map +1 -1
  166. package/Presentation/components/SchedulerOverlay/SchedulerOverlay.js +19 -25
  167. package/Presentation/components/SchedulerOverlay/SchedulerOverlay.js.map +1 -1
  168. package/Presentation/components/SchedulerOverlay/index.js +0 -2
  169. package/Presentation/components/SearchInput/SearchInput.js +25 -32
  170. package/Presentation/components/SearchInput/SearchInput.js.map +1 -1
  171. package/Presentation/components/SearchInput/index.js +0 -2
  172. package/Presentation/components/Table/Table.js +23 -28
  173. package/Presentation/components/Table/Table.js.map +1 -1
  174. package/Presentation/components/Table/index.js +0 -2
  175. package/Presentation/components/Title/Title.js +7 -12
  176. package/Presentation/components/Title/Title.js.map +1 -1
  177. package/Presentation/components/Title/Title.styled.d.ts +1 -2
  178. package/Presentation/components/Title/Title.styled.js +11 -16
  179. package/Presentation/components/Title/Title.styled.js.map +1 -1
  180. package/Presentation/components/Title/index.js +0 -2
  181. package/Presentation/configs/index.js +0 -2
  182. package/Presentation/configs/list/Browser/EntryAction.js +8 -11
  183. package/Presentation/configs/list/Browser/EntryAction.js.map +1 -1
  184. package/Presentation/configs/list/Browser/Table/Column.js +7 -10
  185. package/Presentation/configs/list/Browser/Table/Column.js.map +1 -1
  186. package/Presentation/configs/list/Browser/Table/Sorting.js +4 -7
  187. package/Presentation/configs/list/Browser/Table/Sorting.js.map +1 -1
  188. package/Presentation/configs/list/Browser/Table/index.js +4 -3
  189. package/Presentation/configs/list/Browser/Table/index.js.map +1 -1
  190. package/Presentation/configs/list/Browser/index.js +4 -3
  191. package/Presentation/configs/list/Browser/index.js.map +1 -1
  192. package/Presentation/configs/list/SchedulerListConfig.js +20 -21
  193. package/Presentation/configs/list/SchedulerListConfig.js.map +1 -1
  194. package/Presentation/configs/list/index.js +0 -2
  195. package/Presentation/hooks/index.js +0 -2
  196. package/Presentation/hooks/useCancelSchedulerItem.js +22 -27
  197. package/Presentation/hooks/useCancelSchedulerItem.js.map +1 -1
  198. package/Presentation/hooks/useScheduler.js +62 -46
  199. package/Presentation/hooks/useScheduler.js.map +1 -1
  200. package/Presentation/hooks/useSchedulerItem.js +4 -6
  201. package/Presentation/hooks/useSchedulerItem.js.map +1 -1
  202. package/Presentation/index.js +35 -42
  203. package/Presentation/index.js.map +1 -1
  204. package/UseCases/CancelItem/CancelItemUseCase.js +9 -8
  205. package/UseCases/CancelItem/CancelItemUseCase.js.map +1 -1
  206. package/UseCases/CancelItem/ICancelItemUseCase.js +0 -3
  207. package/UseCases/CancelItem/index.js +0 -2
  208. package/UseCases/GetItem/GetItemUseCase.js +9 -8
  209. package/UseCases/GetItem/GetItemUseCase.js.map +1 -1
  210. package/UseCases/GetItem/IGetItemUseCase.js +0 -3
  211. package/UseCases/GetItem/index.js +0 -2
  212. package/UseCases/GetScheduledItem/GetScheduledItemUseCase.js +10 -9
  213. package/UseCases/GetScheduledItem/GetScheduledItemUseCase.js.map +1 -1
  214. package/UseCases/GetScheduledItem/IGetScheduledItemUseCase.js +0 -3
  215. package/UseCases/GetScheduledItem/index.js +0 -2
  216. package/UseCases/ListItems/IListItemsUseCase.js +0 -3
  217. package/UseCases/ListItems/ListItemsUseCase.js +9 -8
  218. package/UseCases/ListItems/ListItemsUseCase.js.map +1 -1
  219. package/UseCases/ListItems/ListItemsUseCaseWithSearch.js +19 -18
  220. package/UseCases/ListItems/ListItemsUseCaseWithSearch.js.map +1 -1
  221. package/UseCases/ListItems/ListItemsUseCaseWithSorting.js +16 -17
  222. package/UseCases/ListItems/ListItemsUseCaseWithSorting.js.map +1 -1
  223. package/UseCases/ListItems/index.js +0 -2
  224. package/UseCases/ListMoreItems/IListMoreItemsUseCase.js +0 -3
  225. package/UseCases/ListMoreItems/ListMoreItemsUseCase.js +9 -8
  226. package/UseCases/ListMoreItems/ListMoreItemsUseCase.js.map +1 -1
  227. package/UseCases/ListMoreItems/index.js +0 -2
  228. package/UseCases/PublishItem/IPublishItemUseCase.js +0 -3
  229. package/UseCases/PublishItem/PublishItemUseCase.js +9 -8
  230. package/UseCases/PublishItem/PublishItemUseCase.js.map +1 -1
  231. package/UseCases/PublishItem/index.js +0 -2
  232. package/UseCases/SearchItems/ISearchItemsUseCase.js +0 -3
  233. package/UseCases/SearchItems/SearchItemsUseCase.js +9 -8
  234. package/UseCases/SearchItems/SearchItemsUseCase.js.map +1 -1
  235. package/UseCases/SearchItems/index.js +0 -2
  236. package/UseCases/SelectAllItems/ISelectAllItemsUseCase.js +0 -3
  237. package/UseCases/SelectAllItems/SelectAllItemsUseCase.js +9 -8
  238. package/UseCases/SelectAllItems/SelectAllItemsUseCase.js.map +1 -1
  239. package/UseCases/SelectAllItems/index.js +0 -2
  240. package/UseCases/SelectItems/ISelectItemsUseCase.js +0 -3
  241. package/UseCases/SelectItems/SelectItemsUseCase.js +9 -8
  242. package/UseCases/SelectItems/SelectItemsUseCase.js.map +1 -1
  243. package/UseCases/SelectItems/index.js +0 -2
  244. package/UseCases/SortItems/ISortItemsUseCase.js +0 -3
  245. package/UseCases/SortItems/SortItemsUseCase.js +9 -8
  246. package/UseCases/SortItems/SortItemsUseCase.js.map +1 -1
  247. package/UseCases/SortItems/index.js +0 -2
  248. package/UseCases/UnSelectAllItems/IUnselectAllItemsUseCase.js +0 -3
  249. package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.js +9 -8
  250. package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.js.map +1 -1
  251. package/UseCases/UnSelectAllItems/index.js +0 -2
  252. package/UseCases/UnpublishItem/IUnpublishItemUseCase.js +0 -3
  253. package/UseCases/UnpublishItem/UnpublishItemUseCase.js +9 -8
  254. package/UseCases/UnpublishItem/UnpublishItemUseCase.js.map +1 -1
  255. package/UseCases/UnpublishItem/index.js +0 -2
  256. package/UseCases/index.js +0 -2
  257. package/index.js +1 -3
  258. package/package.json +16 -18
  259. package/types.js +12 -11
  260. package/types.js.map +1 -1
  261. package/Domain/Models/SchedulerItem/index.js.map +0 -1
  262. package/Domain/Models/index.js.map +0 -1
  263. package/Domain/Repositories/SchedulerItems/ISchedulerItemsRepository.js.map +0 -1
  264. package/Domain/Repositories/SchedulerItems/index.js.map +0 -1
  265. package/Domain/Repositories/Search/ISearchRepository.js.map +0 -1
  266. package/Domain/Repositories/Search/index.js.map +0 -1
  267. package/Domain/Repositories/SelectedItems/ISelectedItemsRepository.js.map +0 -1
  268. package/Domain/Repositories/SelectedItems/index.js.map +0 -1
  269. package/Domain/Repositories/Sorting/index.js.map +0 -1
  270. package/Domain/Repositories/index.js.map +0 -1
  271. package/Domain/index.js.map +0 -1
  272. package/Gateways/abstractions/CancelScheduledActionGateway.js.map +0 -1
  273. package/Gateways/abstractions/GetScheduledActionGateway.js.map +0 -1
  274. package/Gateways/abstractions/ListScheduledActionsGateway.js.map +0 -1
  275. package/Gateways/abstractions/SchedulePublishActionGateway.js.map +0 -1
  276. package/Gateways/abstractions/ScheduleUnpublishActionGateway.js.map +0 -1
  277. package/Gateways/index.js.map +0 -1
  278. package/Presentation/Scheduler/controllers/CancelItem/ICancelItemController.js.map +0 -1
  279. package/Presentation/Scheduler/controllers/CancelItem/index.js.map +0 -1
  280. package/Presentation/Scheduler/controllers/GetItem/IGetItemController.js.map +0 -1
  281. package/Presentation/Scheduler/controllers/GetItem/index.js.map +0 -1
  282. package/Presentation/Scheduler/controllers/ListItems/IListItemsController.js.map +0 -1
  283. package/Presentation/Scheduler/controllers/ListItems/index.js.map +0 -1
  284. package/Presentation/Scheduler/controllers/ListMoreItems/IListMoreItemsController.js.map +0 -1
  285. package/Presentation/Scheduler/controllers/ListMoreItems/index.js.map +0 -1
  286. package/Presentation/Scheduler/controllers/PublishItem/IPublishItemController.js.map +0 -1
  287. package/Presentation/Scheduler/controllers/PublishItem/index.js.map +0 -1
  288. package/Presentation/Scheduler/controllers/SearchItems/ISearchItemsController.js.map +0 -1
  289. package/Presentation/Scheduler/controllers/SearchItems/index.js.map +0 -1
  290. package/Presentation/Scheduler/controllers/SelectAllItems/ISelectAllItemsController.js.map +0 -1
  291. package/Presentation/Scheduler/controllers/SelectAllItems/index.js.map +0 -1
  292. package/Presentation/Scheduler/controllers/SelectItems/ISelectItemsController.js.map +0 -1
  293. package/Presentation/Scheduler/controllers/SelectItems/index.js.map +0 -1
  294. package/Presentation/Scheduler/controllers/SortItems/ISortItemsController.js.map +0 -1
  295. package/Presentation/Scheduler/controllers/SortItems/index.js.map +0 -1
  296. package/Presentation/Scheduler/controllers/UnpublishItem/IUnpublishItemController.js.map +0 -1
  297. package/Presentation/Scheduler/controllers/UnpublishItem/index.js.map +0 -1
  298. package/Presentation/Scheduler/controllers/UnselectAllItems/IUnselectAllItemsController.js.map +0 -1
  299. package/Presentation/Scheduler/controllers/UnselectAllItems/index.js.map +0 -1
  300. package/Presentation/Scheduler/controllers/index.js.map +0 -1
  301. package/Presentation/Scheduler/index.js.map +0 -1
  302. package/Presentation/SchedulerConfigs/index.js.map +0 -1
  303. package/Presentation/SchedulerRenderer/index.js.map +0 -1
  304. package/Presentation/abstractions/ISchedulerControllers.js.map +0 -1
  305. package/Presentation/abstractions/ISchedulerPresenter.js.map +0 -1
  306. package/Presentation/abstractions/index.js.map +0 -1
  307. package/Presentation/components/Actions/CancelItem/index.js.map +0 -1
  308. package/Presentation/components/Actions/index.js.map +0 -1
  309. package/Presentation/components/BottomInfoBar/index.js.map +0 -1
  310. package/Presentation/components/Cells/CellActions/index.js.map +0 -1
  311. package/Presentation/components/Cells/CellRevision/index.js.map +0 -1
  312. package/Presentation/components/Cells/CellScheduledBy/index.js.map +0 -1
  313. package/Presentation/components/Cells/CellScheduledOn/index.js.map +0 -1
  314. package/Presentation/components/Cells/CellTitle/index.js.map +0 -1
  315. package/Presentation/components/Cells/CellType/index.js.map +0 -1
  316. package/Presentation/components/Cells/index.js.map +0 -1
  317. package/Presentation/components/Empty/index.js.map +0 -1
  318. package/Presentation/components/ScheduleDialog/IScheduleDialogPresenter.js.map +0 -1
  319. package/Presentation/components/ScheduleDialog/index.js.map +0 -1
  320. package/Presentation/components/ScheduleDialog/types.js.map +0 -1
  321. package/Presentation/components/SchedulerOverlay/index.js.map +0 -1
  322. package/Presentation/components/SearchInput/index.js.map +0 -1
  323. package/Presentation/components/Table/index.js.map +0 -1
  324. package/Presentation/components/Title/index.js.map +0 -1
  325. package/Presentation/configs/index.js.map +0 -1
  326. package/Presentation/configs/list/index.js.map +0 -1
  327. package/Presentation/hooks/index.js.map +0 -1
  328. package/UseCases/CancelItem/ICancelItemUseCase.js.map +0 -1
  329. package/UseCases/CancelItem/index.js.map +0 -1
  330. package/UseCases/GetItem/IGetItemUseCase.js.map +0 -1
  331. package/UseCases/GetItem/index.js.map +0 -1
  332. package/UseCases/GetScheduledItem/IGetScheduledItemUseCase.js.map +0 -1
  333. package/UseCases/GetScheduledItem/index.js.map +0 -1
  334. package/UseCases/ListItems/IListItemsUseCase.js.map +0 -1
  335. package/UseCases/ListItems/index.js.map +0 -1
  336. package/UseCases/ListMoreItems/IListMoreItemsUseCase.js.map +0 -1
  337. package/UseCases/ListMoreItems/index.js.map +0 -1
  338. package/UseCases/PublishItem/IPublishItemUseCase.js.map +0 -1
  339. package/UseCases/PublishItem/index.js.map +0 -1
  340. package/UseCases/SearchItems/ISearchItemsUseCase.js.map +0 -1
  341. package/UseCases/SearchItems/index.js.map +0 -1
  342. package/UseCases/SelectAllItems/ISelectAllItemsUseCase.js.map +0 -1
  343. package/UseCases/SelectAllItems/index.js.map +0 -1
  344. package/UseCases/SelectItems/ISelectItemsUseCase.js.map +0 -1
  345. package/UseCases/SelectItems/index.js.map +0 -1
  346. package/UseCases/SortItems/ISortItemsUseCase.js.map +0 -1
  347. package/UseCases/SortItems/index.js.map +0 -1
  348. package/UseCases/UnSelectAllItems/IUnselectAllItemsUseCase.js.map +0 -1
  349. package/UseCases/UnSelectAllItems/index.js.map +0 -1
  350. package/UseCases/UnpublishItem/IUnpublishItemUseCase.js.map +0 -1
  351. package/UseCases/UnpublishItem/index.js.map +0 -1
  352. package/UseCases/index.js.map +0 -1
  353. package/index.js.map +0 -1
@@ -1,17 +1,18 @@
1
- export class SchedulerItem {
2
- constructor(item) {
3
- this.id = item.id;
4
- this.title = item.title;
5
- this.actionType = item.actionType;
6
- this.targetId = item.targetId;
7
- this.namespace = item.namespace;
8
- this.scheduledBy = item.scheduledBy;
9
- this.publishOn = item.publishOn;
10
- this.unpublishOn = item.unpublishOn;
11
- }
12
- static create(item) {
13
- return new SchedulerItem(item);
14
- }
1
+ class SchedulerItem {
2
+ constructor(item){
3
+ this.id = item.id;
4
+ this.title = item.title;
5
+ this.actionType = item.actionType;
6
+ this.targetId = item.targetId;
7
+ this.namespace = item.namespace;
8
+ this.scheduledBy = item.scheduledBy;
9
+ this.publishOn = item.publishOn;
10
+ this.unpublishOn = item.unpublishOn;
11
+ }
12
+ static create(item) {
13
+ return new SchedulerItem(item);
14
+ }
15
15
  }
16
+ export { SchedulerItem };
16
17
 
17
18
  //# sourceMappingURL=SchedulerItem.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["SchedulerItem","constructor","item","id","title","actionType","targetId","namespace","scheduledBy","publishOn","unpublishOn","create"],"sources":["SchedulerItem.ts"],"sourcesContent":["import type { SchedulerIdentity, SchedulerEntry, ScheduleActionType } from \"~/types.js\";\n\nexport class SchedulerItem {\n public readonly id: string;\n public readonly title: string;\n public readonly actionType: ScheduleActionType;\n public readonly targetId: string;\n public readonly namespace: string;\n public readonly scheduledBy: SchedulerIdentity;\n public readonly publishOn?: Date;\n public readonly unpublishOn?: Date;\n\n protected constructor(item: SchedulerEntry) {\n this.id = item.id;\n this.title = item.title;\n this.actionType = item.actionType;\n this.targetId = item.targetId;\n this.namespace = item.namespace;\n this.scheduledBy = item.scheduledBy;\n this.publishOn = item.publishOn;\n this.unpublishOn = item.unpublishOn;\n }\n\n public static create(item: SchedulerEntry) {\n return new SchedulerItem(item);\n }\n}\n"],"mappings":"AAEA,OAAO,MAAMA,aAAa,CAAC;EAUbC,WAAWA,CAACC,IAAoB,EAAE;IACxC,IAAI,CAACC,EAAE,GAAGD,IAAI,CAACC,EAAE;IACjB,IAAI,CAACC,KAAK,GAAGF,IAAI,CAACE,KAAK;IACvB,IAAI,CAACC,UAAU,GAAGH,IAAI,CAACG,UAAU;IACjC,IAAI,CAACC,QAAQ,GAAGJ,IAAI,CAACI,QAAQ;IAC7B,IAAI,CAACC,SAAS,GAAGL,IAAI,CAACK,SAAS;IAC/B,IAAI,CAACC,WAAW,GAAGN,IAAI,CAACM,WAAW;IACnC,IAAI,CAACC,SAAS,GAAGP,IAAI,CAACO,SAAS;IAC/B,IAAI,CAACC,WAAW,GAAGR,IAAI,CAACQ,WAAW;EACvC;EAEA,OAAcC,MAAMA,CAACT,IAAoB,EAAE;IACvC,OAAO,IAAIF,aAAa,CAACE,IAAI,CAAC;EAClC;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"Domain/Models/SchedulerItem/SchedulerItem.js","sources":["../../../../src/Domain/Models/SchedulerItem/SchedulerItem.ts"],"sourcesContent":["import type { SchedulerIdentity, SchedulerEntry, ScheduleActionType } from \"~/types.js\";\n\nexport class SchedulerItem {\n public readonly id: string;\n public readonly title: string;\n public readonly actionType: ScheduleActionType;\n public readonly targetId: string;\n public readonly namespace: string;\n public readonly scheduledBy: SchedulerIdentity;\n public readonly publishOn?: Date;\n public readonly unpublishOn?: Date;\n\n protected constructor(item: SchedulerEntry) {\n this.id = item.id;\n this.title = item.title;\n this.actionType = item.actionType;\n this.targetId = item.targetId;\n this.namespace = item.namespace;\n this.scheduledBy = item.scheduledBy;\n this.publishOn = item.publishOn;\n this.unpublishOn = item.unpublishOn;\n }\n\n public static create(item: SchedulerEntry) {\n return new SchedulerItem(item);\n }\n}\n"],"names":["SchedulerItem","item"],"mappings":"AAEO,MAAMA;IAUT,YAAsBC,IAAoB,CAAE;QACxC,IAAI,CAAC,EAAE,GAAGA,KAAK,EAAE;QACjB,IAAI,CAAC,KAAK,GAAGA,KAAK,KAAK;QACvB,IAAI,CAAC,UAAU,GAAGA,KAAK,UAAU;QACjC,IAAI,CAAC,QAAQ,GAAGA,KAAK,QAAQ;QAC7B,IAAI,CAAC,SAAS,GAAGA,KAAK,SAAS;QAC/B,IAAI,CAAC,WAAW,GAAGA,KAAK,WAAW;QACnC,IAAI,CAAC,SAAS,GAAGA,KAAK,SAAS;QAC/B,IAAI,CAAC,WAAW,GAAGA,KAAK,WAAW;IACvC;IAEA,OAAc,OAAOA,IAAoB,EAAE;QACvC,OAAO,IAAID,cAAcC;IAC7B;AACJ"}
@@ -1,3 +1 @@
1
1
  export * from "./SchedulerItem.js";
2
-
3
- //# sourceMappingURL=index.js.map
@@ -1,3 +1 @@
1
1
  export * from "./SchedulerItem/index.js";
2
-
3
- //# sourceMappingURL=index.js.map
@@ -1,3 +0,0 @@
1
- export {};
2
-
3
- //# sourceMappingURL=ISchedulerItemsRepository.js.map
@@ -1,128 +1,119 @@
1
1
  import { makeAutoObservable, runInAction } from "mobx";
2
2
  import uniqBy from "lodash/uniqBy.js";
3
3
  import { Meta } from "@webiny/app-utils";
4
- export class SchedulerItemsRepository {
5
- items = [];
6
- constructor(params) {
7
- this.metaRepository = params.metaRepository;
8
- this.listGateway = params.listGateway;
9
- this.getGateway = params.getGateway;
10
- this.cancelGateway = params.cancelGateway;
11
- this.unpublishGateway = params.unpublishGateway;
12
- this.publishGateway = params.publishGateway;
13
- this.namespace = params.namespace;
14
- this.params = {
15
- namespace: this.namespace
16
- };
17
- makeAutoObservable(this);
18
- }
19
- getItems() {
20
- return this.items;
21
- }
22
- getMeta() {
23
- return this.metaRepository.get();
24
- }
25
- getLoading() {
26
- return {};
27
- }
28
- async getItem(params) {
29
- const item = await this.getGateway.execute({
30
- id: params.id,
31
- namespace: this.namespace
32
- });
33
- /**
34
- * TODO Do we want to reset the items list?
35
- */
36
- runInAction(() => {
37
- this.items = [];
38
- });
39
- if (!item) {
40
- return;
4
+ class SchedulerItemsRepository {
5
+ constructor(params){
6
+ this.items = [];
7
+ this.metaRepository = params.metaRepository;
8
+ this.listGateway = params.listGateway;
9
+ this.getGateway = params.getGateway;
10
+ this.cancelGateway = params.cancelGateway;
11
+ this.unpublishGateway = params.unpublishGateway;
12
+ this.publishGateway = params.publishGateway;
13
+ this.namespace = params.namespace;
14
+ this.params = {
15
+ namespace: this.namespace
16
+ };
17
+ makeAutoObservable(this);
41
18
  }
42
- runInAction(() => {
43
- this.items = [item];
44
- });
45
- }
46
- async listItems(params) {
47
- this.params = {
48
- where: params?.where,
49
- limit: params?.limit,
50
- sort: params?.sort,
51
- after: params?.after,
52
- namespace: this.namespace
53
- };
54
- const response = await this.listGateway.execute({
55
- ...this.params
56
- });
57
- if (!response) {
58
- return;
19
+ getItems() {
20
+ return this.items;
59
21
  }
60
- runInAction(() => {
61
- this.items = response.items;
62
- this.metaRepository.set(Meta.create(response.meta));
63
- });
64
- }
65
- async listMoreItems() {
66
- const {
67
- cursor
68
- } = this.metaRepository.get();
69
- if (!cursor) {
70
- return;
22
+ getMeta() {
23
+ return this.metaRepository.get();
71
24
  }
72
- const response = await this.listGateway.execute({
73
- ...this.params,
74
- after: cursor
75
- });
76
- if (!response) {
77
- return;
25
+ getLoading() {
26
+ return {};
78
27
  }
79
- runInAction(() => {
80
- this.items = uniqBy([...this.items, ...response.items], "id");
81
- this.metaRepository.set(Meta.create(response.meta));
82
- });
83
- }
84
- async scheduleCancelItem(id) {
85
- await this.cancelGateway.execute({
86
- namespace: this.namespace,
87
- id
88
- });
89
- runInAction(() => {
90
- this.items = this.items.filter(item => item.id !== id);
91
- this.metaRepository.decreaseTotalCount(1);
92
- });
93
- }
94
- async schedulePublishItem(targetId, scheduleOn) {
95
- const {
96
- item
97
- } = await this.publishGateway.execute({
98
- namespace: this.namespace,
99
- targetId,
100
- scheduleOn
101
- });
102
- if (!item) {
103
- return;
28
+ async getItem(params) {
29
+ const item = await this.getGateway.execute({
30
+ id: params.id,
31
+ namespace: this.namespace
32
+ });
33
+ runInAction(()=>{
34
+ this.items = [];
35
+ });
36
+ if (!item) return;
37
+ runInAction(()=>{
38
+ this.items = [
39
+ item
40
+ ];
41
+ });
104
42
  }
105
- runInAction(() => {
106
- this.items = [...this.items, item];
107
- this.metaRepository.increaseTotalCount(1);
108
- });
109
- }
110
- async scheduleUnpublishItem(targetId, scheduleOn) {
111
- const {
112
- item
113
- } = await this.unpublishGateway.execute({
114
- namespace: this.namespace,
115
- targetId,
116
- scheduleOn
117
- });
118
- if (!item) {
119
- return;
43
+ async listItems(params) {
44
+ this.params = {
45
+ where: params?.where,
46
+ limit: params?.limit,
47
+ sort: params?.sort,
48
+ after: params?.after,
49
+ namespace: this.namespace
50
+ };
51
+ const response = await this.listGateway.execute({
52
+ ...this.params
53
+ });
54
+ if (!response) return;
55
+ runInAction(()=>{
56
+ this.items = response.items;
57
+ this.metaRepository.set(Meta.create(response.meta));
58
+ });
59
+ }
60
+ async listMoreItems() {
61
+ const { cursor } = this.metaRepository.get();
62
+ if (!cursor) return;
63
+ const response = await this.listGateway.execute({
64
+ ...this.params,
65
+ after: cursor
66
+ });
67
+ if (!response) return;
68
+ runInAction(()=>{
69
+ this.items = uniqBy([
70
+ ...this.items,
71
+ ...response.items
72
+ ], "id");
73
+ this.metaRepository.set(Meta.create(response.meta));
74
+ });
75
+ }
76
+ async scheduleCancelItem(id) {
77
+ await this.cancelGateway.execute({
78
+ namespace: this.namespace,
79
+ id
80
+ });
81
+ runInAction(()=>{
82
+ this.items = this.items.filter((item)=>item.id !== id);
83
+ this.metaRepository.decreaseTotalCount(1);
84
+ });
85
+ }
86
+ async schedulePublishItem(targetId, scheduleOn) {
87
+ const { item } = await this.publishGateway.execute({
88
+ namespace: this.namespace,
89
+ targetId,
90
+ scheduleOn
91
+ });
92
+ if (!item) return;
93
+ runInAction(()=>{
94
+ this.items = [
95
+ ...this.items,
96
+ item
97
+ ];
98
+ this.metaRepository.increaseTotalCount(1);
99
+ });
100
+ }
101
+ async scheduleUnpublishItem(targetId, scheduleOn) {
102
+ const { item } = await this.unpublishGateway.execute({
103
+ namespace: this.namespace,
104
+ targetId,
105
+ scheduleOn
106
+ });
107
+ if (!item) return;
108
+ runInAction(()=>{
109
+ this.items = [
110
+ ...this.items,
111
+ item
112
+ ];
113
+ this.metaRepository.increaseTotalCount(1);
114
+ });
120
115
  }
121
- runInAction(() => {
122
- this.items = [...this.items, item];
123
- this.metaRepository.increaseTotalCount(1);
124
- });
125
- }
126
116
  }
117
+ export { SchedulerItemsRepository };
127
118
 
128
119
  //# sourceMappingURL=SchedulerItemsRepository.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["makeAutoObservable","runInAction","uniqBy","Meta","SchedulerItemsRepository","items","constructor","params","metaRepository","listGateway","getGateway","cancelGateway","unpublishGateway","publishGateway","namespace","getItems","getMeta","get","getLoading","getItem","item","execute","id","listItems","where","limit","sort","after","response","set","create","meta","listMoreItems","cursor","scheduleCancelItem","filter","decreaseTotalCount","schedulePublishItem","targetId","scheduleOn","increaseTotalCount","scheduleUnpublishItem"],"sources":["SchedulerItemsRepository.ts"],"sourcesContent":["import { makeAutoObservable, runInAction } from \"mobx\";\nimport uniqBy from \"lodash/uniqBy.js\";\nimport type { SchedulerItem } from \"~/Domain/index.js\";\nimport type {\n ICancelScheduledActionGateway,\n IListScheduledActionsGateway,\n ISchedulePublishActionGateway,\n IScheduleUnpublishActionGateway\n} from \"~/Gateways/index.js\";\nimport {\n type IGetScheduledActionGatewayExecuteParams,\n type IGetScheduledActionGateway,\n type IListScheduledActionsGatewayExecuteParams\n} from \"~/Gateways/index.js\";\nimport type { IMetaRepository } from \"@webiny/app-utils\";\nimport { Meta } from \"@webiny/app-utils\";\nimport type { ISchedulerItemsRepository } from \"./ISchedulerItemsRepository.js\";\n\nexport interface ISchedulerItemsRepositoryParams {\n metaRepository: IMetaRepository;\n getGateway: IGetScheduledActionGateway;\n listGateway: IListScheduledActionsGateway;\n cancelGateway: ICancelScheduledActionGateway;\n unpublishGateway: IScheduleUnpublishActionGateway;\n publishGateway: ISchedulePublishActionGateway;\n namespace: string;\n}\n\nexport class SchedulerItemsRepository implements ISchedulerItemsRepository {\n private readonly metaRepository: IMetaRepository;\n private readonly getGateway: IGetScheduledActionGateway;\n private readonly listGateway: IListScheduledActionsGateway;\n private readonly cancelGateway: ICancelScheduledActionGateway;\n private readonly unpublishGateway: IScheduleUnpublishActionGateway;\n private readonly publishGateway: ISchedulePublishActionGateway;\n private readonly namespace: string;\n private items: SchedulerItem[] = [];\n private params: IListScheduledActionsGatewayExecuteParams;\n\n public constructor(params: ISchedulerItemsRepositoryParams) {\n this.metaRepository = params.metaRepository;\n this.listGateway = params.listGateway;\n this.getGateway = params.getGateway;\n this.cancelGateway = params.cancelGateway;\n this.unpublishGateway = params.unpublishGateway;\n this.publishGateway = params.publishGateway;\n this.namespace = params.namespace;\n this.params = {\n namespace: this.namespace\n };\n makeAutoObservable(this);\n }\n\n public getItems() {\n return this.items;\n }\n\n public getMeta() {\n return this.metaRepository.get();\n }\n\n public getLoading() {\n return {};\n }\n\n public async getItem(params: Omit<IGetScheduledActionGatewayExecuteParams, \"namespace\">) {\n const item = await this.getGateway.execute({\n id: params.id,\n namespace: this.namespace\n });\n /**\n * TODO Do we want to reset the items list?\n */\n runInAction(() => {\n this.items = [];\n });\n\n if (!item) {\n return;\n }\n\n runInAction(() => {\n this.items = [item];\n });\n }\n\n public async listItems(params?: Omit<IListScheduledActionsGatewayExecuteParams, \"namespace\">) {\n this.params = {\n where: params?.where,\n limit: params?.limit,\n sort: params?.sort,\n after: params?.after,\n namespace: this.namespace\n };\n\n const response = await this.listGateway.execute({ ...this.params });\n\n if (!response) {\n return;\n }\n\n runInAction(() => {\n this.items = response.items;\n this.metaRepository.set(Meta.create(response.meta));\n });\n }\n\n public async listMoreItems() {\n const { cursor } = this.metaRepository.get();\n\n if (!cursor) {\n return;\n }\n\n const response = await this.listGateway.execute({ ...this.params, after: cursor });\n\n if (!response) {\n return;\n }\n\n runInAction(() => {\n this.items = uniqBy([...this.items, ...response.items], \"id\");\n this.metaRepository.set(Meta.create(response.meta));\n });\n }\n\n public async scheduleCancelItem(id: string) {\n await this.cancelGateway.execute({\n namespace: this.namespace,\n id\n });\n\n runInAction(() => {\n this.items = this.items.filter(item => item.id !== id);\n this.metaRepository.decreaseTotalCount(1);\n });\n }\n\n public async schedulePublishItem(targetId: string, scheduleOn: Date) {\n const { item } = await this.publishGateway.execute({\n namespace: this.namespace,\n targetId,\n scheduleOn\n });\n\n if (!item) {\n return;\n }\n\n runInAction(() => {\n this.items = [...this.items, item];\n this.metaRepository.increaseTotalCount(1);\n });\n }\n\n public async scheduleUnpublishItem(targetId: string, scheduleOn: Date) {\n const { item } = await this.unpublishGateway.execute({\n namespace: this.namespace,\n targetId,\n scheduleOn\n });\n\n if (!item) {\n return;\n }\n\n runInAction(() => {\n this.items = [...this.items, item];\n this.metaRepository.increaseTotalCount(1);\n });\n }\n}\n"],"mappings":"AAAA,SAASA,kBAAkB,EAAEC,WAAW,QAAQ,MAAM;AACtD,OAAOC,MAAM,MAAM,kBAAkB;AAcrC,SAASC,IAAI,QAAQ,mBAAmB;AAaxC,OAAO,MAAMC,wBAAwB,CAAsC;EAQ/DC,KAAK,GAAoB,EAAE;EAG5BC,WAAWA,CAACC,MAAuC,EAAE;IACxD,IAAI,CAACC,cAAc,GAAGD,MAAM,CAACC,cAAc;IAC3C,IAAI,CAACC,WAAW,GAAGF,MAAM,CAACE,WAAW;IACrC,IAAI,CAACC,UAAU,GAAGH,MAAM,CAACG,UAAU;IACnC,IAAI,CAACC,aAAa,GAAGJ,MAAM,CAACI,aAAa;IACzC,IAAI,CAACC,gBAAgB,GAAGL,MAAM,CAACK,gBAAgB;IAC/C,IAAI,CAACC,cAAc,GAAGN,MAAM,CAACM,cAAc;IAC3C,IAAI,CAACC,SAAS,GAAGP,MAAM,CAACO,SAAS;IACjC,IAAI,CAACP,MAAM,GAAG;MACVO,SAAS,EAAE,IAAI,CAACA;IACpB,CAAC;IACDd,kBAAkB,CAAC,IAAI,CAAC;EAC5B;EAEOe,QAAQA,CAAA,EAAG;IACd,OAAO,IAAI,CAACV,KAAK;EACrB;EAEOW,OAAOA,CAAA,EAAG;IACb,O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ACd,IAAI,CAACI,KAAK,GAAG,CAAC,GAAG,IAAI,CAACA,KAAK,EAAEe,IAAI,CAAC;MAClC,IAAI,CAACZ,cAAc,CAACgC,kBAAkB,CAAC,CAAC,CAAC;IAC7C,CAAC,CAAC;EACN;EAEA,MAAaC,qBAAqBA,CAACH,QAAgB,EAAEC,UAAgB,EAAE;IACnE,MAAM;MAAEnB;IAAK,CAAC,GAAG,MAAM,IAAI,CAACR,gBAAgB,CAACS,OAAO,CAAC;MACjDP,SAAS,EAAE,IAAI,CAACA,SAAS;MACzBwB,QAAQ;MACRC;IACJ,CAAC,CAAC;IAEF,IAAI,CAACnB,IAAI,EAAE;MACP;IACJ;IAEAnB,WAAW,CAAC,MAAM;MACd,IAAI,CAACI,KAAK,GAAG,CAAC,GAAG,IAAI,CAACA,KAAK,EAAEe,IAAI,CAAC;MAClC,IAAI,CAACZ,cAAc,CAACgC,kBAAkB,CAAC,CAAC,CAAC;IAC7C,CAAC,CAAC;EACN;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"Domain/Repositories/SchedulerItems/SchedulerItemsRepository.js","sources":["../../../../src/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.ts"],"sourcesContent":["import { makeAutoObservable, runInAction } from \"mobx\";\nimport uniqBy from \"lodash/uniqBy.js\";\nimport type { SchedulerItem } from \"~/Domain/index.js\";\nimport type {\n ICancelScheduledActionGateway,\n IListScheduledActionsGateway,\n ISchedulePublishActionGateway,\n IScheduleUnpublishActionGateway\n} from \"~/Gateways/index.js\";\nimport {\n type IGetScheduledActionGatewayExecuteParams,\n type IGetScheduledActionGateway,\n type IListScheduledActionsGatewayExecuteParams\n} from \"~/Gateways/index.js\";\nimport type { IMetaRepository } from \"@webiny/app-utils\";\nimport { Meta } from \"@webiny/app-utils\";\nimport type { ISchedulerItemsRepository } from \"./ISchedulerItemsRepository.js\";\n\nexport interface ISchedulerItemsRepositoryParams {\n metaRepository: IMetaRepository;\n getGateway: IGetScheduledActionGateway;\n listGateway: IListScheduledActionsGateway;\n cancelGateway: ICancelScheduledActionGateway;\n unpublishGateway: IScheduleUnpublishActionGateway;\n publishGateway: ISchedulePublishActionGateway;\n namespace: string;\n}\n\nexport class SchedulerItemsRepository implements ISchedulerItemsRepository {\n private readonly metaRepository: IMetaRepository;\n private readonly getGateway: IGetScheduledActionGateway;\n private readonly listGateway: IListScheduledActionsGateway;\n private readonly cancelGateway: ICancelScheduledActionGateway;\n private readonly unpublishGateway: IScheduleUnpublishActionGateway;\n private readonly publishGateway: ISchedulePublishActionGateway;\n private readonly namespace: string;\n private items: SchedulerItem[] = [];\n private params: IListScheduledActionsGatewayExecuteParams;\n\n public constructor(params: ISchedulerItemsRepositoryParams) {\n this.metaRepository = params.metaRepository;\n this.listGateway = params.listGateway;\n this.getGateway = params.getGateway;\n this.cancelGateway = params.cancelGateway;\n this.unpublishGateway = params.unpublishGateway;\n this.publishGateway = params.publishGateway;\n this.namespace = params.namespace;\n this.params = {\n namespace: this.namespace\n };\n makeAutoObservable(this);\n }\n\n public getItems() {\n return this.items;\n }\n\n public getMeta() {\n return this.metaRepository.get();\n }\n\n public getLoading() {\n return {};\n }\n\n public async getItem(params: Omit<IGetScheduledActionGatewayExecuteParams, \"namespace\">) {\n const item = await this.getGateway.execute({\n id: params.id,\n namespace: this.namespace\n });\n /**\n * TODO Do we want to reset the items list?\n */\n runInAction(() => {\n this.items = [];\n });\n\n if (!item) {\n return;\n }\n\n runInAction(() => {\n this.items = [item];\n });\n }\n\n public async listItems(params?: Omit<IListScheduledActionsGatewayExecuteParams, \"namespace\">) {\n this.params = {\n where: params?.where,\n limit: params?.limit,\n sort: params?.sort,\n after: params?.after,\n namespace: this.namespace\n };\n\n const response = await this.listGateway.execute({ ...this.params });\n\n if (!response) {\n return;\n }\n\n runInAction(() => {\n this.items = response.items;\n this.metaRepository.set(Meta.create(response.meta));\n });\n }\n\n public async listMoreItems() {\n const { cursor } = this.metaRepository.get();\n\n if (!cursor) {\n return;\n }\n\n const response = await this.listGateway.execute({ ...this.params, after: cursor });\n\n if (!response) {\n return;\n }\n\n runInAction(() => {\n this.items = uniqBy([...this.items, ...response.items], \"id\");\n this.metaRepository.set(Meta.create(response.meta));\n });\n }\n\n public async scheduleCancelItem(id: string) {\n await this.cancelGateway.execute({\n namespace: this.namespace,\n id\n });\n\n runInAction(() => {\n this.items = this.items.filter(item => item.id !== id);\n this.metaRepository.decreaseTotalCount(1);\n });\n }\n\n public async schedulePublishItem(targetId: string, scheduleOn: Date) {\n const { item } = await this.publishGateway.execute({\n namespace: this.namespace,\n targetId,\n scheduleOn\n });\n\n if (!item) {\n return;\n }\n\n runInAction(() => {\n this.items = [...this.items, item];\n this.metaRepository.increaseTotalCount(1);\n });\n }\n\n public async scheduleUnpublishItem(targetId: string, scheduleOn: Date) {\n const { item } = await this.unpublishGateway.execute({\n namespace: this.namespace,\n targetId,\n scheduleOn\n });\n\n if (!item) {\n return;\n }\n\n runInAction(() => {\n this.items = [...this.items, item];\n this.metaRepository.increaseTotalCount(1);\n });\n }\n}\n"],"names":["SchedulerItemsRepository","params","makeAutoObservable","item","runInAction","response","Meta","cursor","uniqBy","id","targetId","scheduleOn"],"mappings":";;;AA4BO,MAAMA;IAWT,YAAmBC,MAAuC,CAAE;aAHpD,KAAK,GAAoB,EAAE;QAI/B,IAAI,CAAC,cAAc,GAAGA,OAAO,cAAc;QAC3C,IAAI,CAAC,WAAW,GAAGA,OAAO,WAAW;QACrC,IAAI,CAAC,UAAU,GAAGA,OAAO,UAAU;QACnC,IAAI,CAAC,aAAa,GAAGA,OAAO,aAAa;QACzC,IAAI,CAAC,gBAAgB,GAAGA,OAAO,gBAAgB;QAC/C,IAAI,CAAC,cAAc,GAAGA,OAAO,cAAc;QAC3C,IAAI,CAAC,SAAS,GAAGA,OAAO,SAAS;QACjC,IAAI,CAAC,MAAM,GAAG;YACV,WAAW,IAAI,CAAC,SAAS;QAC7B;QACAC,mBAAmB,IAAI;IAC3B;IAEO,WAAW;QACd,OAAO,IAAI,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AC,GAAG,CAACC,KAAK,MAAM,CAACD,SAAS,IAAI;QACrD;IACJ;IAEA,MAAa,mBAAmBI,EAAU,EAAE;QACxC,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC;YAC7B,WAAW,IAAI,CAAC,SAAS;YACzBA;QACJ;QAEAL,YAAY;YACR,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAACD,CAAAA,OAAQA,KAAK,EAAE,KAAKM;YACnD,IAAI,CAAC,cAAc,CAAC,kBAAkB,CAAC;QAC3C;IACJ;IAEA,MAAa,oBAAoBC,QAAgB,EAAEC,UAAgB,EAAE;QACjE,MAAM,EAAER,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;YAC/C,WAAW,IAAI,CAAC,SAAS;YACzBO;YACAC;QACJ;QAEA,IAAI,CAACR,MACD;QAGJC,YAAY;YACR,IAAI,CAAC,KAAK,GAAG;mBAAI,IAAI,CAAC,KAAK;gBAAED;aAAK;YAClC,IAAI,CAAC,cAAc,CAAC,kBAAkB,CAAC;QAC3C;IACJ;IAEA,MAAa,sBAAsBO,QAAgB,EAAEC,UAAgB,EAAE;QACnE,MAAM,EAAER,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC;YACjD,WAAW,IAAI,CAAC,SAAS;YACzBO;YACAC;QACJ;QAEA,IAAI,CAACR,MACD;QAGJC,YAAY;YACR,IAAI,CAAC,KAAK,GAAG;mBAAI,IAAI,CAAC,KAAK;gBAAED;aAAK;YAClC,IAAI,CAAC,cAAc,CAAC,kBAAkB,CAAC;QAC3C;IACJ;AACJ"}
@@ -1,17 +1,18 @@
1
1
  import { SchedulerItemsRepository } from "./SchedulerItemsRepository.js";
2
- export class SchedulerItemsRepositoryFactory {
3
- cache = new Map();
4
- getRepository(params) {
5
- const cacheKey = this.getCacheKey();
6
- if (!this.cache.has(cacheKey)) {
7
- this.cache.set(cacheKey, new SchedulerItemsRepository(params));
2
+ class SchedulerItemsRepositoryFactory {
3
+ getRepository(params) {
4
+ const cacheKey = this.getCacheKey();
5
+ if (!this.cache.has(cacheKey)) this.cache.set(cacheKey, new SchedulerItemsRepository(params));
6
+ return this.cache.get(cacheKey);
7
+ }
8
+ getCacheKey() {
9
+ return Date.now().toString();
10
+ }
11
+ constructor(){
12
+ this.cache = new Map();
8
13
  }
9
- return this.cache.get(cacheKey);
10
- }
11
- getCacheKey() {
12
- return Date.now().toString();
13
- }
14
14
  }
15
- export const schedulerItemsRepositoryFactory = new SchedulerItemsRepositoryFactory();
15
+ const schedulerItemsRepositoryFactory = new SchedulerItemsRepositoryFactory();
16
+ export { SchedulerItemsRepositoryFactory, schedulerItemsRepositoryFactory };
16
17
 
17
18
  //# sourceMappingURL=SchedulerItemsRepositoryFactory.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["SchedulerItemsRepository","SchedulerItemsRepositoryFactory","cache","Map","getRepository","params","cacheKey","getCacheKey","has","set","get","Date","now","toString","schedulerItemsRepositoryFactory"],"sources":["SchedulerItemsRepositoryFactory.ts"],"sourcesContent":["import type { IMetaRepository } from \"@webiny/app-utils\";\nimport type { IListScheduledActionsGateway } from \"~/Gateways/index.js\";\nimport {\n type ICancelScheduledActionGateway,\n type IGetScheduledActionGateway,\n type ISchedulePublishActionGateway,\n type IScheduleUnpublishActionGateway\n} from \"~/Gateways/index.js\";\nimport { SchedulerItemsRepository } from \"./SchedulerItemsRepository.js\";\n\nexport interface ISchedulerItemsRepositoryFactoryGetParams {\n metaRepository: IMetaRepository;\n getGateway: IGetScheduledActionGateway;\n listGateway: IListScheduledActionsGateway;\n cancelGateway: ICancelScheduledActionGateway;\n publishGateway: ISchedulePublishActionGateway;\n unpublishGateway: IScheduleUnpublishActionGateway;\n namespace: string;\n}\n\nexport class SchedulerItemsRepositoryFactory {\n private readonly cache: Map<string, SchedulerItemsRepository> = new Map();\n\n public getRepository(params: ISchedulerItemsRepositoryFactoryGetParams) {\n const cacheKey = this.getCacheKey();\n\n if (!this.cache.has(cacheKey)) {\n this.cache.set(cacheKey, new SchedulerItemsRepository(params));\n }\n\n return this.cache.get(cacheKey) as SchedulerItemsRepository;\n }\n\n private getCacheKey() {\n return Date.now().toString();\n }\n}\n\nexport const schedulerItemsRepositoryFactory = new SchedulerItemsRepositoryFactory();\n"],"mappings":"AAQA,SAASA,wBAAwB;AAYjC,OAAO,MAAMC,+BAA+B,CAAC;EACxBC,KAAK,GAA0C,IAAIC,GAAG,CAAC,CAAC;EAElEC,aAAaA,CAACC,MAAiD,EAAE;IACpE,MAAMC,QAAQ,GAAG,IAAI,CAACC,WAAW,CAAC,CAAC;IAEnC,IAAI,CAAC,IAAI,CAACL,KAAK,CAACM,GAAG,CAACF,QAAQ,CAAC,EAAE;MAC3B,IAAI,CAACJ,KAAK,CAACO,GAAG,CAACH,QAAQ,EAAE,IAAIN,wBAAwB,CAACK,MAAM,CAAC,CAAC;IAClE;IAEA,OAAO,IAAI,CAACH,KAAK,CAACQ,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,+BAA+B,GAAG,IAAIb,+BAA+B,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"file":"Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.js","sources":["../../../../src/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.ts"],"sourcesContent":["import type { IMetaRepository } from \"@webiny/app-utils\";\nimport type { IListScheduledActionsGateway } from \"~/Gateways/index.js\";\nimport {\n type ICancelScheduledActionGateway,\n type IGetScheduledActionGateway,\n type ISchedulePublishActionGateway,\n type IScheduleUnpublishActionGateway\n} from \"~/Gateways/index.js\";\nimport { SchedulerItemsRepository } from \"./SchedulerItemsRepository.js\";\n\nexport interface ISchedulerItemsRepositoryFactoryGetParams {\n metaRepository: IMetaRepository;\n getGateway: IGetScheduledActionGateway;\n listGateway: IListScheduledActionsGateway;\n cancelGateway: ICancelScheduledActionGateway;\n publishGateway: ISchedulePublishActionGateway;\n unpublishGateway: IScheduleUnpublishActionGateway;\n namespace: string;\n}\n\nexport class SchedulerItemsRepositoryFactory {\n private readonly cache: Map<string, SchedulerItemsRepository> = new Map();\n\n public getRepository(params: ISchedulerItemsRepositoryFactoryGetParams) {\n const cacheKey = this.getCacheKey();\n\n if (!this.cache.has(cacheKey)) {\n this.cache.set(cacheKey, new SchedulerItemsRepository(params));\n }\n\n return this.cache.get(cacheKey) as SchedulerItemsRepository;\n }\n\n private getCacheKey() {\n return Date.now().toString();\n }\n}\n\nexport const schedulerItemsRepositoryFactory = new SchedulerItemsRepositoryFactory();\n"],"names":["SchedulerItemsRepositoryFactory","params","cacheKey","SchedulerItemsRepository","Date","Map","schedulerItemsRepositoryFactory"],"mappings":";AAoBO,MAAMA;IAGF,cAAcC,MAAiD,EAAE;QACpE,MAAMC,WAAW,IAAI,CAAC,WAAW;QAEjC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAACA,WAChB,IAAI,CAAC,KAAK,CAAC,GAAG,CAACA,UAAU,IAAIC,yBAAyBF;QAG1D,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAACC;IAC1B;IAEQ,cAAc;QAClB,OAAOE,KAAK,GAAG,GAAG,QAAQ;IAC9B;;aAdiB,KAAK,GAA0C,IAAIC;;AAexE;AAEO,MAAMC,kCAAkC,IAAIN"}
@@ -1,38 +1,39 @@
1
1
  import { makeAutoObservable } from "mobx";
2
2
  import { LoadingActions } from "../../../types.js";
3
- export class SchedulerItemsRepositoryWithLoading {
4
- constructor(loadingRepository, schedulerItemsRepository) {
5
- this.loadingRepository = loadingRepository;
6
- this.schedulerItemsRepository = schedulerItemsRepository;
7
- makeAutoObservable(this);
8
- }
9
- getItems() {
10
- return this.schedulerItemsRepository.getItems();
11
- }
12
- getMeta() {
13
- return this.schedulerItemsRepository.getMeta();
14
- }
15
- getLoading() {
16
- return this.loadingRepository.get();
17
- }
18
- async getItem(params) {
19
- await this.loadingRepository.runCallBack(this.schedulerItemsRepository.getItem(params), LoadingActions.get);
20
- }
21
- async listItems(params) {
22
- await this.loadingRepository.runCallBack(this.schedulerItemsRepository.listItems(params), LoadingActions.list);
23
- }
24
- async listMoreItems() {
25
- await this.loadingRepository.runCallBack(this.schedulerItemsRepository.listMoreItems(), LoadingActions.listMore);
26
- }
27
- async scheduleCancelItem(id) {
28
- await this.loadingRepository.runCallBack(this.schedulerItemsRepository.scheduleCancelItem(id), LoadingActions.delete);
29
- }
30
- async schedulePublishItem(id) {
31
- await this.loadingRepository.runCallBack(this.schedulerItemsRepository.scheduleCancelItem(id), LoadingActions.create);
32
- }
33
- async scheduleUnpublishItem(id) {
34
- await this.loadingRepository.runCallBack(this.schedulerItemsRepository.scheduleCancelItem(id), LoadingActions.create);
35
- }
3
+ class SchedulerItemsRepositoryWithLoading {
4
+ constructor(loadingRepository, schedulerItemsRepository){
5
+ this.loadingRepository = loadingRepository;
6
+ this.schedulerItemsRepository = schedulerItemsRepository;
7
+ makeAutoObservable(this);
8
+ }
9
+ getItems() {
10
+ return this.schedulerItemsRepository.getItems();
11
+ }
12
+ getMeta() {
13
+ return this.schedulerItemsRepository.getMeta();
14
+ }
15
+ getLoading() {
16
+ return this.loadingRepository.get();
17
+ }
18
+ async getItem(params) {
19
+ await this.loadingRepository.runCallBack(this.schedulerItemsRepository.getItem(params), LoadingActions.get);
20
+ }
21
+ async listItems(params) {
22
+ await this.loadingRepository.runCallBack(this.schedulerItemsRepository.listItems(params), LoadingActions.list);
23
+ }
24
+ async listMoreItems() {
25
+ await this.loadingRepository.runCallBack(this.schedulerItemsRepository.listMoreItems(), LoadingActions.listMore);
26
+ }
27
+ async scheduleCancelItem(id) {
28
+ await this.loadingRepository.runCallBack(this.schedulerItemsRepository.scheduleCancelItem(id), LoadingActions["delete"]);
29
+ }
30
+ async schedulePublishItem(id) {
31
+ await this.loadingRepository.runCallBack(this.schedulerItemsRepository.scheduleCancelItem(id), LoadingActions.create);
32
+ }
33
+ async scheduleUnpublishItem(id) {
34
+ await this.loadingRepository.runCallBack(this.schedulerItemsRepository.scheduleCancelItem(id), LoadingActions.create);
35
+ }
36
36
  }
37
+ export { SchedulerItemsRepositoryWithLoading };
37
38
 
38
39
  //# sourceMappingURL=SchedulerItemsRepositoryWithLoading.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["makeAutoObservable","LoadingActions","SchedulerItemsRepositoryWithLoading","constructor","loadingRepository","schedulerItemsRepository","getItems","getMeta","getLoading","get","getItem","params","runCallBack","listItems","list","listMoreItems","listMore","scheduleCancelItem","id","delete","schedulePublishItem","create","scheduleUnpublishItem"],"sources":["SchedulerItemsRepositoryWithLoading.ts"],"sourcesContent":["import { makeAutoObservable } from \"mobx\";\nimport type { ILoadingRepository } from \"@webiny/app-utils\";\nimport type { ISchedulerItemsRepository } from \"./ISchedulerItemsRepository.js\";\nimport { LoadingActions } from \"~/types.js\";\nimport type {\n IGetScheduledActionGatewayExecuteParams,\n IListScheduledActionsGatewayExecuteParams\n} from \"~/Gateways/index.js\";\n\nexport class SchedulerItemsRepositoryWithLoading implements ISchedulerItemsRepository {\n private readonly loadingRepository: ILoadingRepository;\n private readonly schedulerItemsRepository: ISchedulerItemsRepository;\n\n public constructor(\n loadingRepository: ILoadingRepository,\n schedulerItemsRepository: ISchedulerItemsRepository\n ) {\n this.loadingRepository = loadingRepository;\n this.schedulerItemsRepository = schedulerItemsRepository;\n makeAutoObservable(this);\n }\n\n public getItems() {\n return this.schedulerItemsRepository.getItems();\n }\n\n public getMeta() {\n return this.schedulerItemsRepository.getMeta();\n }\n\n public getLoading() {\n return this.loadingRepository.get();\n }\n\n public async getItem(params: Omit<IGetScheduledActionGatewayExecuteParams, \"namespace\">) {\n await this.loadingRepository.runCallBack(\n this.schedulerItemsRepository.getItem(params),\n LoadingActions.get\n );\n }\n\n public async listItems(params?: Omit<IListScheduledActionsGatewayExecuteParams, \"namespace\">) {\n await this.loadingRepository.runCallBack(\n this.schedulerItemsRepository.listItems(params),\n LoadingActions.list\n );\n }\n\n public async listMoreItems() {\n await this.loadingRepository.runCallBack(\n this.schedulerItemsRepository.listMoreItems(),\n LoadingActions.listMore\n );\n }\n\n public async scheduleCancelItem(id: string) {\n await this.loadingRepository.runCallBack(\n this.schedulerItemsRepository.scheduleCancelItem(id),\n LoadingActions.delete\n );\n }\n\n public async schedulePublishItem(id: string) {\n await this.loadingRepository.runCallBack(\n this.schedulerItemsRepository.scheduleCancelItem(id),\n LoadingActions.create\n );\n }\n\n public async scheduleUnpublishItem(id: string) {\n await this.loadingRepository.runCallBack(\n this.schedulerItemsRepository.scheduleCancelItem(id),\n LoadingActions.create\n );\n }\n}\n"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,MAAM;AAGzC,SAASC,cAAc;AAMvB,OAAO,MAAMC,mCAAmC,CAAsC;EAI3EC,WAAWA,CACdC,iBAAqC,EACrCC,wBAAmD,EACrD;IACE,IAAI,CAACD,iBAAiB,GAAGA,iBAAiB;IAC1C,IAAI,CAACC,wBAAwB,GAAGA,wBAAwB;IACxDL,kBAAkB,CAAC,IAAI,CAAC;EAC5B;EAEOM,QAAQA,CAAA,EAAG;IACd,OAAO,IAAI,CAACD,wBAAwB,CAACC,QAAQ,CAAC,CAAC;EACnD;EAEOC,OAAOA,CAAA,EAAG;IACb,OAAO,IAAI,CAACF,wBAAwB,CAACE,OAAO,CAAC,CAAC;EAClD;EAEOC,UAAUA,CAAA,EAAG;IAChB,OAAO,IAAI,CAACJ,iBAAiB,CAACK,GAAG,CAAC,CAAC;EACvC;EAEA,MAAaC,OAAOA,CAACC,MAAkE,EAAE;IACrF,MAAM,IAAI,CAACP,iBAAiB,CAACQ,WAAW,CACpC,IAAI,CAACP,wBAAwB,CAACK,OAAO,CAACC,MAAM,CAAC,EAC7CV,cAAc,CAACQ,GACnB,CAAC;EACL;EAEA,MAAaI,SAASA,CAACF,MAAqE,EAAE;IAC1F,MAAM,IAAI,CAACP,iBAAiB,CAACQ,WAAW,CACpC,IAAI,CAACP,wBAAwB,CAACQ,SAAS,CAACF,MAAM,CAAC,EAC/CV,cAAc,CAACa,IACnB,CAAC;EACL;EAEA,MAAaC,aAAaA,CAAA,EAAG;IACzB,MAAM,IAAI,CAACX,iBAAiB,CAACQ,WAAW,CACpC,IAAI,CAACP,wBAAwB,CAACU,aAAa,CAAC,CAAC,EAC7Cd,cAAc,CAACe,QACnB,CAAC;EACL;EAEA,MAAaC,kBAAkBA,CAACC,EAAU,EAAE;IACxC,MAAM,IAAI,CAACd,iBAAiB,CAACQ,WAAW,CACpC,IAAI,CAACP,wBAAwB,CAACY,kBAAkB,CAACC,EAAE,CAAC,EACpDjB,cAAc,CAACkB,MACnB,CAAC;EACL;EAEA,MAAaC,mBAAmBA,CAACF,EAAU,EAAE;IACzC,MAAM,IAAI,CAACd,iBAAiB,CAACQ,WAAW,CACpC,IAAI,CAACP,wBAAwB,CAACY,kBAAkB,CAACC,EAAE,CAAC,EACpDjB,cAAc,CAACoB,MACnB,CAAC;EACL;EAEA,MAAaC,qBAAqBA,CAACJ,EAAU,EAAE;IAC3C,MAAM,IAAI,CAACd,iBAAiB,CAACQ,WAAW,CACpC,IAAI,CAACP,wBAAwB,CAACY,kBAAkB,CAACC,EAAE,CAAC,EACpDjB,cAAc,CAACoB,MACnB,CAAC;EACL;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.js","sources":["../../../../src/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.ts"],"sourcesContent":["import { makeAutoObservable } from \"mobx\";\nimport type { ILoadingRepository } from \"@webiny/app-utils\";\nimport type { ISchedulerItemsRepository } from \"./ISchedulerItemsRepository.js\";\nimport { LoadingActions } from \"~/types.js\";\nimport type {\n IGetScheduledActionGatewayExecuteParams,\n IListScheduledActionsGatewayExecuteParams\n} from \"~/Gateways/index.js\";\n\nexport class SchedulerItemsRepositoryWithLoading implements ISchedulerItemsRepository {\n private readonly loadingRepository: ILoadingRepository;\n private readonly schedulerItemsRepository: ISchedulerItemsRepository;\n\n public constructor(\n loadingRepository: ILoadingRepository,\n schedulerItemsRepository: ISchedulerItemsRepository\n ) {\n this.loadingRepository = loadingRepository;\n this.schedulerItemsRepository = schedulerItemsRepository;\n makeAutoObservable(this);\n }\n\n public getItems() {\n return this.schedulerItemsRepository.getItems();\n }\n\n public getMeta() {\n return this.schedulerItemsRepository.getMeta();\n }\n\n public getLoading() {\n return this.loadingRepository.get();\n }\n\n public async getItem(params: Omit<IGetScheduledActionGatewayExecuteParams, \"namespace\">) {\n await this.loadingRepository.runCallBack(\n this.schedulerItemsRepository.getItem(params),\n LoadingActions.get\n );\n }\n\n public async listItems(params?: Omit<IListScheduledActionsGatewayExecuteParams, \"namespace\">) {\n await this.loadingRepository.runCallBack(\n this.schedulerItemsRepository.listItems(params),\n LoadingActions.list\n );\n }\n\n public async listMoreItems() {\n await this.loadingRepository.runCallBack(\n this.schedulerItemsRepository.listMoreItems(),\n LoadingActions.listMore\n );\n }\n\n public async scheduleCancelItem(id: string) {\n await this.loadingRepository.runCallBack(\n this.schedulerItemsRepository.scheduleCancelItem(id),\n LoadingActions.delete\n );\n }\n\n public async schedulePublishItem(id: string) {\n await this.loadingRepository.runCallBack(\n this.schedulerItemsRepository.scheduleCancelItem(id),\n LoadingActions.create\n );\n }\n\n public async scheduleUnpublishItem(id: string) {\n await this.loadingRepository.runCallBack(\n this.schedulerItemsRepository.scheduleCancelItem(id),\n LoadingActions.create\n );\n }\n}\n"],"names":["SchedulerItemsRepositoryWithLoading","loadingRepository","schedulerItemsRepository","makeAutoObservable","params","LoadingActions","id"],"mappings":";;AASO,MAAMA;IAIT,YACIC,iBAAqC,EACrCC,wBAAmD,CACrD;QACE,IAAI,CAAC,iBAAiB,GAAGD;QACzB,IAAI,CA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"./SchedulerItemsRepositoryWithLoading.js";
4
-
5
- //# sourceMappingURL=index.js.map
@@ -1,3 +0,0 @@
1
- export {};
2
-
3
- //# sourceMappingURL=ISearchRepository.js.map
@@ -1,15 +1,16 @@
1
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
- }
2
+ class SearchRepository {
3
+ constructor(){
4
+ this.query = "";
5
+ makeAutoObservable(this);
6
+ }
7
+ get() {
8
+ return this.query;
9
+ }
10
+ async set(query) {
11
+ this.query = query;
12
+ }
13
13
  }
14
+ export { SearchRepository };
14
15
 
15
16
  //# sourceMappingURL=SearchRepository.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["makeAutoObservable","SearchRepository","query","constructor","get","set"],"sources":["SearchRepository.ts"],"sourcesContent":["import { makeAutoObservable } from \"mobx\";\nimport type { ISearchRepository } from \"./ISearchRepository.js\";\n\nexport class SearchRepository implements ISearchRepository {\n private query = \"\";\n\n public constructor() {\n makeAutoObservable(this);\n }\n\n public get() {\n return this.query;\n }\n\n public async set(query: string) {\n this.query = query;\n }\n}\n"],"mappings":"AAAA,SAASA,kBAAkB,QAAQ,MAAM;AAGzC,OAAO,MAAMC,gBAAgB,CAA8B;EAC/CC,KAAK,GAAG,EAAE;EAEXC,WAAWA,CAAA,EAAG;IACjBH,kBAAkB,CAAC,IAAI,CAAC;EAC5B;EAEOI,GAAGA,CAAA,EAAG;IACT,OAAO,IAAI,CAACF,KAAK;EACrB;EAEA,MAAaG,GAAGA,CAACH,KAAa,EAAE;IAC5B,IAAI,CAACA,KAAK,GAAGA,KAAK;EACtB;AACJ","ignoreList":[]}
1
+ {"version":3,"file":"Domain/Repositories/Search/SearchRepository.js","sources":["../../../../src/Domain/Repositories/Search/SearchRepository.ts"],"sourcesContent":["import { makeAutoObservable } from \"mobx\";\nimport type { ISearchRepository } from \"./ISearchRepository.js\";\n\nexport class SearchRepository implements ISearchRepository {\n private query = \"\";\n\n public constructor() {\n makeAutoObservable(this);\n }\n\n public get() {\n return this.query;\n }\n\n public async set(query: string) {\n this.query = query;\n }\n}\n"],"names":["SearchRepository","makeAutoObservable","query"],"mappings":";AAGO,MAAMA;IAGT,aAAqB;aAFb,KAAK,GAAG;QAGZC,mBAAmB,IAAI;IAC3B;IAEO,MAAM;QACT,OAAO,IAAI,CAAC,KAAK;IACrB;IAEA,MAAa,IAAIC,KAAa,EAAE;QAC5B,IAAI,CAAC,KAAK,GAAGA;IACjB;AACJ"}
@@ -1,17 +1,18 @@
1
1
  import { SearchRepository } from "./SearchRepository.js";
2
- 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());
2
+ class SearchRepositoryFactory {
3
+ getRepository() {
4
+ const cacheKey = this.getCacheKey();
5
+ if (!this.cache.has(cacheKey)) this.cache.set(cacheKey, new SearchRepository());
6
+ return this.cache.get(cacheKey);
7
+ }
8
+ getCacheKey() {
9
+ return Date.now().toString();
10
+ }
11
+ constructor(){
12
+ this.cache = new Map();
8
13
  }
9
- return this.cache.get(cacheKey);
10
- }
11
- getCacheKey() {
12
- return Date.now().toString();
13
- }
14
14
  }
15
- export const searchRepositoryFactory = new SearchRepositoryFactory();
15
+ const searchRepositoryFactory = new SearchRepositoryFactory();
16
+ export { SearchRepositoryFactory, searchRepositoryFactory };
16
17
 
17
18
  //# sourceMappingURL=SearchRepositoryFactory.js.map
@@ -1 +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.js\";\n\nexport class SearchRepositoryFactory {\n private readonly cache: Map<string, SearchRepository> = new Map();\n\n public getRepository() {\n const cacheKey = this.getCacheKey();\n\n if (!this.cache.has(cacheKey)) {\n this.cache.set(cacheKey, new SearchRepository());\n }\n\n return this.cache.get(cacheKey) as SearchRepository;\n }\n\n private getCacheKey() {\n return Date.now().toString();\n }\n}\n\nexport const searchRepositoryFactory = new SearchRepositoryFactory();\n"],"mappings":"AAAA,SAASA,gBAAgB;AAEzB,OAAO,MAAMC,uBAAuB,CAAC;EAChBC,KAAK,GAAkC,IAAIC,GAAG,CAAC,CAAC;EAE1DC,aAAaA,CAAA,EAAG;IACnB,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":[]}
1
+ {"version":3,"file":"Domain/Repositories/Search/SearchRepositoryFactory.js","sources":["../../../../src/Domain/Repositories/Search/SearchRepositoryFactory.ts"],"sourcesContent":["import { SearchRepository } from \"./SearchRepository.js\";\n\nexport class SearchRepositoryFactory {\n private readonly cache: Map<string, SearchRepository> = new Map();\n\n public getRepository() {\n const cacheKey = this.getCacheKey();\n\n if (!this.cache.has(cacheKey)) {\n this.cache.set(cacheKey, new SearchRepository());\n }\n\n return this.cache.get(cacheKey) as SearchRepository;\n }\n\n private getCacheKey() {\n return Date.now().toString();\n }\n}\n\nexport const searchRepositoryFactory = new SearchRepositoryFactory();\n"],"names":["SearchRepositoryFactory","cacheKey","SearchRepository","Date","Map","searchRepositoryFactory"],"mappings":";AAEO,MAAMA;IAGF,gBAAgB;QACnB,MAAMC,WAAW,IAAI,CAAC,WAAW;QAEjC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAACA,WAChB,IAAI,CAAC,KAAK,CAAC,GAAG,CAACA,UAAU,IAAIC;QAGjC,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAACD;IAC1B;IAEQ,cAAc;QAClB,OAAOE,KAAK,GAAG,GAAG,QAAQ;IAC9B;;aAdiB,KAAK,GAAkC,IAAIC;;AAehE;AAEO,MAAMC,0BAA0B,IAAIL"}
@@ -1,4 +1,2 @@
1
1
  export * from "./SearchRepository.js";
2
2
  export * from "./SearchRepositoryFactory.js";
3
-
4
- //# sourceMappingURL=index.js.map
@@ -1,3 +0,0 @@
1
- export {};
2
-
3
- //# sourceMappingURL=ISelectedItemsRepository.js.map