@roqua/quby-frontend 0.10.20 → 0.11.0
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/dist/components/AnswerPage.d.ts +2 -2
- package/dist/components/MainLabel.d.ts +2 -2
- package/dist/components/Paginator.d.ts +3 -3
- package/dist/components/PanelContent.d.ts +2 -2
- package/dist/components/PanelItem.d.ts +2 -2
- package/dist/components/ProgressBar.d.ts +1 -1
- package/dist/components/Quby.d.ts +2 -2
- package/dist/components/QuestionDescription.d.ts +1 -1
- package/dist/components/QuestionWrapper.d.ts +2 -2
- package/dist/components/SubQuestions.d.ts +2 -2
- package/dist/components/ValidationErrors.d.ts +2 -2
- package/dist/components/index.d.ts +2 -2
- package/dist/components/items/HtmlItem.d.ts +2 -2
- package/dist/components/items/InfoItem.d.ts +2 -2
- package/dist/components/items/QuestionItem.d.ts +1 -1
- package/dist/components/items/UnknownItem.d.ts +2 -2
- package/dist/components/questions/CheckBoxQuestion.d.ts +2 -2
- package/dist/components/questions/CountrySelectQuestion.d.ts +2 -2
- package/dist/components/questions/DatePartsQuestion.d.ts +2 -2
- package/dist/components/questions/FloatQuestion.d.ts +2 -2
- package/dist/components/questions/IntegerQuestion.d.ts +2 -2
- package/dist/components/questions/OldSliderQuestion.d.ts +2 -2
- package/dist/components/questions/RadioQuestion.d.ts +2 -2
- package/dist/components/questions/ScaleQuestion.d.ts +2 -2
- package/dist/components/questions/SelectQuestion.d.ts +2 -2
- package/dist/components/questions/SliderQuestion.d.ts +2 -2
- package/dist/components/questions/SplitToUnitsQuestion.d.ts +2 -2
- package/dist/components/questions/StringQuestion.d.ts +2 -2
- package/dist/components/questions/TextareaQuestion.d.ts +2 -2
- package/dist/core/curlies_interpolator.d.ts +2 -2
- package/dist/core/index.d.ts +7 -7
- package/dist/core/panel_logic.d.ts +2 -2
- package/dist/core/quby_context.d.ts +2 -2
- package/dist/core/questionnaire.d.ts +2 -2
- package/dist/core/questionnaire_json.d.ts +2 -1
- package/dist/core/response.d.ts +4 -4
- package/dist/core/response_json.d.ts +2 -2
- package/dist/core/validators.d.ts +2 -2
- package/dist/core/visibility_rules.d.ts +2 -2
- package/dist/i18n.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/logic/index.d.ts +3 -3
- package/dist/logic/use_might_become_valid.d.ts +1 -1
- package/dist/logic/use_question_shortkeys.d.ts +2 -2
- package/dist/quby-frontend.es.js +7813 -8663
- package/dist/quby-frontend.umd.js +7482 -8333
- package/dist/stories/_helpers.d.ts +3 -4
- package/package.json +14 -24
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { IDisplayOptions, IInterpolateTextvars, Questionnaire, Response } from
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IDisplayOptions, IInterpolateTextvars, Questionnaire, Response } from '../core';
|
|
3
3
|
export declare const InterpolateCurliesContext: React.Context<IInterpolateTextvars>;
|
|
4
4
|
interface Props {
|
|
5
5
|
questionnaire: Questionnaire;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { IDisplayOptions } from
|
|
3
|
-
import { PanelLogic } from
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IDisplayOptions } from '../core';
|
|
3
|
+
import { PanelLogic } from '../core/panel_logic';
|
|
4
4
|
export interface INavigationCallbacks {
|
|
5
5
|
done: () => void;
|
|
6
6
|
prev?: () => void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { Response, IDisplayOptions, IResponseJson } from
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Response, IDisplayOptions, IResponseJson } from '../core';
|
|
3
3
|
export interface Props {
|
|
4
4
|
questionnaireJson: any;
|
|
5
5
|
responseJson: IResponseJson;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from './AnswerPage';
|
|
2
|
+
export * from './Quby';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { ICheckBoxQuestion, IFieldState, SetQuestionRef } from
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ICheckBoxQuestion, IFieldState, SetQuestionRef } from '../../core';
|
|
3
3
|
type CheckBoxFieldState = IFieldState<Set<string>>;
|
|
4
4
|
interface Props {
|
|
5
5
|
question: ICheckBoxQuestion;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { IFieldState, IStringQuestion, SetQuestionRef } from
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IFieldState, IStringQuestion, SetQuestionRef } from '../../core';
|
|
3
3
|
interface Props {
|
|
4
4
|
question: IStringQuestion;
|
|
5
5
|
fieldState: IFieldState<string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { DatePartsComponent, IDatePartsQuestion, IFieldState, SetQuestionRef } from
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { DatePartsComponent, IDatePartsQuestion, IFieldState, SetQuestionRef } from '../../core';
|
|
3
3
|
interface Props {
|
|
4
4
|
question: IDatePartsQuestion;
|
|
5
5
|
fieldState: IFieldState<Map<DatePartsComponent, string>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { IFieldState, IFloatQuestion, SetQuestionRef } from
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IFieldState, IFloatQuestion, SetQuestionRef } from '../../core';
|
|
3
3
|
interface Props {
|
|
4
4
|
question: IFloatQuestion;
|
|
5
5
|
fieldState: IFieldState<number>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { IFieldState, IIntegerQuestion, SetQuestionRef } from
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IFieldState, IIntegerQuestion, SetQuestionRef } from '../../core';
|
|
3
3
|
interface Props {
|
|
4
4
|
question: IIntegerQuestion;
|
|
5
5
|
fieldState: IFieldState<number>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { IFieldState, ISliderQuestion, SetQuestionRef } from
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IFieldState, ISliderQuestion, SetQuestionRef } from '../../core';
|
|
3
3
|
interface Props {
|
|
4
4
|
question: ISliderQuestion;
|
|
5
5
|
fieldState: IFieldState<number>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { IFieldState, IRadioQuestion, SetQuestionRef } from
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IFieldState, IRadioQuestion, SetQuestionRef } from '../../core';
|
|
3
3
|
interface Props {
|
|
4
4
|
question: IRadioQuestion;
|
|
5
5
|
fieldState: IFieldState<string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { IFieldState, IScaleQuestion, SetQuestionRef } from
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IFieldState, IScaleQuestion, SetQuestionRef } from '../../core';
|
|
3
3
|
interface Props {
|
|
4
4
|
question: IScaleQuestion;
|
|
5
5
|
fieldState: IFieldState<string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { IFieldState, ISelectQuestion, SetQuestionRef } from
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IFieldState, ISelectQuestion, SetQuestionRef } from '../../core';
|
|
3
3
|
interface Props {
|
|
4
4
|
question: ISelectQuestion;
|
|
5
5
|
fieldState: IFieldState<string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { IFieldState, ISliderQuestion, SetQuestionRef } from
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IFieldState, ISliderQuestion, SetQuestionRef } from '../../core';
|
|
3
3
|
interface Props {
|
|
4
4
|
question: ISliderQuestion;
|
|
5
5
|
fieldState: IFieldState<number>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { IFieldState, ISplitToUnitsQuestion, SetQuestionRef } from
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IFieldState, ISplitToUnitsQuestion, SetQuestionRef } from '../../core';
|
|
3
3
|
interface Props {
|
|
4
4
|
question: ISplitToUnitsQuestion;
|
|
5
5
|
fieldState: IFieldState<number>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { IFieldState, IStringQuestion, SetQuestionRef } from
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { IFieldState, IStringQuestion, SetQuestionRef } from '../../core';
|
|
3
3
|
interface Props {
|
|
4
4
|
question: IStringQuestion;
|
|
5
5
|
fieldState: IFieldState<string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { ITextareaQuestion, IFieldState } from
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ITextareaQuestion, IFieldState } from '../../core';
|
|
3
3
|
interface Props {
|
|
4
4
|
question: ITextareaQuestion;
|
|
5
5
|
fieldState: IFieldState<string>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Questionnaire } from
|
|
2
|
-
import { Response } from
|
|
1
|
+
import { Questionnaire } from './questionnaire';
|
|
2
|
+
import { Response } from './response';
|
|
3
3
|
export declare class CurliesInterpolator {
|
|
4
4
|
response: Response;
|
|
5
5
|
questionnaire: Questionnaire;
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
7
|
-
export * from
|
|
1
|
+
export * from './questionnaire_json';
|
|
2
|
+
export * from './questionnaire';
|
|
3
|
+
export * from './response';
|
|
4
|
+
export * from './quby_context';
|
|
5
|
+
export * from './validators';
|
|
6
|
+
export * from './response_json';
|
|
7
|
+
export * from './curlies_interpolator';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { Response, Questionnaire, IDisplayOptions } from
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Response, Questionnaire, IDisplayOptions } from '.';
|
|
3
3
|
export type SetQuestionRef = (key: string, ref: React.RefObject<HTMLElement | null>) => void;
|
|
4
4
|
export interface IQubyContext {
|
|
5
5
|
questionnaire: Questionnaire;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IQuestionnaire, IQuestion, IPanel, ITextvar, IValidation, IQuestions, ISexpVariables, ISelectOption, IRadioOption } from
|
|
2
|
-
import { VisibilityRule } from
|
|
1
|
+
import { IQuestionnaire, IQuestion, IPanel, ITextvar, IValidation, IQuestions, ISexpVariables, ISelectOption, IRadioOption } from './questionnaire_json';
|
|
2
|
+
import { VisibilityRule } from './visibility_rules';
|
|
3
3
|
export declare class Questionnaire {
|
|
4
4
|
#private;
|
|
5
5
|
key: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from
|
|
1
|
+
import { z } from 'zod';
|
|
2
2
|
export interface ITranslatable {
|
|
3
3
|
t: string;
|
|
4
4
|
[interpolationKey: string]: string | number;
|
|
@@ -354,5 +354,6 @@ export interface IDisplayOptions {
|
|
|
354
354
|
displayMode: "paged" | "single_page" | "bulk";
|
|
355
355
|
darkMode: boolean;
|
|
356
356
|
newLayout: boolean;
|
|
357
|
+
dir: "ltr" | "rtl";
|
|
357
358
|
}
|
|
358
359
|
export {};
|
package/dist/core/response.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { z } from
|
|
2
|
-
import { Questionnaire } from
|
|
3
|
-
import { IPanel, ITranslatable, IValidation } from
|
|
4
|
-
import { Calculations } from
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
import { Questionnaire } from './questionnaire';
|
|
3
|
+
import { IPanel, ITranslatable, IValidation } from './questionnaire_json';
|
|
4
|
+
import { Calculations } from './calculations';
|
|
5
5
|
export interface IAnswerFromServer {
|
|
6
6
|
value: IValues;
|
|
7
7
|
flags: IFlags;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Questionnaire } from
|
|
2
|
-
import { IAnswerFromServer } from
|
|
1
|
+
import { Questionnaire } from './questionnaire';
|
|
2
|
+
import { IAnswerFromServer } from './response';
|
|
3
3
|
export declare class ResponseParseError extends Error {
|
|
4
4
|
}
|
|
5
5
|
export interface IResponseJson {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { IAnswerGroupMaximumValidation, IAnswerGroupMinimumValidation, IRequiresAnswerValidation, IValidation, IMinimumValidation, IMaximumValidation, IMinimumDateValidation, IMinimumCheckedRequiredValidation, IMaximumCheckedAllowedValidation, IMaximumDateValidation, IValidDateValidation, IValidIntegerValidation, IValidFloatValidation, IRegexpValidation } from
|
|
2
|
-
import { Response } from
|
|
1
|
+
import { IAnswerGroupMaximumValidation, IAnswerGroupMinimumValidation, IRequiresAnswerValidation, IValidation, IMinimumValidation, IMaximumValidation, IMinimumDateValidation, IMinimumCheckedRequiredValidation, IMaximumCheckedAllowedValidation, IMaximumDateValidation, IValidDateValidation, IValidIntegerValidation, IValidFloatValidation, IRegexpValidation } from './questionnaire_json';
|
|
2
|
+
import { Response } from './response';
|
|
3
3
|
export type ValidatableResponse = Pick<Response, "getValidationFieldState">;
|
|
4
4
|
export declare const ignorableErrors: IValidation["type"][];
|
|
5
5
|
export declare function buildValidator(data: IValidation): RequiresAnswerValidator | ValidIntegerValidator | ValidFloatValidator | ValidDateValidator | MinimumValidator | MaximumValidator | MinimumDateValidator | MaximumDateValidator | MinimumCheckedRequiredValidator | MaximumCheckedAllowedValidator | AnswerGroupMinimumValidator | AnswerGroupMaximumValidator | RegexpValidator;
|
package/dist/i18n.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import i18n from
|
|
1
|
+
import { default as i18n } from 'i18next';
|
|
2
2
|
export default i18n;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
1
|
+
export * from './core';
|
|
2
|
+
export * from './components';
|
package/dist/logic/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
1
|
+
export * from './use_might_become_valid';
|
|
2
|
+
export * from './use_question_shortkeys';
|
|
3
|
+
export * from './map_css_vars';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from
|
|
1
|
+
import { default as React } from 'react';
|
|
2
2
|
export declare function useMightBecomeValid(value: string | undefined, handleChange: (newValue: string) => string | undefined): {
|
|
3
3
|
onChange: (event: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void;
|
|
4
4
|
value: string;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import React from
|
|
2
|
-
import { Response, Questionnaire } from
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { Response, Questionnaire } from '../core';
|
|
3
3
|
export declare const useQuestionShortkeys: (response: Response, questionnaire: Questionnaire, qubyRef: React.RefObject<HTMLDivElement | null>) => void;
|