jamespot-react-core 1.1.116 → 1.1.117
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/{155.bundle.js → 55.bundle.js} +3 -3
- package/build/55.bundle.js.map +1 -0
- package/build/app.bundle.js +500 -497
- package/build/app.bundle.js.map +1 -1
- package/build/socket.sharedworker.dd3721cc98a91b6cf80a.js +2 -0
- package/build/socket.sharedworker.dd3721cc98a91b6cf80a.js.map +1 -0
- package/build/src/components/Empty.d.ts +2 -1
- package/build/src/components/ExtensionProvider.component.d.ts +2 -2
- package/build/src/components/IfAppIsActivated.component.d.ts +1 -1
- package/build/src/components/RTProvider.component.d.ts +1 -1
- package/build/src/components/Toaster.d.ts +2 -1
- package/build/src/components/TwoColLayout.d.ts +5 -5
- package/build/src/components/editors/Editor.d.ts +2 -1
- package/build/src/components/editors/EditorPopup.d.ts +2 -1
- package/build/src/components/editors/EditorTabWidgets.d.ts +2 -1
- package/build/src/components/editors/EditorTabWrapper.d.ts +2 -1
- package/build/src/components/editors/EditorWrapper.d.ts +2 -1
- package/build/src/components/editors/EditorsPortal.d.ts +2 -1
- package/build/src/components/widgets/Widget.d.ts +2 -1
- package/build/src/components/widgets/WidgetInplace/WidgetInplaceUpload.d.ts +3 -2
- package/build/src/components/widgets/WidgetInplace/WidgetInplaceWrapper.d.ts +2 -1
- package/build/src/components/widgets/WidgetLayer/WidgetLayer.d.ts +3 -3
- package/build/src/components/widgets/WidgetList/WidgetList.d.ts +3 -2
- package/build/src/components/widgets/WidgetState.d.ts +2 -1
- package/build/src/components/widgets/WidgetWrapperCore.d.ts +2 -1
- package/build/src/displayer/DisplayForm.component.d.ts +2 -2
- package/build/src/displayer/components/DisplayRender.d.ts +8 -8
- package/build/src/displayer/components/inputs/Date.d.ts +3 -2
- package/build/src/displayer/components/inputs/DefaultInput.d.ts +2 -1
- package/build/src/displayer/components/inputs/InputEmail.d.ts +2 -1
- package/build/src/displayer/components/inputs/InputRichText.d.ts +2 -1
- package/build/src/displayer/components/inputs/InputSelect.d.ts +3 -2
- package/build/src/displayer/components/inputs/InputTaxonomy.d.ts +3 -2
- package/build/src/displayer/components/inputs/InputTextarea.d.ts +2 -1
- package/build/src/displayer/components/inputs/OrientedLink.d.ts +2 -1
- package/build/src/displayer/components/inputs/Radio.d.ts +3 -2
- package/build/src/displayer/displayer.utils.d.ts +1 -1
- package/build/src/displayer/types.d.ts +14 -14
- package/build/src/displayer/useDisplay.d.ts +2 -1
- package/build/src/hooks/useWindowDimension.d.ts +2 -2
- package/build/src/redux/slice/Generic.actions.d.ts +1 -1
- package/build/src/registry/types.d.ts +9 -9
- package/build/src/utils/translation.d.ts +3 -3
- package/build/src/utils/types.d.ts +14 -14
- package/package.json +93 -94
- package/build/155.bundle.js.map +0 -1
- package/build/socket.sharedworker.9cc9b5b3f5d4700f41ee.js +0 -2
- package/build/socket.sharedworker.9cc9b5b3f5d4700f41ee.js.map +0 -1
- package/build/src/redux/slice/Article.slice.d.ts +0 -97
- package/build/src/redux/slice/User.slice.d.ts +0 -97
- package/build/src/redux/store.d.ts +0 -121
- package/pnpm-lock.yaml +0 -11173
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
import * as React from 'react';
|
|
2
2
|
import type { JRCAppColumnProps } from 'jamespot-react-components';
|
|
3
3
|
import { LayoutMode } from 'jamespot-react-components';
|
|
4
|
-
export
|
|
4
|
+
export type TwoColLayoutRoute = {
|
|
5
5
|
path: string;
|
|
6
6
|
key: string;
|
|
7
7
|
icon: string;
|
|
8
8
|
label: string;
|
|
9
9
|
group?: string;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
12
|
-
export
|
|
11
|
+
export type TwoColLayoutRoutes<T extends TwoColLayoutRoute = TwoColLayoutRoute> = Record<string, T>;
|
|
12
|
+
export type TwoColLayoutProps = {
|
|
13
13
|
extensionRoute: string;
|
|
14
14
|
routes: TwoColLayoutRoutes;
|
|
15
15
|
mode?: LayoutMode;
|
|
16
16
|
description: JRCAppColumnProps['description'];
|
|
17
17
|
};
|
|
18
|
-
export declare function TwoColLayout({ extensionRoute, routes, description, mode }: TwoColLayoutProps): JSX.Element;
|
|
18
|
+
export declare function TwoColLayout({ extensionRoute, routes, description, mode }: TwoColLayoutProps): React.JSX.Element;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
export declare const CSSEditorPortalWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
2
3
|
export declare const CSSEditorPortalPopupWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {
|
|
3
4
|
on: boolean;
|
|
4
5
|
}, never>;
|
|
5
6
|
export declare const CSSEditorPortalRow: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
6
7
|
export declare const CSSEditorPortalFreeSpace: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
7
|
-
export declare const EditorsPortal: () => JSX.Element;
|
|
8
|
+
export declare const EditorsPortal: () => React.JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { CombinedWidgetType, WidgetDisplayMode } from 'jamespot-user-api';
|
|
2
3
|
export declare const DisplayWidget: ({ widget, width, inplace, isComponentVisible, mode, onClick, }: {
|
|
3
4
|
widget: CombinedWidgetType;
|
|
@@ -6,4 +7,4 @@ export declare const DisplayWidget: ({ widget, width, inplace, isComponentVisibl
|
|
|
6
7
|
isComponentVisible: boolean | undefined;
|
|
7
8
|
mode: WidgetDisplayMode;
|
|
8
9
|
onClick: () => void;
|
|
9
|
-
}) => JSX.Element;
|
|
10
|
+
}) => React.JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { WidgetFileType } from 'jamespot-user-api';
|
|
2
|
-
|
|
3
|
+
type WidgetInplaceUploadProps = {
|
|
3
4
|
uniqid: string;
|
|
4
5
|
initialFiles: WidgetFileType[];
|
|
5
6
|
accept: string;
|
|
@@ -10,5 +11,5 @@ declare type WidgetInplaceUploadProps = {
|
|
|
10
11
|
allowAutoOpening: boolean;
|
|
11
12
|
onChange: (files: WidgetFileType[]) => void;
|
|
12
13
|
};
|
|
13
|
-
export declare const WidgetInplaceUpload: ({ uniqid, initialFiles, accept, label, description, multiple, token, allowAutoOpening, onChange, }: WidgetInplaceUploadProps) => JSX.Element;
|
|
14
|
+
export declare const WidgetInplaceUpload: ({ uniqid, initialFiles, accept, label, description, multiple, token, allowAutoOpening, onChange, }: WidgetInplaceUploadProps) => React.JSX.Element;
|
|
14
15
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { WidgetDisplayMode } from 'jamespot-user-api';
|
|
2
3
|
export declare const CSSUploadFileWrapper: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
|
|
3
4
|
export declare const WidgetInplaceWrapper: ({ uniqid, mode }: {
|
|
4
5
|
uniqid: string;
|
|
5
6
|
mode: WidgetDisplayMode;
|
|
6
|
-
}) => JSX.Element;
|
|
7
|
+
}) => React.JSX.Element;
|
|
@@ -3,8 +3,8 @@ import { WidgetDisplayMode } from 'jamespot-user-api';
|
|
|
3
3
|
export declare const WidgetLayer: ({ uniqid, mode }: {
|
|
4
4
|
uniqid: string;
|
|
5
5
|
mode: WidgetDisplayMode;
|
|
6
|
-
}) => JSX.Element;
|
|
7
|
-
export
|
|
6
|
+
}) => React.JSX.Element;
|
|
7
|
+
export type Vector = {
|
|
8
8
|
x: number;
|
|
9
9
|
y: number;
|
|
10
10
|
};
|
|
@@ -12,4 +12,4 @@ export declare const DraggableHandler: ({ position, children, onMouseUp, }: {
|
|
|
12
12
|
position: Vector;
|
|
13
13
|
children: React.ReactElement;
|
|
14
14
|
onMouseUp: (position: Vector) => void;
|
|
15
|
-
}) => JSX.Element;
|
|
15
|
+
}) => React.JSX.Element;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { WidgetWrapperProps } from 'jamespot-user-api';
|
|
2
|
-
|
|
3
|
+
type WidgetListMode = 'button' | 'list' | 'gallery' | 'custom' | 'article';
|
|
3
4
|
export declare const WidgetList: ({ mode, children, namespace, onChange, }: {
|
|
4
5
|
mode?: WidgetListMode | undefined;
|
|
5
6
|
children?: any;
|
|
6
7
|
namespace?: string | undefined;
|
|
7
8
|
onChange: (widget: WidgetWrapperProps) => void;
|
|
8
|
-
}) => JSX.Element;
|
|
9
|
+
}) => React.JSX.Element;
|
|
9
10
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { WidgetDisplayMode, WidgetWrapperProps } from 'jamespot-user-api';
|
|
2
3
|
export declare const WidgetWrapperCore: ({ uniqid, widget, inplace, mode, width, }: {
|
|
3
4
|
uniqid: string;
|
|
@@ -5,5 +6,5 @@ export declare const WidgetWrapperCore: ({ uniqid, widget, inplace, mode, width,
|
|
|
5
6
|
inplace?: boolean | undefined;
|
|
6
7
|
mode: WidgetDisplayMode;
|
|
7
8
|
width?: number | undefined;
|
|
8
|
-
}) => JSX.Element;
|
|
9
|
+
}) => React.JSX.Element;
|
|
9
10
|
export default WidgetWrapperCore;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { DisplayFormRef, FieldsWith } from './types';
|
|
3
3
|
import { Control, FieldValues } from 'react-hook-form';
|
|
4
|
-
export
|
|
4
|
+
export type DisplayFormProps<TFieldValues extends FieldValues> = {
|
|
5
5
|
type: string;
|
|
6
6
|
fields: FieldsWith<'input', TFieldValues>;
|
|
7
7
|
extraInputs?: (control: Control<TFieldValues>) => React.ReactNode;
|
|
@@ -20,7 +20,7 @@ export declare type DisplayFormProps<TFieldValues extends FieldValues> = {
|
|
|
20
20
|
*
|
|
21
21
|
* This component display an array of attributes only if this attribute is activated on the platform
|
|
22
22
|
*/
|
|
23
|
-
declare const _DisplayForm: <TFieldValues extends FieldValues>(props: DisplayFormProps<TFieldValues>, ref: React.ForwardedRef<DisplayFormRef>) => JSX.Element;
|
|
23
|
+
declare const _DisplayForm: <TFieldValues extends FieldValues>(props: DisplayFormProps<TFieldValues>, ref: React.ForwardedRef<DisplayFormRef>) => React.JSX.Element;
|
|
24
24
|
export declare const DisplayForm: <TFieldValues extends FieldValues>(props: DisplayFormProps<TFieldValues> & {
|
|
25
25
|
ref?: React.ForwardedRef<DisplayFormRef> | undefined;
|
|
26
26
|
}) => ReturnType<typeof _DisplayForm>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
import { RenderAttributeProps } from 'displayer/types';
|
|
3
|
-
|
|
4
|
-
export declare function
|
|
5
|
-
export declare function
|
|
6
|
-
export declare function
|
|
7
|
-
export declare function
|
|
8
|
-
export declare function
|
|
9
|
-
export declare function
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export declare function DisplayDate({ object, attribute }: RenderAttributeProps): React.JSX.Element | null;
|
|
4
|
+
export declare function DisplayDefault({ object, attribute }: RenderAttributeProps): React.JSX.Element | null;
|
|
5
|
+
export declare function DisplayEmail({ object, attribute }: RenderAttributeProps): React.JSX.Element | null;
|
|
6
|
+
export declare function DisplayRadio({ object, attribute }: RenderAttributeProps): React.JSX.Element | null;
|
|
7
|
+
export declare function DisplayRichText({ object, attribute }: RenderAttributeProps): React.JSX.Element | null;
|
|
8
|
+
export declare function DisplayTag({ object, attribute }: RenderAttributeProps): React.JSX.Element | null;
|
|
9
|
+
export declare function DisplayUrl({ object, attribute }: RenderAttributeProps): React.JSX.Element | null;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { DisplayInputComponentProps } from '../../types';
|
|
2
3
|
import type { FieldValues } from 'react-hook-form';
|
|
3
|
-
export declare const InputDate: <TFieldValues extends FieldValues>(props: DisplayInputComponentProps<TFieldValues>) => JSX.Element;
|
|
4
|
-
export declare const SearchDate: <TFieldValues extends FieldValues>(props: DisplayInputComponentProps<TFieldValues>) => JSX.Element;
|
|
4
|
+
export declare const InputDate: <TFieldValues extends FieldValues>(props: DisplayInputComponentProps<TFieldValues>) => React.JSX.Element;
|
|
5
|
+
export declare const SearchDate: <TFieldValues extends FieldValues>(props: DisplayInputComponentProps<TFieldValues>) => React.JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { DisplayInputComponentProps } from '../../types';
|
|
2
3
|
import type { FieldValues } from 'react-hook-form';
|
|
3
|
-
export declare const DefaultInput: <TFieldValues extends FieldValues>(props: DisplayInputComponentProps<TFieldValues>) => JSX.Element;
|
|
4
|
+
export declare const DefaultInput: <TFieldValues extends FieldValues>(props: DisplayInputComponentProps<TFieldValues>) => React.JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { DisplayInputComponentProps } from '../../types';
|
|
2
3
|
import type { FieldValues } from 'react-hook-form';
|
|
3
|
-
export declare const InputEmail: <TFieldValues extends FieldValues>(props: DisplayInputComponentProps<TFieldValues>) => JSX.Element;
|
|
4
|
+
export declare const InputEmail: <TFieldValues extends FieldValues>(props: DisplayInputComponentProps<TFieldValues>) => React.JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { DisplayInputComponentProps } from '../../types';
|
|
2
3
|
import type { FieldValues } from 'react-hook-form';
|
|
3
|
-
export declare const InputRichText: <TFieldValues extends FieldValues>(props: DisplayInputComponentProps<TFieldValues>) => JSX.Element;
|
|
4
|
+
export declare const InputRichText: <TFieldValues extends FieldValues>(props: DisplayInputComponentProps<TFieldValues>) => React.JSX.Element;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { DisplayInputComponentProps } from '../../types';
|
|
2
3
|
import type { FieldValues } from 'react-hook-form';
|
|
3
|
-
|
|
4
|
+
type InputSelectConfig = {
|
|
4
5
|
name: string;
|
|
5
6
|
placeholder: string;
|
|
6
7
|
};
|
|
7
8
|
export declare const InputSelect: (options: Array<{
|
|
8
9
|
label: string;
|
|
9
10
|
value: string;
|
|
10
|
-
}>, config: InputSelectConfig) => <TFieldValues extends FieldValues>(props: DisplayInputComponentProps<TFieldValues>) => JSX.Element;
|
|
11
|
+
}>, config: InputSelectConfig) => <TFieldValues extends FieldValues>(props: DisplayInputComponentProps<TFieldValues>) => React.JSX.Element;
|
|
11
12
|
export {};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import type { DisplayInputComponentProps } from '../../types';
|
|
2
3
|
import type { FieldValues } from 'react-hook-form';
|
|
3
4
|
import type { WidgetTaxonomy } from 'jamespot-user-api';
|
|
4
|
-
|
|
5
|
+
type InputTaxonomyConfig = {
|
|
5
6
|
name: string;
|
|
6
7
|
placeholder: string;
|
|
7
8
|
type: string;
|
|
@@ -18,5 +19,5 @@ export declare const InputTaxonomy: (widget: WidgetTaxonomy, config: InputTaxono
|
|
|
18
19
|
readOnly?: boolean | undefined;
|
|
19
20
|
} & {
|
|
20
21
|
displayModal?: boolean | undefined;
|
|
21
|
-
}) => JSX.Element;
|
|
22
|
+
}) => React.JSX.Element;
|
|
22
23
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { DisplayInputComponentProps } from '../../types';
|
|
2
3
|
import type { FieldValues } from 'react-hook-form';
|
|
3
|
-
export declare const InputTextarea: <TFieldValues extends FieldValues>(props: DisplayInputComponentProps<TFieldValues>) => JSX.Element;
|
|
4
|
+
export declare const InputTextarea: <TFieldValues extends FieldValues>(props: DisplayInputComponentProps<TFieldValues>) => React.JSX.Element;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { DisplayInputComponentProps } from '../../types';
|
|
2
3
|
import type { FieldValues } from 'react-hook-form';
|
|
3
|
-
export declare const OrientedLinkInput: (type?: string, isRequired?: boolean) => <TFieldValues extends FieldValues>({ widget, ...props }: DisplayInputComponentProps<TFieldValues>) => JSX.Element;
|
|
4
|
+
export declare const OrientedLinkInput: (type?: string, isRequired?: boolean) => <TFieldValues extends FieldValues>({ widget, ...props }: DisplayInputComponentProps<TFieldValues>) => React.JSX.Element;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { DisplayInputComponentProps } from '../../types';
|
|
2
3
|
import type { FieldValues } from 'react-hook-form';
|
|
3
|
-
|
|
4
|
+
type RadioConfig = {
|
|
4
5
|
checkboxMode: 'radio' | 'checkbox';
|
|
5
6
|
direction?: 'row' | 'column' | 'two-columns';
|
|
6
7
|
requireable?: boolean;
|
|
@@ -8,5 +9,5 @@ declare type RadioConfig = {
|
|
|
8
9
|
export declare const RadioInput: (options: Array<{
|
|
9
10
|
value: string;
|
|
10
11
|
label: string;
|
|
11
|
-
}>, config: RadioConfig) => <TFieldValues extends FieldValues>({ widget, ...props }: DisplayInputComponentProps<TFieldValues>) => JSX.Element;
|
|
12
|
+
}>, config: RadioConfig) => <TFieldValues extends FieldValues>({ widget, ...props }: DisplayInputComponentProps<TFieldValues>) => React.JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { WidgetCheckbox, WidgetSelect } from 'jamespot-user-api';
|
|
2
2
|
export declare function widgetToOptions(widget: WidgetSelect<string> | WidgetCheckbox): Array<WidgetOption>;
|
|
3
|
-
export
|
|
3
|
+
export type WidgetOption = {
|
|
4
4
|
label: string;
|
|
5
5
|
value: string;
|
|
6
6
|
};
|
|
@@ -3,30 +3,30 @@ import type { FieldValues } from 'react-hook-form';
|
|
|
3
3
|
import type { Widget } from 'jamespot-user-api';
|
|
4
4
|
import type { NameControl } from 'jamespot-react-components';
|
|
5
5
|
import { UseFormReturn } from 'react-hook-form/dist/types';
|
|
6
|
-
export
|
|
6
|
+
export type IncludeCustom = {
|
|
7
7
|
includes: 'tags';
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type FieldConfig = {
|
|
10
10
|
disableSortBy?: boolean;
|
|
11
11
|
};
|
|
12
|
-
export
|
|
12
|
+
export type Field<TFieldValues extends FieldValues = FieldValues> = string | {
|
|
13
13
|
name: string;
|
|
14
14
|
componentsOverride: Partial<DisplayElementComponent<TFieldValues>>;
|
|
15
15
|
config?: FieldConfig;
|
|
16
16
|
} | IncludeCustom;
|
|
17
|
-
export
|
|
18
|
-
export
|
|
17
|
+
export type Fields<TFieldValues extends FieldValues = FieldValues> = Array<Field<TFieldValues>>;
|
|
18
|
+
export type FieldWith<With extends 'input' | 'render', TFieldValues extends FieldValues = FieldValues> = string | ({
|
|
19
19
|
[x in With]: DisplayElementComponent<TFieldValues>[With];
|
|
20
20
|
} & {
|
|
21
21
|
name: string;
|
|
22
22
|
config?: FieldConfig;
|
|
23
23
|
}) | IncludeCustom;
|
|
24
|
-
export
|
|
25
|
-
export
|
|
24
|
+
export type FieldsWith<With extends 'input' | 'render', TFieldValues extends FieldValues = FieldValues> = Array<FieldWith<With, TFieldValues>>;
|
|
25
|
+
export type RenderAttributeProps = {
|
|
26
26
|
object: any;
|
|
27
27
|
attribute: DisplayerElementAttributes;
|
|
28
28
|
};
|
|
29
|
-
export
|
|
29
|
+
export type DisplayInputComponentProps<TFieldValues extends FieldValues = FieldValues> = NameControl<TFieldValues> & {
|
|
30
30
|
label: string;
|
|
31
31
|
placeholder?: string;
|
|
32
32
|
description?: string;
|
|
@@ -37,27 +37,27 @@ export declare type DisplayInputComponentProps<TFieldValues extends FieldValues
|
|
|
37
37
|
margin?: string;
|
|
38
38
|
readOnly?: boolean;
|
|
39
39
|
};
|
|
40
|
-
export
|
|
40
|
+
export type DisplayElementComponent<TFieldValues extends FieldValues = FieldValues> = {
|
|
41
41
|
render: React.FunctionComponent<RenderAttributeProps>;
|
|
42
42
|
input: React.FunctionComponent<DisplayInputComponentProps<TFieldValues>>;
|
|
43
43
|
search: React.FunctionComponent<DisplayInputComponentProps<TFieldValues>>;
|
|
44
44
|
};
|
|
45
|
-
export
|
|
45
|
+
export type DisplayerElementAttributes = {
|
|
46
46
|
name: string;
|
|
47
47
|
label: string;
|
|
48
48
|
description?: string;
|
|
49
49
|
mandatory: boolean;
|
|
50
50
|
widget: Widget;
|
|
51
51
|
};
|
|
52
|
-
export
|
|
52
|
+
export type DisplayerElement<TFieldValues extends FieldValues = FieldValues> = DisplayerElementAttributes & {
|
|
53
53
|
components: DisplayElementComponent<TFieldValues>;
|
|
54
54
|
};
|
|
55
|
-
export
|
|
55
|
+
export type DisplayFormProps<TFieldValues extends FieldValues = FieldValues> = {
|
|
56
56
|
type: string;
|
|
57
57
|
componentsOverride?: Record<string, Partial<DisplayElementComponent<TFieldValues>>>;
|
|
58
58
|
attributesName: string[];
|
|
59
59
|
onSubmit: any;
|
|
60
60
|
buttons: React.ReactNode;
|
|
61
61
|
};
|
|
62
|
-
export
|
|
63
|
-
export
|
|
62
|
+
export type DisplayFormRef = UseFormReturn<any>;
|
|
63
|
+
export type Displayer<TFieldValues extends FieldValues = FieldValues> = Array<DisplayerElement<TFieldValues>>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
1
2
|
import { Displayer, Fields, FieldsWith } from './types';
|
|
2
3
|
import type { FieldValues, FieldPath } from 'react-hook-form';
|
|
3
4
|
/**
|
|
@@ -7,7 +8,7 @@ import type { FieldValues, FieldPath } from 'react-hook-form';
|
|
|
7
8
|
*/
|
|
8
9
|
export declare function useDisplay<TFieldValues extends FieldValues = FieldValues, Properties extends FieldPath<TFieldValues> = FieldPath<TFieldValues>>(fields: Fields<TFieldValues>, type: string): Displayer<TFieldValues>;
|
|
9
10
|
export declare function useDisplayList<TFieldValues extends FieldValues = FieldValues>(fields: FieldsWith<'render', TFieldValues>, type: string): {
|
|
10
|
-
accessor: (object: Object) => JSX.Element;
|
|
11
|
+
accessor: (object: Object) => React.JSX.Element;
|
|
11
12
|
disableSortBy: true | undefined;
|
|
12
13
|
id: string;
|
|
13
14
|
Header: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type WindowOrientation = 'landscape' | 'portrait';
|
|
2
|
+
export type WindowDimension = {
|
|
3
3
|
width: number;
|
|
4
4
|
height: number;
|
|
5
5
|
orientation: WindowOrientation;
|
|
@@ -6,4 +6,4 @@ import { Article } from './Article.slice';
|
|
|
6
6
|
export declare const genericActions: {
|
|
7
7
|
addMany: (data: (User | Article)[]) => (dispatch: any) => Promise<void>;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type GenericActionsType = typeof genericActions;
|
|
@@ -5,27 +5,27 @@ import * as coreComponents from './coreComponents';
|
|
|
5
5
|
/**
|
|
6
6
|
* j-react-components { JRCButton: () => <JRCButton/>, ... }
|
|
7
7
|
*/
|
|
8
|
-
export
|
|
8
|
+
export type JrComponentTypes = typeof jrComponent;
|
|
9
9
|
/**
|
|
10
10
|
* jrc component list { Button: "JRCButton", ... }
|
|
11
11
|
*/
|
|
12
|
-
export
|
|
12
|
+
export type JrComponentListType = typeof jComponentList;
|
|
13
13
|
/**
|
|
14
14
|
* jrc component keys { "Button" | ... }
|
|
15
15
|
*/
|
|
16
|
-
export
|
|
16
|
+
export type JrComponentListKey = keyof JrComponentListType;
|
|
17
17
|
/**
|
|
18
18
|
* j-core-components { Empty: () => <Empty/>, ... }
|
|
19
19
|
*/
|
|
20
|
-
export
|
|
20
|
+
export type CoreComponentTypes = typeof coreComponents;
|
|
21
21
|
/**
|
|
22
22
|
* jrc component list { Empty: "Empty", ... }
|
|
23
23
|
*/
|
|
24
|
-
export
|
|
24
|
+
export type CoreComponentListType = typeof coreComponentsMapping;
|
|
25
25
|
/**
|
|
26
26
|
* core component keys { "Empty" | ... }
|
|
27
27
|
*/
|
|
28
|
-
export
|
|
29
|
-
export
|
|
30
|
-
export
|
|
31
|
-
export
|
|
28
|
+
export type CoreComponentListKey = keyof CoreComponentListType;
|
|
29
|
+
export type AllComponentTypes = JrComponentTypes & CoreComponentTypes;
|
|
30
|
+
export type AllComponentListType = JrComponentListType & CoreComponentListType;
|
|
31
|
+
export type AllComponentListKey = JrComponentListKey | CoreComponentListKey;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
1
|
+
export type SupportedLanguages = 'fl' | 'nl' | 'en' | 'fr' | 'de' | 'it' | 'pl' | 'pt' | 'ro' | 'es' | 'tr';
|
|
2
|
+
export type TranslationKeys = {
|
|
3
3
|
[key: string]: string;
|
|
4
4
|
};
|
|
5
|
-
export
|
|
5
|
+
export type LangJsonFile = {
|
|
6
6
|
[key in SupportedLanguages]?: TranslationKeys;
|
|
7
7
|
};
|
|
8
8
|
export declare class ReactTranslation {
|
|
@@ -8,7 +8,7 @@ import { ReactTranslation, SupportedLanguages, TranslationKeys } from './transla
|
|
|
8
8
|
import { AnyRTHandlerFunction } from 'jamespot-user-api';
|
|
9
9
|
import { TwoColLayoutRoute, TwoColLayoutRoutes } from '../components/types';
|
|
10
10
|
import { RouteObject } from 'react-router-dom';
|
|
11
|
-
export
|
|
11
|
+
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
12
|
export interface ReactCore {
|
|
13
13
|
extensions: ReactExtensions;
|
|
14
14
|
store: any;
|
|
@@ -36,7 +36,7 @@ export interface ReactCore {
|
|
|
36
36
|
export interface ReactExtensions {
|
|
37
37
|
[key: string]: any;
|
|
38
38
|
}
|
|
39
|
-
export
|
|
39
|
+
export type ReactLoadedExtensions = {
|
|
40
40
|
[key: string]: ReactExtensionContainer | undefined;
|
|
41
41
|
};
|
|
42
42
|
export interface ReactExtension {
|
|
@@ -46,7 +46,7 @@ export interface ReactExtension {
|
|
|
46
46
|
export interface ReactExtensionContainer {
|
|
47
47
|
default: ReactExtension;
|
|
48
48
|
}
|
|
49
|
-
export
|
|
49
|
+
export type ReactSocketEventHandler = AnyRTHandlerFunction;
|
|
50
50
|
export interface ReactSocket {
|
|
51
51
|
io: any;
|
|
52
52
|
worker: any | undefined;
|
|
@@ -58,7 +58,7 @@ export interface ReactSocket {
|
|
|
58
58
|
removeMessageListener: <T extends keyof Namespaces>(namespace: T, functionName: Namespaces[T], callback: ReactSocketEventHandler) => void;
|
|
59
59
|
callEvent: (type: string, data: any) => void;
|
|
60
60
|
}
|
|
61
|
-
export
|
|
61
|
+
export type SocketSharedWorker = {
|
|
62
62
|
user?: {
|
|
63
63
|
idUser: number;
|
|
64
64
|
} | undefined;
|
|
@@ -68,18 +68,18 @@ export declare type SocketSharedWorker = {
|
|
|
68
68
|
ports: any[];
|
|
69
69
|
call: (type: string, event: string, data?: any) => void;
|
|
70
70
|
};
|
|
71
|
-
export
|
|
71
|
+
export type SocketOptions = {
|
|
72
72
|
path: string;
|
|
73
73
|
transports?: string[];
|
|
74
74
|
upgrade?: boolean;
|
|
75
75
|
};
|
|
76
|
-
export
|
|
76
|
+
export type SocketError = {
|
|
77
77
|
message: string;
|
|
78
78
|
};
|
|
79
|
-
export
|
|
79
|
+
export type ReactSocketNamespaceEvents = {
|
|
80
80
|
[key: string]: ReactSocketEventHandler[];
|
|
81
81
|
};
|
|
82
|
-
export
|
|
82
|
+
export type ReactSocketEvents = {
|
|
83
83
|
[key: string]: {
|
|
84
84
|
[key: string]: ReactSocketNamespaceEvents | ReactSocketEventHandler[];
|
|
85
85
|
all: ReactSocketEventHandler[];
|
|
@@ -96,7 +96,7 @@ export interface SharedWorkerEventData {
|
|
|
96
96
|
export interface JConfig {
|
|
97
97
|
resourceShowKey?: boolean;
|
|
98
98
|
}
|
|
99
|
-
|
|
99
|
+
type WindowJNG = {
|
|
100
100
|
html5: boolean;
|
|
101
101
|
addState: (stateName: string, options: any) => void;
|
|
102
102
|
transitionTo: (stateName: string, args: {}, options?: {
|
|
@@ -112,14 +112,14 @@ declare type WindowJNG = {
|
|
|
112
112
|
type?: string;
|
|
113
113
|
}) => void;
|
|
114
114
|
};
|
|
115
|
-
export
|
|
115
|
+
export type JType = {
|
|
116
116
|
cssClass: string;
|
|
117
117
|
cssColor: string;
|
|
118
118
|
label: string;
|
|
119
119
|
type: string;
|
|
120
120
|
mainType: string;
|
|
121
121
|
};
|
|
122
|
-
|
|
122
|
+
type Networks = {
|
|
123
123
|
networkPublic: {
|
|
124
124
|
uri: string;
|
|
125
125
|
title: string;
|
|
@@ -144,11 +144,11 @@ export interface WindowJ {
|
|
|
144
144
|
types: JType[];
|
|
145
145
|
networks: Networks;
|
|
146
146
|
}
|
|
147
|
-
export
|
|
147
|
+
export type IsAppActivateProps = {
|
|
148
148
|
dependency: string;
|
|
149
149
|
children: JSX.Element;
|
|
150
150
|
};
|
|
151
|
-
export
|
|
151
|
+
export type ReactExtensionProps = {
|
|
152
152
|
extensionName: string;
|
|
153
153
|
moduleName?: string;
|
|
154
154
|
route?: string;
|
|
@@ -160,5 +160,5 @@ export declare type ReactExtensionProps = {
|
|
|
160
160
|
/**
|
|
161
161
|
* Gather routes definition both for the router and the TwoColsLayout component.
|
|
162
162
|
*/
|
|
163
|
-
export
|
|
163
|
+
export type TwoColsAppRoutes = TwoColLayoutRoutes<Readable<TwoColLayoutRoute & RouteObject>>;
|
|
164
164
|
export {};
|