chayns-api 2.1.8 → 2.1.9
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/dist/cjs/wrapper/AppWrapper.js +2 -2
- package/dist/esm/wrapper/AppWrapper.js +2 -2
- package/dist/types/calls/index.d.ts +9 -9
- package/dist/types/components/ChaynsContext.d.ts +0 -1
- package/dist/types/components/withCompatMode.d.ts +1 -2
- package/dist/types/hooks/useCustomFunction.d.ts +1 -1
- package/dist/types/hooks/useParameters.d.ts +1 -1
- package/dist/types/types/IChaynsReact.d.ts +1 -1
- package/dist/types/util/deviceHelper.d.ts +1 -1
- package/dist/types/wrapper/AppWrapper.d.ts +0 -1
- package/package.json +16 -23
|
@@ -24,7 +24,7 @@ class AppWrapper {
|
|
|
24
24
|
listeners = [];
|
|
25
25
|
customFunctions = {};
|
|
26
26
|
mapOldApiToNew(retVal) {
|
|
27
|
-
var _window,
|
|
27
|
+
var _window, _window2, _AppInfo$TappSelected;
|
|
28
28
|
const {
|
|
29
29
|
AppInfo,
|
|
30
30
|
AppUser,
|
|
@@ -90,7 +90,7 @@ class AppWrapper {
|
|
|
90
90
|
docked: false
|
|
91
91
|
},
|
|
92
92
|
title: AppInfo.Title,
|
|
93
|
-
colorMode:
|
|
93
|
+
colorMode: colorMode !== null && colorMode !== void 0 ? colorMode : AppInfo.colorMode,
|
|
94
94
|
color,
|
|
95
95
|
domain: AppInfo.domain,
|
|
96
96
|
font: {
|
|
@@ -14,7 +14,7 @@ import { isAppCallSupported } from '../util/is';
|
|
|
14
14
|
let appWrapperDialogId = 0;
|
|
15
15
|
export class AppWrapper {
|
|
16
16
|
mapOldApiToNew(retVal) {
|
|
17
|
-
var _window,
|
|
17
|
+
var _window, _window2, _AppInfo$TappSelected;
|
|
18
18
|
const {
|
|
19
19
|
AppInfo,
|
|
20
20
|
AppUser,
|
|
@@ -80,7 +80,7 @@ export class AppWrapper {
|
|
|
80
80
|
docked: false
|
|
81
81
|
},
|
|
82
82
|
title: AppInfo.Title,
|
|
83
|
-
colorMode:
|
|
83
|
+
colorMode: colorMode !== null && colorMode !== void 0 ? colorMode : AppInfo.colorMode,
|
|
84
84
|
color,
|
|
85
85
|
domain: AppInfo.domain,
|
|
86
86
|
font: {
|
|
@@ -4,15 +4,15 @@ import { ChaynsApiDevice, ChaynsApiSite, ChaynsReactFunctions, UserInfo } from '
|
|
|
4
4
|
* @category Event listener
|
|
5
5
|
*/
|
|
6
6
|
export declare const addGeoLocationListener: (value: {
|
|
7
|
-
timeout?: number
|
|
8
|
-
silent?: boolean
|
|
7
|
+
timeout?: number;
|
|
8
|
+
silent?: boolean;
|
|
9
9
|
}, callback: (geoLocation: import("../types/IChaynsReact").GeoLocation) => void) => Promise<number>;
|
|
10
10
|
/**
|
|
11
11
|
* Adds a listener for scroll event by user.
|
|
12
12
|
* @category Event listener
|
|
13
13
|
*/
|
|
14
14
|
export declare const addScrollListener: (value: {
|
|
15
|
-
throttle?: number
|
|
15
|
+
throttle?: number;
|
|
16
16
|
}, callback: (result: import("../types/IChaynsReact").ScrollListenerResult) => void) => Promise<number>;
|
|
17
17
|
/**
|
|
18
18
|
* This method will be executed when the page gets displayed or hidden.
|
|
@@ -45,8 +45,8 @@ export declare const getAvailableSharingServices: () => Promise<import("../types
|
|
|
45
45
|
* This method determines your location. If you want to track a route, use addGeoLocationListener.
|
|
46
46
|
*/
|
|
47
47
|
export declare const getGeoLocation: (value: {
|
|
48
|
-
timeout?: number
|
|
49
|
-
silent?: boolean
|
|
48
|
+
timeout?: number;
|
|
49
|
+
silent?: boolean;
|
|
50
50
|
}) => Promise<import("../types/IChaynsReact").GeoLocation>;
|
|
51
51
|
/**
|
|
52
52
|
* This method returns user information for a specific user.
|
|
@@ -185,7 +185,7 @@ export declare const setWaitCursor: (value: import("../types/IChaynsReact").Wait
|
|
|
185
185
|
/**
|
|
186
186
|
* Retrieves the value that is assigned to the key from a storage outside the frame
|
|
187
187
|
*/
|
|
188
|
-
export declare const storageGetItem: <T extends
|
|
188
|
+
export declare const storageGetItem: <T extends object | number | string>(key: string, accessMode?: import("../types/IChaynsReact").AccessMode | undefined) => Promise<T | undefined>;
|
|
189
189
|
/**
|
|
190
190
|
* Removes the value that is assigned to the key from a storage outside the frame
|
|
191
191
|
*/
|
|
@@ -234,13 +234,13 @@ export declare const getParameters: () => {
|
|
|
234
234
|
export declare const getPages: () => import("../types/IChaynsReact").Page[];
|
|
235
235
|
export declare const getEnvironment: () => {
|
|
236
236
|
buildEnvironment: import("../types/IChaynsReact").Environment;
|
|
237
|
-
runtimeEnvironment:
|
|
237
|
+
runtimeEnvironment: import("../types/IChaynsReact").RuntimeEnviroment | string;
|
|
238
238
|
};
|
|
239
239
|
/**
|
|
240
240
|
* Returns the customFunction. Prefer usage via useCustomFunction when possible
|
|
241
241
|
* @param key functionName
|
|
242
242
|
*/
|
|
243
|
-
export declare const getCustomFunction: <A extends any
|
|
243
|
+
export declare const getCustomFunction: <A extends Array<any>, T>(key: string) => (...args: A) => Promise<T>;
|
|
244
244
|
export declare const user: UserInfo;
|
|
245
245
|
export declare const site: ChaynsApiSite;
|
|
246
246
|
export declare const device: ChaynsApiDevice;
|
|
@@ -257,5 +257,5 @@ export declare const parameters: {
|
|
|
257
257
|
export declare const pages: import("../types/IChaynsReact").Page[];
|
|
258
258
|
export declare const environment: {
|
|
259
259
|
buildEnvironment: import("../types/IChaynsReact").Environment;
|
|
260
|
-
runtimeEnvironment:
|
|
260
|
+
runtimeEnvironment: import("../types/IChaynsReact").RuntimeEnviroment | string;
|
|
261
261
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import React, { RefObject } from 'react';
|
|
3
2
|
type Props = {
|
|
4
3
|
innerRef?: RefObject<unknown>;
|
|
@@ -9,7 +8,7 @@ export declare const withCompatMode: <P extends Props>(Component: React.Componen
|
|
|
9
8
|
new (props: P): {
|
|
10
9
|
ref: RefObject<HTMLDivElement>;
|
|
11
10
|
root: any;
|
|
12
|
-
timeout?:
|
|
11
|
+
timeout?: ReturnType<typeof setTimeout>;
|
|
13
12
|
componentDidMount(): void;
|
|
14
13
|
componentDidUpdate(): void;
|
|
15
14
|
componentWillUnmount(): void;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChaynsApiDevice, ScreenSize } from '../types/IChaynsReact';
|
|
2
2
|
declare const getDeviceInfo: (userAgent: string, acceptHeader: string, { imei }?: {
|
|
3
|
-
imei?: string
|
|
3
|
+
imei?: string;
|
|
4
4
|
}) => ChaynsApiDevice;
|
|
5
5
|
export declare const getClientDeviceInfo: () => {
|
|
6
6
|
isTouch: boolean;
|
|
@@ -9,7 +9,6 @@ export declare class AppWrapper implements IChaynsReact {
|
|
|
9
9
|
notImplemented(call: string): void;
|
|
10
10
|
counter: number;
|
|
11
11
|
appCall(action: any, value?: unknown, { callback, awaitResult }?: {
|
|
12
|
-
callback: any;
|
|
13
12
|
awaitResult?: boolean | undefined;
|
|
14
13
|
}): Promise<unknown> | undefined;
|
|
15
14
|
functions: ChaynsReactFunctions;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chayns-api",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.9",
|
|
4
4
|
"description": "new chayns api",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"format": "prettier . --write",
|
|
33
33
|
"lint": "eslint src",
|
|
34
34
|
"prepublishOnly": "npm run build:cjs && npm run build:esm && npm run build:typescript",
|
|
35
|
-
"preversion": "npm run build:typescript -- --noEmit
|
|
35
|
+
"preversion": "npm run build:typescript -- --noEmit"
|
|
36
36
|
},
|
|
37
37
|
"prettier": {
|
|
38
38
|
"proseWrap": "always",
|
|
@@ -43,43 +43,36 @@
|
|
|
43
43
|
"extends": "@chayns-toolkit"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@module-federation/enhanced": "^0.
|
|
47
|
-
"@module-federation/runtime": "^0.6.9",
|
|
48
|
-
"@types/semver": "^7.5.8",
|
|
46
|
+
"@module-federation/enhanced": "^0.8.9",
|
|
49
47
|
"comlink": "4.3.1",
|
|
50
48
|
"htmlescape": "^1.1.1",
|
|
51
49
|
"lodash.throttle": "^4.1.1",
|
|
52
|
-
"
|
|
53
|
-
"
|
|
54
|
-
"semaphore-async-await": "^1.5.1",
|
|
55
|
-
"ua-parser-js": "^1.0.38",
|
|
56
|
-
"use-sync-external-store": "^1.4.0",
|
|
57
|
-
"util": "^0.12.5"
|
|
50
|
+
"ua-parser-js": "^1.0.40",
|
|
51
|
+
"use-sync-external-store": "^1.4.0"
|
|
58
52
|
},
|
|
59
53
|
"devDependencies": {
|
|
60
|
-
"@babel/cli": "^7.
|
|
61
|
-
"@babel/core": "^7.
|
|
62
|
-
"@babel/preset-env": "^7.
|
|
63
|
-
"@babel/preset-react": "^7.
|
|
64
|
-
"@babel/preset-typescript": "^7.
|
|
54
|
+
"@babel/cli": "^7.26.4",
|
|
55
|
+
"@babel/core": "^7.26.0",
|
|
56
|
+
"@babel/preset-env": "^7.26.0",
|
|
57
|
+
"@babel/preset-react": "^7.26.3",
|
|
58
|
+
"@babel/preset-typescript": "^7.26.0",
|
|
65
59
|
"@chayns-toolkit/eslint-config": "^2.0.0",
|
|
66
|
-
"@testing-library/react": "^16.0.1",
|
|
67
60
|
"@types/htmlescape": "^1.1.3",
|
|
68
61
|
"@types/lodash.throttle": "^4.1.9",
|
|
69
62
|
"@types/prop-types": "^15.7.12",
|
|
70
63
|
"@types/react": "^18.2.78",
|
|
71
64
|
"@types/react-dom": "^18.2.25",
|
|
72
65
|
"@types/ua-parser-js": "^0.7.39",
|
|
66
|
+
"@types/use-sync-external-store": "^0.0.6",
|
|
73
67
|
"@typescript-eslint/parser": "^7.6.0",
|
|
74
|
-
"chayns-toolkit": "^2.0.
|
|
75
|
-
"concurrently": "^
|
|
68
|
+
"chayns-toolkit": "^2.0.13",
|
|
69
|
+
"concurrently": "^9.1.2",
|
|
76
70
|
"cross-env": "^7.0.3",
|
|
77
|
-
"
|
|
78
|
-
"prettier": "^
|
|
79
|
-
"prettier-plugin-packagejson": "^2.5.0",
|
|
71
|
+
"prettier": "^3.4.2",
|
|
72
|
+
"prettier-plugin-packagejson": "^2.5.8",
|
|
80
73
|
"react": "^18.3.1",
|
|
81
74
|
"react-dom": "^18.3.1",
|
|
82
|
-
"typescript": "^
|
|
75
|
+
"typescript": "^5.7.3"
|
|
83
76
|
},
|
|
84
77
|
"peerDependencies": {
|
|
85
78
|
"react": "^16.8 || ^17.0.1 || ^18.0.0 || ^19.0.0",
|