import { Type } from '@angular/core'; import { AbstractControl, UntypedFormGroup } from '@angular/forms'; import { DynLogger } from '@myndpm/dyn-forms/logger'; import { Observable } from 'rxjs'; import { DynHook } from './types/events.types'; import { DynInstanceType, DynVisibility } from './types/forms.types'; import { DynMode } from './types/mode.types'; import { DynNode } from './types/node.types'; import { DynFunctionFn, DynParams } from './types/params.types'; import { DynConfigMap, DynConfigProvider } from './types/provider.types'; import { DynErrorHandlerFn, DynErrorMessage } from './types/validation.types'; import { AbstractDynControl } from './dyn-control.class'; import { DynFormNodeLoad } from './dyn-form-node.class'; import { DynFormFactory } from './form-factory.service'; import { DynFormHandlers } from './form-handlers.service'; import * as i0 from "@angular/core"; export declare class DynControlNode implements DynNode { private readonly formFactory; private readonly formHandlers; private readonly logger; private readonly _mode$; readonly parent: DynControlNode; get deep(): number; get index(): number; get isolated(): boolean; get detached(): boolean; get isRoot(): boolean; get isTopLevel(): boolean; get children(): DynControlNode[]; get root(): DynControlNode; get path(): string[]; get route(): string[]; get name(): string | undefined; get dynId(): string | undefined; get dynCmp(): TComponent | undefined; get instance(): DynInstanceType; get control(): TControl; get params(): TParams; get isFormLoaded(): boolean; get errorHandlers(): DynErrorHandlerFn[]; get errorMsg$(): Observable; get hook$(): Observable; get mode$(): Observable; get params$(): Observable; get paramsUpdates$(): Observable>; get visibility$(): Observable; get visibility(): DynVisibility; set mode(mode$: Observable); private _deep; private _index; private _isolated; private _detached; private _children; private _route; private _name?; private _dynId?; private _dynCmp?; private _instance; private _params; private _node; private _matchers?; private _topLevel; private _initLoaded; private _formLoaded; private _validators?; private _asyncValidators?; private _errorHandlers; private _changed$; private _children$; private _errorMsg$; private _loaded$; private _loadedParams$; private _loadedMatchers$; private _params$; private _unsubscribe$; private _untrack$; private _hook$; private _paramsUpdates$; private _visibility$; private _modeLocal$?; private _snapshots; loaded$: Observable; ready$: Observable; constructor(formFactory: DynFormFactory, formHandlers: DynFormHandlers, logger: DynLogger, _mode$: Observable, parent: DynControlNode); /** * Visibility methods */ visible(): void; invisible(): void; hidden(): void; /** * Feature methods */ whenLoaded(): Observable; whenReady(): Observable; setupParams(params?: Partial, paramFns?: DynConfigMap>, resetPrevious?: boolean): void; updateParams(params: Partial, resetPrevious?: boolean): void; callHook(event: DynHook): void; log(message: string, payload?: any): void; /** * Forms API */ reset(value?: any, options?: { onlySelf?: boolean; emitEvent?: boolean; }): void; patchValue(payload: any, options?: { onlySelf?: boolean; emitEvent?: boolean; }): Observable; valueChanges(path?: string): Observable | undefined; detectChanges(): void; hasValidator(name: string): boolean; /** * Snapshots */ track(defaultMode?: DynMode): Observable; untrack(mode?: DynMode): void; /** * Node querying */ findById(dynId: string): DynNode | undefined; findByPath(dynId: string): DynNode | undefined; /** * Controls querying */ /** * @deprecated use node.searchUp */ query(path: string, searchNodes?: boolean): AbstractControl | undefined; /** * @deprecated use node.searchDown */ select(path: string): AbstractControl | undefined; /** * search a control by path in the whole hierarchy tree * less performant than searchUp and searchDown */ search(path: string): AbstractControl | undefined; /** * search a node by path up in the hierarchy tree (parents) */ searchUp(path: string, searchDown?: boolean): AbstractControl | undefined; /** * search a node by path down in the hierarchy tree (children) */ searchDown(path: string): AbstractControl | undefined; /** * search a parent component type in the hierarchy tree of nodes. * while the predicate function returns a truthy value */ searchCmp(component: Type, predicate?: (node: DynNode) => boolean): T | undefined; searchWrapper(component: Type): T | undefined; /** * run a function in the current and/or parent nodes until it returns a truthy value. */ exec(fn: (node: DynNode) => T, includeSelf?: boolean): T | undefined; /** * run a function in the parent nodes that are WRAPPERs. */ execInWrappers(fn: (node: DynNode) => any, includeSelf?: boolean): void; /** * Lifecycle methods */ init(config: DynFormNodeLoad): void; setup(): void; destroy(): void; markAsPending(): void; markAsLoaded(): void; markParamsAsLoaded(): void; markMatchersAsLoaded(): void; childrenIncrement(logging?: boolean): void; childrenDecrement(): void; /** * Hierarchy methods */ setIndex(index?: number): void; getDeep(): number; getPath(): string[]; getRoute(): string[]; private addChild; private removeChild; private getMatchers; private getErrorMessage; static ɵfac: i0.ɵɵFactoryDeclaration, [null, null, null, { optional: true; }, { optional: true; skipSelf: true; }]>; static ɵprov: i0.ɵɵInjectableDeclaration>; }