@webiny/app-headless-cms-scheduler 6.0.0-alpha.4 → 6.0.0-rc.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 (338) hide show
  1. package/Domain/Models/SchedulerItem/SchedulerItem.d.ts +2 -2
  2. package/Domain/Models/SchedulerItem/SchedulerItem.js.map +1 -1
  3. package/Domain/Models/SchedulerItem/index.d.ts +1 -1
  4. package/Domain/Models/SchedulerItem/index.js +1 -1
  5. package/Domain/Models/SchedulerItem/index.js.map +1 -1
  6. package/Domain/Models/index.d.ts +1 -1
  7. package/Domain/Models/index.js +1 -1
  8. package/Domain/Models/index.js.map +1 -1
  9. package/Domain/Repositories/SchedulerItems/ISchedulerItemsRepository.d.ts +1 -1
  10. package/Domain/Repositories/SchedulerItems/ISchedulerItemsRepository.js.map +1 -1
  11. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.d.ts +4 -4
  12. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.js +1 -1
  13. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepository.js.map +1 -1
  14. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.d.ts +3 -3
  15. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.js +1 -1
  16. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryFactory.js.map +1 -1
  17. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.d.ts +2 -2
  18. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.js +1 -1
  19. package/Domain/Repositories/SchedulerItems/SchedulerItemsRepositoryWithLoading.js.map +1 -1
  20. package/Domain/Repositories/SchedulerItems/index.d.ts +4 -4
  21. package/Domain/Repositories/SchedulerItems/index.js +3 -4
  22. package/Domain/Repositories/SchedulerItems/index.js.map +1 -1
  23. package/Domain/Repositories/Search/SearchRepository.d.ts +1 -1
  24. package/Domain/Repositories/Search/SearchRepository.js.map +1 -1
  25. package/Domain/Repositories/Search/SearchRepositoryFactory.d.ts +1 -1
  26. package/Domain/Repositories/Search/SearchRepositoryFactory.js +1 -1
  27. package/Domain/Repositories/Search/SearchRepositoryFactory.js.map +1 -1
  28. package/Domain/Repositories/Search/index.d.ts +3 -3
  29. package/Domain/Repositories/Search/index.js +2 -3
  30. package/Domain/Repositories/Search/index.js.map +1 -1
  31. package/Domain/Repositories/SelectedItems/ISelectedItemsRepository.d.ts +1 -1
  32. package/Domain/Repositories/SelectedItems/ISelectedItemsRepository.js.map +1 -1
  33. package/Domain/Repositories/SelectedItems/SelectedItemsRepository.d.ts +2 -2
  34. package/Domain/Repositories/SelectedItems/SelectedItemsRepository.js.map +1 -1
  35. package/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.d.ts +1 -1
  36. package/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.js +1 -1
  37. package/Domain/Repositories/SelectedItems/SelectedItemsRepositoryFactory.js.map +1 -1
  38. package/Domain/Repositories/SelectedItems/index.d.ts +3 -3
  39. package/Domain/Repositories/SelectedItems/index.js +2 -3
  40. package/Domain/Repositories/SelectedItems/index.js.map +1 -1
  41. package/Domain/Repositories/Sorting/index.d.ts +1 -1
  42. package/Domain/Repositories/Sorting/index.js +1 -1
  43. package/Domain/Repositories/Sorting/index.js.map +1 -1
  44. package/Domain/Repositories/index.d.ts +4 -4
  45. package/Domain/Repositories/index.js +4 -4
  46. package/Domain/Repositories/index.js.map +1 -1
  47. package/Domain/index.d.ts +2 -2
  48. package/Domain/index.js +2 -2
  49. package/Domain/index.js.map +1 -1
  50. package/Gateways/SchedulerListGateway.d.ts +4 -5
  51. package/Gateways/SchedulerListGateway.js.map +1 -1
  52. package/Gateways/index.d.ts +5 -5
  53. package/Gateways/index.js +1 -5
  54. package/Gateways/index.js.map +1 -1
  55. package/Presentation/Scheduler/Scheduler.d.ts +1 -1
  56. package/Presentation/Scheduler/Scheduler.js +5 -5
  57. package/Presentation/Scheduler/Scheduler.js.map +1 -1
  58. package/Presentation/Scheduler/SchedulerControllers.d.ts +2 -2
  59. package/Presentation/Scheduler/SchedulerControllers.js +2 -2
  60. package/Presentation/Scheduler/SchedulerControllers.js.map +1 -1
  61. package/Presentation/Scheduler/SchedulerPresenter.d.ts +1 -1
  62. package/Presentation/Scheduler/SchedulerPresenter.js +1 -1
  63. package/Presentation/Scheduler/SchedulerPresenter.js.map +1 -1
  64. package/Presentation/Scheduler/controllers/CancelItem/CancelItemController.d.ts +2 -2
  65. package/Presentation/Scheduler/controllers/CancelItem/CancelItemController.js.map +1 -1
  66. package/Presentation/Scheduler/controllers/CancelItem/index.d.ts +1 -1
  67. package/Presentation/Scheduler/controllers/CancelItem/index.js +0 -1
  68. package/Presentation/Scheduler/controllers/CancelItem/index.js.map +1 -1
  69. package/Presentation/Scheduler/controllers/GetItem/GetItemController.d.ts +2 -2
  70. package/Presentation/Scheduler/controllers/GetItem/GetItemController.js.map +1 -1
  71. package/Presentation/Scheduler/controllers/GetItem/index.d.ts +2 -2
  72. package/Presentation/Scheduler/controllers/GetItem/index.js +1 -2
  73. package/Presentation/Scheduler/controllers/GetItem/index.js.map +1 -1
  74. package/Presentation/Scheduler/controllers/ListItems/ListItemsController.d.ts +2 -2
  75. package/Presentation/Scheduler/controllers/ListItems/ListItemsController.js.map +1 -1
  76. package/Presentation/Scheduler/controllers/ListItems/index.d.ts +2 -2
  77. package/Presentation/Scheduler/controllers/ListItems/index.js +1 -2
  78. package/Presentation/Scheduler/controllers/ListItems/index.js.map +1 -1
  79. package/Presentation/Scheduler/controllers/ListMoreItems/ListMoreItemsController.d.ts +2 -2
  80. package/Presentation/Scheduler/controllers/ListMoreItems/ListMoreItemsController.js.map +1 -1
  81. package/Presentation/Scheduler/controllers/ListMoreItems/index.d.ts +2 -2
  82. package/Presentation/Scheduler/controllers/ListMoreItems/index.js +1 -2
  83. package/Presentation/Scheduler/controllers/ListMoreItems/index.js.map +1 -1
  84. package/Presentation/Scheduler/controllers/PublishItem/PublishItemController.d.ts +2 -2
  85. package/Presentation/Scheduler/controllers/PublishItem/PublishItemController.js.map +1 -1
  86. package/Presentation/Scheduler/controllers/PublishItem/index.d.ts +1 -1
  87. package/Presentation/Scheduler/controllers/PublishItem/index.js +0 -1
  88. package/Presentation/Scheduler/controllers/PublishItem/index.js.map +1 -1
  89. package/Presentation/Scheduler/controllers/SearchItems/SearchItemsController.d.ts +2 -2
  90. package/Presentation/Scheduler/controllers/SearchItems/SearchItemsController.js.map +1 -1
  91. package/Presentation/Scheduler/controllers/SearchItems/index.d.ts +2 -2
  92. package/Presentation/Scheduler/controllers/SearchItems/index.js +1 -2
  93. package/Presentation/Scheduler/controllers/SearchItems/index.js.map +1 -1
  94. package/Presentation/Scheduler/controllers/SelectAllItems/SelectAllItemsController.d.ts +2 -2
  95. package/Presentation/Scheduler/controllers/SelectAllItems/SelectAllItemsController.js.map +1 -1
  96. package/Presentation/Scheduler/controllers/SelectAllItems/index.d.ts +2 -2
  97. package/Presentation/Scheduler/controllers/SelectAllItems/index.js +1 -2
  98. package/Presentation/Scheduler/controllers/SelectAllItems/index.js.map +1 -1
  99. package/Presentation/Scheduler/controllers/SelectItems/SelectItemsController.d.ts +2 -2
  100. package/Presentation/Scheduler/controllers/SelectItems/SelectItemsController.js +1 -1
  101. package/Presentation/Scheduler/controllers/SelectItems/SelectItemsController.js.map +1 -1
  102. package/Presentation/Scheduler/controllers/SelectItems/index.d.ts +2 -2
  103. package/Presentation/Scheduler/controllers/SelectItems/index.js +1 -2
  104. package/Presentation/Scheduler/controllers/SelectItems/index.js.map +1 -1
  105. package/Presentation/Scheduler/controllers/SortItems/ISortItemsController.d.ts +1 -1
  106. package/Presentation/Scheduler/controllers/SortItems/ISortItemsController.js.map +1 -1
  107. package/Presentation/Scheduler/controllers/SortItems/SortItemsController.d.ts +3 -3
  108. package/Presentation/Scheduler/controllers/SortItems/SortItemsController.js.map +1 -1
  109. package/Presentation/Scheduler/controllers/SortItems/index.d.ts +2 -2
  110. package/Presentation/Scheduler/controllers/SortItems/index.js +1 -2
  111. package/Presentation/Scheduler/controllers/SortItems/index.js.map +1 -1
  112. package/Presentation/Scheduler/controllers/UnpublishItem/UnpublishItemController.d.ts +2 -2
  113. package/Presentation/Scheduler/controllers/UnpublishItem/UnpublishItemController.js.map +1 -1
  114. package/Presentation/Scheduler/controllers/UnpublishItem/index.d.ts +1 -1
  115. package/Presentation/Scheduler/controllers/UnpublishItem/index.js +0 -1
  116. package/Presentation/Scheduler/controllers/UnpublishItem/index.js.map +1 -1
  117. package/Presentation/Scheduler/controllers/UnselectAllItems/UnselectAllItemsController.d.ts +2 -2
  118. package/Presentation/Scheduler/controllers/UnselectAllItems/UnselectAllItemsController.js.map +1 -1
  119. package/Presentation/Scheduler/controllers/UnselectAllItems/index.d.ts +2 -2
  120. package/Presentation/Scheduler/controllers/UnselectAllItems/index.js +1 -2
  121. package/Presentation/Scheduler/controllers/UnselectAllItems/index.js.map +1 -1
  122. package/Presentation/Scheduler/controllers/index.d.ts +11 -11
  123. package/Presentation/Scheduler/controllers/index.js +11 -11
  124. package/Presentation/Scheduler/controllers/index.js.map +1 -1
  125. package/Presentation/SchedulerConfigs/SchedulerConfigs.js +7 -7
  126. package/Presentation/SchedulerConfigs/SchedulerConfigs.js.map +1 -1
  127. package/Presentation/SchedulerConfigs/index.d.ts +1 -1
  128. package/Presentation/SchedulerConfigs/index.js +1 -1
  129. package/Presentation/SchedulerConfigs/index.js.map +1 -1
  130. package/Presentation/SchedulerRenderer/SchedulerRenderer.d.ts +1 -1
  131. package/Presentation/SchedulerRenderer/SchedulerRenderer.js +6 -6
  132. package/Presentation/SchedulerRenderer/SchedulerRenderer.js.map +1 -1
  133. package/Presentation/SchedulerRenderer/index.d.ts +1 -1
  134. package/Presentation/SchedulerRenderer/index.js +1 -1
  135. package/Presentation/SchedulerRenderer/index.js.map +1 -1
  136. package/Presentation/abstractions/ISchedulerControllers.d.ts +1 -1
  137. package/Presentation/abstractions/ISchedulerControllers.js.map +1 -1
  138. package/Presentation/abstractions/ISchedulerPresenter.d.ts +1 -1
  139. package/Presentation/abstractions/ISchedulerPresenter.js.map +1 -1
  140. package/Presentation/abstractions/index.d.ts +2 -2
  141. package/Presentation/abstractions/index.js +1 -2
  142. package/Presentation/abstractions/index.js.map +1 -1
  143. package/Presentation/components/Actions/CancelItem/CancelItem.js +2 -2
  144. package/Presentation/components/Actions/CancelItem/CancelItem.js.map +1 -1
  145. package/Presentation/components/Actions/CancelItem/index.d.ts +1 -1
  146. package/Presentation/components/Actions/CancelItem/index.js +1 -1
  147. package/Presentation/components/Actions/CancelItem/index.js.map +1 -1
  148. package/Presentation/components/Actions/index.d.ts +1 -1
  149. package/Presentation/components/Actions/index.js +1 -1
  150. package/Presentation/components/Actions/index.js.map +1 -1
  151. package/Presentation/components/BottomInfoBar/BottomInfoBar.js +5 -5
  152. package/Presentation/components/BottomInfoBar/BottomInfoBar.js.map +1 -1
  153. package/Presentation/components/BottomInfoBar/BottomInfoBar.styled.d.ts +10 -11
  154. package/Presentation/components/BottomInfoBar/BottomInfoBar.styled.js +5 -10
  155. package/Presentation/components/BottomInfoBar/BottomInfoBar.styled.js.map +1 -1
  156. package/Presentation/components/BottomInfoBar/ListStatus.js +2 -2
  157. package/Presentation/components/BottomInfoBar/ListStatus.js.map +1 -1
  158. package/Presentation/components/BottomInfoBar/index.d.ts +1 -1
  159. package/Presentation/components/BottomInfoBar/index.js +1 -1
  160. package/Presentation/components/BottomInfoBar/index.js.map +1 -1
  161. package/Presentation/components/Cells/CellActions/CellActions.js +5 -6
  162. package/Presentation/components/Cells/CellActions/CellActions.js.map +1 -1
  163. package/Presentation/components/Cells/CellActions/index.d.ts +1 -1
  164. package/Presentation/components/Cells/CellActions/index.js +1 -1
  165. package/Presentation/components/Cells/CellActions/index.js.map +1 -1
  166. package/Presentation/components/Cells/CellRevision/CellRevision.js +3 -3
  167. package/Presentation/components/Cells/CellRevision/CellRevision.js.map +1 -1
  168. package/Presentation/components/Cells/CellRevision/CellRevision.styled.d.ts +5 -6
  169. package/Presentation/components/Cells/CellRevision/CellRevision.styled.js +4 -7
  170. package/Presentation/components/Cells/CellRevision/CellRevision.styled.js.map +1 -1
  171. package/Presentation/components/Cells/CellScheduledBy/CellScheduledBy.js +1 -1
  172. package/Presentation/components/Cells/CellScheduledBy/CellScheduledBy.js.map +1 -1
  173. package/Presentation/components/Cells/CellScheduledBy/index.d.ts +1 -1
  174. package/Presentation/components/Cells/CellScheduledBy/index.js +1 -1
  175. package/Presentation/components/Cells/CellScheduledBy/index.js.map +1 -1
  176. package/Presentation/components/Cells/CellScheduledOn/CellScheduledOn.d.ts +22 -0
  177. package/Presentation/components/Cells/CellScheduledOn/CellScheduledOn.js +12 -8
  178. package/Presentation/components/Cells/CellScheduledOn/CellScheduledOn.js.map +1 -1
  179. package/Presentation/components/Cells/CellTitle/CellTitle.js +2 -2
  180. package/Presentation/components/Cells/CellTitle/CellTitle.js.map +1 -1
  181. package/Presentation/components/Cells/CellTitle/CellTitle.styled.d.ts +5 -6
  182. package/Presentation/components/Cells/CellTitle/CellTitle.styled.js +4 -7
  183. package/Presentation/components/Cells/CellTitle/CellTitle.styled.js.map +1 -1
  184. package/Presentation/components/Cells/CellTitle/index.d.ts +1 -1
  185. package/Presentation/components/Cells/CellTitle/index.js +1 -1
  186. package/Presentation/components/Cells/CellTitle/index.js.map +1 -1
  187. package/Presentation/components/Cells/CellType/CellType.js +5 -4
  188. package/Presentation/components/Cells/CellType/CellType.js.map +1 -1
  189. package/Presentation/components/Cells/CellType/CellType.styled.d.ts +5 -6
  190. package/Presentation/components/Cells/CellType/CellType.styled.js +4 -7
  191. package/Presentation/components/Cells/CellType/CellType.styled.js.map +1 -1
  192. package/Presentation/components/Cells/index.d.ts +6 -6
  193. package/Presentation/components/Cells/index.js +6 -6
  194. package/Presentation/components/Cells/index.js.map +1 -1
  195. package/Presentation/components/Empty/Empty.js +3 -3
  196. package/Presentation/components/Empty/Empty.js.map +1 -1
  197. package/Presentation/components/Empty/Empty.styled.d.ts +4 -5
  198. package/Presentation/components/Empty/Empty.styled.js +2 -4
  199. package/Presentation/components/Empty/Empty.styled.js.map +1 -1
  200. package/Presentation/components/Empty/index.d.ts +1 -1
  201. package/Presentation/components/Empty/index.js +1 -1
  202. package/Presentation/components/Empty/index.js.map +1 -1
  203. package/Presentation/components/ScheduleDialog/types.d.ts +1 -1
  204. package/Presentation/components/ScheduleDialog/types.js.map +1 -1
  205. package/Presentation/components/ScheduleDialog/useScheduleDialog.d.ts +27 -3
  206. package/Presentation/components/ScheduleDialog/useScheduleDialog.js +38 -19
  207. package/Presentation/components/ScheduleDialog/useScheduleDialog.js.map +1 -1
  208. package/Presentation/components/SchedulerOverlay/SchedulerOverlay.js +8 -8
  209. package/Presentation/components/SchedulerOverlay/SchedulerOverlay.js.map +1 -1
  210. package/Presentation/components/SearchInput/SearchInput.js +1 -1
  211. package/Presentation/components/SearchInput/SearchInput.js.map +1 -1
  212. package/Presentation/components/SearchInput/index.d.ts +1 -1
  213. package/Presentation/components/SearchInput/index.js +1 -1
  214. package/Presentation/components/SearchInput/index.js.map +1 -1
  215. package/Presentation/components/Table/Table.js +8 -3
  216. package/Presentation/components/Table/Table.js.map +1 -1
  217. package/Presentation/components/Table/index.d.ts +1 -1
  218. package/Presentation/components/Table/index.js +1 -1
  219. package/Presentation/components/Table/index.js.map +1 -1
  220. package/Presentation/components/Title/Title.js +2 -2
  221. package/Presentation/components/Title/Title.js.map +1 -1
  222. package/Presentation/components/Title/Title.styled.d.ts +2 -2
  223. package/Presentation/components/Title/Title.styled.js +2 -3
  224. package/Presentation/components/Title/Title.styled.js.map +1 -1
  225. package/Presentation/components/Title/index.d.ts +1 -1
  226. package/Presentation/components/Title/index.js +1 -1
  227. package/Presentation/components/Title/index.js.map +1 -1
  228. package/Presentation/configs/index.d.ts +1 -1
  229. package/Presentation/configs/index.js +1 -1
  230. package/Presentation/configs/index.js.map +1 -1
  231. package/Presentation/configs/list/Browser/EntryAction.d.ts +1 -1
  232. package/Presentation/configs/list/Browser/EntryAction.js +1 -1
  233. package/Presentation/configs/list/Browser/EntryAction.js.map +1 -1
  234. package/Presentation/configs/list/Browser/Table/Column.d.ts +2 -2
  235. package/Presentation/configs/list/Browser/Table/Column.js +1 -1
  236. package/Presentation/configs/list/Browser/Table/Column.js.map +1 -1
  237. package/Presentation/configs/list/Browser/Table/Sorting.js +1 -1
  238. package/Presentation/configs/list/Browser/Table/Sorting.js.map +1 -1
  239. package/Presentation/configs/list/Browser/Table/index.d.ts +7 -8
  240. package/Presentation/configs/list/Browser/Table/index.js +2 -2
  241. package/Presentation/configs/list/Browser/Table/index.js.map +1 -1
  242. package/Presentation/configs/list/Browser/index.d.ts +9 -10
  243. package/Presentation/configs/list/Browser/index.js +2 -2
  244. package/Presentation/configs/list/Browser/index.js.map +1 -1
  245. package/Presentation/configs/list/SchedulerListConfig.d.ts +9 -9
  246. package/Presentation/configs/list/SchedulerListConfig.js +5 -3
  247. package/Presentation/configs/list/SchedulerListConfig.js.map +1 -1
  248. package/Presentation/configs/list/index.d.ts +1 -1
  249. package/Presentation/configs/list/index.js +1 -1
  250. package/Presentation/configs/list/index.js.map +1 -1
  251. package/Presentation/hooks/useCancelSchedulerItem.d.ts +1 -1
  252. package/Presentation/hooks/useCancelSchedulerItem.js +1 -1
  253. package/Presentation/hooks/useCancelSchedulerItem.js.map +1 -1
  254. package/Presentation/hooks/useScheduler.d.ts +6 -7
  255. package/Presentation/hooks/useScheduler.js.map +1 -1
  256. package/Presentation/hooks/useSchedulerItem.d.ts +3 -4
  257. package/Presentation/hooks/useSchedulerItem.js.map +1 -1
  258. package/Presentation/index.d.ts +5 -1
  259. package/Presentation/index.js +9 -5
  260. package/Presentation/index.js.map +1 -1
  261. package/README.md +6 -17
  262. package/UseCases/CancelItem/CancelItemUseCase.d.ts +2 -2
  263. package/UseCases/CancelItem/CancelItemUseCase.js.map +1 -1
  264. package/UseCases/CancelItem/index.d.ts +1 -1
  265. package/UseCases/CancelItem/index.js +0 -1
  266. package/UseCases/CancelItem/index.js.map +1 -1
  267. package/UseCases/GetItem/GetItemUseCase.d.ts +2 -2
  268. package/UseCases/GetItem/GetItemUseCase.js.map +1 -1
  269. package/UseCases/GetItem/index.d.ts +2 -2
  270. package/UseCases/GetItem/index.js +1 -2
  271. package/UseCases/GetItem/index.js.map +1 -1
  272. package/UseCases/GetScheduledItem/GetScheduledItemUseCase.d.ts +2 -2
  273. package/UseCases/GetScheduledItem/GetScheduledItemUseCase.js.map +1 -1
  274. package/UseCases/GetScheduledItem/IGetScheduledItemUseCase.d.ts +1 -1
  275. package/UseCases/GetScheduledItem/IGetScheduledItemUseCase.js.map +1 -1
  276. package/UseCases/GetScheduledItem/index.d.ts +1 -1
  277. package/UseCases/GetScheduledItem/index.js +0 -1
  278. package/UseCases/GetScheduledItem/index.js.map +1 -1
  279. package/UseCases/ListItems/ListItemsUseCase.d.ts +2 -2
  280. package/UseCases/ListItems/ListItemsUseCase.js.map +1 -1
  281. package/UseCases/ListItems/ListItemsUseCaseWithSearch.d.ts +2 -2
  282. package/UseCases/ListItems/ListItemsUseCaseWithSearch.js.map +1 -1
  283. package/UseCases/ListItems/ListItemsUseCaseWithSorting.d.ts +1 -1
  284. package/UseCases/ListItems/ListItemsUseCaseWithSorting.js.map +1 -1
  285. package/UseCases/ListItems/index.d.ts +2 -2
  286. package/UseCases/ListItems/index.js +1 -2
  287. package/UseCases/ListItems/index.js.map +1 -1
  288. package/UseCases/ListMoreItems/ListMoreItemsUseCase.d.ts +2 -2
  289. package/UseCases/ListMoreItems/ListMoreItemsUseCase.js.map +1 -1
  290. package/UseCases/ListMoreItems/index.d.ts +2 -2
  291. package/UseCases/ListMoreItems/index.js +1 -2
  292. package/UseCases/ListMoreItems/index.js.map +1 -1
  293. package/UseCases/PublishItem/PublishItemUseCase.d.ts +2 -2
  294. package/UseCases/PublishItem/PublishItemUseCase.js.map +1 -1
  295. package/UseCases/PublishItem/index.d.ts +1 -1
  296. package/UseCases/PublishItem/index.js +0 -1
  297. package/UseCases/PublishItem/index.js.map +1 -1
  298. package/UseCases/SearchItems/SearchItemsUseCase.d.ts +2 -2
  299. package/UseCases/SearchItems/SearchItemsUseCase.js.map +1 -1
  300. package/UseCases/SearchItems/index.d.ts +2 -2
  301. package/UseCases/SearchItems/index.js +1 -2
  302. package/UseCases/SearchItems/index.js.map +1 -1
  303. package/UseCases/SelectAllItems/SelectAllItemsUseCase.d.ts +2 -2
  304. package/UseCases/SelectAllItems/SelectAllItemsUseCase.js.map +1 -1
  305. package/UseCases/SelectAllItems/index.d.ts +2 -2
  306. package/UseCases/SelectAllItems/index.js +1 -2
  307. package/UseCases/SelectAllItems/index.js.map +1 -1
  308. package/UseCases/SelectItems/ISelectItemsUseCase.d.ts +1 -1
  309. package/UseCases/SelectItems/ISelectItemsUseCase.js.map +1 -1
  310. package/UseCases/SelectItems/SelectItemsUseCase.d.ts +2 -2
  311. package/UseCases/SelectItems/SelectItemsUseCase.js.map +1 -1
  312. package/UseCases/SelectItems/index.d.ts +2 -2
  313. package/UseCases/SelectItems/index.js +1 -2
  314. package/UseCases/SelectItems/index.js.map +1 -1
  315. package/UseCases/SortItems/SortItemsUseCase.d.ts +1 -1
  316. package/UseCases/SortItems/SortItemsUseCase.js.map +1 -1
  317. package/UseCases/SortItems/index.d.ts +2 -2
  318. package/UseCases/SortItems/index.js +1 -2
  319. package/UseCases/SortItems/index.js.map +1 -1
  320. package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.d.ts +2 -2
  321. package/UseCases/UnSelectAllItems/UnselectAllItemsUseCase.js.map +1 -1
  322. package/UseCases/UnSelectAllItems/index.d.ts +2 -2
  323. package/UseCases/UnSelectAllItems/index.js +1 -2
  324. package/UseCases/UnSelectAllItems/index.js.map +1 -1
  325. package/UseCases/UnpublishItem/UnpublishItemUseCase.d.ts +2 -2
  326. package/UseCases/UnpublishItem/UnpublishItemUseCase.js.map +1 -1
  327. package/UseCases/UnpublishItem/index.d.ts +1 -1
  328. package/UseCases/UnpublishItem/index.js +0 -1
  329. package/UseCases/UnpublishItem/index.js.map +1 -1
  330. package/UseCases/index.d.ts +11 -11
  331. package/UseCases/index.js +11 -11
  332. package/UseCases/index.js.map +1 -1
  333. package/index.d.ts +1 -1
  334. package/index.js +0 -1
  335. package/index.js.map +1 -1
  336. package/package.json +21 -24
  337. package/types.d.ts +1 -1
  338. package/types.js.map +1 -1
