jamespot-react-core 1.3.11 → 1.3.13

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.
Files changed (85) hide show
  1. package/build/app.bundle.js +1763 -1014
  2. package/build/app.bundle.js.LICENSE.txt +19 -20
  3. package/build/app.bundle.js.map +1 -1
  4. package/build/socket.sharedworker.6e975754295fd9584be6.js.map +1 -1
  5. package/build/src/App.d.ts +1 -4
  6. package/build/src/ReactCore.d.ts +18 -8
  7. package/build/src/components/Audience.d.ts +2 -2
  8. package/build/src/components/Extensions.d.ts +4 -0
  9. package/build/src/components/IfAppIsActivated.component.d.ts +3 -2
  10. package/build/src/components/Redirect.d.ts +3 -0
  11. package/build/src/components/TranslationProvider.d.ts +8 -0
  12. package/build/src/components/calendar/socialEvent/SocialEventOrRecurringEventForm.d.ts +2 -4
  13. package/build/src/components/calendar/socialEvent/types.d.ts +3 -2
  14. package/build/src/components/calendar/socialEvent/useRecurringEventUpdateHook.d.ts +2 -2
  15. package/build/src/components/calendar/socialEvent/useSocialEventOrRecurringEventCreationHook.d.ts +1 -1
  16. package/build/src/components/calendar/socialEvent/useSocialEventUpdateHook.d.ts +2 -2
  17. package/build/src/components/comments/CommentsBloc.styles.d.ts +1 -1
  18. package/build/src/components/editors/Editor.d.ts +3 -1
  19. package/build/src/components/editors/EditorWrapper.d.ts +1 -0
  20. package/build/src/components/editors/EditorsPortal.d.ts +6 -6
  21. package/build/src/components/editors/components/EditorInputColor.d.ts +2 -2
  22. package/build/src/components/editors/style.d.ts +26 -26
  23. package/build/src/components/index.d.ts +2 -2
  24. package/build/src/components/types.d.ts +1 -1
  25. package/build/src/components/widgets/Widget.d.ts +1 -1
  26. package/build/src/components/widgets/Widget.style.d.ts +6 -6
  27. package/build/src/components/widgets/WidgetLayer/WidgetLayer.style.d.ts +2 -2
  28. package/build/src/components/widgets/WidgetList/WidgetList.style.d.ts +12 -12
  29. package/build/src/components/widgets/WidgetWrapperCoreEditHover.d.ts +2 -1
  30. package/build/src/components/widgets/components/WidgetUploader.d.ts +1 -1
  31. package/build/src/components/widgets/hooks.d.ts +1 -1
  32. package/build/src/components/widgets/wrapper/JRCWidgetArticleAttachmentWrapper.d.ts +1 -1
  33. package/build/src/components/widgets/wrapper/JRCWidgetCheckListWrapper.d.ts +3 -3
  34. package/build/src/components/widgets/wrapper/JRCWidgetDatasourceTableWrapper.d.ts +3 -3
  35. package/build/src/components/widgets/wrapper/JRCWidgetExcelDatasourceTableWrapper.d.ts +3 -3
  36. package/build/src/components/widgets/wrapper/JRCWidgetIconWrapper.d.ts +2 -2
  37. package/build/src/components/widgets/wrapper/JRCWidgetLuccaAbsenceWrapper.d.ts +1 -1
  38. package/build/src/components/widgets/wrapper/JRCWidgetPresenceWrapper.d.ts +3 -3
  39. package/build/src/components/widgets/wrapper/JRCWidgetPresenceWrapperClosing.d.ts +3 -3
  40. package/build/src/components/widgets/wrapper/WidgetCalendarCalDav/WidgetCalendarCalDavHeader.d.ts +1 -1
  41. package/build/src/components/widgets/wrapper/WidgetContactCardDav/WidgetContactCardDavHeader.d.ts +1 -1
  42. package/build/src/components/widgets/wrapper/WidgetEmailsImap/WidgetEmailsImapHeader.d.ts +3 -3
  43. package/build/src/components/widgets/wrapper/components/OfficeConfigurationPrompt.d.ts +5 -5
  44. package/build/src/components/widgets/wrapper/components/WidgetFooterView.d.ts +2 -2
  45. package/build/src/components/widgets/wrapper/components/WidgetHeader.d.ts +5 -5
  46. package/build/src/components/widgets/wrapper/components/WidgetHeaderEdit.d.ts +4 -4
  47. package/build/src/components/widgets/wrapper/components/WidgetInlineInputText.d.ts +1 -1
  48. package/build/src/components/widgets/wrapper/components/WidgetIntranetTitle.d.ts +3 -3
  49. package/build/src/components/widgets/wrapper/components/WidgetIsPending.d.ts +1 -1
  50. package/build/src/components/widgets/wrapper/components/WidgetRemove.d.ts +2 -2
  51. package/build/src/components/widgets/wrapper/components/WidgetScroll.d.ts +3 -3
  52. package/build/src/components/widgets/wrapper/components/WidgetStylePadding.d.ts +1 -1
  53. package/build/src/components/widgets/wrapper/components/WidgetStyleWrapper.d.ts +1 -1
  54. package/build/src/components/widgets/wrapper/components/WidgetTitle.d.ts +1 -1
  55. package/build/src/displayer/DisplayForm.component.d.ts +2 -2
  56. package/build/src/displayer/components/inputs/InputFile.d.ts +1 -1
  57. package/build/src/displayer/types.d.ts +1 -1
  58. package/build/src/displayer/useDisplay.d.ts +7 -4
  59. package/build/src/hooks/index.d.ts +4 -4
  60. package/build/src/hooks/useAI.d.ts +1 -1
  61. package/build/src/hooks/useAbortController.d.ts +1 -2
  62. package/build/src/hooks/useCalendarRT.d.ts +1 -2
  63. package/build/src/hooks/useCommentRT.d.ts +1 -2
  64. package/build/src/hooks/useCommentsLikeRT.d.ts +1 -2
  65. package/build/src/hooks/useToggleFullScreen.d.ts +1 -2
  66. package/build/src/hooks/useWindowDimension.d.ts +1 -2
  67. package/build/src/initTinymce.d.ts +1 -1
  68. package/build/src/registry/ReactCommonRegistry.d.ts +3 -3
  69. package/build/src/registry/ReactCoreRegistry.d.ts +3 -3
  70. package/build/src/utils/extensions.d.ts +2 -4
  71. package/build/src/utils/router.d.ts +4 -12
  72. package/build/src/utils/types.d.ts +24 -10
  73. package/build/src/utils/types.socket.d.ts +1 -1
  74. package/eslint.config.js +97 -0
  75. package/package.json +34 -26
  76. package/webpack.config.cjs +144 -0
  77. package/build/581.02792caba0594f6815e2.chunk.js +0 -2
  78. package/build/581.02792caba0594f6815e2.chunk.js.map +0 -1
  79. package/build/70.b156a91742e3d8901eaf.chunk.js +0 -715
  80. package/build/70.b156a91742e3d8901eaf.chunk.js.map +0 -1
  81. package/build/script/checkDependencies.d.ts +0 -1
  82. package/build/src/Toast.d.ts +0 -1
  83. package/build/src/components/ExtensionProvider.component.d.ts +0 -6
  84. package/build/src/registry/index.d.ts +0 -2
  85. package/build/src/utils/eventRecurrence.d.ts +0 -10
