chayns-api 2.6.16 → 2.6.18

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.
@@ -42,9 +42,9 @@ const ChaynsProvider = ({
42
42
  isModule,
43
43
  chaynsApiId
44
44
  }) => {
45
- var _ref, _crypto, _customWrapper$curren, _customWrapper$curren2;
45
+ var _ref, _crypto, _crypto$randomUUID, _customWrapper$curren, _customWrapper$curren2;
46
46
  const customWrapper = (0, _react.useRef)(null);
47
- const idRef = (0, _react.useRef)((_ref = chaynsApiId !== null && chaynsApiId !== void 0 ? chaynsApiId : (_crypto = crypto) === null || _crypto === void 0 ? void 0 : _crypto.randomUUID()) !== null && _ref !== void 0 ? _ref : Math.random().toString());
47
+ 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());
48
48
  if (!customWrapper.current) {
49
49
  if (isModule) {
50
50
  if (data && functions) {
@@ -93,7 +93,7 @@ class AppWrapper {
93
93
  runtimeEnvironment: _IChaynsReact.RuntimeEnviroment.App
94
94
  },
95
95
  language: {
96
- site: language,
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,
@@ -34,9 +34,9 @@ const ChaynsProvider = ({
34
34
  isModule,
35
35
  chaynsApiId
36
36
  }) => {
37
- var _ref, _crypto, _customWrapper$curren, _customWrapper$curren2;
37
+ var _ref, _crypto, _crypto$randomUUID, _customWrapper$curren, _customWrapper$curren2;
38
38
  const customWrapper = useRef(null);
39
- const idRef = useRef((_ref = chaynsApiId !== null && chaynsApiId !== void 0 ? chaynsApiId : (_crypto = crypto) === null || _crypto === void 0 ? void 0 : _crypto.randomUUID()) !== null && _ref !== void 0 ? _ref : Math.random().toString());
39
+ 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());
40
40
  if (!customWrapper.current) {
41
41
  if (isModule) {
42
42
  if (data && functions) {
@@ -83,7 +83,7 @@ export class AppWrapper {
83
83
  runtimeEnvironment: RuntimeEnviroment.App
84
84
  },
85
85
  language: {
86
- site: language,
86
+ site: AppInfo.Language || 'de',
87
87
  translation: null,
88
88
  device: language,
89
89
  active: language
@@ -585,8 +585,8 @@ export class AppWrapper {
585
585
  return new DialogHandler(config, this.functions.openDialog, this.functions.closeDialog, this.functions.dispatchEventToDialogClient, this.functions.addDialogClientEventListener);
586
586
  },
587
587
  openDialog: async (config, callback) => {
588
- var _this$values$device;
589
- const currentDialogId = crypto.randomUUID();
588
+ var _crypto$randomUUID, _crypto, _crypto$randomUUID2, _this$values$device;
589
+ 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)}`;
590
590
  this.nextDialogEventId = 0;
591
591
  let isSupported = isAppCallSupported({
592
592
  minAndroidVersion: 7137,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chayns-api",
3
- "version": "2.6.16",
3
+ "version": "2.6.18",
4
4
  "description": "new chayns api",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",