@resconet/jsbridge 18.2.0 → 19.0.0-beta.1

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": "18.2.0",
3
+ "version": "19.0.0-beta.1",
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
@@ -241,6 +241,8 @@ declare namespace MobileCRM {
241
241
  syncFilterHash: string;
242
242
  /**Gets or sets the current user GUID (given by the server).*/
243
243
  systemUserId: string;
244
+ /**Gets or sets the current user name (given by the server).*/
245
+ systemUserName: string;
244
246
  /**Gets or sets the last active entity in the Tourplan (Calendar).*/
245
247
  tourplanInitialEntity: string;
246
248
  /**Gets or sets whether to update entity objectypecodes on first sync.*/
package/src/JSBridge.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /* eslint-disable @typescript-eslint/no-this-alias */
2
2
  /* globals MobileCRM:writable, MobileCrmException:writable, CrmBridge, webkit, chrome */
3
3
  (function () {
4
- var _scriptVersion = 18.0;
4
+ var _scriptVersion = 19.0;
5
5
  // Private objects & functions
6
6
  var _inherit = (function () {
7
7
  function _() {
@@ -1805,6 +1805,7 @@
1805
1805
  /// <field name="showPersonalContacts" type="Boolean">Gets or sets whether to show contacts from the user's personal address book.</field>
1806
1806
  /// <field name="showSystemCalendars" type="Boolean">Gets or sets whether to show private calendars in calendars.</field>
1807
1807
  /// <field name="systemUserId" type="String">Gets or sets the current user id (given by the server).</field>
1808
+ /// <field name="systemUserName" type="String">Gets or sets the current user name (given by the server).</field>
1808
1809
  /// <field name="teams" type="Array<String>">Gets the array of ids of teams the current user is member of.</field>
1809
1810
  /// <field name="useCrmEmail" type="Boolean">Gets or sets whether to create a CRM email entity or use the platform email service.</field>
1810
1811
  /// <field name="useDatabaseBlobStore" type="Boolean">Gets or sets whether to store attachment blobs in database or in files. If you change this setting you must perform a full sync!</field>
@@ -6821,9 +6822,10 @@
6821
6822
  } else {
6822
6823
  if ("chrome" in window && "webview" in window["chrome"]) {
6823
6824
  // Windows UWP with WebView2 (Edge)
6825
+ var msgWindow = parent && "HiddenIframeContainer" in parent ? parent : chrome.webview;
6824
6826
  MobileCRM.Bridge.prototype.command = function (command, params, success, failed, scope) {
6825
6827
  var cmdId = this._createCmdObject(success, failed, scope);
6826
- chrome.webview.postMessage(cmdId + ";" + command + ":" + params);
6828
+ msgWindow.postMessage(cmdId + ";" + command + ":" + params);
6827
6829
  };
6828
6830
  MobileCRM.Bridge.prototype.alert = function (text, callback, scope) {
6829
6831
  MobileCRM.bridge.command("alert", text, callback, callback, scope);