jamespot-react-components 1.3.138 → 1.3.162
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/dist/jamespot-react-components.cjs +2093 -1926
- package/dist/jamespot-react-components.js +25002 -24074
- package/dist/src/components/Editors/components/EditorImageUpload.d.ts +2 -1
- package/dist/src/components/Editors/components/EditorInput.d.ts +2 -1
- package/dist/src/components/Editors/components/EditorRichText.d.ts +2 -1
- package/dist/src/components/Form/Input/JRCSelect/JRCInputSelect.style.d.ts +4 -4
- package/dist/src/components/JRCButtonDropdown/JRCButtonDropdown.styles.d.ts +8 -8
- package/dist/src/components/JRCButtonDropdown/JRCButtonDropdown.types.d.ts +1 -1
- package/dist/src/components/JRCCalendar/JRCCalendar.d.ts +1 -1
- package/dist/src/components/JRCCalendar/types.d.ts +1 -0
- package/dist/src/components/JRCCollapse/JRCCollapse.d.ts +2 -0
- package/dist/src/components/JRCCommentsBloc/JRCComment.d.ts +1 -1
- package/dist/src/components/JRCCommentsBloc/JRCCommentsBloc.d.ts +2 -2
- package/dist/src/components/JRCConfirmationModal/JRCConfirmationModal.d.ts +2 -1
- package/dist/src/components/JRCDragNDrop/Draggable.d.ts +2 -1
- package/dist/src/components/JRCDragNDrop/Droppable.d.ts +1 -1
- package/dist/src/components/JRCDragNDrop/JRCDndOneLevel.d.ts +1 -1
- package/dist/src/components/JRCDragNDrop/types.d.ts +1 -0
- package/dist/src/components/JRCDropDown/JRCDropDown.d.ts +2 -1
- package/dist/src/components/JRCDropDown/JRCDropDown.stories.d.ts +1 -0
- package/dist/src/components/JRCEmptySpace/JRCEmptySpace.d.ts +2 -0
- package/dist/src/components/JRCFlex/JRCFlexBox.d.ts +2 -2
- package/dist/src/components/JRCHtml/JRCHtml.d.ts +1 -0
- package/dist/src/components/JRCPublishButton/JRCPublishButton.d.ts +6 -1
- package/dist/src/components/JRCRateStars/JRCRateStars.d.ts +2 -1
- package/dist/src/components/JRCTooltip/JRCBaseTooltip.d.ts +0 -2
- package/dist/src/components/Widgets/JRCWidgetAccordion/JRCWidgetAccordion.d.ts +5 -0
- package/dist/src/components/Widgets/JRCWidgetAccordion/JRCWidgetAccordionEditor.d.ts +7 -0
- package/dist/src/components/Widgets/JRCWidgetApplication/JRCWidgetApplication.const.d.ts +2 -7
- package/dist/src/components/Widgets/JRCWidgetArticle/JRCWidgetArticle.d.ts +5 -0
- package/dist/src/components/Widgets/JRCWidgetArticle/JRCWidgetArticleEditor.d.ts +7 -0
- package/dist/src/components/Widgets/JRCWidgetArticleTitle/JRCWidgetArticleTitleEditor.d.ts +0 -2
- package/dist/src/components/Widgets/JRCWidgetAttachment/JRCWidgetArticleAttachmentEditor.d.ts +0 -2
- package/dist/src/components/Widgets/JRCWidgetCheckList/JRCWidgetCheckListEditor.d.ts +1 -2
- package/dist/src/components/Widgets/JRCWidgetCountdown/Confetti.d.ts +1 -0
- package/dist/src/components/Widgets/JRCWidgetCountdown/CountdownEvent.d.ts +1 -1
- package/dist/src/components/Widgets/JRCWidgetCountdown/CountdownNumbers.d.ts +4 -1
- package/dist/src/components/Widgets/JRCWidgetCountdown/JRCWidgetCountdown.d.ts +4 -2
- package/dist/src/components/Widgets/JRCWidgetCountdown/JRCWidgetCountdown.stories.d.ts +9 -1
- package/dist/src/components/Widgets/JRCWidgetCountdown/countdown.utils.d.ts +20 -4
- package/dist/src/components/Widgets/JRCWidgetImage/JRCWidgetImage.d.ts +1 -0
- package/dist/src/components/Widgets/JRCWidgetImage/JRCWidgetImageEditor.d.ts +2 -1
- package/dist/src/components/Widgets/JRCWidgetList/JRCWidgetList.utils.d.ts +1 -0
- package/dist/src/components/Widgets/JRCWidgetList/WidgetListEntries.d.ts +12 -0
- package/dist/src/components/Widgets/JRCWidgetList/WidgetListEntryModal.d.ts +8 -0
- package/dist/src/components/Widgets/JRCWidgetPages/JRCWidgetPages.const.d.ts +1 -0
- package/dist/src/components/Widgets/JRCWidgetPages/JRCWidgetPages.d.ts +8 -0
- package/dist/src/components/Widgets/JRCWidgetPages/JRCWidgetPages.utils.d.ts +24 -0
- package/dist/src/components/Widgets/JRCWidgetPages/JRCWidgetPagesEditor.d.ts +19 -0
- package/dist/src/components/Widgets/JRCWidgetPages/WidgetPagesEntries.d.ts +20 -0
- package/dist/src/components/Widgets/JRCWidgetQuickSurvey/JRCWidgetQuickSurveyEditor.d.ts +1 -2
- package/dist/src/components/Widgets/JRCWidgetSkeleton.d.ts +1 -1
- package/dist/src/components/Widgets/JRCWidgetSlider/JRCWidgetSliderEditor.d.ts +1 -0
- package/dist/src/components/Widgets/JRCWidgetSlider/JRCWidgetSliderEditorSlide.d.ts +2 -1
- package/dist/src/components/Widgets/JRCWidgetWall/JRCWidgetWallEditor.d.ts +7 -0
- package/dist/src/components/Widgets/JRCWidgetWall/JRCWidgetWallEditor.stories.d.ts +7 -0
- package/dist/src/components/Widgets/JRCWidgetWelcome/JRCWidgetWelcome.stories.d.ts +1 -1
- package/dist/src/components/Widgets/const.d.ts +8 -0
- package/dist/src/components/Widgets/context/provider.d.ts +2 -2
- package/dist/src/components/Widgets/utils.d.ts +2 -0
- package/dist/src/components/index.d.ts +11 -3
- package/dist/src/translation/lang.json.d.ts +27 -14
- package/dist/src/utils/index.d.ts +3 -1
- package/dist/src/utils/utils.html.d.ts +4 -1
- package/dist/src/utils/utils.tinymce.d.ts +3 -1
- package/package.json +4 -4
|
@@ -8,6 +8,7 @@ type EditorImageUploadProps = {
|
|
|
8
8
|
onUploadSuccess: (file: jFileLittle | undefined) => void;
|
|
9
9
|
onLoading?: (isLoading: boolean) => void;
|
|
10
10
|
deferServerCalls?: boolean;
|
|
11
|
+
dataCy?: string;
|
|
11
12
|
};
|
|
12
|
-
export declare const EditorImageUpload: ({ token, children, initialFile, onUploadSuccess, onLoading, allowCustomRatio, deferServerCalls, }: EditorImageUploadProps) => import("react").JSX.Element;
|
|
13
|
+
export declare const EditorImageUpload: ({ token, children, initialFile, onUploadSuccess, onLoading, allowCustomRatio, deferServerCalls, dataCy, }: EditorImageUploadProps) => import("react").JSX.Element;
|
|
13
14
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RegisterOptions } from 'react-hook-form';
|
|
2
2
|
import { FormControls } from '../../Form/Input/Common/useFormControls';
|
|
3
|
-
export declare const EditorInput: ({ label, placeholder, initialValue, width, rules, rulesValidate, description, isMultiline, margin, textAlign, onChange, }: {
|
|
3
|
+
export declare const EditorInput: ({ label, placeholder, initialValue, width, rules, rulesValidate, description, isMultiline, margin, textAlign, dataCy, onChange, }: {
|
|
4
4
|
label: string;
|
|
5
5
|
placeholder?: string;
|
|
6
6
|
initialValue: string | undefined;
|
|
@@ -14,5 +14,6 @@ export declare const EditorInput: ({ label, placeholder, initialValue, width, ru
|
|
|
14
14
|
isMultiline?: boolean;
|
|
15
15
|
margin?: string;
|
|
16
16
|
textAlign?: "left" | "right" | "center";
|
|
17
|
+
dataCy?: string;
|
|
17
18
|
onChange: (text: string) => void;
|
|
18
19
|
}) => import("react").JSX.Element;
|
|
@@ -6,5 +6,6 @@ export type EditorRichTextProps = {
|
|
|
6
6
|
height?: number;
|
|
7
7
|
token?: string;
|
|
8
8
|
tinyMCECommonOptions: Pick<JRCInputTinyMCERawProps, 'commonOptions' | 'mentionsQueries'>;
|
|
9
|
+
dataCy?: string;
|
|
9
10
|
};
|
|
10
|
-
export declare const EditorRichText: ({ initialValue, onChange, height, token, tinyMCECommonOptions, }: EditorRichTextProps) => import("react").JSX.Element;
|
|
11
|
+
export declare const EditorRichText: ({ initialValue, onChange, height, token, tinyMCECommonOptions, dataCy, }: EditorRichTextProps) => import("react").JSX.Element;
|
|
@@ -56,7 +56,7 @@ export declare const FlexBoxTreeDescription: import('styled-components/dist/type
|
|
|
56
56
|
export declare const NoResult: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
57
57
|
export declare const WrapperList: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
58
58
|
export declare const ModalContentList: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
59
|
-
export declare const NoOptionList: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "flex" | "position" | "x" | "y" | "padding" | "margin" | "textAlign" | "data-testid" | "
|
|
59
|
+
export declare const NoOptionList: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "flex" | "position" | "x" | "y" | "padding" | "margin" | "textAlign" | "data-testid" | "direction" | "overflow" | "$inline" | "gap" | "childFull"> & Omit<import('../../../Common/FastCss').FastCssProps, "display"> & {
|
|
60
60
|
direction?: import('../../../JRCFlex/JRCFlexBox').FlexDirection;
|
|
61
61
|
$inline?: boolean;
|
|
62
62
|
flex?: boolean | string;
|
|
@@ -66,7 +66,7 @@ export declare const NoOptionList: import('styled-components/dist/types').IStyle
|
|
|
66
66
|
y?: "flex-start" | "center" | "flex-end" | "space-around" | "space-between" | "space-evenly";
|
|
67
67
|
childFull?: boolean;
|
|
68
68
|
'data-testid'?: string;
|
|
69
|
-
}, never> & Partial<Pick<import('styled-components').FastOmit<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "flex" | "position" | "x" | "y" | "padding" | "margin" | "textAlign" | "data-testid" | "
|
|
69
|
+
}, never> & Partial<Pick<import('styled-components').FastOmit<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "flex" | "position" | "x" | "y" | "padding" | "margin" | "textAlign" | "data-testid" | "direction" | "overflow" | "$inline" | "gap" | "childFull"> & Omit<import('../../../Common/FastCss').FastCssProps, "display"> & {
|
|
70
70
|
direction?: import('../../../JRCFlex/JRCFlexBox').FlexDirection;
|
|
71
71
|
$inline?: boolean;
|
|
72
72
|
flex?: boolean | string;
|
|
@@ -79,7 +79,7 @@ export declare const NoOptionList: import('styled-components/dist/types').IStyle
|
|
|
79
79
|
}, never>>, "as" | "forwardedAs"> & {
|
|
80
80
|
as?: import('styled-components').WebTarget | undefined;
|
|
81
81
|
forwardedAs?: import('styled-components').WebTarget | undefined;
|
|
82
|
-
}, never> & Partial<Pick<import('styled-components').FastOmit<import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "flex" | "position" | "x" | "y" | "padding" | "margin" | "textAlign" | "data-testid" | "
|
|
82
|
+
}, never> & Partial<Pick<import('styled-components').FastOmit<import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "flex" | "position" | "x" | "y" | "padding" | "margin" | "textAlign" | "data-testid" | "direction" | "overflow" | "$inline" | "gap" | "childFull"> & Omit<import('../../../Common/FastCss').FastCssProps, "display"> & {
|
|
83
83
|
direction?: import('../../../JRCFlex/JRCFlexBox').FlexDirection;
|
|
84
84
|
$inline?: boolean;
|
|
85
85
|
flex?: boolean | string;
|
|
@@ -89,7 +89,7 @@ export declare const NoOptionList: import('styled-components/dist/types').IStyle
|
|
|
89
89
|
y?: "flex-start" | "center" | "flex-end" | "space-around" | "space-between" | "space-evenly";
|
|
90
90
|
childFull?: boolean;
|
|
91
91
|
'data-testid'?: string;
|
|
92
|
-
}, never> & Partial<Pick<import('styled-components').FastOmit<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "flex" | "position" | "x" | "y" | "padding" | "margin" | "textAlign" | "data-testid" | "
|
|
92
|
+
}, never> & Partial<Pick<import('styled-components').FastOmit<import('react').DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "flex" | "position" | "x" | "y" | "padding" | "margin" | "textAlign" | "data-testid" | "direction" | "overflow" | "$inline" | "gap" | "childFull"> & Omit<import('../../../Common/FastCss').FastCssProps, "display"> & {
|
|
93
93
|
direction?: import('../../../JRCFlex/JRCFlexBox').FlexDirection;
|
|
94
94
|
$inline?: boolean;
|
|
95
95
|
flex?: boolean | string;
|
|
@@ -69,13 +69,13 @@ export declare const MarginLessJRCButton: import('styled-components/dist/types')
|
|
|
69
69
|
} & import('react').RefAttributes<HTMLButtonElement>>, keyof import('react').Component<any, {}, any>>;
|
|
70
70
|
export declare const MenuWithoutTitle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never> & Partial<Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>>> & string;
|
|
71
71
|
export declare const MenuWithTitle: ({ direction, label, themeButton, children, size }: MenuWithTitleProps) => import("react").JSX.Element;
|
|
72
|
-
export declare const DropdownOption: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "lastChild" | keyof DropdownOptionProps> & DropdownOptionProps & {
|
|
73
|
-
lastChild?: boolean;
|
|
74
|
-
}, never> & Partial<Pick<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "lastChild" | keyof DropdownOptionProps> & DropdownOptionProps & {
|
|
75
|
-
lastChild?: boolean;
|
|
72
|
+
export declare const DropdownOption: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "$lastChild" | keyof DropdownOptionProps> & DropdownOptionProps & {
|
|
73
|
+
$lastChild?: boolean;
|
|
74
|
+
}, never> & Partial<Pick<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "$lastChild" | keyof DropdownOptionProps> & DropdownOptionProps & {
|
|
75
|
+
$lastChild?: boolean;
|
|
76
76
|
}, never>>> & string;
|
|
77
|
-
export declare const DropdownOptionLink: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "lastChild" | keyof DropdownOptionProps> & DropdownOptionProps & {
|
|
78
|
-
lastChild?: boolean;
|
|
79
|
-
}, never> & Partial<Pick<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "lastChild" | keyof DropdownOptionProps> & DropdownOptionProps & {
|
|
80
|
-
lastChild?: boolean;
|
|
77
|
+
export declare const DropdownOptionLink: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "$lastChild" | keyof DropdownOptionProps> & DropdownOptionProps & {
|
|
78
|
+
$lastChild?: boolean;
|
|
79
|
+
}, never> & Partial<Pick<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement>, "$lastChild" | keyof DropdownOptionProps> & DropdownOptionProps & {
|
|
80
|
+
$lastChild?: boolean;
|
|
81
81
|
}, never>>> & string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { JRCCalendarProps } from './types';
|
|
2
2
|
export type CalendarEventPlaceHolder = 'no-event-today' | 'no-next-event';
|
|
3
|
-
export declare const JRCCalendar: ({ events, loading, views, defaultView, fluid, mode, fullScreen, deportedToolbar, withPadding, eventModalExtraComponent, onChangeView, onChangeDates, onError, onSuccess, onDeleteEvent, onClickUpdateEvent, onClickTransformEvent, onUpdateStatus, isUpdateStatusLoading, onSelect, disableSelect, bbbMinutesBeforeJoining, }: JRCCalendarProps) => import("react").JSX.Element;
|
|
3
|
+
export declare const JRCCalendar: ({ events, loading, views, defaultView, fluid, autoHeight, mode, fullScreen, deportedToolbar, withPadding, eventModalExtraComponent, onChangeView, onChangeDates, onError, onSuccess, onDeleteEvent, onClickUpdateEvent, onClickTransformEvent, onUpdateStatus, isUpdateStatusLoading, onSelect, disableSelect, bbbMinutesBeforeJoining, }: JRCCalendarProps) => import("react").JSX.Element;
|
|
@@ -6,5 +6,7 @@ export type JRCCollapseProps = {
|
|
|
6
6
|
openByDefault?: boolean;
|
|
7
7
|
open?: boolean;
|
|
8
8
|
contentSpacing?: keyof DefaultTheme['space'] | 0;
|
|
9
|
+
iconColor?: string;
|
|
10
|
+
iconSize?: number;
|
|
9
11
|
};
|
|
10
12
|
export declare const JRCCollapse: (props: JRCCollapseProps) => import("react").JSX.Element;
|
|
@@ -4,7 +4,7 @@ import { DriveOrFilebank } from '../Form/Input/JRCInputFileAdvanced/JRCInputFile
|
|
|
4
4
|
import { JRCInputTinyMCERawProps } from '../Form/Input/JRCInputTinyMCERaw/JRCInputTinyMCERaw';
|
|
5
5
|
type JRCCommentProps = {
|
|
6
6
|
isFocused: boolean;
|
|
7
|
-
comment: CommentWithExtensions<jCommentList, ['
|
|
7
|
+
comment: CommentWithExtensions<jCommentList, ['socialActions', 'quarantine']> & {
|
|
8
8
|
pending?: boolean;
|
|
9
9
|
};
|
|
10
10
|
token?: string;
|
|
@@ -4,7 +4,7 @@ import { DriveOrFilebank } from '../Form/Input/JRCInputFileAdvanced/JRCInputFile
|
|
|
4
4
|
import { JRCInputTinyMCERawProps } from '../Form/Input/JRCInputTinyMCERaw/JRCInputTinyMCERaw';
|
|
5
5
|
import { TinyMCEExtension } from '../Form/Input/JRCInputTinyMCERaw/types';
|
|
6
6
|
export type JRCCommentsBlocProps = {
|
|
7
|
-
comments?: Array<CommentWithExtensions<jCommentList, ['
|
|
7
|
+
comments?: Array<CommentWithExtensions<jCommentList, ['socialActions', 'quarantine']> & {
|
|
8
8
|
pending?: boolean;
|
|
9
9
|
}>;
|
|
10
10
|
initialCommentsNumber?: number;
|
|
@@ -37,7 +37,7 @@ export type JRCCommentsBlocProps = {
|
|
|
37
37
|
};
|
|
38
38
|
articleId: number;
|
|
39
39
|
additionalExtensions: Array<TinyMCEExtension>;
|
|
40
|
-
renderSocialActions?: (comment: CommentWithExtensions<jCommentList, ['
|
|
40
|
+
renderSocialActions?: (comment: CommentWithExtensions<jCommentList, ['socialActions', 'quarantine']>) => ReactNode;
|
|
41
41
|
/** Server-side total. Falls back to the loaded length when the whole thread is in `comments`. */
|
|
42
42
|
commentsCount?: number;
|
|
43
43
|
/** Called when the reader asks for more, so the container can load the next page. */
|
|
@@ -6,5 +6,6 @@ export type JRCConfirmationModalProps = {
|
|
|
6
6
|
onClose: () => void;
|
|
7
7
|
onConfirm: () => void;
|
|
8
8
|
children?: ReactNode;
|
|
9
|
+
dataCy?: string;
|
|
9
10
|
};
|
|
10
|
-
export declare const JRCConfirmationModal: ({ open, icon, title, onClose, onConfirm, children, }: JRCConfirmationModalProps) => import("react").JSX.Element;
|
|
11
|
+
export declare const JRCConfirmationModal: ({ open, icon, title, onClose, onConfirm, children, dataCy, }: JRCConfirmationModalProps) => import("react").JSX.Element;
|
|
@@ -9,6 +9,7 @@ interface DraggableProps {
|
|
|
9
9
|
sectionId?: string | number;
|
|
10
10
|
children: ReactNode | ((dragHandleRef: RefObject<HTMLDivElement | null>) => ReactNode);
|
|
11
11
|
useDragHandle?: boolean;
|
|
12
|
+
scope?: string | undefined;
|
|
12
13
|
}
|
|
13
|
-
export declare const Draggable: ({ type, item, index, onMove, onMoveToSection, sectionId, children, useDragHandle, }: DraggableProps) => import("react").JSX.Element;
|
|
14
|
+
export declare const Draggable: ({ type, item, index, onMove, onMoveToSection, sectionId, children, useDragHandle, scope, }: DraggableProps) => import("react").JSX.Element;
|
|
14
15
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { BaseDndItem, JRCDndOneLevelProps } from './types';
|
|
2
|
-
export declare const JRCDndOneLevel: import('react').MemoExoticComponent<(<T extends BaseDndItem = BaseDndItem>({ items, ItemComponent, EmptyStateComponent, onItemMove, onItemRemove, canRemoveItems, showDragHandle, dragHandleOnly, title: titleProp, emptyStateText, $maxHeight, className, }: JRCDndOneLevelProps<T>) => import("react").JSX.Element)>;
|
|
2
|
+
export declare const JRCDndOneLevel: import('react').MemoExoticComponent<(<T extends BaseDndItem = BaseDndItem>({ items, ItemComponent, EmptyStateComponent, onItemMove, onItemRemove, canRemoveItems, showDragHandle, dragHandleOnly, title: titleProp, emptyStateText, $maxHeight, className, scope, }: JRCDndOneLevelProps<T>) => import("react").JSX.Element)>;
|
|
@@ -11,6 +11,7 @@ export type JRCDropDownProps = {
|
|
|
11
11
|
}) => ReactElement);
|
|
12
12
|
dropdown: (collapseDropdown: () => void) => ReactNode;
|
|
13
13
|
align?: 'left' | 'right';
|
|
14
|
+
direction?: 'down' | 'up';
|
|
14
15
|
onToggle?: (isOpen: boolean) => void;
|
|
15
16
|
background?: string;
|
|
16
17
|
withBorder?: boolean;
|
|
@@ -24,5 +25,5 @@ export type JRCDropDownProps = {
|
|
|
24
25
|
/** Inner padding of the dropdown wrapper. Defaults to `base` (8px). */
|
|
25
26
|
padding?: DropDownPadding;
|
|
26
27
|
};
|
|
27
|
-
export declare const JRCDropDown: ({ trigger, dropdown, align, onToggle, withBorder, borderColor, background, overflow, width, offset, display, boxShadow, padding, }: JRCDropDownProps) => import("react").JSX.Element;
|
|
28
|
+
export declare const JRCDropDown: ({ trigger, dropdown, align, direction, onToggle, withBorder, borderColor, background, overflow, width, offset, display, boxShadow, padding, }: JRCDropDownProps) => import("react").JSX.Element;
|
|
28
29
|
export {};
|
|
@@ -2,6 +2,7 @@ import { FC, ReactNode } from 'react';
|
|
|
2
2
|
import { CSSProperties } from 'styled-components';
|
|
3
3
|
type EmptySpaceBgColor = 'sandLight' | 'skyLight' | 'transparent';
|
|
4
4
|
type Alignment = CSSProperties['justifyContent'];
|
|
5
|
+
type EmptySpaceSize = 'large' | 'small';
|
|
5
6
|
type JRCEmptySpaceProps = {
|
|
6
7
|
img?: string;
|
|
7
8
|
imgAlt?: string;
|
|
@@ -10,6 +11,7 @@ type JRCEmptySpaceProps = {
|
|
|
10
11
|
actions?: ReactNode;
|
|
11
12
|
bgColor?: EmptySpaceBgColor;
|
|
12
13
|
alignment?: Alignment;
|
|
14
|
+
size?: EmptySpaceSize;
|
|
13
15
|
};
|
|
14
16
|
export declare const JRCEmptySpace: FC<JRCEmptySpaceProps>;
|
|
15
17
|
export {};
|
|
@@ -11,7 +11,7 @@ type FlexBoxProps = Omit<FastCssProps, 'display'> & {
|
|
|
11
11
|
childFull?: boolean;
|
|
12
12
|
'data-testid'?: string;
|
|
13
13
|
};
|
|
14
|
-
export declare const JRCFlexBox: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "flex" | "position" | "x" | "y" | "padding" | "margin" | "textAlign" | "data-testid" | "
|
|
14
|
+
export declare const JRCFlexBox: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "flex" | "position" | "x" | "y" | "padding" | "margin" | "textAlign" | "data-testid" | "direction" | "overflow" | "$inline" | "gap" | "childFull"> & Omit<FastCssProps, "display"> & {
|
|
15
15
|
direction?: FlexDirection;
|
|
16
16
|
$inline?: boolean;
|
|
17
17
|
flex?: boolean | string;
|
|
@@ -21,7 +21,7 @@ export declare const JRCFlexBox: import('styled-components/dist/types').IStyledC
|
|
|
21
21
|
y?: "flex-start" | "center" | "flex-end" | "space-around" | "space-between" | "space-evenly";
|
|
22
22
|
childFull?: boolean;
|
|
23
23
|
'data-testid'?: string;
|
|
24
|
-
}, never> & Partial<Pick<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "flex" | "position" | "x" | "y" | "padding" | "margin" | "textAlign" | "data-testid" | "
|
|
24
|
+
}, never> & Partial<Pick<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "flex" | "position" | "x" | "y" | "padding" | "margin" | "textAlign" | "data-testid" | "direction" | "overflow" | "$inline" | "gap" | "childFull"> & Omit<FastCssProps, "display"> & {
|
|
25
25
|
direction?: FlexDirection;
|
|
26
26
|
$inline?: boolean;
|
|
27
27
|
flex?: boolean | string;
|
|
@@ -10,6 +10,7 @@ export type JRCHtmlProps = {
|
|
|
10
10
|
/** Set to false when rendering inside a clipped or clickable ancestor, which no inspection of
|
|
11
11
|
* the HTML fragment can detect: images stay plain instead of becoming controls. */
|
|
12
12
|
imagesInteractive?: boolean;
|
|
13
|
+
useAdminIframeSettings?: boolean;
|
|
13
14
|
seeMore?: {
|
|
14
15
|
href: string;
|
|
15
16
|
label?: string;
|
|
@@ -11,11 +11,16 @@ export type PublishButtonProps = DataCy & {
|
|
|
11
11
|
favoriteOnClick?: (entryKey: string) => void;
|
|
12
12
|
loading: boolean;
|
|
13
13
|
label?: string;
|
|
14
|
+
supportedTypes?: Record<string, {
|
|
15
|
+
type: string;
|
|
16
|
+
label: string;
|
|
17
|
+
}>;
|
|
18
|
+
inline?: boolean;
|
|
14
19
|
tooltip?: Omit<JRCTooltipProps, 'children'>;
|
|
15
20
|
position?: 'left' | 'right';
|
|
16
21
|
icon: string;
|
|
17
22
|
ariaLabel?: string;
|
|
18
23
|
onClickEntry: (entryKey: string, isShiftPressed: boolean) => 'stopPropagation' | 'continue';
|
|
19
24
|
};
|
|
20
|
-
export declare const JRCPublishButton: ({ tooltip, label, icon, sections, hasFavorites, favoriteOnClick, loading, position, dataCy, ariaLabel, onClickEntry, }: PublishButtonProps) => import("react").JSX.Element;
|
|
25
|
+
export declare const JRCPublishButton: ({ tooltip, label, icon, sections, hasFavorites, favoriteOnClick, supportedTypes, inline, loading, position, dataCy, ariaLabel, onClickEntry, }: PublishButtonProps) => import("react").JSX.Element;
|
|
21
26
|
export {};
|
|
@@ -3,5 +3,6 @@ export type JRCRateStarsProps = {
|
|
|
3
3
|
userValue?: number;
|
|
4
4
|
readOnly?: boolean;
|
|
5
5
|
onRate?: (value: number) => void;
|
|
6
|
+
size?: number;
|
|
6
7
|
};
|
|
7
|
-
export declare const JRCRateStars: ({ value, userValue, readOnly, onRate }: JRCRateStarsProps) => import("react").JSX.Element;
|
|
8
|
+
export declare const JRCRateStars: ({ value, userValue, readOnly, onRate, size }: JRCRateStarsProps) => import("react").JSX.Element;
|
|
@@ -7,7 +7,6 @@ export type TooltipSizes = keyof typeof tooltipSizes.padding;
|
|
|
7
7
|
export type JRCBaseTooltipProps = {
|
|
8
8
|
tooltip: ReactNode;
|
|
9
9
|
children: ReactNode;
|
|
10
|
-
dataEventOff: 'click' | 'mouseleave';
|
|
11
10
|
description?: string;
|
|
12
11
|
className?: string;
|
|
13
12
|
clickable?: boolean;
|
|
@@ -20,7 +19,6 @@ export type JRCBaseTooltipProps = {
|
|
|
20
19
|
position?: 'top' | 'bottom' | 'left' | 'right';
|
|
21
20
|
delayHide?: number;
|
|
22
21
|
delayShow?: number;
|
|
23
|
-
events?: any;
|
|
24
22
|
asBlock?: boolean;
|
|
25
23
|
height?: string;
|
|
26
24
|
disabled?: boolean;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { WidgetAccordionContent } from 'jamespot-user-api';
|
|
2
|
+
export type JRCWidgetAccordionEditorProps = {
|
|
3
|
+
uniqid: string;
|
|
4
|
+
content: WidgetAccordionContent;
|
|
5
|
+
onChangeContent: (uniqid: string, content: WidgetAccordionContent) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const JRCWidgetAccordionEditor: (_props: JRCWidgetAccordionEditorProps) => null;
|
|
@@ -7,6 +7,8 @@ export declare const ICON_MARGIN_LG = 14;
|
|
|
7
7
|
export declare const ICON_FONT_SM = 24;
|
|
8
8
|
export declare const ICON_FONT_LG = 38;
|
|
9
9
|
export declare const APP_TEXT_FONT_SM = 11;
|
|
10
|
+
export declare const APP_TEXT_FONT_LG = 14;
|
|
11
|
+
export declare const APP_TEXT_LINE_HEIGHT = 20;
|
|
10
12
|
export declare const LIST_ICON_BOX = 50;
|
|
11
13
|
export declare const LIST_APPS_CIRCLE = 50;
|
|
12
14
|
export declare const LIST_LINK_CIRCLE = 40;
|
|
@@ -30,10 +32,3 @@ export declare const YES_NO_OPTIONS: {
|
|
|
30
32
|
label: string;
|
|
31
33
|
value: boolean;
|
|
32
34
|
}[];
|
|
33
|
-
export type AppExtension = {
|
|
34
|
-
name: string;
|
|
35
|
-
img: string;
|
|
36
|
-
title: string;
|
|
37
|
-
url: string;
|
|
38
|
-
};
|
|
39
|
-
export declare const APP_EXTENSIONS: AppExtension[];
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { WidgetArticleContent } from 'jamespot-user-api';
|
|
2
|
+
export interface JRCWidgetArticleEditorProps {
|
|
3
|
+
uniqid: string;
|
|
4
|
+
content: WidgetArticleContent;
|
|
5
|
+
onChangeContent: (uniqid: string, content: WidgetArticleContent) => void;
|
|
6
|
+
}
|
|
7
|
+
export declare const JRCWidgetArticleEditor: (_props: JRCWidgetArticleEditorProps) => null;
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { WidgetArticleTitleContent } from 'jamespot-user-api';
|
|
2
|
-
import { ReactElement } from 'react';
|
|
3
2
|
export declare const JRCWidgetArticleTitleEditor: ({ content, onChange, onSave, }: {
|
|
4
3
|
content: WidgetArticleTitleContent;
|
|
5
|
-
onOpen: (view: ReactElement) => void;
|
|
6
4
|
onSave: (content: Partial<WidgetArticleTitleContent>) => void;
|
|
7
5
|
onChange: (content: Partial<WidgetArticleTitleContent>, override?: boolean) => void;
|
|
8
6
|
}) => import("react").JSX.Element;
|
package/dist/src/components/Widgets/JRCWidgetAttachment/JRCWidgetArticleAttachmentEditor.d.ts
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { WidgetArticleAttachmentContent, WidgetStateProps } from 'jamespot-user-api';
|
|
2
|
-
import { ReactElement } from 'react';
|
|
3
2
|
type JRCWidgetArticleAttachmentEditorProps = {
|
|
4
3
|
token: string | undefined;
|
|
5
4
|
content: WidgetArticleAttachmentContent;
|
|
6
5
|
onChange: (content: Partial<WidgetArticleAttachmentContent>, override?: boolean) => void;
|
|
7
6
|
onSave: (content: Partial<WidgetArticleAttachmentContent>) => void;
|
|
8
7
|
onStateChange?: (state: WidgetStateProps) => void;
|
|
9
|
-
onOpen?: (view: ReactElement) => void;
|
|
10
8
|
};
|
|
11
9
|
export declare const JRCWidgetArticleAttachmentEditor: ({ token, content, onChange, onSave, }: JRCWidgetArticleAttachmentEditorProps) => import("react").JSX.Element;
|
|
12
10
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { WidgetCheckListContent, WidgetCheckListContentArr } from 'jamespot-user-api';
|
|
2
2
|
type JRCWidgetCheckListEditorProps = {
|
|
3
3
|
token?: string;
|
|
4
4
|
uniqid: string;
|
|
@@ -11,7 +11,6 @@ type JRCWidgetCheckListEditorProps = {
|
|
|
11
11
|
uniqid: string;
|
|
12
12
|
title: string;
|
|
13
13
|
}) => void;
|
|
14
|
-
onSave?: (uniqid: string, content: Partial<CombinedWidgetContent>) => void;
|
|
15
14
|
handleChange: (content: Partial<WidgetCheckListContent>) => void;
|
|
16
15
|
};
|
|
17
16
|
export declare const JRCWidgetCheckListEditor: ({ token, uniqid, content, inplace, onChangeContent, onChangeWrapper, handleChange, }: JRCWidgetCheckListEditorProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Confetti: () => import("react").JSX.Element;
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { CountdownSize } from './countdown.utils';
|
|
2
|
+
export declare const CountdownNumbers: ({ value, label, size, testId, }: {
|
|
2
3
|
value: number;
|
|
3
4
|
label?: string;
|
|
5
|
+
size: CountdownSize;
|
|
6
|
+
testId?: string;
|
|
4
7
|
}) => import("react").JSX.Element;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
export declare const JRCWidgetCountdown: ({ dateStart,
|
|
1
|
+
export declare const JRCWidgetCountdown: ({ dateStart, contentUrl, visioUrl, size, }: {
|
|
2
2
|
dateStart: Date;
|
|
3
|
-
|
|
3
|
+
contentUrl?: string;
|
|
4
|
+
visioUrl?: string;
|
|
5
|
+
size?: string | number;
|
|
4
6
|
}) => import("react").JSX.Element;
|
|
@@ -1,4 +1,12 @@
|
|
|
1
|
-
import { Meta } from '@storybook/react-vite';
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
2
|
declare const _default: Meta;
|
|
3
3
|
export default _default;
|
|
4
4
|
export declare const Primary: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react-vite').ReactRenderer, import('@storybook/react-vite').Args>;
|
|
5
|
+
export declare const Today: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react-vite').ReactRenderer, import('@storybook/react-vite').Args>;
|
|
6
|
+
export declare const Medium: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react-vite').ReactRenderer, import('@storybook/react-vite').Args>;
|
|
7
|
+
export declare const Large: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react-vite').ReactRenderer, import('@storybook/react-vite').Args>;
|
|
8
|
+
export declare const NarrowTile: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react-vite').ReactRenderer, import('@storybook/react-vite').Args>;
|
|
9
|
+
export declare const MoreThanNinetyNineDays: StoryObj;
|
|
10
|
+
export declare const Over: StoryObj;
|
|
11
|
+
export declare const OverWithVisio: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react-vite').ReactRenderer, import('@storybook/react-vite').Args>;
|
|
12
|
+
export declare const Celebration: StoryObj;
|
|
@@ -1,6 +1,22 @@
|
|
|
1
|
-
export
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export type Countdown = {
|
|
2
|
+
days: number;
|
|
3
|
+
hours: number;
|
|
4
|
+
minutes: number;
|
|
5
|
+
seconds: number;
|
|
6
|
+
isOver: boolean;
|
|
5
7
|
};
|
|
8
|
+
export declare function countdownTo(deadline: number, now?: number): Countdown;
|
|
6
9
|
export declare function clockNumber(value: number): number[];
|
|
10
|
+
export type CountdownSizeKey = '30' | '40' | '60';
|
|
11
|
+
export type CountdownSize = {
|
|
12
|
+
mask: number;
|
|
13
|
+
digit: number;
|
|
14
|
+
label: number;
|
|
15
|
+
title: number;
|
|
16
|
+
padding: number;
|
|
17
|
+
gap: number;
|
|
18
|
+
digitGap: number;
|
|
19
|
+
titleMargin: number;
|
|
20
|
+
};
|
|
21
|
+
export declare const COUNTDOWN_SIZES: Record<CountdownSizeKey, CountdownSize>;
|
|
22
|
+
export declare function countdownSize(size?: string | number): CountdownSize;
|
|
@@ -4,5 +4,6 @@ export interface JRCWidgetImageEditorProps {
|
|
|
4
4
|
content: WidgetImageContent;
|
|
5
5
|
token?: string;
|
|
6
6
|
onChangeContent: (uniqid: string, content: WidgetImageContent) => void;
|
|
7
|
+
onSelectAnchor?: () => void;
|
|
7
8
|
}
|
|
8
|
-
export declare const JRCWidgetImageEditor: ({ uniqid, content, token, onChangeContent }: JRCWidgetImageEditorProps) => import("react").JSX.Element;
|
|
9
|
+
export declare const JRCWidgetImageEditor: ({ uniqid, content, token, onChangeContent, onSelectAnchor, }: JRCWidgetImageEditorProps) => import("react").JSX.Element;
|
|
@@ -4,4 +4,5 @@ import { OpeningType, WidgetListContentArr } from 'jamespot-user-api';
|
|
|
4
4
|
* anchor, everything else opens its link. Mirrors the migration the legacy editor runs on load.
|
|
5
5
|
*/
|
|
6
6
|
export declare const resolveOpeningType: (entry: WidgetListContentArr) => OpeningType;
|
|
7
|
+
export declare const decodeEntryTitle: (title: string) => string;
|
|
7
8
|
export declare const resolveCssValue: (css: Record<string, string | number> | undefined, key: string) => string | undefined;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { WidgetListContentArr } from 'jamespot-user-api';
|
|
2
|
+
export type WidgetListEntryWithId = WidgetListContentArr & {
|
|
3
|
+
uuid: string;
|
|
4
|
+
};
|
|
5
|
+
export type WidgetListEntriesProps = {
|
|
6
|
+
entries: WidgetListEntryWithId[];
|
|
7
|
+
onEdit: (uuid: string) => void;
|
|
8
|
+
onPickIcon: (uuid: string) => void;
|
|
9
|
+
onRemove: (uuid: string) => void;
|
|
10
|
+
onMove: (dragIndex: number, hoverIndex: number) => void;
|
|
11
|
+
};
|
|
12
|
+
export declare const WidgetListEntries: ({ entries, onEdit, onPickIcon, onRemove, onMove }: WidgetListEntriesProps) => import("react").JSX.Element | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { WidgetListContentArr } from 'jamespot-user-api';
|
|
2
|
+
export type WidgetListEntryModalProps = {
|
|
3
|
+
open: boolean;
|
|
4
|
+
initialEntry?: WidgetListContentArr | undefined;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
onConfirm: (entry: WidgetListContentArr) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const WidgetListEntryModal: ({ open, initialEntry, onClose, onConfirm }: WidgetListEntryModalProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const WIDGET_PAGES_MENU_WIDTH = 280;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { WidgetPagesContent, WidgetPagesNestedWidget } from 'jamespot-user-api';
|
|
2
|
+
import { ReactNode } from 'react';
|
|
3
|
+
export type JRCWidgetPagesProps = {
|
|
4
|
+
content: WidgetPagesContent;
|
|
5
|
+
/** Nested widgets are rendered by the platform, which the design system cannot import. */
|
|
6
|
+
renderWidget: (widget: WidgetPagesNestedWidget) => ReactNode;
|
|
7
|
+
};
|
|
8
|
+
export declare const JRCWidgetPages: ({ content, renderWidget }: JRCWidgetPagesProps) => import("react").JSX.Element | null;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { WidgetPagesEntry } from 'jamespot-user-api';
|
|
2
|
+
export type WidgetPagesEntryPath = number[];
|
|
3
|
+
export declare const WIDGET_PAGES_MAX_DEPTH = 3;
|
|
4
|
+
export declare const pathFromKey: (key: string) => WidgetPagesEntryPath;
|
|
5
|
+
export declare const createWidgetPagesEntry: (title: string, depth: number) => WidgetPagesEntry;
|
|
6
|
+
export declare const updateEntryAt: (entries: WidgetPagesEntry[], path: WidgetPagesEntryPath, update: (entry: WidgetPagesEntry) => WidgetPagesEntry) => WidgetPagesEntry[];
|
|
7
|
+
export declare const removeEntryAt: (entries: WidgetPagesEntry[], path: WidgetPagesEntryPath) => WidgetPagesEntry[];
|
|
8
|
+
export declare const moveEntryWithin: (entries: WidgetPagesEntry[], parentPath: WidgetPagesEntryPath, dragIndex: number, hoverIndex: number) => WidgetPagesEntry[];
|
|
9
|
+
export declare const setOpenRecursive: (entries: WidgetPagesEntry[], isOpen: boolean) => WidgetPagesEntry[];
|
|
10
|
+
export declare const countDescendants: (entry: WidgetPagesEntry) => number;
|
|
11
|
+
export declare const pathKey: (path: WidgetPagesEntryPath) => string;
|
|
12
|
+
export type WidgetPagesEntryMatch = {
|
|
13
|
+
entry: WidgetPagesEntry;
|
|
14
|
+
path: WidgetPagesEntryPath;
|
|
15
|
+
};
|
|
16
|
+
export declare const searchEntries: (entries: WidgetPagesEntry[], query: string, parentPath?: WidgetPagesEntryPath) => WidgetPagesEntryMatch[];
|
|
17
|
+
export declare const getEntryAt: (entries: WidgetPagesEntry[], path: WidgetPagesEntryPath) => WidgetPagesEntry | undefined;
|
|
18
|
+
export type WidgetPagesEntryRef = {
|
|
19
|
+
uniqid?: string | undefined;
|
|
20
|
+
path: WidgetPagesEntryPath;
|
|
21
|
+
};
|
|
22
|
+
export declare const entryRef: (entry: WidgetPagesEntry, path: WidgetPagesEntryPath) => WidgetPagesEntryRef;
|
|
23
|
+
export declare const findEntry: (entries: WidgetPagesEntry[], ref: WidgetPagesEntryRef) => WidgetPagesEntry | undefined;
|
|
24
|
+
export declare const matchesEntryRef: (ref: WidgetPagesEntryRef, entry: WidgetPagesEntry, path: WidgetPagesEntryPath) => boolean;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { WidgetPagesContent } from 'jamespot-user-api';
|
|
2
|
+
import { WidgetPagesEntryPath } from './JRCWidgetPages.utils';
|
|
3
|
+
export type WidgetPagesPageTarget = {
|
|
4
|
+
kind: 'cover';
|
|
5
|
+
} | {
|
|
6
|
+
kind: 'entry';
|
|
7
|
+
path: WidgetPagesEntryPath;
|
|
8
|
+
};
|
|
9
|
+
export type JRCWidgetPagesEditorProps = {
|
|
10
|
+
uniqid: string;
|
|
11
|
+
content: WidgetPagesContent;
|
|
12
|
+
onChangeContent: (uniqid: string, content: WidgetPagesContent) => void;
|
|
13
|
+
/**
|
|
14
|
+
* A page body is a nested widget builder (with its keywords), which needs the platform the design
|
|
15
|
+
* system has no access to. The wrapper opens it.
|
|
16
|
+
*/
|
|
17
|
+
onEditPage?: (target: WidgetPagesPageTarget) => void;
|
|
18
|
+
};
|
|
19
|
+
export declare const JRCWidgetPagesEditor: ({ uniqid, content, onChangeContent, onEditPage }: JRCWidgetPagesEditorProps) => import("react").JSX.Element;
|