@webiny/app-aco 6.0.0-alpha.0 → 6.0.0-alpha.1

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 (395) hide show
  1. package/components/AdvancedSearch/AdvancedSearch.d.ts +1 -1
  2. package/components/AdvancedSearch/AdvancedSearch.js.map +1 -1
  3. package/components/AdvancedSearch/AdvancedSearchPresenter.d.ts +1 -1
  4. package/components/AdvancedSearch/AdvancedSearchPresenter.js.map +1 -1
  5. package/components/AdvancedSearch/AdvancedSearchPresenter.test.js.map +1 -1
  6. package/components/AdvancedSearch/GraphQLInputMapper.d.ts +1 -1
  7. package/components/AdvancedSearch/GraphQLInputMapper.js.map +1 -1
  8. package/components/AdvancedSearch/GraphQLInputMapper.test.js.map +1 -1
  9. package/components/AdvancedSearch/QueryBuilderDrawer/QueryBuilder/QueryBuilder.d.ts +3 -3
  10. package/components/AdvancedSearch/QueryBuilderDrawer/QueryBuilder/QueryBuilder.js.map +1 -1
  11. package/components/AdvancedSearch/QueryBuilderDrawer/QueryBuilder/components/Filter.d.ts +1 -1
  12. package/components/AdvancedSearch/QueryBuilderDrawer/QueryBuilder/components/Filter.js.map +1 -1
  13. package/components/AdvancedSearch/QueryBuilderDrawer/QueryBuilder/components/InputField.d.ts +1 -1
  14. package/components/AdvancedSearch/QueryBuilderDrawer/QueryBuilder/components/InputField.js.map +1 -1
  15. package/components/AdvancedSearch/QueryBuilderDrawer/QueryBuilderDrawer.d.ts +1 -1
  16. package/components/AdvancedSearch/QueryBuilderDrawer/QueryBuilderDrawer.js.map +1 -1
  17. package/components/AdvancedSearch/QueryBuilderDrawer/QueryBuilderDrawerPresenter.d.ts +3 -2
  18. package/components/AdvancedSearch/QueryBuilderDrawer/QueryBuilderDrawerPresenter.js.map +1 -1
  19. package/components/AdvancedSearch/QueryBuilderDrawer/QueryBuilderDrawerPresenter.test.js.map +1 -1
  20. package/components/AdvancedSearch/QueryManagerDialog/components/FilterList.d.ts +1 -1
  21. package/components/AdvancedSearch/QueryManagerDialog/components/FilterList.js.map +1 -1
  22. package/components/AdvancedSearch/QuerySaverDialog/QuerySaverDialog.d.ts +1 -1
  23. package/components/AdvancedSearch/QuerySaverDialog/QuerySaverDialog.js.map +1 -1
  24. package/components/AdvancedSearch/QuerySaverDialog/QuerySaverDialogPresenter.d.ts +2 -2
  25. package/components/AdvancedSearch/QuerySaverDialog/QuerySaverDialogPresenter.js.map +1 -1
  26. package/components/AdvancedSearch/QuerySaverDialog/QuerySaverDialogPresenter.test.js.map +1 -1
  27. package/components/AdvancedSearch/SelectedFilter/SelectedFilter.d.ts +1 -1
  28. package/components/AdvancedSearch/SelectedFilter/SelectedFilter.js.map +1 -1
  29. package/components/AdvancedSearch/domain/Field.d.ts +1 -1
  30. package/components/AdvancedSearch/domain/Field.js.map +1 -1
  31. package/components/AdvancedSearch/domain/FieldMapper.d.ts +1 -1
  32. package/components/AdvancedSearch/domain/FieldMapper.js.map +1 -1
  33. package/components/AdvancedSearch/domain/FilterMapper.d.ts +1 -1
  34. package/components/AdvancedSearch/domain/FilterMapper.js.map +1 -1
  35. package/components/AdvancedSearch/domain/FilterRepository.d.ts +2 -2
  36. package/components/AdvancedSearch/domain/FilterRepository.js.map +1 -1
  37. package/components/AdvancedSearch/domain/FilterRepositoryFactory.d.ts +1 -1
  38. package/components/AdvancedSearch/domain/FilterRepositoryFactory.js.map +1 -1
  39. package/components/AdvancedSearch/gateways/FiltersGatewayInterface.d.ts +2 -2
  40. package/components/AdvancedSearch/gateways/FiltersGatewayInterface.js.map +1 -1
  41. package/components/AdvancedSearch/gateways/FiltersGraphQLGateway.d.ts +3 -3
  42. package/components/AdvancedSearch/gateways/FiltersGraphQLGateway.js.map +1 -1
  43. package/components/AdvancedSearch/gateways/filters.types.d.ts +2 -2
  44. package/components/AdvancedSearch/gateways/filters.types.js.map +1 -1
  45. package/components/AdvancedSearch/index.d.ts +2 -2
  46. package/components/AdvancedSearch/index.js.map +1 -1
  47. package/components/AdvancedSearch/useInputField.d.ts +1 -1
  48. package/components/AdvancedSearch/useInputField.js.map +1 -1
  49. package/components/FolderTree/List/List.d.ts +1 -1
  50. package/components/FolderTree/List/List.js +15 -1
  51. package/components/FolderTree/List/List.js.map +1 -1
  52. package/components/FolderTree/List/utils.d.ts +1 -1
  53. package/components/FolderTree/List/utils.js.map +1 -1
  54. package/components/FolderTree/MenuActions/MenuActions.js +2 -0
  55. package/components/FolderTree/MenuActions/MenuActions.js.map +1 -1
  56. package/components/FolderTree/index.d.ts +1 -1
  57. package/components/FolderTree/index.js.map +1 -1
  58. package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityDecorator.d.ts +2 -2
  59. package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityDecorator.js.map +1 -1
  60. package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityPresenter.d.ts +1 -1
  61. package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityPresenter.js.map +1 -1
  62. package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityPresenter.test.js.map +1 -1
  63. package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityRepository.d.ts +2 -2
  64. package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityRepository.js.map +1 -1
  65. package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityRepositoryFactory.d.ts +1 -1
  66. package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityRepositoryFactory.js.map +1 -1
  67. package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityUpdater.d.ts +2 -2
  68. package/components/Table/components/Table/ColumnVisibility/ColumnsVisibilityUpdater.js.map +1 -1
  69. package/components/Table/components/Table/Columns/Column.d.ts +2 -2
  70. package/components/Table/components/Table/Columns/Column.js.map +1 -1
  71. package/components/Table/components/Table/Columns/ColumnMapper.d.ts +2 -2
  72. package/components/Table/components/Table/Columns/ColumnMapper.js.map +1 -1
  73. package/components/Table/components/Table/Columns/ColumnsPresenter.d.ts +1 -1
  74. package/components/Table/components/Table/Columns/ColumnsPresenter.js.map +1 -1
  75. package/components/Table/components/Table/Columns/ColumnsPresenter.test.js.map +1 -1
  76. package/components/Table/components/Table/Columns/ColumnsRepository.d.ts +2 -2
  77. package/components/Table/components/Table/Columns/ColumnsRepository.js.map +1 -1
  78. package/components/Table/components/Table/Columns/ColumnsRepositoryFactory.d.ts +1 -1
  79. package/components/Table/components/Table/Columns/ColumnsRepositoryFactory.js.map +1 -1
  80. package/components/Table/components/Table/Columns/IColumnsRepository.d.ts +1 -1
  81. package/components/Table/components/Table/Columns/IColumnsRepository.js.map +1 -1
  82. package/components/Table/components/Table/Table.d.ts +4 -3
  83. package/components/Table/components/Table/Table.js.map +1 -1
  84. package/components/Table/components/Table/TableInner.d.ts +8 -6
  85. package/components/Table/components/Table/TableInner.js.map +1 -1
  86. package/components/Table/components/Table/TablePresenter.d.ts +1 -1
  87. package/components/Table/components/Table/TablePresenter.js.map +1 -1
  88. package/components/Table/components/Table/gateways/ColumnsVisibilityLocalStorageGateway.d.ts +1 -1
  89. package/components/Table/components/Table/gateways/ColumnsVisibilityLocalStorageGateway.js.map +1 -1
  90. package/components/Table/createTableData.d.ts +6 -6
  91. package/components/Table/createTableData.js +8 -8
  92. package/components/Table/createTableData.js.map +1 -1
  93. package/components/Table/useTableRow.d.ts +9 -4
  94. package/components/Table/useTableRow.js +10 -3
  95. package/components/Table/useTableRow.js.map +1 -1
  96. package/config/AcoConfig.d.ts +12 -7
  97. package/config/AcoConfig.js +0 -5
  98. package/config/AcoConfig.js.map +1 -1
  99. package/config/advanced-search/index.d.ts +1 -1
  100. package/config/advanced-search/index.js.map +1 -1
  101. package/config/folder/createFolderFieldDecoratorFactory.d.ts +1 -1
  102. package/config/folder/createFolderFieldDecoratorFactory.js.map +1 -1
  103. package/config/folder/index.d.ts +1 -1
  104. package/config/folder/index.js.map +1 -1
  105. package/config/record/index.d.ts +1 -1
  106. package/config/record/index.js.map +1 -1
  107. package/config/table/Column.d.ts +10 -4
  108. package/config/table/Column.js.map +1 -1
  109. package/config/table/index.d.ts +9 -4
  110. package/config/table/index.js.map +1 -1
  111. package/contexts/acoList.d.ts +1 -1
  112. package/contexts/acoList.js.map +1 -1
  113. package/contexts/app.d.ts +2 -2
  114. package/contexts/app.js.map +1 -1
  115. package/contexts/folder.d.ts +1 -1
  116. package/contexts/folder.js.map +1 -1
  117. package/contexts/folders.d.ts +2 -1
  118. package/contexts/folders.js.map +1 -1
  119. package/contexts/index.d.ts +1 -1
  120. package/contexts/index.js +1 -1
  121. package/contexts/index.js.map +1 -1
  122. package/contexts/records.d.ts +3 -2
  123. package/contexts/records.js.map +1 -1
  124. package/dialogs/DialogSetPermissions/UsersTeamsSelection/ListItemGraphic.d.ts +1 -1
  125. package/dialogs/DialogSetPermissions/UsersTeamsSelection/ListItemGraphic.js.map +1 -1
  126. package/dialogs/DialogSetPermissions/UsersTeamsSelection/ListItemMeta.d.ts +1 -1
  127. package/dialogs/DialogSetPermissions/UsersTeamsSelection/ListItemMeta.js.map +1 -1
  128. package/dialogs/DialogSetPermissions/UsersTeamsSelection/ListItemText.d.ts +1 -1
  129. package/dialogs/DialogSetPermissions/UsersTeamsSelection/ListItemText.js.map +1 -1
  130. package/dialogs/DialogSetPermissions/UsersTeamsSelection.d.ts +1 -1
  131. package/dialogs/DialogSetPermissions/UsersTeamsSelection.js.map +1 -1
  132. package/dialogs/useCreateDialog.js.map +1 -1
  133. package/dialogs/useDeleteDialog.d.ts +1 -1
  134. package/dialogs/useDeleteDialog.js.map +1 -1
  135. package/dialogs/useEditDialog.d.ts +1 -1
  136. package/dialogs/useEditDialog.js.map +1 -1
  137. package/dialogs/useMoveToFolderDialog.d.ts +3 -2
  138. package/dialogs/useMoveToFolderDialog.js.map +1 -1
  139. package/dialogs/useSetPermissionsDialog.d.ts +1 -1
  140. package/dialogs/useSetPermissionsDialog.js.map +1 -1
  141. package/features/folders/Folder.d.ts +1 -1
  142. package/features/folders/Folder.js.map +1 -1
  143. package/features/folders/cache/FoldersCacheFactory.d.ts +1 -1
  144. package/features/folders/cache/FoldersCacheFactory.js.map +1 -1
  145. package/features/folders/createFolder/CreateFolder.d.ts +2 -2
  146. package/features/folders/createFolder/CreateFolder.js.map +1 -1
  147. package/features/folders/createFolder/CreateFolderGqlGateway.d.ts +4 -4
  148. package/features/folders/createFolder/CreateFolderGqlGateway.js.map +1 -1
  149. package/features/folders/createFolder/CreateFolderRepository.d.ts +3 -3
  150. package/features/folders/createFolder/CreateFolderRepository.js.map +1 -1
  151. package/features/folders/createFolder/CreateFolderUseCase.d.ts +2 -2
  152. package/features/folders/createFolder/CreateFolderUseCase.js.map +1 -1
  153. package/features/folders/createFolder/CreateFolderUseCaseWithLoading.d.ts +2 -2
  154. package/features/folders/createFolder/CreateFolderUseCaseWithLoading.js.map +1 -1
  155. package/features/folders/createFolder/FolderDto.d.ts +1 -1
  156. package/features/folders/createFolder/FolderDto.js.map +1 -1
  157. package/features/folders/createFolder/FolderGqlDto.d.ts +1 -1
  158. package/features/folders/createFolder/FolderGqlDto.js.map +1 -1
  159. package/features/folders/createFolder/ICreateFolderGateway.d.ts +2 -2
  160. package/features/folders/createFolder/ICreateFolderGateway.js.map +1 -1
  161. package/features/folders/createFolder/ICreateFolderRepository.d.ts +1 -1
  162. package/features/folders/createFolder/ICreateFolderRepository.js.map +1 -1
  163. package/features/folders/createFolder/ICreateFolderUseCase.d.ts +1 -1
  164. package/features/folders/createFolder/ICreateFolderUseCase.js.map +1 -1
  165. package/features/folders/createFolder/useCreateFolder.d.ts +1 -1
  166. package/features/folders/createFolder/useCreateFolder.js.map +1 -1
  167. package/features/folders/deleteFolder/DeleteFolder.d.ts +2 -2
  168. package/features/folders/deleteFolder/DeleteFolder.js.map +1 -1
  169. package/features/folders/deleteFolder/DeleteFolderGqlGateway.d.ts +3 -3
  170. package/features/folders/deleteFolder/DeleteFolderGqlGateway.js.map +1 -1
  171. package/features/folders/deleteFolder/DeleteFolderRepository.d.ts +4 -4
  172. package/features/folders/deleteFolder/DeleteFolderRepository.js.map +1 -1
  173. package/features/folders/deleteFolder/DeleteFolderUseCase.d.ts +2 -2
  174. package/features/folders/deleteFolder/DeleteFolderUseCase.js.map +1 -1
  175. package/features/folders/deleteFolder/DeleteFolderUseCaseWithLoading.d.ts +2 -2
  176. package/features/folders/deleteFolder/DeleteFolderUseCaseWithLoading.js.map +1 -1
  177. package/features/folders/deleteFolder/IDeleteFolderRepository.d.ts +1 -1
  178. package/features/folders/deleteFolder/IDeleteFolderRepository.js.map +1 -1
  179. package/features/folders/deleteFolder/IDeleteFolderUseCase.d.ts +1 -1
  180. package/features/folders/deleteFolder/IDeleteFolderUseCase.js.map +1 -1
  181. package/features/folders/deleteFolder/useDeleteFolder.d.ts +1 -1
  182. package/features/folders/deleteFolder/useDeleteFolder.js.map +1 -1
  183. package/features/folders/getDescendantFolders/FolderDto.d.ts +1 -1
  184. package/features/folders/getDescendantFolders/FolderDto.js.map +1 -1
  185. package/features/folders/getDescendantFolders/GetDescendantFolders.d.ts +1 -1
  186. package/features/folders/getDescendantFolders/GetDescendantFolders.js.map +1 -1
  187. package/features/folders/getDescendantFolders/GetDescendantFoldersRepository.d.ts +3 -3
  188. package/features/folders/getDescendantFolders/GetDescendantFoldersRepository.js.map +1 -1
  189. package/features/folders/getDescendantFolders/GetDescendantFoldersUseCase.d.ts +2 -2
  190. package/features/folders/getDescendantFolders/GetDescendantFoldersUseCase.js.map +1 -1
  191. package/features/folders/getDescendantFolders/IGetDescendantFoldersRepository.d.ts +1 -1
  192. package/features/folders/getDescendantFolders/IGetDescendantFoldersRepository.js.map +1 -1
  193. package/features/folders/getDescendantFolders/IGetDescendantFoldersUseCase.d.ts +1 -1
  194. package/features/folders/getDescendantFolders/IGetDescendantFoldersUseCase.js.map +1 -1
  195. package/features/folders/getFolder/GetFolder.d.ts +2 -2
  196. package/features/folders/getFolder/GetFolder.js.map +1 -1
  197. package/features/folders/getFolder/GetFolderGqlGateway.d.ts +3 -3
  198. package/features/folders/getFolder/GetFolderGqlGateway.js.map +1 -1
  199. package/features/folders/getFolder/GetFolderRepository.d.ts +3 -3
  200. package/features/folders/getFolder/GetFolderRepository.js.map +1 -1
  201. package/features/folders/getFolder/GetFolderUseCase.d.ts +2 -2
  202. package/features/folders/getFolder/GetFolderUseCase.js.map +1 -1
  203. package/features/folders/getFolder/GetFolderUseCaseWithLoading.d.ts +2 -2
  204. package/features/folders/getFolder/GetFolderUseCaseWithLoading.js.map +1 -1
  205. package/features/folders/getFolder/IGetFolderGateway.d.ts +1 -1
  206. package/features/folders/getFolder/IGetFolderGateway.js.map +1 -1
  207. package/features/folders/getFolder/useGetFolder.d.ts +1 -1
  208. package/features/folders/getFolder/useGetFolder.js.map +1 -1
  209. package/features/folders/getFolderAncestors/FolderDto.d.ts +9 -0
  210. package/features/folders/getFolderAncestors/FolderDto.js +3 -0
  211. package/features/folders/getFolderAncestors/FolderDto.js.map +1 -0
  212. package/features/folders/getFolderAncestors/GetFolderAncestors.d.ts +4 -0
  213. package/features/folders/getFolderAncestors/GetFolderAncestors.js +12 -0
  214. package/features/folders/getFolderAncestors/GetFolderAncestors.js.map +1 -0
  215. package/features/folders/getFolderAncestors/GetFolderAncestors.test.d.ts +1 -0
  216. package/features/folders/getFolderAncestors/GetFolderAncestors.test.js +97 -0
  217. package/features/folders/getFolderAncestors/GetFolderAncestors.test.js.map +1 -0
  218. package/features/folders/getFolderAncestors/GetFolderAncestorsRepository.d.ts +7 -0
  219. package/features/folders/getFolderAncestors/GetFolderAncestorsRepository.js +25 -0
  220. package/features/folders/getFolderAncestors/GetFolderAncestorsRepository.js.map +1 -0
  221. package/features/folders/getFolderAncestors/GetFolderAncestorsUseCase.d.ts +14 -0
  222. package/features/folders/getFolderAncestors/GetFolderAncestorsUseCase.js +18 -0
  223. package/features/folders/getFolderAncestors/GetFolderAncestorsUseCase.js.map +1 -0
  224. package/features/folders/getFolderAncestors/IGetFolderAncestorsRepository.d.ts +4 -0
  225. package/features/folders/getFolderAncestors/IGetFolderAncestorsRepository.js +3 -0
  226. package/features/folders/getFolderAncestors/IGetFolderAncestorsRepository.js.map +1 -0
  227. package/features/folders/getFolderAncestors/IGetFolderAncestorsUseCase.d.ts +7 -0
  228. package/features/folders/getFolderAncestors/IGetFolderAncestorsUseCase.js +3 -0
  229. package/features/folders/getFolderAncestors/IGetFolderAncestorsUseCase.js.map +1 -0
  230. package/features/folders/getFolderAncestors/index.d.ts +1 -0
  231. package/features/folders/getFolderAncestors/index.js +3 -0
  232. package/features/folders/getFolderAncestors/index.js.map +1 -0
  233. package/features/folders/getFolderAncestors/useGetFolderAncestors.d.ts +3 -0
  234. package/features/folders/getFolderAncestors/useGetFolderAncestors.js +17 -0
  235. package/features/folders/getFolderAncestors/useGetFolderAncestors.js.map +1 -0
  236. package/features/folders/getFolderExtensionsFields/IGetFolderExtensionsFieldsRepository.d.ts +1 -1
  237. package/features/folders/getFolderExtensionsFields/IGetFolderExtensionsFieldsRepository.js.map +1 -1
  238. package/features/folders/getFolderExtensionsFields/IGetFolderExtensionsFieldsUseCase.d.ts +1 -1
  239. package/features/folders/getFolderExtensionsFields/IGetFolderExtensionsFieldsUseCase.js.map +1 -1
  240. package/features/folders/getFolderHierarchy/FolderDto.d.ts +2 -2
  241. package/features/folders/getFolderHierarchy/FolderDto.js.map +1 -1
  242. package/features/folders/getFolderHierarchy/FolderGqlDto.d.ts +1 -1
  243. package/features/folders/getFolderHierarchy/FolderGqlDto.js.map +1 -1
  244. package/features/folders/getFolderHierarchy/GetFolderHierarchy.d.ts +5 -5
  245. package/features/folders/getFolderHierarchy/GetFolderHierarchy.js.map +1 -1
  246. package/features/folders/getFolderHierarchy/GetFolderHierarchyGqlGateway.d.ts +3 -3
  247. package/features/folders/getFolderHierarchy/GetFolderHierarchyGqlGateway.js.map +1 -1
  248. package/features/folders/getFolderHierarchy/GetFolderHierarchyRepository.d.ts +3 -3
  249. package/features/folders/getFolderHierarchy/GetFolderHierarchyRepository.js.map +1 -1
  250. package/features/folders/getFolderHierarchy/GetFolderHierarchyUseCase.d.ts +2 -2
  251. package/features/folders/getFolderHierarchy/GetFolderHierarchyUseCase.js.map +1 -1
  252. package/features/folders/getFolderHierarchy/GetFolderHierarchyUseCaseWithLoading.d.ts +2 -2
  253. package/features/folders/getFolderHierarchy/GetFolderHierarchyUseCaseWithLoading.js.map +1 -1
  254. package/features/folders/getFolderHierarchy/IGetFolderHierarchyGateway.d.ts +1 -1
  255. package/features/folders/getFolderHierarchy/IGetFolderHierarchyGateway.js.map +1 -1
  256. package/features/folders/getFolderHierarchy/useGetFolderHierarchy.d.ts +1 -1
  257. package/features/folders/getFolderHierarchy/useGetFolderHierarchy.js.map +1 -1
  258. package/features/folders/getFolderLevelPermission/GetFolderLevelPermission.d.ts +2 -2
  259. package/features/folders/getFolderLevelPermission/GetFolderLevelPermission.js.map +1 -1
  260. package/features/folders/getFolderLevelPermission/GetFolderLevelPermissionRepository.d.ts +4 -4
  261. package/features/folders/getFolderLevelPermission/GetFolderLevelPermissionRepository.js.map +1 -1
  262. package/features/folders/getFolderLevelPermission/GetFolderLevelPermissionUseCase.d.ts +1 -1
  263. package/features/folders/getFolderLevelPermission/GetFolderLevelPermissionUseCase.js.map +1 -1
  264. package/features/folders/getFolderLevelPermission/GetFolderLevelPermissionWithFlpUseCase.d.ts +2 -2
  265. package/features/folders/getFolderLevelPermission/GetFolderLevelPermissionWithFlpUseCase.js.map +1 -1
  266. package/features/folders/getFolderLevelPermission/useGetFolderLevelPermission.d.ts +1 -1
  267. package/features/folders/getFolderLevelPermission/useGetFolderLevelPermission.js.map +1 -1
  268. package/features/folders/getFolderModel/FolderModelContext.js.map +1 -1
  269. package/features/folders/getFolderModel/FolderModelDto.d.ts +1 -1
  270. package/features/folders/getFolderModel/FolderModelDto.js.map +1 -1
  271. package/features/folders/getFolderModel/GetFolderModel.d.ts +3 -3
  272. package/features/folders/getFolderModel/GetFolderModel.js.map +1 -1
  273. package/features/folders/getFolderModel/GetFolderModelGqlGateway.d.ts +4 -4
  274. package/features/folders/getFolderModel/GetFolderModelGqlGateway.js.map +1 -1
  275. package/features/folders/getFolderModel/GetFolderModelRepository.d.ts +2 -2
  276. package/features/folders/getFolderModel/GetFolderModelRepository.js.map +1 -1
  277. package/features/folders/getFolderModel/GetFolderModelUseCase.d.ts +2 -2
  278. package/features/folders/getFolderModel/GetFolderModelUseCase.js.map +1 -1
  279. package/features/folders/getFolderModel/IGetFolderModelGateway.d.ts +1 -1
  280. package/features/folders/getFolderModel/IGetFolderModelGateway.js.map +1 -1
  281. package/features/folders/getFolderModel/IGetFolderModelRepository.d.ts +1 -1
  282. package/features/folders/getFolderModel/IGetFolderModelRepository.js.map +1 -1
  283. package/features/folders/index.d.ts +1 -0
  284. package/features/folders/index.js +1 -0
  285. package/features/folders/index.js.map +1 -1
  286. package/features/folders/listFolders/FolderDto.d.ts +2 -2
  287. package/features/folders/listFolders/FolderDto.js.map +1 -1
  288. package/features/folders/listFolders/FolderGqlDto.d.ts +1 -1
  289. package/features/folders/listFolders/FolderGqlDto.js.map +1 -1
  290. package/features/folders/listFolders/IListFoldersGateway.d.ts +1 -1
  291. package/features/folders/listFolders/IListFoldersGateway.js.map +1 -1
  292. package/features/folders/listFolders/ListFolders.d.ts +5 -5
  293. package/features/folders/listFolders/ListFolders.js.map +1 -1
  294. package/features/folders/listFolders/ListFoldersCompressedGqlGateway.d.ts +3 -3
  295. package/features/folders/listFolders/ListFoldersCompressedGqlGateway.js.map +1 -1
  296. package/features/folders/listFolders/ListFoldersGqlGateway.d.ts +3 -3
  297. package/features/folders/listFolders/ListFoldersGqlGateway.js.map +1 -1
  298. package/features/folders/listFolders/ListFoldersRepository.d.ts +3 -3
  299. package/features/folders/listFolders/ListFoldersRepository.js.map +1 -1
  300. package/features/folders/listFolders/ListFoldersUseCase.d.ts +2 -2
  301. package/features/folders/listFolders/ListFoldersUseCase.js.map +1 -1
  302. package/features/folders/listFolders/ListFoldersUseCaseWithLoading.d.ts +2 -2
  303. package/features/folders/listFolders/ListFoldersUseCaseWithLoading.js.map +1 -1
  304. package/features/folders/listFolders/useListFolders.d.ts +1 -1
  305. package/features/folders/listFolders/useListFolders.js.map +1 -1
  306. package/features/folders/listFoldersByParentIds/FolderDto.d.ts +2 -2
  307. package/features/folders/listFoldersByParentIds/FolderDto.js.map +1 -1
  308. package/features/folders/listFoldersByParentIds/FolderGqlDto.d.ts +1 -1
  309. package/features/folders/listFoldersByParentIds/FolderGqlDto.js.map +1 -1
  310. package/features/folders/listFoldersByParentIds/IListFoldersByParentIdsGateway.d.ts +1 -1
  311. package/features/folders/listFoldersByParentIds/IListFoldersByParentIdsGateway.js.map +1 -1
  312. package/features/folders/listFoldersByParentIds/ListFoldersByParentIds.d.ts +5 -5
  313. package/features/folders/listFoldersByParentIds/ListFoldersByParentIds.js.map +1 -1
  314. package/features/folders/listFoldersByParentIds/ListFoldersByParentIdsGqlGateway.d.ts +3 -3
  315. package/features/folders/listFoldersByParentIds/ListFoldersByParentIdsGqlGateway.js.map +1 -1
  316. package/features/folders/listFoldersByParentIds/ListFoldersByParentIdsRepository.d.ts +3 -3
  317. package/features/folders/listFoldersByParentIds/ListFoldersByParentIdsRepository.js.map +1 -1
  318. package/features/folders/listFoldersByParentIds/ListFoldersByParentIdsRepositoryWithLoadedCache.d.ts +2 -2
  319. package/features/folders/listFoldersByParentIds/ListFoldersByParentIdsRepositoryWithLoadedCache.js.map +1 -1
  320. package/features/folders/listFoldersByParentIds/ListFoldersByParentIdsUseCase.d.ts +2 -2
  321. package/features/folders/listFoldersByParentIds/ListFoldersByParentIdsUseCase.js.map +1 -1
  322. package/features/folders/listFoldersByParentIds/ListFoldersByParentIdsUseCaseWithLoading.d.ts +3 -3
  323. package/features/folders/listFoldersByParentIds/ListFoldersByParentIdsUseCaseWithLoading.js.map +1 -1
  324. package/features/folders/listFoldersByParentIds/useListFoldersByParentIds.d.ts +1 -1
  325. package/features/folders/listFoldersByParentIds/useListFoldersByParentIds.js.map +1 -1
  326. package/features/folders/updateFolder/FolderDto.d.ts +1 -1
  327. package/features/folders/updateFolder/FolderDto.js.map +1 -1
  328. package/features/folders/updateFolder/FolderGqlDto.d.ts +1 -1
  329. package/features/folders/updateFolder/FolderGqlDto.js.map +1 -1
  330. package/features/folders/updateFolder/IUpdateFolderGateway.d.ts +2 -2
  331. package/features/folders/updateFolder/IUpdateFolderGateway.js.map +1 -1
  332. package/features/folders/updateFolder/IUpdateFolderRepository.d.ts +1 -1
  333. package/features/folders/updateFolder/IUpdateFolderRepository.js.map +1 -1
  334. package/features/folders/updateFolder/IUpdateFolderUseCase.d.ts +1 -1
  335. package/features/folders/updateFolder/IUpdateFolderUseCase.js.map +1 -1
  336. package/features/folders/updateFolder/UpdateFolder.d.ts +2 -2
  337. package/features/folders/updateFolder/UpdateFolder.js.map +1 -1
  338. package/features/folders/updateFolder/UpdateFolder.test.js.map +1 -1
  339. package/features/folders/updateFolder/UpdateFolderGqlGateway.d.ts +4 -4
  340. package/features/folders/updateFolder/UpdateFolderGqlGateway.js.map +1 -1
  341. package/features/folders/updateFolder/UpdateFolderRepository.d.ts +3 -3
  342. package/features/folders/updateFolder/UpdateFolderRepository.js.map +1 -1
  343. package/features/folders/updateFolder/UpdateFolderRepositoryWithPathChange.d.ts +2 -2
  344. package/features/folders/updateFolder/UpdateFolderRepositoryWithPathChange.js.map +1 -1
  345. package/features/folders/updateFolder/UpdateFolderRepositoryWithPermissionsChange.d.ts +2 -2
  346. package/features/folders/updateFolder/UpdateFolderRepositoryWithPermissionsChange.js.map +1 -1
  347. package/features/folders/updateFolder/UpdateFolderUseCase.d.ts +2 -2
  348. package/features/folders/updateFolder/UpdateFolderUseCase.js.map +1 -1
  349. package/features/folders/updateFolder/UpdateFolderUseCaseWithLoading.d.ts +2 -2
  350. package/features/folders/updateFolder/UpdateFolderUseCaseWithLoading.js.map +1 -1
  351. package/features/folders/updateFolder/UpdateFolderUseCaseWithoutInheritedPermissions.d.ts +1 -1
  352. package/features/folders/updateFolder/UpdateFolderUseCaseWithoutInheritedPermissions.js.map +1 -1
  353. package/features/folders/updateFolder/useUpdateFolder.d.ts +1 -1
  354. package/features/folders/updateFolder/useUpdateFolder.js.map +1 -1
  355. package/graphql/app.gql.d.ts +1 -1
  356. package/graphql/app.gql.js.map +1 -1
  357. package/graphql/records/common.d.ts +1 -1
  358. package/graphql/records/common.js.map +1 -1
  359. package/graphql/records/createRecord.d.ts +1 -1
  360. package/graphql/records/createRecord.js.map +1 -1
  361. package/graphql/records/deleteRecord.d.ts +1 -1
  362. package/graphql/records/deleteRecord.js.map +1 -1
  363. package/graphql/records/getRecord.d.ts +1 -1
  364. package/graphql/records/getRecord.js.map +1 -1
  365. package/graphql/records/listRecords.d.ts +1 -1
  366. package/graphql/records/listRecords.js.map +1 -1
  367. package/graphql/records/listTags.d.ts +1 -1
  368. package/graphql/records/listTags.js.map +1 -1
  369. package/graphql/records/moveRecord.d.ts +1 -1
  370. package/graphql/records/moveRecord.js.map +1 -1
  371. package/graphql/records/types.d.ts +1 -1
  372. package/graphql/records/types.js.map +1 -1
  373. package/graphql/records/updateRecord.d.ts +1 -1
  374. package/graphql/records/updateRecord.js.map +1 -1
  375. package/handlers.d.ts +4 -4
  376. package/handlers.js.map +1 -1
  377. package/hooks/useAcoApp.d.ts +1 -1
  378. package/hooks/useAcoApp.js.map +1 -1
  379. package/hooks/useAcoList.d.ts +2 -2
  380. package/hooks/useAcoList.js.map +1 -1
  381. package/hooks/useRecords.d.ts +2 -2
  382. package/hooks/useRecords.js.map +1 -1
  383. package/hooks/useTags.d.ts +1 -1
  384. package/hooks/useTags.js.map +1 -1
  385. package/index.d.ts +2 -0
  386. package/index.js +1 -0
  387. package/index.js.map +1 -1
  388. package/package.json +18 -18
  389. package/sorting.d.ts +1 -1
  390. package/sorting.js.map +1 -1
  391. package/table.types.d.ts +6 -4
  392. package/table.types.js.map +1 -1
  393. package/types.d.ts +2 -2
  394. package/types.js +0 -1
  395. package/types.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["plugins","ERROR_FIELD","defaultFields","createFieldsList","model","fields","fieldPlugins","byType","reduce","acc","item","field","type","collection","console","log","graphql","queryField","selection","push","fieldId","join","createAppFields","LIST_META_FIELD"],"sources":["common.ts"],"sourcesContent":["import { AcoModel, AcoModelField } from \"~/types\";\nimport { plugins } from \"@webiny/plugins\";\n\nexport const ERROR_FIELD = /* GraphQL */ `\n error {\n code\n data\n message\n }\n`;\ninterface CreateFieldsListParams {\n model: AcoModel;\n fields: AcoModelField[];\n}\n\nconst defaultFields = [\n \"id\",\n \"createdOn\",\n \"savedOn\",\n \"modifiedOn\",\n \"createdBy {id type displayName}\",\n \"savedBy {id type displayName}\",\n \"modifiedBy {id type displayName}\"\n];\n\nconst createFieldsList = ({ model, fields }: CreateFieldsListParams): string => {\n const fieldPlugins: Record<string, any> = plugins\n .byType(\"cms-editor-field-type\")\n .reduce((acc: any, item: any) => ({ ...acc, [item.field.type]: item.field }), {});\n\n return fields\n .reduce<string[]>(\n (collection, field) => {\n if (!fieldPlugins[field.type]) {\n console.log(`Unknown field plugin for field type \"${field.type}\".`);\n return collection;\n }\n const { graphql } = fieldPlugins[field.type];\n\n if (graphql && graphql.queryField) {\n const { queryField } = graphql;\n const selection =\n typeof queryField === \"string\" ? queryField : queryField({ model, field });\n\n collection.push(`${field.fieldId} ${selection}`);\n return collection;\n }\n\n collection.push(field.fieldId);\n\n return collection;\n },\n [...defaultFields]\n )\n .join(\"\\n\");\n};\n\nexport const createAppFields = (model: AcoModel) => {\n return createFieldsList({\n model,\n fields: model.fields\n });\n};\n\nexport const LIST_META_FIELD = /* GraphQL */ `\n meta {\n cursor\n totalCount\n hasMoreItems\n }\n`;\n"],"mappings":"AACA,SAASA,OAAO,QAAQ,iBAAiB;AAEzC,OAAO,MAAMC,WAAW,GAAG,aAAc;AACzC;AACA;AACA;AACA;AACA;AACA,CAAC;AAMD,MAAMC,aAAa,GAAG,CAClB,IAAI,EACJ,WAAW,EACX,SAAS,EACT,YAAY,EACZ,iCAAiC,EACjC,+BAA+B,EAC/B,kCAAkC,CACrC;AAED,MAAMC,gBAAgB,GAAGA,CAAC;EAAEC,KAAK;EAAEC;AAA+B,CAAC,KAAa;EAC5E,MAAMC,YAAiC,GAAGN,OAAO,CAC5CO,MAAM,CAAC,uBAAuB,CAAC,CAC/BC,MAAM,CAAC,CAACC,GAAQ,EAAEC,IAAS,MAAM;IAAE,GAAGD,GAAG;IAAE,CAACC,IAAI,CAACC,KAAK,CAACC,IAAI,GAAGF,IAAI,CAACC;EAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;EAErF,OAAON,MAAM,CACRG,MAAM,CACH,CAACK,UAAU,EAAEF,KAAK,KAAK;IACnB,IAAI,CAACL,YAAY,CAACK,KAAK,CAACC,IAAI,CAAC,EAAE;MAC3BE,OAAO,CAACC,GAAG,CAAC,wCAAwCJ,KAAK,CAACC,IAAI,IAAI,CAAC;MACnE,OAAOC,UAAU;IACrB;IACA,MAAM;MAAEG;IAAQ,CAAC,GAAGV,YAAY,CAACK,KAAK,CAACC,IAAI,CAAC;IAE5C,IAAII,OAAO,IAAIA,OAAO,CAACC,UAAU,EAAE;MAC/B,MAAM;QAAEA;MAAW,CAAC,GAAGD,OAAO;MAC9B,MAAME,SAAS,GACX,OAAOD,UAAU,KAAK,QAAQ,GAAGA,UAAU,GAAGA,UAAU,CAAC;QAAEb,KAAK;QAAEO;MAAM,CAAC,CAAC;MAE9EE,UAAU,CAACM,IAAI,CAAC,GAAGR,KAAK,CAACS,OAAO,IAAIF,SAAS,EAAE,CAAC;MAChD,OAAOL,UAAU;IACrB;IAEAA,UAAU,CAACM,IAAI,CAACR,KAAK,CAACS,OAAO,CAAC;IAE9B,OAAOP,UAAU;EACrB,CAAC,EACD,CAAC,GAAGX,aAAa,CACrB,CAAC,CACAmB,IAAI,CAAC,IAAI,CAAC;AACnB,CAAC;AAED,OAAO,MAAMC,eAAe,GAAIlB,KAAe,IAAK;EAChD,OAAOD,gBAAgB,CAAC;IACpBC,KAAK;IACLC,MAAM,EAAED,KAAK,CAACC;EAClB,CAAC,CAAC;AACN,CAAC;AAED,OAAO,MAAMkB,eAAe,GAAG,aAAc;AAC7C;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["plugins","ERROR_FIELD","defaultFields","createFieldsList","model","fields","fieldPlugins","byType","reduce","acc","item","field","type","collection","console","log","graphql","queryField","selection","push","fieldId","join","createAppFields","LIST_META_FIELD"],"sources":["common.ts"],"sourcesContent":["import type { AcoModel, AcoModelField } from \"~/types\";\nimport { plugins } from \"@webiny/plugins\";\n\nexport const ERROR_FIELD = /* GraphQL */ `\n error {\n code\n data\n message\n }\n`;\ninterface CreateFieldsListParams {\n model: AcoModel;\n fields: AcoModelField[];\n}\n\nconst defaultFields = [\n \"id\",\n \"createdOn\",\n \"savedOn\",\n \"modifiedOn\",\n \"createdBy {id type displayName}\",\n \"savedBy {id type displayName}\",\n \"modifiedBy {id type displayName}\"\n];\n\nconst createFieldsList = ({ model, fields }: CreateFieldsListParams): string => {\n const fieldPlugins: Record<string, any> = plugins\n .byType(\"cms-editor-field-type\")\n .reduce((acc: any, item: any) => ({ ...acc, [item.field.type]: item.field }), {});\n\n return fields\n .reduce<string[]>(\n (collection, field) => {\n if (!fieldPlugins[field.type]) {\n console.log(`Unknown field plugin for field type \"${field.type}\".`);\n return collection;\n }\n const { graphql } = fieldPlugins[field.type];\n\n if (graphql && graphql.queryField) {\n const { queryField } = graphql;\n const selection =\n typeof queryField === \"string\" ? queryField : queryField({ model, field });\n\n collection.push(`${field.fieldId} ${selection}`);\n return collection;\n }\n\n collection.push(field.fieldId);\n\n return collection;\n },\n [...defaultFields]\n )\n .join(\"\\n\");\n};\n\nexport const createAppFields = (model: AcoModel) => {\n return createFieldsList({\n model,\n fields: model.fields\n });\n};\n\nexport const LIST_META_FIELD = /* GraphQL */ `\n meta {\n cursor\n totalCount\n hasMoreItems\n }\n`;\n"],"mappings":"AACA,SAASA,OAAO,QAAQ,iBAAiB;AAEzC,OAAO,MAAMC,WAAW,GAAG,aAAc;AACzC;AACA;AACA;AACA;AACA;AACA,CAAC;AAMD,MAAMC,aAAa,GAAG,CAClB,IAAI,EACJ,WAAW,EACX,SAAS,EACT,YAAY,EACZ,iCAAiC,EACjC,+BAA+B,EAC/B,kCAAkC,CACrC;AAED,MAAMC,gBAAgB,GAAGA,CAAC;EAAEC,KAAK;EAAEC;AAA+B,CAAC,KAAa;EAC5E,MAAMC,YAAiC,GAAGN,OAAO,CAC5CO,MAAM,CAAC,uBAAuB,CAAC,CAC/BC,MAAM,CAAC,CAACC,GAAQ,EAAEC,IAAS,MAAM;IAAE,GAAGD,GAAG;IAAE,CAACC,IAAI,CAACC,KAAK,CAACC,IAAI,GAAGF,IAAI,CAACC;EAAM,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;EAErF,OAAON,MAAM,CACRG,MAAM,CACH,CAACK,UAAU,EAAEF,KAAK,KAAK;IACnB,IAAI,CAACL,YAAY,CAACK,KAAK,CAACC,IAAI,CAAC,EAAE;MAC3BE,OAAO,CAACC,GAAG,CAAC,wCAAwCJ,KAAK,CAACC,IAAI,IAAI,CAAC;MACnE,OAAOC,UAAU;IACrB;IACA,MAAM;MAAEG;IAAQ,CAAC,GAAGV,YAAY,CAACK,KAAK,CAACC,IAAI,CAAC;IAE5C,IAAII,OAAO,IAAIA,OAAO,CAACC,UAAU,EAAE;MAC/B,MAAM;QAAEA;MAAW,CAAC,GAAGD,OAAO;MAC9B,MAAME,SAAS,GACX,OAAOD,UAAU,KAAK,QAAQ,GAAGA,UAAU,GAAGA,UAAU,CAAC;QAAEb,KAAK;QAAEO;MAAM,CAAC,CAAC;MAE9EE,UAAU,CAACM,IAAI,CAAC,GAAGR,KAAK,CAACS,OAAO,IAAIF,SAAS,EAAE,CAAC;MAChD,OAAOL,UAAU;IACrB;IAEAA,UAAU,CAACM,IAAI,CAACR,KAAK,CAACS,OAAO,CAAC;IAE9B,OAAOP,UAAU;EACrB,CAAC,EACD,CAAC,GAAGX,aAAa,CACrB,CAAC,CACAmB,IAAI,CAAC,IAAI,CAAC;AACnB,CAAC;AAED,OAAO,MAAMC,eAAe,GAAIlB,KAAe,IAAK;EAChD,OAAOD,gBAAgB,CAAC;IACpBC,KAAK;IACLC,MAAM,EAAED,KAAK,CAACC;EAClB,CAAC,CAAC;AACN,CAAC;AAED,OAAO,MAAMkB,eAAe,GAAG,aAAc;AAC7C;AACA;AACA;AACA;AACA;AACA,CAAC","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import { AcoAppMode, AcoModel } from "../../types";
