@resconet/jsbridge 17.0.0-beta.1 → 17.0.0-beta.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@resconet/jsbridge",
3
- "version": "17.0.0-beta.1",
3
+ "version": "17.0.0-beta.2",
4
4
  "main": "./src/JSBridge.js",
5
5
  "types": "./src/JSBridge.d.ts",
6
6
  "description": "Install npm JSBridge module",
package/src/JSBridge.d.ts CHANGED
@@ -1258,6 +1258,15 @@ declare module MobileCRM.Services {
1258
1258
  recordAudio(callback: (fileInfo: FileInfo) => void, errorCallback?: (error: string) => void, scope?: any);
1259
1259
  recordVideo(callback: (fileInfo: FileInfo) => void, errorCallback?: (error: string) => void, scope?: any);
1260
1260
  pasteFile(callback: (fileInfo: FileInfo) => void, errorCallback?: (error: string) => void, scope?: any);
1261
+ /**
1262
+ * @since 9.1
1263
+ * Prints the document defined by file path.
1264
+ * @param filePath A file path.
1265
+ * @param landscape True, to print the document in landscape. False, to print it in portrait
1266
+ * @param errorCallback The error callback which is called in case of error.
1267
+ * @param scope The scope for callbacks.
1268
+ */
1269
+ print(filePath: string, landscape: boolean, callback: (result: boolean) => void, scope?: any);
1261
1270
  resizeImage(filePath: string, maxWidth: number, maxHeight: number, callback: (result: boolean) => void, scope?: any);
1262
1271
  /**
1263
1272
  * @since 11.2
package/src/JSBridge.js CHANGED
@@ -5997,6 +5997,9 @@
5997
5997
  var cmdId = this._createCmdObject(success, failed, scope);
5998
5998
  chrome.webview.postMessage(cmdId + ';' + command + ':' + params);
5999
5999
  };
6000
+ MobileCRM.Bridge.prototype.alert = function (text, callback, scope) {
6001
+ MobileCRM.bridge.command("alert", text, callback, callback, scope);
6002
+ };
6000
6003
  MobileCRM.bridge = new MobileCRM.Bridge('Windows');
6001
6004
  }
6002
6005
  else if ("external" in window && external) {
@@ -6023,9 +6026,6 @@
6023
6026
  };
6024
6027
  }
6025
6028
  MobileCRM.Bridge.prototype.alert = function (text, callback, scope) {
6026
- /// <summary>Shows a message asynchronously and calls the callback after it is closed by user.</summary>
6027
- /// <param name="callback" type="function(obj)">The callback function that is called asynchronously.</param>
6028
- /// <param name="scope" type="Object">The scope for callbacks.</param>
6029
6029
  MobileCRM.bridge.command("alert", text, callback, callback, scope);
6030
6030
  };
6031
6031
  var platformName = win10 ? window.win10version : (navigator.userAgent.indexOf("Windows Phone") > 0 ? "WindowsPhone" : "WindowsRT");