import * as i0 from '@angular/core'; import { OnInit, DestroyRef, EventEmitter, OnDestroy, ElementRef, AfterContentInit, AfterViewInit, Renderer2, ViewContainerRef, Type, PipeTransform } from '@angular/core'; import * as i2 from '@angular/common'; import * as _angular_forms from '@angular/forms'; import { ValidatorFn, FormGroup, AbstractControl, FormControl, FormArray, ControlValueAccessor, NgControl } from '@angular/forms'; import * as i3 from '@tft/form-validation-handler'; import { ErrorDictionary } from '@tft/form-validation-handler'; import { ThemePalette } from '@angular/material/core'; import * as rxjs from 'rxjs'; import { Observable, Subscription, BehaviorSubject, merge } from 'rxjs'; import { TooltipPosition } from '@angular/material/tooltip'; import { MatFormFieldAppearance } from '@angular/material/form-field'; import { MatCalendarCellClassFunction } from '@angular/material/datepicker'; import { ComponentType, Portal } from '@angular/cdk/portal'; import { GoogleMap, MapGeocoder, MapInfoWindow, MapMarker } from '@angular/google-maps'; import { MatAutocompleteTrigger, MatAutocompleteSelectedEvent } from '@angular/material/autocomplete'; import { MatSelect } from '@angular/material/select'; import { CdkOverlayOrigin, ConnectionPositionPair } from '@angular/cdk/overlay'; import { MatChipInputEvent } from '@angular/material/chips'; import { DomSanitizer } from '@angular/platform-browser'; import * as _tft_crispr_forms from '@tft/crispr-forms'; declare function valueIn(values: string[]): rxjs.OperatorFunction; declare enum ControlType { AUTOCOMPLETE = "autocomplete", AUTOCOMPLETE_CHIPLIST = "autocompleteChiplist", BUTTON = "button", CHECKBOX = "checkbox", CUSTOM = "custom", DATEPICKER = "datepicker", DIVIDER = "divider", FILE_UPLOAD = "fileUpload", GROUP_LIST = "groupList", HEADING = "heading", IMAGE_UPLOAD = "imageUpload", INPUT = "input", MAP = "map", RADIO = "radio", SELECT = "select", SLIDER = "slider", SUB_GROUP = "subGroup", TEXTAREA = "textarea", UNIT_CONVERSION = "unitConversion" } /** * The base interface for all the fields in the form's config */ interface CrisprFieldConfig { controlType?: ControlType; classes?: string[]; component?: any; } /** * A utility type that returns the keys of a type if one is passed otherwise return string type */ type RestrictedControlName = M extends null ? string : keyof M; /** * The base interface for all control configs */ interface CrisprControlConfig extends CrisprFieldConfig { controlName: RestrictedControlName; controlType: ControlType; validators?: ValidatorFn[]; computeValue?: (group: FormGroup) => Observable; disabledCallback?: (group: FormGroup) => Observable; /** * Hide the control when disabled * @default false */ hideDisabled?: boolean; heading?: HeadingConfig; hint?: string; } /** * Holds properties for control fields that describe field behavior to users */ interface FieldDescriptors { label: string; info?: Info; fieldSuffix?: string; placeholder?: string; } interface MatFieldProperties { appearance?: MatFormFieldAppearance; color?: ThemePalette; } interface Info { content: string; tooltipPosition?: TooltipPosition; iconName?: string; } interface AbstractGroupConfig { fields?: (AnyFieldConfig | C)[]; } interface FormConfig extends AbstractGroupConfig { classes?: string[]; errorDictionary?: ErrorDictionary; autoComplete?: string; /** @deprecated use autoComplete */ autocomplete?: string; validators?: ValidatorFn[]; /** * Angular Material density scale applied to all form fields. * 0 = default size, -5 = most compact. */ density?: 0 | -1 | -2 | -3 | -4 | -5; } /** * Configuration for SubGroup components */ interface SubGroupConfig extends CrisprControlConfig, AbstractGroupConfig { controlType: ControlType.SUB_GROUP; } type AnyFieldConfig = InputFieldConfig | SelectFieldConfig | RadioFieldConfig | FormGroupListConfig | SubGroupConfig | AutocompleteFieldConfig | AutocompleteChiplistFieldConfig | TextareaFieldConfig | CheckboxFieldConfig | DatepickerFieldConfig | MapFieldConfig | SliderFieldConfig | FileUploadFieldConfig | ImageUploadFieldConfig | HeadingConfig | ButtonConfig | DividerConfig | UnitConversionFieldConfig; type ControlValue = boolean | string | number | Date | SelectOption | SelectOption[] | ControlGroupValue | T; type ControlGroupValue = { [key: string]: ControlValue; }; interface InputFieldConfig extends CrisprControlConfig, FieldDescriptors, MatFieldProperties { controlType: ControlType.INPUT; inputType?: InputType; min?: number; max?: number; maxLength?: number; step?: number; pattern?: string; autofocus?: boolean; spellcheck?: boolean; autoComplete?: string; autoCapitalize?: 'off' | 'on'; } type InputType = 'color' | 'date' | 'datetime-local' | 'email' | 'month' | 'number' | 'password' | 'search' | 'tel' | 'text' | 'time' | 'url' | 'week'; interface SelectFieldConfig extends Omit, FieldDescriptors, MatFieldProperties { controlType: ControlType.SELECT; emptyOptionsMessage?: string; multiple?: boolean; enableToggleAll?: boolean; options: OptionsType; } type OptionsType = SelectOption[] | Observable | OptionsCallback | Promise; type OptionsCallback = (group?: FormGroup) => OptionsType; type ReactiveOptionsCallback = (group?: FormGroup) => Observable; type AutocompleteOptionsCallback = (group?: FormGroup, searchTerm?: string) => OptionsType; interface SelectOption { label: string; value: any; imageUrl?: string; info?: Info; } declare const DEFAULT_EMPTY_OPTIONS_MESSAGE = "No Items"; interface RadioFieldConfig extends Omit, Omit, MatFieldProperties { controlType: ControlType.RADIO; options: OptionsType; } interface AbstractAutocompleteFieldConfig extends CrisprControlConfig, FieldDescriptors, MatFieldProperties { typeToEmit?: boolean; typeDebounceTime?: number; emptyOptionsMessage?: string; options: AutocompleteOptionsCallback; autoActiveFirstOption?: boolean; imageUrlParam?: string; displayWith?: (options: SelectOption[]) => (value: unknown) => string; } interface AutocompleteFieldConfig extends AbstractAutocompleteFieldConfig { controlType: ControlType.AUTOCOMPLETE; } interface CreateChipConfig { /** Label for the "Create New" option in the autocomplete dropdown. Defaults to '+ Create New' */ createLabel?: string; /** Field configs rendered inside the create form overlay */ fields: AnyFieldConfig[]; /** Called when the user submits the create form. Should return the new chip as a SelectOption. */ submitChip: (group: FormGroup) => Observable; /** Label for the submit button. Defaults to 'Add' */ submitLabel?: string; } interface AutocompleteChiplistFieldConfig extends AbstractAutocompleteFieldConfig, FieldDescriptors, MatFieldProperties { controlType: ControlType.AUTOCOMPLETE_CHIPLIST; autoActiveFirstOption?: boolean; chipsSelectable?: boolean; areChipsRemovable?: boolean; allowDuplicates?: boolean; duplicateCompareFunction?: (chip: SelectOption, availableOption: SelectOption) => boolean; /** * Pass in any key codes to use for selection */ separatorKeyCodes?: number[]; tabToSelect?: boolean; /** * @deprecated replaced with tabToSelect as it is more accurate */ addChipOnBlur?: boolean; /** Config for creating new chips with complex values via an inline sub-form */ createChip?: CreateChipConfig; } interface CheckboxFieldConfig extends CrisprControlConfig, Pick, Pick { controlType: ControlType.CHECKBOX; labelPosition?: 'before' | 'after'; inline?: boolean; } interface TextareaFieldConfig extends CrisprControlConfig, FieldDescriptors, MatFieldProperties { controlType: ControlType.TEXTAREA; rows?: number; } interface DatepickerFieldConfig extends CrisprControlConfig, Pick, MatFieldProperties { controlType: ControlType.DATEPICKER; min?: Date; max?: Date; startView?: 'month' | 'year' | 'multi-year'; startAt?: Date | ((group: FormGroup) => Observable) | null; touchUi?: boolean; datepickerFilter?: (date: Date) => boolean; cellClassFunction?: MatCalendarCellClassFunction; dateClass?: (parentGroup: FormGroup) => Observable>; /** * Pass a component into mat-datepicker-actions component see [docs](https://material.angular.io/components/datepicker/overview#confirmation-action-buttons) */ datepickerActions?: ComponentType; } interface SliderFieldConfig extends CrisprControlConfig, Pick, Pick { controlType: ControlType.SLIDER; displayWith?: (value: number) => string | number; max?: number; min?: number; step?: number; discrete?: boolean; tickInterval?: number | 'auto'; displayLimits?: boolean; } interface FormGroupListConfig extends CrisprControlConfig { controlType: ControlType.GROUP_LIST; itemConfig: SubGroupConfig; itemLabelBuilder?: (index: number) => string; /** The number of list items that a user can delete */ minListLength?: number; /** If no items are passed as an initial value, should an initial empty item be created */ displayInitialItem?: boolean; addButtonColor?: ThemePalette; addButtonLabel?: string; displayItemComponent?: any; /** * @deprecated Please use addButtonLabel, addItemLabel will be removed in the next major release */ addItemLabel?: string; } interface ButtonConfig extends CrisprFieldConfig, MatFieldProperties { label?: string; controlType: ControlType.BUTTON; type?: 'submit' | 'reset' | 'button'; callback?: (group?: FormGroup, event?: MouseEvent) => unknown; buttonType?: MatButtonType; color?: ThemePalette; icon?: string; info?: Omit; disabledOnInvalidForm?: boolean; } type ButtonType = 'submit' | 'reset' | 'button'; type MatButtonType = 'raised' | 'flat' | 'stroked' | 'icon'; interface HeadingConfig extends Omit, Omit { controlType?: ControlType.HEADING; typographyClass?: string; label: string; } type DividerConfig = Omit & { controlType?: ControlType.DIVIDER; vertical?: boolean; }; type UnitConversionFieldConfig = CrisprControlConfig & FieldDescriptors & MatFieldProperties & { controlType: ControlType.UNIT_CONVERSION; /** * Used convert config value to displayed value on initialization */ initialDisplayValueConversion: (value?: ST, displayedUnit?: UT) => number; /** * The function to convert the display value into the stored value as the display value changes */ storedValueConversion: (value?: string, displayedUnit?: UT) => number; min?: number; max?: number; autofocus?: boolean; step?: number; } & ({ showUnitSelect: true; /** * A callback function that returns the options to be used by the unit select field. Can be used just like select field options. */ selectableUnits: (group: FormGroup) => OptionsType; /** * Display unit to use on component initialization and when unit not user selectable i.e. showUnitSelect: false */ initialDisplayUnit: UT; } | { showUnitSelect: false; }); interface AbstractUploadComponent { isUploaded: boolean; fileProgress: Observable[]; disabled$: Observable; } type FileUploadFieldConfig = CrisprControlConfig & MatFieldProperties & { controlType: ControlType.FILE_UPLOAD; label: string; filesChanged?: (parentGroup: FormGroup, files: FileList) => void; allowMultipleFiles?: boolean; showClearFilesButton?: boolean; acceptedTypes?: string; selectFilesButtonType?: ButtonType; selectButtonText?: string; clearFilesButtonText?: string; dropZoneText?: string; } & (EnabledUploadButtonConfig | DisabledUploadButtonConfig); interface EnabledUploadButtonConfig { uploadFiles: (parentGroup: FormGroup, files: FileList, uploadComponent: AbstractUploadComponent) => Promise | unknown; showUploadProgress?: boolean; disableOnUpload?: boolean; uploadButtonType?: ButtonType; uploadButtonText?: string; } type DisabledUploadButtonConfig = NeverProps; type NeverProps = { [P in keyof T]?: never; }; type ImageUploadFieldConfig = CrisprControlConfig & MatFieldProperties & { controlType: ControlType.IMAGE_UPLOAD; label: string; filesChanged?: (parentGroup: FormGroup, file: File) => void; /** * The file types to accept. The onus is on the consuming developer to limit these to file types compatible with usage. * See https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/accept */ acceptedTypes: string; fileName?: string; showClearFilesButton?: boolean; selectFilesButtonType?: ButtonType; selectButtonText?: string; clearFilesButtonText?: string; resetFilesButtonText?: string; dropZoneText?: string; /** * If the input value of the control is not a string of the src * url to the image, this function allows consumers to map their * input value into one */ mapInputValueToUrl?: (inputValue: unknown) => string; /** * Should the field compress the image after loading it * @default false */ compressImage?: boolean; /** * The target size of the compressed image */ targetCompressedImageFileSizeMb?: number; /** * The minimum file size in MB required to trigger compression. Useful for preventing compression on files near the target compression size. * @default .7 */ minCompressionThresholdMb?: number; /** * The maximum height or width of the compressed image * @default undefined */ maxWidthOrHeight?: number; /** * When true runs compression using a web worker, otherwise compression happens on the main thread. * @default true */ useWebWorker?: boolean; /** * The height of the image preview container */ imagePreviewHeight?: string; }; type MapFieldConfig = CrisprControlConfig & MatFieldProperties & FieldDescriptors & { controlType: ControlType.MAP; label: string; center?: google.maps.LatLngLiteral; location?: string; options?: google.maps.MapOptions; /** Optional overrides for the Places Autocomplete request. `input` is always supplied by the search term and cannot be set here. */ searchAutocompleteRequest?: Omit; debounceTime?: number; markers?: (map: GoogleMap, group: FormGroup) => Observable; infoWindowTemplateBuilder?: TemplateBuilder; valueDisplayKey?: string; onMove?: (map: GoogleMap, group: FormGroup) => OMT; }; type TftMapMarker
= google.maps.marker.AdvancedMarkerElementOptions & { value: DT; }; type TemplateBuilder = (props: T) => string; declare abstract class CrisprFieldComponent { defaultConfig?: Partial; inputConfig: i0.InputSignal; config: i0.Signal; testIdPrefix: i0.InputSignal; testId: i0.Signal; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, never, never, { "inputConfig": { "alias": "config"; "required": false; "isSignal": true; }; "testIdPrefix": { "alias": "testIdPrefix"; "required": false; "isSignal": true; }; }, {}, never, never, true, never>; } declare class CrisprControlComponent extends CrisprFieldComponent implements OnInit { destroyRef: DestroyRef; group: i0.InputSignal>; control: i0.Signal>; valueChanges: EventEmitter; value: i0.InputSignal; constructor(); ngOnInit(): void; setControlValue(value: ControlValue): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, never, never, { "group": { "alias": "group"; "required": false; "isSignal": true; }; "value": { "alias": "value"; "required": false; "isSignal": true; }; }, { "valueChanges": "valueChanges"; }, never, never, true, never>; } type AutocompleteConfigTypes = AutocompleteFieldConfig | AutocompleteChiplistFieldConfig; declare class AbstractAutocompleteComponent extends CrisprControlComponent implements OnInit { autocompleteInputControl: FormControl; options$: Observable; config: i0.Signal; ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵdir: i0.ɵɵDirectiveDeclaration, never, never, {}, {}, never, never, true, never>; } declare abstract class CrisprDisplayFieldComponent extends CrisprControlComponent implements OnInit { index?: number; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * builds out form group based on config * @param config a configuration for a form group * @param value an object of initial values to pass in * @param group the form group to modify and build out */ declare function buildFormGroupFromConfig(config: FormConfig, value?: any, group?: FormGroup): FormGroup; declare function callOptionsIfFunction(options: OptionsType | AutocompleteOptionsCallback, parentGroup?: FormGroup, searchString?: string): OptionsType; /** * Analyze the config and build a form control to spec. Notice we don't use FormBuilder here * as we want to keep this function pure. * @param controlConfig the configuration object for the control to build * @param value an initial value to use if passed in */ declare function createControlForType(controlConfig: AnyFieldConfig, value?: ControlValue): _angular_forms.FormGroup | FormArray | FormControl; /** * A basic filter function that filters the search string against the label of the options object * @param options the array of options to filter * @param searchString the string from the input */ declare function filterOptionsByLabel(options: SelectOption[], searchString: string): SelectOption[]; /** * Determines if the field config is for a form control (not a divider, heading or other non-control field) */ declare function isControlConfig(fieldConfig: CrisprFieldConfig): fieldConfig is CrisprControlConfig; /** * The user can give us select options as an array, a function that resolves to a promise, * or an observable. This functions consumes any of those and returns an observable that * resolves an array of options * * @param options the options passed in from the config * @param emptyMessageOption the message to display when the array is empty */ declare function observablifyOptions(options: OptionsType, parentGroup: FormGroup, searchString?: string): Observable; declare function convertBytesToMb(bytes: number): number; declare function maxFileSizeValidator(maxFileSize: number): ValidatorFn; declare function allowedFileExtValidator(allowedFileExtensions: string[], onlyAllowFiles?: boolean): ValidatorFn; declare function allowedFileType(matchExp: string | RegExp): ValidatorFn; declare class FormGroupListComponent extends CrisprControlComponent implements OnInit { defaultConfig: Partial; /** * By setting this to true when adding/removing items from array, * we can block original values from overwriting form values * */ blockValue: boolean; selectedIndex: number; ngOnInit(): void; setControlValue(values: any[]): void; clickDelete(index: number): void; clickAdd(): void; addGroup(value?: any): void; deleteGroup(index: number): void; clickEditItem(index: number): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class FieldContainerComponent implements OnInit, OnDestroy { config: i0.InputSignal>; group: i0.InputSignal>; inlineField: i0.InputSignal; disabled$: Observable; private readonly isDisabled; readonly isHidden: i0.Signal; subs: Subscription[]; ngOnInit(): void; ngOnDestroy(): void; /** * Connects user defined disabledCallback function to the the view, so that the control is enabled/disabled * appropriately. It also will hide disabled fields in the UI unless `hideDisabled` is set to * false in the controls config * @param group used to get valueChanges from control * @param config configuration object used to */ connectDisabledCallback(group: FormGroup, config?: CrisprControlConfig): Observable; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class SubGroupComponent extends CrisprControlComponent implements OnInit { ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class FileDropzoneDirective { fileDrop: EventEmitter; crisprFileDropzone: boolean; onDrop($event: DragEvent): void; onDragOver($event: DragEvent): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class FileUploadFieldComponent extends CrisprControlComponent implements OnInit, ControlValueAccessor { ngControl: NgControl; onChange: () => void; defaultConfig: Partial; fileInputRef: ElementRef; selectedFiles: i0.WritableSignal; selectedFilesArray: i0.Signal; isUploaded: boolean; fileProgress: Observable[]; disabled$: Observable; constructor(); ngOnInit(): void; filesChanged(files: FileList): void; uploadFiles(): void; resetFileInput(): void; writeValue(value: null): void; registerOnChange(fn: () => void): void; registerOnTouched(fn: () => void): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class SelectedFileComponent { fileName: i0.InputSignal; progress: i0.InputSignal; showProgress: i0.InputSignal; color: i0.InputSignal; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class HeadingComponent extends CrisprFieldComponent { defaultConfig: Partial; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class InfoComponent { info: i0.InputSignal; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class ImageUploadFieldComponent extends CrisprControlComponent implements OnInit, ControlValueAccessor { ngControl: NgControl; private domSanitizer; private cdr; onChange: () => void; defaultConfig: Partial; private inputImageFileSubject; inputImageFile$: Observable; /** * the compression progress */ progress: number | undefined; compressedFile$: Observable; compressedImageUrlString$: Observable; imageSrcUrl$: Observable; fileInputRef: ElementRef; selectedFiles: FileList; isUploaded: boolean; disabled$: Observable; constructor(); ngOnInit(): void; filesChanged(files: FileList): void; clearFileInput(): void; resetToInitialValue(initialValue: string): void; writeValue(value: null): void; registerOnChange(fn: () => void): void; registerOnTouched(fn: () => void): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class DatepickerFieldComponent extends CrisprControlComponent implements OnInit, AfterContentInit { defaultConfig: Partial; dateClass: MatCalendarCellClassFunction; dateClass$: Observable>; startAt$: Observable; /** A portal containing the footer component type for this calendar. */ calendarFooterPortal: Portal; ngOnInit(): void; ngAfterContentInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class CheckboxFieldComponent extends CrisprControlComponent implements OnInit { defaultConfig: Partial; ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class TextareaFieldComponent extends CrisprControlComponent implements OnInit { defaultConfig: Partial; ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class AutocompleteFieldComponent extends AbstractAutocompleteComponent implements OnInit, OnDestroy { defaultConfig: Partial; autoInput: MatAutocompleteTrigger; autoInputRef: ElementRef; clearFieldSubscription: Subscription; ngOnInit(): void; ngOnDestroy(): void; setControlValue(value: SelectOption): void; /** * The material autocomplete defaults to displaying the options value instead of its label. * We only have the value from the selected option to work with, so we have to pass the options * through a function called in the template and return the function that the material displayWith * input is expecting. * @param options the array of options to search for option with corresponding value */ displayLabel(options: SelectOption[]): (value: unknown) => string; handleSelect(event: MatAutocompleteSelectedEvent): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class SelectFieldComponent extends CrisprControlComponent implements OnInit, AfterViewInit { defaultConfig: { enableToggleAll: boolean; color: ThemePalette; }; options$: Observable; allSelected: boolean; selectField: MatSelect; ngOnInit(): void; ngAfterViewInit(): void; toggleAll(isSelected: boolean): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class InputFieldComponent extends CrisprControlComponent implements OnInit { defaultConfig: Partial; constructor(); ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class RadioFieldComponent extends CrisprControlComponent implements OnInit { defaultConfig: {}; options$: Observable; ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class SliderFieldComponent extends CrisprControlComponent implements OnInit { defaultConfig: Partial; constructor(); ngOnInit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class DividerComponent extends CrisprFieldComponent { defaultConfig: {}; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class ButtonComponent extends CrisprFieldComponent implements OnInit { defaultConfig: Partial; formValid$: Observable; group: i0.InputSignal>; get matButtonClass(): string; ngOnInit(): void; handleClick(group: FormGroup, event: MouseEvent): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class UnitConversionFieldComponent extends CrisprControlComponent implements OnInit, OnDestroy { defaultConfig: Partial; displayValueControl: FormControl; unitSelectControl: FormControl; unitOptions$: Observable; transformationSubscription: Subscription; ngOnInit(): void; ngOnDestroy(): void; setInitialDisplayValue(storedValue: any, unit: unknown): void; /** * We override the 'setControlValue' we inherited from crisprControlMixin and add our custom logic, * This function gets called onInit because were object oriented. it's so great, so great that I'm * typing a paragraph to explain what the hell is going on... * @param value the initial value for the control passed down from the form components input */ setControlValue(value: any): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class AutocompleteChiplistFieldComponent extends AbstractAutocompleteComponent implements OnInit { defaultConfig: Partial; chips$: BehaviorSubject; remainingOptions$: Observable; selectedChip: SelectOption; controlValue$: Observable; chipInput: MatAutocompleteTrigger; chipInputRef: ElementRef; overlayOrigin: CdkOverlayOrigin; readonly createNewSentinel: symbol; showCreateForm: i0.WritableSignal; createFormGroup: FormGroup<{}>; readonly createFormPositions: ConnectionPositionPair[]; get overlayWidth(): number; ngOnInit(): void; setControlValue(value: SelectOption[]): void; handleSelect(event: MatAutocompleteSelectedEvent): void; openCreateForm(): void; submitNewChip(): void; closeCreateForm(): void; /** * To follow ARIA standards we want to select the active option on blur. * matChipInputAddOnBlur should do this but it causes buggy behaviour * @param event blur event that triggers the handle blur */ handleTab(_event: FocusEvent): void; /** * Handles selection via key tokens passed through separatorKeyCodes property * NOTE: If TAB is used focus does not move on to next component * @param event */ handleTokenEnd(event: MatChipInputEvent): void; mapToLabel(option: SelectOption): string; removeChip(removedChip: SelectOption): void; highlightChip(chip: SelectOption): void; blurField(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } declare class MapFieldComponent extends CrisprControlComponent implements OnInit { /** * The overlay is positioned to align the top-right corner with the origin's bottom-right corner, * and the top-left corner with the origin's bottom-left corner. */ overlayPositions: ConnectionPositionPair[]; geoCoder: MapGeocoder; renderer: Renderer2; domSanitizer: DomSanitizer; infoWindow: i0.Signal; selectedMarker: i0.WritableSignal; mapOpen: i0.WritableSignal; mapComponent: i0.Signal; defaultConfig: Partial; locationControl: FormControl; locationGroup: FormGroup<{ location: FormControl; }>; locationConfig: AutocompleteFieldConfig; inputCenter: rxjs.Observable; center: typeof merge; currentMap: BehaviorSubject; displayValue: i0.Signal; currentMarkers: i0.Signal; onMapInit(event: GoogleMap): void; ngOnInit(): void; onMarkerClick(clickedMarker: MapMarker): void; selectMarker(marker: TftMapMarker): void; onBoundsChanged(bounds: google.maps.LatLngBounds): void; onMove(map: GoogleMap, group: FormGroup): void; onSelectLocation(suggestion: google.maps.places.AutocompletePrediction): Promise; openMap(): void; closeMap(): void; getDisplay(value: any): string; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } type CrisprControlComponentType = InputFieldComponent | SelectFieldComponent | RadioFieldComponent | SubGroupComponent | FormGroupListComponent | AutocompleteFieldComponent | AutocompleteChiplistFieldComponent | TextareaFieldComponent | CheckboxFieldComponent | SliderFieldComponent | FileUploadFieldComponent | ImageUploadFieldComponent | DatepickerFieldComponent | UnitConversionFieldComponent | MapFieldComponent; type CrisprFieldComponentType = CrisprControlComponentType | HeadingComponent | DividerComponent | ButtonComponent; declare class CrisprFieldDirective implements OnInit { config: i0.InputSignal; group: i0.InputSignal>; testIdPrefix: i0.InputSignal; value: i0.InputSignal; private componentRef; component: CrisprFieldComponentType; container: ViewContainerRef; renderer: Renderer2; constructor(); ngOnInit(): Promise; updateComponentValue(value: ControlValue): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } declare class CrisprDisplayFieldDirective implements OnInit { private container; group: i0.InputSignal>; value: i0.InputSignal; component: i0.InputSignal>; index: i0.InputSignal; private componentRef; private componentInstance; constructor(); ngOnInit(): Promise; updateComponentValue(value: ControlValue | any[]): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵdir: i0.ɵɵDirectiveDeclaration; } /** * @deprecated SubGroupComponent is now standalone. Import SubGroupComponent directly. * This module will be removed in the next major version. */ declare class SubGroupModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class InitialControlValuePipe implements PipeTransform { transform(initialFormValue: { [key: string]: ControlValue | any; }, fieldConfig: AnyFieldConfig): unknown; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵpipe: i0.ɵɵPipeDeclaration; } declare class CrisprPipesModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } declare class CrisprFormComponent implements OnInit { config: i0.InputSignal>; form: i0.InputSignal>; value: i0.InputSignal; submitted: i0.OutputEmitterRef>; /** Patch form values whenever the [value] input changes without firing valueChanges. */ private patchValueEffect; valueChanges: i0.OutputRef; statusChanges: i0.OutputRef<_angular_forms.FormControlStatus>; submitTrigger: ElementRef; ngOnInit(): void; handleSubmit(): void; triggerSubmit(): void; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵcmp: i0.ɵɵComponentDeclaration; } /** * @deprecated Use stanadlone CripsrFormComponent */ declare class CrisprFormsModule { static ɵfac: i0.ɵɵFactoryDeclaration; static ɵmod: i0.ɵɵNgModuleDeclaration; static ɵinj: i0.ɵɵInjectorDeclaration; } export { AbstractAutocompleteComponent, ControlType, CrisprControlComponent, CrisprDisplayFieldComponent, CrisprFieldComponent, CrisprFormComponent, CrisprFormsModule, DEFAULT_EMPTY_OPTIONS_MESSAGE, FieldContainerComponent, FileDropzoneDirective, FileUploadFieldComponent, HeadingComponent, InfoComponent, SelectedFileComponent, allowedFileExtValidator, allowedFileType, buildFormGroupFromConfig, callOptionsIfFunction, convertBytesToMb, createControlForType, filterOptionsByLabel, isControlConfig, maxFileSizeValidator, observablifyOptions, valueIn }; export type { AbstractAutocompleteFieldConfig, AbstractGroupConfig, AbstractUploadComponent, AnyFieldConfig, AutocompleteChiplistFieldConfig, AutocompleteFieldConfig, AutocompleteOptionsCallback, ButtonConfig, ButtonType, CheckboxFieldConfig, ControlGroupValue, ControlValue, CreateChipConfig, CrisprControlConfig, CrisprFieldConfig, DatepickerFieldConfig, DividerConfig, EnabledUploadButtonConfig, FieldDescriptors, FileUploadFieldConfig, FormConfig, FormGroupListConfig, HeadingConfig, ImageUploadFieldConfig, Info, InputFieldConfig, MapFieldConfig, MatFieldProperties, OptionsCallback, OptionsType, RadioFieldConfig, ReactiveOptionsCallback, SelectFieldConfig, SelectOption, SliderFieldConfig, SubGroupConfig, TemplateBuilder, TextareaFieldConfig, TftMapMarker, UnitConversionFieldConfig };