@resconet/jsbridge 19.0.0-beta.1 → 19.0.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": "19.0.0-beta.1",
3
+ "version": "19.0.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
@@ -2732,6 +2732,13 @@ declare module MobileCRM.UI {
2732
2732
  * @param scope A scope for calling the callbacks.
2733
2733
  */
2734
2734
  public static repeatGroup(id: string, copyValues?: boolean, errorCallback?: (err: string) => void, scope?: any);
2735
+ /**
2736
+ * Duplicates repeatable group with all its questions. The name of the group will contain the lowest available repeatIndex and suffix in form #00X.
2737
+ * @param id Id of the source group
2738
+ * @param copyValues Optional parameter determining whether the source group values should be copied to the new instance of the group.
2739
+ * @returns A promise resolved when the operation is completed.
2740
+ */
2741
+ public static repeatGroupAsync(id: string, copyValues?: boolean): Promise<void>;
2735
2742
  /**
2736
2743
  * Deletes an instance of repeatable group with all its questions and adjusts the repeatIndex for all instances of the same template group with higher index.
2737
2744
  * @param id Id of the source group
@@ -2881,11 +2888,17 @@ declare module MobileCRM.UI {
2881
2888
 
2882
2889
  /**
2883
2890
  * Duplicates repeatable group with all its questions. The name of the group will contain the lowest available repeatIndex and suffix in form #00X.
2884
- * @param copyValues Optional paramater determining whether the group values should be copied to the new instance of this group.
2891
+ * @param copyValues Optional parameter determining whether the group values should be copied to the new instance of this group.
2885
2892
  * @param errorCallback A callback which is called in case of error.
2886
2893
  * @param scope A scope for calling the callbacks.
2887
2894
  */
2888
2895
  repeatGroup(copyValues?: boolean, errorCallback?: (err: string) => void, scope?: any);
2896
+ /**
2897
+ * Duplicates repeatable group with all its questions. The name of the group will contain the lowest available repeatIndex and suffix in form #00X.
2898
+ * @param copyValues Optional parameter determining whether the group values should be copied to the new instance of this group.
2899
+ * @returns A promise resolved when the operation is completed.
2900
+ */
2901
+ repeatGroupAsync(copyValues?: boolean): Promise<void>;
2889
2902
  /**
2890
2903
  * Deletes this instance of repeatable group with all its questions and adjusts the repeatIndex for all instances of the same template group with higher index.
2891
2904
  * @param errorCallback A callback which is called in case of error.
package/src/JSBridge.js CHANGED
@@ -5382,12 +5382,21 @@
5382
5382
  MobileCRM.bridge.invokeMethodAsync("QuestionnaireForm", "ChangeLookupViews", [questionName, xml], null, errorCallback, scope);
5383
5383
  };
5384
5384
  MobileCRM.UI.QuestionnaireForm.repeatGroup = function (groupId, copyValues, errorCallback, scope) {
5385
+ ///<summary>Duplicates repeatable group with all its questions. The name of the group will contain the lowest available repeatIndex and suffix in form #00X.</summary>
5386
+ /// <param name="id" type="String">Id of the source group.</param>
5387
+ /// <param name="copyValues" type="Boolean">Optional paramater determining whether the group values should be copied to the new instance of this group.</param>
5388
+ /// <returns type="Promise">A promise that resolves when the group is duplicated.</returns>
5389
+ MobileCRM.bridge.invokeMethodAsync("QuestionnaireForm", "RepeatGroup", [groupId, copyValues], null, errorCallback, scope);
5390
+ };
5391
+ MobileCRM.UI.QuestionnaireForm.repeatGroupAsync = function (groupId, copyValues) {
5385
5392
  ///<summary>Duplicates repeatable group with all its questions. The name of the group will contain the lowest available repeatIndex and suffix in form #00X.</summary>
5386
5393
  /// <param name="id" type="String">Id of the source group.</param>
5387
5394
  /// <param name="copyValues" type="Boolean">Optional paramater determining whether the group values should be copied to the new instance of this group.</param>
5388
5395
  /// <param name="errorCallback" type="function(errorMsg)">The errorCallback which is called in case of error.</param>
5389
5396
  /// <param name="scope" type="Object">The scope for callbacks.</param>
5390
- MobileCRM.bridge.invokeMethodAsync("QuestionnaireForm", "RepeatGroup", [groupId, copyValues], null, errorCallback, scope);
5397
+ return new Promise(function (resolve, reject) {
5398
+ MobileCRM.bridge.invokeMethodAsync("QuestionnaireForm", "RepeatGroup", [groupId, copyValues], resolve, reject);
5399
+ });
5391
5400
  };
5392
5401
  MobileCRM.UI.QuestionnaireForm.deleteGroup = function (groupId, errorCallback, scope) {
5393
5402
  ///<summary>Deletes an instance of repeatable group with all its questions and adjusts the repeatIndex for all instances of the same template group with higher index.</summary>
@@ -5418,6 +5427,12 @@
5418
5427
  /// <param name="scope" type="Object">The scope for callbacks.</param>
5419
5428
  MobileCRM.UI.QuestionnaireForm.repeatGroup(this.id, copyValues, errorCallback, scope);
5420
5429
  };
5430
+ MobileCRM.UI.QuestionnaireForm.Group.prototype.repeatGroupAsync = function (copyValues) {
5431
+ ///<summary>Duplicates repeatable group with all its questions. The name of the group will contain the lowest available repeatIndex and suffix in form #00X.</summary>
5432
+ /// <param name="copyValues" type="Boolean">Optional parameter determining whether the group values should be copied to the new instance of this group.</param>
5433
+ // <returns type="Promise">A promise that resolves when the group is duplicated.</returns>
5434
+ return MobileCRM.UI.QuestionnaireForm.repeatGroupAsync(this.id, copyValues);
5435
+ };
5421
5436
  MobileCRM.UI.QuestionnaireForm.Group.prototype.deleteGroup = function (errorCallback, scope) {
5422
5437
  ///<summary>Deletes this instance of repeatable group with all its questions and adjusts the repeatIndex for all instances of the same template group with higher index.</summary>
5423
5438
  /// <param name="errorCallback" type="function(errorMsg)">The errorCallback which is called in case of error.</param>