@piying/view-angular-core 1.10.4 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.d.ts
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import * as _angular_core from '@angular/core';
|
|
2
|
-
import { WritableSignal, Signal, Injector, CreateEffectOptions, EffectRef, InjectionToken } from '@angular/core';
|
|
3
|
-
import { UnaryFunction, Observable } from 'rxjs';
|
|
2
|
+
import { WritableSignal, Signal, Injector, CreateEffectOptions, EffectRef, CreateSignalOptions, InjectionToken } from '@angular/core';
|
|
3
|
+
import { UnaryFunction, Observable, BehaviorSubject, OperatorFunction } from 'rxjs';
|
|
4
4
|
import * as v from 'valibot';
|
|
5
5
|
import { BaseSchema, BaseMetadata, ArraySchema, BaseIssue, ErrorMessage, ArrayIssue } from 'valibot';
|
|
6
6
|
import * as _piying_valibot_visit from '@piying/valibot-visit';
|
|
7
|
-
import { SchemaOrPipe, BaseSchemaHandle, LazySchema, DefaultSchema, TupleSchema, ObjectSchema, EnumSchema, IntersectSchema, UnionSchema, Schema, VoidSchema, MetadataAction, RawConfigActionCommon, ConvertOptions } from '@piying/valibot-visit';
|
|
7
|
+
import { SchemaOrPipe, BaseSchemaHandle, LazySchema, DefaultSchema, TupleSchema, ObjectSchema, EnumSchema, IntersectSchema, UnionSchema, Schema, VoidSchema, MetadataAction, RawConfigActionCommon, RawConfigAction, ConvertOptions } from '@piying/valibot-visit';
|
|
8
8
|
export { RawConfig, asControl, asVirtualGroup, changeObject, condition, getDefaults, getSchemaByIssuePath, getSchemaMetadata } from '@piying/valibot-visit';
|
|
9
9
|
import * as _piying_view_angular_core from '@piying/view-angular-core';
|
|
10
|
+
import * as clsx from 'clsx';
|
|
10
11
|
import { ClassValue } from 'clsx';
|
|
11
12
|
|
|
12
13
|
type DisabledValueStrategy = 'reserve' | 'delete';
|
|
@@ -233,6 +234,9 @@ declare function isFieldLogicGroup(input: any): input is FieldLogicGroup;
|
|
|
233
234
|
|
|
234
235
|
declare function arrayStartsWith(list: any[], parts: any[] | any): boolean;
|
|
235
236
|
|
|
237
|
+
type UnWrapSignal<T> = T extends Signal<infer Value> ? Value : T;
|
|
238
|
+
type SignalInputValue<T> = T | Signal<T> | WritableSignal<T> | undefined;
|
|
239
|
+
|
|
236
240
|
type KeyPath = (string | number)[];
|
|
237
241
|
type RawKeyPath = string | number;
|
|
238
242
|
type SetOptional<OBJ, K extends keyof OBJ> = Omit<OBJ, K> & Partial<Pick<OBJ, K>>;
|
|
@@ -242,10 +246,14 @@ type QueryPath = string | number | KeyPath;
|
|
|
242
246
|
type Wrapper$<T> = {
|
|
243
247
|
[P in keyof T]: WritableSignal<T[P]>;
|
|
244
248
|
};
|
|
249
|
+
type UnWrapper$<T> = {
|
|
250
|
+
[P in keyof T]: UnWrapSignal<T[P]>;
|
|
251
|
+
};
|
|
245
252
|
type Wrapper$$<T> = {
|
|
246
253
|
[P in keyof T]: Signal<T[P]>;
|
|
247
254
|
};
|
|
248
255
|
type SetWrapper$<OBJ, K extends keyof OBJ> = Omit<OBJ, K> & Wrapper$<Pick<OBJ, K>>;
|
|
256
|
+
type SetUnWrapper$<OBJ, K extends keyof OBJ> = Omit<OBJ, K> & UnWrapper$<Pick<OBJ, K>>;
|
|
249
257
|
type SetWrapper$$<OBJ, K extends keyof OBJ> = Omit<OBJ, K> & Wrapper$$<Pick<OBJ, K>>;
|
|
250
258
|
type Writeable<T> = {
|
|
251
259
|
-readonly [P in keyof T]: T[P];
|
|
@@ -281,10 +289,6 @@ declare function toObservable<T>(listen: Signal<any>, source: Signal<T>, options
|
|
|
281
289
|
|
|
282
290
|
declare const clone: <T>(input: T) => T;
|
|
283
291
|
|
|
284
|
-
declare function unWrapSignal<T>(value?: T | Signal<T>): T | undefined;
|
|
285
|
-
type UnWrapSignal<T> = T extends Signal<infer Value> ? Value : T;
|
|
286
|
-
type SignalInputValue<T> = T | Signal<T> | WritableSignal<T> | undefined;
|
|
287
|
-
|
|
288
292
|
declare function toArray(input: any): any[] | undefined;
|
|
289
293
|
|
|
290
294
|
declare class SortedArray<T> extends Array {
|
|
@@ -421,6 +425,39 @@ declare function getDeepError(control?: AbstractControl): {
|
|
|
421
425
|
errors: _piying_view_angular_core.ValidationErrors | undefined;
|
|
422
426
|
}[];
|
|
423
427
|
|
|
428
|
+
type ObservableSignal<Input, Output> = WritableSignal<Input> & {
|
|
429
|
+
input: Signal<Input>;
|
|
430
|
+
output: Signal<Output>;
|
|
431
|
+
loading: Signal<boolean>;
|
|
432
|
+
input$$: Observable<Input>;
|
|
433
|
+
subject: BehaviorSubject<Input>;
|
|
434
|
+
output$$: Observable<Output>;
|
|
435
|
+
};
|
|
436
|
+
/** set输入,()输出的是管道后的值, */
|
|
437
|
+
declare function observableSignal<Input, Output>(initialValue: Input, options?: CreateSignalOptions<Input> & {
|
|
438
|
+
pipe?: OperatorFunction<Input, Output>;
|
|
439
|
+
injector?: Injector;
|
|
440
|
+
autoDestroy?: boolean;
|
|
441
|
+
}): ObservableSignal<Input, Output>;
|
|
442
|
+
|
|
443
|
+
type AsyncObjectSignal<Input> = Signal<Input> & {
|
|
444
|
+
connect: (key: string, value: Signal<any> | Promise<any> | Observable<any> | any) => void;
|
|
445
|
+
disconnect: (key: string) => void;
|
|
446
|
+
set(value: Input): void;
|
|
447
|
+
update(updateFn: (value: Input) => Input): void;
|
|
448
|
+
map(fn: (input: Input) => any): void;
|
|
449
|
+
};
|
|
450
|
+
declare function asyncObjectSignal<Input extends Record<string, any> | undefined>(initialValue: Input, options?: CreateSignalOptions<Input>): AsyncObjectSignal<Input>;
|
|
451
|
+
|
|
452
|
+
type CombineSignal<Input> = Signal<Input[]> & {
|
|
453
|
+
add: (item: Signal<Input>, index?: number) => void;
|
|
454
|
+
remove: (item: Signal<Input>) => void;
|
|
455
|
+
items: () => Signal<Input>[];
|
|
456
|
+
clean: () => void;
|
|
457
|
+
update: (fn: (list: Signal<Input>[]) => Signal<Input>[]) => void;
|
|
458
|
+
};
|
|
459
|
+
declare function combineSignal<Input>(initialValue?: Signal<Input>[], options?: CreateSignalOptions<Input[]>): CombineSignal<Input>;
|
|
460
|
+
|
|
424
461
|
interface LayoutAction<TInput = unknown> extends BaseMetadata<TInput> {
|
|
425
462
|
readonly type: 'layout';
|
|
426
463
|
readonly reference: typeof layout;
|
|
@@ -432,10 +469,12 @@ interface LayoutAction<TInput = unknown> extends BaseMetadata<TInput> {
|
|
|
432
469
|
declare function layout<TInput>(value: LayoutAction['value']): LayoutAction<TInput>;
|
|
433
470
|
|
|
434
471
|
declare class CoreSchemaHandle<Self extends CoreSchemaHandle<any, any>, RESOLVED_FN extends () => any> extends BaseSchemaHandle<Self> {
|
|
435
|
-
inputs
|
|
436
|
-
outputs
|
|
437
|
-
|
|
438
|
-
|
|
472
|
+
inputs: _piying_view_angular_core.AsyncObjectSignal<ViewInputs>;
|
|
473
|
+
outputs: _piying_view_angular_core.AsyncObjectSignal<ViewOutputs>;
|
|
474
|
+
attributes: _piying_view_angular_core.AsyncObjectSignal<ViewAttributes>;
|
|
475
|
+
events: _piying_view_angular_core.AsyncObjectSignal<ViewEvents>;
|
|
476
|
+
wrappers: _piying_view_angular_core.CombineSignal<CoreWrapperConfig>;
|
|
477
|
+
props: _piying_view_angular_core.AsyncObjectSignal<ViewProps>;
|
|
439
478
|
alias?: string;
|
|
440
479
|
movePath?: KeyPath;
|
|
441
480
|
renderConfig?: FieldRenderConfig;
|
|
@@ -456,6 +495,7 @@ declare class CoreSchemaHandle<Self extends CoreSchemaHandle<any, any>, RESOLVED
|
|
|
456
495
|
recordSchema(key: v.BaseSchema<unknown, unknown, v.BaseIssue<unknown>>, value: v.BaseSchema<unknown, unknown, v.BaseIssue<unknown>>): void;
|
|
457
496
|
restSchema(schema: v.BaseSchema<unknown, unknown, v.BaseIssue<unknown>>): void;
|
|
458
497
|
enumSchema(schema: EnumSchema): void;
|
|
498
|
+
updateProps(key: string, value: any): void;
|
|
459
499
|
intersectBefore(schema: IntersectSchema): void;
|
|
460
500
|
logicItemSchema(schema: v.BaseSchema<unknown, unknown, v.BaseIssue<unknown>>, index: number, type: 'intersect' | 'union'): void;
|
|
461
501
|
unionBefore(schema: UnionSchema): void;
|
|
@@ -471,42 +511,9 @@ declare const rawConfig: <TInput>(value: (field: AnyCoreSchemaHandle, context?:
|
|
|
471
511
|
declare function setComponent<T>(type: any): _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle> | _piying_valibot_visit.MetadataListAction<T>;
|
|
472
512
|
declare function findComponent<T>(field: _PiResolvedCommonViewFieldConfig, type: any): any;
|
|
473
513
|
|
|
474
|
-
declare function
|
|
475
|
-
declare function patchInputs<T>(inputs: CoreRawViewInputs): _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
476
|
-
declare function removeInputs<T>(list: string[]): _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
477
|
-
declare function asyncInputMerge(dataObj: Record<string, any>, data$: WritableSignal<any>): WritableSignal<any>;
|
|
478
|
-
type AsyncResult = Promise<any> | Observable<any> | Signal<any> | (any & {});
|
|
479
|
-
type AsyncProperty = (field: _PiResolvedCommonViewFieldConfig) => AsyncResult;
|
|
480
|
-
declare function patchAsyncFn(patchKey: 'props' | 'inputs' | 'attributes'): <T>(dataObj: Record<string, AsyncProperty>, options?: {
|
|
481
|
-
addPosition: "top" | "bottom";
|
|
482
|
-
hookName: "fieldResolved" | "allFieldsResolved";
|
|
483
|
-
}) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
484
|
-
declare const patchAsyncInputs: <T>(dataObj: Record<string, AsyncProperty>, options?: {
|
|
485
|
-
addPosition: "top" | "bottom";
|
|
486
|
-
hookName: "fieldResolved" | "allFieldsResolved";
|
|
487
|
-
}) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
488
|
-
|
|
489
|
-
declare function setAttributes<T>(attributes: CoreRawViewAttributes): _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
490
|
-
declare function patchAttributes<T>(attributes: CoreRawViewAttributes): _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
491
|
-
declare function removeAttributes<T>(list: string[]): _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
492
|
-
declare const patchAsyncAttributes: <T>(dataObj: Record<string, _piying_view_angular_core.AsyncProperty>, options?: {
|
|
493
|
-
addPosition: "top" | "bottom";
|
|
494
|
-
hookName: "fieldResolved" | "allFieldsResolved";
|
|
495
|
-
}) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
496
|
-
|
|
497
|
-
declare function setProps<T>(props: CoreRawProps): _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
498
|
-
declare function patchProps<T>(props: CoreRawProps): _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
499
|
-
declare function removeProps<T>(list: string[]): _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
500
|
-
declare const patchAsyncProps: <T>(dataObj: Record<string, _piying_view_angular_core.AsyncProperty>, options?: {
|
|
501
|
-
addPosition: "top" | "bottom";
|
|
502
|
-
hookName: "fieldResolved" | "allFieldsResolved";
|
|
503
|
-
}) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
504
|
-
|
|
505
|
-
declare function setOutputs<T>(outputs: CoreRawViewOutputs): _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>;
|
|
506
|
-
declare function patchOutputs<T>(outputs: CoreRawViewOutputs): _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>;
|
|
507
|
-
declare function removeOutputs<T>(list: string[]): _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>;
|
|
508
|
-
declare function mergeOutputFn(field: _PiResolvedCommonViewFieldConfig, outputs: CoreRawViewOutputs): void;
|
|
514
|
+
declare function mergeOutputFn(field: _PiResolvedCommonViewFieldConfig, outputs: ViewOutputs): void;
|
|
509
515
|
declare const mergeOutputs: <T>(outputs: Record<string, (...args: any[]) => void>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>;
|
|
516
|
+
declare const asyncMergeOutputs: <T>(outputs: Record<string, (field: _PiResolvedCommonViewFieldConfig) => (...args: any[]) => void>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>;
|
|
510
517
|
type EventChangeFn = (fn: (input: {
|
|
511
518
|
list: KeyPath | undefined;
|
|
512
519
|
output: string;
|
|
@@ -518,18 +525,6 @@ type EventChangeFn = (fn: (input: {
|
|
|
518
525
|
declare function outputChangeFn(rawField: AnyCoreSchemaHandle, fn: EventChangeFn): void;
|
|
519
526
|
declare function outputChange<T>(fn: EventChangeFn): _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>;
|
|
520
527
|
|
|
521
|
-
declare function setWrappers<T>(wrappers: CoreRawWrapperConfig[]): _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
522
|
-
type PatchWrappersOptions = {
|
|
523
|
-
position: 'head' | 'tail';
|
|
524
|
-
};
|
|
525
|
-
declare function patchWrappers<T>(wrappers: CoreRawWrapperConfig | CoreRawWrapperConfig[], options?: PatchWrappersOptions): _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
526
|
-
type AsyncCoreRawWrapperConfig = Omit<Exclude<CoreRawWrapperConfig, string>, 'inputs' | 'attributes'> & {
|
|
527
|
-
inputs?: Record<string, AsyncProperty>;
|
|
528
|
-
attributes?: Record<string, AsyncProperty>;
|
|
529
|
-
};
|
|
530
|
-
declare function patchAsyncWrapper<T>(inputWrapper: AsyncCoreRawWrapperConfig, options?: PatchWrappersOptions): _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
531
|
-
declare function removeWrappers<T>(list: string[]): _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
532
|
-
|
|
533
528
|
declare function setAlias<T>(alias: string): _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
534
529
|
|
|
535
530
|
declare function renderConfig<T>(type: FieldRenderConfig): _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
@@ -584,16 +579,6 @@ interface DisableWhenOption<T extends _PiResolvedCommonViewFieldConfig = _PiReso
|
|
|
584
579
|
}
|
|
585
580
|
declare function disableWhen<TInput>(options: DisableWhenOption): _piying_valibot_visit.RawConfigAction<"viewRawConfig", TInput, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
586
581
|
|
|
587
|
-
/** 必须防止到所有wrappers操作后面,防止设置错误
|
|
588
|
-
* 设置到顶层,可能是wrapper,也可能是component
|
|
589
|
-
*
|
|
590
|
-
*/
|
|
591
|
-
declare function topClass<T>(className: ClassValue, merge?: boolean): _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
592
|
-
/** 仅设置在组件上 */
|
|
593
|
-
declare function componentClass<T>(className: ClassValue, merge?: boolean): _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
594
|
-
declare const bottomClass: typeof componentClass;
|
|
595
|
-
declare function patchAsyncClass<T>(fn: (field: _PiResolvedCommonViewFieldConfig) => AsyncResult): _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
596
|
-
|
|
597
582
|
interface NonFieldControlAction<TInput = unknown> extends BaseMetadata<TInput> {
|
|
598
583
|
readonly type: 'nonFieldControl';
|
|
599
584
|
readonly reference: typeof nonFieldControl;
|
|
@@ -601,6 +586,150 @@ interface NonFieldControlAction<TInput = unknown> extends BaseMetadata<TInput> {
|
|
|
601
586
|
}
|
|
602
587
|
declare function nonFieldControl<TInput>(value?: boolean): NonFieldControlAction<TInput>;
|
|
603
588
|
|
|
589
|
+
declare const CustomDataSymbol: unique symbol;
|
|
590
|
+
type ConfigAction<T> = RawConfigAction<'viewRawConfig', T, any>;
|
|
591
|
+
|
|
592
|
+
declare function setWrappers<T>(wrappers: (SetOptional<SetUnWrapper$<CoreWrapperConfig, 'inputs' | 'outputs' | 'attributes' | 'events'>, 'inputs' | 'outputs' | 'attributes' | 'events'> | string)[]): _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
593
|
+
declare function removeWrappers<T>(removeList: string[] | ((list: Signal<CoreWrapperConfig>[]) => Signal<CoreWrapperConfig>[])): _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
594
|
+
declare function patchAsyncWrapper<T>(type: any, actions?: ConfigAction<any>[], options?: {
|
|
595
|
+
insertIndex?: number;
|
|
596
|
+
}): _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
597
|
+
declare function changeAsyncWrapper<T>(indexFn: (list: Signal<CoreWrapperConfig>[]) => any, actions: ConfigAction<any>[]): _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
598
|
+
declare const wrappers: {
|
|
599
|
+
set: typeof setWrappers;
|
|
600
|
+
patchAsync: typeof patchAsyncWrapper;
|
|
601
|
+
remove: typeof removeWrappers;
|
|
602
|
+
changeAsync: typeof changeAsyncWrapper;
|
|
603
|
+
};
|
|
604
|
+
|
|
605
|
+
interface PiCommonConfig<C = any, W = any> {
|
|
606
|
+
types?: Record<string, {
|
|
607
|
+
type?: C;
|
|
608
|
+
actions?: BaseMetadata<any>[];
|
|
609
|
+
}>;
|
|
610
|
+
wrappers?: Record<string, {
|
|
611
|
+
type: W;
|
|
612
|
+
actions?: RawConfigAction<'viewRawConfig', any, any>[];
|
|
613
|
+
}>;
|
|
614
|
+
}
|
|
615
|
+
|
|
616
|
+
/** 一些默认配置 */
|
|
617
|
+
declare const PI_VIEW_CONFIG_TOKEN: InjectionToken<PiCommonConfig<any, any>>;
|
|
618
|
+
/** 上下文注入 */
|
|
619
|
+
declare const PI_CONTEXT_TOKEN: InjectionToken<any>;
|
|
620
|
+
|
|
621
|
+
interface BuildRootInputItem<SchemaHandle extends CoreSchemaHandle<any, any>> {
|
|
622
|
+
field: SchemaHandle;
|
|
623
|
+
resolvedField$: WritableSignal<_PiResolvedCommonViewFieldConfig | undefined>;
|
|
624
|
+
}
|
|
625
|
+
interface BuildRootItem {
|
|
626
|
+
type: 'root';
|
|
627
|
+
field: {
|
|
628
|
+
fieldGroup?: undefined;
|
|
629
|
+
fullPath: [];
|
|
630
|
+
};
|
|
631
|
+
form?: undefined;
|
|
632
|
+
resolvedField$: WritableSignal<_PiResolvedCommonViewFieldConfig | undefined>;
|
|
633
|
+
append: (input: _PiResolvedCommonViewFieldConfig) => void;
|
|
634
|
+
}
|
|
635
|
+
interface BuildGroupItem<SchemaHandle extends CoreSchemaHandle<any, any>> {
|
|
636
|
+
type: 'group';
|
|
637
|
+
templateField?: SchemaHandle;
|
|
638
|
+
fields: SchemaHandle[];
|
|
639
|
+
form: FieldGroup;
|
|
640
|
+
field: _PiResolvedCommonViewFieldConfig;
|
|
641
|
+
append: (input: _PiResolvedCommonViewFieldConfig) => void;
|
|
642
|
+
skipAppend?: boolean;
|
|
643
|
+
}
|
|
644
|
+
interface BuildArrayItem<SchemaHandle extends CoreSchemaHandle<any, any>> {
|
|
645
|
+
type: 'array';
|
|
646
|
+
templateField: SchemaHandle;
|
|
647
|
+
fields: SchemaHandle[];
|
|
648
|
+
form: FieldArray;
|
|
649
|
+
field: _PiResolvedCommonViewFieldConfig;
|
|
650
|
+
append: (input: _PiResolvedCommonViewFieldConfig) => void;
|
|
651
|
+
skipAppend?: boolean;
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
type AsyncCallback<R> = (field: _PiResolvedCommonViewFieldConfig) => Promise<R> | Observable<R> | Signal<R> | (R & {});
|
|
655
|
+
|
|
656
|
+
/** 必须防止到所有wrappers操作后面,防止设置错误
|
|
657
|
+
* 设置到顶层,可能是wrapper,也可能是component
|
|
658
|
+
*
|
|
659
|
+
*/
|
|
660
|
+
declare function topClass<T>(className: ClassValue, merge?: boolean): _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
661
|
+
declare function patchAsyncClass<T>(fn: AsyncCallback<string>): _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
662
|
+
declare function asyncTopClass<T>(classNameFn: AsyncCallback<ClassValue>): _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
663
|
+
declare const classAction: {
|
|
664
|
+
top: typeof topClass;
|
|
665
|
+
bottom: <T>(className: ClassValue, merge?: boolean) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
666
|
+
component: <T>(className: ClassValue, merge?: boolean) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
667
|
+
asyncTop: typeof asyncTopClass;
|
|
668
|
+
asyncBottom: typeof patchAsyncClass;
|
|
669
|
+
asyncComponent: typeof patchAsyncClass;
|
|
670
|
+
};
|
|
671
|
+
|
|
672
|
+
declare const actions: {
|
|
673
|
+
class: {
|
|
674
|
+
top: <T>(className: clsx.ClassValue, merge?: boolean) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
675
|
+
bottom: <T>(className: clsx.ClassValue, merge?: boolean) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
676
|
+
component: <T>(className: clsx.ClassValue, merge?: boolean) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
677
|
+
asyncTop: <T>(classNameFn: _piying_view_angular_core.AsyncCallback<clsx.ClassValue>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
678
|
+
asyncBottom: <T>(fn: _piying_view_angular_core.AsyncCallback<string>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
679
|
+
asyncComponent: <T>(fn: _piying_view_angular_core.AsyncCallback<string>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
680
|
+
};
|
|
681
|
+
wrappers: {
|
|
682
|
+
set: <T>(wrappers: (_piying_view_angular_core.SetOptional<_piying_view_angular_core.SetUnWrapper$<_piying_view_angular_core.CoreWrapperConfig, "inputs" | "outputs" | "attributes" | "events">, "inputs" | "outputs" | "attributes" | "events"> | string)[]) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
683
|
+
patchAsync: <T>(type: any, actions?: _piying_view_angular_core.ConfigAction<any>[], options?: {
|
|
684
|
+
insertIndex?: number;
|
|
685
|
+
}) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
686
|
+
remove: <T>(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>;
|
|
687
|
+
changeAsync: <T>(indexFn: (list: _angular_core.Signal<_piying_view_angular_core.CoreWrapperConfig>[]) => any, actions: _piying_view_angular_core.ConfigAction<any>[]) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
688
|
+
};
|
|
689
|
+
inputs: {
|
|
690
|
+
patch: <T>(value: Record<string, any>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
691
|
+
set: <T>(value: Record<string, any>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
692
|
+
patchAsync: <T>(dataObj: Record<string, (field: _piying_view_angular_core._PiResolvedCommonViewFieldConfig) => any>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
693
|
+
remove: <T>(list: string[]) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
694
|
+
map: <T>(fn: (value: any) => any) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
695
|
+
mapAsync: <T>(fn: (field: _piying_view_angular_core._PiResolvedCommonViewFieldConfig) => (value: any) => any) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
696
|
+
};
|
|
697
|
+
outputs: {
|
|
698
|
+
patch: <T>(value: Record<string, (...args: any[]) => any>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
699
|
+
set: <T>(value: Record<string, (...args: any[]) => any>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
700
|
+
patchAsync: <T>(dataObj: Record<string, (field: _piying_view_angular_core._PiResolvedCommonViewFieldConfig) => (...args: any[]) => any>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
701
|
+
remove: <T>(list: string[]) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
702
|
+
merge: <T>(outputs: Record<string, (...args: any[]) => void>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
703
|
+
mergeAsync: <T>(outputs: Record<string, (field: _piying_view_angular_core._PiResolvedCommonViewFieldConfig) => (...args: any[]) => void>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
704
|
+
map: <T>(fn: (value: any) => any) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
705
|
+
mapAsync: <T>(fn: (field: _piying_view_angular_core._PiResolvedCommonViewFieldConfig) => (value: any) => any) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
706
|
+
};
|
|
707
|
+
attributes: {
|
|
708
|
+
patch: <T>(value: Record<string, any>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
709
|
+
set: <T>(value: Record<string, any>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
710
|
+
patchAsync: <T>(dataObj: Record<string, (field: _piying_view_angular_core._PiResolvedCommonViewFieldConfig) => any>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
711
|
+
remove: <T>(list: string[]) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
712
|
+
map: <T>(fn: (value: any) => any) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
713
|
+
mapAsync: <T>(fn: (field: _piying_view_angular_core._PiResolvedCommonViewFieldConfig) => (value: any) => any) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
714
|
+
};
|
|
715
|
+
events: {
|
|
716
|
+
patch: <T>(value: Record<string, (event: Event) => any>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
717
|
+
set: <T>(value: Record<string, (event: Event) => any>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
718
|
+
patchAsync: <T>(dataObj: Record<string, (field: _piying_view_angular_core._PiResolvedCommonViewFieldConfig) => (event: Event) => any>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
719
|
+
remove: <T>(list: string[]) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
720
|
+
map: <T>(fn: (value: any) => any) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
721
|
+
mapAsync: <T>(fn: (field: _piying_view_angular_core._PiResolvedCommonViewFieldConfig) => (value: any) => any) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
722
|
+
};
|
|
723
|
+
props: {
|
|
724
|
+
patch: <T>(value: Record<string, any>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
725
|
+
set: <T>(value: Record<string, any>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
726
|
+
patchAsync: <T>(dataObj: Record<string, (field: _piying_view_angular_core._PiResolvedCommonViewFieldConfig) => any>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
727
|
+
remove: <T>(list: string[]) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
728
|
+
map: <T>(fn: (value: any) => any) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
729
|
+
mapAsync: <T>(fn: (field: _piying_view_angular_core._PiResolvedCommonViewFieldConfig) => (value: any) => any) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_angular_core.AnyCoreSchemaHandle>;
|
|
730
|
+
};
|
|
731
|
+
};
|
|
732
|
+
|
|
604
733
|
declare function convert<RESULT extends Omit<PiResolvedCommonViewFieldConfig<any, any>, 'define'>>(obj: SchemaOrPipe, options: SetOptional<ConvertOptions, 'handle'> & {
|
|
605
734
|
injector: Injector;
|
|
606
735
|
builder: typeof FormBuilder;
|
|
@@ -614,20 +743,14 @@ declare const NFCSchema: v.OptionalSchema<v.VoidSchema<undefined>, undefined>;
|
|
|
614
743
|
interface FieldRenderConfig {
|
|
615
744
|
hidden?: boolean;
|
|
616
745
|
}
|
|
617
|
-
/**
|
|
618
|
-
type
|
|
619
|
-
/** @deprecated 使用actions */
|
|
746
|
+
/** 解析后define使用 */
|
|
747
|
+
type CoreResolvedComponentDefine = {
|
|
620
748
|
type: any;
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
/** @deprecated 使用actions */
|
|
626
|
-
outputs?: CoreRawViewOutputs;
|
|
627
|
-
actions?: BaseMetadata<any>[];
|
|
749
|
+
inputs?: AsyncObjectSignal<ViewInputs>;
|
|
750
|
+
outputs?: AsyncObjectSignal<ViewOutputs>;
|
|
751
|
+
attributes?: AsyncObjectSignal<ViewAttributes>;
|
|
752
|
+
events?: AsyncObjectSignal<ViewEvents>;
|
|
628
753
|
};
|
|
629
|
-
/** 解析后define使用 */
|
|
630
|
-
type CoreResolvedComponentDefine = SetWrapper$<CoreRawComponentDefine, 'attributes' | 'inputs' | 'outputs'>;
|
|
631
754
|
interface HookConfig<RESOLVED_FIELD> {
|
|
632
755
|
/** 配置刚被解析 */
|
|
633
756
|
fieldResolved?: (field: RESOLVED_FIELD) => void;
|
|
@@ -644,7 +767,7 @@ type PiResolvedCommonViewFieldConfig<SelfResolvedFn extends () => any, Define> =
|
|
|
644
767
|
/** 查询时使用 */
|
|
645
768
|
readonly keyPath?: KeyPath | undefined;
|
|
646
769
|
readonly fullPath: KeyPath;
|
|
647
|
-
readonly props:
|
|
770
|
+
readonly props: AsyncObjectSignal<Record<string, any>>;
|
|
648
771
|
children?: Signal<ReturnType<SelfResolvedFn>[]>;
|
|
649
772
|
fixedChildren?: WritableSignal<ReturnType<SelfResolvedFn>[]>;
|
|
650
773
|
restChildren?: WritableSignal<ReturnType<SelfResolvedFn>[]>;
|
|
@@ -664,119 +787,36 @@ type PiResolvedCommonViewFieldConfig<SelfResolvedFn extends () => any, Define> =
|
|
|
664
787
|
remove: (index: any) => void;
|
|
665
788
|
};
|
|
666
789
|
readonly define?: WritableSignal<Define>;
|
|
667
|
-
wrappers:
|
|
668
|
-
} & Readonly<Pick<AnyCoreSchemaHandle, 'priority' | 'alias'>> & Readonly<
|
|
790
|
+
wrappers: CombineSignal<CoreWrapperConfig>;
|
|
791
|
+
} & Readonly<Pick<AnyCoreSchemaHandle, 'priority' | 'alias'>> & Readonly<Required<Pick<AnyCoreSchemaHandle, 'inputs' | 'outputs' | 'attributes' | 'events'>>> & Readonly<Wrapper$<Required<Pick<AnyCoreSchemaHandle, 'formConfig' | 'renderConfig'>>>>;
|
|
669
792
|
type _PiResolvedCommonViewFieldConfig = PiResolvedCommonViewFieldConfig<() => _PiResolvedCommonViewFieldConfig, CoreResolvedComponentDefine>;
|
|
670
|
-
type ConfigMergeStrategy = 'merge' | 'replace';
|
|
671
|
-
type PiCommonDefaultConfig = {
|
|
672
|
-
/** @deprecated 使用actions代替 */
|
|
673
|
-
formConfig?: CoreSchemaHandle<any, any>['formConfig'];
|
|
674
|
-
/** @deprecated 使用actions代替 */
|
|
675
|
-
props?: CoreSchemaHandle<any, any>['props'];
|
|
676
|
-
/** @deprecated 使用actions代替 */
|
|
677
|
-
renderConfig?: CoreSchemaHandle<any, any>['renderConfig'];
|
|
678
|
-
/** @deprecated 使用actions代替 */
|
|
679
|
-
inputs?: CoreSchemaHandle<any, any>['inputs'];
|
|
680
|
-
/** @deprecated 使用actions代替 */
|
|
681
|
-
outputs?: CoreSchemaHandle<any, any>['outputs'];
|
|
682
|
-
/** @deprecated 使用actions代替 */
|
|
683
|
-
wrappers?: CoreSchemaHandle<any, any>['wrappers'];
|
|
684
|
-
/** @deprecated 使用actions代替*/
|
|
685
|
-
attributes?: CoreSchemaHandle<any, any>['attributes'];
|
|
686
|
-
/** @deprecated 使用actions代替*/
|
|
687
|
-
type?: any;
|
|
688
|
-
actions?: BaseMetadata<any>[];
|
|
689
|
-
};
|
|
690
793
|
interface FormBuilderOptions<T> {
|
|
691
794
|
form$$: Signal<FieldGroup>;
|
|
692
795
|
resolvedField$: WritableSignal<T>;
|
|
693
796
|
context: any;
|
|
694
797
|
}
|
|
695
|
-
type
|
|
696
|
-
type
|
|
697
|
-
type
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
type CoreWrapperConfig1 = {
|
|
798
|
+
type ViewInputs = Record<string, any>;
|
|
799
|
+
type ViewOutputs = Record<string, (...args: any[]) => any>;
|
|
800
|
+
type ViewAttributes = Record<string, any>;
|
|
801
|
+
type ViewEvents = Record<string, (event: Event) => any>;
|
|
802
|
+
type ViewProps = Record<string, any>;
|
|
803
|
+
type CoreWrapperConfig = {
|
|
702
804
|
type: string | any | LazyImport<any>;
|
|
703
|
-
attributes
|
|
704
|
-
inputs
|
|
705
|
-
outputs
|
|
706
|
-
|
|
707
|
-
type CoreRawWrapperConfig = string | CoreWrapperConfig1;
|
|
708
|
-
type CoreResolvedWrapperConfig = {
|
|
709
|
-
type: any | LazyImport<any>;
|
|
710
|
-
attributes: WritableSignal<CoreRawViewAttributes | undefined>;
|
|
711
|
-
inputs: WritableSignal<CoreRawViewInputs | undefined>;
|
|
712
|
-
outputs?: CoreRawViewOutputs;
|
|
805
|
+
attributes: AsyncObjectSignal<ViewAttributes>;
|
|
806
|
+
inputs: AsyncObjectSignal<ViewInputs>;
|
|
807
|
+
outputs: AsyncObjectSignal<ViewOutputs>;
|
|
808
|
+
events: AsyncObjectSignal<ViewEvents>;
|
|
713
809
|
};
|
|
714
810
|
|
|
715
|
-
interface BuildRootInputItem<SchemaHandle extends CoreSchemaHandle<any, any>> {
|
|
716
|
-
field: SchemaHandle;
|
|
717
|
-
resolvedField$: WritableSignal<_PiResolvedCommonViewFieldConfig | undefined>;
|
|
718
|
-
}
|
|
719
|
-
interface BuildRootItem {
|
|
720
|
-
type: 'root';
|
|
721
|
-
field: {
|
|
722
|
-
fieldGroup?: undefined;
|
|
723
|
-
fullPath: [];
|
|
724
|
-
};
|
|
725
|
-
form?: undefined;
|
|
726
|
-
resolvedField$: WritableSignal<_PiResolvedCommonViewFieldConfig | undefined>;
|
|
727
|
-
append: (input: _PiResolvedCommonViewFieldConfig) => void;
|
|
728
|
-
}
|
|
729
|
-
interface BuildGroupItem<SchemaHandle extends CoreSchemaHandle<any, any>> {
|
|
730
|
-
type: 'group';
|
|
731
|
-
templateField?: SchemaHandle;
|
|
732
|
-
fields: SchemaHandle[];
|
|
733
|
-
form: FieldGroup;
|
|
734
|
-
field: _PiResolvedCommonViewFieldConfig;
|
|
735
|
-
append: (input: _PiResolvedCommonViewFieldConfig) => void;
|
|
736
|
-
skipAppend?: boolean;
|
|
737
|
-
}
|
|
738
|
-
interface BuildArrayItem<SchemaHandle extends CoreSchemaHandle<any, any>> {
|
|
739
|
-
type: 'array';
|
|
740
|
-
templateField: SchemaHandle;
|
|
741
|
-
fields: SchemaHandle[];
|
|
742
|
-
form: FieldArray;
|
|
743
|
-
field: _PiResolvedCommonViewFieldConfig;
|
|
744
|
-
append: (input: _PiResolvedCommonViewFieldConfig) => void;
|
|
745
|
-
skipAppend?: boolean;
|
|
746
|
-
}
|
|
747
|
-
|
|
748
811
|
declare class FormBuilder<SchemaHandle extends CoreSchemaHandle<any, any>> {
|
|
749
812
|
#private;
|
|
750
813
|
buildRoot(item: BuildRootInputItem<SchemaHandle>): void;
|
|
751
814
|
allFieldInitHookCall(): void;
|
|
752
815
|
afterResolveConfig(rawConfig: SchemaHandle, config: _PiResolvedCommonViewFieldConfig): _PiResolvedCommonViewFieldConfig | undefined;
|
|
753
|
-
protected configMergeRaw<T extends SignalInputValue<any>>(list: T[], isArray: boolean, strategy: ConfigMergeStrategy): UnWrapSignal<NonNullable<T>>;
|
|
754
|
-
/**
|
|
755
|
-
* 后面覆盖前面
|
|
756
|
-
* */
|
|
757
|
-
protected configMerge<T extends SignalInputValue<any>>(list: T[], isArray: boolean, strategy: ConfigMergeStrategy): WritableSignal<UnWrapSignal<NonNullable<T>>>;
|
|
758
816
|
}
|
|
759
817
|
|
|
760
|
-
interface PiCommonConfig {
|
|
761
|
-
types?: Record<string, PiCommonDefaultConfig>;
|
|
762
|
-
/** @deprecated 使用defaultConfig中的actions代替 */
|
|
763
|
-
defaultConfig?: Omit<PiCommonDefaultConfig, 'type'>;
|
|
764
|
-
/** @deprecated 使用defaultConfig中的actions代替 */
|
|
765
|
-
defaultConfigMergeStrategy?: Record<DefaultConfigKey, ConfigMergeStrategy>;
|
|
766
|
-
wrappers?: Record<string, Omit<CoreWrapperConfig1, 'type'> & {
|
|
767
|
-
type: any | LazyImport<any>;
|
|
768
|
-
actions?: BaseMetadata<any>[];
|
|
769
|
-
}>;
|
|
770
|
-
}
|
|
771
|
-
type DefaultConfigKey = Exclude<keyof PiCommonDefaultConfig, 'type' | 'actions'>;
|
|
772
|
-
|
|
773
|
-
/** 一些默认配置 */
|
|
774
|
-
declare const PI_VIEW_CONFIG_TOKEN: InjectionToken<PiCommonConfig>;
|
|
775
|
-
/** 上下文注入 */
|
|
776
|
-
declare const PI_CONTEXT_TOKEN: InjectionToken<any>;
|
|
777
|
-
|
|
778
818
|
declare function isGroup(schema: AnyCoreSchemaHandle): boolean | undefined;
|
|
779
819
|
declare function isArray(schema: AnyCoreSchemaHandle): boolean;
|
|
780
820
|
|
|
781
|
-
export { AbstractControl, CoreSchemaHandle, FieldArray, FieldControl, FieldGroup, FieldLogicGroup, FormBuilder, INVALID, NFCSchema, PENDING, PI_CONTEXT_TOKEN, PI_VIEW_CONFIG_TOKEN, SortedArray, UpdateType, VALID, arrayStartsWith,
|
|
782
|
-
export type { AbstractControlParams, AnyCoreSchemaHandle, ArraryIterable, ArrayDeletionMode,
|
|
821
|
+
export { AbstractControl, CoreSchemaHandle, CustomDataSymbol, FieldArray, FieldControl, FieldGroup, FieldLogicGroup, FormBuilder, INVALID, NFCSchema, PENDING, PI_CONTEXT_TOKEN, PI_VIEW_CONFIG_TOKEN, SortedArray, UpdateType, VALID, actions, arrayStartsWith, asyncMergeOutputs, asyncObjectSignal, clone, combineSignal, controlStatusList, convert, createViewControlLink, disableWhen, effectListen, fieldControlStatusClass, findComponent, formConfig, getDeepError, getLazyImport, hideWhen, initListen, isArray, isFieldArray, isFieldControl, isFieldGroup, isFieldLogicGroup, isGroup, isLazyMark, layout, lazyMark, mergeHooks, mergeHooksFn, mergeOutputFn, mergeOutputs, nonFieldControl, observableSignal, outputChange, outputChangeFn, patchHooks, rawConfig, removeHooks, renderConfig, setAlias, setComponent, setHooks, toArray, toObservable, valueChange, valueChangeFn, classAction as ɵclassAction, wrappers as ɵwrappers };
|
|
822
|
+
export type { AbstractControlParams, AnyCoreSchemaHandle, ArraryIterable, ArrayDeletionMode, AsyncCallback, AsyncObjectSignal, AsyncValidatorFn, BuildArrayItem, BuildGroupItem, BuildRootInputItem, BuildRootItem, CombineSignal, ConfigAction, ControlValueAccessor, CoreResolvedComponentDefine, CoreWrapperConfig, DisableWhenOption, DisabledValueStrategy, EventChangeFn, FieldArrayConfig$, FieldFormConfig, FieldFormConfig$, FieldGroupConfig$, FieldLogicGroupConfig$, FieldRenderConfig, FieldTransformerConfig, FormBuilderOptions, FormHooks, HideWhenOption, HookConfig, HooksConfig, KeyPath, LayoutAction, LazyImport, LazyMarkType, LogicType, MergeHooksConfig, NonFieldControlAction, ObservableSignal, PiCommonConfig, PiResolvedCommonViewFieldConfig, QueryPath, RawKeyPath, SetOptional, SetReadonly, SetUnWrapper$, SetWrapper$, SetWrapper$$, SignalInputValue, ToObservableOptions, UnWrapSignal, UnWrapper$, VALID_STATUS, ValidationErrors, ValidatorFn, ValueChangFnOptions, ValueChangeFn, ViewAttributes, ViewEvents, ViewInputs, ViewOutputs, ViewProps, Wrapper$, Writeable, _PiResolvedCommonViewFieldConfig };
|