@webiny/app-file-manager 0.0.0-unstable.78f581c1d2 → 0.0.0-unstable.7be00a75a9

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 (738) hide show
  1. package/README.md +7 -28
  2. package/app.d.ts +2 -0
  3. package/app.js +57 -0
  4. package/app.js.map +1 -0
  5. package/domain/constants.d.ts +4 -0
  6. package/domain/constants.js +7 -0
  7. package/domain/constants.js.map +1 -0
  8. package/domain/permissionsSchema.d.ts +18 -0
  9. package/domain/permissionsSchema.js +32 -0
  10. package/domain/permissionsSchema.js.map +1 -0
  11. package/domain/tagsHelpers.d.ts +16 -0
  12. package/domain/tagsHelpers.js +25 -0
  13. package/domain/tagsHelpers.js.map +1 -0
  14. package/domain/types.d.ts +34 -0
  15. package/domain/types.js +0 -0
  16. package/exports/admin/ui/file-manager.d.ts +2 -0
  17. package/exports/admin/ui/file-manager.js +1 -0
  18. package/features/deleteFile/DeleteFile.test.d.ts +1 -0
  19. package/features/deleteFile/DeleteFile.test.js +150 -0
  20. package/features/deleteFile/DeleteFile.test.js.map +1 -0
  21. package/features/deleteFile/DeleteFileGateway.d.ts +11 -0
  22. package/features/deleteFile/DeleteFileGateway.js +23 -0
  23. package/features/deleteFile/DeleteFileGateway.js.map +1 -0
  24. package/features/deleteFile/DeleteFileRepository.d.ts +12 -0
  25. package/features/deleteFile/DeleteFileRepository.js +26 -0
  26. package/features/deleteFile/DeleteFileRepository.js.map +1 -0
  27. package/features/deleteFile/DeleteFileUseCase.d.ts +10 -0
  28. package/features/deleteFile/DeleteFileUseCase.js +34 -0
  29. package/features/deleteFile/DeleteFileUseCase.js.map +1 -0
  30. package/features/deleteFile/abstractions.d.ts +36 -0
  31. package/features/deleteFile/abstractions.js +7 -0
  32. package/features/deleteFile/abstractions.js.map +1 -0
  33. package/features/deleteFile/feature.d.ts +3 -0
  34. package/features/deleteFile/feature.js +21 -0
  35. package/features/deleteFile/feature.js.map +1 -0
  36. package/features/deleteFile/index.d.ts +3 -0
  37. package/features/deleteFile/index.js +2 -0
  38. package/features/fileModel/FileModelProvider.d.ts +12 -0
  39. package/features/fileModel/FileModelProvider.js +21 -0
  40. package/features/fileModel/FileModelProvider.js.map +1 -0
  41. package/features/fileModel/GetFileModelGqlGateway.d.ts +12 -0
  42. package/features/fileModel/GetFileModelGqlGateway.js +38 -0
  43. package/features/fileModel/GetFileModelGqlGateway.js.map +1 -0
  44. package/features/fileModel/GetFileModelRepository.d.ts +14 -0
  45. package/features/fileModel/GetFileModelRepository.js +32 -0
  46. package/features/fileModel/GetFileModelRepository.js.map +1 -0
  47. package/features/fileModel/abstractions.d.ts +24 -0
  48. package/features/fileModel/abstractions.js +7 -0
  49. package/features/fileModel/abstractions.js.map +1 -0
  50. package/features/fileModel/feature.d.ts +1 -0
  51. package/features/fileModel/feature.js +15 -0
  52. package/features/fileModel/feature.js.map +1 -0
  53. package/features/fileModel/index.d.ts +2 -0
  54. package/features/fileModel/index.js +2 -0
  55. package/features/fileUploader/FileUploader.d.ts +23 -0
  56. package/features/fileUploader/FileUploader.js +243 -0
  57. package/features/fileUploader/FileUploader.js.map +1 -0
  58. package/features/fileUploader/FileUploader.test.d.ts +1 -0
  59. package/features/fileUploader/FileUploader.test.js +427 -0
  60. package/features/fileUploader/FileUploader.test.js.map +1 -0
  61. package/features/fileUploader/abstractions.d.ts +51 -0
  62. package/features/fileUploader/abstractions.js +5 -0
  63. package/features/fileUploader/abstractions.js.map +1 -0
  64. package/features/fileUploader/feature.d.ts +3 -0
  65. package/features/fileUploader/feature.js +17 -0
  66. package/features/fileUploader/feature.js.map +1 -0
  67. package/features/fileUploader/index.d.ts +3 -0
  68. package/features/fileUploader/index.js +2 -0
  69. package/features/fileUrlFormatter/FileUrlFormatter.d.ts +8 -0
  70. package/features/fileUrlFormatter/FileUrlFormatter.js +13 -0
  71. package/features/fileUrlFormatter/FileUrlFormatter.js.map +1 -0
  72. package/features/fileUrlFormatter/abstractions.d.ts +1 -0
  73. package/features/fileUrlFormatter/abstractions.js +1 -0
  74. package/features/fileUrlFormatter/feature.d.ts +1 -0
  75. package/features/fileUrlFormatter/feature.js +11 -0
  76. package/features/fileUrlFormatter/feature.js.map +1 -0
  77. package/features/getFile/GetFileGateway.d.ts +14 -0
  78. package/features/getFile/GetFileGateway.js +28 -0
  79. package/features/getFile/GetFileGateway.js.map +1 -0
  80. package/features/getFile/GetFileRepository.d.ts +11 -0
  81. package/features/getFile/GetFileRepository.js +18 -0
  82. package/features/getFile/GetFileRepository.js.map +1 -0
  83. package/features/getFile/GetFileUseCase.d.ts +10 -0
  84. package/features/getFile/GetFileUseCase.js +35 -0
  85. package/features/getFile/GetFileUseCase.js.map +1 -0
  86. package/features/getFile/abstractions.d.ts +38 -0
  87. package/features/getFile/abstractions.js +7 -0
  88. package/features/getFile/abstractions.js.map +1 -0
  89. package/features/getFile/feature.d.ts +3 -0
  90. package/features/getFile/feature.js +21 -0
  91. package/features/getFile/feature.js.map +1 -0
  92. package/features/getFile/index.d.ts +3 -0
  93. package/features/getFile/index.js +2 -0
  94. package/features/listFiles/ListFiles.test.d.ts +1 -0
  95. package/features/listFiles/ListFiles.test.js +192 -0
  96. package/features/listFiles/ListFiles.test.js.map +1 -0
  97. package/features/listFiles/ListFilesGateway.d.ts +13 -0
  98. package/features/listFiles/ListFilesGateway.js +35 -0
  99. package/features/listFiles/ListFilesGateway.js.map +1 -0
  100. package/features/listFiles/ListFilesRepository.d.ts +12 -0
  101. package/features/listFiles/ListFilesRepository.js +26 -0
  102. package/features/listFiles/ListFilesRepository.js.map +1 -0
  103. package/features/listFiles/ListFilesUseCase.d.ts +10 -0
  104. package/features/listFiles/ListFilesUseCase.js +28 -0
  105. package/features/listFiles/ListFilesUseCase.js.map +1 -0
  106. package/features/listFiles/abstractions.d.ts +45 -0
  107. package/features/listFiles/abstractions.js +7 -0
  108. package/features/listFiles/abstractions.js.map +1 -0
  109. package/features/listFiles/feature.d.ts +3 -0
  110. package/features/listFiles/feature.js +21 -0
  111. package/features/listFiles/feature.js.map +1 -0
  112. package/features/listFiles/index.d.ts +3 -0
  113. package/features/listFiles/index.js +2 -0
  114. package/features/permissions/abstractions.d.ts +17 -0
  115. package/features/permissions/abstractions.js +6 -0
  116. package/features/permissions/abstractions.js.map +1 -0
  117. package/features/permissions/feature.d.ts +14 -0
  118. package/features/permissions/feature.js +7 -0
  119. package/features/permissions/feature.js.map +1 -0
  120. package/features/resolveImageTool/ResolveImageTool.d.ts +40 -0
  121. package/features/resolveImageTool/ResolveImageTool.js +49 -0
  122. package/features/resolveImageTool/ResolveImageTool.js.map +1 -0
  123. package/features/resolveImageTool/feature.d.ts +1 -0
  124. package/features/resolveImageTool/feature.js +11 -0
  125. package/features/resolveImageTool/feature.js.map +1 -0
  126. package/features/settings/GetSettings.test.d.ts +1 -0
  127. package/features/settings/GetSettings.test.js +92 -0
  128. package/features/settings/GetSettings.test.js.map +1 -0
  129. package/features/settings/GetSettingsGateway.d.ts +12 -0
  130. package/features/settings/GetSettingsGateway.js +43 -0
  131. package/features/settings/GetSettingsGateway.js.map +1 -0
  132. package/features/settings/GetSettingsRepository.d.ts +14 -0
  133. package/features/settings/GetSettingsRepository.js +34 -0
  134. package/features/settings/GetSettingsRepository.js.map +1 -0
  135. package/features/settings/GetSettingsUseCase.d.ts +11 -0
  136. package/features/settings/GetSettingsUseCase.js +18 -0
  137. package/features/settings/GetSettingsUseCase.js.map +1 -0
  138. package/features/settings/SaveSettingsGateway.d.ts +12 -0
  139. package/features/settings/SaveSettingsGateway.js +50 -0
  140. package/features/settings/SaveSettingsGateway.js.map +1 -0
  141. package/features/settings/abstractions.d.ts +31 -0
  142. package/features/settings/abstractions.js +8 -0
  143. package/features/settings/abstractions.js.map +1 -0
  144. package/features/settings/feature.d.ts +3 -0
  145. package/features/settings/feature.js +23 -0
  146. package/features/settings/feature.js.map +1 -0
  147. package/features/settings/index.d.ts +3 -0
  148. package/features/settings/index.js +2 -0
  149. package/features/shared/FILE_FIELDS.d.ts +1 -0
  150. package/features/shared/FILE_FIELDS.js +32 -0
  151. package/features/shared/FILE_FIELDS.js.map +1 -0
  152. package/features/shared/FileFieldsProvider.d.ts +8 -0
  153. package/features/shared/FileFieldsProvider.js +14 -0
  154. package/features/shared/FileFieldsProvider.js.map +1 -0
  155. package/features/shared/FileFieldsProviderWithWcp.d.ts +12 -0
  156. package/features/shared/FileFieldsProviderWithWcp.js +25 -0
  157. package/features/shared/FileFieldsProviderWithWcp.js.map +1 -0
  158. package/features/shared/FilesListCache.d.ts +1 -0
  159. package/features/shared/FilesListCache.js +1 -0
  160. package/features/shared/abstractions.d.ts +13 -0
  161. package/features/shared/abstractions.js +6 -0
  162. package/features/shared/abstractions.js.map +1 -0
  163. package/features/shared/feature.d.ts +5 -0
  164. package/features/shared/feature.js +22 -0
  165. package/features/shared/feature.js.map +1 -0
  166. package/features/shared/index.d.ts +4 -0
  167. package/features/shared/index.js +3 -0
  168. package/features/shared/types.d.ts +16 -0
  169. package/features/shared/types.js +0 -0
  170. package/features/tags/ListTags.test.d.ts +1 -0
  171. package/features/tags/ListTags.test.js +126 -0
  172. package/features/tags/ListTags.test.js.map +1 -0
  173. package/features/tags/ListTagsGateway.d.ts +11 -0
  174. package/features/tags/ListTagsGateway.js +23 -0
  175. package/features/tags/ListTagsGateway.js.map +1 -0
  176. package/features/tags/ListTagsRepository.d.ts +12 -0
  177. package/features/tags/ListTagsRepository.js +25 -0
  178. package/features/tags/ListTagsRepository.js.map +1 -0
  179. package/features/tags/ListTagsUseCase.d.ts +10 -0
  180. package/features/tags/ListTagsUseCase.js +20 -0
  181. package/features/tags/ListTagsUseCase.js.map +1 -0
  182. package/features/tags/abstractions.d.ts +32 -0
  183. package/features/tags/abstractions.js +7 -0
  184. package/features/tags/abstractions.js.map +1 -0
  185. package/features/tags/feature.d.ts +3 -0
  186. package/features/tags/feature.js +21 -0
  187. package/features/tags/feature.js.map +1 -0
  188. package/features/tags/index.d.ts +3 -0
  189. package/features/tags/index.js +2 -0
  190. package/features/updateFile/UpdateFile.test.d.ts +1 -0
  191. package/features/updateFile/UpdateFile.test.js +260 -0
  192. package/features/updateFile/UpdateFile.test.js.map +1 -0
  193. package/features/updateFile/UpdateFileGateway.d.ts +12 -0
  194. package/features/updateFile/UpdateFileGateway.js +25 -0
  195. package/features/updateFile/UpdateFileGateway.js.map +1 -0
  196. package/features/updateFile/UpdateFileRepository.d.ts +14 -0
  197. package/features/updateFile/UpdateFileRepository.js +32 -0
  198. package/features/updateFile/UpdateFileRepository.js.map +1 -0
  199. package/features/updateFile/UpdateFileUseCase.d.ts +12 -0
  200. package/features/updateFile/UpdateFileUseCase.js +41 -0
  201. package/features/updateFile/UpdateFileUseCase.js.map +1 -0
  202. package/features/updateFile/abstractions.d.ts +53 -0
  203. package/features/updateFile/abstractions.js +7 -0
  204. package/features/updateFile/abstractions.js.map +1 -0
  205. package/features/updateFile/feature.d.ts +3 -0
  206. package/features/updateFile/feature.js +21 -0
  207. package/features/updateFile/feature.js.map +1 -0
  208. package/features/updateFile/index.d.ts +3 -0
  209. package/features/updateFile/index.js +2 -0
  210. package/index.d.ts +3 -2
  211. package/index.js +3 -37
  212. package/modules/Enterprise/HandleWebsocketMessages.d.ts +1 -0
  213. package/modules/Enterprise/HandleWebsocketMessages.js +53 -0
  214. package/modules/Enterprise/HandleWebsocketMessages.js.map +1 -0
  215. package/modules/Enterprise/components/ThreatScanInProgressFileBody.d.ts +2 -0
  216. package/modules/Enterprise/components/ThreatScanInProgressFileBody.js +22 -0
  217. package/modules/Enterprise/components/ThreatScanInProgressFileBody.js.map +1 -0
  218. package/modules/Enterprise/components/ThreatScanInProgressTableCell.d.ts +6 -0
  219. package/modules/Enterprise/components/ThreatScanInProgressTableCell.js +20 -0
  220. package/modules/Enterprise/components/ThreatScanInProgressTableCell.js.map +1 -0
  221. package/modules/Enterprise/constants.d.ts +3 -0
  222. package/modules/Enterprise/constants.js +6 -0
  223. package/modules/Enterprise/constants.js.map +1 -0
  224. package/modules/Enterprise/index.d.ts +2 -0
  225. package/modules/Enterprise/index.js +30 -0
  226. package/modules/Enterprise/index.js.map +1 -0
  227. package/modules/FileManagerRoutes.d.ts +2 -0
  228. package/modules/FileManagerRoutes.js +31 -0
  229. package/modules/FileManagerRoutes.js.map +1 -0
  230. package/modules/FileModelModule.d.ts +2 -0
  231. package/modules/FileModelModule.js +18 -0
  232. package/modules/FileModelModule.js.map +1 -0
  233. package/modules/FileUrlFormatter.d.ts +2 -0
  234. package/modules/FileUrlFormatter.js +9 -0
  235. package/modules/FileUrlFormatter.js.map +1 -0
  236. package/modules/HeadlessCms/fileField.d.ts +2 -0
  237. package/modules/HeadlessCms/fileField.js +44 -0
  238. package/modules/HeadlessCms/fileField.js.map +1 -0
  239. package/modules/HeadlessCms/fileRenderer/fileField.d.ts +2 -0
  240. package/modules/HeadlessCms/fileRenderer/fileField.js +53 -0
  241. package/modules/HeadlessCms/fileRenderer/fileField.js.map +1 -0
  242. package/modules/HeadlessCms/fileRenderer/fileFields.d.ts +2 -0
  243. package/modules/HeadlessCms/fileRenderer/fileFields.js +73 -0
  244. package/modules/HeadlessCms/fileRenderer/fileFields.js.map +1 -0
  245. package/modules/HeadlessCms/fileRenderer/utils.d.ts +2 -0
  246. package/modules/HeadlessCms/fileRenderer/utils.js +15 -0
  247. package/modules/HeadlessCms/fileRenderer/utils.js.map +1 -0
  248. package/modules/HeadlessCms/index.d.ts +1 -0
  249. package/modules/HeadlessCms/index.js +14 -0
  250. package/modules/HeadlessCms/index.js.map +1 -0
  251. package/modules/SecurityPermissions.d.ts +2 -0
  252. package/modules/SecurityPermissions.js +15 -0
  253. package/modules/SecurityPermissions.js.map +1 -0
  254. package/modules/Settings/assets/icons/folder-open.js +19 -0
  255. package/modules/Settings/assets/icons/folder-open.js.map +1 -0
  256. package/{admin → modules/Settings}/graphql.d.ts +7 -0
  257. package/modules/Settings/graphql.js +36 -0
  258. package/modules/Settings/graphql.js.map +1 -0
  259. package/modules/Settings/index.d.ts +2 -0
  260. package/modules/Settings/index.js +27 -0
  261. package/modules/Settings/index.js.map +1 -0
  262. package/modules/Settings/views/FileManagerSettings.d.ts +2 -0
  263. package/modules/Settings/views/FileManagerSettings.js +134 -0
  264. package/modules/Settings/views/FileManagerSettings.js.map +1 -0
  265. package/package.json +46 -37
  266. package/presentation/FileActions/FileDetails/CopyUrl.d.ts +2 -0
  267. package/presentation/FileActions/FileDetails/CopyUrl.js +19 -0
  268. package/presentation/FileActions/FileDetails/CopyUrl.js.map +1 -0
  269. package/presentation/FileActions/FileDetails/DeleteImage.d.ts +2 -0
  270. package/presentation/FileActions/FileDetails/DeleteImage.js +24 -0
  271. package/presentation/FileActions/FileDetails/DeleteImage.js.map +1 -0
  272. package/presentation/FileActions/FileDetails/Download.d.ts +2 -0
  273. package/presentation/FileActions/FileDetails/Download.js +19 -0
  274. package/presentation/FileActions/FileDetails/Download.js.map +1 -0
  275. package/presentation/FileActions/FileDetails/MoveToFolder.d.ts +2 -0
  276. package/presentation/FileActions/FileDetails/MoveToFolder.js +16 -0
  277. package/presentation/FileActions/FileDetails/MoveToFolder.js.map +1 -0
  278. package/presentation/FileActions/Grid/Delete.d.ts +2 -0
  279. package/presentation/FileActions/Grid/Delete.js +23 -0
  280. package/presentation/FileActions/Grid/Delete.js.map +1 -0
  281. package/presentation/FileActions/Grid/Download.d.ts +2 -0
  282. package/presentation/FileActions/Grid/Download.js +19 -0
  283. package/presentation/FileActions/Grid/Download.js.map +1 -0
  284. package/presentation/FileActions/Grid/MoveToFolder.d.ts +2 -0
  285. package/presentation/FileActions/Grid/MoveToFolder.js +16 -0
  286. package/presentation/FileActions/Grid/MoveToFolder.js.map +1 -0
  287. package/presentation/FileActions/Grid/Settings.d.ts +2 -0
  288. package/presentation/FileActions/Grid/Settings.js +23 -0
  289. package/presentation/FileActions/Grid/Settings.js.map +1 -0
  290. package/presentation/FileActions/index.d.ts +2 -0
  291. package/presentation/FileActions/index.js +39 -0
  292. package/presentation/FileActions/index.js.map +1 -0
  293. package/presentation/FileDetails/FileDetailsPresenter.d.ts +28 -0
  294. package/presentation/FileDetails/FileDetailsPresenter.js +138 -0
  295. package/presentation/FileDetails/FileDetailsPresenter.js.map +1 -0
  296. package/presentation/FileDetails/FileDetailsPresenter.test.d.ts +1 -0
  297. package/presentation/FileDetails/FileDetailsPresenter.test.js +280 -0
  298. package/presentation/FileDetails/FileDetailsPresenter.test.js.map +1 -0
  299. package/presentation/FileDetails/abstractions.d.ts +22 -0
  300. package/presentation/FileDetails/abstractions.js +5 -0
  301. package/presentation/FileDetails/abstractions.js.map +1 -0
  302. package/presentation/FileDetails/components/ActionButton.d.ts +10 -0
  303. package/presentation/FileDetails/components/ActionButton.js +15 -0
  304. package/presentation/FileDetails/components/ActionButton.js.map +1 -0
  305. package/presentation/FileDetails/components/Actions.d.ts +2 -0
  306. package/presentation/FileDetails/components/Actions.js +13 -0
  307. package/presentation/FileDetails/components/Actions.js.map +1 -0
  308. package/presentation/FileDetails/components/Content.d.ts +14 -0
  309. package/presentation/FileDetails/components/Content.js +20 -0
  310. package/presentation/FileDetails/components/Content.js.map +1 -0
  311. package/presentation/FileDetails/components/CreatedOn.d.ts +2 -0
  312. package/presentation/FileDetails/components/CreatedOn.js +21 -0
  313. package/presentation/FileDetails/components/CreatedOn.js.map +1 -0
  314. package/presentation/FileDetails/components/Description.d.ts +2 -0
  315. package/presentation/FileDetails/components/Description.js +16 -0
  316. package/presentation/FileDetails/components/Description.js.map +1 -0
  317. package/presentation/FileDetails/components/FileDetailsDrawer.d.ts +4 -0
  318. package/presentation/FileDetails/components/FileDetailsDrawer.js +73 -0
  319. package/presentation/FileDetails/components/FileDetailsDrawer.js.map +1 -0
  320. package/presentation/FileDetails/components/Preview.d.ts +2 -0
  321. package/presentation/FileDetails/components/Preview.js +15 -0
  322. package/presentation/FileDetails/components/Preview.js.map +1 -0
  323. package/presentation/FileDetails/components/Thumbnail.d.ts +2 -0
  324. package/presentation/FileDetails/components/Thumbnail.js +12 -0
  325. package/presentation/FileDetails/components/Thumbnail.js.map +1 -0
  326. package/presentation/FileDetails/feature.d.ts +3 -0
  327. package/presentation/FileDetails/feature.js +17 -0
  328. package/presentation/FileDetails/feature.js.map +1 -0
  329. package/presentation/FileDetails/index.d.ts +3 -0
  330. package/presentation/FileDetails/index.js +2 -0
  331. package/presentation/FileList/FileListDataSource.d.ts +20 -0
  332. package/presentation/FileList/FileListDataSource.js +122 -0
  333. package/presentation/FileList/FileListDataSource.js.map +1 -0
  334. package/presentation/FileList/FileListPresenter.test.d.ts +1 -0
  335. package/presentation/FileList/FileListPresenter.test.js +424 -0
  336. package/presentation/FileList/FileListPresenter.test.js.map +1 -0
  337. package/presentation/FileList/FileManagerPresenter.d.ts +43 -0
  338. package/presentation/FileList/FileManagerPresenter.js +213 -0
  339. package/presentation/FileList/FileManagerPresenter.js.map +1 -0
  340. package/presentation/FileList/FileManagerPresenterProvider.d.ts +9 -0
  341. package/presentation/FileList/FileManagerPresenterProvider.js +13 -0
  342. package/presentation/FileList/FileManagerPresenterProvider.js.map +1 -0
  343. package/presentation/FileList/abstractions.d.ts +76 -0
  344. package/presentation/FileList/abstractions.js +5 -0
  345. package/presentation/FileList/abstractions.js.map +1 -0
  346. package/presentation/FileList/components/BottomInfoBar/BottomInfoBar.d.ts +6 -0
  347. package/presentation/FileList/components/BottomInfoBar/BottomInfoBar.js +12 -0
  348. package/presentation/FileList/components/BottomInfoBar/BottomInfoBar.js.map +1 -0
  349. package/presentation/FileList/components/BottomInfoBar/ListStatus.d.ts +6 -0
  350. package/presentation/FileList/components/BottomInfoBar/ListStatus.js +20 -0
  351. package/presentation/FileList/components/BottomInfoBar/ListStatus.js.map +1 -0
  352. package/presentation/FileList/components/BottomInfoBar/SupportedFileTypes.d.ts +8 -0
  353. package/presentation/FileList/components/BottomInfoBar/SupportedFileTypes.js +56 -0
  354. package/presentation/FileList/components/BottomInfoBar/SupportedFileTypes.js.map +1 -0
  355. package/presentation/FileList/components/BottomInfoBar/index.d.ts +1 -0
  356. package/presentation/FileList/components/BottomInfoBar/index.js +1 -0
  357. package/presentation/FileList/components/BulkActions/ActionEdit.types.d.ts +2 -0
  358. package/presentation/FileList/components/BulkActions/ActionEdit.types.js +0 -0
  359. package/presentation/FileList/components/BulkActions/ActionEditPresenter.d.ts +35 -0
  360. package/presentation/FileList/components/BulkActions/ActionEditPresenter.js +55 -0
  361. package/presentation/FileList/components/BulkActions/ActionEditPresenter.js.map +1 -0
  362. package/presentation/FileList/components/BulkActions/ActionEditPresenter.test.d.ts +1 -0
  363. package/presentation/FileList/components/BulkActions/ActionEditPresenter.test.js +170 -0
  364. package/presentation/FileList/components/BulkActions/ActionEditPresenter.test.js.map +1 -0
  365. package/presentation/FileList/components/BulkActions/BatchEditorDialog/AddOperation.d.ts +7 -0
  366. package/presentation/FileList/components/BulkActions/BatchEditorDialog/AddOperation.js +15 -0
  367. package/presentation/FileList/components/BulkActions/BatchEditorDialog/AddOperation.js.map +1 -0
  368. package/presentation/FileList/components/BulkActions/BatchEditorDialog/BatchEditor.d.ts +15 -0
  369. package/presentation/FileList/components/BulkActions/BatchEditorDialog/BatchEditor.js +44 -0
  370. package/presentation/FileList/components/BulkActions/BatchEditorDialog/BatchEditor.js.map +1 -0
  371. package/presentation/FileList/components/BulkActions/BatchEditorDialog/BatchEditorDialog.d.ts +15 -0
  372. package/presentation/FileList/components/BulkActions/BatchEditorDialog/BatchEditorDialog.js +52 -0
  373. package/presentation/FileList/components/BulkActions/BatchEditorDialog/BatchEditorDialog.js.map +1 -0
  374. package/presentation/FileList/components/BulkActions/BatchEditorDialog/BatchEditorDialogPresenter.d.ts +61 -0
  375. package/presentation/FileList/components/BulkActions/BatchEditorDialog/BatchEditorDialogPresenter.js +111 -0
  376. package/presentation/FileList/components/BulkActions/BatchEditorDialog/BatchEditorDialogPresenter.js.map +1 -0
  377. package/presentation/FileList/components/BulkActions/BatchEditorDialog/BatchEditorDialogPresenter.test.d.ts +1 -0
  378. package/presentation/FileList/components/BulkActions/BatchEditorDialog/BatchEditorDialogPresenter.test.js +372 -0
  379. package/presentation/FileList/components/BulkActions/BatchEditorDialog/BatchEditorDialogPresenter.test.js.map +1 -0
  380. package/presentation/FileList/components/BulkActions/BatchEditorDialog/FieldRenderer.d.ts +8 -0
  381. package/presentation/FileList/components/BulkActions/BatchEditorDialog/FieldRenderer.js +31 -0
  382. package/presentation/FileList/components/BulkActions/BatchEditorDialog/FieldRenderer.js.map +1 -0
  383. package/presentation/FileList/components/BulkActions/BatchEditorDialog/Operation.d.ts +11 -0
  384. package/presentation/FileList/components/BulkActions/BatchEditorDialog/Operation.js +33 -0
  385. package/presentation/FileList/components/BulkActions/BatchEditorDialog/Operation.js.map +1 -0
  386. package/presentation/FileList/components/BulkActions/BatchEditorDialog/index.d.ts +1 -0
  387. package/presentation/FileList/components/BulkActions/BatchEditorDialog/index.js +1 -0
  388. package/presentation/FileList/components/BulkActions/BulkActionBar.d.ts +5 -0
  389. package/presentation/FileList/components/BulkActions/BulkActionBar.js +42 -0
  390. package/presentation/FileList/components/BulkActions/BulkActionBar.js.map +1 -0
  391. package/presentation/FileList/components/BulkActions/BulkActionDelete.d.ts +4 -0
  392. package/presentation/FileList/components/BulkActions/BulkActionDelete.js +65 -0
  393. package/presentation/FileList/components/BulkActions/BulkActionDelete.js.map +1 -0
  394. package/presentation/FileList/components/BulkActions/BulkActionEdit.d.ts +4 -0
  395. package/presentation/FileList/components/BulkActions/BulkActionEdit.js +105 -0
  396. package/presentation/FileList/components/BulkActions/BulkActionEdit.js.map +1 -0
  397. package/presentation/FileList/components/BulkActions/BulkActionMove.d.ts +4 -0
  398. package/presentation/FileList/components/BulkActions/BulkActionMove.js +87 -0
  399. package/presentation/FileList/components/BulkActions/BulkActionMove.js.map +1 -0
  400. package/presentation/FileList/components/BulkActions/GraphQLInputMapper.d.ts +23 -0
  401. package/presentation/FileList/components/BulkActions/GraphQLInputMapper.js +40 -0
  402. package/presentation/FileList/components/BulkActions/GraphQLInputMapper.js.map +1 -0
  403. package/presentation/FileList/components/BulkActions/GraphQLInputMapper.test.d.ts +1 -0
  404. package/presentation/FileList/components/BulkActions/GraphQLInputMapper.test.js +319 -0
  405. package/presentation/FileList/components/BulkActions/GraphQLInputMapper.test.js.map +1 -0
  406. package/presentation/FileList/components/BulkActions/domain/Batch.d.ts +32 -0
  407. package/presentation/FileList/components/BulkActions/domain/Batch.js +32 -0
  408. package/presentation/FileList/components/BulkActions/domain/Batch.js.map +1 -0
  409. package/presentation/FileList/components/BulkActions/domain/BatchMapper.d.ts +4 -0
  410. package/presentation/FileList/components/BulkActions/domain/BatchMapper.js +14 -0
  411. package/presentation/FileList/components/BulkActions/domain/BatchMapper.js.map +1 -0
  412. package/presentation/FileList/components/BulkActions/domain/Field.d.ts +32 -0
  413. package/presentation/FileList/components/BulkActions/domain/Field.js +49 -0
  414. package/presentation/FileList/components/BulkActions/domain/Field.js.map +1 -0
  415. package/presentation/FileList/components/BulkActions/domain/FieldMapper.d.ts +7 -0
  416. package/presentation/FileList/components/BulkActions/domain/FieldMapper.js +21 -0
  417. package/presentation/FileList/components/BulkActions/domain/FieldMapper.js.map +1 -0
  418. package/presentation/FileList/components/BulkActions/domain/index.d.ts +4 -0
  419. package/presentation/FileList/components/BulkActions/domain/index.js +4 -0
  420. package/presentation/FileList/components/BulkActions/index.d.ts +5 -0
  421. package/presentation/FileList/components/BulkActions/index.js +5 -0
  422. package/presentation/FileList/components/BulkActions/useBulkActionWorker.d.ts +16 -0
  423. package/presentation/FileList/components/BulkActions/useBulkActionWorker.js +43 -0
  424. package/presentation/FileList/components/BulkActions/useBulkActionWorker.js.map +1 -0
  425. package/presentation/FileList/components/Empty/Empty.d.ts +8 -0
  426. package/presentation/FileList/components/Empty/Empty.js +20 -0
  427. package/presentation/FileList/components/Empty/Empty.js.map +1 -0
  428. package/presentation/FileList/components/Empty/index.d.ts +1 -0
  429. package/presentation/FileList/components/Empty/index.js +1 -0
  430. package/presentation/FileList/components/FileDropArea/FileDropArea.d.ts +9 -0
  431. package/presentation/FileList/components/FileDropArea/FileDropArea.js +62 -0
  432. package/presentation/FileList/components/FileDropArea/FileDropArea.js.map +1 -0
  433. package/presentation/FileList/components/FileDropArea/index.d.ts +1 -0
  434. package/presentation/FileList/components/FileDropArea/index.js +1 -0
  435. package/presentation/FileList/components/FileDropPlaceholder/FileDropPlaceholder.d.ts +2 -0
  436. package/presentation/FileList/components/FileDropPlaceholder/FileDropPlaceholder.js +11 -0
  437. package/presentation/FileList/components/FileDropPlaceholder/FileDropPlaceholder.js.map +1 -0
  438. package/presentation/FileList/components/FileDropPlaceholder/index.d.ts +1 -0
  439. package/presentation/FileList/components/FileDropPlaceholder/index.js +1 -0
  440. package/presentation/FileList/components/FilePicker/FilePicker.d.ts +11 -0
  441. package/presentation/FileList/components/FilePicker/FilePicker.js +28 -0
  442. package/presentation/FileList/components/FilePicker/FilePicker.js.map +1 -0
  443. package/presentation/FileList/components/Filters/FilterByType.d.ts +2 -0
  444. package/presentation/FileList/components/Filters/FilterByType.js +39 -0
  445. package/presentation/FileList/components/Filters/FilterByType.js.map +1 -0
  446. package/presentation/FileList/components/Filters/SubFoldersToggle.d.ts +9 -0
  447. package/presentation/FileList/components/Filters/SubFoldersToggle.js +25 -0
  448. package/presentation/FileList/components/Filters/SubFoldersToggle.js.map +1 -0
  449. package/presentation/FileList/components/Filters/TagsFilter.d.ts +9 -0
  450. package/presentation/FileList/components/Filters/TagsFilter.js +86 -0
  451. package/presentation/FileList/components/Filters/TagsFilter.js.map +1 -0
  452. package/presentation/FileList/components/Filters/TypeFilter.d.ts +8 -0
  453. package/presentation/FileList/components/Filters/TypeFilter.js +46 -0
  454. package/presentation/FileList/components/Filters/TypeFilter.js.map +1 -0
  455. package/presentation/FileList/components/Filters/index.d.ts +3 -0
  456. package/presentation/FileList/components/Filters/index.js +3 -0
  457. package/presentation/FileList/components/Grid/ActionButton.d.ts +9 -0
  458. package/presentation/FileList/components/Grid/ActionButton.js +24 -0
  459. package/presentation/FileList/components/Grid/ActionButton.js.map +1 -0
  460. package/presentation/FileList/components/Grid/File.d.ts +32 -0
  461. package/presentation/FileList/components/Grid/File.js +84 -0
  462. package/presentation/FileList/components/Grid/File.js.map +1 -0
  463. package/presentation/FileList/components/Grid/FileGrid.d.ts +9 -0
  464. package/presentation/FileList/components/Grid/FileGrid.js +162 -0
  465. package/presentation/FileList/components/Grid/FileGrid.js.map +1 -0
  466. package/presentation/FileList/components/Grid/FileGrid.test.d.ts +1 -0
  467. package/presentation/FileList/components/Grid/FileGrid.test.js +387 -0
  468. package/presentation/FileList/components/Grid/FileGrid.test.js.map +1 -0
  469. package/presentation/FileList/components/Grid/index.d.ts +1 -0
  470. package/presentation/FileList/components/Grid/index.js +1 -0
  471. package/presentation/FileList/components/Header/FileManagerHeader.d.ts +7 -0
  472. package/presentation/FileList/components/Header/FileManagerHeader.js +114 -0
  473. package/presentation/FileList/components/Header/FileManagerHeader.js.map +1 -0
  474. package/presentation/FileList/components/LayoutSwitch/LayoutSwitch.d.ts +2 -0
  475. package/presentation/FileList/components/LayoutSwitch/LayoutSwitch.js +24 -0
  476. package/presentation/FileList/components/LayoutSwitch/LayoutSwitch.js.map +1 -0
  477. package/presentation/FileList/components/LayoutSwitch/index.d.ts +1 -0
  478. package/presentation/FileList/components/LayoutSwitch/index.js +1 -0
  479. package/presentation/FileList/components/NoPermissions/NoPermissions.d.ts +2 -0
  480. package/presentation/FileList/components/NoPermissions/NoPermissions.js +27 -0
  481. package/presentation/FileList/components/NoPermissions/NoPermissions.js.map +1 -0
  482. package/presentation/FileList/components/NoPermissions/index.d.ts +1 -0
  483. package/presentation/FileList/components/NoPermissions/index.js +1 -0
  484. package/presentation/FileList/components/NoResults/NoResults.d.ts +2 -0
  485. package/presentation/FileList/components/NoResults/NoResults.js +21 -0
  486. package/presentation/FileList/components/NoResults/NoResults.js.map +1 -0
  487. package/presentation/FileList/components/NoResults/index.d.ts +1 -0
  488. package/presentation/FileList/components/NoResults/index.js +1 -0
  489. package/presentation/FileList/components/Search/SearchBar.d.ts +9 -0
  490. package/presentation/FileList/components/Search/SearchBar.js +33 -0
  491. package/presentation/FileList/components/Search/SearchBar.js.map +1 -0
  492. package/presentation/FileList/components/Search/index.d.ts +1 -0
  493. package/presentation/FileList/components/Search/index.js +1 -0
  494. package/presentation/FileList/components/Table/Actions/CopyFile.d.ts +2 -0
  495. package/presentation/FileList/components/Table/Actions/CopyFile.js +21 -0
  496. package/presentation/FileList/components/Table/Actions/CopyFile.js.map +1 -0
  497. package/presentation/FileList/components/Table/Actions/DeleteFile.d.ts +2 -0
  498. package/presentation/FileList/components/Table/Actions/DeleteFile.js +24 -0
  499. package/presentation/FileList/components/Table/Actions/DeleteFile.js.map +1 -0
  500. package/presentation/FileList/components/Table/Actions/EditFile.d.ts +2 -0
  501. package/presentation/FileList/components/Table/Actions/EditFile.js +19 -0
  502. package/presentation/FileList/components/Table/Actions/EditFile.js.map +1 -0
  503. package/presentation/FileList/components/Table/Actions/MoveFile.d.ts +2 -0
  504. package/presentation/FileList/components/Table/Actions/MoveFile.js +19 -0
  505. package/presentation/FileList/components/Table/Actions/MoveFile.js.map +1 -0
  506. package/presentation/FileList/components/Table/Actions/index.d.ts +4 -0
  507. package/presentation/FileList/components/Table/Actions/index.js +4 -0
  508. package/presentation/FileList/components/Table/Cells/CellActions.d.ts +2 -0
  509. package/presentation/FileList/components/Table/Cells/CellActions.js +28 -0
  510. package/presentation/FileList/components/Table/Cells/CellActions.js.map +1 -0
  511. package/presentation/FileList/components/Table/Cells/CellAuthor.d.ts +2 -0
  512. package/presentation/FileList/components/Table/Cells/CellAuthor.js +10 -0
  513. package/presentation/FileList/components/Table/Cells/CellAuthor.js.map +1 -0
  514. package/presentation/FileList/components/Table/Cells/CellCreated.d.ts +2 -0
  515. package/presentation/FileList/components/Table/Cells/CellCreated.js +13 -0
  516. package/presentation/FileList/components/Table/Cells/CellCreated.js.map +1 -0
  517. package/presentation/FileList/components/Table/Cells/CellModified.d.ts +2 -0
  518. package/presentation/FileList/components/Table/Cells/CellModified.js +13 -0
  519. package/presentation/FileList/components/Table/Cells/CellModified.js.map +1 -0
  520. package/presentation/FileList/components/Table/Cells/CellName.d.ts +16 -0
  521. package/presentation/FileList/components/Table/Cells/CellName.js +59 -0
  522. package/presentation/FileList/components/Table/Cells/CellName.js.map +1 -0
  523. package/presentation/FileList/components/Table/Cells/CellSize.d.ts +2 -0
  524. package/presentation/FileList/components/Table/Cells/CellSize.js +14 -0
  525. package/presentation/FileList/components/Table/Cells/CellSize.js.map +1 -0
  526. package/presentation/FileList/components/Table/Cells/CellThumbnail.d.ts +2 -0
  527. package/presentation/FileList/components/Table/Cells/CellThumbnail.js +12 -0
  528. package/presentation/FileList/components/Table/Cells/CellThumbnail.js.map +1 -0
  529. package/presentation/FileList/components/Table/Cells/CellType.d.ts +2 -0
  530. package/presentation/FileList/components/Table/Cells/CellType.js +11 -0
  531. package/presentation/FileList/components/Table/Cells/CellType.js.map +1 -0
  532. package/presentation/FileList/components/Table/Cells/index.d.ts +7 -0
  533. package/presentation/FileList/components/Table/Cells/index.js +7 -0
  534. package/presentation/FileList/components/Table/FileTable.d.ts +12 -0
  535. package/presentation/FileList/components/Table/FileTable.js +79 -0
  536. package/presentation/FileList/components/Table/FileTable.js.map +1 -0
  537. package/presentation/FileList/components/Table/FileTable.test.d.ts +1 -0
  538. package/presentation/FileList/components/Table/FileTable.test.js +365 -0
  539. package/presentation/FileList/components/Table/FileTable.test.js.map +1 -0
  540. package/presentation/FileList/components/Table/index.d.ts +4 -0
  541. package/presentation/FileList/components/Table/index.js +3 -0
  542. package/presentation/FileList/components/TagsList/Empty.d.ts +6 -0
  543. package/presentation/FileList/components/TagsList/Empty.js +8 -0
  544. package/presentation/FileList/components/TagsList/Empty.js.map +1 -0
  545. package/presentation/FileList/components/TagsList/FilterSelect.d.ts +2 -0
  546. package/presentation/FileList/components/TagsList/FilterSelect.js +38 -0
  547. package/presentation/FileList/components/TagsList/FilterSelect.js.map +1 -0
  548. package/presentation/FileList/components/TagsList/FilterStatus.d.ts +7 -0
  549. package/presentation/FileList/components/TagsList/FilterStatus.js +25 -0
  550. package/presentation/FileList/components/TagsList/FilterStatus.js.map +1 -0
  551. package/presentation/FileList/components/TagsList/Tag.d.ts +9 -0
  552. package/presentation/FileList/components/TagsList/Tag.js +11 -0
  553. package/presentation/FileList/components/TagsList/Tag.js.map +1 -0
  554. package/presentation/FileList/components/TagsList/Tags.d.ts +8 -0
  555. package/presentation/FileList/components/TagsList/Tags.js +30 -0
  556. package/presentation/FileList/components/TagsList/Tags.js.map +1 -0
  557. package/presentation/FileList/components/TagsList/TagsList.d.ts +11 -0
  558. package/presentation/FileList/components/TagsList/TagsList.js +24 -0
  559. package/presentation/FileList/components/TagsList/TagsList.js.map +1 -0
  560. package/presentation/FileList/components/TagsList/index.d.ts +1 -0
  561. package/presentation/FileList/components/TagsList/index.js +1 -0
  562. package/presentation/FileList/components/Thumbnail/Thumbnail.d.ts +2 -0
  563. package/presentation/FileList/components/Thumbnail/Thumbnail.js +12 -0
  564. package/presentation/FileList/components/Thumbnail/Thumbnail.js.map +1 -0
  565. package/presentation/FileList/components/Thumbnail/index.d.ts +1 -0
  566. package/presentation/FileList/components/Thumbnail/index.js +1 -0
  567. package/presentation/FileList/components/Upload/UploadProgress.d.ts +9 -0
  568. package/presentation/FileList/components/Upload/UploadProgress.js +45 -0
  569. package/presentation/FileList/components/Upload/UploadProgress.js.map +1 -0
  570. package/presentation/FileList/components/Upload/index.d.ts +1 -0
  571. package/presentation/FileList/components/Upload/index.js +1 -0
  572. package/presentation/FileList/feature.d.ts +3 -0
  573. package/presentation/FileList/feature.js +17 -0
  574. package/presentation/FileList/feature.js.map +1 -0
  575. package/presentation/FileList/index.d.ts +5 -0
  576. package/presentation/FileList/index.js +3 -0
  577. package/presentation/FileManager/FileManagerRenderer.d.ts +2 -0
  578. package/presentation/FileManager/FileManagerRenderer.js +33 -0
  579. package/presentation/FileManager/FileManagerRenderer.js.map +1 -0
  580. package/presentation/FileManager/FileManagerView.d.ts +12 -0
  581. package/presentation/FileManager/FileManagerView.js +246 -0
  582. package/presentation/FileManager/FileManagerView.js.map +1 -0
  583. package/presentation/FileManager/OverlayContext.d.ts +14 -0
  584. package/presentation/FileManager/OverlayContext.js +11 -0
  585. package/presentation/FileManager/OverlayContext.js.map +1 -0
  586. package/presentation/FileManager/outputFileSelectionError.d.ts +2 -0
  587. package/presentation/FileManager/outputFileSelectionError.js +27 -0
  588. package/presentation/FileManager/outputFileSelectionError.js.map +1 -0
  589. package/presentation/Settings/SettingsPresenter.d.ts +14 -0
  590. package/presentation/Settings/SettingsPresenter.js +78 -0
  591. package/presentation/Settings/SettingsPresenter.js.map +1 -0
  592. package/presentation/Settings/components/SettingsView.d.ts +4 -0
  593. package/presentation/Settings/components/SettingsView.js +45 -0
  594. package/presentation/Settings/components/SettingsView.js.map +1 -0
  595. package/presentation/config/DefaultFileManagerConfig.d.ts +2 -0
  596. package/presentation/config/DefaultFileManagerConfig.js +118 -0
  597. package/presentation/config/DefaultFileManagerConfig.js.map +1 -0
  598. package/presentation/config/FileManagerViewConfig.d.ts +248 -0
  599. package/presentation/config/FileManagerViewConfig.js +74 -0
  600. package/presentation/config/FileManagerViewConfig.js.map +1 -0
  601. package/presentation/config/configComponents/Browser/BulkAction.d.ts +26 -0
  602. package/presentation/config/configComponents/Browser/BulkAction.js +57 -0
  603. package/presentation/config/configComponents/Browser/BulkAction.js.map +1 -0
  604. package/presentation/config/configComponents/Browser/BulkEditField.d.ts +10 -0
  605. package/presentation/config/configComponents/Browser/BulkEditField.js +24 -0
  606. package/presentation/config/configComponents/Browser/BulkEditField.js.map +1 -0
  607. package/presentation/config/configComponents/Browser/FileAction.d.ts +8 -0
  608. package/presentation/config/configComponents/Browser/FileAction.js +11 -0
  609. package/presentation/config/configComponents/Browser/FileAction.js.map +1 -0
  610. package/presentation/config/configComponents/Browser/Filter.d.ts +39 -0
  611. package/presentation/config/configComponents/Browser/Filter.js +37 -0
  612. package/presentation/config/configComponents/Browser/Filter.js.map +1 -0
  613. package/presentation/config/configComponents/Browser/FilterByTags.d.ts +5 -0
  614. package/presentation/config/configComponents/Browser/FilterByTags.js +14 -0
  615. package/presentation/config/configComponents/Browser/FilterByTags.js.map +1 -0
  616. package/presentation/config/configComponents/Browser/FiltersToWhere.d.ts +7 -0
  617. package/presentation/config/configComponents/Browser/FiltersToWhere.js +13 -0
  618. package/presentation/config/configComponents/Browser/FiltersToWhere.js.map +1 -0
  619. package/presentation/config/configComponents/Browser/FolderAction.d.ts +7 -0
  620. package/presentation/config/configComponents/Browser/FolderAction.js +10 -0
  621. package/presentation/config/configComponents/Browser/FolderAction.js.map +1 -0
  622. package/presentation/config/configComponents/Browser/FolderDropConfirmation.d.ts +5 -0
  623. package/presentation/config/configComponents/Browser/FolderDropConfirmation.js +7 -0
  624. package/presentation/config/configComponents/Browser/FolderDropConfirmation.js.map +1 -0
  625. package/presentation/config/configComponents/Browser/FolderFieldDecorator.d.ts +7 -0
  626. package/presentation/config/configComponents/Browser/FolderFieldDecorator.js +11 -0
  627. package/presentation/config/configComponents/Browser/FolderFieldDecorator.js.map +1 -0
  628. package/presentation/config/configComponents/Browser/Grid/Action.d.ts +31 -0
  629. package/presentation/config/configComponents/Browser/Grid/Action.js +33 -0
  630. package/presentation/config/configComponents/Browser/Grid/Action.js.map +1 -0
  631. package/presentation/config/configComponents/Browser/Grid/Thumbnail.d.ts +28 -0
  632. package/presentation/config/configComponents/Browser/Grid/Thumbnail.js +28 -0
  633. package/presentation/config/configComponents/Browser/Grid/Thumbnail.js.map +1 -0
  634. package/presentation/config/configComponents/Browser/Grid/index.d.ts +6 -0
  635. package/presentation/config/configComponents/Browser/Grid/index.js +0 -0
  636. package/presentation/config/configComponents/Browser/Table/Column.d.ts +32 -0
  637. package/presentation/config/configComponents/Browser/Table/Column.js +13 -0
  638. package/presentation/config/configComponents/Browser/Table/Column.js.map +1 -0
  639. package/presentation/config/configComponents/Browser/Table/Thumbnail.d.ts +28 -0
  640. package/presentation/config/configComponents/Browser/Table/Thumbnail.js +28 -0
  641. package/presentation/config/configComponents/Browser/Table/Thumbnail.js.map +1 -0
  642. package/presentation/config/configComponents/Browser/Table/index.d.ts +56 -0
  643. package/presentation/config/configComponents/Browser/Table/index.js +11 -0
  644. package/presentation/config/configComponents/Browser/Table/index.js.map +1 -0
  645. package/presentation/config/configComponents/Browser/index.d.ts +189 -0
  646. package/presentation/config/configComponents/Browser/index.js +47 -0
  647. package/presentation/config/configComponents/Browser/index.js.map +1 -0
  648. package/presentation/config/configComponents/FileDetails/Action.d.ts +31 -0
  649. package/presentation/config/configComponents/FileDetails/Action.js +30 -0
  650. package/presentation/config/configComponents/FileDetails/Action.js.map +1 -0
  651. package/presentation/config/configComponents/FileDetails/Thumbnail.d.ts +28 -0
  652. package/presentation/config/configComponents/FileDetails/Thumbnail.js +25 -0
  653. package/presentation/config/configComponents/FileDetails/Thumbnail.js.map +1 -0
  654. package/presentation/config/configComponents/FileDetails/Width.d.ts +5 -0
  655. package/presentation/config/configComponents/FileDetails/Width.js +13 -0
  656. package/presentation/config/configComponents/FileDetails/Width.js.map +1 -0
  657. package/presentation/config/configComponents/FileDetails/index.d.ts +52 -0
  658. package/presentation/config/configComponents/FileDetails/index.js +16 -0
  659. package/presentation/config/configComponents/FileDetails/index.js.map +1 -0
  660. package/presentation/config/fields/AccessControl.d.ts +7 -0
  661. package/presentation/config/fields/AccessControl.js +38 -0
  662. package/presentation/config/fields/AccessControl.js.map +1 -0
  663. package/presentation/config/fields/Tags.d.ts +2 -0
  664. package/presentation/config/fields/Tags.js +32 -0
  665. package/presentation/config/fields/Tags.js.map +1 -0
  666. package/presentation/config/fields/index.d.ts +2 -0
  667. package/presentation/config/fields/index.js +2 -0
  668. package/presentation/config/fields/useAccessControlField.d.ts +6 -0
  669. package/presentation/config/fields/useAccessControlField.js +21 -0
  670. package/presentation/config/fields/useAccessControlField.js.map +1 -0
  671. package/presentation/config/fields/useFileOrUndefined.d.ts +3 -0
  672. package/presentation/config/fields/useFileOrUndefined.js +13 -0
  673. package/presentation/config/fields/useFileOrUndefined.js.map +1 -0
  674. package/presentation/config/getThumbnailRenderer.d.ts +4 -0
  675. package/presentation/config/getThumbnailRenderer.js +16 -0
  676. package/presentation/config/getThumbnailRenderer.js.map +1 -0
  677. package/presentation/config/thumbnailRenderers/FilePreviewDefaultRenderer.d.ts +2 -0
  678. package/presentation/config/thumbnailRenderers/FilePreviewDefaultRenderer.js +11 -0
  679. package/presentation/config/thumbnailRenderers/FilePreviewDefaultRenderer.js.map +1 -0
  680. package/presentation/config/thumbnailRenderers/FilePreviewImageRenderer.d.ts +2 -0
  681. package/presentation/config/thumbnailRenderers/FilePreviewImageRenderer.js +18 -0
  682. package/presentation/config/thumbnailRenderers/FilePreviewImageRenderer.js.map +1 -0
  683. package/presentation/config/thumbnailRenderers/GridItemDefaultRenderer.d.ts +2 -0
  684. package/presentation/config/thumbnailRenderers/GridItemDefaultRenderer.js +11 -0
  685. package/presentation/config/thumbnailRenderers/GridItemDefaultRenderer.js.map +1 -0
  686. package/presentation/config/thumbnailRenderers/GridItemImageRenderer.d.ts +2 -0
  687. package/presentation/config/thumbnailRenderers/GridItemImageRenderer.js +18 -0
  688. package/presentation/config/thumbnailRenderers/GridItemImageRenderer.js.map +1 -0
  689. package/presentation/config/thumbnailRenderers/TableItemDefaultRenderer.d.ts +2 -0
  690. package/presentation/config/thumbnailRenderers/TableItemDefaultRenderer.js +18 -0
  691. package/presentation/config/thumbnailRenderers/TableItemDefaultRenderer.js.map +1 -0
  692. package/presentation/config/thumbnailRenderers/TableItemImageRenderer.d.ts +2 -0
  693. package/presentation/config/thumbnailRenderers/TableItemImageRenderer.js +18 -0
  694. package/presentation/config/thumbnailRenderers/TableItemImageRenderer.js.map +1 -0
  695. package/presentation/contexts/FileProvider.d.ts +12 -0
  696. package/presentation/contexts/FileProvider.js +13 -0
  697. package/presentation/contexts/FileProvider.js.map +1 -0
  698. package/presentation/hooks/useCopyFile.d.ts +11 -0
  699. package/presentation/hooks/useCopyFile.js +24 -0
  700. package/presentation/hooks/useCopyFile.js.map +1 -0
  701. package/presentation/hooks/useDeleteFile.d.ts +9 -0
  702. package/presentation/hooks/useDeleteFile.js +35 -0
  703. package/presentation/hooks/useDeleteFile.js.map +1 -0
  704. package/presentation/hooks/useFile.d.ts +2 -0
  705. package/presentation/hooks/useFile.js +10 -0
  706. package/presentation/hooks/useFile.js.map +1 -0
  707. package/presentation/hooks/useMoveFileToFolder.d.ts +2 -0
  708. package/presentation/hooks/useMoveFileToFolder.js +36 -0
  709. package/presentation/hooks/useMoveFileToFolder.js.map +1 -0
  710. package/routes.d.ts +7 -0
  711. package/routes.js +17 -0
  712. package/routes.js.map +1 -0
  713. package/static/svg/folder-open.ae8d0fac.svg +1 -0
  714. package/admin/graphql.js +0 -24
  715. package/admin/graphql.js.map +0 -1
  716. package/admin/index.d.ts +0 -2
  717. package/admin/index.js +0 -16
  718. package/admin/index.js.map +0 -1
  719. package/admin/plugins/index.d.ts +0 -2
  720. package/admin/plugins/index.js +0 -18
  721. package/admin/plugins/index.js.map +0 -1
  722. package/admin/plugins/installation.d.ts +0 -3
  723. package/admin/plugins/installation.js +0 -134
  724. package/admin/plugins/installation.js.map +0 -1
  725. package/admin/plugins/permissionRenderer/FileManagerPermissions.d.ts +0 -14
  726. package/admin/plugins/permissionRenderer/FileManagerPermissions.js +0 -249
  727. package/admin/plugins/permissionRenderer/FileManagerPermissions.js.map +0 -1
  728. package/admin/plugins/permissionRenderer/index.d.ts +0 -3
  729. package/admin/plugins/permissionRenderer/index.js +0 -38
  730. package/admin/plugins/permissionRenderer/index.js.map +0 -1
  731. package/admin/views/FileManagerSettings.d.ts +0 -3
  732. package/admin/views/FileManagerSettings.js +0 -162
  733. package/admin/views/FileManagerSettings.js.map +0 -1
  734. package/index.js.map +0 -1
  735. package/types.d.ts +0 -26
  736. package/types.js +0 -5
  737. package/types.js.map +0 -1
  738. /package/{admin → modules/Settings}/assets/icons/folder-open.svg +0 -0
