@resconet/jsbridge 16.1.0-beta.1 → 16.1.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": "16.1.0-beta.1",
3
+ "version": "16.1.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
@@ -1,5 +1,5 @@
1
1
  // JSBridge.js TypeScript definition file
2
- // (c) 2022 Resco
2
+ // (c) 2023 Resco
3
3
 
4
4
  declare module MobileCRM {
5
5
 
@@ -2559,6 +2559,7 @@ declare module MobileCRM.UI {
2559
2559
  source: MobileCRM.Relationship;
2560
2560
  dataSource: Array<MobileCRM.Reference>;
2561
2561
  allowNull: boolean;
2562
+ initialTab: number;
2562
2563
 
2563
2564
  show(success: (obj?: MobileCRM.Reference) => void, failed?: (err: string) => void, scope?: any);
2564
2565
  showAsync(): Promise<Reference>;
package/src/JSBridge.js CHANGED
@@ -1,5 +1,5 @@
1
1
  (function () {
2
- var _scriptVersion = 16.0
2
+ var _scriptVersion = 16.1
3
3
  // Private objects & functions
4
4
  var _inherit = (function () {
5
5
  function _() { }
@@ -744,6 +744,7 @@
744
744
  /// <field name="source" type="MobileCRM.Relationship">The entity whose property will be set to the chosen value.</field>
745
745
  /// <field name="dataSource" type="MobileCRM.Reference[]">The list of entities that should be displayed as selected.</field>
746
746
  /// <field name="allowNull" type="Boolean">Whether to allow selecting no entity.</field>
747
+ /// <field name="initialTab" type="Number">Optional index of the tab which has to be pre-selected - 0=All Items, 1=Selected Items (default).</field>
747
748
  MobileCRM.UI.MultiLookupForm.superproto.constructor.apply(this, arguments);
748
749
  this.dataSource = [];
749
750
  },
@@ -3852,22 +3853,24 @@
3852
3853
  return { entities: this.entities, source: this.source, prevSelection: this.prevSelection, allowedViews: xml, allowNull: this.allowNull, preventClose: this.preventClose };
3853
3854
  };
3854
3855
 
3855
- // MobileCRM.UI.MultiLookupForm
3856
- _inherit(MobileCRM.UI.MultiLookupForm, MobileCRM.UI.LookupForm);
3857
- MobileCRM.UI.MultiLookupForm.prototype.show = function (success, failed, scope) {
3858
- /// <summary>Shows a dialog which allows the user to select a list of entities from a configurable list of entity types.</summary>
3859
- /// <param name="success" type="function(obj)">The callback function that is called with chosen array of <see cref="MobileCRM.Reference">MobileCRM.Reference</see> objects.</param>
3860
- /// <param name="failed" type="function(errorMsg)">The errorCallback which is called asynchronously in case of error.</param>
3861
- /// <param name="scope" type="Object">The scope for callbacks.</param>
3862
- var params = this._constructParams();
3863
- params.dataSource = this.dataSource;
3864
- MobileCRM.bridge.command("multiLookupForm", JSON.stringify(params), success, failed, scope);
3865
- };
3856
+ // MobileCRM.UI.MultiLookupForm
3857
+ _inherit(MobileCRM.UI.MultiLookupForm, MobileCRM.UI.LookupForm);
3858
+ MobileCRM.UI.MultiLookupForm.prototype.show = function (success, failed, scope) {
3859
+ /// <summary>Shows a dialog which allows the user to select a list of entities from a configurable list of entity types.</summary>
3860
+ /// <param name="success" type="function(obj)">The callback function that is called with chosen array of <see cref="MobileCRM.Reference">MobileCRM.Reference</see> objects.</param>
3861
+ /// <param name="failed" type="function(errorMsg)">The errorCallback which is called asynchronously in case of error.</param>
3862
+ /// <param name="scope" type="Object">The scope for callbacks.</param>
3863
+ var params = this._constructParams();
3864
+ params.dataSource = this.dataSource;
3865
+ params.initialTab = this.initialTab;
3866
+ MobileCRM.bridge.command("multiLookupForm", JSON.stringify(params), success, failed, scope);
3867
+ };
3866
3868
  MobileCRM.UI.MultiLookupForm.prototype.showAsync = function () {
3867
3869
  /// <summary>Shows a dialog which allows the user to select a list of entities from a configurable list of entity types.</summary>
3868
3870
  /// <returns type="Promise&lt;MobileCRM.Reference[]&gt;">A Promise object which will be resolved with an array of Reference objects representing chosen entity records.</returns>
3869
3871
  var params = this._constructParams();
3870
3872
  params.dataSource = this.dataSource;
3873
+ params.initialTab = this.initialTab;
3871
3874
  return MobileCRM.bridge.invokeCommandPromise("multiLookupForm", JSON.stringify(params));
3872
3875
  };
3873
3876