Skip to content
Snippets Groups Projects
Commit 0545e3be authored by rhenck's avatar rhenck
Browse files

Add likert interfaces

parent eeb98c47
No related branches found
No related tags found
No related merge requests found
...@@ -31,3 +31,14 @@ export interface MediaElement { ...@@ -31,3 +31,14 @@ export interface MediaElement {
showRestRuns: boolean; // true (wenn maxRuns) showRestRuns: boolean; // true (wenn maxRuns)
showRestTime: boolean; // true showRestTime: boolean; // true
} }
export interface AnswerOption {
text: string;
imgSrc: string | null;
position: 'above' | 'below';
}
export interface LikertRow {
text: string;
columnCount: number;
}
import { AnswerOption, UIElement } from '../uI-element'; import { UIElement } from '../uI-element';
import { LikertElementRow } from './likert-element-row'; import { LikertElementRow } from './likert-element-row';
import { AnswerOption } from '../../interfaces/UIElementInterfaces';
export class LikertElement extends UIElement { export class LikertElement extends UIElement {
questions: LikertElementRow[] = [ questions: LikertElementRow[] = [
......
// eslint-disable-next-line max-classes-per-file // eslint-disable-next-line max-classes-per-file
import { IdService } from '../id.service'; import { IdService } from '../id.service';
import { AnswerOption, LikertRow } from '../interfaces/UIElementInterfaces';
export type UIElementType = 'text' | 'button' | 'text-field' | 'text-area' | 'checkbox' export type UIElementType = 'text' | 'button' | 'text-field' | 'text-area' | 'checkbox'
| 'dropdown' | 'radio' | 'image' | 'audio' | 'video'; | 'dropdown' | 'radio' | 'image' | 'audio' | 'video' | 'likert' | 'likert_row';
export type InputElementValue = string | number | boolean | null; export type InputElementValue = string | number | boolean | null;
export abstract class UIElement { export abstract class UIElement {
[index: string]: string | number | boolean | string[] | null | ((...args: any) => any); [index: string]: string | number | boolean | string[] | AnswerOption[] | LikertRow[] | null | ((...args: any) => any);
type!: UIElementType; type!: UIElementType;
id: string = 'id_placeholder'; id: string = 'id_placeholder';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment