@superleapai/flow-ui 2.6.1 → 2.6.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/core/crm.js +9 -9
- package/dist/superleap-flow.min.js +2 -2
- package/index.d.ts +4 -5
- package/index.js +2 -2
- package/package.json +1 -1
- package/dist/superleap-flow.js +0 -16563
- package/dist/superleap-flow.js.map +0 -1
package/core/crm.js
CHANGED
|
@@ -248,18 +248,17 @@
|
|
|
248
248
|
}
|
|
249
249
|
|
|
250
250
|
/**
|
|
251
|
-
*
|
|
252
|
-
* The CRM
|
|
251
|
+
* Notify the CRM that the form was submitted successfully.
|
|
252
|
+
* The CRM listens for 'crm:formSubmitSuccess' and can react
|
|
253
|
+
* (e.g. close the form, refresh data, show a toast).
|
|
253
254
|
*
|
|
254
|
-
* @param {
|
|
255
|
-
* @returns {Function} unsubscribe function
|
|
255
|
+
* @param {Object} [payload] – optional data about the submission
|
|
256
256
|
*/
|
|
257
|
-
function
|
|
257
|
+
function formSubmittedSuccessfully(payload) {
|
|
258
258
|
var bridge = getBridge();
|
|
259
|
-
if (
|
|
260
|
-
|
|
259
|
+
if (bridge && bridge.isConnected()) {
|
|
260
|
+
bridge.send("crm:formSubmitSuccess", payload || {});
|
|
261
261
|
}
|
|
262
|
-
return bridge.onMessage("crm:onFormSubmitSuccess", callback);
|
|
263
262
|
}
|
|
264
263
|
|
|
265
264
|
// ---------------------------------------------------------------------------
|
|
@@ -336,7 +335,8 @@
|
|
|
336
335
|
global.superleapClient.disconnect = disconnect;
|
|
337
336
|
global.superleapClient.setLoading = setLoading;
|
|
338
337
|
global.superleapClient.closeForm = closeForm;
|
|
339
|
-
global.superleapClient.
|
|
338
|
+
global.superleapClient.formSubmittedSuccessfully =
|
|
339
|
+
formSubmittedSuccessfully;
|
|
340
340
|
global.superleapClient.toast = toast;
|
|
341
341
|
global.superleapClient.navigate = navigate;
|
|
342
342
|
global.superleapClient.getContext = getContext;
|