@frigade/react 1.32.39 → 1.32.41

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/README.md CHANGED
@@ -46,6 +46,7 @@ Frigade supports a series of use cases such as:
46
46
  - **Engagement**: Keep active customers engaged, announce new product features, and create lifecycle specific re-onboarding flows for dormant or churned customers.
47
47
  - **Retention**: Increase retention by delivering the right content at the right time, and by asking your users for feedback on the product.
48
48
 
49
+
49
50
  # Features
50
51
 
51
52
  **Component Library**
package/lib/index.d.ts CHANGED
@@ -371,7 +371,7 @@ interface FormInputProps {
371
371
  formInput: FormInputType;
372
372
  customFormTypeProps: CustomFormTypeProps;
373
373
  inputData: any;
374
- onSaveInputData: (data: object) => void;
374
+ onSaveInputData: (data: any) => void;
375
375
  setFormValidationErrors: (errors: FormValidationError[]) => void;
376
376
  }
377
377
  interface FormValidationError {
@@ -414,6 +414,11 @@ interface FormProps extends DefaultFrigadeFlowProps {
414
414
  modalPosition?: ModalPosition;
415
415
  showPagination?: boolean;
416
416
  allowBackNavigation?: boolean;
417
+ /**
418
+ * This function is called when the user submits data in a step.
419
+ * If it returns a string, the flow will not proceed to the next step and the string will be displayed as an error message.
420
+ */
421
+ validationHandler?: (step: StepData, index: number, nextStep?: StepData, allFormData?: any, stepSpecificFormData?: object) => string | null | undefined;
417
422
  }
418
423
  declare const FrigadeForm: FC<FormProps>;
419
424