@webiny/app-admin 5.35.0 → 5.35.1-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +28 -28
- package/assets/images/icons.png +0 -0
- package/assets/images/icons_retina.png +0 -0
- package/assets/images/swich.png +0 -0
- package/components/FileManager/BottomInfoBar/SupportedFileTypes.d.ts +0 -6
- package/components/FileManager/BottomInfoBar/SupportedFileTypes.js +0 -55
- package/components/FileManager/BottomInfoBar/SupportedFileTypes.js.map +0 -1
- package/components/FileManager/BottomInfoBar/UploadStatus.d.ts +0 -6
- package/components/FileManager/BottomInfoBar/UploadStatus.js +0 -60
- package/components/FileManager/BottomInfoBar/UploadStatus.js.map +0 -1
- package/components/FileManager/BottomInfoBar.d.ts +0 -5
- package/components/FileManager/BottomInfoBar.js +0 -60
- package/components/FileManager/BottomInfoBar.js.map +0 -1
- package/components/FileManager/DropFilesHere.d.ts +0 -10
- package/components/FileManager/DropFilesHere.js +0 -76
- package/components/FileManager/DropFilesHere.js.map +0 -1
- package/components/FileManager/File.d.ts +0 -17
- package/components/FileManager/File.js +0 -155
- package/components/FileManager/File.js.map +0 -1
- package/components/FileManager/FileDetails/Name.d.ts +0 -8
- package/components/FileManager/FileDetails/Name.js +0 -138
- package/components/FileManager/FileDetails/Name.js.map +0 -1
- package/components/FileManager/FileDetails/Tags.d.ts +0 -10
- package/components/FileManager/FileDetails/Tags.js +0 -339
- package/components/FileManager/FileDetails/Tags.js.map +0 -1
- package/components/FileManager/FileDetails.d.ts +0 -24
- package/components/FileManager/FileDetails.js +0 -474
- package/components/FileManager/FileDetails.js.map +0 -1
- package/components/FileManager/FileManagerContext.d.ts +0 -42
- package/components/FileManager/FileManagerContext.js +0 -224
- package/components/FileManager/FileManagerContext.js.map +0 -1
- package/components/FileManager/FileManagerView.d.ts +0 -18
- package/components/FileManager/FileManagerView.js +0 -721
- package/components/FileManager/FileManagerView.js.map +0 -1
- package/components/FileManager/LeftSidebar.d.ts +0 -10
- package/components/FileManager/LeftSidebar.js +0 -127
- package/components/FileManager/LeftSidebar.js.map +0 -1
- package/components/FileManager/NoPermissionView.d.ts +0 -3
- package/components/FileManager/NoPermissionView.js +0 -87
- package/components/FileManager/NoPermissionView.js.map +0 -1
- package/components/FileManager/NoResults.d.ts +0 -3
- package/components/FileManager/NoResults.js +0 -28
- package/components/FileManager/NoResults.js.map +0 -1
- package/components/FileManager/getFileTypePlugin.d.ts +0 -4
- package/components/FileManager/getFileTypePlugin.js +0 -57
- package/components/FileManager/getFileTypePlugin.js.map +0 -1
- package/components/FileManager/getFileUploader.d.ts +0 -3
- package/components/FileManager/getFileUploader.js +0 -20
- package/components/FileManager/getFileUploader.js.map +0 -1
- package/components/FileManager/graphql.d.ts +0 -96
- package/components/FileManager/graphql.js +0 -58
- package/components/FileManager/graphql.js.map +0 -1
- package/components/FileManager/icons/content_copy-black-24px.svg +0 -1
- package/components/FileManager/icons/delete.svg +0 -12
- package/components/FileManager/icons/privacy_tip-24px.svg +0 -10
- package/components/FileManager/icons/round-check_box-24px.svg +0 -4
- package/components/FileManager/icons/round-check_box_outline_blank-24px.svg +0 -4
- package/components/FileManager/icons/round-cloud_download-24px.svg +0 -4
- package/components/FileManager/icons/round-cloud_upload-24px.svg +0 -4
- package/components/FileManager/icons/round-description-24px.svg +0 -4
- package/components/FileManager/icons/round-edit-24px.svg +0 -4
- package/components/FileManager/icons/round-info-24px.svg +0 -4
- package/components/FileManager/icons/round-label-24px.svg +0 -4
- package/components/FileManager/icons/round-more_vert-24px.svg +0 -4
- package/components/FileManager/icons/round-search-24px.svg +0 -20
- package/components/FileManager/outputFileSelectionError.d.ts +0 -7
- package/components/FileManager/outputFileSelectionError.js +0 -54
- package/components/FileManager/outputFileSelectionError.js.map +0 -1
- package/components/FileManager/types.d.ts +0 -21
- package/components/FileManager/types.js +0 -5
- package/components/FileManager/types.js.map +0 -1
- package/components/FileManager.d.ts +0 -67
- package/components/FileManager.js +0 -144
- package/components/FileManager.js.map +0 -1
- package/plugins/FileManagerFileTypePlugin.d.ts +0 -33
- package/plugins/FileManagerFileTypePlugin.js +0 -63
- package/plugins/FileManagerFileTypePlugin.js.map +0 -1
- package/plugins/fileManager/fileDefault.d.ts +0 -2
- package/plugins/fileManager/fileDefault.js +0 -34
- package/plugins/fileManager/fileDefault.js.map +0 -1
- package/plugins/fileManager/fileImage/DeleteAction.d.ts +0 -7
- package/plugins/fileManager/fileImage/DeleteAction.js +0 -83
- package/plugins/fileManager/fileImage/DeleteAction.js.map +0 -1
- package/plugins/fileManager/fileImage/EditAction.d.ts +0 -10
- package/plugins/fileManager/fileImage/EditAction.js +0 -179
- package/plugins/fileManager/fileImage/EditAction.js.map +0 -1
- package/plugins/fileManager/fileImage/index.d.ts +0 -2
- package/plugins/fileManager/fileImage/index.js +0 -46
- package/plugins/fileManager/fileImage/index.js.map +0 -1
- package/plugins/fileManager/icons/edit.svg +0 -17
- package/plugins/fileManager/icons/round-description-24px.svg +0 -1
- package/plugins/fileManager/index.d.ts +0 -2
- package/plugins/fileManager/index.js +0 -21
- package/plugins/fileManager/index.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@webiny/app-admin",
|
|
3
|
-
"version": "5.35.0",
|
|
3
|
+
"version": "5.35.1-beta.0",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"description": "A collection of plugins that together form a complete admin interface, customizable and extensible with Webiny apps and plugins.",
|
|
6
6
|
"repository": {
|
|
@@ -20,17 +20,17 @@
|
|
|
20
20
|
"@svgr/webpack": "6.5.1",
|
|
21
21
|
"@types/mime": "2.0.3",
|
|
22
22
|
"@types/react": "17.0.39",
|
|
23
|
-
"@webiny/app": "5.35.0",
|
|
24
|
-
"@webiny/app-security": "5.35.0",
|
|
25
|
-
"@webiny/app-wcp": "5.35.0",
|
|
26
|
-
"@webiny/form": "5.35.0",
|
|
27
|
-
"@webiny/plugins": "5.35.0",
|
|
28
|
-
"@webiny/react-composition": "5.35.0",
|
|
29
|
-
"@webiny/react-router": "5.35.0",
|
|
30
|
-
"@webiny/telemetry": "5.35.0",
|
|
31
|
-
"@webiny/ui": "5.35.0",
|
|
32
|
-
"@webiny/ui-composer": "5.35.0",
|
|
33
|
-
"@webiny/validation": "5.35.0",
|
|
23
|
+
"@webiny/app": "^5.35.1-beta.0",
|
|
24
|
+
"@webiny/app-security": "^5.35.1-beta.0",
|
|
25
|
+
"@webiny/app-wcp": "^5.35.1-beta.0",
|
|
26
|
+
"@webiny/form": "^5.35.1-beta.0",
|
|
27
|
+
"@webiny/plugins": "^5.35.1-beta.0",
|
|
28
|
+
"@webiny/react-composition": "^5.35.1-beta.0",
|
|
29
|
+
"@webiny/react-router": "^5.35.1-beta.0",
|
|
30
|
+
"@webiny/telemetry": "^5.35.1-beta.0",
|
|
31
|
+
"@webiny/ui": "^5.35.1-beta.0",
|
|
32
|
+
"@webiny/ui-composer": "^5.35.1-beta.0",
|
|
33
|
+
"@webiny/validation": "^5.35.1-beta.0",
|
|
34
34
|
"apollo-cache": "1.3.5",
|
|
35
35
|
"apollo-client": "2.6.10",
|
|
36
36
|
"apollo-link": "1.2.14",
|
|
@@ -51,21 +51,21 @@
|
|
|
51
51
|
"store": "2.0.12"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@babel/cli": "
|
|
55
|
-
"@babel/core": "
|
|
56
|
-
"@babel/plugin-proposal-class-properties": "
|
|
57
|
-
"@babel/preset-env": "
|
|
58
|
-
"@babel/preset-react": "
|
|
59
|
-
"@babel/preset-typescript": "
|
|
60
|
-
"@types/bytes": "
|
|
61
|
-
"@types/graphlib": "
|
|
62
|
-
"@types/store": "
|
|
63
|
-
"@webiny/cli": "^5.35.0",
|
|
64
|
-
"@webiny/project-utils": "^5.35.0",
|
|
65
|
-
"babel-plugin-emotion": "
|
|
66
|
-
"babel-plugin-lodash": "
|
|
67
|
-
"rimraf": "
|
|
68
|
-
"ttypescript": "
|
|
54
|
+
"@babel/cli": "7.20.7",
|
|
55
|
+
"@babel/core": "7.20.12",
|
|
56
|
+
"@babel/plugin-proposal-class-properties": "7.18.6",
|
|
57
|
+
"@babel/preset-env": "7.20.2",
|
|
58
|
+
"@babel/preset-react": "7.18.6",
|
|
59
|
+
"@babel/preset-typescript": "7.18.6",
|
|
60
|
+
"@types/bytes": "3.1.1",
|
|
61
|
+
"@types/graphlib": "2.1.8",
|
|
62
|
+
"@types/store": "2.0.2",
|
|
63
|
+
"@webiny/cli": "^5.35.1-beta.0",
|
|
64
|
+
"@webiny/project-utils": "^5.35.1-beta.0",
|
|
65
|
+
"babel-plugin-emotion": "9.2.11",
|
|
66
|
+
"babel-plugin-lodash": "3.3.4",
|
|
67
|
+
"rimraf": "3.0.2",
|
|
68
|
+
"ttypescript": "1.5.15",
|
|
69
69
|
"typescript": "4.7.4"
|
|
70
70
|
},
|
|
71
71
|
"publishConfig": {
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
]
|
|
89
89
|
}
|
|
90
90
|
},
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "d6a257ebbb9e7aeccfaa33a7f83301cf1919b082"
|
|
92
92
|
}
|
package/assets/images/icons.png
DELETED
|
Binary file
|
|
Binary file
|
package/assets/images/swich.png
DELETED
|
Binary file
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
var _lite = _interopRequireDefault(require("mime/lite"));
|
|
13
|
-
|
|
14
|
-
_lite.default.define({
|
|
15
|
-
"image/x-icon": ["ico"]
|
|
16
|
-
}, true);
|
|
17
|
-
|
|
18
|
-
_lite.default.define({
|
|
19
|
-
"image/jpg": ["jpg"]
|
|
20
|
-
}, true);
|
|
21
|
-
|
|
22
|
-
_lite.default.define({
|
|
23
|
-
"image/vnd.microsoft.icon": ["ico"]
|
|
24
|
-
}, true);
|
|
25
|
-
|
|
26
|
-
var getUniqueFilePlugins = function getUniqueFilePlugins(accept) {
|
|
27
|
-
var exts = {};
|
|
28
|
-
accept.forEach(function (item) {
|
|
29
|
-
var ext = _lite.default.getExtension(item);
|
|
30
|
-
|
|
31
|
-
if (!ext) {
|
|
32
|
-
return;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
exts[ext] = true;
|
|
36
|
-
});
|
|
37
|
-
return Object.keys(exts);
|
|
38
|
-
};
|
|
39
|
-
|
|
40
|
-
var SupportedFileTypes = function SupportedFileTypes(_ref) {
|
|
41
|
-
var accept = _ref.accept;
|
|
42
|
-
|
|
43
|
-
if (!accept) {
|
|
44
|
-
return null;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
if (accept.length === 0) {
|
|
48
|
-
return /*#__PURE__*/_react.default.createElement("span", null, "Showing all file extensions.");
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
return /*#__PURE__*/_react.default.createElement("span", null, "Showing the following file extensions: ", getUniqueFilePlugins(accept).join(", "), ".");
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
var _default = SupportedFileTypes;
|
|
55
|
-
exports.default = _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["mime","define","getUniqueFilePlugins","accept","exts","forEach","item","ext","getExtension","Object","keys","SupportedFileTypes","length","join"],"sources":["SupportedFileTypes.tsx"],"sourcesContent":["import React from \"react\";\nimport mime from \"mime/lite\";\n\nmime.define({ \"image/x-icon\": [\"ico\"] }, true);\nmime.define({ \"image/jpg\": [\"jpg\"] }, true);\nmime.define({ \"image/vnd.microsoft.icon\": [\"ico\"] }, true);\n\nconst getUniqueFilePlugins = (accept: string[]): string[] => {\n const exts: Record<string, boolean> = {};\n accept.forEach(item => {\n const ext = mime.getExtension(item);\n if (!ext) {\n return;\n }\n exts[ext] = true;\n });\n\n return Object.keys(exts);\n};\n\nexport interface SupportedFileTypesProps {\n accept: string[];\n}\n\nconst SupportedFileTypes: React.FC<SupportedFileTypesProps> = ({ accept }) => {\n if (!accept) {\n return null;\n }\n\n if (accept.length === 0) {\n return <span>Showing all file extensions.</span>;\n }\n\n return (\n <span>\n Showing the following file extensions: {getUniqueFilePlugins(accept).join(\", \")}.\n </span>\n );\n};\n\nexport default SupportedFileTypes;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AAEAA,aAAA,CAAKC,MAAL,CAAY;EAAE,gBAAgB,CAAC,KAAD;AAAlB,CAAZ,EAAyC,IAAzC;;AACAD,aAAA,CAAKC,MAAL,CAAY;EAAE,aAAa,CAAC,KAAD;AAAf,CAAZ,EAAsC,IAAtC;;AACAD,aAAA,CAAKC,MAAL,CAAY;EAAE,4BAA4B,CAAC,KAAD;AAA9B,CAAZ,EAAqD,IAArD;;AAEA,IAAMC,oBAAoB,GAAG,SAAvBA,oBAAuB,CAACC,MAAD,EAAgC;EACzD,IAAMC,IAA6B,GAAG,EAAtC;EACAD,MAAM,CAACE,OAAP,CAAe,UAAAC,IAAI,EAAI;IACnB,IAAMC,GAAG,GAAGP,aAAA,CAAKQ,YAAL,CAAkBF,IAAlB,CAAZ;;IACA,IAAI,CAACC,GAAL,EAAU;MACN;IACH;;IACDH,IAAI,CAACG,GAAD,CAAJ,GAAY,IAAZ;EACH,CAND;EAQA,OAAOE,MAAM,CAACC,IAAP,CAAYN,IAAZ,CAAP;AACH,CAXD;;AAiBA,IAAMO,kBAAqD,GAAG,SAAxDA,kBAAwD,OAAgB;EAAA,IAAbR,MAAa,QAAbA,MAAa;;EAC1E,IAAI,CAACA,MAAL,EAAa;IACT,OAAO,IAAP;EACH;;EAED,IAAIA,MAAM,CAACS,MAAP,KAAkB,CAAtB,EAAyB;IACrB,oBAAO,2CAAM,8BAAN,CAAP;EACH;;EAED,oBACI,2CAAM,yCAAN,EAC4CV,oBAAoB,CAACC,MAAD,CAApB,CAA6BU,IAA7B,CAAkC,IAAlC,CAD5C,EACoF,GADpF,CADJ;AAKH,CAdD;;eAgBeF,kB"}
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
13
|
-
|
|
14
|
-
var _Progress = require("@webiny/ui/Progress");
|
|
15
|
-
|
|
16
|
-
var StatusWrapper = /*#__PURE__*/(0, _styled.default)("div", {
|
|
17
|
-
target: "e8hlyp40",
|
|
18
|
-
label: "StatusWrapper"
|
|
19
|
-
})({
|
|
20
|
-
color: "var(--mdc-theme-primary)",
|
|
21
|
-
position: "absolute",
|
|
22
|
-
right: 0,
|
|
23
|
-
bottom: 10,
|
|
24
|
-
marginRight: 10,
|
|
25
|
-
display: "flex",
|
|
26
|
-
alignItems: "center",
|
|
27
|
-
"> div": {
|
|
28
|
-
display: "inline-block"
|
|
29
|
-
}
|
|
30
|
-
});
|
|
31
|
-
var CircularProgressHolder = /*#__PURE__*/(0, _styled.default)("div", {
|
|
32
|
-
target: "e8hlyp41",
|
|
33
|
-
label: "CircularProgressHolder"
|
|
34
|
-
})({
|
|
35
|
-
position: "relative",
|
|
36
|
-
height: 12,
|
|
37
|
-
width: 12
|
|
38
|
-
});
|
|
39
|
-
var UploadingLabel = /*#__PURE__*/(0, _styled.default)("div", {
|
|
40
|
-
target: "e8hlyp42",
|
|
41
|
-
label: "UploadingLabel"
|
|
42
|
-
})({
|
|
43
|
-
marginRight: 5
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
var UploadStatus = function UploadStatus(_ref) {
|
|
47
|
-
var uploading = _ref.uploading;
|
|
48
|
-
|
|
49
|
-
if (!uploading) {
|
|
50
|
-
return null;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return /*#__PURE__*/_react.default.createElement(StatusWrapper, null, /*#__PURE__*/_react.default.createElement(UploadingLabel, null, "Uploading..."), /*#__PURE__*/_react.default.createElement(CircularProgressHolder, null, /*#__PURE__*/_react.default.createElement(_Progress.CircularProgress, {
|
|
54
|
-
size: 10,
|
|
55
|
-
spinnerWidth: 1
|
|
56
|
-
})));
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
var _default = UploadStatus;
|
|
60
|
-
exports.default = _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["StatusWrapper","styled","color","position","right","bottom","marginRight","display","alignItems","CircularProgressHolder","height","width","UploadingLabel","UploadStatus","uploading"],"sources":["UploadStatus.tsx"],"sourcesContent":["import React from \"react\";\nimport styled from \"@emotion/styled\";\nimport { CircularProgress } from \"@webiny/ui/Progress\";\n\nconst StatusWrapper = styled(\"div\")({\n color: \"var(--mdc-theme-primary)\",\n position: \"absolute\",\n right: 0,\n bottom: 10,\n marginRight: 10,\n display: \"flex\",\n alignItems: \"center\",\n \"> div\": {\n display: \"inline-block\"\n }\n});\n\nconst CircularProgressHolder = styled(\"div\")({\n position: \"relative\",\n height: 12,\n width: 12\n});\n\nconst UploadingLabel = styled(\"div\")({\n marginRight: 5\n});\n\nexport interface UploadStatusProps {\n uploading: boolean;\n}\nconst UploadStatus: React.FC<UploadStatusProps> = ({ uploading }) => {\n if (!uploading) {\n return null;\n }\n\n return (\n <StatusWrapper>\n <UploadingLabel>Uploading...</UploadingLabel>\n <CircularProgressHolder>\n <CircularProgress size={10} spinnerWidth={1} />\n </CircularProgressHolder>\n </StatusWrapper>\n );\n};\n\nexport default UploadStatus;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AAEA,IAAMA,aAAa,oBAAGC,eAAH,EAAU,KAAV;EAAA;EAAA;AAAA,GAAiB;EAChCC,KAAK,EAAE,0BADyB;EAEhCC,QAAQ,EAAE,UAFsB;EAGhCC,KAAK,EAAE,CAHyB;EAIhCC,MAAM,EAAE,EAJwB;EAKhCC,WAAW,EAAE,EALmB;EAMhCC,OAAO,EAAE,MANuB;EAOhCC,UAAU,EAAE,QAPoB;EAQhC,SAAS;IACLD,OAAO,EAAE;EADJ;AARuB,CAAjB,CAAnB;AAaA,IAAME,sBAAsB,oBAAGR,eAAH,EAAU,KAAV;EAAA;EAAA;AAAA,GAAiB;EACzCE,QAAQ,EAAE,UAD+B;EAEzCO,MAAM,EAAE,EAFiC;EAGzCC,KAAK,EAAE;AAHkC,CAAjB,CAA5B;AAMA,IAAMC,cAAc,oBAAGX,eAAH,EAAU,KAAV;EAAA;EAAA;AAAA,GAAiB;EACjCK,WAAW,EAAE;AADoB,CAAjB,CAApB;;AAOA,IAAMO,YAAyC,GAAG,SAA5CA,YAA4C,OAAmB;EAAA,IAAhBC,SAAgB,QAAhBA,SAAgB;;EACjE,IAAI,CAACA,SAAL,EAAgB;IACZ,OAAO,IAAP;EACH;;EAED,oBACI,6BAAC,aAAD,qBACI,6BAAC,cAAD,QAAgB,cAAhB,CADJ,eAEI,6BAAC,sBAAD,qBACI,6BAAC,0BAAD;IAAkB,IAAI,EAAE,EAAxB;IAA4B,YAAY,EAAE;EAA1C,EADJ,CAFJ,CADJ;AAQH,CAbD;;eAeeD,Y"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { SupportedFileTypesProps } from "./BottomInfoBar/SupportedFileTypes";
|
|
3
|
-
import { UploadStatusProps } from "./BottomInfoBar/UploadStatus";
|
|
4
|
-
declare const BottomInfoBar: React.FC<SupportedFileTypesProps & UploadStatusProps>;
|
|
5
|
-
export default BottomInfoBar;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
var _lite = _interopRequireDefault(require("mime/lite"));
|
|
13
|
-
|
|
14
|
-
var _styled = _interopRequireDefault(require("@emotion/styled"));
|
|
15
|
-
|
|
16
|
-
var _SupportedFileTypes = _interopRequireDefault(require("./BottomInfoBar/SupportedFileTypes"));
|
|
17
|
-
|
|
18
|
-
var _UploadStatus = _interopRequireDefault(require("./BottomInfoBar/UploadStatus"));
|
|
19
|
-
|
|
20
|
-
_lite.default.define({
|
|
21
|
-
"image/x-icon": ["ico"]
|
|
22
|
-
}, true);
|
|
23
|
-
|
|
24
|
-
_lite.default.define({
|
|
25
|
-
"image/jpg": ["jpg"]
|
|
26
|
-
}, true);
|
|
27
|
-
|
|
28
|
-
_lite.default.define({
|
|
29
|
-
"image/vnd.microsoft.icon": ["ico"]
|
|
30
|
-
}, true);
|
|
31
|
-
|
|
32
|
-
var BottomInfoBarWrapper = /*#__PURE__*/(0, _styled.default)("div", {
|
|
33
|
-
target: "el4b0yq0",
|
|
34
|
-
label: "BottomInfoBarWrapper"
|
|
35
|
-
})({
|
|
36
|
-
fontSize: "0.8rem",
|
|
37
|
-
position: "sticky",
|
|
38
|
-
bottom: 0,
|
|
39
|
-
height: 30,
|
|
40
|
-
color: "var(--mdc-theme-text-secondary-on-background)",
|
|
41
|
-
borderTop: "1px solid var(--mdc-theme-on-background)",
|
|
42
|
-
backgroundColor: "var(--mdc-theme-surface)",
|
|
43
|
-
width: "100%",
|
|
44
|
-
transform: "translateZ(0)",
|
|
45
|
-
overflow: "hidden",
|
|
46
|
-
display: "flex",
|
|
47
|
-
alignItems: "center",
|
|
48
|
-
zIndex: 1,
|
|
49
|
-
"> div": {
|
|
50
|
-
padding: "0 10px",
|
|
51
|
-
width: "100%"
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
var BottomInfoBar = function BottomInfoBar(props) {
|
|
56
|
-
return /*#__PURE__*/_react.default.createElement(BottomInfoBarWrapper, null, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_SupportedFileTypes.default, props), /*#__PURE__*/_react.default.createElement(_UploadStatus.default, props)));
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
var _default = BottomInfoBar;
|
|
60
|
-
exports.default = _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["mime","define","BottomInfoBarWrapper","styled","fontSize","position","bottom","height","color","borderTop","backgroundColor","width","transform","overflow","display","alignItems","zIndex","padding","BottomInfoBar","props"],"sources":["BottomInfoBar.tsx"],"sourcesContent":["import React from \"react\";\nimport mime from \"mime/lite\";\nimport styled from \"@emotion/styled\";\nimport SupportedFileTypes, { SupportedFileTypesProps } from \"./BottomInfoBar/SupportedFileTypes\";\nimport UploadStatus, { UploadStatusProps } from \"./BottomInfoBar/UploadStatus\";\n\nmime.define({ \"image/x-icon\": [\"ico\"] }, true);\nmime.define({ \"image/jpg\": [\"jpg\"] }, true);\nmime.define({ \"image/vnd.microsoft.icon\": [\"ico\"] }, true);\n\nconst BottomInfoBarWrapper = styled(\"div\")({\n fontSize: \"0.8rem\",\n position: \"sticky\",\n bottom: 0,\n height: 30,\n color: \"var(--mdc-theme-text-secondary-on-background)\",\n borderTop: \"1px solid var(--mdc-theme-on-background)\",\n backgroundColor: \"var(--mdc-theme-surface)\",\n width: \"100%\",\n transform: \"translateZ(0)\",\n overflow: \"hidden\",\n display: \"flex\",\n alignItems: \"center\",\n zIndex: 1,\n \"> div\": {\n padding: \"0 10px\",\n width: \"100%\"\n }\n});\n\nconst BottomInfoBar: React.FC<SupportedFileTypesProps & UploadStatusProps> = props => {\n return (\n <BottomInfoBarWrapper>\n <div>\n <SupportedFileTypes {...props} />\n <UploadStatus {...props} />\n </div>\n </BottomInfoBarWrapper>\n );\n};\n\nexport default BottomInfoBar;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AACA;;AAEAA,aAAA,CAAKC,MAAL,CAAY;EAAE,gBAAgB,CAAC,KAAD;AAAlB,CAAZ,EAAyC,IAAzC;;AACAD,aAAA,CAAKC,MAAL,CAAY;EAAE,aAAa,CAAC,KAAD;AAAf,CAAZ,EAAsC,IAAtC;;AACAD,aAAA,CAAKC,MAAL,CAAY;EAAE,4BAA4B,CAAC,KAAD;AAA9B,CAAZ,EAAqD,IAArD;;AAEA,IAAMC,oBAAoB,oBAAGC,eAAH,EAAU,KAAV;EAAA;EAAA;AAAA,GAAiB;EACvCC,QAAQ,EAAE,QAD6B;EAEvCC,QAAQ,EAAE,QAF6B;EAGvCC,MAAM,EAAE,CAH+B;EAIvCC,MAAM,EAAE,EAJ+B;EAKvCC,KAAK,EAAE,+CALgC;EAMvCC,SAAS,EAAE,0CAN4B;EAOvCC,eAAe,EAAE,0BAPsB;EAQvCC,KAAK,EAAE,MARgC;EASvCC,SAAS,EAAE,eAT4B;EAUvCC,QAAQ,EAAE,QAV6B;EAWvCC,OAAO,EAAE,MAX8B;EAYvCC,UAAU,EAAE,QAZ2B;EAavCC,MAAM,EAAE,CAb+B;EAcvC,SAAS;IACLC,OAAO,EAAE,QADJ;IAELN,KAAK,EAAE;EAFF;AAd8B,CAAjB,CAA1B;;AAoBA,IAAMO,aAAoE,GAAG,SAAvEA,aAAuE,CAAAC,KAAK,EAAI;EAClF,oBACI,6BAAC,oBAAD,qBACI,uDACI,6BAAC,2BAAD,EAAwBA,KAAxB,CADJ,eAEI,6BAAC,qBAAD,EAAkBA,KAAlB,CAFJ,CADJ,CADJ;AAQH,CATD;;eAWeD,a"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/// <reference types="web" />
|
|
2
|
-
import React from "react";
|
|
3
|
-
export interface DropFilesHereProps {
|
|
4
|
-
onDragLeave?: (event?: React.DragEvent<HTMLElement>) => void;
|
|
5
|
-
onDrop?: (event?: React.DragEvent<HTMLElement>) => void;
|
|
6
|
-
empty?: boolean;
|
|
7
|
-
onClick?: (event?: React.MouseEvent<HTMLElement>) => void;
|
|
8
|
-
}
|
|
9
|
-
declare const DropFilesHere: React.FC<DropFilesHereProps>;
|
|
10
|
-
export default DropFilesHere;
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
var _emotion = require("emotion");
|
|
13
|
-
|
|
14
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
-
|
|
16
|
-
var _Icon = require("@webiny/ui/Icon");
|
|
17
|
-
|
|
18
|
-
var _roundCloud_upload24px = require("./icons/round-cloud_upload-24px.svg");
|
|
19
|
-
|
|
20
|
-
var styles = /*#__PURE__*/(0, _emotion.css)({
|
|
21
|
-
margin: "0 auto",
|
|
22
|
-
paddingTop: 0,
|
|
23
|
-
height: "100%",
|
|
24
|
-
zIndex: 2,
|
|
25
|
-
width: "100%",
|
|
26
|
-
position: "absolute",
|
|
27
|
-
backgroundColor: "var(--mdc-theme-text-hint-on-light)",
|
|
28
|
-
"&.empty": {
|
|
29
|
-
backgroundColor: "transparent",
|
|
30
|
-
"> div": {
|
|
31
|
-
backgroundColor: "var(--mdc-theme-surface)"
|
|
32
|
-
}
|
|
33
|
-
},
|
|
34
|
-
"> div": {
|
|
35
|
-
textAlign: "center",
|
|
36
|
-
width: 300,
|
|
37
|
-
height: 300,
|
|
38
|
-
backgroundColor: "var(--mdc-theme-background)",
|
|
39
|
-
borderRadius: "50%",
|
|
40
|
-
position: "absolute",
|
|
41
|
-
left: "50%",
|
|
42
|
-
top: "50%",
|
|
43
|
-
transform: "translateX(-50%) translateY(-100%)",
|
|
44
|
-
"> div": {
|
|
45
|
-
position: "absolute",
|
|
46
|
-
top: 90,
|
|
47
|
-
width: 300,
|
|
48
|
-
color: "var(--mdc-theme-on-surface)",
|
|
49
|
-
"svg.mdc-button__icon": {
|
|
50
|
-
width: 100,
|
|
51
|
-
display: "inline-block",
|
|
52
|
-
color: "var(--mdc-theme-on-surface)"
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
}, "label:styles;");
|
|
57
|
-
|
|
58
|
-
var DropFilesHere = function DropFilesHere(_ref) {
|
|
59
|
-
var onDrop = _ref.onDrop,
|
|
60
|
-
onDragLeave = _ref.onDragLeave,
|
|
61
|
-
empty = _ref.empty,
|
|
62
|
-
onClick = _ref.onClick;
|
|
63
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
64
|
-
className: (0, _classnames.default)(styles, {
|
|
65
|
-
empty: empty
|
|
66
|
-
}),
|
|
67
|
-
onDrop: onDrop,
|
|
68
|
-
onClick: onClick,
|
|
69
|
-
onDragLeave: onDragLeave
|
|
70
|
-
}, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement("div", null, /*#__PURE__*/_react.default.createElement(_Icon.Icon, {
|
|
71
|
-
icon: /*#__PURE__*/_react.default.createElement(_roundCloud_upload24px.ReactComponent, null)
|
|
72
|
-
}), /*#__PURE__*/_react.default.createElement("div", null, "Drop files here"))));
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
var _default = DropFilesHere;
|
|
76
|
-
exports.default = _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["styles","css","margin","paddingTop","height","zIndex","width","position","backgroundColor","textAlign","borderRadius","left","top","transform","color","display","DropFilesHere","onDrop","onDragLeave","empty","onClick","classNames"],"sources":["DropFilesHere.tsx"],"sourcesContent":["import React from \"react\";\nimport { css } from \"emotion\";\nimport classNames from \"classnames\";\nimport { Icon } from \"@webiny/ui/Icon\";\n\nimport { ReactComponent as UploadIcon } from \"./icons/round-cloud_upload-24px.svg\";\n\nconst styles = css({\n margin: \"0 auto\",\n paddingTop: 0,\n height: \"100%\",\n zIndex: 2,\n width: \"100%\",\n position: \"absolute\",\n backgroundColor: \"var(--mdc-theme-text-hint-on-light)\",\n \"&.empty\": {\n backgroundColor: \"transparent\",\n \"> div\": {\n backgroundColor: \"var(--mdc-theme-surface)\"\n }\n },\n \"> div\": {\n textAlign: \"center\",\n width: 300,\n height: 300,\n backgroundColor: \"var(--mdc-theme-background)\",\n borderRadius: \"50%\",\n position: \"absolute\",\n left: \"50%\",\n top: \"50%\",\n transform: \"translateX(-50%) translateY(-100%)\",\n \"> div\": {\n position: \"absolute\",\n top: 90,\n width: 300,\n color: \"var(--mdc-theme-on-surface)\",\n \"svg.mdc-button__icon\": {\n width: 100,\n display: \"inline-block\",\n color: \"var(--mdc-theme-on-surface)\"\n }\n }\n }\n});\n\nexport interface DropFilesHereProps {\n onDragLeave?: (event?: React.DragEvent<HTMLElement>) => void;\n onDrop?: (event?: React.DragEvent<HTMLElement>) => void;\n empty?: boolean;\n onClick?: (event?: React.MouseEvent<HTMLElement>) => void;\n}\n\nconst DropFilesHere: React.FC<DropFilesHereProps> = ({ onDrop, onDragLeave, empty, onClick }) => {\n return (\n <div\n className={classNames(styles, { empty })}\n onDrop={onDrop}\n onClick={onClick}\n onDragLeave={onDragLeave}\n >\n <div>\n <div>\n <Icon icon={<UploadIcon />} />\n <div>Drop files here</div>\n </div>\n </div>\n </div>\n );\n};\nexport default DropFilesHere;\n"],"mappings":";;;;;;;;;AAAA;;AACA;;AACA;;AACA;;AAEA;;AAEA,IAAMA,MAAM,gBAAG,IAAAC,YAAA,EA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eH,CAhBD;;eAiBeF,a"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/// <reference types="react-butterfiles" />
|
|
2
|
-
import React from "react";
|
|
3
|
-
export interface FileProps {
|
|
4
|
-
file: FileItem;
|
|
5
|
-
selected: boolean;
|
|
6
|
-
uploadFile: (item: FileItem[] | FileItem) => Promise<number | null>;
|
|
7
|
-
onSelect: (event?: React.MouseEvent) => void;
|
|
8
|
-
onClick?: (event?: React.MouseEvent) => void;
|
|
9
|
-
options?: Array<{
|
|
10
|
-
label: string;
|
|
11
|
-
onClick: (file: Object) => void;
|
|
12
|
-
}>;
|
|
13
|
-
children: React.ReactNode;
|
|
14
|
-
showFileDetails: (event?: React.MouseEvent) => void;
|
|
15
|
-
}
|
|
16
|
-
declare const MemoizedFile: React.NamedExoticComponent<FileProps>;
|
|
17
|
-
export default MemoizedFile;
|
|
@@ -1,155 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _react = _interopRequireDefault(require("react"));
|
|
11
|
-
|
|
12
|
-
var _reactLazyLoad = _interopRequireDefault(require("react-lazy-load"));
|
|
13
|
-
|
|
14
|
-
var _classnames = _interopRequireDefault(require("classnames"));
|
|
15
|
-
|
|
16
|
-
var _emotion = require("emotion");
|
|
17
|
-
|
|
18
|
-
var _Ripple = require("@webiny/ui/Ripple");
|
|
19
|
-
|
|
20
|
-
var _Button = require("@webiny/ui/Button");
|
|
21
|
-
|
|
22
|
-
var _roundCheck_box24px = require("./icons/round-check_box-24px.svg");
|
|
23
|
-
|
|
24
|
-
var _roundSettings24px = require("../../assets/icons/round-settings-24px.svg");
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* Package react-lazy-load has no types.
|
|
28
|
-
*/
|
|
29
|
-
// @ts-ignore
|
|
30
|
-
var COMPONENT_WIDTH = 200;
|
|
31
|
-
var COMPONENT_HEIGHT = 200;
|
|
32
|
-
var grow = /*#__PURE__*/(0, _emotion.keyframes)("0%{transform:scale(1)}50%{transform:scale(1.2)}100%{transform:scale(1)}label:grow;");
|
|
33
|
-
var styles = /*#__PURE__*/(0, _emotion.css)({
|
|
34
|
-
display: "inline-block",
|
|
35
|
-
float: "left",
|
|
36
|
-
position: "relative",
|
|
37
|
-
zIndex: 1,
|
|
38
|
-
margin: 10,
|
|
39
|
-
cursor: "pointer",
|
|
40
|
-
width: "100%",
|
|
41
|
-
maxWidth: COMPONENT_WIDTH,
|
|
42
|
-
border: "1px solid var(--mdc-theme-on-background)",
|
|
43
|
-
borderRadius: 2,
|
|
44
|
-
"> .body": {
|
|
45
|
-
transition: "200ms ease-in opacity",
|
|
46
|
-
width: COMPONENT_WIDTH,
|
|
47
|
-
height: COMPONENT_HEIGHT,
|
|
48
|
-
overflow: "hidden",
|
|
49
|
-
"--icon-color": "var(--mdc-theme-on-background)",
|
|
50
|
-
".checkedIcon": {
|
|
51
|
-
color: "var(--mdc-theme-secondary)",
|
|
52
|
-
position: "absolute",
|
|
53
|
-
top: 4,
|
|
54
|
-
left: 4,
|
|
55
|
-
zIndex: 11
|
|
56
|
-
},
|
|
57
|
-
".infoIcon": {
|
|
58
|
-
opacity: 0,
|
|
59
|
-
position: "absolute",
|
|
60
|
-
top: 0,
|
|
61
|
-
right: 0,
|
|
62
|
-
zIndex: 10,
|
|
63
|
-
transition: "all 150ms ease-in",
|
|
64
|
-
"& .mdc-icon-button svg": {
|
|
65
|
-
color: "var(--mdc-theme-secondary)"
|
|
66
|
-
},
|
|
67
|
-
"&:hover": {
|
|
68
|
-
animationName: grow,
|
|
69
|
-
animationDuration: ".4s",
|
|
70
|
-
animationTimingFunction: "ease-in",
|
|
71
|
-
animationDelay: ".2s"
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
".filePreview": {
|
|
75
|
-
textAlign: "center",
|
|
76
|
-
position: "relative",
|
|
77
|
-
backgroundColor: "#fff",
|
|
78
|
-
width: "100%",
|
|
79
|
-
height: "100%",
|
|
80
|
-
".clickableArea": {
|
|
81
|
-
position: "absolute",
|
|
82
|
-
top: 30,
|
|
83
|
-
left: 0,
|
|
84
|
-
width: "100%",
|
|
85
|
-
height: 170,
|
|
86
|
-
zIndex: 2
|
|
87
|
-
}
|
|
88
|
-
},
|
|
89
|
-
"&:hover .infoIcon": {
|
|
90
|
-
opacity: 1
|
|
91
|
-
}
|
|
92
|
-
},
|
|
93
|
-
"> .label": {
|
|
94
|
-
padding: "15px 10px",
|
|
95
|
-
whiteSpace: "nowrap",
|
|
96
|
-
overflow: "hidden",
|
|
97
|
-
textOverflow: "ellipsis",
|
|
98
|
-
fontSize: "0.8rem",
|
|
99
|
-
color: "var(--mdc-theme-on-surface)",
|
|
100
|
-
backgroundColor: "var(--mdc-theme-on-background)"
|
|
101
|
-
},
|
|
102
|
-
"&.disable-select": {
|
|
103
|
-
cursor: "auto"
|
|
104
|
-
}
|
|
105
|
-
}, "label:styles;");
|
|
106
|
-
|
|
107
|
-
var File = function File(props) {
|
|
108
|
-
var file = props.file,
|
|
109
|
-
selected = props.selected,
|
|
110
|
-
onSelect = props.onSelect,
|
|
111
|
-
children = props.children,
|
|
112
|
-
showFileDetails = props.showFileDetails;
|
|
113
|
-
return /*#__PURE__*/_react.default.createElement("div", {
|
|
114
|
-
className: (0, _classnames.default)(styles, {
|
|
115
|
-
"disable-select": !onSelect
|
|
116
|
-
}),
|
|
117
|
-
"data-testid": "fm-list-wrapper-file"
|
|
118
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
119
|
-
className: "body"
|
|
120
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
121
|
-
className: "checkedIcon",
|
|
122
|
-
onClick: onSelect
|
|
123
|
-
}, selected ? /*#__PURE__*/_react.default.createElement(_roundCheck_box24px.ReactComponent, null) : null), /*#__PURE__*/_react.default.createElement("div", {
|
|
124
|
-
className: "infoIcon"
|
|
125
|
-
}, /*#__PURE__*/_react.default.createElement(_Button.IconButton, {
|
|
126
|
-
icon: /*#__PURE__*/_react.default.createElement(_roundSettings24px.ReactComponent, null),
|
|
127
|
-
onClick: showFileDetails,
|
|
128
|
-
"data-testid": "fm-file-wrapper-file-info-icon"
|
|
129
|
-
})), /*#__PURE__*/_react.default.createElement(_reactLazyLoad.default, {
|
|
130
|
-
height: 200,
|
|
131
|
-
offsetVertical: 300
|
|
132
|
-
}, /*#__PURE__*/_react.default.createElement(_Ripple.Ripple, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
133
|
-
className: "filePreview"
|
|
134
|
-
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
135
|
-
className: "clickableArea",
|
|
136
|
-
onClick: onSelect
|
|
137
|
-
}), children)))), /*#__PURE__*/_react.default.createElement("div", {
|
|
138
|
-
className: "label",
|
|
139
|
-
onClick: onSelect
|
|
140
|
-
}, file.name));
|
|
141
|
-
};
|
|
142
|
-
|
|
143
|
-
var MemoizedFile = /*#__PURE__*/_react.default.memo(File, function (prev, next) {
|
|
144
|
-
if (prev.selected !== next.selected) {
|
|
145
|
-
return false;
|
|
146
|
-
} else if (prev.file.name !== next.file.name) {
|
|
147
|
-
return false;
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
return true;
|
|
151
|
-
});
|
|
152
|
-
|
|
153
|
-
MemoizedFile.displayName = "MemoizedFile";
|
|
154
|
-
var _default = MemoizedFile;
|
|
155
|
-
exports.default = _default;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["COMPONENT_WIDTH","COMPONENT_HEIGHT","grow","keyframes","styles","css","display","float","position","zIndex","margin","cursor","width","maxWidth","border","borderRadius","transition","height","overflow","color","top","left","opacity","right","animationName","animationDuration","animationTimingFunction","animationDelay","textAlign","backgroundColor","padding","whiteSpace","textOverflow","fontSize","File","props","file","selected","onSelect","children","showFileDetails","classNames","name","MemoizedFile","React","memo","prev","next","displayName"],"sources":["File.tsx"],"sourcesContent":["import React from \"react\";\n/**\n * Package react-lazy-load has no types.\n */\n// @ts-ignore\nimport LazyLoad from \"react-lazy-load\";\nimport classNames from \"classnames\";\nimport { css, keyframes } from \"emotion\";\nimport { Ripple } from \"@webiny/ui/Ripple\";\nimport { IconButton } from \"@webiny/ui/Button\";\nimport { ReactComponent as Checked } from \"./icons/round-check_box-24px.svg\";\nimport { ReactComponent as SettingsIcon } from \"../../assets/icons/round-settings-24px.svg\";\n\nconst COMPONENT_WIDTH = 200;\nconst COMPONENT_HEIGHT = 200;\n\nconst grow = keyframes`\n 0% {\n transform: scale(1)\n }\n 50% {\n transform: scale(1.2)\n }\n 100% {\n transform: scale(1)\n }\n`;\nconst styles = css({\n display: \"inline-block\",\n float: \"left\",\n position: \"relative\",\n zIndex: 1,\n margin: 10,\n cursor: \"pointer\",\n width: \"100%\",\n maxWidth: COMPONENT_WIDTH,\n border: \"1px solid var(--mdc-theme-on-background)\",\n borderRadius: 2,\n \"> .body\": {\n transition: \"200ms ease-in opacity\",\n width: COMPONENT_WIDTH,\n height: COMPONENT_HEIGHT,\n overflow: \"hidden\",\n \"--icon-color\": \"var(--mdc-theme-on-background)\",\n \".checkedIcon\": {\n color: \"var(--mdc-theme-secondary)\",\n position: \"absolute\",\n top: 4,\n left: 4,\n zIndex: 11\n },\n \".infoIcon\": {\n opacity: 0,\n position: \"absolute\",\n top: 0,\n right: 0,\n zIndex: 10,\n transition: \"all 150ms ease-in\",\n \"& .mdc-icon-button svg\": {\n color: \"var(--mdc-theme-secondary)\"\n },\n \"&:hover\": {\n animationName: grow,\n animationDuration: \".4s\",\n animationTimingFunction: \"ease-in\",\n animationDelay: \".2s\"\n }\n },\n \".filePreview\": {\n textAlign: \"center\",\n position: \"relative\",\n backgroundColor: \"#fff\",\n width: \"100%\",\n height: \"100%\",\n \".clickableArea\": {\n position: \"absolute\",\n top: 30,\n left: 0,\n width: \"100%\",\n height: 170,\n zIndex: 2\n }\n },\n \"&:hover .infoIcon\": {\n opacity: 1\n }\n },\n \"> .label\": {\n padding: \"15px 10px\",\n whiteSpace: \"nowrap\",\n overflow: \"hidden\",\n textOverflow: \"ellipsis\",\n fontSize: \"0.8rem\",\n color: \"var(--mdc-theme-on-surface)\",\n backgroundColor: \"var(--mdc-theme-on-background)\"\n },\n \"&.disable-select\": {\n cursor: \"auto\"\n }\n});\n\nexport interface FileProps {\n file: FileItem;\n selected: boolean;\n uploadFile: (item: FileItem[] | FileItem) => Promise<number | null>;\n onSelect: (event?: React.MouseEvent) => void;\n onClick?: (event?: React.MouseEvent) => void;\n options?: Array<{ label: string; onClick: (file: Object) => void }>;\n children: React.ReactNode;\n showFileDetails: (event?: React.MouseEvent) => void;\n}\n\nconst File: React.FC<FileProps> = props => {\n const { file, selected, onSelect, children, showFileDetails } = props;\n\n return (\n <div\n className={classNames(styles, { \"disable-select\": !onSelect })}\n data-testid={\"fm-list-wrapper-file\"}\n >\n <div className={\"body\"}>\n <div className={\"checkedIcon\"} onClick={onSelect}>\n {selected ? <Checked /> : null}\n </div>\n <div className={\"infoIcon\"}>\n <IconButton\n icon={<SettingsIcon />}\n onClick={showFileDetails}\n data-testid={\"fm-file-wrapper-file-info-icon\"}\n />\n </div>\n <LazyLoad height={200} offsetVertical={300}>\n <Ripple>\n <div className={\"filePreview\"}>\n <div className=\"clickableArea\" onClick={onSelect} />\n {children}\n </div>\n </Ripple>\n </LazyLoad>\n </div>\n <div className={\"label\"} onClick={onSelect}>\n {file.name}\n </div>\n </div>\n );\n};\n\nconst MemoizedFile = React.memo(File, (prev, next) => {\n if (prev.selected !== next.selected) {\n return false;\n } else if (prev.file.name !== next.file.name) {\n return false;\n }\n\n return true;\n});\n\nMemoizedFile.displayName = \"MemoizedFile\";\nexport default MemoizedFile;\n"],"mappings":";;;;;;;;;AAAA;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;A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