jamespot-react-components 1.3.120 → 1.3.122
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 +1959 -1606
- package/dist/jamespot-react-components.js +20659 -19390
- package/dist/src/components/Editors/components/Editor.style.d.ts +2 -1
- package/dist/src/components/Editors/components/EditorInputGroup.d.ts +1 -3
- package/dist/src/components/Editors/components/EditorInputGroups.d.ts +1 -2
- package/dist/src/components/Form/Input/JRCInputCheckbox/components/JRCRadio.d.ts +7 -1
- package/dist/src/components/Form/Input/JRCSelect/JRCInputAutocompleteViews.d.ts +2 -7
- package/dist/src/components/Form/Input/JRCSelect/JRCInputSelect.style.d.ts +8 -4
- package/dist/src/components/Form/Input/JRCSelect/JRCInputSelect.types.d.ts +1 -6
- package/dist/src/components/JRCBusinessContacts/JRCBusinessContacts.d.ts +2 -5
- package/dist/src/components/JRCButtonDropdown/JRCButtonDropdown.styles.d.ts +7 -2
- package/dist/src/components/JRCCalendar/JRCCalendarEvent.d.ts +1 -1
- package/dist/src/components/JRCCalendar/JRCCalendarEvent.stories.d.ts +110 -0
- package/dist/src/components/JRCFileViewer/JRCFileViewer.d.ts +16 -1
- package/dist/src/components/JRCFileViewer/JRCFileViewerContent.d.ts +5 -7
- package/dist/src/components/JRCFileViewer/JRCFileViewerContentApplication.d.ts +5 -6
- package/dist/src/components/JRCFileViewer/JRCFileViewerOpenWithOptions.d.ts +5 -6
- package/dist/src/components/JRCFileViewer/JRCFileViewerRaw.d.ts +2 -0
- package/dist/src/components/JRCFileViewer/fileToViewerItem.d.ts +8 -0
- package/dist/src/components/JRCFileViewer/types.d.ts +21 -12
- package/dist/src/components/JRCFlex/JRCFlexBox.d.ts +5 -2
- package/dist/src/components/JRCGroups/JRCGroups.d.ts +2 -5
- package/dist/src/components/JRCHtml/JRCHtml.d.ts +3 -0
- package/dist/src/components/JRCHtml/JRCHtml.stories.d.ts +2 -0
- package/dist/src/components/JRCSlider/JRCSlider.d.ts +4 -1
- package/dist/src/components/JRCSlider/JRCSlider.stories.d.ts +11 -2
- package/dist/src/components/JRCSlider/components/SliderArrows.d.ts +6 -1
- package/dist/src/components/JRCSlider/components/SliderDots.d.ts +3 -1
- package/dist/src/components/JRCUsers/JRCUsers.d.ts +2 -5
- package/dist/src/components/Templates/template.styles.d.ts +9 -0
- package/dist/src/components/Widgets/JRCWidgetNews/JRCWidgetNews.const.d.ts +49 -0
- package/dist/src/components/Widgets/JRCWidgetNews/JRCWidgetNews.d.ts +17 -0
- package/dist/src/components/Widgets/JRCWidgetNews/JRCWidgetNews.stories.d.ts +11 -0
- package/dist/src/components/Widgets/JRCWidgetNews/JRCWidgetNewsEditor.d.ts +9 -0
- package/dist/src/components/Widgets/JRCWidgetNews/NewsItem.d.ts +17 -0
- package/dist/src/components/Widgets/JRCWidgetNewsflash/JRCWidgetNewsflash.const.d.ts +0 -1
- package/dist/src/components/Widgets/JRCWidgetNewsflash/JRCWidgetNewsflash.stories.d.ts +6 -0
- package/dist/src/components/Widgets/JRCWidgetNewsflash/JRCWidgetNewsflashEditor.d.ts +2 -6
- package/dist/src/components/Widgets/JRCWidgetNewsflash/NewsflashActions.d.ts +1 -2
- package/dist/src/components/Widgets/JRCWidgetNewsflash/NewsflashDescription.d.ts +10 -0
- package/dist/src/components/Widgets/JRCWidgetSurvey/JRCWidgetSurvey.d.ts +8 -0
- package/dist/src/components/Widgets/JRCWidgetSurvey/JRCWidgetSurvey.stories.d.ts +17 -0
- package/dist/src/components/Widgets/JRCWidgetSurvey/JRCWidgetSurvey.styles.d.ts +20 -0
- package/dist/src/components/Widgets/JRCWidgetSurvey/JRCWidgetSurvey.utils.d.ts +16 -0
- package/dist/src/components/Widgets/JRCWidgetSurvey/JRCWidgetSurveyEditor.d.ts +8 -0
- package/dist/src/components/Widgets/JRCWidgetSurvey/SurveySelectionModal.d.ts +8 -0
- package/dist/src/components/Widgets/WidgetCalendar/WidgetCalendarEditor.d.ts +2 -6
- package/dist/src/components/index.d.ts +4 -0
- package/dist/src/index.d.ts +2 -0
- package/dist/src/translation/lang.json.d.ts +48 -1
- package/dist/src/types.d.ts +2 -1
- package/dist/src/utils/utils.contentImages.d.ts +5 -0
- package/dist/src/utils/utils.html.d.ts +6 -0
- package/dist/src/utils/utils.iframeVideo.d.ts +3 -1
- package/dist/src/utils/utils.string.d.ts +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jTaxonomyLittle, NewsArticleDisplayMode, NewsConcept, NewsOrder, NewsOrientation, NewsView } from 'jamespot-user-api';
|
|
2
|
+
export type NewsArticle = {
|
|
3
|
+
uri: string;
|
|
4
|
+
id: number;
|
|
5
|
+
type: string;
|
|
6
|
+
title: string;
|
|
7
|
+
description: string;
|
|
8
|
+
url: string;
|
|
9
|
+
backgroundImage: string;
|
|
10
|
+
dateModified: string;
|
|
11
|
+
};
|
|
12
|
+
export declare const NEWS_VIEW_OPTIONS: {
|
|
13
|
+
label: string;
|
|
14
|
+
value: NewsView;
|
|
15
|
+
}[];
|
|
16
|
+
export declare const NEWS_ORIENTATION_OPTIONS: {
|
|
17
|
+
label: string;
|
|
18
|
+
value: NewsOrientation;
|
|
19
|
+
}[];
|
|
20
|
+
export declare const NEWS_ORDER_OPTIONS: {
|
|
21
|
+
label: string;
|
|
22
|
+
value: NewsOrder;
|
|
23
|
+
}[];
|
|
24
|
+
export declare const NEWS_DISPLAY_MODE_OPTIONS: {
|
|
25
|
+
label: string;
|
|
26
|
+
value: NewsArticleDisplayMode;
|
|
27
|
+
}[];
|
|
28
|
+
export declare const NEWS_SIZE_OPTIONS: {
|
|
29
|
+
label: string;
|
|
30
|
+
value: string;
|
|
31
|
+
}[];
|
|
32
|
+
export declare const DEFAULT_NEWS_COLUMNS = 2;
|
|
33
|
+
export declare const DEFAULT_NEWS_LIMIT = 10;
|
|
34
|
+
export type NewsTypeOption = {
|
|
35
|
+
type: string;
|
|
36
|
+
label: string;
|
|
37
|
+
cssClass: string;
|
|
38
|
+
cssColor: string;
|
|
39
|
+
};
|
|
40
|
+
export declare const NEWS_MAX_TYPES = 8;
|
|
41
|
+
export type NewsTaxonomy = jTaxonomyLittle & {
|
|
42
|
+
mainTypes?: Record<string, unknown> | unknown[] | undefined;
|
|
43
|
+
types?: unknown[] | null | undefined;
|
|
44
|
+
cssClass?: string | undefined;
|
|
45
|
+
cssColor?: string | undefined;
|
|
46
|
+
class?: string | undefined;
|
|
47
|
+
};
|
|
48
|
+
export declare const isArticleTaxonomy: (taxo: NewsTaxonomy) => boolean;
|
|
49
|
+
export declare const taxonomyToConcept: (t: NewsTaxonomy) => NewsConcept;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { NewsConcept, WidgetNewsContent } from 'jamespot-user-api';
|
|
2
|
+
import { NewsArticle } from './JRCWidgetNews.const';
|
|
3
|
+
export type JRCWidgetNewsProps = {
|
|
4
|
+
content: WidgetNewsContent;
|
|
5
|
+
articles: NewsArticle[];
|
|
6
|
+
highlight?: NewsArticle | undefined;
|
|
7
|
+
isLoading?: boolean;
|
|
8
|
+
notMember?: boolean;
|
|
9
|
+
subscribeUrl?: string | undefined;
|
|
10
|
+
hasMore?: boolean;
|
|
11
|
+
isLoadingMore?: boolean;
|
|
12
|
+
filters?: NewsConcept[];
|
|
13
|
+
onFiltersChange?: (filters: NewsConcept[]) => void;
|
|
14
|
+
searchConcepts?: (uriTaxonomy: string, query: string) => Promise<NewsConcept[]>;
|
|
15
|
+
onShowMore: () => void;
|
|
16
|
+
};
|
|
17
|
+
export declare const JRCWidgetNews: ({ content, articles, highlight, isLoading, notMember, subscribeUrl, hasMore, isLoadingMore, filters, onFiltersChange, searchConcepts, onShowMore, }: JRCWidgetNewsProps) => import("react").JSX.Element | null;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { JRCWidgetNews } from './JRCWidgetNews';
|
|
3
|
+
declare const meta: Meta<typeof JRCWidgetNews>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof JRCWidgetNews>;
|
|
6
|
+
export declare const List: Story;
|
|
7
|
+
export declare const Gallery: Story;
|
|
8
|
+
export declare const WithHighlight: Story;
|
|
9
|
+
export declare const Empty: Story;
|
|
10
|
+
export declare const Loading: Story;
|
|
11
|
+
export declare const NotMember: Story;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { WidgetNewsContent } from 'jamespot-user-api';
|
|
2
|
+
import { NewsTypeOption } from './JRCWidgetNews.const';
|
|
3
|
+
export type JRCWidgetNewsEditorProps = {
|
|
4
|
+
uniqid: string;
|
|
5
|
+
content: WidgetNewsContent;
|
|
6
|
+
onChangeContent: (uniqid: string, content: WidgetNewsContent) => void;
|
|
7
|
+
availableTypes: NewsTypeOption[];
|
|
8
|
+
};
|
|
9
|
+
export declare const JRCWidgetNewsEditor: ({ uniqid, content, onChangeContent, availableTypes }: JRCWidgetNewsEditorProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { NewsArticleDisplayMode, NewsOrientation } from 'jamespot-user-api';
|
|
2
|
+
import { NewsArticle } from './JRCWidgetNews.const';
|
|
3
|
+
type NewsItemProps = {
|
|
4
|
+
article: NewsArticle;
|
|
5
|
+
view: 'list' | 'gallery';
|
|
6
|
+
display?: string | undefined;
|
|
7
|
+
displayMode?: NewsArticleDisplayMode | undefined;
|
|
8
|
+
orientation?: NewsOrientation | undefined;
|
|
9
|
+
hideImage?: boolean;
|
|
10
|
+
hideDate?: boolean;
|
|
11
|
+
hideDesc?: boolean;
|
|
12
|
+
titleColor?: string | undefined;
|
|
13
|
+
textColor?: string | undefined;
|
|
14
|
+
columns?: number | undefined;
|
|
15
|
+
};
|
|
16
|
+
export declare const NewsItem: ({ article, view, display, displayMode, orientation, hideImage, hideDate, hideDesc, titleColor, textColor, columns, }: NewsItemProps) => import("react").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -6,7 +6,13 @@ type Story = StoryObj<typeof JRCWidgetNewsflash>;
|
|
|
6
6
|
export declare const ImageMode: Story;
|
|
7
7
|
export declare const BannerMode: Story;
|
|
8
8
|
export declare const CoverMode: Story;
|
|
9
|
+
export declare const LongTextShortContainer: Story;
|
|
10
|
+
export declare const LongTextTallContainer: Story;
|
|
11
|
+
export declare const LongTextCover: Story;
|
|
12
|
+
export declare const EmbedOnlyDescription: Story;
|
|
9
13
|
export declare const EmptyEdit: Story;
|
|
10
14
|
export declare const EmptyView: Story;
|
|
11
15
|
export declare const EditorWithoutGroups: Story;
|
|
12
16
|
export declare const EditorWithGroups: Story;
|
|
17
|
+
export declare const ClickTargetsImage: Story;
|
|
18
|
+
export declare const ClickTargetsBanner: Story;
|
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AVProps } from '../../Form/Input/JRCSelect/JRCInputAutocompleteViews';
|
|
1
|
+
import { WidgetNewsflashContent } from 'jamespot-user-api';
|
|
3
2
|
export interface JRCWidgetNewsflashEditorProps {
|
|
4
3
|
uniqid: string;
|
|
5
4
|
content: WidgetNewsflashContent;
|
|
6
5
|
onChangeContent: (uniqid: string, content: WidgetNewsflashContent) => void;
|
|
7
|
-
handlers: AVProps['handlers'] & {
|
|
8
|
-
audience: Pick<JAudienceApi, 'autocompletePublishTo'>;
|
|
9
|
-
};
|
|
10
6
|
}
|
|
11
|
-
export declare const JRCWidgetNewsflashEditor: ({ uniqid, content, onChangeContent
|
|
7
|
+
export declare const JRCWidgetNewsflashEditor: ({ uniqid, content, onChangeContent }: JRCWidgetNewsflashEditorProps) => import("react").JSX.Element;
|
|
@@ -6,8 +6,7 @@ export type NewsflashActionButtonProps = {
|
|
|
6
6
|
};
|
|
7
7
|
export declare const NewsflashActionButton: ({ href, label, color, backgroundColor }: NewsflashActionButtonProps) => import("react").JSX.Element;
|
|
8
8
|
export type NewsflashReadMoreProps = {
|
|
9
|
-
href: string;
|
|
10
9
|
label: string;
|
|
11
10
|
color?: string | undefined;
|
|
12
11
|
};
|
|
13
|
-
export declare const NewsflashReadMore: ({
|
|
12
|
+
export declare const NewsflashReadMore: ({ label, color }: NewsflashReadMoreProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type NewsflashDescriptionProps = {
|
|
2
|
+
html: string | undefined;
|
|
3
|
+
/**
|
|
4
|
+
* Cap for cards whose height comes from their own content, where measuring the box would feed
|
|
5
|
+
* each truncation back into the next measurement.
|
|
6
|
+
*/
|
|
7
|
+
maxHeight?: number | undefined;
|
|
8
|
+
className?: string;
|
|
9
|
+
};
|
|
10
|
+
export declare const NewsflashDescription: ({ html, maxHeight, className }: NewsflashDescriptionProps) => import("react").JSX.Element | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { jPollSurveyView } from 'jamespot-user-api';
|
|
2
|
+
export type JRCWidgetSurveyProps = {
|
|
3
|
+
survey: jPollSurveyView;
|
|
4
|
+
bannerImage?: string | undefined;
|
|
5
|
+
icon?: string | undefined;
|
|
6
|
+
iconColor?: string | undefined;
|
|
7
|
+
};
|
|
8
|
+
export declare const JRCWidgetSurvey: ({ survey, bannerImage, icon, iconColor }: JRCWidgetSurveyProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { JRCWidgetSurvey } from './JRCWidgetSurvey';
|
|
3
|
+
declare const meta: Meta<typeof JRCWidgetSurvey>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof JRCWidgetSurvey>;
|
|
6
|
+
export declare const WithBanner: Story;
|
|
7
|
+
export declare const WithoutBanner: Story;
|
|
8
|
+
export declare const WithoutProgression: Story;
|
|
9
|
+
export declare const NoRespondent: Story;
|
|
10
|
+
export declare const FullyAnswered: Story;
|
|
11
|
+
export declare const Closed: Story;
|
|
12
|
+
export declare const RespondedSingleResponse: Story;
|
|
13
|
+
export declare const RespondedMultipleResponses: Story;
|
|
14
|
+
export declare const InProgress: Story;
|
|
15
|
+
export declare const Editor: StoryObj;
|
|
16
|
+
export declare const EditorEmptySelection: StoryObj;
|
|
17
|
+
export declare const EditorTemplateMode: StoryObj;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const CSSContainer: 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;
|
|
2
|
+
export declare const CSSBanner: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$image"> & {
|
|
3
|
+
$image?: string | undefined;
|
|
4
|
+
}, never> & Partial<Pick<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$image"> & {
|
|
5
|
+
$image?: string | undefined;
|
|
6
|
+
}, never>>> & string;
|
|
7
|
+
export declare const CSSProgression: 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;
|
|
8
|
+
export declare const CSSProgressBarHolder: 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;
|
|
9
|
+
export declare const CSSCount: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never> & Partial<Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>>> & string;
|
|
10
|
+
export declare const CSSInfos: 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;
|
|
11
|
+
export declare const CSSIcon: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$color"> & {
|
|
12
|
+
$color?: string | undefined;
|
|
13
|
+
}, never> & Partial<Pick<import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "$color"> & {
|
|
14
|
+
$color?: string | undefined;
|
|
15
|
+
}, never>>> & string;
|
|
16
|
+
export declare const CSSAuthorLink: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('../../..').JRCStyledHrefProps & import('styled-components/dist/types').BaseObject, never> & Partial<Pick<import('../../..').JRCStyledHrefProps & import('styled-components/dist/types').BaseObject, never>>> & string & Omit<({ dataCy, hasLicense, href, useLink, ...props }: import('../../..').JRCStyledHrefProps) => import("react").JSX.Element, keyof import('react').Component<any, {}, any>>;
|
|
17
|
+
export declare const CSSTexts: 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;
|
|
18
|
+
export declare const CSSTitle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('../../..').JRCStyledHrefProps & import('styled-components/dist/types').BaseObject, never> & Partial<Pick<import('../../..').JRCStyledHrefProps & import('styled-components/dist/types').BaseObject, never>>> & string & Omit<({ dataCy, hasLicense, href, useLink, ...props }: import('../../..').JRCStyledHrefProps) => import("react").JSX.Element, keyof import('react').Component<any, {}, any>>;
|
|
19
|
+
export declare const CSSSubtitle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never> & Partial<Pick<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>>> & string;
|
|
20
|
+
export declare const CSSActions: 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;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Colors } from 'jamespot-front-business';
|
|
2
|
+
import { PollSurveyState } from 'jamespot-user-api';
|
|
3
|
+
export declare const surveyProgressPercentage: (value: number, max: number) => number;
|
|
4
|
+
export declare const surveyProgressColor: (buckets: Record<string, string>, percentage: number) => Colors;
|
|
5
|
+
export type SurveyActionLabel = 'WIDGET_Survey_Answer_Survey' | 'WIDGET_Survey_Answer_Survey_Again' | 'WIDGET_Survey_See_Responses' | 'POLL_Survey_Continue_Survey';
|
|
6
|
+
/**
|
|
7
|
+
* Resolves the call-to-action, or null when there is none. A closed survey is checked first: a
|
|
8
|
+
* user who started one before dateEnd still has a draft, but can no longer submit it.
|
|
9
|
+
*/
|
|
10
|
+
export declare const surveyActionLabel: (survey: {
|
|
11
|
+
status?: {
|
|
12
|
+
state: PollSurveyState;
|
|
13
|
+
} | undefined;
|
|
14
|
+
multipleResponse: number;
|
|
15
|
+
_hasProgression: boolean;
|
|
16
|
+
}) => SurveyActionLabel | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { WidgetDisplayMode, WidgetSurveyContent } from 'jamespot-user-api';
|
|
2
|
+
export interface JRCWidgetSurveyEditorProps {
|
|
3
|
+
uniqid: string;
|
|
4
|
+
content: WidgetSurveyContent;
|
|
5
|
+
mode?: WidgetDisplayMode | undefined;
|
|
6
|
+
onChangeContent: (uniqid: string, content: WidgetSurveyContent) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare const JRCWidgetSurveyEditor: ({ uniqid, content, mode, onChangeContent }: JRCWidgetSurveyEditorProps) => import("react").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ApiWrapper, jPollSurveyLittle, PollSurveyListResult } from 'jamespot-user-api';
|
|
2
|
+
export type SurveySelectionModalProps = {
|
|
3
|
+
label: string;
|
|
4
|
+
selectedUri?: string | undefined;
|
|
5
|
+
listSurveys: (signal?: AbortSignal) => Promise<ApiWrapper<PollSurveyListResult>>;
|
|
6
|
+
onSelect: (survey: jPollSurveyLittle | undefined) => void;
|
|
7
|
+
};
|
|
8
|
+
export declare const SurveySelectionModal: ({ label, selectedUri, listSurveys, onSelect }: SurveySelectionModalProps) => import("react").JSX.Element;
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
import { WidgetCalendarContent
|
|
2
|
-
import { AVProps } from '../../Form/Input/JRCSelect/JRCInputAutocompleteViews';
|
|
1
|
+
import { WidgetCalendarContent } from 'jamespot-user-api';
|
|
3
2
|
export interface JRCWidgetCalendarEditorProps extends WidgetCalendarContent {
|
|
4
3
|
content: WidgetCalendarContent;
|
|
5
4
|
onChange: (content: Partial<WidgetCalendarContent>, override?: boolean) => void;
|
|
6
|
-
handlers: AVProps['handlers'] & {
|
|
7
|
-
group: Pick<JGroupApi, 'autocomplete' | 'getSpot'>;
|
|
8
|
-
};
|
|
9
5
|
}
|
|
10
6
|
export declare const CalendarEditorViewOptions: {
|
|
11
7
|
label: string;
|
|
12
8
|
value: string;
|
|
13
9
|
}[];
|
|
14
|
-
export declare const WidgetCalendarEditor: ({ content, onChange
|
|
10
|
+
export declare const WidgetCalendarEditor: ({ content, onChange }: JRCWidgetCalendarEditorProps) => import("react").JSX.Element;
|
|
@@ -222,6 +222,8 @@ export { JRCWidgetLuccaAbsenceEditor } from './Widgets/JRCWidgetLuccaAbsence/JRC
|
|
|
222
222
|
export { JRCWidgetMeteo } from './Widgets/JRCWidgetMeteo/JRCWidgetMeteo';
|
|
223
223
|
export { JRCWidgetMeteoEditor } from './Widgets/JRCWidgetMeteo/JRCWidgetMeteoEditor';
|
|
224
224
|
export { JRCWidgetMyGroup } from './Widgets/JRCWidgetMyGroup/JRCWidgetMyGroup';
|
|
225
|
+
export { JRCWidgetNews } from './Widgets/JRCWidgetNews/JRCWidgetNews';
|
|
226
|
+
export { JRCWidgetNewsEditor } from './Widgets/JRCWidgetNews/JRCWidgetNewsEditor';
|
|
225
227
|
export { JRCWidgetNewsflash } from './Widgets/JRCWidgetNewsflash/JRCWidgetNewsflash';
|
|
226
228
|
export { JRCWidgetNewsflashEditor } from './Widgets/JRCWidgetNewsflash/JRCWidgetNewsflashEditor';
|
|
227
229
|
export { JRCWidgetPresence } from './Widgets/JRCWidgetPresence/JRCWidgetPresence';
|
|
@@ -232,6 +234,8 @@ export { JRCWidgetSeparator } from './Widgets/JRCWidgetSeparator/JRCWidgetSepara
|
|
|
232
234
|
export { JRCWidgetSeparatorEditor } from './Widgets/JRCWidgetSeparator/JRCWidgetSeparatorEditor';
|
|
233
235
|
export { CoverSliderSlide } from './Widgets/JRCWidgetSlider/components/CoverSliderSlide';
|
|
234
236
|
export { JRCWidgetSliderEditor } from './Widgets/JRCWidgetSlider/JRCWidgetSliderEditor';
|
|
237
|
+
export { JRCWidgetSurvey } from './Widgets/JRCWidgetSurvey/JRCWidgetSurvey';
|
|
238
|
+
export { JRCWidgetSurveyEditor } from './Widgets/JRCWidgetSurvey/JRCWidgetSurveyEditor';
|
|
235
239
|
export { JRCWidgetSurveyDate } from './Widgets/JRCWidgetSurveyDate/JRCWidgetSurveyDate';
|
|
236
240
|
export { JRCWidgetDatasourceTableEditor } from './Widgets/JRCWidgetTable/JRCWidgetDatasourceTableEditor';
|
|
237
241
|
export { JRCWidgetExcelDatasourceTableEditor } from './Widgets/JRCWidgetTable/JRCWidgetExcelDatasourceTableEditor';
|
package/dist/src/index.d.ts
CHANGED
|
@@ -11,8 +11,10 @@ export { SkipToContent } from './components/Common/SkipToContent';
|
|
|
11
11
|
export { SROnly } from './components/Common/SROnly';
|
|
12
12
|
export { JTinyMCEExtensionsBuilders } from './components/Form/Input/JRCInputTinyMCERaw/extensions/JTinyMCEExtensions';
|
|
13
13
|
export { JRCProvider } from './components/JRCProvider/JRCProvider';
|
|
14
|
+
export { DEFAULT_NEWS_LIMIT } from './components/Widgets/JRCWidgetNews/JRCWidgetNews.const';
|
|
14
15
|
export * from './hooks';
|
|
15
16
|
export * from './types';
|
|
16
17
|
export { getColor } from './styles/theme';
|
|
17
18
|
export { color, fw, size, sizePX, space, spacePX, zIndex } from './styles/theme.helpers';
|
|
18
19
|
export { Utils } from './utils';
|
|
20
|
+
export type { Provider, ParsedProvider } from './utils/utils.iframeVideo';
|
|
@@ -362,6 +362,7 @@ declare const _default: {
|
|
|
362
362
|
"GLOBAL_Start_typing": "Start typing to search",
|
|
363
363
|
"GLOBAL_Successffully_Deleted": "Successfully deleted",
|
|
364
364
|
"GLOBAL_Today": "Today",
|
|
365
|
+
"GLOBAL_Type_Selection": "Choose a type",
|
|
365
366
|
"GLOBAL_Unsuccessfully_Deleted": "An error occured while deleting your content",
|
|
366
367
|
"GLOBAL_Unsuported_File_Format": "Unsupported file format",
|
|
367
368
|
"GLOBAL_Users": "Users",
|
|
@@ -525,6 +526,41 @@ declare const _default: {
|
|
|
525
526
|
"WIDGET_Lucca_Absent_Until_Today": "Absent jusqu'a aujourd'hui",
|
|
526
527
|
"WIDGET_Lucca_Absent_Until_Tomorrow": "Absent jusqu'a demain",
|
|
527
528
|
"WIDGET_Lucca_Absent_Until": "Absent jusqu'au",
|
|
529
|
+
"WIDGET_NEWS": "Filtered group feed",
|
|
530
|
+
"WIDGET_NEWS_TEXT": "Display a filtered feed of articles from selected groups",
|
|
531
|
+
"WIDGET_News_Select_Groups": "Select groups",
|
|
532
|
+
"WIDGET_News_Not_Member": "You are not a member of this group",
|
|
533
|
+
"WIDGET_News_Highlight": "Highlight the latest article",
|
|
534
|
+
"WIDGET_News_Highlight_Helper": "If your widget is on a single column this setting will have no impact",
|
|
535
|
+
"WIDGET_News_Taxonomy_Filter": "Select a list of keywords as a filter",
|
|
536
|
+
"WIDGET_News_Taxonomy_Filter_Desc": "A field with the filter will appear on your widget to allow users to filter on the keyword(s) of their choice.",
|
|
537
|
+
"WIDGET_News_Keywords_Filter": "Select one or more keywords",
|
|
538
|
+
"WIDGET_News_Keywords_Filter_Desc": "You can filter your content using one or more specific keywords or not select any and let your users filter on the keywords of their choice",
|
|
539
|
+
"WIDGET_News_Show_KeywordsMandatories": "Show chosen keywords",
|
|
540
|
+
"WIDGET_News_Mandatories_Keywords": "The contents of this widget are filtered on the keyword(s): ",
|
|
541
|
+
"WIDGET_News_Types_Limit": "8 types maximum",
|
|
542
|
+
"WIDGET_News_Article_Display_Mode": "Article display mode",
|
|
543
|
+
"WIDGET_News_Article_Display_Mode_Short": "Short",
|
|
544
|
+
"WIDGET_News_Article_Display_Mode_Full": "Full",
|
|
545
|
+
"WIDGET_News_Image_Hide": "Hide image",
|
|
546
|
+
"WIDGET_News_Hide_Date": "Hide date",
|
|
547
|
+
"WIDGET_News_Hide_Desc": "Hide description",
|
|
548
|
+
"WIDGET_News_Button_ShowMore": "Show a \"Load more\" button",
|
|
549
|
+
"COLOR_Title_Color": "Title color",
|
|
550
|
+
"COLOR_Description_Color": "Description color",
|
|
551
|
+
"GLOBAL_No_Results": "No results",
|
|
552
|
+
"GLOBAL_Btn_Add_Spot_To_Favorite": "Join",
|
|
553
|
+
"GLOBAL_Display_Order": "Display order",
|
|
554
|
+
"GLOBAL_Last_Activity": "Date of last activity",
|
|
555
|
+
"GLOBAL_Left": "Left",
|
|
556
|
+
"GLOBAL_Right": "Right",
|
|
557
|
+
"GLOBAL_Show_More_Article": "Show more posts",
|
|
558
|
+
"SECTION_Section_Column": "Column number",
|
|
559
|
+
"SELECTION_Panel_Size_Medium": "Medium",
|
|
560
|
+
"WIDGET_Type_Filter": "Type",
|
|
561
|
+
"WIDGET_Limit_Filter": "Limit",
|
|
562
|
+
"WIDGET_List_Orientation": "Orientation",
|
|
563
|
+
"WIDGET_Markup_Size": "Display",
|
|
528
564
|
"WIDGET_Newsflash": "Flash info",
|
|
529
565
|
"WIDGET_Newsflash_Text": "Display the latest flash info on your homepage",
|
|
530
566
|
"WIDGET_Newsflash_Is_Empty": "No recent news",
|
|
@@ -646,7 +682,18 @@ declare const _default: {
|
|
|
646
682
|
"GLOBAL_Icon_Color": "Icon color",
|
|
647
683
|
"GLOBAL_Duplicate": "Duplicate",
|
|
648
684
|
"SPOTIT_Add_Picture": "Add a picture",
|
|
649
|
-
"DW_Add_Icon": "Add icon"
|
|
685
|
+
"DW_Add_Icon": "Add icon",
|
|
686
|
+
"POLL_Survey_Response_Number": "Number of responses",
|
|
687
|
+
"SURVEY_Response_Count_Response": "Responses",
|
|
688
|
+
"GLOBAL_Publish_Survey": "Survey",
|
|
689
|
+
"SURVEY_Publish_By": "publish by",
|
|
690
|
+
"WIDGET_Survey_Answer_Survey": "Respond to the survey",
|
|
691
|
+
"WIDGET_Survey_Answer_Survey_Again": "Respond to the survey again",
|
|
692
|
+
"WIDGET_Survey_See_Responses": "See the responses",
|
|
693
|
+
"POLL_Survey_Continue_Survey": "Continue",
|
|
694
|
+
"WIDGET_Select_SocialPoll": "Select a survey",
|
|
695
|
+
"WIDGET_Survey_Selection": "Select survey",
|
|
696
|
+
"GLOBAL_No_Survey_Results": "There is no survey open at the moment"
|
|
650
697
|
}
|
|
651
698
|
}
|
|
652
699
|
;
|
package/dist/src/types.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ export type { BaseDndItem, DndData, DndDragItem, DndEmptyStateComponentProps, Dn
|
|
|
48
48
|
export type { JRCDropDownProps } from './components/JRCDropDown/JRCDropDown';
|
|
49
49
|
export type { JRCFileOpenProps } from './components/JRCFileOpen/JRCFileOpen';
|
|
50
50
|
export type { JRCFileRowProps } from './components/JRCFileRow/JRCFileRow';
|
|
51
|
-
export type { JRCFileViewerOpenWithOptionsType } from './components/JRCFileViewer/
|
|
51
|
+
export type { JRCFileViewerOpenWithOptionsType } from './components/JRCFileViewer/JRCFileViewer';
|
|
52
52
|
export type { JRCFlexBoxProps } from './components/JRCFlex/JRCFlexBox';
|
|
53
53
|
export type { JRCGridProps } from './components/JRCGrid/JRCGrid';
|
|
54
54
|
export type { JRCLinkToProps, JRCStyledHrefProps } from './components/JRCStyledHref/JRCStyledHref';
|
|
@@ -86,6 +86,7 @@ export type { JRCTemplateTwoColumnsProps } from './components/Templates/JRCTwoCo
|
|
|
86
86
|
export type { JRCAppColumnProps, JRCAppTabsProps, JRCColumnProps, JRCContainerProps, JRCMainColumnProps, JRCTabEntry, LayoutMode, TabEventProps, } from './components/Templates/template.type';
|
|
87
87
|
export type { ThemeType } from './styles/theme';
|
|
88
88
|
export type { JRCWidgetCheckListEntries } from './components/Widgets/JRCWidgetCheckList/JRCWidgetCheckList';
|
|
89
|
+
export type { NewsArticle } from './components/Widgets/JRCWidgetNews/JRCWidgetNews.const';
|
|
89
90
|
export type { MessageType } from 'jamespot-front-business';
|
|
90
91
|
export type { OneLevelMainItemComponentProps, OneLevelStackItemComponentProps, OneLevelEmptyStateComponentProps, JRCDndOneLevelWithStackProps, } from './components/JRCDragNDrop/types';
|
|
91
92
|
export { OneLevelItemTypes } from './components/JRCDragNDrop/types';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { JRCFileViewerItem } from '../components/JRCFileViewer/types';
|
|
2
|
+
export declare const CONTENT_IMAGE_ID_ATTRIBUTE = "data-jrc-image-id";
|
|
3
|
+
export declare function isImageInsideInteractive(img: HTMLImageElement): boolean;
|
|
4
|
+
export declare function buildImageItem(img: HTMLImageElement, index: number): JRCFileViewerItem;
|
|
5
|
+
export declare function collectContentImages(root: ParentNode, fallbackLabel?: string): JRCFileViewerItem[];
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
export declare function sanitizeHtml(dirtyHtml?: string): string;
|
|
2
|
+
/**
|
|
3
|
+
* Same sanitization as `sanitizeHtml`, minus anything that can take focus — for excerpts rendered
|
|
4
|
+
* inside a clickable card, where a nested link would be invalid HTML and an off-screen focusable
|
|
5
|
+
* element an unreachable tab stop. Text carried by the dropped tags is kept.
|
|
6
|
+
*/
|
|
7
|
+
export declare function sanitizeNonInteractiveHtml(dirtyHtml?: string): string;
|
|
2
8
|
export declare function truncateHtml(html: string, maxChars: number): {
|
|
3
9
|
html: string;
|
|
4
10
|
truncated: boolean;
|
|
@@ -10,7 +10,8 @@
|
|
|
10
10
|
* Loom branches are intentional infra for upcoming widgets — do not remove
|
|
11
11
|
* without checking the corresponding ticket in the tracker.
|
|
12
12
|
*/
|
|
13
|
-
|
|
13
|
+
type RegexProvider = 'youtube' | 'vimeo' | 'dailymotion' | 'loom';
|
|
14
|
+
export type Provider = RegexProvider | 'peertube';
|
|
14
15
|
export interface ParsedProvider {
|
|
15
16
|
provider: Provider;
|
|
16
17
|
videoId: string;
|
|
@@ -46,3 +47,4 @@ export declare function toEmbedUrl(parsed: ParsedProvider): string;
|
|
|
46
47
|
export declare function getThumbnailUrl(parsed: ParsedProvider, publicUrl: string, options?: {
|
|
47
48
|
signal?: AbortSignal;
|
|
48
49
|
}): Promise<string | null>;
|
|
50
|
+
export {};
|
|
@@ -3,6 +3,7 @@ export declare function removeIfStartsWith(str: string | undefined, prefix: stri
|
|
|
3
3
|
export declare function padStartTwoDigits(val: string | number): string;
|
|
4
4
|
export declare function limitSize(str: string, length: number): string;
|
|
5
5
|
export declare function capitalize(str: string): string;
|
|
6
|
+
export declare function stripSlashes(str: string): string;
|
|
6
7
|
export declare function startsWithIgnoreCase(value: string, prefix: string): boolean;
|
|
7
8
|
export declare function includesIgnoreCase(value: string, query: string): boolean;
|
|
8
9
|
export declare function normalizeText(value: string): string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jamespot-react-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.122",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/jamespot-react-components.cjs",
|
|
6
6
|
"module": "dist/jamespot-react-components.js",
|
|
@@ -60,8 +60,8 @@
|
|
|
60
60
|
"eslint-plugin-storybook": "10.3.6",
|
|
61
61
|
"globals": "^16.5.0",
|
|
62
62
|
"html2canvas": "^1.4.1",
|
|
63
|
-
"jamespot-front-business": "^1.3.
|
|
64
|
-
"jamespot-user-api": "^1.3.
|
|
63
|
+
"jamespot-front-business": "^1.3.122",
|
|
64
|
+
"jamespot-user-api": "^1.3.122",
|
|
65
65
|
"jsdom": "^26.1.0",
|
|
66
66
|
"knip": "^5.88.1",
|
|
67
67
|
"lint-staged": "^16.4.0",
|