@webiny/app-headless-cms-scheduler 0.0.0-unstable.eb196ccd2f → 0.0.0-unstable.eb81deee7e

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 (564) hide show
  1. package/README.md +6 -17
  2. package/components/Browser/BrowserConfig.d.ts +2 -0
  3. package/components/Browser/BrowserConfig.js +23 -0
  4. package/components/Browser/BrowserConfig.js.map +1 -0
  5. package/components/Browser/CellLive.d.ts +11 -0
  6. package/components/Browser/CellLive.js +37 -0
  7. package/components/Browser/CellLive.js.map +1 -0
  8. package/components/Browser/LiveTag.d.ts +7 -0
  9. package/components/Browser/LiveTag.js +19 -0
  10. package/components/Browser/LiveTag.js.map +1 -0
  11. package/components/Browser/MenuItem.d.ts +4 -0
  12. package/components/Browser/MenuItem.js +45 -0
  13. package/components/Browser/MenuItem.js.map +1 -0
  14. package/components/Browser/ScheduledTag.d.ts +5 -0
  15. package/components/Browser/ScheduledTag.js +24 -0
  16. package/components/Browser/ScheduledTag.js.map +1 -0
  17. package/components/Browser/SchedulerButton.d.ts +5 -0
  18. package/components/Browser/SchedulerButton.js +16 -0
  19. package/components/Browser/SchedulerButton.js.map +1 -0
  20. package/components/Browser/SchedulerMenuItem.d.ts +2 -0
  21. package/components/Browser/SchedulerMenuItem.js +26 -0
  22. package/components/Browser/SchedulerMenuItem.js.map +1 -0
  23. package/components/Browser/isScheduleRedundant.d.ts +12 -0
  24. package/components/Browser/isScheduleRedundant.js +8 -0
  25. package/components/Browser/isScheduleRedundant.js.map +1 -0
  26. package/components/Dialogs/PublishScheduleNotice.d.ts +6 -0
  27. package/components/Dialogs/PublishScheduleNotice.js +17 -0
  28. package/components/Dialogs/PublishScheduleNotice.js.map +1 -0
  29. package/components/Dialogs/ScheduleNoticeAlert.d.ts +14 -0
  30. package/components/Dialogs/ScheduleNoticeAlert.js +22 -0
  31. package/components/Dialogs/ScheduleNoticeAlert.js.map +1 -0
  32. package/components/Dialogs/UnpublishScheduleNotice.d.ts +6 -0
  33. package/components/Dialogs/UnpublishScheduleNotice.js +17 -0
  34. package/components/Dialogs/UnpublishScheduleNotice.js.map +1 -0
  35. package/components/Editor/EditorConfig.d.ts +2 -0
  36. package/components/Editor/EditorConfig.js +12 -0
  37. package/components/Editor/EditorConfig.js.map +1 -0
  38. package/components/Editor/MenuItem.d.ts +4 -0
  39. package/components/Editor/MenuItem.js +60 -0
  40. package/components/Editor/MenuItem.js.map +1 -0
  41. package/components/Editor/ScheduledActionAlert.d.ts +6 -0
  42. package/components/Editor/ScheduledActionAlert.js +43 -0
  43. package/components/Editor/ScheduledActionAlert.js.map +1 -0
  44. package/components/index.d.ts +5 -0
  45. package/components/index.js +5 -0
  46. package/hooks/usePermissions.d.ts +4 -0
  47. package/hooks/usePermissions.js +18 -0
  48. package/hooks/usePermissions.js.map +1 -0
  49. package/hooks/useScheduledActionsPresenter.d.ts +6 -0
  50. package/hooks/useScheduledActionsPresenter.js +12 -0
  51. package/hooks/useScheduledActionsPresenter.js.map +1 -0
  52. package/index.d.ts +2 -2
  53. package/index.js +8 -2
  54. package/index.js.map +1 -1
  55. package/package.json +27 -36
  56. package/presentation/scheduledActions/ContentEntriesPresenterSchedulingDecorator.d.ts +31 -0
  57. package/presentation/scheduledActions/ContentEntriesPresenterSchedulingDecorator.js +70 -0
  58. package/presentation/scheduledActions/ContentEntriesPresenterSchedulingDecorator.js.map +1 -0
  59. package/presentation/scheduledActions/ScheduledActionsPresenter.d.ts +28 -0
  60. package/presentation/scheduledActions/ScheduledActionsPresenter.js +90 -0
  61. package/presentation/scheduledActions/ScheduledActionsPresenter.js.map +1 -0
  62. package/presentation/scheduledActions/abstractions.d.ts +16 -0
  63. package/presentation/scheduledActions/abstractions.js +5 -0
  64. package/presentation/scheduledActions/abstractions.js.map +1 -0
  65. package/presentation/scheduledActions/feature.d.ts +3 -0
  66. package/presentation/scheduledActions/feature.js +19 -0
  67. package/presentation/scheduledActions/feature.js.map +1 -0
  68. package/utils/index.d.ts +1 -0
  69. package/utils/index.js +1 -0
  70. package/utils/namespace.d.ts +7 -0
  71. package/utils/namespace.js +5 -0
  72. package/utils/namespace.js.map +1 -0
  73. package/Domain/Models/SchedulerItem/SchedulerItem.d.ts +0 -14
  74. package/Domain/Models/SchedulerItem/SchedulerItem.js +0 -17
  75. package/Domain/Models/SchedulerItem/SchedulerItem.js.map +0 -1
  76. package/Domain/Models/SchedulerItem/index.d.ts +0 -1
  77. package/Domain/Models/SchedulerItem/index.js +0 -3
  78. package/Domain/Models/SchedulerItem/index.js.map +0 -1
  79. package/Domain/Models/index.d.ts +0 -1
  80. package/Domain/Models/index.js +0 -3
  81. package/Domain/Models/index.js.map +0 -1
  82. package/Domain/Repositories/SchedulerItems/ISchedulerItemsRepository.d.ts +0 -14
  83. package/Domain/Repositories/SchedulerItems/ISchedulerItemsRepository.js +0 -3
  84. package/Domain/Repositories/SchedulerItems/ISchedulerItemsRepository.js.map +0 -1
  85. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.d.ts +0 -37
  86. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.js +0 -125
  87. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.js.map +0 -1
  88. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.d.ts +0 -20
  89. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.js +0 -17
  90. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.js.map +0 -1
  91. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.d.ts +0 -17
  92. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.js +0 -38
  93. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.js.map +0 -1
  94. package/Domain/Repositories/SchedulerItems/index.d.ts +0 -4
  95. package/Domain/Repositories/SchedulerItems/index.js +0 -6
  96. package/Domain/Repositories/SchedulerItems/index.js.map +0 -1
  97. package/Domain/Repositories/Search/ISearchRepository.d.ts +0 -4
  98. package/Domain/Repositories/Search/ISearchRepository.js +0 -3
  99. package/Domain/Repositories/Search/ISearchRepository.js.map +0 -1
  100. package/Domain/Repositories/Search/SearchRepository.d.ts +0 -7
  101. package/Domain/Repositories/Search/SearchRepository.js +0 -15
  102. package/Domain/Repositories/Search/SearchRepository.js.map +0 -1
  103. package/Domain/Repositories/Search/SearchRepositoryFactory.d.ts +0 -7
  104. package/Domain/Repositories/Search/SearchRepositoryFactory.js +0 -17
  105. package/Domain/Repositories/Search/SearchRepositoryFactory.js.map +0 -1
  106. package/Domain/Repositories/Search/index.d.ts +0 -3
  107. package/Domain/Repositories/Search/index.js +0 -5
  108. package/Domain/Repositories/Search/index.js.map +0 -1
  109. package/Domain/Repositories/SelectedItems/ISelectedItemsRepository.d.ts +0 -8
  110. package/Domain/Repositories/SelectedItems/ISelectedItemsRepository.js +0 -3
  111. package/Domain/Repositories/SelectedItems/ISelectedItemsRepository.js.map +0 -1
  112. package/Domain/Repositories/SelectedItems/SelectedItemsRepository.d.ts +0 -12
  113. package/Domain/Repositories/SelectedItems/SelectedItemsRepository.js +0 -27
  114. package/Domain/Repositories/SelectedItems/SelectedItemsRepository.js.map +0 -1
  115. package/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.d.ts +0 -7
  116. package/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.js +0 -17
  117. package/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.js.map +0 -1
  118. package/Domain/Repositories/SelectedItems/index.d.ts +0 -3
  119. package/Domain/Repositories/SelectedItems/index.js +0 -5
  120. package/Domain/Repositories/SelectedItems/index.js.map +0 -1
  121. package/Domain/Repositories/Sorting/SortingRepositoryWithDefaults.d.ts +0 -8
  122. package/Domain/Repositories/Sorting/SortingRepositoryWithDefaults.js +0 -22
  123. package/Domain/Repositories/Sorting/SortingRepositoryWithDefaults.js.map +0 -1
  124. package/Domain/Repositories/Sorting/index.d.ts +0 -1
  125. package/Domain/Repositories/Sorting/index.js +0 -3
  126. package/Domain/Repositories/Sorting/index.js.map +0 -1
  127. package/Domain/Repositories/index.d.ts +0 -4
  128. package/Domain/Repositories/index.js +0 -6
  129. package/Domain/Repositories/index.js.map +0 -1
  130. package/Domain/index.d.ts +0 -2
  131. package/Domain/index.js +0 -4
  132. package/Domain/index.js.map +0 -1
  133. package/Gateways/SchedulerCancelGateway.d.ts +0 -7
  134. package/Gateways/SchedulerCancelGateway.js +0 -3
  135. package/Gateways/SchedulerCancelGateway.js.map +0 -1
  136. package/Gateways/SchedulerGetGateway.d.ts +0 -9
  137. package/Gateways/SchedulerGetGateway.js +0 -3
  138. package/Gateways/SchedulerGetGateway.js.map +0 -1
  139. package/Gateways/SchedulerListGateway.d.ts +0 -29
  140. package/Gateways/SchedulerListGateway.js +0 -3
  141. package/Gateways/SchedulerListGateway.js.map +0 -1
  142. package/Gateways/SchedulerPublishGateway.d.ts +0 -12
  143. package/Gateways/SchedulerPublishGateway.js +0 -3
  144. package/Gateways/SchedulerPublishGateway.js.map +0 -1
  145. package/Gateways/SchedulerUnpublishGateway.d.ts +0 -12
  146. package/Gateways/SchedulerUnpublishGateway.js +0 -3
  147. package/Gateways/SchedulerUnpublishGateway.js.map +0 -1
  148. package/Gateways/index.d.ts +0 -5
  149. package/Gateways/index.js +0 -7
  150. package/Gateways/index.js.map +0 -1
  151. package/Presentation/Scheduler/Scheduler.d.ts +0 -18
  152. package/Presentation/Scheduler/Scheduler.js +0 -66
  153. package/Presentation/Scheduler/Scheduler.js.map +0 -1
  154. package/Presentation/Scheduler/SchedulerControllers.d.ts +0 -30
  155. package/Presentation/Scheduler/SchedulerControllers.js +0 -72
  156. package/Presentation/Scheduler/SchedulerControllers.js.map +0 -1
  157. package/Presentation/Scheduler/SchedulerPresenter.d.ts +0 -32
  158. package/Presentation/Scheduler/SchedulerPresenter.js +0 -44
  159. package/Presentation/Scheduler/SchedulerPresenter.js.map +0 -1
  160. package/Presentation/Scheduler/controllers/CancelItem/CancelItemController.d.ts +0 -7
  161. package/Presentation/Scheduler/controllers/CancelItem/CancelItemController.js +0 -11
  162. package/Presentation/Scheduler/controllers/CancelItem/CancelItemController.js.map +0 -1
  163. package/Presentation/Scheduler/controllers/CancelItem/ICancelItemController.d.ts +0 -3
  164. package/Presentation/Scheduler/controllers/CancelItem/ICancelItemController.js +0 -3
  165. package/Presentation/Scheduler/controllers/CancelItem/ICancelItemController.js.map +0 -1
  166. package/Presentation/Scheduler/controllers/CancelItem/index.d.ts +0 -2
  167. package/Presentation/Scheduler/controllers/CancelItem/index.js +0 -4
  168. package/Presentation/Scheduler/controllers/CancelItem/index.js.map +0 -1
  169. package/Presentation/Scheduler/controllers/GetItem/GetItemController.d.ts +0 -8
  170. package/Presentation/Scheduler/controllers/GetItem/GetItemController.js +0 -11
  171. package/Presentation/Scheduler/controllers/GetItem/GetItemController.js.map +0 -1
  172. package/Presentation/Scheduler/controllers/GetItem/IGetItemController.d.ts +0 -4
  173. package/Presentation/Scheduler/controllers/GetItem/IGetItemController.js +0 -3
  174. package/Presentation/Scheduler/controllers/GetItem/IGetItemController.js.map +0 -1
  175. package/Presentation/Scheduler/controllers/GetItem/index.d.ts +0 -2
  176. package/Presentation/Scheduler/controllers/GetItem/index.js +0 -4
  177. package/Presentation/Scheduler/controllers/GetItem/index.js.map +0 -1
  178. package/Presentation/Scheduler/controllers/ListItems/IListItemsController.d.ts +0 -4
  179. package/Presentation/Scheduler/controllers/ListItems/IListItemsController.js +0 -3
  180. package/Presentation/Scheduler/controllers/ListItems/IListItemsController.js.map +0 -1
  181. package/Presentation/Scheduler/controllers/ListItems/ListItemsController.d.ts +0 -8
  182. package/Presentation/Scheduler/controllers/ListItems/ListItemsController.js +0 -11
  183. package/Presentation/Scheduler/controllers/ListItems/ListItemsController.js.map +0 -1
  184. package/Presentation/Scheduler/controllers/ListItems/index.d.ts +0 -2
  185. package/Presentation/Scheduler/controllers/ListItems/index.js +0 -4
  186. package/Presentation/Scheduler/controllers/ListItems/index.js.map +0 -1
  187. package/Presentation/Scheduler/controllers/ListMoreItems/IListMoreItemsController.d.ts +0 -3
  188. package/Presentation/Scheduler/controllers/ListMoreItems/IListMoreItemsController.js +0 -3
  189. package/Presentation/Scheduler/controllers/ListMoreItems/IListMoreItemsController.js.map +0 -1
  190. package/Presentation/Scheduler/controllers/ListMoreItems/ListMoreItemsController.d.ts +0 -7
  191. package/Presentation/Scheduler/controllers/ListMoreItems/ListMoreItemsController.js +0 -11
  192. package/Presentation/Scheduler/controllers/ListMoreItems/ListMoreItemsController.js.map +0 -1
  193. package/Presentation/Scheduler/controllers/ListMoreItems/index.d.ts +0 -2
  194. package/Presentation/Scheduler/controllers/ListMoreItems/index.js +0 -4
  195. package/Presentation/Scheduler/controllers/ListMoreItems/index.js.map +0 -1
  196. package/Presentation/Scheduler/controllers/PublishItem/IPublishItemController.d.ts +0 -3
  197. package/Presentation/Scheduler/controllers/PublishItem/IPublishItemController.js +0 -3
  198. package/Presentation/Scheduler/controllers/PublishItem/IPublishItemController.js.map +0 -1
  199. package/Presentation/Scheduler/controllers/PublishItem/PublishItemController.d.ts +0 -7
  200. package/Presentation/Scheduler/controllers/PublishItem/PublishItemController.js +0 -11
  201. package/Presentation/Scheduler/controllers/PublishItem/PublishItemController.js.map +0 -1
  202. package/Presentation/Scheduler/controllers/PublishItem/index.d.ts +0 -2
  203. package/Presentation/Scheduler/controllers/PublishItem/index.js +0 -4
  204. package/Presentation/Scheduler/controllers/PublishItem/index.js.map +0 -1
  205. package/Presentation/Scheduler/controllers/SearchItems/ISearchItemsController.d.ts +0 -3
  206. package/Presentation/Scheduler/controllers/SearchItems/ISearchItemsController.js +0 -3
  207. package/Presentation/Scheduler/controllers/SearchItems/ISearchItemsController.js.map +0 -1
  208. package/Presentation/Scheduler/controllers/SearchItems/SearchItemsController.d.ts +0 -8
  209. package/Presentation/Scheduler/controllers/SearchItems/SearchItemsController.js +0 -14
  210. package/Presentation/Scheduler/controllers/SearchItems/SearchItemsController.js.map +0 -1
  211. package/Presentation/Scheduler/controllers/SearchItems/index.d.ts +0 -2
  212. package/Presentation/Scheduler/controllers/SearchItems/index.js +0 -4
  213. package/Presentation/Scheduler/controllers/SearchItems/index.js.map +0 -1
  214. package/Presentation/Scheduler/controllers/SelectAllItems/ISelectAllItemsController.d.ts +0 -3
  215. package/Presentation/Scheduler/controllers/SelectAllItems/ISelectAllItemsController.js +0 -3
  216. package/Presentation/Scheduler/controllers/SelectAllItems/ISelectAllItemsController.js.map +0 -1
  217. package/Presentation/Scheduler/controllers/SelectAllItems/SelectAllItemsController.d.ts +0 -7
  218. package/Presentation/Scheduler/controllers/SelectAllItems/SelectAllItemsController.js +0 -11
  219. package/Presentation/Scheduler/controllers/SelectAllItems/SelectAllItemsController.js.map +0 -1
  220. package/Presentation/Scheduler/controllers/SelectAllItems/index.d.ts +0 -2
  221. package/Presentation/Scheduler/controllers/SelectAllItems/index.js +0 -4
  222. package/Presentation/Scheduler/controllers/SelectAllItems/index.js.map +0 -1
  223. package/Presentation/Scheduler/controllers/SelectItems/ISelectItemsController.d.ts +0 -4
  224. package/Presentation/Scheduler/controllers/SelectItems/ISelectItemsController.js +0 -3
  225. package/Presentation/Scheduler/controllers/SelectItems/ISelectItemsController.js.map +0 -1
  226. package/Presentation/Scheduler/controllers/SelectItems/SelectItemsController.d.ts +0 -8
  227. package/Presentation/Scheduler/controllers/SelectItems/SelectItemsController.js +0 -13
  228. package/Presentation/Scheduler/controllers/SelectItems/SelectItemsController.js.map +0 -1
  229. package/Presentation/Scheduler/controllers/SelectItems/index.d.ts +0 -2
  230. package/Presentation/Scheduler/controllers/SelectItems/index.js +0 -4
  231. package/Presentation/Scheduler/controllers/SelectItems/index.js.map +0 -1
  232. package/Presentation/Scheduler/controllers/SortItems/ISortItemsController.d.ts +0 -4
  233. package/Presentation/Scheduler/controllers/SortItems/ISortItemsController.js +0 -3
  234. package/Presentation/Scheduler/controllers/SortItems/ISortItemsController.js.map +0 -1
  235. package/Presentation/Scheduler/controllers/SortItems/SortItemsController.d.ts +0 -9
  236. package/Presentation/Scheduler/controllers/SortItems/SortItemsController.js +0 -19
  237. package/Presentation/Scheduler/controllers/SortItems/SortItemsController.js.map +0 -1
  238. package/Presentation/Scheduler/controllers/SortItems/index.d.ts +0 -2
  239. package/Presentation/Scheduler/controllers/SortItems/index.js +0 -4
  240. package/Presentation/Scheduler/controllers/SortItems/index.js.map +0 -1
  241. package/Presentation/Scheduler/controllers/UnpublishItem/IUnpublishItemController.d.ts +0 -3
  242. package/Presentation/Scheduler/controllers/UnpublishItem/IUnpublishItemController.js +0 -3
  243. package/Presentation/Scheduler/controllers/UnpublishItem/IUnpublishItemController.js.map +0 -1
  244. package/Presentation/Scheduler/controllers/UnpublishItem/UnpublishItemController.d.ts +0 -7
  245. package/Presentation/Scheduler/controllers/UnpublishItem/UnpublishItemController.js +0 -11
  246. package/Presentation/Scheduler/controllers/UnpublishItem/UnpublishItemController.js.map +0 -1
  247. package/Presentation/Scheduler/controllers/UnpublishItem/index.d.ts +0 -2
  248. package/Presentation/Scheduler/controllers/UnpublishItem/index.js +0 -4
  249. package/Presentation/Scheduler/controllers/UnpublishItem/index.js.map +0 -1
  250. package/Presentation/Scheduler/controllers/UnselectAllItems/IUnselectAllItemsController.d.ts +0 -3
  251. package/Presentation/Scheduler/controllers/UnselectAllItems/IUnselectAllItemsController.js +0 -3
  252. package/Presentation/Scheduler/controllers/UnselectAllItems/IUnselectAllItemsController.js.map +0 -1
  253. package/Presentation/Scheduler/controllers/UnselectAllItems/UnselectAllItemsController.d.ts +0 -7
  254. package/Presentation/Scheduler/controllers/UnselectAllItems/UnselectAllItemsController.js +0 -11
  255. package/Presentation/Scheduler/controllers/UnselectAllItems/UnselectAllItemsController.js.map +0 -1
  256. package/Presentation/Scheduler/controllers/UnselectAllItems/index.d.ts +0 -2
  257. package/Presentation/Scheduler/controllers/UnselectAllItems/index.js +0 -4
  258. package/Presentation/Scheduler/controllers/UnselectAllItems/index.js.map +0 -1
  259. package/Presentation/Scheduler/controllers/index.d.ts +0 -11
  260. package/Presentation/Scheduler/controllers/index.js +0 -13
  261. package/Presentation/Scheduler/controllers/index.js.map +0 -1
  262. package/Presentation/Scheduler/index.d.ts +0 -1
  263. package/Presentation/Scheduler/index.js +0 -3
  264. package/Presentation/Scheduler/index.js.map +0 -1
  265. package/Presentation/SchedulerConfigs/SchedulerConfigs.d.ts +0 -2
  266. package/Presentation/SchedulerConfigs/SchedulerConfigs.js +0 -55
  267. package/Presentation/SchedulerConfigs/SchedulerConfigs.js.map +0 -1
  268. package/Presentation/SchedulerConfigs/index.d.ts +0 -1
  269. package/Presentation/SchedulerConfigs/index.js +0 -3
  270. package/Presentation/SchedulerConfigs/index.js.map +0 -1
  271. package/Presentation/SchedulerRenderer/SchedulerRenderer.d.ts +0 -6
  272. package/Presentation/SchedulerRenderer/SchedulerRenderer.js +0 -21
  273. package/Presentation/SchedulerRenderer/SchedulerRenderer.js.map +0 -1
  274. package/Presentation/SchedulerRenderer/index.d.ts +0 -1
  275. package/Presentation/SchedulerRenderer/index.js +0 -3
  276. package/Presentation/SchedulerRenderer/index.js.map +0 -1
  277. package/Presentation/abstractions/ISchedulerControllers.d.ts +0 -14
  278. package/Presentation/abstractions/ISchedulerControllers.js +0 -3
  279. package/Presentation/abstractions/ISchedulerControllers.js.map +0 -1
  280. package/Presentation/abstractions/ISchedulerPresenter.d.ts +0 -20
  281. package/Presentation/abstractions/ISchedulerPresenter.js +0 -3
  282. package/Presentation/abstractions/ISchedulerPresenter.js.map +0 -1
  283. package/Presentation/abstractions/index.d.ts +0 -2
  284. package/Presentation/abstractions/index.js +0 -4
  285. package/Presentation/abstractions/index.js.map +0 -1
  286. package/Presentation/components/Actions/CancelItem/CancelItem.d.ts +0 -2
  287. package/Presentation/components/Actions/CancelItem/CancelItem.js +0 -24
  288. package/Presentation/components/Actions/CancelItem/CancelItem.js.map +0 -1
  289. package/Presentation/components/Actions/CancelItem/index.d.ts +0 -1
  290. package/Presentation/components/Actions/CancelItem/index.js +0 -3
  291. package/Presentation/components/Actions/CancelItem/index.js.map +0 -1
  292. package/Presentation/components/Actions/index.d.ts +0 -1
  293. package/Presentation/components/Actions/index.js +0 -3
  294. package/Presentation/components/Actions/index.js.map +0 -1
  295. package/Presentation/components/BottomInfoBar/BottomInfoBar.d.ts +0 -2
  296. package/Presentation/components/BottomInfoBar/BottomInfoBar.js +0 -20
  297. package/Presentation/components/BottomInfoBar/BottomInfoBar.js.map +0 -1
  298. package/Presentation/components/BottomInfoBar/BottomInfoBar.styled.d.ts +0 -21
  299. package/Presentation/components/BottomInfoBar/BottomInfoBar.styled.js +0 -74
  300. package/Presentation/components/BottomInfoBar/BottomInfoBar.styled.js.map +0 -1
  301. package/Presentation/components/BottomInfoBar/ListMeta.d.ts +0 -7
  302. package/Presentation/components/BottomInfoBar/ListMeta.js +0 -12
  303. package/Presentation/components/BottomInfoBar/ListMeta.js.map +0 -1
  304. package/Presentation/components/BottomInfoBar/ListStatus.d.ts +0 -5
  305. package/Presentation/components/BottomInfoBar/ListStatus.js +0 -16
  306. package/Presentation/components/BottomInfoBar/ListStatus.js.map +0 -1
  307. package/Presentation/components/BottomInfoBar/index.d.ts +0 -1
  308. package/Presentation/components/BottomInfoBar/index.js +0 -3
  309. package/Presentation/components/BottomInfoBar/index.js.map +0 -1
  310. package/Presentation/components/Cells/CellActions/CellActions.d.ts +0 -2
  311. package/Presentation/components/Cells/CellActions/CellActions.js +0 -24
  312. package/Presentation/components/Cells/CellActions/CellActions.js.map +0 -1
  313. package/Presentation/components/Cells/CellActions/index.d.ts +0 -1
  314. package/Presentation/components/Cells/CellActions/index.js +0 -3
  315. package/Presentation/components/Cells/CellActions/index.js.map +0 -1
  316. package/Presentation/components/Cells/CellRevision/CellRevision.d.ts +0 -2
  317. package/Presentation/components/Cells/CellRevision/CellRevision.js +0 -20
  318. package/Presentation/components/Cells/CellRevision/CellRevision.js.map +0 -1
  319. package/Presentation/components/Cells/CellRevision/CellRevision.styled.d.ts +0 -12
  320. package/Presentation/components/Cells/CellRevision/CellRevision.styled.js +0 -47
  321. package/Presentation/components/Cells/CellRevision/CellRevision.styled.js.map +0 -1
  322. package/Presentation/components/Cells/CellRevision/index.d.ts +0 -1
  323. package/Presentation/components/Cells/CellRevision/index.js +0 -3
  324. package/Presentation/components/Cells/CellRevision/index.js.map +0 -1
  325. package/Presentation/components/Cells/CellScheduledBy/CellScheduledBy.d.ts +0 -2
  326. package/Presentation/components/Cells/CellScheduledBy/CellScheduledBy.js +0 -13
  327. package/Presentation/components/Cells/CellScheduledBy/CellScheduledBy.js.map +0 -1
  328. package/Presentation/components/Cells/CellScheduledBy/index.d.ts +0 -1
  329. package/Presentation/components/Cells/CellScheduledBy/index.js +0 -3
  330. package/Presentation/components/Cells/CellScheduledBy/index.js.map +0 -1
  331. package/Presentation/components/Cells/CellScheduledOn/CellScheduledOn.d.ts +0 -2
  332. package/Presentation/components/Cells/CellScheduledOn/CellScheduledOn.js +0 -20
  333. package/Presentation/components/Cells/CellScheduledOn/CellScheduledOn.js.map +0 -1
  334. package/Presentation/components/Cells/CellScheduledOn/index.d.ts +0 -1
  335. package/Presentation/components/Cells/CellScheduledOn/index.js +0 -3
  336. package/Presentation/components/Cells/CellScheduledOn/index.js.map +0 -1
  337. package/Presentation/components/Cells/CellTitle/CellTitle.d.ts +0 -2
  338. package/Presentation/components/Cells/CellTitle/CellTitle.js +0 -17
  339. package/Presentation/components/Cells/CellTitle/CellTitle.js.map +0 -1
  340. package/Presentation/components/Cells/CellTitle/CellTitle.styled.d.ts +0 -12
  341. package/Presentation/components/Cells/CellTitle/CellTitle.styled.js +0 -47
  342. package/Presentation/components/Cells/CellTitle/CellTitle.styled.js.map +0 -1
  343. package/Presentation/components/Cells/CellTitle/index.d.ts +0 -1
  344. package/Presentation/components/Cells/CellTitle/index.js +0 -3
  345. package/Presentation/components/Cells/CellTitle/index.js.map +0 -1
  346. package/Presentation/components/Cells/CellType/CellType.d.ts +0 -2
  347. package/Presentation/components/Cells/CellType/CellType.js +0 -17
  348. package/Presentation/components/Cells/CellType/CellType.js.map +0 -1
  349. package/Presentation/components/Cells/CellType/CellType.styled.d.ts +0 -12
  350. package/Presentation/components/Cells/CellType/CellType.styled.js +0 -47
  351. package/Presentation/components/Cells/CellType/CellType.styled.js.map +0 -1
  352. package/Presentation/components/Cells/CellType/index.d.ts +0 -1
  353. package/Presentation/components/Cells/CellType/index.js +0 -3
  354. package/Presentation/components/Cells/CellType/index.js.map +0 -1
  355. package/Presentation/components/Cells/index.d.ts +0 -6
  356. package/Presentation/components/Cells/index.js +0 -8
  357. package/Presentation/components/Cells/index.js.map +0 -1
  358. package/Presentation/components/Empty/Empty.d.ts +0 -2
  359. package/Presentation/components/Empty/Empty.js +0 -22
  360. package/Presentation/components/Empty/Empty.js.map +0 -1
  361. package/Presentation/components/Empty/Empty.styled.d.ts +0 -9
  362. package/Presentation/components/Empty/Empty.styled.js +0 -32
  363. package/Presentation/components/Empty/Empty.styled.js.map +0 -1
  364. package/Presentation/components/Empty/index.d.ts +0 -1
  365. package/Presentation/components/Empty/index.js +0 -3
  366. package/Presentation/components/Empty/index.js.map +0 -1
  367. package/Presentation/components/ScheduleDialog/ScheduleDialogAction.d.ts +0 -15
  368. package/Presentation/components/ScheduleDialog/ScheduleDialogAction.js +0 -51
  369. package/Presentation/components/ScheduleDialog/ScheduleDialogAction.js.map +0 -1
  370. package/Presentation/components/ScheduleDialog/index.d.ts +0 -2
  371. package/Presentation/components/ScheduleDialog/index.js +0 -4
  372. package/Presentation/components/ScheduleDialog/index.js.map +0 -1
  373. package/Presentation/components/ScheduleDialog/types.d.ts +0 -15
  374. package/Presentation/components/ScheduleDialog/types.js +0 -3
  375. package/Presentation/components/ScheduleDialog/types.js.map +0 -1
  376. package/Presentation/components/ScheduleDialog/useScheduleDialog.d.ts +0 -19
  377. package/Presentation/components/ScheduleDialog/useScheduleDialog.js +0 -174
  378. package/Presentation/components/ScheduleDialog/useScheduleDialog.js.map +0 -1
  379. package/Presentation/components/SchedulerOverlay/SchedulerOverlay.d.ts +0 -7
  380. package/Presentation/components/SchedulerOverlay/SchedulerOverlay.js +0 -36
  381. package/Presentation/components/SchedulerOverlay/SchedulerOverlay.js.map +0 -1
  382. package/Presentation/components/SchedulerOverlay/index.d.ts +0 -1
  383. package/Presentation/components/SchedulerOverlay/index.js +0 -3
  384. package/Presentation/components/SchedulerOverlay/index.js.map +0 -1
  385. package/Presentation/components/SearchInput/SearchInput.d.ts +0 -2
  386. package/Presentation/components/SearchInput/SearchInput.js +0 -37
  387. package/Presentation/components/SearchInput/SearchInput.js.map +0 -1
  388. package/Presentation/components/SearchInput/index.d.ts +0 -1
  389. package/Presentation/components/SearchInput/index.js +0 -3
  390. package/Presentation/components/SearchInput/index.js.map +0 -1
  391. package/Presentation/components/Table/Table.d.ts +0 -2
  392. package/Presentation/components/Table/Table.js +0 -29
  393. package/Presentation/components/Table/Table.js.map +0 -1
  394. package/Presentation/components/Table/index.d.ts +0 -1
  395. package/Presentation/components/Table/index.js +0 -3
  396. package/Presentation/components/Table/index.js.map +0 -1
  397. package/Presentation/components/Title/Title.d.ts +0 -5
  398. package/Presentation/components/Title/Title.js +0 -15
  399. package/Presentation/components/Title/Title.js.map +0 -1
  400. package/Presentation/components/Title/Title.styled.d.ts +0 -4
  401. package/Presentation/components/Title/Title.styled.js +0 -19
  402. package/Presentation/components/Title/Title.styled.js.map +0 -1
  403. package/Presentation/components/Title/index.d.ts +0 -1
  404. package/Presentation/components/Title/index.js +0 -3
  405. package/Presentation/components/Title/index.js.map +0 -1
  406. package/Presentation/configs/index.d.ts +0 -1
  407. package/Presentation/configs/index.js +0 -3
  408. package/Presentation/configs/index.js.map +0 -1
  409. package/Presentation/configs/list/Browser/EntryAction.d.ts +0 -7
  410. package/Presentation/configs/list/Browser/EntryAction.js +0 -16
  411. package/Presentation/configs/list/Browser/EntryAction.js.map +0 -1
  412. package/Presentation/configs/list/Browser/Table/Column.d.ts +0 -14
  413. package/Presentation/configs/list/Browser/Table/Column.js +0 -14
  414. package/Presentation/configs/list/Browser/Table/Column.js.map +0 -1
  415. package/Presentation/configs/list/Browser/Table/Sorting.d.ts +0 -5
  416. package/Presentation/configs/list/Browser/Table/Sorting.js +0 -10
  417. package/Presentation/configs/list/Browser/Table/Sorting.js.map +0 -1
  418. package/Presentation/configs/list/Browser/Table/index.d.ts +0 -19
  419. package/Presentation/configs/list/Browser/Table/index.js +0 -8
  420. package/Presentation/configs/list/Browser/Table/index.js.map +0 -1
  421. package/Presentation/configs/list/Browser/index.d.ts +0 -24
  422. package/Presentation/configs/list/Browser/index.js +0 -8
  423. package/Presentation/configs/list/Browser/index.js.map +0 -1
  424. package/Presentation/configs/list/SchedulerListConfig.d.ts +0 -33
  425. package/Presentation/configs/list/SchedulerListConfig.js +0 -29
  426. package/Presentation/configs/list/SchedulerListConfig.js.map +0 -1
  427. package/Presentation/configs/list/index.d.ts +0 -1
  428. package/Presentation/configs/list/index.js +0 -3
  429. package/Presentation/configs/list/index.js.map +0 -1
  430. package/Presentation/hooks/index.d.ts +0 -3
  431. package/Presentation/hooks/index.js +0 -5
  432. package/Presentation/hooks/index.js.map +0 -1
  433. package/Presentation/hooks/useCancelSchedulerItem.d.ts +0 -8
  434. package/Presentation/hooks/useCancelSchedulerItem.js +0 -32
  435. package/Presentation/hooks/useCancelSchedulerItem.js.map +0 -1
  436. package/Presentation/hooks/useScheduler.d.ts +0 -27
  437. package/Presentation/hooks/useScheduler.js +0 -51
  438. package/Presentation/hooks/useScheduler.js.map +0 -1
  439. package/Presentation/hooks/useSchedulerItem.d.ts +0 -12
  440. package/Presentation/hooks/useSchedulerItem.js +0 -9
  441. package/Presentation/hooks/useSchedulerItem.js.map +0 -1
  442. package/Presentation/index.d.ts +0 -24
  443. package/Presentation/index.js +0 -31
  444. package/Presentation/index.js.map +0 -1
  445. package/UseCases/CancelItem/CancelItemUseCase.d.ts +0 -7
  446. package/UseCases/CancelItem/CancelItemUseCase.js +0 -12
  447. package/UseCases/CancelItem/CancelItemUseCase.js.map +0 -1
  448. package/UseCases/CancelItem/ICancelItemUseCase.d.ts +0 -3
  449. package/UseCases/CancelItem/ICancelItemUseCase.js +0 -3
  450. package/UseCases/CancelItem/ICancelItemUseCase.js.map +0 -1
  451. package/UseCases/CancelItem/index.d.ts +0 -2
  452. package/UseCases/CancelItem/index.js +0 -4
  453. package/UseCases/CancelItem/index.js.map +0 -1
  454. package/UseCases/GetItem/GetItemUseCase.d.ts +0 -8
  455. package/UseCases/GetItem/GetItemUseCase.js +0 -12
  456. package/UseCases/GetItem/GetItemUseCase.js.map +0 -1
  457. package/UseCases/GetItem/IGetItemUseCase.d.ts +0 -4
  458. package/UseCases/GetItem/IGetItemUseCase.js +0 -3
  459. package/UseCases/GetItem/IGetItemUseCase.js.map +0 -1
  460. package/UseCases/GetItem/index.d.ts +0 -2
  461. package/UseCases/GetItem/index.js +0 -4
  462. package/UseCases/GetItem/index.js.map +0 -1
  463. package/UseCases/GetScheduledItem/GetScheduledItemUseCase.d.ts +0 -7
  464. package/UseCases/GetScheduledItem/GetScheduledItemUseCase.js +0 -13
  465. package/UseCases/GetScheduledItem/GetScheduledItemUseCase.js.map +0 -1
  466. package/UseCases/GetScheduledItem/IGetScheduledItemUseCase.d.ts +0 -4
  467. package/UseCases/GetScheduledItem/IGetScheduledItemUseCase.js +0 -3
  468. package/UseCases/GetScheduledItem/IGetScheduledItemUseCase.js.map +0 -1
  469. package/UseCases/GetScheduledItem/index.d.ts +0 -2
  470. package/UseCases/GetScheduledItem/index.js +0 -4
  471. package/UseCases/GetScheduledItem/index.js.map +0 -1
  472. package/UseCases/ListItems/IListItemsUseCase.d.ts +0 -4
  473. package/UseCases/ListItems/IListItemsUseCase.js +0 -3
  474. package/UseCases/ListItems/IListItemsUseCase.js.map +0 -1
  475. package/UseCases/ListItems/ListItemsUseCase.d.ts +0 -8
  476. package/UseCases/ListItems/ListItemsUseCase.js +0 -12
  477. package/UseCases/ListItems/ListItemsUseCase.js.map +0 -1
  478. package/UseCases/ListItems/ListItemsUseCaseWithSearch.d.ts +0 -9
  479. package/UseCases/ListItems/ListItemsUseCaseWithSearch.js +0 -20
  480. package/UseCases/ListItems/ListItemsUseCaseWithSearch.js.map +0 -1
  481. package/UseCases/ListItems/ListItemsUseCaseWithSorting.d.ts +0 -9
  482. package/UseCases/ListItems/ListItemsUseCaseWithSorting.js +0 -18
  483. package/UseCases/ListItems/ListItemsUseCaseWithSorting.js.map +0 -1
  484. package/UseCases/ListItems/index.d.ts +0 -4
  485. package/UseCases/ListItems/index.js +0 -6
  486. package/UseCases/ListItems/index.js.map +0 -1
  487. package/UseCases/ListMoreItems/IListMoreItemsUseCase.d.ts +0 -3
  488. package/UseCases/ListMoreItems/IListMoreItemsUseCase.js +0 -3
  489. package/UseCases/ListMoreItems/IListMoreItemsUseCase.js.map +0 -1
  490. package/UseCases/ListMoreItems/ListMoreItemsUseCase.d.ts +0 -7
  491. package/UseCases/ListMoreItems/ListMoreItemsUseCase.js +0 -12
  492. package/UseCases/ListMoreItems/ListMoreItemsUseCase.js.map +0 -1
  493. package/UseCases/ListMoreItems/index.d.ts +0 -2
  494. package/UseCases/ListMoreItems/index.js +0 -4
  495. package/UseCases/ListMoreItems/index.js.map +0 -1
  496. package/UseCases/PublishItem/IPublishItemUseCase.d.ts +0 -3
  497. package/UseCases/PublishItem/IPublishItemUseCase.js +0 -3
  498. package/UseCases/PublishItem/IPublishItemUseCase.js.map +0 -1
  499. package/UseCases/PublishItem/PublishItemUseCase.d.ts +0 -7
  500. package/UseCases/PublishItem/PublishItemUseCase.js +0 -12
  501. package/UseCases/PublishItem/PublishItemUseCase.js.map +0 -1
  502. package/UseCases/PublishItem/index.d.ts +0 -2
  503. package/UseCases/PublishItem/index.js +0 -4
  504. package/UseCases/PublishItem/index.js.map +0 -1
  505. package/UseCases/SearchItems/ISearchItemsUseCase.d.ts +0 -3
  506. package/UseCases/SearchItems/ISearchItemsUseCase.js +0 -3
  507. package/UseCases/SearchItems/ISearchItemsUseCase.js.map +0 -1
  508. package/UseCases/SearchItems/SearchItemsUseCase.d.ts +0 -7
  509. package/UseCases/SearchItems/SearchItemsUseCase.js +0 -12
  510. package/UseCases/SearchItems/SearchItemsUseCase.js.map +0 -1
  511. package/UseCases/SearchItems/index.d.ts +0 -2
  512. package/UseCases/SearchItems/index.js +0 -4
  513. package/UseCases/SearchItems/index.js.map +0 -1
  514. package/UseCases/SelectAllItems/ISelectAllItemsUseCase.d.ts +0 -3
  515. package/UseCases/SelectAllItems/ISelectAllItemsUseCase.js +0 -3
  516. package/UseCases/SelectAllItems/ISelectAllItemsUseCase.js.map +0 -1
  517. package/UseCases/SelectAllItems/SelectAllItemsUseCase.d.ts +0 -7
  518. package/UseCases/SelectAllItems/SelectAllItemsUseCase.js +0 -12
  519. package/UseCases/SelectAllItems/SelectAllItemsUseCase.js.map +0 -1
  520. package/UseCases/SelectAllItems/index.d.ts +0 -2
  521. package/UseCases/SelectAllItems/index.js +0 -4
  522. package/UseCases/SelectAllItems/index.js.map +0 -1
  523. package/UseCases/SelectItems/ISelectItemsUseCase.d.ts +0 -4
  524. package/UseCases/SelectItems/ISelectItemsUseCase.js +0 -3
  525. package/UseCases/SelectItems/ISelectItemsUseCase.js.map +0 -1
  526. package/UseCases/SelectItems/SelectItemsUseCase.d.ts +0 -7
  527. package/UseCases/SelectItems/SelectItemsUseCase.js +0 -12
  528. package/UseCases/SelectItems/SelectItemsUseCase.js.map +0 -1
  529. package/UseCases/SelectItems/index.d.ts +0 -2
  530. package/UseCases/SelectItems/index.js +0 -4
  531. package/UseCases/SelectItems/index.js.map +0 -1
  532. package/UseCases/SortItems/ISortItemsUseCase.d.ts +0 -4
  533. package/UseCases/SortItems/ISortItemsUseCase.js +0 -3
  534. package/UseCases/SortItems/ISortItemsUseCase.js.map +0 -1
  535. package/UseCases/SortItems/SortItemsUseCase.d.ts +0 -7
  536. package/UseCases/SortItems/SortItemsUseCase.js +0 -12
  537. package/UseCases/SortItems/SortItemsUseCase.js.map +0 -1
  538. package/UseCases/SortItems/index.d.ts +0 -2
  539. package/UseCases/SortItems/index.js +0 -4
  540. package/UseCases/SortItems/index.js.map +0 -1
  541. package/UseCases/UnSelectAllItems/IUnselectAllItemsUseCase.d.ts +0 -3
  542. package/UseCases/UnSelectAllItems/IUnselectAllItemsUseCase.js +0 -3
  543. package/UseCases/UnSelectAllItems/IUnselectAllItemsUseCase.js.map +0 -1
  544. package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.d.ts +0 -7
  545. package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.js +0 -12
  546. package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.js.map +0 -1
  547. package/UseCases/UnSelectAllItems/index.d.ts +0 -2
  548. package/UseCases/UnSelectAllItems/index.js +0 -4
  549. package/UseCases/UnSelectAllItems/index.js.map +0 -1
  550. package/UseCases/UnpublishItem/IUnpublishItemUseCase.d.ts +0 -3
  551. package/UseCases/UnpublishItem/IUnpublishItemUseCase.js +0 -3
  552. package/UseCases/UnpublishItem/IUnpublishItemUseCase.js.map +0 -1
  553. package/UseCases/UnpublishItem/UnpublishItemUseCase.d.ts +0 -7
  554. package/UseCases/UnpublishItem/UnpublishItemUseCase.js +0 -12
  555. package/UseCases/UnpublishItem/UnpublishItemUseCase.js.map +0 -1
  556. package/UseCases/UnpublishItem/index.d.ts +0 -2
  557. package/UseCases/UnpublishItem/index.js +0 -4
  558. package/UseCases/UnpublishItem/index.js.map +0 -1
  559. package/UseCases/index.d.ts +0 -11
  560. package/UseCases/index.js +0 -13
  561. package/UseCases/index.js.map +0 -1
  562. package/types.d.ts +0 -36
  563. package/types.js +0 -15
  564. package/types.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { ScheduleType } from \"~/types\";\n\nexport interface IScheduleDialogScheduleActionExecuteParams {\n id: string;\n modelId: string;\n scheduleOn: Date;\n type: ScheduleType;\n}\n\nexport interface IScheduleDialogCancelActionExecuteParams {\n id: string;\n modelId: string;\n}\n\nexport interface IScheduleDialogAction {\n schedule(params: IScheduleDialogScheduleActionExecuteParams): Promise<void>;\n cancel(params: IScheduleDialogCancelActionExecuteParams): Promise<void>;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1,19 +0,0 @@
