@veeqo/ui 4.1.2 → 4.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/UploadFile/UploadFile.d.ts +3 -0
- package/dist/components/UploadFile/UploadFile.test.d.ts +1 -0
- package/dist/components/UploadFile/UploadGraphic.d.ts +2 -0
- package/dist/components/UploadFile/components/UploadCopy/UploadCopy.d.ts +2 -0
- package/dist/components/UploadFile/components/UploadFileErrors/UploadFileErrors.d.ts +7 -0
- package/dist/components/UploadFile/components/UploadedFile/UploadedFile.d.ts +7 -0
- package/dist/components/UploadFile/components/UploadedFile/styled.d.ts +2 -0
- package/dist/components/UploadFile/constants.d.ts +17 -0
- package/dist/components/UploadFile/index.d.ts +2 -0
- package/dist/components/UploadFile/styled.d.ts +1 -0
- package/dist/components/UploadFile/types.d.ts +9 -0
- package/dist/components/UploadFile/utils/getFileSizeString/getFileSizeString.d.ts +24 -0
- package/dist/components/UploadFile/utils/getFileSizeString/getFileSizeString.test.d.ts +1 -0
- package/dist/components/UploadFile/utils/getTypePropForInputEl/getTypePropForInputEl.d.ts +24 -0
- package/dist/components/UploadFile/utils/getTypePropForInputEl/getTypePropForInputEl.test.d.ts +1 -0
- package/dist/components/UploadFile/utils/getValidTypesString/getValidTypesString.d.ts +25 -0
- package/dist/components/UploadFile/utils/getValidTypesString/getValidTypesString.test.d.ts +1 -0
- package/dist/components/UploadFile/utils/index.d.ts +4 -0
- package/dist/components/UploadFile/utils/setInputElFile/setInputElFile.d.ts +13 -0
- package/dist/components/UploadFile/utils/setInputElFile/setInputElFile.test.d.ts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export declare const SingleLineText: import("styled-components").StyledComponent<"span", any, {} & import("../../../Text/types").TextProps, never>;
|
|
2
|
+
export declare const UploadedFilesListStack: import("styled-components").StyledComponent<"div", any, import("../../../Stack/types").StackProps, never>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare enum AcceptedFileTypes {
|
|
2
|
+
CSV = ".csv",
|
|
3
|
+
JPEG = ".jpeg",
|
|
4
|
+
JPG = ".jpg",
|
|
5
|
+
GIF = ".gif",
|
|
6
|
+
PNG = ".png"
|
|
7
|
+
}
|
|
8
|
+
export declare enum FileSizeUnit {
|
|
9
|
+
KB = "KB",
|
|
10
|
+
MB = "MB"
|
|
11
|
+
}
|
|
12
|
+
export declare enum InputState {
|
|
13
|
+
VALID = "",
|
|
14
|
+
INVALID_FORMAT = "File is incorrect format",
|
|
15
|
+
INVALID_SIZE = "File size is too big",
|
|
16
|
+
INVALID_FORMAT_AND_SIZE = "File is incorrect format and too big"
|
|
17
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DropZoneContainer: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { FileSizeUnit } from '../../constants';
|
|
2
|
+
type GetFileSizeStringProps = {
|
|
3
|
+
maxBytes: number;
|
|
4
|
+
format: FileSizeUnit;
|
|
5
|
+
baseString?: string;
|
|
6
|
+
};
|
|
7
|
+
/**
|
|
8
|
+
* Constructs a string intended to be consumed by an <input> element of type "file". This string
|
|
9
|
+
* should go inside the accept property
|
|
10
|
+
*
|
|
11
|
+
* E.g.
|
|
12
|
+
*
|
|
13
|
+
* const maxSizeCopy = getFileSizeString({
|
|
14
|
+
* maxBytes: 10000,
|
|
15
|
+
* format: FileSizeUnit.MB
|
|
16
|
+
* });
|
|
17
|
+
*
|
|
18
|
+
* Where @constant maxSizeCopy would equal "Max size: 1 MB"
|
|
19
|
+
*
|
|
20
|
+
* @param fileTypes - A list of file types, each value being of @type AcceptedFileTypes
|
|
21
|
+
* the returned string
|
|
22
|
+
*/
|
|
23
|
+
export declare const getFileSizeString: ({ maxBytes, format, baseString }: GetFileSizeStringProps) => string;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { AcceptedFileTypes } from '../../constants';
|
|
2
|
+
type GetValidTypesStringProps = {
|
|
3
|
+
fileTypes: Array<AcceptedFileTypes>;
|
|
4
|
+
baseString?: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Constructs a string intended to be consumed by an <input> element of type "file". This string
|
|
8
|
+
* should go inside the accept property.
|
|
9
|
+
*
|
|
10
|
+
* E.g.
|
|
11
|
+
*
|
|
12
|
+
* const inputElAcceptProperty = getTypePropForInputEl({
|
|
13
|
+
* fileTypes: [
|
|
14
|
+
* AcceptedFileTypes.CSV,
|
|
15
|
+
* ]
|
|
16
|
+
* });
|
|
17
|
+
*
|
|
18
|
+
* Where @constant inputElAcceptProperty would equal ".csv"
|
|
19
|
+
*
|
|
20
|
+
* @param fileTypes - A list of file types, each value being of @type AcceptedFileTypes
|
|
21
|
+
* the returned string
|
|
22
|
+
*/
|
|
23
|
+
export declare const getTypePropForInputEl: ({ fileTypes }: GetValidTypesStringProps) => string;
|
|
24
|
+
export {};
|
package/dist/components/UploadFile/utils/getTypePropForInputEl/getTypePropForInputEl.test.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AcceptedFileTypes } from '../../constants';
|
|
2
|
+
type GetValidTypesStringProps = {
|
|
3
|
+
fileTypes: Array<AcceptedFileTypes>;
|
|
4
|
+
baseString?: string;
|
|
5
|
+
};
|
|
6
|
+
/**
|
|
7
|
+
* Constructs a user-friendly string of accepted types valid for the UploadFile component based on the
|
|
8
|
+
* fileTypes list passed as parameter.
|
|
9
|
+
*
|
|
10
|
+
* E.g.
|
|
11
|
+
*
|
|
12
|
+
* const validTypesCopy = getValidTypesString({
|
|
13
|
+
* fileTypes: [
|
|
14
|
+
* AcceptedFileTypes.CSV,
|
|
15
|
+
* ]
|
|
16
|
+
* });
|
|
17
|
+
*
|
|
18
|
+
* Where @constant validTypesCopy would equal "Valid types: CSV"
|
|
19
|
+
*
|
|
20
|
+
* @param fileTypes - A list of file types, each value being of @type AcceptedFileTypes
|
|
21
|
+
* @param baseString - An optional string to override the default value of 'Valid types: ' prefixed to
|
|
22
|
+
* the returned string
|
|
23
|
+
*/
|
|
24
|
+
export declare const getValidTypesString: ({ fileTypes, baseString }: GetValidTypesStringProps) => string;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { getValidTypesString } from './getValidTypesString/getValidTypesString';
|
|
2
|
+
export { getFileSizeString } from './getFileSizeString/getFileSizeString';
|
|
3
|
+
export { getTypePropForInputEl } from './getTypePropForInputEl/getTypePropForInputEl';
|
|
4
|
+
export { setInputElFile } from './setInputElFile/setInputElFile';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
type SetInputElFileProps = {
|
|
2
|
+
fileList: FileList;
|
|
3
|
+
elementId: string;
|
|
4
|
+
};
|
|
5
|
+
/**
|
|
6
|
+
* Updates the value of the files attribute held within an input elment. Used during DnD operations where
|
|
7
|
+
* the input element's files need to kept in sync and updated.
|
|
8
|
+
*
|
|
9
|
+
* @param fileList - A list of files, typically extracted from the "files" attribute of an input element
|
|
10
|
+
* @param elementId - The ID of the input element
|
|
11
|
+
*/
|
|
12
|
+
export declare const setInputElFile: ({ fileList, elementId }: SetInputElFileProps) => void;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -47,6 +47,7 @@ export { ToastsLayout } from './ToastsLayout';
|
|
|
47
47
|
export { Toggle } from './Toggle';
|
|
48
48
|
export { ToggleButton } from './ToggleButton';
|
|
49
49
|
export { Tooltip } from './Tooltip';
|
|
50
|
+
export { UploadFile, AcceptedFileTypes, FileSizeUnit } from './UploadFile';
|
|
50
51
|
export { VideoModal, Popup } from './VideoModal';
|
|
51
52
|
export { View } from './View';
|
|
52
53
|
export { WeightInput } from './WeightInput';
|