freemium-survey-components 2.0.49 → 2.0.50
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.
|
@@ -50,7 +50,7 @@ export declare const getAppliedTYBlock: ({ activeBlock, blocks, answers, questio
|
|
|
50
50
|
pages: SurveyPageType[];
|
|
51
51
|
surveyLayout: SurveyLayoutType;
|
|
52
52
|
}) => any;
|
|
53
|
-
export declare const fetchNextBlockIndex: ({ renderedBlocks, activeBlock, blocks, activeIndexOfBlocks, answers, questions, contactData, pages, surveyLayout, }: {
|
|
53
|
+
export declare const fetchNextBlockIndex: ({ renderedBlocks, activeBlock, blocks, activeIndexOfBlocks, answers, questions, contactData, pages, surveyLayout, returnOnLogicFail, }: {
|
|
54
54
|
activeBlock: BlockWithQuestionType;
|
|
55
55
|
activeIndexOfBlocks: number;
|
|
56
56
|
answers: AnswersType;
|
|
@@ -60,6 +60,7 @@ export declare const fetchNextBlockIndex: ({ renderedBlocks, activeBlock, blocks
|
|
|
60
60
|
contactData?: ContactDataType | null | undefined;
|
|
61
61
|
pages: SurveyPageType[];
|
|
62
62
|
surveyLayout: SurveyLayoutType;
|
|
63
|
+
returnOnLogicFail?: boolean | undefined;
|
|
63
64
|
}) => number;
|
|
64
65
|
export declare const canCommitDirtyValue: ({ question, answers, isLastRenderedBlock, }: {
|
|
65
66
|
question: SurveyQuestionType;
|
|
@@ -86,6 +87,7 @@ export type CanDisplayDisableButtonProps = {
|
|
|
86
87
|
renderedBlocks: BlockWithQuestionType[];
|
|
87
88
|
initialPivotAnswer?: number;
|
|
88
89
|
activeIndexOfRenderedBlocks: number;
|
|
90
|
+
activeIndexOfSet: number;
|
|
89
91
|
surveyStyle?: 'standard' | 'card';
|
|
90
92
|
initialStatementHasAnswer: boolean;
|
|
91
93
|
isWidget: boolean;
|
|
@@ -9,10 +9,12 @@ export declare const useStandardSurvey: (props: AugmentedSurveyProps) => {
|
|
|
9
9
|
navigateToStart: () => void;
|
|
10
10
|
resetSurvey: () => void;
|
|
11
11
|
moveToNextPage: (nullifyValues?: boolean) => void;
|
|
12
|
+
moveToNextSet: (nullifyValues?: boolean) => void;
|
|
12
13
|
setIsSubmitting: React.Dispatch<React.SetStateAction<boolean>>;
|
|
13
14
|
isSubmitting: boolean;
|
|
14
15
|
expanded: boolean;
|
|
15
16
|
setExpanded: React.Dispatch<React.SetStateAction<boolean>>;
|
|
17
|
+
activeIndexOfSet: number;
|
|
16
18
|
formQuestionErrors: Record<string, Record<string, string>>;
|
|
17
19
|
textboxQuestionErrors: Record<string, string>;
|
|
18
20
|
fileUploadErrors: Record<string, string>;
|
|
@@ -21,6 +23,8 @@ export declare const useStandardSurvey: (props: AugmentedSurveyProps) => {
|
|
|
21
23
|
pages: SurveyPageType[];
|
|
22
24
|
navigateToPreviousPage: () => void;
|
|
23
25
|
navigateToNextPage: () => void;
|
|
26
|
+
navigateToNextSet: () => void;
|
|
27
|
+
navigateToPreviousSet: () => void;
|
|
24
28
|
activePage: SurveyPageType | undefined;
|
|
25
29
|
questions: import("../../types").SurveyQuestionType[];
|
|
26
30
|
renderedBlocks: BlockWithQuestionType[];
|
package/lib/types/types.d.ts
CHANGED
|
@@ -527,6 +527,7 @@ export interface SurveyBlockWithQuestionNamesType extends SurveyBlockType {
|
|
|
527
527
|
}
|
|
528
528
|
export interface BlockWithQuestionType extends SurveyBlockWithQuestionNamesType {
|
|
529
529
|
question: SurveyQuestionType;
|
|
530
|
+
orderOfSet?: number;
|
|
530
531
|
}
|
|
531
532
|
export type AugmentedSurveyType = Omit<SurveyType, 'blocks'> & {
|
|
532
533
|
blocks: SurveyBlockWithQuestionNamesType[];
|
|
@@ -722,6 +723,8 @@ export type SurveyEndCardProps = {
|
|
|
722
723
|
translationVariables?: TranslationVariablesType;
|
|
723
724
|
};
|
|
724
725
|
export type StandardPageNavigatorProps = {
|
|
726
|
+
navigateToNextSet: () => void;
|
|
727
|
+
navigateToPreviousSet: () => void;
|
|
725
728
|
navigateToNextPage: () => void;
|
|
726
729
|
navigateToPreviousPage: () => void;
|
|
727
730
|
answers: AnswersType;
|
|
@@ -752,7 +755,7 @@ export type CardPageNavigatorProps = {
|
|
|
752
755
|
animationInProgress: boolean;
|
|
753
756
|
setAnimationInProgress: React.Dispatch<React.SetStateAction<boolean>>;
|
|
754
757
|
};
|
|
755
|
-
export type ActionButtonTypes = 'next' | 'next-statement' | 'next-page' | 'skip' | 'skip-statement' | 'skip-page' | 'submit' | 'navigation' | 'page-navigation' | 'clear-selection' | 'message' | 'consent' | 'navigation-prev' | 'navigation-next' | 'navigation-page-prev' | 'navigation-page-next' | 'previous-matrix-statement' | 'next-matrix-statement';
|
|
758
|
+
export type ActionButtonTypes = 'next' | 'next-statement' | 'next-page' | 'next-set' | 'skip' | 'skip-statement' | 'skip-page' | 'skip-set' | 'submit' | 'navigation' | 'page-navigation' | 'clear-selection' | 'message' | 'consent' | 'navigation-prev' | 'navigation-next' | 'navigation-page-prev' | 'navigation-page-next' | 'previous-matrix-statement' | 'next-matrix-statement' | 'navigation-set-prev' | 'navigation-set-next';
|
|
756
759
|
export type ValidatingQuestions = {
|
|
757
760
|
formQuestionErrors: Record<string, Record<string, string>>;
|
|
758
761
|
textboxQuestionErrors: Record<string, string>;
|
package/lib/types/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { FscDebugType, PropertiesLabelsPreferenceType, SurveyBlockType, SurveyQuestionType, SurveyResponseType, SurveyType, SurveyUiThemeType } from './types';
|
|
2
|
+
import { BlockWithQuestionType, FscDebugType, PropertiesLabelsPreferenceType, SurveyBlockType, SurveyQuestionType, SurveyResponseType, SurveyType, SurveyUiThemeType } from './types';
|
|
3
3
|
export declare const withDefaults: <P, DP>(component: React.ComponentType<P>, defaultProps: DP) => React.ComponentType<Partial<DP> & Omit<P, keyof DP>>;
|
|
4
4
|
export declare const isNil: (value: unknown) => boolean;
|
|
5
5
|
export declare const isEmpty: (value: unknown) => boolean;
|
|
@@ -33,3 +33,4 @@ export declare const convertQuillHTMLToText: (quillHtml: string, preserveNewLine
|
|
|
33
33
|
export declare const getFscDebug: () => FscDebugType;
|
|
34
34
|
export declare const appLogger: (title: string, props?: any) => void;
|
|
35
35
|
export declare const isBgDark: (bgColor: string) => boolean;
|
|
36
|
+
export declare const setOrderForRenderedBlocks: (rBlocks: BlockWithQuestionType[]) => BlockWithQuestionType[];
|