jamespot-react-components 1.0.245 → 1.0.246
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 +326 -326
- package/build/jamespot-react-components.js.map +1 -1
- package/build/src/components/Form/Input/JRCSelect/JRCInputSelect.d.ts +10 -0
- package/build/src/components/Form/Input/JRCSelect/JRCInputSelect.stories.d.ts +1 -1
- package/build/src/components/Form/Input/JRCSelect/JRCInputSelect.types.d.ts +13 -13
- package/build/src/components/Form/Input/JRCSelect/JRCInputSelectAsync.stories.d.ts +1 -1
- package/build/src/components/Form/Input/JRCSelect/JRCInputSelectHierarchicalTree.d.ts +1 -1
- package/build/src/components/Form/Input/JRCSelect/JRCInputSelectRaw.d.ts +1 -1
- package/build/src/index.d.ts +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { JRCInputSelectProps } from './JRCInputSelect.types';
|
|
3
|
+
import type { FieldValues } from 'react-hook-form';
|
|
4
|
+
type SelectOption = {
|
|
5
|
+
label: string;
|
|
6
|
+
value: any;
|
|
7
|
+
resetOptions?: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare function JRCInputSelect<T extends FieldValues = FieldValues>(props: Omit<JRCInputSelectProps<T, SelectOption>, 'getLabel' | 'getValue'>): React.JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -8,8 +8,8 @@ import { PartialBy } from '../../../../types/utils';
|
|
|
8
8
|
/**
|
|
9
9
|
* Select
|
|
10
10
|
*/
|
|
11
|
-
export type NativeSelectProps<T extends FieldValues = FieldValues> = PartialBy<ControllerRenderProps<T>, 'onBlur'> & SelectProps & IconsProp;
|
|
12
|
-
export type JRCInputSelectProps<T extends FieldValues = FieldValues> = JRCInputFieldProps<T> & SelectProps & IconsProp;
|
|
11
|
+
export type NativeSelectProps<T extends FieldValues = FieldValues, U = any> = PartialBy<ControllerRenderProps<T>, 'onBlur'> & SelectProps<U> & IconsProp;
|
|
12
|
+
export type JRCInputSelectProps<T extends FieldValues = FieldValues, U = any> = JRCInputFieldProps<T> & SelectProps<U> & IconsProp;
|
|
13
13
|
export type Getter = ((option: any) => any) | string;
|
|
14
14
|
export type IconsProp = {
|
|
15
15
|
iconBefore?: {
|
|
@@ -18,34 +18,34 @@ export type IconsProp = {
|
|
|
18
18
|
onClick?: () => void;
|
|
19
19
|
};
|
|
20
20
|
};
|
|
21
|
-
export type SelectProps = DataCy & {
|
|
22
|
-
options?: Array<
|
|
21
|
+
export type SelectProps<T = any> = DataCy & {
|
|
22
|
+
options?: Array<T>;
|
|
23
23
|
asyncPromise?: (inputValue: string, page?: number) => Promise<any[]>;
|
|
24
24
|
multiple?: boolean;
|
|
25
|
-
getLabel?: ((option:
|
|
26
|
-
getValue?: ((option:
|
|
27
|
-
getDescription?: (option:
|
|
25
|
+
getLabel?: ((option: T) => string) | string;
|
|
26
|
+
getValue?: ((option: T) => string) | string;
|
|
27
|
+
getDescription?: (option: T) => T;
|
|
28
28
|
disabled?: boolean;
|
|
29
29
|
readOnly?: boolean;
|
|
30
30
|
placeholder?: string;
|
|
31
31
|
searchable?: boolean;
|
|
32
|
-
getSearch?: ((option:
|
|
32
|
+
getSearch?: ((option: T) => string) | string;
|
|
33
33
|
group?: boolean;
|
|
34
|
-
getGroup?: ((option:
|
|
34
|
+
getGroup?: ((option: T) => string) | string;
|
|
35
35
|
views?: Array<'folder' | 'user' | 'group' | 'community'>;
|
|
36
36
|
onConfirm?: (values: any) => void;
|
|
37
37
|
hideSelectedOption?: boolean;
|
|
38
38
|
hideDeleteIcon?: boolean;
|
|
39
39
|
displayOption?: boolean;
|
|
40
40
|
displayIndicator?: boolean;
|
|
41
|
-
getOptionsSelected?: (options:
|
|
42
|
-
setOptionsSelected?:
|
|
41
|
+
getOptionsSelected?: (options: T) => void;
|
|
42
|
+
setOptionsSelected?: T;
|
|
43
43
|
components?: {
|
|
44
44
|
Option?: React.ComponentType<{
|
|
45
|
-
option:
|
|
45
|
+
option: T;
|
|
46
46
|
}>;
|
|
47
47
|
SelectedOption?: React.ComponentType<{
|
|
48
|
-
option:
|
|
48
|
+
option: T;
|
|
49
49
|
}>;
|
|
50
50
|
};
|
|
51
51
|
/**
|
|
@@ -11,7 +11,7 @@ export type JRCInputSelectHierarchicalTreeProps = Omit<JRCInputSelectProps, 'asy
|
|
|
11
11
|
value: any;
|
|
12
12
|
}>;
|
|
13
13
|
};
|
|
14
|
-
export declare const JRCInputSelectHierarchicalTree: React.ForwardRefExoticComponent<Omit<JRCInputSelectProps<import("react-hook-form").FieldValues>, "asyncPromise"> & JRCModalLayoutProps & {
|
|
14
|
+
export declare const JRCInputSelectHierarchicalTree: React.ForwardRefExoticComponent<Omit<JRCInputSelectProps<import("react-hook-form").FieldValues, any>, "asyncPromise"> & JRCModalLayoutProps & {
|
|
15
15
|
asyncPromise?: ((inputValue: string, page?: number) => Promise<PagingResults<any>>) | undefined;
|
|
16
16
|
hierarchicalTaxonomyPromise: (uriConcept: string) => Promise<PagingResults<jObjectAutocomplete>>;
|
|
17
17
|
displayModal?: boolean | undefined;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { NativeSelectProps } from './JRCInputSelect.types';
|
|
2
2
|
import type { FieldValues } from 'react-hook-form';
|
|
3
|
-
export declare const JRCInputSelectRaw: <T extends FieldValues = FieldValues>(props: Pick<Partial<NativeSelectProps<T>>, "ref"> & Omit<NativeSelectProps<T>, "ref">) => JSX.Element;
|
|
3
|
+
export declare const JRCInputSelectRaw: <T extends FieldValues = FieldValues, U = any>(props: Pick<Partial<NativeSelectProps<T, U>>, "ref"> & Omit<NativeSelectProps<T, U>, "ref">) => JSX.Element;
|
package/build/src/index.d.ts
CHANGED
|
@@ -82,6 +82,7 @@ export { JRCInputUrl } from './components/Form/Input/JRCInputUrl/JRCInputUrl';
|
|
|
82
82
|
export { JRCInputCommunity } from './components/Form/Input/JRCSelect/JRCAutocompleteCommunity';
|
|
83
83
|
export { JRCInputAudience } from './components/Form/Input/JRCSelect/JRCInputAudience';
|
|
84
84
|
export { JRCInputAutocomplete } from './components/Form/Input/JRCSelect/JRCInputAutocomplete';
|
|
85
|
+
export { JRCInputSelect } from './components/Form/Input/JRCSelect/JRCInputSelect';
|
|
85
86
|
export { JRCInputSelectExtended } from './components/Form/Input/JRCSelect/JRCInputSelectExtended';
|
|
86
87
|
export { JRCInputSelectRaw } from './components/Form/Input/JRCSelect/JRCInputSelectRaw';
|
|
87
88
|
export { JRCInputSelectHierarchicalTree } from './components/Form/Input/JRCSelect/JRCInputSelectHierarchicalTree';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jamespot-react-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.246",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/jamespot-react-components.js",
|
|
6
6
|
"types": "./build/src/index.d.ts",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"chroma-js": "^2.1.1",
|
|
81
81
|
"classnames": "^2.3.1",
|
|
82
82
|
"dompurify": "^3.0.5",
|
|
83
|
-
"jamespot-user-api": "^1.0.
|
|
83
|
+
"jamespot-user-api": "^1.0.219",
|
|
84
84
|
"moment": "2.29.4",
|
|
85
85
|
"react": "^17.x",
|
|
86
86
|
"react-beautiful-dnd": "^13.1.1",
|