UNPKG

@vendasta/store

Version:

Components and data for Store

36 lines (35 loc) 1.9 kB
import { EventEmitter, OnInit } from '@angular/core'; import { FormArray, FormGroup, ValidatorFn } from '@angular/forms'; import { OrderFormFieldInterface, OrderFormFieldOptionInterface } from '@vendasta/marketplace-apps/v1'; import { ControlType } from '../field-base'; import * as i0 from "@angular/core"; export declare class FieldBuilderComponent implements OnInit { orderFormFieldGroup: FormGroup; supportedFieldTypes: FormFieldInterface[]; removeField: EventEmitter<string>; showValidators: boolean; showSuffixes: boolean; static createDropDownOption(option: OrderFormFieldOptionInterface, required: boolean): FormGroup; static createDropDownOptions(options: OrderFormFieldOptionInterface[]): FormArray; static createOrderFormFieldGroup(orderFormField: OrderFormFieldInterface): FormGroup; ngOnInit(): void; initForm(): void; getOptionsArray(): FormArray; getCurrentFieldInterface(): string; createIdFromLabel(): void; removeOption(index: number): void; addOption(): void; getFormValues(): OrderFormFieldInterface; static ɵfac: i0.ɵɵFactoryDeclaration<FieldBuilderComponent, never>; static ɵcmp: i0.ɵɵComponentDeclaration<FieldBuilderComponent, "app-field-builder", never, { "orderFormFieldGroup": "orderFormFieldGroup"; "supportedFieldTypes": "supportedFieldTypes"; }, { "removeField": "removeField"; }, never, never>; } export declare function regexValidator(): ValidatorFn; export declare function numberValidator(): ValidatorFn; export interface FormFieldInterface { id: ControlType; name: string; } export declare const FORM_FIELDS: FormFieldInterface[]; export declare function getFieldInterface(formFieldId: string): FormFieldInterface; export declare function getFormFieldInterfaceFromId(id: ControlType): FormFieldInterface; export declare function convertLabelInputIntoId(labelValue: string): string;