import * as _angular_core from '@angular/core'; import { Injector, Type, WritableSignal, InjectionToken, Signal, EventEmitter, TemplateRef, OnChanges, SimpleChanges, DestroyableInjector, ElementRef, ComponentRef, ViewContainerRef, SimpleChange, InputSignal, InputSignalWithTransform, OutputEmitterRef } from '@angular/core'; import * as _piying_view_angular_core from '@piying/view-angular-core'; import { AsyncObjectSignal, ViewInputs, ViewOutputs, ViewEvents, ViewAttributes, CoreResolvedComponentDefine, LazyImport, LazyMarkType, PiResolvedCommonViewFieldConfig, CombineSignal, CoreWrapperConfig, ViewSlots, PiCommonConfig, SetOptional, CoreSchemaHandle, FormBuilder, FieldArray, FieldControl, FieldGroup, SetUnWrapper$, actions as actions$1, AnyCoreSchemaHandle, AsyncProperty, _PiResolvedCommonViewFieldConfig, PiTypeConfig } from '@piying/view-angular-core'; export { asControl, asVirtualGroup, condition, layout } from '@piying/view-angular-core'; import * as _piying_valibot_visit from '@piying/valibot-visit'; import { ConvertOptions, RawConfigCommon, RawConfigAction, MetadataListAction } from '@piying/valibot-visit'; import * as v from 'valibot'; import * as clsx from 'clsx'; import * as _piying_view_angular from '@piying/view-angular'; import { ControlValueAccessor } from '@angular/forms'; declare class PiyingViewGroupBase { field$$: _angular_core.Signal<_piying_view_angular_core._PiResolvedCommonViewFieldConfig>; props$$: _angular_core.Signal>; children$$: _angular_core.Signal<_piying_view_angular_core._PiResolvedCommonViewFieldConfig[]>; fixedChildren$$: _angular_core.Signal<_piying_view_angular_core._PiResolvedCommonViewFieldConfig[]>; restChildren$$: _angular_core.Signal<_piying_view_angular_core._PiResolvedCommonViewFieldConfig[]>; fieldTemplateRef: _angular_core.TemplateRef; injector: Injector; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare class PiyingViewGroup extends PiyingViewGroupBase { static __version: number; templateRef: _angular_core.Signal; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } type DirectiveConfig = { /** string表示是标签,type是组件或者指令 */ type: Type; inputs?: AsyncObjectSignal; outputs?: AsyncObjectSignal; events?: AsyncObjectSignal; model?: AsyncObjectSignal>>; attributes?: AsyncObjectSignal; }; /** 指令配置 */ type NgDirectiveConfig = DirectiveConfig; /** 用于全局可选配置 */ /** 解析后但是未加载 */ type NgResolvedComponentDefine1 = Omit & { type: Type | LazyImport> | NgComponentDefine | LazyImport | LazyMarkType> | LazyMarkType; }; type PiResolvedViewFieldConfig = PiResolvedCommonViewFieldConfig<() => PiResolvedViewFieldConfig, NgResolvedComponentDefine1> & { directives?: CombineSignal; }; type NgResolvedWraaperConfig = Omit; type ComponentRawType = Type | LazyImport> | NgComponentDefine | LazyImport | LazyMarkType> | LazyMarkType; interface DynamicComponentConfig { type: Type | LazyImport> | NgComponentDefine | LazyImport | LazyMarkType> | LazyMarkType; inputs: AsyncObjectSignal; outputs: AsyncObjectSignal; attributes: AsyncObjectSignal; events: AsyncObjectSignal; slots: AsyncObjectSignal; directives: DirectiveConfig[]; injector?: Injector; } /** component,wrapper通用定义 */ type NgComponentDefine = { component: Type; module?: Type; }; type PiViewConfig = PiCommonConfig | LazyImport> | NgComponentDefine | LazyImport | LazyMarkType> | LazyMarkType, Type | LazyImport>>; type NgConvertOptions = SetOptional>, 'handle'> & { builder: typeof FormBuilder>; fieldGlobalConfig?: PiViewConfig; }; declare const PI_INPUT_OPTIONS_TOKEN: InjectionToken, "fieldGlobalConfig"> & { fieldGlobalConfig?: PiViewConfig; }>>; declare const PI_INPUT_SCHEMA_TOKEN: InjectionToken | v.SchemaWithPipe>>; declare const PI_INPUT_MODEL_TOKEN: InjectionToken>; /** wrapper中可以使用,已解析的配置 */ declare const PI_VIEW_FIELD_TOKEN: InjectionToken>; declare const PI_COMPONENT_INDEX: InjectionToken; declare const PI_COMPONENT_LIST_LISTEN: InjectionToken>; declare const PI_VIEW_FIELD_TEMPLATE_REF_TOKEN: InjectionToken>; declare class PiyingView implements OnChanges { #private; readonly templateRef: _angular_core.Signal; readonly fieldTemplate: _angular_core.Signal; readonly selectorless: _angular_core.InputSignal; schema: _angular_core.InputSignal>; model: _angular_core.InputSignal; modelChange: _angular_core.OutputEmitterRef; options: _angular_core.InputSignal<(Omit, "fieldGlobalConfig"> & { fieldGlobalConfig?: PiViewConfig; }) | undefined>; form$$: _angular_core.Signal | FieldControl | FieldGroup | undefined>; ngOnChanges(changes: SimpleChanges): void; resolvedField$: _angular_core.WritableSignal; injector3$$: _angular_core.Signal; ngOnDestroy(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵcmp: _angular_core.ɵɵComponentDeclaration; } declare class BaseComponent { #private; /** 第一次默认为空 */ protected index: number; destroyComponentFn?: () => void; fieldComponentInstance?: any; fieldElementRef?: ElementRef; fieldDirectiveRefList?: any[]; componentRef?: ComponentRef; createComponent(list: DynamicComponentConfig[], viewContainerRef: ViewContainerRef): void; update(list: DynamicComponentConfig[]): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare class InsertFieldDirective extends BaseComponent { #private; insertFieldSlots: _angular_core.InputSignal> | undefined>; insertFieldAttributes: _angular_core.InputSignal | undefined>; createComponent(list?: DynamicComponentConfig[], viewContainerRef?: ViewContainerRef): void; ngOnChanges(changes: Record): void; ngOnInit(): void; ngOnDestroy(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare class NgSchemaHandle extends CoreSchemaHandle PiResolvedViewFieldConfig> { type: any; directives: _piying_view_angular_core.CombineSignal; } declare const rawConfig: RawConfigCommon; declare function patchAsyncDirective(type: Type, actions?: RawConfigAction<'viewRawConfig', any, any>[], options?: { insertIndex?: number; }): RawConfigAction; declare function removeDirectives(removeList: (list: Signal[]) => Signal[]): RawConfigAction; declare const directives: { set: (items: SetOptional, "inputs" | "outputs" | "attributes" | "events" | "model">[]) => RawConfigAction; patch: (items: SetOptional, "inputs" | "outputs" | "attributes" | "events" | "model">[]) => RawConfigAction; patchAsync: typeof patchAsyncDirective; remove: typeof removeDirectives; }; declare const actions: { directives: { set: (items: _piying_view_angular_core.SetOptional<_piying_view_angular_core.SetUnWrapper$<_piying_view_angular.NgDirectiveConfig, "inputs" | "outputs" | "attributes" | "events" | "model">, "inputs" | "outputs" | "attributes" | "events" | "model">[]) => _piying_valibot_visit.RawConfigAction; patch: (items: _piying_view_angular_core.SetOptional<_piying_view_angular_core.SetUnWrapper$<_piying_view_angular.NgDirectiveConfig, "inputs" | "outputs" | "attributes" | "events" | "model">, "inputs" | "outputs" | "attributes" | "events" | "model">[]) => _piying_valibot_visit.RawConfigAction; patchAsync: (type: _angular_core.Type, actions?: _piying_valibot_visit.RawConfigAction<"viewRawConfig", any, any>[], options?: { insertIndex?: number; }) => _piying_valibot_visit.RawConfigAction; remove: (removeList: (list: _angular_core.Signal<_piying_view_angular.NgDirectiveConfig>[]) => _angular_core.Signal<_piying_view_angular.NgDirectiveConfig>[]) => _piying_valibot_visit.RawConfigAction; }; class: { top: (className: clsx.ClassValue, merge?: boolean) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; bottom: (className: clsx.ClassValue, merge?: boolean) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; component: (className: clsx.ClassValue, merge?: boolean) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; asyncTop: (classNameFn: _piying_view_angular_core.AsyncCallback) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; asyncBottom: (fn: _piying_view_angular_core.AsyncCallback) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; asyncComponent: (fn: _piying_view_angular_core.AsyncCallback) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; }; wrappers: { set: (wrappers: (_piying_view_angular_core.SetOptional<_piying_view_angular_core.SetUnWrapper$<_piying_view_angular_core.CoreWrapperConfig, "inputs" | "outputs" | "attributes" | "events" | "slots">, "inputs" | "outputs" | "attributes" | "events" | "slots"> | string)[]) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; patch: (wrappers: (_piying_view_angular_core.SetOptional<_piying_view_angular_core.SetUnWrapper$<_piying_view_angular_core.CoreWrapperConfig, "inputs" | "outputs" | "attributes" | "events" | "slots">, "inputs" | "outputs" | "attributes" | "events" | "slots"> | string)[]) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; patchAsync: (type: any, actions?: _piying_view_angular_core.ConfigAction[], options?: { insertIndex?: number; }) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; remove: (removeList: string[] | ((list: _angular_core.Signal<_piying_view_angular_core.CoreWrapperConfig>[]) => _angular_core.Signal<_piying_view_angular_core.CoreWrapperConfig>[])) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; changeAsync: (indexFn: (list: _angular_core.Signal<_piying_view_angular_core.CoreWrapperConfig>[]) => any, actions: _piying_view_angular_core.ConfigAction[]) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; }; hooks: { merge: _piying_view_angular_core.MergeHooksConfig<_piying_view_angular_core.HookConfig<_piying_view_angular_core._PiResolvedCommonViewFieldConfig> | undefined>; remove: typeof _piying_view_angular_core.removeHooks; set: _piying_view_angular_core.HooksConfig<_piying_view_angular_core.HookConfig<_piying_view_angular_core._PiResolvedCommonViewFieldConfig> | undefined>; patch: _piying_view_angular_core.HooksConfig<_piying_view_angular_core.HookConfig<_piying_view_angular_core._PiResolvedCommonViewFieldConfig> | undefined>; }; providers: { set: typeof _piying_view_angular_core.ɵsetProviders; patch: typeof _piying_view_angular_core.ɵpatchProviders; change: typeof _piying_view_angular_core.ɵchangeProviders; }; inputs: { patch: (value: Record) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; set: (value: Record) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; patchAsync: (dataObj: Record>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; remove: (list: string[]) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; mapAsync: (fn: (field: _piying_view_angular_core._PiResolvedCommonViewFieldConfig) => (value: any) => any) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; }; outputs: { patch: (value: Record any>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; set: (value: Record any>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; patchAsync: (dataObj: Record (...args: any[]) => any>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; remove: (list: string[]) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; merge: (outputs: Record void>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; mergeAsync: (outputs: Record (...args: any[]) => void>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; mapAsync: (fn: (field: _piying_view_angular_core._PiResolvedCommonViewFieldConfig) => (value: any) => any) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; }; attributes: { patch: (value: Record) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; set: (value: Record) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; patchAsync: (dataObj: Record>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; remove: (list: string[]) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; mapAsync: (fn: (field: _piying_view_angular_core._PiResolvedCommonViewFieldConfig) => (value: any) => any) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; top: { set: (value: any) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; patch: (value: any) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; }; }; events: { patch: (value: Record any>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; set: (value: Record any>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; patchAsync: (dataObj: Record (event: Event) => any>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; remove: (list: string[]) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; mapAsync: (fn: (field: _piying_view_angular_core._PiResolvedCommonViewFieldConfig) => (value: any) => any) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; }; slots: { patch: (value: Record) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; set: (value: Record) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; patchAsync: (dataObj: Record>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; remove: (list: string[]) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; mapAsync: (fn: (field: _piying_view_angular_core._PiResolvedCommonViewFieldConfig) => (value: any) => any) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; }; props: { patch: (value: Record) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; set: (value: Record) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; patchAsync: (dataObj: Record>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; remove: (list: string[]) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; mapAsync: (fn: (field: _piying_view_angular_core._PiResolvedCommonViewFieldConfig) => (value: any) => any) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>; }; }; declare class AngularFormBuilder extends FormBuilder { afterResolveConfig(rawConfig: NgSchemaHandle, config: PiResolvedViewFieldConfig): PiResolvedViewFieldConfig; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵprov: _angular_core.ɵɵInjectableDeclaration; } declare class BaseControl implements ControlValueAccessor { #private; readonly defaultValue: any; value$: _angular_core.WritableSignal; protected emitValue?: (value: any) => void; registerOnChange(fn: any): void; /** 同时发射和value变更 */ valueChange(value: T): void; writeValue(obj: any): void; registerOnTouched(fn: any): void; touchedChange(): void; valueAndTouchedChange(value: T): void; disabled$: _angular_core.WritableSignal; setDisabledState(isDisabled: boolean): void; } declare class AttributesDirective { #private; attributes: _angular_core.InputSignal>; excludes: _angular_core.InputSignal; ngOnChanges(changes: SimpleChanges): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } declare class EventsDirective { #private; events: _angular_core.InputSignal any>>; ngOnChanges(): void; ngOnDestroy(): void; static ɵfac: _angular_core.ɵɵFactoryDeclaration; static ɵdir: _angular_core.ɵɵDirectiveDeclaration; } type GetKeyWithType = { [K in keyof T as T[K] extends ValueType ? T[K] extends any ? any extends T[K] ? never : K : K : never]: T[K]; }; type ComponentInputs = GetKeyWithType>; type ComponentInputsOrigin = { [K in keyof T]: T[K] extends InputSignal ? V : T[K] extends InputSignalWithTransform ? D : never; }; type ComponentInputsAsync = { [K in keyof T]: T[K] extends InputSignal ? AsyncProperty : T[K] extends InputSignalWithTransform ? AsyncProperty : never; }; type ComponentOutputs = GetKeyWithType>; type ComponentOutputsOrigin = { [K in keyof T]: T[K] extends OutputEmitterRef ? (input: V) => void : never; }; type ComponentOutputsAsync = { [K in keyof T]: T[K] extends OutputEmitterRef ? AsyncProperty<(input: V) => void> : never; }; type ComponentInstance = TComponent extends Type ? Instance : never; type GetComponentInputs = ComponentInputs>; type GetComponentInputsOrigin = Partial>>; type GetComponentInputsAsync = Partial>>; type GetComponentOutputs = ComponentOutputs>; type GetComponentOutputsOrigin = Partial>>; type GetComponentOutputsAsync = Partial>>; type ReturnAction = RawConfigAction<'viewRawConfig', Input, AnyCoreSchemaHandle>; type ComponentActions = { inputs: { patch: (value: GetComponentInputsOrigin) => ReturnAction; set: (value: GetComponentInputsOrigin) => ReturnAction; patchAsync: (value: GetComponentInputsAsync) => ReturnAction; remove: (value: (keyof GetComponentInputs)[]) => ReturnAction; mapAsync: (value: (field: _PiResolvedCommonViewFieldConfig) => (value: GetComponentInputs) => GetComponentInputs) => ReturnAction; }; outputs: { patch: (value: GetComponentOutputsOrigin) => ReturnAction; set: (value: GetComponentOutputsOrigin) => ReturnAction; patchAsync: (value: GetComponentOutputsAsync) => ReturnAction; remove: (value: (keyof GetComponentOutputs)[]) => ReturnAction; mapAsync: (value: (field: _PiResolvedCommonViewFieldConfig) => (value: GetComponentOutputs) => GetComponentOutputs) => ReturnAction; }; }; type ActionComponent = A['type'] extends Type ? A['type'] : NonNullable[0]['__type']; declare function typedComponent(input: T): { define: T; setComponent: , K>(input: TCName, fn?: (actions: Omit & ComponentActions[TCName]> : TCName>) => any[]) => MetadataListAction; nfcComponent: >(input: TCName, fn?: (actions: Omit & ComponentActions[TCName]> : TCName>) => any[]) => v.SchemaWithPipe, undefined>, MetadataListAction ]>; }; export { AngularFormBuilder, AttributesDirective, BaseControl, EventsDirective, InsertFieldDirective, NgSchemaHandle, PI_COMPONENT_INDEX, PI_COMPONENT_LIST_LISTEN, PI_INPUT_MODEL_TOKEN, PI_INPUT_OPTIONS_TOKEN, PI_INPUT_SCHEMA_TOKEN, PI_VIEW_FIELD_TEMPLATE_REF_TOKEN, PI_VIEW_FIELD_TOKEN, PiyingView, PiyingViewGroup, PiyingViewGroupBase, actions, directives, rawConfig, typedComponent }; export type { ComponentRawType, NgDirectiveConfig, NgResolvedComponentDefine1, NgResolvedWraaperConfig, PiResolvedViewFieldConfig, PiViewConfig };