@@ -1,6 +1,8 @@
1
- import type { SchedulerEntry } from "../../../types";
2
- import type { CmsContentEntry } from "@webiny/app-headless-cms-common/types";
3
- import type { IScheduleDialogAction } from "./types";
1
+ import React from "react";
2
+ import { type BindComponentRenderProp } from "@webiny/form";
3
+ import type { SchedulerEntry } from "../../../types.js";
4
+ import type { CmsContentEntry } from "@webiny/app-headless-cms-common/types/index.js";
5
+ import type { IScheduleDialogAction } from "./types.js";
4
6
  export interface ShowDialogParamsEntry {
5
7
  id: string;
6
8
  status: CmsContentEntry["meta"]["status"];
@@ -15,5 +17,27 @@ export interface ShowDialogParams {
15
17
  interface UseShowScheduleDialogResponse {
16
18
  showDialog: (params: ShowDialogParams) => void;
17
19
  }
20
+ export interface ISchedulerDialogFormComponentDateTimeInputProps {
21
+ bind: BindComponentRenderProp<Date>;
22
+ }
23
+ export declare const SchedulerDialogFormComponentDateTimeInput: ((props: ISchedulerDialogFormComponentDateTimeInputProps) => React.JSX.Element) & {
24
+ original: (props: ISchedulerDialogFormComponentDateTimeInputProps) => React.JSX.Element;
25
+ originalName: string;
26
+ displayName: string;
27
+ } & {
28
+ original: ((props: ISchedulerDialogFormComponentDateTimeInputProps) => React.JSX.Element) & {
29
+ original: (props: ISchedulerDialogFormComponentDateTimeInputProps) => React.JSX.Element;
30
+ originalName: string;
31
+ displayName: string;
32
+ };
33
+ originalName: string;
34
+ displayName: string;
35
+ } & {
36
+ createDecorator: (decorator: import("@webiny/app-admin").ComponentDecorator<((props: ISchedulerDialogFormComponentDateTimeInputProps) => React.JSX.Element) & {
37
+ original: (props: ISchedulerDialogFormComponentDateTimeInputProps) => React.JSX.Element;
38
+ originalName: string;
39
+ displayName: string;
40
+ }>) => (props: unknown) => React.JSX.Element;
41
+ };
18
42
  export declare const useScheduleDialog: () => UseShowScheduleDialogResponse;
19
43
  export {};
@@ -5,6 +5,7 @@ import { Bind } from "@webiny/form";
5
5
  import { validation } from "@webiny/validation";
6
6
  import { ScheduleType } from "../../../types.js";
7
7
  import ValidationError from "@webiny/validation/validationError.js";
8
+ import { makeDecoratable } from "@webiny/react-composition";
8
9
  const dateToLocaleStringFormatter = new Intl.DateTimeFormat(undefined, {
9
10
  year: "numeric",
10
11
  month: "2-digit",
@@ -26,18 +27,23 @@ const ReschedulingAlert = ({
26
27
  type: "danger"
27
28
  }, /*#__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
  };
30
+ /**
31
+ * DO NOT use a library for this!
32
+ */
33
+ const padLeft = num => {
34
+ return String(num).padStart(2, "0");
35
+ };
29
36
  const formatDateForDateTimeLocal = date => {
30
37
  if (!date) {
31
38
  return undefined;
39
+ } else if (typeof date === "string") {
40
+ date = new Date(date);
32
41
  }
33
- const pad = num => {
34
- return String(num).padStart(2, "0");
35
- };
36
42
  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());
43
+ const month = padLeft(date.getMonth() + 1);
44
+ const day = padLeft(date.getDate());
45
+ const hours = padLeft(date.getHours());
46
+ const minutes = padLeft(date.getMinutes());
41
47
  return `${year}-${month}-${day}T${hours}:${minutes}`;
42
48
  };
43
49
  const minDateValidator = input => {
@@ -49,6 +55,20 @@ const minDateValidator = input => {
49
55
  throw new ValidationError(`The date must be at least 2 minutes in the future. Current minimum date is ${dateToLocaleStringFormatter.format(minDate)}.`);
50
56
  };
51
57
  minDateValidator.validatorName = "minDateValidator";
58
+ export const SchedulerDialogFormComponentDateTimeInput = makeDecoratable("SchedulerDialogFormComponentDateTimeInput", props => {
59
+ const {
60
+ bind
61
+ } = props;
62
+ return /*#__PURE__*/React.createElement(Input, Object.assign({}, bind, {
63
+ value: formatDateForDateTimeLocal(bind.value),
64
+ title: "Schedule On",
65
+ label: "Schedule On",
66
+ size: "lg",
67
+ type: "datetime-local",
68
+ required: true,
69
+ autoFocus: true
70
+ }));
71
+ });
52
72
  const FormComponent = ({
53
73
  scheduleOn,
54
74
  onCancel,
@@ -63,14 +83,11 @@ const FormComponent = ({
63
83
  }, /*#__PURE__*/React.createElement(Bind, {
64
84
  name: "scheduleOn",
65
85
  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
- })))));
86
+ }, bind => {
87
+ return /*#__PURE__*/React.createElement(SchedulerDialogFormComponentDateTimeInput, {
88
+ bind: bind
89
+ });
90
+ }))));
74
91
  };
