chayns-api 2.4.24 → 2.4.26
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.
|
@@ -248,7 +248,7 @@ class AppWrapper {
|
|
|
248
248
|
this.appCall(60, {}, {
|
|
249
249
|
callback: v => {
|
|
250
250
|
(0, _apiListenerHelper.dispatchApiEvent)('visibilityChangeListener', {
|
|
251
|
-
isVisible: v.tappEvent
|
|
251
|
+
isVisible: v.tappEvent !== _IChaynsReact.TappEvent.OnHide,
|
|
252
252
|
tappEvent: v.tappEvent
|
|
253
253
|
});
|
|
254
254
|
}
|
|
@@ -621,6 +621,14 @@ class AppWrapper {
|
|
|
621
621
|
}, {
|
|
622
622
|
awaitResult: true
|
|
623
623
|
}).then(result => {
|
|
624
|
+
if (config.type === _IChaynsReact.DialogType.DATE) {
|
|
625
|
+
const dialogResult = result.result;
|
|
626
|
+
if (typeof dialogResult === 'string') {
|
|
627
|
+
result.result = new Date(dialogResult);
|
|
628
|
+
} else if (Array.isArray(dialogResult)) {
|
|
629
|
+
result.result = dialogResult.map(date => new Date(date));
|
|
630
|
+
}
|
|
631
|
+
}
|
|
624
632
|
callback(result);
|
|
625
633
|
});
|
|
626
634
|
return currentDialogId;
|
|
@@ -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 { AppName, DialogButtonType, Environment, Font, Gender, IconType, LoginState, RuntimeEnviroment, TappEvent } from '../types/IChaynsReact';
|
|
10
|
+
import { AppName, DialogButtonType, DialogType, Environment, Font, Gender, IconType, LoginState, 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';
|
|
@@ -210,7 +210,7 @@ export class AppWrapper {
|
|
|
210
210
|
this.appCall(60, {}, {
|
|
211
211
|
callback: v => {
|
|
212
212
|
dispatchApiEvent('visibilityChangeListener', {
|
|
213
|
-
isVisible: v.tappEvent
|
|
213
|
+
isVisible: v.tappEvent !== TappEvent.OnHide,
|
|
214
214
|
tappEvent: v.tappEvent
|
|
215
215
|
});
|
|
216
216
|
}
|
|
@@ -588,6 +588,14 @@ export class AppWrapper {
|
|
|
588
588
|
}, {
|
|
589
589
|
awaitResult: true
|
|
590
590
|
}).then(result => {
|
|
591
|
+
if (config.type === DialogType.DATE) {
|
|
592
|
+
const dialogResult = result.result;
|
|
593
|
+
if (typeof dialogResult === 'string') {
|
|
594
|
+
result.result = new Date(dialogResult);
|
|
595
|
+
} else if (Array.isArray(dialogResult)) {
|
|
596
|
+
result.result = dialogResult.map(date => new Date(date));
|
|
597
|
+
}
|
|
598
|
+
}
|
|
591
599
|
callback(result);
|
|
592
600
|
});
|
|
593
601
|
return currentDialogId;
|