chayns-api 3.1.0-beta.2 → 3.1.0
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.
|
@@ -75,9 +75,9 @@ const ChaynsProvider = ({
|
|
|
75
75
|
isHistoryDisabled,
|
|
76
76
|
segmentCount
|
|
77
77
|
}) => {
|
|
78
|
-
var _ref, _crypto, _customWrapper$curren, _customWrapper$curren3, _customWrapper$curren4;
|
|
78
|
+
var _ref, _crypto, _crypto$randomUUID, _customWrapper$curren, _customWrapper$curren3, _customWrapper$curren4;
|
|
79
79
|
const customWrapper = (0, _react.useRef)(null);
|
|
80
|
-
const idRef = (0, _react.useRef)((_ref = chaynsApiId !== null && chaynsApiId !== void 0 ? chaynsApiId : (_crypto = crypto) === null || _crypto === void 0 ? void 0 : _crypto.
|
|
80
|
+
const idRef = (0, _react.useRef)((_ref = chaynsApiId !== null && chaynsApiId !== void 0 ? chaynsApiId : (_crypto = crypto) === null || _crypto === void 0 || (_crypto$randomUUID = _crypto.randomUUID) === null || _crypto$randomUUID === void 0 ? void 0 : _crypto$randomUUID.call(_crypto)) !== null && _ref !== void 0 ? _ref : Math.random().toString());
|
|
81
81
|
const contextLayer = (0, _HistoryLayerContext.useChaynsHistoryLayerContext)();
|
|
82
82
|
const parentLayerRef = (0, _react.useRef)(contextLayer);
|
|
83
83
|
const rootLayerRef = (0, _react.useRef)(null);
|
|
@@ -93,7 +93,7 @@ class AppWrapper {
|
|
|
93
93
|
runtimeEnvironment: _IChaynsReact.RuntimeEnviroment.App
|
|
94
94
|
},
|
|
95
95
|
language: {
|
|
96
|
-
site:
|
|
96
|
+
site: AppInfo.Language || 'de',
|
|
97
97
|
translation: null,
|
|
98
98
|
device: language,
|
|
99
99
|
active: language
|
|
@@ -623,8 +623,8 @@ class AppWrapper {
|
|
|
623
623
|
return new _DialogHandler.default(config, this.functions.openDialog, this.functions.closeDialog, this.functions.dispatchEventToDialogClient, this.functions.addDialogClientEventListener);
|
|
624
624
|
},
|
|
625
625
|
openDialog: async (config, callback) => {
|
|
626
|
-
var _this$values$device;
|
|
627
|
-
const currentDialogId = crypto.randomUUID()
|
|
626
|
+
var _crypto$randomUUID, _crypto, _crypto$randomUUID2, _this$values$device;
|
|
627
|
+
const currentDialogId = (_crypto$randomUUID = (_crypto = crypto) === null || _crypto === void 0 || (_crypto$randomUUID2 = _crypto.randomUUID) === null || _crypto$randomUUID2 === void 0 ? void 0 : _crypto$randomUUID2.call(_crypto)) !== null && _crypto$randomUUID !== void 0 ? _crypto$randomUUID : `${Date.now()}-${Math.floor(Math.random() * Number.MAX_SAFE_INTEGER)}`;
|
|
628
628
|
this.nextDialogEventId = 0;
|
|
629
629
|
let isSupported = (0, _is.isAppCallSupported)({
|
|
630
630
|
minAndroidVersion: 7137,
|
|
@@ -67,9 +67,9 @@ const ChaynsProvider = ({
|
|
|
67
67
|
isHistoryDisabled,
|
|
68
68
|
segmentCount
|
|
69
69
|
}) => {
|
|
70
|
-
var _ref, _crypto, _customWrapper$curren, _customWrapper$curren3, _customWrapper$curren4;
|
|
70
|
+
var _ref, _crypto, _crypto$randomUUID, _customWrapper$curren, _customWrapper$curren3, _customWrapper$curren4;
|
|
71
71
|
const customWrapper = useRef(null);
|
|
72
|
-
const idRef = useRef((_ref = chaynsApiId !== null && chaynsApiId !== void 0 ? chaynsApiId : (_crypto = crypto) === null || _crypto === void 0 ? void 0 : _crypto.
|
|
72
|
+
const idRef = useRef((_ref = chaynsApiId !== null && chaynsApiId !== void 0 ? chaynsApiId : (_crypto = crypto) === null || _crypto === void 0 || (_crypto$randomUUID = _crypto.randomUUID) === null || _crypto$randomUUID === void 0 ? void 0 : _crypto$randomUUID.call(_crypto)) !== null && _ref !== void 0 ? _ref : Math.random().toString());
|
|
73
73
|
const contextLayer = useChaynsHistoryLayerContext();
|
|
74
74
|
const parentLayerRef = useRef(contextLayer);
|
|
75
75
|
const rootLayerRef = useRef(null);
|
|
@@ -83,7 +83,7 @@ export class AppWrapper {
|
|
|
83
83
|
runtimeEnvironment: RuntimeEnviroment.App
|
|
84
84
|
},
|
|
85
85
|
language: {
|
|
86
|
-
site:
|
|
86
|
+
site: AppInfo.Language || 'de',
|
|
87
87
|
translation: null,
|
|
88
88
|
device: language,
|
|
89
89
|
active: language
|
|
@@ -586,8 +586,8 @@ export class AppWrapper {
|
|
|
586
586
|
return new DialogHandler(config, this.functions.openDialog, this.functions.closeDialog, this.functions.dispatchEventToDialogClient, this.functions.addDialogClientEventListener);
|
|
587
587
|
},
|
|
588
588
|
openDialog: async (config, callback) => {
|
|
589
|
-
var _this$values$device;
|
|
590
|
-
const currentDialogId = crypto.randomUUID()
|
|
589
|
+
var _crypto$randomUUID, _crypto, _crypto$randomUUID2, _this$values$device;
|
|
590
|
+
const currentDialogId = (_crypto$randomUUID = (_crypto = crypto) === null || _crypto === void 0 || (_crypto$randomUUID2 = _crypto.randomUUID) === null || _crypto$randomUUID2 === void 0 ? void 0 : _crypto$randomUUID2.call(_crypto)) !== null && _crypto$randomUUID !== void 0 ? _crypto$randomUUID : `${Date.now()}-${Math.floor(Math.random() * Number.MAX_SAFE_INTEGER)}`;
|
|
591
591
|
this.nextDialogEventId = 0;
|
|
592
592
|
let isSupported = isAppCallSupported({
|
|
593
593
|
minAndroidVersion: 7137,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chayns-api",
|
|
3
|
-
"version": "3.1.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "new chayns api",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"@types/react-dom": "^18.3.7",
|
|
72
72
|
"@types/ua-parser-js": "^0.7.39",
|
|
73
73
|
"babel-plugin-react-compiler": "^1.0.0",
|
|
74
|
-
"chayns-toolkit": "^4.0.
|
|
74
|
+
"chayns-toolkit": "^4.0.7",
|
|
75
75
|
"concurrently": "^9.2.1",
|
|
76
76
|
"cross-env": "^10.1.0",
|
|
77
77
|
"jsdom": "^29.1.1",
|