chayns-api 1.0.36 → 1.0.37
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.
- package/dist/cjs/calls/index.js +7 -2
- package/dist/cjs/types/IChaynsReact.js +8 -2
- package/dist/cjs/wrapper/FrameWrapper.js +4 -0
- package/dist/esm/calls/index.js +6 -0
- package/dist/esm/types/IChaynsReact.js +5 -0
- package/dist/esm/wrapper/FrameWrapper.js +4 -0
- package/dist/types/calls/index.d.ts +4 -0
- package/dist/types/types/IChaynsReact.d.ts +17 -1
- package/package.json +1 -1
package/dist/cjs/calls/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.vibrate = exports.user = exports.storageSetItem = exports.storageRemoveItem = exports.storageGetItem = exports.site = exports.setWaitCursor = exports.setTempDesignSettings = exports.setScanQrCode = exports.setRefreshScrollEnabled = exports.setOverlay = exports.setHeight = exports.setFloatingButton = exports.setDisplayTimeout = exports.setAdminMode = exports.sendMessageToUser = exports.sendMessageToPage = exports.sendMessageToGroup = exports.selectPage = exports.scrollToY = exports.scrollByY = exports.removeWindowMetricsListener = exports.removeVisibilityChangeListener = exports.removeScrollListener = exports.removeGeoLocationListener = exports.refreshData = exports.refreshAccessToken = exports.parameters = exports.pages = exports.openVideo = exports.openUrl = exports.openImage = exports.navigateBack = exports.logout = exports.login = exports.language = exports.invokeDialogCall = exports.invokeCall = exports.getWindowMetrics = exports.getUserInfo = exports.getUser = exports.getSite = exports.getScrollPosition = exports.getParameters = exports.getPages = exports.getLanguage = exports.getGeoLocation = exports.getEnvironment = exports.getDevice = exports.getCurrentPage = exports.getAvailableSharingServices = exports.getAccessToken = exports.environment = exports.device = exports.customCallbackFunction = exports.createDialog = exports.addWindowMetricsListener = exports.addVisibilityChangeListener = exports.addScrollListener = exports.addGeoLocationListener = void 0;
|
|
6
|
+
exports.vibrate = exports.user = exports.storageSetItem = exports.storageRemoveItem = exports.storageGetItem = exports.site = exports.setWaitCursor = exports.setTempDesignSettings = exports.setScanQrCode = exports.setRefreshScrollEnabled = exports.setOverlay = exports.setHeight = exports.setFloatingButton = exports.setDisplayTimeout = exports.setAdminMode = exports.sendMessageToUser = exports.sendMessageToPage = exports.sendMessageToGroup = exports.selectPage = exports.scrollToY = exports.scrollByY = exports.removeWindowMetricsListener = exports.removeVisibilityChangeListener = exports.removeScrollListener = exports.removeGeoLocationListener = exports.refreshData = exports.refreshAccessToken = exports.parameters = exports.pages = exports.openVideo = exports.openUrl = exports.openMedia = exports.openImage = exports.navigateBack = exports.logout = exports.login = exports.language = exports.invokeDialogCall = exports.invokeCall = exports.getWindowMetrics = exports.getUserInfo = exports.getUser = exports.getSite = exports.getScrollPosition = exports.getParameters = exports.getPages = exports.getLanguage = exports.getGeoLocation = exports.getEnvironment = exports.getDevice = exports.getCurrentPage = exports.getAvailableSharingServices = exports.getAccessToken = exports.environment = exports.device = exports.customCallbackFunction = exports.createDialog = exports.addWindowMetricsListener = exports.addVisibilityChangeListener = exports.addScrollListener = exports.addGeoLocationListener = void 0;
|
|
7
7
|
var _moduleWrapper = require("../components/moduleWrapper");
|
|
8
8
|
/**
|
|
9
9
|
* This adds a listener to determine your location.
|
|
@@ -90,9 +90,14 @@ const navigateBack = (...args) => _moduleWrapper.moduleWrapper.current.functions
|
|
|
90
90
|
exports.navigateBack = navigateBack;
|
|
91
91
|
const openImage = (...args) => _moduleWrapper.moduleWrapper.current.functions.openImage(...args);
|
|
92
92
|
/**
|
|
93
|
-
*
|
|
93
|
+
* The images and videos specified in the items array is shown in gallery mode.
|
|
94
94
|
*/
|
|
95
95
|
exports.openImage = openImage;
|
|
96
|
+
const openMedia = (...args) => _moduleWrapper.moduleWrapper.current.functions.openMedia(...args);
|
|
97
|
+
/**
|
|
98
|
+
* Opens an URL in the chayns environment.
|
|
99
|
+
*/
|
|
100
|
+
exports.openMedia = openMedia;
|
|
96
101
|
const openUrl = (...args) => _moduleWrapper.moduleWrapper.current.functions.openUrl(...args);
|
|
97
102
|
/**
|
|
98
103
|
* The video specified in the URL is shown in video mode.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.ToastType = exports.TappEvent = exports.SharingApp = exports.ScreenSize = exports.ScanQrCodeCodeType = exports.ScanQrCodeCameraTypes = exports.RuntimeEnviroment = exports.Language = exports.IconType = exports.Gender = exports.Font = exports.FloatingButtonPosition = exports.Environment = exports.DialogType = exports.DialogSelectType = exports.DialogInputType = exports.DialogButtonType = exports.DeviceOs = exports.DateType = exports.ColorMode = exports.BrowserName = exports.AppName = exports.AccessMode = void 0;
|
|
6
|
+
exports.ToastType = exports.TappEvent = exports.SharingApp = exports.ScreenSize = exports.ScanQrCodeCodeType = exports.ScanQrCodeCameraTypes = exports.RuntimeEnviroment = exports.MediaType = exports.Language = exports.IconType = exports.Gender = exports.Font = exports.FloatingButtonPosition = exports.Environment = exports.DialogType = exports.DialogSelectType = exports.DialogInputType = exports.DialogButtonType = exports.DeviceOs = exports.DateType = exports.ColorMode = exports.BrowserName = exports.AppName = exports.AccessMode = void 0;
|
|
7
7
|
let DateType = /*#__PURE__*/function (DateType) {
|
|
8
8
|
DateType[DateType["DATE"] = 0] = "DATE";
|
|
9
9
|
DateType[DateType["TIME"] = 1] = "TIME";
|
|
@@ -314,4 +314,10 @@ let DialogType = /*#__PURE__*/function (DialogType) {
|
|
|
314
314
|
DialogType["TOAST"] = "toast";
|
|
315
315
|
return DialogType;
|
|
316
316
|
}({});
|
|
317
|
-
exports.DialogType = DialogType;
|
|
317
|
+
exports.DialogType = DialogType;
|
|
318
|
+
let MediaType = /*#__PURE__*/function (MediaType) {
|
|
319
|
+
MediaType["IMAGE"] = "image";
|
|
320
|
+
MediaType["VIDEO"] = "video";
|
|
321
|
+
return MediaType;
|
|
322
|
+
}({});
|
|
323
|
+
exports.MediaType = MediaType;
|
|
@@ -105,6 +105,10 @@ class FrameWrapper {
|
|
|
105
105
|
if (!this.initialized) await this.ready;
|
|
106
106
|
return this.exposedFunctions.openImage(value);
|
|
107
107
|
},
|
|
108
|
+
openMedia: async value => {
|
|
109
|
+
if (!this.initialized) await this.ready;
|
|
110
|
+
return this.exposedFunctions.openMedia(value);
|
|
111
|
+
},
|
|
108
112
|
openUrl: async value => {
|
|
109
113
|
if (!this.initialized) await this.ready;
|
|
110
114
|
return this.exposedFunctions.openUrl(value);
|
package/dist/esm/calls/index.js
CHANGED
|
@@ -101,6 +101,12 @@ export const navigateBack = function () {
|
|
|
101
101
|
export const openImage = function () {
|
|
102
102
|
return moduleWrapper.current.functions.openImage(...arguments);
|
|
103
103
|
};
|
|
104
|
+
/**
|
|
105
|
+
* The images and videos specified in the items array is shown in gallery mode.
|
|
106
|
+
*/
|
|
107
|
+
export const openMedia = function () {
|
|
108
|
+
return moduleWrapper.current.functions.openMedia(...arguments);
|
|
109
|
+
};
|
|
104
110
|
/**
|
|
105
111
|
* Opens an URL in the chayns environment.
|
|
106
112
|
*/
|
|
@@ -288,4 +288,9 @@ export let DialogType = /*#__PURE__*/function (DialogType) {
|
|
|
288
288
|
DialogType["SELECT"] = "select";
|
|
289
289
|
DialogType["TOAST"] = "toast";
|
|
290
290
|
return DialogType;
|
|
291
|
+
}({});
|
|
292
|
+
export let MediaType = /*#__PURE__*/function (MediaType) {
|
|
293
|
+
MediaType["IMAGE"] = "image";
|
|
294
|
+
MediaType["VIDEO"] = "video";
|
|
295
|
+
return MediaType;
|
|
291
296
|
}({});
|
|
@@ -99,6 +99,10 @@ export class FrameWrapper {
|
|
|
99
99
|
if (!this.initialized) await this.ready;
|
|
100
100
|
return this.exposedFunctions.openImage(value);
|
|
101
101
|
},
|
|
102
|
+
openMedia: async value => {
|
|
103
|
+
if (!this.initialized) await this.ready;
|
|
104
|
+
return this.exposedFunctions.openMedia(value);
|
|
105
|
+
},
|
|
102
106
|
openUrl: async value => {
|
|
103
107
|
if (!this.initialized) await this.ready;
|
|
104
108
|
return this.exposedFunctions.openUrl(value);
|
|
@@ -75,6 +75,10 @@ export declare const navigateBack: () => Promise<void>;
|
|
|
75
75
|
* The images specified in the url array is shown in gallery mode.
|
|
76
76
|
*/
|
|
77
77
|
export declare const openImage: (value: import("../types/IChaynsReact").OpenImage) => Promise<void>;
|
|
78
|
+
/**
|
|
79
|
+
* The images and videos specified in the items array is shown in gallery mode.
|
|
80
|
+
*/
|
|
81
|
+
export declare const openMedia: (value: import("../types/IChaynsReact").OpenMedia) => Promise<void>;
|
|
78
82
|
/**
|
|
79
83
|
* Opens an URL in the chayns environment.
|
|
80
84
|
*/
|
|
@@ -231,6 +231,7 @@ export interface ChaynsReactFunctions {
|
|
|
231
231
|
openImage: (value: OpenImage) => Promise<void>;
|
|
232
232
|
openUrl: (value: OpenUrl) => Promise<void>;
|
|
233
233
|
openVideo: (value: OpenVideo) => Promise<void>;
|
|
234
|
+
openMedia: (value: OpenMedia) => Promise<void>;
|
|
234
235
|
refreshData: (value: RefreshData) => Promise<void>;
|
|
235
236
|
refreshAccessToken: () => Promise<void>;
|
|
236
237
|
removeGeoLocationListener: (value: number) => Promise<void>;
|
|
@@ -487,7 +488,7 @@ export type UserInfoQuery = {
|
|
|
487
488
|
personId?: string;
|
|
488
489
|
userId: number;
|
|
489
490
|
};
|
|
490
|
-
type OpenImageItem = {
|
|
491
|
+
export type OpenImageItem = {
|
|
491
492
|
url: string;
|
|
492
493
|
title?: string;
|
|
493
494
|
description?: string;
|
|
@@ -763,4 +764,19 @@ export declare enum DialogType {
|
|
|
763
764
|
SELECT = "select",
|
|
764
765
|
TOAST = "toast"
|
|
765
766
|
}
|
|
767
|
+
export declare enum MediaType {
|
|
768
|
+
IMAGE = "image",
|
|
769
|
+
VIDEO = "video"
|
|
770
|
+
}
|
|
771
|
+
export type OpenMediaItem = {
|
|
772
|
+
url: string;
|
|
773
|
+
title?: string;
|
|
774
|
+
description?: string;
|
|
775
|
+
preventCache?: boolean;
|
|
776
|
+
mediaType: MediaType;
|
|
777
|
+
};
|
|
778
|
+
export type OpenMedia = {
|
|
779
|
+
items: [OpenMediaItem, ...OpenMediaItem[]];
|
|
780
|
+
startIndex?: number;
|
|
781
|
+
};
|
|
766
782
|
export {};
|