@xiaohaih/condition-core
Advanced tools
Comparing version 0.1.1 to 0.1.2
import * as vue_demi from 'vue-demi'; | ||
import { Ref, PropType as PropType$1 } from 'vue-demi'; | ||
import { Ref, PropType, ExtractPropTypes } from 'vue-demi'; | ||
@@ -61,23 +61,23 @@ /** 容器注入值的类型 */ | ||
readonly tag: { | ||
readonly type: PropType$1<string | object>; | ||
readonly type: PropType<string | object>; | ||
readonly default: "div"; | ||
}; | ||
readonly resetToInitialValue: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
readonly datum: { | ||
readonly type: PropType$1<Record<string, any>>; | ||
readonly type: PropType<Record<string, any>>; | ||
readonly default: () => {}; | ||
}; | ||
readonly backfill: { | ||
readonly type: PropType$1<Record<string, any>>; | ||
readonly type: PropType<Record<string, any>>; | ||
}; | ||
readonly realtime: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
readonly immediateSearch: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
readonly toast: { | ||
readonly type: PropType$1<(msg: string) => void>; | ||
readonly type: PropType<(msg: string) => void>; | ||
readonly default: () => void; | ||
@@ -101,23 +101,23 @@ }; | ||
readonly tag: { | ||
readonly type: PropType$1<string | object>; | ||
readonly type: PropType<string | object>; | ||
readonly default: "div"; | ||
}; | ||
readonly resetToInitialValue: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
readonly datum: { | ||
readonly type: PropType$1<Record<string, any>>; | ||
readonly type: PropType<Record<string, any>>; | ||
readonly default: () => {}; | ||
}; | ||
readonly backfill: { | ||
readonly type: PropType$1<Record<string, any>>; | ||
readonly type: PropType<Record<string, any>>; | ||
}; | ||
readonly realtime: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
readonly immediateSearch: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
readonly toast: { | ||
readonly type: PropType$1<(msg: string) => void>; | ||
readonly type: PropType<(msg: string) => void>; | ||
readonly default: () => void; | ||
@@ -139,57 +139,57 @@ }; | ||
readonly valueKey: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
readonly required: true; | ||
}; | ||
readonly labelKey: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
readonly required: true; | ||
}; | ||
readonly options: { | ||
readonly type: PropType$1<Record<string, any>[]>; | ||
readonly type: PropType<Record<string, any>[]>; | ||
readonly default: () => never[]; | ||
}; | ||
readonly multiple: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
readonly getOptions: { | ||
readonly type: PropType$1<(cb: (data: Record<string, any>[]) => void, query: Record<string, any>) => any>; | ||
readonly type: PropType<(cb: (data: Record<string, any>[]) => void, query: Record<string, any>) => any>; | ||
}; | ||
readonly filterMethod: { | ||
readonly type: PropType$1<(val: string, data: Record<string, any>) => boolean>; | ||
readonly type: PropType<(val: string, data: Record<string, any>) => boolean>; | ||
}; | ||
readonly field: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
readonly required: true; | ||
}; | ||
readonly as: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
}; | ||
readonly emptyValue: { | ||
readonly type: PropType$1<string | null | undefined>; | ||
readonly type: PropType<string | null | undefined>; | ||
readonly default: undefined; | ||
}; | ||
readonly resetToInitialValue: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
readonly query: { | ||
readonly type: PropType$1<Record<string, any>>; | ||
readonly type: PropType<Record<string, any>>; | ||
readonly required: true; | ||
}; | ||
readonly backfill: { | ||
readonly type: PropType$1<Record<string, any>>; | ||
readonly type: PropType<Record<string, any>>; | ||
}; | ||
readonly disabled: { | ||
readonly type: PropType$1<boolean | ((query: Record<string, any>) => any)>; | ||
readonly type: PropType<boolean | ((query: Record<string, any>) => any)>; | ||
}; | ||
readonly hide: { | ||
readonly type: PropType$1<boolean | ((query: Record<string, any>) => any)>; | ||
readonly type: PropType<boolean | ((query: Record<string, any>) => any)>; | ||
}; | ||
readonly validator: { | ||
readonly type: PropType$1<((query: Record<string, any>) => any) | ((query: Record<string, any>) => Promise<any>)>; | ||
readonly type: PropType<((query: Record<string, any>) => any) | ((query: Record<string, any>) => Promise<any>)>; | ||
}; | ||
readonly depend: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
readonly dependFields: { | ||
readonly type: PropType$1<string | string[]>; | ||
readonly type: PropType<string | string[]>; | ||
}; | ||
@@ -211,57 +211,57 @@ }, { | ||
readonly valueKey: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
readonly required: true; | ||
}; | ||
readonly labelKey: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
readonly required: true; | ||
}; | ||
readonly options: { | ||
readonly type: PropType$1<Record<string, any>[]>; | ||
readonly type: PropType<Record<string, any>[]>; | ||
readonly default: () => never[]; | ||
}; | ||
readonly multiple: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
readonly getOptions: { | ||
readonly type: PropType$1<(cb: (data: Record<string, any>[]) => void, query: Record<string, any>) => any>; | ||
readonly type: PropType<(cb: (data: Record<string, any>[]) => void, query: Record<string, any>) => any>; | ||
}; | ||
readonly filterMethod: { | ||
readonly type: PropType$1<(val: string, data: Record<string, any>) => boolean>; | ||
readonly type: PropType<(val: string, data: Record<string, any>) => boolean>; | ||
}; | ||
readonly field: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
readonly required: true; | ||
}; | ||
readonly as: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
}; | ||
readonly emptyValue: { | ||
readonly type: PropType$1<string | null | undefined>; | ||
readonly type: PropType<string | null | undefined>; | ||
readonly default: undefined; | ||
}; | ||
readonly resetToInitialValue: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
readonly query: { | ||
readonly type: PropType$1<Record<string, any>>; | ||
readonly type: PropType<Record<string, any>>; | ||
readonly required: true; | ||
}; | ||
readonly backfill: { | ||
readonly type: PropType$1<Record<string, any>>; | ||
readonly type: PropType<Record<string, any>>; | ||
}; | ||
readonly disabled: { | ||
readonly type: PropType$1<boolean | ((query: Record<string, any>) => any)>; | ||
readonly type: PropType<boolean | ((query: Record<string, any>) => any)>; | ||
}; | ||
readonly hide: { | ||
readonly type: PropType$1<boolean | ((query: Record<string, any>) => any)>; | ||
readonly type: PropType<boolean | ((query: Record<string, any>) => any)>; | ||
}; | ||
readonly validator: { | ||
readonly type: PropType$1<((query: Record<string, any>) => any) | ((query: Record<string, any>) => Promise<any>)>; | ||
readonly type: PropType<((query: Record<string, any>) => any) | ((query: Record<string, any>) => Promise<any>)>; | ||
}; | ||
readonly depend: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
readonly dependFields: { | ||
readonly type: PropType$1<string | string[]>; | ||
readonly type: PropType<string | string[]>; | ||
}; | ||
@@ -282,43 +282,43 @@ }>>, { | ||
readonly realtime: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
readonly waitTime: { | ||
readonly type: PropType$1<number>; | ||
readonly type: PropType<number>; | ||
readonly default: 300; | ||
}; | ||
readonly field: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
readonly required: true; | ||
}; | ||
readonly as: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
}; | ||
readonly emptyValue: { | ||
readonly type: PropType$1<string | null | undefined>; | ||
readonly type: PropType<string | null | undefined>; | ||
readonly default: undefined; | ||
}; | ||
readonly resetToInitialValue: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
readonly query: { | ||
readonly type: PropType$1<Record<string, any>>; | ||
readonly type: PropType<Record<string, any>>; | ||
readonly required: true; | ||
}; | ||
readonly backfill: { | ||
readonly type: PropType$1<Record<string, any>>; | ||
readonly type: PropType<Record<string, any>>; | ||
}; | ||
readonly disabled: { | ||
readonly type: PropType$1<boolean | ((query: Record<string, any>) => any)>; | ||
readonly type: PropType<boolean | ((query: Record<string, any>) => any)>; | ||
}; | ||
readonly hide: { | ||
readonly type: PropType$1<boolean | ((query: Record<string, any>) => any)>; | ||
readonly type: PropType<boolean | ((query: Record<string, any>) => any)>; | ||
}; | ||
readonly validator: { | ||
readonly type: PropType$1<((query: Record<string, any>) => any) | ((query: Record<string, any>) => Promise<any>)>; | ||
readonly type: PropType<((query: Record<string, any>) => any) | ((query: Record<string, any>) => Promise<any>)>; | ||
}; | ||
readonly depend: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
readonly dependFields: { | ||
readonly type: PropType$1<string | string[]>; | ||
readonly type: PropType<string | string[]>; | ||
}; | ||
@@ -341,43 +341,43 @@ }, { | ||
readonly realtime: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
readonly waitTime: { | ||
readonly type: PropType$1<number>; | ||
readonly type: PropType<number>; | ||
readonly default: 300; | ||
}; | ||
readonly field: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
readonly required: true; | ||
}; | ||
readonly as: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
}; | ||
readonly emptyValue: { | ||
readonly type: PropType$1<string | null | undefined>; | ||
readonly type: PropType<string | null | undefined>; | ||
readonly default: undefined; | ||
}; | ||
readonly resetToInitialValue: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
readonly query: { | ||
readonly type: PropType$1<Record<string, any>>; | ||
readonly type: PropType<Record<string, any>>; | ||
readonly required: true; | ||
}; | ||
readonly backfill: { | ||
readonly type: PropType$1<Record<string, any>>; | ||
readonly type: PropType<Record<string, any>>; | ||
}; | ||
readonly disabled: { | ||
readonly type: PropType$1<boolean | ((query: Record<string, any>) => any)>; | ||
readonly type: PropType<boolean | ((query: Record<string, any>) => any)>; | ||
}; | ||
readonly hide: { | ||
readonly type: PropType$1<boolean | ((query: Record<string, any>) => any)>; | ||
readonly type: PropType<boolean | ((query: Record<string, any>) => any)>; | ||
}; | ||
readonly validator: { | ||
readonly type: PropType$1<((query: Record<string, any>) => any) | ((query: Record<string, any>) => Promise<any>)>; | ||
readonly type: PropType<((query: Record<string, any>) => any) | ((query: Record<string, any>) => Promise<any>)>; | ||
}; | ||
readonly depend: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
readonly dependFields: { | ||
readonly type: PropType$1<string | string[]>; | ||
readonly type: PropType<string | string[]>; | ||
}; | ||
@@ -394,46 +394,46 @@ }>>, { | ||
readonly range: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
readonly default: false; | ||
}; | ||
readonly beginField: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
}; | ||
readonly endField: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
}; | ||
readonly field: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
readonly required: true; | ||
}; | ||
readonly as: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
}; | ||
readonly emptyValue: { | ||
readonly type: PropType$1<string | null | undefined>; | ||
readonly type: PropType<string | null | undefined>; | ||
readonly default: undefined; | ||
}; | ||
readonly resetToInitialValue: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
readonly query: { | ||
readonly type: PropType$1<Record<string, any>>; | ||
readonly type: PropType<Record<string, any>>; | ||
readonly required: true; | ||
}; | ||
readonly backfill: { | ||
readonly type: PropType$1<Record<string, any>>; | ||
readonly type: PropType<Record<string, any>>; | ||
}; | ||
readonly disabled: { | ||
readonly type: PropType$1<boolean | ((query: Record<string, any>) => any)>; | ||
readonly type: PropType<boolean | ((query: Record<string, any>) => any)>; | ||
}; | ||
readonly hide: { | ||
readonly type: PropType$1<boolean | ((query: Record<string, any>) => any)>; | ||
readonly type: PropType<boolean | ((query: Record<string, any>) => any)>; | ||
}; | ||
readonly validator: { | ||
readonly type: PropType$1<((query: Record<string, any>) => any) | ((query: Record<string, any>) => Promise<any>)>; | ||
readonly type: PropType<((query: Record<string, any>) => any) | ((query: Record<string, any>) => Promise<any>)>; | ||
}; | ||
readonly depend: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
readonly dependFields: { | ||
readonly type: PropType$1<string | string[]>; | ||
readonly type: PropType<string | string[]>; | ||
}; | ||
@@ -452,46 +452,46 @@ }, { | ||
readonly range: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
readonly default: false; | ||
}; | ||
readonly beginField: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
}; | ||
readonly endField: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
}; | ||
readonly field: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
readonly required: true; | ||
}; | ||
readonly as: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
}; | ||
readonly emptyValue: { | ||
readonly type: PropType$1<string | null | undefined>; | ||
readonly type: PropType<string | null | undefined>; | ||
readonly default: undefined; | ||
}; | ||
readonly resetToInitialValue: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
readonly query: { | ||
readonly type: PropType$1<Record<string, any>>; | ||
readonly type: PropType<Record<string, any>>; | ||
readonly required: true; | ||
}; | ||
readonly backfill: { | ||
readonly type: PropType$1<Record<string, any>>; | ||
readonly type: PropType<Record<string, any>>; | ||
}; | ||
readonly disabled: { | ||
readonly type: PropType$1<boolean | ((query: Record<string, any>) => any)>; | ||
readonly type: PropType<boolean | ((query: Record<string, any>) => any)>; | ||
}; | ||
readonly hide: { | ||
readonly type: PropType$1<boolean | ((query: Record<string, any>) => any)>; | ||
readonly type: PropType<boolean | ((query: Record<string, any>) => any)>; | ||
}; | ||
readonly validator: { | ||
readonly type: PropType$1<((query: Record<string, any>) => any) | ((query: Record<string, any>) => Promise<any>)>; | ||
readonly type: PropType<((query: Record<string, any>) => any) | ((query: Record<string, any>) => Promise<any>)>; | ||
}; | ||
readonly depend: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
readonly dependFields: { | ||
readonly type: PropType$1<string | string[]>; | ||
readonly type: PropType<string | string[]>; | ||
}; | ||
@@ -509,42 +509,42 @@ }>>, { | ||
readonly fields: { | ||
readonly type: PropType$1<string[]>; | ||
readonly type: PropType<string[]>; | ||
}; | ||
readonly valueKey: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
readonly required: true; | ||
}; | ||
readonly childrenKey: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
}; | ||
readonly emitPath: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
readonly default: false; | ||
}; | ||
readonly options: { | ||
readonly type: PropType$1<Record<string, any>[]>; | ||
readonly type: PropType<Record<string, any>[]>; | ||
readonly default: () => never[]; | ||
}; | ||
readonly getOptions: { | ||
readonly type: PropType$1<(cb: (data: Record<string, any>[]) => void, query: Record<string, any>) => any>; | ||
readonly type: PropType<(cb: (data: Record<string, any>[]) => void, query: Record<string, any>) => any>; | ||
}; | ||
readonly field: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
readonly required: true; | ||
}; | ||
readonly as: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
}; | ||
readonly emptyValue: { | ||
readonly type: PropType$1<string | null | undefined>; | ||
readonly type: PropType<string | null | undefined>; | ||
readonly default: undefined; | ||
}; | ||
readonly resetToInitialValue: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
readonly query: { | ||
readonly type: PropType$1<Record<string, any>>; | ||
readonly type: PropType<Record<string, any>>; | ||
readonly required: true; | ||
}; | ||
readonly backfill: { | ||
readonly type: PropType$1<Record<string, any>>; | ||
readonly type: PropType<Record<string, any>>; | ||
}; | ||
@@ -555,15 +555,15 @@ /** | ||
readonly disabled: { | ||
readonly type: PropType$1<boolean | ((query: Record<string, any>) => any)>; | ||
readonly type: PropType<boolean | ((query: Record<string, any>) => any)>; | ||
}; | ||
readonly hide: { | ||
readonly type: PropType$1<boolean | ((query: Record<string, any>) => any)>; | ||
readonly type: PropType<boolean | ((query: Record<string, any>) => any)>; | ||
}; | ||
readonly validator: { | ||
readonly type: PropType$1<((query: Record<string, any>) => any) | ((query: Record<string, any>) => Promise<any>)>; | ||
readonly type: PropType<((query: Record<string, any>) => any) | ((query: Record<string, any>) => Promise<any>)>; | ||
}; | ||
readonly depend: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
readonly dependFields: { | ||
readonly type: PropType$1<string | string[]>; | ||
readonly type: PropType<string | string[]>; | ||
}; | ||
@@ -580,42 +580,42 @@ }, { | ||
readonly fields: { | ||
readonly type: PropType$1<string[]>; | ||
readonly type: PropType<string[]>; | ||
}; | ||
readonly valueKey: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
readonly required: true; | ||
}; | ||
readonly childrenKey: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
}; | ||
readonly emitPath: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
readonly default: false; | ||
}; | ||
readonly options: { | ||
readonly type: PropType$1<Record<string, any>[]>; | ||
readonly type: PropType<Record<string, any>[]>; | ||
readonly default: () => never[]; | ||
}; | ||
readonly getOptions: { | ||
readonly type: PropType$1<(cb: (data: Record<string, any>[]) => void, query: Record<string, any>) => any>; | ||
readonly type: PropType<(cb: (data: Record<string, any>[]) => void, query: Record<string, any>) => any>; | ||
}; | ||
readonly field: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
readonly required: true; | ||
}; | ||
readonly as: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
}; | ||
readonly emptyValue: { | ||
readonly type: PropType$1<string | null | undefined>; | ||
readonly type: PropType<string | null | undefined>; | ||
readonly default: undefined; | ||
}; | ||
readonly resetToInitialValue: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
readonly query: { | ||
readonly type: PropType$1<Record<string, any>>; | ||
readonly type: PropType<Record<string, any>>; | ||
readonly required: true; | ||
}; | ||
readonly backfill: { | ||
readonly type: PropType$1<Record<string, any>>; | ||
readonly type: PropType<Record<string, any>>; | ||
}; | ||
@@ -626,15 +626,15 @@ /** | ||
readonly disabled: { | ||
readonly type: PropType$1<boolean | ((query: Record<string, any>) => any)>; | ||
readonly type: PropType<boolean | ((query: Record<string, any>) => any)>; | ||
}; | ||
readonly hide: { | ||
readonly type: PropType$1<boolean | ((query: Record<string, any>) => any)>; | ||
readonly type: PropType<boolean | ((query: Record<string, any>) => any)>; | ||
}; | ||
readonly validator: { | ||
readonly type: PropType$1<((query: Record<string, any>) => any) | ((query: Record<string, any>) => Promise<any>)>; | ||
readonly type: PropType<((query: Record<string, any>) => any) | ((query: Record<string, any>) => Promise<any>)>; | ||
}; | ||
readonly depend: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
readonly dependFields: { | ||
readonly type: PropType$1<string | string[]>; | ||
readonly type: PropType<string | string[]>; | ||
}; | ||
@@ -650,3 +650,3 @@ }>>, { | ||
readonly tag: { | ||
readonly type: PropType$1<string | object>; | ||
readonly type: PropType<string | object>; | ||
readonly default: "div"; | ||
@@ -656,7 +656,7 @@ }; | ||
readonly resetToInitialValue: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
/** 数据源 */ | ||
readonly datum: { | ||
readonly type: PropType$1<Record<string, any>>; | ||
readonly type: PropType<Record<string, any>>; | ||
readonly default: () => {}; | ||
@@ -666,15 +666,15 @@ }; | ||
readonly backfill: { | ||
readonly type: PropType$1<Record<string, any>>; | ||
readonly type: PropType<Record<string, any>>; | ||
}; | ||
/** 是否需要实时触发搜索事件 */ | ||
readonly realtime: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
/** 初始是否触发一次事件来返回当前的 query */ | ||
readonly immediateSearch: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
/** 校验不合格的提示 */ | ||
readonly toast: { | ||
readonly type: PropType$1<(msg: string) => void>; | ||
readonly type: PropType<(msg: string) => void>; | ||
readonly default: () => void; | ||
@@ -687,3 +687,3 @@ }; | ||
readonly valueKey: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
readonly required: true; | ||
@@ -693,3 +693,3 @@ }; | ||
readonly labelKey: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
readonly required: true; | ||
@@ -699,3 +699,3 @@ }; | ||
readonly options: { | ||
readonly type: PropType$1<Record<string, any>[]>; | ||
readonly type: PropType<Record<string, any>[]>; | ||
readonly default: () => never[]; | ||
@@ -705,15 +705,15 @@ }; | ||
readonly multiple: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
/** 获取数据源 */ | ||
readonly getOptions: { | ||
readonly type: PropType$1<(cb: (data: Record<string, any>[]) => void, query: Record<string, any>) => any>; | ||
readonly type: PropType<(cb: (data: Record<string, any>[]) => void, query: Record<string, any>) => any>; | ||
}; | ||
/** 自定义筛选方法 */ | ||
readonly filterMethod: { | ||
readonly type: PropType$1<(val: string, data: Record<string, any>) => boolean>; | ||
readonly type: PropType<(val: string, data: Record<string, any>) => boolean>; | ||
}; | ||
/** 提交的字段 */ | ||
readonly field: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
readonly required: true; | ||
@@ -723,7 +723,7 @@ }; | ||
readonly as: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
}; | ||
/** 空置时提交的值 - 默认置为 undefined */ | ||
readonly emptyValue: { | ||
readonly type: PropType$1<string | null | undefined>; | ||
readonly type: PropType<string | null | undefined>; | ||
readonly default: undefined; | ||
@@ -733,7 +733,7 @@ }; | ||
readonly resetToInitialValue: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
/** 当前条件对象 - 实时变化 */ | ||
readonly query: { | ||
readonly type: PropType$1<Record<string, any>>; | ||
readonly type: PropType<Record<string, any>>; | ||
readonly required: true; | ||
@@ -743,23 +743,23 @@ }; | ||
readonly backfill: { | ||
readonly type: PropType$1<Record<string, any>>; | ||
readonly type: PropType<Record<string, any>>; | ||
}; | ||
/** 禁用状态 */ | ||
readonly disabled: { | ||
readonly type: PropType$1<boolean | ((query: Record<string, any>) => any)>; | ||
readonly type: PropType<boolean | ((query: Record<string, any>) => any)>; | ||
}; | ||
/** 是否隐藏 -> 如果是函数, 需传递依赖项, 可根据依赖项动态隐藏 */ | ||
readonly hide: { | ||
readonly type: PropType$1<boolean | ((query: Record<string, any>) => any)>; | ||
readonly type: PropType<boolean | ((query: Record<string, any>) => any)>; | ||
}; | ||
/** 校验函数, 返回字符串不通过, 会触发提示 - 提交时触发 */ | ||
readonly validator: { | ||
readonly type: PropType$1<((query: Record<string, any>) => any) | ((query: Record<string, any>) => Promise<any>)>; | ||
readonly type: PropType<((query: Record<string, any>) => any) | ((query: Record<string, any>) => Promise<any>)>; | ||
}; | ||
/** 是否依赖其它字段 */ | ||
readonly depend: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
/** 依赖字段 */ | ||
readonly dependFields: { | ||
readonly type: PropType$1<string | string[]>; | ||
readonly type: PropType<string | string[]>; | ||
}; | ||
@@ -771,7 +771,7 @@ }; | ||
readonly realtime: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
/** 实时触发时防抖动的时间 */ | ||
readonly waitTime: { | ||
readonly type: PropType$1<number>; | ||
readonly type: PropType<number>; | ||
readonly default: 300; | ||
@@ -781,3 +781,3 @@ }; | ||
readonly field: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
readonly required: true; | ||
@@ -787,7 +787,7 @@ }; | ||
readonly as: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
}; | ||
/** 空置时提交的值 - 默认置为 undefined */ | ||
readonly emptyValue: { | ||
readonly type: PropType$1<string | null | undefined>; | ||
readonly type: PropType<string | null | undefined>; | ||
readonly default: undefined; | ||
@@ -797,7 +797,7 @@ }; | ||
readonly resetToInitialValue: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
/** 当前条件对象 - 实时变化 */ | ||
readonly query: { | ||
readonly type: PropType$1<Record<string, any>>; | ||
readonly type: PropType<Record<string, any>>; | ||
readonly required: true; | ||
@@ -807,23 +807,23 @@ }; | ||
readonly backfill: { | ||
readonly type: PropType$1<Record<string, any>>; | ||
readonly type: PropType<Record<string, any>>; | ||
}; | ||
/** 禁用状态 */ | ||
readonly disabled: { | ||
readonly type: PropType$1<boolean | ((query: Record<string, any>) => any)>; | ||
readonly type: PropType<boolean | ((query: Record<string, any>) => any)>; | ||
}; | ||
/** 是否隐藏 -> 如果是函数, 需传递依赖项, 可根据依赖项动态隐藏 */ | ||
readonly hide: { | ||
readonly type: PropType$1<boolean | ((query: Record<string, any>) => any)>; | ||
readonly type: PropType<boolean | ((query: Record<string, any>) => any)>; | ||
}; | ||
/** 校验函数, 返回字符串不通过, 会触发提示 - 提交时触发 */ | ||
readonly validator: { | ||
readonly type: PropType$1<((query: Record<string, any>) => any) | ((query: Record<string, any>) => Promise<any>)>; | ||
readonly type: PropType<((query: Record<string, any>) => any) | ((query: Record<string, any>) => Promise<any>)>; | ||
}; | ||
/** 是否依赖其它字段 */ | ||
readonly depend: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
/** 依赖字段 */ | ||
readonly dependFields: { | ||
readonly type: PropType$1<string | string[]>; | ||
readonly type: PropType<string | string[]>; | ||
}; | ||
@@ -835,3 +835,3 @@ }; | ||
readonly range: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
readonly default: false; | ||
@@ -841,11 +841,11 @@ }; | ||
readonly beginField: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
}; | ||
/** 作为字符串时提交的的字段 - 结束字段 */ | ||
readonly endField: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
}; | ||
/** 提交的字段 */ | ||
readonly field: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
readonly required: true; | ||
@@ -855,7 +855,7 @@ }; | ||
readonly as: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
}; | ||
/** 空置时提交的值 - 默认置为 undefined */ | ||
readonly emptyValue: { | ||
readonly type: PropType$1<string | null | undefined>; | ||
readonly type: PropType<string | null | undefined>; | ||
readonly default: undefined; | ||
@@ -865,7 +865,7 @@ }; | ||
readonly resetToInitialValue: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
/** 当前条件对象 - 实时变化 */ | ||
readonly query: { | ||
readonly type: PropType$1<Record<string, any>>; | ||
readonly type: PropType<Record<string, any>>; | ||
readonly required: true; | ||
@@ -875,23 +875,23 @@ }; | ||
readonly backfill: { | ||
readonly type: PropType$1<Record<string, any>>; | ||
readonly type: PropType<Record<string, any>>; | ||
}; | ||
/** 禁用状态 */ | ||
readonly disabled: { | ||
readonly type: PropType$1<boolean | ((query: Record<string, any>) => any)>; | ||
readonly type: PropType<boolean | ((query: Record<string, any>) => any)>; | ||
}; | ||
/** 是否隐藏 -> 如果是函数, 需传递依赖项, 可根据依赖项动态隐藏 */ | ||
readonly hide: { | ||
readonly type: PropType$1<boolean | ((query: Record<string, any>) => any)>; | ||
readonly type: PropType<boolean | ((query: Record<string, any>) => any)>; | ||
}; | ||
/** 校验函数, 返回字符串不通过, 会触发提示 - 提交时触发 */ | ||
readonly validator: { | ||
readonly type: PropType$1<((query: Record<string, any>) => any) | ((query: Record<string, any>) => Promise<any>)>; | ||
readonly type: PropType<((query: Record<string, any>) => any) | ((query: Record<string, any>) => Promise<any>)>; | ||
}; | ||
/** 是否依赖其它字段 */ | ||
readonly depend: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
/** 依赖字段 */ | ||
readonly dependFields: { | ||
readonly type: PropType$1<string | string[]>; | ||
readonly type: PropType<string | string[]>; | ||
}; | ||
@@ -903,7 +903,7 @@ }; | ||
readonly fields: { | ||
readonly type: PropType$1<string[]>; | ||
readonly type: PropType<string[]>; | ||
}; | ||
/** 提交给后端的字段 */ | ||
readonly valueKey: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
readonly required: true; | ||
@@ -913,7 +913,7 @@ }; | ||
readonly childrenKey: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
}; | ||
/** 是否返回选中项中所有的值(数组形式), 否只返回最后一项(基础类型) */ | ||
readonly emitPath: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
readonly default: false; | ||
@@ -923,3 +923,3 @@ }; | ||
readonly options: { | ||
readonly type: PropType$1<Record<string, any>[]>; | ||
readonly type: PropType<Record<string, any>[]>; | ||
readonly default: () => never[]; | ||
@@ -929,7 +929,7 @@ }; | ||
readonly getOptions: { | ||
readonly type: PropType$1<(cb: (data: Record<string, any>[]) => void, query: Record<string, any>) => any>; | ||
readonly type: PropType<(cb: (data: Record<string, any>[]) => void, query: Record<string, any>) => any>; | ||
}; | ||
/** 提交的字段 */ | ||
readonly field: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
readonly required: true; | ||
@@ -939,7 +939,7 @@ }; | ||
readonly as: { | ||
readonly type: PropType$1<string>; | ||
readonly type: PropType<string>; | ||
}; | ||
/** 空置时提交的值 - 默认置为 undefined */ | ||
readonly emptyValue: { | ||
readonly type: PropType$1<string | null | undefined>; | ||
readonly type: PropType<string | null | undefined>; | ||
readonly default: undefined; | ||
@@ -949,7 +949,7 @@ }; | ||
readonly resetToInitialValue: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
/** 当前条件对象 - 实时变化 */ | ||
readonly query: { | ||
readonly type: PropType$1<Record<string, any>>; | ||
readonly type: PropType<Record<string, any>>; | ||
readonly required: true; | ||
@@ -959,23 +959,23 @@ }; | ||
readonly backfill: { | ||
readonly type: PropType$1<Record<string, any>>; | ||
readonly type: PropType<Record<string, any>>; | ||
}; | ||
/** 禁用状态 */ | ||
readonly disabled: { | ||
readonly type: PropType$1<boolean | ((query: Record<string, any>) => any)>; | ||
readonly type: PropType<boolean | ((query: Record<string, any>) => any)>; | ||
}; | ||
/** 是否隐藏 -> 如果是函数, 需传递依赖项, 可根据依赖项动态隐藏 */ | ||
readonly hide: { | ||
readonly type: PropType$1<boolean | ((query: Record<string, any>) => any)>; | ||
readonly type: PropType<boolean | ((query: Record<string, any>) => any)>; | ||
}; | ||
/** 校验函数, 返回字符串不通过, 会触发提示 - 提交时触发 */ | ||
readonly validator: { | ||
readonly type: PropType$1<((query: Record<string, any>) => any) | ((query: Record<string, any>) => Promise<any>)>; | ||
readonly type: PropType<((query: Record<string, any>) => any) | ((query: Record<string, any>) => Promise<any>)>; | ||
}; | ||
/** 是否依赖其它字段 */ | ||
readonly depend: { | ||
readonly type: PropType$1<boolean>; | ||
readonly type: PropType<boolean>; | ||
}; | ||
/** 依赖字段 */ | ||
readonly dependFields: { | ||
readonly type: PropType$1<string | string[]>; | ||
readonly type: PropType<string | string[]>; | ||
}; | ||
@@ -997,45 +997,3 @@ }; | ||
} | ||
type ExtractPropTypes<O> = { | ||
[K in keyof Pick<O, RequiredKeys<O>>]: InferPropType<O[K]>; | ||
} & { | ||
[K in keyof Pick<O, OptionalKeys<O>>]?: InferPropType<O[K]>; | ||
}; | ||
type RequiredKeys<T> = { | ||
[K in keyof T]: T[K] extends { | ||
required: true; | ||
} | BooleanConstructor | { | ||
type: BooleanConstructor; | ||
} ? K : never; | ||
}[keyof T]; | ||
type OptionalKeys<T> = Exclude<keyof T, RequiredKeys<T>>; | ||
type InferPropType<T> = T extends null ? any : T extends { | ||
type: null | true; | ||
} ? any : T extends ObjectConstructor | { | ||
type: ObjectConstructor; | ||
} ? Record<string, any> : T extends BooleanConstructor | { | ||
type: BooleanConstructor; | ||
} ? boolean : T extends DateConstructor | { | ||
type: DateConstructor; | ||
} ? Date : T extends FunctionConstructor ? Function : T extends Prop<infer V, infer D> ? unknown extends V ? D extends null | undefined ? V : D : ExtractCorrectPropType<V> : T; | ||
type Prop<T, D = T> = PropOptions<T, D> | PropType<T>; | ||
type DefaultFactory<T> = () => T | null | undefined; | ||
interface PropOptions<T = any, D = T> { | ||
type?: PropType<T> | true | null; | ||
required?: boolean; | ||
default?: D | DefaultFactory<D> | null | undefined | object; | ||
validator?(value: unknown): boolean; | ||
} | ||
type PropType<T> = PropConstructor<T> | PropConstructor<T>[]; | ||
type PropConstructor<T> = { | ||
(): T; | ||
} | { | ||
new (...args: never[]): T & object; | ||
} | { | ||
new (...args: any[]): T & object; | ||
} | { | ||
new (...args: string[]): Function; | ||
}; | ||
type ExtractCorrectPropType<T> = T extends Function ? ExtractFunctionPropType<T> : Exclude<T, Function>; | ||
type ExtractFunctionPropType<T extends Function, TArgs extends Array<any> = any[], TResult = any> = T extends (...args: TArgs) => TResult ? T : never; | ||
export { _default as CoreCascader, CoreCondition, _default$1 as CoreDatepicker, _default$2 as CoreInput, _default$3 as CoreSelect, _default$4 as CoreWrapper }; |
{ | ||
"name": "@xiaohaih/condition-core", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.cjs.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
494419
4804