jamespot-react-components 1.0.142 → 1.0.144
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 +437 -434
- package/build/jamespot-react-components.js.map +1 -1
- package/build/src/components/Form/Input/JRCInputRichText/JRCInputRichText.d.ts +1 -1
- package/build/src/components/Form/Input/JRCSelect/JRCInputSelect.style.d.ts +3 -12
- package/build/src/components/Form/Input/JRCSelect/JRCInputSelectHierarchicalTree.d.ts +7 -47
- package/build/src/components/Form/Input/JRCSelect/JRCInputSelectList.d.ts +3 -2
- package/build/src/components/Form/Input/JRCSelect/SelectHierarchicalTreeModal.d.ts +15 -0
- package/build/src/components/Form/Input/JRCStyledInput.d.ts +1 -0
- package/build/src/components/JRCAlert/JRCAlert.d.ts +2 -2
- package/build/src/components/JRCButton/JRCButton.d.ts +4 -3
- package/build/src/components/JRCButton/JRCButtonConfig.d.ts +41 -0
- package/build/src/components/JRCButtonDropdown/JRCButtonDropdown.styles.d.ts +1 -1
- package/build/src/components/JRCModal/JRCModal.d.ts +4 -3
- package/build/src/styles/theme.d.ts +1 -1
- package/build/src/types.d.ts +1 -1
- package/package.json +2 -2
- package/pnpm-lock.yaml +20886 -15526
- package/build/src/components/Common/FlexBox.d.ts +0 -10
|
@@ -7,7 +7,7 @@ import { FieldValues } from 'react-hook-form/dist/types';
|
|
|
7
7
|
* validation props: required
|
|
8
8
|
* @returns JSX.Element
|
|
9
9
|
*/
|
|
10
|
-
export declare type FormRichTextFieldToolbarProps = 'font-size' | 'text-color' | 'bold' | 'italic' | 'underline' | 'strikethrough' | 'list-ul' | 'list-ol' | 'align-left' | 'align-center' | 'align-right' | 'align-justify' | 'link' | 'undo' | 'redo';
|
|
10
|
+
export declare type FormRichTextFieldToolbarProps = 'font-size' | 'text-color' | 'bold' | 'italic' | 'underline' | 'strikethrough' | 'list-ul' | 'list-ol' | 'align-left' | 'align-center' | 'align-right' | 'align-justify' | 'link' | 'undo' | 'redo' | 'edit-html';
|
|
11
11
|
export declare type FormRichTextFieldOptionsProps = {
|
|
12
12
|
richTextFixedToolbar: boolean;
|
|
13
13
|
richTextCustomToolbar: Array<FormRichTextFieldToolbarProps>;
|
|
@@ -289,21 +289,12 @@ export declare const InputSelectSearch: import("styled-components").StyledCompon
|
|
|
289
289
|
export declare const OptionSelectCell: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
|
|
290
290
|
isSelected: boolean;
|
|
291
291
|
}, never>;
|
|
292
|
-
export declare const
|
|
293
|
-
export declare const
|
|
292
|
+
export declare const ModalContentInputSelectList: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
293
|
+
export declare const ModalContentInputSelect: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
294
294
|
export declare const FlexBoxTreeDescription: import("styled-components").StyledComponent<"p", import("styled-components").DefaultTheme, {}, never>;
|
|
295
|
-
export declare const FlexBoxTree: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Omit<import("../../../Common/FastCss").FastCssProps, "display"> & {
|
|
296
|
-
direction?: "row" | "column" | "column-reverse" | "row-reverse" | undefined;
|
|
297
|
-
inline?: boolean | undefined;
|
|
298
|
-
flex?: string | boolean | undefined;
|
|
299
|
-
gap?: number | undefined;
|
|
300
|
-
x?: "space-around" | "space-between" | "space-evenly" | "center" | "flex-end" | "flex-start" | undefined;
|
|
301
|
-
y?: "space-around" | "space-between" | "space-evenly" | "center" | "flex-end" | "flex-start" | undefined;
|
|
302
|
-
childFull?: boolean | undefined;
|
|
303
|
-
}, never>;
|
|
304
295
|
export declare const NoResult: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
305
296
|
export declare const WrapperList: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
306
|
-
export declare const
|
|
297
|
+
export declare const ModalContentList: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
307
298
|
export declare const NoOptionList: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Omit<import("../../../Common/FastCss").FastCssProps, "display"> & {
|
|
308
299
|
direction?: "row" | "column" | "column-reverse" | "row-reverse" | undefined;
|
|
309
300
|
inline?: boolean | undefined;
|
|
@@ -1,59 +1,19 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { JRCInputSelectProps } from './JRCInputSelect.types';
|
|
3
3
|
import { JRCModalProps } from 'components/JRCModal/JRCModal';
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
import { AutoCompeteConcept, PagingResults } from 'jamespot-user-api';
|
|
5
|
+
export declare type JRCInputSelectHierarchicalTreeProps = Omit<JRCInputSelectProps, 'asyncPromise'> & JRCModalProps & {
|
|
6
|
+
asyncPromise?: (inputValue: string, page?: number) => Promise<PagingResults<any>>;
|
|
7
|
+
hierarchicalTaxonomyPromise: (uriConcept: string) => Promise<PagingResults<AutoCompeteConcept>>;
|
|
6
8
|
displayModal?: boolean;
|
|
7
9
|
checkboxOptions: Array<{
|
|
8
10
|
label: string;
|
|
9
11
|
value: any;
|
|
10
12
|
}>;
|
|
11
13
|
};
|
|
12
|
-
export declare
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
};
|
|
16
|
-
export declare const JRCInputSelectHierarchicalTree: React.ForwardRefExoticComponent<import("../Common/JRCFormFieldRenderer.types").FieldRenderProps & Required<Pick<import("react-hook-form").UseControllerProps<import("react-hook-form").FieldValues, string>, "name" | "control">> & {
|
|
17
|
-
rules?: import("../Common/useFormControls").FormControls | undefined;
|
|
18
|
-
rulesValidate?: import("react-hook-form").Validate<any> | Record<string, import("react-hook-form").Validate<any>> | undefined;
|
|
19
|
-
margin?: string | undefined;
|
|
20
|
-
width?: string | undefined;
|
|
21
|
-
readOnly?: boolean | undefined;
|
|
22
|
-
} & import("../../../../types/dataAttributes").DataCy & {
|
|
23
|
-
options?: any[] | undefined;
|
|
24
|
-
asyncPromise?: ((inputValue: string, page?: number | undefined) => Promise<any[]>) | undefined;
|
|
25
|
-
multiple?: boolean | undefined;
|
|
26
|
-
getLabel?: string | ((option: any) => any) | undefined;
|
|
27
|
-
getValue?: string | ((option: any) => any) | undefined;
|
|
28
|
-
disabled?: boolean | undefined;
|
|
29
|
-
readOnly?: boolean | undefined;
|
|
30
|
-
placeholder?: string | undefined;
|
|
31
|
-
searchable?: boolean | undefined;
|
|
32
|
-
getSearch?: string | ((option: any) => any) | undefined;
|
|
33
|
-
group?: boolean | undefined;
|
|
34
|
-
getGroup?: string | ((option: any) => any) | undefined;
|
|
35
|
-
views?: ("group" | "user" | "folder" | "community")[] | undefined;
|
|
36
|
-
onConfirm?: ((values: any) => void) | undefined;
|
|
37
|
-
hideSelectedOption?: boolean | undefined;
|
|
38
|
-
hideDeleteIcon?: boolean | undefined;
|
|
39
|
-
displayOption?: boolean | undefined;
|
|
40
|
-
displayIndicator?: boolean | undefined;
|
|
41
|
-
getOptionsSelected?: ((options: any) => void) | undefined;
|
|
42
|
-
setOptionsSelected?: any;
|
|
43
|
-
components?: {
|
|
44
|
-
Option?: React.ComponentType<{
|
|
45
|
-
option: any;
|
|
46
|
-
}> | undefined;
|
|
47
|
-
SelectedOption?: React.ComponentType<{
|
|
48
|
-
option: any;
|
|
49
|
-
}> | undefined;
|
|
50
|
-
} | undefined;
|
|
51
|
-
showAsyncResultOnEmptySearch?: boolean | undefined;
|
|
52
|
-
className?: string | undefined;
|
|
53
|
-
htmlFor?: string | undefined;
|
|
54
|
-
required?: boolean | undefined;
|
|
55
|
-
} & import("./JRCInputSelect.types").IconsProp & JRCModalProps & {
|
|
56
|
-
hierarchicalTaxonomyPromise: (uriConcept: string) => Promise<any[]>;
|
|
14
|
+
export declare const JRCInputSelectHierarchicalTree: React.ForwardRefExoticComponent<Omit<JRCInputSelectProps<import("react-hook-form").FieldValues>, "asyncPromise"> & JRCModalProps & {
|
|
15
|
+
asyncPromise?: ((inputValue: string, page?: number | undefined) => Promise<PagingResults<any>>) | undefined;
|
|
16
|
+
hierarchicalTaxonomyPromise: (uriConcept: string) => Promise<PagingResults<AutoCompeteConcept>>;
|
|
57
17
|
displayModal?: boolean | undefined;
|
|
58
18
|
checkboxOptions: Array<{
|
|
59
19
|
label: string;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { JRCInputSelectProps } from './JRCInputSelect.types';
|
|
2
2
|
import { JRCModalProps } from 'components/JRCModal/JRCModal';
|
|
3
|
-
import { BaseAutocomplete } from 'jamespot-user-api';
|
|
4
|
-
export declare type JRCInputSelectListProps = JRCInputSelectProps & JRCModalProps & {
|
|
3
|
+
import { BaseAutocomplete, PagingResults } from 'jamespot-user-api';
|
|
4
|
+
export declare type JRCInputSelectListProps = Omit<JRCInputSelectProps, 'asyncPromise'> & JRCModalProps & {
|
|
5
|
+
asyncPromise?: (inputValue: string, page?: number) => Promise<PagingResults<any>>;
|
|
5
6
|
displayModal?: boolean;
|
|
6
7
|
setValues: (name: string, values: BaseAutocomplete[]) => void;
|
|
7
8
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { AutoCompeteConcept, PagingResults } from 'jamespot-user-api';
|
|
3
|
+
declare type SelectHierarchicalTreeModalProps = {
|
|
4
|
+
hierarchicalTaxonomyPromise: (uriConcept: string) => Promise<PagingResults<AutoCompeteConcept>>;
|
|
5
|
+
close: () => void;
|
|
6
|
+
inPlace: boolean;
|
|
7
|
+
options: any[];
|
|
8
|
+
updateOptions: (options: any[]) => void;
|
|
9
|
+
};
|
|
10
|
+
export declare type SKOSTree = {
|
|
11
|
+
title: string;
|
|
12
|
+
uri: string;
|
|
13
|
+
};
|
|
14
|
+
declare const SelectHierarchicalTreeModal: React.FC<SelectHierarchicalTreeModalProps>;
|
|
15
|
+
export default SelectHierarchicalTreeModal;
|
|
@@ -6,6 +6,7 @@ import { DataCy } from '../../../types/dataAttributes';
|
|
|
6
6
|
*/
|
|
7
7
|
export declare type IconsProps = {
|
|
8
8
|
hasIconBefore?: boolean;
|
|
9
|
+
hasIconAfter?: boolean;
|
|
9
10
|
};
|
|
10
11
|
export declare const cssCommonStyledInput: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<DataCy & {
|
|
11
12
|
error?: boolean | undefined;
|
|
@@ -3,9 +3,9 @@ import { JRCButtonProps } from 'components/JRCButton/JRCButton';
|
|
|
3
3
|
import { MessageType } from 'components/Common/util/getColor.util';
|
|
4
4
|
export interface JRCAlertProps extends React.ComponentPropsWithoutRef<'div'> {
|
|
5
5
|
/** Alert title */
|
|
6
|
-
label: string;
|
|
6
|
+
label: string | React.ReactNode;
|
|
7
7
|
/** Main content of the alert */
|
|
8
|
-
description?: string;
|
|
8
|
+
description?: string | React.ReactNode;
|
|
9
9
|
/** Define the type of alert */
|
|
10
10
|
type?: MessageType;
|
|
11
11
|
/** Add a loader which will make the alert disappear after the timeout */
|
|
@@ -4,9 +4,10 @@ import { ButtonType } from './JRCButtonConfig';
|
|
|
4
4
|
import { DataCy } from '../../types/dataAttributes';
|
|
5
5
|
import { DashedFocusBorderProps } from '../Common/DashedFocusBorder';
|
|
6
6
|
import { JRCTooltipProps } from '../JRCTooltip/JRCTooltip';
|
|
7
|
+
export declare type ButtonColors = 'primary' | 'valid' | 'danger' | 'secondary' | 'cancel';
|
|
7
8
|
export declare type JRCButtonProps = React.ComponentPropsWithoutRef<'button'> & DataCy & {
|
|
8
9
|
/** Color of the background of the button */
|
|
9
|
-
color?:
|
|
10
|
+
color?: ButtonColors;
|
|
10
11
|
/** Indicates loading of content on the button */
|
|
11
12
|
loader?: boolean;
|
|
12
13
|
/** This Boolean attribute specifies that the button should have input focus when the page loads */
|
|
@@ -39,7 +40,7 @@ export declare const Button: import("styled-components").StyledComponent<"button
|
|
|
39
40
|
hasLabel: boolean;
|
|
40
41
|
} & Pick<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof React.ButtonHTMLAttributes<HTMLButtonElement>> & DataCy & {
|
|
41
42
|
/** Color of the background of the button */
|
|
42
|
-
color?:
|
|
43
|
+
color?: ButtonColors | undefined;
|
|
43
44
|
/** Indicates loading of content on the button */
|
|
44
45
|
loader?: boolean | undefined;
|
|
45
46
|
/** This Boolean attribute specifies that the button should have input focus when the page loads */
|
|
@@ -65,7 +66,7 @@ export declare const Button: import("styled-components").StyledComponent<"button
|
|
|
65
66
|
} & DashedFocusBorderProps, never>;
|
|
66
67
|
export declare const JRCButton: React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof React.ButtonHTMLAttributes<HTMLButtonElement>> & DataCy & {
|
|
67
68
|
/** Color of the background of the button */
|
|
68
|
-
color?:
|
|
69
|
+
color?: ButtonColors | undefined;
|
|
69
70
|
/** Indicates loading of content on the button */
|
|
70
71
|
loader?: boolean | undefined;
|
|
71
72
|
/** This Boolean attribute specifies that the button should have input focus when the page loads */
|
|
@@ -52,6 +52,19 @@ export declare const BUTTON_CONFIG: {
|
|
|
52
52
|
border: string;
|
|
53
53
|
};
|
|
54
54
|
};
|
|
55
|
+
cancel: {
|
|
56
|
+
color: string;
|
|
57
|
+
background: string;
|
|
58
|
+
border: string;
|
|
59
|
+
active: {
|
|
60
|
+
background: string;
|
|
61
|
+
border: string;
|
|
62
|
+
};
|
|
63
|
+
hover: {
|
|
64
|
+
background: string;
|
|
65
|
+
border: string;
|
|
66
|
+
};
|
|
67
|
+
};
|
|
55
68
|
disabled: {
|
|
56
69
|
color: string;
|
|
57
70
|
background: string;
|
|
@@ -119,6 +132,19 @@ export declare const BUTTON_CONFIG: {
|
|
|
119
132
|
border: string;
|
|
120
133
|
};
|
|
121
134
|
};
|
|
135
|
+
cancel: {
|
|
136
|
+
color: string;
|
|
137
|
+
background: string;
|
|
138
|
+
border: string;
|
|
139
|
+
active: {
|
|
140
|
+
background: string;
|
|
141
|
+
border: string;
|
|
142
|
+
};
|
|
143
|
+
hover: {
|
|
144
|
+
background: string;
|
|
145
|
+
border: string;
|
|
146
|
+
};
|
|
147
|
+
};
|
|
122
148
|
disabled: {
|
|
123
149
|
color: string;
|
|
124
150
|
background: string;
|
|
@@ -194,6 +220,21 @@ export declare const BUTTON_CONFIG: {
|
|
|
194
220
|
'text-decoration': string;
|
|
195
221
|
};
|
|
196
222
|
};
|
|
223
|
+
cancel: {
|
|
224
|
+
color: string;
|
|
225
|
+
background: string;
|
|
226
|
+
border: string;
|
|
227
|
+
active: {
|
|
228
|
+
background: string;
|
|
229
|
+
border: string;
|
|
230
|
+
'text-decoration': string;
|
|
231
|
+
};
|
|
232
|
+
hover: {
|
|
233
|
+
background: string;
|
|
234
|
+
border: string;
|
|
235
|
+
'text-decoration': string;
|
|
236
|
+
};
|
|
237
|
+
};
|
|
197
238
|
disabled: {
|
|
198
239
|
color: string;
|
|
199
240
|
background: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ButtonProps, MenuWithTitleProps, DropdownOptionProps } from './JRCButtonDropdown.types';
|
|
3
3
|
export declare const MarginLessJRCButton: import("styled-components").StyledComponent<React.ForwardRefExoticComponent<Pick<React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "key" | keyof React.ButtonHTMLAttributes<HTMLButtonElement>> & import("../../types/dataAttributes").DataCy & {
|
|
4
|
-
color?: "
|
|
4
|
+
color?: import("../JRCButton/JRCButton").ButtonColors | undefined;
|
|
5
5
|
loader?: boolean | undefined;
|
|
6
6
|
autofocus?: boolean | undefined;
|
|
7
7
|
value?: string | undefined;
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import React, { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
+
import { ButtonColors } from '../JRCButton/JRCButton';
|
|
2
3
|
import { ModalBorderRadius } from './JRCModal.styles';
|
|
3
4
|
/**
|
|
4
5
|
* Interface to provide Modal Buttons
|
|
5
|
-
* @member color button color
|
|
6
|
+
* @member color button color ButtonColors
|
|
6
7
|
* @member isClosed optional boolean (default false). If true, when click on the button, the modal is closes
|
|
7
8
|
* @member clickHandler optional, callback when the button is click
|
|
8
9
|
* @member children default ReactNode children in the Modal content
|
|
9
10
|
*/
|
|
10
11
|
export interface JRCModalButtonType extends ComponentPropsWithoutRef<'button'> {
|
|
11
12
|
children: ReactNode;
|
|
12
|
-
color?:
|
|
13
|
+
color?: ButtonColors;
|
|
13
14
|
variant?: 'contained' | 'outlined';
|
|
14
15
|
isClosed?: boolean;
|
|
15
|
-
clickHandler?: () => void
|
|
16
|
+
clickHandler?: () => Promise<void>;
|
|
16
17
|
dataCy?: string;
|
|
17
18
|
}
|
|
18
19
|
/**
|
|
@@ -22,7 +22,7 @@ export declare type Colors = 'primary' | 'secondary' | 'headerColor' | 'headerTe
|
|
|
22
22
|
declare type ThemeConfigColorType = {
|
|
23
23
|
[color in Colors]: string;
|
|
24
24
|
};
|
|
25
|
-
export declare type Shades = 'primaryL15' | 'primaryL80' | 'primaryL90' | 'primaryD20' | 'greenL20' | 'greenL80' | 'greenL90' | 'greenD20' | 'orangeL15' | 'orangeL80' | 'orangeL90' | 'orangeD20';
|
|
25
|
+
export declare type Shades = 'primaryL15' | 'primaryL80' | 'primaryL90' | 'primaryD20' | 'secondaryL15' | 'secondaryL80' | 'secondaryL90' | 'secondaryD20' | 'greenL20' | 'greenL80' | 'greenL90' | 'greenD20' | 'orangeL15' | 'orangeL80' | 'orangeL90' | 'orangeD20';
|
|
26
26
|
declare type ThemeConfigShadeType = {
|
|
27
27
|
[color in Shades]: string;
|
|
28
28
|
};
|
package/build/src/types.d.ts
CHANGED
|
@@ -49,7 +49,7 @@ export { JRCInputCheckboxProps, InputCheckboxProps, CheckboxValue, CheckboxOptio
|
|
|
49
49
|
export { JRCInputDateProps } from './components/Form/Input/JRCInputDate/JRCInputDate';
|
|
50
50
|
export { JRCInputFileProps } from './components/Form/Input/JRCInputFile/JRCInputFile';
|
|
51
51
|
export { JRCInputImageProps } from './components/Form/Input/JRCInputImage/JRCInputImage';
|
|
52
|
-
export { JRCInputFieldProps } from './components/Form/Input/Common/JRCFormFieldRenderer.types';
|
|
52
|
+
export { JRCInputFieldProps, NameControl } from './components/Form/Input/Common/JRCFormFieldRenderer.types';
|
|
53
53
|
export { JRCInputSelectProps } from './components/Form/Input/JRCSelect/JRCInputSelect.types';
|
|
54
54
|
export { JRCInputTextareaProps } from './components/Form/Input/JRCInputTextarea/JRCInputTextarea';
|
|
55
55
|
export { JRCInputTextProps } from './components/Form/Input/JRCInputText/JRCInputText';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jamespot-react-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.144",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/jamespot-react-components.js",
|
|
6
6
|
"types": "./build/src/index.d.ts",
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"chroma-js": "^2.1.1",
|
|
108
108
|
"classnames": "^2.3.1",
|
|
109
109
|
"dompurify": "^3.0.5",
|
|
110
|
-
"jamespot-user-api": "^1.0.
|
|
110
|
+
"jamespot-user-api": "^1.0.114",
|
|
111
111
|
"moment": "^2.29.1",
|
|
112
112
|
"react": "^17.x",
|
|
113
113
|
"react-beautiful-dnd": "^13.1.1",
|