@frigade/react 1.32.79 → 1.32.81

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/lib/index.d.ts CHANGED
@@ -116,6 +116,9 @@ interface DefaultFrigadeFlowProps {
116
116
  flowId: string;
117
117
  style?: CSSProperties;
118
118
  className?: string;
119
+ /**
120
+ * The appearance of the flow. See https://docs.frigade.com/sdk/styling
121
+ */
119
122
  appearance?: Appearance;
120
123
  /**
121
124
  * Dynamic variables to use in flow-data.yml. See https://docs.frigade.com/flows/dynamic-variables
@@ -128,6 +131,9 @@ interface DefaultFrigadeFlowProps {
128
131
  * Handler for when a step is completed.
129
132
  * @param step
130
133
  * @param index
134
+ * @param nextStep
135
+ * @param allFormData All form data collected so far (only applicable to FrigadeForms)
136
+ * @param stepSpecificFormData Form data collected for the finished step (only applicable to FrigadeForms)
131
137
  */
132
138
  onStepCompletion?: (step: StepData, index: number, nextStep?: StepData, allFormData?: any, stepSpecificFormData?: any) => boolean;
133
139
  /**
@@ -364,8 +370,6 @@ interface FrigadeProgressBadgeProps extends DefaultFrigadeFlowProps {
364
370
  }
365
371
  declare const FrigadeProgressBadge: React__default.FC<FrigadeProgressBadgeProps>;
366
372
 
367
- type ModalPosition = 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'center';
368
-
369
373
  interface FormInputType {
370
374
  id: string;
371
375
  title?: string;
@@ -414,25 +418,59 @@ interface StepContentProps {
414
418
  type EntityProperties = Record<string, string | boolean | number | null>;
415
419
 
416
420
  type FrigadeFormType = 'inline' | 'modal' | 'large-modal' | 'corner-modal';
417
- interface FormProps extends DefaultFrigadeFlowProps {
421
+ interface FrigadeFormProps extends DefaultFrigadeFlowProps {
422
+ /**
423
+ * @ignore
424
+ */
418
425
  title?: string;
426
+ /**
427
+ * @ignore
428
+ */
419
429
  subtitle?: string;
420
430
  type?: FrigadeFormType;
431
+ /**
432
+ * Map of custom components. The key must match the `type` property of the step defined in `flow-data.yml`
433
+ */
421
434
  customStepTypes?: {
422
435
  [key: string]: (params: CustomFormTypeProps) => React__default.ReactNode;
423
436
  };
437
+ /**
438
+ * Map of custom form components. Can only be used with a step of type `multiInput` (defined in `flow-data.yml`).
439
+ * The key must match the `type` property of the input defined in `flow-data.yml`
440
+ */
424
441
  customFormElements?: {
425
442
  [key: string]: (params: FormInputProps) => React__default.ReactNode;
426
443
  };
427
444
  visible?: boolean;
428
445
  setVisible?: (visible: boolean) => void;
429
446
  onComplete?: () => void;
447
+ /**
448
+ * Whether to show a dismiss button to exit out of the form. Applicable only for modal forms.
449
+ */
430
450
  dismissible?: boolean;
451
+ /**
452
+ * If true, the form can be repeated multiple times. Default is false. Useful for e.g. contact/support forms.
453
+ */
431
454
  repeatable?: boolean;
455
+ /**
456
+ * If true, the user will be excited from the flow when the form is dismissed. Default is false.
457
+ */
432
458
  endFlowOnDismiss?: boolean;
433
- modalPosition?: ModalPosition;
459
+ /**
460
+ * Indicates the position of the modal if the form type is a modal. Default is center.
461
+ */
462
+ modalPosition?: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right' | 'center';
463
+ /**
464
+ * Show a pagination indicator at the bottom of the form. Default is false.
465
+ */
434
466
  showPagination?: boolean;
467
+ /**
468
+ * Whether to allow the user to navigate back to previous steps. Default is false.
469
+ */
435
470
  allowBackNavigation?: boolean;
471
+ /**
472
+ * @ignore
473
+ */
436
474
  showFrigadeBranding?: boolean;
437
475
  /**
438
476
  * This function is called when the user submits data in a step.
@@ -440,7 +478,7 @@ interface FormProps extends DefaultFrigadeFlowProps {
440
478
  */
441
479
  validationHandler?: (step: StepData, index: number, nextStep?: StepData, allFormData?: any, stepSpecificFormData?: object) => Promise<string | null | undefined>;
442
480
  }
443
- declare const FrigadeForm: FC<FormProps>;
481
+ declare const FrigadeForm: FC<FrigadeFormProps>;
444
482
 
445
483
  interface FrigadeGuideProps extends DefaultFrigadeFlowProps {
446
484
  title: string;
@@ -520,6 +558,11 @@ interface FrigadeTourProps extends Omit<DefaultFrigadeFlowProps, 'flowId'> {
520
558
  * @ignore
521
559
  */
522
560
  showFrigadeBranding?: boolean;
561
+ /**
562
+ * If true, the tour will go to the next existing step/tip if the current selector element is not found on the page.
563
+ * Defaults to false.
564
+ */
565
+ skipIfNotFound?: boolean;
523
566
  }
524
567
  declare const FrigadeTour: FC<FrigadeTourProps & {
525
568
  flowId: string;