@@ -1,10 +1,10 @@
1
1
  import { ReactNode } from 'react';
2
- export declare const UIHeaderWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
2
+ export declare const UIHeaderWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
3
3
  backroundColor: string;
4
- }, never>;
5
- export declare const UIHeader: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
6
- export declare const UICount: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
7
- export declare const UIHeaderFlex: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
4
+ }>> & string;
5
+ export declare const UIHeader: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
6
+ export declare const UICount: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
7
+ export declare const UIHeaderFlex: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
8
8
  export declare const WidgetHeader: ({ uniqid, dropdown, subHeader, }: {
9
9
  uniqid: string;
10
10
  dropdown?: () => ReactNode;
@@ -1,8 +1,8 @@
1
1
  import { WidgetsName } from 'jamespot-user-api';
2
- export declare const CSSModalFooter: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
3
- export declare const CSSWidgetHeaderEdit: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
4
- export declare const CSSWidgetHeaderEditTitle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
5
- export declare const CSSWidgetHeaderEditActions: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
2
+ export declare const CSSModalFooter: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
+ export declare const CSSWidgetHeaderEdit: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
4
+ export declare const CSSWidgetHeaderEditTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
5
+ export declare const CSSWidgetHeaderEditActions: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
6
6
  export declare const WidgetHeaderEdit: ({ uniqid, name, handleOpenEditor, }: {
7
7
  uniqid: string;
8
8
  name: WidgetsName;
@@ -1,4 +1,4 @@
1
- export declare const CSSWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
1
+ export declare const CSSWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
2
2
  export declare const WidgetInlineInputText: ({ placeholder, handleClick, }: {
3
3
  placeholder: string;
4
4
  handleClick: (label: string) => void;
@@ -1,10 +1,10 @@
1
- export declare const CSSWidgetTitle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
2
- export declare const UITitle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
1
+ export declare const CSSWidgetTitle: 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 UITitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {
3
3
  fontSize: string;
4
4
  fontWeight: string;
5
5
  textAlign: string;
6
6
  color: string;
7
- }, never>;
7
+ }>> & string;
8
8
  export declare const WidgetIntranetTitle: ({ uniqid, textAlign, fontSize, fontWeight, color, }: {
9
9
  uniqid: string;
10
10
  textAlign: string;
@@ -1,2 +1,2 @@
1
- export declare const Wrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
1
+ export declare const Wrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
2
2
  export declare const WidgetIsPending: () => import("react/jsx-runtime").JSX.Element;
@@ -1,5 +1,5 @@
1
- export declare const Button: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;
2
- export declare const Footer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
1
+ export declare const Button: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, never>> & string;
2
+ export declare const Footer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
3
  export declare const WidgetRemove: ({ id, type, uniqid }: {
4
4
  id: number;
5
5
  type: string;
@@ -1,7 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
- export declare const UIFlex: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
3
- export declare const UIScrollWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
4
- export declare const UIScroll: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
2
+ export declare const UIFlex: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
+ export declare const UIScrollWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
4
+ export declare const UIScroll: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
5
5
  export declare const WidgetScroll: ({ header, scrollable, footer, }: {
6
6
  header?: () => ReactNode;
7
7
  scrollable?: () => ReactNode;
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- export declare const UIWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
2
+ export declare const UIWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
3
  export declare const WidgetStylePadding: ({ uniqid, children }: {
4
4
  uniqid: string;
5
5
  children: ReactNode;
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- export declare const UIWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
2
+ export declare const UIWrapper: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
3
3
  export declare const WidgetStyleWrapper: ({ uniqid, onClick, children }: {
4
4
  uniqid: string;
5
5
  onClick: () => void;
@@ -1,4 +1,4 @@
1
- export declare const CSSWidgetTitle: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
1
+ export declare const CSSWidgetTitle: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLParagraphElement>, HTMLParagraphElement>, never>> & string;
2
2
  export declare const WidgetTitle: ({ uniqid }: {
3
3
  uniqid: string;
4
4
  }) => import("react/jsx-runtime").JSX.Element;
@@ -23,8 +23,8 @@ export type DisplayFormProps<TFieldValues extends FieldValues> = {
23
23
  *
24
24
  * This component display an array of attributes only if this attribute is activated on the platform
25
25
  */
26
- declare const _DisplayForm: <TFieldValues extends FieldValues>({ onInit, ...props }: DisplayFormProps<TFieldValues>, ref: ForwardedRef<DisplayFormRef>) => import("react/jsx-runtime").JSX.Element;
26
+ declare function DisplayFormElement<TFieldValues extends FieldValues>({ onInit, ...props }: DisplayFormProps<TFieldValues>, ref: ForwardedRef<DisplayFormRef>): import("react/jsx-runtime").JSX.Element;
27
27
  export declare const DisplayForm: <TFieldValues extends FieldValues>(props: DisplayFormProps<TFieldValues> & {
28
28
  ref?: ForwardedRef<DisplayFormRef>;
29
- }) => ReturnType<typeof _DisplayForm>;
29
+ }) => ReturnType<typeof DisplayFormElement>;
30
30
  export {};
@@ -1,3 +1,3 @@
1
- import { DisplayInputComponentProps } from '../../types';
2
1
  import type { FieldValues } from 'react-hook-form';
2
+ import { DisplayInputComponentProps } from '../../types';
3
3
  export declare const InputFile: <TFieldValues extends FieldValues>(props: DisplayInputComponentProps<TFieldValues>) => import("react/jsx-runtime").JSX.Element;
@@ -7,7 +7,7 @@ export type IncludeCustom = {
7
7
  includes: 'tags' | '_attachedFiles';
8
8
  };
9
9
  export type FieldConfig = {
10
- disableSortBy?: boolean;
10
+ enableSorting?: boolean;
11
11
  };
12
12
  export type FieldConfigExtra = Omit<DisplayerElementAttributes, 'name'>;
13
13
  export declare const CONFIGURABLE_FIELDS_NAMES: string[];
@@ -9,11 +9,14 @@ import type { FieldValues, FieldPath } from 'react-hook-form';
9
9
  */
10
10
  export declare function useDisplay<TFieldValues extends FieldValues = FieldValues, Properties extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(fields: Fields<TFieldValues> | 'all', type: string, bypassRequiredFields?: boolean): Displayer<TFieldValues>;
11
11
  export declare function useDisplayList<TFieldValues extends FieldValues = FieldValues>(fields: FieldsWith<'render', TFieldValues>, type: string): {
12
- accessor: (object: Object) => import("react/jsx-runtime").JSX.Element;
13
- disableSortBy: true | undefined;
12
+ cell: ({ row }: {
13
+ row: {
14
+ original: object;
15
+ };
16
+ }) => import("react/jsx-runtime").JSX.Element;
17
+ enableSorting: boolean;
14
18
  id: string;
15
- Header: string;
16
- name: string;
19
+ header: string;
17
20
  }[];
18
21
  export declare function useDisplayForm<TFieldValues extends FieldValues = FieldValues>(fields: DisplayFormFieldsConfig<TFieldValues>, type: string, forceMandatory?: boolean): [
19
22
  Array<{
@@ -1,7 +1,7 @@
1
- import useAbortController from './useAbortController';
1
+ import { useAbortController } from './useAbortController';
2
2
  import { useActivities } from './useActivities';
3
3
  import { useApplication } from './useApplication';
4
- import useCommentRT from './useCommentRT';
4
+ import { useCommentRT } from './useCommentRT';
5
5
  import { useHref } from './useHref';
6
6
  import { useLayout } from './useLayout';
7
7
  import { useMessengerUnread } from './useMessengerUnread';
@@ -9,6 +9,6 @@ import { useNGEvent } from './useNGEvent';
9
9
  import { useRecurringEventUpdateHook } from '../components/calendar/socialEvent/useRecurringEventUpdateHook';
10
10
  import { useSocialEventOrRecurringEventCreationHook } from '../components/calendar/socialEvent/useSocialEventOrRecurringEventCreationHook';
11
11
  import { useSocialEventUpdateHook } from '../components/calendar/socialEvent/useSocialEventUpdateHook';
12
- import useToggleFullScreen from './useToggleFullScreen';
13
- import useWindowDimension from './useWindowDimension';
12
+ import { useToggleFullScreen } from './useToggleFullScreen';
13
+ import { useWindowDimension } from './useWindowDimension';
14
14
  export { useAbortController, useActivities, useApplication, useCommentRT, useHref, useLayout, useMessengerUnread, useNGEvent, useRecurringEventUpdateHook, useSocialEventOrRecurringEventCreationHook, useSocialEventUpdateHook, useToggleFullScreen, useWindowDimension, };
@@ -8,5 +8,5 @@ export type JiaTextEnhanceQuery = {
8
8
  export declare const useAI: () => {
9
9
  readonly query: JiaTextEnhanceQuery | undefined;
10
10
  readonly ext: import("jamespot-react-components/dist/src/components/Form/Input/JRCInputTinyMCERaw/types").TinyMCEExtension;
11
- readonly isActive: number | false | null | undefined;
11
+ readonly isActive: number | false | undefined;
12
12
  };
@@ -1,2 +1 @@
1
- declare const useAbortController: () => AbortController;
2
- export default useAbortController;
1
+ export declare const useAbortController: () => AbortController;
@@ -1,2 +1 @@
1
- declare const useCalendarRT: () => void;
2
- export default useCalendarRT;
1
+ export declare const useCalendarRT: () => void;
@@ -1,2 +1 @@
1
- declare const useCommentRT: (idArticle: number) => void;
2
- export default useCommentRT;
1
+ export declare const useCommentRT: (idArticle: number) => void;
@@ -1,2 +1 @@
1
- declare const useCommentsLikeRT: (idComments: number[] | undefined, idArticle: number) => void;
2
- export default useCommentsLikeRT;
1
+ export declare const useCommentsLikeRT: (idComments: number[] | undefined, idArticle: number) => void;
@@ -1,5 +1,4 @@
1
- declare const useToggleFullScreen: () => {
1
+ export declare const useToggleFullScreen: () => {
2
2
  isFullScreen: boolean;
3
3
  toggleFullScreen: () => void;
4
4
  };
5
- export default useToggleFullScreen;
@@ -4,5 +4,4 @@ export type WindowDimension = {
4
4
  height: number;
5
5
  orientation: WindowOrientation;
6
6
  };
7
- declare const useWindowDimension: () => WindowDimension;
8
- export default useWindowDimension;
7
+ export declare const useWindowDimension: () => WindowDimension;
@@ -10,8 +10,8 @@ export declare const tinymceCommonOptions: {
10
10
  plugins: string[];
11
11
  text_patterns: {
12
12
  start: string;
13
- format?: string | undefined;
14
13
  end?: string | undefined;
14
+ format?: string | undefined;
15
15
  cmd?: string | undefined;
16
16
  }[];
17
17
  menubar: boolean;
@@ -1,4 +1,4 @@
1
- import { ComponentType, LazyExoticComponent } from 'react';
1
+ import { ComponentType } from 'react';
2
2
  import { JrComponentListKey, JrComponentListType, JrComponentTypes } from './types.common';
3
3
  export interface RegistryComponents {
4
4
  [key: string]: any;
@@ -7,7 +7,7 @@ export declare class ReactCommonRegistry {
7
7
  list: RegistryComponents;
8
8
  listLazy: RegistryComponents;
9
9
  getComponent(name: string): any;
10
- registerLazyComponent(name: string, promise: LazyExoticComponent<ComponentType<any>>): void;
11
- registerLib(componentList: Partial<JrComponentListType>, importPromise: any): void;
10
+ registerComponent(name: string, promise: ComponentType<any>): void;
11
+ registerLib(componentList: Partial<JrComponentListType>, module: any): void;
12
12
  getLazyComponent<T extends JrComponentListKey>(name: T): JrComponentTypes[JrComponentListType[T]];
13
13
  }
@@ -1,4 +1,4 @@
1
- import { ComponentType, LazyExoticComponent } from 'react';
1
+ import { ComponentType } from 'react';
2
2
  import { CoreComponentListKey, CoreComponentListType, CoreComponentTypes } from './types.core';
3
3
  export interface RegistryComponents {
4
4
  [key: string]: any;
@@ -7,7 +7,7 @@ export declare class ReactCoreRegistry {
7
7
  list: RegistryComponents;
8
8
  listLazy: RegistryComponents;
9
9
  getComponent(name: string): any;
10
- registerLazyComponent(name: string, promise: LazyExoticComponent<ComponentType<any>>): void;
11
- registerLib(componentList: Partial<CoreComponentListType>, importPromise: any): void;
10
+ registerComponent(name: string, promise: ComponentType<any>): void;
11
+ registerLib(componentList: Partial<CoreComponentListType>, module: any): void;
12
12
  getLazyComponent<T extends CoreComponentListKey>(name: T): CoreComponentTypes[CoreComponentListType[T]];
13
13
  }
@@ -1,6 +1,4 @@
1
- import { Root } from 'react-dom/client';
1
+ import { ReactNode } from 'react';
2
2
  import { ReactExtension } from './types';
3
3
  export declare const createExtension: (overrides: Partial<ReactExtension>) => ReactExtension;
4
- export declare const createSimpleExtension: (anchorId: string, component: React.JSX.Element) => ReactExtension;
5
- export declare const mountRootExtension: (App: ReactExtension, component: React.JSX.Element, nodeId?: string) => Root | undefined;
6
- export declare const createBodyElement: (id: string, element?: string) => HTMLElement | undefined;
4
+ export declare const createSimpleExtension: (anchorId: string, component: ReactNode) => ReactExtension;
@@ -1,16 +1,7 @@
1
- import type { RouteObject } from 'react-router-dom';
2
1
  import { BrowserHistory } from 'history';
3
- import { Root } from 'react-dom/client';
2
+ import type { RouteObject } from 'react-router-dom';
3
+ import { ReactRouter } from './types';
4
4
  export declare const ReactRouterHistory: BrowserHistory;
5
- export interface ReactRouter {
6
- history: BrowserHistory;
7
- routes: RouteObject[];
8
- routesNG: RouteObject[];
9
- addRoute: (route: RouteObject, ng?: boolean, isPublic?: boolean) => {
10
- route: string;
11
- } | null;
12
- init: (idDiv: string) => Root | undefined;
13
- }
14
5
  declare class Router implements ReactRouter {
15
6
  history: BrowserHistory;
16
7
  routes: RouteObject[];
@@ -19,7 +10,8 @@ declare class Router implements ReactRouter {
19
10
  addRoute: (route: RouteObject, ng?: boolean, isPublic?: boolean) => {
20
11
  route: string;
21
12
  } | null;
22
- init: (idDiv: string) => Root | undefined;
13
+ mount: () => void;
14
+ unmount: () => void;
23
15
  }
24
16
  declare const router: Router;
25
17
  export default router;
@@ -1,16 +1,20 @@
1
1
  import { ApplicationType, HookListType, jUserList, Model, Readable, TinyMCECommonOptions, TinyMCEDynamicOptions, TinyMCEExtendedOptions } from 'jamespot-user-api';
2
- import { MouseEvent } from 'react';
2
+ import { MouseEvent, ReactElement, ReactNode } from 'react';
3
3
  import { RouteObject } from 'react-router-dom';
4
4
  import { TwoColLayoutRoute, TwoColLayoutRoutes } from '../components/types';
5
5
  import { useDisplay, useDisplayList } from '../displayer/useDisplay';
6
- import { ReactRouter } from './router';
6
+ import { GlobalRegistry } from '../registry/GlobalRegistry';
7
7
  import { ReactTranslation, SupportedLanguages, TranslationKeys } from './translation';
8
8
  import { ReactSocket } from './types.socket';
9
- import { GlobalRegistry } from '../registry/GlobalRegistry';
10
- import { Root } from 'react-dom/client';
11
9
  export type Gabarit = 'core-1-cols' | 'core-2-cols' | 'core-3-cols' | 'content-1-cols' | 'content-2-cols' | 'content-3-cols' | 'app-1-cols' | 'app-2-cols' | 'empty';
12
10
  export interface ReactCore {
11
+ displayExtensions: Map<string, {
12
+ name: string;
13
+ args?: any;
14
+ }>;
15
+ callbacks: Record<string, ((...args: any[]) => void)[]>;
13
16
  extensions: ReactExtensions;
17
+ loadedExtensions: ReactLoadedExtensions;
14
18
  store: any;
15
19
  actions: object;
16
20
  registry: GlobalRegistry;
@@ -19,9 +23,11 @@ export interface ReactCore {
19
23
  theme: any;
20
24
  socket?: ReactSocket;
21
25
  router: ReactRouter;
26
+ on: (name: string, cb: (...args: any[]) => void) => void;
22
27
  require: (extensionName: string, args?: any) => void;
23
28
  unmountExtension: (extensionName: string, args?: any) => void;
24
29
  extensionAdd: (extensionName: string, load: () => void) => void;
30
+ extensionAddComponent: (extensionName: string, moduleName: string, component: ReactNode) => void;
25
31
  routeAdd: (route: string, extensionName: string, idDiv: string, gabarit?: Gabarit, gabaritOptions?: object) => void;
26
32
  transitionTo: (stateName: string, args: {}, options?: {
27
33
  reload: boolean;
@@ -45,11 +51,10 @@ export type ReactUnmountExtensionArgs<T> = {
45
51
  params?: T;
46
52
  };
47
53
  export interface ReactExtension {
48
- anchorId?: string | undefined;
49
- roots: Map<string, Root>;
50
- container?: HTMLElement | undefined;
51
- initExtension: (args?: any) => void;
52
- unmountExtension: (id?: string) => void;
54
+ portal: boolean;
55
+ anchorId?: string;
56
+ getAnchorId: (args?: any) => string;
57
+ component: (args?: any) => ReactNode;
53
58
  }
54
59
  export interface ReactExtensionContainer {
55
60
  default: ReactExtension;
@@ -123,7 +128,7 @@ export interface WindowJ {
123
128
  }
124
129
  export type IsAppActivateProps = {
125
130
  dependency: string;
126
- children: JSX.Element;
131
+ children: ReactElement;
127
132
  };
128
133
  export type ReactExtensionProps = {
129
134
  extensionName: string;
@@ -138,4 +143,13 @@ export type ReactExtensionProps = {
138
143
  * Gather routes definition both for the router and the TwoColsLayout component.
139
144
  */
140
145
  export type TwoColsAppRoutes = TwoColLayoutRoutes<Readable<TwoColLayoutRoute & RouteObject>>;
146
+ export interface ReactRouter {
147
+ routes: RouteObject[];
148
+ routesNG: RouteObject[];
149
+ addRoute: (route: RouteObject, ng?: boolean, isPublic?: boolean) => {
150
+ route: string;
151
+ } | null;
152
+ mount: () => void;
153
+ unmount: () => void;
154
+ }
141
155
  export {};
@@ -3,7 +3,7 @@ export type ReactSocketEventHandler = AnyRTHandlerFunction;
3
3
  export interface ReactSocket {
4
4
  io: any;
5
5
  worker: any | undefined;
6
- supportSharedWorker?: Boolean;
6
+ supportSharedWorker?: boolean;
7
7
  events: ReactSocketEvents;
8
8
  init: (idUser: number) => void;
9
9
  onMessage: <T extends keyof Namespaces>(namespace: T, functionName: Namespaces[T], callback: ReactSocketEventHandler) => void;
@@ -0,0 +1,97 @@
1
+ import js from '@eslint/js';
2
+ import ts from 'typescript-eslint';
3
+ import prettierConfig from 'eslint-config-prettier';
4
+ import reactPlugin from 'eslint-plugin-react';
5
+ import reactHooksPlugin from 'eslint-plugin-react-hooks';
6
+ import importPlugin from 'eslint-plugin-import';
7
+ import globals from 'globals';
8
+ import * as customPlugin from './eslint-plugin-custom/index.js';
9
+
10
+ export default [
11
+ {
12
+ ignores: [
13
+ 'build/**',
14
+ 'coverage/**',
15
+ 'eslint-plugin-custom/**',
16
+ 'node_modules/**',
17
+ 'script/**',
18
+ 'eslint.config.js',
19
+ 'webpack.config.js',
20
+ ],
21
+ },
22
+ js.configs.recommended,
23
+ ...ts.configs.recommended,
24
+ {
25
+ files: ['**/*.{ts,tsx}'],
26
+ languageOptions: {
27
+ parser: ts.parser,
28
+ globals: {
29
+ ...globals.browser,
30
+ ...globals.node,
31
+ ...globals.jest,
32
+ },
33
+ parserOptions: {
34
+ project: './tsconfig.json',
35
+ ecmaVersion: 2024,
36
+ sourceType: 'module',
37
+ },
38
+ },
39
+ plugins: {
40
+ '@typescript-eslint': ts.plugin,
41
+ react: reactPlugin,
42
+ 'react-hooks': reactHooksPlugin,
43
+ import: importPlugin,
44
+ custom: customPlugin,
45
+ },
46
+ rules: {
47
+ ...ts.configs.recommended.rules,
48
+ ...reactPlugin.configs.recommended.rules,
49
+ ...reactHooksPlugin.configs.recommended.rules,
50
+ 'custom/no-barrel-imports': 'error',
51
+ 'import/no-duplicates': 'error',
52
+ 'import/no-cycle': 'error',
53
+ 'import/no-unresolved': 'error',
54
+ 'no-case-declarations': 'off',
55
+ 'no-console': ['error', { allow: ['warn', 'error'] }],
56
+ 'react/react-in-jsx-scope': 'off',
57
+ 'react-hooks/refs': 'warn',
58
+ 'react-hooks/set-state-in-effect': 'warn',
59
+ '@typescript-eslint/ban-ts-comment': [
60
+ 'error',
61
+ {
62
+ 'ts-ignore': 'allow-with-description',
63
+ },
64
+ ],
65
+ '@typescript-eslint/ban-types': 'off',
66
+ '@typescript-eslint/no-empty-interface': 'off',
67
+ '@typescript-eslint/no-explicit-any': 'warn',
68
+ '@typescript-eslint/no-empty-object-type': 'warn',
69
+ '@typescript-eslint/no-namespace': 'off',
70
+ '@typescript-eslint/no-unused-expressions': 'error',
71
+ '@typescript-eslint/no-unused-vars': [
72
+ 'error',
73
+ {
74
+ argsIgnorePattern: '^_',
75
+ varsIgnorePattern: '^_',
76
+ caughtErrorsIgnorePattern: '^_',
77
+ },
78
+ ],
79
+ '@typescript-eslint/prefer-nullish-coalescing': 'error',
80
+ '@typescript-eslint/prefer-optional-chain': 'error',
81
+ '@typescript-eslint/prefer-as-const': 'error',
82
+ },
83
+ settings: {
84
+ react: {
85
+ version: 'detect',
86
+ jsxRuntime: 'automatic',
87
+ },
88
+ 'import/resolver': {
89
+ typescript: {
90
+ alwaysTryTypes: true,
91
+ project: './tsconfig.json',
92
+ },
93
+ },
94
+ },
95
+ },
96
+ prettierConfig,
97
+ ];
package/package.json CHANGED
@@ -1,68 +1,77 @@
1
1
  {
2
2
  "name": "jamespot-react-core",
3
- "version": "1.3.11",
3
+ "version": "1.3.13",
4
4
  "description": "Jamespot React Core",
5
5
  "main": "./build/app.bundle.js",
6
6
  "types": "./build/src/App.d.ts",
7
+ "type": "module",
8
+ "peerDependencies": {
9
+ "@reduxjs/toolkit": "^2.10.1",
10
+ "@types/react": "^19.2.6",
11
+ "@types/react-dom": "^19.2.3",
12
+ "react": "^19.2.0",
13
+ "react-dnd": "^14.0.5",
14
+ "react-dnd-html5-backend": "^14.1.0",
15
+ "react-dom": "^19.2.0",
16
+ "react-hook-form": "^7.66.1",
17
+ "react-intl": "^7.1.14",
18
+ "react-redux": "^9.2.0",
19
+ "react-router-dom": "^6.30.2",
20
+ "styled-components": "^6.1.19"
21
+ },
7
22
  "devDependencies": {
23
+ "@eslint/js": "^9.39.1",
8
24
  "@reduxjs/toolkit": "^2.10.1",
9
- "@testing-library/jest-dom": "^6.9.1",
10
- "@testing-library/react": "^14.3.1",
11
25
  "@types/jest": "^30.0.0",
12
26
  "@types/node": "^24.10.1",
13
- "@types/react": "^18.3.27",
14
- "@types/react-dom": "^18.3.7",
15
- "@types/react-redux": "^7.1.34",
16
- "@types/react-router-dom": "^5.3.3",
17
- "@types/styled-components": "^5.1.36",
27
+ "@types/react": "^19.2.6",
28
+ "@types/react-dom": "^19.2.3",
18
29
  "@types/uuid": "^10.0.0",
19
- "@typescript-eslint/eslint-plugin": "^5.62.0",
20
- "@typescript-eslint/parser": "^5.62.0",
21
30
  "copy-webpack-plugin": "^6.4.1",
22
31
  "date-fns": "^4.1.0",
23
- "eslint": "^8.57.1",
24
- "eslint-config-prettier": "^8.10.2",
32
+ "eslint": "^9.39.1",
33
+ "eslint-config-prettier": "^10.1.8",
25
34
  "eslint-import-resolver-typescript": "^4.4.4",
26
35
  "eslint-plugin-import": "^2.32.0",
27
- "eslint-plugin-jsx-expressions": "^1.3.2",
28
36
  "eslint-plugin-react": "^7.37.5",
29
- "eslint-plugin-react-hooks": "^4.6.2",
37
+ "eslint-plugin-react-hooks": "^7.0.1",
30
38
  "fork-ts-checker-webpack-plugin": "^9.1.0",
31
39
  "history": "^5.3.0",
32
40
  "husky": "^9.1.7",
33
- "jamespot-front-business": "^1.3.11",
34
- "jamespot-react-components": "^1.3.11",
35
- "jamespot-user-api": "^1.3.11",
41
+ "jamespot-front-business": "^1.3.13",
42
+ "jamespot-react-components": "^1.3.13",
43
+ "jamespot-user-api": "^1.3.13",
36
44
  "jest": "^30.2.0",
37
45
  "jest-environment-jsdom": "^30.2.0",
38
- "knip": "^5.69.1",
46
+ "knip": "^5.70.0",
39
47
  "lint-staged": "^16.2.6",
40
48
  "marked": "^16.4.2",
41
49
  "prettier": "^3.6.2",
42
- "react": "^18.3.1",
50
+ "react": "^19.2.0",
43
51
  "react-dnd": "^14.0.5",
44
52
  "react-dnd-html5-backend": "^14.1.0",
45
- "react-dom": "^18.3.1",
53
+ "react-dom": "^19.2.0",
46
54
  "react-hook-form": "^7.66.1",
47
55
  "react-intl": "^7.1.14",
48
- "react-redux": "^8.1.3",
56
+ "react-redux": "^9.2.0",
49
57
  "react-router-dom": "^6.30.2",
50
58
  "socket.io-client": "^4.8.1",
51
- "source-map-loader": "^1.1.3",
52
- "styled-components": "^5.3.11",
59
+ "source-map-loader": "^5.0.0",
60
+ "styled-components": "^6.1.19",
53
61
  "ts-jest": "^29.4.5",
54
62
  "ts-loader": "^9.5.4",
55
63
  "ts-node": "^10.9.2",
56
64
  "typescript": "^5.9.3",
65
+ "typescript-eslint": "^8.47.0",
57
66
  "uuid": "^10.0.0",
58
- "webpack": "^5.102.1",
67
+ "webpack": "^5.103.0",
59
68
  "webpack-cli": "^4.10.0",
60
69
  "webpack-dev-server": "^4.15.2",
61
70
  "worker-loader": "^3.0.8"
62
71
  },
63
72
  "lint-staged": {
64
73
  "*.{js,jsx,ts,tsx}": [
65
- "eslint --ext .ts,.tsx --fix",
74
+ "eslint --fix",
66
75
  "prettier --write"
67
76
  ],
68
77
  "*.{json,md}": [
@@ -83,7 +92,6 @@
83
92
  "prettier": "prettier --write ./",
84
93
  "lint": "eslint . --ext .ts,.tsx,.js",
85
94
  "lint:fix": "eslint . --ext .ts,.tsx,.js --fix ",
86
- "lint:ci": "eslint --output-file eslint_report.json --format json . --ext .ts,.tsx,.js",
87
95
  "generate-component-list": "node script/component-list-generator.js",
88
96
  "test": "jest --runInBand",
89
97
  "test:watch": "npm run test -- --watch",