@superleapai/flow-ui 2.6.0 → 2.6.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/index.d.ts CHANGED
@@ -112,11 +112,12 @@ declare module "@superleapai/flow-ui" {
112
112
  closeForm(): void;
113
113
 
114
114
  /**
115
- * Notify the CRM that the form was submitted successfully.
116
- * The CRM listens for this event and can react (e.g. close the form, refresh data).
117
- * @param payload - Optional data about the submission
115
+ * Register a callback for when the CRM form is submitted successfully.
116
+ * The CRM sends a notification after the form saves.
117
+ * @param callback - Handler called with the submission payload
118
+ * @returns Unsubscribe function
118
119
  */
119
- formSubmittedSuccessfully(payload?: any): void;
120
+ onFormSubmitSuccess(callback: (payload: any) => void): EventUnsubscribe;
120
121
 
121
122
  /**
122
123
  * Tell the CRM to show a toast notification
package/index.js CHANGED
@@ -218,8 +218,8 @@
218
218
  closeForm: client.closeForm
219
219
  ? client.closeForm.bind(client)
220
220
  : undefined,
221
- formSubmittedSuccessfully: client.formSubmittedSuccessfully
222
- ? client.formSubmittedSuccessfully.bind(client)
221
+ onFormSubmitSuccess: client.onFormSubmitSuccess
222
+ ? client.onFormSubmitSuccess.bind(client)
223
223
  : undefined,
224
224
  toast: client.toast ? client.toast.bind(client) : undefined,
225
225
  navigate: client.navigate ? client.navigate.bind(client) : undefined,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superleapai/flow-ui",
3
- "version": "2.6.0",
3
+ "version": "2.6.1",
4
4
  "description": "A reusable design system for building multi-step forms with comprehensive UI components. Single file, clean globals, SDK included. Only FlowUI and SuperLeap exposed.",
5
5
  "main": "dist/superleap-flow.min.js",
6
6
  "types": "index.d.ts",