@webiny/app-scheduler 6.4.5 → 6.6.0-alpha.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 (521) hide show
  1. package/{Gateways/schema → domain}/schedulerEntry.d.ts +1 -1
  2. package/{Gateways/schema → domain}/schedulerEntry.js +1 -1
  3. package/domain/schedulerEntry.js.map +1 -0
  4. package/features/cancelScheduledAction/CancelScheduledActionGateway.d.ts +11 -0
  5. package/features/cancelScheduledAction/CancelScheduledActionGateway.js +41 -0
  6. package/features/cancelScheduledAction/CancelScheduledActionGateway.js.map +1 -0
  7. package/features/cancelScheduledAction/abstractions.d.ts +11 -0
  8. package/features/cancelScheduledAction/abstractions.js +5 -0
  9. package/features/cancelScheduledAction/abstractions.js.map +1 -0
  10. package/features/cancelScheduledAction/feature.d.ts +1 -0
  11. package/features/cancelScheduledAction/feature.js +11 -0
  12. package/features/cancelScheduledAction/feature.js.map +1 -0
  13. package/features/feature.d.ts +1 -0
  14. package/features/feature.js +19 -0
  15. package/features/feature.js.map +1 -0
  16. package/features/getScheduledAction/GetScheduledActionGateway.d.ts +11 -0
  17. package/features/getScheduledAction/GetScheduledActionGateway.js +57 -0
  18. package/features/getScheduledAction/GetScheduledActionGateway.js.map +1 -0
  19. package/{Gateways/abstractions/GetScheduledActionGateway.d.ts → features/getScheduledAction/abstractions.d.ts} +4 -0
  20. package/features/getScheduledAction/abstractions.js +5 -0
  21. package/features/getScheduledAction/abstractions.js.map +1 -0
  22. package/features/getScheduledAction/feature.d.ts +1 -0
  23. package/features/getScheduledAction/feature.js +11 -0
  24. package/features/getScheduledAction/feature.js.map +1 -0
  25. package/features/graphqlFields.d.ts +2 -0
  26. package/features/graphqlFields.js +23 -0
  27. package/features/graphqlFields.js.map +1 -0
  28. package/features/listScheduledActions/ListScheduledActionsGateway.d.ts +11 -0
  29. package/features/listScheduledActions/ListScheduledActionsGateway.js +84 -0
  30. package/features/listScheduledActions/ListScheduledActionsGateway.js.map +1 -0
  31. package/{Gateways/abstractions/ListScheduledActionsGateway.d.ts → features/listScheduledActions/abstractions.d.ts} +5 -2
  32. package/features/listScheduledActions/abstractions.js +5 -0
  33. package/features/listScheduledActions/abstractions.js.map +1 -0
  34. package/features/listScheduledActions/feature.d.ts +1 -0
  35. package/features/listScheduledActions/feature.js +11 -0
  36. package/features/listScheduledActions/feature.js.map +1 -0
  37. package/features/schedulePublishAction/SchedulePublishActionGateway.d.ts +11 -0
  38. package/features/schedulePublishAction/SchedulePublishActionGateway.js +67 -0
  39. package/features/schedulePublishAction/SchedulePublishActionGateway.js.map +1 -0
  40. package/{Gateways/abstractions/SchedulePublishActionGateway.d.ts → features/schedulePublishAction/abstractions.d.ts} +4 -0
  41. package/features/schedulePublishAction/abstractions.js +5 -0
  42. package/features/schedulePublishAction/abstractions.js.map +1 -0
  43. package/features/schedulePublishAction/feature.d.ts +1 -0
  44. package/features/schedulePublishAction/feature.js +11 -0
  45. package/features/schedulePublishAction/feature.js.map +1 -0
  46. package/features/scheduleUnpublishAction/ScheduleUnpublishActionGateway.d.ts +11 -0
  47. package/features/scheduleUnpublishAction/ScheduleUnpublishActionGateway.js +71 -0
  48. package/features/scheduleUnpublishAction/ScheduleUnpublishActionGateway.js.map +1 -0
  49. package/{Gateways/abstractions/ScheduleUnpublishActionGateway.d.ts → features/scheduleUnpublishAction/abstractions.d.ts} +4 -0
  50. package/features/scheduleUnpublishAction/abstractions.js +5 -0
  51. package/features/scheduleUnpublishAction/abstractions.js.map +1 -0
  52. package/features/scheduleUnpublishAction/feature.d.ts +1 -0
  53. package/features/scheduleUnpublishAction/feature.js +11 -0
  54. package/features/scheduleUnpublishAction/feature.js.map +1 -0
  55. package/index.d.ts +9 -1
  56. package/index.js +16 -1
  57. package/index.js.map +1 -0
  58. package/package.json +15 -16
  59. package/{Presentation → presentation}/SchedulerConfigs/SchedulerConfigs.js.map +1 -1
  60. package/{Presentation → presentation}/components/Actions/CancelItem/CancelItem.js +2 -3
  61. package/presentation/components/Actions/CancelItem/CancelItem.js.map +1 -0
  62. package/{Presentation → presentation}/components/BottomInfoBar/BottomInfoBar.styled.js.map +1 -1
  63. package/{Presentation → presentation}/components/BottomInfoBar/ListMeta.js.map +1 -1
  64. package/{Presentation → presentation}/components/BottomInfoBar/ListStatus.js.map +1 -1
  65. package/{Presentation → presentation}/components/Cells/CellActions/CellActions.js.map +1 -1
  66. package/{Presentation → presentation}/components/Cells/CellRevision/CellRevision.js.map +1 -1
  67. package/{Presentation → presentation}/components/Cells/CellRevision/CellRevision.styled.js.map +1 -1
  68. package/{Presentation → presentation}/components/Cells/CellScheduledBy/CellScheduledBy.js.map +1 -1
  69. package/{Presentation → presentation}/components/Cells/CellScheduledOn/CellScheduledOn.js.map +1 -1
  70. package/{Presentation → presentation}/components/Cells/CellTitle/CellTitle.js.map +1 -1
  71. package/{Presentation → presentation}/components/Cells/CellTitle/CellTitle.styled.js.map +1 -1
  72. package/{Presentation → presentation}/components/Cells/CellType/CellActionType.js.map +1 -1
  73. package/{Presentation → presentation}/components/Cells/CellType/CellActionType.styled.js.map +1 -1
  74. package/{Presentation → presentation}/components/Empty/Empty.styled.js.map +1 -1
  75. package/{Presentation → presentation}/components/Title/Title.js.map +1 -1
  76. package/{Presentation → presentation}/components/Title/Title.styled.js.map +1 -1
  77. package/{Presentation → presentation}/configs/list/Browser/EntryAction.d.ts +2 -1
  78. package/{Presentation → presentation}/configs/list/Browser/EntryAction.js.map +1 -1
  79. package/{Presentation → presentation}/configs/list/Browser/Table/Column.d.ts +4 -3
  80. package/{Presentation → presentation}/configs/list/Browser/Table/Column.js.map +1 -1
  81. package/{Presentation → presentation}/configs/list/Browser/Table/Sorting.js.map +1 -1
  82. package/presentation/configs/list/Browser/Table/index.d.ts +19 -0
  83. package/{Presentation → presentation}/configs/list/Browser/Table/index.js.map +1 -1
  84. package/presentation/configs/list/Browser/index.d.ts +23 -0
  85. package/{Presentation → presentation}/configs/list/Browser/index.js.map +1 -1
  86. package/{Presentation → presentation}/configs/list/SchedulerListConfig.d.ts +8 -6
  87. package/{Presentation → presentation}/configs/list/SchedulerListConfig.js.map +1 -1
  88. package/{Presentation → presentation}/hooks/index.d.ts +0 -1
  89. package/{Presentation → presentation}/hooks/index.js +0 -1
  90. package/{Presentation → presentation}/hooks/useCancelSchedulerItem.js +12 -7
  91. package/presentation/hooks/useCancelSchedulerItem.js.map +1 -0
  92. package/{Presentation → presentation}/hooks/useSchedulerItem.js.map +1 -1
  93. package/presentation/scheduleDialog/ScheduleDialogPresenter.d.ts +23 -0
  94. package/{Presentation/components/ScheduleDialog → presentation/scheduleDialog}/ScheduleDialogPresenter.js +22 -8
  95. package/presentation/scheduleDialog/ScheduleDialogPresenter.js.map +1 -0
  96. package/{Presentation/components/ScheduleDialog/IScheduleDialogPresenter.d.ts → presentation/scheduleDialog/abstractions.d.ts} +5 -1
  97. package/presentation/scheduleDialog/abstractions.js +5 -0
  98. package/presentation/scheduleDialog/abstractions.js.map +1 -0
  99. package/presentation/scheduleDialog/feature.d.ts +3 -0
  100. package/presentation/scheduleDialog/feature.js +17 -0
  101. package/presentation/scheduleDialog/feature.js.map +1 -0
  102. package/{Presentation/components/ScheduleDialog → presentation/scheduleDialog}/useScheduleDialog.d.ts +0 -2
  103. package/{Presentation/components/ScheduleDialog → presentation/scheduleDialog}/useScheduleDialog.js +63 -60
  104. package/presentation/scheduleDialog/useScheduleDialog.js.map +1 -0
  105. package/{Presentation/index.d.ts → presentation/schedulerList/Scheduler.d.ts} +2 -9
  106. package/presentation/schedulerList/Scheduler.js +28 -0
  107. package/presentation/schedulerList/Scheduler.js.map +1 -0
  108. package/presentation/schedulerList/SchedulerListDataSource.d.ts +15 -0
  109. package/presentation/schedulerList/SchedulerListDataSource.js +41 -0
  110. package/presentation/schedulerList/SchedulerListDataSource.js.map +1 -0
  111. package/presentation/schedulerList/SchedulerListPresenter.d.ts +21 -0
  112. package/presentation/schedulerList/SchedulerListPresenter.js +47 -0
  113. package/presentation/schedulerList/SchedulerListPresenter.js.map +1 -0
  114. package/presentation/schedulerList/abstractions.d.ts +13 -0
  115. package/presentation/schedulerList/abstractions.js +5 -0
  116. package/presentation/schedulerList/abstractions.js.map +1 -0
  117. package/presentation/schedulerList/components/BottomInfoBar.d.ts +9 -0
  118. package/presentation/schedulerList/components/BottomInfoBar.js +18 -0
  119. package/presentation/schedulerList/components/BottomInfoBar.js.map +1 -0
  120. package/presentation/schedulerList/components/Empty.d.ts +9 -0
  121. package/{Presentation/components/Empty → presentation/schedulerList/components}/Empty.js +6 -6
  122. package/presentation/schedulerList/components/Empty.js.map +1 -0
  123. package/presentation/schedulerList/components/SchedulerListView.d.ts +8 -0
  124. package/presentation/schedulerList/components/SchedulerListView.js +40 -0
  125. package/presentation/schedulerList/components/SchedulerListView.js.map +1 -0
  126. package/presentation/schedulerList/components/SchedulerOverlay.d.ts +11 -0
  127. package/presentation/schedulerList/components/SchedulerOverlay.js +38 -0
  128. package/presentation/schedulerList/components/SchedulerOverlay.js.map +1 -0
  129. package/presentation/schedulerList/components/SchedulerTable.d.ts +9 -0
  130. package/presentation/schedulerList/components/SchedulerTable.js +48 -0
  131. package/presentation/schedulerList/components/SchedulerTable.js.map +1 -0
  132. package/presentation/schedulerList/components/SearchInput.d.ts +9 -0
  133. package/{Presentation/components/SearchInput → presentation/schedulerList/components}/SearchInput.js +8 -8
  134. package/presentation/schedulerList/components/SearchInput.js.map +1 -0
  135. package/presentation/schedulerList/feature.d.ts +3 -0
  136. package/presentation/schedulerList/feature.js +17 -0
  137. package/presentation/schedulerList/feature.js.map +1 -0
  138. package/presentation/schedulerList/useSchedulerListPresenter.d.ts +1 -0
  139. package/presentation/schedulerList/useSchedulerListPresenter.js +6 -0
  140. package/presentation/schedulerList/useSchedulerListPresenter.js.map +1 -0
  141. package/types.d.ts +0 -7
  142. package/types.js +1 -9
  143. package/types.js.map +1 -1
  144. package/Domain/Models/SchedulerItem/SchedulerItem.d.ts +0 -13
  145. package/Domain/Models/SchedulerItem/SchedulerItem.js +0 -18
  146. package/Domain/Models/SchedulerItem/SchedulerItem.js.map +0 -1
  147. package/Domain/Models/SchedulerItem/index.d.ts +0 -1
  148. package/Domain/Models/SchedulerItem/index.js +0 -1
  149. package/Domain/Models/index.d.ts +0 -1
  150. package/Domain/Models/index.js +0 -1
  151. package/Domain/Repositories/SchedulerItems/ISchedulerItemsRepository.d.ts +0 -14
  152. package/Domain/Repositories/SchedulerItems/ISchedulerItemsRepository.js +0 -0
  153. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.d.ts +0 -36
  154. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.js +0 -119
  155. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.js.map +0 -1
  156. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.d.ts +0 -19
  157. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.js +0 -18
  158. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.js.map +0 -1
  159. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.d.ts +0 -17
  160. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.js +0 -39
  161. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.js.map +0 -1
  162. package/Domain/Repositories/SchedulerItems/index.d.ts +0 -4
  163. package/Domain/Repositories/SchedulerItems/index.js +0 -3
  164. package/Domain/Repositories/Search/ISearchRepository.d.ts +0 -4
  165. package/Domain/Repositories/Search/ISearchRepository.js +0 -0
  166. package/Domain/Repositories/Search/SearchRepository.d.ts +0 -7
  167. package/Domain/Repositories/Search/SearchRepository.js +0 -16
  168. package/Domain/Repositories/Search/SearchRepository.js.map +0 -1
  169. package/Domain/Repositories/Search/SearchRepositoryFactory.d.ts +0 -7
  170. package/Domain/Repositories/Search/SearchRepositoryFactory.js +0 -18
  171. package/Domain/Repositories/Search/SearchRepositoryFactory.js.map +0 -1
  172. package/Domain/Repositories/Search/index.d.ts +0 -3
  173. package/Domain/Repositories/Search/index.js +0 -2
  174. package/Domain/Repositories/SelectedItems/ISelectedItemsRepository.d.ts +0 -8
  175. package/Domain/Repositories/SelectedItems/ISelectedItemsRepository.js +0 -0
  176. package/Domain/Repositories/SelectedItems/SelectedItemsRepository.d.ts +0 -12
  177. package/Domain/Repositories/SelectedItems/SelectedItemsRepository.js +0 -28
  178. package/Domain/Repositories/SelectedItems/SelectedItemsRepository.js.map +0 -1
  179. package/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.d.ts +0 -7
  180. package/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.js +0 -18
  181. package/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.js.map +0 -1
  182. package/Domain/Repositories/SelectedItems/index.d.ts +0 -3
  183. package/Domain/Repositories/SelectedItems/index.js +0 -2
  184. package/Domain/Repositories/Sorting/SortingRepositoryWithDefaults.d.ts +0 -8
  185. package/Domain/Repositories/Sorting/SortingRepositoryWithDefaults.js +0 -21
  186. package/Domain/Repositories/Sorting/SortingRepositoryWithDefaults.js.map +0 -1
  187. package/Domain/Repositories/Sorting/index.d.ts +0 -1
  188. package/Domain/Repositories/Sorting/index.js +0 -1
  189. package/Domain/Repositories/index.d.ts +0 -4
  190. package/Domain/Repositories/index.js +0 -4
  191. package/Domain/index.d.ts +0 -2
  192. package/Domain/index.js +0 -2
  193. package/Gateways/SchedulerCancelGraphQLGateway.d.ts +0 -7
  194. package/Gateways/SchedulerCancelGraphQLGateway.js +0 -42
  195. package/Gateways/SchedulerCancelGraphQLGateway.js.map +0 -1
  196. package/Gateways/SchedulerGetGraphQLGateway.d.ts +0 -21
  197. package/Gateways/SchedulerGetGraphQLGateway.js +0 -68
  198. package/Gateways/SchedulerGetGraphQLGateway.js.map +0 -1
  199. package/Gateways/SchedulerListGraphQLGateway.d.ts +0 -7
  200. package/Gateways/SchedulerListGraphQLGateway.js +0 -86
  201. package/Gateways/SchedulerListGraphQLGateway.js.map +0 -1
  202. package/Gateways/SchedulerPublishGraphQLGateway.d.ts +0 -7
  203. package/Gateways/SchedulerPublishGraphQLGateway.js +0 -59
  204. package/Gateways/SchedulerPublishGraphQLGateway.js.map +0 -1
  205. package/Gateways/SchedulerUnpublishGraphQLGateway.d.ts +0 -23
  206. package/Gateways/SchedulerUnpublishGraphQLGateway.js +0 -63
  207. package/Gateways/SchedulerUnpublishGraphQLGateway.js.map +0 -1
  208. package/Gateways/abstractions/CancelScheduledActionGateway.d.ts +0 -7
  209. package/Gateways/abstractions/CancelScheduledActionGateway.js +0 -0
  210. package/Gateways/abstractions/GetScheduledActionGateway.js +0 -0
  211. package/Gateways/abstractions/ListScheduledActionsGateway.js +0 -0
  212. package/Gateways/abstractions/SchedulePublishActionGateway.js +0 -0
  213. package/Gateways/abstractions/ScheduleUnpublishActionGateway.js +0 -0
  214. package/Gateways/graphql/fields.d.ts +0 -1
  215. package/Gateways/graphql/fields.js +0 -17
  216. package/Gateways/graphql/fields.js.map +0 -1
  217. package/Gateways/index.d.ts +0 -5
  218. package/Gateways/index.js +0 -0
  219. package/Gateways/schema/schedulerEntry.js.map +0 -1
  220. package/Presentation/Scheduler/Scheduler.d.ts +0 -17
  221. package/Presentation/Scheduler/Scheduler.js +0 -78
  222. package/Presentation/Scheduler/Scheduler.js.map +0 -1
  223. package/Presentation/Scheduler/SchedulerControllers.d.ts +0 -30
  224. package/Presentation/Scheduler/SchedulerControllers.js +0 -54
  225. package/Presentation/Scheduler/SchedulerControllers.js.map +0 -1
  226. package/Presentation/Scheduler/SchedulerPresenter.d.ts +0 -32
  227. package/Presentation/Scheduler/SchedulerPresenter.js +0 -45
  228. package/Presentation/Scheduler/SchedulerPresenter.js.map +0 -1
  229. package/Presentation/Scheduler/controllers/CancelItem/CancelItemController.d.ts +0 -7
  230. package/Presentation/Scheduler/controllers/CancelItem/CancelItemController.js +0 -12
  231. package/Presentation/Scheduler/controllers/CancelItem/CancelItemController.js.map +0 -1
  232. package/Presentation/Scheduler/controllers/CancelItem/ICancelItemController.d.ts +0 -3
  233. package/Presentation/Scheduler/controllers/CancelItem/ICancelItemController.js +0 -0
  234. package/Presentation/Scheduler/controllers/CancelItem/index.d.ts +0 -2
  235. package/Presentation/Scheduler/controllers/CancelItem/index.js +0 -1
  236. package/Presentation/Scheduler/controllers/GetItem/GetItemController.d.ts +0 -8
  237. package/Presentation/Scheduler/controllers/GetItem/GetItemController.js +0 -12
  238. package/Presentation/Scheduler/controllers/GetItem/GetItemController.js.map +0 -1
  239. package/Presentation/Scheduler/controllers/GetItem/IGetItemController.d.ts +0 -4
  240. package/Presentation/Scheduler/controllers/GetItem/IGetItemController.js +0 -0
  241. package/Presentation/Scheduler/controllers/GetItem/index.d.ts +0 -2
  242. package/Presentation/Scheduler/controllers/GetItem/index.js +0 -1
  243. package/Presentation/Scheduler/controllers/ListItems/IListItemsController.d.ts +0 -4
  244. package/Presentation/Scheduler/controllers/ListItems/IListItemsController.js +0 -0
  245. package/Presentation/Scheduler/controllers/ListItems/ListItemsController.d.ts +0 -8
  246. package/Presentation/Scheduler/controllers/ListItems/ListItemsController.js +0 -12
  247. package/Presentation/Scheduler/controllers/ListItems/ListItemsController.js.map +0 -1
  248. package/Presentation/Scheduler/controllers/ListItems/index.d.ts +0 -2
  249. package/Presentation/Scheduler/controllers/ListItems/index.js +0 -1
  250. package/Presentation/Scheduler/controllers/ListMoreItems/IListMoreItemsController.d.ts +0 -3
  251. package/Presentation/Scheduler/controllers/ListMoreItems/IListMoreItemsController.js +0 -0
  252. package/Presentation/Scheduler/controllers/ListMoreItems/ListMoreItemsController.d.ts +0 -7
  253. package/Presentation/Scheduler/controllers/ListMoreItems/ListMoreItemsController.js +0 -12
  254. package/Presentation/Scheduler/controllers/ListMoreItems/ListMoreItemsController.js.map +0 -1
  255. package/Presentation/Scheduler/controllers/ListMoreItems/index.d.ts +0 -2
  256. package/Presentation/Scheduler/controllers/ListMoreItems/index.js +0 -1
  257. package/Presentation/Scheduler/controllers/PublishItem/IPublishItemController.d.ts +0 -3
  258. package/Presentation/Scheduler/controllers/PublishItem/IPublishItemController.js +0 -0
  259. package/Presentation/Scheduler/controllers/PublishItem/PublishItemController.d.ts +0 -7
  260. package/Presentation/Scheduler/controllers/PublishItem/PublishItemController.js +0 -12
  261. package/Presentation/Scheduler/controllers/PublishItem/PublishItemController.js.map +0 -1
  262. package/Presentation/Scheduler/controllers/PublishItem/index.d.ts +0 -2
  263. package/Presentation/Scheduler/controllers/PublishItem/index.js +0 -1
  264. package/Presentation/Scheduler/controllers/SearchItems/ISearchItemsController.d.ts +0 -3
  265. package/Presentation/Scheduler/controllers/SearchItems/ISearchItemsController.js +0 -0
  266. package/Presentation/Scheduler/controllers/SearchItems/SearchItemsController.d.ts +0 -8
  267. package/Presentation/Scheduler/controllers/SearchItems/SearchItemsController.js +0 -15
  268. package/Presentation/Scheduler/controllers/SearchItems/SearchItemsController.js.map +0 -1
  269. package/Presentation/Scheduler/controllers/SearchItems/index.d.ts +0 -2
  270. package/Presentation/Scheduler/controllers/SearchItems/index.js +0 -1
  271. package/Presentation/Scheduler/controllers/SelectAllItems/ISelectAllItemsController.d.ts +0 -3
  272. package/Presentation/Scheduler/controllers/SelectAllItems/ISelectAllItemsController.js +0 -0
  273. package/Presentation/Scheduler/controllers/SelectAllItems/SelectAllItemsController.d.ts +0 -7
  274. package/Presentation/Scheduler/controllers/SelectAllItems/SelectAllItemsController.js +0 -12
  275. package/Presentation/Scheduler/controllers/SelectAllItems/SelectAllItemsController.js.map +0 -1
  276. package/Presentation/Scheduler/controllers/SelectAllItems/index.d.ts +0 -2
  277. package/Presentation/Scheduler/controllers/SelectAllItems/index.js +0 -1
  278. package/Presentation/Scheduler/controllers/SelectItems/ISelectItemsController.d.ts +0 -4
  279. package/Presentation/Scheduler/controllers/SelectItems/ISelectItemsController.js +0 -0
  280. package/Presentation/Scheduler/controllers/SelectItems/SelectItemsController.d.ts +0 -8
  281. package/Presentation/Scheduler/controllers/SelectItems/SelectItemsController.js +0 -14
  282. package/Presentation/Scheduler/controllers/SelectItems/SelectItemsController.js.map +0 -1
  283. package/Presentation/Scheduler/controllers/SelectItems/index.d.ts +0 -2
  284. package/Presentation/Scheduler/controllers/SelectItems/index.js +0 -1
  285. package/Presentation/Scheduler/controllers/SortItems/ISortItemsController.d.ts +0 -4
  286. package/Presentation/Scheduler/controllers/SortItems/ISortItemsController.js +0 -0
  287. package/Presentation/Scheduler/controllers/SortItems/SortItemsController.d.ts +0 -9
  288. package/Presentation/Scheduler/controllers/SortItems/SortItemsController.js +0 -18
  289. package/Presentation/Scheduler/controllers/SortItems/SortItemsController.js.map +0 -1
  290. package/Presentation/Scheduler/controllers/SortItems/index.d.ts +0 -2
  291. package/Presentation/Scheduler/controllers/SortItems/index.js +0 -1
  292. package/Presentation/Scheduler/controllers/UnpublishItem/IUnpublishItemController.d.ts +0 -3
  293. package/Presentation/Scheduler/controllers/UnpublishItem/IUnpublishItemController.js +0 -0
  294. package/Presentation/Scheduler/controllers/UnpublishItem/UnpublishItemController.d.ts +0 -7
  295. package/Presentation/Scheduler/controllers/UnpublishItem/UnpublishItemController.js +0 -12
  296. package/Presentation/Scheduler/controllers/UnpublishItem/UnpublishItemController.js.map +0 -1
  297. package/Presentation/Scheduler/controllers/UnpublishItem/index.d.ts +0 -2
  298. package/Presentation/Scheduler/controllers/UnpublishItem/index.js +0 -1
  299. package/Presentation/Scheduler/controllers/UnselectAllItems/IUnselectAllItemsController.d.ts +0 -3
  300. package/Presentation/Scheduler/controllers/UnselectAllItems/IUnselectAllItemsController.js +0 -0
  301. package/Presentation/Scheduler/controllers/UnselectAllItems/UnselectAllItemsController.d.ts +0 -7
  302. package/Presentation/Scheduler/controllers/UnselectAllItems/UnselectAllItemsController.js +0 -12
  303. package/Presentation/Scheduler/controllers/UnselectAllItems/UnselectAllItemsController.js.map +0 -1
  304. package/Presentation/Scheduler/controllers/UnselectAllItems/index.d.ts +0 -2
  305. package/Presentation/Scheduler/controllers/UnselectAllItems/index.js +0 -1
  306. package/Presentation/Scheduler/controllers/index.d.ts +0 -11
  307. package/Presentation/Scheduler/controllers/index.js +0 -11
  308. package/Presentation/Scheduler/index.d.ts +0 -1
  309. package/Presentation/Scheduler/index.js +0 -1
  310. package/Presentation/SchedulerRenderer/SchedulerRenderer.d.ts +0 -6
  311. package/Presentation/SchedulerRenderer/SchedulerRenderer.js +0 -16
  312. package/Presentation/SchedulerRenderer/SchedulerRenderer.js.map +0 -1
  313. package/Presentation/SchedulerRenderer/index.d.ts +0 -1
  314. package/Presentation/SchedulerRenderer/index.js +0 -1
  315. package/Presentation/abstractions/ISchedulerControllers.d.ts +0 -14
  316. package/Presentation/abstractions/ISchedulerControllers.js +0 -0
  317. package/Presentation/abstractions/ISchedulerPresenter.d.ts +0 -20
  318. package/Presentation/abstractions/ISchedulerPresenter.js +0 -0
  319. package/Presentation/abstractions/index.d.ts +0 -2
  320. package/Presentation/abstractions/index.js +0 -0
  321. package/Presentation/components/Actions/CancelItem/CancelItem.js.map +0 -1
  322. package/Presentation/components/BottomInfoBar/BottomInfoBar.d.ts +0 -2
  323. package/Presentation/components/BottomInfoBar/BottomInfoBar.js +0 -19
  324. package/Presentation/components/BottomInfoBar/BottomInfoBar.js.map +0 -1
  325. package/Presentation/components/BottomInfoBar/index.d.ts +0 -1
  326. package/Presentation/components/BottomInfoBar/index.js +0 -1
  327. package/Presentation/components/Empty/Empty.d.ts +0 -2
  328. package/Presentation/components/Empty/Empty.js.map +0 -1
  329. package/Presentation/components/Empty/index.d.ts +0 -1
  330. package/Presentation/components/Empty/index.js +0 -1
  331. package/Presentation/components/ScheduleDialog/IScheduleDialogPresenter.js +0 -0
  332. package/Presentation/components/ScheduleDialog/ScheduleDialogPresenter.d.ts +0 -22
  333. package/Presentation/components/ScheduleDialog/ScheduleDialogPresenter.js.map +0 -1
  334. package/Presentation/components/ScheduleDialog/index.d.ts +0 -1
  335. package/Presentation/components/ScheduleDialog/index.js +0 -1
  336. package/Presentation/components/ScheduleDialog/types.d.ts +0 -15
  337. package/Presentation/components/ScheduleDialog/types.js +0 -0
  338. package/Presentation/components/ScheduleDialog/useScheduleDialog.js.map +0 -1
  339. package/Presentation/components/SchedulerOverlay/SchedulerOverlay.d.ts +0 -7
  340. package/Presentation/components/SchedulerOverlay/SchedulerOverlay.js +0 -30
  341. package/Presentation/components/SchedulerOverlay/SchedulerOverlay.js.map +0 -1
  342. package/Presentation/components/SchedulerOverlay/index.d.ts +0 -1
  343. package/Presentation/components/SchedulerOverlay/index.js +0 -1
  344. package/Presentation/components/SearchInput/SearchInput.d.ts +0 -2
  345. package/Presentation/components/SearchInput/SearchInput.js.map +0 -1
  346. package/Presentation/components/SearchInput/index.d.ts +0 -1
  347. package/Presentation/components/SearchInput/index.js +0 -1
  348. package/Presentation/components/Table/Table.d.ts +0 -2
  349. package/Presentation/components/Table/Table.js +0 -29
  350. package/Presentation/components/Table/Table.js.map +0 -1
  351. package/Presentation/components/Table/index.d.ts +0 -1
  352. package/Presentation/components/Table/index.js +0 -1
  353. package/Presentation/configs/list/Browser/Table/index.d.ts +0 -18
  354. package/Presentation/configs/list/Browser/index.d.ts +0 -23
  355. package/Presentation/hooks/useCancelSchedulerItem.js.map +0 -1
  356. package/Presentation/hooks/useScheduler.d.ts +0 -28
  357. package/Presentation/hooks/useScheduler.js +0 -68
  358. package/Presentation/hooks/useScheduler.js.map +0 -1
  359. package/Presentation/index.js +0 -49
  360. package/Presentation/index.js.map +0 -1
  361. package/UseCases/CancelItem/CancelItemUseCase.d.ts +0 -7
  362. package/UseCases/CancelItem/CancelItemUseCase.js +0 -13
  363. package/UseCases/CancelItem/CancelItemUseCase.js.map +0 -1
  364. package/UseCases/CancelItem/ICancelItemUseCase.d.ts +0 -3
  365. package/UseCases/CancelItem/ICancelItemUseCase.js +0 -0
  366. package/UseCases/CancelItem/index.d.ts +0 -2
  367. package/UseCases/CancelItem/index.js +0 -1
  368. package/UseCases/GetItem/GetItemUseCase.d.ts +0 -8
  369. package/UseCases/GetItem/GetItemUseCase.js +0 -13
  370. package/UseCases/GetItem/GetItemUseCase.js.map +0 -1
  371. package/UseCases/GetItem/IGetItemUseCase.d.ts +0 -4
  372. package/UseCases/GetItem/IGetItemUseCase.js +0 -0
  373. package/UseCases/GetItem/index.d.ts +0 -2
  374. package/UseCases/GetItem/index.js +0 -1
  375. package/UseCases/GetScheduledItem/GetScheduledItemUseCase.d.ts +0 -7
  376. package/UseCases/GetScheduledItem/GetScheduledItemUseCase.js +0 -14
  377. package/UseCases/GetScheduledItem/GetScheduledItemUseCase.js.map +0 -1
  378. package/UseCases/GetScheduledItem/IGetScheduledItemUseCase.d.ts +0 -4
  379. package/UseCases/GetScheduledItem/IGetScheduledItemUseCase.js +0 -0
  380. package/UseCases/GetScheduledItem/index.d.ts +0 -2
  381. package/UseCases/GetScheduledItem/index.js +0 -1
  382. package/UseCases/ListItems/IListItemsUseCase.d.ts +0 -4
  383. package/UseCases/ListItems/IListItemsUseCase.js +0 -0
  384. package/UseCases/ListItems/ListItemsUseCase.d.ts +0 -8
  385. package/UseCases/ListItems/ListItemsUseCase.js +0 -13
  386. package/UseCases/ListItems/ListItemsUseCase.js.map +0 -1
  387. package/UseCases/ListItems/ListItemsUseCaseWithSearch.d.ts +0 -9
  388. package/UseCases/ListItems/ListItemsUseCaseWithSearch.js +0 -23
  389. package/UseCases/ListItems/ListItemsUseCaseWithSearch.js.map +0 -1
  390. package/UseCases/ListItems/ListItemsUseCaseWithSorting.d.ts +0 -9
  391. package/UseCases/ListItems/ListItemsUseCaseWithSorting.js +0 -21
  392. package/UseCases/ListItems/ListItemsUseCaseWithSorting.js.map +0 -1
  393. package/UseCases/ListItems/index.d.ts +0 -4
  394. package/UseCases/ListItems/index.js +0 -3
  395. package/UseCases/ListMoreItems/IListMoreItemsUseCase.d.ts +0 -3
  396. package/UseCases/ListMoreItems/IListMoreItemsUseCase.js +0 -0
  397. package/UseCases/ListMoreItems/ListMoreItemsUseCase.d.ts +0 -7
  398. package/UseCases/ListMoreItems/ListMoreItemsUseCase.js +0 -13
  399. package/UseCases/ListMoreItems/ListMoreItemsUseCase.js.map +0 -1
  400. package/UseCases/ListMoreItems/index.d.ts +0 -2
  401. package/UseCases/ListMoreItems/index.js +0 -1
  402. package/UseCases/PublishItem/IPublishItemUseCase.d.ts +0 -3
  403. package/UseCases/PublishItem/IPublishItemUseCase.js +0 -0
  404. package/UseCases/PublishItem/PublishItemUseCase.d.ts +0 -7
  405. package/UseCases/PublishItem/PublishItemUseCase.js +0 -13
  406. package/UseCases/PublishItem/PublishItemUseCase.js.map +0 -1
  407. package/UseCases/PublishItem/index.d.ts +0 -2
  408. package/UseCases/PublishItem/index.js +0 -1
  409. package/UseCases/SearchItems/ISearchItemsUseCase.d.ts +0 -3
  410. package/UseCases/SearchItems/ISearchItemsUseCase.js +0 -0
  411. package/UseCases/SearchItems/SearchItemsUseCase.d.ts +0 -7
  412. package/UseCases/SearchItems/SearchItemsUseCase.js +0 -13
  413. package/UseCases/SearchItems/SearchItemsUseCase.js.map +0 -1
  414. package/UseCases/SearchItems/index.d.ts +0 -2
  415. package/UseCases/SearchItems/index.js +0 -1
  416. package/UseCases/SelectAllItems/ISelectAllItemsUseCase.d.ts +0 -3
  417. package/UseCases/SelectAllItems/ISelectAllItemsUseCase.js +0 -0
  418. package/UseCases/SelectAllItems/SelectAllItemsUseCase.d.ts +0 -7
  419. package/UseCases/SelectAllItems/SelectAllItemsUseCase.js +0 -13
  420. package/UseCases/SelectAllItems/SelectAllItemsUseCase.js.map +0 -1
  421. package/UseCases/SelectAllItems/index.d.ts +0 -2
  422. package/UseCases/SelectAllItems/index.js +0 -1
  423. package/UseCases/SelectItems/ISelectItemsUseCase.d.ts +0 -4
  424. package/UseCases/SelectItems/ISelectItemsUseCase.js +0 -0
  425. package/UseCases/SelectItems/SelectItemsUseCase.d.ts +0 -7
  426. package/UseCases/SelectItems/SelectItemsUseCase.js +0 -13
  427. package/UseCases/SelectItems/SelectItemsUseCase.js.map +0 -1
  428. package/UseCases/SelectItems/index.d.ts +0 -2
  429. package/UseCases/SelectItems/index.js +0 -1
  430. package/UseCases/SortItems/ISortItemsUseCase.d.ts +0 -4
  431. package/UseCases/SortItems/ISortItemsUseCase.js +0 -0
  432. package/UseCases/SortItems/SortItemsUseCase.d.ts +0 -7
  433. package/UseCases/SortItems/SortItemsUseCase.js +0 -13
  434. package/UseCases/SortItems/SortItemsUseCase.js.map +0 -1
  435. package/UseCases/SortItems/index.d.ts +0 -2
  436. package/UseCases/SortItems/index.js +0 -1
  437. package/UseCases/UnSelectAllItems/IUnselectAllItemsUseCase.d.ts +0 -3
  438. package/UseCases/UnSelectAllItems/IUnselectAllItemsUseCase.js +0 -0
  439. package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.d.ts +0 -7
  440. package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.js +0 -13
  441. package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.js.map +0 -1
  442. package/UseCases/UnSelectAllItems/index.d.ts +0 -2
  443. package/UseCases/UnSelectAllItems/index.js +0 -1
  444. package/UseCases/UnpublishItem/IUnpublishItemUseCase.d.ts +0 -3
  445. package/UseCases/UnpublishItem/IUnpublishItemUseCase.js +0 -0
  446. package/UseCases/UnpublishItem/UnpublishItemUseCase.d.ts +0 -7
  447. package/UseCases/UnpublishItem/UnpublishItemUseCase.js +0 -13
  448. package/UseCases/UnpublishItem/UnpublishItemUseCase.js.map +0 -1
  449. package/UseCases/UnpublishItem/index.d.ts +0 -2
  450. package/UseCases/UnpublishItem/index.js +0 -1
  451. package/UseCases/index.d.ts +0 -11
  452. package/UseCases/index.js +0 -11
  453. /package/{Presentation → presentation}/SchedulerConfigs/SchedulerConfigs.d.ts +0 -0
  454. /package/{Presentation → presentation}/SchedulerConfigs/SchedulerConfigs.js +0 -0
  455. /package/{Presentation → presentation}/SchedulerConfigs/index.d.ts +0 -0
  456. /package/{Presentation → presentation}/SchedulerConfigs/index.js +0 -0
  457. /package/{Presentation → presentation}/components/Actions/CancelItem/CancelItem.d.ts +0 -0
  458. /package/{Presentation → presentation}/components/Actions/CancelItem/index.d.ts +0 -0
  459. /package/{Presentation → presentation}/components/Actions/CancelItem/index.js +0 -0
  460. /package/{Presentation → presentation}/components/Actions/index.d.ts +0 -0
  461. /package/{Presentation → presentation}/components/Actions/index.js +0 -0
  462. /package/{Presentation → presentation}/components/BottomInfoBar/BottomInfoBar.styled.d.ts +0 -0
  463. /package/{Presentation → presentation}/components/BottomInfoBar/BottomInfoBar.styled.js +0 -0
  464. /package/{Presentation → presentation}/components/BottomInfoBar/ListMeta.d.ts +0 -0
  465. /package/{Presentation → presentation}/components/BottomInfoBar/ListMeta.js +0 -0
  466. /package/{Presentation → presentation}/components/BottomInfoBar/ListStatus.d.ts +0 -0
  467. /package/{Presentation → presentation}/components/BottomInfoBar/ListStatus.js +0 -0
  468. /package/{Presentation → presentation}/components/Cells/CellActions/CellActions.d.ts +0 -0
  469. /package/{Presentation → presentation}/components/Cells/CellActions/CellActions.js +0 -0
  470. /package/{Presentation → presentation}/components/Cells/CellActions/index.d.ts +0 -0
  471. /package/{Presentation → presentation}/components/Cells/CellActions/index.js +0 -0
  472. /package/{Presentation → presentation}/components/Cells/CellRevision/CellRevision.d.ts +0 -0
  473. /package/{Presentation → presentation}/components/Cells/CellRevision/CellRevision.js +0 -0
  474. /package/{Presentation → presentation}/components/Cells/CellRevision/CellRevision.styled.d.ts +0 -0
  475. /package/{Presentation → presentation}/components/Cells/CellRevision/CellRevision.styled.js +0 -0
  476. /package/{Presentation → presentation}/components/Cells/CellRevision/index.d.ts +0 -0
  477. /package/{Presentation → presentation}/components/Cells/CellRevision/index.js +0 -0
  478. /package/{Presentation → presentation}/components/Cells/CellScheduledBy/CellScheduledBy.d.ts +0 -0
  479. /package/{Presentation → presentation}/components/Cells/CellScheduledBy/CellScheduledBy.js +0 -0
  480. /package/{Presentation → presentation}/components/Cells/CellScheduledBy/index.d.ts +0 -0
  481. /package/{Presentation → presentation}/components/Cells/CellScheduledBy/index.js +0 -0
  482. /package/{Presentation → presentation}/components/Cells/CellScheduledOn/CellScheduledOn.d.ts +0 -0
  483. /package/{Presentation → presentation}/components/Cells/CellScheduledOn/CellScheduledOn.js +0 -0
  484. /package/{Presentation → presentation}/components/Cells/CellScheduledOn/index.d.ts +0 -0
  485. /package/{Presentation → presentation}/components/Cells/CellScheduledOn/index.js +0 -0
  486. /package/{Presentation → presentation}/components/Cells/CellTitle/CellTitle.d.ts +0 -0
  487. /package/{Presentation → presentation}/components/Cells/CellTitle/CellTitle.js +0 -0
  488. /package/{Presentation → presentation}/components/Cells/CellTitle/CellTitle.styled.d.ts +0 -0
  489. /package/{Presentation → presentation}/components/Cells/CellTitle/CellTitle.styled.js +0 -0
  490. /package/{Presentation → presentation}/components/Cells/CellTitle/index.d.ts +0 -0
  491. /package/{Presentation → presentation}/components/Cells/CellTitle/index.js +0 -0
  492. /package/{Presentation → presentation}/components/Cells/CellType/CellActionType.d.ts +0 -0
  493. /package/{Presentation → presentation}/components/Cells/CellType/CellActionType.js +0 -0
  494. /package/{Presentation → presentation}/components/Cells/CellType/CellActionType.styled.d.ts +0 -0
  495. /package/{Presentation → presentation}/components/Cells/CellType/CellActionType.styled.js +0 -0
  496. /package/{Presentation → presentation}/components/Cells/CellType/index.d.ts +0 -0
  497. /package/{Presentation → presentation}/components/Cells/CellType/index.js +0 -0
  498. /package/{Presentation → presentation}/components/Cells/index.d.ts +0 -0
  499. /package/{Presentation → presentation}/components/Cells/index.js +0 -0
  500. /package/{Presentation → presentation}/components/Empty/Empty.styled.d.ts +0 -0
  501. /package/{Presentation → presentation}/components/Empty/Empty.styled.js +0 -0
  502. /package/{Presentation → presentation}/components/Title/Title.d.ts +0 -0
  503. /package/{Presentation → presentation}/components/Title/Title.js +0 -0
  504. /package/{Presentation → presentation}/components/Title/Title.styled.d.ts +0 -0
  505. /package/{Presentation → presentation}/components/Title/Title.styled.js +0 -0
  506. /package/{Presentation → presentation}/components/Title/index.d.ts +0 -0
  507. /package/{Presentation → presentation}/components/Title/index.js +0 -0
  508. /package/{Presentation → presentation}/configs/index.d.ts +0 -0
  509. /package/{Presentation → presentation}/configs/index.js +0 -0
  510. /package/{Presentation → presentation}/configs/list/Browser/EntryAction.js +0 -0
  511. /package/{Presentation → presentation}/configs/list/Browser/Table/Column.js +0 -0
  512. /package/{Presentation → presentation}/configs/list/Browser/Table/Sorting.d.ts +0 -0
  513. /package/{Presentation → presentation}/configs/list/Browser/Table/Sorting.js +0 -0
  514. /package/{Presentation → presentation}/configs/list/Browser/Table/index.js +0 -0
  515. /package/{Presentation → presentation}/configs/list/Browser/index.js +0 -0
  516. /package/{Presentation → presentation}/configs/list/SchedulerListConfig.js +0 -0
  517. /package/{Presentation → presentation}/configs/list/index.d.ts +0 -0
  518. /package/{Presentation → presentation}/configs/list/index.js +0 -0
  519. /package/{Presentation → presentation}/hooks/useCancelSchedulerItem.d.ts +0 -0
  520. /package/{Presentation → presentation}/hooks/useSchedulerItem.d.ts +0 -0
  521. /package/{Presentation → presentation}/hooks/useSchedulerItem.js +0 -0
