@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.
Files changed (48) hide show
  1. package/dist/components/AnswerPage.d.ts +2 -2
  2. package/dist/components/MainLabel.d.ts +2 -2
  3. package/dist/components/Paginator.d.ts +3 -3
  4. package/dist/components/PanelContent.d.ts +2 -2
  5. package/dist/components/PanelItem.d.ts +2 -2
  6. package/dist/components/ProgressBar.d.ts +1 -1
  7. package/dist/components/Quby.d.ts +2 -2
  8. package/dist/components/QuestionDescription.d.ts +1 -1
  9. package/dist/components/QuestionWrapper.d.ts +2 -2
  10. package/dist/components/SubQuestions.d.ts +2 -2
  11. package/dist/components/ValidationErrors.d.ts +2 -2
  12. package/dist/components/index.d.ts +2 -2
  13. package/dist/components/items/HtmlItem.d.ts +2 -2
  14. package/dist/components/items/InfoItem.d.ts +2 -2
  15. package/dist/components/items/QuestionItem.d.ts +1 -1
  16. package/dist/components/items/UnknownItem.d.ts +2 -2
  17. package/dist/components/questions/CheckBoxQuestion.d.ts +2 -2
  18. package/dist/components/questions/CountrySelectQuestion.d.ts +2 -2
  19. package/dist/components/questions/DatePartsQuestion.d.ts +2 -2
  20. package/dist/components/questions/FloatQuestion.d.ts +2 -2
  21. package/dist/components/questions/IntegerQuestion.d.ts +2 -2
  22. package/dist/components/questions/OldSliderQuestion.d.ts +2 -2
  23. package/dist/components/questions/RadioQuestion.d.ts +2 -2
  24. package/dist/components/questions/ScaleQuestion.d.ts +2 -2
  25. package/dist/components/questions/SelectQuestion.d.ts +2 -2
  26. package/dist/components/questions/SliderQuestion.d.ts +2 -2
  27. package/dist/components/questions/SplitToUnitsQuestion.d.ts +2 -2
  28. package/dist/components/questions/StringQuestion.d.ts +2 -2
  29. package/dist/components/questions/TextareaQuestion.d.ts +2 -2
  30. package/dist/core/curlies_interpolator.d.ts +2 -2
  31. package/dist/core/index.d.ts +7 -7
  32. package/dist/core/panel_logic.d.ts +2 -2
  33. package/dist/core/quby_context.d.ts +2 -2
  34. package/dist/core/questionnaire.d.ts +2 -2
  35. package/dist/core/questionnaire_json.d.ts +2 -1
  36. package/dist/core/response.d.ts +4 -4
  37. package/dist/core/response_json.d.ts +2 -2
  38. package/dist/core/validators.d.ts +2 -2
  39. package/dist/core/visibility_rules.d.ts +2 -2
  40. package/dist/i18n.d.ts +1 -1
  41. package/dist/index.d.ts +2 -2
  42. package/dist/logic/index.d.ts +3 -3
  43. package/dist/logic/use_might_become_valid.d.ts +1 -1
  44. package/dist/logic/use_question_shortkeys.d.ts +2 -2
  45. package/dist/quby-frontend.es.js +7813 -8663
  46. package/dist/quby-frontend.umd.js +7482 -8333
  47. package/dist/stories/_helpers.d.ts +3 -4
  48. package/package.json +14 -24
@@ -1,5 +1,5 @@
1
- import React from "react";
2
- import { IDisplayOptions, IInterpolateTextvars, Questionnaire, Response } from "../core";
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,5 +1,5 @@
1
- import React from "react";
2
- import { IQuestion } from "../core";
1
+ import { default as React } from 'react';
2
+ import { IQuestion } from '../core';
3
3
  interface Props {
4
4
  question: IQuestion;
5
5
  }
@@ -1,6 +1,6 @@
1
- import React from "react";
2
- import { IDisplayOptions } from "../core";
3
- import { PanelLogic } from "../core/panel_logic";
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 "react";
2
- import { IPanel } from "../core";
1
+ import { default as React } from 'react';
2
+ import { IPanel } from '../core';
3
3
  interface Props {
4
4
  panel: IPanel;
5
5
  }
