jamespot-react-components 1.0.166 → 1.0.168
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 +871 -707
- package/build/jamespot-react-components.js.map +1 -1
- package/build/src/components/Editors/components/Editor.style.d.ts +3 -0
- package/build/src/components/Editors/components/EditorImageUpload.d.ts +10 -0
- package/build/src/components/Editors/components/EditorInputImage.d.ts +8 -0
- package/build/src/components/Editors/components/EditorSelect.d.ts +2 -1
- package/build/src/components/Form/Input/JRCInputDateTime/JRCInputDateTIme.stories.d.ts +7 -0
- package/build/src/components/Form/Input/JRCInputDateTime/JRCInputDateTime.d.ts +15 -0
- package/build/src/components/Form/Input/JRCInputText/JRCInputText.d.ts +24 -2
- package/build/src/components/Form/Input/JRCInputTinyMCE/JRCInputTinyMCE.d.ts +11 -1
- package/build/src/components/Form/Input/JRCInputTinyMCE/extensions/JIAExtension/JIATextGenerationExtension.d.ts +7 -0
- package/build/src/components/Form/Input/JRCInputTinyMCE/extensions/JTinyMCEExtensions.d.ts +3 -1
- package/build/src/components/JRCButtonDropdown/JRCButtonDropdown.types.d.ts +1 -0
- package/build/src/components/JRCCard/JRCCardImg.d.ts +1 -0
- package/build/src/components/JRCFlex/JRCFlexBox.d.ts +1 -1
- package/build/src/components/JRCTypography/JRCTypography.styles.d.ts +1 -1
- package/build/src/components/Widgets/JRCWidgetArticleAttachment/JRCWidgetArticleAttachmentEditor.d.ts +3 -3
- package/build/src/components/Widgets/JRCWidgetArticleButton/JRCWidgetArticleButton.d.ts +13 -4
- package/build/src/components/Widgets/JRCWidgetArticleButton/JRCWidgetArticleButton.stories.d.ts +4 -0
- package/build/src/components/Widgets/JRCWidgetArticleButton/JRCWidgetArticleButtonEditor.d.ts +3 -3
- package/build/src/components/Widgets/JRCWidgetArticleGallery/JRCWidgetArticleGalleryEditor.d.ts +3 -3
- package/build/src/components/Widgets/JRCWidgetArticleImage/JRCWidgetArticleImage.d.ts +5 -4
- package/build/src/components/Widgets/JRCWidgetArticleImage/JRCWidgetArticleImage.stories.d.ts +3 -4
- package/build/src/components/Widgets/JRCWidgetArticleImage/JRCWidgetArticleImageEditor.d.ts +4 -4
- package/build/src/components/Widgets/JRCWidgetArticleText/JRCWidgetArticleText.d.ts +14 -4
- package/build/src/components/Widgets/JRCWidgetArticleText/JRCWidgetArticleTextEditor.d.ts +4 -3
- package/build/src/components/Widgets/JRCWidgetArticleTitle/JRCWidgetArticleTitleEditor.d.ts +3 -3
- package/build/src/components/Widgets/JRCWidgetSlider/JRCWidgetArticleSliderEditor.d.ts +39 -0
- package/build/src/components/Widgets/JRCWidgetSlider/JRCWidgetSlider.d.ts +2 -1
- package/build/src/components/Widgets/JRCWidgetSlider/components/SliderImage.d.ts +5 -3
- package/build/src/components/Widgets/JRCWidgetSlider/types.d.ts +8 -4
- package/build/src/components/Widgets/styles.d.ts +0 -2
- package/build/src/components/Widgets/utils.d.ts +0 -4
- package/build/src/index.d.ts +12 -8
- package/package.json +2 -2
- package/build/src/components/Widgets/JRCWidgetSlider/JRCWidgetSliderEditor.d.ts +0 -21
|
@@ -1,2 +1,5 @@
|
|
|
1
|
+
export declare const CSSEditor: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
|
+
export declare const CSSEditorWidgetProperties: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
|
+
export declare const CSSEditorWarning: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
1
4
|
export declare const CSSEditorComponentWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
5
|
export declare const CSSEditorComponentLabel: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jFileLittle } from 'jamespot-user-api';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
type EditorImageUploadProps = {
|
|
4
|
+
token: string;
|
|
5
|
+
initialFile?: jFileLittle;
|
|
6
|
+
children(open: () => void, openCrop: () => void): React.ReactElement<HTMLElement>;
|
|
7
|
+
onUploadSuccess: (file: jFileLittle) => void;
|
|
8
|
+
};
|
|
9
|
+
export declare const EditorImageUpload: ({ token, children, initialFile, onUploadSuccess }: EditorImageUploadProps) => React.JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jFileLittle } from 'jamespot-user-api';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
type EditorImageUploadProps = {
|
|
4
|
+
token: string;
|
|
5
|
+
onUploadSuccess: (file: jFileLittle) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const EditorInputImage: ({ token, onUploadSuccess }: EditorImageUploadProps) => React.JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -4,9 +4,10 @@ export type EditorSelectOption = {
|
|
|
4
4
|
value: string;
|
|
5
5
|
};
|
|
6
6
|
export type EditorSelectOptions = EditorSelectOption[];
|
|
7
|
-
export declare const EditorSelect: <T extends string>({ label, options, initialValue, onChange, }: {
|
|
7
|
+
export declare const EditorSelect: <T extends string>({ label, options, initialValue, required, onChange, }: {
|
|
8
8
|
label: string;
|
|
9
9
|
options: EditorSelectOptions;
|
|
10
10
|
initialValue: string | undefined;
|
|
11
|
+
required?: boolean | undefined;
|
|
11
12
|
onChange: (value: T) => void;
|
|
12
13
|
}) => React.JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, Story } from '@storybook/react';
|
|
2
|
+
import { JRCInputFieldProps } from '../Common/JRCFormFieldRenderer.types';
|
|
3
|
+
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
|
+
export default _default;
|
|
5
|
+
export declare const InputDateTime: Story<JRCInputFieldProps<{
|
|
6
|
+
date: string;
|
|
7
|
+
}>>;
|
|
@@ -0,0 +1,15 @@
|
|
|
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 type NativeInputProps = DataCy & React.ComponentPropsWithoutRef<'input'> & {
|
|
6
|
+
type?: 'date' | 'time' | 'datetime-local';
|
|
7
|
+
};
|
|
8
|
+
export type JRCInputDateTimeProps<TFieldValues extends FieldValues = FieldValues> = NativeInputProps & JRCInputFieldProps<TFieldValues>;
|
|
9
|
+
/**
|
|
10
|
+
* Component used as a <input type="date"/>
|
|
11
|
+
* @param props JRCInputFieldProps
|
|
12
|
+
* validation props: required
|
|
13
|
+
* @returns JSX.Element
|
|
14
|
+
*/
|
|
15
|
+
export declare function JRCInputDateTime<T extends FieldValues = FieldValues>(props: JRCInputDateTimeProps<T>): React.JSX.Element;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { JRCInputFieldProps } from '../Common/JRCFormFieldRenderer.types';
|
|
3
|
-
import { DataCy } from '../../../../types/dataAttributes';
|
|
4
2
|
import { FieldValues } from 'react-hook-form/dist/types';
|
|
3
|
+
import { DataCy } from '../../../../types/dataAttributes';
|
|
4
|
+
import { JRCInputFieldProps } from '../Common/JRCFormFieldRenderer.types';
|
|
5
5
|
export type JRCInputTextProps = DataCy & React.ComponentPropsWithoutRef<'input'> & {
|
|
6
6
|
width?: string;
|
|
7
7
|
};
|
|
@@ -18,3 +18,25 @@ export declare function JRCInputText<T extends FieldValues = FieldValues>(props:
|
|
|
18
18
|
width?: string;
|
|
19
19
|
disabled?: boolean;
|
|
20
20
|
}): React.JSX.Element;
|
|
21
|
+
export type JRCInputNumberProps = DataCy & React.ComponentPropsWithoutRef<'input'> & {
|
|
22
|
+
width?: string;
|
|
23
|
+
min?: number;
|
|
24
|
+
max?: number;
|
|
25
|
+
};
|
|
26
|
+
export declare const RenderNumberInput: React.ForwardRefExoticComponent<DataCy & Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & {
|
|
27
|
+
width?: string | undefined;
|
|
28
|
+
min?: number | undefined;
|
|
29
|
+
max?: number | undefined;
|
|
30
|
+
} & React.RefAttributes<HTMLInputElement>>;
|
|
31
|
+
/**
|
|
32
|
+
* Component used as a <input type="number"/>
|
|
33
|
+
* @param props JRCInputFieldProps
|
|
34
|
+
* validation props: required
|
|
35
|
+
* @returns JSX.Element
|
|
36
|
+
*/
|
|
37
|
+
export declare function JRCInputNumber<T extends FieldValues = FieldValues>(props: JRCInputFieldProps<T> & {
|
|
38
|
+
width?: string;
|
|
39
|
+
disabled?: boolean;
|
|
40
|
+
min?: number;
|
|
41
|
+
max?: number;
|
|
42
|
+
}): React.JSX.Element;
|
|
@@ -14,6 +14,12 @@ export type TinyMention = {
|
|
|
14
14
|
icon?: string;
|
|
15
15
|
};
|
|
16
16
|
export type MentionQuery = (query: string) => Promise<TinyMention[]>;
|
|
17
|
+
export type JRCInputTinyMCEStyleWrapperProps = {
|
|
18
|
+
linkColor?: string;
|
|
19
|
+
fontSize?: string;
|
|
20
|
+
lineHeight?: string;
|
|
21
|
+
minHeight?: number;
|
|
22
|
+
};
|
|
17
23
|
export type JRCInputTinyMCEProps = DataCy & {
|
|
18
24
|
token?: string;
|
|
19
25
|
commonOptions: TinyMCECommonOptions;
|
|
@@ -23,10 +29,14 @@ export type JRCInputTinyMCEProps = DataCy & {
|
|
|
23
29
|
onChange: (v: string) => void;
|
|
24
30
|
ref?: LegacyRef<Editor>;
|
|
25
31
|
tinymceScriptSrc?: string;
|
|
32
|
+
autoFocus?: boolean;
|
|
33
|
+
inline?: boolean;
|
|
34
|
+
placeholder?: string;
|
|
35
|
+
styleWrapper?: JRCInputTinyMCEStyleWrapperProps;
|
|
26
36
|
mentionsQueries: {
|
|
27
37
|
users: MentionQuery;
|
|
28
38
|
tags: MentionQuery;
|
|
29
39
|
contents: MentionQuery;
|
|
30
40
|
};
|
|
31
41
|
};
|
|
32
|
-
export declare const JRCInputTinyMCE: ({ dataCy, token, value, onBlur, onChange, mentionsQueries, tinymceScriptSrc, additionalExtensions, ref, ...props }: JRCInputTinyMCEProps) => React.JSX.Element;
|
|
42
|
+
export declare const JRCInputTinyMCE: ({ dataCy, token, value, onBlur, onChange, mentionsQueries, tinymceScriptSrc, autoFocus, inline, placeholder, styleWrapper, additionalExtensions, ref, ...props }: JRCInputTinyMCEProps) => React.JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TinyMCEExtensionBuilder } from '../JTinyMCEExtensions';
|
|
2
|
+
export type TextGenerationCapabilities = {
|
|
3
|
+
summarize: (text: string) => Promise<string>;
|
|
4
|
+
develop: (text: string) => Promise<string>;
|
|
5
|
+
tldr: (text: string) => Promise<string>;
|
|
6
|
+
};
|
|
7
|
+
export declare const JIATextGenerationExtension: TinyMCEExtensionBuilder<[TextGenerationCapabilities]>;
|
|
@@ -5,4 +5,6 @@ export type TinyMCEExtension = {
|
|
|
5
5
|
export interface TinyMCEExtensionBuilder<T extends Array<any>> {
|
|
6
6
|
(...args: T): TinyMCEExtension;
|
|
7
7
|
}
|
|
8
|
-
export declare const JTinyMCEExtensionsBuilders: {
|
|
8
|
+
export declare const JTinyMCEExtensionsBuilders: {
|
|
9
|
+
readonly jia: TinyMCEExtensionBuilder<[import("./JIAExtension/JIATextGenerationExtension").TextGenerationCapabilities]>;
|
|
10
|
+
};
|
|
@@ -27,6 +27,7 @@ export type JRCCardImgProps = {
|
|
|
27
27
|
children: React.ReactNode;
|
|
28
28
|
position?: ActionsPosition;
|
|
29
29
|
};
|
|
30
|
+
lazyLoading?: boolean;
|
|
30
31
|
};
|
|
31
32
|
export declare const Actions: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
32
33
|
position?: ActionsPosition | undefined;
|
|
@@ -9,7 +9,7 @@ type FlexBoxProps = Omit<FastCssProps, 'display'> & {
|
|
|
9
9
|
childFull?: boolean;
|
|
10
10
|
};
|
|
11
11
|
export declare const JRCFlexBox: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, Omit<FastCssProps, "display"> & {
|
|
12
|
-
direction?: "row" | "column" | "
|
|
12
|
+
direction?: "row" | "column" | "column-reverse" | "row-reverse" | undefined;
|
|
13
13
|
inline?: boolean | undefined;
|
|
14
14
|
flex?: string | boolean | undefined;
|
|
15
15
|
gap?: number | undefined;
|
|
@@ -9,4 +9,4 @@ export declare const SIZES: Readonly<{
|
|
|
9
9
|
xxl: 24;
|
|
10
10
|
xxxl: 32;
|
|
11
11
|
}>;
|
|
12
|
-
export declare const Typography: import("styled-components").StyledComponent<"p", import("styled-components").DefaultTheme, Pick<JRCTypographyProps, "color" | "size" | "
|
|
12
|
+
export declare const Typography: import("styled-components").StyledComponent<"p", import("styled-components").DefaultTheme, Pick<JRCTypographyProps, "color" | "size" | "weight" | "align"> & FastCssProps, never>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { WidgetArticleAttachmentContent, WidgetStateProps } from 'jamespot-user-api';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
type JRCWidgetArticleAttachmentEditorProps = {
|
|
4
4
|
token: string | undefined;
|
|
5
5
|
content: WidgetArticleAttachmentContent;
|
|
6
|
-
onChange: (content:
|
|
7
|
-
onSave: (content:
|
|
6
|
+
onChange: (content: Partial<WidgetArticleAttachmentContent>, override?: boolean) => void;
|
|
7
|
+
onSave: (content: Partial<WidgetArticleAttachmentContent>) => void;
|
|
8
8
|
onStateChange?: (state: WidgetStateProps) => void;
|
|
9
9
|
onOpen?: (view: React.ReactElement) => void;
|
|
10
10
|
};
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { VariantSizeType, VariantType } from 'jamespot-user-api';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
export type JRCWidgetArticleButtonProps = {
|
|
4
|
+
text?: string;
|
|
5
|
+
color?: string;
|
|
6
|
+
backgroundColor?: string;
|
|
7
|
+
borderRadius?: string;
|
|
8
|
+
fontSize?: string;
|
|
9
|
+
buttonSize?: VariantSizeType;
|
|
10
|
+
variant?: VariantType;
|
|
11
|
+
url?: string;
|
|
12
|
+
target?: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const JRCWidgetArticleButton: ({ text, buttonSize, color, borderRadius, variant, backgroundColor, url, target, }: JRCWidgetArticleButtonProps) => React.JSX.Element;
|
package/build/src/components/Widgets/JRCWidgetArticleButton/JRCWidgetArticleButtonEditor.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { WidgetArticleButtonContent, WidgetStateProps } from 'jamespot-user-api';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
type JRCWidgetArticleButtonEditorProps = {
|
|
4
4
|
content: WidgetArticleButtonContent;
|
|
5
|
-
onChange: (content:
|
|
6
|
-
onSave: (content:
|
|
5
|
+
onChange: (content: Partial<WidgetArticleButtonContent>, override?: boolean) => void;
|
|
6
|
+
onSave: (content: Partial<WidgetArticleButtonContent>) => void;
|
|
7
7
|
onStateChange?: (state: WidgetStateProps) => void;
|
|
8
8
|
};
|
|
9
9
|
export declare function useFirstRender(): boolean;
|
package/build/src/components/Widgets/JRCWidgetArticleGallery/JRCWidgetArticleGalleryEditor.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { WidgetArticleGalleryContent, WidgetKeys, WidgetStateProps } from 'jamespot-user-api';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
type JRCWidgetArticleGalleryEditorProps = {
|
|
4
4
|
token: string | undefined;
|
|
5
5
|
content: WidgetArticleGalleryContent;
|
|
6
|
-
onChange: (content:
|
|
7
|
-
onSave: (content:
|
|
6
|
+
onChange: (content: Partial<WidgetArticleGalleryContent>, override?: boolean) => void;
|
|
7
|
+
onSave: (content: Partial<WidgetArticleGalleryContent>) => void;
|
|
8
8
|
onStateChange?: (state: WidgetStateProps, uniqid?: string) => void;
|
|
9
9
|
onRegisterEditor?: (uniqid: string, name: WidgetKeys) => void;
|
|
10
10
|
};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { WidgetArticleImageContent } from 'jamespot-user-api';
|
|
2
1
|
import React from 'react';
|
|
3
|
-
export declare const JRCWidgetArticleImage: ({
|
|
2
|
+
export declare const JRCWidgetArticleImage: ({ useFilter, maxWidth, maxHeight, uri, }: {
|
|
3
|
+
useFilter?: boolean | undefined;
|
|
4
4
|
maxWidth: number;
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
maxHeight?: number | undefined;
|
|
6
|
+
uri?: string | undefined;
|
|
7
|
+
}) => React.JSX.Element;
|
package/build/src/components/Widgets/JRCWidgetArticleImage/JRCWidgetArticleImage.stories.d.ts
CHANGED
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
import { Meta, Story } from '@storybook/react';
|
|
2
|
-
import { WidgetArticleImageContent } from 'jamespot-user-api';
|
|
3
2
|
declare const _default: Meta<import("@storybook/react").Args>;
|
|
4
3
|
export default _default;
|
|
5
|
-
export declare const Primary: Story<
|
|
4
|
+
export declare const Primary: Story<{
|
|
6
5
|
maxWidth: number;
|
|
7
|
-
uri: string
|
|
8
|
-
}
|
|
6
|
+
uri: string;
|
|
7
|
+
}>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { WidgetArticleImageContent } from 'jamespot-user-api';
|
|
3
3
|
import { WidgetStateProps } from 'jamespot-user-api';
|
|
4
|
-
export declare const JRCWidgetArticleImageEditor: ({ token, content, onSave,
|
|
4
|
+
export declare const JRCWidgetArticleImageEditor: ({ token, content, onSave, onStateChange, }: {
|
|
5
5
|
token: string | undefined;
|
|
6
6
|
content: WidgetArticleImageContent;
|
|
7
|
-
onChange: (content:
|
|
8
|
-
onSave: (content:
|
|
7
|
+
onChange: (content: Partial<WidgetArticleImageContent>, override?: boolean) => void;
|
|
8
|
+
onSave: (content: Partial<WidgetArticleImageContent>) => void;
|
|
9
9
|
onStateChange: (state: WidgetStateProps) => void;
|
|
10
10
|
}) => React.JSX.Element;
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { TinyMCECommonOptions, WidgetDisplayMode } from 'jamespot-user-api';
|
|
3
|
+
export type JRCWidgetArticleTextProps = {
|
|
4
|
+
text: string;
|
|
5
|
+
color: string;
|
|
6
|
+
fontSize: string;
|
|
7
|
+
lineHeight: string;
|
|
8
|
+
linkColor: string;
|
|
9
|
+
autoFocus?: boolean;
|
|
10
|
+
token: string;
|
|
11
|
+
tinyMCECommonOptions: TinyMCECommonOptions | undefined;
|
|
12
|
+
mode?: WidgetDisplayMode;
|
|
13
|
+
onChange: (text: string) => void;
|
|
14
|
+
};
|
|
15
|
+
export declare const JRCWidgetArticleText: ({ text, linkColor, fontSize, lineHeight, autoFocus, token, tinyMCECommonOptions, mode, onChange, }: JRCWidgetArticleTextProps) => React.JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { WidgetArticleTextContent } from 'jamespot-user-api';
|
|
3
|
+
import { JRCWidgetArticleTextProps } from './JRCWidgetArticleText';
|
|
3
4
|
export declare const JRCWidgetArticleTextEditor: ({ content, onChange, onSave, }: {
|
|
4
5
|
content: WidgetArticleTextContent;
|
|
5
|
-
onSave: (content:
|
|
6
|
-
onChange: (content:
|
|
6
|
+
onSave: (content: Partial<JRCWidgetArticleTextProps>) => void;
|
|
7
|
+
onChange: (content: Partial<JRCWidgetArticleTextProps>, override?: boolean) => void;
|
|
7
8
|
}) => React.JSX.Element;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { WidgetArticleTitleContent } from 'jamespot-user-api';
|
|
3
3
|
export declare function useFirstRender(): boolean;
|
|
4
4
|
export declare const JRCWidgetArticleTitleEditor: ({ content, onChange, onSave, }: {
|
|
5
5
|
content: WidgetArticleTitleContent;
|
|
6
6
|
onOpen: (view: React.ReactElement) => void;
|
|
7
|
-
onSave: (content:
|
|
8
|
-
onChange: (content:
|
|
7
|
+
onSave: (content: Partial<WidgetArticleTitleContent>) => void;
|
|
8
|
+
onChange: (content: Partial<WidgetArticleTitleContent>, override?: boolean) => void;
|
|
9
9
|
}) => React.JSX.Element;
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { WidgetArticleSliderContent, jFileLittle } from 'jamespot-user-api';
|
|
3
|
+
import { WidgetSliderSlide } from './types';
|
|
4
|
+
export declare const CSSSlide: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
5
|
+
export declare const CSSSlideTitle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
6
|
+
export declare const CSSScroll: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
7
|
+
export declare const JRCWidgetArticleSliderEditor: ({ slides, loop, useDots, token, onChange, onSave, }: WidgetArticleSliderContent & {
|
|
8
|
+
token: string;
|
|
9
|
+
onSave: (content: Partial<WidgetArticleSliderContent>) => void;
|
|
10
|
+
onChange: (content: Partial<WidgetArticleSliderContent>, override?: boolean) => void;
|
|
11
|
+
}) => React.JSX.Element;
|
|
12
|
+
export declare const EditorSlide: ({ forceOpen, title, text, displayAs, backgroundSize, backgroundPosition, file, token, onUploadSuccess, onSave, onClickDelete, }: {
|
|
13
|
+
forceOpen?: boolean | undefined;
|
|
14
|
+
file?: {
|
|
15
|
+
title: string;
|
|
16
|
+
type: string;
|
|
17
|
+
id: number;
|
|
18
|
+
uri: string;
|
|
19
|
+
mainType: string;
|
|
20
|
+
dateCreation: string;
|
|
21
|
+
_url: string;
|
|
22
|
+
dateModified: string | null;
|
|
23
|
+
mimetype: string;
|
|
24
|
+
path?: string | undefined;
|
|
25
|
+
} | undefined;
|
|
26
|
+
token?: string | undefined;
|
|
27
|
+
onUploadStart: () => void;
|
|
28
|
+
onUploadSuccess: (response: jFileLittle) => void;
|
|
29
|
+
onSave: (slide: Partial<WidgetSliderSlide>) => void;
|
|
30
|
+
onClickDelete: () => void;
|
|
31
|
+
} & Pick<WidgetSliderSlide, "title" | "text" | "backgroundSize" | "backgroundPosition" | "displayAs">) => React.JSX.Element;
|
|
32
|
+
/**
|
|
33
|
+
* TODO: STANDALONE COMPONENT
|
|
34
|
+
*/
|
|
35
|
+
export declare const DeleteWithPrompt: ({ title, description, onClick, }: {
|
|
36
|
+
title: string;
|
|
37
|
+
description?: string | undefined;
|
|
38
|
+
onClick: () => void;
|
|
39
|
+
}) => React.JSX.Element;
|
|
@@ -6,5 +6,6 @@ export type JRCWidgetSliderProps = {
|
|
|
6
6
|
loop: boolean;
|
|
7
7
|
useDots?: boolean;
|
|
8
8
|
startAt?: number;
|
|
9
|
+
onClickSlide?: (index: number) => void;
|
|
9
10
|
};
|
|
10
|
-
export declare const JRCWidgetSlider: ({ slides, maxWidth, loop, useDots, startAt, }: JRCWidgetSliderProps) => React.JSX.Element;
|
|
11
|
+
export declare const JRCWidgetSlider: ({ slides, maxWidth, loop, useDots, startAt, onClickSlide, }: JRCWidgetSliderProps) => React.JSX.Element;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
import { WidgetSliderSlide } from '../types';
|
|
3
|
+
export declare const SliderImage: ({ initialUri, maxWidth, maxHeight, onClick, }: {
|
|
4
|
+
initialUri: string;
|
|
4
5
|
maxWidth: number;
|
|
5
6
|
maxHeight: number;
|
|
6
|
-
|
|
7
|
+
onClick?: (() => void) | undefined;
|
|
8
|
+
} & Pick<WidgetSliderSlide, "backgroundSize" | "backgroundPosition" | "displayAs">) => React.JSX.Element;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { TVariants } from 'components/JRCTypography/JRCTypography.d';
|
|
2
|
+
import { CSSBackgroundPosition, CSSBackgroundSize } from 'jamespot-user-api';
|
|
2
3
|
export type WidgetSliderSlide = {
|
|
3
4
|
title: string;
|
|
4
|
-
titleHeading: TVariants;
|
|
5
5
|
text: string;
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
titleHeading?: TVariants;
|
|
7
|
+
textColor?: string;
|
|
8
|
+
opacityFilter?: number;
|
|
9
|
+
opacityColor?: string;
|
|
10
|
+
displayAs?: 'image' | 'background';
|
|
11
|
+
backgroundPosition?: CSSBackgroundPosition;
|
|
12
|
+
backgroundSize?: CSSBackgroundSize;
|
|
9
13
|
uri: string;
|
|
10
14
|
};
|
|
11
15
|
export type JRCWidgetSliderEditorProps = {
|
|
@@ -6,7 +6,6 @@ export declare const CSSWrapperText: import("styled-components").StyledComponent
|
|
|
6
6
|
color?: string | undefined;
|
|
7
7
|
heading?: string | undefined;
|
|
8
8
|
fontSize?: string | undefined;
|
|
9
|
-
backgroundColor?: string | undefined;
|
|
10
9
|
}, never>;
|
|
11
10
|
export declare const CSSText: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
12
11
|
size?: string | undefined;
|
|
@@ -17,7 +16,6 @@ export declare const CSSForm: import("styled-components").StyledComponent<"form"
|
|
|
17
16
|
export declare const StyledInput: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
18
17
|
heading?: string | undefined;
|
|
19
18
|
color?: string | undefined;
|
|
20
|
-
backgroundColor?: string | undefined;
|
|
21
19
|
}, never>;
|
|
22
20
|
export declare const CSSWidgetEditorListItem: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
23
21
|
export declare const CSSWidgetEditorListItemLabel: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1,8 +1,4 @@
|
|
|
1
1
|
import { jFileLittle } from 'jamespot-user-api';
|
|
2
|
-
export declare const loadImage: (setImageDimensions: React.Dispatch<React.SetStateAction<{
|
|
3
|
-
width: number;
|
|
4
|
-
height: number;
|
|
5
|
-
} | undefined>>, imageUrl: string, setError: React.Dispatch<React.SetStateAction<string | Event | undefined>>) => void;
|
|
6
2
|
export declare function imageResize(width: number, height: number, maxWidth: number, maxHeight: number): {
|
|
7
3
|
width: number;
|
|
8
4
|
height: number;
|
package/build/src/index.d.ts
CHANGED
|
@@ -25,6 +25,9 @@ declare global {
|
|
|
25
25
|
*/
|
|
26
26
|
export { default as Resources } from './translation';
|
|
27
27
|
export { default as Theme } from './styles/theme';
|
|
28
|
+
export { BETA_JRCColorPicker } from './components/Beta/BETA_JRCColorPicker/BETA_JRCColorPicker';
|
|
29
|
+
export { BETA_JRCDoubleClick } from './components/Beta/BETA_JRCDoubleClick/BETA_JRCDoubleClick';
|
|
30
|
+
export { BETA_JRCDragAndDrop } from './components/Beta/BETA_JRCDragAndDrop/BETA_JRCDragAndDrop';
|
|
28
31
|
export { ClickAwayListener } from './components/Form/Common/ClickAwayListener';
|
|
29
32
|
export { JRC404 } from './components/404';
|
|
30
33
|
export { JRCAlert } from './components/JRCAlert/JRCAlert';
|
|
@@ -44,7 +47,6 @@ export { JRCButtonFile } from './components/JRCButtonFile/JRCButtonFile';
|
|
|
44
47
|
export { JRCCard } from './components/JRCCard/JRCCard';
|
|
45
48
|
export { JRCCardImg } from './components/JRCCard/JRCCardImg';
|
|
46
49
|
export { JRCCheckbox } from './components/Form/Input/JRCFormCheckbox/JRCCheckbox';
|
|
47
|
-
export { BETA_JRCColorPicker } from './components/Beta/BETA_JRCColorPicker/BETA_JRCColorPicker';
|
|
48
50
|
export { JRCColumn } from './components/Templates/JRCColumn';
|
|
49
51
|
export { JRCColumnCenter } from './components/JRCColumnCenter/JRCColumnCenter';
|
|
50
52
|
export { JRCColumnLeft } from './components/JRCColumnLeft/JRCColumnLeft';
|
|
@@ -52,9 +54,7 @@ export { JRCColumnRight } from './components/JRCColumnRight/JRCColumnRight';
|
|
|
52
54
|
export { JRCConditionalWrapper } from './components/Common/JRCConditionalWrapper';
|
|
53
55
|
export { JRCContainer } from './components/Templates/JRCContainer';
|
|
54
56
|
export { JRCDate } from './components/JRCDate/JRCDate';
|
|
55
|
-
export { BETA_JRCDoubleClick } from './components/Beta/BETA_JRCDoubleClick/BETA_JRCDoubleClick';
|
|
56
57
|
export { JRCDraggingPlaceholder } from './components/Common/JRCDraggingPlaceholder';
|
|
57
|
-
export { BETA_JRCDragAndDrop } from './components/Beta/BETA_JRCDragAndDrop/BETA_JRCDragAndDrop';
|
|
58
58
|
export { JRCDropDown } from './components/JRCDropDown/JRCDropDown';
|
|
59
59
|
export { JRCEllipsis } from './components/JRCEllipsis/JRCEllipsis';
|
|
60
60
|
export { JRCEmptySpace } from './components/JRCEmptySpace/JRCEmptySpace';
|
|
@@ -101,13 +101,13 @@ export { JRCInputReorderCheckbox } from './components/Form/Input/JRCInputCheckbo
|
|
|
101
101
|
export { JRCInputRichText } from './components/Form/Input/JRCInputRichText/JRCInputRichText';
|
|
102
102
|
export { JRCInputSearch } from './components/Form/Input/JRCInputSearch/JRCInputSearch';
|
|
103
103
|
export { JRCInputSelect } from './components/Form/Input/JRCSelect/JRCInputSelect';
|
|
104
|
-
export { JRCInputSelectRaw } from './components/Form/Input/JRCSelect/JRCInputSelect';
|
|
105
104
|
export { JRCInputSelectHierarchicalTree } from './components/Form/Input/JRCSelect/JRCInputSelectHierarchicalTree';
|
|
106
105
|
export { JRCInputSelectList } from './components/Form/Input/JRCSelect/JRCInputSelectList';
|
|
106
|
+
export { JRCInputSelectRaw } from './components/Form/Input/JRCSelect/JRCInputSelect';
|
|
107
107
|
export { JRCInputTaxonomy } from './components/Form/Input/JRCSelect/JRCInputTaxonomy';
|
|
108
|
-
export { JRCInputText } from './components/Form/Input/JRCInputText/JRCInputText';
|
|
109
|
-
export { JRCInputTextIconButton } from './components/Form/Input/JRCInputText/JRCInputTextIconButton';
|
|
108
|
+
export { JRCInputText, JRCInputNumber } from './components/Form/Input/JRCInputText/JRCInputText';
|
|
110
109
|
export { JRCInputTextarea } from './components/Form/Input/JRCInputTextarea/JRCInputTextarea';
|
|
110
|
+
export { JRCInputTextIconButton } from './components/Form/Input/JRCInputText/JRCInputTextIconButton';
|
|
111
111
|
export { JRCInputTime } from './components/Form/Input/JRCInputTime/JRCInputTime';
|
|
112
112
|
export { JRCInputTinyMCE } from './components/Form/Input/JRCInputTinyMCE/JRCInputTinyMCE';
|
|
113
113
|
export { JRCInputUrl } from './components/Form/Input/JRCInputUrl/JRCInputUrl';
|
|
@@ -116,11 +116,11 @@ export { JRCLoader } from './components/JRCLoader/JRCLoader';
|
|
|
116
116
|
export { JRCMainColumn } from './components/Templates/JRCMainColumn';
|
|
117
117
|
export { JRCMenu } from './components/JRCMenu/JRCMenu';
|
|
118
118
|
export { JRCModal } from './components/JRCModal/templates/JRCModal';
|
|
119
|
-
export { JRCModalForm } from './components/JRCModal/templates/JRCModalForm';
|
|
120
|
-
export { JRCModalLayout } from './components/JRCModal/JRCModalLayout';
|
|
121
119
|
export { JRCModalContent } from './components/JRCModal/JRCModalContent';
|
|
122
120
|
export { JRCModalContentForm } from './components/JRCModal/JRCModalContentForm';
|
|
121
|
+
export { JRCModalForm } from './components/JRCModal/templates/JRCModalForm';
|
|
123
122
|
export { JRCModalImg } from './components/JRCModalImg/JRCModalImg';
|
|
123
|
+
export { JRCModalLayout } from './components/JRCModal/JRCModalLayout';
|
|
124
124
|
export { JRCPageNotLogged } from './components/Pages/JRCPageNotLogged';
|
|
125
125
|
export { JRCPagination } from './components/JRCPagination/JRCPagination';
|
|
126
126
|
export { JRCPanel } from './components/Templates/JRCPanel';
|
|
@@ -142,6 +142,7 @@ export { JRCTinyMCEVideoUploadModal } from './components/Form/Input/JRCInputTiny
|
|
|
142
142
|
export { JRCTooltip } from './components/JRCTooltip/JRCTooltip';
|
|
143
143
|
export { JRCTypography } from './components/JRCTypography/JRCTypography';
|
|
144
144
|
export { JRCValidationButton } from './components/JRCButton/JRCValidationButton';
|
|
145
|
+
export { JRCInputDateTime } from './components/Form/Input/JRCInputDateTime/JRCInputDateTime';
|
|
145
146
|
export { JRCWidgetArticleAttachment } from './components/Widgets/JRCWidgetArticleAttachment/JRCWidgetArticleAttachment';
|
|
146
147
|
export { JRCWidgetArticleAttachmentEditor } from './components/Widgets/JRCWidgetArticleAttachment/JRCWidgetArticleAttachmentEditor';
|
|
147
148
|
export { JRCWidgetArticleButton } from './components/Widgets/JRCWidgetArticleButton/JRCWidgetArticleButton';
|
|
@@ -154,6 +155,8 @@ export { JRCWidgetArticleText } from './components/Widgets/JRCWidgetArticleText/
|
|
|
154
155
|
export { JRCWidgetArticleTextEditor } from './components/Widgets/JRCWidgetArticleText/JRCWidgetArticleTextEditor';
|
|
155
156
|
export { JRCWidgetArticleTitle } from './components/Widgets/JRCWidgetArticleTitle/JRCWidgetArticleTitle';
|
|
156
157
|
export { JRCWidgetArticleTitleEditor } from './components/Widgets/JRCWidgetArticleTitle/JRCWidgetArticleTitleEditor';
|
|
158
|
+
export { JRCWidgetSlider } from './components/Widgets/JRCWidgetSlider/JRCWidgetSlider';
|
|
159
|
+
export { JRCWidgetArticleSliderEditor } from './components/Widgets/JRCWidgetSlider/JRCWidgetArticleSliderEditor';
|
|
157
160
|
export { JRCWidgetEmptyInplace } from './components/Widgets/JRCWidgetEmptyInplace';
|
|
158
161
|
export { LabelDescriptionOption } from './components/Form/Input/JRCSelect/JRCInputSelect.defaults';
|
|
159
162
|
export { StyledInput } from './components/Form/Input/JRCStyledInput';
|
|
@@ -165,6 +168,7 @@ export { useTimeout } from './hooks/UseTimeout';
|
|
|
165
168
|
export { useRefSize } from './hooks/useRefSize';
|
|
166
169
|
export { useWindowSize } from './hooks/useWindowSize';
|
|
167
170
|
export { useCancelOnUnmount } from './hooks/useCancelOnUnmount';
|
|
171
|
+
export { JTinyMCEExtensionsBuilders } from './components/Form/Input/JRCInputTinyMCE/extensions/JTinyMCEExtensions';
|
|
168
172
|
/****
|
|
169
173
|
*
|
|
170
174
|
* PLEASE RESPECT ALPHABETICAL ORDER
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jamespot-react-components",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.168",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/jamespot-react-components.js",
|
|
6
6
|
"types": "./build/src/index.d.ts",
|
|
@@ -92,7 +92,7 @@
|
|
|
92
92
|
"chroma-js": "^2.1.1",
|
|
93
93
|
"classnames": "^2.3.1",
|
|
94
94
|
"dompurify": "^3.0.5",
|
|
95
|
-
"jamespot-user-api": "^1.0.
|
|
95
|
+
"jamespot-user-api": "^1.0.140",
|
|
96
96
|
"moment": "2.29.4",
|
|
97
97
|
"react": "^17.x",
|
|
98
98
|
"react-beautiful-dnd": "^13.1.1",
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { JRCWidgetSliderEditorProps, WidgetSliderSlide } from './types';
|
|
3
|
-
export declare const CSSSlide: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
4
|
-
export declare const CSSSlideTitle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
5
|
-
export declare const JRCWidgetSliderEditor: ({ slides, loop, useDots, onChange, onSave, }: JRCWidgetSliderEditorProps & {
|
|
6
|
-
onSave: (content: Partial<JRCWidgetSliderEditorProps>) => void;
|
|
7
|
-
onChange: (content: Partial<JRCWidgetSliderEditorProps>, override?: boolean) => void;
|
|
8
|
-
}) => React.JSX.Element;
|
|
9
|
-
export declare const EditorSlide: ({ initialSlide, onSave, onClickDelete, }: {
|
|
10
|
-
initialSlide: WidgetSliderSlide;
|
|
11
|
-
onSave: (slide: WidgetSliderSlide) => void;
|
|
12
|
-
onClickDelete: () => void;
|
|
13
|
-
}) => React.JSX.Element;
|
|
14
|
-
/**
|
|
15
|
-
* TODO: STANDALONE COMPONENT
|
|
16
|
-
*/
|
|
17
|
-
export declare const DeleteWithPrompt: ({ title, description, onClick, }: {
|
|
18
|
-
title: string;
|
|
19
|
-
description?: string | undefined;
|
|
20
|
-
onClick: () => void;
|
|
21
|
-
}) => React.JSX.Element;
|