chayns-api 1.0.13 → 1.1.0-2
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 +30 -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 +54 -54
- package/dist/cjs/calls/dialogs/date.js +10 -10
- package/dist/cjs/calls/index.js +102 -97
- package/dist/cjs/calls/sendMessage.js +8 -8
- package/dist/cjs/calls/visibilityChangeListener.js +4 -4
- package/dist/cjs/components/AppDialogWrapper.js +42 -0
- package/dist/cjs/components/ChaynsProvider.js +5 -2
- package/dist/cjs/handler/DialogHandler.js +63 -0
- package/dist/cjs/hooks/geoLocationListener.js +4 -4
- package/dist/cjs/hooks/index.js +14 -1
- package/dist/cjs/hooks/scrollListener.js +8 -8
- package/dist/cjs/hooks/useAccessToken.js +2 -2
- package/dist/cjs/hooks/useCurrentPage.js +2 -2
- package/dist/cjs/hooks/useCustomData.js +2 -2
- package/dist/cjs/hooks/useDevice.js +2 -2
- package/dist/cjs/hooks/useDialogState.js +39 -0
- package/dist/cjs/hooks/useEnvironment.js +2 -2
- package/dist/cjs/hooks/useFunctions.js +2 -2
- package/dist/cjs/hooks/useIsAdminMode.js +2 -2
- package/dist/cjs/hooks/useLanguage.js +2 -2
- package/dist/cjs/hooks/usePages.js +4 -4
- package/dist/cjs/hooks/useParameters.js +2 -2
- package/dist/cjs/hooks/useSite.js +2 -2
- package/dist/cjs/hooks/useUser.js +2 -2
- package/dist/cjs/hooks/useValues.js +2 -2
- package/dist/cjs/hooks/windowMetricsListener.js +4 -4
- package/dist/cjs/host/ChaynsHost.js +10 -5
- package/dist/cjs/host/iframe/HostIframe.js +5 -2
- package/dist/cjs/host/module/ModuleHost.js +4 -0
- package/dist/cjs/types/IChaynsReact.js +22 -2
- package/dist/cjs/util/deviceHelper.js +7 -6
- package/dist/cjs/wrapper/AppWrapper.js +42 -6
- package/dist/cjs/wrapper/FrameWrapper.js +52 -1
- package/dist/cjs/wrapper/ModuleFederationWrapper.js +4 -0
- package/dist/esm/calls/dialogs/date.js +34 -34
- package/dist/esm/calls/index.js +102 -96
- package/dist/esm/calls/sendMessage.js +8 -8
- package/dist/esm/calls/visibilityChangeListener.js +4 -4
- package/dist/esm/components/AppDialogWrapper.js +33 -0
- package/dist/esm/components/ChaynsProvider.js +5 -2
- package/dist/esm/handler/DialogHandler.js +59 -0
- package/dist/esm/hooks/geoLocationListener.js +4 -4
- package/dist/esm/hooks/index.js +2 -1
- package/dist/esm/hooks/scrollListener.js +8 -8
- package/dist/esm/hooks/useAccessToken.js +2 -2
- package/dist/esm/hooks/useCurrentPage.js +2 -2
- package/dist/esm/hooks/useCustomData.js +2 -2
- package/dist/esm/hooks/useDevice.js +2 -2
- package/dist/esm/hooks/useDialogState.js +32 -0
- package/dist/esm/hooks/useEnvironment.js +2 -2
- package/dist/esm/hooks/useFunctions.js +2 -2
- package/dist/esm/hooks/useIsAdminMode.js +2 -2
- package/dist/esm/hooks/useLanguage.js +2 -2
- package/dist/esm/hooks/usePages.js +4 -4
- package/dist/esm/hooks/useParameters.js +2 -2
- package/dist/esm/hooks/useSite.js +2 -2
- package/dist/esm/hooks/useUser.js +2 -2
- package/dist/esm/hooks/useValues.js +2 -2
- package/dist/esm/hooks/windowMetricsListener.js +4 -4
- package/dist/esm/host/ChaynsHost.js +10 -5
- package/dist/esm/host/iframe/HostIframe.js +5 -2
- package/dist/esm/host/module/ModuleHost.js +4 -0
- package/dist/esm/types/IChaynsReact.js +19 -1
- package/dist/esm/util/deviceHelper.js +7 -6
- package/dist/esm/wrapper/AppWrapper.js +42 -6
- package/dist/esm/wrapper/FrameWrapper.js +52 -1
- package/dist/esm/wrapper/ModuleFederationWrapper.js +4 -0
- 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 +237 -233
- 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 -0
- package/dist/types/components/ChaynsContext.d.ts +3 -3
- package/dist/types/components/ChaynsProvider.d.ts +14 -14
- package/dist/types/components/WaitUntil.d.ts +7 -8
- package/dist/types/components/withCompatMode.d.ts +13 -13
- package/dist/types/handler/DialogHandler.d.ts +19 -0
- package/dist/types/helper/apiListenerHelper.d.ts +6 -6
- package/dist/types/hooks/geoLocationListener.d.ts +18 -18
- package/dist/types/hooks/index.d.ts +17 -16
- package/dist/types/hooks/scrollListener.d.ts +28 -28
- package/dist/types/hooks/useAccessToken.d.ts +5 -5
- package/dist/types/hooks/useCurrentPage.d.ts +4 -4
- 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 -0
- package/dist/types/hooks/useEnvironment.d.ts +5 -5
- package/dist/types/hooks/useFunctions.d.ts +5 -5
- 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 +5 -5
- package/dist/types/hooks/windowMetricsListener.d.ts +11 -11
- package/dist/types/host/ChaynsHost.d.ts +30 -29
- package/dist/types/host/iframe/HostIframe.d.ts +26 -25
- package/dist/types/host/iframe/utils/useUpdateData.d.ts +3 -3
- package/dist/types/host/module/ModuleHost.d.ts +26 -25
- package/dist/types/host/module/utils/loadComponent.d.ts +1 -1
- package/dist/types/host/module/utils/useDynamicScript.d.ts +9 -9
- package/dist/types/index.d.ts +16 -16
- package/dist/types/types/IChaynsReact.d.ts +708 -624
- package/dist/types/types/dialog.d.ts +41 -41
- package/dist/types/util/appCall.d.ts +2 -2
- package/dist/types/util/deviceHelper.d.ts +7 -7
- package/dist/types/util/heightHelper.d.ts +1 -1
- package/dist/types/util/postIframeForm.d.ts +1 -1
- package/dist/types/util/url.d.ts +1 -1
- package/dist/types/wrapper/AppWrapper.d.ts +22 -18
- package/dist/types/wrapper/FrameWrapper.d.ts +15 -15
- package/dist/types/wrapper/ModuleFederationWrapper.d.ts +10 -10
- package/dist/types/wrapper/SsrWrapper.d.ts +11 -11
- package/package.json +75 -75
- package/tsconfig.json +56 -56
|
@@ -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,16 +1,17 @@
|
|
|
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';
|
|
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';
|
|
@@ -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,5 +1,5 @@
|
|
|
1
|
-
import { AccessToken } from "../types/IChaynsReact";
|
|
2
|
-
/**
|
|
3
|
-
* @category Hooks
|
|
4
|
-
*/
|
|
5
|
-
export declare const useAccessToken: (accessToken?: AccessToken) => string | undefined;
|
|
1
|
+
import { AccessToken } from "../types/IChaynsReact";
|
|
2
|
+
/**
|
|
3
|
+
* @category Hooks
|
|
4
|
+
*/
|
|
5
|
+
export declare const useAccessToken: (accessToken?: AccessToken) => string | undefined;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @category Hooks
|
|
3
|
-
*/
|
|
4
|
-
export declare const useCurrentPage: () => any;
|
|
1
|
+
/**
|
|
2
|
+
* @category Hooks
|
|
3
|
+
*/
|
|
4
|
+
export declare const useCurrentPage: () => any;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @category Hooks
|
|
3
|
-
*/
|
|
4
|
-
export declare const useCustomData: () => any;
|
|
1
|
+
/**
|
|
2
|
+
* @category Hooks
|
|
3
|
+
*/
|
|
4
|
+
export declare const useCustomData: () => any;
|
|
@@ -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;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DialogDataHookResult, 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: () => DialogDataHookResult;
|
|
@@ -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,5 +1,5 @@
|
|
|
1
|
-
import { ChaynsReactFunctions } from "../types/IChaynsReact";
|
|
2
|
-
/**
|
|
3
|
-
* @category Hooks
|
|
4
|
-
*/
|
|
5
|
-
export declare const useFunctions: () => ChaynsReactFunctions;
|
|
1
|
+
import { ChaynsReactFunctions } from "../types/IChaynsReact";
|
|
2
|
+
/**
|
|
3
|
+
* @category Hooks
|
|
4
|
+
*/
|
|
5
|
+
export declare const useFunctions: () => 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,5 +1,5 @@
|
|
|
1
|
-
import { ChaynsReactValues } from '../types/IChaynsReact';
|
|
2
|
-
/**
|
|
3
|
-
* @category Hooks
|
|
4
|
-
*/
|
|
5
|
-
export declare const useValues: () => ChaynsReactValues;
|
|
1
|
+
import { ChaynsReactValues } from '../types/IChaynsReact';
|
|
2
|
+
/**
|
|
3
|
+
* @category Hooks
|
|
4
|
+
*/
|
|
5
|
+
export declare const useValues: () => 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;
|
|
@@ -1,29 +1,30 @@
|
|
|
1
|
-
import React, { FC } from 'react';
|
|
2
|
-
import { TypeSystem } from './module/ModuleHost';
|
|
3
|
-
import { ChaynsApiDevice, ChaynsApiSite, ChaynsApiUser, ChaynsReactFunctions, ChaynsReactValues, Page } from '../types/IChaynsReact';
|
|
4
|
-
type ChaynsHostType = {
|
|
5
|
-
type: string;
|
|
6
|
-
iFrameProps
|
|
7
|
-
[key: string]: unknown;
|
|
8
|
-
name: string;
|
|
9
|
-
};
|
|
10
|
-
functions: ChaynsReactFunctions;
|
|
11
|
-
src
|
|
12
|
-
iFrameRef
|
|
13
|
-
loadingComponent?: JSX.Element;
|
|
14
|
-
children?: JSX.Element;
|
|
15
|
-
system
|
|
16
|
-
pages: Page[];
|
|
17
|
-
isAdminModeActive: boolean;
|
|
18
|
-
site: ChaynsApiSite;
|
|
19
|
-
user: ChaynsApiUser | undefined;
|
|
20
|
-
currentPage: ChaynsReactValues["currentPage"];
|
|
21
|
-
device: ChaynsApiDevice;
|
|
22
|
-
language: ChaynsReactValues["language"];
|
|
23
|
-
parameters: ChaynsReactValues["parameters"];
|
|
24
|
-
customData: any;
|
|
25
|
-
environment: ChaynsReactValues["environment"];
|
|
26
|
-
preventStagingReplacement?: boolean;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { TypeSystem } from './module/ModuleHost';
|
|
3
|
+
import { ChaynsApiDevice, ChaynsApiSite, ChaynsApiUser, ChaynsReactFunctions, ChaynsReactValues, Page } from '../types/IChaynsReact';
|
|
4
|
+
type ChaynsHostType = {
|
|
5
|
+
type: string;
|
|
6
|
+
iFrameProps?: {
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
name: string;
|
|
9
|
+
};
|
|
10
|
+
functions: ChaynsReactFunctions;
|
|
11
|
+
src?: string;
|
|
12
|
+
iFrameRef?: React.MutableRefObject<HTMLIFrameElement | null> | undefined;
|
|
13
|
+
loadingComponent?: JSX.Element;
|
|
14
|
+
children?: JSX.Element;
|
|
15
|
+
system?: TypeSystem;
|
|
16
|
+
pages: Page[];
|
|
17
|
+
isAdminModeActive: boolean;
|
|
18
|
+
site: ChaynsApiSite;
|
|
19
|
+
user: ChaynsApiUser | undefined;
|
|
20
|
+
currentPage: ChaynsReactValues["currentPage"];
|
|
21
|
+
device: ChaynsApiDevice;
|
|
22
|
+
language: ChaynsReactValues["language"];
|
|
23
|
+
parameters: ChaynsReactValues["parameters"];
|
|
24
|
+
customData: any;
|
|
25
|
+
environment: ChaynsReactValues["environment"];
|
|
26
|
+
preventStagingReplacement?: boolean;
|
|
27
|
+
dialog: ChaynsReactValues["dialog"];
|
|
28
|
+
};
|
|
29
|
+
declare const ChaynsHost: FC<ChaynsHostType>;
|
|
30
|
+
export default ChaynsHost;
|
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import React, { FC } from 'react';
|
|
2
|
-
import { ChaynsApiDevice, ChaynsApiSite, ChaynsApiUser, ChaynsReactFunctions, ChaynsReactValues, Page } from '../../types/IChaynsReact';
|
|
3
|
-
type HostIframeProps = {
|
|
4
|
-
iFrameProps: {
|
|
5
|
-
[key: string]: unknown;
|
|
6
|
-
name: string;
|
|
7
|
-
};
|
|
8
|
-
src: string;
|
|
9
|
-
postForm?: boolean;
|
|
10
|
-
iFrameRef: React.MutableRefObject<HTMLIFrameElement | null> | undefined;
|
|
11
|
-
pages: Page[];
|
|
12
|
-
isAdminModeActive: boolean;
|
|
13
|
-
site: ChaynsApiSite;
|
|
14
|
-
user: ChaynsApiUser | undefined;
|
|
15
|
-
currentPage: ChaynsReactValues["currentPage"];
|
|
16
|
-
functions: ChaynsReactFunctions;
|
|
17
|
-
device: ChaynsApiDevice;
|
|
18
|
-
language: ChaynsReactValues["language"];
|
|
19
|
-
parameters: ChaynsReactValues["parameters"];
|
|
20
|
-
environment: ChaynsReactValues["environment"];
|
|
21
|
-
customData: ChaynsReactValues["customData"];
|
|
22
|
-
preventStagingReplacement?: boolean;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
import React, { FC } from 'react';
|
|
2
|
+
import { ChaynsApiDevice, ChaynsApiSite, ChaynsApiUser, ChaynsReactFunctions, ChaynsReactValues, Page } from '../../types/IChaynsReact';
|
|
3
|
+
type HostIframeProps = {
|
|
4
|
+
iFrameProps: {
|
|
5
|
+
[key: string]: unknown;
|
|
6
|
+
name: string;
|
|
7
|
+
};
|
|
8
|
+
src: string;
|
|
9
|
+
postForm?: boolean;
|
|
10
|
+
iFrameRef: React.MutableRefObject<HTMLIFrameElement | null> | undefined;
|
|
11
|
+
pages: Page[];
|
|
12
|
+
isAdminModeActive: boolean;
|
|
13
|
+
site: ChaynsApiSite;
|
|
14
|
+
user: ChaynsApiUser | undefined;
|
|
15
|
+
currentPage: ChaynsReactValues["currentPage"];
|
|
16
|
+
functions: ChaynsReactFunctions;
|
|
17
|
+
device: ChaynsApiDevice;
|
|
18
|
+
language: ChaynsReactValues["language"];
|
|
19
|
+
parameters: ChaynsReactValues["parameters"];
|
|
20
|
+
environment: ChaynsReactValues["environment"];
|
|
21
|
+
customData: ChaynsReactValues["customData"];
|
|
22
|
+
preventStagingReplacement?: boolean;
|
|
23
|
+
dialog: ChaynsReactValues["dialog"];
|
|
24
|
+
};
|
|
25
|
+
declare const HostIframe: FC<HostIframeProps>;
|
|
26
|
+
export default HostIframe;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ChaynsReactValues } from '../../../types/IChaynsReact';
|
|
2
|
-
declare const useUpdateData: <T extends keyof ChaynsReactValues>(target: EventTarget | undefined, type: T, value: ChaynsReactValues[T]) => void;
|
|
3
|
-
export default useUpdateData;
|
|
1
|
+
import { ChaynsReactValues } from '../../../types/IChaynsReact';
|
|
2
|
+
declare const useUpdateData: <T extends keyof ChaynsReactValues>(target: EventTarget | undefined, type: T, value: ChaynsReactValues[T]) => void;
|
|
3
|
+
export default useUpdateData;
|
|
@@ -1,25 +1,26 @@
|
|
|
1
|
-
import { FC, ReactNode } from 'react';
|
|
2
|
-
import { ChaynsApiDevice, ChaynsApiSite, ChaynsApiUser, ChaynsReactFunctions, ChaynsReactValues, Page } from '../../types/IChaynsReact';
|
|
3
|
-
export type TypeSystem = {
|
|
4
|
-
scope: string;
|
|
5
|
-
url: string;
|
|
6
|
-
module: string;
|
|
7
|
-
};
|
|
8
|
-
type ModulePropTypes = {
|
|
9
|
-
system: TypeSystem;
|
|
10
|
-
functions: ChaynsReactFunctions;
|
|
11
|
-
pages: Page[];
|
|
12
|
-
isAdminModeActive: boolean;
|
|
13
|
-
site: ChaynsApiSite;
|
|
14
|
-
user: ChaynsApiUser | undefined;
|
|
15
|
-
currentPage: ChaynsReactValues["currentPage"];
|
|
16
|
-
device: ChaynsApiDevice;
|
|
17
|
-
language: ChaynsReactValues["language"];
|
|
18
|
-
parameters: ChaynsReactValues["parameters"];
|
|
19
|
-
customData: any;
|
|
20
|
-
environment: ChaynsReactValues["environment"];
|
|
21
|
-
preventStagingReplacement?: boolean;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
1
|
+
import { FC, ReactNode } from 'react';
|
|
2
|
+
import { ChaynsApiDevice, ChaynsApiSite, ChaynsApiUser, ChaynsReactFunctions, ChaynsReactValues, Page } from '../../types/IChaynsReact';
|
|
3
|
+
export type TypeSystem = {
|
|
4
|
+
scope: string;
|
|
5
|
+
url: string;
|
|
6
|
+
module: string;
|
|
7
|
+
};
|
|
8
|
+
type ModulePropTypes = {
|
|
9
|
+
system: TypeSystem;
|
|
10
|
+
functions: ChaynsReactFunctions;
|
|
11
|
+
pages: Page[];
|
|
12
|
+
isAdminModeActive: boolean;
|
|
13
|
+
site: ChaynsApiSite;
|
|
14
|
+
user: ChaynsApiUser | undefined;
|
|
15
|
+
currentPage: ChaynsReactValues["currentPage"];
|
|
16
|
+
device: ChaynsApiDevice;
|
|
17
|
+
language: ChaynsReactValues["language"];
|
|
18
|
+
parameters: ChaynsReactValues["parameters"];
|
|
19
|
+
customData: any;
|
|
20
|
+
environment: ChaynsReactValues["environment"];
|
|
21
|
+
preventStagingReplacement?: boolean;
|
|
22
|
+
dialog: ChaynsReactValues["dialog"];
|
|
23
|
+
children?: ReactNode;
|
|
24
|
+
};
|
|
25
|
+
declare const ModuleHost: FC<ModulePropTypes>;
|
|
26
|
+
export default ModuleHost;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export default function loadComponent(scope: any, module: any, url: any, skipCompatMode?: boolean): () => Promise<any>;
|
|
1
|
+
export default function loadComponent(scope: any, module: any, url: any, skipCompatMode?: boolean): () => Promise<any>;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export declare const semaphore: {};
|
|
2
|
-
declare const useDynamicScript: (args: {
|
|
3
|
-
url: string | undefined;
|
|
4
|
-
scope: string | undefined;
|
|
5
|
-
}) => {
|
|
6
|
-
ready: boolean;
|
|
7
|
-
failed: boolean;
|
|
8
|
-
};
|
|
9
|
-
export default useDynamicScript;
|
|
1
|
+
export declare const semaphore: {};
|
|
2
|
+
declare const useDynamicScript: (args: {
|
|
3
|
+
url: string | undefined;
|
|
4
|
+
scope: string | undefined;
|
|
5
|
+
}) => {
|
|
6
|
+
ready: boolean;
|
|
7
|
+
failed: boolean;
|
|
8
|
+
};
|
|
9
|
+
export default useDynamicScript;
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export { default as ChaynsProvider } from './components/ChaynsProvider';
|
|
2
|
-
export { default as getDeviceInfo, getScreenSize } from './util/deviceHelper';
|
|
3
|
-
export { default as ChaynsHost } from './host/ChaynsHost';
|
|
4
|
-
export { withCompatMode } from './components/withCompatMode';
|
|
5
|
-
export * from './calls';
|
|
6
|
-
export * from './hooks';
|
|
7
|
-
export * from './components/WaitUntil';
|
|
8
|
-
export * from './types/IChaynsReact';
|
|
9
|
-
export * from './components/withCompatMode';
|
|
10
|
-
export * as dialog from './calls/dialogs/index';
|
|
11
|
-
export * from './types/IChaynsReact';
|
|
12
|
-
declare const _default: {
|
|
13
|
-
buildEnv: string | undefined;
|
|
14
|
-
appVersion: string | undefined;
|
|
15
|
-
};
|
|
16
|
-
export default _default;
|
|
1
|
+
export { default as ChaynsProvider } from './components/ChaynsProvider';
|
|
2
|
+
export { default as getDeviceInfo, getScreenSize } from './util/deviceHelper';
|
|
3
|
+
export { default as ChaynsHost } from './host/ChaynsHost';
|
|
4
|
+
export { withCompatMode } from './components/withCompatMode';
|
|
5
|
+
export * from './calls';
|
|
6
|
+
export * from './hooks';
|
|
7
|
+
export * from './components/WaitUntil';
|
|
8
|
+
export * from './types/IChaynsReact';
|
|
9
|
+
export * from './components/withCompatMode';
|
|
10
|
+
export * as dialog from './calls/dialogs/index';
|
|
11
|
+
export * from './types/IChaynsReact';
|
|
12
|
+
declare const _default: {
|
|
13
|
+
buildEnv: string | undefined;
|
|
14
|
+
appVersion: string | undefined;
|
|
15
|
+
};
|
|
16
|
+
export default _default;
|