@frigade/react 1.38.29 → 1.38.31

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
@@ -1,7 +1,6 @@
1
1
  [![npm version](https://img.shields.io/npm/v/@frigade/react)](https://www.npmjs.com/package/@frigade/react)
2
2
  [![npm downloads](https://img.shields.io/npm/dw/@frigade/react)](https://www.npmjs.com/package/@frigade/react)
3
3
  [![npm version](https://github.com/FrigadeHQ/javascript/actions/workflows/tests.yml/badge.svg)](https://github.com/FrigadeHQ/javascript/actions/workflows/tests.yml)
4
- [![typescript](https://camo.githubusercontent.com/0f9fcc0ac1b8617ad4989364f60f78b2d6b32985ad6a508f215f14d8f897b8d3/68747470733a2f2f62616467656e2e6e65742f62616467652f547970655363726970742f7374726963742532302546302539462539322541412f626c7565)](https://www.npmjs.com/package/@frigade/react)
5
4
  [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
6
5
 
7
6
  <H3 align="center"><strong>Frigade React SDK</strong></H3>
package/dist/index.d.ts CHANGED
@@ -422,6 +422,7 @@ interface FormInputType {
422
422
  type: string;
423
423
  required?: boolean;
424
424
  validation?: InputValidation;
425
+ props?: Record<string, any>;
425
426
  }
426
427
  interface InputValidation {
427
428
  type: 'number' | 'string' | 'email' | 'phone' | 'date' | 'time' | 'datetime' | 'url' | 'custom' | 'password';
@@ -437,7 +438,14 @@ interface InputValidationRuleProps {
437
438
  interface FormInputProps {
438
439
  formInput: FormInputType;
439
440
  customFormTypeProps: CustomFormTypeProps;
441
+ /**
442
+ * Input data specific to this input
443
+ */
440
444
  inputData: any;
445
+ /**
446
+ * All input data for the current step
447
+ */
448
+ allInputData: any;
441
449
  onSaveInputData: (data: any) => void;
442
450
  setFormValidationErrors: (errors: FormValidationError[]) => void;
443
451
  }
@@ -904,6 +912,24 @@ declare const ProgressBar: ({ count, total, display, textLocation, style, textSt
904
912
  appearance?: Appearance;
905
913
  }) => React__default.JSX.Element;
906
914
 
915
+ interface MultipleChoiceProps extends FormInputType {
916
+ id: string;
917
+ title?: string;
918
+ placeholder?: string;
919
+ defaultValue?: string;
920
+ requireSelection?: boolean;
921
+ props: {
922
+ options?: MultipleChoiceOption[];
923
+ };
924
+ }
925
+ interface MultipleChoiceOption {
926
+ id: string;
927
+ title: string;
928
+ isOpenEnded?: boolean;
929
+ openEndedLabel?: string;
930
+ }
931
+ declare function MultipleChoice({ formInput, customFormTypeProps, onSaveInputData, inputData, setFormValidationErrors, }: FormInputProps): React__default.JSX.Element;
932
+
907
933
  declare const tokens: {
908
934
  colors: {
909
935
  neutral: {
@@ -1067,4 +1093,4 @@ declare const tokens: {
1067
1093
  };
1068
1094
  };
1069
1095
 
1070
- export { Appearance, Box, Button, CheckBox, CustomFormTypeProps, EntityProperties, Flow, FlowResponse, FlowType, FormInputProps, FormInputType, Label as FormLabel, TextField as FormTextField, FormValidationError, FrigadeAnnouncement, FrigadeAnnouncementProps, FrigadeBanner, FrigadeBannerProps, FrigadeChecklist, FrigadeChecklistProps, DefaultAppearance as FrigadeDefaultAppearance, FrigadeEmbeddedTip, FrigadeEmbeddedTipProps, FrigadeForm, FrigadeFormProps, FrigadeGuide, FrigadeHeroChecklist, FrigadeNPSSurvey, FrigadeNPSSurveyProps, FrigadeProgressBadge, FrigadeProgressBadgeProps, FrigadeProvider, FrigadeSupportWidget, BaseTheme as FrigadeTheme, FrigadeTour, FrigadeTourProps, ProgressBar, ProgressRing, PublicStepState, StepContentProps, StepData, Text, tokens, useFlowOpens, useFlowResponses, useFlows, useOrganization, useUser, useUserFlowStates };
1096
+ export { Appearance, Box, Button, CheckBox, CustomFormTypeProps, EntityProperties, Flow, FlowResponse, FlowType, FormInputProps, FormInputType, Label as FormLabel, TextField as FormTextField, FormValidationError, FrigadeAnnouncement, FrigadeAnnouncementProps, FrigadeBanner, FrigadeBannerProps, FrigadeChecklist, FrigadeChecklistProps, DefaultAppearance as FrigadeDefaultAppearance, FrigadeEmbeddedTip, FrigadeEmbeddedTipProps, FrigadeForm, FrigadeFormProps, FrigadeGuide, FrigadeHeroChecklist, FrigadeNPSSurvey, FrigadeNPSSurveyProps, FrigadeProgressBadge, FrigadeProgressBadgeProps, FrigadeProvider, FrigadeSupportWidget, BaseTheme as FrigadeTheme, FrigadeTour, FrigadeTourProps, MultipleChoice, MultipleChoiceOption, MultipleChoiceProps, ProgressBar, ProgressRing, PublicStepState, StepContentProps, StepData, Text, tokens, useFlowOpens, useFlowResponses, useFlows, useOrganization, useUser, useUserFlowStates };