jamespot-react-components 1.3.80 → 1.3.82
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 +1085 -1034
- package/dist/jamespot-react-components.js +13278 -13000
- package/dist/src/components/Form/Input/JRCInputDateMulti/JRCInputDateMulti.d.ts +9 -0
- package/dist/src/components/Form/Input/JRCInputDateMulti/JRCInputDateMulti.stories.d.ts +12 -0
- package/dist/src/components/Form/Input/JRCInputDateMulti/JRCInputDateMultiRaw.d.ts +19 -0
- package/dist/src/components/JRCCalendar/JRCCalendar.d.ts +2 -1
- package/dist/src/components/JRCCalendar/JRCCalendarModal.d.ts +2 -1
- package/dist/src/components/JRCCalendar/JRCCalendarPlaceHolderEvent.d.ts +6 -0
- package/dist/src/components/JRCCalendar/types.d.ts +1 -0
- package/dist/src/components/JRCCalendar/useResponseStatus.d.ts +1 -1
- package/dist/src/components/JRCMessage/JRCMessage.d.ts +2 -1
- package/dist/src/components/index.d.ts +1 -0
- package/dist/src/translation/lang.json.d.ts +12 -5
- package/dist/src/utils/utils.date.d.ts +1 -1
- package/package.json +3 -3
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FieldValues } from 'react-hook-form';
|
|
2
|
+
import { JRCDropDownProps } from '../../../JRCDropDown/JRCDropDown';
|
|
3
|
+
import { JRCInputFieldProps } from '../Common/JRCFormFieldRenderer.types';
|
|
4
|
+
import { NativeInputDateMultiProps } from './JRCInputDateMultiRaw';
|
|
5
|
+
export type JRCInputDateMultiProps<TFieldValues extends FieldValues = FieldValues> = NativeInputDateMultiProps & JRCInputFieldProps<TFieldValues> & {
|
|
6
|
+
openDirection?: JRCDropDownProps['align'];
|
|
7
|
+
limit?: number;
|
|
8
|
+
};
|
|
9
|
+
export declare function JRCInputDateMulti<T extends FieldValues = FieldValues>(props: JRCInputDateMultiProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-webpack5';
|
|
2
|
+
import { JRCInputDateMultiProps } from './JRCInputDateMulti';
|
|
3
|
+
declare const meta: Meta;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<JRCInputDateMultiProps<{
|
|
6
|
+
dates: string[];
|
|
7
|
+
}>>;
|
|
8
|
+
export declare const SelectMultipleDates: Story;
|
|
9
|
+
export declare const RemoveDateFromTag: Story;
|
|
10
|
+
export declare const ClearAllDates: Story;
|
|
11
|
+
export declare const EmptyState: Story;
|
|
12
|
+
export declare const WithLimit: Story;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { JRCDropDownProps } from '../../../JRCDropDown/JRCDropDown';
|
|
2
|
+
import { DataCy } from '../../../../types/dataAttributes';
|
|
3
|
+
export type NativeInputDateMultiProps = DataCy & {
|
|
4
|
+
placeholder?: string;
|
|
5
|
+
readOnly?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
name?: string;
|
|
8
|
+
};
|
|
9
|
+
export declare const JRCInputDateMultiRaw: import('react').ForwardRefExoticComponent<DataCy & {
|
|
10
|
+
placeholder?: string;
|
|
11
|
+
readOnly?: boolean;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
name?: string;
|
|
14
|
+
} & {
|
|
15
|
+
value?: string[];
|
|
16
|
+
onChange?: (dates: string[]) => void;
|
|
17
|
+
openDirection?: JRCDropDownProps["align"];
|
|
18
|
+
limit?: number;
|
|
19
|
+
} & import('react').RefAttributes<HTMLDivElement>>;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
import { JRCCalendarProps } from './types';
|
|
2
|
-
export
|
|
2
|
+
export type CalendarEventPlaceHolder = 'no-event-today' | 'no-next-event';
|
|
3
|
+
export declare const JRCCalendar: ({ events, loading, views, handler, defaultView, fluid, mode, fullScreen, deportedToolbar, withPadding, eventModalExtraComponent, onChangeView, onChangeDates, onError, onSuccess, onDeleteEvent, onClickUpdateEvent, onClickTransformEvent, onUpdateStatus, isUpdateStatusLoading, onSelect, disableSelect, }: JRCCalendarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -18,6 +18,7 @@ type JRCCalendarModalProps = {
|
|
|
18
18
|
}) => ReactNode;
|
|
19
19
|
onDeleteEvent: () => void;
|
|
20
20
|
onClickUpdateEvent?: (event: CalendarEventWithExtensions<CalendarEventView, ['socialEventRecord' | 'recurringEventRecord']>) => void;
|
|
21
|
+
onClickTransformEvent?: (event: CalendarEventWithExtensions<CalendarEventView, ['socialEventRecord' | 'recurringEventRecord']>) => void;
|
|
21
22
|
onUpdateStatus: (params: {
|
|
22
23
|
status: UserResponseStatus;
|
|
23
24
|
id: number;
|
|
@@ -26,5 +27,5 @@ type JRCCalendarModalProps = {
|
|
|
26
27
|
isUpdateStatusLoading: (id: number) => boolean;
|
|
27
28
|
mode?: JRCCalendarMode;
|
|
28
29
|
};
|
|
29
|
-
export declare const JRCCalendarModal: ({ closeHandler, event, handler, onError, onSuccess, extraComponent, onDeleteEvent, onClickUpdateEvent, onUpdateStatus, isUpdateStatusLoading, mode, }: JRCCalendarModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
export declare const JRCCalendarModal: ({ closeHandler, event, handler, onError, onSuccess, extraComponent, onDeleteEvent, onClickUpdateEvent, onClickTransformEvent, onUpdateStatus, isUpdateStatusLoading, mode, }: JRCCalendarModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
30
31
|
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CalendarEventPlaceHolder } from './JRCCalendar';
|
|
2
|
+
type CalendarPlaceHolderEventProps = {
|
|
3
|
+
placeHolder: CalendarEventPlaceHolder;
|
|
4
|
+
};
|
|
5
|
+
export declare const JRCCalendarPlaceHolderEvent: ({ placeHolder }: CalendarPlaceHolderEventProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export {};
|
|
@@ -43,6 +43,7 @@ export type JRCCalendarProps = {
|
|
|
43
43
|
}) => void;
|
|
44
44
|
onDeleteEvent: () => void;
|
|
45
45
|
onClickUpdateEvent?: (event: CalendarEvent) => void;
|
|
46
|
+
onClickTransformEvent?: (event: CalendarEvent) => void;
|
|
46
47
|
onUpdateStatus: (params: {
|
|
47
48
|
status: UserResponseStatus;
|
|
48
49
|
id: number;
|
|
@@ -2,5 +2,5 @@ import { UserResponseStatus } from 'jamespot-user-api';
|
|
|
2
2
|
import { Colors } from 'jamespot-front-business';
|
|
3
3
|
export declare const useResponseStatus: () => {
|
|
4
4
|
getStatusColor: (status: UserResponseStatus | null) => Colors;
|
|
5
|
-
getStatusLabel: (status: UserResponseStatus | null) => string;
|
|
5
|
+
getStatusLabel: (status: UserResponseStatus | null, isHybrid?: boolean) => string;
|
|
6
6
|
};
|
|
@@ -4,6 +4,7 @@ export type JRCMessageProps = {
|
|
|
4
4
|
variant: MessageVariants;
|
|
5
5
|
message?: string | ReactNode;
|
|
6
6
|
messages?: string[];
|
|
7
|
+
noMargin?: boolean;
|
|
7
8
|
};
|
|
8
|
-
export declare const JRCMessage: ({ variant, message, messages }: JRCMessageProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
|
+
export declare const JRCMessage: ({ variant, message, messages, noMargin }: JRCMessageProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
9
10
|
export {};
|
|
@@ -19,6 +19,7 @@ export { JRCInputToggle, JRCInputToggleRaw } from './Form/Input/JRCInputCheckbox
|
|
|
19
19
|
export { JRCInputColor } from './Form/Input/JRCInputColor/JRCInputColor';
|
|
20
20
|
export { JRCInputColorRaw } from './Form/Input/JRCInputColor/JRCInputColorRaw';
|
|
21
21
|
export { JRCInputDate } from './Form/Input/JRCInputDate/JRCInputDate';
|
|
22
|
+
export { JRCInputDateMulti } from './Form/Input/JRCInputDateMulti/JRCInputDateMulti';
|
|
22
23
|
export { JRCInputDateTime } from './Form/Input/JRCInputDateTime/JRCInputDateTime';
|
|
23
24
|
export { JRCInputDateTimeRaw } from './Form/Input/JRCInputDateTime/JRCInputDateTimeRaw';
|
|
24
25
|
export { JRCInputEmail } from './Form/Input/JRCInputEmail/JRCInputEmail';
|
|
@@ -59,19 +59,25 @@ declare const _default: {
|
|
|
59
59
|
"CALENDAR_Event_Revive": "Relancer",
|
|
60
60
|
"CALENDAR_Event_Visio_Url": "Rejoindre la web conférence",
|
|
61
61
|
"CALENDAR_Event": "Evénement",
|
|
62
|
-
"
|
|
62
|
+
"CALENDAR_NotParticipate": "Je ne participe pas",
|
|
63
63
|
"CALENDAR_listWeek": "List",
|
|
64
64
|
"CALENDAR_Meeting": "Meeting",
|
|
65
|
+
"CALENDAR_No_Event": "Vous n'avez aucun événement prévu ce mois-ci",
|
|
66
|
+
"CALENDAR_No_Next_Event": "Vous n'avez plus d'événements prévus ce mois-ci",
|
|
67
|
+
"CALENDAR_No_Today_Event": "Vous n'avez rien de prévu aujourd'hui",
|
|
65
68
|
"CALENDAR_Recurrent_Event_Warning": "This is a recurring event. Changes will apply to all events in the series.",
|
|
66
|
-
"
|
|
69
|
+
"CALENDAR_Participate_OnSite": "Je participe en présentiel",
|
|
70
|
+
"CALENDAR_Participate_Remote": "Je participe en distanciel",
|
|
71
|
+
"CALENDAR_Participate": "Je participe",
|
|
67
72
|
"CALENDAR_Status_Available": "Vous participez",
|
|
68
|
-
"CALENDAR_Status_OnSpot": "En présentiel",
|
|
69
73
|
"CALENDAR_Status_Unavailable": "Vous ne participez pas",
|
|
70
74
|
"CALENDAR_Status_Unknown": "En attente",
|
|
71
|
-
"CALENDAR_Status_Visio": "En distanciel",
|
|
72
75
|
"CALENDAR_timeGridDay": "Day",
|
|
73
76
|
"CALENDAR_timeGridWeek": "Week",
|
|
74
77
|
"CALENDAR_Today": "Today",
|
|
78
|
+
"CALENDAR_Transform_Hide_Occurrence": "Hide original occurrence",
|
|
79
|
+
"CALENDAR_Transform_Into_Event_Title": "Transform into event",
|
|
80
|
+
"CALENDAR_Transform_Into_Event": "Transform into event",
|
|
75
81
|
"CALENDAR_Update_Confirmation_Recurrent": "Do you want to update the whole series?",
|
|
76
82
|
"CALENDAR_Widget_Editor_View": "View",
|
|
77
83
|
"CALENDAR_Widget_View_Month": "Month",
|
|
@@ -450,6 +456,7 @@ declare const _default: {
|
|
|
450
456
|
"WIDGET_Welcome_Linebreak_Label": "Saut de ligne (après le message)",
|
|
451
457
|
"WIDGET_Welcome": "Message d'accueil"
|
|
452
458
|
}
|
|
453
|
-
}
|
|
459
|
+
}
|
|
460
|
+
;
|
|
454
461
|
|
|
455
462
|
export default _default;
|
|
@@ -33,7 +33,7 @@ export declare const dateLabel: (date: DateArgs) => "GLOBAL_Today" | "GLOBAL_Yes
|
|
|
33
33
|
* @param {string} str - Date format Y-m-d H:i:s
|
|
34
34
|
* @returns {(undefined|number)} Return timestamp
|
|
35
35
|
*/
|
|
36
|
-
export declare const strToTimestamp: (str: string) => undefined | number;
|
|
36
|
+
export declare const strToTimestamp: (str: string | undefined) => undefined | number;
|
|
37
37
|
/**
|
|
38
38
|
* This method returns the date without the time difference (jet lag)!!
|
|
39
39
|
* @param date date
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jamespot-react-components",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.82",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/jamespot-react-components.cjs",
|
|
6
6
|
"module": "dist/jamespot-react-components.js",
|
|
@@ -78,8 +78,8 @@
|
|
|
78
78
|
"fork-ts-checker-webpack-plugin": "^9.1.0",
|
|
79
79
|
"globals": "^16.5.0",
|
|
80
80
|
"html2canvas": "^1.4.1",
|
|
81
|
-
"jamespot-front-business": "^1.3.
|
|
82
|
-
"jamespot-user-api": "^1.3.
|
|
81
|
+
"jamespot-front-business": "^1.3.82",
|
|
82
|
+
"jamespot-user-api": "^1.3.82",
|
|
83
83
|
"jest": "^30.3.0",
|
|
84
84
|
"jest-environment-jsdom": "^30.3.0",
|
|
85
85
|
"knip": "^5.88.1",
|