@@ -0,0 +1,36 @@
1
+ export interface DeleteFileGatewayParams {
2
+ id: string;
3
+ }
4
+ export interface IDeleteFileGateway {
5
+ execute(params: DeleteFileGatewayParams): Promise<boolean>;
6
+ }
7
+ export declare const DeleteFileGateway: import("@webiny/di").Abstraction<IDeleteFileGateway>;
8
+ export declare namespace DeleteFileGateway {
9
+ type Interface = IDeleteFileGateway;
10
+ }
11
+ export interface IDeleteFileRepository {
12
+ execute(params: DeleteFileGatewayParams): Promise<boolean>;
13
+ }
14
+ export declare const DeleteFileRepository: import("@webiny/di").Abstraction<IDeleteFileRepository>;
15
+ export declare namespace DeleteFileRepository {
16
+ type Interface = IDeleteFileRepository;
17
+ }
18
+ export interface DeleteFileUseCaseParams {
19
+ id: string;
20
+ }
21
+ export type DeleteFileUseCaseResult = {
22
+ success: true;
23
+ } | {
24
+ success: false;
25
+ error: {
26
+ code: string;
27
+ message: string;
28
+ };
29
+ };
30
+ export interface IDeleteFileUseCase {
31
+ execute(params: DeleteFileUseCaseParams): Promise<DeleteFileUseCaseResult>;
32
+ }
33
+ export declare const DeleteFileUseCase: import("@webiny/di").Abstraction<IDeleteFileUseCase>;
34
+ export declare namespace DeleteFileUseCase {
35
+ type Interface = IDeleteFileUseCase;
36
+ }
@@ -0,0 +1,7 @@
1
+ import { createAbstraction } from "@webiny/feature/admin";
2
+ const DeleteFileGateway = createAbstraction("DeleteFileGateway");
3
+ const DeleteFileRepository = createAbstraction("DeleteFileRepository");
4
+ const DeleteFileUseCase = createAbstraction("DeleteFileUseCase");
5
+ export { DeleteFileGateway, DeleteFileRepository, DeleteFileUseCase };
6
+
7
+ //# sourceMappingURL=abstractions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/deleteFile/abstractions.js","sources":["../../../src/features/deleteFile/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\n\n// Gateway — performs the API call via @webiny/sdk.\nexport interface DeleteFileGatewayParams {\n id: string;\n}\n\nexport interface IDeleteFileGateway {\n execute(params: DeleteFileGatewayParams): Promise<boolean>;\n}\n\nexport const DeleteFileGateway = createAbstraction<IDeleteFileGateway>(\"DeleteFileGateway\");\n\nexport namespace DeleteFileGateway {\n export type Interface = IDeleteFileGateway;\n}\n\n// Repository — delegates I/O to the gateway and removes the file from the shared cache.\nexport interface IDeleteFileRepository {\n execute(params: DeleteFileGatewayParams): Promise<boolean>;\n}\n\nexport const DeleteFileRepository =\n createAbstraction<IDeleteFileRepository>(\"DeleteFileRepository\");\n\nexport namespace DeleteFileRepository {\n export type Interface = IDeleteFileRepository;\n}\n\n// UseCase — orchestrates a single delete-file operation.\nexport interface DeleteFileUseCaseParams {\n id: string;\n}\n\nexport type DeleteFileUseCaseResult =\n | { success: true }\n | { success: false; error: { code: string; message: string } };\n\nexport interface IDeleteFileUseCase {\n execute(params: DeleteFileUseCaseParams): Promise<DeleteFileUseCaseResult>;\n}\n\nexport const DeleteFileUseCase = createAbstraction<IDeleteFileUseCase>(\"DeleteFileUseCase\");\n\nexport namespace DeleteFileUseCase {\n export type Interface = IDeleteFileUseCase;\n}\n"],"names":["DeleteFileGateway","createAbstraction","DeleteFileRepository","DeleteFileUseCase"],"mappings":";AAWO,MAAMA,oBAAoBC,kBAAsC;AAWhE,MAAMC,uBACTD,kBAAyC;AAmBtC,MAAME,oBAAoBF,kBAAsC"}
@@ -0,0 +1,3 @@
1
+ export declare const DeleteFileFeature: import("@webiny/feature/admin").FeatureDefinition<{
2
+ useCase: import("./abstractions.js").IDeleteFileUseCase;
3
+ }, []>;
@@ -0,0 +1,21 @@
1
+ import { createFeature } from "@webiny/feature/admin";
2
+ import { DeleteFileUseCase } from "./abstractions.js";
3
+ import { DeleteFileUseCase as external_DeleteFileUseCase_js_DeleteFileUseCase } from "./DeleteFileUseCase.js";
4
+ import { DeleteFileRepository } from "./DeleteFileRepository.js";
5
+ import { DeleteFileGateway } from "./DeleteFileGateway.js";
6
+ const DeleteFileFeature = createFeature({
7
+ name: "FileManager/DeleteFile",
8
+ register (container) {
9
+ container.register(external_DeleteFileUseCase_js_DeleteFileUseCase);
10
+ container.register(DeleteFileRepository).inSingletonScope();
11
+ container.register(DeleteFileGateway).inSingletonScope();
12
+ },
13
+ resolve (container) {
14
+ return {
15
+ useCase: container.resolve(DeleteFileUseCase)
16
+ };
17
+ }
18
+ });
19
+ export { DeleteFileFeature };
20
+
21
+ //# sourceMappingURL=feature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/deleteFile/feature.js","sources":["../../../src/features/deleteFile/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { DeleteFileUseCase as UseCaseAbstraction } from \"./abstractions.js\";\nimport { DeleteFileUseCase } from \"./DeleteFileUseCase.js\";\nimport { DeleteFileRepository } from \"./DeleteFileRepository.js\";\nimport { DeleteFileGateway } from \"./DeleteFileGateway.js\";\n\nexport const DeleteFileFeature = createFeature({\n name: \"FileManager/DeleteFile\",\n register(container) {\n container.register(DeleteFileUseCase);\n container.register(DeleteFileRepository).inSingletonScope();\n container.register(DeleteFileGateway).inSingletonScope();\n },\n resolve(container) {\n return {\n useCase: container.resolve(UseCaseAbstraction)\n };\n }\n});\n"],"names":["DeleteFileFeature","createFeature","container","DeleteFileUseCase","DeleteFileRepository","DeleteFileGateway","UseCaseAbstraction"],"mappings":";;;;;AAMO,MAAMA,oBAAoBC,cAAc;IAC3C,MAAM;IACN,UAASC,SAAS;QACdA,UAAU,QAAQ,CAACC;QACnBD,UAAU,QAAQ,CAACE,sBAAsB,gBAAgB;QACzDF,UAAU,QAAQ,CAACG,mBAAmB,gBAAgB;IAC1D;IACA,SAAQH,SAAS;QACb,OAAO;YACH,SAASA,UAAU,OAAO,CAACI;QAC/B;IACJ;AACJ"}
@@ -0,0 +1,3 @@
1
+ export { DeleteFileFeature } from "./feature.js";
2
+ export { DeleteFileUseCase, DeleteFileRepository, DeleteFileGateway } from "./abstractions.js";
3
+ export type { IDeleteFileUseCase, IDeleteFileRepository, IDeleteFileGateway, DeleteFileUseCaseParams, DeleteFileUseCaseResult, DeleteFileGatewayParams } from "./abstractions.js";
@@ -0,0 +1,2 @@
1
+ export { DeleteFileFeature } from "./feature.js";
2
+ export { DeleteFileGateway, DeleteFileRepository, DeleteFileUseCase } from "./abstractions.js";
@@ -0,0 +1,12 @@
1
+ import type { CmsModel } from "@webiny/app-headless-cms-common/types/index.js";
2
+ import { GetFileModelRepository } from "./abstractions.js";
3
+ import { FileModelProvider as Provider } from "./abstractions.js";
4
+ declare class FileModelProviderImpl implements Provider.Interface {
5
+ private repository;
6
+ constructor(repository: GetFileModelRepository.Interface);
7
+ getModel(): Promise<CmsModel>;
8
+ }
9
+ export declare const FileModelProvider: typeof FileModelProviderImpl & {
10
+ __abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IFileModelProvider>;
11
+ };
12
+ export {};
@@ -0,0 +1,21 @@
1
+ import { FileModelProvider, GetFileModelRepository } from "./abstractions.js";
2
+ class FileModelProviderImpl {
3
+ constructor(repository){
4
+ this.repository = repository;
5
+ }
6
+ async getModel() {
7
+ await this.repository.load();
8
+ const model = this.repository.getModel();
9
+ if (!model) throw new Error("Unable to load File model!");
10
+ return model;
11
+ }
12
+ }
13
+ const FileModelProvider_FileModelProvider = FileModelProvider.createImplementation({
14
+ implementation: FileModelProviderImpl,
15
+ dependencies: [
16
+ GetFileModelRepository
17
+ ]
18
+ });
19
+ export { FileModelProvider_FileModelProvider as FileModelProvider };
20
+
21
+ //# sourceMappingURL=FileModelProvider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/fileModel/FileModelProvider.js","sources":["../../../src/features/fileModel/FileModelProvider.ts"],"sourcesContent":["import type { CmsModel } from \"@webiny/app-headless-cms-common/types/index.js\";\nimport { GetFileModelRepository } from \"./abstractions.js\";\nimport { FileModelProvider as Provider } from \"./abstractions.js\";\n\nclass FileModelProviderImpl implements Provider.Interface {\n constructor(private repository: GetFileModelRepository.Interface) {}\n\n async getModel(): Promise<CmsModel> {\n await this.repository.load();\n\n const model = this.repository.getModel();\n if (!model) {\n throw new Error(\"Unable to load File model!\");\n }\n\n return model;\n }\n}\n\nexport const FileModelProvider = Provider.createImplementation({\n implementation: FileModelProviderImpl,\n dependencies: [GetFileModelRepository]\n});\n"],"names":["FileModelProviderImpl","repository","model","Error","FileModelProvider","Provider","GetFileModelRepository"],"mappings":";AAIA,MAAMA;IACF,YAAoBC,UAA4C,CAAE;aAA9CA,UAAU,GAAVA;IAA+C;IAEnE,MAAM,WAA8B;QAChC,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI;QAE1B,MAAMC,QAAQ,IAAI,CAAC,UAAU,CAAC,QAAQ;QACtC,IAAI,CAACA,OACD,MAAM,IAAIC,MAAM;QAGpB,OAAOD;IACX;AACJ;AAEO,MAAME,sCAAoBC,kBAAAA,oBAA6B,CAAC;IAC3D,gBAAgBL;IAChB,cAAc;QAACM;KAAuB;AAC1C"}
@@ -0,0 +1,12 @@
1
+ import { MainGraphQLClient } from "@webiny/app/features/mainGraphQLClient/index.js";
2
+ import type { CmsModel } from "@webiny/app-headless-cms-common/types/index.js";
3
+ import { GetFileModelGateway as GatewayAbstraction } from "./abstractions.js";
4
+ declare class GetFileModelGqlGatewayImpl implements GatewayAbstraction.Interface {
5
+ private client;
6
+ constructor(client: MainGraphQLClient.Interface);
7
+ execute(): Promise<CmsModel>;
8
+ }
9
+ export declare const GetFileModelGqlGateway: typeof GetFileModelGqlGatewayImpl & {
10
+ __abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IGetFileModelGateway>;
11
+ };
12
+ export {};
@@ -0,0 +1,38 @@
1
+ import { MainGraphQLClient } from "@webiny/app/features/mainGraphQLClient/index.js";
2
+ import { GetFileModelGateway } from "./abstractions.js";
3
+ const GET_FILE_MODEL = `
4
+ query GetFileModel {
5
+ fileManager {
6
+ getFileModel {
7
+ data
8
+ error {
9
+ code
10
+ message
11
+ data
12
+ }
13
+ }
14
+ }
15
+ }
16
+ `;
17
+ class GetFileModelGqlGatewayImpl {
18
+ constructor(client){
19
+ this.client = client;
20
+ }
21
+ async execute() {
22
+ const response = await this.client.execute({
23
+ query: GET_FILE_MODEL
24
+ });
25
+ const { data, error } = response.fileManager.getFileModel;
26
+ if (!data) throw new Error(error?.message || "Could not fetch file model.");
27
+ return data;
28
+ }
29
+ }
30
+ const GetFileModelGqlGateway = GetFileModelGateway.createImplementation({
31
+ implementation: GetFileModelGqlGatewayImpl,
32
+ dependencies: [
33
+ MainGraphQLClient
34
+ ]
35
+ });
36
+ export { GetFileModelGqlGateway };
37
+
38
+ //# sourceMappingURL=GetFileModelGqlGateway.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/fileModel/GetFileModelGqlGateway.js","sources":["../../../src/features/fileModel/GetFileModelGqlGateway.ts"],"sourcesContent":["import { MainGraphQLClient } from \"@webiny/app/features/mainGraphQLClient/index.js\";\nimport type { CmsModel } from \"@webiny/app-headless-cms-common/types/index.js\";\nimport { GetFileModelGateway as GatewayAbstraction } from \"./abstractions.js\";\n\ninterface GetFileModelResponse {\n fileManager: {\n getFileModel: {\n data: CmsModel;\n error: { code: string; message: string; data: unknown } | null;\n };\n };\n}\n\nconst GET_FILE_MODEL = /* GraphQL */ `\n query GetFileModel {\n fileManager {\n getFileModel {\n data\n error {\n code\n message\n data\n }\n }\n }\n }\n`;\n\nclass GetFileModelGqlGatewayImpl implements GatewayAbstraction.Interface {\n constructor(private client: MainGraphQLClient.Interface) {}\n\n async execute(): Promise<CmsModel> {\n const response = await this.client.execute<GetFileModelResponse>({\n query: GET_FILE_MODEL\n });\n\n const { data, error } = response.fileManager.getFileModel;\n\n if (!data) {\n throw new Error(error?.message || \"Could not fetch file model.\");\n }\n\n return data;\n }\n}\n\nexport const GetFileModelGqlGateway = GatewayAbstraction.createImplementation({\n implementation: GetFileModelGqlGatewayImpl,\n dependencies: [MainGraphQLClient]\n});\n"],"names":["GET_FILE_MODEL","GetFileModelGqlGatewayImpl","client","response","data","error","Error","GetFileModelGqlGateway","GatewayAbstraction","MainGraphQLClient"],"mappings":";;AAaA,MAAMA,iBAA+B,CAAC;;;;;;;;;;;;;AAatC,CAAC;AAED,MAAMC;IACF,YAAoBC,MAAmC,CAAE;aAArCA,MAAM,GAANA;IAAsC;IAE1D,MAAM,UAA6B;QAC/B,MAAMC,WAAW,MAAM,IAAI,CAAC,MAAM,CAAC,OAAO,CAAuB;YAC7D,OAAOH;QACX;QAEA,MAAM,EAAEI,IAAI,EAAEC,KAAK,EAAE,GAAGF,SAAS,WAAW,CAAC,YAAY;QAEzD,IAAI,CAACC,MACD,MAAM,IAAIE,MAAMD,OAAO,WAAW;QAGtC,OAAOD;IACX;AACJ;AAEO,MAAMG,yBAAyBC,oBAAAA,oBAAuC,CAAC;IAC1E,gBAAgBP;IAChB,cAAc;QAACQ;KAAkB;AACrC"}
@@ -0,0 +1,14 @@
1
+ import type { CmsModel } from "@webiny/app-headless-cms-common/types/index.js";
2
+ import { GetFileModelRepository as RepositoryAbstraction, GetFileModelGateway } from "./abstractions.js";
3
+ declare class GetFileModelRepositoryImpl implements RepositoryAbstraction.Interface {
4
+ private gateway;
5
+ private model;
6
+ constructor(gateway: GetFileModelGateway.Interface);
7
+ load(): Promise<void>;
8
+ getModel(): CmsModel | undefined;
9
+ hasModel(): boolean;
10
+ }
11
+ export declare const GetFileModelRepository: typeof GetFileModelRepositoryImpl & {
12
+ __abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IGetFileModelRepository>;
13
+ };
14
+ export {};
@@ -0,0 +1,32 @@
1
+ import { makeAutoObservable, runInAction } from "mobx";
2
+ import { GetFileModelGateway, GetFileModelRepository } from "./abstractions.js";
3
+ class GetFileModelRepositoryImpl {
4
+ constructor(gateway){
5
+ this.gateway = gateway;
6
+ this.model = void 0;
7
+ makeAutoObservable(this);
8
+ }
9
+ async load() {
10
+ if (!this.hasModel()) {
11
+ const model = await this.gateway.execute();
12
+ runInAction(()=>{
13
+ this.model = model;
14
+ });
15
+ }
16
+ }
17
+ getModel() {
18
+ return this.model;
19
+ }
20
+ hasModel() {
21
+ return Boolean(this.model);
22
+ }
23
+ }
24
+ const GetFileModelRepository_GetFileModelRepository = GetFileModelRepository.createImplementation({
25
+ implementation: GetFileModelRepositoryImpl,
26
+ dependencies: [
27
+ GetFileModelGateway
28
+ ]
29
+ });
30
+ export { GetFileModelRepository_GetFileModelRepository as GetFileModelRepository };
31
+
32
+ //# sourceMappingURL=GetFileModelRepository.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/fileModel/GetFileModelRepository.js","sources":["../../../src/features/fileModel/GetFileModelRepository.ts"],"sourcesContent":["import { makeAutoObservable, runInAction } from \"mobx\";\nimport type { CmsModel } from \"@webiny/app-headless-cms-common/types/index.js\";\nimport {\n GetFileModelRepository as RepositoryAbstraction,\n GetFileModelGateway\n} from \"./abstractions.js\";\n\nclass GetFileModelRepositoryImpl implements RepositoryAbstraction.Interface {\n private model: CmsModel | undefined;\n\n constructor(private gateway: GetFileModelGateway.Interface) {\n this.model = undefined;\n makeAutoObservable(this);\n }\n\n async load() {\n if (!this.hasModel()) {\n const model = await this.gateway.execute();\n runInAction(() => {\n this.model = model;\n });\n }\n }\n\n getModel() {\n return this.model;\n }\n\n hasModel() {\n return Boolean(this.model);\n }\n}\n\nexport const GetFileModelRepository = RepositoryAbstraction.createImplementation({\n implementation: GetFileModelRepositoryImpl,\n dependencies: [GetFileModelGateway]\n});\n"],"names":["GetFileModelRepositoryImpl","gateway","undefined","makeAutoObservable","model","runInAction","Boolean","GetFileModelRepository","RepositoryAbstraction","GetFileModelGateway"],"mappings":";;AAOA,MAAMA;IAGF,YAAoBC,OAAsC,CAAE;aAAxCA,OAAO,GAAPA;QAChB,IAAI,CAAC,KAAK,GAAGC;QACbC,mBAAmB,IAAI;IAC3B;IAEA,MAAM,OAAO;QACT,IAAI,CAAC,IAAI,CAAC,QAAQ,IAAI;YAClB,MAAMC,QAAQ,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO;YACxCC,YAAY;gBACR,IAAI,CAAC,KAAK,GAAGD;YACjB;QACJ;IACJ;IAEA,WAAW;QACP,OAAO,IAAI,CAAC,KAAK;IACrB;IAEA,WAAW;QACP,OAAOE,QAAQ,IAAI,CAAC,KAAK;IAC7B;AACJ;AAEO,MAAMC,gDAAyBC,uBAAAA,oBAA0C,CAAC;IAC7E,gBAAgBR;IAChB,cAAc;QAACS;KAAoB;AACvC"}
@@ -0,0 +1,24 @@
1
+ import type { CmsModel } from "@webiny/app-headless-cms-common/types/index.js";
2
+ export interface IFileModelProvider {
3
+ getModel(): Promise<CmsModel>;
4
+ }
5
+ export declare const FileModelProvider: import("@webiny/di").Abstraction<IFileModelProvider>;
6
+ export declare namespace FileModelProvider {
7
+ type Interface = IFileModelProvider;
8
+ }
9
+ export interface IGetFileModelRepository {
10
+ load(): Promise<void>;
11
+ getModel(): CmsModel | undefined;
12
+ hasModel(): boolean;
13
+ }
14
+ export declare const GetFileModelRepository: import("@webiny/di").Abstraction<IGetFileModelRepository>;
15
+ export declare namespace GetFileModelRepository {
16
+ type Interface = IGetFileModelRepository;
17
+ }
18
+ export interface IGetFileModelGateway {
19
+ execute(): Promise<CmsModel>;
20
+ }
21
+ export declare const GetFileModelGateway: import("@webiny/di").Abstraction<IGetFileModelGateway>;
22
+ export declare namespace GetFileModelGateway {
23
+ type Interface = IGetFileModelGateway;
24
+ }
@@ -0,0 +1,7 @@
1
+ import { createAbstraction } from "@webiny/feature/admin";
2
+ const FileModelProvider = createAbstraction("FileModelProvider");
3
+ const GetFileModelRepository = createAbstraction("GetFileModelRepository");
4
+ const GetFileModelGateway = createAbstraction("GetFileModelGateway");
5
+ export { FileModelProvider, GetFileModelGateway, GetFileModelRepository };
6
+
7
+ //# sourceMappingURL=abstractions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/fileModel/abstractions.js","sources":["../../../src/features/fileModel/abstractions.ts"],"sourcesContent":["import { createAbstraction } from \"@webiny/feature/admin\";\nimport type { CmsModel } from \"@webiny/app-headless-cms-common/types/index.js\";\n\nexport interface IFileModelProvider {\n getModel(): Promise<CmsModel>;\n}\n\nexport const FileModelProvider = createAbstraction<IFileModelProvider>(\"FileModelProvider\");\n\nexport namespace FileModelProvider {\n export type Interface = IFileModelProvider;\n}\n\nexport interface IGetFileModelRepository {\n load(): Promise<void>;\n getModel(): CmsModel | undefined;\n hasModel(): boolean;\n}\n\nexport const GetFileModelRepository =\n createAbstraction<IGetFileModelRepository>(\"GetFileModelRepository\");\n\nexport namespace GetFileModelRepository {\n export type Interface = IGetFileModelRepository;\n}\n\nexport interface IGetFileModelGateway {\n execute(): Promise<CmsModel>;\n}\n\nexport const GetFileModelGateway = createAbstraction<IGetFileModelGateway>(\"GetFileModelGateway\");\n\nexport namespace GetFileModelGateway {\n export type Interface = IGetFileModelGateway;\n}\n"],"names":["FileModelProvider","createAbstraction","GetFileModelRepository","GetFileModelGateway"],"mappings":";AAOO,MAAMA,oBAAoBC,kBAAsC;AAYhE,MAAMC,yBACTD,kBAA2C;AAUxC,MAAME,sBAAsBF,kBAAwC"}
@@ -0,0 +1 @@
1
+ export declare const FileModelProviderFeature: import("@webiny/feature/admin").FeatureDefinition<any, []>;
@@ -0,0 +1,15 @@
1
+ import { createFeature } from "@webiny/feature/admin";
2
+ import { FileModelProvider } from "./FileModelProvider.js";
3
+ import { GetFileModelRepository } from "./GetFileModelRepository.js";
4
+ import { GetFileModelGqlGateway } from "./GetFileModelGqlGateway.js";
5
+ const FileModelProviderFeature = createFeature({
6
+ name: "FileModelProvider",
7
+ register (container) {
8
+ container.register(FileModelProvider);
9
+ container.register(GetFileModelRepository).inSingletonScope();
10
+ container.register(GetFileModelGqlGateway);
11
+ }
12
+ });
13
+ export { FileModelProviderFeature };
14
+
15
+ //# sourceMappingURL=feature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/fileModel/feature.js","sources":["../../../src/features/fileModel/feature.ts"],"sourcesContent":["import { createFeature } from \"@webiny/feature/admin\";\nimport { FileModelProvider } from \"./FileModelProvider.js\";\nimport { GetFileModelRepository } from \"./GetFileModelRepository.js\";\nimport { GetFileModelGqlGateway } from \"./GetFileModelGqlGateway.js\";\n\nexport const FileModelProviderFeature = createFeature({\n name: \"FileModelProvider\",\n register(container) {\n container.register(FileModelProvider);\n container.register(GetFileModelRepository).inSingletonScope();\n container.register(GetFileModelGqlGateway);\n }\n});\n"],"names":["FileModelProviderFeature","createFeature","container","FileModelProvider","GetFileModelRepository","GetFileModelGqlGateway"],"mappings":";;;;AAKO,MAAMA,2BAA2BC,cAAc;IAClD,MAAM;IACN,UAASC,SAAS;QACdA,UAAU,QAAQ,CAACC;QACnBD,UAAU,QAAQ,CAACE,wBAAwB,gBAAgB;QAC3DF,UAAU,QAAQ,CAACG;IACvB;AACJ"}
@@ -0,0 +1,2 @@
1
+ export { FileModelProvider } from "./abstractions.js";
2
+ export { FileModelProviderFeature } from "./feature.js";
@@ -0,0 +1,2 @@
1
+ export { FileModelProvider } from "./abstractions.js";
2
+ export { FileModelProviderFeature } from "./feature.js";
@@ -0,0 +1,23 @@
1
+ import { WebinySdk } from "@webiny/app-admin/features/webinySdk/abstractions.js";
2
+ import { FilesListCache, FileFieldsProvider } from "../shared/abstractions.js";
3
+ import { FileUploader as Abstraction, type UploadFileData, type FileUploaderViewModel, type BatchUploadOptions } from "./abstractions.js";
4
+ declare class FileUploaderImpl implements Abstraction.Interface {
5
+ private sdk;
6
+ private cache;
7
+ private fileFieldsProvider;
8
+ private jobs;
9
+ private abortControllers;
10
+ constructor(sdk: WebinySdk.Interface, cache: FilesListCache.Interface, fileFieldsProvider: FileFieldsProvider.Interface);
11
+ get vm(): FileUploaderViewModel;
12
+ upload(file: File, data: UploadFileData): Promise<void>;
13
+ uploadMany(files: Array<{
14
+ file: File;
15
+ data: UploadFileData;
16
+ }>, options?: BatchUploadOptions): Promise<void>;
17
+ abort(jobId: string): void;
18
+ clear(): void;
19
+ }
20
+ export declare const FileUploader: typeof FileUploaderImpl & {
21
+ __abstraction: import("@webiny/di").Abstraction<import("./abstractions.js").IFileUploader>;
22
+ };
23
+ export {};
@@ -0,0 +1,243 @@
1
+ import { computed, makeAutoObservable, runInAction } from "mobx";
2
+ import { WebinySdk } from "@webiny/app-admin/features/webinySdk/abstractions.js";
3
+ import { FileFieldsProvider, FilesListCache } from "../shared/abstractions.js";
4
+ import { FileUploader } from "./abstractions.js";
5
+ let jobCounter = 0;
6
+ function createJobId() {
7
+ return `upload-${++jobCounter}-${Date.now()}`;
8
+ }
9
+ class FileUploaderImpl {
10
+ constructor(sdk, cache, fileFieldsProvider){
11
+ this.sdk = sdk;
12
+ this.cache = cache;
13
+ this.fileFieldsProvider = fileFieldsProvider;
14
+ this.jobs = [];
15
+ this.abortControllers = new Map();
16
+ makeAutoObservable(this, {
17
+ sdk: false,
18
+ cache: false,
19
+ fileFieldsProvider: false,
20
+ abortControllers: false,
21
+ vm: computed
22
+ });
23
+ }
24
+ get vm() {
25
+ const jobs = [
26
+ ...this.jobs
27
+ ];
28
+ const uploading = jobs.filter((j)=>"uploading" === j.status || "pending" === j.status);
29
+ const completed = jobs.filter((j)=>"completed" === j.status);
30
+ const failed = jobs.filter((j)=>"failed" === j.status);
31
+ let sent = 0;
32
+ let total = 0;
33
+ for (const job of jobs){
34
+ sent += job.progress.sent;
35
+ total += job.progress.total;
36
+ }
37
+ return {
38
+ jobs,
39
+ overallProgress: {
40
+ sent,
41
+ total,
42
+ percentage: total > 0 ? Math.round(sent / total * 100) : 0
43
+ },
44
+ isUploading: uploading.length > 0,
45
+ completedCount: completed.length,
46
+ failedCount: failed.length
47
+ };
48
+ }
49
+ async upload(file, data) {
50
+ const fileFields = await this.fileFieldsProvider.execute();
51
+ const jobId = createJobId();
52
+ const controller = new AbortController();
53
+ this.abortControllers.set(jobId, controller);
54
+ const job = {
55
+ id: jobId,
56
+ fileName: data.name,
57
+ status: "uploading",
58
+ progress: {
59
+ sent: 0,
60
+ total: file.size,
61
+ percentage: 0
62
+ }
63
+ };
64
+ runInAction(()=>{
65
+ this.jobs.push(job);
66
+ });
67
+ try {
68
+ const result = await this.sdk.fileManager.createFile({
69
+ file,
70
+ data,
71
+ fields: fileFields,
72
+ onProgress: (progress)=>{
73
+ runInAction(()=>{
74
+ const idx = this.jobs.findIndex((j)=>j.id === jobId);
75
+ if (-1 !== idx) this.jobs[idx] = {
76
+ ...this.jobs[idx],
77
+ progress: {
78
+ sent: progress.sent,
79
+ total: progress.total,
80
+ percentage: progress.percentage
81
+ }
82
+ };
83
+ });
84
+ },
85
+ signal: controller.signal
86
+ });
87
+ if (result.isFail()) throw new Error(result.error.message);
88
+ runInAction(()=>{
89
+ const idx = this.jobs.findIndex((j)=>j.id === jobId);
90
+ if (-1 !== idx) this.jobs[idx] = {
91
+ ...this.jobs[idx],
92
+ status: "completed",
93
+ progress: {
94
+ sent: file.size,
95
+ total: file.size,
96
+ percentage: 100
97
+ },
98
+ result: result.value
99
+ };
100
+ this.cache.addItems([
101
+ result.value
102
+ ]);
103
+ });
104
+ } catch (error) {
105
+ const message = error instanceof Error ? error.message : "Unknown error";
106
+ runInAction(()=>{
107
+ const idx = this.jobs.findIndex((j)=>j.id === jobId);
108
+ if (-1 !== idx) this.jobs[idx] = {
109
+ ...this.jobs[idx],
110
+ status: "failed",
111
+ error: message
112
+ };
113
+ });
114
+ } finally{
115
+ this.abortControllers.delete(jobId);
116
+ }
117
+ }
118
+ async uploadMany(files, options) {
119
+ const fileFields = await this.fileFieldsProvider.execute();
120
+ const controller = new AbortController();
121
+ const jobIds = [];
122
+ runInAction(()=>{
123
+ for (const entry of files){
124
+ const jobId = createJobId();
125
+ jobIds.push(jobId);
126
+ this.abortControllers.set(jobId, controller);
127
+ this.jobs.push({
128
+ id: jobId,
129
+ fileName: entry.data.name,
130
+ status: "pending",
131
+ progress: {
132
+ sent: 0,
133
+ total: entry.file.size,
134
+ percentage: 0
135
+ }
136
+ });
137
+ }
138
+ });
139
+ const sdkFiles = files.map((entry, index)=>({
140
+ file: entry.file,
141
+ data: entry.data,
142
+ fields: fileFields,
143
+ onProgress: (progress)=>{
144
+ runInAction(()=>{
145
+ const jobId = jobIds[index];
146
+ const idx = this.jobs.findIndex((j)=>j.id === jobId);
147
+ if (-1 !== idx) this.jobs[idx] = {
148
+ ...this.jobs[idx],
149
+ status: "uploading",
150
+ progress: {
151
+ sent: progress.sent,
152
+ total: progress.total,
153
+ percentage: progress.percentage
154
+ }
155
+ };
156
+ });
157
+ }
158
+ }));
159
+ try {
160
+ const result = await this.sdk.fileManager.createFiles({
161
+ files: sdkFiles,
162
+ concurrency: options?.concurrency,
163
+ strategy: options?.strategy,
164
+ signal: controller.signal
165
+ });
166
+ if (result.isFail()) throw new Error(result.error.message);
167
+ const { successful, failed } = result.value;
168
+ runInAction(()=>{
169
+ for (const file of successful){
170
+ const jobId = jobIds.find((id)=>{
171
+ const job = this.jobs.find((j)=>j.id === id);
172
+ return job && job.fileName === file.name && "completed" !== job.status;
173
+ });
174
+ if (jobId) {
175
+ const idx = this.jobs.findIndex((j)=>j.id === jobId);
176
+ if (-1 !== idx) this.jobs[idx] = {
177
+ ...this.jobs[idx],
178
+ status: "completed",
179
+ progress: {
180
+ sent: this.jobs[idx].progress.total,
181
+ total: this.jobs[idx].progress.total,
182
+ percentage: 100
183
+ },
184
+ result: file
185
+ };
186
+ }
187
+ }
188
+ for (const failure of failed){
189
+ const jobId = jobIds.find((id)=>{
190
+ const job = this.jobs.find((j)=>j.id === id);
191
+ return job && job.fileName === failure.data.name && "failed" !== job.status;
192
+ });
193
+ if (jobId) {
194
+ const idx = this.jobs.findIndex((j)=>j.id === jobId);
195
+ if (-1 !== idx) this.jobs[idx] = {
196
+ ...this.jobs[idx],
197
+ status: "failed",
198
+ error: failure.error.message
199
+ };
200
+ }
201
+ }
202
+ if (successful.length > 0) this.cache.addItems(successful);
203
+ });
204
+ } catch (error) {
205
+ const message = error instanceof Error ? error.message : "Unknown error";
206
+ runInAction(()=>{
207
+ for (const jobId of jobIds){
208
+ const idx = this.jobs.findIndex((j)=>j.id === jobId);
209
+ if (-1 !== idx && "completed" !== this.jobs[idx].status) this.jobs[idx] = {
210
+ ...this.jobs[idx],
211
+ status: "failed",
212
+ error: message
213
+ };
214
+ }
215
+ });
216
+ } finally{
217
+ for (const jobId of jobIds)this.abortControllers.delete(jobId);
218
+ }
219
+ }
220
+ abort(jobId) {
221
+ const controller = this.abortControllers.get(jobId);
222
+ if (controller) {
223
+ controller.abort();
224
+ this.abortControllers.delete(jobId);
225
+ }
226
+ }
227
+ clear() {
228
+ runInAction(()=>{
229
+ this.jobs = this.jobs.filter((j)=>"completed" !== j.status && "failed" !== j.status);
230
+ });
231
+ }
232
+ }
233
+ const FileUploader_FileUploader = FileUploader.createImplementation({
234
+ implementation: FileUploaderImpl,
235
+ dependencies: [
236
+ WebinySdk,
237
+ FilesListCache,
238
+ FileFieldsProvider
239
+ ]
240
+ });
241
+ export { FileUploader_FileUploader as FileUploader };
242
+
243
+ //# sourceMappingURL=FileUploader.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"features/fileUploader/FileUploader.js","sources":["../../../src/features/fileUploader/FileUploader.ts"],"sourcesContent":["import { makeAutoObservable, computed, runInAction } from \"mobx\";\nimport { WebinySdk } from \"@webiny/app-admin/features/webinySdk/abstractions.js\";\nimport { FilesListCache, FileFieldsProvider } from \"../shared/abstractions.js\";\nimport {\n FileUploader as Abstraction,\n type UploadJob,\n type UploadFileData,\n type FileUploaderViewModel,\n type BatchUploadOptions\n} from \"./abstractions.js\";\n\nlet jobCounter = 0;\n\nfunction createJobId(): string {\n return `upload-${++jobCounter}-${Date.now()}`;\n}\n\nclass FileUploaderImpl implements Abstraction.Interface {\n private jobs: UploadJob[] = [];\n private abortControllers = new Map<string, AbortController>();\n\n constructor(\n private sdk: WebinySdk.Interface,\n private cache: FilesListCache.Interface,\n private fileFieldsProvider: FileFieldsProvider.Interface\n ) {\n makeAutoObservable<\n FileUploaderImpl,\n \"sdk\" | \"cache\" | \"fileFieldsProvider\" | \"abortControllers\"\n >(this, {\n sdk: false,\n cache: false,\n fileFieldsProvider: false,\n abortControllers: false,\n vm: computed\n });\n }\n\n get vm(): FileUploaderViewModel {\n const jobs = [...this.jobs];\n const uploading = jobs.filter(j => j.status === \"uploading\" || j.status === \"pending\");\n const completed = jobs.filter(j => j.status === \"completed\");\n const failed = jobs.filter(j => j.status === \"failed\");\n\n let sent = 0;\n let total = 0;\n for (const job of jobs) {\n sent += job.progress.sent;\n total += job.progress.total;\n }\n\n return {\n jobs,\n overallProgress: {\n sent,\n total,\n percentage: total > 0 ? Math.round((sent / total) * 100) : 0\n },\n isUploading: uploading.length > 0,\n completedCount: completed.length,\n failedCount: failed.length\n };\n }\n\n async upload(file: File, data: UploadFileData): Promise<void> {\n const fileFields = await this.fileFieldsProvider.execute();\n const jobId = createJobId();\n const controller = new AbortController();\n this.abortControllers.set(jobId, controller);\n\n const job: UploadJob = {\n id: jobId,\n fileName: data.name,\n status: \"uploading\",\n progress: { sent: 0, total: file.size, percentage: 0 }\n };\n\n runInAction(() => {\n this.jobs.push(job);\n });\n\n try {\n const result = await this.sdk.fileManager.createFile({\n file,\n data,\n fields: fileFields,\n onProgress: progress => {\n runInAction(() => {\n const idx = this.jobs.findIndex(j => j.id === jobId);\n if (idx !== -1) {\n this.jobs[idx] = {\n ...this.jobs[idx],\n progress: {\n sent: progress.sent,\n total: progress.total,\n percentage: progress.percentage\n }\n };\n }\n });\n },\n signal: controller.signal\n });\n\n if (result.isFail()) {\n throw new Error(result.error.message);\n }\n\n runInAction(() => {\n const idx = this.jobs.findIndex(j => j.id === jobId);\n if (idx !== -1) {\n this.jobs[idx] = {\n ...this.jobs[idx],\n status: \"completed\",\n progress: { sent: file.size, total: file.size, percentage: 100 },\n result: result.value\n };\n }\n this.cache.addItems([result.value]);\n });\n } catch (error) {\n const message = error instanceof Error ? error.message : \"Unknown error\";\n runInAction(() => {\n const idx = this.jobs.findIndex(j => j.id === jobId);\n if (idx !== -1) {\n this.jobs[idx] = {\n ...this.jobs[idx],\n status: \"failed\",\n error: message\n };\n }\n });\n } finally {\n this.abortControllers.delete(jobId);\n }\n }\n\n async uploadMany(\n files: Array<{ file: File; data: UploadFileData }>,\n options?: BatchUploadOptions\n ): Promise<void> {\n const fileFields = await this.fileFieldsProvider.execute();\n const controller = new AbortController();\n\n // Create jobs for each file.\n const jobIds: string[] = [];\n runInAction(() => {\n for (const entry of files) {\n const jobId = createJobId();\n jobIds.push(jobId);\n this.abortControllers.set(jobId, controller);\n this.jobs.push({\n id: jobId,\n fileName: entry.data.name,\n status: \"pending\",\n progress: { sent: 0, total: entry.file.size, percentage: 0 }\n });\n }\n });\n\n // Build SDK params with per-file onProgress callbacks.\n const sdkFiles = files.map((entry, index) => ({\n file: entry.file,\n data: entry.data,\n fields: fileFields,\n onProgress: (progress: { sent: number; total: number; percentage: number }) => {\n runInAction(() => {\n const jobId = jobIds[index];\n const idx = this.jobs.findIndex(j => j.id === jobId);\n if (idx !== -1) {\n this.jobs[idx] = {\n ...this.jobs[idx],\n status: \"uploading\",\n progress: {\n sent: progress.sent,\n total: progress.total,\n percentage: progress.percentage\n }\n };\n }\n });\n }\n }));\n\n try {\n const result = await this.sdk.fileManager.createFiles({\n files: sdkFiles,\n concurrency: options?.concurrency,\n strategy: options?.strategy as any,\n signal: controller.signal\n });\n\n if (result.isFail()) {\n throw new Error(result.error.message);\n }\n\n const { successful, failed } = result.value;\n\n runInAction(() => {\n // Mark successful jobs.\n for (const file of successful) {\n // Match by name since SDK doesn't return our jobId.\n const jobId = jobIds.find(id => {\n const job = this.jobs.find(j => j.id === id);\n return job && job.fileName === file.name && job.status !== \"completed\";\n });\n if (jobId) {\n const idx = this.jobs.findIndex(j => j.id === jobId);\n if (idx !== -1) {\n this.jobs[idx] = {\n ...this.jobs[idx],\n status: \"completed\",\n progress: {\n sent: this.jobs[idx].progress.total,\n total: this.jobs[idx].progress.total,\n percentage: 100\n },\n result: file\n };\n }\n }\n }\n\n // Mark failed jobs.\n for (const failure of failed) {\n const jobId = jobIds.find(id => {\n const job = this.jobs.find(j => j.id === id);\n return job && job.fileName === failure.data.name && job.status !== \"failed\";\n });\n if (jobId) {\n const idx = this.jobs.findIndex(j => j.id === jobId);\n if (idx !== -1) {\n this.jobs[idx] = {\n ...this.jobs[idx],\n status: \"failed\",\n error: failure.error.message\n };\n }\n }\n }\n\n // Update cache with all successful files.\n if (successful.length > 0) {\n this.cache.addItems(successful);\n }\n });\n } catch (error) {\n // Fail-fast: mark all pending/uploading jobs as failed.\n const message = error instanceof Error ? error.message : \"Unknown error\";\n runInAction(() => {\n for (const jobId of jobIds) {\n const idx = this.jobs.findIndex(j => j.id === jobId);\n if (idx !== -1 && this.jobs[idx].status !== \"completed\") {\n this.jobs[idx] = {\n ...this.jobs[idx],\n status: \"failed\",\n error: message\n };\n }\n }\n });\n } finally {\n for (const jobId of jobIds) {\n this.abortControllers.delete(jobId);\n }\n }\n }\n\n abort(jobId: string): void {\n const controller = this.abortControllers.get(jobId);\n if (controller) {\n controller.abort();\n this.abortControllers.delete(jobId);\n }\n }\n\n clear(): void {\n runInAction(() => {\n this.jobs = this.jobs.filter(j => j.status !== \"completed\" && j.status !== \"failed\");\n });\n }\n}\n\nexport const FileUploader = Abstraction.createImplementation({\n implementation: FileUploaderImpl,\n dependencies: [WebinySdk, FilesListCache, FileFieldsProvider]\n});\n"],"names":["jobCounter","createJobId","Date","FileUploaderImpl","sdk","cache","fileFieldsProvider","Map","makeAutoObservable","computed","jobs","uploading","j","completed","failed","sent","total","job","Math","file","data","fileFields","jobId","controller","AbortController","runInAction","result","progress","idx","Error","error","message","files","options","jobIds","entry","sdkFiles","index","successful","id","failure","FileUploader","Abstraction","WebinySdk","FilesListCache","FileFieldsProvider"],"mappings":";;;;AAWA,IAAIA,aAAa;AAEjB,SAASC;IACL,OAAO,CAAC,OAAO,EAAE,EAAED,WAAW,CAAC,EAAEE,KAAK,GAAG,IAAI;AACjD;AAEA,MAA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