@@ -1,5 +1,5 @@
1
- import React from "react";
2
- import { IPanelItem } from "../core";
1
+ import { default as React } from 'react';
2
+ import { IPanelItem } from '../core';
3
3
  interface Props {
4
4
  item: IPanelItem;
5
5
  }
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import { default as React } from 'react';
2
2
  interface Props {
3
3
  max: number;
4
4
  current: number;
@@ -1,5 +1,5 @@
1
- import React from "react";
2
- import { Response, IDisplayOptions, IResponseJson } from "../core";
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,4 +1,4 @@
1
- import React from "react";
1
+ import { default as React } from 'react';
2
2
  interface HasDescription {
3
3
  description?: string;
4
4
  }
@@ -1,5 +1,5 @@
1
- import React from "react";
2
- import { IFieldState, IQuestion } from "../core";
1
+ import { default as React } from 'react';
2
+ import { IFieldState, IQuestion } from '../core';
3
3
  interface Props {
4
4
  question: IQuestion;
5
5
  fieldState: IFieldState<any>;
@@ -1,5 +1,5 @@
1
- import React from "react";
2
- import { IQuestion } from "../core";
1
+ import { default as React } from 'react';
2
+ import { IQuestion } from '../core';
3
3
  export declare const SubQuestions: React.FunctionComponent<{
4
4
  questions: IQuestion[];
5
5
  }>;
@@ -1,5 +1,5 @@
1
- import React from "react";
2
- import { IValidated } from "../core";
1
+ import { default as React } from 'react';
2
+ import { IValidated } from '../core';
3
3
  interface Props {
4
4
  fieldState: IValidated;
5
5
  }
@@ -1,2 +1,2 @@
1
- export * from "./AnswerPage";
2
- export * from "./Quby";
1
+ export * from './AnswerPage';
2
+ export * from './Quby';
@@ -1,5 +1,5 @@
1
- import React from "react";
2
- import { IHtmlItem } from "../../core";
1
+ import { default as React } from 'react';
2
+ import { IHtmlItem } from '../../core';
3
3
  interface Props {
4
4
  item: IHtmlItem;
5
5
  }
@@ -1,5 +1,5 @@
1
- import React from "react";
2
- import { IInfoItem } from "../../core";
1
+ import { default as React } from 'react';
2
+ import { IInfoItem } from '../../core';
3
3
  interface Props {
4
4
  item: IInfoItem;
5
5
  }
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import { default as React } from 'react';
2
2
  interface Props {
3
3
  fieldKey: string;
4
4
  }
@@ -1,5 +1,5 @@
1
- import React from "react";
2
- import { IPanelItem } from "../../core";
1
+ import { default as React } from 'react';
2
+ import { IPanelItem } from '../../core';
3
3
  interface Props {
4
4
  item: IPanelItem;
5
5
  }
@@ -1,5 +1,5 @@
1
- import React from "react";
2
- import { ICheckBoxQuestion, IFieldState, SetQuestionRef } from "../../core";
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 "react";
2
- import { IFieldState, IStringQuestion, SetQuestionRef } from "../../core";
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 "react";
2
- import { DatePartsComponent, IDatePartsQuestion, IFieldState, SetQuestionRef } from "../../core";
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 "react";
2
- import { IFieldState, IFloatQuestion, SetQuestionRef } from "../../core";
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 "react";
2
- import { IFieldState, IIntegerQuestion, SetQuestionRef } from "../../core";
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 "react";
2
- import { IFieldState, ISliderQuestion, SetQuestionRef } from "../../core";
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 "react";
2
- import { IFieldState, IRadioQuestion, SetQuestionRef } from "../../core";
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 "react";
2
- import { IFieldState, IScaleQuestion, SetQuestionRef } from "../../core";
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 "react";
2
- import { IFieldState, ISelectQuestion, SetQuestionRef } from "../../core";
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 "react";
2
- import { IFieldState, ISliderQuestion, SetQuestionRef } from "../../core";
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 "react";
2
- import { IFieldState, ISplitToUnitsQuestion, SetQuestionRef } from "../../core";
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 "react";
2
- import { IFieldState, IStringQuestion, SetQuestionRef } from "../../core";
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 "react";
2
- import { ITextareaQuestion, IFieldState } from "../../core";
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 "./questionnaire";
2
- import { Response } from "./response";
1
+ import { Questionnaire } from './questionnaire';
2
+ import { Response } from './response';
3
3
  export declare class CurliesInterpolator {
4
4
  response: Response;
5
5
  questionnaire: Questionnaire;
@@ -1,7 +1,7 @@
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
+ 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 { IPanel } from "./questionnaire_json";
2
- import { Response } from "./response";
1
+ import { IPanel } from './questionnaire_json';
2
+ import { Response } from './response';
3
3
  export declare class PanelLogic {
4
4
  private response;
5
5
  panels: IPanel[];
@@ -1,5 +1,5 @@
1
- import React from "react";
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 "./questionnaire_json";
2
- import { VisibilityRule } from "./visibility_rules";
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 "zod";
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 {};
@@ -1,7 +1,7 @@
1
- import { z } from "zod";
2
- import { Questionnaire } from "./questionnaire";
3
- import { IPanel, ITranslatable, IValidation } from "./questionnaire_json";
4
- import { Calculations } from "./calculations";
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 "./questionnaire";
2
- import { IAnswerFromServer } from "./response";
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 "./questionnaire_json";
2
- import { Response } from "./response";
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;
@@ -1,5 +1,5 @@
1
- import { IVisibilityRule } from "./questionnaire_json";
2
- import { Response } from "./response";
1
+ import { IVisibilityRule } from './questionnaire_json';
2
+ import { Response } from './response';
3
3
  interface ICondition {
4
4
  match(response: Response): boolean;
5
5
  }
package/dist/i18n.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- import i18n from "i18next";
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 "./core";
2
- export * from "./components";
1
+ export * from './core';
2
+ export * from './components';
@@ -1,3 +1,3 @@
1
- export * from "./use_might_become_valid";
2
- export * from "./use_question_shortkeys";
3
- export * from "./map_css_vars";
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 "react";
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 "react";
2
- import { Response, Questionnaire } from "../core";
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;