75
92
  export const useScheduleDialog = () => {
76
93
  const dialog = useDialogs();
@@ -125,16 +142,16 @@ export const useScheduleDialog = () => {
125
142
  schedulerEntry,
126
143
  entry
127
144
  } = params;
128
- const scheduleOnValue = schedulerEntry?.publishOn || schedulerEntry?.unpublishOn;
145
+ const scheduleOn = schedulerEntry?.publishOn || schedulerEntry?.unpublishOn;
129
146
  dialogClose.current = dialog.showDialog({
130
147
  title: `Schedule "${entry.title}"`,
131
148
  content: /*#__PURE__*/React.createElement(FormComponent, {
132
149
  type: schedulerEntry?.type,
133
- scheduleOn: scheduleOnValue,
150
+ scheduleOn: scheduleOn,
134
151
  onCancel: onCancel
135
152
  }),
136
153
  formData: {
137
- scheduleOn: formatDateForDateTimeLocal(scheduleOnValue)
154
+ scheduleOn
138
155
  },
139
156
  acceptLabel: entry.status === "published" ? "Schedule Unpublish" : "Schedule Publish",
140
157
  cancelLabel: "Discard",
@@ -154,7 +171,9 @@ export const useScheduleDialog = () => {
154
171
  try {
155
172
  scheduleOn = new Date(data.scheduleOn);
156
173
  } catch (ex) {
157
- showSnackbar(`Invalid "Schedule On" date!`);
174
+ showSnackbar(`Invalid "Schedule On" date!`, {
175
+ value: data.scheduleOn
176
+ });
158
177
  console.error(ex);
159
178
  return;
160
179
  }
@@ -1 +1 @@
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":"AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,MAAM,QAAQ,OAAO;AAClD,SAASC,KAAK,EAAEC,IAAI,EAAEC,KAAK,QAAQ,kBAAkB;AACrD,SAASC,UAAU,EAAEC,WAAW,QAAQ,mBAAmB;AAC3D,SAASC,IAAI,QAAQ,cAAc;AACnC,SAASC,UAAU,QAAQ,oBAAoB;AAI/C,SAASC,YAAY;AAErB,OAAOC,eAAe,MAAM,uCAAuC;AAyBnE,MAAMC,2BAA2B,GAAG,IAAIC,IAAI,CAACC,cAAc,CAACC,SAAS,EAAE;EACnEC,IAAI,EAAE,SAAS;EACfC,KAAK,EAAE,SAAS;EAChBC,GAAG,EAAE,SAAS;EACdC,IAAI,EAAE,SAAS;EACfC,MAAM,EAAE,SAAS;EACjBC,MAAM,EAAEN,SAAS;EACjBO,MAAM,EAAE;AACZ,CAAC,CAAC;AAEF,MAAMC,iBAAiB,GAAGA,CAAC;EAAEC,UAAU;EAAEC;AAAyB,CAAC,KAAK;EACpE,IAAI,CAACD,UAAU,IAAI,CAACC,IAAI,EAAE;IACtB,OAAO,IAAI;EACf;EAC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MACN;IACJ,CAAC,CAAC;EACN,CAAC;EAED,OAAO;IACHsD;EACJ,CAAC;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useCallback","useRef","Alert","Grid","Input","useDialogs","useSnackbar","Bind","validation","ScheduleType","ValidationError","makeDecoratable","dateToLocaleStringFormatter","Intl","DateTimeFormat","undefined","year","month","day","hour","minute","second","hour12","ReschedulingAlert","scheduleOn","type","actionName","publish","createElement","Fragment","format","padLeft","num","String","padStart","formatDateForDateTimeLocal","date","Date","getFullYear","getMonth","getDate","hours","getHours","minutes","getMinutes","minDateValidator","input","value","minDate","getTime","validatorName","SchedulerDialogFormComponentDateTimeInput","props","bind","Object","assign","title","label","size","required","autoFocus","FormComponent","onCancel","Column","span","name","validators","create","useScheduleDialog","dialog","showSnackbar","dialogClose","onAccept","params","action","entry","schedule","id","modelId","error","message","console","schedulerEntry","cancel","model","current","showDialog","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, type BindComponentRenderProp } from \"@webiny/form\";\nimport { validation } from \"@webiny/validation\";\nimport type { SchedulerEntry } from \"~/types.js\";\nimport type { CmsContentEntry } from \"@webiny/app-headless-cms-common/types/index.js\";\nimport type { IScheduleDialogAction } from \"./types.js\";\nimport { ScheduleType } from \"~/types.js\";\nimport type { Validator } from \"@webiny/validation/types.js\";\nimport ValidationError from \"@webiny/validation/validationError.js\";\nimport { makeDecoratable } from \"@webiny/react-composition\";\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/**\n * DO NOT use a library for this!\n */\nconst padLeft = (num: number) => {\n return String(num).padStart(2, \"0\");\n};\n\nconst formatDateForDateTimeLocal = (date?: Date | string): string | undefined => {\n if (!date) {\n return undefined;\n } else if (typeof date === \"string\") {\n date = new Date(date);\n }\n\n const year = date.getFullYear();\n const month = padLeft(date.getMonth() + 1);\n const day = padLeft(date.getDate());\n const hours = padLeft(date.getHours());\n const minutes = padLeft(date.getMinutes());\n\n return `${year}-${month}-${day}T${hours}:${minutes}`;\n};\n\nconst minDateValidator: Validator = (input: string) => {\n const value = new Date(input);\n const minDate = new Date(new Date().getTime() + 120 * 1000);\n if (minDate < value) {\n return;\n }\n throw new ValidationError(\n `The date must be at least 2 minutes in the future. Current minimum date is ${dateToLocaleStringFormatter.format(\n minDate\n )}.`\n );\n};\n\nminDateValidator.validatorName = \"minDateValidator\";\n\nexport interface ISchedulerDialogFormComponentDateTimeInputProps {\n bind: BindComponentRenderProp<Date>;\n}\n\nexport const SchedulerDialogFormComponentDateTimeInput = makeDecoratable(\n \"SchedulerDialogFormComponentDateTimeInput\",\n (props: ISchedulerDialogFormComponentDateTimeInputProps) => {\n const { bind } = props;\n\n return (\n <Input\n {...bind}\n value={formatDateForDateTimeLocal(bind.value)}\n title={\"Schedule On\"}\n label={\"Schedule On\"}\n size={\"lg\"}\n type={\"datetime-local\"}\n required\n autoFocus\n />\n );\n }\n);\n\nconst FormComponent = ({ scheduleOn, onCancel, 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 {bind => {\n return <SchedulerDialogFormComponentDateTimeInput bind={bind} />;\n }}\n </Bind>\n </Grid.Column>\n </Grid>\n </>\n );\n};\n\ninterface ScheduleFormData {\n scheduleOn?: string;\n}\n\ninterface IOnAcceptParams {\n 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 scheduleOn = 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={scheduleOn}\n onCancel={onCancel}\n />\n ),\n formData: {\n scheduleOn\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 value: data.scheduleOn\n });\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":"AAAA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,MAAM,QAAQ,OAAO;AAClD,SAASC,KAAK,EAAEC,IAAI,EAAEC,KAAK,QAAQ,kBAAkB;AACrD,SAASC,UAAU,EAAEC,WAAW,QAAQ,mBAAmB;AAC3D,SAASC,IAAI,QAAsC,cAAc;AACjE,SAASC,UAAU,QAAQ,oBAAoB;AAI/C,SAASC,YAAY;AAErB,OAAOC,eAAe,MAAM,uCAAuC;AACnE,SAASC,eAAe,QAAQ,2BAA2B;AAyB3D,MAAMC,2BAA2B,GAAG,IAAIC,IAAI,CAACC,cAAc,CAACC,SAAS,EAAE;EACnEC,IAAI,EAAE,SAAS;EAC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C,QAAQ,EAAEA;MAAS,CACtB,CACJ;MACD4B,QAAQ,EAAE;QACNlE;MACJ,CAAC;MACDmE,WAAW,EAAEhB,KAAK,CAACiB,MAAM,KAAK,WAAW,GAAG,oBAAoB,GAAG,kBAAkB;MACrFC,WAAW,EAAE,SAAS;MACtBC,YAAY,EAAE,eAAe;MAC7BtB,QAAQ,EAAGuB,IAA+B,IAAK;QAC3C,IAAI,CAACA,IAAI,CAACvE,UAAU,EAAE;UAClB8C,YAAY,CAAC,6BAA6B,CAAC;UAC3C;QACJ;QACA;AAChB;AACA;AACA;AACA;AACA;QACgB,IAAI9C,UAAgB;QACpB,IAAI;UACAA,UAAU,GAAG,IAAIa,IAAI,CAAC0D,IAAI,CAACvE,UAAU,CAAC;QAC1C,CAAC,CAAC,OAAOwE,EAAE,EAAE;UACT1B,YAAY,CAAC,6BAA6B,EAAE;YACxCvB,KAAK,EAAEgD,IAAI,CAACvE;UAChB,CAAC,CAAC;UACFyD,OAAO,CAACF,KAAK,CAACiB,EAAE,CAAC;UACjB;QACJ;QAEAxB,QAAQ,CAAC;UACL,GAAGC,MAAM;UACTjD,UAAU;UACVC,IAAI,EACAkD,KAAK,CAACiB,MAAM,KAAK,WAAW,GAAGnF,YAAY,CAACwF,SAAS,GAAGxF,YAAY,CAACkB;QAC7E,CAAC,CAAC;MACN;IACJ,CAAC,CAAC;EACN,CAAC;EAED,OAAO;IACH2D;EACJ,CAAC;AACL,CAAC","ignoreList":[]}
@@ -1,13 +1,13 @@
1
1
  import React from "react";
2
- import debounce from "lodash/debounce";
2
+ import debounce from "lodash/debounce.js";
3
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";
4
+ import { Scrollbar } from "@webiny/ui/Scrollbar/index.js";
5
+ import { Title } from "../Title/index.js";
6
+ import { SearchInput } from "../SearchInput/index.js";
7
+ import { Empty } from "../Empty/index.js";
8
+ import { Table } from "../Table/index.js";
9
+ import { BottomInfoBar } from "../BottomInfoBar/index.js";
10
+ import { useScheduler } from "../../hooks/index.js";
11
11
  export const SchedulerOverlay = props => {
12
12
  const {
13
13
  listMoreItems,
@@ -1 +1 @@
1
- {"version":3,"names":["React","debounce","OverlayLayout","Scrollbar","Title","SearchInput","Empty","Table","BottomInfoBar","useScheduler","SchedulerOverlay","props","listMoreItems","vm","onTableScroll","scrollFrame","top","createElement","onExited","barLeft","title","barMiddle","onScrollFrame","isEmptyView"],"sources":["SchedulerOverlay.tsx"],"sourcesContent":["import React from \"react\";\nimport debounce from \"lodash/debounce\";\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
+ {"version":3,"names":["React","debounce","OverlayLayout","Scrollbar","Title","SearchInput","Empty","Table","BottomInfoBar","useScheduler","SchedulerOverlay","props","listMoreItems","vm","onTableScroll","scrollFrame","top","createElement","onExited","barLeft","title","barMiddle","onScrollFrame","isEmptyView"],"sources":["SchedulerOverlay.tsx"],"sourcesContent":["import React from \"react\";\nimport debounce from \"lodash/debounce.js\";\nimport { OverlayLayout } from \"@webiny/app-admin\";\nimport { Scrollbar } from \"@webiny/ui/Scrollbar/index.js\";\nimport { Title } from \"~/Presentation/components/Title/index.js\";\nimport { SearchInput } from \"~/Presentation/components/SearchInput/index.js\";\nimport { Empty } from \"~/Presentation/components/Empty/index.js\";\nimport { Table } from \"~/Presentation/components/Table/index.js\";\nimport { BottomInfoBar } from \"~/Presentation/components/BottomInfoBar/index.js\";\nimport { useScheduler } from \"~/Presentation/hooks/index.js\";\n\ninterface SchedulerOverlayProps {\n title: string;\n onExited: () => void;\n}\n\nexport const SchedulerOverlay = (props: SchedulerOverlayProps) => {\n const { listMoreItems, vm } = useScheduler();\n\n const onTableScroll = debounce(async ({ scrollFrame }) => {\n if (scrollFrame.top > 0.8) {\n await listMoreItems();\n }\n }, 200);\n\n return (\n <OverlayLayout\n onExited={props.onExited}\n barLeft={<Title title={props.title} />}\n barMiddle={<SearchInput />}\n >\n <Scrollbar onScrollFrame={scrollFrame => onTableScroll({ scrollFrame })}>\n {vm.isEmptyView ? <Empty /> : <Table />}\n </Scrollbar>\n <BottomInfoBar />\n </OverlayLayout>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,QAAQ,MAAM,oBAAoB;AACzC,SAASC,aAAa,QAAQ,mBAAmB;AACjD,SAASC,SAAS,QAAQ,+BAA+B;AACzD,SAASC,KAAK;AACd,SAASC,WAAW;AACpB,SAASC,KAAK;AACd,SAASC,KAAK;AACd,SAASC,aAAa;AACtB,SAASC,YAAY;AAOrB,OAAO,MAAMC,gBAAgB,GAAIC,KAA4B,IAAK;EAC9D,MAAM;IAAEC,aAAa;IAAEC;EAAG,CAAC,GAAGJ,YAAY,CAAC,CAAC;EAE5C,MAAMK,aAAa,GAAGb,QAAQ,CAAC,OAAO;IAAEc;EAAY,CAAC,KAAK;IACtD,IAAIA,WAAW,CAACC,GAAG,GAAG,GAAG,EAAE;MACvB,MAAMJ,aAAa,CAAC,CAAC;IACzB;EACJ,CAAC,EAAE,GAAG,CAAC;EAEP,oBACIZ,KAAA,CAAAiB,aAAA,CAACf,aAAa;IACVgB,QAAQ,EAAEP,KAAK,CAACO,QAAS;IACzBC,OAAO,eAAEnB,KAAA,CAAAiB,aAAA,CAACb,KAAK;MAACgB,KAAK,EAAET,KAAK,CAACS;IAAM,CAAE,CAAE;IACvCC,SAAS,eAAErB,KAAA,CAAAiB,aAAA,CAACZ,WAAW,MAAE;EAAE,gBAE3BL,KAAA,CAAAiB,aAAA,CAACd,SAAS;IAACmB,aAAa,EAAEP,WAAW,IAAID,aAAa,CAAC;MAAEC;IAAY,CAAC;EAAE,GACnEF,EAAE,CAACU,WAAW,gBAAGvB,KAAA,CAAAiB,aAAA,CAACX,KAAK,MAAE,CAAC,gBAAGN,KAAA,CAAAiB,aAAA,CAACV,KAAK,MAAE,CAC/B,CAAC,eACZP,KAAA,CAAAiB,aAAA,CAACT,aAAa,MAAE,CACL,CAAC;AAExB,CAAC","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  import React from "react";
2
2
  import { ReactComponent as SearchIcon } from "@webiny/icons/search.svg";
3
3
  import { DelayedOnChange, Icon, Input } from "@webiny/admin-ui";
4
- import { useScheduler } from "../../hooks";
4
+ import { useScheduler } from "../../hooks/index.js";
5
5
  export const SearchInput = () => {
6
6
  const {
7
7
  vm,
@@ -1 +1 @@
1
- {"version":3,"names":["React","ReactComponent","SearchIcon","DelayedOnChange","Icon","Input","useScheduler","SearchInput","vm","searchItems","createElement","value","searchQuery","onChange","id","e","target","forwardEventOnChange","placeholder","searchLabel","startIcon","icon","label","size","variant"],"sources":["SearchInput.tsx"],"sourcesContent":["import React from \"react\";\nimport { ReactComponent as SearchIcon } from \"@webiny/icons/search.svg\";\nimport { DelayedOnChange, Icon, Input } from \"@webiny/admin-ui\";\nimport { useScheduler } from \"~/Presentation/hooks\";\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
+ {"version":3,"names":["React","ReactComponent","SearchIcon","DelayedOnChange","Icon","Input","useScheduler","SearchInput","vm","searchItems","createElement","value","searchQuery","onChange","id","e","target","forwardEventOnChange","placeholder","searchLabel","startIcon","icon","label","size","variant"],"sources":["SearchInput.tsx"],"sourcesContent":["import React from \"react\";\nimport { ReactComponent as SearchIcon } from \"@webiny/icons/search.svg\";\nimport { DelayedOnChange, Icon, Input } from \"@webiny/admin-ui\";\nimport { useScheduler } from \"~/Presentation/hooks/index.js\";\n\nexport const SearchInput = () => {\n const { vm, searchItems } = useScheduler();\n\n return (\n <DelayedOnChange\n value={vm.searchQuery}\n onChange={value => {\n if (value === vm.searchQuery) {\n return;\n }\n searchItems(value);\n }}\n >\n {({ value, onChange }) => (\n <Input\n id={\"scheduler__search-input\"}\n value={value}\n onChange={e => onChange(e.target.value)}\n forwardEventOnChange={true}\n placeholder={vm.searchLabel}\n data-testid={\"scheduler.search-input\"}\n startIcon={<Icon icon={<SearchIcon />} label=\"Search\" />}\n size={\"md\"}\n variant={\"ghost\"}\n />\n )}\n </DelayedOnChange>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,cAAc,IAAIC,UAAU,QAAQ,0BAA0B;AACvE,SAASC,eAAe,EAAEC,IAAI,EAAEC,KAAK,QAAQ,kBAAkB;AAC/D,SAASC,YAAY;AAErB,OAAO,MAAMC,WAAW,GAAGA,CAAA,KAAM;EAC7B,MAAM;IAAEC,EAAE;IAAEC;EAAY,CAAC,GAAGH,YAAY,CAAC,CAAC;EAE1C,oBACIN,KAAA,CAAAU,aAAA,CAACP,eAAe;IACZQ,KAAK,EAAEH,EAAE,CAACI,WAAY;IACtBC,QAAQ,EAAEF,KAAK,IAAI;MACf,IAAIA,KAAK,KAAKH,EAAE,CAACI,WAAW,EAAE;QAC1B;MACJ;MACAH,WAAW,CAACE,KAAK,CAAC;IACtB;EAAE,GAED,CAAC;IAAEA,KAAK;IAAEE;EAAS,CAAC,kBACjBb,KAAA,CAAAU,aAAA,CAACL,KAAK;IACFS,EAAE,EAAE,yBAA0B;IAC9BH,KAAK,EAAEA,KAAM;IACbE,QAAQ,EAAEE,CAAC,IAAIF,QAAQ,CAACE,CAAC,CAACC,MAAM,CAACL,KAAK,CAAE;IACxCM,oBAAoB,EAAE,IAAK;IAC3BC,WAAW,EAAEV,EAAE,CAACW,WAAY;IAC5B,eAAa,wBAAyB;IACtCC,SAAS,eAAEpB,KAAA,CAAAU,aAAA,CAACN,IAAI;MAACiB,IAAI,eAAErB,KAAA,CAAAU,aAAA,CAACR,UAAU,MAAE,CAAE;MAACoB,KAAK,EAAC;IAAQ,CAAE,CAAE;IACzDC,IAAI,EAAE,IAAK;IACXC,OAAO,EAAE;EAAQ,CACpB,CAEQ,CAAC;AAE1B,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- export * from "./SearchInput";
1
+ export * from "./SearchInput.js";
@@ -1,3 +1,3 @@
1
- export * from "./SearchInput";
1
+ export * from "./SearchInput.js";
2
2
 
3
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./SearchInput\";\n"],"mappings":"AAAA","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./SearchInput.js\";\n"],"mappings":"AAAA","ignoreList":[]}
@@ -1,13 +1,17 @@
1
1
  import React, { useMemo } from "react";
2
2
  import { createRecordsData, Table as AcoTable } from "@webiny/app-aco";
3
- import { useScheduler } from "../../hooks";
4
- import { LoadingActions } from "../../../types";
3
+ import { useScheduler } from "../../hooks/index.js";
4
+ import { LoadingActions } from "../../../types.js";
5
+ import { useSchedulerListConfig } from "../../configs/index.js";
5
6
  export const Table = () => {
6
7
  const {
7
8
  vm,
8
9
  selectItems,
9
10
  sortItems
10
11
  } = useScheduler();
12
+ const {
13
+ browser
14
+ } = useSchedulerListConfig();
11
15
  const data = useMemo(() => {
12
16
  return createRecordsData(vm.items);
13
17
  }, [vm.items]);
@@ -15,6 +19,7 @@ export const Table = () => {
15
19
  return createRecordsData(vm.selectedItems);
16
20
  }, [vm.selectedItems]);
17
21
  return /*#__PURE__*/React.createElement(AcoTable, {
22
+ columns: browser.table.columns,
18
23
  data: data,
19
24
  loading: vm.loading[LoadingActions.list],
20
25
  onSelectRow: entries => selectItems(entries.map(entry => entry.data)),
@@ -22,7 +27,7 @@ export const Table = () => {
22
27
  onSortingChange: sort => sortItems(sort),
23
28
  selected: selected,
24
29
  nameColumnId: vm.nameColumnId,
25
- namespace: "scheduler"
30
+ namespace: "scheduler/list"
26
31
  });
27
32
  };
28
33
 
@@ -1 +1 @@
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
+ {"version":3,"names":["React","useMemo","createRecordsData","Table","AcoTable","useScheduler","LoadingActions","useSchedulerListConfig","vm","selectItems","sortItems","browser","data","items","selected","selectedItems","createElement","columns","table","loading","list","onSelectRow","entries","map","entry","sorting","onSortingChange","sort","nameColumnId","namespace"],"sources":["Table.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport { createRecordsData, Table as AcoTable } from \"@webiny/app-aco\";\nimport { useScheduler } from \"~/Presentation/hooks/index.js\";\nimport { LoadingActions, type SchedulerEntryTableRow } from \"~/types.js\";\nimport { useSchedulerListConfig } from \"~/Presentation/configs/index.js\";\n\nexport const Table = () => {\n const { vm, selectItems, sortItems } = useScheduler();\n const { browser } = useSchedulerListConfig();\n\n const data = useMemo<SchedulerEntryTableRow[]>(() => {\n return createRecordsData(vm.items);\n }, [vm.items]);\n\n const selected = useMemo<SchedulerEntryTableRow[]>(() => {\n return createRecordsData(vm.selectedItems);\n }, [vm.selectedItems]);\n\n return (\n <AcoTable<SchedulerEntryTableRow>\n columns={browser.table.columns}\n data={data}\n loading={vm.loading[LoadingActions.list]}\n onSelectRow={entries => selectItems(entries.map(entry => entry.data))}\n sorting={vm.sorting}\n onSortingChange={sort => sortItems(sort)}\n selected={selected}\n nameColumnId={vm.nameColumnId}\n namespace={\"scheduler/list\"}\n />\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,iBAAiB,EAAEC,KAAK,IAAIC,QAAQ,QAAQ,iBAAiB;AACtE,SAASC,YAAY;AACrB,SAASC,cAAc;AACvB,SAASC,sBAAsB;AAE/B,OAAO,MAAMJ,KAAK,GAAGA,CAAA,KAAM;EACvB,MAAM;IAAEK,EAAE;IAAEC,WAAW;IAAEC;EAAU,CAAC,GAAGL,YAAY,CAAC,CAAC;EACrD,MAAM;IAAEM;EAAQ,CAAC,GAAGJ,sBAAsB,CAAC,CAAC;EAE5C,MAAMK,IAAI,GAAGX,OAAO,CAA2B,MAAM;IACjD,OAAOC,iBAAiB,CAACM,EAAE,CAACK,KAAK,CAAC;EACtC,CAAC,EAAE,CAACL,EAAE,CAACK,KAAK,CAAC,CAAC;EAEd,MAAMC,QAAQ,GAAGb,OAAO,CAA2B,MAAM;IACrD,OAAOC,iBAAiB,CAACM,EAAE,CAACO,aAAa,CAAC;EAC9C,CAAC,EAAE,CAACP,EAAE,CAACO,aAAa,CAAC,CAAC;EAEtB,oBACIf,KAAA,CAAAgB,aAAA,CAACZ,QAAQ;IACLa,OAAO,EAAEN,OAAO,CAACO,KAAK,CAACD,OAAQ;IAC/BL,IAAI,EAAEA,IAAK;IACXO,OAAO,EAAEX,EAAE,CAACW,OAAO,CAACb,cAAc,CAACc,IAAI,CAAE;IACzCC,WAAW,EAAEC,OAAO,IAAIb,WAAW,CAACa,OAAO,CAACC,GAAG,CAACC,KAAK,IAAIA,KAAK,CAACZ,IAAI,CAAC,CAAE;IACtEa,OAAO,EAAEjB,EAAE,CAACiB,OAAQ;IACpBC,eAAe,EAAEC,IAAI,IAAIjB,SAAS,CAACiB,IAAI,CAAE;IACzCb,QAAQ,EAAEA,QAAS;IACnBc,YAAY,EAAEpB,EAAE,CAACoB,YAAa;IAC9BC,SAAS,EAAE;EAAiB,CAC/B,CAAC;AAEV,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- export * from "./Table";
1
+ export * from "./Table.js";
@@ -1,3 +1,3 @@
1
- export * from "./Table";
1
+ export * from "./Table.js";
2
2
 
3
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Table\";\n"],"mappings":"AAAA","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./Table.js\";\n"],"mappings":"AAAA","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  import React from "react";
2
- import { Skeleton } from "@webiny/ui/Skeleton";
3
- import { Name } from "./Title.styled";
2
+ import { Skeleton } from "@webiny/ui/Skeleton/index.js";
3
+ import { Name } from "./Title.styled.js";
4
4
  export const Title = ({
5
5
  title
6
6
  }) => {
@@ -1 +1 @@
1
- {"version":3,"names":["React","Skeleton","Name","Title","title","createElement","use","tag","theme"],"sources":["Title.tsx"],"sourcesContent":["import React from \"react\";\nimport { Skeleton } from \"@webiny/ui/Skeleton\";\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
+ {"version":3,"names":["React","Skeleton","Name","Title","title","createElement","use","tag","theme"],"sources":["Title.tsx"],"sourcesContent":["import React from \"react\";\nimport { Skeleton } from \"@webiny/ui/Skeleton/index.js\";\nimport { Name } from \"./Title.styled.js\";\n\nexport interface TitleProps {\n title?: string;\n}\n\nexport const Title = ({ title }: TitleProps) => {\n return (\n <Name use={\"headline6\"} tag={\"h1\"}>\n {title || <Skeleton theme={\"dark\"} />}\n </Name>\n );\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,QAAQ,QAAQ,8BAA8B;AACvD,SAASC,IAAI;AAMb,OAAO,MAAMC,KAAK,GAAGA,CAAC;EAAEC;AAAkB,CAAC,KAAK;EAC5C,oBACIJ,KAAA,CAAAK,aAAA,CAACH,IAAI;IAACI,GAAG,EAAE,WAAY;IAACC,GAAG,EAAE;EAAK,GAC7BH,KAAK,iBAAIJ,KAAA,CAAAK,aAAA,CAACJ,QAAQ;IAACO,KAAK,EAAE;EAAO,CAAE,CAClC,CAAC;AAEf,CAAC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import type { TypographyProps } from "@webiny/ui/Typography";
1
+ import type { TypographyProps } from "@webiny/ui/Typography/index.js";
2
2
  export declare const Name: import("@emotion/styled").StyledComponent<TypographyProps & {
3
- theme?: import("@emotion/react").Theme | undefined;
3
+ theme?: import("@emotion/react").Theme;
4
4
  }, {}, {}>;
@@ -1,6 +1,6 @@
1
1
  import _styled from "@emotion/styled/base";
2
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";
3
+ import { Typography } from "@webiny/ui/Typography/index.js";
4
4
  export const Name = /*#__PURE__*/_styled(Typography, process.env.NODE_ENV === "production" ? {
5
5
  target: "epwctpg0"
6
6
  } : {
@@ -11,8 +11,7 @@ export const Name = /*#__PURE__*/_styled(Typography, process.env.NODE_ENV === "p
11
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
12
  } : {
13
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 */",
14
+ styles: "color:var(--mdc-theme-text-primary-on-background);padding-left:8px;line-height:48px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIlRpdGxlLnN0eWxlZC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBSXVEIiwiZmlsZSI6IlRpdGxlLnN0eWxlZC50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgc3R5bGVkIGZyb20gXCJAZW1vdGlvbi9zdHlsZWRcIjtcbmltcG9ydCB0eXBlIHsgVHlwb2dyYXBoeVByb3BzIH0gZnJvbSBcIkB3ZWJpbnkvdWkvVHlwb2dyYXBoeS9pbmRleC5qc1wiO1xuaW1wb3J0IHsgVHlwb2dyYXBoeSB9IGZyb20gXCJAd2ViaW55L3VpL1R5cG9ncmFwaHkvaW5kZXguanNcIjtcblxuZXhwb3J0IGNvbnN0IE5hbWUgPSBzdHlsZWQoVHlwb2dyYXBoeSk8VHlwb2dyYXBoeVByb3BzPmBcbiAgICBjb2xvcjogdmFyKC0tbWRjLXRoZW1lLXRleHQtcHJpbWFyeS1vbi1iYWNrZ3JvdW5kKTtcbiAgICBwYWRkaW5nLWxlZnQ6IDhweDtcbiAgICBsaW5lLWhlaWdodDogNDhweDtcbiAgICB3aGl0ZS1zcGFjZTogbm93cmFwO1xuICAgIG92ZXJmbG93OiBoaWRkZW47XG4gICAgdGV4dC1vdmVyZmxvdzogZWxsaXBzaXM7XG5gO1xuIl19 */",
16
15
  toString: _EMOTION_STRINGIFIED_CSS_ERROR__
17
16
  });
18
17
 
@@ -1 +1 @@
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
+ {"version":3,"names":["Typography","Name","_styled","process","env","NODE_ENV","target","label","name","styles","toString","_EMOTION_STRINGIFIED_CSS_ERROR__"],"sources":["Title.styled.tsx"],"sourcesContent":["import styled from \"@emotion/styled\";\nimport type { TypographyProps } from \"@webiny/ui/Typography/index.js\";\nimport { Typography } from \"@webiny/ui/Typography/index.js\";\n\nexport const Name = styled(Typography)<TypographyProps>`\n color: var(--mdc-theme-text-primary-on-background);\n padding-left: 8px;\n line-height: 48px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n`;\n"],"mappings":";;AAEA,SAASA,UAAU,QAAQ,gCAAgC;AAE3D,OAAO,MAAMC,IAAI,gBAAGC,OAAA,CAAOF,UAAU,EAAAG,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAC,MAAA;AAAA;EAAAA,MAAA;EAAAC,KAAA;AAAA,EAAC,CAAAJ,OAAA,CAAAC,GAAA,CAAAC,QAAA;EAAAG,IAAA;EAAAC,MAAA;AAAA;EAAAD,IAAA;EAAAC,MAAA;EAAAC,QAAA,EAAAC;AAAA,EAOrC","ignoreList":[]}
@@ -1 +1 @@
1
- export * from "./Title";
1
+ export * from "./Title.js";
@@ -1,3 +1,3 @@
1
- export * from "./Title";
1
+ export * from "./Title.js";
2
2
 
3
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.tsx"],"sourcesContent":["export * from \"./Title\";\n"],"mappings":"AAAA","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["index.tsx"],"sourcesContent":["export * from \"./Title.js\";\n"],"mappings":"AAAA","ignoreList":[]}
@@ -1 +1 @@
1
- export * from "./list";
1
+ export * from "./list/index.js";
@@ -1,3 +1,3 @@
1
- export * from "./list";
1
+ export * from "./list/index.js";
2
2
 
3
3
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./list\";\n"],"mappings":"AAAA","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./list/index.js\";\n"],"mappings":"AAAA","ignoreList":[]}
@@ -3,5 +3,5 @@ import { AcoConfig, type RecordActionConfig } from "@webiny/app-aco";
3
3
  export type { RecordActionConfig as EntryActionConfig };
4
4
  type EntryActionProps = React.ComponentProps<typeof AcoConfig.Record.Action>;
5
5
  export declare const EntryAction: ((props: EntryActionProps) => React.JSX.Element) & {
6
- OptionsMenuItem: (props: import("@webiny/app-admin").OptionsMenuItemProps) => React.JSX.Element;
6
+ OptionsMenuItem: (props: import("@webiny/app-admin/components").OptionsMenuItemProps) => React.JSX.Element;
7
7
  };
@@ -7,7 +7,7 @@ const {
7
7
  const BaseEntryAction = props => {
8
8
  return /*#__PURE__*/React.createElement(CompositionScope, {
9
9
  name: "scheduler"
10
- }, /*#__PURE__*/React.createElement(AcoConfig, null, /*#__PURE__*/React.createElement(Record.Action, props)));
10
+ }, /*#__PURE__*/React.createElement(Record.Action, props));
11
11
  };
12
12
  export const EntryAction = Object.assign(BaseEntryAction, {
13
13
  OptionsMenuItem: Record.Action.OptionsMenuItem
@@ -1 +1 @@
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
+ {"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 <Record.Action {...props} />\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,CAACH,MAAM,CAACK,MAAM,EAAKH,KAAQ,CACb,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,6 +1,6 @@
1
1
  import React from "react";
2
2
  import { AcoConfig, type TableColumnConfig as ColumnConfig } from "@webiny/app-aco";
3
- import type { SchedulerEntryTableRow } from "../../../../../types";
3
+ import type { SchedulerEntryTableRow } from "../../../../../types.js";
4
4
  export type { ColumnConfig };
5
5
  type ColumnProps = React.ComponentProps<typeof AcoConfig.Table.Column>;
6
6
  export declare const Column: ((props: ColumnProps) => React.JSX.Element) & {
@@ -10,5 +10,5 @@ export declare const Column: ((props: ColumnProps) => React.JSX.Element) & {
10
10
  data: TUserRow;
11
11
  }>;
12
12
  };
13
- isFolderRow: (row: import("@webiny/app-aco").TableRow<unknown>) => row is import("@webiny/app-aco").FolderTableRow;
13
+ isFolderRow: (row: import("@webiny/app-aco").TableRow) => row is import("@webiny/app-aco").FolderTableRow;
14
14
  };
@@ -4,7 +4,7 @@ const {
4
4
  Table
5
5
  } = AcoConfig;
6
6
  const BaseColumn = props => {
7
- return /*#__PURE__*/React.createElement(AcoConfig, null, /*#__PURE__*/React.createElement(Table.Column, props));
7
+ return /*#__PURE__*/React.createElement(Table.Column, props);
8
8
  };
9
9
  export const Column = Object.assign(BaseColumn, {
10
10
  useTableRow: Table.Column.createUseTableRow(),
@@ -1 +1 @@
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
+ {"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.js\";\n\nconst { Table } = AcoConfig;\n\nexport type { ColumnConfig };\n\ntype ColumnProps = React.ComponentProps<typeof AcoConfig.Table.Column>;\n\nconst BaseColumn = (props: ColumnProps) => {\n return <Table.Column {...props} />;\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,oBAAOJ,KAAA,CAAAK,aAAA,CAACH,KAAK,CAACI,MAAM,EAAKF,KAAQ,CAAC;AACtC,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":[]}
@@ -4,7 +4,7 @@ const {
4
4
  Table
5
5
  } = AcoConfig;
6
6
  export const Sorting = props => {
7
- return /*#__PURE__*/React.createElement(AcoConfig, null, /*#__PURE__*/React.createElement(Table.Sorting, props));
7
+ return /*#__PURE__*/React.createElement(Table.Sorting, props);
8
8
  };
9
9
 
10
10
  //# sourceMappingURL=Sorting.js.map
@@ -1 +1 @@
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
+ {"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 <Table.Sorting {...props} />;\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,oBAAOJ,KAAA,CAAAK,aAAA,CAACH,KAAK,CAACC,OAAO,EAAKC,KAAQ,CAAC;AACvC,CAAC","ignoreList":[]}
@@ -1,19 +1,18 @@
1
- /// <reference types="react" />
2
- import type { ColumnConfig } from "./Column";
3
- import type { SortingConfig } from "./Sorting";
1
+ import type { ColumnConfig } from "./Column.js";
2
+ import type { SortingConfig } from "./Sorting.js";
4
3
  export interface TableConfig {
5
4
  columns: ColumnConfig[];
6
5
  sorting: SortingConfig[];
7
6
  }
8
7
  export declare const Table: {
9
- Column: ((props: import("@webiny/app-aco/config/table/Column").ColumnProps) => import("react").JSX.Element) & {
8
+ Column: ((props: import("@webiny/app-aco/config/table/Column.js").ColumnProps) => import("react").JSX.Element) & {
10
9
  useTableRow: {
11
- (): import("@webiny/app-aco").TableRowContextData<import("../../../../../types").SchedulerEntryTableRow>;
12
- <TUserRow>(): import("@webiny/app-aco").TableRowContextData<import("../../../../../types").SchedulerEntryTableRow & {
10
+ (): import("@webiny/app-aco/index.js").TableRowContextData<import("../../../../../types.js").SchedulerEntryTableRow>;
11
+ <TUserRow>(): import("@webiny/app-aco/index.js").TableRowContextData<import("../../../../../types.js").SchedulerEntryTableRow & {
13
12
  data: TUserRow;
14
13
  }>;
15
14
  };
16
- isFolderRow: (row: import("@webiny/app-aco").TableRow<unknown>) => row is import("@webiny/app-aco").FolderTableRow;
15
+ isFolderRow: (row: import("@webiny/app-aco/table.types.js").TableRow) => row is import("@webiny/app-aco/table.types.js").FolderTableRow;
17
16
  };
18
- Sorting: (props: import("@webiny/app-aco/config/table/Sorting").SortingProps) => import("react").JSX.Element;
17
+ Sorting: (props: import("@webiny/app-aco/config/table/Sorting.js").SortingProps) => import("react").JSX.Element;
19
18
  };
@@ -1,5 +1,5 @@
1
- import { Column } from "./Column";
2
- import { Sorting } from "./Sorting";
1
+ import { Column } from "./Column.js";
2
+ import { Sorting } from "./Sorting.js";
3
3
  export const Table = {
4
4
  Column,
5
5
  Sorting
@@ -1 +1 @@
1
- {"version":3,"names":["Column","Sorting","Table"],"sources":["index.ts"],"sourcesContent":["import type { ColumnConfig } from \"./Column\";\nimport { Column } from \"./Column\";\nimport type { SortingConfig } from \"./Sorting\";\nimport { Sorting } from \"./Sorting\";\n\nexport interface TableConfig {\n columns: ColumnConfig[];\n sorting: SortingConfig[];\n}\n\nexport const Table = {\n Column,\n Sorting\n};\n"],"mappings":"AACA,SAASA,MAAM;AAEf,SAASC,OAAO;AAOhB,OAAO,MAAMC,KAAK,GAAG;EACjBF,MAAM;EACNC;AACJ,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["Column","Sorting","Table"],"sources":["index.ts"],"sourcesContent":["import type { ColumnConfig } from \"./Column.js\";\nimport { Column } from \"./Column.js\";\nimport type { SortingConfig } from \"./Sorting.js\";\nimport { Sorting } from \"./Sorting.js\";\n\nexport interface TableConfig {\n columns: ColumnConfig[];\n sorting: SortingConfig[];\n}\n\nexport const Table = {\n Column,\n Sorting\n};\n"],"mappings":"AACA,SAASA,MAAM;AAEf,SAASC,OAAO;AAOhB,OAAO,MAAMC,KAAK,GAAG;EACjBF,MAAM;EACNC;AACJ,CAAC","ignoreList":[]}