@resconet/jsbridge 14.2.0 → 15.0.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 +1 -1
- package/src/JSBridge.d.ts +34 -2
- package/src/JSBridge.js +33 -3
package/package.json
CHANGED
package/src/JSBridge.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// JSBridge.js TypeScript definition file
|
|
2
|
-
//
|
|
3
|
-
// (c)
|
|
2
|
+
// v15.0
|
|
3
|
+
// (c) 2022 Resco
|
|
4
4
|
|
|
5
5
|
declare module MobileCRM {
|
|
6
6
|
|
|
@@ -603,6 +603,17 @@ declare module MobileCRM {
|
|
|
603
603
|
*/
|
|
604
604
|
public static email(address: string, subject: string, body: string, errorCallback?: () => void, scope?: any);
|
|
605
605
|
/**
|
|
606
|
+
* @since 15.0
|
|
607
|
+
* Opens the platform-specific e-mail message form with pre-filled data.
|
|
608
|
+
* @param address Recipients email address.
|
|
609
|
+
* @param subject An e-mail subject.
|
|
610
|
+
* @param body A string with email body.
|
|
611
|
+
* @param mimeType Body content MIME type.
|
|
612
|
+
* @param errorCallback The errorCallback which is called asynchronously in case of error.
|
|
613
|
+
* @param scope The scope for errorCallback.
|
|
614
|
+
*/
|
|
615
|
+
public static sendEmail(address: string, subject: string, body: string, mimeType: string, errorCallback?: () => void, scope?: any);
|
|
616
|
+
/**
|
|
606
617
|
* @since 9.1
|
|
607
618
|
* Sends a list of files (full paths or IReferences to blobs) as email attachments.
|
|
608
619
|
* This method either open the CRM Email form or the native mail client (depending on application settings).
|
|
@@ -1467,6 +1478,13 @@ declare module MobileCRM.UI {
|
|
|
1467
1478
|
*/
|
|
1468
1479
|
getController(name: string): _Controller;
|
|
1469
1480
|
/**
|
|
1481
|
+
* Returns the entity list by its view name.
|
|
1482
|
+
* This method looks for plain associated views but also for controllers that can be flipped into a list (in addition to map or chart).
|
|
1483
|
+
* @param name A name of associated view.
|
|
1484
|
+
* @returns IEntityList
|
|
1485
|
+
*/
|
|
1486
|
+
getEntityList(name: string): IEntityList;
|
|
1487
|
+
/**
|
|
1470
1488
|
* Sets the address fields according to the current geo-location from platform-specific location service.
|
|
1471
1489
|
* @param latitude The latitude from geo-location from platform-specific location service
|
|
1472
1490
|
* @param longitude longitude from geo-location from platform-specific location service
|
|
@@ -2311,6 +2329,20 @@ declare module MobileCRM.UI {
|
|
|
2311
2329
|
* @param scope The scope for callback.
|
|
2312
2330
|
*/
|
|
2313
2331
|
changeProccess(callback: (processReference: MobileCRM.Reference) => void, errorCallback?: (err: string) => void, scope?: any);
|
|
2332
|
+
/**
|
|
2333
|
+
* @since 15.0
|
|
2334
|
+
* Progresses to the next stage of the active process.
|
|
2335
|
+
* @param errorCallback The errorCallback which is called asynchronously in case of error
|
|
2336
|
+
* @param scope The scope for callback.
|
|
2337
|
+
*/
|
|
2338
|
+
MoveToPreviousStage(errorCallback?: (err: string) => void, scope?: any);
|
|
2339
|
+
/**
|
|
2340
|
+
* @since 15.0
|
|
2341
|
+
* Moves to the previous stage of the active process.
|
|
2342
|
+
* @param errorCallback The errorCallback which is called asynchronously in case of error
|
|
2343
|
+
* @param scope The scope for callback.
|
|
2344
|
+
*/
|
|
2345
|
+
MoveToNextStage(errorCallback?: (err: string) => void, scope?: any);
|
|
2314
2346
|
}
|
|
2315
2347
|
|
|
2316
2348
|
class ViewDefinition {
|
package/src/JSBridge.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
//
|
|
1
|
+
// v15.0
|
|
2
2
|
(function () {
|
|
3
|
-
var _scriptVersion =
|
|
3
|
+
var _scriptVersion = 15.0
|
|
4
4
|
// Private objects & functions
|
|
5
5
|
var _inherit = (function () {
|
|
6
6
|
function _() { }
|
|
@@ -2684,6 +2684,18 @@
|
|
|
2684
2684
|
var emailContent = { Address: address, Subject: subject, Body: body };
|
|
2685
2685
|
_executePlatformAction(1, emailContent, null, errorCallback, scope);
|
|
2686
2686
|
};
|
|
2687
|
+
MobileCRM.Platform.sendEmail = function (address, subject, body, mimeType, errorCallback, scope) {
|
|
2688
|
+
/// <summary>[v15.0] Opens the platform-specific e-mail message form with pre-filled data.</summary>
|
|
2689
|
+
/// <param name="address" type="String">Recipient's email address.</param>
|
|
2690
|
+
/// <param name="subject" type="String">An e-mail subject.</param>
|
|
2691
|
+
/// <param name="body" type="String">A string with email body.</param>
|
|
2692
|
+
/// <param name="mimeType" type="String">Body content MIME type.</param>
|
|
2693
|
+
/// <param name="errorCallback" type="function(errorMsg)">The errorCallback which is called asynchronously in case of error.</param>
|
|
2694
|
+
/// <param name="scope" type="Object">The scope for errorCallback.</param>
|
|
2695
|
+
|
|
2696
|
+
var emailContent = { Address: address, Subject: subject, Body: body, MimeType: mimeType };
|
|
2697
|
+
_executePlatformAction(1, emailContent, null, errorCallback, scope);
|
|
2698
|
+
};
|
|
2687
2699
|
MobileCRM.Platform.openDocument = function (path, mimeType, args, errorCallback, scope) {
|
|
2688
2700
|
/// <summary>[v8.1] Opens specified document in associated program.</summary>
|
|
2689
2701
|
/// <remarks>Apple security policy doesn&t allow this functionality on iOS.</remarks>
|
|
@@ -3612,7 +3624,25 @@
|
|
|
3612
3624
|
var controller = MobileCRM.bridge.exposeObjectAsync("EntityForm.GetController", [this.view.name]);
|
|
3613
3625
|
controller.invokeMethodAsync("ChangeProcessTo", [processRef], function () { }, errorCallback, scope);
|
|
3614
3626
|
controller.release();
|
|
3615
|
-
|
|
3627
|
+
};
|
|
3628
|
+
|
|
3629
|
+
MobileCRM.UI.ProcessController.prototype.moveToPreviousStage = function (errorCallback, scope) {
|
|
3630
|
+
/// <summary>[15.0] Moves to the previous stage of the active process.</summary>
|
|
3631
|
+
/// <param name="errorCallback" type="function(errorMsg)">The errorCallback which is called asynchronously in case of error.</param>
|
|
3632
|
+
/// <param name="scope" type="Object">The scope for callback.</param>
|
|
3633
|
+
var controller = MobileCRM.bridge.exposeObjectAsync("EntityForm.GetController", [this.view.name]);
|
|
3634
|
+
controller.invokeMethodAsync("MoveToPreviousStage", [], function () { }, errorCallback, scope);
|
|
3635
|
+
controller.release();
|
|
3636
|
+
};
|
|
3637
|
+
|
|
3638
|
+
MobileCRM.UI.ProcessController.prototype.moveToNextStage = function ( errorCallback, scope) {
|
|
3639
|
+
/// <summary>[15.0] Progresses to the next stage of the active process.</summary>
|
|
3640
|
+
/// <param name="errorCallback" type="function(errorMsg)">The errorCallback which is called asynchronously in case of error.</param>
|
|
3641
|
+
/// <param name="scope" type="Object">The scope for callback.</param>
|
|
3642
|
+
var controller = MobileCRM.bridge.exposeObjectAsync("EntityForm.GetController", [this.view.name]);
|
|
3643
|
+
controller.invokeMethodAsync("MoveToNextStage", [], function () { }, errorCallback, scope);
|
|
3644
|
+
controller.release();
|
|
3645
|
+
};
|
|
3616
3646
|
|
|
3617
3647
|
// MobileCRM.UI.ViewDefinition
|
|
3618
3648
|
MobileCRM.UI.ViewDefinition.loadEntityViews = function (entityName, callback, errorCallback, scope) {
|