@resconet/jsbridge 18.2.0-beta.1 → 18.2.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 +9 -1
- package/src/JSBridge.js +15 -1
package/package.json
CHANGED
package/src/JSBridge.d.ts
CHANGED
|
@@ -1893,13 +1893,21 @@ declare module MobileCRM.UI {
|
|
|
1893
1893
|
startEditItem(index: number);
|
|
1894
1894
|
/**
|
|
1895
1895
|
* @since 9.1
|
|
1896
|
-
* Changes the data source for ComboBoxItem {MobileCRM.UI.DetailViewItems.ComboBoxItem}
|
|
1896
|
+
* Changes the data source for ComboBoxItem {MobileCRM.UI.DetailViewItems.ComboBoxItem}.
|
|
1897
1897
|
* @param index Item index on the view.
|
|
1898
1898
|
* @param listDataSource The data source object (e.g. {label1 : 1, label2 : 2}).
|
|
1899
1899
|
* @param defaultValue New data source default value. If not defined, the first item from listDataSource will be used.
|
|
1900
1900
|
* @param valueType Type of list data source element value. Default is string, allowed int, string.
|
|
1901
1901
|
*/
|
|
1902
1902
|
updateComboItemDataSource(index: number, listDataSource: any, defaultValue?: string, valueType?: string);
|
|
1903
|
+
/**
|
|
1904
|
+
* @since 18.1
|
|
1905
|
+
* Filters allowed StringList options in LinkItem {MobileCRM.UI.DetailViewItems.LinkItem}.
|
|
1906
|
+
* @param index Item index on the view.
|
|
1907
|
+
* @param allowedOptions An array with options to be allowed (e.g. ["Option1", "Option2"]).
|
|
1908
|
+
* @param defaultValue New data source default value. If not defined, the first item from allowedOptions will be used. Ignored, if value isn't in allowedOptions.
|
|
1909
|
+
*/
|
|
1910
|
+
filterStringListOptions(index: number, allowedOptions: string[], defaultValue?: string);
|
|
1903
1911
|
/**
|
|
1904
1912
|
* @since 10.1
|
|
1905
1913
|
* Changes the data source for MobileCRM.UI.DetailViewItems.ComboBoxItem.
|
package/src/JSBridge.js
CHANGED
|
@@ -3915,7 +3915,7 @@
|
|
|
3915
3915
|
/// <param name="index" type="Number">Item index on the view.</param>
|
|
3916
3916
|
/// <param name="listDataSource" type="Object">The data source object (e.g. {"label1":1, "label2":2}).</param>
|
|
3917
3917
|
/// <param name="valueType" type="String">Type of list data source element value. Default is string, allowed int, string.</param>
|
|
3918
|
-
/// <param name="defaultValue" type="String">New data source default value. If not defined, the first item from listDataSource will be used.</param>
|
|
3918
|
+
/// <param name="defaultValue" type="String|Number">New data source default value. If not defined, the first item from listDataSource will be used.</param>
|
|
3919
3919
|
var data = {
|
|
3920
3920
|
action: "updateDataSource",
|
|
3921
3921
|
viewName: this.name,
|
|
@@ -3928,6 +3928,20 @@
|
|
|
3928
3928
|
//this.items[index].value = defaultValue !== undefined ? defaultValue : listDataSource[Object.keys(listDataSource)[0]];
|
|
3929
3929
|
MobileCRM.bridge.command("detailViewAction", JSON.stringify(data));
|
|
3930
3930
|
};
|
|
3931
|
+
MobileCRM.UI._DetailView.prototype.filterStringListOptions = function (index, allowedOptions, defaultValue) {
|
|
3932
|
+
/// <summary>[v18.1] Filters allowed StringList options in <see cref="MobileCRM.UI.DetailViewItems.Item">MobileCRM.UI.DetailViewItems.LinkItem</see>.</summary>
|
|
3933
|
+
/// <param name="index" type="Number">Item index on the view.</param>
|
|
3934
|
+
/// <param name="allowedOptions" type="string[]">An array with options to be allowed (e.g. ["New", "Completed"]).</param>
|
|
3935
|
+
/// <param name="defaultValue" type="String">New data source default value. If not defined, the first item from allowedOptions will be used. Ignored, if value isn't in allowedOptions.</param>
|
|
3936
|
+
var data = {
|
|
3937
|
+
action: "filterStringList",
|
|
3938
|
+
viewName: this.name,
|
|
3939
|
+
index: index,
|
|
3940
|
+
filterOptions: allowedOptions,
|
|
3941
|
+
value: defaultValue || allowedOptions[0],
|
|
3942
|
+
};
|
|
3943
|
+
MobileCRM.bridge.command("detailViewAction", JSON.stringify(data));
|
|
3944
|
+
};
|
|
3931
3945
|
MobileCRM.UI._DetailView.prototype.updateLinkItemViews = function (index, dialogSetup, inlinePickSetup, dialogOnly, allowCreateNew) {
|
|
3932
3946
|
/// <summary>[v10.1] Changes the <see cref="MobileCRM.UI.DetailViewItems.ComboBoxItem">ComboBoxItem</see> views and/or filters.</summary>
|
|
3933
3947
|
/// <param name="index" type="Number">Item index on the view.</param>
|