@resconet/jsbridge 17.0.0-beta.1 → 17.0.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.
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",
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
@@ -1,5 +1,5 @@
1
1
  (function () {
2
- var _scriptVersion = 16.1
2
+ var _scriptVersion = 17.0
3
3
  // Private objects & functions
4
4
  var _inherit = (function () {
5
5
  function _() { }
@@ -2365,7 +2365,8 @@
2365
2365
  MobileCRM.Localization.initialize(fn, errorCallback, scope);
2366
2366
  };
2367
2367
  MobileCRM.Metadata.getStringListOptions = function (entityName, propertyName) {
2368
- /// <summary>Gets the list of options for the string list property.</summary>
2368
+ /// <summary>Gets the list of options for the string list property.</summary>
2369
+ /// <remarks><see cref="MobileCRM.Localization">MobileCRM.Localization</see> needs to be initialized prior to using this function. Otherwise empty array is returned.</remarks>
2369
2370
  /// <param name="entityName" type="String">The entity name.</param>
2370
2371
  /// <param name="propertyName" type="String">The string list property name.</param>
2371
2372
  var options = {};
@@ -5997,6 +5998,9 @@
5997
5998
  var cmdId = this._createCmdObject(success, failed, scope);
5998
5999
  chrome.webview.postMessage(cmdId + ';' + command + ':' + params);
5999
6000
  };
6001
+ MobileCRM.Bridge.prototype.alert = function (text, callback, scope) {
6002
+ MobileCRM.bridge.command("alert", text, callback, callback, scope);
6003
+ };
6000
6004
  MobileCRM.bridge = new MobileCRM.Bridge('Windows');
6001
6005
  }
6002
6006
  else if ("external" in window && external) {
@@ -6023,9 +6027,6 @@
6023
6027
  };
6024
6028
  }
6025
6029
  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
6030
  MobileCRM.bridge.command("alert", text, callback, callback, scope);
6030
6031
  };
6031
6032
  var platformName = win10 ? window.win10version : (navigator.userAgent.indexOf("Windows Phone") > 0 ? "WindowsPhone" : "WindowsRT");