@resconet/jsbridge 18.1.0-beta.1 → 18.2.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 +1 -1
- package/src/JSBridge.d.ts +21 -4
- package/src/JSBridge.js +25 -5
package/package.json
CHANGED
package/src/JSBridge.d.ts
CHANGED
|
@@ -1006,7 +1006,7 @@ declare namespace MobileCRM {
|
|
|
1006
1006
|
* Executes the mobile reporting request which produces the mobile report document of given format.
|
|
1007
1007
|
* @param fetch The fetch XML defining the entity (entities) query used as report input.
|
|
1008
1008
|
* @param reportXML The mobile report XML definition which can be loaded from the resco_report entity or constructed dynamically. Ignored if IsExportOnly parameter is true.
|
|
1009
|
-
* @param reportFormat Report format: Pdf (default), Html, Excel,
|
|
1009
|
+
* @param reportFormat Report format: Pdf (default), Html, Excel, Word.
|
|
1010
1010
|
* @param isExportOnly If true then ReportXml is optional. The default is false.
|
|
1011
1011
|
* @param isOnline Indicates whether the report should be run against the online data or local database. The default is current application mode.
|
|
1012
1012
|
* @param outputFile The full path to the output file. If omitted a temp file is created. The output path is always passed to the success callback.
|
|
@@ -1031,7 +1031,7 @@ declare namespace MobileCRM {
|
|
|
1031
1031
|
* Executes the mobile reporting request which produces the mobile report document of given format.
|
|
1032
1032
|
* @param fetch The fetch XML defining the entity (entities) query used as report input.
|
|
1033
1033
|
* @param reportXML The mobile report XML definition which can be loaded from the resco_report entity or constructed dynamically. Ignored if IsExportOnly parameter is true.
|
|
1034
|
-
* @param reportFormat Report format: Pdf (default), Html, Excel,
|
|
1034
|
+
* @param reportFormat Report format: Pdf (default), Html, Excel, Word.
|
|
1035
1035
|
* @param isExportOnly If true then ReportXml is optional. The default is false.
|
|
1036
1036
|
* @param isOnline Indicates whether the report should be run against the online data or local database. The default is current application mode.
|
|
1037
1037
|
* @param outputFile The full path to the output file. If omitted a temp file is created. The output path is always passed to the success callback.
|
|
@@ -1054,7 +1054,7 @@ declare namespace MobileCRM {
|
|
|
1054
1054
|
source: string | Reference;
|
|
1055
1055
|
/** The identifier of report template as its string record ID, exact logical name, {@link MobileCRM.Reference} or actual xml definition of report.*/
|
|
1056
1056
|
template: string | Reference;
|
|
1057
|
-
/** Optional code of report format. Supported values are: Pdf (default), Html, Excel,
|
|
1057
|
+
/** Optional code of report format. Supported values are: Pdf (default), Html, Excel, Word. */
|
|
1058
1058
|
format = "Pdf";
|
|
1059
1059
|
/** Optional custom name of report file or its full path. If not provided, default report name and path are used.
|
|
1060
1060
|
* When using full path, it is recommended to place it in {@link MobileCRM.Configuration.storageDirectory}. */
|
|
@@ -1121,7 +1121,14 @@ declare namespace MobileCRM {
|
|
|
1121
1121
|
class Questionnaire {
|
|
1122
1122
|
static getQuestionName(name: string, repeatIndex: number): string;
|
|
1123
1123
|
static getGroupName(name: string, repeatIndex: number): string;
|
|
1124
|
-
static showForm(
|
|
1124
|
+
static showForm(
|
|
1125
|
+
id: string,
|
|
1126
|
+
failed?: (err: string) => void,
|
|
1127
|
+
scope?: any,
|
|
1128
|
+
relationship?: MobileCRM.Relationship,
|
|
1129
|
+
modal?: boolean,
|
|
1130
|
+
version?: number
|
|
1131
|
+
): void;
|
|
1125
1132
|
}
|
|
1126
1133
|
}
|
|
1127
1134
|
/**
|
|
@@ -2446,6 +2453,16 @@ declare module MobileCRM.UI {
|
|
|
2446
2453
|
* @param scope The scope for handler calls.
|
|
2447
2454
|
*/
|
|
2448
2455
|
public static onClick(handler: (entityList: EntityList) => void, bind: boolean, scope?: any);
|
|
2456
|
+
/**
|
|
2457
|
+
* @since 18.1
|
|
2458
|
+
* Binds or unbinds the handler for onCellClick event on EntityList.
|
|
2459
|
+
* Bound handler is called with the EntityList object as an argument. The EntityList context object contains "entities" property with the list of clicked entities (just one entity), property "propertyName" with the field name that was clicked within the list item and property "event" with event details.
|
|
2460
|
+
* @param propertyName The name of desired cell within the list item. (mostly logical name of the field).
|
|
2461
|
+
* @param handler The handler function that has to be bound or unbound.
|
|
2462
|
+
* @param bind Determines whether to bind or unbind the handler.
|
|
2463
|
+
* @param scope The scope for handler calls.
|
|
2464
|
+
*/
|
|
2465
|
+
public static onCellClick(propertyName: string, handler: (entityList: EntityList) => void, bind: boolean, scope?: any);
|
|
2449
2466
|
/**
|
|
2450
2467
|
* @since 10.0
|
|
2451
2468
|
* Asynchronously gets the list of entities that were changed on the list.
|
package/src/JSBridge.js
CHANGED
|
@@ -4479,7 +4479,7 @@
|
|
|
4479
4479
|
/// <summary>[v9.1] Deprecated: please use MobileCRM.MobileReport.generateReportAsync instead. Executes the mobile reporting request which produces the mobile report document of given format.</summary>
|
|
4480
4480
|
/// <param name="fetch" type="String">The fetch XML defining the entity (entities) query used as report input.</param>
|
|
4481
4481
|
/// <param name="reportXML" type="String">The mobile report XML definition which can be loaded from the resco_report entity or constructed dynamically. Ignored if IsExportOnly parameter is true.</param>
|
|
4482
|
-
/// <param name="reportFormat" type="String">Report format: Pdf (default), Html, Excel,
|
|
4482
|
+
/// <param name="reportFormat" type="String">Report format: Pdf (default), Html, Excel, Word.</param>
|
|
4483
4483
|
/// <param name="isExportOnly" type="Boolean">If true then ReportXml is optional. The default is false.</param>
|
|
4484
4484
|
/// <param name="isOnline" type="Boolean">Indicates whether the report should be run against the online data or local database. The default is current application mode.</param>
|
|
4485
4485
|
/// <param name="outputFile" type="String">The full path to the output file. If omitted a temp file is created. The output path is always passed to the success callback.</param>
|
|
@@ -4499,7 +4499,7 @@
|
|
|
4499
4499
|
/// <summary>[v9.1] Deprecated: please use MobileCRM.MobileReport.generateReportAsync instead. Executes the mobile reporting request which produces the mobile report document of given format.</summary>
|
|
4500
4500
|
/// <param name="fetch" type="String">The fetch XML defining the entity (entities) query used as report input.</param>
|
|
4501
4501
|
/// <param name="reportXML" type="String">The mobile report XML definition which can be loaded from the resco_mobilereport entity or constructed dynamically. Ignored if IsExportOnly parameter is true.</param>
|
|
4502
|
-
/// <param name="reportFormat" type="String">Report format: Pdf (default), Html, Excel,
|
|
4502
|
+
/// <param name="reportFormat" type="String">Report format: Pdf (default), Html, Excel, Word.</param>
|
|
4503
4503
|
/// <param name="isExportOnly" type="Boolean">If true then ReportXml is optional. The default is false.</param>
|
|
4504
4504
|
/// <param name="isOnline" type="Boolean">Indicates whether the report should be run against the online data or local database. The default is current application mode.</param>
|
|
4505
4505
|
/// <param name="outputFile" type="String">The full path to the output file. If omitted a temp file is created.</param>
|
|
@@ -4515,7 +4515,7 @@
|
|
|
4515
4515
|
/// <summary>[v18.0] The request class specifying behavior of MobileCRM.MobileReport.generateReportAsync function.</summary>
|
|
4516
4516
|
/// <param name="source" type="String | MobileCRM.Reference">The identifier of report source record(s) as MobileCRM.Reference or fetch in its xml representation.</param>
|
|
4517
4517
|
/// <param name="template" type="String | MobileCRM.Reference">The identifier of report template as its string record ID, exact logical name, MobileCRM.Reference or actual xml definition of report.</param>
|
|
4518
|
-
/// <param name="format" type="String">Optional code of report format. Supported values are: Pdf (default), Html, Excel,
|
|
4518
|
+
/// <param name="format" type="String">Optional code of report format. Supported values are: Pdf (default), Html, Excel, Word.</param>
|
|
4519
4519
|
/// <param name="customNameOrPath" type="String">Optional custom name of report file or its full path. If not provided, default report name and path are used. When using full path, it is recommended to place it in MobileCRM.Configuration.storageDirectory.</param>
|
|
4520
4520
|
/// <param name="languageCode" type="String">Optional iso code (e.g. "en-US") of report language. Currently it only works for reports on localized Questionnaires.</param>
|
|
4521
4521
|
/// <param name="waitMessage" type="String">Optional custom message displayed to user while report is being generated. When null or empty string is provided, default message is shown. When undefined, shows no wait message.</param>
|
|
@@ -4570,13 +4570,15 @@
|
|
|
4570
4570
|
MobileCRM.bridge.command("showMobileReportForm", JSON.stringify(params), null, failed, scope);
|
|
4571
4571
|
};
|
|
4572
4572
|
// MobileCRM.UI.Questionnaire
|
|
4573
|
-
MobileCRM.Questionnaire.showForm = function (id, failed, scope, relationship) {
|
|
4573
|
+
MobileCRM.Questionnaire.showForm = function (id, failed, scope, relationship, modal, version) {
|
|
4574
4574
|
/// <summary>[v10.2] Shows the questionnaire form.</summary>
|
|
4575
4575
|
/// <param name="id" type="String">Id (guid) of the questionnaire.</param>
|
|
4576
4576
|
/// <param name="failed" type="function(errorMsg)">A callback which is called in case of error.</param>
|
|
4577
4577
|
/// <param name="scope" type="Object">The scope for callbacks.</param>
|
|
4578
4578
|
/// <param name="relationship" type="MobileCRM.Relationship">Optional relationship with the parent record.</param>
|
|
4579
|
-
|
|
4579
|
+
/// <param name="modal" type="Boolean">Optional parameter determines if the form will be opened in modal dialog. Defaults to false.</param>
|
|
4580
|
+
/// <param name="version" type="Integer">Optional parameter for setting the Questionnaire player version to execute the questionnaire. Default is 1</param>
|
|
4581
|
+
var params = { id: id, relationship: relationship, modal: modal, version: version };
|
|
4580
4582
|
MobileCRM.bridge.command("showQuestionnaire", JSON.stringify(params), null, failed, scope);
|
|
4581
4583
|
};
|
|
4582
4584
|
MobileCRM.Questionnaire._padTo3digits = function (num) {
|
|
@@ -4990,6 +4992,24 @@
|
|
|
4990
4992
|
MobileCRM.bridge.command("registerEvents", "onClick");
|
|
4991
4993
|
}
|
|
4992
4994
|
};
|
|
4995
|
+
MobileCRM.UI.EntityList.onCellClick = function (propertyName, handler, bind, scope) {
|
|
4996
|
+
/// <summary>[v18.1] Binds or unbinds the handler for onCellClick event on EntityList.</summary>
|
|
4997
|
+
/// <remarks>Bound handler is called with the EntityList object as an argument. The EntityList context property contains <see cref="MobileCRM.UI.EntityListClickContext">EntityListClickContext</see> object.</remarks>
|
|
4998
|
+
/// <param name="propertyName" type="String">The name of desired cell within the list item.</param>
|
|
4999
|
+
/// <param name="handler" type="function(entityList)">The handler function that has to be bound or unbound.</param>
|
|
5000
|
+
/// <param name="bind" type="Boolean">Determines whether to bind or unbind the handler.</param>
|
|
5001
|
+
/// <param name="scope" type="Object">The scope for handler calls.</param>
|
|
5002
|
+
var handlerName = "onCellClick:" + propertyName;
|
|
5003
|
+
var handlers = MobileCRM.UI.EntityList._handlers[handlerName];
|
|
5004
|
+
if (!handlers) {
|
|
5005
|
+
MobileCRM.UI.EntityList._handlers[handlerName] = handlers = [];
|
|
5006
|
+
}
|
|
5007
|
+
var register = handlers.length == 0;
|
|
5008
|
+
_bindHandler(handler, handlers, bind, scope);
|
|
5009
|
+
if (register) {
|
|
5010
|
+
MobileCRM.bridge.command("registerEvents", handlerName);
|
|
5011
|
+
}
|
|
5012
|
+
};
|
|
4993
5013
|
MobileCRM.UI.EntityListClickContext = function () {
|
|
4994
5014
|
/// <summary>Represents a context for the <see cref="MobileCRM.UI.EntityList.onClick">MobileCRM.UI.EntityList.onClick</see> handler.</summary>
|
|
4995
5015
|
/// <field name="entities" type="Array">Single item array containing the <see cref="MobileCRM.DynamicEntity">DynamicEntity</see> object representing clicked entity.</field>
|