jamespot-react-components 1.2.49 → 1.2.51

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.
@@ -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, JCalendarApi, JGlobalApi, UserResponseStatus } from 'jamespot-user-api';
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, handler, onError, onSuccess, noGestion, setSubscriptionModifiers, uri, canSubscribe, subscriptionModifiers, urlGestion, }: JRCCalendarEventProps) => import("react/jsx-runtime").JSX.Element | null;
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: ({ open, closeHandler, event, handler, onError, onSuccess, extraComponent, setSubscriptionModifiers, subscriptionModifiers, onDeleteEvent, onClickUpdateEvent, }: JRCCalendarModalProps) => import("react/jsx-runtime").JSX.Element;
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 { JGlobalApi, UserResponseStatus } from 'jamespot-user-api';
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?: (status: UserResponseStatus) => void;
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: ({ onError, handler, onSuccess, eventId, eventUri, eventType, eventIsVisio, initialStatus, canSubscribe, setSubscriptionModifiers, status, urlGestion, noGestion, }: JRCEventStatusButtonProps) => import("react/jsx-runtime").JSX.Element | null;
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.49",
3
+ "version": "1.2.51",
4
4
  "description": "",
5
5
  "main": "./build/jamespot-react-components.js",
6
6
  "types": "./build/src/index.d.ts",
@@ -19,15 +19,15 @@
19
19
  "@fullcalendar/timegrid": "^6.1.19",
20
20
  "@istanbuljs/nyc-config-typescript": "^1.0.2",
21
21
  "@lcov-viewer/istanbul-report": "^1.4.0",
22
- "@storybook/addon-a11y": "^9.1.4",
22
+ "@storybook/addon-a11y": "^9.1.10",
23
23
  "@storybook/addon-coverage": "^2.0.0",
24
- "@storybook/addon-docs": "^9.1.4",
25
- "@storybook/addon-links": "^9.1.4",
26
- "@storybook/react-webpack5": "^9.1.4",
24
+ "@storybook/addon-docs": "^9.1.10",
25
+ "@storybook/addon-links": "^9.1.10",
26
+ "@storybook/react-webpack5": "^9.1.10",
27
27
  "@storybook/test-runner": "^0.23.0",
28
28
  "@storybook/testing-library": "^0.2.2",
29
29
  "@testing-library/dom": "^8.20.1",
30
- "@testing-library/jest-dom": "^6.8.0",
30
+ "@testing-library/jest-dom": "^6.9.1",
31
31
  "@testing-library/react": "^14.3.1",
32
32
  "@testing-library/react-hooks": "^5.1.3",
33
33
  "@testing-library/user-event": "^13.5.0",
@@ -35,8 +35,8 @@
35
35
  "@types/chroma-js": "^2.4.5",
36
36
  "@types/dompurify": "^3.2.0",
37
37
  "@types/jest": "^30.0.0",
38
- "@types/node": "^20.19.11",
39
- "@types/react": "^18.3.24",
38
+ "@types/node": "^20.19.19",
39
+ "@types/react": "^18.3.25",
40
40
  "@types/react-dom": "^18.3.7",
41
41
  "@types/react-redux": "^7.1.34",
42
42
  "@types/react-router-dom": "^5.3.3",
@@ -54,7 +54,7 @@
54
54
  "concurrently": "^9.2.1",
55
55
  "cross-env": "^6.0.3",
56
56
  "css-loader": "^6.11.0",
57
- "dompurify": "^3.2.6",
57
+ "dompurify": "^3.2.7",
58
58
  "eslint": "^8.57.1",
59
59
  "eslint-config-prettier": "^8.10.2",
60
60
  "eslint-import-resolver-typescript": "^4.4.4",
@@ -68,21 +68,21 @@
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.49",
72
- "jest": "^30.1.2",
73
- "jest-environment-jsdom": "^30.1.2",
71
+ "jamespot-user-api": "^1.2.51",
72
+ "jest": "^30.2.0",
73
+ "jest-environment-jsdom": "^30.2.0",
74
74
  "jest-styled-components": "^7.2.0",
75
75
  "lint-staged": "^12.5.0",
76
76
  "nyc": "^17.1.0",
77
77
  "prettier": "^3.6.2",
78
78
  "react": "^18.3.1",
79
79
  "react-beautiful-dnd": "^13.1.1",
80
- "react-day-picker": "^9.8.1",
80
+ "react-day-picker": "^9.11.0",
81
81
  "react-dnd": "^14.0.5",
82
82
  "react-dnd-html5-backend": "^14.1.0",
83
83
  "react-dnd-test-backend": "^16.0.1",
84
84
  "react-dom": "^18.3.1",
85
- "react-hook-form": "^7.62.0",
85
+ "react-hook-form": "^7.64.0",
86
86
  "react-image-crop": "^11.0.10",
87
87
  "react-intl": "7.1.11",
88
88
  "react-qr-code": "^2.0.18",
@@ -97,18 +97,18 @@
97
97
  "redux-form": "^8.3.10",
98
98
  "slick-carousel": "^1.8.1",
99
99
  "source-map-loader": "^1.1.3",
100
- "storybook": "^9.1.4",
100
+ "storybook": "^9.1.10",
101
101
  "style-loader": "^1.3.0",
102
102
  "styled-components": "^5.3.11",
103
103
  "styled-reset": "^4.5.2",
104
104
  "tippy.js": "^6.3.7",
105
- "ts-jest": "^29.4.1",
105
+ "ts-jest": "^29.4.4",
106
106
  "ts-loader": "^9.5.4",
107
107
  "ts-node": "^10.9.2",
108
- "typescript": "^5.9.2",
108
+ "typescript": "^5.9.3",
109
109
  "uuid": "^10.0.0",
110
- "wait-on": "^8.0.4",
111
- "webpack": "^5.101.3",
110
+ "wait-on": "^8.0.5",
111
+ "webpack": "^5.102.0",
112
112
  "webpack-cli": "^4.10.0",
113
113
  "webpack-dev-server": "^4.15.2"
114
114
  },
@@ -0,0 +1,15 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "exclude": [
4
+ ".github",
5
+ ".husky",
6
+ ".nyc_output",
7
+ ".storybook",
8
+ ".vscode",
9
+ "build",
10
+ "coverage",
11
+ "node_modules",
12
+ "**/*.test.ts",
13
+ "**/*.stories.{ts,tsx}"
14
+ ]
15
+ }