chayns-api 2.1.3-3 → 2.1.5
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/.babelrc +31 -30
- package/.eslintrc +17 -17
- package/.github/workflows/deploy_docs.yml +28 -28
- package/.github/workflows/publish.yml +21 -21
- package/LICENSE +21 -21
- package/README.md +67 -67
- package/dist/cjs/calls/dialogs/chaynsDialog.js +0 -2
- package/dist/cjs/calls/dialogs/communication.js +0 -2
- package/dist/cjs/calls/dialogs/confirm.js +0 -1
- package/dist/cjs/calls/dialogs/date.js +0 -50
- package/dist/cjs/calls/dialogs/iFrame.js +1 -1
- package/dist/cjs/calls/index.js +1 -162
- package/dist/cjs/calls/sendMessage.js +0 -12
- package/dist/cjs/calls/visibilityChangeListener.js +0 -7
- package/dist/cjs/components/AppDialogWrapper.js +3 -3
- package/dist/cjs/components/ChaynsContext.js +1 -1
- package/dist/cjs/components/ChaynsProvider.js +6 -10
- package/dist/cjs/components/ErrorBoundary.js +1 -1
- package/dist/cjs/components/WaitUntil.js +0 -2
- package/dist/cjs/components/withCompatMode.js +9 -13
- package/dist/cjs/components/withHydrationBoundary.js +2 -2
- package/dist/cjs/constants/hydrationContext.js +1 -3
- package/dist/cjs/constants/languages.js +1 -1
- package/dist/cjs/handler/DialogHandler.js +0 -4
- package/dist/cjs/hooks/geoLocationListener.js +0 -7
- package/dist/cjs/hooks/scrollListener.js +0 -14
- package/dist/cjs/hooks/useAccessToken.js +0 -4
- package/dist/cjs/hooks/useCurrentPage.js +0 -3
- package/dist/cjs/hooks/useCustomCallbackFunction.js +0 -4
- package/dist/cjs/hooks/useCustomData.js +0 -3
- package/dist/cjs/hooks/useDevice.js +0 -3
- package/dist/cjs/hooks/useDialogState.js +0 -7
- package/dist/cjs/hooks/useEnvironment.js +0 -3
- package/dist/cjs/hooks/useFunctions.js +0 -3
- package/dist/cjs/hooks/useIsAdminMode.js +0 -3
- package/dist/cjs/hooks/useLanguage.js +0 -3
- package/dist/cjs/hooks/usePages.js +0 -6
- package/dist/cjs/hooks/useParameters.js +0 -3
- package/dist/cjs/hooks/useSite.js +0 -3
- package/dist/cjs/hooks/useUser.js +0 -3
- package/dist/cjs/hooks/useValues.js +0 -3
- package/dist/cjs/hooks/windowMetricsListener.js +0 -7
- package/dist/cjs/host/ChaynsHost.js +3 -4
- package/dist/cjs/host/iframe/HostIframe.js +4 -23
- package/dist/cjs/host/module/ModuleHost.js +5 -9
- package/dist/cjs/host/module/utils/loadComponent.js +4 -5
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/types/IChaynsReact.js +39 -46
- package/dist/cjs/util/appCall.js +0 -2
- package/dist/cjs/util/deviceHelper.js +0 -4
- package/dist/cjs/util/heightHelper.js +1 -1
- package/dist/cjs/util/initModuleFederationSharing.js +2 -6
- package/dist/cjs/util/postIframeForm.js +0 -1
- package/dist/cjs/util/transferNestedFunctions.js +0 -3
- package/dist/cjs/wrapper/AppWrapper.js +6 -20
- package/dist/cjs/wrapper/FrameWrapper.js +2 -7
- package/dist/cjs/wrapper/ModuleFederationWrapper.js +1 -3
- package/dist/cjs/wrapper/StaticChaynsApi.js +1 -1
- package/dist/esm/calls/dialogs/chaynsDialog.js +0 -2
- package/dist/esm/calls/dialogs/communication.js +0 -2
- package/dist/esm/calls/dialogs/confirm.js +0 -1
- package/dist/esm/calls/dialogs/date.js +0 -51
- package/dist/esm/calls/dialogs/iFrame.js +1 -1
- package/dist/esm/calls/index.js +1 -162
- package/dist/esm/calls/sendMessage.js +0 -12
- package/dist/esm/calls/visibilityChangeListener.js +0 -7
- package/dist/esm/components/AppDialogWrapper.js +2 -2
- package/dist/esm/components/ChaynsContext.js +1 -1
- package/dist/esm/components/ChaynsProvider.js +5 -10
- package/dist/esm/components/WaitUntil.js +0 -2
- package/dist/esm/components/withCompatMode.js +8 -14
- package/dist/esm/components/withHydrationBoundary.js +2 -2
- package/dist/esm/constants/hydrationContext.js +1 -3
- package/dist/esm/constants/languages.js +1 -1
- package/dist/esm/handler/DialogHandler.js +1 -5
- package/dist/esm/hooks/geoLocationListener.js +0 -7
- package/dist/esm/hooks/scrollListener.js +0 -14
- package/dist/esm/hooks/useAccessToken.js +0 -5
- package/dist/esm/hooks/useCurrentPage.js +0 -4
- package/dist/esm/hooks/useCustomCallbackFunction.js +0 -5
- package/dist/esm/hooks/useCustomData.js +0 -4
- package/dist/esm/hooks/useDevice.js +0 -3
- package/dist/esm/hooks/useDialogState.js +0 -8
- package/dist/esm/hooks/useEnvironment.js +0 -3
- package/dist/esm/hooks/useFunctions.js +0 -4
- package/dist/esm/hooks/useIsAdminMode.js +0 -3
- package/dist/esm/hooks/useLanguage.js +0 -3
- package/dist/esm/hooks/usePages.js +0 -6
- package/dist/esm/hooks/useParameters.js +0 -3
- package/dist/esm/hooks/useSite.js +0 -3
- package/dist/esm/hooks/useUser.js +0 -3
- package/dist/esm/hooks/useValues.js +0 -4
- package/dist/esm/hooks/windowMetricsListener.js +0 -7
- package/dist/esm/host/ChaynsHost.js +2 -3
- package/dist/esm/host/iframe/HostIframe.js +3 -22
- package/dist/esm/host/module/ModuleHost.js +4 -8
- package/dist/esm/host/module/utils/loadComponent.js +3 -4
- package/dist/esm/types/IChaynsReact.js +39 -49
- package/dist/esm/util/appCall.js +0 -2
- package/dist/esm/util/deviceHelper.js +0 -4
- package/dist/esm/util/initModuleFederationSharing.js +1 -5
- package/dist/esm/util/postIframeForm.js +0 -1
- package/dist/esm/util/transferNestedFunctions.js +0 -2
- package/dist/esm/wrapper/AppWrapper.js +6 -20
- package/dist/esm/wrapper/FrameWrapper.js +2 -6
- package/dist/esm/wrapper/ModuleFederationWrapper.js +1 -3
- package/dist/esm/wrapper/SsrWrapper.js +1 -1
- package/dist/esm/wrapper/StaticChaynsApi.js +1 -1
- package/dist/types/calls/dialogs/alert.d.ts +1 -1
- package/dist/types/calls/dialogs/chaynsDialog.d.ts +24 -24
- package/dist/types/calls/dialogs/close.d.ts +1 -1
- package/dist/types/calls/dialogs/communication.d.ts +3 -3
- package/dist/types/calls/dialogs/confirm.d.ts +13 -13
- package/dist/types/calls/dialogs/date.d.ts +96 -96
- package/dist/types/calls/dialogs/dropUpAlert.d.ts +5 -5
- package/dist/types/calls/dialogs/fileSelect.d.ts +16 -16
- package/dist/types/calls/dialogs/iFrame.d.ts +10 -10
- package/dist/types/calls/dialogs/index.d.ts +14 -14
- package/dist/types/calls/dialogs/input.d.ts +15 -15
- package/dist/types/calls/dialogs/mediaSelect.d.ts +8 -8
- package/dist/types/calls/dialogs/open.d.ts +1 -1
- package/dist/types/calls/dialogs/select.d.ts +6 -6
- package/dist/types/calls/dialogs/signature.d.ts +7 -7
- package/dist/types/calls/dialogs/toast.d.ts +1 -1
- package/dist/types/calls/dialogs/utils/callback.d.ts +1 -1
- package/dist/types/calls/dialogs/utils/is.d.ts +4 -4
- package/dist/types/calls/getUserInfo.d.ts +9 -9
- package/dist/types/calls/index.d.ts +255 -255
- package/dist/types/calls/sendMessage.d.ts +13 -13
- package/dist/types/calls/visibilityChangeListener.d.ts +9 -9
- package/dist/types/components/AppDialogWrapper.d.ts +5 -5
- package/dist/types/components/ChaynsContext.d.ts +3 -3
- package/dist/types/components/ChaynsProvider.d.ts +11 -11
- package/dist/types/components/ErrorBoundary.d.ts +13 -13
- package/dist/types/components/WaitUntil.d.ts +7 -7
- package/dist/types/components/moduleWrapper.d.ts +4 -4
- package/dist/types/components/withCompatMode.d.ts +43 -43
- package/dist/types/components/withHydrationBoundary.d.ts +24 -24
- package/dist/types/constants/hydrationContext.d.ts +6 -6
- package/dist/types/constants/index.d.ts +1 -1
- package/dist/types/constants/languages.d.ts +12 -12
- package/dist/types/handler/DialogHandler.d.ts +24 -24
- package/dist/types/helper/apiListenerHelper.d.ts +6 -6
- package/dist/types/hooks/context.d.ts +3 -3
- package/dist/types/hooks/geoLocationListener.d.ts +18 -18
- package/dist/types/hooks/index.d.ts +18 -18
- package/dist/types/hooks/scrollListener.d.ts +28 -28
- package/dist/types/hooks/useAccessToken.d.ts +6 -6
- package/dist/types/hooks/useCurrentPage.d.ts +5 -5
- package/dist/types/hooks/useCustomCallbackFunction.d.ts +5 -5
- package/dist/types/hooks/useCustomData.d.ts +4 -4
- package/dist/types/hooks/useDevice.d.ts +5 -5
- package/dist/types/hooks/useDialogState.d.ts +9 -9
- package/dist/types/hooks/useEnvironment.d.ts +5 -5
- package/dist/types/hooks/useFunctions.d.ts +4 -4
- package/dist/types/hooks/useIsAdminMode.d.ts +4 -4
- package/dist/types/hooks/useLanguage.d.ts +5 -5
- package/dist/types/hooks/usePages.d.ts +18 -18
- package/dist/types/hooks/useParameters.d.ts +5 -5
- package/dist/types/hooks/useSite.d.ts +5 -5
- package/dist/types/hooks/useUser.d.ts +5 -5
- package/dist/types/hooks/useValues.d.ts +4 -4
- package/dist/types/hooks/windowMetricsListener.d.ts +11 -11
- package/dist/types/host/ChaynsHost.d.ts +29 -29
- package/dist/types/host/iframe/HostIframe.d.ts +26 -26
- package/dist/types/host/iframe/utils/useUpdateData.d.ts +3 -3
- package/dist/types/host/module/ModuleHost.d.ts +28 -28
- package/dist/types/host/module/utils/loadComponent.d.ts +3 -3
- package/dist/types/index.d.ts +20 -20
- package/dist/types/types/IChaynsReact.d.ts +898 -899
- package/dist/types/types/dialog.d.ts +41 -41
- package/dist/types/util/appCall.d.ts +2 -2
- package/dist/types/util/bindChaynsApi.d.ts +1 -1
- package/dist/types/util/deviceHelper.d.ts +9 -9
- package/dist/types/util/heightHelper.d.ts +1 -1
- package/dist/types/util/initModuleFederationSharing.d.ts +3 -3
- package/dist/types/util/is.d.ts +5 -5
- package/dist/types/util/postIframeForm.d.ts +1 -1
- package/dist/types/util/transferNestedFunctions.d.ts +1 -1
- package/dist/types/util/url.d.ts +1 -1
- package/dist/types/wrapper/AppWrapper.d.ts +22 -22
- package/dist/types/wrapper/FrameWrapper.d.ts +18 -18
- package/dist/types/wrapper/ModuleFederationWrapper.d.ts +13 -13
- package/dist/types/wrapper/SsrWrapper.d.ts +14 -14
- package/dist/types/wrapper/StaticChaynsApi.d.ts +16 -16
- package/package.json +88 -88
- package/toolkit.config.js +20 -20
- package/tsconfig.json +56 -56
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IChaynsReact } from '../types/IChaynsReact';
|
|
2
|
-
export declare const moduleWrapper: {
|
|
3
|
-
current: IChaynsReact;
|
|
4
|
-
};
|
|
1
|
+
import { IChaynsReact } from '../types/IChaynsReact';
|
|
2
|
+
export declare const moduleWrapper: {
|
|
3
|
+
current: IChaynsReact;
|
|
4
|
+
};
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import React, { RefObject } from 'react';
|
|
3
|
-
type Props = {
|
|
4
|
-
innerRef?: RefObject<unknown>;
|
|
5
|
-
} & object;
|
|
6
|
-
export declare const withCompatMode: <P extends Props>(Component: React.ComponentType<P>) => {
|
|
7
|
-
Component: (props: any) => React.JSX.Element;
|
|
8
|
-
CompatComponent: {
|
|
9
|
-
new (props: P): {
|
|
10
|
-
ref: RefObject<HTMLDivElement>;
|
|
11
|
-
root: any;
|
|
12
|
-
timeout?: NodeJS.Timeout | undefined;
|
|
13
|
-
componentDidMount(): void;
|
|
14
|
-
componentDidUpdate(): void;
|
|
15
|
-
componentWillUnmount(): void;
|
|
16
|
-
render(): React.JSX.Element;
|
|
17
|
-
context: unknown;
|
|
18
|
-
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<P>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
19
|
-
forceUpdate(callback?: (() => void) | undefined): void;
|
|
20
|
-
readonly props: Readonly<P>;
|
|
21
|
-
state: Readonly<{}>;
|
|
22
|
-
refs: {
|
|
23
|
-
[key: string]: React.ReactInstance;
|
|
24
|
-
};
|
|
25
|
-
shouldComponentUpdate?(nextProps: Readonly<P>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
26
|
-
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
27
|
-
getSnapshotBeforeUpdate?(prevProps: Readonly<P>, prevState: Readonly<{}>): any;
|
|
28
|
-
componentWillMount?(): void;
|
|
29
|
-
UNSAFE_componentWillMount?(): void;
|
|
30
|
-
componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
|
|
31
|
-
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
|
|
32
|
-
componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<{}>, nextContext: any): void;
|
|
33
|
-
UNSAFE_componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<{}>, nextContext: any): void;
|
|
34
|
-
};
|
|
35
|
-
contextType?: React.Context<any> | undefined;
|
|
36
|
-
};
|
|
37
|
-
requiredVersion: any;
|
|
38
|
-
environment: string | undefined;
|
|
39
|
-
buildEnv: string | undefined;
|
|
40
|
-
appVersion: string | undefined;
|
|
41
|
-
version: number;
|
|
42
|
-
};
|
|
43
|
-
export {};
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import React, { RefObject } from 'react';
|
|
3
|
+
type Props = {
|
|
4
|
+
innerRef?: RefObject<unknown>;
|
|
5
|
+
} & object;
|
|
6
|
+
export declare const withCompatMode: <P extends Props>(Component: React.ComponentType<P>) => {
|
|
7
|
+
Component: (props: any) => React.JSX.Element;
|
|
8
|
+
CompatComponent: {
|
|
9
|
+
new (props: P): {
|
|
10
|
+
ref: RefObject<HTMLDivElement>;
|
|
11
|
+
root: any;
|
|
12
|
+
timeout?: NodeJS.Timeout | undefined;
|
|
13
|
+
componentDidMount(): void;
|
|
14
|
+
componentDidUpdate(): void;
|
|
15
|
+
componentWillUnmount(): void;
|
|
16
|
+
render(): React.JSX.Element;
|
|
17
|
+
context: unknown;
|
|
18
|
+
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<P>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
19
|
+
forceUpdate(callback?: (() => void) | undefined): void;
|
|
20
|
+
readonly props: Readonly<P>;
|
|
21
|
+
state: Readonly<{}>;
|
|
22
|
+
refs: {
|
|
23
|
+
[key: string]: React.ReactInstance;
|
|
24
|
+
};
|
|
25
|
+
shouldComponentUpdate?(nextProps: Readonly<P>, nextState: Readonly<{}>, nextContext: any): boolean;
|
|
26
|
+
componentDidCatch?(error: Error, errorInfo: React.ErrorInfo): void;
|
|
27
|
+
getSnapshotBeforeUpdate?(prevProps: Readonly<P>, prevState: Readonly<{}>): any;
|
|
28
|
+
componentWillMount?(): void;
|
|
29
|
+
UNSAFE_componentWillMount?(): void;
|
|
30
|
+
componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
|
|
31
|
+
UNSAFE_componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
|
|
32
|
+
componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<{}>, nextContext: any): void;
|
|
33
|
+
UNSAFE_componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<{}>, nextContext: any): void;
|
|
34
|
+
};
|
|
35
|
+
contextType?: React.Context<any> | undefined;
|
|
36
|
+
};
|
|
37
|
+
requiredVersion: any;
|
|
38
|
+
environment: string | undefined;
|
|
39
|
+
buildEnv: string | undefined;
|
|
40
|
+
appVersion: string | undefined;
|
|
41
|
+
version: number;
|
|
42
|
+
};
|
|
43
|
+
export {};
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
export interface StoreLikeValue<T> {
|
|
3
|
-
getState: () => T;
|
|
4
|
-
abort?: () => Promise<void>;
|
|
5
|
-
type?: 'raw' | 'json';
|
|
6
|
-
}
|
|
7
|
-
type HydrationComponent<T, S, U> = React.FC<T & {
|
|
8
|
-
value: U & StoreLikeValue<S>;
|
|
9
|
-
children?: React.ReactNode;
|
|
10
|
-
}>;
|
|
11
|
-
type Initializer<T, S, U> = (initialValue: S | undefined, id: string, props: T) => U & StoreLikeValue<S>;
|
|
12
|
-
type HydrationBoundary<T> = React.FC<T & {
|
|
13
|
-
id?: string;
|
|
14
|
-
children?: React.ReactNode;
|
|
15
|
-
}>;
|
|
16
|
-
declare function withHydrationBoundary<P extends object, T, S>(Component: HydrationComponent<P, T, S>, initializer: Initializer<undefined, T, S>): HydrationBoundary<P & {
|
|
17
|
-
id: string;
|
|
18
|
-
}>;
|
|
19
|
-
declare function withHydrationBoundary<P extends object, T, S>(Component: HydrationComponent<P, T, S>, initializer: Initializer<undefined, T, S>, useHydrationId: () => string): HydrationBoundary<P>;
|
|
20
|
-
declare function withHydrationBoundary<P extends object, T, S, U>(Component: HydrationComponent<P, T, S>, initializer: Initializer<U, T, S>, useHydrationId: undefined, useProps: (props: P) => U): HydrationBoundary<P & {
|
|
21
|
-
id: string;
|
|
22
|
-
}>;
|
|
23
|
-
declare function withHydrationBoundary<P extends object, T, S, U>(Component: HydrationComponent<P, T, S>, initializer: Initializer<U, T, S>, useHydrationId: (() => string), useProps: (props: P) => U): HydrationBoundary<P>;
|
|
24
|
-
export default withHydrationBoundary;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export interface StoreLikeValue<T> {
|
|
3
|
+
getState: () => T;
|
|
4
|
+
abort?: () => Promise<void>;
|
|
5
|
+
type?: 'raw' | 'json';
|
|
6
|
+
}
|
|
7
|
+
type HydrationComponent<T, S, U> = React.FC<T & {
|
|
8
|
+
value: U & StoreLikeValue<S>;
|
|
9
|
+
children?: React.ReactNode;
|
|
10
|
+
}>;
|
|
11
|
+
type Initializer<T, S, U> = (initialValue: S | undefined, id: string, props: T) => U & StoreLikeValue<S>;
|
|
12
|
+
type HydrationBoundary<T> = React.FC<T & {
|
|
13
|
+
id?: string;
|
|
14
|
+
children?: React.ReactNode;
|
|
15
|
+
}>;
|
|
16
|
+
declare function withHydrationBoundary<P extends object, T, S>(Component: HydrationComponent<P, T, S>, initializer: Initializer<undefined, T, S>): HydrationBoundary<P & {
|
|
17
|
+
id: string;
|
|
18
|
+
}>;
|
|
19
|
+
declare function withHydrationBoundary<P extends object, T, S>(Component: HydrationComponent<P, T, S>, initializer: Initializer<undefined, T, S>, useHydrationId: () => string): HydrationBoundary<P>;
|
|
20
|
+
declare function withHydrationBoundary<P extends object, T, S, U>(Component: HydrationComponent<P, T, S>, initializer: Initializer<U, T, S>, useHydrationId: undefined, useProps: (props: P) => U): HydrationBoundary<P & {
|
|
21
|
+
id: string;
|
|
22
|
+
}>;
|
|
23
|
+
declare function withHydrationBoundary<P extends object, T, S, U>(Component: HydrationComponent<P, T, S>, initializer: Initializer<U, T, S>, useHydrationId: (() => string), useProps: (props: P) => U): HydrationBoundary<P>;
|
|
24
|
+
export default withHydrationBoundary;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { type StoreLikeValue } from '../components/withHydrationBoundary';
|
|
3
|
-
export type HydrationContextValueType<T> = {
|
|
4
|
-
[key: string]: StoreLikeValue<T>;
|
|
5
|
-
};
|
|
6
|
-
export declare let HydrationContext: React.Context<HydrationContextValueType<object>>;
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type StoreLikeValue } from '../components/withHydrationBoundary';
|
|
3
|
+
export type HydrationContextValueType<T> = {
|
|
4
|
+
[key: string]: StoreLikeValue<T>;
|
|
5
|
+
};
|
|
6
|
+
export declare let HydrationContext: React.Context<HydrationContextValueType<object>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './hydrationContext';
|
|
1
|
+
export * from './hydrationContext';
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
export declare enum DeviceLanguage {
|
|
2
|
-
de = 1,
|
|
3
|
-
en = 2,
|
|
4
|
-
fr = 3,
|
|
5
|
-
it = 4,
|
|
6
|
-
nl = 5,
|
|
7
|
-
es = 6,
|
|
8
|
-
pt = 7,
|
|
9
|
-
tr = 8,
|
|
10
|
-
pl = 9,
|
|
11
|
-
uk = 10
|
|
12
|
-
}
|
|
1
|
+
export declare enum DeviceLanguage {
|
|
2
|
+
de = 1,
|
|
3
|
+
en = 2,
|
|
4
|
+
fr = 3,
|
|
5
|
+
it = 4,
|
|
6
|
+
nl = 5,
|
|
7
|
+
es = 6,
|
|
8
|
+
pt = 7,
|
|
9
|
+
tr = 8,
|
|
10
|
+
pl = 9,
|
|
11
|
+
uk = 10
|
|
12
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
export default class DialogHandler<S = void, T extends any = void> {
|
|
2
|
-
private dialogId;
|
|
3
|
-
private isOpen;
|
|
4
|
-
private result;
|
|
5
|
-
private readonly _open;
|
|
6
|
-
private readonly _close;
|
|
7
|
-
private readonly _config;
|
|
8
|
-
private readonly _dispatchEvent;
|
|
9
|
-
private readonly _addDataListener;
|
|
10
|
-
private readonly listeners;
|
|
11
|
-
constructor(config: any, open: any, close: any, dispatchEvent: any, addDataListener: any);
|
|
12
|
-
open(): Promise<{
|
|
13
|
-
buttonType: number;
|
|
14
|
-
result: T extends undefined ? S : T;
|
|
15
|
-
}>;
|
|
16
|
-
close(buttonType: any, data: any): void;
|
|
17
|
-
dispatchEvent(data: object): void;
|
|
18
|
-
addDataListener(listener: (data: any) => void): void;
|
|
19
|
-
removeDataListener(listener: (data: any) => void): void;
|
|
20
|
-
getResult(): {
|
|
21
|
-
buttonType: number;
|
|
22
|
-
result: T extends undefined ? S : T;
|
|
23
|
-
} | undefined;
|
|
24
|
-
}
|
|
1
|
+
export default class DialogHandler<S = void, T extends any = void> {
|
|
2
|
+
private dialogId;
|
|
3
|
+
private isOpen;
|
|
4
|
+
private result;
|
|
5
|
+
private readonly _open;
|
|
6
|
+
private readonly _close;
|
|
7
|
+
private readonly _config;
|
|
8
|
+
private readonly _dispatchEvent;
|
|
9
|
+
private readonly _addDataListener;
|
|
10
|
+
private readonly listeners;
|
|
11
|
+
constructor(config: any, open: any, close: any, dispatchEvent: any, addDataListener: any);
|
|
12
|
+
open(): Promise<{
|
|
13
|
+
buttonType: number;
|
|
14
|
+
result: T extends undefined ? S : T;
|
|
15
|
+
}>;
|
|
16
|
+
close(buttonType: any, data: any): void;
|
|
17
|
+
dispatchEvent(data: object): void;
|
|
18
|
+
addDataListener(listener: (data: any) => void): void;
|
|
19
|
+
removeDataListener(listener: (data: any) => void): void;
|
|
20
|
+
getResult(): {
|
|
21
|
+
buttonType: number;
|
|
22
|
+
result: T extends undefined ? S : T;
|
|
23
|
+
} | undefined;
|
|
24
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const addApiListener: (key: string, callback: (result: any) => unknown | void) => {
|
|
2
|
-
id: number;
|
|
3
|
-
shouldInitialize: boolean;
|
|
4
|
-
};
|
|
5
|
-
export declare const removeApiListener: (key: string, id: number) => boolean;
|
|
6
|
-
export declare const dispatchApiEvent: (key: string, value: unknown) => void;
|
|
1
|
+
export declare const addApiListener: (key: string, callback: (result: any) => unknown | void) => {
|
|
2
|
+
id: number;
|
|
3
|
+
shouldInitialize: boolean;
|
|
4
|
+
};
|
|
5
|
+
export declare const removeApiListener: (key: string, id: number) => boolean;
|
|
6
|
+
export declare const dispatchApiEvent: (key: string, value: unknown) => void;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { IChaynsReact } from '../types/IChaynsReact';
|
|
2
|
-
export declare const useValuesSelector: <Result>(selector: (value: IChaynsReact["values"]) => Result) => Result;
|
|
3
|
-
export declare const useFunctionsSelector: <Result>(selector: (value: IChaynsReact["functions"]) => Result) => Result;
|
|
1
|
+
import { IChaynsReact } from '../types/IChaynsReact';
|
|
2
|
+
export declare const useValuesSelector: <Result>(selector: (value: IChaynsReact["values"]) => Result) => Result;
|
|
3
|
+
export declare const useFunctionsSelector: <Result>(selector: (value: IChaynsReact["functions"]) => Result) => Result;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { GeoLocation } from '../types/IChaynsReact';
|
|
2
|
-
/**
|
|
3
|
-
* @category Hooks
|
|
4
|
-
*/
|
|
5
|
-
export declare const useGeoLocationListener: () => (value: {
|
|
6
|
-
timeout?: number;
|
|
7
|
-
silent?: boolean;
|
|
8
|
-
}, callback: (result: GeoLocation) => void) => () => void;
|
|
9
|
-
/**
|
|
10
|
-
* @category Hooks
|
|
11
|
-
*/
|
|
12
|
-
export declare const useGeoLocation: ({ enabled, timeout, silent }?: {
|
|
13
|
-
enabled?: boolean | undefined;
|
|
14
|
-
timeout?: number | undefined;
|
|
15
|
-
silent?: boolean | undefined;
|
|
16
|
-
}) => {
|
|
17
|
-
value: GeoLocation | null;
|
|
18
|
-
};
|
|
1
|
+
import { GeoLocation } from '../types/IChaynsReact';
|
|
2
|
+
/**
|
|
3
|
+
* @category Hooks
|
|
4
|
+
*/
|
|
5
|
+
export declare const useGeoLocationListener: () => (value: {
|
|
6
|
+
timeout?: number;
|
|
7
|
+
silent?: boolean;
|
|
8
|
+
}, callback: (result: GeoLocation) => void) => () => void;
|
|
9
|
+
/**
|
|
10
|
+
* @category Hooks
|
|
11
|
+
*/
|
|
12
|
+
export declare const useGeoLocation: ({ enabled, timeout, silent }?: {
|
|
13
|
+
enabled?: boolean | undefined;
|
|
14
|
+
timeout?: number | undefined;
|
|
15
|
+
silent?: boolean | undefined;
|
|
16
|
+
}) => {
|
|
17
|
+
value: GeoLocation | null;
|
|
18
|
+
};
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
export { useGeoLocation, useGeoLocationListener } from './geoLocationListener';
|
|
2
|
-
export { useScrollPosition, useScrollListener, useScrollOffsetBottom, useScrollOffsetTop, } from './scrollListener';
|
|
3
|
-
export { useIsAdminMode } from './useIsAdminMode';
|
|
4
|
-
export { useUser } from './useUser';
|
|
5
|
-
export { useAccessToken } from './useAccessToken';
|
|
6
|
-
export { useWindowMetrics, useWindowMetricsListener } from './windowMetricsListener';
|
|
7
|
-
export { useDevice } from './useDevice';
|
|
8
|
-
export { useSite } from './useSite';
|
|
9
|
-
export { useParameters } from './useParameters';
|
|
10
|
-
export { usePages, usePage, getPage } from './usePages';
|
|
11
|
-
export { useEnvironment } from './useEnvironment';
|
|
12
|
-
export { useLanguage } from './useLanguage';
|
|
13
|
-
export { useValues } from './useValues';
|
|
14
|
-
export { useFunctions } from './useFunctions';
|
|
15
|
-
export { useCurrentPage } from './useCurrentPage';
|
|
16
|
-
export { useCustomData } from './useCustomData';
|
|
17
|
-
export { useDialogState, useDialogData } from './useDialogState';
|
|
18
|
-
export { useCustomCallbackFunction } from './useCustomCallbackFunction';
|
|
1
|
+
export { useGeoLocation, useGeoLocationListener } from './geoLocationListener';
|
|
2
|
+
export { useScrollPosition, useScrollListener, useScrollOffsetBottom, useScrollOffsetTop, } from './scrollListener';
|
|
3
|
+
export { useIsAdminMode } from './useIsAdminMode';
|
|
4
|
+
export { useUser } from './useUser';
|
|
5
|
+
export { useAccessToken } from './useAccessToken';
|
|
6
|
+
export { useWindowMetrics, useWindowMetricsListener } from './windowMetricsListener';
|
|
7
|
+
export { useDevice } from './useDevice';
|
|
8
|
+
export { useSite } from './useSite';
|
|
9
|
+
export { useParameters } from './useParameters';
|
|
10
|
+
export { usePages, usePage, getPage } from './usePages';
|
|
11
|
+
export { useEnvironment } from './useEnvironment';
|
|
12
|
+
export { useLanguage } from './useLanguage';
|
|
13
|
+
export { useValues } from './useValues';
|
|
14
|
+
export { useFunctions } from './useFunctions';
|
|
15
|
+
export { useCurrentPage } from './useCurrentPage';
|
|
16
|
+
export { useCustomData } from './useCustomData';
|
|
17
|
+
export { useDialogState, useDialogData } from './useDialogState';
|
|
18
|
+
export { useCustomCallbackFunction } from './useCustomCallbackFunction';
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { ScrollListenerResult } from '../types/IChaynsReact';
|
|
2
|
-
/**
|
|
3
|
-
* @category Hooks
|
|
4
|
-
*/
|
|
5
|
-
export declare const useScrollListener: () => (value: {
|
|
6
|
-
throttle?: number;
|
|
7
|
-
}, callback: (result: ScrollListenerResult) => void) => () => void;
|
|
8
|
-
/**
|
|
9
|
-
* @category Hooks
|
|
10
|
-
*/
|
|
11
|
-
export declare const useScrollPosition: ({ enabled, throttle }?: {
|
|
12
|
-
enabled?: boolean | undefined;
|
|
13
|
-
throttle?: number | undefined;
|
|
14
|
-
}) => ScrollListenerResult;
|
|
15
|
-
/**
|
|
16
|
-
* @category Hooks
|
|
17
|
-
*/
|
|
18
|
-
export declare const useScrollOffsetTop: ({ enabled, throttle }?: {
|
|
19
|
-
enabled?: boolean | undefined;
|
|
20
|
-
throttle?: number | undefined;
|
|
21
|
-
}) => number;
|
|
22
|
-
/**
|
|
23
|
-
* @category Hooks
|
|
24
|
-
*/
|
|
25
|
-
export declare const useScrollOffsetBottom: ({ enabled, throttle }?: {
|
|
26
|
-
enabled?: boolean | undefined;
|
|
27
|
-
throttle?: number | undefined;
|
|
28
|
-
}) => number;
|
|
1
|
+
import { ScrollListenerResult } from '../types/IChaynsReact';
|
|
2
|
+
/**
|
|
3
|
+
* @category Hooks
|
|
4
|
+
*/
|
|
5
|
+
export declare const useScrollListener: () => (value: {
|
|
6
|
+
throttle?: number;
|
|
7
|
+
}, callback: (result: ScrollListenerResult) => void) => () => void;
|
|
8
|
+
/**
|
|
9
|
+
* @category Hooks
|
|
10
|
+
*/
|
|
11
|
+
export declare const useScrollPosition: ({ enabled, throttle }?: {
|
|
12
|
+
enabled?: boolean | undefined;
|
|
13
|
+
throttle?: number | undefined;
|
|
14
|
+
}) => ScrollListenerResult;
|
|
15
|
+
/**
|
|
16
|
+
* @category Hooks
|
|
17
|
+
*/
|
|
18
|
+
export declare const useScrollOffsetTop: ({ enabled, throttle }?: {
|
|
19
|
+
enabled?: boolean | undefined;
|
|
20
|
+
throttle?: number | undefined;
|
|
21
|
+
}) => number;
|
|
22
|
+
/**
|
|
23
|
+
* @category Hooks
|
|
24
|
+
*/
|
|
25
|
+
export declare const useScrollOffsetBottom: ({ enabled, throttle }?: {
|
|
26
|
+
enabled?: boolean | undefined;
|
|
27
|
+
throttle?: number | undefined;
|
|
28
|
+
}) => number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AccessToken } from '../types/IChaynsReact';
|
|
2
|
-
/**
|
|
3
|
-
* @category Hooks
|
|
4
|
-
* @deprecated Use {@link getAccessToken} instead
|
|
5
|
-
*/
|
|
6
|
-
export declare const useAccessToken: (accessToken?: AccessToken) => string | undefined;
|
|
1
|
+
import { AccessToken } from '../types/IChaynsReact';
|
|
2
|
+
/**
|
|
3
|
+
* @category Hooks
|
|
4
|
+
* @deprecated Use {@link getAccessToken} instead
|
|
5
|
+
*/
|
|
6
|
+
export declare const useAccessToken: (accessToken?: AccessToken) => string | undefined;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ChaynsReactValues } from '../types/IChaynsReact';
|
|
2
|
-
/**
|
|
3
|
-
* @category Hooks
|
|
4
|
-
*/
|
|
5
|
-
export declare const useCurrentPage: () => ChaynsReactValues["currentPage"];
|
|
1
|
+
import { ChaynsReactValues } from '../types/IChaynsReact';
|
|
2
|
+
/**
|
|
3
|
+
* @category Hooks
|
|
4
|
+
*/
|
|
5
|
+
export declare const useCurrentPage: () => ChaynsReactValues["currentPage"];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @category Hooks
|
|
3
|
-
* Returns customCallbackFunction
|
|
4
|
-
*/
|
|
5
|
-
export declare const useCustomCallbackFunction: () => (type: string, data: unknown) => Promise<unknown>;
|
|
1
|
+
/**
|
|
2
|
+
* @category Hooks
|
|
3
|
+
* Returns customCallbackFunction
|
|
4
|
+
*/
|
|
5
|
+
export declare const useCustomCallbackFunction: () => (type: string, data: unknown) => Promise<unknown>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @category Hooks
|
|
3
|
-
*/
|
|
4
|
-
export declare const useCustomData: <T extends unknown>() => T;
|
|
1
|
+
/**
|
|
2
|
+
* @category Hooks
|
|
3
|
+
*/
|
|
4
|
+
export declare const useCustomData: <T extends unknown>() => T;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ChaynsApiDevice } from '../types/IChaynsReact';
|
|
2
|
-
/**
|
|
3
|
-
* @category Hooks
|
|
4
|
-
*/
|
|
5
|
-
export declare const useDevice: () => ChaynsApiDevice;
|
|
1
|
+
import { ChaynsApiDevice } from '../types/IChaynsReact';
|
|
2
|
+
/**
|
|
3
|
+
* @category Hooks
|
|
4
|
+
*/
|
|
5
|
+
export declare const useDevice: () => ChaynsApiDevice;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
/**
|
|
3
|
-
* @category Hooks
|
|
4
|
-
*/
|
|
5
|
-
export declare const useDialogState: () => DialogHookResult;
|
|
6
|
-
/**
|
|
7
|
-
* @category Hooks
|
|
8
|
-
*/
|
|
9
|
-
export declare const useDialogData: () =>
|
|
1
|
+
import { DialogHookResult } from '../types/IChaynsReact';
|
|
2
|
+
/**
|
|
3
|
+
* @category Hooks
|
|
4
|
+
*/
|
|
5
|
+
export declare const useDialogState: () => DialogHookResult;
|
|
6
|
+
/**
|
|
7
|
+
* @category Hooks
|
|
8
|
+
*/
|
|
9
|
+
export declare const useDialogData: <T extends unknown>() => T;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ChaynsReactValues } from '../types/IChaynsReact';
|
|
2
|
-
/**
|
|
3
|
-
* @category Hooks
|
|
4
|
-
*/
|
|
5
|
-
export declare const useEnvironment: () => ChaynsReactValues["environment"];
|
|
1
|
+
import { ChaynsReactValues } from '../types/IChaynsReact';
|
|
2
|
+
/**
|
|
3
|
+
* @category Hooks
|
|
4
|
+
*/
|
|
5
|
+
export declare const useEnvironment: () => ChaynsReactValues["environment"];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @category Hooks
|
|
3
|
-
*/
|
|
4
|
-
export declare const useFunctions: () => import("..").ChaynsReactFunctions;
|
|
1
|
+
/**
|
|
2
|
+
* @category Hooks
|
|
3
|
+
*/
|
|
4
|
+
export declare const useFunctions: () => import("..").ChaynsReactFunctions;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @category Hooks
|
|
3
|
-
*/
|
|
4
|
-
export declare const useIsAdminMode: () => boolean;
|
|
1
|
+
/**
|
|
2
|
+
* @category Hooks
|
|
3
|
+
*/
|
|
4
|
+
export declare const useIsAdminMode: () => boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ChaynsReactValues } from '../types/IChaynsReact';
|
|
2
|
-
/**
|
|
3
|
-
* @category Hooks
|
|
4
|
-
*/
|
|
5
|
-
export declare const useLanguage: () => ChaynsReactValues["language"];
|
|
1
|
+
import { ChaynsReactValues } from '../types/IChaynsReact';
|
|
2
|
+
/**
|
|
3
|
+
* @category Hooks
|
|
4
|
+
*/
|
|
5
|
+
export declare const useLanguage: () => ChaynsReactValues["language"];
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { ChaynsReactValues, Page } from '../types/IChaynsReact';
|
|
2
|
-
/**
|
|
3
|
-
* @category Hooks
|
|
4
|
-
*/
|
|
5
|
-
export declare const usePages: ({ siteId }?: {
|
|
6
|
-
siteId: undefined;
|
|
7
|
-
}) => ChaynsReactValues["pages"];
|
|
8
|
-
/**
|
|
9
|
-
* @category Hooks
|
|
10
|
-
*/
|
|
11
|
-
export declare const usePage: ({ id, siteId }: {
|
|
12
|
-
id: any;
|
|
13
|
-
siteId: any;
|
|
14
|
-
}) => Page | null;
|
|
15
|
-
export declare const getPage: ({ id, siteId }?: {
|
|
16
|
-
id: null;
|
|
17
|
-
siteId: null;
|
|
18
|
-
}) => Page | null;
|
|
1
|
+
import { ChaynsReactValues, Page } from '../types/IChaynsReact';
|
|
2
|
+
/**
|
|
3
|
+
* @category Hooks
|
|
4
|
+
*/
|
|
5
|
+
export declare const usePages: ({ siteId }?: {
|
|
6
|
+
siteId: undefined;
|
|
7
|
+
}) => ChaynsReactValues["pages"];
|
|
8
|
+
/**
|
|
9
|
+
* @category Hooks
|
|
10
|
+
*/
|
|
11
|
+
export declare const usePage: ({ id, siteId }: {
|
|
12
|
+
id: any;
|
|
13
|
+
siteId: any;
|
|
14
|
+
}) => Page | null;
|
|
15
|
+
export declare const getPage: ({ id, siteId }?: {
|
|
16
|
+
id: null;
|
|
17
|
+
siteId: null;
|
|
18
|
+
}) => Page | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ChaynsReactValues } from '../types/IChaynsReact';
|
|
2
|
-
/**
|
|
3
|
-
* @category Hooks
|
|
4
|
-
*/
|
|
5
|
-
export declare const useParameters: () => ChaynsReactValues['parameters'];
|
|
1
|
+
import { ChaynsReactValues } from '../types/IChaynsReact';
|
|
2
|
+
/**
|
|
3
|
+
* @category Hooks
|
|
4
|
+
*/
|
|
5
|
+
export declare const useParameters: () => ChaynsReactValues['parameters'];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ChaynsApiSite } from '../types/IChaynsReact';
|
|
2
|
-
/**
|
|
3
|
-
* @category Hooks
|
|
4
|
-
*/
|
|
5
|
-
export declare const useSite: () => ChaynsApiSite;
|
|
1
|
+
import { ChaynsApiSite } from '../types/IChaynsReact';
|
|
2
|
+
/**
|
|
3
|
+
* @category Hooks
|
|
4
|
+
*/
|
|
5
|
+
export declare const useSite: () => ChaynsApiSite;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ChaynsApiUser } from '../types/IChaynsReact';
|
|
2
|
-
/**
|
|
3
|
-
* @category Hooks
|
|
4
|
-
*/
|
|
5
|
-
export declare const useUser: () => ChaynsApiUser;
|
|
1
|
+
import { ChaynsApiUser } from '../types/IChaynsReact';
|
|
2
|
+
/**
|
|
3
|
+
* @category Hooks
|
|
4
|
+
*/
|
|
5
|
+
export declare const useUser: () => ChaynsApiUser;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @category Hooks
|
|
3
|
-
*/
|
|
4
|
-
export declare const useValues: () => import("..").ChaynsReactValues;
|
|
1
|
+
/**
|
|
2
|
+
* @category Hooks
|
|
3
|
+
*/
|
|
4
|
+
export declare const useValues: () => import("..").ChaynsReactValues;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { WindowMetricsListenerResult } from '../types/IChaynsReact';
|
|
2
|
-
/**
|
|
3
|
-
* @category Hooks
|
|
4
|
-
*/
|
|
5
|
-
export declare const useWindowMetricsListener: () => (callback: (result: WindowMetricsListenerResult) => void) => () => void;
|
|
6
|
-
/**
|
|
7
|
-
* @category Hooks
|
|
8
|
-
*/
|
|
9
|
-
export declare const useWindowMetrics: ({ enabled }?: {
|
|
10
|
-
enabled?: boolean | undefined;
|
|
11
|
-
}) => WindowMetricsListenerResult;
|
|
1
|
+
import { WindowMetricsListenerResult } from '../types/IChaynsReact';
|
|
2
|
+
/**
|
|
3
|
+
* @category Hooks
|
|
4
|
+
*/
|
|
5
|
+
export declare const useWindowMetricsListener: () => (callback: (result: WindowMetricsListenerResult) => void) => () => void;
|
|
6
|
+
/**
|
|
7
|
+
* @category Hooks
|
|
8
|
+
*/
|
|
9
|
+
export declare const useWindowMetrics: ({ enabled }?: {
|
|
10
|
+
enabled?: boolean | undefined;
|
|
11
|
+
}) => WindowMetricsListenerResult;
|