@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 +1 -1
- package/src/JSBridge.d.ts +2 -1
- package/src/JSBridge.js +15 -12
package/package.json
CHANGED
package/src/JSBridge.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// JSBridge.js TypeScript definition file
|
|
2
|
-
// (c)
|
|
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.
|
|
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
|
-
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
|
|
3863
|
-
|
|
3864
|
-
|
|
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<MobileCRM.Reference[]>">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
|
|