@webiny/app-file-manager 6.4.0-beta.3 → 6.4.0-beta.5
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.
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { FileManagerViewConfig as FileManagerConfig, useFileManagerConfig } from "../../../presentation/config/FileManagerViewConfig.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app-file-manager",
|
|
3
|
-
"version": "6.4.0-beta.
|
|
3
|
+
"version": "6.4.0-beta.5",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./index.js",
|
|
@@ -15,23 +15,23 @@
|
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@apollo/react-common": "3.1.4",
|
|
17
17
|
"@apollo/react-components": "3.1.5",
|
|
18
|
-
"@types/react": "18.3.
|
|
19
|
-
"@webiny/admin-ui": "6.4.0-beta.
|
|
20
|
-
"@webiny/app": "6.4.0-beta.
|
|
21
|
-
"@webiny/app-aco": "6.4.0-beta.
|
|
22
|
-
"@webiny/app-admin": "6.4.0-beta.
|
|
23
|
-
"@webiny/app-headless-cms": "6.4.0-beta.
|
|
24
|
-
"@webiny/app-headless-cms-common": "6.4.0-beta.
|
|
25
|
-
"@webiny/app-websockets": "6.4.0-beta.
|
|
18
|
+
"@types/react": "18.3.29",
|
|
19
|
+
"@webiny/admin-ui": "6.4.0-beta.5",
|
|
20
|
+
"@webiny/app": "6.4.0-beta.5",
|
|
21
|
+
"@webiny/app-aco": "6.4.0-beta.5",
|
|
22
|
+
"@webiny/app-admin": "6.4.0-beta.5",
|
|
23
|
+
"@webiny/app-headless-cms": "6.4.0-beta.5",
|
|
24
|
+
"@webiny/app-headless-cms-common": "6.4.0-beta.5",
|
|
25
|
+
"@webiny/app-websockets": "6.4.0-beta.5",
|
|
26
26
|
"@webiny/di": "1.0.1",
|
|
27
|
-
"@webiny/feature": "6.4.0-beta.
|
|
28
|
-
"@webiny/form": "6.4.0-beta.
|
|
29
|
-
"@webiny/icons": "6.4.0-beta.
|
|
30
|
-
"@webiny/plugins": "6.4.0-beta.
|
|
31
|
-
"@webiny/react-composition": "6.4.0-beta.
|
|
32
|
-
"@webiny/react-properties": "6.4.0-beta.
|
|
33
|
-
"@webiny/sdk": "6.4.0-beta.
|
|
34
|
-
"@webiny/validation": "6.4.0-beta.
|
|
27
|
+
"@webiny/feature": "6.4.0-beta.5",
|
|
28
|
+
"@webiny/form": "6.4.0-beta.5",
|
|
29
|
+
"@webiny/icons": "6.4.0-beta.5",
|
|
30
|
+
"@webiny/plugins": "6.4.0-beta.5",
|
|
31
|
+
"@webiny/react-composition": "6.4.0-beta.5",
|
|
32
|
+
"@webiny/react-properties": "6.4.0-beta.5",
|
|
33
|
+
"@webiny/sdk": "6.4.0-beta.5",
|
|
34
|
+
"@webiny/validation": "6.4.0-beta.5",
|
|
35
35
|
"apollo-cache": "1.3.5",
|
|
36
36
|
"apollo-client": "2.6.10",
|
|
37
37
|
"apollo-link": "1.2.14",
|
|
@@ -53,14 +53,16 @@
|
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"@svgr/webpack": "8.1.0",
|
|
56
|
-
"@webiny/build-tools": "6.4.0-beta.
|
|
56
|
+
"@webiny/build-tools": "6.4.0-beta.5",
|
|
57
57
|
"rimraf": "6.1.3",
|
|
58
58
|
"typescript": "6.0.3",
|
|
59
|
-
"vitest": "4.1.
|
|
59
|
+
"vitest": "4.1.7"
|
|
60
60
|
},
|
|
61
61
|
"publishConfig": {
|
|
62
|
-
"access": "public"
|
|
63
|
-
"directory": "dist"
|
|
62
|
+
"access": "public"
|
|
64
63
|
},
|
|
65
|
-
"gitHead": "
|
|
64
|
+
"gitHead": "8476da73b653c89cc1474d968baf55c1b0ae0e5f",
|
|
65
|
+
"webiny": {
|
|
66
|
+
"publishFrom": "dist"
|
|
67
|
+
}
|
|
66
68
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import react from "react";
|
|
2
|
-
import {
|
|
2
|
+
import { FileManager } from "@webiny/app-admin";
|
|
3
3
|
import { FileManagerView } from "./FileManagerView.js";
|
|
4
4
|
const formatFileItem = (file)=>({
|
|
5
5
|
id: file.id,
|
|
@@ -12,7 +12,7 @@ const formatFileItem = (file)=>({
|
|
|
12
12
|
extensions: file.extensions,
|
|
13
13
|
metadata: file.metadata
|
|
14
14
|
});
|
|
15
|
-
const FileManagerRendererDecorator =
|
|
15
|
+
const FileManagerRendererDecorator = FileManager.Renderer.createDecorator(()=>function(props) {
|
|
16
16
|
const { onChange, onClose, multiple, accept, scope, overlay = true } = props;
|
|
17
17
|
const handleChange = (files)=>{
|
|
18
18
|
if (!onChange || !files.length) return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"presentation/FileManager/FileManagerRenderer.js","sources":["../../../src/presentation/FileManager/FileManagerRenderer.tsx"],"sourcesContent":["import React from \"react\";\nimport type { FileManagerFileItem, FileManagerOnChange } from \"@webiny/app-admin\";\nimport {
|
|
1
|
+
{"version":3,"file":"presentation/FileManager/FileManagerRenderer.js","sources":["../../../src/presentation/FileManager/FileManagerRenderer.tsx"],"sourcesContent":["import React from \"react\";\nimport type { FileManagerFileItem, FileManagerOnChange } from \"@webiny/app-admin\";\nimport { FileManager } from \"@webiny/app-admin\";\nimport type { FmFile } from \"~/features/shared/types.js\";\nimport { FileManagerView } from \"./FileManagerView.js\";\n\nconst formatFileItem = (file: FmFile): FileManagerFileItem => {\n return {\n id: file.id,\n src: file.src,\n name: file.name,\n type: file.type,\n size: file.size,\n width: file.metadata?.image?.width,\n height: file.metadata?.image?.height,\n extensions: file.extensions,\n metadata: file.metadata\n };\n};\n\nexport const FileManagerRendererDecorator = FileManager.Renderer.createDecorator(() => {\n return function FileManagerRendererImpl(props) {\n const { onChange, onClose, multiple, accept, scope, overlay = true } = props;\n\n const handleChange = (files: FmFile[]) => {\n if (!onChange || !files.length) {\n return;\n }\n\n if (multiple) {\n (onChange as FileManagerOnChange<FileManagerFileItem[]>)(files.map(formatFileItem));\n } else {\n (onChange as FileManagerOnChange<FileManagerFileItem>)(formatFileItem(files[0]));\n }\n\n if (onClose) {\n onClose();\n }\n };\n\n return (\n <FileManagerView\n overlay={overlay}\n onChange={handleChange}\n onClose={onClose}\n multiple={multiple}\n accept={accept}\n scope={scope}\n />\n );\n };\n});\n"],"names":["formatFileItem","file","FileManagerRendererDecorator","FileManager","props","onChange","onClose","multiple","accept","scope","overlay","handleChange","files","FileManagerView"],"mappings":";;;AAMA,MAAMA,iBAAiB,CAACC,OACb;QACH,IAAIA,KAAK,EAAE;QACX,KAAKA,KAAK,GAAG;QACb,MAAMA,KAAK,IAAI;QACf,MAAMA,KAAK,IAAI;QACf,MAAMA,KAAK,IAAI;QACf,OAAOA,KAAK,QAAQ,EAAE,OAAO;QAC7B,QAAQA,KAAK,QAAQ,EAAE,OAAO;QAC9B,YAAYA,KAAK,UAAU;QAC3B,UAAUA,KAAK,QAAQ;IAC3B;AAGG,MAAMC,+BAA+BC,YAAY,QAAQ,CAAC,eAAe,CAAC,IACtE,SAAiCC,KAAK;QACzC,MAAM,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,MAAM,EAAEC,KAAK,EAAEC,UAAU,IAAI,EAAE,GAAGN;QAEvE,MAAMO,eAAe,CAACC;YAClB,IAAI,CAACP,YAAY,CAACO,MAAM,MAAM,EAC1B;YAGAL,WACCF,SAAwDO,MAAM,GAAG,CAACZ,mBAElEK,SAAsDL,eAAeY,KAAK,CAAC,EAAE;YAGlF,IAAIN,SACAA;QAER;QAEA,OAAO,WAAP,GACI,oBAACO,iBAAeA;YACZ,SAASH;YACT,UAAUC;YACV,SAASL;YACT,UAAUC;YACV,QAAQC;YACR,OAAOC;;IAGnB"}
|