jamespot-react-components 1.2.49 → 1.2.50
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/jamespot-react-components.js +40 -36
- package/build/jamespot-react-components.js.map +1 -1
- package/build/src/components/JRCCalendar/JRCCalendar.d.ts +1 -1
- package/build/src/components/JRCCalendar/JRCCalendarEvent.d.ts +8 -12
- package/build/src/components/JRCCalendar/JRCCalendarModal.d.ts +8 -6
- package/build/src/components/JRCCalendar/JRCEventStatusButton.d.ts +4 -12
- package/build/src/components/JRCCalendar/types.d.ts +6 -0
- package/package.json +2 -2
- package/tsconfig.build.json +15 -0
|
@@ -3,4 +3,4 @@ export type CalendarOption = {
|
|
|
3
3
|
label: string;
|
|
4
4
|
value: CalendarView;
|
|
5
5
|
};
|
|
6
|
-
export declare const JRCCalendar: ({ events, loading, views, handler, defaultView, fluid, mode, fullScreen, deportedToolbar, withPadding, eventModalExtraComponent, onChangeView, onChangeDates, onError, onSuccess, onDeleteEvent, onClickUpdateEvent, }: JRCCalendarProps) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export declare const JRCCalendar: ({ events, loading, views, handler, defaultView, fluid, mode, fullScreen, deportedToolbar, withPadding, eventModalExtraComponent, onChangeView, onChangeDates, onError, onSuccess, onDeleteEvent, onClickUpdateEvent, onUpdateStatus, isUpdateStatusLoading, }: JRCCalendarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import { Audience,
|
|
2
|
-
import { SubscriptionModifiers } from './JRCEventStatusButton';
|
|
1
|
+
import { Audience, UserResponseStatus } from 'jamespot-user-api';
|
|
3
2
|
export type JRCCalendarEventProps = {
|
|
4
3
|
id: string;
|
|
5
4
|
title: string;
|
|
@@ -17,18 +16,15 @@ export type JRCCalendarEventProps = {
|
|
|
17
16
|
image: boolean;
|
|
18
17
|
type: string;
|
|
19
18
|
isVisio?: boolean;
|
|
20
|
-
handler: {
|
|
21
|
-
global: Pick<JGlobalApi, 'updateAction' | 'removeAction'>;
|
|
22
|
-
calendar: Pick<JCalendarApi, 'reviveSubmit'>;
|
|
23
|
-
};
|
|
24
|
-
onError: (errMsg?: string) => void;
|
|
25
|
-
onSuccess: (message: string) => void;
|
|
26
19
|
noGestion: boolean;
|
|
27
|
-
setSubscriptionModifiers: (fn: (prev: SubscriptionModifiers) => SubscriptionModifiers) => void;
|
|
28
|
-
uri: string;
|
|
29
20
|
canSubscribe: boolean;
|
|
30
|
-
subscriptionModifiers: SubscriptionModifiers;
|
|
31
21
|
urlGestion?: string;
|
|
22
|
+
onUpdateStatus: (params: {
|
|
23
|
+
status: UserResponseStatus;
|
|
24
|
+
id: number;
|
|
25
|
+
type: string;
|
|
26
|
+
}) => void;
|
|
27
|
+
isUpdateStatusLoading: (id: number) => boolean;
|
|
32
28
|
};
|
|
33
29
|
import { CalendarView, JRCCalendarMode } from './types';
|
|
34
|
-
export declare const JRCCalendarEvent: ({ status, title, start, end, display, mode, id: stringId, onClick, audience, allDay, textColor, backgroundColor, address, image, type, isVisio,
|
|
30
|
+
export declare const JRCCalendarEvent: ({ status, title, start, end, display, mode, id: stringId, onClick, audience, allDay, textColor, backgroundColor, address, image, type, isVisio, noGestion, canSubscribe, urlGestion, onUpdateStatus, isUpdateStatusLoading, }: JRCCalendarEventProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { CalendarEventViewAbstractType, CalendarEventWithExtensions, JArticleApi, JCalendarApi, JGlobalApi } from 'jamespot-user-api';
|
|
3
|
-
import { SubscriptionModifiers } from './JRCEventStatusButton';
|
|
2
|
+
import { CalendarEventViewAbstractType, CalendarEventWithExtensions, JArticleApi, JCalendarApi, JGlobalApi, UserResponseStatus } from 'jamespot-user-api';
|
|
4
3
|
export type JRCCalendarModalProps = {
|
|
5
4
|
event?: CalendarEventWithExtensions<CalendarEventViewAbstractType, ['socialEventRecord']>;
|
|
6
|
-
open: boolean;
|
|
7
5
|
closeHandler: () => void;
|
|
8
6
|
handler: {
|
|
9
7
|
article: Pick<JArticleApi, 'delete'>;
|
|
@@ -13,9 +11,13 @@ export type JRCCalendarModalProps = {
|
|
|
13
11
|
onError: (errorMsg?: string) => void;
|
|
14
12
|
onSuccess: (message: string) => void;
|
|
15
13
|
extraComponent?: (event: CalendarEventWithExtensions<CalendarEventViewAbstractType, ['socialEventRecord']>) => ReactNode;
|
|
16
|
-
setSubscriptionModifiers: (fn: (prev: SubscriptionModifiers) => SubscriptionModifiers) => void;
|
|
17
|
-
subscriptionModifiers: SubscriptionModifiers;
|
|
18
14
|
onDeleteEvent: () => void;
|
|
19
15
|
onClickUpdateEvent?: (event: CalendarEventWithExtensions<CalendarEventViewAbstractType, ['socialEventRecord']>) => void;
|
|
16
|
+
onUpdateStatus: (params: {
|
|
17
|
+
status: UserResponseStatus;
|
|
18
|
+
id: number;
|
|
19
|
+
type: string;
|
|
20
|
+
}) => void;
|
|
21
|
+
isUpdateStatusLoading: (id: number) => boolean;
|
|
20
22
|
};
|
|
21
|
-
export declare const JRCCalendarModal: ({
|
|
23
|
+
export declare const JRCCalendarModal: ({ closeHandler, event, handler, onError, onSuccess, extraComponent, onDeleteEvent, onClickUpdateEvent, onUpdateStatus, isUpdateStatusLoading, }: JRCCalendarModalProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,25 +1,17 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { UserResponseStatus } from 'jamespot-user-api';
|
|
2
2
|
export type SubscriptionModifiers = {
|
|
3
3
|
uri: string;
|
|
4
4
|
modifier: number;
|
|
5
5
|
status: UserResponseStatus;
|
|
6
6
|
}[];
|
|
7
7
|
export type JRCEventStatusButtonProps = {
|
|
8
|
-
eventId: number;
|
|
9
8
|
eventType: string;
|
|
10
|
-
initialStatus?: UserResponseStatus | null;
|
|
11
9
|
eventIsVisio?: boolean;
|
|
12
|
-
onUpdateStatus
|
|
13
|
-
onError: (errorMessage: string) => void;
|
|
14
|
-
onSuccess: (message: string) => void;
|
|
15
|
-
handler: {
|
|
16
|
-
global: Pick<JGlobalApi, 'updateAction' | 'removeAction'>;
|
|
17
|
-
};
|
|
10
|
+
onUpdateStatus: (status: UserResponseStatus) => void;
|
|
18
11
|
canSubscribe?: boolean;
|
|
19
|
-
setSubscriptionModifiers: (fn: (prev: SubscriptionModifiers) => SubscriptionModifiers) => void;
|
|
20
|
-
eventUri: string;
|
|
21
12
|
status: UserResponseStatus | null;
|
|
22
13
|
urlGestion?: string;
|
|
23
14
|
noGestion?: boolean;
|
|
15
|
+
loading: boolean;
|
|
24
16
|
};
|
|
25
|
-
export declare const JRCEventStatusButton: ({
|
|
17
|
+
export declare const JRCEventStatusButton: ({ onUpdateStatus, eventType, eventIsVisio, canSubscribe, status, urlGestion, noGestion, loading, }: JRCEventStatusButtonProps) => import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -38,6 +38,12 @@ export type JRCCalendarProps = {
|
|
|
38
38
|
}) => void;
|
|
39
39
|
onDeleteEvent: () => void;
|
|
40
40
|
onClickUpdateEvent?: (event: CalendarEvent) => void;
|
|
41
|
+
onUpdateStatus: (params: {
|
|
42
|
+
status: UserResponseStatus;
|
|
43
|
+
id: number;
|
|
44
|
+
type: string;
|
|
45
|
+
}) => void;
|
|
46
|
+
isUpdateStatusLoading: (id: number) => boolean;
|
|
41
47
|
};
|
|
42
48
|
export type JRCCalendarEventProps = {
|
|
43
49
|
id: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "jamespot-react-components",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.50",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./build/jamespot-react-components.js",
|
|
6
6
|
"types": "./build/src/index.d.ts",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"html-webpack-plugin": "^5.6.4",
|
|
69
69
|
"husky": "^7.0.4",
|
|
70
70
|
"identity-obj-proxy": "^3.0.0",
|
|
71
|
-
"jamespot-user-api": "^1.2.
|
|
71
|
+
"jamespot-user-api": "^1.2.50",
|
|
72
72
|
"jest": "^30.1.2",
|
|
73
73
|
"jest-environment-jsdom": "^30.1.2",
|
|
74
74
|
"jest-styled-components": "^7.2.0",
|