jamespot-react-components 1.0.136 → 1.0.137
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 +977 -858
- package/build/jamespot-react-components.js.map +1 -1
- package/build/src/components/Common/FastCss.d.ts +1 -0
- package/build/src/components/Form/Input/Common/JRCFormFieldRenderer.types.d.ts +2 -0
- package/build/src/components/Form/Input/JRCFormCheckbox/JRCCheckbox.d.ts +3 -3
- package/build/src/components/Form/Input/JRCFormCheckbox/JRCRadio.d.ts +3 -3
- package/build/src/components/Form/Input/JRCFormCheckbox/JRCToggle.d.ts +0 -3
- package/build/src/components/Form/Input/JRCFormFieldRender.d.ts +1 -0
- package/build/src/components/Form/Input/JRCFormRichText/JRCFormRichEditorField.styles.d.ts +1 -0
- package/build/src/components/Form/Input/JRCFormRichText/JRCFormRichTextField.d.ts +2 -0
- package/build/src/components/Form/Input/JRCFormTextarea/JRCFormTextarea.d.ts +1 -0
- package/build/src/components/Form/Input/JRCInputCheckbox/JRCInputCheckbox.d.ts +4 -1
- package/build/src/components/Form/Input/JRCInputCheckbox/JRCInputCheckbox.utils.d.ts +1 -0
- package/build/src/components/Form/Input/JRCInputCheckbox/JRCInputReorderCheckbox.d.ts +21 -0
- package/build/src/components/Form/Input/JRCInputCheckbox/JRCInputReorderCheckbox.stories.d.ts +5 -0
- package/build/src/components/Form/Input/JRCInputImage/JRCInputImage.d.ts +5 -1
- package/build/src/components/Form/Input/JRCInputImage/JRCInputImage.styles.d.ts +1 -0
- package/build/src/components/Form/Input/JRCInputText/JRCInputText.d.ts +3 -0
- package/build/src/components/Form/Input/JRCInputText/JRCInputText.stories.d.ts +2 -0
- package/build/src/components/Form/Input/JRCInputText/JRCInputText.style.d.ts +2 -0
- package/build/src/components/Form/Input/JRCInputTextarea/JRCInputTextarea.d.ts +1 -0
- package/build/src/components/Form/Input/JRCInputUrl/JRCInputUrl.d.ts +19 -0
- package/build/src/components/Form/Input/JRCInputUrl/JRCInputUrl.stories.d.ts +7 -0
- package/build/src/components/Form/Input/JRCSelect/JRCInputSelect.style.d.ts +8 -5
- package/build/src/components/Form/Input/JRCSelect/JRCInputSelect.types.d.ts +2 -0
- package/build/src/components/Form/Input/JRCSelect/JRCInputSelectHierarchicalTree.d.ts +3 -0
- package/build/src/components/Form/Input/JRCStyledInput.d.ts +3 -0
- package/build/src/components/JRCAvatar/JRCAvatar.d.ts +1 -0
- package/build/src/components/JRCFlex/JRCFlexBox.d.ts +4 -4
- package/build/src/components/JRCImg/JRCImg.d.ts +2 -0
- package/build/src/index.d.ts +2 -0
- package/build/src/types.d.ts +1 -0
- package/build/src/utils/utils.array.d.ts +13 -1
- package/build/src/utils/utils.object.d.ts +8 -1
- package/package.json +2 -2
|
@@ -2,5 +2,6 @@ export declare type FastCssProps = {
|
|
|
2
2
|
position?: 'static' | 'relative' | 'absolute' | 'fixed' | 'sticky';
|
|
3
3
|
display?: 'inline' | 'block' | 'flex' | 'grid' | 'inline-block' | 'inline-flex' | 'inline-grid';
|
|
4
4
|
margin?: string;
|
|
5
|
+
padding?: string;
|
|
5
6
|
};
|
|
6
7
|
export declare const FastCss: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<FastCssProps, import("styled-components").DefaultTheme>>;
|
|
@@ -41,6 +41,7 @@ export declare type JRCFormFieldRendererProps<T extends FieldValues = FieldValue
|
|
|
41
41
|
rulesValidate?: RegisterOptions<T>['validate'];
|
|
42
42
|
margin?: string | undefined;
|
|
43
43
|
width?: string | undefined;
|
|
44
|
+
readOnly?: boolean;
|
|
44
45
|
};
|
|
45
46
|
/**
|
|
46
47
|
* Prop types for an input rendered by react-hook-form
|
|
@@ -50,4 +51,5 @@ export declare type JRCInputFieldProps<T extends FieldValues = FieldValues> = Fi
|
|
|
50
51
|
rulesValidate?: RegisterOptions<T>['validate'];
|
|
51
52
|
margin?: string | undefined;
|
|
52
53
|
width?: string | undefined;
|
|
54
|
+
readOnly?: boolean;
|
|
53
55
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { FormInputProps } from '../JRCFormFieldRender';
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
} & FormInputProps, "type">;
|
|
3
|
+
export declare const CheckboxWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
+
export declare const JRCCheckbox: React.ForwardRefExoticComponent<FormInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { FormInputProps } from '../JRCFormFieldRender';
|
|
2
|
-
export declare const
|
|
3
|
-
|
|
4
|
-
} & FormInputProps, "type">;
|
|
3
|
+
export declare const RadioWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
+
export declare const JRCRadio: React.ForwardRefExoticComponent<FormInputProps & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -55,6 +55,7 @@ export interface ExternalFormFieldRenderProps {
|
|
|
55
55
|
export declare type InputState = DataCy & {
|
|
56
56
|
error?: boolean;
|
|
57
57
|
valid?: boolean;
|
|
58
|
+
readOnly?: boolean;
|
|
58
59
|
};
|
|
59
60
|
export declare const StyledDescription: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
60
61
|
size: string;
|
|
@@ -12,4 +12,5 @@ export declare function FontSizeSelect(props: {
|
|
|
12
12
|
export declare const FixedMenuWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
13
13
|
export declare const MenuWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
14
14
|
export declare const Spacer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
15
|
+
export declare const ReadOnlyBorder: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
15
16
|
export declare function SimpleInputColor(props: React.ComponentPropsWithoutRef<'input'>): JSX.Element;
|
|
@@ -24,6 +24,7 @@ export declare type FormRichTextFieldProps = {
|
|
|
24
24
|
onFocus: EventHandler<React.FocusEvent>;
|
|
25
25
|
onBlur: EventOrValueHandler<React.FocusEvent>;
|
|
26
26
|
onChange: (value: RichTextValue) => void;
|
|
27
|
+
readOnly?: boolean;
|
|
27
28
|
} & DataCy;
|
|
28
29
|
/**
|
|
29
30
|
* This component is used with redux-form (studio) and with react-hook-form!!
|
|
@@ -35,6 +36,7 @@ export declare const FormRichTextField: React.ForwardRefExoticComponent<{
|
|
|
35
36
|
onFocus: EventHandler<React.FocusEvent>;
|
|
36
37
|
onBlur: EventOrValueHandler<React.FocusEvent>;
|
|
37
38
|
onChange: (value: RichTextValue) => void;
|
|
39
|
+
readOnly?: boolean | undefined;
|
|
38
40
|
} & DataCy & {
|
|
39
41
|
inplace?: boolean | undefined;
|
|
40
42
|
isComponentVisible?: boolean | undefined;
|
|
@@ -14,6 +14,7 @@ export interface TextareaFormInputProps extends Omit<React.ComponentPropsWithout
|
|
|
14
14
|
export declare const JRCFormTextarea: import("styled-components").StyledComponent<"textarea", import("styled-components").DefaultTheme, import("../../../../types/dataAttributes").DataCy & {
|
|
15
15
|
error?: boolean | undefined;
|
|
16
16
|
valid?: boolean | undefined;
|
|
17
|
+
readOnly?: boolean | undefined;
|
|
17
18
|
}, never>;
|
|
18
19
|
/**
|
|
19
20
|
* Component used as a textarea
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import { ControllerRenderProps } from 'react-hook-form/dist/types/controller';
|
|
3
3
|
import { DataCy } from '../../../../types/dataAttributes';
|
|
4
4
|
import { JRCInputFieldProps } from '../Common/JRCFormFieldRenderer.types';
|
|
@@ -22,11 +22,14 @@ export declare type CheckboxProps<TFieldValues> = DataCy & {
|
|
|
22
22
|
valueTypeIsBoolean?: boolean;
|
|
23
23
|
setOptionsChecked?: (string | number | TFieldValues)[] | undefined;
|
|
24
24
|
getOptionsChecked?: (options: (string | number | TFieldValues)[] | undefined) => void;
|
|
25
|
+
readOnly?: boolean;
|
|
26
|
+
getReadOnlyLabel?: (value: TFieldValues) => React.ReactNode;
|
|
25
27
|
};
|
|
26
28
|
export declare type JRCInputCheckboxProps<TFieldValues extends FieldValues = FieldValues> = CheckboxProps<TFieldValues> & JRCInputFieldProps<TFieldValues>;
|
|
27
29
|
export declare type NativeCheckboxProps<TFieldValues extends FieldValues = FieldValues> = CheckboxProps<TFieldValues> & Omit<ControllerRenderProps<TFieldValues>, 'value'> & {
|
|
28
30
|
value: TFieldValues | TFieldValues[];
|
|
29
31
|
};
|
|
32
|
+
export declare const ReadOnlyUl: import("styled-components").StyledComponent<"ul", import("styled-components").DefaultTheme, {}, never>;
|
|
30
33
|
export declare function JRCInputCheckbox<TFieldValues extends FieldValues = FieldValues>({ name, control, rules, label, htmlFor, labelIsLegend, description, helper, ...props }: JRCInputCheckboxProps<TFieldValues>): JSX.Element;
|
|
31
34
|
export declare namespace JRCInputCheckbox {
|
|
32
35
|
var defaultProps: {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getNewValue<Value>(value: number[] | string[] | Value[] | undefined, optionValue: string | number | Value, checked: boolean): (string | number | Value)[] | undefined;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ControllerRenderProps } from 'react-hook-form/dist/types/controller';
|
|
3
|
+
import { DataCy } from '../../../../types/dataAttributes';
|
|
4
|
+
import { JRCInputFieldProps } from '../Common/JRCFormFieldRenderer.types';
|
|
5
|
+
import { FieldValues } from 'react-hook-form/dist/types';
|
|
6
|
+
declare type CheckboxOption<TFieldValues> = {
|
|
7
|
+
label: string | JSX.Element;
|
|
8
|
+
value: string | number | TFieldValues;
|
|
9
|
+
};
|
|
10
|
+
export declare type CheckboxProps<TFieldValues> = DataCy & {
|
|
11
|
+
options: Array<CheckboxOption<TFieldValues>>;
|
|
12
|
+
readOnly?: boolean;
|
|
13
|
+
getLabel?: (option: CheckboxOption<TFieldValues>) => React.ReactNode;
|
|
14
|
+
canReorder?: boolean;
|
|
15
|
+
};
|
|
16
|
+
export declare type JRCInputCheckboxProps<TFieldValues extends FieldValues = FieldValues> = CheckboxProps<TFieldValues> & JRCInputFieldProps<TFieldValues>;
|
|
17
|
+
export declare type NativeCheckboxProps<TFieldValues extends FieldValues = FieldValues> = CheckboxProps<TFieldValues> & Omit<ControllerRenderProps<TFieldValues>, 'value'> & {
|
|
18
|
+
value: TFieldValues[];
|
|
19
|
+
};
|
|
20
|
+
export declare function JRCInputReorderCheckbox<TFieldValues extends FieldValues = FieldValues>({ name, control, rules, label, htmlFor, labelIsLegend, description, helper, margin, ...props }: JRCInputCheckboxProps<TFieldValues>): JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/react';
|
|
2
|
+
import { JRCInputCheckboxProps } from './JRCInputReorderCheckbox';
|
|
3
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const InputReorderCheckbox: Story<JRCInputCheckboxProps<any>>;
|
|
@@ -15,7 +15,11 @@ export declare type NativeInputImageProps = DataCy & Omit<React.ComponentPropsWi
|
|
|
15
15
|
position?: 'right' | 'bottom';
|
|
16
16
|
columnCount: number;
|
|
17
17
|
};
|
|
18
|
-
|
|
18
|
+
readOnly?: boolean;
|
|
19
|
+
readOnlyImg?: string;
|
|
20
|
+
value: undefined | (FileResponse & {
|
|
21
|
+
timestamp?: string | number;
|
|
22
|
+
});
|
|
19
23
|
onChange: (files: undefined | FileResponse) => void;
|
|
20
24
|
};
|
|
21
25
|
export declare type JRCInputImageProps<T extends FieldValues = FieldValues> = JRCInputFieldProps<T> & Omit<NativeInputImageProps, 'value' | 'onChange'>;
|
|
@@ -6,6 +6,7 @@ export declare const DropZone: import("styled-components").StyledComponent<"div"
|
|
|
6
6
|
position?: "right" | "bottom" | undefined;
|
|
7
7
|
columnCount: number;
|
|
8
8
|
}, never>;
|
|
9
|
+
export declare const ReadOnlyImg: import("styled-components").StyledComponent<"img", import("styled-components").DefaultTheme, {}, never>;
|
|
9
10
|
export declare const DropZoneButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {
|
|
10
11
|
aspectRatio?: number | undefined;
|
|
11
12
|
}, never>;
|
|
@@ -5,6 +5,9 @@ import { FieldValues } from 'react-hook-form/dist/types';
|
|
|
5
5
|
export declare type JRCInputTextProps = DataCy & React.ComponentPropsWithoutRef<'input'> & {
|
|
6
6
|
width?: string;
|
|
7
7
|
};
|
|
8
|
+
export declare const RenderInput: React.ForwardRefExoticComponent<DataCy & Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
|
|
9
|
+
width?: string | undefined;
|
|
10
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
8
11
|
/**
|
|
9
12
|
* Component used as a <input type="text"/>
|
|
10
13
|
* @param props JRCInputFieldProps
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import { JRCInputFieldProps } from '../Common/JRCFormFieldRenderer.types';
|
|
2
3
|
import { Meta, Story } from '@storybook/react';
|
|
3
4
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
@@ -6,3 +7,4 @@ export declare const InputText: Story<JRCInputFieldProps<{
|
|
|
6
7
|
text: string;
|
|
7
8
|
}>>;
|
|
8
9
|
export declare const InputTextIconButton: any;
|
|
10
|
+
export declare const AllInputs: () => JSX.Element;
|
|
@@ -27,11 +27,13 @@ export declare const IconAfter: import("styled-components").StyledComponent<{
|
|
|
27
27
|
export declare const InputIconButton: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, import("../../../../types/dataAttributes").DataCy & {
|
|
28
28
|
error?: boolean | undefined;
|
|
29
29
|
valid?: boolean | undefined;
|
|
30
|
+
readOnly?: boolean | undefined;
|
|
30
31
|
} & {
|
|
31
32
|
hasIconButtonAfter: boolean;
|
|
32
33
|
}, never>;
|
|
33
34
|
export declare const InputTextStyled: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, import("../../../../types/dataAttributes").DataCy & {
|
|
34
35
|
error?: boolean | undefined;
|
|
35
36
|
valid?: boolean | undefined;
|
|
37
|
+
readOnly?: boolean | undefined;
|
|
36
38
|
}, never>;
|
|
37
39
|
export declare const ContainerInputTextIconButton: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -6,6 +6,7 @@ export declare type JRCInputTextareaProps = DataCy & React.ComponentPropsWithout
|
|
|
6
6
|
export declare const StyledTextArea: import("styled-components").StyledComponent<"textarea", import("styled-components").DefaultTheme, DataCy & {
|
|
7
7
|
error?: boolean | undefined;
|
|
8
8
|
valid?: boolean | undefined;
|
|
9
|
+
readOnly?: boolean | undefined;
|
|
9
10
|
}, never>;
|
|
10
11
|
/**
|
|
11
12
|
* Component used as a <input type="text"/>
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { JRCInputFieldProps } from '../Common/JRCFormFieldRenderer.types';
|
|
3
|
+
import { DataCy } from '../../../../types/dataAttributes';
|
|
4
|
+
import { FieldValues } from 'react-hook-form/dist/types';
|
|
5
|
+
export declare type JRCInputUrlProps = DataCy & React.ComponentPropsWithoutRef<'input'> & {
|
|
6
|
+
width?: string;
|
|
7
|
+
};
|
|
8
|
+
export declare const RenderInput: React.ForwardRefExoticComponent<DataCy & Pick<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "key" | keyof React.InputHTMLAttributes<HTMLInputElement>> & {
|
|
9
|
+
width?: string | undefined;
|
|
10
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
11
|
+
/**
|
|
12
|
+
* Component used as a <input type="url"/>
|
|
13
|
+
* @param props JRCInputFieldProps
|
|
14
|
+
* validation props: required
|
|
15
|
+
* @returns JSX.Element
|
|
16
|
+
*/
|
|
17
|
+
export declare function JRCInputUrl<T extends FieldValues = FieldValues>(props: JRCInputFieldProps<T> & {
|
|
18
|
+
width?: string;
|
|
19
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { JRCInputFieldProps } from '../Common/JRCFormFieldRenderer.types';
|
|
2
|
+
import { Meta, Story } from '@storybook/react';
|
|
3
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const InputUrl: Story<JRCInputFieldProps<{
|
|
6
|
+
url: string;
|
|
7
|
+
}>>;
|
|
@@ -296,8 +296,8 @@ export declare const FlexBoxTree: import("styled-components").StyledComponent<"d
|
|
|
296
296
|
inline?: boolean | undefined;
|
|
297
297
|
flex?: string | boolean | undefined;
|
|
298
298
|
gap?: number | undefined;
|
|
299
|
-
x?: "center" | "flex-end" | "flex-start" | undefined;
|
|
300
|
-
y?: "center" | "flex-end" | "flex-start" | undefined;
|
|
299
|
+
x?: "space-around" | "space-between" | "space-evenly" | "center" | "flex-end" | "flex-start" | undefined;
|
|
300
|
+
y?: "space-around" | "space-between" | "space-evenly" | "center" | "flex-end" | "flex-start" | undefined;
|
|
301
301
|
childFull?: boolean | undefined;
|
|
302
302
|
}, never>;
|
|
303
303
|
export declare const NoResult: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -308,8 +308,8 @@ export declare const NoOptionList: import("styled-components").StyledComponent<"
|
|
|
308
308
|
inline?: boolean | undefined;
|
|
309
309
|
flex?: string | boolean | undefined;
|
|
310
310
|
gap?: number | undefined;
|
|
311
|
-
x?: "center" | "flex-end" | "flex-start" | undefined;
|
|
312
|
-
y?: "center" | "flex-end" | "flex-start" | undefined;
|
|
311
|
+
x?: "space-around" | "space-between" | "space-evenly" | "center" | "flex-end" | "flex-start" | undefined;
|
|
312
|
+
y?: "space-around" | "space-between" | "space-evenly" | "center" | "flex-end" | "flex-start" | undefined;
|
|
313
313
|
childFull?: boolean | undefined;
|
|
314
314
|
}, never>;
|
|
315
315
|
export declare const IconBefore: import("styled-components").StyledComponent<({ color, variant, name, size, isMargin, className, }: import("../../../JRCIcon/JRCIcon").JRCIconProps) => JSX.Element, import("styled-components").DefaultTheme, {
|
|
@@ -317,8 +317,11 @@ export declare const IconBefore: import("styled-components").StyledComponent<({
|
|
|
317
317
|
top?: number | undefined;
|
|
318
318
|
height?: number | undefined;
|
|
319
319
|
}, never>;
|
|
320
|
+
export declare const TimesIndicator: ({ onClick }: {
|
|
321
|
+
onClick?: (() => void) | undefined;
|
|
322
|
+
}) => JSX.Element;
|
|
320
323
|
export declare const DropdownIndicator: ({ loading, open, onClick, }: {
|
|
321
324
|
loading: boolean;
|
|
322
325
|
open: boolean;
|
|
323
|
-
onClick
|
|
326
|
+
onClick?: (() => void) | undefined;
|
|
324
327
|
}) => JSX.Element;
|
|
@@ -24,6 +24,7 @@ export declare type SelectProps = DataCy & {
|
|
|
24
24
|
getLabel?: ((option: any) => any) | string;
|
|
25
25
|
getValue?: ((option: any) => any) | string;
|
|
26
26
|
disabled?: boolean;
|
|
27
|
+
readOnly?: boolean;
|
|
27
28
|
placeholder?: string;
|
|
28
29
|
searchable?: boolean;
|
|
29
30
|
getSearch?: ((option: any) => any) | string;
|
|
@@ -32,6 +33,7 @@ export declare type SelectProps = DataCy & {
|
|
|
32
33
|
views?: Array<'folder' | 'user' | 'group' | 'community'>;
|
|
33
34
|
onConfirm?: (values: any) => void;
|
|
34
35
|
hideSelectedOption?: boolean;
|
|
36
|
+
hideDeleteIcon?: boolean;
|
|
35
37
|
displayOption?: boolean;
|
|
36
38
|
displayIndicator?: boolean;
|
|
37
39
|
getOptionsSelected?: (options: any) => void;
|
|
@@ -18,6 +18,7 @@ export declare const JRCInputSelectHierarchicalTree: React.ForwardRefExoticCompo
|
|
|
18
18
|
rulesValidate?: import("react-hook-form").Validate<any> | Record<string, import("react-hook-form").Validate<any>> | undefined;
|
|
19
19
|
margin?: string | undefined;
|
|
20
20
|
width?: string | undefined;
|
|
21
|
+
readOnly?: boolean | undefined;
|
|
21
22
|
} & import("../../../../types/dataAttributes").DataCy & {
|
|
22
23
|
options?: any[] | undefined;
|
|
23
24
|
asyncPromise?: ((inputValue: string, page?: number | undefined) => Promise<any[]>) | undefined;
|
|
@@ -25,6 +26,7 @@ export declare const JRCInputSelectHierarchicalTree: React.ForwardRefExoticCompo
|
|
|
25
26
|
getLabel?: string | ((option: any) => any) | undefined;
|
|
26
27
|
getValue?: string | ((option: any) => any) | undefined;
|
|
27
28
|
disabled?: boolean | undefined;
|
|
29
|
+
readOnly?: boolean | undefined;
|
|
28
30
|
placeholder?: string | undefined;
|
|
29
31
|
searchable?: boolean | undefined;
|
|
30
32
|
getSearch?: string | ((option: any) => any) | undefined;
|
|
@@ -33,6 +35,7 @@ export declare const JRCInputSelectHierarchicalTree: React.ForwardRefExoticCompo
|
|
|
33
35
|
views?: ("group" | "user" | "folder" | "community")[] | undefined;
|
|
34
36
|
onConfirm?: ((values: any) => void) | undefined;
|
|
35
37
|
hideSelectedOption?: boolean | undefined;
|
|
38
|
+
hideDeleteIcon?: boolean | undefined;
|
|
36
39
|
displayOption?: boolean | undefined;
|
|
37
40
|
displayIndicator?: boolean | undefined;
|
|
38
41
|
getOptionsSelected?: ((options: any) => void) | undefined;
|
|
@@ -10,11 +10,13 @@ export declare type IconsProps = {
|
|
|
10
10
|
export declare const cssCommonStyledInput: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<DataCy & {
|
|
11
11
|
error?: boolean | undefined;
|
|
12
12
|
valid?: boolean | undefined;
|
|
13
|
+
readOnly?: boolean | undefined;
|
|
13
14
|
} & IconsProps, import("styled-components").DefaultTheme>>;
|
|
14
15
|
export declare const cssStyledInput: import("styled-components").FlattenInterpolation<import("styled-components").ThemedStyledProps<InputState, import("styled-components").DefaultTheme>>;
|
|
15
16
|
export declare const StyledInput: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, DataCy & {
|
|
16
17
|
error?: boolean | undefined;
|
|
17
18
|
valid?: boolean | undefined;
|
|
19
|
+
readOnly?: boolean | undefined;
|
|
18
20
|
}, never>;
|
|
19
21
|
export declare type StyledSelectProps = DataCy & IconsProps & {
|
|
20
22
|
searchable?: boolean;
|
|
@@ -22,6 +24,7 @@ export declare type StyledSelectProps = DataCy & IconsProps & {
|
|
|
22
24
|
export declare const StyledSelect: import("styled-components").StyledComponent<"input", import("styled-components").DefaultTheme, DataCy & {
|
|
23
25
|
error?: boolean | undefined;
|
|
24
26
|
valid?: boolean | undefined;
|
|
27
|
+
readOnly?: boolean | undefined;
|
|
25
28
|
} & IconsProps & {
|
|
26
29
|
searchable?: boolean | undefined;
|
|
27
30
|
}, never>;
|
|
@@ -4,8 +4,8 @@ declare type FlexBoxProps = Omit<FastCssProps, 'display'> & {
|
|
|
4
4
|
inline?: boolean;
|
|
5
5
|
flex?: boolean | string;
|
|
6
6
|
gap?: number;
|
|
7
|
-
x?: 'flex-start' | 'center' | 'flex-end';
|
|
8
|
-
y?: 'flex-start' | 'center' | 'flex-end';
|
|
7
|
+
x?: 'flex-start' | 'center' | 'flex-end' | 'space-around' | 'space-between' | 'space-evenly';
|
|
8
|
+
y?: 'flex-start' | 'center' | 'flex-end' | 'space-around' | 'space-between' | 'space-evenly';
|
|
9
9
|
childFull?: boolean;
|
|
10
10
|
};
|
|
11
11
|
export declare const JRCFlexBox: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Omit<FastCssProps, "display"> & {
|
|
@@ -13,8 +13,8 @@ export declare const JRCFlexBox: import("styled-components").StyledComponent<"di
|
|
|
13
13
|
inline?: boolean | undefined;
|
|
14
14
|
flex?: string | boolean | undefined;
|
|
15
15
|
gap?: number | undefined;
|
|
16
|
-
x?: "center" | "flex-end" | "flex-start" | undefined;
|
|
17
|
-
y?: "center" | "flex-end" | "flex-start" | undefined;
|
|
16
|
+
x?: "space-around" | "space-between" | "space-evenly" | "center" | "flex-end" | "flex-start" | undefined;
|
|
17
|
+
y?: "space-around" | "space-between" | "space-evenly" | "center" | "flex-end" | "flex-start" | undefined;
|
|
18
18
|
childFull?: boolean | undefined;
|
|
19
19
|
}, never>;
|
|
20
20
|
export declare type JRCFlexBoxProps = FlexBoxProps & {
|
package/build/src/index.d.ts
CHANGED
|
@@ -90,6 +90,7 @@ export { JRCInputDate } from './components/Form/Input/JRCInputDate/JRCInputDate'
|
|
|
90
90
|
export { JRCInputEmail } from './components/Form/Input/JRCFormEmail/JRCInputEmail';
|
|
91
91
|
export { JRCInputFile } from './components/Form/Input/JRCInputFile/JRCInputFile';
|
|
92
92
|
export { JRCInputImage } from './components/Form/Input/JRCInputImage/JRCInputImage';
|
|
93
|
+
export { JRCInputReorderCheckbox } from './components/Form/Input/JRCInputCheckbox/JRCInputReorderCheckbox';
|
|
93
94
|
export { JRCInputRichText } from './components/Form/Input/JRCInputRichText/JRCInputRichText';
|
|
94
95
|
export { JRCInputSelect } from './components/Form/Input/JRCSelect/JRCInputSelect';
|
|
95
96
|
export { JRCInputSelectHierarchicalTree } from './components/Form/Input/JRCSelect/JRCInputSelectHierarchicalTree';
|
|
@@ -98,6 +99,7 @@ export { JRCInputText } from './components/Form/Input/JRCInputText/JRCInputText'
|
|
|
98
99
|
export { JRCInputTextIconButton } from './components/Form/Input/JRCInputText/JRCInputTextIconButton';
|
|
99
100
|
export { JRCInputTextarea } from './components/Form/Input/JRCInputTextarea/JRCInputTextarea';
|
|
100
101
|
export { JRCInputTime } from './components/Form/Input/JRCInputTime/JRCInputTime';
|
|
102
|
+
export { JRCInputUrl } from './components/Form/Input/JRCInputUrl/JRCInputUrl';
|
|
101
103
|
export { JRCList } from './components/JRCList/JRCList';
|
|
102
104
|
export { JRCLoader } from './components/JRCLoader/JRCLoader';
|
|
103
105
|
export { JRCMainColumn } from './components/Templates/JRCMainColumn';
|
package/build/src/types.d.ts
CHANGED
|
@@ -55,6 +55,7 @@ export { JRCInputTextareaProps } from './components/Form/Input/JRCInputTextarea/
|
|
|
55
55
|
export { JRCInputTextProps } from './components/Form/Input/JRCInputText/JRCInputText';
|
|
56
56
|
export { JRCInputTextIconButtonProps } from './components/Form/Input/JRCInputText/JRCInputTextIconButton';
|
|
57
57
|
export { JRCInputTimeProps } from './components/Form/Input/JRCInputTime/JRCInputTime';
|
|
58
|
+
export { JRCInputUrlProps } from './components/Form/Input/JRCInputUrl/JRCInputUrl';
|
|
58
59
|
export { JRCLinkToProps, JRCStyledHrefProps } from './components/JRCHref/JRCHref';
|
|
59
60
|
export { JRCListProps, PaginationPagination } from './components/JRCList/JRCList';
|
|
60
61
|
export { JRCLoaderProps } from './components/JRCLoader/JRCLoader';
|
|
@@ -2,9 +2,21 @@ declare type Uri = {
|
|
|
2
2
|
uri: string;
|
|
3
3
|
};
|
|
4
4
|
export declare const inArray: <T extends Uri>(arr: T[], value: T) => boolean;
|
|
5
|
+
/**
|
|
6
|
+
* If the element exists, removes it, otherwise adds it
|
|
7
|
+
* @param arr array of objects with a uri
|
|
8
|
+
* @param value object with a uri
|
|
9
|
+
* @returns
|
|
10
|
+
*/
|
|
5
11
|
export declare const updateArray: <T extends Uri>(arr: T[], value: T) => T[];
|
|
12
|
+
/**
|
|
13
|
+
* Merge and dedupe objects based on their uri
|
|
14
|
+
* @param arr1 array of objects with a uri
|
|
15
|
+
* @param arr2 array of objects with a uri
|
|
16
|
+
* @returns
|
|
17
|
+
*/
|
|
6
18
|
export declare const arrayUniqueByUri: <T extends {
|
|
7
19
|
uri: string;
|
|
8
20
|
}>(arr1: T[], arr2: T[]) => T[];
|
|
9
|
-
export declare const arraySwapElements: (arr:
|
|
21
|
+
export declare const arraySwapElements: <T>(arr: T[], index1: number, index2: number) => T[];
|
|
10
22
|
export {};
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
export
|
|
1
|
+
export { deepEqual } from 'jamespot-user-api';
|
|
2
2
|
export declare function objectRemoveProperty(obj: Record<string, unknown>, prop: string): Record<string, unknown>;
|
|
3
|
+
/**
|
|
4
|
+
* parse and catch the JSON.parse
|
|
5
|
+
* @param str value to parse
|
|
6
|
+
* @param defaultValue default value in case of the JSON.parse fails
|
|
7
|
+
* @returns
|
|
8
|
+
*/
|
|
9
|
+
export declare function parse<T>(str: string, defaultValue: T): T;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jamespot-react-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.137",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/jamespot-react-components.js",
|
|
6
6
|
"types": "./build/src/index.d.ts",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"@tiptap/starter-kit": "^2.0.0-beta.203",
|
|
102
102
|
"chroma-js": "^2.1.1",
|
|
103
103
|
"classnames": "^2.3.1",
|
|
104
|
-
"jamespot-user-api": "^1.0.
|
|
104
|
+
"jamespot-user-api": "^1.0.107",
|
|
105
105
|
"moment": "^2.29.1",
|
|
106
106
|
"react": "^17.x",
|
|
107
107
|
"react-beautiful-dnd": "^13.1.1",
|