@roqua/quby-frontend 0.9.7 → 0.9.9

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;
@@ -9,6 +9,9 @@ export declare class Questionnaire {
9
9
  textvars: ITextvar[];
10
10
  sexpVariables: ISexpVariables;
11
11
  defaultAnswerValue: unknown;
12
+ cssVars: {
13
+ [key: string]: string | number;
14
+ } | undefined;
12
15
  layoutVersion: "v1" | "v2";
13
16
  constructor(data: IQuestionnaire);
14
17
  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";
@@ -292,6 +299,9 @@ export interface IQuestionnaire {
292
299
  };
293
300
  sexpVariables?: ISexpVariables;
294
301
  defaultAnswerValue?: unknown;
302
+ cssVars?: {
303
+ [key: string]: string;
304
+ };
295
305
  layoutVersion?: "v1" | "v2";
296
306
  }
297
307
  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;