Skip to content

Commit

Permalink
Add type to InputRadioNumber in Generator
Browse files Browse the repository at this point in the history
Add type to InputRadioNumber
Add inputRadioNumberBase
  • Loading branch information
samuel-duhaime authored and kaligrafy committed Apr 8, 2024
1 parent 7fc4ab8 commit e08cb0e
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/evolution-generator/src/common/defaultInputBase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,17 @@ export const inputRadioBase: inputTypes.InputRadioBase = {
columns: 1
};

// Input Radio Number default params
export const inputRadioNumberBase: inputTypes.InputRadioNumberBase = {
type: 'question',
inputType: 'radioNumber',
datatype: 'integer',
containsHtml: true,
twoColumns: false,
columns: 1,
sameLine: true,
};

// Input String default params
export const inputStringBase: inputTypes.InputStringBase = {
type: 'question',
Expand Down
23 changes: 23 additions & 0 deletions packages/evolution-generator/src/types/inputTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,29 @@ export type InputRadio = InputRadioBase & {
addCustom?: AddCustom;
};

/* InputRadioNumber widgetConfig Type */
export type InputRadioNumberBase = {
type: 'question';
inputType: 'radioNumber';
datatype: 'integer';
containsHtml: ContainsHtml;
twoColumns: TwoColumns;
columns: Columns;
sameLine?: boolean;
};
export type InputRadioNumber = InputRadioNumberBase & {
path: Path;
label: Label;
valueRange: {
min: number;
max: number;
};
overMaxAllowed: boolean,
helpPopup?: HelpPopup;
conditional: Conditional;
validations?: Validations;
};

/* InputString widgetConfig Type */
export type InputStringBase = {
type: 'question';
Expand Down

0 comments on commit e08cb0e

Please sign in to comment.