@chayns-components/swipeable-wrapper 5.0.0-beta.288 → 5.0.0-beta.290
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/README.md +23 -6
- package/lib/components/swipeable-wrapper/SwipeableWrapper.d.ts +25 -0
- package/lib/components/swipeable-wrapper/SwipeableWrapper.js +181 -0
- package/lib/components/swipeable-wrapper/SwipeableWrapper.js.map +1 -0
- package/lib/components/swipeable-wrapper/SwipeableWrapper.styles.d.ts +2 -0
- package/lib/components/swipeable-wrapper/SwipeableWrapper.styles.js +19 -0
- package/lib/components/swipeable-wrapper/SwipeableWrapper.styles.js.map +1 -0
- package/lib/components/swipeable-wrapper/swipeable-action/SwipeableAction.d.ts +15 -0
- package/lib/components/swipeable-wrapper/swipeable-action/SwipeableAction.js +104 -0
- package/lib/components/swipeable-wrapper/swipeable-action/SwipeableAction.js.map +1 -0
- package/lib/components/swipeable-wrapper/swipeable-action/SwipeableAction.styles.d.ts +7 -0
- package/lib/components/swipeable-wrapper/swipeable-action/SwipeableAction.styles.js +66 -0
- package/lib/components/swipeable-wrapper/swipeable-action/SwipeableAction.styles.js.map +1 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +3 -3
- package/lib/index.js.map +1 -1
- package/lib/utils/threshold.d.ts +7 -0
- package/lib/utils/threshold.js +17 -0
- package/lib/utils/threshold.js.map +1 -0
- package/package.json +4 -3
- package/lib/components/FileInput.d.ts +0 -21
- package/lib/components/FileInput.js +0 -102
- package/lib/components/FileInput.js.map +0 -1
- package/lib/components/FileInput.styles.d.ts +0 -8
- package/lib/components/FileInput.styles.js +0 -35
- package/lib/components/FileInput.styles.js.map +0 -1
- package/lib/components/file-list/FileListItem.d.ts +0 -9
- package/lib/components/file-list/FileListItem.js +0 -34
- package/lib/components/file-list/FileListItem.js.map +0 -1
- package/lib/components/file-list/FileListItem.styles.d.ts +0 -1
- package/lib/components/file-list/FileListItem.styles.js +0 -10
- package/lib/components/file-list/FileListItem.styles.js.map +0 -1
- package/lib/utils/file.d.ts +0 -363
- package/lib/utils/file.js +0 -404
- package/lib/utils/file.js.map +0 -1
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { FC } from 'react';
|
|
2
|
-
export type FileInputProps = {
|
|
3
|
-
/**
|
|
4
|
-
* An array of icons that should be displayed inside the FileInput
|
|
5
|
-
*/
|
|
6
|
-
icons?: string[];
|
|
7
|
-
/**
|
|
8
|
-
* A function to be executed when files are added.
|
|
9
|
-
*/
|
|
10
|
-
onAdd?: (files: File[]) => void;
|
|
11
|
-
/**
|
|
12
|
-
* A function to be executed when a file is removed.
|
|
13
|
-
*/
|
|
14
|
-
onRemove?: (file: File) => void;
|
|
15
|
-
/**
|
|
16
|
-
* The text that should be displayed inside the FileInput
|
|
17
|
-
*/
|
|
18
|
-
placeholder?: string;
|
|
19
|
-
};
|
|
20
|
-
declare const FileInput: FC<FileInputProps>;
|
|
21
|
-
export default FileInput;
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _core = require("@chayns-components/core");
|
|
8
|
-
var _framerMotion = require("framer-motion");
|
|
9
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
-
var _file = require("../utils/file");
|
|
11
|
-
var _FileListItem = _interopRequireDefault(require("./file-list/FileListItem"));
|
|
12
|
-
var _FileInput = require("./FileInput.styles");
|
|
13
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
15
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
|
-
const FileInput = _ref => {
|
|
17
|
-
let {
|
|
18
|
-
icons = ['fa fa-upload'],
|
|
19
|
-
onRemove,
|
|
20
|
-
onAdd,
|
|
21
|
-
placeholder = 'Dateien hinzufügen'
|
|
22
|
-
} = _ref;
|
|
23
|
-
const [internalFiles, setInternalFiles] = (0, _react.useState)([]);
|
|
24
|
-
const handleAddFiles = (0, _react.useCallback)(files => {
|
|
25
|
-
const newFileItems = [];
|
|
26
|
-
files.forEach(file => {
|
|
27
|
-
if (file && !(0, _file.filterDuplicateFile)({
|
|
28
|
-
files: internalFiles,
|
|
29
|
-
newFile: file
|
|
30
|
-
})) {
|
|
31
|
-
newFileItems.push(file);
|
|
32
|
-
}
|
|
33
|
-
});
|
|
34
|
-
if (newFileItems.length > 0 && typeof onAdd === 'function') {
|
|
35
|
-
onAdd(newFileItems);
|
|
36
|
-
}
|
|
37
|
-
setInternalFiles(prevState => [...prevState, ...newFileItems]);
|
|
38
|
-
}, [internalFiles, onAdd]);
|
|
39
|
-
const handleDeleteFile = (0, _react.useCallback)(fileName => {
|
|
40
|
-
let fileToDelete;
|
|
41
|
-
const filteredFiles = internalFiles.filter(file => {
|
|
42
|
-
const {
|
|
43
|
-
name
|
|
44
|
-
} = file;
|
|
45
|
-
if (name === fileName) {
|
|
46
|
-
fileToDelete = file;
|
|
47
|
-
}
|
|
48
|
-
return name !== fileName;
|
|
49
|
-
});
|
|
50
|
-
setInternalFiles(filteredFiles);
|
|
51
|
-
if (!fileToDelete || typeof onRemove !== 'function') {
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
onRemove(fileToDelete);
|
|
55
|
-
}, [internalFiles, onRemove]);
|
|
56
|
-
const handleClick = (0, _react.useCallback)(async () => {
|
|
57
|
-
const files = await (0, _core.selectFiles)({
|
|
58
|
-
multiple: true
|
|
59
|
-
});
|
|
60
|
-
handleAddFiles(files);
|
|
61
|
-
}, [handleAddFiles]);
|
|
62
|
-
const handleDrop = (0, _react.useCallback)(e => {
|
|
63
|
-
e.preventDefault();
|
|
64
|
-
const draggedFiles = Array.from(e.dataTransfer.files);
|
|
65
|
-
handleAddFiles(draggedFiles);
|
|
66
|
-
}, [handleAddFiles]);
|
|
67
|
-
const content = (0, _react.useMemo)(() => {
|
|
68
|
-
const items = internalFiles.map(file => /*#__PURE__*/_react.default.createElement(_FileInput.StyledMotionFileInputList, {
|
|
69
|
-
animate: {
|
|
70
|
-
height: 'auto',
|
|
71
|
-
opacity: 1
|
|
72
|
-
},
|
|
73
|
-
exit: {
|
|
74
|
-
height: 0,
|
|
75
|
-
opacity: 0
|
|
76
|
-
},
|
|
77
|
-
key: file.name,
|
|
78
|
-
transition: {
|
|
79
|
-
duration: 0.25,
|
|
80
|
-
type: 'tween'
|
|
81
|
-
}
|
|
82
|
-
}, /*#__PURE__*/_react.default.createElement(_FileListItem.default, {
|
|
83
|
-
fileType: file.type,
|
|
84
|
-
fileName: file.name,
|
|
85
|
-
fileSize: file.size,
|
|
86
|
-
onRemove: handleDeleteFile
|
|
87
|
-
})));
|
|
88
|
-
return items;
|
|
89
|
-
}, [handleDeleteFile, internalFiles]);
|
|
90
|
-
return (0, _react.useMemo)(() => /*#__PURE__*/_react.default.createElement(_FileInput.StyledFileInput, null, /*#__PURE__*/_react.default.createElement(_FileInput.StyledFileInputContainer, {
|
|
91
|
-
onClick: () => void handleClick(),
|
|
92
|
-
onDragOver: e => e.preventDefault(),
|
|
93
|
-
onDrop: e => void handleDrop(e)
|
|
94
|
-
}, /*#__PURE__*/_react.default.createElement(_core.Icon, {
|
|
95
|
-
icons: icons
|
|
96
|
-
}), /*#__PURE__*/_react.default.createElement(_FileInput.StyledFileInputText, null, placeholder)), /*#__PURE__*/_react.default.createElement(_core.List, null, /*#__PURE__*/_react.default.createElement(_framerMotion.AnimatePresence, {
|
|
97
|
-
initial: false
|
|
98
|
-
}, content))), [content, handleClick, handleDrop, icons, placeholder]);
|
|
99
|
-
};
|
|
100
|
-
FileInput.displayName = 'FileInput';
|
|
101
|
-
var _default = exports.default = FileInput;
|
|
102
|
-
//# sourceMappingURL=FileInput.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileInput.js","names":["_core","require","_framerMotion","_react","_interopRequireWildcard","_file","_FileListItem","_interopRequireDefault","_FileInput","obj","__esModule","default","_getRequireWildcardCache","e","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","FileInput","_ref","icons","onRemove","onAdd","placeholder","internalFiles","setInternalFiles","useState","handleAddFiles","useCallback","files","newFileItems","forEach","file","filterDuplicateFile","newFile","push","length","prevState","handleDeleteFile","fileName","fileToDelete","filteredFiles","filter","name","handleClick","selectFiles","multiple","handleDrop","preventDefault","draggedFiles","Array","from","dataTransfer","content","useMemo","items","map","createElement","StyledMotionFileInputList","animate","height","opacity","exit","key","transition","duration","type","fileType","fileSize","size","StyledFileInput","StyledFileInputContainer","onClick","onDragOver","onDrop","Icon","StyledFileInputText","List","AnimatePresence","initial","displayName","_default","exports"],"sources":["../../src/components/FileInput.tsx"],"sourcesContent":["import { Icon, List, selectFiles } from '@chayns-components/core';\nimport { AnimatePresence } from 'framer-motion';\nimport React, { DragEvent, FC, ReactElement, useCallback, useMemo, useState } from 'react';\nimport { filterDuplicateFile } from '../utils/file';\nimport FileListItem from './file-list/FileListItem';\nimport {\n StyledFileInput,\n StyledFileInputContainer,\n StyledFileInputText,\n StyledMotionFileInputList,\n} from './FileInput.styles';\n\nexport type FileInputProps = {\n /**\n * An array of icons that should be displayed inside the FileInput\n */\n icons?: string[];\n /**\n * A function to be executed when files are added.\n */\n onAdd?: (files: File[]) => void;\n /**\n * A function to be executed when a file is removed.\n */\n onRemove?: (file: File) => void;\n /**\n * The text that should be displayed inside the FileInput\n */\n placeholder?: string;\n};\n\nconst FileInput: FC<FileInputProps> = ({\n icons = ['fa fa-upload'],\n onRemove,\n onAdd,\n placeholder = 'Dateien hinzufügen',\n}) => {\n const [internalFiles, setInternalFiles] = useState<File[]>([]);\n\n const handleAddFiles = useCallback(\n (files: File[]) => {\n const newFileItems: File[] = [];\n\n files.forEach((file) => {\n if (file && !filterDuplicateFile({ files: internalFiles, newFile: file })) {\n newFileItems.push(file);\n }\n });\n\n if (newFileItems.length > 0 && typeof onAdd === 'function') {\n onAdd(newFileItems);\n }\n\n setInternalFiles((prevState) => [...prevState, ...newFileItems]);\n },\n [internalFiles, onAdd]\n );\n\n const handleDeleteFile = useCallback(\n (fileName?: string) => {\n let fileToDelete: File | undefined;\n\n const filteredFiles = internalFiles.filter((file) => {\n const { name } = file;\n\n if (name === fileName) {\n fileToDelete = file;\n }\n\n return name !== fileName;\n });\n\n setInternalFiles(filteredFiles);\n\n if (!fileToDelete || typeof onRemove !== 'function') {\n return;\n }\n\n onRemove(fileToDelete);\n },\n [internalFiles, onRemove]\n );\n\n const handleClick = useCallback(async () => {\n const files = await selectFiles({\n multiple: true,\n });\n\n handleAddFiles(files);\n }, [handleAddFiles]);\n\n const handleDrop = useCallback(\n (e: DragEvent<HTMLDivElement>) => {\n e.preventDefault();\n const draggedFiles = Array.from(e.dataTransfer.files);\n\n handleAddFiles(draggedFiles);\n },\n [handleAddFiles]\n );\n\n const content = useMemo(() => {\n const items: ReactElement[] = internalFiles.map((file) => (\n <StyledMotionFileInputList\n animate={{ height: 'auto', opacity: 1 }}\n exit={{ height: 0, opacity: 0 }}\n key={file.name}\n transition={{ duration: 0.25, type: 'tween' }}\n >\n <FileListItem\n fileType={file.type}\n fileName={file.name}\n fileSize={file.size}\n onRemove={handleDeleteFile}\n />\n </StyledMotionFileInputList>\n ));\n\n return items;\n }, [handleDeleteFile, internalFiles]);\n\n return useMemo(\n () => (\n <StyledFileInput>\n <StyledFileInputContainer\n onClick={() => void handleClick()}\n onDragOver={(e) => e.preventDefault()}\n onDrop={(e) => void handleDrop(e)}\n >\n <Icon icons={icons} />\n <StyledFileInputText>{placeholder}</StyledFileInputText>\n </StyledFileInputContainer>\n <List>\n <AnimatePresence initial={false}>{content}</AnimatePresence>\n </List>\n </StyledFileInput>\n ),\n [content, handleClick, handleDrop, icons, placeholder]\n );\n};\n\nFileInput.displayName = 'FileInput';\n\nexport default FileInput;\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,KAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AAK4B,SAAAM,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAAA,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAT,wBAAAS,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAH,UAAA,SAAAG,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAF,OAAA,EAAAE,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAC,GAAA,CAAAJ,CAAA,UAAAG,CAAA,CAAAE,GAAA,CAAAL,CAAA,O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ACvD,KAAK,EAAEA;EAAM,CAAE,CAAC,eACtB9B,MAAA,CAAAQ,OAAA,CAAA2D,aAAA,CAAC9D,UAAA,CAAAiF,mBAAmB,QAAErD,WAAiC,CACjC,CAAC,eAC3BjC,MAAA,CAAAQ,OAAA,CAAA2D,aAAA,CAACtE,KAAA,CAAA0F,IAAI,qBACDvF,MAAA,CAAAQ,OAAA,CAAA2D,aAAA,CAACpE,aAAA,CAAAyF,eAAe;IAACC,OAAO,EAAE;EAAM,GAAE1B,OAAyB,CACzD,CACO,CACpB,EACD,CAACA,OAAO,EAAET,WAAW,EAAEG,UAAU,EAAE3B,KAAK,EAAEG,WAAW,CACzD,CAAC;AACL,CAAC;AAEDL,SAAS,CAAC8D,WAAW,GAAG,WAAW;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAApF,OAAA,GAErBoB,SAAS"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export declare const StyledFileInput: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
2
|
-
export declare const StyledFileInputContainer: import("styled-components").StyledComponent<"div", any, {
|
|
3
|
-
theme: import("@chayns-components/core/lib/components/color-scheme-provider/ColorSchemeProvider").Theme;
|
|
4
|
-
}, never>;
|
|
5
|
-
export declare const StyledFileInputText: import("styled-components").StyledComponent<"p", any, {
|
|
6
|
-
theme: import("@chayns-components/core/lib/components/color-scheme-provider/ColorSchemeProvider").Theme;
|
|
7
|
-
}, never>;
|
|
8
|
-
export declare const StyledMotionFileInputList: import("styled-components").StyledComponent<import("framer-motion").ForwardRefComponent<HTMLDivElement, import("framer-motion").HTMLMotionProps<"div">>, any, {}, never>;
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.StyledMotionFileInputList = exports.StyledFileInputText = exports.StyledFileInputContainer = exports.StyledFileInput = void 0;
|
|
7
|
-
var _framerMotion = require("framer-motion");
|
|
8
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
9
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
-
const StyledFileInput = exports.StyledFileInput = _styledComponents.default.div``;
|
|
11
|
-
const StyledFileInputContainer = exports.StyledFileInputContainer = _styledComponents.default.div`
|
|
12
|
-
border: ${_ref => {
|
|
13
|
-
let {
|
|
14
|
-
theme
|
|
15
|
-
} = _ref;
|
|
16
|
-
return theme.text;
|
|
17
|
-
}} 1px dotted;
|
|
18
|
-
cursor: pointer;
|
|
19
|
-
display: flex;
|
|
20
|
-
gap: 10px;
|
|
21
|
-
align-items: center;
|
|
22
|
-
padding: 15px;
|
|
23
|
-
justify-content: center;
|
|
24
|
-
width: 100%;
|
|
25
|
-
`;
|
|
26
|
-
const StyledFileInputText = exports.StyledFileInputText = _styledComponents.default.p`
|
|
27
|
-
color: ${_ref2 => {
|
|
28
|
-
let {
|
|
29
|
-
theme
|
|
30
|
-
} = _ref2;
|
|
31
|
-
return theme.text;
|
|
32
|
-
}};
|
|
33
|
-
`;
|
|
34
|
-
const StyledMotionFileInputList = exports.StyledMotionFileInputList = (0, _styledComponents.default)(_framerMotion.motion.div)``;
|
|
35
|
-
//# sourceMappingURL=FileInput.styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileInput.styles.js","names":["_framerMotion","require","_styledComponents","_interopRequireDefault","obj","__esModule","default","StyledFileInput","exports","styled","div","StyledFileInputContainer","_ref","theme","text","StyledFileInputText","p","_ref2","StyledMotionFileInputList","motion"],"sources":["../../src/components/FileInput.styles.ts"],"sourcesContent":["import type { WithTheme } from '@chayns-components/core';\nimport { motion } from 'framer-motion';\nimport styled from 'styled-components';\n\nexport const StyledFileInput = styled.div``;\n\ntype StyledFileInputContainerProps = WithTheme<unknown>;\n\nexport const StyledFileInputContainer = styled.div<StyledFileInputContainerProps>`\n border: ${({ theme }: StyledFileInputContainerProps) => theme.text} 1px dotted;\n cursor: pointer;\n display: flex;\n gap: 10px;\n align-items: center;\n padding: 15px;\n justify-content: center;\n width: 100%;\n`;\n\ntype StyledFileInputTextProps = WithTheme<unknown>;\n\nexport const StyledFileInputText = styled.p<StyledFileInputTextProps>`\n color: ${({ theme }: StyledFileInputTextProps) => theme.text};\n`;\n\nexport const StyledMotionFileInputList = styled(motion.div)``;\n"],"mappings":";;;;;;AACA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,iBAAA,GAAAC,sBAAA,CAAAF,OAAA;AAAuC,SAAAE,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEhC,MAAMG,eAAe,GAAAC,OAAA,CAAAD,eAAA,GAAGE,yBAAM,CAACC,GAAI,EAAC;AAIpC,MAAMC,wBAAwB,GAAAH,OAAA,CAAAG,wBAAA,GAAGF,yBAAM,CAACC,GAAmC;AAClF,cAAcE,IAAA;EAAA,IAAC;IAAEC;EAAqC,CAAC,GAAAD,IAAA;EAAA,OAAKC,KAAK,CAACC,IAAI;AAAA,CAAC;AACvE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AAIM,MAAMC,mBAAmB,GAAAP,OAAA,CAAAO,mBAAA,GAAGN,yBAAM,CAACO,CAA4B;AACtE,aAAaC,KAAA;EAAA,IAAC;IAAEJ;EAAgC,CAAC,GAAAI,KAAA;EAAA,OAAKJ,KAAK,CAACC,IAAI;AAAA,CAAC;AACjE,CAAC;AAEM,MAAMI,yBAAyB,GAAAV,OAAA,CAAAU,yBAAA,GAAG,IAAAT,yBAAM,EAACU,oBAAM,CAACT,GAAG,CAAE,EAAC"}
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _core = require("@chayns-components/core");
|
|
8
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
var _file = require("../../utils/file");
|
|
10
|
-
var _FileListItem = require("./FileListItem.styles");
|
|
11
|
-
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
12
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
|
-
const FileListItem = _ref => {
|
|
14
|
-
let {
|
|
15
|
-
fileName,
|
|
16
|
-
fileSize,
|
|
17
|
-
fileType,
|
|
18
|
-
onRemove
|
|
19
|
-
} = _ref;
|
|
20
|
-
const humanFileSize = (0, _react.useMemo)(() => (0, _file.getHumanSize)(fileSize), [fileSize]);
|
|
21
|
-
const icon = (0, _react.useMemo)(() => (0, _file.getIconByMimeType)(fileType), [fileType]);
|
|
22
|
-
return (0, _react.useMemo)(() => /*#__PURE__*/_react.default.createElement(_FileListItem.StyledFileListItem, null, /*#__PURE__*/_react.default.createElement(_core.ListItem, {
|
|
23
|
-
title: fileName,
|
|
24
|
-
subtitle: humanFileSize,
|
|
25
|
-
icons: [icon],
|
|
26
|
-
rightElements: [/*#__PURE__*/_react.default.createElement(_core.Icon, {
|
|
27
|
-
icons: ['ts-wrong'],
|
|
28
|
-
onClick: () => onRemove(fileName)
|
|
29
|
-
})]
|
|
30
|
-
})), [fileName, humanFileSize, icon, onRemove]);
|
|
31
|
-
};
|
|
32
|
-
FileListItem.displayName = 'FileList';
|
|
33
|
-
var _default = exports.default = FileListItem;
|
|
34
|
-
//# sourceMappingURL=FileListItem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileListItem.js","names":["_core","require","_react","_interopRequireWildcard","_file","_FileListItem","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","FileListItem","_ref","fileName","fileSize","fileType","onRemove","humanFileSize","useMemo","getHumanSize","icon","getIconByMimeType","createElement","StyledFileListItem","ListItem","title","subtitle","icons","rightElements","Icon","onClick","displayName","_default","exports"],"sources":["../../../src/components/file-list/FileListItem.tsx"],"sourcesContent":["import { Icon, ListItem } from '@chayns-components/core';\nimport React, { FC, useMemo } from 'react';\nimport { getHumanSize, getIconByMimeType } from '../../utils/file';\nimport { StyledFileListItem } from './FileListItem.styles';\n\nexport type FileListItemProps = {\n fileName: string;\n fileSize: number;\n fileType: string;\n onRemove: (name: string) => void;\n};\n\nconst FileListItem: FC<FileListItemProps> = ({ fileName, fileSize, fileType, onRemove }) => {\n const humanFileSize = useMemo(() => getHumanSize(fileSize), [fileSize]);\n\n const icon = useMemo(() => getIconByMimeType(fileType), [fileType]);\n\n return useMemo(\n () => (\n <StyledFileListItem>\n <ListItem\n title={fileName}\n subtitle={humanFileSize}\n icons={[icon]}\n rightElements={[\n <Icon icons={['ts-wrong']} onClick={() => onRemove(fileName)} />,\n ]}\n />\n </StyledFileListItem>\n ),\n [fileName, humanFileSize, icon, onRemove]\n );\n};\n\nFileListItem.displayName = 'FileList';\n\nexport default FileListItem;\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AAA2D,SAAAK,yBAAAC,CAAA,6BA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AAC,cAAO,EAAC,MAAM,IAAAC,kBAAY,EAACL,QAAQ,CAAC,EAAE,CAACA,QAAQ,CAAC,CAAC;EAEvE,MAAMM,IAAI,GAAG,IAAAF,cAAO,EAAC,MAAM,IAAAG,uBAAiB,EAACN,QAAQ,CAAC,EAAE,CAACA,QAAQ,CAAC,CAAC;EAEnE,OAAO,IAAAG,cAAO,EACV,mBACIhC,MAAA,CAAAU,OAAA,CAAA0B,aAAA,CAACjC,aAAA,CAAAkC,kBAAkB,qBACfrC,MAAA,CAAAU,OAAA,CAAA0B,aAAA,CAACtC,KAAA,CAAAwC,QAAQ;IACLC,KAAK,EAAEZ,QAAS;IAChBa,QAAQ,EAAET,aAAc;IACxBU,KAAK,EAAE,CAACP,IAAI,CAAE;IACdQ,aAAa,EAAE,cACX1C,MAAA,CAAAU,OAAA,CAAA0B,aAAA,CAACtC,KAAA,CAAA6C,IAAI;MAACF,KAAK,EAAE,CAAC,UAAU,CAAE;MAACG,OAAO,EAAEA,CAAA,KAAMd,QAAQ,CAACH,QAAQ;IAAE,CAAE,CAAC;EAClE,CACL,CACe,CACvB,EACD,CAACA,QAAQ,EAAEI,aAAa,EAAEG,IAAI,EAAEJ,QAAQ,CAC5C,CAAC;AACL,CAAC;AAEDL,YAAY,CAACoB,WAAW,GAAG,UAAU;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAArC,OAAA,GAEvBe,YAAY"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const StyledFileListItem: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.StyledFileListItem = void 0;
|
|
7
|
-
var _styledComponents = _interopRequireDefault(require("styled-components"));
|
|
8
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
-
const StyledFileListItem = exports.StyledFileListItem = _styledComponents.default.div``;
|
|
10
|
-
//# sourceMappingURL=FileListItem.styles.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"FileListItem.styles.js","names":["_styledComponents","_interopRequireDefault","require","obj","__esModule","default","StyledFileListItem","exports","styled","div"],"sources":["../../../src/components/file-list/FileListItem.styles.ts"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledFileListItem = styled.div``;\n"],"mappings":";;;;;;AAAA,IAAAA,iBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAuC,SAAAD,uBAAAE,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAEhC,MAAMG,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,GAAGE,yBAAM,CAACC,GAAI,EAAC"}
|
package/lib/utils/file.d.ts
DELETED
|
@@ -1,363 +0,0 @@
|
|
|
1
|
-
interface FilerDuplicateFileOptions {
|
|
2
|
-
files: File[];
|
|
3
|
-
newFile: File;
|
|
4
|
-
}
|
|
5
|
-
export declare const filterDuplicateFile: ({ newFile, files }: FilerDuplicateFileOptions) => boolean;
|
|
6
|
-
export declare const getHumanSize: (bytes: number) => string;
|
|
7
|
-
export declare const MIME_TYPE_MAPPING: {
|
|
8
|
-
'application/vnd.ms-excel': string;
|
|
9
|
-
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': string;
|
|
10
|
-
'application/vnd.ms-excel.sheet.macroEnabled.12': string;
|
|
11
|
-
'application/vnd.openxmlformats-officedocument.spreadsheetml.template': string;
|
|
12
|
-
'application/vnd.ms-excel.template.macroEnabled.12': string;
|
|
13
|
-
'application/vnd.ms-excel.addin.macroEnabled.12': string;
|
|
14
|
-
'application/vnd.ms-excel.sheet.binary.macroEnabled.12': string;
|
|
15
|
-
'application/msexcel': string;
|
|
16
|
-
'application/x-msexcel': string;
|
|
17
|
-
'application/x-ms-excel': string;
|
|
18
|
-
'application/x-excel': string;
|
|
19
|
-
'application/x-dos_ms_excel': string;
|
|
20
|
-
'application/xls': string;
|
|
21
|
-
'application/x-xls': string;
|
|
22
|
-
'application/vnd.ms-excel.sheet': string;
|
|
23
|
-
'appliaction/msexcel': string;
|
|
24
|
-
'application/vnd.openxmlformats-officedocument.spreadsheetml': string;
|
|
25
|
-
'application/vnd.oasis.opendocument.spreadsheet': string;
|
|
26
|
-
'application/msword': string;
|
|
27
|
-
'application/vnd.openxmlformats-officedocument.wordprocessingml.document': string;
|
|
28
|
-
'application/vnd.ms-word.document.macroEnabled.12': string;
|
|
29
|
-
'application/vnd.openxmlformats-officedocument.wordprocessingml.template': string;
|
|
30
|
-
'application/vnd.ms-word.template.macroEnabled.12': string;
|
|
31
|
-
'application/doc': string;
|
|
32
|
-
'application/vnd.ms-word': string;
|
|
33
|
-
'application/vnd.ms-word.document.macroEnabled': string;
|
|
34
|
-
'application/vnd.ms-word.template.macroEnabled': string;
|
|
35
|
-
'application/word': string;
|
|
36
|
-
'application/x-msword': string;
|
|
37
|
-
'application/x-msword-template': string;
|
|
38
|
-
'application/vnd.ms-word.document': string;
|
|
39
|
-
'application/rtf': string;
|
|
40
|
-
'application/vnd.oasis.opendocument.text': string;
|
|
41
|
-
'application/vnd.openxmlformats-officedocument.wordprocessingml': string;
|
|
42
|
-
'application/pdf': string;
|
|
43
|
-
'application/x-pdf': string;
|
|
44
|
-
'application/vnd.pdf': string;
|
|
45
|
-
'text/pdf': string;
|
|
46
|
-
'application/x-bzpdf': string;
|
|
47
|
-
'application/x-gzpdf': string;
|
|
48
|
-
'application/x-xzpdf': string;
|
|
49
|
-
'application/vnd.adobe.pdf': string;
|
|
50
|
-
'application/vnd.adobe.x-mars': string;
|
|
51
|
-
'application/vnd.fdf': string;
|
|
52
|
-
'application/vnd.adobe.xfdf': string;
|
|
53
|
-
'application/vnd.adobe.xdp+xml': string;
|
|
54
|
-
'application/vnd.adobe.xfd+xml': string;
|
|
55
|
-
'application/vnd.adobe.xslfo+xml': string;
|
|
56
|
-
'application/vnd.adobe.pdx': string;
|
|
57
|
-
'application/vnd.adobe.xsp+xml': string;
|
|
58
|
-
'application/vnd.adobe.xp+xml': string;
|
|
59
|
-
'application/vnd.adobe.xpp+xml': string;
|
|
60
|
-
'application/vnd.adobe.xdp+zip': string;
|
|
61
|
-
'application/vnd.adobe.xfd+zip': string;
|
|
62
|
-
'application/vnd.adobe.xfdf+zip': string;
|
|
63
|
-
'application/vnd.adobe.xslt+xml': string;
|
|
64
|
-
'application/vnd.adobe.xfm+xml': string;
|
|
65
|
-
'application/vnd.adobe.xsf+xml': string;
|
|
66
|
-
'application/vnd.adobe.xdpxml': string;
|
|
67
|
-
'application/vnd.adobe.xfa': string;
|
|
68
|
-
'application/vnd.adobe.xpinstall': string;
|
|
69
|
-
'application/vnd.adobe.xquery': string;
|
|
70
|
-
'application/vnd.adobe.xrd+xml': string;
|
|
71
|
-
'application/vnd.adobe.xspf+xml': string;
|
|
72
|
-
'application/vnd.adobe.xliff+xml': string;
|
|
73
|
-
'application/vnd.adobe.xfdf+xml': string;
|
|
74
|
-
'application/vnd.adobe.xmp+xml': string;
|
|
75
|
-
'application/vnd.adobe.xmp+zip': string;
|
|
76
|
-
'application/vnd.adobe.xna+xml': string;
|
|
77
|
-
'application/vnd.adobe.cif+xml': string;
|
|
78
|
-
'application/vnd.adobe.edn+xml': string;
|
|
79
|
-
'application/vnd.adobe.eps': string;
|
|
80
|
-
'application/vnd.adobe.encase.package+xml': string;
|
|
81
|
-
'application/vnd.adobe.flash.movie': string;
|
|
82
|
-
'application/vnd.adobe.formscentral.fcdt': string;
|
|
83
|
-
'application/vnd.adobe.illustrator': string;
|
|
84
|
-
'application/vnd.adobe.flash-movie': string;
|
|
85
|
-
'application/vnd.adobe.air-application-installer-package+zip': string;
|
|
86
|
-
'application/zip': string;
|
|
87
|
-
'application/x-rar-compressed': string;
|
|
88
|
-
'application/x-tar': string;
|
|
89
|
-
'application/x-7z-compressed': string;
|
|
90
|
-
'application/x-gzip': string;
|
|
91
|
-
'application/x-bzip2': string;
|
|
92
|
-
'application/x-xz': string;
|
|
93
|
-
'application/x-zip-compressed': string;
|
|
94
|
-
'application/java-archive': string;
|
|
95
|
-
'application/vnd.ms-cab-compressed': string;
|
|
96
|
-
'application/x-ace-compressed': string;
|
|
97
|
-
'application/x-apple-diskimage': string;
|
|
98
|
-
'application/x-stuffit': string;
|
|
99
|
-
'application/x-deb': string;
|
|
100
|
-
'application/x-lzip': string;
|
|
101
|
-
'application/x-lzma': string;
|
|
102
|
-
'application/x-lz4': string;
|
|
103
|
-
'application/x-arj': string;
|
|
104
|
-
'application/x-gtar': string;
|
|
105
|
-
'application/x-gtar-compressed': string;
|
|
106
|
-
'application/x-compress': string;
|
|
107
|
-
'application/x-bzip': string;
|
|
108
|
-
'application/x-bzip2-compressed-tar': string;
|
|
109
|
-
'application/x-iso9660-image': string;
|
|
110
|
-
'application/x-nrg': string;
|
|
111
|
-
'application/x-cpio': string;
|
|
112
|
-
'application/x-rpm': string;
|
|
113
|
-
'application/x-msdownload': string;
|
|
114
|
-
'application/x-ace': string;
|
|
115
|
-
'application/x-gca-compressed': string;
|
|
116
|
-
'application/x-java-pack200': string;
|
|
117
|
-
'application/x-tarz': string;
|
|
118
|
-
'application/x-vhd': string;
|
|
119
|
-
'application/x-virtualbox-hdd': string;
|
|
120
|
-
'application/x-lha': string;
|
|
121
|
-
'application/x-lzx': string;
|
|
122
|
-
'application/x-nsis': string;
|
|
123
|
-
'application/x-sit': string;
|
|
124
|
-
'application/x-squashfs': string;
|
|
125
|
-
'application/x-tzo': string;
|
|
126
|
-
'application/x-lzh-compressed': string;
|
|
127
|
-
'application/x-xar': string;
|
|
128
|
-
'application/x-war': string;
|
|
129
|
-
'application/x-cfs-compressed': string;
|
|
130
|
-
'application/x-zoo': string;
|
|
131
|
-
'application/x-ice': string;
|
|
132
|
-
'application/x-b1': string;
|
|
133
|
-
'application/x-arc': string;
|
|
134
|
-
'application/x-uc2': string;
|
|
135
|
-
'application/x-gzcompressed': string;
|
|
136
|
-
'application/x-cab-compressed': string;
|
|
137
|
-
'application/x-egg': string;
|
|
138
|
-
'application/x-ipynb+zip': string;
|
|
139
|
-
'application/x-iso9660-appimage': string;
|
|
140
|
-
'application/x-java-archive-diff': string;
|
|
141
|
-
'application/x-lhz': string;
|
|
142
|
-
'application/x-ms-wim': string;
|
|
143
|
-
'application/x-rar': string;
|
|
144
|
-
'application/x-sfx': string;
|
|
145
|
-
'application/x-shar': string;
|
|
146
|
-
'application/x-tar-gz': string;
|
|
147
|
-
'application/x-tar-bz2': string;
|
|
148
|
-
'application/x-tar-xz': string;
|
|
149
|
-
'application/x-tar-z': string;
|
|
150
|
-
'application/x-tar-zstd': string;
|
|
151
|
-
'application/x-tar.lz': string;
|
|
152
|
-
'application/x-tar.lzo': string;
|
|
153
|
-
'application/x-ustar': string;
|
|
154
|
-
'application/x-wim': string;
|
|
155
|
-
'application/x-xpinstall': string;
|
|
156
|
-
'application/x-xz-compressed-tar': string;
|
|
157
|
-
'application/xz-compressed-tar': string;
|
|
158
|
-
'application/x-zip': string;
|
|
159
|
-
'application/x-zip-sfx': string;
|
|
160
|
-
'application/x-zipx': string;
|
|
161
|
-
'application/xz': string;
|
|
162
|
-
'application/zlib': string;
|
|
163
|
-
'application/vnd.apple.installer+xml': string;
|
|
164
|
-
'application/vnd.debian.binary-package': string;
|
|
165
|
-
'application/vnd.ms-office.addin.macroEnabled.12': string;
|
|
166
|
-
'application/vnd.ms-office.activex+xml': string;
|
|
167
|
-
'application/vnd.ms-pki.seccat': string;
|
|
168
|
-
'application/vnd.ms-pki.stl': string;
|
|
169
|
-
'application/vnd.ms-powerpoint.addin.macroEnabled.12': string;
|
|
170
|
-
'application/vnd.ms-powerpoint.presentation.macroEnabled.12': string;
|
|
171
|
-
'application/vnd.ms-powerpoint.slide.macroEnabled.12': string;
|
|
172
|
-
'application/vnd.ms-powerpoint.slideshow.macroEnabled.12': string;
|
|
173
|
-
'application/vnd.ms-powerpoint.template.macroEnabled.12': string;
|
|
174
|
-
'application/vnd.ms-visio.drawing': string;
|
|
175
|
-
'application/vnd.ms-visio.drawing.macroEnabled.12': string;
|
|
176
|
-
'application/vnd.ms-visio.stencil': string;
|
|
177
|
-
'application/vnd.ms-visio.stencil.macroEnabled.12': string;
|
|
178
|
-
'application/vnd.ms-visio.template': string;
|
|
179
|
-
'application/vnd.ms-visio.template.macroEnabled.12': string;
|
|
180
|
-
'application/vnd.ms-xpsdocument': string;
|
|
181
|
-
'application/octet-stream': string;
|
|
182
|
-
'application/gzip': string;
|
|
183
|
-
'application/vnd.ms-powerpoint': string;
|
|
184
|
-
'application/vnd.openxmlformats-officedocument.presentationml.presentation': string;
|
|
185
|
-
'application/vnd.openxmlformats-officedocument.presentationml.slideshow': string;
|
|
186
|
-
'application/vnd.openxmlformats-officedocument.presentationml.template': string;
|
|
187
|
-
'application/vnd.ms-powerpoint.slide+xml': string;
|
|
188
|
-
'application/vnd.ms-powerpoint.slide.show+xml': string;
|
|
189
|
-
'application/vnd.ms-powerpoint.slide.show.macroEnabled.12': string;
|
|
190
|
-
'application/vnd.ms-powerpoint.slideLayout+xml': string;
|
|
191
|
-
'application/vnd.ms-powerpoint.slideMaster+xml': string;
|
|
192
|
-
'application/vnd.ms-powerpoint.slideshow+xml': string;
|
|
193
|
-
'application/vnd.ms-powerpoint.template+xml': string;
|
|
194
|
-
'application/vnd.ms-powerpoint.presentation+xml': string;
|
|
195
|
-
'application/vnd.ms-powerpoint.addin+xml': string;
|
|
196
|
-
'application/vnd.ms-powerpoint.presentation.macroEnabled+xml': string;
|
|
197
|
-
'application/vnd.ms-powerpoint.presentation.main+xml': string;
|
|
198
|
-
'application/vnd.ms-powerpoint.slide.show.macroEnabled+xml': string;
|
|
199
|
-
'application/vnd.ms-powerpoint.template.macroEnabled+xml': string;
|
|
200
|
-
'application/x-mspowerpoint': string;
|
|
201
|
-
'application/x-ms-powerpoint': string;
|
|
202
|
-
'application/mspowerpoint': string;
|
|
203
|
-
'application/ppt': string;
|
|
204
|
-
'application/vnd.ms-ppt': string;
|
|
205
|
-
'application/powerpoint': string;
|
|
206
|
-
'application/x-ppt': string;
|
|
207
|
-
'application/pptx': string;
|
|
208
|
-
'application/vnd.openxmlformats-officedocument.presentationml.slide': string;
|
|
209
|
-
'application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml': string;
|
|
210
|
-
'application/vnd.openxmlformats-officedocument.presentationml.slideLayout+xml': string;
|
|
211
|
-
'application/vnd.openxmlformats-officedocument.presentationml.slideMaster+xml': string;
|
|
212
|
-
'application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml': string;
|
|
213
|
-
'application/vnd.openxmlformats-officedocument.presentationml': string;
|
|
214
|
-
'application/vnd.oasis.opendocument.presentation': string;
|
|
215
|
-
'text/plain': string;
|
|
216
|
-
'text/csv': string;
|
|
217
|
-
'application/csv': string;
|
|
218
|
-
'application/x-csv': string;
|
|
219
|
-
'text/comma-separated-values': string;
|
|
220
|
-
'text/x-comma-separated-values': string;
|
|
221
|
-
'text/tab-separated-values': string;
|
|
222
|
-
'application/x-sqlite3': string;
|
|
223
|
-
'application/vnd.oasis.opendocument.graphics': string;
|
|
224
|
-
'application/vnd.oasis.opendocument.chart': string;
|
|
225
|
-
'application/vnd.oasis.opendocument.database': string;
|
|
226
|
-
'application/vnd.oasis.opendocument.formula': string;
|
|
227
|
-
'application/vnd.oasis.opendocument.image': string;
|
|
228
|
-
'application/vnd.oasis.opendocument.text-master': string;
|
|
229
|
-
'application/vnd.oasis.opendocument.presentation-master': string;
|
|
230
|
-
'application/vnd.oasis.opendocument.spreadsheet-template': string;
|
|
231
|
-
'application/vnd.oasis.opendocument.text-template': string;
|
|
232
|
-
'application/vnd.oasis.opendocument.presentation-template': string;
|
|
233
|
-
'application/vnd.oasis.opendocument.graphics-template': string;
|
|
234
|
-
'application/vnd.oasis.opendocument.chart-template': string;
|
|
235
|
-
'application/vnd.oasis.opendocument.database-template': string;
|
|
236
|
-
'application/vnd.oasis.opendocument.formula-template': string;
|
|
237
|
-
'application/vnd.oasis.opendocument.image-template': string;
|
|
238
|
-
'application/vnd.sun.xml.writer': string;
|
|
239
|
-
'application/vnd.sun.xml.writer.template': string;
|
|
240
|
-
'application/vnd.sun.xml.calc': string;
|
|
241
|
-
'application/vnd.sun.xml.calc.template': string;
|
|
242
|
-
'application/vnd.sun.xml.impress': string;
|
|
243
|
-
'application/vnd.sun.xml.impress.template': string;
|
|
244
|
-
'application/vnd.sun.xml.draw': string;
|
|
245
|
-
'application/vnd.sun.xml.draw.template': string;
|
|
246
|
-
'application/vnd.sun.xml.math': string;
|
|
247
|
-
'text/x-sass': string;
|
|
248
|
-
'text/x-scheme': string;
|
|
249
|
-
'text/x-scons': string;
|
|
250
|
-
'text/x-stsrc': string;
|
|
251
|
-
'text/x-tcl': string;
|
|
252
|
-
'text/x-tex': string;
|
|
253
|
-
'text/x-texinfo': string;
|
|
254
|
-
'text/x-toml': string;
|
|
255
|
-
'text/x-uuencode': string;
|
|
256
|
-
'text/x-vala': string;
|
|
257
|
-
'text/x-vbdotnet': string;
|
|
258
|
-
'text/x-vbnet': string;
|
|
259
|
-
'text/x-verilog': string;
|
|
260
|
-
'text/x-vhdl': string;
|
|
261
|
-
'text/x-yaml': string;
|
|
262
|
-
'application/x-gnuplot': string;
|
|
263
|
-
'application/x-haml': string;
|
|
264
|
-
'application/x-ini': string;
|
|
265
|
-
'application/x-mumps': string;
|
|
266
|
-
'application/x-ocaml': string;
|
|
267
|
-
'application/x-ooc': string;
|
|
268
|
-
'application/x-patch': string;
|
|
269
|
-
'application/x-prolog': string;
|
|
270
|
-
'application/x-properties': string;
|
|
271
|
-
'application/x-rsrc': string;
|
|
272
|
-
'application/x-sass': string;
|
|
273
|
-
'application/x-scheme': string;
|
|
274
|
-
'application/x-scons': string;
|
|
275
|
-
'application/x-stsrc': string;
|
|
276
|
-
'application/x-tcl': string;
|
|
277
|
-
'application/x-tex': string;
|
|
278
|
-
'application/x-texinfo': string;
|
|
279
|
-
'application/x-toml': string;
|
|
280
|
-
'application/x-uuencode': string;
|
|
281
|
-
'application/x-vala': string;
|
|
282
|
-
'application/x-vbdotnet': string;
|
|
283
|
-
'application/x-vbnet': string;
|
|
284
|
-
'application/x-vhdl': string;
|
|
285
|
-
'application/x-verilog': string;
|
|
286
|
-
'application/x-yaml': string;
|
|
287
|
-
'text/x-arduino': string;
|
|
288
|
-
'text/x-bibtex': string;
|
|
289
|
-
'text/x-coffeescript': string;
|
|
290
|
-
'text/x-dtd': string;
|
|
291
|
-
'text/x-erlang': string;
|
|
292
|
-
'text/x-gnuplot': string;
|
|
293
|
-
'text/x-go': string;
|
|
294
|
-
'text/x-gwt-rpc': string;
|
|
295
|
-
'text/x-handlebars': string;
|
|
296
|
-
'text/x-haml': string;
|
|
297
|
-
'text/x-ini': string;
|
|
298
|
-
'text/x-json': string;
|
|
299
|
-
'text/x-kotlin': string;
|
|
300
|
-
'text/x-liquid': string;
|
|
301
|
-
'text/x-literate-haskell': string;
|
|
302
|
-
'text/x-lua': string;
|
|
303
|
-
'text/x-makefile': string;
|
|
304
|
-
'text/x-nfo': string;
|
|
305
|
-
'text/x-ocaml': string;
|
|
306
|
-
'text/x-ooc': string;
|
|
307
|
-
'text/x-patch': string;
|
|
308
|
-
'text/x-prolog': string;
|
|
309
|
-
'text/x-properties': string;
|
|
310
|
-
'text/x-rsrc': string;
|
|
311
|
-
'text/x-rust': string;
|
|
312
|
-
'text/html': string;
|
|
313
|
-
'text/css': string;
|
|
314
|
-
'text/javascript': string;
|
|
315
|
-
'application/javascript': string;
|
|
316
|
-
'application/json': string;
|
|
317
|
-
'application/xml': string;
|
|
318
|
-
'application/xhtml+xml': string;
|
|
319
|
-
'application/atom+xml': string;
|
|
320
|
-
'application/rss+xml': string;
|
|
321
|
-
'application/x-latex': string;
|
|
322
|
-
'application/x-sh': string;
|
|
323
|
-
'application/x-python': string;
|
|
324
|
-
'application/x-perl': string;
|
|
325
|
-
'application/x-ruby': string;
|
|
326
|
-
'application/x-php': string;
|
|
327
|
-
'application/x-java': string;
|
|
328
|
-
'application/x-c++': string;
|
|
329
|
-
'application/x-c': string;
|
|
330
|
-
'application/x-shellscript': string;
|
|
331
|
-
'application/x-diff': string;
|
|
332
|
-
'application/x-go': string;
|
|
333
|
-
'application/x-swift': string;
|
|
334
|
-
'application/x-objective-c': string;
|
|
335
|
-
'application/x-scala': string;
|
|
336
|
-
'application/x-rust': string;
|
|
337
|
-
'application/x-haskell': string;
|
|
338
|
-
'application/x-lua': string;
|
|
339
|
-
'application/x-matlab': string;
|
|
340
|
-
'application/x-fortran': string;
|
|
341
|
-
'application/x-csharp': string;
|
|
342
|
-
'application/x-vb': string;
|
|
343
|
-
'application/x-pascal': string;
|
|
344
|
-
'application/x-cobol': string;
|
|
345
|
-
'application/x-groovy': string;
|
|
346
|
-
'application/x-sql': string;
|
|
347
|
-
'application/x-typescript': string;
|
|
348
|
-
'application/x-kotlin': string;
|
|
349
|
-
'application/x-erlang': string;
|
|
350
|
-
'application/x-clojure': string;
|
|
351
|
-
'application/x-less': string;
|
|
352
|
-
'application/x-stylus': string;
|
|
353
|
-
'application/x-markdown': string;
|
|
354
|
-
'application/x-coffeescript': string;
|
|
355
|
-
'application/x-dart': string;
|
|
356
|
-
'application/x-lisp': string;
|
|
357
|
-
'application/x-powershell': string;
|
|
358
|
-
image: string;
|
|
359
|
-
audio: string;
|
|
360
|
-
video: string;
|
|
361
|
-
};
|
|
362
|
-
export declare const getIconByMimeType: (mimeType?: string) => string;
|
|
363
|
-
export {};
|