1
+ import type { AcoAppMode, AcoModel } from "../../types";
2
2
  export declare const createCreateRecord: (model: AcoModel, mode: AcoAppMode) => import("graphql").DocumentNode | null;
@@ -1 +1 @@
1
- {"version":3,"names":["gql","createAppFields","ERROR_FIELD","createCreateRecord","model","mode","singularApiName"],"sources":["createRecord.ts"],"sourcesContent":["import gql from \"graphql-tag\";\nimport { AcoAppMode, AcoModel } from \"~/types\";\nimport { createAppFields, ERROR_FIELD } from \"./common\";\n\nexport const createCreateRecord = (model: AcoModel, mode: AcoAppMode) => {\n if (mode === \"cms\") {\n return null;\n }\n const { singularApiName } = model;\n return gql`\n mutation Create${singularApiName}($data: ${singularApiName}CreateInput!) {\n search {\n content: create${singularApiName}(data: $data) {\n data {\n ${createAppFields(model)}\n }\n ${ERROR_FIELD}\n }\n }\n }\n `;\n};\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,aAAa;AAE7B,SAASC,eAAe,EAAEC,WAAW;AAErC,OAAO,MAAMC,kBAAkB,GAAGA,CAACC,KAAe,EAAEC,IAAgB,KAAK;EACrE,IAAIA,IAAI,KAAK,KAAK,EAAE;IAChB,OAAO,IAAI;EACf;EACA,MAAM;IAAEC;EAAgB,CAAC,GAAGF,KAAK;EACjC,OAAOJ,GAAG;AACd,yBAAyBM,eAAe,WAAWA,eAAe;AAClE;AACA,iCAAiCA,eAAe;AAChD;AACA,0BAA0BL,eAAe,CAACG,KAAK,CAAC;AAChD;AACA,sBAAsBF,WAAW;AACjC;AACA;AACA;AACA,KAAK;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["gql","createAppFields","ERROR_FIELD","createCreateRecord","model","mode","singularApiName"],"sources":["createRecord.ts"],"sourcesContent":["import gql from \"graphql-tag\";\nimport type { AcoAppMode, AcoModel } from \"~/types\";\nimport { createAppFields, ERROR_FIELD } from \"./common\";\n\nexport const createCreateRecord = (model: AcoModel, mode: AcoAppMode) => {\n if (mode === \"cms\") {\n return null;\n }\n const { singularApiName } = model;\n return gql`\n mutation Create${singularApiName}($data: ${singularApiName}CreateInput!) {\n search {\n content: create${singularApiName}(data: $data) {\n data {\n ${createAppFields(model)}\n }\n ${ERROR_FIELD}\n }\n }\n }\n `;\n};\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,aAAa;AAE7B,SAASC,eAAe,EAAEC,WAAW;AAErC,OAAO,MAAMC,kBAAkB,GAAGA,CAACC,KAAe,EAAEC,IAAgB,KAAK;EACrE,IAAIA,IAAI,KAAK,KAAK,EAAE;IAChB,OAAO,IAAI;EACf;EACA,MAAM;IAAEC;EAAgB,CAAC,GAAGF,KAAK;EACjC,OAAOJ,GAAG;AACd,yBAAyBM,eAAe,WAAWA,eAAe;AAClE;AACA,iCAAiCA,eAAe;AAChD;AACA,0BAA0BL,eAAe,CAACG,KAAK,CAAC;AAChD;AACA,sBAAsBF,WAAW;AACjC;AACA;AACA;AACA,KAAK;AACL,CAAC","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import { AcoAppMode, AcoModel } from "../../types";
1
+ import type { AcoAppMode, AcoModel } from "../../types";
2
2
  export declare const createDeleteRecord: (model: AcoModel, mode: AcoAppMode) => import("graphql").DocumentNode | null;
@@ -1 +1 @@
1
- {"version":3,"names":["gql","ERROR_FIELD","createDeleteRecord","model","mode","singularApiName"],"sources":["deleteRecord.ts"],"sourcesContent":["import gql from \"graphql-tag\";\nimport { AcoAppMode, AcoModel } from \"~/types\";\nimport { ERROR_FIELD } from \"./common\";\n\nexport const createDeleteRecord = (model: AcoModel, mode: AcoAppMode) => {\n if (mode === \"cms\") {\n return null;\n }\n const { singularApiName } = model;\n return gql`\n mutation Delete${singularApiName}($id: ID!) {\n search {\n content: delete${singularApiName}(id: $id) {\n data\n ${ERROR_FIELD}\n }\n }\n }\n `;\n};\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,aAAa;AAE7B,SAASC,WAAW;AAEpB,OAAO,MAAMC,kBAAkB,GAAGA,CAACC,KAAe,EAAEC,IAAgB,KAAK;EACrE,IAAIA,IAAI,KAAK,KAAK,EAAE;IAChB,OAAO,IAAI;EACf;EACA,MAAM;IAAEC;EAAgB,CAAC,GAAGF,KAAK;EACjC,OAAOH,GAAG;AACd,yBAAyBK,eAAe;AACxC;AACA,iCAAiCA,eAAe;AAChD;AACA,sBAAsBJ,WAAW;AACjC;AACA;AACA;AACA,KAAK;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["gql","ERROR_FIELD","createDeleteRecord","model","mode","singularApiName"],"sources":["deleteRecord.ts"],"sourcesContent":["import gql from \"graphql-tag\";\nimport type { AcoAppMode, AcoModel } from \"~/types\";\nimport { ERROR_FIELD } from \"./common\";\n\nexport const createDeleteRecord = (model: AcoModel, mode: AcoAppMode) => {\n if (mode === \"cms\") {\n return null;\n }\n const { singularApiName } = model;\n return gql`\n mutation Delete${singularApiName}($id: ID!) {\n search {\n content: delete${singularApiName}(id: $id) {\n data\n ${ERROR_FIELD}\n }\n }\n }\n `;\n};\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,aAAa;AAE7B,SAASC,WAAW;AAEpB,OAAO,MAAMC,kBAAkB,GAAGA,CAACC,KAAe,EAAEC,IAAgB,KAAK;EACrE,IAAIA,IAAI,KAAK,KAAK,EAAE;IAChB,OAAO,IAAI;EACf;EACA,MAAM;IAAEC;EAAgB,CAAC,GAAGF,KAAK;EACjC,OAAOH,GAAG;AACd,yBAAyBK,eAAe;AACxC;AACA,iCAAiCA,eAAe;AAChD;AACA,sBAAsBJ,WAAW;AACjC;AACA;AACA;AACA,KAAK;AACL,CAAC","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import { AcoAppMode, AcoModel } from "../../types";
1
+ import type { AcoAppMode, AcoModel } from "../../types";
2
2
  export declare const createGetRecord: (model: AcoModel, mode: AcoAppMode) => import("graphql").DocumentNode;
@@ -1 +1 @@
1
- {"version":3,"names":["gql","createAppFields","ERROR_FIELD","createReadQuery","createGetRecord","model","mode","singularApiName"],"sources":["getRecord.ts"],"sourcesContent":["import gql from \"graphql-tag\";\nimport { AcoAppMode, AcoModel } from \"~/types\";\nimport { createAppFields, ERROR_FIELD } from \"./common\";\nimport { createReadQuery } from \"@webiny/app-headless-cms-common\";\n\nexport const createGetRecord = (model: AcoModel, mode: AcoAppMode) => {\n if (mode === \"cms\") {\n return createReadQuery(model);\n }\n const { singularApiName } = model;\n return gql`\n query Get${singularApiName}($entryId: ID!) {\n search {\n content: get${singularApiName}(id: $entryId) {\n data {\n ${createAppFields(model)}\n }\n ${ERROR_FIELD}\n }\n }\n }\n `;\n};\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,aAAa;AAE7B,SAASC,eAAe,EAAEC,WAAW;AACrC,SAASC,eAAe,QAAQ,iCAAiC;AAEjE,OAAO,MAAMC,eAAe,GAAGA,CAACC,KAAe,EAAEC,IAAgB,KAAK;EAClE,IAAIA,IAAI,KAAK,KAAK,EAAE;IAChB,OAAOH,eAAe,CAACE,KAAK,CAAC;EACjC;EACA,MAAM;IAAEE;EAAgB,CAAC,GAAGF,KAAK;EACjC,OAAOL,GAAG;AACd,mBAAmBO,eAAe;AAClC;AACA,8BAA8BA,eAAe;AAC7C;AACA,0BAA0BN,eAAe,CAACI,KAAK,CAAC;AAChD;AACA,sBAAsBH,WAAW;AACjC;AACA;AACA;AACA,KAAK;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["gql","createAppFields","ERROR_FIELD","createReadQuery","createGetRecord","model","mode","singularApiName"],"sources":["getRecord.ts"],"sourcesContent":["import gql from \"graphql-tag\";\nimport type { AcoAppMode, AcoModel } from \"~/types\";\nimport { createAppFields, ERROR_FIELD } from \"./common\";\nimport { createReadQuery } from \"@webiny/app-headless-cms-common\";\n\nexport const createGetRecord = (model: AcoModel, mode: AcoAppMode) => {\n if (mode === \"cms\") {\n return createReadQuery(model);\n }\n const { singularApiName } = model;\n return gql`\n query Get${singularApiName}($entryId: ID!) {\n search {\n content: get${singularApiName}(id: $entryId) {\n data {\n ${createAppFields(model)}\n }\n ${ERROR_FIELD}\n }\n }\n }\n `;\n};\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,aAAa;AAE7B,SAASC,eAAe,EAAEC,WAAW;AACrC,SAASC,eAAe,QAAQ,iCAAiC;AAEjE,OAAO,MAAMC,eAAe,GAAGA,CAACC,KAAe,EAAEC,IAAgB,KAAK;EAClE,IAAIA,IAAI,KAAK,KAAK,EAAE;IAChB,OAAOH,eAAe,CAACE,KAAK,CAAC;EACjC;EACA,MAAM;IAAEE;EAAgB,CAAC,GAAGF,KAAK;EACjC,OAAOL,GAAG;AACd,mBAAmBO,eAAe;AAClC;AACA,8BAA8BA,eAAe;AAC7C;AACA,0BAA0BN,eAAe,CAACI,KAAK,CAAC;AAChD;AACA,sBAAsBH,WAAW;AACjC;AACA;AACA;AACA,KAAK;AACL,CAAC","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import { AcoAppMode, AcoModel } from "../../types";
1
+ import type { AcoAppMode, AcoModel } from "../../types";
2
2
  export declare const createListRecords: (model: AcoModel, mode: AcoAppMode, fieldIds: string[]) => import("graphql").DocumentNode;
@@ -1 +1 @@
1
- {"version":3,"names":["gql","createAppFields","ERROR_FIELD","LIST_META_FIELD","createListQuery","createListRecords","model","mode","fieldIds","defaultFields","fields","filter","field","includes","type","additionalFields","fieldId","uniqueFields","Map","map","values","singularApiName","pluralApiName"],"sources":["listRecords.ts"],"sourcesContent":["import gql from \"graphql-tag\";\nimport { AcoAppMode, AcoModel } from \"~/types\";\nimport { createAppFields, ERROR_FIELD, LIST_META_FIELD } from \"./common\";\nimport { createListQuery } from \"@webiny/app-headless-cms-common\";\n\nexport const createListRecords = (model: AcoModel, mode: AcoAppMode, fieldIds: string[]) => {\n if (mode === \"cms\") {\n /**\n * We will include only the simplest fields.\n * TODO: remove default fields in a future release, as field selection will be injected by ACO configs.\n */\n const defaultFields = model.fields.filter(field => {\n return [\"text\", \"number\", \"boolean\", \"file\", \"long-text\", \"ref\", \"datetime\"].includes(\n field.type\n );\n });\n\n const additionalFields = model.fields.filter(field => {\n return fieldIds.includes(field.fieldId);\n });\n\n const uniqueFields = [\n ...new Map(\n [...defaultFields, ...additionalFields].map(field => [field.fieldId, field])\n ).values()\n ];\n\n return createListQuery(model, uniqueFields);\n }\n const { singularApiName, pluralApiName } = model;\n return gql`\n query List${pluralApiName}($where: ${singularApiName}ListWhereInput, $limit: Int, $after: String, $sort: [${singularApiName}ListSorter!], $search: String) {\n search {\n content: list${pluralApiName}(where: $where, limit: $limit, after: $after, sort: $sort, search: $search) {\n data {\n ${createAppFields(model)}\n }\n ${LIST_META_FIELD}\n ${ERROR_FIELD}\n }\n }\n }\n `;\n};\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,aAAa;AAE7B,SAASC,eAAe,EAAEC,WAAW,EAAEC,eAAe;AACtD,SAASC,eAAe,QAAQ,iCAAiC;AAEjE,OAAO,MAAMC,iBAAiB,GAAGA,CAACC,KAAe,EAAEC,IAAgB,EAAEC,QAAkB,KAAK;EACxF,IAAID,IAAI,KAAK,KAAK,EAAE;IAChB;AACR;AACA;AACA;IACQ,MAAME,aAAa,GAAGH,KAAK,CAACI,MAAM,CAACC,MAAM,CAACC,KAAK,IAAI;MAC/C,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,CAACC,QAAQ,CACjFD,KAAK,CAACE,IACV,CAAC;IACL,CAAC,CAAC;IAEF,MAAMC,gBAAgB,GAAGT,KAAK,CAACI,MAAM,CAACC,MAAM,CAACC,KAAK,IAAI;MAClD,OAAOJ,QAAQ,CAACK,QAAQ,CAACD,KAAK,CAACI,OAAO,CAAC;IAC3C,CAAC,CAAC;IAEF,MAAMC,YAAY,GAAG,CACjB,GAAG,IAAIC,GAAG,CACN,CAAC,GAAGT,aAAa,EAAE,GAAGM,gBAAgB,CAAC,CAACI,GAAG,CAACP,KAAK,IAAI,CAACA,KAAK,CAACI,OAAO,EAAEJ,KAAK,CAAC,CAC/E,CAAC,CAACQ,MAAM,CAAC,CAAC,CACb;IAED,OAAOhB,eAAe,CAACE,KAAK,EAAEW,YAAY,CAAC;EAC/C;EACA,MAAM;IAAEI,eAAe;IAAEC;EAAc,CAAC,GAAGhB,KAAK;EAChD,OAAON,GAAG;AACd,oBAAoBsB,aAAa,YAAYD,eAAe,wDAAwDA,eAAe;AACnI;AACA,+BAA+BC,aAAa;AAC5C;AACA,0BAA0BrB,eAAe,CAACK,KAAK,CAAC;AAChD;AACA,sBAAsBH,eAAe;AACrC,sBAAsBD,WAAW;AACjC;AACA;AACA;AACA,KAAK;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["gql","createAppFields","ERROR_FIELD","LIST_META_FIELD","createListQuery","createListRecords","model","mode","fieldIds","defaultFields","fields","filter","field","includes","type","additionalFields","fieldId","uniqueFields","Map","map","values","singularApiName","pluralApiName"],"sources":["listRecords.ts"],"sourcesContent":["import gql from \"graphql-tag\";\nimport type { AcoAppMode, AcoModel } from \"~/types\";\nimport { createAppFields, ERROR_FIELD, LIST_META_FIELD } from \"./common\";\nimport { createListQuery } from \"@webiny/app-headless-cms-common\";\n\nexport const createListRecords = (model: AcoModel, mode: AcoAppMode, fieldIds: string[]) => {\n if (mode === \"cms\") {\n /**\n * We will include only the simplest fields.\n * TODO: remove default fields in a future release, as field selection will be injected by ACO configs.\n */\n const defaultFields = model.fields.filter(field => {\n return [\"text\", \"number\", \"boolean\", \"file\", \"long-text\", \"ref\", \"datetime\"].includes(\n field.type\n );\n });\n\n const additionalFields = model.fields.filter(field => {\n return fieldIds.includes(field.fieldId);\n });\n\n const uniqueFields = [\n ...new Map(\n [...defaultFields, ...additionalFields].map(field => [field.fieldId, field])\n ).values()\n ];\n\n return createListQuery(model, uniqueFields);\n }\n const { singularApiName, pluralApiName } = model;\n return gql`\n query List${pluralApiName}($where: ${singularApiName}ListWhereInput, $limit: Int, $after: String, $sort: [${singularApiName}ListSorter!], $search: String) {\n search {\n content: list${pluralApiName}(where: $where, limit: $limit, after: $after, sort: $sort, search: $search) {\n data {\n ${createAppFields(model)}\n }\n ${LIST_META_FIELD}\n ${ERROR_FIELD}\n }\n }\n }\n `;\n};\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,aAAa;AAE7B,SAASC,eAAe,EAAEC,WAAW,EAAEC,eAAe;AACtD,SAASC,eAAe,QAAQ,iCAAiC;AAEjE,OAAO,MAAMC,iBAAiB,GAAGA,CAACC,KAAe,EAAEC,IAAgB,EAAEC,QAAkB,KAAK;EACxF,IAAID,IAAI,KAAK,KAAK,EAAE;IAChB;AACR;AACA;AACA;IACQ,MAAME,aAAa,GAAGH,KAAK,CAACI,MAAM,CAACC,MAAM,CAACC,KAAK,IAAI;MAC/C,OAAO,CAAC,MAAM,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,EAAE,KAAK,EAAE,UAAU,CAAC,CAACC,QAAQ,CACjFD,KAAK,CAACE,IACV,CAAC;IACL,CAAC,CAAC;IAEF,MAAMC,gBAAgB,GAAGT,KAAK,CAACI,MAAM,CAACC,MAAM,CAACC,KAAK,IAAI;MAClD,OAAOJ,QAAQ,CAACK,QAAQ,CAACD,KAAK,CAACI,OAAO,CAAC;IAC3C,CAAC,CAAC;IAEF,MAAMC,YAAY,GAAG,CACjB,GAAG,IAAIC,GAAG,CACN,CAAC,GAAGT,aAAa,EAAE,GAAGM,gBAAgB,CAAC,CAACI,GAAG,CAACP,KAAK,IAAI,CAACA,KAAK,CAACI,OAAO,EAAEJ,KAAK,CAAC,CAC/E,CAAC,CAACQ,MAAM,CAAC,CAAC,CACb;IAED,OAAOhB,eAAe,CAACE,KAAK,EAAEW,YAAY,CAAC;EAC/C;EACA,MAAM;IAAEI,eAAe;IAAEC;EAAc,CAAC,GAAGhB,KAAK;EAChD,OAAON,GAAG;AACd,oBAAoBsB,aAAa,YAAYD,eAAe,wDAAwDA,eAAe;AACnI;AACA,+BAA+BC,aAAa;AAC5C;AACA,0BAA0BrB,eAAe,CAACK,KAAK,CAAC;AAChD;AACA,sBAAsBH,eAAe;AACrC,sBAAsBD,WAAW;AACjC;AACA;AACA;AACA,KAAK;AACL,CAAC","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import { AcoAppMode, AcoModel } from "../../types";
1
+ import type { AcoAppMode, AcoModel } from "../../types";
2
2
  export declare const createListTags: (model: AcoModel, mode: AcoAppMode) => import("graphql").DocumentNode | null;
@@ -1 +1 @@
1
- {"version":3,"names":["gql","ERROR_FIELD","LIST_META_FIELD","createListTags","model","mode","pluralApiName"],"sources":["listTags.ts"],"sourcesContent":["import gql from \"graphql-tag\";\nimport { AcoAppMode, AcoModel } from \"~/types\";\nimport { ERROR_FIELD, LIST_META_FIELD } from \"./common\";\n\nexport const createListTags = (model: AcoModel, mode: AcoAppMode) => {\n if (mode === \"cms\") {\n return null;\n }\n const { pluralApiName } = model;\n return gql`\n query List${pluralApiName}Tags($where: AcoSearchRecordTagListWhereInput) {\n search {\n content: list${pluralApiName}Tags(where: $where) {\n data {\n tag\n }\n ${LIST_META_FIELD}\n ${ERROR_FIELD}\n }\n }\n }\n `;\n};\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,aAAa;AAE7B,SAASC,WAAW,EAAEC,eAAe;AAErC,OAAO,MAAMC,cAAc,GAAGA,CAACC,KAAe,EAAEC,IAAgB,KAAK;EACjE,IAAIA,IAAI,KAAK,KAAK,EAAE;IAChB,OAAO,IAAI;EACf;EACA,MAAM;IAAEC;EAAc,CAAC,GAAGF,KAAK;EAC/B,OAAOJ,GAAG;AACd,oBAAoBM,aAAa;AACjC;AACA,+BAA+BA,aAAa;AAC5C;AACA;AACA;AACA,sBAAsBJ,eAAe;AACrC,sBAAsBD,WAAW;AACjC;AACA;AACA;AACA,KAAK;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["gql","ERROR_FIELD","LIST_META_FIELD","createListTags","model","mode","pluralApiName"],"sources":["listTags.ts"],"sourcesContent":["import gql from \"graphql-tag\";\nimport type { AcoAppMode, AcoModel } from \"~/types\";\nimport { ERROR_FIELD, LIST_META_FIELD } from \"./common\";\n\nexport const createListTags = (model: AcoModel, mode: AcoAppMode) => {\n if (mode === \"cms\") {\n return null;\n }\n const { pluralApiName } = model;\n return gql`\n query List${pluralApiName}Tags($where: AcoSearchRecordTagListWhereInput) {\n search {\n content: list${pluralApiName}Tags(where: $where) {\n data {\n tag\n }\n ${LIST_META_FIELD}\n ${ERROR_FIELD}\n }\n }\n }\n `;\n};\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,aAAa;AAE7B,SAASC,WAAW,EAAEC,eAAe;AAErC,OAAO,MAAMC,cAAc,GAAGA,CAACC,KAAe,EAAEC,IAAgB,KAAK;EACjE,IAAIA,IAAI,KAAK,KAAK,EAAE;IAChB,OAAO,IAAI;EACf;EACA,MAAM;IAAEC;EAAc,CAAC,GAAGF,KAAK;EAC/B,OAAOJ,GAAG;AACd,oBAAoBM,aAAa;AACjC;AACA,+BAA+BA,aAAa;AAC5C;AACA;AACA;AACA,sBAAsBJ,eAAe;AACrC,sBAAsBD,WAAW;AACjC;AACA;AACA;AACA,KAAK;AACL,CAAC","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import { AcoAppMode, AcoModel } from "../../types";
1
+ import type { AcoAppMode, AcoModel } from "../../types";
2
2
  export declare const createMoveRecord: (model: AcoModel, mode: AcoAppMode) => import("graphql").DocumentNode;
@@ -1 +1 @@
1
- {"version":3,"names":["gql","ERROR_FIELD","createMoveRecord","model","mode","singularApiName"],"sources":["moveRecord.ts"],"sourcesContent":["import gql from \"graphql-tag\";\nimport { AcoAppMode, AcoModel } from \"~/types\";\nimport { ERROR_FIELD } from \"./common\";\n\nexport const createMoveRecord = (model: AcoModel, mode: AcoAppMode) => {\n const { singularApiName } = model;\n if (mode === \"cms\") {\n return gql`\n mutation Move${singularApiName}($id: ID!, $folderId: ID!) {\n content: move${singularApiName}(revision: $id, folderId: $folderId) {\n data\n ${ERROR_FIELD}\n }\n }\n `;\n }\n return gql`\n mutation Move${singularApiName}($id: ID!, $folderId: ID!) {\n search {\n content: move${singularApiName}(id: $id, folderId: $folderId) {\n data\n ${ERROR_FIELD}\n }\n }\n }\n `;\n};\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,aAAa;AAE7B,SAASC,WAAW;AAEpB,OAAO,MAAMC,gBAAgB,GAAGA,CAACC,KAAe,EAAEC,IAAgB,KAAK;EACnE,MAAM;IAAEC;EAAgB,CAAC,GAAGF,KAAK;EACjC,IAAIC,IAAI,KAAK,KAAK,EAAE;IAChB,OAAOJ,GAAG;AAClB,2BAA2BK,eAAe;AAC1C,+BAA+BA,eAAe;AAC9C;AACA,sBAAsBJ,WAAW;AACjC;AACA;AACA,SAAS;EACL;EACA,OAAOD,GAAG;AACd,uBAAuBK,eAAe;AACtC;AACA,+BAA+BA,eAAe;AAC9C;AACA,sBAAsBJ,WAAW;AACjC;AACA;AACA;AACA,KAAK;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["gql","ERROR_FIELD","createMoveRecord","model","mode","singularApiName"],"sources":["moveRecord.ts"],"sourcesContent":["import gql from \"graphql-tag\";\nimport type { AcoAppMode, AcoModel } from \"~/types\";\nimport { ERROR_FIELD } from \"./common\";\n\nexport const createMoveRecord = (model: AcoModel, mode: AcoAppMode) => {\n const { singularApiName } = model;\n if (mode === \"cms\") {\n return gql`\n mutation Move${singularApiName}($id: ID!, $folderId: ID!) {\n content: move${singularApiName}(revision: $id, folderId: $folderId) {\n data\n ${ERROR_FIELD}\n }\n }\n `;\n }\n return gql`\n mutation Move${singularApiName}($id: ID!, $folderId: ID!) {\n search {\n content: move${singularApiName}(id: $id, folderId: $folderId) {\n data\n ${ERROR_FIELD}\n }\n }\n }\n `;\n};\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,aAAa;AAE7B,SAASC,WAAW;AAEpB,OAAO,MAAMC,gBAAgB,GAAGA,CAACC,KAAe,EAAEC,IAAgB,KAAK;EACnE,MAAM;IAAEC;EAAgB,CAAC,GAAGF,KAAK;EACjC,IAAIC,IAAI,KAAK,KAAK,EAAE;IAChB,OAAOJ,GAAG;AAClB,2BAA2BK,eAAe;AAC1C,+BAA+BA,eAAe;AAC9C;AACA,sBAAsBJ,WAAW;AACjC;AACA;AACA,SAAS;EACL;EACA,OAAOD,GAAG;AACd,uBAAuBK,eAAe;AACtC;AACA,+BAA+BA,eAAe;AAC9C;AACA,sBAAsBJ,WAAW;AACjC;AACA;AACA;AACA,KAAK;AACL,CAAC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import { AcoError, ListMeta, ListSearchRecordsSort, SearchRecordItem, TagItem } from "../../types";
1
+ import type { AcoError, ListMeta, ListSearchRecordsSort, SearchRecordItem, TagItem } from "../../types";
2
2
  export interface UpdateSearchRecordResponse {
3
3
  search: {
4
4
  updateRecord: {
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import { AcoError, ListMeta, ListSearchRecordsSort, SearchRecordItem, TagItem } from \"~/types\";\n\nexport interface UpdateSearchRecordResponse {\n search: {\n updateRecord: {\n data: SearchRecordItem | null;\n error: AcoError | null;\n };\n };\n}\n\nexport interface UpdateSearchRecordVariables {\n id: string;\n data: Pick<SearchRecordItem, \"location\" | \"title\" | \"content\" | \"data\">;\n}\n\nexport interface MoveSearchRecordResponse {\n search: {\n moveRecord: {\n data: boolean | null;\n error: AcoError | null;\n };\n };\n}\n\nexport interface MoveSearchRecordVariables {\n id: string;\n folderId: string;\n}\n\nexport interface ListTagsWhereQueryVariables {\n tags_in?: string[];\n tags_startsWith?: string;\n tags_not_startsWith?: string;\n AND?: ListTagsWhereQueryVariables[];\n OR?: ListTagsWhereQueryVariables[];\n}\n\nexport interface ListTagsQueryVariables {\n where?: ListTagsWhereQueryVariables;\n}\n\nexport interface ListTagsResponse {\n search: {\n content: {\n data: TagItem[] | null;\n error: AcoError | null;\n };\n };\n}\n\nexport interface ListSearchRecordsResponse {\n search: {\n content: {\n data: SearchRecordItem[] | null;\n meta: ListMeta | null;\n error: AcoError | null;\n };\n };\n}\n\ninterface ListSearchRecordsWhereLocationQueryVariables {\n folderId?: string;\n folderId_in?: string[];\n folderId_not_in?: string[];\n}\n\nexport interface ListSearchRecordsWhereQueryVariables {\n location?: ListSearchRecordsWhereLocationQueryVariables;\n wbyAco_location?: ListSearchRecordsWhereLocationQueryVariables;\n createdBy?: string;\n tags_in?: string[];\n tags_startsWith?: string;\n tags_not_startsWith?: string;\n AND?: ListSearchRecordsWhereQueryVariables[];\n OR?: ListSearchRecordsWhereQueryVariables[];\n}\n\nexport interface ListSearchRecordsQueryVariables {\n where?: ListSearchRecordsWhereQueryVariables;\n search?: string;\n limit?: number;\n after?: string | null;\n sort?: ListSearchRecordsSort;\n}\n\nexport interface GetSearchRecordResponse {\n search: {\n content: {\n data: SearchRecordItem | null;\n error: AcoError | null;\n };\n };\n}\n\nexport interface GetSearchRecordQueryVariables {\n entryId: string;\n}\n\nexport interface DeleteSearchRecordVariables {\n id: string;\n}\n\nexport interface DeleteSearchRecordResponse {\n search: {\n content: {\n data: boolean;\n error: AcoError | null;\n };\n };\n}\n\nexport interface CreateSearchRecordResponse {\n search: {\n content: {\n data: SearchRecordItem | null;\n error: AcoError | null;\n };\n };\n}\n\nexport interface CreateSearchRecordVariables {\n data: Omit<\n SearchRecordItem,\n \"id\" | \"createdOn\" | \"savedOn\" | \"modifiedOn\" | \"createdBy\" | \"savedBy\" | \"modifiedBy\"\n >;\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { AcoError, ListMeta, ListSearchRecordsSort, SearchRecordItem, TagItem } from \"~/types\";\n\nexport interface UpdateSearchRecordResponse {\n search: {\n updateRecord: {\n data: SearchRecordItem | null;\n error: AcoError | null;\n };\n };\n}\n\nexport interface UpdateSearchRecordVariables {\n id: string;\n data: Pick<SearchRecordItem, \"location\" | \"title\" | \"content\" | \"data\">;\n}\n\nexport interface MoveSearchRecordResponse {\n search: {\n moveRecord: {\n data: boolean | null;\n error: AcoError | null;\n };\n };\n}\n\nexport interface MoveSearchRecordVariables {\n id: string;\n folderId: string;\n}\n\nexport interface ListTagsWhereQueryVariables {\n tags_in?: string[];\n tags_startsWith?: string;\n tags_not_startsWith?: string;\n AND?: ListTagsWhereQueryVariables[];\n OR?: ListTagsWhereQueryVariables[];\n}\n\nexport interface ListTagsQueryVariables {\n where?: ListTagsWhereQueryVariables;\n}\n\nexport interface ListTagsResponse {\n search: {\n content: {\n data: TagItem[] | null;\n error: AcoError | null;\n };\n };\n}\n\nexport interface ListSearchRecordsResponse {\n search: {\n content: {\n data: SearchRecordItem[] | null;\n meta: ListMeta | null;\n error: AcoError | null;\n };\n };\n}\n\ninterface ListSearchRecordsWhereLocationQueryVariables {\n folderId?: string;\n folderId_in?: string[];\n folderId_not_in?: string[];\n}\n\nexport interface ListSearchRecordsWhereQueryVariables {\n location?: ListSearchRecordsWhereLocationQueryVariables;\n wbyAco_location?: ListSearchRecordsWhereLocationQueryVariables;\n createdBy?: string;\n tags_in?: string[];\n tags_startsWith?: string;\n tags_not_startsWith?: string;\n AND?: ListSearchRecordsWhereQueryVariables[];\n OR?: ListSearchRecordsWhereQueryVariables[];\n}\n\nexport interface ListSearchRecordsQueryVariables {\n where?: ListSearchRecordsWhereQueryVariables;\n search?: string;\n limit?: number;\n after?: string | null;\n sort?: ListSearchRecordsSort;\n}\n\nexport interface GetSearchRecordResponse {\n search: {\n content: {\n data: SearchRecordItem | null;\n error: AcoError | null;\n };\n };\n}\n\nexport interface GetSearchRecordQueryVariables {\n entryId: string;\n}\n\nexport interface DeleteSearchRecordVariables {\n id: string;\n}\n\nexport interface DeleteSearchRecordResponse {\n search: {\n content: {\n data: boolean;\n error: AcoError | null;\n };\n };\n}\n\nexport interface CreateSearchRecordResponse {\n search: {\n content: {\n data: SearchRecordItem | null;\n error: AcoError | null;\n };\n };\n}\n\nexport interface CreateSearchRecordVariables {\n data: Omit<\n SearchRecordItem,\n \"id\" | \"createdOn\" | \"savedOn\" | \"modifiedOn\" | \"createdBy\" | \"savedBy\" | \"modifiedBy\"\n >;\n}\n"],"mappings":"","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import { AcoAppMode, AcoModel } from "../../types";
1
+ import type { AcoAppMode, AcoModel } from "../../types";
2
2
  export declare const createUpdateRecord: (model: AcoModel, mode: AcoAppMode) => import("graphql").DocumentNode | null;
@@ -1 +1 @@
1
- {"version":3,"names":["gql","createAppFields","ERROR_FIELD","createUpdateRecord","model","mode","singularApiName"],"sources":["updateRecord.ts"],"sourcesContent":["import gql from \"graphql-tag\";\nimport { AcoAppMode, AcoModel } from \"~/types\";\nimport { createAppFields, ERROR_FIELD } from \"./common\";\n\nexport const createUpdateRecord = (model: AcoModel, mode: AcoAppMode) => {\n if (mode === \"cms\") {\n return null;\n }\n const { singularApiName } = model;\n return gql`\n mutation Update${singularApiName}($id: ID!, $data: ${singularApiName}UpdateInput!) {\n search {\n content: update${singularApiName}(id: $id, data: $data) {\n data {\n ${createAppFields(model)}\n }\n ${ERROR_FIELD}\n }\n }\n }\n `;\n};\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,aAAa;AAE7B,SAASC,eAAe,EAAEC,WAAW;AAErC,OAAO,MAAMC,kBAAkB,GAAGA,CAACC,KAAe,EAAEC,IAAgB,KAAK;EACrE,IAAIA,IAAI,KAAK,KAAK,EAAE;IAChB,OAAO,IAAI;EACf;EACA,MAAM;IAAEC;EAAgB,CAAC,GAAGF,KAAK;EACjC,OAAOJ,GAAG;AACd,yBAAyBM,eAAe,qBAAqBA,eAAe;AAC5E;AACA,iCAAiCA,eAAe;AAChD;AACA,0BAA0BL,eAAe,CAACG,KAAK,CAAC;AAChD;AACA,sBAAsBF,WAAW;AACjC;AACA;AACA;AACA,KAAK;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["gql","createAppFields","ERROR_FIELD","createUpdateRecord","model","mode","singularApiName"],"sources":["updateRecord.ts"],"sourcesContent":["import gql from \"graphql-tag\";\nimport type { AcoAppMode, AcoModel } from \"~/types\";\nimport { createAppFields, ERROR_FIELD } from \"./common\";\n\nexport const createUpdateRecord = (model: AcoModel, mode: AcoAppMode) => {\n if (mode === \"cms\") {\n return null;\n }\n const { singularApiName } = model;\n return gql`\n mutation Update${singularApiName}($id: ID!, $data: ${singularApiName}UpdateInput!) {\n search {\n content: update${singularApiName}(id: $id, data: $data) {\n data {\n ${createAppFields(model)}\n }\n ${ERROR_FIELD}\n }\n }\n }\n `;\n};\n"],"mappings":"AAAA,OAAOA,GAAG,MAAM,aAAa;AAE7B,SAASC,eAAe,EAAEC,WAAW;AAErC,OAAO,MAAMC,kBAAkB,GAAGA,CAACC,KAAe,EAAEC,IAAgB,KAAK;EACrE,IAAIA,IAAI,KAAK,KAAK,EAAE;IAChB,OAAO,IAAI;EACf;EACA,MAAM;IAAEC;EAAgB,CAAC,GAAGF,KAAK;EACjC,OAAOJ,GAAG;AACd,yBAAyBM,eAAe,qBAAqBA,eAAe;AAC5E;AACA,iCAAiCA,eAAe;AAChD;AACA,0BAA0BL,eAAe,CAACG,KAAK,CAAC;AAChD;AACA,sBAAsBF,WAAW;AACjC;AACA;AACA;AACA,KAAK;AACL,CAAC","ignoreList":[]}
package/handlers.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { Dispatch, SetStateAction } from "react";
2
- import { ApolloQueryResult } from "apollo-client/core/types";
3
- import { FetchResult } from "apollo-link";
4
- import { Loading, LoadingActions } from "./types";
1
+ import type { Dispatch, SetStateAction } from "react";
2
+ import type { ApolloQueryResult } from "apollo-client/core/types";
3
+ import type { FetchResult } from "apollo-link";
4
+ import type { Loading, LoadingActions } from "./types";
5
5
  /**
6
6
  * A simple wrapper for Apollo fetching operations that handles the `loading` state as side effect.
7
7
  *
package/handlers.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["apolloFetchingHandler","loadingHandler","apolloQuery","response","action","setState","flag","state","dataLoader","loader","finally"],"sources":["handlers.tsx"],"sourcesContent":["import { Dispatch, SetStateAction } from \"react\";\nimport { ApolloQueryResult } from \"apollo-client/core/types\";\nimport { FetchResult } from \"apollo-link\";\nimport { Loading, LoadingActions } from \"~/types\";\n\n/**\n * A simple wrapper for Apollo fetching operations that handles the `loading` state as side effect.\n *\n * @param loadingHandler: function that handle the loading state.\n * @param apolloQuery: Apollo Query or Mutation\n */\nexport const apolloFetchingHandler = async <ListSearchRecordsResponse = any,>(\n loadingHandler: (flag: boolean) => void,\n apolloQuery: () => Promise<\n ApolloQueryResult<ListSearchRecordsResponse> | FetchResult<ListSearchRecordsResponse>\n >\n) => {\n loadingHandler(true);\n\n const response = await apolloQuery();\n loadingHandler(false);\n\n return response;\n};\n\n/**\n * A simple function to handle `loading` state.\n *\n * @param action: the `action` that has been performed.\n * @param setState: the logic to update the loading state.\n */\nexport const loadingHandler = (\n action: LoadingActions,\n setState?: Dispatch<SetStateAction<Loading<LoadingActions>>>\n) => {\n return (flag: boolean) => {\n if (!setState) {\n return;\n }\n setState(state => {\n return {\n ...state,\n [action]: flag\n };\n });\n };\n};\n\n/**\n * A data loader wrapper that manages the loading state via a callback.\n * `loader` can be any function that returns a Promise.\n */\nexport async function dataLoader<T>(\n loadingHandler: (flag: boolean) => void,\n loader: () => Promise<T>\n) {\n loadingHandler(true);\n\n return loader().finally(() => {\n loadingHandler(false);\n });\n}\n"],"mappings":"AAKA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,qBAAqB,GAAG,MAAAA,CACjCC,cAAuC,EACvCC,WAEC,KACA;EACDD,cAAc,CAAC,IAAI,CAAC;EAEpB,MAAME,QAAQ,GAAG,MAAMD,WAAW,CAAC,CAAC;EACpCD,cAAc,CAAC,KAAK,CAAC;EAErB,OAAOE,QAAQ;AACnB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMF,cAAc,GAAGA,CAC1BG,MAAsB,EACtBC,QAA4D,KAC3D;EACD,OAAQC,IAAa,IAAK;IACtB,IAAI,CAACD,QAAQ,EAAE;MACX;IACJ;IACAA,QAAQ,CAACE,KAAK,IAAI;MACd,OAAO;QACH,GAAGA,KAAK;QACR,CAACH,MAAM,GAAGE;MACd,CAAC;IACL,CAAC,CAAC;EACN,CAAC;AACL,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,eAAeE,UAAUA,CAC5BP,cAAuC,EACvCQ,MAAwB,EAC1B;EACER,cAAc,CAAC,IAAI,CAAC;EAEpB,OAAOQ,MAAM,CAAC,CAAC,CAACC,OAAO,CAAC,MAAM;IAC1BT,cAAc,CAAC,KAAK,CAAC;EACzB,CAAC,CAAC;AACN","ignoreList":[]}
1
+ {"version":3,"names":["apolloFetchingHandler","loadingHandler","apolloQuery","response","action","setState","flag","state","dataLoader","loader","finally"],"sources":["handlers.tsx"],"sourcesContent":["import type { Dispatch, SetStateAction } from \"react\";\nimport type { ApolloQueryResult } from \"apollo-client/core/types\";\nimport type { FetchResult } from \"apollo-link\";\nimport type { Loading, LoadingActions } from \"~/types\";\n\n/**\n * A simple wrapper for Apollo fetching operations that handles the `loading` state as side effect.\n *\n * @param loadingHandler: function that handle the loading state.\n * @param apolloQuery: Apollo Query or Mutation\n */\nexport const apolloFetchingHandler = async <ListSearchRecordsResponse = any,>(\n loadingHandler: (flag: boolean) => void,\n apolloQuery: () => Promise<\n ApolloQueryResult<ListSearchRecordsResponse> | FetchResult<ListSearchRecordsResponse>\n >\n) => {\n loadingHandler(true);\n\n const response = await apolloQuery();\n loadingHandler(false);\n\n return response;\n};\n\n/**\n * A simple function to handle `loading` state.\n *\n * @param action: the `action` that has been performed.\n * @param setState: the logic to update the loading state.\n */\nexport const loadingHandler = (\n action: LoadingActions,\n setState?: Dispatch<SetStateAction<Loading<LoadingActions>>>\n) => {\n return (flag: boolean) => {\n if (!setState) {\n return;\n }\n setState(state => {\n return {\n ...state,\n [action]: flag\n };\n });\n };\n};\n\n/**\n * A data loader wrapper that manages the loading state via a callback.\n * `loader` can be any function that returns a Promise.\n */\nexport async function dataLoader<T>(\n loadingHandler: (flag: boolean) => void,\n loader: () => Promise<T>\n) {\n loadingHandler(true);\n\n return loader().finally(() => {\n loadingHandler(false);\n });\n}\n"],"mappings":"AAKA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,qBAAqB,GAAG,MAAAA,CACjCC,cAAuC,EACvCC,WAEC,KACA;EACDD,cAAc,CAAC,IAAI,CAAC;EAEpB,MAAME,QAAQ,GAAG,MAAMD,WAAW,CAAC,CAAC;EACpCD,cAAc,CAAC,KAAK,CAAC;EAErB,OAAOE,QAAQ;AACnB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMF,cAAc,GAAGA,CAC1BG,MAAsB,EACtBC,QAA4D,KAC3D;EACD,OAAQC,IAAa,IAAK;IACtB,IAAI,CAACD,QAAQ,EAAE;MACX;IACJ;IACAA,QAAQ,CAACE,KAAK,IAAI;MACd,OAAO;QACH,GAAGA,KAAK;QACR,CAACH,MAAM,GAAGE;MACd,CAAC;IACL,CAAC,CAAC;EACN,CAAC;AACL,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,eAAeE,UAAUA,CAC5BP,cAAuC,EACvCQ,MAAwB,EAC1B;EACER,cAAc,CAAC,IAAI,CAAC;EAEpB,OAAOQ,MAAM,CAAC,CAAC,CAACC,OAAO,CAAC,MAAM;IAC1BT,cAAc,CAAC,KAAK,CAAC;EACzB,CAAC,CAAC;AACN","ignoreList":[]}
@@ -1,2 +1,2 @@
1
- import { AcoAppProviderContext } from "../contexts/app";
1
+ import type { AcoAppProviderContext } from "../contexts/app";
2
2
  export declare const useAcoApp: () => AcoAppProviderContext;
@@ -1 +1 @@
1
- {"version":3,"names":["useContext","AcoAppContext","useAcoApp","context","Error","app","folderIdPath","folderIdInPath","model","client","mode","loading","error"],"sources":["useAcoApp.ts"],"sourcesContent":["import { useContext } from \"react\";\nimport { AcoAppContext, AcoAppProviderContext } from \"~/contexts/app\";\n\nexport const useAcoApp = (): AcoAppProviderContext => {\n const context = useContext(AcoAppContext);\n\n if (!context) {\n throw new Error(\"useAcoApp must be used within a AcoAppContext\");\n }\n\n return {\n app: context.app,\n folderIdPath: context.folderIdPath,\n folderIdInPath: context.folderIdInPath,\n model: context.model,\n client: context.client,\n mode: context.mode,\n loading: context.loading,\n error: context.error\n };\n};\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,OAAO;AAClC,SAASC,aAAa;AAEtB,OAAO,MAAMC,SAAS,GAAGA,CAAA,KAA6B;EAClD,MAAMC,OAAO,GAAGH,UAAU,CAACC,aAAa,CAAC;EAEzC,IAAI,CAACE,OAAO,EAAE;IACV,MAAM,IAAIC,KAAK,CAAC,+CAA+C,CAAC;EACpE;EAEA,OAAO;IACHC,GAAG,EAAEF,OAAO,CAACE,GAAG;IAChBC,YAAY,EAAEH,OAAO,CAACG,YAAY;IAClCC,cAAc,EAAEJ,OAAO,CAACI,cAAc;IACtCC,KAAK,EAAEL,OAAO,CAACK,KAAK;IACpBC,MAAM,EAAEN,OAAO,CAACM,MAAM;IACtBC,IAAI,EAAEP,OAAO,CAACO,IAAI;IAClBC,OAAO,EAAER,OAAO,CAACQ,OAAO;IACxBC,KAAK,EAAET,OAAO,CAACS;EACnB,CAAC;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useContext","AcoAppContext","useAcoApp","context","Error","app","folderIdPath","folderIdInPath","model","client","mode","loading","error"],"sources":["useAcoApp.ts"],"sourcesContent":["import { useContext } from \"react\";\nimport type { AcoAppProviderContext } from \"~/contexts/app\";\nimport { AcoAppContext } from \"~/contexts/app\";\n\nexport const useAcoApp = (): AcoAppProviderContext => {\n const context = useContext(AcoAppContext);\n\n if (!context) {\n throw new Error(\"useAcoApp must be used within a AcoAppContext\");\n }\n\n return {\n app: context.app,\n folderIdPath: context.folderIdPath,\n folderIdInPath: context.folderIdInPath,\n model: context.model,\n client: context.client,\n mode: context.mode,\n loading: context.loading,\n error: context.error\n };\n};\n"],"mappings":"AAAA,SAASA,UAAU,QAAQ,OAAO;AAElC,SAASC,aAAa;AAEtB,OAAO,MAAMC,SAAS,GAAGA,CAAA,KAA6B;EAClD,MAAMC,OAAO,GAAGH,UAAU,CAACC,aAAa,CAAC;EAEzC,IAAI,CAACE,OAAO,EAAE;IACV,MAAM,IAAIC,KAAK,CAAC,+CAA+C,CAAC;EACpE;EAEA,OAAO;IACHC,GAAG,EAAEF,OAAO,CAACE,GAAG;IAChBC,YAAY,EAAEH,OAAO,CAACG,YAAY;IAClCC,cAAc,EAAEJ,OAAO,CAACI,cAAc;IACtCC,KAAK,EAAEL,OAAO,CAACK,KAAK;IACpBC,MAAM,EAAEN,OAAO,CAACM,MAAM;IACtBC,IAAI,EAAEP,OAAO,CAACO,IAAI;IAClBC,OAAO,EAAER,OAAO,CAACQ,OAAO;IACxBC,KAAK,EAAET,OAAO,CAACS;EACnB,CAAC;AACL,CAAC","ignoreList":[]}
@@ -1,3 +1,3 @@
1
- import { AcoListContextData } from "../contexts/acoList";
2
- import { GenericSearchData } from "../types";
1
+ import type { AcoListContextData } from "../contexts/acoList";
2
+ import type { GenericSearchData } from "../types";
3
3
  export declare const useAcoList: <T extends GenericSearchData>() => AcoListContextData<T>;
@@ -1 +1 @@
1
- {"version":3,"names":["useContext","AcoListContext","useAcoList","context","Error"],"sources":["useAcoList.ts"],"sourcesContent":["import { useContext, Context } from \"react\";\nimport { AcoListContext, AcoListContextData } from \"~/contexts/acoList\";\nimport { GenericSearchData } from \"~/types\";\n\nexport const useAcoList = <T extends GenericSearchData>() => {\n const context = useContext<AcoListContextData<T>>(\n AcoListContext as unknown as Context<AcoListContextData<T>>\n );\n if (!context) {\n throw new Error(\"useAcoList must be used within a AcoListContext\");\n }\n\n return context;\n};\n"],"mappings":"AAAA,SAASA,UAAU,QAAiB,OAAO;AAC3C,SAASC,cAAc;AAGvB,OAAO,MAAMC,UAAU,GAAGA,CAAA,KAAmC;EACzD,MAAMC,OAAO,GAAGH,UAAU,CACtBC,cACJ,CAAC;EACD,IAAI,CAACE,OAAO,EAAE;IACV,MAAM,IAAIC,KAAK,CAAC,iDAAiD,CAAC;EACtE;EAEA,OAAOD,OAAO;AAClB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useContext","AcoListContext","useAcoList","context","Error"],"sources":["useAcoList.ts"],"sourcesContent":["import type { Context } from \"react\";\nimport { useContext } from \"react\";\nimport type { AcoListContextData } from \"~/contexts/acoList\";\nimport { AcoListContext } from \"~/contexts/acoList\";\nimport type { GenericSearchData } from \"~/types\";\n\nexport const useAcoList = <T extends GenericSearchData>() => {\n const context = useContext<AcoListContextData<T>>(\n AcoListContext as unknown as Context<AcoListContextData<T>>\n );\n if (!context) {\n throw new Error(\"useAcoList must be used within a AcoListContext\");\n }\n\n return context;\n};\n"],"mappings":"AACA,SAASA,UAAU,QAAQ,OAAO;AAElC,SAASC,cAAc;AAGvB,OAAO,MAAMC,UAAU,GAAGA,CAAA,KAAmC;EACzD,MAAMC,OAAO,GAAGH,UAAU,CACtBC,cACJ,CAAC;EACD,IAAI,CAACE,OAAO,EAAE;IACV,MAAM,IAAIC,KAAK,CAAC,iDAAiD,CAAC;EACtE;EAEA,OAAOD,OAAO;AAClB,CAAC","ignoreList":[]}
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
- import { ListRecordsParams } from "../contexts/records";
3
- import { DeletableSearchRecordItem, MovableSearchRecordItem, SearchRecordItem } from "../types";
2
+ import type { ListRecordsParams } from "../contexts/records";
3
+ import type { DeletableSearchRecordItem, MovableSearchRecordItem, SearchRecordItem } from "../types";
4
4
  export declare const useRecords: import("@webiny/app-admin").GenericHook<string, {
5
5
  /**
6
6
  * NOTE: you do NOT need to call `listRecords` from this hook on component mount, because you already have folders in the `listRecords` property.
@@ -1 +1 @@
1
- {"version":3,"names":["dotPropImmutable","useContext","useEffect","useMemo","makeDecoratable","SearchRecordsContext","useAcoApp","useNavigateFolder","useRecords","folderId","context","Error","folderIdPath","currentFolderId","records","loading","meta","listRecords","getRecord","createRecord","updateRecord","moveRecord","deleteRecord","addRecordToCache","updateRecordInCache","removeRecordFromCache","where","set","filter","record","recordFolderId","get","params","id"],"sources":["useRecords.ts"],"sourcesContent":["import dotPropImmutable from \"dot-prop-immutable\";\nimport { useContext, useEffect, useMemo } from \"react\";\nimport { makeDecoratable } from \"@webiny/app-admin\";\nimport { ListRecordsParams, SearchRecordsContext } from \"~/contexts/records\";\nimport { DeletableSearchRecordItem, MovableSearchRecordItem, SearchRecordItem } from \"~/types\";\nimport { useAcoApp } from \"~/hooks/useAcoApp\";\nimport { useNavigateFolder } from \"~/hooks/useNavigateFolder\";\n\nexport const useRecords = makeDecoratable((folderId?: string) => {\n const context = useContext(SearchRecordsContext);\n\n if (!context) {\n throw new Error(\"useSearchRecords must be used within a SearchRecordsContext\");\n }\n\n const { folderIdPath } = useAcoApp();\n\n const { currentFolderId } = useNavigateFolder();\n\n const {\n records,\n loading,\n meta,\n listRecords,\n getRecord,\n createRecord,\n updateRecord,\n moveRecord,\n deleteRecord,\n addRecordToCache,\n updateRecordInCache,\n removeRecordFromCache\n } = context;\n\n useEffect(() => {\n /**\n * On first mount, call `listRecords`, which will either issue a network request, or load links from cache.\n * We don't need to store the result of it to any local state; that is managed by the context provider.\n */\n if (!folderId) {\n return;\n }\n const where = dotPropImmutable.set({}, folderIdPath, folderId);\n listRecords({\n where\n });\n }, [folderId]);\n\n return useMemo(\n () => ({\n /**\n * NOTE: you do NOT need to call `listRecords` from this hook on component mount, because you already have folders in the `listRecords` property.\n * As soon as you call `useRecords()`, you'll initiate fetching of `records`, which is managed by the `SearchRecordContext`.\n * Since this method lists records with pagination, you might need to call it multiple times passing the `after` param.\n */\n loading,\n meta,\n records: records.filter(record => {\n const recordFolderId = dotPropImmutable.get(record, folderIdPath);\n return recordFolderId === folderId || recordFolderId === currentFolderId;\n }),\n listRecords(params: ListRecordsParams) {\n const where = dotPropImmutable.set(params.where || {}, folderIdPath, folderId);\n return listRecords({\n ...params,\n where\n });\n },\n getRecord(id: string) {\n return getRecord(id);\n },\n createRecord(record: Omit<SearchRecordItem, \"id\">) {\n return createRecord(record);\n },\n updateRecord(record: SearchRecordItem) {\n return updateRecord(record, folderId);\n },\n moveRecord(params: MovableSearchRecordItem) {\n return moveRecord(params);\n },\n deleteRecord(record: DeletableSearchRecordItem) {\n return deleteRecord(record);\n },\n addRecordToCache,\n removeRecordFromCache,\n updateRecordInCache\n }),\n [records, loading, meta, currentFolderId, folderId]\n );\n});\n"],"mappings":"AAAA,OAAOA,gBAAgB,MAAM,oBAAoB;AACjD,SAASC,UAAU,EAAEC,SAAS,EAAEC,OAAO,QAAQ,OAAO;AACtD,SAASC,eAAe,QAAQ,mBAAmB;AACnD,SAA4BC,oBAAoB;AAEhD,SAASC,SAAS;AAClB,SAASC,iBAAiB;AAE1B,OAAO,MAAMC,UAAU,GAAGJ,eAAe,CAAEK,QAAiB,IAAK;EAC7D,MAAMC,OAAO,GAAGT,UAAU,CAACI,oBAAoB,CAAC;EAEhD,IAAI,CAACK,OAAO,EAAE;IACV,MAAM,IAAIC,KAAK,CAAC,6DAA6D,CAAC;EAClF;EAEA,MAAM;IAAEC;EAAa,CAAC,GAAGN,SAAS,CAAC,CAAC;EAEpC,MAAM;IAAEO;EAAgB,CAAC,GAAGN,iBAAiB,CAAC,CAAC;EAE/C,MAAM;IACFO,OAAO;IACPC,OAAO;IACPC,IAAI;IACJC,WAAW;IACXC,SAAS;IACTC,YAAY;IACZC,YAAY;IACZC,UAAU;IACVC,YAAY;IACZC,gBAAgB;IAChBC,mBAAmB;IACnBC;EACJ,CAAC,GAAGf,OAAO;EAEXR,SAAS,CAAC,MAAM;IACZ;AACR;AACA;AACA;IACQ,IAAI,CAACO,QAAQ,EAAE;MACX;IACJ;IACA,MAAMiB,KAAK,GAAG1B,gBAAgB,CAAC2B,GAAG,CAAC,CAAC,CAAC,EAAEf,YAAY,EAAEH,QAAQ,CAAC;IAC9DQ,WAAW,CAAC;MACRS;IACJ,CAAC,CAAC;EACN,CAAC,EAAE,CAACjB,QAAQ,CAAC,CAAC;EAEd,OAAON,OAAO,CACV,OAAO;IACH;AACZ;AACA;AACA;AACA;IACYY,OAAO;IACPC,IAAI;IACJF,OAAO,EAAEA,OAAO,CAACc,MAAM,CAACC,MAAM,IAAI;MAC9B,MAAMC,cAAc,GAAG9B,gBAAgB,CAAC+B,GAAG,CAACF,MAAM,EAAEjB,YAAY,CAAC;MACjE,OAAOkB,cAAc,KAAKrB,QAAQ,IAAIqB,cAAc,KAAKjB,eAAe;IAC5E,CAAC,CAAC;IACFI,WAAWA,CAACe,MAAyB,EAAE;MACnC,MAAMN,KAAK,GAAG1B,gBAAgB,CAAC2B,GAAG,CAACK,MAAM,CAACN,KAAK,IAAI,CAAC,CAAC,EAAEd,YAAY,EAAEH,QAAQ,CAAC;MAC9E,OAAOQ,WAAW,CAAC;QACf,GAAGe,MAAM;QACTN;MACJ,CAAC,CAAC;IACN,CAAC;IACDR,SAASA,CAACe,EAAU,EAAE;MAClB,OAAOf,SAAS,CAACe,EAAE,CAAC;IACxB,CAAC;IACDd,YAAYA,CAACU,MAAoC,EAAE;MAC/C,OAAOV,YAAY,CAACU,MAAM,CAAC;IAC/B,CAAC;IACDT,YAAYA,CAACS,MAAwB,EAAE;MACnC,OAAOT,YAAY,CAACS,MAAM,EAAEpB,QAAQ,CAAC;IACzC,CAAC;IACDY,UAAUA,CAACW,MAA+B,EAAE;MACxC,OAAOX,UAAU,CAACW,MAAM,CAAC;IAC7B,CAAC;IACDV,YAAYA,CAACO,MAAiC,EAAE;MAC5C,OAAOP,YAAY,CAACO,MAAM,CAAC;IAC/B,CAAC;IACDN,gBAAgB;IAChBE,qBAAqB;IACrBD;EACJ,CAAC,CAAC,EACF,CAACV,OAAO,EAAEC,OAAO,EAAEC,IAAI,EAAEH,eAAe,EAAEJ,QAAQ,CACtD,CAAC;AACL,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["dotPropImmutable","useContext","useEffect","useMemo","makeDecoratable","SearchRecordsContext","useAcoApp","useNavigateFolder","useRecords","folderId","context","Error","folderIdPath","currentFolderId","records","loading","meta","listRecords","getRecord","createRecord","updateRecord","moveRecord","deleteRecord","addRecordToCache","updateRecordInCache","removeRecordFromCache","where","set","filter","record","recordFolderId","get","params","id"],"sources":["useRecords.ts"],"sourcesContent":["import dotPropImmutable from \"dot-prop-immutable\";\nimport { useContext, useEffect, useMemo } from \"react\";\nimport { makeDecoratable } from \"@webiny/app-admin\";\nimport type { ListRecordsParams } from \"~/contexts/records\";\nimport { SearchRecordsContext } from \"~/contexts/records\";\nimport type { DeletableSearchRecordItem, MovableSearchRecordItem, SearchRecordItem } from \"~/types\";\nimport { useAcoApp } from \"~/hooks/useAcoApp\";\nimport { useNavigateFolder } from \"~/hooks/useNavigateFolder\";\n\nexport const useRecords = makeDecoratable((folderId?: string) => {\n const context = useContext(SearchRecordsContext);\n\n if (!context) {\n throw new Error(\"useSearchRecords must be used within a SearchRecordsContext\");\n }\n\n const { folderIdPath } = useAcoApp();\n\n const { currentFolderId } = useNavigateFolder();\n\n const {\n records,\n loading,\n meta,\n listRecords,\n getRecord,\n createRecord,\n updateRecord,\n moveRecord,\n deleteRecord,\n addRecordToCache,\n updateRecordInCache,\n removeRecordFromCache\n } = context;\n\n useEffect(() => {\n /**\n * On first mount, call `listRecords`, which will either issue a network request, or load links from cache.\n * We don't need to store the result of it to any local state; that is managed by the context provider.\n */\n if (!folderId) {\n return;\n }\n const where = dotPropImmutable.set({}, folderIdPath, folderId);\n listRecords({\n where\n });\n }, [folderId]);\n\n return useMemo(\n () => ({\n /**\n * NOTE: you do NOT need to call `listRecords` from this hook on component mount, because you already have folders in the `listRecords` property.\n * As soon as you call `useRecords()`, you'll initiate fetching of `records`, which is managed by the `SearchRecordContext`.\n * Since this method lists records with pagination, you might need to call it multiple times passing the `after` param.\n */\n loading,\n meta,\n records: records.filter(record => {\n const recordFolderId = dotPropImmutable.get(record, folderIdPath);\n return recordFolderId === folderId || recordFolderId === currentFolderId;\n }),\n listRecords(params: ListRecordsParams) {\n const where = dotPropImmutable.set(params.where || {}, folderIdPath, folderId);\n return listRecords({\n ...params,\n where\n });\n },\n getRecord(id: string) {\n return getRecord(id);\n },\n createRecord(record: Omit<SearchRecordItem, \"id\">) {\n return createRecord(record);\n },\n updateRecord(record: SearchRecordItem) {\n return updateRecord(record, folderId);\n },\n moveRecord(params: MovableSearchRecordItem) {\n return moveRecord(params);\n },\n deleteRecord(record: DeletableSearchRecordItem) {\n return deleteRecord(record);\n },\n addRecordToCache,\n removeRecordFromCache,\n updateRecordInCache\n }),\n [records, loading, meta, currentFolderId, folderId]\n );\n});\n"],"mappings":"AAAA,OAAOA,gBAAgB,MAAM,oBAAoB;AACjD,SAASC,UAAU,EAAEC,SAAS,EAAEC,OAAO,QAAQ,OAAO;AACtD,SAASC,eAAe,QAAQ,mBAAmB;AAEnD,SAASC,oBAAoB;AAE7B,SAASC,SAAS;AAClB,SAASC,iBAAiB;AAE1B,OAAO,MAAMC,UAAU,GAAGJ,eAAe,CAAEK,QAAiB,IAAK;EAC7D,MAAMC,OAAO,GAAGT,UAAU,CAACI,oBAAoB,CAAC;EAEhD,IAAI,CAACK,OAAO,EAAE;IACV,MAAM,IAAIC,KAAK,CAAC,6DAA6D,CAAC;EAClF;EAEA,MAAM;IAAEC;EAAa,CAAC,GAAGN,SAAS,CAAC,CAAC;EAEpC,MAAM;IAAEO;EAAgB,CAAC,GAAGN,iBAAiB,CAAC,CAAC;EAE/C,MAAM;IACFO,OAAO;IACPC,OAAO;IACPC,IAAI;IACJC,WAAW;IACXC,SAAS;IACTC,YAAY;IACZC,YAAY;IACZC,UAAU;IACVC,YAAY;IACZC,gBAAgB;IAChBC,mBAAmB;IACnBC;EACJ,CAAC,GAAGf,OAAO;EAEXR,SAAS,CAAC,MAAM;IACZ;AACR;AACA;AACA;IACQ,IAAI,CAACO,QAAQ,EAAE;MACX;IACJ;IACA,MAAMiB,KAAK,GAAG1B,gBAAgB,CAAC2B,GAAG,CAAC,CAAC,CAAC,EAAEf,YAAY,EAAEH,QAAQ,CAAC;IAC9DQ,WAAW,CAAC;MACRS;IACJ,CAAC,CAAC;EACN,CAAC,EAAE,CAACjB,QAAQ,CAAC,CAAC;EAEd,OAAON,OAAO,CACV,OAAO;IACH;AACZ;AACA;AACA;AACA;IACYY,OAAO;IACPC,IAAI;IACJF,OAAO,EAAEA,OAAO,CAACc,MAAM,CAACC,MAAM,IAAI;MAC9B,MAAMC,cAAc,GAAG9B,gBAAgB,CAAC+B,GAAG,CAACF,MAAM,EAAEjB,YAAY,CAAC;MACjE,OAAOkB,cAAc,KAAKrB,QAAQ,IAAIqB,cAAc,KAAKjB,eAAe;IAC5E,CAAC,CAAC;IACFI,WAAWA,CAACe,MAAyB,EAAE;MACnC,MAAMN,KAAK,GAAG1B,gBAAgB,CAAC2B,GAAG,CAACK,MAAM,CAACN,KAAK,IAAI,CAAC,CAAC,EAAEd,YAAY,EAAEH,QAAQ,CAAC;MAC9E,OAAOQ,WAAW,CAAC;QACf,GAAGe,MAAM;QACTN;MACJ,CAAC,CAAC;IACN,CAAC;IACDR,SAASA,CAACe,EAAU,EAAE;MAClB,OAAOf,SAAS,CAACe,EAAE,CAAC;IACxB,CAAC;IACDd,YAAYA,CAACU,MAAoC,EAAE;MAC/C,OAAOV,YAAY,CAACU,MAAM,CAAC;IAC/B,CAAC;IACDT,YAAYA,CAACS,MAAwB,EAAE;MACnC,OAAOT,YAAY,CAACS,MAAM,EAAEpB,QAAQ,CAAC;IACzC,CAAC;IACDY,UAAUA,CAACW,MAA+B,EAAE;MACxC,OAAOX,UAAU,CAACW,MAAM,CAAC;IAC7B,CAAC;IACDV,YAAYA,CAACO,MAAiC,EAAE;MAC5C,OAAOP,YAAY,CAACO,MAAM,CAAC;IAC/B,CAAC;IACDN,gBAAgB;IAChBE,qBAAqB;IACrBD;EACJ,CAAC,CAAC,EACF,CAACV,OAAO,EAAEC,OAAO,EAAEC,IAAI,EAAEH,eAAe,EAAEJ,QAAQ,CACtD,CAAC;AACL,CAAC,CAAC","ignoreList":[]}
@@ -1,4 +1,4 @@
1
- import { ListTagsWhereQueryVariables, TagItem } from "../types";
1
+ import type { ListTagsWhereQueryVariables, TagItem } from "../types";
2
2
  interface UseTagsParams {
3
3
  tagsModifier?: (tags: TagItem[]) => TagItem[];
4
4
  where?: ListTagsWhereQueryVariables;
@@ -1 +1 @@
1
- {"version":3,"names":["useContext","useEffect","useMemo","SearchRecordsContext","useAcoApp","useTags","params","tagsModifier","where","context","app","Error","tags","loading","listTags","id"],"sources":["useTags.ts"],"sourcesContent":["import { useContext, useEffect, useMemo } from \"react\";\nimport { SearchRecordsContext } from \"~/contexts/records\";\nimport { ListTagsWhereQueryVariables, TagItem } from \"~/types\";\nimport { useAcoApp } from \"~/hooks/useAcoApp\";\n\ninterface UseTagsParams {\n tagsModifier?: (tags: TagItem[]) => TagItem[];\n where?: ListTagsWhereQueryVariables;\n}\n\nexport const useTags = (params: UseTagsParams) => {\n const { tagsModifier, where } = params;\n\n const context = useContext(SearchRecordsContext);\n const { app } = useAcoApp();\n\n if (!context) {\n throw new Error(\"useTags must be used within a SearchRecordsContext\");\n }\n\n const { tags, loading, listTags } = context;\n\n useEffect(() => {\n listTags({ where });\n }, [app.id]);\n\n return useMemo(\n () => ({\n /**\n * NOTE: you do NOT need to call `listTags` from this hook on component mount, because you already have tags in the `listTags` property.\n * As soon as you call `useTags()`, you'll initiate fetching of `tags`, which is managed by the `SearchRecordContext`.\n */\n loading,\n tags: tagsModifier && typeof tagsModifier === \"function\" ? tagsModifier(tags) : tags\n }),\n [tags, loading]\n );\n};\n"],"mappings":"AAAA,SAASA,UAAU,EAAEC,SAAS,EAAEC,OAAO,QAAQ,OAAO;AACtD,SAASC,oBAAoB;AAE7B,SAASC,SAAS;AAOlB,OAAO,MAAMC,OAAO,GAAIC,MAAqB,IAAK;EAC9C,MAAM;IAAEC,YAAY;IAAEC;EAAM,CAAC,GAAGF,MAAM;EAEtC,MAAMG,OAAO,GAAGT,UAAU,CAACG,oBAAoB,CAAC;EAChD,MAAM;IAAEO;EAAI,CAAC,GAAGN,SAAS,CAAC,CAAC;EAE3B,IAAI,CAACK,OAAO,EAAE;IACV,MAAM,IAAIE,KAAK,CAAC,oDAAoD,CAAC;EACzE;EAEA,MAAM;IAAEC,IAAI;IAAEC,OAAO;IAAEC;EAAS,CAAC,GAAGL,OAAO;EAE3CR,SAAS,CAAC,MAAM;IACZa,QAAQ,CAAC;MAAEN;IAAM,CAAC,CAAC;EACvB,CAAC,EAAE,CAACE,GAAG,CAACK,EAAE,CAAC,CAAC;EAEZ,OAAOb,OAAO,CACV,OAAO;IACH;AACZ;AACA;AACA;IACYW,OAAO;IACPD,IAAI,EAAEL,YAAY,IAAI,OAAOA,YAAY,KAAK,UAAU,GAAGA,YAAY,CAACK,IAAI,CAAC,GAAGA;EACpF,CAAC,CAAC,EACF,CAACA,IAAI,EAAEC,OAAO,CAClB,CAAC;AACL,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["useContext","useEffect","useMemo","SearchRecordsContext","useAcoApp","useTags","params","tagsModifier","where","context","app","Error","tags","loading","listTags","id"],"sources":["useTags.ts"],"sourcesContent":["import { useContext, useEffect, useMemo } from \"react\";\nimport { SearchRecordsContext } from \"~/contexts/records\";\nimport type { ListTagsWhereQueryVariables, TagItem } from \"~/types\";\nimport { useAcoApp } from \"~/hooks/useAcoApp\";\n\ninterface UseTagsParams {\n tagsModifier?: (tags: TagItem[]) => TagItem[];\n where?: ListTagsWhereQueryVariables;\n}\n\nexport const useTags = (params: UseTagsParams) => {\n const { tagsModifier, where } = params;\n\n const context = useContext(SearchRecordsContext);\n const { app } = useAcoApp();\n\n if (!context) {\n throw new Error(\"useTags must be used within a SearchRecordsContext\");\n }\n\n const { tags, loading, listTags } = context;\n\n useEffect(() => {\n listTags({ where });\n }, [app.id]);\n\n return useMemo(\n () => ({\n /**\n * NOTE: you do NOT need to call `listTags` from this hook on component mount, because you already have tags in the `listTags` property.\n * As soon as you call `useTags()`, you'll initiate fetching of `tags`, which is managed by the `SearchRecordContext`.\n */\n loading,\n tags: tagsModifier && typeof tagsModifier === \"function\" ? tagsModifier(tags) : tags\n }),\n [tags, loading]\n );\n};\n"],"mappings":"AAAA,SAASA,UAAU,EAAEC,SAAS,EAAEC,OAAO,QAAQ,OAAO;AACtD,SAASC,oBAAoB;AAE7B,SAASC,SAAS;AAOlB,OAAO,MAAMC,OAAO,GAAIC,MAAqB,IAAK;EAC9C,MAAM;IAAEC,YAAY;IAAEC;EAAM,CAAC,GAAGF,MAAM;EAEtC,MAAMG,OAAO,GAAGT,UAAU,CAACG,oBAAoB,CAAC;EAChD,MAAM;IAAEO;EAAI,CAAC,GAAGN,SAAS,CAAC,CAAC;EAE3B,IAAI,CAACK,OAAO,EAAE;IACV,MAAM,IAAIE,KAAK,CAAC,oDAAoD,CAAC;EACzE;EAEA,MAAM;IAAEC,IAAI;IAAEC,OAAO;IAAEC;EAAS,CAAC,GAAGL,OAAO;EAE3CR,SAAS,CAAC,MAAM;IACZa,QAAQ,CAAC;MAAEN;IAAM,CAAC,CAAC;EACvB,CAAC,EAAE,CAACE,GAAG,CAACK,EAAE,CAAC,CAAC;EAEZ,OAAOb,OAAO,CACV,OAAO;IACH;AACZ;AACA;AACA;IACYW,OAAO;IACPD,IAAI,EAAEL,YAAY,IAAI,OAAOA,YAAY,KAAK,UAAU,GAAGA,YAAY,CAACK,IAAI,CAAC,GAAGA;EACpF,CAAC,CAAC,EACF,CAACA,IAAI,EAAEC,OAAO,CAClB,CAAC;AACL,CAAC","ignoreList":[]}
package/index.d.ts CHANGED
@@ -6,3 +6,5 @@ export * from "./hooks";
6
6
  export * from "./features";
7
7
  export * from "./dialogs";
8
8
  export * from "./sorting";
9
+ export type { TableRow, FolderTableRow, RecordTableRow } from "./table.types";
10
+ export type { ListMeta } from "./types";
package/index.js CHANGED
@@ -6,5 +6,6 @@ export * from "./hooks";
6
6
  export * from "./features";
7
7
  export * from "./dialogs";
8
8
  export * from "./sorting";
9
+ export {};
9
10
 
10
11
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./app\";\nexport * from \"./components\";\nexport * from \"./config\";\nexport * from \"./contexts\";\nexport * from \"./hooks\";\nexport * from \"./features\";\nexport * from \"./dialogs\";\nexport * from \"./sorting\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["index.ts"],"sourcesContent":["export * from \"./app\";\nexport * from \"./components\";\nexport * from \"./config\";\nexport * from \"./contexts\";\nexport * from \"./hooks\";\nexport * from \"./features\";\nexport * from \"./dialogs\";\nexport * from \"./sorting\";\nexport type { TableRow, FolderTableRow, RecordTableRow } from \"./table.types\";\nexport type { ListMeta } from \"./types\";\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAA0B","ignoreList":[]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@webiny/app-aco",
3
- "version": "6.0.0-alpha.0",
3
+ "version": "6.0.0-alpha.1",
4
4
  "main": "index.js",
5
5
  "repository": {
6
6
  "type": "git",
@@ -12,21 +12,21 @@
12
12
  "license": "MIT",
13
13
  "dependencies": {
14
14
  "@apollo/react-hooks": "3.1.5",
15
- "@webiny/admin-ui": "6.0.0-alpha.0",
16
- "@webiny/app": "6.0.0-alpha.0",
17
- "@webiny/app-admin": "6.0.0-alpha.0",
18
- "@webiny/app-headless-cms-common": "6.0.0-alpha.0",
19
- "@webiny/app-security": "6.0.0-alpha.0",
20
- "@webiny/app-utils": "6.0.0-alpha.0",
21
- "@webiny/app-wcp": "6.0.0-alpha.0",
22
- "@webiny/form": "6.0.0-alpha.0",
23
- "@webiny/icons": "6.0.0-alpha.0",
24
- "@webiny/plugins": "6.0.0-alpha.0",
25
- "@webiny/react-properties": "6.0.0-alpha.0",
26
- "@webiny/react-router": "6.0.0-alpha.0",
27
- "@webiny/shared-aco": "6.0.0-alpha.0",
28
- "@webiny/utils": "6.0.0-alpha.0",
29
- "@webiny/validation": "6.0.0-alpha.0",
15
+ "@webiny/admin-ui": "6.0.0-alpha.1",
16
+ "@webiny/app": "6.0.0-alpha.1",
17
+ "@webiny/app-admin": "6.0.0-alpha.1",
18
+ "@webiny/app-headless-cms-common": "6.0.0-alpha.1",
19
+ "@webiny/app-security": "6.0.0-alpha.1",
20
+ "@webiny/app-utils": "6.0.0-alpha.1",
21
+ "@webiny/app-wcp": "6.0.0-alpha.1",
22
+ "@webiny/form": "6.0.0-alpha.1",
23
+ "@webiny/icons": "6.0.0-alpha.1",
24
+ "@webiny/plugins": "6.0.0-alpha.1",
25
+ "@webiny/react-properties": "6.0.0-alpha.1",
26
+ "@webiny/react-router": "6.0.0-alpha.1",
27
+ "@webiny/shared-aco": "6.0.0-alpha.1",
28
+ "@webiny/utils": "6.0.0-alpha.1",
29
+ "@webiny/validation": "6.0.0-alpha.1",
30
30
  "dot-prop-immutable": "2.1.1",
31
31
  "graphql": "15.9.0",
32
32
  "graphql-tag": "2.12.6",
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "devDependencies": {
45
45
  "@types/react": "18.2.79",
46
- "@webiny/project-utils": "6.0.0-alpha.0",
46
+ "@webiny/project-utils": "6.0.0-alpha.1",
47
47
  "apollo-client": "2.6.10",
48
48
  "apollo-link": "1.2.14",
49
49
  "rimraf": "6.0.1",
@@ -57,5 +57,5 @@
57
57
  "build": "node ../cli/bin.js run build",
58
58
  "watch": "node ../cli/bin.js run watch"
59
59
  },
60
- "gitHead": "a5b28fed7a242d8f56712197a8ea83aa6d2ed101"
60
+ "gitHead": "9bd236cf5e689f209a11bec089207dcc2d41a53c"
61
61
  }
package/sorting.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { DataTableSorting } from "@webiny/admin-ui";
2
- import { ListSearchRecordsSort } from "./types";
2
+ import type { ListSearchRecordsSort } from "./types";
3
3
  export declare const validateOrGetDefaultDbSort: (initial?: ListSearchRecordsSort) => ListSearchRecordsSort;
4
4
  interface IRecord {
5
5
  id: string;
package/sorting.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["orderBy","validateOrGetDefaultDbSort","initial","Array","isArray","length","sortTableItems","records","sort","mapKeys","dbSorting","fields","orders","field","order","split","mappedKey","push","toLowerCase","createSort","sorting","undefined","reduce","items","item","id","desc","includes"],"sources":["sorting.tsx"],"sourcesContent":["import orderBy from \"lodash/orderBy\";\nimport type { DataTableSorting } from \"@webiny/admin-ui\";\nimport { ListSearchRecordsSort, ListSearchRecordsSortItem } from \"~/types\";\n\nexport const validateOrGetDefaultDbSort = (\n initial?: ListSearchRecordsSort\n): ListSearchRecordsSort => {\n if (!Array.isArray(initial) || initial.length === 0) {\n return [\"savedOn_DESC\"];\n }\n\n return initial;\n};\n\ninterface IRecord {\n id: string;\n}\n\nexport const sortTableItems = (\n records: IRecord[],\n sort?: ListSearchRecordsSort,\n mapKeys: Record<string, string> = {}\n): any[] => {\n const dbSorting = validateOrGetDefaultDbSort(sort);\n const fields: string[] = [];\n const orders: (boolean | \"asc\" | \"desc\")[] = [];\n\n for (const sort of dbSorting) {\n const [field, order] = sort.split(\"_\");\n const mappedKey = mapKeys[field] ?? field;\n fields.push(mappedKey);\n orders.push(order.toLowerCase() as \"asc\" | \"desc\");\n }\n\n return orderBy(records, fields, orders);\n};\n\nexport const createSort = (sorting?: DataTableSorting): ListSearchRecordsSort | undefined => {\n if (!sorting?.length) {\n return undefined;\n }\n return sorting.reduce<ListSearchRecordsSort>((items, item) => {\n const sort = `${item.id}_${item.desc ? \"DESC\" : \"ASC\"}` as ListSearchRecordsSortItem;\n if (items.includes(sort)) {\n return items;\n }\n items.push(sort);\n return items;\n }, []);\n};\n"],"mappings":"AAAA,OAAOA,OAAO,MAAM,gBAAgB;AAIpC,OAAO,MAAMC,0BAA0B,GACnCC,OAA+B,IACP;EACxB,IAAI,CAACC,KAAK,CAACC,OAAO,CAACF,OAAO,CAAC,IAAIA,OAAO,CAACG,MAAM,KAAK,CAAC,EAAE;IACjD,OAAO,CAAC,cAAc,CAAC;EAC3B;EAEA,OAAOH,OAAO;AAClB,CAAC;AAMD,OAAO,MAAMI,cAAc,GAAGA,CAC1BC,OAAkB,EAClBC,IAA4B,EAC5BC,OAA+B,GAAG,CAAC,CAAC,KAC5B;EACR,MAAMC,SAAS,GAAGT,0BAA0B,CAACO,IAAI,CAAC;EAClD,MAAMG,MAAgB,GAAG,EAAE;EAC3B,MAAMC,MAAoC,GAAG,EAAE;EAE/C,KAAK,MAAMJ,IAAI,IAAIE,SAAS,EAAE;IAC1B,MAAM,CAACG,KAAK,EAAEC,KAAK,CAAC,GAAGN,IAAI,CAACO,KAAK,CAAC,GAAG,CAAC;IACtC,MAAMC,SAAS,GAAGP,OAAO,CAACI,KAAK,CAAC,IAAIA,KAAK;IACzCF,MAAM,CAACM,IAAI,CAACD,SAAS,CAAC;IACtBJ,MAAM,CAACK,IAAI,CAACH,KAAK,CAACI,WAAW,CAAC,CAAmB,CAAC;EACtD;EAEA,OAAOlB,OAAO,CAACO,OAAO,EAAEI,MAAM,EAAEC,MAAM,CAAC;AAC3C,CAAC;AAED,OAAO,MAAMO,UAAU,GAAIC,OAA0B,IAAwC;EACzF,IAAI,CAACA,OAAO,EAAEf,MAAM,EAAE;IAClB,OAAOgB,SAAS;EACpB;EACA,OAAOD,OAAO,CAACE,MAAM,CAAwB,CAACC,KAAK,EAAEC,IAAI,KAAK;IAC1D,MAAMhB,IAAI,GAAG,GAAGgB,IAAI,CAACC,EAAE,IAAID,IAAI,CAACE,IAAI,GAAG,MAAM,GAAG,KAAK,EAA+B;IACpF,IAAIH,KAAK,CAACI,QAAQ,CAACnB,IAAI,CAAC,EAAE;MACtB,OAAOe,KAAK;IAChB;IACAA,KAAK,CAACN,IAAI,CAACT,IAAI,CAAC;IAChB,OAAOe,KAAK;EAChB,CAAC,EAAE,EAAE,CAAC;AACV,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["orderBy","validateOrGetDefaultDbSort","initial","Array","isArray","length","sortTableItems","records","sort","mapKeys","dbSorting","fields","orders","field","order","split","mappedKey","push","toLowerCase","createSort","sorting","undefined","reduce","items","item","id","desc","includes"],"sources":["sorting.tsx"],"sourcesContent":["import orderBy from \"lodash/orderBy\";\nimport type { DataTableSorting } from \"@webiny/admin-ui\";\nimport type { ListSearchRecordsSort, ListSearchRecordsSortItem } from \"~/types\";\n\nexport const validateOrGetDefaultDbSort = (\n initial?: ListSearchRecordsSort\n): ListSearchRecordsSort => {\n if (!Array.isArray(initial) || initial.length === 0) {\n return [\"savedOn_DESC\"];\n }\n\n return initial;\n};\n\ninterface IRecord {\n id: string;\n}\n\nexport const sortTableItems = (\n records: IRecord[],\n sort?: ListSearchRecordsSort,\n mapKeys: Record<string, string> = {}\n): any[] => {\n const dbSorting = validateOrGetDefaultDbSort(sort);\n const fields: string[] = [];\n const orders: (boolean | \"asc\" | \"desc\")[] = [];\n\n for (const sort of dbSorting) {\n const [field, order] = sort.split(\"_\");\n const mappedKey = mapKeys[field] ?? field;\n fields.push(mappedKey);\n orders.push(order.toLowerCase() as \"asc\" | \"desc\");\n }\n\n return orderBy(records, fields, orders);\n};\n\nexport const createSort = (sorting?: DataTableSorting): ListSearchRecordsSort | undefined => {\n if (!sorting?.length) {\n return undefined;\n }\n return sorting.reduce<ListSearchRecordsSort>((items, item) => {\n const sort = `${item.id}_${item.desc ? \"DESC\" : \"ASC\"}` as ListSearchRecordsSortItem;\n if (items.includes(sort)) {\n return items;\n }\n items.push(sort);\n return items;\n }, []);\n};\n"],"mappings":"AAAA,OAAOA,OAAO,MAAM,gBAAgB;AAIpC,OAAO,MAAMC,0BAA0B,GACnCC,OAA+B,IACP;EACxB,IAAI,CAACC,KAAK,CAACC,OAAO,CAACF,OAAO,CAAC,IAAIA,OAAO,CAACG,MAAM,KAAK,CAAC,EAAE;IACjD,OAAO,CAAC,cAAc,CAAC;EAC3B;EAEA,OAAOH,OAAO;AAClB,CAAC;AAMD,OAAO,MAAMI,cAAc,GAAGA,CAC1BC,OAAkB,EAClBC,IAA4B,EAC5BC,OAA+B,GAAG,CAAC,CAAC,KAC5B;EACR,MAAMC,SAAS,GAAGT,0BAA0B,CAACO,IAAI,CAAC;EAClD,MAAMG,MAAgB,GAAG,EAAE;EAC3B,MAAMC,MAAoC,GAAG,EAAE;EAE/C,KAAK,MAAMJ,IAAI,IAAIE,SAAS,EAAE;IAC1B,MAAM,CAACG,KAAK,EAAEC,KAAK,CAAC,GAAGN,IAAI,CAACO,KAAK,CAAC,GAAG,CAAC;IACtC,MAAMC,SAAS,GAAGP,OAAO,CAACI,KAAK,CAAC,IAAIA,KAAK;IACzCF,MAAM,CAACM,IAAI,CAACD,SAAS,CAAC;IACtBJ,MAAM,CAACK,IAAI,CAACH,KAAK,CAACI,WAAW,CAAC,CAAmB,CAAC;EACtD;EAEA,OAAOlB,OAAO,CAACO,OAAO,EAAEI,MAAM,EAAEC,MAAM,CAAC;AAC3C,CAAC;AAED,OAAO,MAAMO,UAAU,GAAIC,OAA0B,IAAwC;EACzF,IAAI,CAACA,OAAO,EAAEf,MAAM,EAAE;IAClB,OAAOgB,SAAS;EACpB;EACA,OAAOD,OAAO,CAACE,MAAM,CAAwB,CAACC,KAAK,EAAEC,IAAI,KAAK;IAC1D,MAAMhB,IAAI,GAAG,GAAGgB,IAAI,CAACC,EAAE,IAAID,IAAI,CAACE,IAAI,GAAG,MAAM,GAAG,KAAK,EAA+B;IACpF,IAAIH,KAAK,CAACI,QAAQ,CAACnB,IAAI,CAAC,EAAE;MACtB,OAAOe,KAAK;IAChB;IACAA,KAAK,CAACN,IAAI,CAACT,IAAI,CAAC;IAChB,OAAOe,KAAK;EAChB,CAAC,EAAE,EAAE,CAAC;AACV,CAAC","ignoreList":[]}
package/table.types.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { CmsIdentity, FolderItem, GenericSearchData, Location } from "./types";
1
+ import type { CmsIdentity, FolderItem, GenericSearchData, Location } from "./types";
2
2
  export interface SearchRecordItem<TData extends GenericSearchData = GenericSearchData> {
3
3
  id: string;
4
4
  type: string;
@@ -16,13 +16,15 @@ export interface SearchRecordItem<TData extends GenericSearchData = GenericSearc
16
16
  }
17
17
  export type MovableSearchRecordItem = Pick<SearchRecordItem, "id" | "location">;
18
18
  export type DeletableSearchRecordItem = Pick<SearchRecordItem, "id" | "location">;
19
- export interface BaseTableItem {
19
+ export interface TableRow<TData = unknown> {
20
+ id: string;
20
21
  $selectable: boolean;
21
22
  $type: string;
23
+ data: TData;
22
24
  }
23
- export interface FolderTableItem extends BaseTableItem, FolderItem {
25
+ export interface FolderTableRow extends TableRow<FolderItem> {
24
26
  $type: "FOLDER";
25
27
  }
26
- export interface RecordTableItem extends BaseTableItem {
28
+ export interface RecordTableRow<TData> extends TableRow<TData> {
27
29
  $type: "RECORD";
28
30
  }
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["table.types.ts"],"sourcesContent":["import { CmsIdentity, FolderItem, GenericSearchData, Location } from \"~/types\";\n\nexport interface SearchRecordItem<TData extends GenericSearchData = GenericSearchData> {\n id: string;\n type: string;\n title: string;\n content: string;\n location: Location;\n data: TData;\n tags: string[];\n createdOn: string;\n createdBy: CmsIdentity;\n savedOn: string;\n savedBy: CmsIdentity;\n modifiedOn: string | null;\n modifiedBy: CmsIdentity | null;\n}\n\nexport type MovableSearchRecordItem = Pick<SearchRecordItem, \"id\" | \"location\">;\n\nexport type DeletableSearchRecordItem = Pick<SearchRecordItem, \"id\" | \"location\">;\n\nexport interface BaseTableItem {\n $selectable: boolean;\n $type: string;\n}\n\nexport interface FolderTableItem extends BaseTableItem, FolderItem {\n $type: \"FOLDER\";\n}\n\nexport interface RecordTableItem extends BaseTableItem {\n $type: \"RECORD\";\n}\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["table.types.ts"],"sourcesContent":["import type { CmsIdentity, FolderItem, GenericSearchData, Location } from \"~/types\";\n\nexport interface SearchRecordItem<TData extends GenericSearchData = GenericSearchData> {\n id: string;\n type: string;\n title: string;\n content: string;\n location: Location;\n data: TData;\n tags: string[];\n createdOn: string;\n createdBy: CmsIdentity;\n savedOn: string;\n savedBy: CmsIdentity;\n modifiedOn: string | null;\n modifiedBy: CmsIdentity | null;\n}\n\nexport type MovableSearchRecordItem = Pick<SearchRecordItem, \"id\" | \"location\">;\n\nexport type DeletableSearchRecordItem = Pick<SearchRecordItem, \"id\" | \"location\">;\n\nexport interface TableRow<TData = unknown> {\n id: string;\n $selectable: boolean;\n $type: string;\n data: TData;\n}\n\nexport interface FolderTableRow extends TableRow<FolderItem> {\n $type: \"FOLDER\";\n}\n\nexport interface RecordTableRow<TData> extends TableRow<TData> {\n $type: \"RECORD\";\n}\n"],"mappings":"","ignoreList":[]}
package/types.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { CmsIdentity, CmsModel, CmsModelField, CmsModelFieldSettings } from "@webiny/app-headless-cms-common/types";
1
+ import type { CmsIdentity, CmsModel, CmsModelField, CmsModelFieldSettings } from "@webiny/app-headless-cms-common/types";
2
2
  import type { FolderPermission } from "@webiny/shared-aco/types";
3
- export { CmsIdentity } from "@webiny/app-headless-cms-common/types";
3
+ export type { CmsIdentity } from "@webiny/app-headless-cms-common/types";
4
4
  export * from "@webiny/shared-aco/flp/flp.types";
5
5
  export * from "./graphql/records/types";
6
6
  export * from "./table.types";
package/types.js CHANGED
@@ -1,4 +1,3 @@
1
- export { CmsIdentity } from "@webiny/app-headless-cms-common/types";
2
1
  export * from "@webiny/shared-aco/flp/flp.types";
3
2
  export * from "./graphql/records/types";
4
3
  export * from "./table.types";
package/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"names":["CmsIdentity","LoadingActionsEnum","init","list","listMore","get","create","update","delete","move"],"sources":["types.ts"],"sourcesContent":["import {\n CmsIdentity,\n CmsModel,\n CmsModelField,\n CmsModelFieldSettings\n} from \"@webiny/app-headless-cms-common/types\";\nimport type { FolderPermission } from \"@webiny/shared-aco/types\";\n\nexport { CmsIdentity } from \"@webiny/app-headless-cms-common/types\";\nexport * from \"@webiny/shared-aco/flp/flp.types\";\nexport * from \"~/graphql/records/types\";\nexport * from \"~/table.types\";\n\nexport interface FolderLevelPermissionsTarget<TMeta = Record<string, any>> {\n id: string;\n target: string;\n name: string;\n type: string;\n meta: TMeta;\n}\n\nexport interface FolderItem {\n id: string;\n title: string;\n slug: string;\n permissions: FolderPermission[];\n hasNonInheritedPermissions: boolean;\n canManagePermissions: boolean;\n canManageStructure: boolean;\n canManageContent: boolean;\n type: string;\n parentId: string | null;\n path: string;\n createdBy: CmsIdentity;\n createdOn: string;\n savedBy: CmsIdentity;\n savedOn: string;\n modifiedBy: CmsIdentity | null;\n modifiedOn: string | null;\n extensions: Record<string, any>;\n}\n\nexport type GenericSearchData = {\n [key: string]: any;\n};\n\nexport interface Location {\n folderId: string;\n}\n\nexport interface TagItem {\n tag: string;\n}\n\nexport type Loading<T extends string> = { [P in T]?: boolean };\n\nexport type LoadingActions =\n | \"INIT\"\n | \"LIST\"\n | \"LIST_MORE\"\n | \"GET\"\n | \"CREATE\"\n | \"UPDATE\"\n | \"DELETE\"\n | \"MOVE\";\n\nexport const LoadingActionsEnum = {\n init: \"INIT\",\n list: \"LIST\",\n listMore: \"LIST_MORE\",\n get: \"GET\",\n create: \"CREATE\",\n update: \"UPDATE\",\n delete: \"DELETE\",\n move: \"MOVE\"\n};\n\nexport interface AcoError {\n code: string;\n message: string;\n data?: Record<string, any> | null;\n}\n\nexport type ListSearchRecordsSortItem = `${string}_ASC` | `${string}_DESC`;\nexport type ListSearchRecordsSort = ListSearchRecordsSortItem[];\n\nexport interface ListMeta {\n cursor: string | null;\n totalCount: number;\n hasMoreItems: boolean;\n}\n\nexport interface ListFoldersResponse {\n aco: {\n listFolders: {\n data: FolderItem[] | null;\n error: AcoError | null;\n };\n };\n}\n\nexport interface ListFoldersQueryVariables {\n type: string;\n limit: number;\n sort?: Record<string, any>;\n after?: string | null;\n}\n\nexport interface GetFolderResponse {\n aco: {\n getFolder: {\n data: FolderItem | null;\n error: AcoError | null;\n };\n };\n}\n\nexport interface GetFolderQueryVariables {\n id: string;\n}\n\nexport interface UpdateFolderResponse {\n aco: {\n updateFolder: {\n data: FolderItem;\n error: AcoError | null;\n };\n };\n}\n\nexport interface UpdateFolderVariables {\n id: string;\n data: Partial<\n Omit<\n FolderItem,\n \"id\" | \"createdOn\" | \"createdBy\" | \"savedOn\" | \"savedBy\" | \"modifiedOn\" | \"modifiedBy\"\n >\n >;\n}\n\nexport interface CreateFolderResponse {\n aco: {\n createFolder: {\n data: FolderItem;\n error: AcoError | null;\n };\n };\n}\n\nexport interface CreateFolderVariables {\n data: Omit<\n FolderItem,\n | \"id\"\n | \"createdOn\"\n | \"createdBy\"\n | \"savedOn\"\n | \"savedBy\"\n | \"modifiedOn\"\n | \"modifiedBy\"\n | \"hasNonInheritedPermissions\"\n | \"canManageContent\"\n | \"canManagePermissions\"\n | \"canManageStructure\"\n >;\n}\n\nexport interface DeleteFolderVariables {\n id: string;\n}\n\nexport interface DeleteFolderResponse {\n aco: {\n deleteFolder: {\n data: boolean;\n error: AcoError | null;\n };\n };\n}\n\nexport interface DndFolderItemData {\n isFocused?: boolean;\n}\n\n/**\n * This type will be removed when all apps migrate to the CMS.\n * @deprecated\n */\nexport type AcoAppMode = \"aco\" | \"cms\";\n\n/**\n * Apps.\n */\nexport interface AcoModel extends CmsModel {\n fields: AcoModelField[];\n}\n\nexport interface AcoModelFieldSettingsAco {\n enabled?: boolean;\n header?: boolean;\n}\n\nexport interface AcoModelFieldSettings {\n aco?: AcoModelFieldSettingsAco;\n}\n\nexport interface AcoModelField extends CmsModelField {\n settings?: CmsModelFieldSettings & AcoModelFieldSettings;\n}\n\nexport interface AcoApp {\n id: string;\n model: AcoModel;\n getFields: () => AcoModelField[];\n}\n"],"mappings":"AAQA,SAASA,WAAW,QAAQ,uCAAuC;AACnE,cAAc,kCAAkC;AAChD;AACA;AAuDA,OAAO,MAAMC,kBAAkB,GAAG;EAC9BC,IAAI,EAAE,MAAM;EACZC,IAAI,EAAE,MAAM;EACZC,QAAQ,EAAE,WAAW;EACrBC,GAAG,EAAE,KAAK;EACVC,MAAM,EAAE,QAAQ;EAChBC,MAAM,EAAE,QAAQ;EAChBC,MAAM,EAAE,QAAQ;EAChBC,IAAI,EAAE;AACV,CAAC;;AA4GD;AACA;AACA;AACA;;AAGA;AACA;AACA","ignoreList":[]}
1
+ {"version":3,"names":["LoadingActionsEnum","init","list","listMore","get","create","update","delete","move"],"sources":["types.ts"],"sourcesContent":["import type {\n CmsIdentity,\n CmsModel,\n CmsModelField,\n CmsModelFieldSettings\n} from \"@webiny/app-headless-cms-common/types\";\nimport type { FolderPermission } from \"@webiny/shared-aco/types\";\n\nexport type { CmsIdentity } from \"@webiny/app-headless-cms-common/types\";\nexport * from \"@webiny/shared-aco/flp/flp.types\";\nexport * from \"~/graphql/records/types\";\nexport * from \"~/table.types\";\n\nexport interface FolderLevelPermissionsTarget<TMeta = Record<string, any>> {\n id: string;\n target: string;\n name: string;\n type: string;\n meta: TMeta;\n}\n\nexport interface FolderItem {\n id: string;\n title: string;\n slug: string;\n permissions: FolderPermission[];\n hasNonInheritedPermissions: boolean;\n canManagePermissions: boolean;\n canManageStructure: boolean;\n canManageContent: boolean;\n type: string;\n parentId: string | null;\n path: string;\n createdBy: CmsIdentity;\n createdOn: string;\n savedBy: CmsIdentity;\n savedOn: string;\n modifiedBy: CmsIdentity | null;\n modifiedOn: string | null;\n extensions: Record<string, any>;\n}\n\nexport type GenericSearchData = {\n [key: string]: any;\n};\n\nexport interface Location {\n folderId: string;\n}\n\nexport interface TagItem {\n tag: string;\n}\n\nexport type Loading<T extends string> = { [P in T]?: boolean };\n\nexport type LoadingActions =\n | \"INIT\"\n | \"LIST\"\n | \"LIST_MORE\"\n | \"GET\"\n | \"CREATE\"\n | \"UPDATE\"\n | \"DELETE\"\n | \"MOVE\";\n\nexport const LoadingActionsEnum = {\n init: \"INIT\",\n list: \"LIST\",\n listMore: \"LIST_MORE\",\n get: \"GET\",\n create: \"CREATE\",\n update: \"UPDATE\",\n delete: \"DELETE\",\n move: \"MOVE\"\n};\n\nexport interface AcoError {\n code: string;\n message: string;\n data?: Record<string, any> | null;\n}\n\nexport type ListSearchRecordsSortItem = `${string}_ASC` | `${string}_DESC`;\nexport type ListSearchRecordsSort = ListSearchRecordsSortItem[];\n\nexport interface ListMeta {\n cursor: string | null;\n totalCount: number;\n hasMoreItems: boolean;\n}\n\nexport interface ListFoldersResponse {\n aco: {\n listFolders: {\n data: FolderItem[] | null;\n error: AcoError | null;\n };\n };\n}\n\nexport interface ListFoldersQueryVariables {\n type: string;\n limit: number;\n sort?: Record<string, any>;\n after?: string | null;\n}\n\nexport interface GetFolderResponse {\n aco: {\n getFolder: {\n data: FolderItem | null;\n error: AcoError | null;\n };\n };\n}\n\nexport interface GetFolderQueryVariables {\n id: string;\n}\n\nexport interface UpdateFolderResponse {\n aco: {\n updateFolder: {\n data: FolderItem;\n error: AcoError | null;\n };\n };\n}\n\nexport interface UpdateFolderVariables {\n id: string;\n data: Partial<\n Omit<\n FolderItem,\n \"id\" | \"createdOn\" | \"createdBy\" | \"savedOn\" | \"savedBy\" | \"modifiedOn\" | \"modifiedBy\"\n >\n >;\n}\n\nexport interface CreateFolderResponse {\n aco: {\n createFolder: {\n data: FolderItem;\n error: AcoError | null;\n };\n };\n}\n\nexport interface CreateFolderVariables {\n data: Omit<\n FolderItem,\n | \"id\"\n | \"createdOn\"\n | \"createdBy\"\n | \"savedOn\"\n | \"savedBy\"\n | \"modifiedOn\"\n | \"modifiedBy\"\n | \"hasNonInheritedPermissions\"\n | \"canManageContent\"\n | \"canManagePermissions\"\n | \"canManageStructure\"\n >;\n}\n\nexport interface DeleteFolderVariables {\n id: string;\n}\n\nexport interface DeleteFolderResponse {\n aco: {\n deleteFolder: {\n data: boolean;\n error: AcoError | null;\n };\n };\n}\n\nexport interface DndFolderItemData {\n isFocused?: boolean;\n}\n\n/**\n * This type will be removed when all apps migrate to the CMS.\n * @deprecated\n */\nexport type AcoAppMode = \"aco\" | \"cms\";\n\n/**\n * Apps.\n */\nexport interface AcoModel extends CmsModel {\n fields: AcoModelField[];\n}\n\nexport interface AcoModelFieldSettingsAco {\n enabled?: boolean;\n header?: boolean;\n}\n\nexport interface AcoModelFieldSettings {\n aco?: AcoModelFieldSettingsAco;\n}\n\nexport interface AcoModelField extends CmsModelField {\n settings?: CmsModelFieldSettings & AcoModelFieldSettings;\n}\n\nexport interface AcoApp {\n id: string;\n model: AcoModel;\n getFields: () => AcoModelField[];\n}\n"],"mappings":"AASA,cAAc,kCAAkC;AAChD;AACA;AAuDA,OAAO,MAAMA,kBAAkB,GAAG;EAC9BC,IAAI,EAAE,MAAM;EACZC,IAAI,EAAE,MAAM;EACZC,QAAQ,EAAE,WAAW;EACrBC,GAAG,EAAE,KAAK;EACVC,MAAM,EAAE,QAAQ;EAChBC,MAAM,EAAE,QAAQ;EAChBC,MAAM,EAAE,QAAQ;EAChBC,IAAI,EAAE;AACV,CAAC;;AA4GD;AACA;AACA;AACA;;AAGA;AACA;AACA","ignoreList":[]}