jamespot-react-components 1.0.140 → 1.0.142
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 +544 -494
- package/build/jamespot-react-components.js.map +1 -1
- package/build/src/components/Form/Input/JRCInputDate/JRCInputDate.d.ts +5 -2
- package/build/src/components/Form/Input/JRCInputFile/JRCInputFile.d.ts +2 -0
- package/build/src/components/Form/Input/JRCInputImage/JRCInputImage.d.ts +3 -1
- package/build/src/components/Form/Input/JRCSelect/JRCInputAutocompleteViews.d.ts +4 -2
- package/build/src/components/Form/Input/JRCSelect/JRCInputSelect.style.d.ts +2 -1
- package/build/src/components/JRCCard/JRCCardImg.d.ts +1 -1
- package/build/src/components/JRCFolders/JRCFolderBreadcrumb.d.ts +3 -3
- package/build/src/components/JRCFolders/JRCFolders.d.ts +3 -1
- package/build/src/components/JRCFolders/JRCFolders.stories.d.ts +1 -1
- package/build/src/components/JRCFolders/mock.d.ts +1549 -0
- package/build/src/components/JRCFolders/styles.d.ts +11 -0
- package/build/src/components/JRCFolders/types.d.ts +12 -17
- package/build/src/components/JRCHtml/JRCHtml.d.ts +5 -1
- package/build/src/components/JRCImg/JRCImg.d.ts +1 -1
- package/build/src/components/JRCSidePanelModal/JRCSidePanelModal.d.ts +15 -0
- package/build/src/components/JRCSidePanelModal/JRCSidePanelModal.stories.d.ts +5 -0
- package/build/src/components/JRCSidePanelModal/JRCSidePanelModal.styles.d.ts +11 -0
- package/build/src/hooks/useCancelOnUnmount.d.ts +1 -0
- package/build/src/index.d.ts +3 -0
- package/build/src/utils/index.d.ts +1 -2
- package/package.json +2 -2
- package/build/src/components/JRCFolders/mock.folders.d.ts +0 -16
- package/build/src/components/JRCImg/JRCImg.utils.d.ts +0 -68
- package/build/src/components/JRCImg/JRCImg.utils.test.d.ts +0 -1
- package/build/src/utils/utils.uri.d.ts +0 -2
- package/build/src/utils/utils.uri.test.d.ts +0 -1
|
@@ -2,11 +2,14 @@ import * as React from 'react';
|
|
|
2
2
|
import { JRCInputFieldProps } from '../Common/JRCFormFieldRenderer.types';
|
|
3
3
|
import { DataCy } from '../../../../types/dataAttributes';
|
|
4
4
|
import { FieldValues } from 'react-hook-form/dist/types';
|
|
5
|
-
export declare type
|
|
5
|
+
export declare type NativeInputProps = DataCy & React.ComponentPropsWithoutRef<'input'> & {
|
|
6
|
+
type?: 'date' | 'time' | 'datetime-local';
|
|
7
|
+
};
|
|
8
|
+
export declare type JRCInputDateProps<TFieldValues extends FieldValues = FieldValues> = NativeInputProps & JRCInputFieldProps<TFieldValues>;
|
|
6
9
|
/**
|
|
7
10
|
* Component used as a <input type="date"/>
|
|
8
11
|
* @param props JRCInputFieldProps
|
|
9
12
|
* validation props: required
|
|
10
13
|
* @returns JSX.Element
|
|
11
14
|
*/
|
|
12
|
-
export declare function JRCInputDate<T extends FieldValues = FieldValues>(props:
|
|
15
|
+
export declare function JRCInputDate<T extends FieldValues = FieldValues>(props: JRCInputDateProps<T>): JSX.Element;
|
|
@@ -5,6 +5,7 @@ import { FieldValues } from 'react-hook-form/dist/types';
|
|
|
5
5
|
import { ApiWrapper, FileResponse } from 'jamespot-user-api';
|
|
6
6
|
export declare type NativeInputFileProps = DataCy & Omit<React.ComponentPropsWithoutRef<'input'>, 'value' | 'onChange'> & {
|
|
7
7
|
token?: string | undefined;
|
|
8
|
+
attrName?: string;
|
|
8
9
|
onLoading?: (state: boolean) => void;
|
|
9
10
|
value: ApiWrapper<FileResponse>[];
|
|
10
11
|
onChange: (files: ApiWrapper<FileResponse>[]) => void;
|
|
@@ -12,6 +13,7 @@ export declare type NativeInputFileProps = DataCy & Omit<React.ComponentPropsWit
|
|
|
12
13
|
export declare type JRCInputFileProps<T extends FieldValues = FieldValues> = JRCInputFieldProps<T> & Omit<NativeInputFileProps, 'value' | 'onChange'>;
|
|
13
14
|
export declare const InputFile: React.ForwardRefExoticComponent<DataCy & Omit<Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>>, "onChange" | "value"> & {
|
|
14
15
|
token?: string | undefined;
|
|
16
|
+
attrName?: string | undefined;
|
|
15
17
|
onLoading?: ((state: boolean) => void) | undefined;
|
|
16
18
|
value: ApiWrapper<FileResponse>[];
|
|
17
19
|
onChange: (files: ApiWrapper<FileResponse>[]) => void;
|
|
@@ -5,9 +5,10 @@ import { FieldValues } from 'react-hook-form/dist/types';
|
|
|
5
5
|
import { FileResponse } from 'jamespot-user-api';
|
|
6
6
|
export declare type NativeInputImageProps = DataCy & Omit<React.ComponentPropsWithoutRef<'input'>, 'value' | 'onChange'> & {
|
|
7
7
|
token?: string | undefined;
|
|
8
|
+
attrName?: string;
|
|
8
9
|
onLoading?: (state: boolean) => void;
|
|
9
10
|
aspectRatio?: number | undefined;
|
|
10
|
-
defaultImages
|
|
11
|
+
defaultImages?: {
|
|
11
12
|
imgs: Array<{
|
|
12
13
|
src: string;
|
|
13
14
|
alt: string;
|
|
@@ -21,6 +22,7 @@ export declare type NativeInputImageProps = DataCy & Omit<React.ComponentPropsWi
|
|
|
21
22
|
timestamp?: string | number;
|
|
22
23
|
});
|
|
23
24
|
onChange: (files: undefined | FileResponse) => void;
|
|
25
|
+
disableCrop?: boolean;
|
|
24
26
|
};
|
|
25
27
|
export declare type JRCInputImageProps<T extends FieldValues = FieldValues> = JRCInputFieldProps<T> & Omit<NativeInputImageProps, 'value' | 'onChange'>;
|
|
26
28
|
/**
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { AudienceAutocomplete } from 'jamespot-user-api';
|
|
2
|
+
export declare const CSSViewsWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
1
3
|
export declare type AVProps = {
|
|
2
4
|
views: Array<'folder' | 'user' | 'group' | 'community'>;
|
|
3
|
-
|
|
5
|
+
initialValues: AudienceAutocomplete[];
|
|
4
6
|
onConfirm: (values: any) => void;
|
|
5
7
|
};
|
|
6
|
-
declare const JRCInputAutocompleteViews: ({ views,
|
|
8
|
+
declare const JRCInputAutocompleteViews: ({ views, initialValues, onConfirm }: AVProps) => JSX.Element;
|
|
7
9
|
export { JRCInputAutocompleteViews };
|
|
@@ -273,7 +273,8 @@ export declare const OptionMenu: import("styled-components").StyledComponent<"di
|
|
|
273
273
|
export declare const SelectedOptionWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
274
274
|
export declare const SelectedOption: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
|
|
275
275
|
type: "button";
|
|
276
|
-
|
|
276
|
+
readOnly: boolean;
|
|
277
|
+
}, "type" | "readOnly">;
|
|
277
278
|
export declare const JRCDefaultSelectedOption: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
278
279
|
export declare const TimesIcon: import("styled-components").StyledComponent<"i", import("styled-components").DefaultTheme, {
|
|
279
280
|
className: "react-icon icon-times";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { FolderType } from 'jamespot-user-api';
|
|
2
2
|
declare const JRCFolderBreadcrumb: ({ entries, onPress, }: {
|
|
3
|
-
entries: Array<
|
|
4
|
-
onPress: (entry:
|
|
3
|
+
entries: Array<FolderType>;
|
|
4
|
+
onPress: (entry: FolderType) => void;
|
|
5
5
|
}) => JSX.Element;
|
|
6
6
|
export { JRCFolderBreadcrumb };
|
|
@@ -1,2 +1,4 @@
|
|
|
1
1
|
import { JRCFoldersProps } from './types';
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const inUriArray: (arr: Array<string>, uriValue: string) => boolean;
|
|
3
|
+
export declare const updateUriArray: (arr: string[], uriValue: string) => Array<string>;
|
|
4
|
+
export declare const JRCFolders: ({ loadDocuments, allowMultiSelection, asyncBanksPromise, asyncFoldersPromise, asyncDocumentsPromise, initialFolders, initialDocuments, onSelectFolder, onSelectDocument, }: JRCFoldersProps) => JSX.Element;
|
|
@@ -3,7 +3,7 @@ import { Story } from '@storybook/react';
|
|
|
3
3
|
import { JRCFoldersProps } from './types';
|
|
4
4
|
declare const _default: {
|
|
5
5
|
title: string;
|
|
6
|
-
component: (
|
|
6
|
+
component: ({ loadDocuments, allowMultiSelection, asyncBanksPromise, asyncFoldersPromise, asyncDocumentsPromise, initialFolders, initialDocuments, onSelectFolder, onSelectDocument, }: JRCFoldersProps) => JSX.Element;
|
|
7
7
|
};
|
|
8
8
|
export default _default;
|
|
9
9
|
export declare const Folders: Story<JRCFoldersProps>;
|