jamespot-react-components 1.3.99 → 1.3.100
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 +1116 -1127
- package/dist/jamespot-react-components.js +8777 -8785
- package/dist/src/components/JRCAvatar/JRCAvatar.d.ts +8 -2
- package/dist/src/components/JRCAvatar/JRCAvatar.stories.d.ts +5 -0
- package/dist/src/components/JRCCalendar/JRCCalendar.d.ts +1 -1
- package/dist/src/components/JRCCommentsBloc/JRCComment.d.ts +2 -2
- package/dist/src/components/JRCCommentsBloc/JRCCommentsBloc.d.ts +2 -2
- package/dist/src/components/JRCGifSelector/JRCGifSelector.d.ts +1 -1
- package/dist/src/components/JRCRateStars/JRCRateStars.d.ts +7 -0
- package/dist/src/components/JRCRateStars/JRCRateStars.stories.d.ts +9 -0
- package/dist/src/components/JRCRateStars/JRCRateStars.styles.d.ts +3 -0
- package/dist/src/components/index.d.ts +2 -2
- package/dist/src/translation/lang.json.d.ts +5 -0
- package/dist/src/utils/utils.array.d.ts +7 -0
- package/package.json +5 -4
- package/dist/src/components/JRCSocialActions/JRCSocialActions.d.ts +0 -7
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { JRCIconProps } from '../JRCIcon/JRCIcon';
|
|
1
2
|
import { JRCImgProps } from '../JRCImg/JRCImg';
|
|
2
3
|
/**
|
|
3
4
|
* Props type for JRCAvatar
|
|
@@ -10,18 +11,23 @@ import { JRCImgProps } from '../JRCImg/JRCImg';
|
|
|
10
11
|
* in retina like screens. default: xs
|
|
11
12
|
* @property variant, optional 'circle' | 'square' - default: circle
|
|
12
13
|
* @property focusable - whether the element is focusable. Independent of onClick property
|
|
13
|
-
* @property subAvatar -
|
|
14
|
+
* @property subAvatar - icon rendered in the bottom-right corner. Accepts a subset of `JRCIconProps`.
|
|
15
|
+
* Example: `{ name: 'lock', label: 'Private conversation' }`.
|
|
16
|
+
* a11y is provided by `JRCIcon.label` (renders an `<SROnly>` next to the `<i aria-hidden>`).
|
|
14
17
|
* @property className - className passed to the div wrapper
|
|
15
18
|
* @property cssColor - background-color
|
|
16
19
|
* @property iconWhite - Toggle default icon color white/black
|
|
17
20
|
* @property from - image base url (imagestatic | imagecache)
|
|
18
21
|
*/
|
|
22
|
+
export type JRCAvatarSubProps = Pick<JRCIconProps, 'name' | 'iconColor' | 'color' | 'label'> & {
|
|
23
|
+
variant?: 'circle' | 'square';
|
|
24
|
+
};
|
|
19
25
|
export type JRCAvatarProps = Omit<JRCImgProps, 'size' | 'width' | 'height' | 'alt'> & {
|
|
20
26
|
uri?: string;
|
|
21
27
|
size?: number;
|
|
22
28
|
variant?: 'circle' | 'square' | 'full';
|
|
23
29
|
focusable?: boolean;
|
|
24
|
-
subAvatar?:
|
|
30
|
+
subAvatar?: JRCAvatarSubProps;
|
|
25
31
|
className?: string;
|
|
26
32
|
cssColor?: string;
|
|
27
33
|
iconWhite?: boolean;
|
|
@@ -3,3 +3,8 @@ import { Meta } from '@storybook/react-vite';
|
|
|
3
3
|
declare const _default: Meta;
|
|
4
4
|
export default _default;
|
|
5
5
|
export declare const Primary: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react-vite').ReactRenderer, JRCAvatarProps>;
|
|
6
|
+
export declare const WithSubIconCircle: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react-vite').ReactRenderer, JRCAvatarProps>;
|
|
7
|
+
export declare const WithSubIconSquare: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react-vite').ReactRenderer, JRCAvatarProps>;
|
|
8
|
+
export declare const WithSubIconLabeled: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react-vite').ReactRenderer, JRCAvatarProps>;
|
|
9
|
+
export declare const SquareWithSubIconCircle: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react-vite').ReactRenderer, JRCAvatarProps>;
|
|
10
|
+
export declare const SquareWithSubIconSquare: import('storybook/internal/csf').AnnotatedStoryFn<import('@storybook/react-vite').ReactRenderer, JRCAvatarProps>;
|
|
@@ -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-runtime").JSX.Element;
|
|
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-runtime").JSX.Element;
|
|
@@ -28,7 +28,7 @@ type JRCCommentProps = {
|
|
|
28
28
|
canSelectResponse: boolean;
|
|
29
29
|
};
|
|
30
30
|
articleId: number;
|
|
31
|
-
|
|
31
|
+
socialActionsSlot?: ReactNode;
|
|
32
32
|
};
|
|
33
|
-
export declare const JRCComment: ({ isFocused, comment, token, tinyMCEConfig, onCommentUpdate, onCommentDelete, onError, highlightFields, userModel, userAccountStatus, isWidgetActive, onGetHashError, deleteFile, existingWidgetsWrapperComponent, activeDrives, socialQuestion, articleId,
|
|
33
|
+
export declare const JRCComment: ({ isFocused, comment, token, tinyMCEConfig, onCommentUpdate, onCommentDelete, onError, highlightFields, userModel, userAccountStatus, isWidgetActive, onGetHashError, deleteFile, existingWidgetsWrapperComponent, activeDrives, socialQuestion, articleId, socialActionsSlot, }: JRCCommentProps) => import("react/jsx-runtime").JSX.Element;
|
|
34
34
|
export {};
|
|
@@ -37,6 +37,6 @@ export type JRCCommentsBlocProps = {
|
|
|
37
37
|
};
|
|
38
38
|
articleId: number;
|
|
39
39
|
additionalExtensions: Array<TinyMCEExtension>;
|
|
40
|
-
|
|
40
|
+
renderSocialActions?: (comment: CommentWithExtensions<jCommentList, ['actions', 'quarantine']>) => ReactNode;
|
|
41
41
|
};
|
|
42
|
-
export declare const JRCCommentsBloc: ({ comments, initialCommentsNumber, currentUser, tinyMCEConfig, onComment, canCreateWidget, isWidgetActive, widgetListComponent, newWidgetsWrapperComponent, existingWidgetsWrapperComponent, loading, token, onCommentDelete, onCommentUpdate, onError, highlightFields, userModel, userAccountStatus, onGetHashError, activeDrives, variant, canComment, socialQuestion, articleId, additionalExtensions,
|
|
42
|
+
export declare const JRCCommentsBloc: ({ comments, initialCommentsNumber, currentUser, tinyMCEConfig, onComment, canCreateWidget, isWidgetActive, widgetListComponent, newWidgetsWrapperComponent, existingWidgetsWrapperComponent, loading, token, onCommentDelete, onCommentUpdate, onError, highlightFields, userModel, userAccountStatus, onGetHashError, activeDrives, variant, canComment, socialQuestion, articleId, additionalExtensions, renderSocialActions, }: JRCCommentsBlocProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -10,5 +10,5 @@ type JRCGifSelectorProps = {
|
|
|
10
10
|
onReachEnd: () => void;
|
|
11
11
|
gifProvider?: 'giphy' | 'heypster';
|
|
12
12
|
};
|
|
13
|
-
export declare const JRCGifSelector: ({ gifs, onSearch, loading, onSelectGif, onReachEnd, gifProvider }: JRCGifSelectorProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
+
export declare const JRCGifSelector: ({ gifs, onSearch, loading, onSelectGif, onReachEnd, gifProvider, }: JRCGifSelectorProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
14
|
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type JRCRateStarsProps = {
|
|
2
|
+
value: number;
|
|
3
|
+
userValue?: number;
|
|
4
|
+
readOnly?: boolean;
|
|
5
|
+
onRate?: (value: number) => void;
|
|
6
|
+
};
|
|
7
|
+
export declare const JRCRateStars: ({ value, userValue, readOnly, onRate }: JRCRateStarsProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { JRCRateStars } from './JRCRateStars';
|
|
3
|
+
declare const meta: Meta<typeof JRCRateStars>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof JRCRateStars>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
export declare const UserVoted: Story;
|
|
8
|
+
export declare const KeyboardNavigation: Story;
|
|
9
|
+
export declare const ReadOnly: Story;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const RateStarsRow: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
2
|
+
export declare const RateStar: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
|
|
3
|
+
export declare const RateStaticStar: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components').FastOmit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, never>> & string;
|
|
@@ -84,7 +84,7 @@ export { JRCDate } from './JRCDate/JRCDate';
|
|
|
84
84
|
export { JRCDateObject } from './JRCDate/JRCDateObject';
|
|
85
85
|
export { JRCDisplayCard } from './JRCDisplayCard/JRCDisplayCard';
|
|
86
86
|
export { JRCDot } from './JRCDot/JRCDot';
|
|
87
|
-
export { DndProvider, Draggable, DraggableRow, Droppable, JRCDndOneLevel, JRCDndOneLevelWithStack, JRCDndTwoLevelWithStack } from './JRCDragNDrop';
|
|
87
|
+
export { DndProvider, Draggable, DraggableRow, Droppable, JRCDndOneLevel, JRCDndOneLevelWithStack, JRCDndTwoLevelWithStack, } from './JRCDragNDrop';
|
|
88
88
|
export { JRCDropDown } from './JRCDropDown/JRCDropDown';
|
|
89
89
|
export { JRCEditor } from './JRCEditor/JRCEditor';
|
|
90
90
|
export { JRCModalSchedule } from './JRCEditor/JRCModalSchedule';
|
|
@@ -119,13 +119,13 @@ export { JRCModalUserList } from './JRCModalUserList/JRCModalUserList';
|
|
|
119
119
|
export { JRCPagination } from './JRCPagination/JRCPagination';
|
|
120
120
|
export { JRCProgressBar } from './JRCProgressBar/JRCProgressBar';
|
|
121
121
|
export { JRCPublishButton } from './JRCPublishButton/JRCPublishButton';
|
|
122
|
+
export { JRCRateStars } from './JRCRateStars/JRCRateStars';
|
|
122
123
|
export { JRCSidePanelModal } from './JRCSidePanelModal/JRCSidePanelModal';
|
|
123
124
|
export { JRCSidePanelModalForm } from './JRCSidePanelModal/JRCSidePanelModalForm';
|
|
124
125
|
export { JRCSkeletonLine } from './JRCSkeleton/JRCSkeletonLine';
|
|
125
126
|
export { JRCSkeletonList } from './JRCSkeleton/JRCSkeletonList';
|
|
126
127
|
export { JRCSkeletonSquare } from './JRCSkeleton/JRCSkeletonSquare';
|
|
127
128
|
export { JRCSlider } from './JRCSlider/JRCSlider';
|
|
128
|
-
export { JRCSocialActions } from './JRCSocialActions/JRCSocialActions';
|
|
129
129
|
export { JRCStyledHref } from './JRCStyledHref/JRCStyledHref';
|
|
130
130
|
export { JRCTabPanel, JRCTabs } from './JRCTabs/JRCTabs';
|
|
131
131
|
export { JRCTag } from './JRCTag/JRCTag';
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
declare const _default: {
|
|
2
2
|
"en": {
|
|
3
|
+
"ACTIVITY_Can_Not_comment": "You cannot comment on this content",
|
|
3
4
|
"ACTIVITY_Can_Not_comment_Desc": "You cannot comment on this content. Several reasons are possible:<p>- You are not part of the audience of the content</p><p>- You do not have sufficient rights according to the group settings</p><p>- A solar storm creates interference (less likely, but you never know)",
|
|
4
5
|
"ADD_FAVORITE": "Add to favorites",
|
|
5
6
|
"APP_Animated_Meeting": "Diapazone",
|
|
@@ -242,6 +243,10 @@ declare const _default: {
|
|
|
242
243
|
"GLOBAL_Provide_Missing_Token": "A token must be provided to use this widget",
|
|
243
244
|
"GLOBAL_Public_Groups": "Public groups",
|
|
244
245
|
"GLOBAL_Publish": "Publish",
|
|
246
|
+
"GLOBAL_Rate_Star_AriaLabel": "{value, plural, one {# star} other {# stars}}",
|
|
247
|
+
"GLOBAL_Rate_Stars_AriaLabel": "Rate (1 to 5 stars)",
|
|
248
|
+
"GLOBAL_Rate_Stars_Value_AriaLabel": "Rating: {value} out of 5",
|
|
249
|
+
"GLOBAL_Rate_Voters_Modal_Title": "Voters",
|
|
245
250
|
"GLOBAL_Read_Following": "Read more",
|
|
246
251
|
"GLOBAL_Recommended": "recommended",
|
|
247
252
|
"GLOBAL_Redirect_To_User_Profile_React": "Redirection to the profile page of {username}",
|
|
@@ -21,4 +21,11 @@ export declare const arrayUniqueByUri: <T extends {
|
|
|
21
21
|
export declare const arraySwapElements: <T>(arr: T[], index1: number, index2: number) => T[];
|
|
22
22
|
export declare function strArrayToggle(str: string, array: string[]): string[];
|
|
23
23
|
export declare function noNull<T>(value: T | null): value is T;
|
|
24
|
+
/**
|
|
25
|
+
* Compare deux tableaux de chaînes sans tenir compte de l'ordre.
|
|
26
|
+
* @param a premier tableau
|
|
27
|
+
* @param b second tableau
|
|
28
|
+
* @returns true si les deux tableaux contiennent exactement les mêmes valeurs
|
|
29
|
+
*/
|
|
30
|
+
export declare const arraysEqual: (a: string[], b: string[]) => boolean;
|
|
24
31
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jamespot-react-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.100",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/jamespot-react-components.cjs",
|
|
6
6
|
"module": "dist/jamespot-react-components.js",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
"eslint-plugin-storybook": "10.3.6",
|
|
60
60
|
"globals": "^16.5.0",
|
|
61
61
|
"html2canvas": "^1.4.1",
|
|
62
|
-
"jamespot-front-business": "^1.3.
|
|
63
|
-
"jamespot-user-api": "^1.3.
|
|
62
|
+
"jamespot-front-business": "^1.3.100",
|
|
63
|
+
"jamespot-user-api": "^1.3.100",
|
|
64
64
|
"jsdom": "^26.1.0",
|
|
65
65
|
"knip": "^5.88.1",
|
|
66
66
|
"lint-staged": "^16.4.0",
|
|
@@ -107,7 +107,8 @@
|
|
|
107
107
|
"build": "tsc --noEmit --incremental && vite build",
|
|
108
108
|
"build:dev": "vite build",
|
|
109
109
|
"build:storybook": "NODE_OPTIONS=--max-old-space-size=6144 storybook build",
|
|
110
|
-
"prettier": "prettier --write
|
|
110
|
+
"prettier": "prettier --write \"src/**/*.{ts,tsx}\"",
|
|
111
|
+
"prettier:check": "prettier --check \"src/**/*.{ts,tsx}\"",
|
|
111
112
|
"lint": "eslint",
|
|
112
113
|
"lint:fix": "eslint --fix",
|
|
113
114
|
"storybook": "storybook dev -p 6006",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { SocialAction } from 'jamespot-user-api';
|
|
2
|
-
export declare const JRCSocialActions: ({ uri, actions, onReport, onError, }: {
|
|
3
|
-
uri: string;
|
|
4
|
-
actions: SocialAction[];
|
|
5
|
-
onReport: (uri: string) => void;
|
|
6
|
-
onError?: (message?: string) => void;
|
|
7
|
-
}) => import("react/jsx-runtime").JSX.Element;
|