import { OnInit, ElementRef, QueryList } from '@angular/core'; import { FormGroup } from '@angular/forms'; import { CfCoreComponent } from '../core/core.component'; import { CfInputComponent } from '../input/input.component'; import { CfGroupComponent } from '../group/group.component'; import { CfSelectComponent } from '../select/select.component'; import { FormQuestionModel } from '../../models/form/form-question.model'; import { FormQuestionStylingModel } from '../../models/form/form-question-styling.model'; import { TemplateService } from '../../services/template-service/template.service'; /** *

CF Form Question Component

*
 * 
 * import {{'{'}} FormQuestionModel {{'}'}} from 'cedrus-fusion'
 * import {{'{'}} FormQuestionStylingModel {{'}'}} from 'cedrus-fusion'
 * <cf-form-question></cf-form-question>
 * 
 * 
*/ export declare class CfFormQuestionComponent extends CfCoreComponent implements OnInit { elementRef: ElementRef; /** *

Example:

*
{{'{'}}
     *  questionID: '1',
     *  componentType: 'checkbox',
     *  required: true,
     *  key: 'status',
     *  value: 'single',
     *  label: 'Marital status',
     *  minSelected: 1,
     *  maxSelected: 2,
     *  items: [
     *    {{'{'}} label: 'Single', value: 'single' {{'}'}},
     *    {{'{'}} label: 'Married', value: 'married' {{'}'}},
     *    {{'{'}} label: 'Engaged', value: 'engaged' {{'}'}}
     *  ]
     *  details: {{'{'}} key: 'status', value: 'married;engaged' {{'}'}}
     * {{'}'}}
*

questionID: string

* String question ID *

componentType: string

* Тape of the component by which the question should be displayed. Can be: input, checkbox, switch, radio, select. *

required: boolean

* Whether question is required *

key: string

* Question key *

value: string

* Question value *

label: string

* Question label *

minSelected: number

* Property used when componentType is: checkbox or switch *

maxSelected: number

* Property used when componentType is: checkbox or switch *

items: array

* Array with items for selection *

validation: any

* Validation settings *

details: any

* Question details */ properties: FormQuestionModel; /** *

Styling object:

*

container: StylingModel

* Styling properties for main container *

errorMessage: StylingModel

* Styling for the section with validation errors messages */ styling: FormQuestionStylingModel; /** * Question ID */ questionID: string; /** * Тape of the component by which the question should be displayed. Can be: input, checkbox, switch, radio, select. */ componentType: string; /** * Type of cf-input */ type: string; /** * Whether question is required */ required: boolean; /** * Question key */ key: string; /** * Question value */ value: string; /** * Question label */ label: string; /** * Property used when componentType is: checkbox or switch. */ minSelected: number; /** * Property used when componentType is: checkbox, radio or switch. */ maxSelected: number; /** * Array with items for selection */ items: any[]; /** * Validation settings */ validation: any; /** * Question details */ details: any; /** @hidden */ form: FormGroup; /** @hidden */ readonly isValid: boolean; /** @hidden */ inputs: QueryList; /** @hidden */ groups: QueryList; /** @hidden */ selects: QueryList; /** @hidden */ private userValues; /** @hidden */ private dataForComponents; /** @hidden */ constructor(elementRef: ElementRef, /**@hidden */ templateService: TemplateService); /** @hidden */ ngOnInit(): void; /** @hidden * Prepare data according to the value of componentType */ populateProperties(addAsterix: any): void; }