chayns-api 1.0.11 → 1.0.12
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.
|
@@ -52,7 +52,7 @@ const withCompatMode = Component => {
|
|
|
52
52
|
}
|
|
53
53
|
componentWillUnmount() {
|
|
54
54
|
if (this.root) {
|
|
55
|
-
this.root.
|
|
55
|
+
this.root.unmount();
|
|
56
56
|
} else {
|
|
57
57
|
_reactDom.default.render( /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null), this.ref.current);
|
|
58
58
|
}
|
|
@@ -45,7 +45,7 @@ export const withCompatMode = Component => {
|
|
|
45
45
|
}
|
|
46
46
|
componentWillUnmount() {
|
|
47
47
|
if (this.root) {
|
|
48
|
-
this.root.
|
|
48
|
+
this.root.unmount();
|
|
49
49
|
} else {
|
|
50
50
|
ReactDOM.render( /*#__PURE__*/React.createElement(React.Fragment, null), this.ref.current);
|
|
51
51
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChaynsApiDevice, ChaynsApiSite, UserInfo } from '../types/IChaynsReact';
|
|
1
|
+
import { ChaynsApiDevice, ChaynsApiSite, ChaynsReactFunctions, UserInfo } from '../types/IChaynsReact';
|
|
2
2
|
/**
|
|
3
3
|
* This adds a listener to determine your location.
|
|
4
4
|
* @category Event listener
|
|
@@ -170,7 +170,7 @@ export declare const setWaitCursor: (value: import("../types/IChaynsReact").Wait
|
|
|
170
170
|
/**
|
|
171
171
|
* Retrieves the value that is assigned to the key from a storage outside the frame
|
|
172
172
|
*/
|
|
173
|
-
export declare const storageGetItem: (key: string, accessMode?: import("../types/IChaynsReact").AccessMode | undefined) => Promise<
|
|
173
|
+
export declare const storageGetItem: <T extends string | number | object>(key: string, accessMode?: import("../types/IChaynsReact").AccessMode | undefined) => Promise<T | undefined>;
|
|
174
174
|
/**
|
|
175
175
|
* Removes the value that is assigned to the key from a storage outside the frame
|
|
176
176
|
*/
|
|
@@ -178,7 +178,7 @@ export declare const storageRemoveItem: (key: string, accessMode?: import("../ty
|
|
|
178
178
|
/**
|
|
179
179
|
* Sets the value that is assigned to the key from a storage outside the frame
|
|
180
180
|
*/
|
|
181
|
-
export declare const storageSetItem:
|
|
181
|
+
export declare const storageSetItem: ChaynsReactFunctions["storageSetItem"];
|
|
182
182
|
/**
|
|
183
183
|
* This method lets a smartphone vibrate for the given time.
|
|
184
184
|
*/
|
|
@@ -133,9 +133,9 @@ export interface ChaynsReactFunctions {
|
|
|
133
133
|
setScanQrCode: (value: ScanQrCodeRequest) => Promise<ScanQrCodeResult>;
|
|
134
134
|
setTempDesignSettings: (value: DesignSettings) => Promise<void>;
|
|
135
135
|
setWaitCursor: (value: WaitCursor) => Promise<void>;
|
|
136
|
-
storageGetItem: (key: string, accessMode?: AccessMode) => Promise<
|
|
136
|
+
storageGetItem: <T extends object | number | string>(key: string, accessMode?: AccessMode) => Promise<T | undefined>;
|
|
137
137
|
storageRemoveItem: (key: string, accessMode?: AccessMode) => Promise<void>;
|
|
138
|
-
storageSetItem: (key: string, value:
|
|
138
|
+
storageSetItem: <T extends object | number | string>(key: string, value: T, accessMode?: AccessMode, tappIds?: number[]) => Promise<void>;
|
|
139
139
|
vibrate: (value: Vibrate) => Promise<void>;
|
|
140
140
|
scrollByY: (position: number, duration?: number) => Promise<void>;
|
|
141
141
|
setOverlay: (value: ShowOverlay, callback: () => void) => Promise<void>;
|