跳转到内容

DefineComponentEntry

Defined in: projects/view-angular/lib/util/typed-field-component-pipe.ts:131

定义单条 entry: 路径 + 组件 + 该路径下的 actions。

  • 路径 P 由第一个实参推断, 组件 K 由第二个实参推断;
  • 组件先翻成表再进 CompEntryAction, 工厂侧靠 CompAction 的配对通道拿到同一张表, 所以 d.inputs.patchAsync({...}) 的 key/值类型依旧由这条 entry 的组件决定。

component 可省(或直接传 undefined): 走「默认设计」—— 用该路径 schema 的 type(如 ‘string’) 当组件标识。

Root extends v.BaseSchema<any, any, any>

Cfg

DefineComponentEntry<P, K>(path, component, actions): FieldEntry

Defined in: projects/view-angular/lib/util/typed-field-component-pipe.ts:135

定义单条 entry: 路径 + 组件 + 该路径下的 actions。

  • 路径 P 由第一个实参推断, 组件 K 由第二个实参推断;
  • 组件先翻成表再进 CompEntryAction, 工厂侧靠 CompAction 的配对通道拿到同一张表, 所以 d.inputs.patchAsync({...}) 的 key/值类型依旧由这条 entry 的组件决定。

component 可省(或直接传 undefined): 走「默认设计」—— 用该路径 schema 的 type(如 ‘string’) 当组件标识。

P extends NodePathsOf<any, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]> | [string, "[rest]"] | [string, number] | [string, "[value]"] | [string, "[key]"] | [string, string] | ["[rest]", "[rest]"] | ["[rest]", number] | ["[rest]", "[value]"] | ["[rest]", "[key]"] | ["[rest]", string] | [number, "[rest]"] | [number, number] | [number, "[value]"] | [number, "[key]"] | [number, string] | ["[value]", "[rest]"] | ["[value]", number] | ["[value]", "[value]"] | ["[value]", "[key]"] | ["[value]", string] | ["[key]", "[rest]"] | ["[key]", number] | ["[key]", "[value]"] | ["[key]", "[key]"] | ["[key]", string]

K extends string | number | symbol | Type<any> | LazyImport<any> | undefined

[...P[]]

K

readonly CompEntryAction<Root, P, [K] extends [undefined] ? TablesOfComponent<DefaultComponentOf<Cfg, ComponentKeyOfNode<PiFieldScopeOf<GetResult<Root, Root, any, InferAliasMap<Root>, P>>["schema"]>>> : TablesOfComponent<ComponentOf<Cfg, K>>>[]

FieldEntry

DefineComponentEntry<P>(path, actions): FieldEntry

Defined in: projects/view-angular/lib/util/typed-field-component-pipe.ts:147

直接传 actions: 组件走默认的 schema type

P extends NodePathsOf<any, [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]> | [string, "[rest]"] | [string, number] | [string, "[value]"] | [string, "[key]"] | [string, string] | ["[rest]", "[rest]"] | ["[rest]", number] | ["[rest]", "[value]"] | ["[rest]", "[key]"] | ["[rest]", string] | [number, "[rest]"] | [number, number] | [number, "[value]"] | [number, "[key]"] | [number, string] | ["[value]", "[rest]"] | ["[value]", number] | ["[value]", "[value]"] | ["[value]", "[key]"] | ["[value]", string] | ["[key]", "[rest]"] | ["[key]", number] | ["[key]", "[value]"] | ["[key]", "[key]"] | ["[key]", string]

[...P[]]

readonly CompEntryAction<Root, P, TablesOfComponent<DefaultComponentOf<Cfg, ComponentKeyOfNode<PiFieldScopeOf<GetResult<Root, Root, any, InferAliasMap<Root>, P>>["schema"]>>>>[]

FieldEntry

attributes: AttributesGroupFactory

Defined in: projects/view-angular-core/convert/action/typed-field-pipe.ts:122

TypedComponentActionFactories.attributes


class: object

Defined in: projects/view-angular-core/convert/action/typed-field-pipe.ts:139

class 族: 同步形态不涉 field, 异步形态的回调必须拿到路径精确的 field。 这里重新声明而不是 typeof classAction: 底层函数把 field 写死成了松散形态。

asyncBottom: <F>(classNameFn) => ConfigAction<F>

F extends AnyField

