chayns-api 2.4.0-beta.0 → 2.4.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.
@@ -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,
@@ -99,6 +99,7 @@ export interface DialogModule<T = object> {
99
99
  allowAnonymousUser?: boolean;
100
100
  seamless?: boolean;
101
101
  height?: string | number;
102
+ minHeight?: string | number;
102
103
  }
103
104
  export interface DialogIFrame<T = object> {
104
105
  type: DialogType.IFRAME;
@@ -108,6 +109,7 @@ export interface DialogIFrame<T = object> {
108
109
  allowAnonymousUser?: boolean;
109
110
  seamless?: boolean;
110
111
  height?: string | number;
112
+ minHeight?: string | number;
111
113
  }
112
114
  export declare enum DialogInputType {
113
115
  NUMBER = "number",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chayns-api",
3
- "version": "2.4.0-beta.0",
3
+ "version": "2.4.0",
4
4
  "description": "new chayns api",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",