chayns-api 3.0.1 → 3.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.
@@ -2,6 +2,8 @@ name: Deploy Docs to GitHub Pages
2
2
 
3
3
  on:
4
4
  push:
5
+ branches:
6
+ - main
5
7
  paths:
6
8
  - "website/**"
7
9
  workflow_dispatch:
@@ -69,9 +69,9 @@ const ChaynsProvider = ({
69
69
  isModule,
70
70
  chaynsApiId
71
71
  }) => {
72
- var _ref, _crypto, _customWrapper$curren, _customWrapper$curren2;
72
+ var _ref, _crypto, _crypto$randomUUID, _customWrapper$curren, _customWrapper$curren2;
73
73
  const customWrapper = (0, _react.useRef)(null);
74
- 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());
74
+ 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());
75
75
  if (!customWrapper.current) {
76
76
  if (isModule) {
77
77
  if (data && functions) {
@@ -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,
@@ -61,9 +61,9 @@ const ChaynsProvider = ({
61
61
  isModule,
62
62
  chaynsApiId
63
63
  }) => {
64
- var _ref, _crypto, _customWrapper$curren, _customWrapper$curren2;
64
+ var _ref, _crypto, _crypto$randomUUID, _customWrapper$curren, _customWrapper$curren2;
65
65
  const customWrapper = useRef(null);
66
- 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());
66
+ 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());
67
67
  if (!customWrapper.current) {
68
68
  if (isModule) {
69
69
  if (data && functions) {
@@ -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.0.1",
3
+ "version": "3.0.2",
4
4
  "description": "new chayns api",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",