jamespot-react-components 1.0.129 → 1.0.130
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/build/jamespot-react-components.js +411 -375
- package/build/jamespot-react-components.js.map +1 -1
- package/build/src/components/Form/Input/JRCFormFile/File.d.ts +10 -0
- package/build/src/components/Form/Input/JRCFormFile/JRCFormFile.d.ts +9 -6
- package/build/src/components/Form/Input/JRCFormFile/JRCFormFile.stories.d.ts +2 -3
- package/build/src/components/Form/Input/JRCFormFile/JRCFormFile.styles.d.ts +7 -0
- package/build/src/components/Form/Input/JRCFormFile/file.api.d.ts +2 -0
- package/build/src/components/JRCCard/JRCCardImg.d.ts +1 -0
- package/build/src/utils/index.d.ts +2 -1
- package/build/src/utils/utils.image.d.ts +8 -0
- package/package.json +2 -2
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { FileResponse } from 'jamespot-user-api';
|
|
2
|
+
export declare const File: ({ file, index, token, step, attrName, onUploadSuccess, onDeleteSuccess, }: {
|
|
3
|
+
file: File;
|
|
4
|
+
index: number;
|
|
5
|
+
step: number;
|
|
6
|
+
token: string | undefined;
|
|
7
|
+
attrName: string;
|
|
8
|
+
onUploadSuccess?: ((response: FileResponse) => void) | undefined;
|
|
9
|
+
onDeleteSuccess?: (() => void) | undefined;
|
|
10
|
+
}) => JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { WrappedFieldInputProps } from 'redux-form';
|
|
3
|
+
import { FileResponse } from 'jamespot-user-api';
|
|
3
4
|
export declare type JRCFormInputFileProps = JRCFormInputFileFieldProps;
|
|
4
5
|
/**
|
|
5
6
|
* Props type for JRCFormInputFileFieldProps (to fix with next version of this JRC)
|
|
@@ -13,16 +14,18 @@ export interface JRCFormInputFileFieldProps extends React.ComponentPropsWithoutR
|
|
|
13
14
|
required?: boolean;
|
|
14
15
|
loading?: boolean;
|
|
15
16
|
className?: string;
|
|
16
|
-
content
|
|
17
|
+
content?: string;
|
|
17
18
|
icon?: boolean;
|
|
19
|
+
limit?: number;
|
|
20
|
+
token?: string;
|
|
18
21
|
multiple?: boolean;
|
|
19
|
-
accept?: 'image/png' | 'image/jpg' | 'image/png, image/jpg' | 'image/pdf' | 'image/doc' | 'image/pdf, image/doc';
|
|
22
|
+
accept?: 'image/png' | 'image/jpg' | 'image/png, image/jpg' | 'image/png, image/jpeg, image/jpg' | 'image/pdf' | 'image/doc' | 'image/pdf, image/doc';
|
|
20
23
|
input?: WrappedFieldInputProps;
|
|
24
|
+
onUploadSuccess?: (response: FileResponse) => void;
|
|
25
|
+
onDeleteSuccess?: (index: number) => void;
|
|
26
|
+
onUploadStart?: (count?: number) => void;
|
|
21
27
|
}
|
|
22
|
-
|
|
23
|
-
* @deprecated Build a component compatible with react-hook-form instead
|
|
24
|
-
*/
|
|
25
|
-
export declare const JRCFormInputFile: ({ id, required, loading, name, accept, content, icon, multiple, }: JRCFormInputFileProps) => JSX.Element;
|
|
28
|
+
export declare const JRCFormInputFile: React.ForwardRefExoticComponent<JRCFormInputFileFieldProps & React.RefAttributes<HTMLInputElement>>;
|
|
26
29
|
/**
|
|
27
30
|
* @deprecated Build a component compatible with react-hook-form instead
|
|
28
31
|
*/
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { JRCFormInputFileFieldProps } from './JRCFormFile';
|
|
2
1
|
import { Meta, Story } from '@storybook/react';
|
|
3
2
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
3
|
export default _default;
|
|
5
|
-
export declare const File: Story<JRCFormInputFileFieldProps>;
|
|
6
|
-
export declare const FileMultiple: Story<JRCFormInputFileFieldProps>;
|
|
4
|
+
export declare const File: Story<import("./JRCFormFile").JRCFormInputFileFieldProps>;
|
|
5
|
+
export declare const FileMultiple: Story<import("./JRCFormFile").JRCFormInputFileFieldProps>;
|
|
@@ -3,5 +3,12 @@ export declare const ContainerList: import("styled-components").StyledComponent<
|
|
|
3
3
|
export declare const List: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
4
4
|
export declare const Image: import("styled-components").StyledComponent<"img", any, {}, never>;
|
|
5
5
|
export declare const LabelContainer: import("styled-components").StyledComponent<"label", any, {}, never>;
|
|
6
|
+
export declare const FileUploadWrapper: import("styled-components").StyledComponent<"div", any, {}, never>;
|
|
6
7
|
export declare const LabelField: import("styled-components").StyledComponent<"p", any, {}, never>;
|
|
7
8
|
export declare const CloseButton: import("styled-components").StyledComponent<"a", any, {}, never>;
|
|
9
|
+
export declare const FileWrapper: import("styled-components").StyledComponent<"label", any, {
|
|
10
|
+
loading: boolean;
|
|
11
|
+
}, never>;
|
|
12
|
+
export declare const FileName: import("styled-components").StyledComponent<"label", any, {}, never>;
|
|
13
|
+
export declare const FileImage: import("styled-components").StyledComponent<"label", any, {}, never>;
|
|
14
|
+
export declare const FileRemove: import("styled-components").StyledComponent<"a", any, {}, never>;
|
|
@@ -7,4 +7,5 @@ import * as regexp from './utils.regexp';
|
|
|
7
7
|
import * as string from './utils.string';
|
|
8
8
|
import * as time from './utils.time';
|
|
9
9
|
import * as uri from './utils.uri';
|
|
10
|
-
|
|
10
|
+
import * as image from './utils.image';
|
|
11
|
+
export { array, date, document, misc, object, regexp, string, time, uri, image };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jamespot-react-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.130",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/jamespot-react-components.js",
|
|
6
6
|
"types": "./build/src/index.d.ts",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"@tiptap/starter-kit": "^2.0.0-beta.203",
|
|
100
100
|
"chroma-js": "^2.1.1",
|
|
101
101
|
"classnames": "^2.3.1",
|
|
102
|
-
"jamespot-user-api": "^1.0.
|
|
102
|
+
"jamespot-user-api": "^1.0.101",
|
|
103
103
|
"moment": "^2.29.1",
|
|
104
104
|
"react": "^17.x",
|
|
105
105
|
"react-dnd": "^14.0.4",
|