@frigade/react 1.32.30 → 1.32.32

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
@@ -199,21 +199,21 @@ declare enum TriggerType {
199
199
  }
200
200
  declare function useFlows(): {
201
201
  getFlow: (slug: string) => Flow;
202
- getFlowData: (slug: string) => object;
202
+ getFlowData: (flowId: string) => object;
203
203
  isLoading: boolean;
204
- getStepStatus: (flowSlug: string, stepId: string) => StepActionType | null;
204
+ getStepStatus: (flowId: string, stepId: string) => StepActionType | null;
205
205
  getFlowSteps: (flowId: string) => StepData[];
206
- getCurrentStepIndex: (flowSlug: string) => number;
207
- markStepStarted: (flowSlug: string, stepId: string, data?: any) => Promise<void>;
208
- markStepCompleted: (flowSlug: string, stepId: string, data?: any) => Promise<void>;
209
- markFlowNotStarted: (flowSlug: string, data?: any) => Promise<void>;
210
- markFlowStarted: (flowSlug: string, data?: any) => Promise<void>;
211
- markFlowCompleted: (flowSlug: string, data?: any) => Promise<void>;
212
- markFlowAborted: (flowSlug: string, data?: any) => Promise<void>;
213
- markStepNotStarted: (flowSlug: string, stepId: string, data?: any) => Promise<void>;
214
- getFlowStatus: (flowSlug: string) => "COMPLETED_FLOW" | "STARTED_FLOW" | "NOT_STARTED_FLOW";
215
- getNumberOfStepsCompleted: (flowSlug: string) => number;
216
- getNumberOfSteps: (flowSlug: string) => number;
206
+ getCurrentStepIndex: (flowId: string) => number;
207
+ markStepStarted: (flowId: string, stepId: string, data?: any) => Promise<void>;
208
+ markStepCompleted: (flowId: string, stepId: string, data?: any) => Promise<void>;
209
+ markFlowNotStarted: (flowId: string, data?: any) => Promise<void>;
210
+ markFlowStarted: (flowId: string, data?: any) => Promise<void>;
211
+ markFlowCompleted: (flowId: string, data?: any) => Promise<void>;
212
+ markFlowAborted: (flowId: string, data?: any) => Promise<void>;
213
+ markStepNotStarted: (flowId: string, stepId: string, data?: any) => Promise<void>;
214
+ getFlowStatus: (flowId: string) => "COMPLETED_FLOW" | "STARTED_FLOW" | "NOT_STARTED_FLOW";
215
+ getNumberOfStepsCompleted: (flowId: string) => number;
216
+ getNumberOfSteps: (flowId: string) => number;
217
217
  targetingLogicShouldHideFlow: (flow: Flow) => boolean;
218
218
  setCustomVariable: (key: string, value: string | number | boolean) => void;
219
219
  updateCustomVariables: (newCustomVariables?: {
@@ -224,8 +224,8 @@ declare function useFlows(): {
224
224
  };
225
225
  getStepOptionalProgress: (step: StepData) => number;
226
226
  getFlowMetadata: (slug: string) => any;
227
- isStepBlocked: (flowSlug: string, stepId: string) => boolean;
228
- isStepHidden: (flowSlug: string, stepId: string) => boolean;
227
+ isStepBlocked: (flowId: string, stepId: string) => boolean;
228
+ isStepHidden: (flowId: string, stepId: string) => boolean;
229
229
  hasActiveFullPageFlow: boolean;
230
230
  setHasActiveFullPageFlow: React.Dispatch<React.SetStateAction<boolean>>;
231
231
  isFlowAvailableToUser: (flowId: string) => boolean;
@@ -298,6 +298,8 @@ interface FrigadeChecklistProps extends HeroChecklistProps {
298
298
  */
299
299
  guideFlowId?: string;
300
300
  guideTitle?: string;
301
+ autoExpandFirstIncompleteStep?: boolean;
302
+ autoExpandNextStep?: boolean;
301
303
  }
302
304
  declare const FrigadeChecklist: React__default.FC<FrigadeChecklistProps>;
303
305
 
@@ -506,12 +508,12 @@ interface FrigadeNPSSurveyProps extends DefaultFrigadeFlowProps {
506
508
  declare const FrigadeNPSSurvey: React__default.FC<FrigadeNPSSurveyProps>;
507
509
 
508
510
  declare function useFlowOpens(): {
509
- getOpenFlowState: (flowSlug: string, defaultValue?: boolean) => boolean;
510
- setOpenFlowState: (flowSlug: string, isOpen: boolean) => void;
511
- resetOpenFlowState: (flowSlug: string) => void;
511
+ getOpenFlowState: (flowId: string, defaultValue?: boolean) => boolean;
512
+ setOpenFlowState: (flowId: string, isOpen: boolean) => void;
513
+ resetOpenFlowState: (flowId: string) => void;
512
514
  hasOpenModals: () => boolean;
513
- setKeepCompletedFlowOpenDuringSession: (flowSlug: string) => void;
514
- shouldKeepCompletedFlowOpenDuringSession: (flowSlug: string) => boolean;
515
+ setKeepCompletedFlowOpenDuringSession: (flowId: string) => void;
516
+ shouldKeepCompletedFlowOpenDuringSession: (flowId: string) => boolean;
515
517
  };
516
518
 
517
519
  declare function useUser(): {