AsyncCallback<string, F>

ConfigAction<F>

asyncComponent: <F>(classNameFn) => ConfigAction<F>

F extends AnyField

AsyncCallback<string, F>

ConfigAction<F>

asyncTop: <F>(classNameFn) => ConfigAction<F>

F extends AnyField

AsyncCallback<ClassValue, F>

ConfigAction<F>

bottom: <F>(className, merge?) => ConfigAction<F>

F

ClassValue

boolean

ConfigAction<F>

component: <F>(className, merge?) => ConfigAction<F>

F

ClassValue

boolean

ConfigAction<F>

top: <F>(className, merge?) => ConfigAction<F>

F

ClassValue

boolean

ConfigAction<F>

TypedComponentActionFactories.class


createOptions: object

Defined in: projects/view-angular-core/convert/action/typed-field-pipe.ts:126

patch: <F>(value) => ConfigAction<F>

F

any

ConfigAction<F>

set: <F>(value) => ConfigAction<F>

F

any

ConfigAction<F>

TypedComponentActionFactories.createOptions


disableWhen: <F>(options) => ConfigAction<F>

Defined in: projects/view-angular-core/convert/action/typed-field-pipe.ts:155

F extends AnyField

DisableWhenOption<F>

ConfigAction<F>

TypedComponentActionFactories.disableWhen


events: TypedComponentEventsActionsFactory

Defined in: projects/view-angular-core/convert/action/typed-component-common.ts:340

TypedComponentActionFactories.events


hideWhen: <F>(options) => ConfigAction<F>

Defined in: projects/view-angular-core/convert/action/typed-field-pipe.ts:154

F extends AnyField

HideWhenOption<F>

ConfigAction<F>

TypedComponentActionFactories.hideWhen


hooks: HooksGroupFactory

Defined in: projects/view-angular-core/convert/action/typed-field-pipe.ts:125

TypedComponentActionFactories.hooks


inputs: CompInputActionsFactory<CompTables>

Defined in: projects/view-angular-core/convert/action/typed-component-common.ts:337

TypedComponentActionFactories.inputs


models: CompModelActionsFactory<CompTables>

Defined in: projects/view-angular-core/convert/action/typed-component-common.ts:339

TypedComponentActionFactories.models


outputChange: <F, T>(fn) => CompAction<F, T>

Defined in: projects/view-angular-core/convert/action/typed-component-common.ts:347

与 outputs 同族: 靠 CompAction 别名配对把表送进回调内部的 output 名约束

F

T extends CompTables = CompTables

CompOutputChangeFn<F, T["outputKeys"], T["outputsHandlerMap"]>

CompAction<F, T>

TypedComponentActionFactories.outputChange


outputs: CompOutputActionsFactory<CompTables>

Defined in: projects/view-angular-core/convert/action/typed-component-common.ts:338

TypedComponentActionFactories.outputs


props: KeyGroupFactory

Defined in: projects/view-angular-core/convert/action/typed-field-pipe.ts:118

TypedComponentActionFactories.props


providers: object

Defined in: projects/view-angular-core/convert/action/typed-field-pipe.ts:130

change: <T>(providersFn) => RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>

T

(input) => InjectorProvider[]

RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>

patch: <T>(providers) => RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>

T

InjectorProvider[]

RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>

set: <T>(providers) => RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>

T

InjectorProvider[]

RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>

TypedComponentActionFactories.providers


slots: KeyGroupFactory

Defined in: projects/view-angular-core/convert/action/typed-field-pipe.ts:121

TypedComponentActionFactories.slots


valueChange: <F>(listenFn) => ConfigAction<F>

Defined in: projects/view-angular-core/convert/action/typed-field-pipe.ts:158

F extends AnyField

ValueChangeFn<F>

ConfigAction<F>

TypedComponentActionFactories.valueChange


wrappers: Omit<{ changeAsync: <T>(indexFn, actions) => RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>; patch: <T>(wrappers) => RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>; patchAsync: <T>(type, actions?, options?) => RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>; remove: <T>(removeList) => RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>; set: <T>(wrappers) => RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>; }, "set" | "patchAsync" | "patch" | "remove"> & TypedWrappersActionsFactory<Cfg>

Defined in: projects/view-angular-core/convert/action/typed-component-common.ts:341

TypedComponentActionFactories.wrappers