@piying/view-core 2.7.5 → 3.0.0
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/fesm2022/piying-view-core.mjs +21 -1
- package/fesm2022/piying-view-core.mjs.map +1 -1
- package/index.d.ts +19 -6
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -521,6 +521,7 @@ declare class CoreSchemaHandle<Self extends CoreSchemaHandle<any, any>, RESOLVED
|
|
|
521
521
|
outputs: ViewOutputs;
|
|
522
522
|
attributes: ViewAttributes;
|
|
523
523
|
events: ViewEvents;
|
|
524
|
+
slots: ViewSlots;
|
|
524
525
|
wrappers: RawCoreWrapperConfig[];
|
|
525
526
|
props: ViewProps;
|
|
526
527
|
alias?: string;
|
|
@@ -658,8 +659,8 @@ declare function patchAsyncWrapper<T>(type: any, actions?: ConfigAction<any>[],
|
|
|
658
659
|
}): _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>;
|
|
659
660
|
declare function changeAsyncWrapper<T>(indexFn: (list: Signal<CoreWrapperConfig>[]) => any, actions: ConfigAction<any>[]): _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>;
|
|
660
661
|
declare const wrappers: {
|
|
661
|
-
set: <T>(wrappers: (SetOptional<SetUnWrapper$<CoreWrapperConfig, "inputs" | "outputs" | "attributes" | "events">, "inputs" | "outputs" | "attributes" | "events"> | string)[]) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>;
|
|
662
|
-
patch: <T>(wrappers: (SetOptional<SetUnWrapper$<CoreWrapperConfig, "inputs" | "outputs" | "attributes" | "events">, "inputs" | "outputs" | "attributes" | "events"> | string)[]) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>;
|
|
662
|
+
set: <T>(wrappers: (SetOptional<SetUnWrapper$<CoreWrapperConfig, "inputs" | "outputs" | "attributes" | "events" | "slots">, "inputs" | "outputs" | "attributes" | "events" | "slots"> | string)[]) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>;
|
|
663
|
+
patch: <T>(wrappers: (SetOptional<SetUnWrapper$<CoreWrapperConfig, "inputs" | "outputs" | "attributes" | "events" | "slots">, "inputs" | "outputs" | "attributes" | "events" | "slots"> | string)[]) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, AnyCoreSchemaHandle>;
|
|
663
664
|
patchAsync: typeof patchAsyncWrapper;
|
|
664
665
|
remove: typeof removeWrappers;
|
|
665
666
|
changeAsync: typeof changeAsyncWrapper;
|
|
@@ -753,8 +754,8 @@ declare const actions: {
|
|
|
753
754
|
asyncComponent: <T>(fn: _piying_view_core.AsyncCallback<string>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_core.AnyCoreSchemaHandle>;
|
|
754
755
|
};
|
|
755
756
|
wrappers: {
|
|
756
|
-
set: <T>(wrappers: (_piying_view_core.SetOptional<_piying_view_core.SetUnWrapper$<_piying_view_core.CoreWrapperConfig, "inputs" | "outputs" | "attributes" | "events">, "inputs" | "outputs" | "attributes" | "events"> | string)[]) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_core.AnyCoreSchemaHandle>;
|
|
757
|
-
patch: <T>(wrappers: (_piying_view_core.SetOptional<_piying_view_core.SetUnWrapper$<_piying_view_core.CoreWrapperConfig, "inputs" | "outputs" | "attributes" | "events">, "inputs" | "outputs" | "attributes" | "events"> | string)[]) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_core.AnyCoreSchemaHandle>;
|
|
757
|
+
set: <T>(wrappers: (_piying_view_core.SetOptional<_piying_view_core.SetUnWrapper$<_piying_view_core.CoreWrapperConfig, "inputs" | "outputs" | "attributes" | "events" | "slots">, "inputs" | "outputs" | "attributes" | "events" | "slots"> | string)[]) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_core.AnyCoreSchemaHandle>;
|
|
758
|
+
patch: <T>(wrappers: (_piying_view_core.SetOptional<_piying_view_core.SetUnWrapper$<_piying_view_core.CoreWrapperConfig, "inputs" | "outputs" | "attributes" | "events" | "slots">, "inputs" | "outputs" | "attributes" | "events" | "slots"> | string)[]) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_core.AnyCoreSchemaHandle>;
|
|
758
759
|
patchAsync: <T>(type: any, actions?: _piying_view_core.ConfigAction<any>[], options?: {
|
|
759
760
|
insertIndex?: number;
|
|
760
761
|
}) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_core.AnyCoreSchemaHandle>;
|
|
@@ -802,6 +803,13 @@ declare const actions: {
|
|
|
802
803
|
remove: <T>(list: string[]) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_core.AnyCoreSchemaHandle>;
|
|
803
804
|
mapAsync: <T>(fn: (field: _piying_view_core._PiResolvedCommonViewFieldConfig) => (value: any) => any) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_core.AnyCoreSchemaHandle>;
|
|
804
805
|
};
|
|
806
|
+
slots: {
|
|
807
|
+
patch: <T>(value: Record<string, any>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_core.AnyCoreSchemaHandle>;
|
|
808
|
+
set: <T>(value: Record<string, any>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_core.AnyCoreSchemaHandle>;
|
|
809
|
+
patchAsync: <T>(dataObj: Record<string, _piying_view_core.AsyncProperty<any>>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_core.AnyCoreSchemaHandle>;
|
|
810
|
+
remove: <T>(list: string[]) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_core.AnyCoreSchemaHandle>;
|
|
811
|
+
mapAsync: <T>(fn: (field: _piying_view_core._PiResolvedCommonViewFieldConfig) => (value: any) => any) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_core.AnyCoreSchemaHandle>;
|
|
812
|
+
};
|
|
805
813
|
props: {
|
|
806
814
|
patch: <T>(value: Record<string, any>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_core.AnyCoreSchemaHandle>;
|
|
807
815
|
set: <T>(value: Record<string, any>) => _piying_valibot_visit.RawConfigAction<"viewRawConfig", T, _piying_view_core.AnyCoreSchemaHandle>;
|
|
@@ -830,6 +838,7 @@ type CoreResolvedComponentDefine = {
|
|
|
830
838
|
outputs?: AsyncObjectSignal<ViewOutputs>;
|
|
831
839
|
attributes?: AsyncObjectSignal<ViewAttributes>;
|
|
832
840
|
events?: AsyncObjectSignal<ViewEvents>;
|
|
841
|
+
slots?: AsyncObjectSignal<ViewSlots>;
|
|
833
842
|
};
|
|
834
843
|
interface HookConfig<RESOLVED_FIELD> {
|
|
835
844
|
/** 配置刚被解析 */
|
|
@@ -874,6 +883,7 @@ type PiResolvedCommonViewFieldConfig<SelfResolvedFn extends () => any, Define> =
|
|
|
874
883
|
readonly outputs: AsyncObjectSignal<ViewOutputs>;
|
|
875
884
|
readonly attributes: AsyncObjectSignal<ViewAttributes>;
|
|
876
885
|
readonly events: AsyncObjectSignal<ViewEvents>;
|
|
886
|
+
readonly slots: AsyncObjectSignal<ViewSlots>;
|
|
877
887
|
readonly wrappers: CombineSignal<CoreWrapperConfig>;
|
|
878
888
|
} & Readonly<Wrapper$<Required<Pick<AnyCoreSchemaHandle, 'formConfig' | 'renderConfig'>>>>;
|
|
879
889
|
type _PiResolvedCommonViewFieldConfig = PiResolvedCommonViewFieldConfig<() => _PiResolvedCommonViewFieldConfig, CoreResolvedComponentDefine>;
|
|
@@ -887,19 +897,22 @@ type ViewOutputs = Record<string, (...args: any[]) => any>;
|
|
|
887
897
|
type ViewAttributes = Record<string, any>;
|
|
888
898
|
type ViewEvents = Record<string, (event: Event) => any>;
|
|
889
899
|
type ViewProps = Record<string, any>;
|
|
900
|
+
type ViewSlots = Record<string, any>;
|
|
890
901
|
type RawCoreWrapperConfig = {
|
|
891
902
|
type: string | any | LazyImport<any>;
|
|
892
903
|
attributes: ViewAttributes;
|
|
893
904
|
inputs: ViewInputs;
|
|
894
905
|
outputs: ViewOutputs;
|
|
895
906
|
events: ViewEvents;
|
|
907
|
+
slots: ViewSlots;
|
|
896
908
|
};
|
|
897
909
|
type CoreWrapperConfig = {
|
|
898
910
|
type: string | any | LazyImport<any>;
|
|
899
|
-
attributes: AsyncObjectSignal<ViewAttributes>;
|
|
900
911
|
inputs: AsyncObjectSignal<ViewInputs>;
|
|
901
912
|
outputs: AsyncObjectSignal<ViewOutputs>;
|
|
913
|
+
attributes: AsyncObjectSignal<ViewAttributes>;
|
|
902
914
|
events: AsyncObjectSignal<ViewEvents>;
|
|
915
|
+
slots: AsyncObjectSignal<ViewSlots>;
|
|
903
916
|
};
|
|
904
917
|
|
|
905
918
|
declare class FormBuilder<SchemaHandle extends CoreSchemaHandle<any, any>> {
|
|
@@ -915,4 +928,4 @@ declare function isArray(schema: AnyCoreSchemaHandle): boolean;
|
|
|
915
928
|
declare function findError<K extends string>(list: ValidationErrors2[] | undefined, key: K): (K extends ValidationValibotError2['kind'] ? ValidationValibotError2 : K extends ValidationErrorError2['kind'] ? ValidationErrorError2 : ValidationCommonError2) | undefined;
|
|
916
929
|
|
|
917
930
|
export { AbstractControl, CoreSchemaHandle, CustomDataSymbol, FieldArray, FieldControl, FieldGroup, FieldLogicGroup, FormBuilder, INVALID, InitPendingValue, NFCSchema, PENDING, PI_CONTEXT_TOKEN, PI_VIEW_CONFIG_TOKEN, PI_VIEW_FIELD_TOKEN, SortedArray, UpdateType, VALID, actions, arrayStartsWith, asyncMergeOutputs, asyncObjectSignal, clone, combineSignal, controlStatusList, convert, createViewControlLink, disableWhen, effectListen, errorSummary, fieldControlStatusClass, findComponent, findError, 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, changeProviders as ɵchangeProviders, classAction as ɵclassAction, patchProviders as ɵpatchProviders, setProviders as ɵsetProviders, wrappers as ɵwrappers };
|
|
918
|
-
export type { AbstractControlParams, AnyCoreSchemaHandle, ArraryIterable, ArrayDeletionMode, AsyncCallback, AsyncObjectSignal, AsyncProperty, AsyncValidatorFn, BuildArrayItem, BuildGroupItem, BuildRootInputItem, BuildRootItem, CombineSignal, ConfigAction, ControlValueAccessor, CoreResolvedComponentDefine, CoreWrapperConfig, DisableWhenOption, DisabledValueStrategy, ErrorSummary, EventChangeFn, FieldArrayConfig$, FieldFormConfig, FieldFormConfig$, FieldGroupConfig$, FieldLogicGroupConfig$, FieldRenderConfig, FieldTransformerConfig, FormBuilderOptions, FormHooks, GetTypeConfig, GetWrapperConfig, HideWhenOption, HookConfig, HooksConfig, InjectorProvider, KeyPath, LayoutAction, LazyImport, LazyMarkType, LogicType, MergeHooksConfig, NonFieldControlAction, ObservableSignal, PiCommonConfig, PiResolvedCommonViewFieldConfig, PiTypeConfig, PiWrapperConfig, QueryPath, RawCoreWrapperConfig, RawKeyPath, SetOptional, SetReadonly, SetUnWrapper$, SetWrapper$, SetWrapper$$, SignalInputValue, ToObservableOptions, UnWrapSignal, UnWrapper$, VALID_STATUS, ValidationCommonError2, ValidationDescendantError2, ValidationErrorError2, ValidationErrors2, ValidationErrorsLegacy, ValidationValibotError2, ValidatorFn, ValueChangFnOptions, ValueChangeFn, ViewAttributes, ViewEvents, ViewInputs, ViewOutputs, ViewProps, Wrapper$, Writeable, _PiResolvedCommonViewFieldConfig };
|
|
931
|
+
export type { AbstractControlParams, AnyCoreSchemaHandle, ArraryIterable, ArrayDeletionMode, AsyncCallback, AsyncObjectSignal, AsyncProperty, AsyncValidatorFn, BuildArrayItem, BuildGroupItem, BuildRootInputItem, BuildRootItem, CombineSignal, ConfigAction, ControlValueAccessor, CoreResolvedComponentDefine, CoreWrapperConfig, DisableWhenOption, DisabledValueStrategy, ErrorSummary, EventChangeFn, FieldArrayConfig$, FieldFormConfig, FieldFormConfig$, FieldGroupConfig$, FieldLogicGroupConfig$, FieldRenderConfig, FieldTransformerConfig, FormBuilderOptions, FormHooks, GetTypeConfig, GetWrapperConfig, HideWhenOption, HookConfig, HooksConfig, InjectorProvider, KeyPath, LayoutAction, LazyImport, LazyMarkType, LogicType, MergeHooksConfig, NonFieldControlAction, ObservableSignal, PiCommonConfig, PiResolvedCommonViewFieldConfig, PiTypeConfig, PiWrapperConfig, QueryPath, RawCoreWrapperConfig, RawKeyPath, SetOptional, SetReadonly, SetUnWrapper$, SetWrapper$, SetWrapper$$, SignalInputValue, ToObservableOptions, UnWrapSignal, UnWrapper$, VALID_STATUS, ValidationCommonError2, ValidationDescendantError2, ValidationErrorError2, ValidationErrors2, ValidationErrorsLegacy, ValidationValibotError2, ValidatorFn, ValueChangFnOptions, ValueChangeFn, ViewAttributes, ViewEvents, ViewInputs, ViewOutputs, ViewProps, ViewSlots, Wrapper$, Writeable, _PiResolvedCommonViewFieldConfig };
|