@@ -1,36 +0,0 @@
1
- import type { SchedulerItem } from "../../../Domain/index.js";
2
- import type { ICancelScheduledActionGateway, IListScheduledActionsGateway, ISchedulePublishActionGateway, IScheduleUnpublishActionGateway } from "../../../Gateways/index.js";
3
- import { type IGetScheduledActionGatewayExecuteParams, type IGetScheduledActionGateway, type IListScheduledActionsGatewayExecuteParams } from "../../../Gateways/index.js";
4
- import type { IMetaRepository } from "@webiny/app-utils";
5
- import { Meta } from "@webiny/app-utils";
6
- import type { ISchedulerItemsRepository } from "./ISchedulerItemsRepository.js";
7
- export interface ISchedulerItemsRepositoryParams {
8
- metaRepository: IMetaRepository;
9
- getGateway: IGetScheduledActionGateway;
10
- listGateway: IListScheduledActionsGateway;
11
- cancelGateway: ICancelScheduledActionGateway;
12
- unpublishGateway: IScheduleUnpublishActionGateway;
13
- publishGateway: ISchedulePublishActionGateway;
14
- namespace: string;
15
- }
16
- export declare class SchedulerItemsRepository implements ISchedulerItemsRepository {
17
- private readonly metaRepository;
18
- private readonly getGateway;
19
- private readonly listGateway;
20
- private readonly cancelGateway;
21
- private readonly unpublishGateway;
22
- private readonly publishGateway;
23
- private readonly namespace;
24
- private items;
25
- private params;
26
- constructor(params: ISchedulerItemsRepositoryParams);
27
- getItems(): SchedulerItem[];
28
- getMeta(): Meta;
29
- getLoading(): {};
30
- getItem(params: Omit<IGetScheduledActionGatewayExecuteParams, "namespace">): Promise<void>;
31
- listItems(params?: Omit<IListScheduledActionsGatewayExecuteParams, "namespace">): Promise<void>;
32
- listMoreItems(): Promise<void>;
33
- scheduleCancelItem(id: string): Promise<void>;
34
- schedulePublishItem(targetId: string, scheduleOn: Date): Promise<void>;
35
- scheduleUnpublishItem(targetId: string, scheduleOn: Date): Promise<void>;
36
- }
@@ -1,119 +0,0 @@
1
- import { makeAutoObservable, runInAction } from "mobx";
2
- import uniqBy from "lodash/uniqBy.js";
3
- import { Meta } from "@webiny/app-utils";
4
- class SchedulerItemsRepository {
5
- constructor(params){
6
- this.items = [];
7
- this.metaRepository = params.metaRepository;
8
- this.listGateway = params.listGateway;
9
- this.getGateway = params.getGateway;
10
- this.cancelGateway = params.cancelGateway;
11
- this.unpublishGateway = params.unpublishGateway;
12
- this.publishGateway = params.publishGateway;
13
- this.namespace = params.namespace;
14
- this.params = {
15
- namespace: this.namespace
16
- };
17
- makeAutoObservable(this);
18
- }
19
- getItems() {
20
- return this.items;
21
- }
22
- getMeta() {
23
- return this.metaRepository.get();
24
- }
25
- getLoading() {
26
- return {};
27
- }
28
- async getItem(params) {
29
- const item = await this.getGateway.execute({
30
- id: params.id,
31
- namespace: this.namespace
32
- });
33
- runInAction(()=>{
34
- this.items = [];
35
- });
36
- if (!item) return;
37
- runInAction(()=>{
38
- this.items = [
39
- item
40
- ];
41
- });
42
- }
43
- async listItems(params) {
44
- this.params = {
45
- where: params?.where,
46
- limit: params?.limit,
47
- sort: params?.sort,
48
- after: params?.after,
49
- namespace: this.namespace
50
- };
51
- const response = await this.listGateway.execute({
52
- ...this.params
53
- });
54
- if (!response) return;
55
- runInAction(()=>{
56
- this.items = response.items;
57
- this.metaRepository.set(Meta.create(response.meta));
58
- });
59
- }
60
- async listMoreItems() {
61
- const { cursor } = this.metaRepository.get();
62
- if (!cursor) return;
63
- const response = await this.listGateway.execute({
64
- ...this.params,
65
- after: cursor
66
- });
67
- if (!response) return;
68
- runInAction(()=>{
69
- this.items = uniqBy([
70
- ...this.items,
71
- ...response.items
72
- ], "id");
73
- this.metaRepository.set(Meta.create(response.meta));
74
- });
75
- }
76
- async scheduleCancelItem(id) {
77
- await this.cancelGateway.execute({
78
- namespace: this.namespace,
79
- id
80
- });
81
- runInAction(()=>{
82
- this.items = this.items.filter((item)=>item.id !== id);
83
- this.metaRepository.decreaseTotalCount(1);
84
- });
85
- }
86
- async schedulePublishItem(targetId, scheduleOn) {
87
- const { item } = await this.publishGateway.execute({
88
- namespace: this.namespace,
89
- targetId,
90
- scheduleOn
91
- });
92
- if (!item) return;
93
- runInAction(()=>{
94
- this.items = [
95
- ...this.items,
96
- item
97
- ];
98
- this.metaRepository.increaseTotalCount(1);
99
- });
100
- }
101
- async scheduleUnpublishItem(targetId, scheduleOn) {
102
- const { item } = await this.unpublishGateway.execute({
103
- namespace: this.namespace,
104
- targetId,
105
- scheduleOn
106
- });
107
- if (!item) return;
108
- runInAction(()=>{
109
- this.items = [
110
- ...this.items,
111
- item
112
- ];
113
- this.metaRepository.increaseTotalCount(1);
114
- });
115
- }
116
- }
117
- export { SchedulerItemsRepository };
118
-
119
- //# sourceMappingURL=SchedulerItemsRepository.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Domain/Repositories/SchedulerItems/SchedulerItemsRepository.js","sources":["../../../../src/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.ts"],"sourcesContent":["import { makeAutoObservable, runInAction } from \"mobx\";\nimport uniqBy from \"lodash/uniqBy.js\";\nimport type { SchedulerItem } from \"~/Domain/index.js\";\nimport type {\n ICancelScheduledActionGateway,\n IListScheduledActionsGateway,\n ISchedulePublishActionGateway,\n IScheduleUnpublishActionGateway\n} from \"~/Gateways/index.js\";\nimport {\n type IGetScheduledActionGatewayExecuteParams,\n type IGetScheduledActionGateway,\n type IListScheduledActionsGatewayExecuteParams\n} from \"~/Gateways/index.js\";\nimport type { IMetaRepository } from \"@webiny/app-utils\";\nimport { Meta } from \"@webiny/app-utils\";\nimport type { ISchedulerItemsRepository } from \"./ISchedulerItemsRepository.js\";\n\nexport interface ISchedulerItemsRepositoryParams {\n metaRepository: IMetaRepository;\n getGateway: IGetScheduledActionGateway;\n listGateway: IListScheduledActionsGateway;\n cancelGateway: ICancelScheduledActionGateway;\n unpublishGateway: IScheduleUnpublishActionGateway;\n publishGateway: ISchedulePublishActionGateway;\n namespace: string;\n}\n\nexport class SchedulerItemsRepository implements ISchedulerItemsRepository {\n private readonly metaRepository: IMetaRepository;\n private readonly getGateway: IGetScheduledActionGateway;\n private readonly listGateway: IListScheduledActionsGateway;\n private readonly cancelGateway: ICancelScheduledActionGateway;\n private readonly unpublishGateway: IScheduleUnpublishActionGateway;\n private readonly publishGateway: ISchedulePublishActionGateway;\n private readonly namespace: string;\n private items: SchedulerItem[] = [];\n private params: IListScheduledActionsGatewayExecuteParams;\n\n public constructor(params: ISchedulerItemsRepositoryParams) {\n this.metaRepository = params.metaRepository;\n this.listGateway = params.listGateway;\n this.getGateway = params.getGateway;\n this.cancelGateway = params.cancelGateway;\n this.unpublishGateway = params.unpublishGateway;\n this.publishGateway = params.publishGateway;\n this.namespace = params.namespace;\n this.params = {\n namespace: this.namespace\n };\n makeAutoObservable(this);\n }\n\n public getItems() {\n return this.items;\n }\n\n public getMeta() {\n return this.metaRepository.get();\n }\n\n public getLoading() {\n return {};\n }\n\n public async getItem(params: Omit<IGetScheduledActionGatewayExecuteParams, \"namespace\">) {\n const item = await this.getGateway.execute({\n id: params.id,\n namespace: this.namespace\n });\n /**\n * TODO Do we want to reset the items list?\n */\n runInAction(() => {\n this.items = [];\n });\n\n if (!item) {\n return;\n }\n\n runInAction(() => {\n this.items = [item];\n });\n }\n\n public async listItems(params?: Omit<IListScheduledActionsGatewayExecuteParams, \"namespace\">) {\n this.params = {\n where: params?.where,\n limit: params?.limit,\n sort: params?.sort,\n after: params?.after,\n namespace: this.namespace\n };\n\n const response = await this.listGateway.execute({ ...this.params });\n\n if (!response) {\n return;\n }\n\n runInAction(() => {\n this.items = response.items;\n this.metaRepository.set(Meta.create(response.meta));\n });\n }\n\n public async listMoreItems() {\n const { cursor } = this.metaRepository.get();\n\n if (!cursor) {\n return;\n }\n\n const response = await this.listGateway.execute({ ...this.params, after: cursor });\n\n if (!response) {\n return;\n }\n\n runInAction(() => {\n this.items = uniqBy([...this.items, ...response.items], \"id\");\n this.metaRepository.set(Meta.create(response.meta));\n });\n }\n\n public async scheduleCancelItem(id: string) {\n await this.cancelGateway.execute({\n namespace: this.namespace,\n id\n });\n\n runInAction(() => {\n this.items = this.items.filter(item => item.id !== id);\n this.metaRepository.decreaseTotalCount(1);\n });\n }\n\n public async schedulePublishItem(targetId: string, scheduleOn: Date) {\n const { item } = await this.publishGateway.execute({\n namespace: this.namespace,\n targetId,\n scheduleOn\n });\n\n if (!item) {\n return;\n }\n\n runInAction(() => {\n this.items = [...this.items, item];\n this.metaRepository.increaseTotalCount(1);\n });\n }\n\n public async scheduleUnpublishItem(targetId: string, scheduleOn: Date) {\n const { item } = await this.unpublishGateway.execute({\n namespace: this.namespace,\n targetId,\n scheduleOn\n });\n\n if (!item) {\n return;\n }\n\n runInAction(() => {\n this.items = [...this.items, item];\n this.metaRepository.increaseTotalCount(1);\n });\n }\n}\n"],"names":["SchedulerItemsRepository","params","makeAutoObservable","item","runInAction","response","Meta","cursor","uniqBy","id","targetId","scheduleOn"],"mappings":";;;AA4BO,MAAMA;IAWT,YAAmBC,MAAuC,CAAE;aAHpD,KAAK,GAAoB,EAAE;QAI/B,IAAI,CAAC,cAAc,GAAGA,OAAO,cAAc;QAC3C,IAAI,CAAC,WAAW,GAAGA,OAAO,WAAW;QACrC,IAAI,CAAC,UAAU,GAAGA,OAAO,UAAU;QACnC,IAAI,CAAC,aAAa,GAAGA,OAAO,aAAa;QACzC,IAAI,CAAC,gBAAgB,GAAGA,OAAO,gBAAgB;QAC/C,IAAI,CAAC,cAAc,GAAGA,OAAO,cAAc;QAC3C,IAAI,CAAC,SAAS,GAAGA,OAAO,SAAS;QACjC,IAAI,CAAC,MAAM,GAAG;YACV,WAAW,IAAI,CAAC,SAAS;QAC7B;QACAC,mBAAmB,IAAI;IAC3B;IAEO,WAAW;QACd,OAAO,IAAI,CAAC,KAAK;IACrB;IAEO,UAAU;QACb,OAAO,IAAI,CAAC,cAAc,CAAC,GAAG;IAClC;IAEO,aAAa;QAChB,OAAO,CAAC;IACZ;IAEA,MAAa,QAAQD,MAAkE,EAAE;QACrF,MAAME,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC;YACvC,IAAIF,OAAO,EAAE;YACb,WAAW,IAAI,CAAC,SAAS;QAC7B;QAIAG,YAAY;YACR,IAAI,CAAC,KAAK,GAAG,EAAE;QACnB;QAEA,IAAI,CAACD,MACD;QAGJC,YAAY;YACR,IAAI,CAAC,KAAK,GAAG;gBAACD;aAAK;QACvB;IACJ;IAEA,MAAa,UAAUF,MAAqE,EAAE;QAC1F,IAAI,CAAC,MAAM,GAAG;YACV,OAAOA,QAAQ;YACf,OAAOA,QAAQ;YACf,MAAMA,QAAQ;YACd,OAAOA,QAAQ;YACf,WAAW,IAAI,CAAC,SAAS;QAC7B;QAEA,MAAMI,WAAW,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAAE,GAAG,IAAI,CAAC,MAAM;QAAC;QAEjE,IAAI,CAACA,UACD;QAGJD,YAAY;YACR,IAAI,CAAC,KAAK,GAAGC,SAAS,KAAK;YAC3B,IAAI,CAAC,cAAc,CAAC,GAAG,CAACC,KAAK,MAAM,CAACD,SAAS,IAAI;QACrD;IACJ;IAEA,MAAa,gBAAgB;QACzB,MAAM,EAAEE,MAAM,EAAE,GAAG,IAAI,CAAC,cAAc,CAAC,GAAG;QAE1C,IAAI,CAACA,QACD;QAGJ,MAAMF,WAAW,MAAM,IAAI,CAAC,WAAW,CAAC,OAAO,CAAC;YAAE,GAAG,IAAI,CAAC,MAAM;YAAE,OAAOE;QAAO;QAEhF,IAAI,CAACF,UACD;QAGJD,YAAY;YACR,IAAI,CAAC,KAAK,GAAGI,OAAO;mBAAI,IAAI,CAAC,KAAK;mBAAKH,SAAS,KAAK;aAAC,EAAE;YACxD,IAAI,CAAC,cAAc,CAAC,GAAG,CAACC,KAAK,MAAM,CAACD,SAAS,IAAI;QACrD;IACJ;IAEA,MAAa,mBAAmBI,EAAU,EAAE;QACxC,MAAM,IAAI,CAAC,aAAa,CAAC,OAAO,CAAC;YAC7B,WAAW,IAAI,CAAC,SAAS;YACzBA;QACJ;QAEAL,YAAY;YACR,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAACD,CAAAA,OAAQA,KAAK,EAAE,KAAKM;YACnD,IAAI,CAAC,cAAc,CAAC,kBAAkB,CAAC;QAC3C;IACJ;IAEA,MAAa,oBAAoBC,QAAgB,EAAEC,UAAgB,EAAE;QACjE,MAAM,EAAER,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC;YAC/C,WAAW,IAAI,CAAC,SAAS;YACzBO;YACAC;QACJ;QAEA,IAAI,CAACR,MACD;QAGJC,YAAY;YACR,IAAI,CAAC,KAAK,GAAG;mBAAI,IAAI,CAAC,KAAK;gBAAED;aAAK;YAClC,IAAI,CAAC,cAAc,CAAC,kBAAkB,CAAC;QAC3C;IACJ;IAEA,MAAa,sBAAsBO,QAAgB,EAAEC,UAAgB,EAAE;QACnE,MAAM,EAAER,IAAI,EAAE,GAAG,MAAM,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC;YACjD,WAAW,IAAI,CAAC,SAAS;YACzBO;YACAC;QACJ;QAEA,IAAI,CAACR,MACD;QAGJC,YAAY;YACR,IAAI,CAAC,KAAK,GAAG;mBAAI,IAAI,CAAC,KAAK;gBAAED;aAAK;YAClC,IAAI,CAAC,cAAc,CAAC,kBAAkB,CAAC;QAC3C;IACJ;AACJ"}
@@ -1,19 +0,0 @@
1
- import type { IMetaRepository } from "@webiny/app-utils";
2
- import type { IListScheduledActionsGateway } from "../../../Gateways/index.js";
3
- import { type ICancelScheduledActionGateway, type IGetScheduledActionGateway, type ISchedulePublishActionGateway, type IScheduleUnpublishActionGateway } from "../../../Gateways/index.js";
4
- import { SchedulerItemsRepository } from "./SchedulerItemsRepository.js";
5
- export interface ISchedulerItemsRepositoryFactoryGetParams {
6
- metaRepository: IMetaRepository;
7
- getGateway: IGetScheduledActionGateway;
8
- listGateway: IListScheduledActionsGateway;
9
- cancelGateway: ICancelScheduledActionGateway;
10
- publishGateway: ISchedulePublishActionGateway;
11
- unpublishGateway: IScheduleUnpublishActionGateway;
12
- namespace: string;
13
- }
14
- export declare class SchedulerItemsRepositoryFactory {
15
- private readonly cache;
16
- getRepository(params: ISchedulerItemsRepositoryFactoryGetParams): SchedulerItemsRepository;
17
- private getCacheKey;
18
- }
19
- export declare const schedulerItemsRepositoryFactory: SchedulerItemsRepositoryFactory;
@@ -1,18 +0,0 @@
1
- import { SchedulerItemsRepository } from "./SchedulerItemsRepository.js";
2
- class SchedulerItemsRepositoryFactory {
3
- getRepository(params) {
4
- const cacheKey = this.getCacheKey();
5
- if (!this.cache.has(cacheKey)) this.cache.set(cacheKey, new SchedulerItemsRepository(params));
6
- return this.cache.get(cacheKey);
7
- }
8
- getCacheKey() {
9
- return Date.now().toString();
10
- }
11
- constructor(){
12
- this.cache = new Map();
13
- }
14
- }
15
- const schedulerItemsRepositoryFactory = new SchedulerItemsRepositoryFactory();
16
- export { SchedulerItemsRepositoryFactory, schedulerItemsRepositoryFactory };
17
-
18
- //# sourceMappingURL=SchedulerItemsRepositoryFactory.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.js","sources":["../../../../src/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.ts"],"sourcesContent":["import type { IMetaRepository } from \"@webiny/app-utils\";\nimport type { IListScheduledActionsGateway } from \"~/Gateways/index.js\";\nimport {\n type ICancelScheduledActionGateway,\n type IGetScheduledActionGateway,\n type ISchedulePublishActionGateway,\n type IScheduleUnpublishActionGateway\n} from \"~/Gateways/index.js\";\nimport { SchedulerItemsRepository } from \"./SchedulerItemsRepository.js\";\n\nexport interface ISchedulerItemsRepositoryFactoryGetParams {\n metaRepository: IMetaRepository;\n getGateway: IGetScheduledActionGateway;\n listGateway: IListScheduledActionsGateway;\n cancelGateway: ICancelScheduledActionGateway;\n publishGateway: ISchedulePublishActionGateway;\n unpublishGateway: IScheduleUnpublishActionGateway;\n namespace: string;\n}\n\nexport class SchedulerItemsRepositoryFactory {\n private readonly cache: Map<string, SchedulerItemsRepository> = new Map();\n\n public getRepository(params: ISchedulerItemsRepositoryFactoryGetParams) {\n const cacheKey = this.getCacheKey();\n\n if (!this.cache.has(cacheKey)) {\n this.cache.set(cacheKey, new SchedulerItemsRepository(params));\n }\n\n return this.cache.get(cacheKey) as SchedulerItemsRepository;\n }\n\n private getCacheKey() {\n return Date.now().toString();\n }\n}\n\nexport const schedulerItemsRepositoryFactory = new SchedulerItemsRepositoryFactory();\n"],"names":["SchedulerItemsRepositoryFactory","params","cacheKey","SchedulerItemsRepository","Date","Map","schedulerItemsRepositoryFactory"],"mappings":";AAoBO,MAAMA;IAGF,cAAcC,MAAiD,EAAE;QACpE,MAAMC,WAAW,IAAI,CAAC,WAAW;QAEjC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,CAACA,WAChB,IAAI,CAAC,KAAK,CAAC,GAAG,CAACA,UAAU,IAAIC,yBAAyBF;QAG1D,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAACC;IAC1B;IAEQ,cAAc;QAClB,OAAOE,KAAK,GAAG,GAAG,QAAQ;IAC9B;;aAdiB,KAAK,GAA0C,IAAIC;;AAexE;AAEO,MAAMC,kCAAkC,IAAIN"}
@@ -1,17 +0,0 @@
1
- import type { ILoadingRepository } from "@webiny/app-utils";
2
- import type { ISchedulerItemsRepository } from "./ISchedulerItemsRepository.js";
3
- import type { IGetScheduledActionGatewayExecuteParams, IListScheduledActionsGatewayExecuteParams } from "../../../Gateways/index.js";
4
- export declare class SchedulerItemsRepositoryWithLoading implements ISchedulerItemsRepository {
5
- private readonly loadingRepository;
6
- private readonly schedulerItemsRepository;
7
- constructor(loadingRepository: ILoadingRepository, schedulerItemsRepository: ISchedulerItemsRepository);
8
- getItems(): import("../../index.js").SchedulerItem[];
9
- getMeta(): import("@webiny/app-utils").Meta;
10
- getLoading(): Record<string, boolean>;
11
- getItem(params: Omit<IGetScheduledActionGatewayExecuteParams, "namespace">): Promise<void>;
12
- listItems(params?: Omit<IListScheduledActionsGatewayExecuteParams, "namespace">): Promise<void>;
13
- listMoreItems(): Promise<void>;
14
- scheduleCancelItem(id: string): Promise<void>;
15
- schedulePublishItem(id: string): Promise<void>;
16
- scheduleUnpublishItem(id: string): Promise<void>;
17
- }
@@ -1,39 +0,0 @@
1
- import { makeAutoObservable } from "mobx";
2
- import { LoadingActions } from "../../../types.js";
3
- class SchedulerItemsRepositoryWithLoading {
4
- constructor(loadingRepository, schedulerItemsRepository){
5
- this.loadingRepository = loadingRepository;
6
- this.schedulerItemsRepository = schedulerItemsRepository;
7
- makeAutoObservable(this);
8
- }
9
- getItems() {
10
- return this.schedulerItemsRepository.getItems();
11
- }
12
- getMeta() {
13
- return this.schedulerItemsRepository.getMeta();
14
- }
15
- getLoading() {
16
- return this.loadingRepository.get();
17
- }
18
- async getItem(params) {
19
- await this.loadingRepository.runCallBack(this.schedulerItemsRepository.getItem(params), LoadingActions.get);
20
- }
21
- async listItems(params) {
22
- await this.loadingRepository.runCallBack(this.schedulerItemsRepository.listItems(params), LoadingActions.list);
23
- }
24
- async listMoreItems() {
25
- await this.loadingRepository.runCallBack(this.schedulerItemsRepository.listMoreItems(), LoadingActions.listMore);
26
- }
27
- async scheduleCancelItem(id) {
28
- await this.loadingRepository.runCallBack(this.schedulerItemsRepository.scheduleCancelItem(id), LoadingActions["delete"]);
29
- }
30
- async schedulePublishItem(id) {
31
- await this.loadingRepository.runCallBack(this.schedulerItemsRepository.scheduleCancelItem(id), LoadingActions.create);
32
- }
33
- async scheduleUnpublishItem(id) {
34
- await this.loadingRepository.runCallBack(this.schedulerItemsRepository.scheduleCancelItem(id), LoadingActions.create);
35
- }
36
- }
37
- export { SchedulerItemsRepositoryWithLoading };
38
-
39
- //# sourceMappingURL=SchedulerItemsRepositoryWithLoading.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.js","sources":["../../../../src/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.ts"],"sourcesContent":["import { makeAutoObservable } from \"mobx\";\nimport type { ILoadingRepository } from \"@webiny/app-utils\";\nimport type { ISchedulerItemsRepository } from \"./ISchedulerItemsRepository.js\";\nimport { LoadingActions } from \"~/types.js\";\nimport type {\n IGetScheduledActionGatewayExecuteParams,\n IListScheduledActionsGatewayExecuteParams\n} from \"~/Gateways/index.js\";\n\nexport class SchedulerItemsRepositoryWithLoading implements ISchedulerItemsRepository {\n private readonly loadingRepository: ILoadingRepository;\n private readonly schedulerItemsRepository: ISchedulerItemsRepository;\n\n public constructor(\n loadingRepository: ILoadingRepository,\n schedulerItemsRepository: ISchedulerItemsRepository\n ) {\n this.loadingRepository = loadingRepository;\n this.schedulerItemsRepository = schedulerItemsRepository;\n makeAutoObservable(this);\n }\n\n public getItems() {\n return this.schedulerItemsRepository.getItems();\n }\n\n public getMeta() {\n return this.schedulerItemsRepository.getMeta();\n }\n\n public getLoading() {\n return this.loadingRepository.get();\n }\n\n public async getItem(params: Omit<IGetScheduledActionGatewayExecuteParams, \"namespace\">) {\n await this.loadingRepository.runCallBack(\n this.schedulerItemsRepository.getItem(params),\n LoadingActions.get\n );\n }\n\n public async listItems(params?: Omit<IListScheduledActionsGatewayExecuteParams, \"namespace\">) {\n await this.loadingRepository.runCallBack(\n this.schedulerItemsRepository.listItems(params),\n LoadingActions.list\n );\n }\n\n public async listMoreItems() {\n await this.loadingRepository.runCallBack(\n this.schedulerItemsRepository.listMoreItems(),\n LoadingActions.listMore\n );\n }\n\n public async scheduleCancelItem(id: string) {\n await this.loadingRepository.runCallBack(\n this.schedulerItemsRepository.scheduleCancelItem(id),\n LoadingActions.delete\n );\n }\n\n public async schedulePublishItem(id: string) {\n await this.loadingRepository.runCallBack(\n this.schedulerItemsRepository.scheduleCancelItem(id),\n LoadingActions.create\n );\n }\n\n public async scheduleUnpublishItem(id: string) {\n await this.loadingRepository.runCallBack(\n this.schedulerItemsRepository.scheduleCancelItem(id),\n LoadingActions.create\n );\n }\n}\n"],"names":["SchedulerItemsRepositoryWithLoading","loadingRepository","schedulerItemsRepository","makeAutoObservable","params","LoadingActions","id"],"mappings":";;AASO,MAAMA;IAIT,YACIC,iBAAqC,EACrCC,wBAAmD,CACrD;QACE,IAAI,CAAC,iBAAiB,GAAGD;QACzB,IAAI,CAAC,wBAAwB,GAAGC;QAChCC,mBAAmB,IAAI;IAC3B;IAEO,WAAW;QACd,OAAO,IAAI,CAAC,wBAAwB,CAAC,QAAQ;IACjD;IAEO,UAAU;QACb,OAAO,IAAI,CAAC,wBAAwB,CAAC,OAAO;IAChD;IAEO,aAAa;QAChB,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG;IACrC;IAEA,MAAa,QAAQC,MAAkE,EAAE;QACrF,MAAM,IAAI,CAAC,iBAAiB,CAAC,WAAW,CACpC,IAAI,CAAC,wBAAwB,CAAC,OAAO,CAACA,SACtCC,eAAe,GAAG;IAE1B;IAEA,MAAa,UAAUD,MAAqE,EAAE;QAC1F,MAAM,IAAI,CAAC,iBAAiB,CAAC,WAAW,CACpC,IAAI,CAAC,wBAAwB,CAAC,SAAS,CAACA,SACxCC,eAAe,IAAI;IAE3B;IAEA,MAAa,gBAAgB;QACzB,MAAM,IAAI,CAAC,iBAAiB,CAAC,WAAW,CACpC,IAAI,CAAC,wBAAwB,CAAC,aAAa,IAC3CA,eAAe,QAAQ;IAE/B;IAEA,MAAa,mBAAmBC,EAAU,EAAE;QACxC,MAAM,IAAI,CAAC,iBAAiB,CAAC,WAAW,CACpC,IAAI,CAAC,wBAAwB,CAAC,kBAAkB,CAACA,KACjDD,cAAc,CAAdA,SAAqB;IAE7B;IAEA,MAAa,oBAAoBC,EAAU,EAAE;QACzC,MAAM,IAAI,CAAC,iBAAiB,CAAC,WAAW,CACpC,IAAI,CAAC,wBAAwB,CAAC,kBAAkB,CAACA,KACjDD,eAAe,MAAM;IAE7B;IAEA,MAAa,sBAAsBC,EAAU,EAAE;QAC3C,MAAM,IAAI,CAAC,iBAAiB,CAAC,WAAW,CACpC,IAAI,CAAC,wBAAwB,CAAC,kBAAkB,CAACA,KACjDD,eAAe,MAAM;IAE7B;AACJ"}
@@ -1,4 +0,0 @@
1
- export type * from "./ISchedulerItemsRepository.js";
2
- export * from "./SchedulerItemsRepository.js";
3
- export * from "./SchedulerItemsRepositoryFactory.js";
4
- export * from "./SchedulerItemsRepositoryWithLoading.js";
@@ -1,3 +0,0 @@
1
- export * from "./SchedulerItemsRepository.js";
2
- export * from "./SchedulerItemsRepositoryFactory.js";
3
- export * from "./SchedulerItemsRepositoryWithLoading.js";
@@ -1,4 +0,0 @@
1
- export interface ISearchRepository {
2
- get: () => string;
3
- set: (value: string) => Promise<void>;
4
- }
File without changes
@@ -1,7 +0,0 @@
1
- import type { ISearchRepository } from "./ISearchRepository.js";
2
- export declare class SearchRepository implements ISearchRepository {
3
- private query;
4
- constructor();
5
- get(): string;
6
- set(query: string): Promise<void>;
7
- }
@@ -1,16 +0,0 @@
1
- import { makeAutoObservable } from "mobx";
2
- class SearchRepository {
3
- constructor(){
4
- this.query = "";
5
- makeAutoObservable(this);
6
- }
7
- get() {
8
- return this.query;
9
- }
10
- async set(query) {
11
- this.query = query;
12
- }
13
- }
14
- export { SearchRepository };
15
-
16
- //# sourceMappingURL=SearchRepository.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Domain/Repositories/Search/SearchRepository.js","sources":["../../../../src/Domain/Repositories/Search/SearchRepository.ts"],"sourcesContent":["import { makeAutoObservable } from \"mobx\";\nimport type { ISearchRepository } from \"./ISearchRepository.js\";\n\nexport class SearchRepository implements ISearchRepository {\n private query = \"\";\n\n public constructor() {\n makeAutoObservable(this);\n }\n\n public get() {\n return this.query;\n }\n\n public async set(query: string) {\n this.query = query;\n }\n}\n"],"names":["SearchRepository","makeAutoObservable","query"],"mappings":";AAGO,MAAMA;IAGT,aAAqB;aAFb,KAAK,GAAG;QAGZC,mBAAmB,IAAI;IAC3B;IAEO,MAAM;QACT,OAAO,IAAI,CAAC,KAAK;IACrB;IAEA,MAAa,IAAIC,KAAa,EAAE;QAC5B,IAAI,CAAC,KAAK,GAAGA;IACjB;AACJ"}
@@ -1,7 +0,0 @@
1
- import { SearchRepository } from "./SearchRepository.js";
2
- export declare class SearchRepositoryFactory {
3
- private readonly cache;
4
- getRepository(): SearchRepository;
5
- private getCacheKey;
6
- }
7
- export declare const searchRepositoryFactory: SearchRepositoryFactory;
@@ -1,18 +0,0 @@
1
- import { SearchRepository } from "./SearchRepository.js";
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();
13
- }
14
- }
15
- const searchRepositoryFactory = new SearchRepositoryFactory();
16
- export { SearchRepositoryFactory, searchRepositoryFactory };
17
-
18
- //# sourceMappingURL=SearchRepositoryFactory.js.map
@@ -1 +0,0 @@
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,3 +0,0 @@
1
- export type * from "./ISearchRepository.js";
2
- export * from "./SearchRepository.js";
3
- export * from "./SearchRepositoryFactory.js";
@@ -1,2 +0,0 @@
1
- export * from "./SearchRepository.js";
2
- export * from "./SearchRepositoryFactory.js";
@@ -1,8 +0,0 @@
1
- import type { SchedulerItem } from "../../../Domain/index.js";
2
- export interface ISelectedItemsRepository {
3
- selectItems: (items: SchedulerItem[]) => Promise<void>;
4
- selectAllItems: () => Promise<void>;
5
- unselectAllItems: () => Promise<void>;
6
- getSelectedItems: () => SchedulerItem[];
7
- getSelectedAllItems: () => boolean;
8
- }
@@ -1,12 +0,0 @@
1
- import type { SchedulerItem } from "../../../Domain/index.js";
2
- import type { ISelectedItemsRepository } from "./ISelectedItemsRepository.js";
3
- export declare class SelectedItemsRepository implements ISelectedItemsRepository {
4
- private items;
5
- private selectedAll;
6
- constructor();
7
- getSelectedItems(): SchedulerItem[];
8
- getSelectedAllItems(): boolean;
9
- selectItems(items: SchedulerItem[]): Promise<void>;
10
- selectAllItems(): Promise<void>;
11
- unselectAllItems(): Promise<void>;
12
- }
@@ -1,28 +0,0 @@
1
- import { makeAutoObservable } from "mobx";
2
- class SelectedItemsRepository {
3
- constructor(){
4
- this.items = [];
5
- this.selectedAll = false;
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
- export { SelectedItemsRepository };
27
-
28
- //# sourceMappingURL=SelectedItemsRepository.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Domain/Repositories/SelectedItems/SelectedItemsRepository.js","sources":["../../../../src/Domain/Repositories/SelectedItems/SelectedItemsRepository.ts"],"sourcesContent":["import { makeAutoObservable } from \"mobx\";\nimport type { SchedulerItem } from \"~/Domain/index.js\";\nimport type { ISelectedItemsRepository } from \"./ISelectedItemsRepository.js\";\n\nexport class SelectedItemsRepository implements ISelectedItemsRepository {\n private items: SchedulerItem[] = [];\n private selectedAll = false;\n\n public constructor() {\n makeAutoObservable(this);\n }\n\n public getSelectedItems() {\n return this.items;\n }\n\n public getSelectedAllItems() {\n return this.selectedAll;\n }\n\n public async selectItems(items: SchedulerItem[]) {\n this.items = items;\n this.selectedAll = false;\n }\n\n public async selectAllItems() {\n this.selectedAll = true;\n }\n\n public async unselectAllItems() {\n this.items = [];\n this.selectedAll = false;\n }\n}\n"],"names":["SelectedItemsRepository","makeAutoObservable","items"],"mappings":";AAIO,MAAMA;IAIT,aAAqB;aAHb,KAAK,GAAoB,EAAE;aAC3B,WAAW,GAAG;QAGlBC,mBAAmB,IAAI;IAC3B;IAEO,mBAAmB;QACtB,OAAO,IAAI,CAAC,KAAK;IACrB;IAEO,sBAAsB;QACzB,OAAO,IAAI,CAAC,WAAW;IAC3B;IAEA,MAAa,YAAYC,KAAsB,EAAE;QAC7C,IAAI,CAAC,KAAK,GAAGA;QACb,IAAI,CAAC,WAAW,GAAG;IACvB;IAEA,MAAa,iBAAiB;QAC1B,IAAI,CAAC,WAAW,GAAG;IACvB;IAEA,MAAa,mBAAmB;QAC5B,IAAI,CAAC,KAAK,GAAG,EAAE;QACf,IAAI,CAAC,WAAW,GAAG;IACvB;AACJ"}
@@ -1,7 +0,0 @@
1
- import { SelectedItemsRepository } from "./SelectedItemsRepository.js";
2
- export declare class SelectedItemsRepositoryFactory {
3
- private readonly cache;
4
- getRepository(): SelectedItemsRepository;
5
- private getCacheKey;
6
- }
7
- export declare const selectedItemsRepositoryFactory: SelectedItemsRepositoryFactory;
@@ -1,18 +0,0 @@
1
- import { SelectedItemsRepository } from "./SelectedItemsRepository.js";
2
- class SelectedItemsRepositoryFactory {
3
- getRepository() {
4
- const cacheKey = this.getCacheKey();
5
- if (!this.cache.has(cacheKey)) this.cache.set(cacheKey, new SelectedItemsRepository());
6
- return this.cache.get(cacheKey);
7
- }
8
- getCacheKey() {
9
- return Date.now().toString();
10
- }
11
- constructor(){
12
- this.cache = new Map();
13
- }
14
- }
15
- const selectedItemsRepositoryFactory = new SelectedItemsRepositoryFactory();
16
- export { SelectedItemsRepositoryFactory, selectedItemsRepositoryFactory };
17
-
18
- //# sourceMappingURL=SelectedItemsRepositoryFactory.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.js","sources":["../../../../src/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.ts"],"sourcesContent":["import { SelectedItemsRepository } from \"./SelectedItemsRepository.js\";\n\nexport class SelectedItemsRepositoryFactory {\n private readonly cache: Map<string, SelectedItemsRepository> = new Map();\n\n public 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"],"names":["SelectedItemsRepositoryFactory","cacheKey","SelectedItemsRepository","Date","Map","selectedItemsRepositoryFactory"],"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,GAAyC,IAAIC;;AAevE;AAEO,MAAMC,iCAAiC,IAAIL"}
@@ -1,3 +0,0 @@
1
- export type * from "./ISelectedItemsRepository.js";
2
- export * from "./SelectedItemsRepository.js";
3
- export * from "./SelectedItemsRepositoryFactory.js";
@@ -1,2 +0,0 @@
1
- export * from "./SelectedItemsRepository.js";
2
- export * from "./SelectedItemsRepositoryFactory.js";
@@ -1,8 +0,0 @@
1
- import type { ISortingRepository, Sorting } from "@webiny/app-utils";
2
- export declare class SortingRepositoryWithDefaults implements ISortingRepository {
3
- private readonly defaults;
4
- private readonly repository;
5
- constructor(defaults: Sorting[], repository: ISortingRepository);
6
- get(): Sorting[];
7
- set(sorts: Sorting[]): Promise<void>;
8
- }
@@ -1,21 +0,0 @@
1
- import { makeAutoObservable, runInAction } from "mobx";
2
- 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 (0 === existingSort.length) runInAction(()=>{
11
- this.set(this.defaults);
12
- });
13
- return this.repository.get();
14
- }
15
- set(sorts) {
16
- return this.repository.set(sorts);
17
- }
18
- }
19
- export { SortingRepositoryWithDefaults };
20
-
21
- //# sourceMappingURL=SortingRepositoryWithDefaults.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Domain/Repositories/Sorting/SortingRepositoryWithDefaults.js","sources":["../../../../src/Domain/Repositories/Sorting/SortingRepositoryWithDefaults.ts"],"sourcesContent":["import { makeAutoObservable, runInAction } from \"mobx\";\nimport type { ISortingRepository, Sorting } from \"@webiny/app-utils\";\n\nexport class SortingRepositoryWithDefaults implements ISortingRepository {\n private readonly defaults: Sorting[];\n private readonly repository: ISortingRepository;\n\n public constructor(defaults: Sorting[], repository: ISortingRepository) {\n this.defaults = defaults;\n this.repository = repository;\n makeAutoObservable(this);\n }\n\n public 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 public set(sorts: Sorting[]) {\n return this.repository.set(sorts);\n }\n}\n"],"names":["SortingRepositoryWithDefaults","defaults","repository","makeAutoObservable","existingSort","runInAction","sorts"],"mappings":";AAGO,MAAMA;IAIT,YAAmBC,QAAmB,EAAEC,UAA8B,CAAE;QACpE,IAAI,CAAC,QAAQ,GAAGD;QAChB,IAAI,CAAC,UAAU,GAAGC;QAClBC,mBAAmB,IAAI;IAC3B;IAEO,MAAM;QACT,MAAMC,eAAe,IAAI,CAAC,UAAU,CAAC,GAAG;QAExC,IAAIA,AAAwB,MAAxBA,aAAa,MAAM,EACnBC,YAAY;YACR,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ;QAC1B;QAGJ,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG;IAC9B;IAEO,IAAIC,KAAgB,EAAE;QACzB,OAAO,IAAI,CAAC,UAAU,CAAC,GAAG,CAACA;IAC/B;AACJ"}
@@ -1 +0,0 @@
1
- export * from "./SortingRepositoryWithDefaults.js";
@@ -1 +0,0 @@
1
- export * from "./SortingRepositoryWithDefaults.js";
@@ -1,4 +0,0 @@
1
- export * from "./SelectedItems/index.js";
2
- export * from "./Sorting/index.js";
3
- export * from "./Search/index.js";
4
- export * from "./SchedulerItems/index.js";
@@ -1,4 +0,0 @@
1
- export * from "./SelectedItems/index.js";
2
- export * from "./Sorting/index.js";
3
- export * from "./Search/index.js";
4
- export * from "./SchedulerItems/index.js";
package/Domain/index.d.ts DELETED
@@ -1,2 +0,0 @@
1
- export * from "./Models/index.js";
2
- export * from "./Repositories/index.js";
package/Domain/index.js DELETED
@@ -1,2 +0,0 @@
1
- export * from "./Models/index.js";
2
- export * from "./Repositories/index.js";
@@ -1,7 +0,0 @@
1
- import type { ApolloClient } from "apollo-client";
2
- import type { ICancelScheduledActionGateway, ICancelScheduledActionGatewayParams } from "./abstractions/CancelScheduledActionGateway.js";
3
- export declare class SchedulerCancelGraphQLGateway implements ICancelScheduledActionGateway {
4
- private readonly client;
5
- constructor(client: ApolloClient<object>);
6
- execute(params: ICancelScheduledActionGatewayParams): Promise<void>;
7
- }
@@ -1,42 +0,0 @@
1
- import graphql_tag from "graphql-tag";
2
- const createScheduleCancelActionMutation = ()=>graphql_tag`
3
- mutation ScheduleCancelAction($namespace: String!, $id: ID!) {
4
- scheduler {
5
- cancelScheduledAction(namespace: $namespace, id: $id) {
6
- data
7
- error {
8
- message
9
- code
10
- data
11
- stack
12
- }
13
- }
14
- }
15
- }
16
- `;
17
- class SchedulerCancelGraphQLGateway {
18
- constructor(client){
19
- this.client = client;
20
- }
21
- async execute(params) {
22
- const { data: response, errors } = await this.client.mutate({
23
- mutation: createScheduleCancelActionMutation(),
24
- variables: {
25
- namespace: params.namespace,
26
- id: params.id
27
- },
28
- fetchPolicy: "no-cache"
29
- });
30
- const result = response?.scheduler?.cancelScheduledAction;
31
- if (!result || errors?.length) {
32
- console.error({
33
- errors
34
- });
35
- throw new Error("Network error while canceling a scheduled action.");
36
- }
37
- if (!result.data) throw new Error(result.error?.message || "Could not cancel scheduled action.");
38
- }
39
- }
40
- export { SchedulerCancelGraphQLGateway };
41
-
42
- //# sourceMappingURL=SchedulerCancelGraphQLGateway.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Gateways/SchedulerCancelGraphQLGateway.js","sources":["../../src/Gateways/SchedulerCancelGraphQLGateway.ts"],"sourcesContent":["import type { ApolloClient } from \"apollo-client\";\nimport gql from \"graphql-tag\";\nimport type { SchedulerErrorResponse } from \"~/types.js\";\nimport type {\n ICancelScheduledActionGateway,\n ICancelScheduledActionGatewayParams\n} from \"./abstractions/CancelScheduledActionGateway.js\";\n\nconst createScheduleCancelActionMutation = () => {\n return gql`\n mutation ScheduleCancelAction($namespace: String!, $id: ID!) {\n scheduler {\n cancelScheduledAction(namespace: $namespace, id: $id) {\n data\n error {\n message\n code\n data\n stack\n }\n }\n }\n }\n `;\n};\n\ninterface SchedulerCancelGraphQLMutationVariables {\n namespace: string;\n id: string;\n}\n\ninterface SchedulerCancelGraphQLMutationResponse {\n scheduler: {\n cancelScheduledAction: {\n data: boolean | null;\n error: SchedulerErrorResponse | null;\n };\n };\n}\n\nexport class SchedulerCancelGraphQLGateway implements ICancelScheduledActionGateway {\n private readonly client: ApolloClient<object>;\n\n public constructor(client: ApolloClient<object>) {\n this.client = client;\n }\n\n public async execute(params: ICancelScheduledActionGatewayParams) {\n const { data: response, errors } = await this.client.mutate<\n SchedulerCancelGraphQLMutationResponse,\n SchedulerCancelGraphQLMutationVariables\n >({\n mutation: createScheduleCancelActionMutation(),\n variables: {\n namespace: params.namespace,\n id: params.id\n },\n fetchPolicy: \"no-cache\"\n });\n\n const result = response?.scheduler?.cancelScheduledAction;\n if (!result || errors?.length) {\n console.error({\n errors\n });\n throw new Error(\"Network error while canceling a scheduled action.\");\n }\n\n if (!result.data) {\n throw new Error(result.error?.message || \"Could not cancel scheduled action.\");\n }\n }\n}\n"],"names":["createScheduleCancelActionMutation","gql","SchedulerCancelGraphQLGateway","client","params","response","errors","result","console","Error"],"mappings":";AAQA,MAAMA,qCAAqC,IAChCC,WAAG,CAAC;;;;;;;;;;;;;;IAcX,CAAC;AAiBE,MAAMC;IAGT,YAAmBC,MAA4B,CAAE;QAC7C,IAAI,CAAC,MAAM,GAAGA;IAClB;IAEA,MAAa,QAAQC,MAA2C,EAAE;QAC9D,MAAM,EAAE,MAAMC,QAAQ,EAAEC,MAAM,EAAE,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,MAAM,CAGzD;YACE,UAAUN;YACV,WAAW;gBACP,WAAWI,OAAO,SAAS;gBAC3B,IAAIA,OAAO,EAAE;YACjB;YACA,aAAa;QACjB;QAEA,MAAMG,SAASF,UAAU,WAAW;QACpC,IAAI,CAACE,UAAUD,QAAQ,QAAQ;YAC3BE,QAAQ,KAAK,CAAC;gBACVF;YACJ;YACA,MAAM,IAAIG,MAAM;QACpB;QAEA,IAAI,CAACF,OAAO,IAAI,EACZ,MAAM,IAAIE,MAAMF,OAAO,KAAK,EAAE,WAAW;IAEjD;AACJ"}