1
- import type { SchedulerEntry } from "../../../types";
2
- import type { CmsContentEntry } from "@webiny/app-headless-cms-common/types";
3
- import type { IScheduleDialogAction } from "./types";
4
- export interface ShowDialogParamsEntry {
5
- id: string;
6
- status: CmsContentEntry["meta"]["status"];
7
- title: string;
8
- modelId: string;
9
- }
10
- export interface ShowDialogParams {
11
- entry: ShowDialogParamsEntry;
12
- schedulerEntry: SchedulerEntry | null;
13
- action: IScheduleDialogAction;
14
- }
15
- interface UseShowScheduleDialogResponse {
16
- showDialog: (params: ShowDialogParams) => void;
17
- }
18
- export declare const useScheduleDialog: () => UseShowScheduleDialogResponse;
19
- export {};
@@ -1,174 +0,0 @@
1
- import React, { useCallback, useRef } from "react";
2
- import { Alert, Grid, Input } from "@webiny/admin-ui";
3
- import { useDialogs, useSnackbar } from "@webiny/app-admin";
4
- import { Bind } from "@webiny/form";
5
- import { validation } from "@webiny/validation";
6
- import { ScheduleType } from "../../../types.js";
7
- import ValidationError from "@webiny/validation/validationError.js";
8
- const dateToLocaleStringFormatter = new Intl.DateTimeFormat(undefined, {
9
- year: "numeric",
10
- month: "2-digit",
11
- day: "2-digit",
12
- hour: "2-digit",
13
- minute: "2-digit",
14
- second: undefined,
15
- hour12: false
16
- });
17
- const ReschedulingAlert = ({
18
- scheduleOn,
19
- type
20
- }) => {
21
- if (!scheduleOn || !type) {
22
- return null;
23
- }
24
- const actionName = type === ScheduleType.publish ? "publish" : "unpublish";
25
- return /*#__PURE__*/React.createElement(Alert, {
26
- type: "danger"
27
- }, /*#__PURE__*/React.createElement(React.Fragment, null, "A ", actionName, " is already scheduled at", /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("strong", null, dateToLocaleStringFormatter.format(scheduleOn)), "."));
28
- };
29
- const formatDateForDateTimeLocal = date => {
30
- if (!date) {
31
- return undefined;
32
- }
33
- const pad = num => {
34
- return String(num).padStart(2, "0");
35
- };
36
- const year = date.getFullYear();
37
- const month = pad(date.getMonth() + 1);
38
- const day = pad(date.getDate());
39
- const hours = pad(date.getHours());
40
- const minutes = pad(date.getMinutes());
41
- return `${year}-${month}-${day}T${hours}:${minutes}`;
42
- };
43
- const minDateValidator = input => {
44
- const value = new Date(input);
45
- const minDate = new Date(new Date().getTime() + 120 * 1000);
46
- if (minDate < value) {
47
- return;
48
- }
49
- throw new ValidationError(`The date must be at least 2 minutes in the future. Current minimum date is ${dateToLocaleStringFormatter.format(minDate)}.`);
50
- };
51
- minDateValidator.validatorName = "minDateValidator";
52
- const FormComponent = ({
53
- scheduleOn,
54
- onCancel,
55
- type
56
- }) => {
57
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(ReschedulingAlert, {
58
- type: type,
59
- scheduleOn: scheduleOn,
60
- onCancel: onCancel
61
- }), /*#__PURE__*/React.createElement(Grid, null, /*#__PURE__*/React.createElement(Grid.Column, {
62
- span: 12
63
- }, /*#__PURE__*/React.createElement(Bind, {
64
- name: "scheduleOn",
65
- validators: [validation.create("required"), minDateValidator]
66
- }, /*#__PURE__*/React.createElement(Input, {
67
- title: "Schedule On",
68
- label: "Schedule On",
69
- size: "lg",
70
- type: "datetime-local",
71
- required: true,
72
- autoFocus: true
73
- })))));
74
- };
75
- export const useScheduleDialog = () => {
76
- const dialog = useDialogs();
77
- const {
78
- showSnackbar
79
- } = useSnackbar();
80
- const dialogClose = useRef(() => {
81
- return;
82
- });
83
- const onAccept = useCallback(async params => {
84
- const {
85
- action,
86
- entry,
87
- scheduleOn,
88
- type
89
- } = params;
90
- try {
91
- await action.schedule({
92
- id: entry.id,
93
- modelId: entry.modelId,
94
- scheduleOn,
95
- type
96
- });
97
- showSnackbar(`Scheduled ${type} action for "${entry.title}"!`);
98
- } catch (error) {
99
- showSnackbar(error.message);
100
- console.error(error);
101
- }
102
- }, []);
103
- const onCancel = useCallback(async params => {
104
- const {
105
- action,
106
- schedulerEntry
107
- } = params;
108
- try {
109
- await action.cancel({
110
- id: schedulerEntry.id,
111
- modelId: schedulerEntry.model.modelId
112
- });
113
- showSnackbar(`Canceled scheduled ${schedulerEntry.type} on "${schedulerEntry.title}"!`);
114
- } catch (error) {
115
- showSnackbar(error.message);
116
- }
117
- if (!dialogClose.current) {
118
- return;
119
- }
120
- dialogClose.current();
121
- dialogClose.current = null;
122
- }, []);
123
- const showDialog = params => {
124
- const {
125
- schedulerEntry,
126
- entry
127
- } = params;
128
- const scheduleOnValue = schedulerEntry?.publishOn || schedulerEntry?.unpublishOn;
129
- dialogClose.current = dialog.showDialog({
130
- title: `Schedule "${entry.title}"`,
131
- content: /*#__PURE__*/React.createElement(FormComponent, {
132
- type: schedulerEntry?.type,
133
- scheduleOn: scheduleOnValue,
134
- onCancel: onCancel
135
- }),
136
- formData: {
137
- scheduleOn: formatDateForDateTimeLocal(scheduleOnValue)
138
- },
139
- acceptLabel: entry.status === "published" ? "Schedule Unpublish" : "Schedule Publish",
140
- cancelLabel: "Discard",
141
- loadingLabel: "Scheduling...",
142
- onAccept: data => {
143
- if (!data.scheduleOn) {
144
- showSnackbar(`Missing "Schedule On" date!`);
145
- return;
146
- }
147
- /**
148
- * We need to convert scheduleOn from local string to the ISO String (UTC) format.
149
- * This is important because the date will be stored in the database in UTC format.
150
- *
151
- * We display the date (in the UI) in users timezone time.
152
- */
153
- let scheduleOn;
154
- try {
155
- scheduleOn = new Date(data.scheduleOn);
156
- } catch (ex) {
157
- showSnackbar(`Invalid "Schedule On" date!`);
158
- console.error(ex);
159
- return;
160
- }
161
- onAccept({
162
- ...params,
163
- scheduleOn,
164
- type: entry.status === "published" ? ScheduleType.unpublish : ScheduleType.publish
165
- });
166
- }
167
- });
168
- };
169
- return {
170
- showDialog
171
- };
172
- };
173
-
174
- //# sourceMappingURL=useScheduleDialog.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","useCallback","useRef","Alert","Grid","Input","useDialogs","useSnackbar","Bind","validation","ScheduleType","ValidationError","dateToLocaleStringFormatter","Intl","DateTimeFormat","undefined","year","month","day","hour","minute","second","hour12","ReschedulingAlert","scheduleOn","type","actionName","publish","createElement","Fragment","format","formatDateForDateTimeLocal","date","pad","num","String","padStart","getFullYear","getMonth","getDate","hours","getHours","minutes","getMinutes","minDateValidator","input","value","Date","minDate","getTime","validatorName","FormComponent","onCancel","Column","span","name","validators","create","title","label","size","required","autoFocus","useScheduleDialog","dialog","showSnackbar","dialogClose","onAccept","params","action","entry","schedule","id","modelId","error","message","console","schedulerEntry","cancel","model","current","showDialog","scheduleOnValue","publishOn","unpublishOn","content","formData","acceptLabel","status","cancelLabel","loadingLabel","data","ex","unpublish"],"sources":["useScheduleDialog.tsx"],"sourcesContent":["import React, { useCallback, useRef } from \"react\";\nimport { Alert, Grid, Input } from \"@webiny/admin-ui\";\nimport { useDialogs, useSnackbar } from \"@webiny/app-admin\";\nimport { Bind } from \"@webiny/form\";\nimport { validation } from \"@webiny/validation\";\nimport type { SchedulerEntry } from \"~/types\";\nimport type { CmsContentEntry } from \"@webiny/app-headless-cms-common/types\";\nimport type { IScheduleDialogAction } from \"./types\";\nimport { ScheduleType } from \"~/types.js\";\nimport type { Validator } from \"@webiny/validation/types.js\";\nimport ValidationError from \"@webiny/validation/validationError.js\";\n\nexport interface ShowDialogParamsEntry {\n id: string;\n status: CmsContentEntry[\"meta\"][\"status\"];\n title: string;\n modelId: string;\n}\n\nexport interface ShowDialogParams {\n entry: ShowDialogParamsEntry;\n schedulerEntry: SchedulerEntry | null;\n action: IScheduleDialogAction;\n}\n\ninterface UseShowScheduleDialogResponse {\n showDialog: (params: ShowDialogParams) => void;\n}\n\ninterface FormComponentProps {\n scheduleOn: Date | undefined;\n type: ScheduleType | undefined;\n onCancel: OnCancelCallable;\n}\n\nconst dateToLocaleStringFormatter = new Intl.DateTimeFormat(undefined, {\n year: \"numeric\",\n month: \"2-digit\",\n day: \"2-digit\",\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: undefined,\n hour12: false\n});\n\nconst ReschedulingAlert = ({ scheduleOn, type }: FormComponentProps) => {\n if (!scheduleOn || !type) {\n return null;\n }\n const actionName = type === ScheduleType.publish ? \"publish\" : \"unpublish\";\n return (\n <Alert type={\"danger\"}>\n <>\n A {actionName} is already scheduled at\n <br />\n <strong>{dateToLocaleStringFormatter.format(scheduleOn)}</strong>.\n </>\n </Alert>\n );\n};\n\nconst formatDateForDateTimeLocal = (date?: Date): string | undefined => {\n if (!date) {\n return undefined;\n }\n const pad = (num: number) => {\n return String(num).padStart(2, \"0\");\n };\n\n const year = date.getFullYear();\n const month = pad(date.getMonth() + 1);\n const day = pad(date.getDate());\n const hours = pad(date.getHours());\n const minutes = pad(date.getMinutes());\n\n return `${year}-${month}-${day}T${hours}:${minutes}`;\n};\n\nconst minDateValidator: Validator = (input: string) => {\n const value = new Date(input);\n const minDate = new Date(new Date().getTime() + 120 * 1000);\n if (minDate < value) {\n return;\n }\n throw new ValidationError(\n `The date must be at least 2 minutes in the future. Current minimum date is ${dateToLocaleStringFormatter.format(\n minDate\n )}.`\n );\n};\n\nminDateValidator.validatorName = \"minDateValidator\";\n\nconst FormComponent = ({ scheduleOn, onCancel, type }: FormComponentProps) => {\n return (\n <>\n {<ReschedulingAlert type={type} scheduleOn={scheduleOn} onCancel={onCancel} />}\n <Grid>\n <Grid.Column span={12}>\n <Bind\n name={\"scheduleOn\"}\n validators={[validation.create(\"required\"), minDateValidator]}\n >\n <Input\n title={\"Schedule On\"}\n label={\"Schedule On\"}\n size={\"lg\"}\n type={\"datetime-local\"}\n required\n autoFocus\n />\n </Bind>\n </Grid.Column>\n </Grid>\n </>\n );\n};\n\ninterface ScheduleFormData {\n scheduleOn?: string;\n}\n\ninterface IOnAcceptParams {\n action: IScheduleDialogAction;\n scheduleOn: Date;\n entry: ShowDialogParamsEntry;\n type: ScheduleType;\n}\n\ninterface IOnCancelParams {\n action: IScheduleDialogAction;\n schedulerEntry: SchedulerEntry;\n}\n\ninterface OnCancelCallable {\n (params: IOnCancelParams): Promise<void>;\n}\n\nexport const useScheduleDialog = (): UseShowScheduleDialogResponse => {\n const dialog = useDialogs();\n const { showSnackbar } = useSnackbar();\n\n const dialogClose = useRef<null | (() => void)>(() => {\n return;\n });\n\n const onAccept = useCallback(async (params: IOnAcceptParams) => {\n const { action, entry, scheduleOn, type } = params;\n\n try {\n await action.schedule({\n id: entry.id,\n modelId: entry.modelId,\n scheduleOn,\n type\n });\n showSnackbar(`Scheduled ${type} action for \"${entry.title}\"!`);\n } catch (error) {\n showSnackbar(error.message);\n console.error(error);\n }\n }, []);\n\n const onCancel = useCallback(async (params: IOnCancelParams) => {\n const { action, schedulerEntry } = params;\n\n try {\n await action.cancel({\n id: schedulerEntry.id,\n modelId: schedulerEntry.model.modelId\n });\n showSnackbar(`Canceled scheduled ${schedulerEntry.type} on \"${schedulerEntry.title}\"!`);\n } catch (error) {\n showSnackbar(error.message);\n }\n if (!dialogClose.current) {\n return;\n }\n dialogClose.current();\n dialogClose.current = null;\n }, []);\n\n const showDialog = (params: ShowDialogParams) => {\n const { schedulerEntry, entry } = params;\n\n const scheduleOnValue = schedulerEntry?.publishOn || schedulerEntry?.unpublishOn;\n\n dialogClose.current = dialog.showDialog({\n title: `Schedule \"${entry.title}\"`,\n content: (\n <FormComponent\n type={schedulerEntry?.type}\n scheduleOn={scheduleOnValue}\n onCancel={onCancel}\n />\n ),\n formData: {\n scheduleOn: formatDateForDateTimeLocal(scheduleOnValue)\n },\n acceptLabel: entry.status === \"published\" ? \"Schedule Unpublish\" : \"Schedule Publish\",\n cancelLabel: \"Discard\",\n loadingLabel: \"Scheduling...\",\n onAccept: (data: Partial<ScheduleFormData>) => {\n if (!data.scheduleOn) {\n showSnackbar(`Missing \"Schedule On\" date!`);\n return;\n }\n /**\n * We need to convert scheduleOn from local string to the ISO String (UTC) format.\n * This is important because the date will be stored in the database in UTC format.\n *\n * We display the date (in the UI) in users timezone time.\n */\n let scheduleOn: Date;\n try {\n scheduleOn = new Date(data.scheduleOn);\n } catch (ex) {\n showSnackbar(`Invalid \"Schedule On\" date!`);\n console.error(ex);\n return;\n }\n\n onAccept({\n ...params,\n scheduleOn,\n type:\n entry.status === \"published\" ? ScheduleType.unpublish : ScheduleType.publish\n });\n }\n });\n };\n\n return {\n showDialog\n };\n};\n"],"mappings":"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","ignoreList":[]}
@@ -1,7 +0,0 @@
1
- import React from "react";
2
- interface SchedulerOverlayProps {
3
- title: string;
4
- onExited: () => void;
5
- }
6
- export declare const SchedulerOverlay: (props: SchedulerOverlayProps) => React.JSX.Element;
7
- export {};
@@ -1,36 +0,0 @@
1
- import React from "react";
2
- import debounce from "lodash/debounce";
3
- import { OverlayLayout } from "@webiny/app-admin";
4
- import { Scrollbar } from "@webiny/ui/Scrollbar";
5
- import { Title } from "../Title";
6
- import { SearchInput } from "../SearchInput";
7
- import { Empty } from "../Empty";
8
- import { Table } from "../Table";
9
- import { BottomInfoBar } from "../BottomInfoBar";
10
- import { useScheduler } from "../../hooks";
11
- export const SchedulerOverlay = props => {
12
- const {
13
- listMoreItems,
14
- vm
15
- } = useScheduler();
16
- const onTableScroll = debounce(async ({
17
- scrollFrame
18
- }) => {
19
- if (scrollFrame.top > 0.8) {
20
- await listMoreItems();
21
- }
22
- }, 200);
23
- return /*#__PURE__*/React.createElement(OverlayLayout, {
24
- onExited: props.onExited,
25
- barLeft: /*#__PURE__*/React.createElement(Title, {
26
- title: props.title
27
- }),
28
- barMiddle: /*#__PURE__*/React.createElement(SearchInput, null)
29
- }, /*#__PURE__*/React.createElement(Scrollbar, {
30
- onScrollFrame: scrollFrame => onTableScroll({
31
- scrollFrame
32
- })
33
- }, vm.isEmptyView ? /*#__PURE__*/React.createElement(Empty, null) : /*#__PURE__*/React.createElement(Table, null)), /*#__PURE__*/React.createElement(BottomInfoBar, null));
34
- };
35
-
36
- //# sourceMappingURL=SchedulerOverlay.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","debounce","OverlayLayout","Scrollbar","Title","SearchInput","Empty","Table","BottomInfoBar","useScheduler","SchedulerOverlay","props","listMoreItems","vm","onTableScroll","scrollFrame","top","createElement","onExited","barLeft","title","barMiddle","onScrollFrame","isEmptyView"],"sources":["SchedulerOverlay.tsx"],"sourcesContent":["import React from \"react\";\nimport debounce from \"lodash/debounce\";\nimport { OverlayLayout } from \"@webiny/app-admin\";\nimport { Scrollbar } from \"@webiny/ui/Scrollbar\";\nimport { Title } from \"~/Presentation/components/Title\";\nimport { SearchInput } from \"~/Presentation/components/SearchInput\";\nimport { Empty } from \"~/Presentation/components/Empty\";\nimport { Table } from \"~/Presentation/components/Table\";\nimport { BottomInfoBar } from \"~/Presentation/components/BottomInfoBar\";\nimport { useScheduler } from \"~/Presentation/hooks\";\n\ninterface SchedulerOverlayProps {\n title: string;\n onExited: () => void;\n}\n\nexport const SchedulerOverlay = (props: SchedulerOverlayProps) => {\n const { listMoreItems, vm } = useScheduler();\n\n const onTableScroll = debounce(async ({ scrollFrame }) => {\n if (scrollFrame.top > 0.8) {\n await listMoreItems();\n }\n }, 200);\n\n return (\n <OverlayLayout\n onExited={props.onExited}\n barLeft={<Title title={props.title} />}\n barMiddle={<SearchInput />}\n >\n <Scrollbar onScrollFrame={scrollFrame => onTableScroll({ scrollFrame })}>\n {vm.isEmptyView ? <Empty /> : <Table />}\n </Scrollbar>\n <BottomInfoBar />\n </OverlayLayout>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,QAAQ,MAAM,iBAAiB;AACtC,SAASC,aAAa,QAAQ,mBAAmB;AACjD,SAASC,SAAS,QAAQ,sBAAsB;AAChD,SAASC,KAAK;AACd,SAASC,WAAW;AACpB,SAASC,KAAK;AACd,SAASC,KAAK;AACd,SAASC,aAAa;AACtB,SAASC,YAAY;AAOrB,OAAO,MAAMC,gBAAgB,GAAIC,KAA4B,IAAK;EAC9D,MAAM;IAAEC,aAAa;IAAEC;EAAG,CAAC,GAAGJ,YAAY,CAAC,CAAC;EAE5C,MAAMK,aAAa,GAAGb,QAAQ,CAAC,OAAO;IAAEc;EAAY,CAAC,KAAK;IACtD,IAAIA,WAAW,CAACC,GAAG,GAAG,GAAG,EAAE;MACvB,MAAMJ,aAAa,CAAC,CAAC;IACzB;EACJ,CAAC,EAAE,GAAG,CAAC;EAEP,oBACIZ,KAAA,CAAAiB,aAAA,CAACf,aAAa;IACVgB,QAAQ,EAAEP,KAAK,CAACO,QAAS;IACzBC,OAAO,eAAEnB,KAAA,CAAAiB,aAAA,CAACb,KAAK;MAACgB,KAAK,EAAET,KAAK,CAACS;IAAM,CAAE,CAAE;IACvCC,SAAS,eAAErB,KAAA,CAAAiB,aAAA,CAACZ,WAAW,MAAE;EAAE,gBAE3BL,KAAA,CAAAiB,aAAA,CAACd,SAAS;IAACmB,aAAa,EAAEP,WAAW,IAAID,aAAa,CAAC;MAAEC;IAAY,CAAC;EAAE,GACnEF,EAAE,CAACU,WAAW,gBAAGvB,KAAA,CAAAiB,aAAA,CAACX,KAAK,MAAE,CAAC,gBAAGN,KAAA,CAAAiB,aAAA,CAACV,KAAK,MAAE,CAC/B,CAAC,eACZP,KAAA,CAAAiB,aAAA,CAACT,aAAa,MAAE,CACL,CAAC;AAExB,CAAC","ignoreList":[]}
@@ -1 +0,0 @@
1
- export * from "./SchedulerOverlay.js";
@@ -1,3 +0,0 @@
1
- export * from "./SchedulerOverlay.js";
2
-
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./SchedulerOverlay.js\";\n"],"mappings":"AAAA","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import React from "react";
2
- export declare const SearchInput: () => React.JSX.Element;
@@ -1,37 +0,0 @@
1
- import React from "react";
2
- import { ReactComponent as SearchIcon } from "@webiny/icons/search.svg";
3
- import { DelayedOnChange, Icon, Input } from "@webiny/admin-ui";
4
- import { useScheduler } from "../../hooks";
5
- export const SearchInput = () => {
6
- const {
7
- vm,
8
- searchItems
9
- } = useScheduler();
10
- return /*#__PURE__*/React.createElement(DelayedOnChange, {
11
- value: vm.searchQuery,
12
- onChange: value => {
13
- if (value === vm.searchQuery) {
14
- return;
15
- }
16
- searchItems(value);
17
- }
18
- }, ({
19
- value,
20
- onChange
21
- }) => /*#__PURE__*/React.createElement(Input, {
22
- id: "scheduler__search-input",
23
- value: value,
24
- onChange: e => onChange(e.target.value),
25
- forwardEventOnChange: true,
26
- placeholder: vm.searchLabel,
27
- "data-testid": "scheduler.search-input",
28
- startIcon: /*#__PURE__*/React.createElement(Icon, {
29
- icon: /*#__PURE__*/React.createElement(SearchIcon, null),
30
- label: "Search"
31
- }),
32
- size: "md",
33
- variant: "ghost"
34
- }));
35
- };
36
-
37
- //# sourceMappingURL=SearchInput.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","ReactComponent","SearchIcon","DelayedOnChange","Icon","Input","useScheduler","SearchInput","vm","searchItems","createElement","value","searchQuery","onChange","id","e","target","forwardEventOnChange","placeholder","searchLabel","startIcon","icon","label","size","variant"],"sources":["SearchInput.tsx"],"sourcesContent":["import React from \"react\";\nimport { ReactComponent as SearchIcon } from \"@webiny/icons/search.svg\";\nimport { DelayedOnChange, Icon, Input } from \"@webiny/admin-ui\";\nimport { useScheduler } from \"~/Presentation/hooks\";\n\nexport const SearchInput = () => {\n const { vm, searchItems } = useScheduler();\n\n return (\n <DelayedOnChange\n value={vm.searchQuery}\n onChange={value => {\n if (value === vm.searchQuery) {\n return;\n }\n searchItems(value);\n }}\n >\n {({ value, onChange }) => (\n <Input\n id={\"scheduler__search-input\"}\n value={value}\n onChange={e => onChange(e.target.value)}\n forwardEventOnChange={true}\n placeholder={vm.searchLabel}\n data-testid={\"scheduler.search-input\"}\n startIcon={<Icon icon={<SearchIcon />} label=\"Search\" />}\n size={\"md\"}\n variant={\"ghost\"}\n />\n )}\n </DelayedOnChange>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,IAAIC,UAAU,QAAQ,0BAA0B;AACvE,SAASC,eAAe,EAAEC,IAAI,EAAEC,KAAK,QAAQ,kBAAkB;AAC/D,SAASC,YAAY;AAErB,OAAO,MAAMC,WAAW,GAAGA,CAAA,KAAM;EAC7B,MAAM;IAAEC,EAAE;IAAEC;EAAY,CAAC,GAAGH,YAAY,CAAC,CAAC;EAE1C,oBACIN,KAAA,CAAAU,aAAA,CAACP,eAAe;IACZQ,KAAK,EAAEH,EAAE,CAACI,WAAY;IACtBC,QAAQ,EAAEF,KAAK,IAAI;MACf,IAAIA,KAAK,KAAKH,EAAE,CAACI,WAAW,EAAE;QAC1B;MACJ;MACAH,WAAW,CAACE,KAAK,CAAC;IACtB;EAAE,GAED,CAAC;IAAEA,KAAK;IAAEE;EAAS,CAAC,kBACjBb,KAAA,CAAAU,aAAA,CAACL,KAAK;IACFS,EAAE,EAAE,yBAA0B;IAC9BH,KAAK,EAAEA,KAAM;IACbE,QAAQ,EAAEE,CAAC,IAAIF,QAAQ,CAACE,CAAC,CAACC,MAAM,CAACL,KAAK,CAAE;IACxCM,oBAAoB,EAAE,IAAK;IAC3BC,WAAW,EAAEV,EAAE,CAACW,WAAY;IAC5B,eAAa,wBAAyB;IACtCC,SAAS,eAAEpB,KAAA,CAAAU,aAAA,CAACN,IAAI;MAACiB,IAAI,eAAErB,KAAA,CAAAU,aAAA,CAACR,UAAU,MAAE,CAAE;MAACoB,KAAK,EAAC;IAAQ,CAAE,CAAE;IACzDC,IAAI,EAAE,IAAK;IACXC,OAAO,EAAE;EAAQ,CACpB,CAEQ,CAAC;AAE1B,CAAC","ignoreList":[]}
@@ -1 +0,0 @@
1
- export * from "./SearchInput";
@@ -1,3 +0,0 @@
1
- export * from "./SearchInput";
2
-
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./SearchInput\";\n"],"mappings":"AAAA","ignoreList":[]}
@@ -1,2 +0,0 @@
1
- import React from "react";
2
- export declare const Table: () => React.JSX.Element;
@@ -1,29 +0,0 @@
1
- import React, { useMemo } from "react";
2
- import { createRecordsData, Table as AcoTable } from "@webiny/app-aco";
3
- import { useScheduler } from "../../hooks";
4
- import { LoadingActions } from "../../../types";
5
- export const Table = () => {
6
- const {
7
- vm,
8
- selectItems,
9
- sortItems
10
- } = useScheduler();
11
- const data = useMemo(() => {
12
- return createRecordsData(vm.items);
13
- }, [vm.items]);
14
- const selected = useMemo(() => {
15
- return createRecordsData(vm.selectedItems);
16
- }, [vm.selectedItems]);
17
- return /*#__PURE__*/React.createElement(AcoTable, {
18
- data: data,
19
- loading: vm.loading[LoadingActions.list],
20
- onSelectRow: entries => selectItems(entries.map(entry => entry.data)),
21
- sorting: vm.sorting,
22
- onSortingChange: sort => sortItems(sort),
23
- selected: selected,
24
- nameColumnId: vm.nameColumnId,
25
- namespace: "scheduler"
26
- });
27
- };
28
-
29
- //# sourceMappingURL=Table.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","useMemo","createRecordsData","Table","AcoTable","useScheduler","LoadingActions","vm","selectItems","sortItems","data","items","selected","selectedItems","createElement","loading","list","onSelectRow","entries","map","entry","sorting","onSortingChange","sort","nameColumnId","namespace"],"sources":["Table.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport { createRecordsData, Table as AcoTable } from \"@webiny/app-aco\";\nimport { useScheduler } from \"~/Presentation/hooks\";\nimport { LoadingActions, type SchedulerEntryTableRow } from \"~/types\";\n\nexport const Table = () => {\n const { vm, selectItems, sortItems } = useScheduler();\n\n const data = useMemo<SchedulerEntryTableRow[]>(() => {\n return createRecordsData(vm.items);\n }, [vm.items]);\n\n const selected = useMemo<SchedulerEntryTableRow[]>(() => {\n return createRecordsData(vm.selectedItems);\n }, [vm.selectedItems]);\n\n return (\n <AcoTable<SchedulerEntryTableRow>\n data={data}\n loading={vm.loading[LoadingActions.list]}\n onSelectRow={entries => selectItems(entries.map(entry => entry.data))}\n sorting={vm.sorting}\n onSortingChange={sort => sortItems(sort)}\n selected={selected}\n nameColumnId={vm.nameColumnId}\n namespace={\"scheduler\"}\n />\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,iBAAiB,EAAEC,KAAK,IAAIC,QAAQ,QAAQ,iBAAiB;AACtE,SAASC,YAAY;AACrB,SAASC,cAAc;AAEvB,OAAO,MAAMH,KAAK,GAAGA,CAAA,KAAM;EACvB,MAAM;IAAEI,EAAE;IAAEC,WAAW;IAAEC;EAAU,CAAC,GAAGJ,YAAY,CAAC,CAAC;EAErD,MAAMK,IAAI,GAAGT,OAAO,CAA2B,MAAM;IACjD,OAAOC,iBAAiB,CAACK,EAAE,CAACI,KAAK,CAAC;EACtC,CAAC,EAAE,CAACJ,EAAE,CAACI,KAAK,CAAC,CAAC;EAEd,MAAMC,QAAQ,GAAGX,OAAO,CAA2B,MAAM;IACrD,OAAOC,iBAAiB,CAACK,EAAE,CAACM,aAAa,CAAC;EAC9C,CAAC,EAAE,CAACN,EAAE,CAACM,aAAa,CAAC,CAAC;EAEtB,oBACIb,KAAA,CAAAc,aAAA,CAACV,QAAQ;IACLM,IAAI,EAAEA,IAAK;IACXK,OAAO,EAAER,EAAE,CAACQ,OAAO,CAACT,cAAc,CAACU,IAAI,CAAE;IACzCC,WAAW,EAAEC,OAAO,IAAIV,WAAW,CAACU,OAAO,CAACC,GAAG,CAACC,KAAK,IAAIA,KAAK,CAACV,IAAI,CAAC,CAAE;IACtEW,OAAO,EAAEd,EAAE,CAACc,OAAQ;IACpBC,eAAe,EAAEC,IAAI,IAAId,SAAS,CAACc,IAAI,CAAE;IACzCX,QAAQ,EAAEA,QAAS;IACnBY,YAAY,EAAEjB,EAAE,CAACiB,YAAa;IAC9BC,SAAS,EAAE;EAAY,CAC1B,CAAC;AAEV,CAAC","ignoreList":[]}
@@ -1 +0,0 @@
1
- export * from "./Table";
@@ -1,3 +0,0 @@
1
- export * from "./Table";
2
-
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Table\";\n"],"mappings":"AAAA","ignoreList":[]}
@@ -1,5 +0,0 @@
1
- import React from "react";
2
- export interface TitleProps {
3
- title?: string;
4
- }
5
- export declare const Title: ({ title }: TitleProps) => React.JSX.Element;
@@ -1,15 +0,0 @@
1
- import React from "react";
2
- import { Skeleton } from "@webiny/ui/Skeleton";
3
- import { Name } from "./Title.styled";
4
- export const Title = ({
5
- title
6
- }) => {
7
- return /*#__PURE__*/React.createElement(Name, {
8
- use: "headline6",
9
- tag: "h1"
10
- }, title || /*#__PURE__*/React.createElement(Skeleton, {
11
- theme: "dark"
12
- }));
13
- };
14
-
15
- //# sourceMappingURL=Title.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","Skeleton","Name","Title","title","createElement","use","tag","theme"],"sources":["Title.tsx"],"sourcesContent":["import React from \"react\";\nimport { Skeleton } from \"@webiny/ui/Skeleton\";\nimport { Name } from \"./Title.styled\";\n\nexport interface TitleProps {\n title?: string;\n}\n\nexport const Title = ({ title }: TitleProps) => {\n return (\n <Name use={\"headline6\"} tag={\"h1\"}>\n {title || <Skeleton theme={\"dark\"} />}\n </Name>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,qBAAqB;AAC9C,SAASC,IAAI;AAMb,OAAO,MAAMC,KAAK,GAAGA,CAAC;EAAEC;AAAkB,CAAC,KAAK;EAC5C,oBACIJ,KAAA,CAAAK,aAAA,CAACH,IAAI;IAACI,GAAG,EAAE,WAAY;IAACC,GAAG,EAAE;EAAK,GAC7BH,KAAK,iBAAIJ,KAAA,CAAAK,aAAA,CAACJ,QAAQ;IAACO,KAAK,EAAE;EAAO,CAAE,CAClC,CAAC;AAEf,CAAC","ignoreList":[]}
@@ -1,4 +0,0 @@
1
- import type { TypographyProps } from "@webiny/ui/Typography";
2
- export declare const Name: import("@emotion/styled").StyledComponent<TypographyProps & {
3
- theme?: import("@emotion/react").Theme | undefined;
4
- }, {}, {}>;
@@ -1,19 +0,0 @@
1
- import _styled from "@emotion/styled/base";
2
- function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
3
- import { Typography } from "@webiny/ui/Typography";
4
- export const Name = /*#__PURE__*/_styled(Typography, process.env.NODE_ENV === "production" ? {
5
- target: "epwctpg0"
6
- } : {
7
- target: "epwctpg0",
8
- label: "Name"
9
- })(process.env.NODE_ENV === "production" ? {
10
- name: "jtvt2b",
11
- styles: "color:var(--mdc-theme-text-primary-on-background);padding-left:8px;line-height:48px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis"
12
- } : {
13
- name: "jtvt2b",
14
- styles: "color:var(--mdc-theme-text-primary-on-background);padding-left:8px;line-height:48px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis",
15
- map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlRpdGxlLnN0eWxlZC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBSXVEIiwiZmlsZSI6IlRpdGxlLnN0eWxlZC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gXCJAZW1vdGlvbi9zdHlsZWRcIjtcbmltcG9ydCB0eXBlIHsgVHlwb2dyYXBoeVByb3BzIH0gZnJvbSBcIkB3ZWJpbnkvdWkvVHlwb2dyYXBoeVwiO1xuaW1wb3J0IHsgVHlwb2dyYXBoeSB9IGZyb20gXCJAd2ViaW55L3VpL1R5cG9ncmFwaHlcIjtcblxuZXhwb3J0IGNvbnN0IE5hbWUgPSBzdHlsZWQoVHlwb2dyYXBoeSk8VHlwb2dyYXBoeVByb3BzPmBcbiAgICBjb2xvcjogdmFyKC0tbWRjLXRoZW1lLXRleHQtcHJpbWFyeS1vbi1iYWNrZ3JvdW5kKTtcbiAgICBwYWRkaW5nLWxlZnQ6IDhweDtcbiAgICBsaW5lLWhlaWdodDogNDhweDtcbiAgICB3aGl0ZS1zcGFjZTogbm93cmFwO1xuICAgIG92ZXJmbG93OiBoaWRkZW47XG4gICAgdGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG5gO1xuIl19 */",
16
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
17
- });
18
-
19
- //# sourceMappingURL=Title.styled.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["Typography","Name","_styled","process","env","NODE_ENV","target","label","name","styles","map","toString","_EMOTION_STRINGIFIED_CSS_ERROR__"],"sources":["Title.styled.tsx"],"sourcesContent":["import styled from \"@emotion/styled\";\nimport type { TypographyProps } from \"@webiny/ui/Typography\";\nimport { Typography } from \"@webiny/ui/Typography\";\n\nexport const Name = styled(Typography)<TypographyProps>`\n color: var(--mdc-theme-text-primary-on-background);\n padding-left: 8px;\n line-height: 48px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n`;\n"],"mappings":";;AAEA,SAASA,UAAU,QAAQ,uBAAuB;AAElD,OAAO,MAAMC,IAAI,gBAAGC,OAAA,CAAOF,UAAU,EAAAG,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,EAAC,CAAAJ,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAG,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,GAAA;EAAAC,QAAA,EAAAC;AAAA,EAOrC","ignoreList":[]}
@@ -1 +0,0 @@
1
- export * from "./Title";
@@ -1,3 +0,0 @@
1
- export * from "./Title";
2
-
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["index.tsx"],"sourcesContent":["export * from \"./Title\";\n"],"mappings":"AAAA","ignoreList":[]}
@@ -1 +0,0 @@
1
- export * from "./list";
@@ -1,3 +0,0 @@
1
- export * from "./list";
2
-
3
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./list\";\n"],"mappings":"AAAA","ignoreList":[]}
@@ -1,7 +0,0 @@
1
- import React from "react";
2
- import { AcoConfig, type RecordActionConfig } from "@webiny/app-aco";
3
- export type { RecordActionConfig as EntryActionConfig };
4
- type EntryActionProps = React.ComponentProps<typeof AcoConfig.Record.Action>;
5
- export declare const EntryAction: ((props: EntryActionProps) => React.JSX.Element) & {
6
- OptionsMenuItem: (props: import("@webiny/app-admin").OptionsMenuItemProps) => React.JSX.Element;
7
- };
@@ -1,16 +0,0 @@
1
- import React from "react";
2
- import { CompositionScope } from "@webiny/react-composition";
3
- import { AcoConfig } from "@webiny/app-aco";
4
- const {
5
- Record
6
- } = AcoConfig;
7
- const BaseEntryAction = props => {
8
- return /*#__PURE__*/React.createElement(CompositionScope, {
9
- name: "scheduler"
10
- }, /*#__PURE__*/React.createElement(AcoConfig, null, /*#__PURE__*/React.createElement(Record.Action, props)));
11
- };
12
- export const EntryAction = Object.assign(BaseEntryAction, {
13
- OptionsMenuItem: Record.Action.OptionsMenuItem
14
- });
15
-
16
- //# sourceMappingURL=EntryAction.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","CompositionScope","AcoConfig","Record","BaseEntryAction","props","createElement","name","Action","EntryAction","Object","assign","OptionsMenuItem"],"sources":["EntryAction.tsx"],"sourcesContent":["import React from \"react\";\nimport { CompositionScope } from \"@webiny/react-composition\";\nimport { AcoConfig, type RecordActionConfig } from \"@webiny/app-aco\";\n\nconst { Record } = AcoConfig;\n\nexport type { RecordActionConfig as EntryActionConfig };\n\ntype EntryActionProps = React.ComponentProps<typeof AcoConfig.Record.Action>;\n\nconst BaseEntryAction = (props: EntryActionProps) => {\n return (\n <CompositionScope name={\"scheduler\"}>\n <AcoConfig>\n <Record.Action {...props} />\n </AcoConfig>\n </CompositionScope>\n );\n};\n\nexport const EntryAction = Object.assign(BaseEntryAction, {\n OptionsMenuItem: Record.Action.OptionsMenuItem\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,gBAAgB,QAAQ,2BAA2B;AAC5D,SAASC,SAAS,QAAiC,iBAAiB;AAEpE,MAAM;EAAEC;AAAO,CAAC,GAAGD,SAAS;AAM5B,MAAME,eAAe,GAAIC,KAAuB,IAAK;EACjD,oBACIL,KAAA,CAAAM,aAAA,CAACL,gBAAgB;IAACM,IAAI,EAAE;EAAY,gBAChCP,KAAA,CAAAM,aAAA,CAACJ,SAAS,qBACNF,KAAA,CAAAM,aAAA,CAACH,MAAM,CAACK,MAAM,EAAKH,KAAQ,CACpB,CACG,CAAC;AAE3B,CAAC;AAED,OAAO,MAAMI,WAAW,GAAGC,MAAM,CAACC,MAAM,CAACP,eAAe,EAAE;EACtDQ,eAAe,EAAET,MAAM,CAACK,MAAM,CAACI;AACnC,CAAC,CAAC","ignoreList":[]}
@@ -1,14 +0,0 @@
1
- import React from "react";
2
- import { AcoConfig, type TableColumnConfig as ColumnConfig } from "@webiny/app-aco";
3
- import type { SchedulerEntryTableRow } from "../../../../../types";
4
- export type { ColumnConfig };
5
- type ColumnProps = React.ComponentProps<typeof AcoConfig.Table.Column>;
6
- export declare const Column: ((props: ColumnProps) => React.JSX.Element) & {
7
- useTableRow: {
8
- (): import("@webiny/app-aco").TableRowContextData<SchedulerEntryTableRow>;
9
- <TUserRow>(): import("@webiny/app-aco").TableRowContextData<SchedulerEntryTableRow & {
10
- data: TUserRow;
11
- }>;
12
- };
13
- isFolderRow: (row: import("@webiny/app-aco").TableRow<unknown>) => row is import("@webiny/app-aco").FolderTableRow;
14
- };
@@ -1,14 +0,0 @@
1
- import React from "react";
2
- import { AcoConfig } from "@webiny/app-aco";
3
- const {
4
- Table
5
- } = AcoConfig;
6
- const BaseColumn = props => {
7
- return /*#__PURE__*/React.createElement(AcoConfig, null, /*#__PURE__*/React.createElement(Table.Column, props));
8
- };
9
- export const Column = Object.assign(BaseColumn, {
10
- useTableRow: Table.Column.createUseTableRow(),
11
- isFolderRow: Table.Column.isFolderRow
12
- });
13
-
14
- //# sourceMappingURL=Column.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","AcoConfig","Table","BaseColumn","props","createElement","Column","Object","assign","useTableRow","createUseTableRow","isFolderRow"],"sources":["Column.tsx"],"sourcesContent":["import React from \"react\";\nimport { AcoConfig, type TableColumnConfig as ColumnConfig } from \"@webiny/app-aco\";\nimport type { SchedulerEntryTableRow } from \"~/types\";\n\nconst { Table } = AcoConfig;\n\nexport type { ColumnConfig };\n\ntype ColumnProps = React.ComponentProps<typeof AcoConfig.Table.Column>;\n\nconst BaseColumn = (props: ColumnProps) => {\n return (\n <AcoConfig>\n <Table.Column {...props} />\n </AcoConfig>\n );\n};\n\nexport const Column = Object.assign(BaseColumn, {\n useTableRow: Table.Column.createUseTableRow<SchedulerEntryTableRow>(),\n isFolderRow: Table.Column.isFolderRow\n});\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,QAAgD,iBAAiB;AAGnF,MAAM;EAAEC;AAAM,CAAC,GAAGD,SAAS;AAM3B,MAAME,UAAU,GAAIC,KAAkB,IAAK;EACvC,oBACIJ,KAAA,CAAAK,aAAA,CAACJ,SAAS,qBACND,KAAA,CAAAK,aAAA,CAACH,KAAK,CAACI,MAAM,EAAKF,KAAQ,CACnB,CAAC;AAEpB,CAAC;AAED,OAAO,MAAME,MAAM,GAAGC,MAAM,CAACC,MAAM,CAACL,UAAU,EAAE;EAC5CM,WAAW,EAAEP,KAAK,CAACI,MAAM,CAACI,iBAAiB,CAAyB,CAAC;EACrEC,WAAW,EAAET,KAAK,CAACI,MAAM,CAACK;AAC9B,CAAC,CAAC","ignoreList":[]}
@@ -1,5 +0,0 @@
1
- import React from "react";
2
- import { AcoConfig, type TableSortingConfig as SortingConfig } from "@webiny/app-aco";
3
- export type { SortingConfig };
4
- type SortingProps = React.ComponentProps<typeof AcoConfig.Table.Sorting>;
5
- export declare const Sorting: (props: SortingProps) => React.JSX.Element;
@@ -1,10 +0,0 @@
1
- import React from "react";
2
- import { AcoConfig } from "@webiny/app-aco";
3
- const {
4
- Table
5
- } = AcoConfig;
6
- export const Sorting = props => {
7
- return /*#__PURE__*/React.createElement(AcoConfig, null, /*#__PURE__*/React.createElement(Table.Sorting, props));
8
- };
9
-
10
- //# sourceMappingURL=Sorting.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["React","AcoConfig","Table","Sorting","props","createElement"],"sources":["Sorting.tsx"],"sourcesContent":["import React from \"react\";\nimport { AcoConfig, type TableSortingConfig as SortingConfig } from \"@webiny/app-aco\";\n\nconst { Table } = AcoConfig;\n\nexport type { SortingConfig };\n\ntype SortingProps = React.ComponentProps<typeof AcoConfig.Table.Sorting>;\n\nexport const Sorting = (props: SortingProps) => {\n return (\n <AcoConfig>\n <Table.Sorting {...props} />\n </AcoConfig>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,QAAkD,iBAAiB;AAErF,MAAM;EAAEC;AAAM,CAAC,GAAGD,SAAS;AAM3B,OAAO,MAAME,OAAO,GAAIC,KAAmB,IAAK;EAC5C,oBACIJ,KAAA,CAAAK,aAAA,CAACJ,SAAS,qBACND,KAAA,CAAAK,aAAA,CAACH,KAAK,CAACC,OAAO,EAAKC,KAAQ,CACpB,CAAC;AAEpB,CAAC","ignoreList":[]}
@@ -1,19 +0,0 @@
1
- /// <reference types="react" />
2
- import type { ColumnConfig } from "./Column";
3
- import type { SortingConfig } from "./Sorting";
4
- export interface TableConfig {
5
- columns: ColumnConfig[];
6
- sorting: SortingConfig[];
7
- }
8
- export declare const Table: {
9
- Column: ((props: import("@webiny/app-aco/config/table/Column").ColumnProps) => import("react").JSX.Element) & {
10
- useTableRow: {
11
- (): import("@webiny/app-aco").TableRowContextData<import("../../../../../types").SchedulerEntryTableRow>;
12
- <TUserRow>(): import("@webiny/app-aco").TableRowContextData<import("../../../../../types").SchedulerEntryTableRow & {
13
- data: TUserRow;
14
- }>;
15
- };
16
- isFolderRow: (row: import("@webiny/app-aco").TableRow<unknown>) => row is import("@webiny/app-aco").FolderTableRow;
17
- };
18
- Sorting: (props: import("@webiny/app-aco/config/table/Sorting").SortingProps) => import("react").JSX.Element;
19
- };
@@ -1,8 +0,0 @@
1
- import { Column } from "./Column";
2
- import { Sorting } from "./Sorting";
3
- export const Table = {
4
- Column,
5
- Sorting
6
- };
7
-
8
- //# sourceMappingURL=index.js.map