freemium-survey-components 2.0.2 → 2.0.4

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.
@@ -1,11 +1,12 @@
1
1
  import React from 'react';
2
- import { AnswersType, SurveyQuestionType } from '../../types';
2
+ import { AnswersType, SurveyLayoutType, SurveyQuestionType } from '../../types';
3
3
  type NumberProps = {
4
4
  question: SurveyQuestionType;
5
5
  autoFocusDelay: number;
6
6
  setFocus?: boolean;
7
7
  onChangeHandler: (newValue: string) => void;
8
8
  formValues: AnswersType['formValues'];
9
+ surveyLayout: SurveyLayoutType;
9
10
  };
10
- export declare const NumberQuestion: ({ question, autoFocusDelay, setFocus, formValues, onChangeHandler, }: NumberProps) => React.JSX.Element;
11
+ export declare const NumberQuestion: ({ question, autoFocusDelay, setFocus, formValues, surveyLayout, onChangeHandler, }: NumberProps) => React.JSX.Element;
11
12
  export {};
@@ -2,8 +2,10 @@ import React from 'react';
2
2
  import { InputProps } from '../text-input/types';
3
3
  import '../text-input/style.scss';
4
4
  import './style.scss';
5
+ import { SurveyLayoutType } from '../../types';
5
6
  type PhoneNumberInputProps = InputProps & {
6
- onChangeHandler: (newValue: string) => void;
7
+ onChangeHandler?: (newValue: string) => void;
8
+ surveyLayout: SurveyLayoutType;
7
9
  };
8
10
  declare const PhoneNumberInput: React.ForwardRefExoticComponent<Omit<PhoneNumberInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
9
11
  export default PhoneNumberInput;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { AnswersType, SurveyQuestionType, ValidatingQuestions } from '../../types';
2
+ import { AnswersType, SurveyLayoutType, SurveyQuestionType, ValidatingQuestions } from '../../types';
3
3
  type TextboxProps = {
4
4
  question: SurveyQuestionType;
5
5
  autoFocusDelay: number;
@@ -7,6 +7,7 @@ type TextboxProps = {
7
7
  formValues: AnswersType['formValues'];
8
8
  textboxErrors: ValidatingQuestions['textboxQuestionErrors'];
9
9
  setFocus?: boolean;
10
+ surveyLayout: SurveyLayoutType;
10
11
  };
11
- export declare const Textbox: ({ question, autoFocusDelay, formValues, onChangeHandler, textboxErrors, setFocus, }: TextboxProps) => React.JSX.Element;
12
+ export declare const Textbox: ({ question, autoFocusDelay, formValues, onChangeHandler, textboxErrors, surveyLayout, setFocus, }: TextboxProps) => React.JSX.Element;
12
13
  export {};
@@ -39,7 +39,7 @@ export declare const getNextLogicalBlock: ({ activeBlock, answers, blocks, activ
39
39
  questions: SurveyQuestionType[];
40
40
  fromTY?: boolean | undefined;
41
41
  }) => number;
42
- export declare const getAppliedTYBlock: ({ activeBlock, blocks, answers, questions, renderedBlocks, contactData, activeIndexOfBlocks, }: {
42
+ export declare const getAppliedTYBlock: ({ activeBlock, blocks, answers, questions, renderedBlocks, contactData, activeIndexOfBlocks, surveyLayout, }: {
43
43
  activeBlock: BlockWithQuestionType;
44
44
  blocks: SurveyBlockWithQuestionNamesType[];
45
45
  answers: AnswersType;
@@ -47,8 +47,9 @@ export declare const getAppliedTYBlock: ({ activeBlock, blocks, answers, questio
47
47
  renderedBlocks: BlockWithQuestionType[];
48
48
  contactData: ContactDataType | null | undefined;
49
49
  activeIndexOfBlocks: number;
50
+ surveyLayout: SurveyLayoutType;
50
51
  }) => any;
51
- export declare const fetchNextBlockIndex: ({ renderedBlocks, activeBlock, blocks, activeIndexOfBlocks, answers, questions, contactData, pages, }: {
52
+ export declare const fetchNextBlockIndex: ({ renderedBlocks, activeBlock, blocks, activeIndexOfBlocks, answers, questions, contactData, pages, surveyLayout, }: {
52
53
  activeBlock: BlockWithQuestionType;
53
54
  activeIndexOfBlocks: number;
54
55
  answers: AnswersType;
@@ -57,6 +58,7 @@ export declare const fetchNextBlockIndex: ({ renderedBlocks, activeBlock, blocks
57
58
  renderedBlocks: BlockWithQuestionType[];
58
59
  contactData?: ContactDataType | null | undefined;
59
60
  pages: SurveyPageType[];
61
+ surveyLayout: SurveyLayoutType;
60
62
  }) => number;
61
63
  export declare const canCommitDirtyValue: ({ question, answers, isLastRenderedBlock, }: {
62
64
  question: SurveyQuestionType;
@@ -111,7 +113,7 @@ export declare const getRenderedBlocksTillActiveBlock: ({ renderedBlocks, active
111
113
  renderedBlocks: BlockWithQuestionType[];
112
114
  activeIndexOfRenderedBlocks: number;
113
115
  }) => BlockWithQuestionType[];
114
- export declare const getNextBlocksUntillLogicalBlock: ({ blocks, activeBlock, answers, questions, pages, renderedBlocks, contactData, pivot, }: {
116
+ export declare const getNextBlocksUntillLogicalBlock: ({ blocks, activeBlock, answers, questions, pages, renderedBlocks, contactData, pivot, surveyLayout, }: {
115
117
  pivot: SurveyEndCardProps['pivot'];
116
118
  answers: AnswersType;
117
119
  activeBlock: BlockWithQuestionType;
@@ -120,6 +122,7 @@ export declare const getNextBlocksUntillLogicalBlock: ({ blocks, activeBlock, an
120
122
  pages: SurveyPageType[];
121
123
  renderedBlocks: BlockWithQuestionType[];
122
124
  contactData?: ContactDataType | null | undefined;
125
+ surveyLayout: SurveyLayoutType;
123
126
  }) => BlockWithQuestionType[];
124
127
  export declare const getInitialState: ({ blocks, answerStatus, questions, responses, initialPivotAnswer, pages, }: {
125
128
  initialPivotAnswer?: number | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "freemium-survey-components",
3
- "version": "2.0.2",
3
+ "version": "2.0.4",
4
4
  "description": "React Survey Ui Components",
5
5
  "main": "lib/index.cjs.js",
6
6
  "module": "lib/index.esm.js",