@roqua/quby-frontend 0.9.8 → 0.9.10

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,7 +1,6 @@
1
1
  import React from "react";
2
2
  import { IFieldState, IQuestion } from "../core";
3
3
  interface Props {
4
- className?: string;
5
4
  question: IQuestion;
6
5
  fieldState: IFieldState<any>;
7
6
  setQuestionRef: (key: string, ref: React.RefObject<HTMLElement>) => void;
@@ -3,12 +3,16 @@ import { VisibilityRule } from "./visibility_rules";
3
3
  export declare class Questionnaire {
4
4
  key: string;
5
5
  panels: IPanel[];
6
+ footer?: string;
6
7
  questions: IQuestions;
7
8
  validations: IValidation[];
8
9
  visibilityRules: VisibilityRule[];
9
10
  textvars: ITextvar[];
10
11
  sexpVariables: ISexpVariables;
11
12
  defaultAnswerValue: unknown;
13
+ cssVars: {
14
+ [key: string]: string | number;
15
+ } | undefined;
12
16
  layoutVersion: "v1" | "v2";
13
17
  constructor(data: IQuestionnaire);
14
18
  getField(key: string): IQuestion;
@@ -80,6 +80,9 @@ interface IBaseField {
80
80
  as?: string | null;
81
81
  parentKey?: string;
82
82
  parentOptionKey?: string;
83
+ cssVars?: {
84
+ [key: string]: string;
85
+ };
83
86
  }
84
87
  interface DatePart {
85
88
  part: DatePartsComponent;
@@ -165,20 +168,24 @@ export interface ICheckBoxQuestion extends IBaseField {
165
168
  export interface IOption {
166
169
  type: "option";
167
170
  key: string;
171
+ hidden?: true;
168
172
  viewId: string;
169
173
  }
170
174
  export interface ICheckBoxOption extends IOption {
171
175
  questions: IQuestion[];
172
- description: string;
176
+ label?: string;
177
+ description?: string;
173
178
  }
174
179
  export interface IRadioOption extends IOption {
175
180
  value: number;
176
181
  questions: IQuestion[];
182
+ label?: string;
177
183
  description?: string;
178
184
  }
179
185
  export interface ISelectOption extends IOption {
180
186
  value: number;
181
- description: string;
187
+ label?: string;
188
+ description?: string;
182
189
  }
183
190
  export interface IHtmlOption {
184
191
  type: "html";
@@ -282,6 +289,7 @@ export type ISexpVariables = {
282
289
  export interface IQuestionnaire {
283
290
  key: string;
284
291
  title: string;
292
+ footer?: string;
285
293
  language: string;
286
294
  panels: IPanel[];
287
295
  questions: IQuestions;
@@ -292,6 +300,9 @@ export interface IQuestionnaire {
292
300
  };
293
301
  sexpVariables?: ISexpVariables;
294
302
  defaultAnswerValue?: unknown;
303
+ cssVars?: {
304
+ [key: string]: string;
305
+ };
295
306
  layoutVersion?: "v1" | "v2";
296
307
  }
297
308
  export interface IDisplayOptions {
@@ -1,2 +1,3 @@
1
1
  export * from "./use_might_become_valid";
2
2
  export * from "./use_question_shortkeys";
3
+ export * from "./map_css_vars";
@@ -0,0 +1,4 @@
1
+ import { CSSProperties } from 'react';
2
+ export declare const mapCssVars: (cssVars: {
3
+ [key: string]: string | number;
4
+ } | undefined) => CSSProperties | undefined;