@resconet/jsbridge 15.0.0 → 15.1.0

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": "15.0.0",
3
+ "version": "15.1.0",
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
- // v15.0
2
+ // v15.1
3
3
  // (c) 2022 Resco
4
4
 
5
5
  declare module MobileCRM {
@@ -1574,6 +1574,14 @@ declare module MobileCRM.UI {
1574
1574
  */
1575
1575
  public static onChange(handler: (entityForm: EntityForm) => void, bind: boolean, scope?: any);
1576
1576
  /**
1577
+ * @since 15.1
1578
+ * Binds or unbinds the handler for onProcessLoaded event on EntityForm.
1579
+ * @param handler The handler function that has to be bound or unbound.
1580
+ * @param bind Determines whether to bind or unbind the handler.
1581
+ * @param scope The scope for callbacks.
1582
+ */
1583
+ public static onProcessLoaded(handler: (entityForm: EntityForm) => void, bind: boolean, scope?: any);
1584
+ /**
1577
1585
  * @since 11.2
1578
1586
  * Binds or unbinds the handler for specific item change event on EntityForm.
1579
1587
  * @param itemName The name of desired detail item (mostly logical name of the field).
package/src/JSBridge.js CHANGED
@@ -1,6 +1,6 @@
1
- // v15.0
1
+ // v15.1
2
2
  (function () {
3
- var _scriptVersion = 15.0
3
+ var _scriptVersion = 15.1
4
4
  // Private objects & functions
5
5
  var _inherit = (function () {
6
6
  function _() { }
@@ -4768,7 +4768,7 @@
4768
4768
 
4769
4769
  // MobileCRM.UI.EntityForm
4770
4770
  _inherit(MobileCRM.UI.EntityForm, MobileCRM.ObservableObject);
4771
- MobileCRM.UI.EntityForm._handlers = { onChange: [], onSave: [], onPostSave: [], onDetailCollectionChange: [], onSelectedViewChanged: [] };
4771
+ MobileCRM.UI.EntityForm._handlers = { onChange: [], onSave: [], onPostSave: [], onDetailCollectionChange: [], onSelectedViewChanged: [], onProcessLoaded: [] };
4772
4772
 
4773
4773
  MobileCRM.UI.EntityForm.prototype.getDetailView = function (name) {
4774
4774
  /// <summary>Returns the DetailView by its name.</summary>
@@ -5000,6 +5000,17 @@
5000
5000
  if (register)
5001
5001
  MobileCRM.bridge.command("registerEvents", "onChange");
5002
5002
  }
5003
+ MobileCRM.UI.EntityForm.onProcessLoaded = function (handler, bind, scope) {
5004
+ /// <summary>Binds or unbinds the handler for onProcessLoaded event on EntityForm.</summary>
5005
+ /// <param name="handler" type="function(entityForm)">The handler function that has to be bound or unbound.</param>
5006
+ /// <param name="bind" type="Boolean">Determines whether to bind or unbind the handler.</param>
5007
+ /// <param name="scope" type="Object">The scope for handler calls.</param>
5008
+ var handlers = MobileCRM.UI.EntityForm._handlers.onProcessLoaded;
5009
+ var register = handlers.length == 0;
5010
+ _bindHandler(handler, handlers, bind, scope);
5011
+ if (register)
5012
+ MobileCRM.bridge.command("registerEvents", "onProcessLoaded");
5013
+ }
5003
5014
  MobileCRM.UI.EntityForm.onItemChange = function (itemName, handler, bind, scope) {
5004
5015
  /// <summary>[v11.2] Binds or unbinds the handler for specific item change event on EntityForm.</summary>
5005
5016
  /// <param name="itemName" type="String">The name of desired detail item (mostly logical name of the field).</param>