chayns-api 2.4.0-beta.1 → 2.4.1

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.
@@ -576,12 +576,16 @@ class AppWrapper {
576
576
  return new _DialogHandler.default(config, this.functions.openDialog, this.functions.closeDialog, this.functions.dispatchEventToDialogClient, this.functions.addDialogClientEventListener);
577
577
  },
578
578
  openDialog: async (config, callback) => {
579
+ var _this$values$device;
579
580
  const currentDialogId = crypto.randomUUID();
580
581
  this.nextDialogEventId = 0;
581
- const isSupported = (0, _is.isAppCallSupported)({
582
+ let isSupported = (0, _is.isAppCallSupported)({
582
583
  minAndroidVersion: 7137,
583
584
  minIOSVersion: 6934
584
585
  });
586
+ if (((_this$values$device = this.values.device) === null || _this$values$device === void 0 || (_this$values$device = _this$values$device.app) === null || _this$values$device === void 0 ? void 0 : _this$values$device.name) === _IChaynsReact.AppName.Sidekick && this.values.device.os && ['iOS', 'Mac OS'].includes(this.values.device.os) && this.values.device.app.appVersion >= 2078) {
587
+ isSupported = true;
588
+ }
585
589
  this.appCall(184, {
586
590
  dialogContent: {
587
591
  apiVersion: 5,
@@ -7,7 +7,7 @@ import { sendMessageToGroup, sendMessageToPage, sendMessageToUser } from '../cal
7
7
  import { DeviceLanguage } from '../constants/languages';
8
8
  import DialogHandler from '../handler/DialogHandler';
9
9
  import { addApiListener, dispatchApiEvent, removeApiListener } from '../helper/apiListenerHelper';
10
- import { Environment, Font, Gender, IconType, RuntimeEnviroment, TappEvent } from '../types/IChaynsReact';
10
+ import { AppName, Environment, Font, Gender, IconType, RuntimeEnviroment, TappEvent } from '../types/IChaynsReact';
11
11
  import invokeAppCall from '../util/appCall';
12
12
  import { addAppStorageListener, clearAppStorage, isAppStorageAvailable, setAppStorageItem } from '../util/appStorage';
13
13
  import getDeviceInfo, { getScreenSize } from '../util/deviceHelper';
@@ -540,12 +540,16 @@ export class AppWrapper {
540
540
  return new DialogHandler(config, this.functions.openDialog, this.functions.closeDialog, this.functions.dispatchEventToDialogClient, this.functions.addDialogClientEventListener);
541
541
  },
542
542
  openDialog: async (config, callback) => {
543
+ var _this$values$device;
543
544
  const currentDialogId = crypto.randomUUID();
544
545
  this.nextDialogEventId = 0;
545
- const isSupported = isAppCallSupported({
546
+ let isSupported = isAppCallSupported({
546
547
  minAndroidVersion: 7137,
547
548
  minIOSVersion: 6934
548
549
  });
550
+ if (((_this$values$device = this.values.device) === null || _this$values$device === void 0 || (_this$values$device = _this$values$device.app) === null || _this$values$device === void 0 ? void 0 : _this$values$device.name) === AppName.Sidekick && this.values.device.os && ['iOS', 'Mac OS'].includes(this.values.device.os) && this.values.device.app.appVersion >= 2078) {
551
+ isSupported = true;
552
+ }
549
553
  this.appCall(184, {
550
554
  dialogContent: {
551
555
  apiVersion: 5,
@@ -840,6 +840,9 @@ export interface Page {
840
840
  siteId: string;
841
841
  uacGroups: UacGroup[];
842
842
  url: string;
843
+ viewMode: number;
844
+ originalTappId?: number;
845
+ apiVersion?: number;
843
846
  }
844
847
  export declare enum Gender {
845
848
  Unknown = 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chayns-api",
3
- "version": "2.4.0-beta.1",
3
+ "version": "2.4.1",
4
4
  "description": "new chayns api",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",