cnhis-design-vue 3.1.50-beta.11 → 3.1.50-beta.12

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.
Files changed (35) hide show
  1. package/es/components/form-config/index.d.ts +186 -6
  2. package/es/components/form-config/src/FormConfig.vue.d.ts +186 -6
  3. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +90 -3
  4. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +93 -3
  5. package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
  6. package/es/components/form-render/index.d.ts +90 -3
  7. package/es/components/form-render/src/FormRender.vue.d.ts +90 -3
  8. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  9. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +90 -3
  10. package/es/components/form-render/src/components/renderer/select.d.ts +3 -0
  11. package/es/components/form-render/src/components/renderer/select.js +1 -1
  12. package/es/components/form-render/src/hooks/useFieldListAdaptor.d.ts +2 -5
  13. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  14. package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +173 -4
  15. package/es/components/form-render/src/hooks/useFieldNormalize.js +1 -1
  16. package/es/components/form-render/src/types/index.d.ts +1 -0
  17. package/es/components/iho-table/index.d.ts +26 -0
  18. package/es/components/iho-table/src/IhoTable.vue.d.ts +26 -0
  19. package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +3 -1
  20. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
  21. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -1
  22. package/es/components/iho-table/src/plugins/varialbleHeightPlugin/index.js +1 -1
  23. package/es/components/iho-table/src/types/index.d.ts +4 -0
  24. package/es/components/info-header/index.d.ts +270 -9
  25. package/es/components/info-header/src/InfoHeader.vue.d.ts +270 -9
  26. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +86 -3
  27. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +86 -3
  28. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +176 -6
  29. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +90 -3
  30. package/es/components/shortcut-setter/index.d.ts +90 -3
  31. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +90 -3
  32. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +28 -0
  33. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
  34. package/es/shared/package.json.js +1 -1
  35. package/package.json +2 -2
@@ -149,6 +149,7 @@ declare const _default: import("vue").DefineComponent<{}, {
149
149
  type: BooleanConstructor;
150
150
  default: boolean;
151
151
  };
152
+ forceClearable: BooleanConstructor;
152
153
  }, {
153
154
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
154
155
  fieldList: {
@@ -293,6 +294,7 @@ declare const _default: import("vue").DefineComponent<{}, {
293
294
  type: BooleanConstructor;
294
295
  default: boolean;
295
296
  };
297
+ forceClearable: BooleanConstructor;
296
298
  }>> & {
297
299
  onFormChange?: ((...args: any[]) => any) | undefined;
298
300
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -342,10 +344,93 @@ declare const _default: import("vue").DefineComponent<{}, {
342
344
  operationalFormHandler: (field: string) => void;
343
345
  triggerAllOperationalFormHandler: () => void;
344
346
  wordbookSettingHandler: (fieldKey: string, value: unknown) => void;
345
- schemaAdaptor: (fieldList: import("../../../../es/components/form-render").FieldItem[], options?: {
347
+ schemaAdaptor: (fieldList: import("../../../../es/components/form-render").FieldItem[], options?: Partial<{
348
+ fieldList: import("../../../../es/components/form-render").FieldItem[];
349
+ initialData: import("../../../../es/shared/types").AnyObject;
350
+ fieldVisitor: import("../../../../es/components/form-render").FieldVisitor;
346
351
  column: number;
347
- outBordered?: boolean | undefined;
348
- }) => Record<string, import("@formily/json-schema").Stringify<{
352
+ maxHeight: string | number;
353
+ anchor: boolean;
354
+ parallelism: number;
355
+ schema: import("@formily/json-schema").Stringify<{
356
+ [key: symbol]: any;
357
+ [key: `x-${string}`]: any;
358
+ [key: `x-${number}`]: any;
359
+ version?: string | undefined;
360
+ name?: import("@formily/json-schema").SchemaKey | undefined;
361
+ title?: any;
362
+ description?: any;
363
+ default?: any;
364
+ readOnly?: boolean | undefined;
365
+ writeOnly?: boolean | undefined;
366
+ type?: import("@formily/json-schema").SchemaTypes | undefined;
367
+ enum?: import("@formily/json-schema").SchemaEnum<any> | undefined;
368
+ const?: any;
369
+ multipleOf?: number | undefined;
370
+ maximum?: number | undefined;
371
+ exclusiveMaximum?: number | undefined;
372
+ minimum?: number | undefined;
373
+ exclusiveMinimum?: number | undefined;
374
+ maxLength?: number | undefined;
375
+ minLength?: number | undefined;
376
+ pattern?: string | RegExp | undefined;
377
+ maxItems?: number | undefined;
378
+ minItems?: number | undefined;
379
+ uniqueItems?: boolean | undefined;
380
+ maxProperties?: number | undefined;
381
+ minProperties?: number | undefined;
382
+ required?: string | boolean | string[] | undefined;
383
+ format?: string | undefined;
384
+ $ref?: string | undefined;
385
+ $namespace?: string | undefined;
386
+ definitions?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
387
+ properties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
388
+ items?: import("@formily/json-schema").SchemaItems<any, any, any, any, any, any, any, any> | undefined;
389
+ additionalItems?: import("@formily/json-schema").Stringify<any> | undefined;
390
+ patternProperties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
391
+ additionalProperties?: import("@formily/json-schema").Stringify<any> | undefined;
392
+ "x-value"?: any;
393
+ "x-index"?: number | undefined;
394
+ "x-pattern"?: any;
395
+ "x-display"?: any;
396
+ "x-validator"?: any;
397
+ "x-decorator"?: any;
398
+ "x-decorator-props"?: any;
399
+ "x-component"?: any;
400
+ "x-component-props"?: any;
401
+ "x-reactions"?: import("@formily/json-schema").SchemaReactions<any> | undefined;
402
+ "x-content"?: any;
403
+ "x-data"?: any;
404
+ "x-visible"?: boolean | undefined;
405
+ "x-hidden"?: boolean | undefined;
406
+ "x-disabled"?: boolean | undefined;
407
+ "x-editable"?: boolean | undefined;
408
+ "x-read-only"?: boolean | undefined;
409
+ "x-read-pretty"?: boolean | undefined;
410
+ "x-compile-omitted"?: string[] | undefined;
411
+ }>;
412
+ components: Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>;
413
+ scope: import("../../../../es/shared/types").AnyObject;
414
+ annotation: import("../../../../es/shared/types").AnyObject;
415
+ consumer: boolean;
416
+ uuid: string;
417
+ lifeCycle: Partial<{
418
+ onSetup(): void;
419
+ beforeRequest(fieldKey: string, params?: import("../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../es/shared/types").AnyObject | undefined): void | import("../../../../es/shared/types").UndefinedAble<import("../../../../es/shared/types").AnyObject>;
420
+ afterRequest(fieldKey: string, res?: any, payload?: import("../../../../es/shared/types").AnyObject | undefined): import("../../../../es/shared/types").AnyObject[];
421
+ afterOptionInit(fieldKey: string, options: import("../../../../es/shared/types").AnyObject[], payload?: import("../../../../es/shared/types").AnyObject | undefined): void;
422
+ }>;
423
+ businessFormatter: import("../../../../es/components/form-render").FormBusinessFormatter;
424
+ requestInstance: import("../../../../es/components/form-render").RequestInstance;
425
+ enterToNextWidget: boolean | ((fieldItem: import("../../../../es/components/form-render").FieldItem) => boolean | void);
426
+ lowCodeReactions: import("../../../../es/components/form-render").FormLowCodeReactions.Config[];
427
+ linebarAutoHidden: boolean;
428
+ bordered: string | boolean;
429
+ uniqueCacheData: boolean;
430
+ operationalForm: import("../../../../es/shared/types").FormOperationalConfig[];
431
+ outBordered: boolean;
432
+ forceClearable: boolean;
433
+ }>) => Record<string, import("@formily/json-schema").Stringify<{
349
434
  [key: symbol]: any;
350
435
  [key: `x-${string}`]: any;
351
436
  [key: `x-${number}`]: any;
@@ -769,6 +854,7 @@ declare const _default: import("vue").DefineComponent<{}, {
769
854
  type: BooleanConstructor;
770
855
  default: boolean;
771
856
  };
857
+ forceClearable: BooleanConstructor;
772
858
  }>> & {
773
859
  onFormChange?: ((...args: any[]) => any) | undefined;
774
860
  onScroll?: ((...args: any[]) => any) | undefined;
@@ -777,6 +863,7 @@ declare const _default: import("vue").DefineComponent<{}, {
777
863
  anchor: boolean;
778
864
  maxHeight: string | number;
779
865
  column: number;
866
+ forceClearable: boolean;
780
867
  components: Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>;
781
868
  initialData: import("../../../../es/shared/types").AnyObject;
782
869
  parallelism: number;
@@ -34,6 +34,7 @@ export declare const SELECT: import("vue").DefineComponent<{
34
34
  allowCreate: BooleanConstructor;
35
35
  shouldSave: BooleanConstructor;
36
36
  allowModify: BooleanConstructor;
37
+ showCustomValue: BooleanConstructor;
37
38
  cursorPlacement: {
38
39
  type: PropType<"end" | "start">;
39
40
  default: string;
@@ -132,6 +133,7 @@ export declare const SELECT: import("vue").DefineComponent<{
132
133
  allowCreate: BooleanConstructor;
133
134
  shouldSave: BooleanConstructor;
134
135
  allowModify: BooleanConstructor;
136
+ showCustomValue: BooleanConstructor;
135
137
  cursorPlacement: {
136
138
  type: PropType<"end" | "start">;
137
139
  default: string;
@@ -217,5 +219,6 @@ export declare const SELECT: import("vue").DefineComponent<{
217
219
  allowCreate: boolean;
218
220
  useLoading: boolean;
219
221
  shouldSave: boolean;
222
+ showCustomValue: boolean;
220
223
  cursorPlacement: "end" | "start";
221
224
  }>;
@@ -1 +1 @@
1
- import{defineComponent as e,computed as l,inject as t,useAttrs as o,ref as a,createVNode as u,mergeProps as n,toRaw as r,nextTick as s}from"vue";import{arrayed as i}from"../../../../../shared/utils/index.js";import{HelpCircleSharp as p}from"@vicons/ionicons5";import{promiseTimeout as m}from"@vueuse/shared";import{cloneDeep as c,isArray as d,isString as v,isObject as f,omit as y}from"lodash-es";import{useCommonInjection as h,useSelectOptionProps as g}from"../../hooks/useCommonInjection.js";import{useComplexOptions as S,useComplexOptionsSpan as j}from"../../hooks/useComplexOptions.js";import{InjectionChangeContextCollector as b,InjectionFormUUID as C}from"../../constants/index.js";import"../../../index.js";import"@formily/core";import"@formily/path";import"@vue/shared";import"@vueuse/core";import{NSelect as w,NTooltip as k,NIcon as F,NTag as B}from"naive-ui";import"date-fns";import{assignUpdateValue as x,assignClearBindVisited as O,createVisitedSetter as A}from"../../utils/schema.js";import{useFormField as H}from"../../hooks/useFormField.js";import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import"../../hooks/useFormValidator.js";import{connect as P,mapProps as R}from"@formily/vue";import"./index.js";import{useUrlConfigOptions as K,useAutographOptions as L,useRecommendOptions as E,searchContentMatcher as V}from"../../hooks/useFormRenderOptions.js";const _=P(e({name:"FormSelect",props:{value:{type:[String,Array,Number]},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},onChange:{},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},showField:{type:String},allowCreate:Boolean,shouldSave:Boolean,allowModify:Boolean,cursorPlacement:{type:String,default:"end"},urlConfig:{type:Object},autograph:{type:String},wordbook:{type:Object},recommend:{type:Boolean,default:!1},commonList:{type:Array},recentList:{type:Array},getRecommendInfo:{type:Function},commonNum:{type:Number,default:10},recentNum:{type:Number,default:10},recommendCache:{type:Boolean,default:!1},useLoading:{type:Boolean,default:!0},multiple:{type:Boolean}},emits:["update:value","postRecommend"],setup(e,{slots:x,emit:O}){const P=l({get:()=>e.value,async set(e){O("update:value",e),Q(e)}}),R=l((()=>(e.multiple&&e.allowModify&&console.warn("多选模式下不支持allowModify"),!e.multiple&&e.allowModify))),{labelKey:_,valueKey:I,showKey:N,fetchData:M,searchContent:W,fullOptions:q,filterOptions:U,remoteOptions:z,loading:D}=e.urlConfig?K(e,P):L(e,P),{renderComplexOption:T,hasComplexOption:G}=S(e,P),{getRecommend:J,postRecommend:Q,sortedOptions:X}=E(e,U,O,_,I),{field:Y,fieldKey:Z}=H();t(b).setContext(Z.value,(e=>({currentOption:c(function(e){const l=re(q.value);return d(e)?function(e){const t=l.reduce(((e,l)=>(e[l[I.value]]=l,e)),{});return e.map((e=>t[e]))}(e):(t=e,l.find((e=>e[I.value]===t)));var t}(e))})));const $=async(e="")=>(W.value=e,Promise.allSettled([M(e),J(e)])),{injectValueValidate:ee,injectValueWatchFromEmpty:le,injectValueBindKey:te}=h();le(P,$),ee(P);const oe=te(P),{menuProps:ae,nodeProps:ue}=g();function ne(e){const l=e[_.value];if(!l||!v(l))return"";const t=W.value?V(W.value,l):null,o=t?u("section",null,[t.map(((e,l)=>0!==l&&e?u("span",{style:{color:l%2==0?"var(--n-option-text-color-active)":""}},[e]):null))]):l;return e.desc?u("section",{style:{display:"flex",alignItems:"center",gap:"4px"}},[o,e.desc?u(k,null,{trigger:()=>u(F,{component:p},null),default:()=>e.desc}):null]):o}function re(l){return e.allowCreate&&W.value&&!l.some((e=>e[_.value]===W.value))?[...l,{[_.value]:W.value,[I.value]:W.value,created:!0,shouldSave:e.shouldSave}]:l}const se=l((()=>re(R.value?q.value:X.value))),ie=o(),pe=l((()=>{if(e.allowCreate)return P.value;const l=e.multiple&&d(P.value);return q.value.find((e=>l?P.value.includes(e[I.value]):e[I.value]===P.value))?P.value:null})),me=a(!1);async function ce(e){e&&await $(),me.value=e}let de=null;async function ve(l,t){P.value=l,de&&f(t)&&R.value&&(de.focus(),await s(),de.value=t[_.value]||"",de.dispatchEvent(new CustomEvent("input")),"start"===e.cursorPlacement&&de.setSelectionRange(0,0)),z.value&&t&&i(t).forEach((e=>{if(!f(e))return;const l=e;l.created&&l.shouldSave&&z.value.push(y(r(l),["created","shouldSave"]))}))}const fe=t(C),{getSpan:ye}=j(),he=A(Y,(async l=>{var t,o,a;R.value&&(de=l.target,de&&P.value&&(await s(),de.value=null!=(a=null!=(o=null==(t=q.value.find((e=>e[I.value]===P.value)))?void 0:t[_.value])?o:P.value)?a:"",de.dispatchEvent(new CustomEvent("input")),"start"===e.cursorPlacement&&(await m(0),de.setSelectionRange(0,0))))}));function ge(e){if(!R.value)return;if(de=e.target,!de)return;if(!de.value)return P.value=null;const l=q.value.find((e=>e[_.value]===de.value));l?P.value=l[I.value]:(W.value=de.value,P.value=de.value)}function Se({option:l,handleClose:t}){var o;const a=null!=(o=N.value&&l[N.value])?o:l[_.value];return e.multiple?u(B,{closable:!0,onClose:e=>{e.stopPropagation(),t()}},{default:()=>a}):a}function je(l){return u(w,n({key:oe.value,multiple:e.multiple,remote:!0,filterable:!0,loading:D.value,value:pe.value,onUpdateValue:ve,"menu-props":ae,"node-props":ue,labelField:_.value,valueField:I.value,options:se.value,onSearch:$,show:me.value,"onUpdate:show":ce,onFocus:he,onBlur:ge,renderLabel:ne,renderTag:Se},l,ie),x)}return()=>{var e,l;if(!G.value)return je();const t=null!=(l=null==(e=Y.value.decoratorProps)?void 0:e.span)?l:6,o=ye(fe,Y.value.address);return u("section",{class:"form-render__selectChildField",style:{"--column":o+t}},[je({class:"form-render__selectChildFieldItem",style:{"--form-item-column":t}}),q.value.map((e=>T({option:e,value:P.value,valueKey:I.value,labelKey:_.value,childFieldStrategy:"checked",renderLabel:!1,attrs:{class:"form-render__selectChildFieldItem",style:{"--form-item-column":o}}})))])}}}),R({dataSource:"options"},x,O));export{_ as SELECT};
1
+ import{defineComponent as e,computed as l,inject as t,useAttrs as o,ref as a,createVNode as u,mergeProps as n,toRaw as r,nextTick as s}from"vue";import{arrayed as i}from"../../../../../shared/utils/index.js";import{HelpCircleSharp as p}from"@vicons/ionicons5";import{promiseTimeout as m}from"@vueuse/shared";import{cloneDeep as c,isArray as d,isString as v,isObject as f,omit as y}from"lodash-es";import{useCommonInjection as h,useSelectOptionProps as g}from"../../hooks/useCommonInjection.js";import{useComplexOptions as S,useComplexOptionsSpan as j}from"../../hooks/useComplexOptions.js";import{InjectionChangeContextCollector as b,InjectionFormUUID as C}from"../../constants/index.js";import"../../../index.js";import"@formily/core";import"@formily/path";import"@vue/shared";import"@vueuse/core";import{NSelect as w,NTooltip as k,NIcon as F,NTag as B}from"naive-ui";import"date-fns";import{assignUpdateValue as x,assignClearBindVisited as O,createVisitedSetter as A}from"../../utils/schema.js";import{useFormField as H}from"../../hooks/useFormField.js";import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import"../../hooks/useFormValidator.js";import{connect as P,mapProps as R}from"@formily/vue";import"./index.js";import{useUrlConfigOptions as V,useAutographOptions as K,useRecommendOptions as L,searchContentMatcher as E}from"../../hooks/useFormRenderOptions.js";const _=P(e({name:"FormSelect",props:{value:{type:[String,Array,Number]},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},onChange:{},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},showField:{type:String},allowCreate:Boolean,shouldSave:Boolean,allowModify:Boolean,showCustomValue:Boolean,cursorPlacement:{type:String,default:"end"},urlConfig:{type:Object},autograph:{type:String},wordbook:{type:Object},recommend:{type:Boolean,default:!1},commonList:{type:Array},recentList:{type:Array},getRecommendInfo:{type:Function},commonNum:{type:Number,default:10},recentNum:{type:Number,default:10},recommendCache:{type:Boolean,default:!1},useLoading:{type:Boolean,default:!0},multiple:{type:Boolean}},emits:["update:value","postRecommend"],setup(e,{slots:x,emit:O}){const P=l({get:()=>e.value,async set(e){O("update:value",e),Q(e)}}),R=l((()=>(e.multiple&&e.allowModify&&console.warn("多选模式下不支持allowModify"),!e.multiple&&e.allowModify))),{labelKey:_,valueKey:I,showKey:N,fetchData:M,searchContent:W,fullOptions:q,filterOptions:U,remoteOptions:z,loading:D}=e.urlConfig?V(e,P):K(e,P),{renderComplexOption:T,hasComplexOption:G}=S(e,P),{getRecommend:J,postRecommend:Q,sortedOptions:X}=L(e,U,O,_,I),{field:Y,fieldKey:Z}=H();t(b).setContext(Z.value,(e=>({currentOption:c(function(e){const l=re(q.value);return d(e)?function(e){const t=l.reduce(((e,l)=>(e[l[I.value]]=l,e)),{});return e.map((e=>t[e]))}(e):(t=e,l.find((e=>e[I.value]===t)));var t}(e))})));const $=async(e="")=>(W.value=e,Promise.allSettled([M(e),J(e)])),{injectValueValidate:ee,injectValueWatchFromEmpty:le,injectValueBindKey:te}=h();le(P,$),ee(P);const oe=te(P),{menuProps:ae,nodeProps:ue}=g();function ne(e){const l=e[_.value];if(!l||!v(l))return"";const t=W.value?E(W.value,l):null,o=t?u("section",null,[t.map(((e,l)=>0!==l&&e?u("span",{style:{color:l%2==0?"var(--n-option-text-color-active)":""}},[e]):null))]):l;return e.desc?u("section",{style:{display:"flex",alignItems:"center",gap:"4px"}},[o,e.desc?u(k,null,{trigger:()=>u(F,{component:p},null),default:()=>e.desc}):null]):o}function re(l){return e.allowCreate&&W.value&&!l.some((e=>e[_.value]===W.value))?[...l,{[_.value]:W.value,[I.value]:W.value,created:!0,shouldSave:e.shouldSave}]:l}const se=l((()=>re(R.value?q.value:X.value))),ie=o(),pe=l((()=>{if(e.allowCreate||e.showCustomValue)return P.value;const l=e.multiple&&d(P.value);return q.value.find((e=>l?P.value.includes(e[I.value]):e[I.value]===P.value))?P.value:null})),me=a(!1);async function ce(e){e&&await $(),me.value=e}let de=null;async function ve(l,t){P.value=l,de&&f(t)&&R.value&&(de.focus(),await s(),de.value=t[_.value]||"",de.dispatchEvent(new CustomEvent("input")),"start"===e.cursorPlacement&&de.setSelectionRange(0,0)),z.value&&t&&i(t).forEach((e=>{if(!f(e))return;const l=e;l.created&&l.shouldSave&&z.value.push(y(r(l),["created","shouldSave"]))}))}const fe=t(C),{getSpan:ye}=j(),he=A(Y,(async l=>{var t,o,a;R.value&&(de=l.target,de&&P.value&&(await s(),de.value=null!=(a=null!=(o=null==(t=q.value.find((e=>e[I.value]===P.value)))?void 0:t[_.value])?o:P.value)?a:"",de.dispatchEvent(new CustomEvent("input")),"start"===e.cursorPlacement&&(await m(0),de.setSelectionRange(0,0))))}));function ge(e){if(!R.value)return;if(de=e.target,!de)return;if(!de.value)return P.value=null;const l=q.value.find((e=>e[_.value]===de.value));l?P.value=l[I.value]:(W.value=de.value,P.value=de.value)}function Se({option:l,handleClose:t}){var o;const a=null!=(o=N.value&&l[N.value])?o:l[_.value];return e.multiple?u(B,{closable:!0,onClose:e=>{e.stopPropagation(),t()}},{default:()=>a}):a}function je(l){return u(w,n({key:oe.value,multiple:e.multiple,remote:!0,filterable:!0,loading:D.value,value:pe.value,onUpdateValue:ve,"menu-props":ae,"node-props":ue,labelField:_.value,valueField:I.value,options:se.value,onSearch:$,show:me.value,"onUpdate:show":ce,onFocus:he,onBlur:ge,renderLabel:ne,renderTag:Se},l,ie),x)}return()=>{var e,l;if(!G.value)return je();const t=null!=(l=null==(e=Y.value.decoratorProps)?void 0:e.span)?l:6,o=ye(fe,Y.value.address);return u("section",{class:"form-render__selectChildField",style:{"--column":o+t}},[je({class:"form-render__selectChildFieldItem",style:{"--form-item-column":t}}),q.value.map((e=>T({option:e,value:P.value,valueKey:I.value,labelKey:_.value,childFieldStrategy:"checked",renderLabel:!1,attrs:{class:"form-render__selectChildFieldItem",style:{"--form-item-column":o}}})))])}}}),R({dataSource:"options"},x,O));export{_ as SELECT};
@@ -1,13 +1,10 @@
1
- import { BusinessCollector } from '../../../../../es/components/form-render';
1
+ import { BusinessCollector, FormRenderProps } from '../../../../../es/components/form-render';
2
2
  import { FieldItem } from '../types';
3
3
  /**
4
4
  * @description 胶水层, 将低代码平台中的fieldList转换为JSONSchema
5
5
  */
6
6
  export declare function useFieldListAdaptor(collector?: BusinessCollector): {
7
- schemaAdaptor: (fieldList: FieldItem[], options?: {
8
- column: number;
9
- outBordered?: boolean;
10
- }) => Record<string, import("@formily/json-schema/esm/types").Stringify<{
7
+ schemaAdaptor: (fieldList: FieldItem[], options?: FormRenderProps) => Record<string, import("@formily/json-schema/esm/types").Stringify<{
11
8
  [key: symbol]: any;
12
9
  [key: `x-${string}`]: any;
13
10
  [key: `x-${number}`]: any;
@@ -1 +1 @@
1
- import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,pick as n}from"lodash-es";import"../../index.js";import{parseNumberFromMaybeString as i,formRenderLog as r}from"../utils/index.js";import{useFieldNormalize as s}from"./useFieldNormalize.js";import{fieldKeyEscape as a,createLinebarId as p}from"../utils/schema.js";import{useFormValidator as l}from"./useFormValidator.js";import{transformDateFormat as c}from"../utils/business.js";function m(e,o){Object.assign(e["x-component-props"],{...n(o,["wordbook","autograph"])})}function d(e,o){Object.assign(e["x-component-props"],{...n(o,["urlConfig","wordbook"])})}function u(u){const{createValidatorSchema:f}=l(),_=e=>{var o;const t={name:e.val_key,type:null!=(o=e.fieldType)?o:"string",title:e.alias||e.name,"x-component":e.html_type,default:e.default_val,"x-component-props":{placeholder:e.placeholder,clearable:"0"===e.is_empty,...e.componentProps||{}},"x-content":e.slots,"x-display":"0"===e.is_show?"hidden":"visible","x-pattern":"0"===e.is_edit?"disabled":"editable","x-compile-omitted":["title","x-component-props","x-decorator-props"]};e.reactions&&(t["x-reactions"]=e.reactions),e.noDecorator||Object.assign(t,{"x-decorator":"FORM_ITEM","x-decorator-props":{fieldItem:e,span:2*(e.elem_width||3),showLabel:"1"!==e.hide_title,remark:e.remark,propertyKey:e.val_key,annotation:e.annotation,...e.decoratorProps||{}}});const n=f(e);return n&&(t["x-validator"]=n),"0"===e.is_null&&(t.required=!0),t},x=e=>{var o;const t=_(e);e.urlConfig?d(t,e):e.autograph&&m(t,e);const r=!!e.__multiple;return Object.assign(t["x-component-props"],{multiple:r,options:e.option||(null==(o=e.componentProps)?void 0:o.options),allowModify:"1"===e.allowModify,allowCreate:"1"===e.free_entry||!!t["x-component-props"].allowCreate||"1"===e.allowModify,shouldSave:"1"===e.save_free_entry,showField:e.show_key,maxTagCount:i(e.multi_select_value),...n(e,["lazyRequest","requestCache"])}),r&&(t.type="array"),t},h=e=>{const o=_(e);return Object.assign(o["x-component-props"],{options:e.option,childFieldStrategy:e.childFieldStrategy,vertical:e.__vertical}),e.urlConfig?d(o,e):e.autograph&&m(o,e),o},g=e=>{const t=_(e);return Object.assign(t["x-component-props"],{fieldItem:o(e,["reactions"])}),t},y=e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINEBAR","x-display":"visible","x-component-props":{disabled:"1"===e.is_not_fold,id:p(e.val_key),show:"0"!==e.is_show,remark:e.remark}}),b=new Map([["LINEBAR",y],["LINE_BREAKS",e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINE_BREAKS","x-component-props":{border:e.lineBreaksBorder},"x-display":"0"===e.is_show?"hidden":"visible"})],["INPUT",e=>{const o=_(e);return Object.assign(o["x-component-props"],{...n(e,["prefix","suffix"])}),o}],["TEXTAREA",e=>{const o=_(e);return Object.assign(o["x-component-props"],{rows:e.initialize_high||3}),o}],["INPUT_NUMBER",e=>{const o=_(e),{decimal_length:t,validate:n,allowSlash:i}=e;return i&&(o["x-component"]="INPUT_NUMBER_SLASH",o.type="string"),Object.assign(o["x-component-props"],{precision:null!=t?t:null==n?void 0:n.decimal_length,prefix:e.prefix,suffix:e.suffix}),o}],["SELECT",x],["REMOTE_SEARCH",x],["DATE",e=>{const o=_(e);return Object.assign(o["x-component-props"],{valueFormat:e.date_format,type:c(e.date_format),validate:e.validate}),o}],["LEVEL_SEARCH_CASCADER",e=>{const o=_(e);return Object.assign(o["x-component-props"],{...n(e,["wordbook","lazyRequest","autograph"])}),"1"===e.is_allow_check_mid&&e.allow_check_mid_level&&(o["x-component-props"].checkAbleLevel=+e.allow_check_mid_level),o}],["SEARCH_CASCADER",e=>{var o;const t=_(e);return Object.assign(t["x-component-props"],{urlConfig:e.urlConfig,depth:null==(o=e.wordbook)?void 0:o.level_num,options:e.option}),t}],["COMBINATION",e=>{const o=_(e);return o.type="array",!1!==e.jsonCombination&&(o["x-component"]="JSON_COMBINATION"),Object.assign(o["x-decorator-props"],{showLabel:!1,showFeedback:!1}),Object.assign(o["x-component-props"],{title:e.alias||e.name,maxGroupNum:e.maxGroupNum,properties:e.children||[],combinationItemDeletable:e.combinationItemDeletable}),o}],["RADIO",h],["CHECKBOX",h],["SWITCH",e=>{const o=_(e);return Object.assign(o["x-component-props"],{openDescription:e.open,closeDescription:e.close}),o}],["SLIDER",e=>{const o=_(e);return Object.assign(o["x-component-props"],{step:i(e.step_length),max:i(e.max_length),min:i(e.min_length),option:e.option}),o}],["COMPLEX",e=>{const o=_(e);Array.isArray(e.properties)&&r("COMPLEX控件的properties属性已经废弃, 请使用children作为替代, 在之后的版本中properties属性将不再支持");const t=Array.isArray(e.properties||e.children)?j(e.properties||e.children):{};return o.type=e.fieldType||"void",o.properties=t,Object.assign(o["x-decorator-props"],{showFeedback:!1}),Object.assign(o["x-component-props"],n(e,["wrapperStyle","display"])),o}]]),v=e=>{if(e.suffixConfig)return w(e);return(b.get(e.html_type)||g)(e)},w=o=>{if(!o.suffixConfig&&!o.prefixConfig)return v(o);const t=o.suffixConfig?e(o.suffixConfig):[],n=[...(o.prefixConfig?e(o.prefixConfig):[]).map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:"1"}))),{...o,is_show:"1",hide_title:"1",suffixConfig:void 0,prefixConfig:void 0},...t.map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:"1"})))],i=_(o),r=n.reduce(((e,o)=>e+2*(o.elem_width||3)),0);return Object.assign(i,{type:"void",name:a(n),title:o.alias||o.name,"x-component":"INPUT_GROUP","x-component-props":{span:r},"x-decorator-props":{...i["x-decorator-props"],showFeedback:!1,suffixFields:n.map((e=>e.val_key))},properties:j(n)}),i},{FieldNormalizeWaterfallHook:C,FieldListNormalizeWaterfallHook:O}=s();function j(o,n={column:9999}){let i=null;return O.call(t(o),n).reduce(((e,o,n)=>{var a;const p=null==(a=(o=C.call(o)).validate)?void 0:a.obj_type;return p&&u&&u.collect(p,t(o)),"LINEBAR"===o.html_type?(e[s(o)]=r(y(o),n),i=e[s(o)].properties={}):i?i[s(o)]=r(v(o),n):(i=null,e[s(o)]=r(v(o),n)),e}),{});function r(e,o){return e["x-index"]=o,e}function s(o){return o.suffixConfig?a([o,...e(o.suffixConfig)]):o.val_key}}return{schemaAdaptor:j}}export{u as useFieldListAdaptor};
1
+ import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,pick as n}from"lodash-es";import"../../index.js";import{parseNumberFromMaybeString as i,formRenderLog as r}from"../utils/index.js";import{useFieldNormalize as s}from"./useFieldNormalize.js";import{fieldKeyEscape as a,createLinebarId as p}from"../utils/schema.js";import{useFormValidator as l}from"./useFormValidator.js";import{transformDateFormat as c}from"../utils/business.js";function m(e,o){Object.assign(e["x-component-props"],{...n(o,["wordbook","autograph"])})}function d(e,o){Object.assign(e["x-component-props"],{...n(o,["urlConfig","wordbook"])})}function u(u){const{createValidatorSchema:f}=l(),_=e=>{var o;const t={name:e.val_key,type:null!=(o=e.fieldType)?o:"string",title:e.alias||e.name,"x-component":e.html_type,default:e.default_val,"x-component-props":{placeholder:e.placeholder,clearable:"0"===e.is_empty,...e.componentProps||{}},"x-content":e.slots,"x-display":"0"===e.is_show?"hidden":"visible","x-pattern":"0"===e.is_edit?"disabled":"editable","x-compile-omitted":["title","x-component-props","x-decorator-props"]};e.reactions&&(t["x-reactions"]=e.reactions),e.noDecorator||Object.assign(t,{"x-decorator":"FORM_ITEM","x-decorator-props":{fieldItem:e,span:2*(e.elem_width||3),showLabel:"1"!==e.hide_title,remark:e.remark,propertyKey:e.val_key,annotation:e.annotation,...e.decoratorProps||{}}});const n=f(e);return n&&(t["x-validator"]=n),"0"===e.is_null&&(t.required=!0),t},x=e=>{var o;const t=_(e);e.urlConfig?d(t,e):e.autograph&&m(t,e);const r=!!e.__multiple;return Object.assign(t["x-component-props"],{multiple:r,options:e.option||(null==(o=e.componentProps)?void 0:o.options),allowModify:"1"===e.allowModify,allowCreate:"1"===e.free_entry||!!t["x-component-props"].allowCreate||"1"===e.allowModify,shouldSave:"1"===e.save_free_entry,showField:e.show_key,maxTagCount:i(e.multi_select_value),...n(e,["lazyRequest","requestCache"])}),r&&(t.type="array"),t},h=e=>{const o=_(e);return Object.assign(o["x-component-props"],{options:e.option,childFieldStrategy:e.childFieldStrategy,vertical:e.__vertical}),e.urlConfig?d(o,e):e.autograph&&m(o,e),o},g=e=>{const t=_(e);return Object.assign(t["x-component-props"],{fieldItem:o(e,["reactions"])}),t},y=e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINEBAR","x-display":"visible","x-component-props":{disabled:"1"===e.is_not_fold,id:p(e.val_key),show:"0"!==e.is_show,remark:e.remark}}),b=new Map([["LINEBAR",y],["LINE_BREAKS",e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINE_BREAKS","x-component-props":{border:e.lineBreaksBorder},"x-display":"0"===e.is_show?"hidden":"visible"})],["INPUT",e=>{const o=_(e);return Object.assign(o["x-component-props"],{...n(e,["prefix","suffix"])}),o}],["TEXTAREA",e=>{const o=_(e);return Object.assign(o["x-component-props"],{rows:e.initialize_high||3}),o}],["INPUT_NUMBER",e=>{const o=_(e),{decimal_length:t,validate:n,allowSlash:i}=e;return i&&(o["x-component"]="INPUT_NUMBER_SLASH",o.type="string"),Object.assign(o["x-component-props"],{precision:null!=t?t:null==n?void 0:n.decimal_length,prefix:e.prefix,suffix:e.suffix}),o}],["SELECT",x],["REMOTE_SEARCH",x],["DATE",e=>{const o=_(e);return Object.assign(o["x-component-props"],{valueFormat:e.date_format,type:c(e.date_format),validate:e.validate}),o}],["LEVEL_SEARCH_CASCADER",e=>{const o=_(e);return Object.assign(o["x-component-props"],{...n(e,["wordbook","lazyRequest","autograph"])}),"1"===e.is_allow_check_mid&&e.allow_check_mid_level&&(o["x-component-props"].checkAbleLevel=+e.allow_check_mid_level),o}],["SEARCH_CASCADER",e=>{var o;const t=_(e);return Object.assign(t["x-component-props"],{urlConfig:e.urlConfig,depth:null==(o=e.wordbook)?void 0:o.level_num,options:e.option}),t}],["COMBINATION",e=>{const o=_(e);return o.type="array",!1!==e.jsonCombination&&(o["x-component"]="JSON_COMBINATION"),Object.assign(o["x-decorator-props"],{showLabel:!1,showFeedback:!1}),Object.assign(o["x-component-props"],{title:e.alias||e.name,maxGroupNum:e.maxGroupNum,properties:e.children||[],combinationItemDeletable:e.combinationItemDeletable}),o}],["RADIO",h],["CHECKBOX",h],["SWITCH",e=>{const o=_(e);return Object.assign(o["x-component-props"],{openDescription:e.open,closeDescription:e.close}),o}],["SLIDER",e=>{const o=_(e);return Object.assign(o["x-component-props"],{step:i(e.step_length),max:i(e.max_length),min:i(e.min_length),option:e.option}),o}],["COMPLEX",e=>{const o=_(e);Array.isArray(e.properties)&&r("COMPLEX控件的properties属性已经废弃, 请使用children作为替代, 在之后的版本中properties属性将不再支持");const t=Array.isArray(e.properties||e.children)?j(e.properties||e.children):{};return o.type=e.fieldType||"void",o.properties=t,Object.assign(o["x-decorator-props"],{showFeedback:!1}),Object.assign(o["x-component-props"],n(e,["wrapperStyle","display"])),o}]]),v=e=>{if(e.suffixConfig)return w(e);return(b.get(e.html_type)||g)(e)},w=o=>{if(!o.suffixConfig&&!o.prefixConfig)return v(o);const t=o.suffixConfig?e(o.suffixConfig):[],n=[...(o.prefixConfig?e(o.prefixConfig):[]).map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:"1"}))),{...o,is_show:"1",hide_title:"1",suffixConfig:void 0,prefixConfig:void 0},...t.map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:"1"})))],i=_(o),r=n.reduce(((e,o)=>e+2*(o.elem_width||3)),0);return Object.assign(i,{type:"void",name:a(n),title:o.alias||o.name,"x-component":"INPUT_GROUP","x-component-props":{span:r},"x-decorator-props":{...i["x-decorator-props"],showFeedback:!1,suffixFields:n.map((e=>e.val_key))},properties:j(n)}),i},{FieldNormalizeWaterfallHook:C,FieldListNormalizeWaterfallHook:O}=s();function j(o,n={column:9999}){let i=null;return O.call(t(o),n).reduce(((e,o,a)=>{var p;const l=null==(p=(o=C.call(o,n)).validate)?void 0:p.obj_type;return l&&u&&u.collect(l,t(o)),"LINEBAR"===o.html_type?(e[s(o)]=r(y(o),a),i=e[s(o)].properties={}):i?i[s(o)]=r(v(o),a):(i=null,e[s(o)]=r(v(o),a)),e}),{});function r(e,o){return e["x-index"]=o,e}function s(o){return o.suffixConfig?a([o,...e(o.suffixConfig)]):o.val_key}}return{schemaAdaptor:j}}export{u as useFieldListAdaptor};
@@ -1,9 +1,178 @@
1
1
  import { SyncWaterfallHook } from '../../../../../es/shared/utils/tapable';
2
2
  import { FieldItem } from '../types';
3
3
  export declare function useFieldNormalize(): {
4
- FieldNormalizeWaterfallHook: SyncWaterfallHook<FieldItem, import("../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
5
- FieldListNormalizeWaterfallHook: SyncWaterfallHook<[FieldItem[], {
4
+ FieldNormalizeWaterfallHook: SyncWaterfallHook<[FieldItem, Partial<{
5
+ fieldList: FieldItem[];
6
+ initialData: import("../../../../../es/shared/types").AnyObject;
7
+ fieldVisitor: import("../types").FieldVisitor;
6
8
  column: number;
7
- outBordered?: boolean | undefined;
8
- }], import("../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
9
+ maxHeight: string | number;
10
+ anchor: boolean;
11
+ parallelism: number;
12
+ schema: import("@formily/json-schema").Stringify<{
13
+ [key: symbol]: any;
14
+ [key: `x-${string}`]: any;
15
+ [key: `x-${number}`]: any;
16
+ version?: string | undefined;
17
+ name?: import("@formily/json-schema").SchemaKey | undefined;
18
+ title?: any;
19
+ description?: any;
20
+ default?: any;
21
+ readOnly?: boolean | undefined;
22
+ writeOnly?: boolean | undefined;
23
+ type?: import("@formily/json-schema").SchemaTypes | undefined;
24
+ enum?: import("@formily/json-schema").SchemaEnum<any> | undefined;
25
+ const?: any;
26
+ multipleOf?: number | undefined;
27
+ maximum?: number | undefined;
28
+ exclusiveMaximum?: number | undefined;
29
+ minimum?: number | undefined;
30
+ exclusiveMinimum?: number | undefined;
31
+ maxLength?: number | undefined;
32
+ minLength?: number | undefined;
33
+ pattern?: string | RegExp | undefined;
34
+ maxItems?: number | undefined;
35
+ minItems?: number | undefined;
36
+ uniqueItems?: boolean | undefined;
37
+ maxProperties?: number | undefined;
38
+ minProperties?: number | undefined;
39
+ required?: string | boolean | string[] | undefined;
40
+ format?: string | undefined;
41
+ $ref?: string | undefined;
42
+ $namespace?: string | undefined;
43
+ definitions?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
44
+ properties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
45
+ items?: import("@formily/json-schema").SchemaItems<any, any, any, any, any, any, any, any> | undefined;
46
+ additionalItems?: import("@formily/json-schema").Stringify<any> | undefined;
47
+ patternProperties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
48
+ additionalProperties?: import("@formily/json-schema").Stringify<any> | undefined;
49
+ "x-value"?: any;
50
+ "x-index"?: number | undefined;
51
+ "x-pattern"?: any;
52
+ "x-display"?: any;
53
+ "x-validator"?: any;
54
+ "x-decorator"?: any;
55
+ "x-decorator-props"?: any;
56
+ "x-component"?: any;
57
+ "x-component-props"?: any;
58
+ "x-reactions"?: import("@formily/json-schema").SchemaReactions<any> | undefined;
59
+ "x-content"?: any;
60
+ "x-data"?: any;
61
+ "x-visible"?: boolean | undefined;
62
+ "x-hidden"?: boolean | undefined;
63
+ "x-disabled"?: boolean | undefined;
64
+ "x-editable"?: boolean | undefined;
65
+ "x-read-only"?: boolean | undefined;
66
+ "x-read-pretty"?: boolean | undefined;
67
+ "x-compile-omitted"?: string[] | undefined;
68
+ }>;
69
+ components: Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>;
70
+ scope: import("../../../../../es/shared/types").AnyObject;
71
+ annotation: import("../../../../../es/shared/types").AnyObject;
72
+ consumer: boolean;
73
+ uuid: string;
74
+ lifeCycle: Partial<{
75
+ onSetup(): void;
76
+ beforeRequest(fieldKey: string, params?: import("../../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../../es/shared/types").AnyObject | undefined): void | import("../../../../../es/shared/types").UndefinedAble<import("../../../../../es/shared/types").AnyObject>;
77
+ afterRequest(fieldKey: string, res?: any, payload?: import("../../../../../es/shared/types").AnyObject | undefined): import("../../../../../es/shared/types").AnyObject[];
78
+ afterOptionInit(fieldKey: string, options: import("../../../../../es/shared/types").AnyObject[], payload?: import("../../../../../es/shared/types").AnyObject | undefined): void;
79
+ }>;
80
+ businessFormatter: import("../types").FormBusinessFormatter;
81
+ requestInstance: import("./useFormRequest").RequestInstance;
82
+ enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
83
+ lowCodeReactions: import("../types").FormLowCodeReactions.Config[];
84
+ linebarAutoHidden: boolean;
85
+ bordered: string | boolean;
86
+ uniqueCacheData: boolean;
87
+ operationalForm: import("../../../../../es/shared/types").FormOperationalConfig[];
88
+ outBordered: boolean;
89
+ forceClearable: boolean;
90
+ }>], import("../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
91
+ FieldListNormalizeWaterfallHook: SyncWaterfallHook<[FieldItem[], Partial<{
92
+ fieldList: FieldItem[];
93
+ initialData: import("../../../../../es/shared/types").AnyObject;
94
+ fieldVisitor: import("../types").FieldVisitor;
95
+ column: number;
96
+ maxHeight: string | number;
97
+ anchor: boolean;
98
+ parallelism: number;
99
+ schema: import("@formily/json-schema").Stringify<{
100
+ [key: symbol]: any;
101
+ [key: `x-${string}`]: any;
102
+ [key: `x-${number}`]: any;
103
+ version?: string | undefined;
104
+ name?: import("@formily/json-schema").SchemaKey | undefined;
105
+ title?: any;
106
+ description?: any;
107
+ default?: any;
108
+ readOnly?: boolean | undefined;
109
+ writeOnly?: boolean | undefined;
110
+ type?: import("@formily/json-schema").SchemaTypes | undefined;
111
+ enum?: import("@formily/json-schema").SchemaEnum<any> | undefined;
112
+ const?: any;
113
+ multipleOf?: number | undefined;
114
+ maximum?: number | undefined;
115
+ exclusiveMaximum?: number | undefined;
116
+ minimum?: number | undefined;
117
+ exclusiveMinimum?: number | undefined;
118
+ maxLength?: number | undefined;
119
+ minLength?: number | undefined;
120
+ pattern?: string | RegExp | undefined;
121
+ maxItems?: number | undefined;
122
+ minItems?: number | undefined;
123
+ uniqueItems?: boolean | undefined;
124
+ maxProperties?: number | undefined;
125
+ minProperties?: number | undefined;
126
+ required?: string | boolean | string[] | undefined;
127
+ format?: string | undefined;
128
+ $ref?: string | undefined;
129
+ $namespace?: string | undefined;
130
+ definitions?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
131
+ properties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
132
+ items?: import("@formily/json-schema").SchemaItems<any, any, any, any, any, any, any, any> | undefined;
133
+ additionalItems?: import("@formily/json-schema").Stringify<any> | undefined;
134
+ patternProperties?: import("@formily/json-schema").SchemaProperties<any, any, any, any, any, any, any, any> | undefined;
135
+ additionalProperties?: import("@formily/json-schema").Stringify<any> | undefined;
136
+ "x-value"?: any;
137
+ "x-index"?: number | undefined;
138
+ "x-pattern"?: any;
139
+ "x-display"?: any;
140
+ "x-validator"?: any;
141
+ "x-decorator"?: any;
142
+ "x-decorator-props"?: any;
143
+ "x-component"?: any;
144
+ "x-component-props"?: any;
145
+ "x-reactions"?: import("@formily/json-schema").SchemaReactions<any> | undefined;
146
+ "x-content"?: any;
147
+ "x-data"?: any;
148
+ "x-visible"?: boolean | undefined;
149
+ "x-hidden"?: boolean | undefined;
150
+ "x-disabled"?: boolean | undefined;
151
+ "x-editable"?: boolean | undefined;
152
+ "x-read-only"?: boolean | undefined;
153
+ "x-read-pretty"?: boolean | undefined;
154
+ "x-compile-omitted"?: string[] | undefined;
155
+ }>;
156
+ components: Record<string, import("vue").Component<any, any, any, import("vue").ComputedOptions, import("vue").MethodOptions> | import("vue").FunctionalComponent<{}, {}>>;
157
+ scope: import("../../../../../es/shared/types").AnyObject;
158
+ annotation: import("../../../../../es/shared/types").AnyObject;
159
+ consumer: boolean;
160
+ uuid: string;
161
+ lifeCycle: Partial<{
162
+ onSetup(): void;
163
+ beforeRequest(fieldKey: string, params?: import("../../../../../es/shared/types").AnyObject | undefined, payload?: import("../../../../../es/shared/types").AnyObject | undefined): void | import("../../../../../es/shared/types").UndefinedAble<import("../../../../../es/shared/types").AnyObject>;
164
+ afterRequest(fieldKey: string, res?: any, payload?: import("../../../../../es/shared/types").AnyObject | undefined): import("../../../../../es/shared/types").AnyObject[];
165
+ afterOptionInit(fieldKey: string, options: import("../../../../../es/shared/types").AnyObject[], payload?: import("../../../../../es/shared/types").AnyObject | undefined): void;
166
+ }>;
167
+ businessFormatter: import("../types").FormBusinessFormatter;
168
+ requestInstance: import("./useFormRequest").RequestInstance;
169
+ enterToNextWidget: boolean | ((fieldItem: FieldItem) => boolean | void);
170
+ lowCodeReactions: import("../types").FormLowCodeReactions.Config[];
171
+ linebarAutoHidden: boolean;
172
+ bordered: string | boolean;
173
+ uniqueCacheData: boolean;
174
+ operationalForm: import("../../../../../es/shared/types").FormOperationalConfig[];
175
+ outBordered: boolean;
176
+ forceClearable: boolean;
177
+ }>], import("../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
9
178
  };
@@ -1 +1 @@
1
- import{arrayed as e,uuidGenerator as t,traverse as l}from"../../../../shared/utils/index.js";import"../../../../shared/utils/tapable/SyncHook.js";import"../../../../shared/utils/tapable/SyncBailHook.js";import r from"../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../shared/utils/tapable/SyncLoopHook.js";import"../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import{last as o,isString as i}from"lodash-es";import{FIELD_BUSINESS_TYPE as s}from"../constants/index.js";function a(){const a=new r(["fieldList","options"]),p=new r(["fieldItem"]);p.tap("__block",(e=>(["CHECKBOX_BLOCK","RADIO_BLOCK"].includes(e.html_type)&&(e.__vertical=!0),e))),p.tap("__age",(t=>("AGE"===t.html_type&&(t.html_type="INPUT_NUMBER",t.reactions=t.reactions?e(t.reactions):[],t.reactions.push({target:t.val_key_unit,fulfill:{state:{disabled:"{{$self.disabled}}"}}}),t.suffixConfig=[{validate:{obj_type:s.AGE_UNIT},val_key:t.val_key_unit,html_type:"SELECT",option:t.option,urlConfig:t.urlConfig}]),t))),p.tap("__multiple_select",(e=>{const{html_type:t,multi_select:l,__multiple:r}=e;return e.__multiple="SEARCH"!==t&&("SEARCH_MORE"===t||("SELECT"===t?"0"===l:r)),e}));const _=[[["SEARCH","PHONE_TYPE","IDCARD_TYPE","SEARCH_MORE"],"SELECT"],["DIGITAL","INPUT_NUMBER"],["CHECKBOX_BLOCK","CHECKBOX"],["RADIO_BLOCK","RADIO"],[["DATE-INPUT","DATETIME-INPUT"],"DATE"],["SWITCH_COMPONENT","SWITCH"],["SLIDER_COMPONENT","SLIDER"],["LEVEL_SEARCH_CASCADE","LEVEL_SEARCH_CASCADER"],["SEARCH_CASCADE","SEARCH_CASCADER"]];p.tap("__normalize",(e=>(_.some((([t,l])=>(Array.isArray(t)?t.includes(e.html_type):t===e.html_type)&&(e.html_type=l))),e)));const n=new Map([[["SELECT","SEARCH","SEARCH_MORE"],new Map([["H_TILE",e=>e.html_type=e.__multiple?"CHECKBOX":"RADIO"],["V_TILE",e=>{e.html_type=e.__multiple?"CHECKBOX":"RADIO",e.__vertical=!0}]])],["RADIO",new Map([["DROPDOWN",e=>e.html_type="SELECT"]])],["CHECKBOX",new Map([["DROPDOWN",e=>{e.__multiple=!0,e.html_type="SELECT"}]])]]);return p.tap({stage:9999,name:"__show_mode"},(t=>t.show_mode?([...n].some((([l,r])=>{if(!e(l).includes(t.html_type))return;const o=r.get(t.show_mode);return o&&o(t),!0})),t):t)),a.tap("__out_bordered",((e,{column:l,outBordered:r})=>{if(!r)return e;let i=0;return e.reduce(((r,s,a)=>{const p=2*(s.elem_width||3);return i+=p,i===l&&a<e.length-1?(i=0,r.push(s),r.push({val_key:`${t()}`,html_type:"LINE_BREAKS",lineBreaksBorder:!0})):i>l?(i=p,r.push({val_key:`${t()}`,html_type:"LINE_BREAKS",lineBreaksBorder:!0}),r.push(s)):(o(r)&&(o(r).fieldItemBorder=!0),r.push(s)),r}),[])})),a.tap("__prefix/suffix",(e=>{const t=[];return l(e,(r=>{["prefix","suffix"].forEach((o=>{const s=r[o];if(!i(s))return;const a=s.match("#{(.+)}");if(!a)return;const p=i(a[1])&&function(t){let r=null;return l(e,((e,l)=>{e.val_key===t&&(r=e,l())}),["children","properties"]),r}(a[1].trim());p&&(Reflect.deleteProperty(r,o),r[`${o}Config`]=r[`${o}Config`]||[],r[`${o}Config`].push(p),t.push(p))}))}),["children","properties"]),t.length?function e(l){return l.reduce(((l,r)=>(t.includes(r)||(l.push(r),r.properties&&(r.properties=e(r.properties)),r.children&&(r.children=e(r.children))),l)),[])}(e):e})),{FieldNormalizeWaterfallHook:p,FieldListNormalizeWaterfallHook:a}}export{a as useFieldNormalize};
1
+ import{arrayed as e,uuidGenerator as t,traverse as r}from"../../../../shared/utils/index.js";import"../../../../shared/utils/tapable/SyncHook.js";import"../../../../shared/utils/tapable/SyncBailHook.js";import l from"../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../shared/utils/tapable/SyncLoopHook.js";import"../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import{last as o,isString as s}from"lodash-es";import{FIELD_BUSINESS_TYPE as i}from"../constants/index.js";function a(){const a=new l(["fieldList","props"]),p=new l(["fieldItem","props"]);p.tap("__forceClearable",((e,t)=>(t.forceClearable&&(e.componentProps={...e.componentProps,clearable:!0}),e))),p.tap("__block",(e=>(["CHECKBOX_BLOCK","RADIO_BLOCK"].includes(e.html_type)&&(e.__vertical=!0),e))),p.tap("__age",(t=>("AGE"===t.html_type&&(t.html_type="INPUT_NUMBER",t.reactions=t.reactions?e(t.reactions):[],t.reactions.push({target:t.val_key_unit,fulfill:{state:{disabled:"{{$self.disabled}}"}}}),t.suffixConfig=[{validate:{obj_type:i.AGE_UNIT},val_key:t.val_key_unit,html_type:"SELECT",option:t.option,urlConfig:t.urlConfig}]),t))),p.tap("__multiple_select",(e=>{const{html_type:t,multi_select:r,__multiple:l}=e;return e.__multiple="SEARCH"!==t&&("SEARCH_MORE"===t||("SELECT"===t?"0"===r:l)),e}));const _=[[["SEARCH","PHONE_TYPE","IDCARD_TYPE","SEARCH_MORE"],"SELECT"],["DIGITAL","INPUT_NUMBER"],["CHECKBOX_BLOCK","CHECKBOX"],["RADIO_BLOCK","RADIO"],[["DATE-INPUT","DATETIME-INPUT"],"DATE"],["SWITCH_COMPONENT","SWITCH"],["SLIDER_COMPONENT","SLIDER"],["LEVEL_SEARCH_CASCADE","LEVEL_SEARCH_CASCADER"],["SEARCH_CASCADE","SEARCH_CASCADER"]];p.tap("__normalize",(e=>(_.some((([t,r])=>(Array.isArray(t)?t.includes(e.html_type):t===e.html_type)&&(e.html_type=r))),e)));const n=new Map([[["SELECT","SEARCH","SEARCH_MORE"],new Map([["H_TILE",e=>e.html_type=e.__multiple?"CHECKBOX":"RADIO"],["V_TILE",e=>{e.html_type=e.__multiple?"CHECKBOX":"RADIO",e.__vertical=!0}]])],["RADIO",new Map([["DROPDOWN",e=>e.html_type="SELECT"]])],["CHECKBOX",new Map([["DROPDOWN",e=>{e.__multiple=!0,e.html_type="SELECT"}]])]]);return p.tap({stage:9999,name:"__show_mode"},(t=>t.show_mode?([...n].some((([r,l])=>{if(!e(r).includes(t.html_type))return;const o=l.get(t.show_mode);return o&&o(t),!0})),t):t)),a.tap("__out_bordered",((e,{column:r,outBordered:l})=>{if(!l)return e;let s=0;return e.reduce(((l,i,a)=>{const p=2*(i.elem_width||3);return s+=p,s===r&&a<e.length-1?(s=0,l.push(i),l.push({val_key:`${t()}`,html_type:"LINE_BREAKS",lineBreaksBorder:!0})):s>r?(s=p,l.push({val_key:`${t()}`,html_type:"LINE_BREAKS",lineBreaksBorder:!0}),l.push(i)):(o(l)&&(o(l).fieldItemBorder=!0),l.push(i)),l}),[])})),a.tap("__prefix/suffix",(e=>{const t=[];return r(e,(l=>{["prefix","suffix"].forEach((o=>{const i=l[o];if(!s(i))return;const a=i.match("#{(.+)}");if(!a)return;const p=s(a[1])&&function(t){let l=null;return r(e,((e,r)=>{e.val_key===t&&(l=e,r())}),["children","properties"]),l}(a[1].trim());p&&(Reflect.deleteProperty(l,o),l[`${o}Config`]=l[`${o}Config`]||[],l[`${o}Config`].push(p),t.push(p))}))}),["children","properties"]),t.length?function e(r){return r.reduce(((r,l)=>(t.includes(l)||(r.push(l),l.properties&&(l.properties=e(l.properties)),l.children&&(l.children=e(l.children))),r)),[])}(e):e})),{FieldNormalizeWaterfallHook:p,FieldListNormalizeWaterfallHook:a}}export{a as useFieldNormalize};
@@ -144,6 +144,7 @@ export declare type FormRenderProps = Partial<{
144
144
  uniqueCacheData: boolean;
145
145
  operationalForm: FormOperationalConfig[];
146
146
  outBordered: boolean;
147
+ forceClearable: boolean;
147
148
  }>;
148
149
  export declare type FormBusinessFormatter = (payload: {
149
150
  fieldKey: string;
@@ -868,6 +868,18 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
868
868
  trigger?: "default" | "cell" | "row" | undefined;
869
869
  highlight?: boolean | undefined;
870
870
  strict?: boolean | undefined;
871
+ slots?: {
872
+ title?: string | ((params: import("vxe-table").VxeColumnPropTypes.HeaderSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
873
+ radio?: string | ((params: import("vxe-table").VxeColumnPropTypes.DefaultSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
874
+ checkbox?: string | ((params: import("vxe-table").VxeColumnPropTypes.DefaultSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
875
+ default?: string | ((params: import("vxe-table").VxeColumnPropTypes.DefaultSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
876
+ header?: string | ((params: import("vxe-table").VxeColumnPropTypes.HeaderSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
877
+ footer?: string | ((params: import("vxe-table").VxeColumnPropTypes.FooterSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
878
+ content?: string | ((params: import("vxe-table").VxeColumnPropTypes.ContentSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
879
+ filter?: string | ((params: import("vxe-table").VxeColumnPropTypes.FilterSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
880
+ edit?: string | ((params: import("vxe-table").VxeColumnPropTypes.EditSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
881
+ icon?: string | ((params: import("vxe-table").VxeColumnPropTypes.IconSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
882
+ } | undefined;
871
883
  } | undefined;
872
884
  checkboxConfig?: {
873
885
  reserve?: boolean | undefined;
@@ -2111,6 +2123,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
2111
2123
  isSingleSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
2112
2124
  hideSettingBtn?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
2113
2125
  showSeq?: boolean | undefined;
2126
+ forceClearable?: boolean | undefined;
2114
2127
  selectType?: "checkbox" | "radio" | null | undefined;
2115
2128
  rowGroupSetting?: {
2116
2129
  firstRowGroup?: {
@@ -3356,6 +3369,18 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
3356
3369
  trigger?: "default" | "cell" | "row" | undefined;
3357
3370
  highlight?: boolean | undefined;
3358
3371
  strict?: boolean | undefined;
3372
+ slots?: {
3373
+ title?: string | ((params: import("vxe-table").VxeColumnPropTypes.HeaderSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3374
+ radio?: string | ((params: import("vxe-table").VxeColumnPropTypes.DefaultSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3375
+ checkbox?: string | ((params: import("vxe-table").VxeColumnPropTypes.DefaultSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3376
+ default?: string | ((params: import("vxe-table").VxeColumnPropTypes.DefaultSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3377
+ header?: string | ((params: import("vxe-table").VxeColumnPropTypes.HeaderSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3378
+ footer?: string | ((params: import("vxe-table").VxeColumnPropTypes.FooterSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3379
+ content?: string | ((params: import("vxe-table").VxeColumnPropTypes.ContentSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3380
+ filter?: string | ((params: import("vxe-table").VxeColumnPropTypes.FilterSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3381
+ edit?: string | ((params: import("vxe-table").VxeColumnPropTypes.EditSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3382
+ icon?: string | ((params: import("vxe-table").VxeColumnPropTypes.IconSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3383
+ } | undefined;
3359
3384
  } | undefined;
3360
3385
  checkboxConfig?: {
3361
3386
  reserve?: boolean | undefined;
@@ -4539,6 +4564,7 @@ declare const IhoTable: SFCWithInstall<import("vue").DefineComponent<{
4539
4564
  isSingleSelect?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
4540
4565
  hideSettingBtn?: import("../../../es/shared/types").MaybeString<0 | 1> | undefined;
4541
4566
  showSeq?: boolean | undefined;
4567
+ forceClearable?: boolean | undefined;
4542
4568
  selectType?: "checkbox" | "radio" | null | undefined;
4543
4569
  rowGroupSetting?: {
4544
4570
  firstRowGroup?: {
@@ -867,6 +867,18 @@ declare const _default: import("vue").DefineComponent<{
867
867
  trigger?: "default" | "cell" | "row" | undefined;
868
868
  highlight?: boolean | undefined;
869
869
  strict?: boolean | undefined;
870
+ slots?: {
871
+ title?: string | ((params: import("vxe-table").VxeColumnPropTypes.HeaderSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
872
+ radio?: string | ((params: import("vxe-table").VxeColumnPropTypes.DefaultSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
873
+ checkbox?: string | ((params: import("vxe-table").VxeColumnPropTypes.DefaultSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
874
+ default?: string | ((params: import("vxe-table").VxeColumnPropTypes.DefaultSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
875
+ header?: string | ((params: import("vxe-table").VxeColumnPropTypes.HeaderSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
876
+ footer?: string | ((params: import("vxe-table").VxeColumnPropTypes.FooterSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
877
+ content?: string | ((params: import("vxe-table").VxeColumnPropTypes.ContentSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
878
+ filter?: string | ((params: import("vxe-table").VxeColumnPropTypes.FilterSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
879
+ edit?: string | ((params: import("vxe-table").VxeColumnPropTypes.EditSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
880
+ icon?: string | ((params: import("vxe-table").VxeColumnPropTypes.IconSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
881
+ } | undefined;
870
882
  } | undefined;
871
883
  checkboxConfig?: {
872
884
  reserve?: boolean | undefined;
@@ -2110,6 +2122,7 @@ declare const _default: import("vue").DefineComponent<{
2110
2122
  isSingleSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
2111
2123
  hideSettingBtn?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
2112
2124
  showSeq?: boolean | undefined;
2125
+ forceClearable?: boolean | undefined;
2113
2126
  selectType?: "checkbox" | "radio" | null | undefined;
2114
2127
  rowGroupSetting?: {
2115
2128
  firstRowGroup?: {
@@ -3355,6 +3368,18 @@ declare const _default: import("vue").DefineComponent<{
3355
3368
  trigger?: "default" | "cell" | "row" | undefined;
3356
3369
  highlight?: boolean | undefined;
3357
3370
  strict?: boolean | undefined;
3371
+ slots?: {
3372
+ title?: string | ((params: import("vxe-table").VxeColumnPropTypes.HeaderSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3373
+ radio?: string | ((params: import("vxe-table").VxeColumnPropTypes.DefaultSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3374
+ checkbox?: string | ((params: import("vxe-table").VxeColumnPropTypes.DefaultSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3375
+ default?: string | ((params: import("vxe-table").VxeColumnPropTypes.DefaultSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3376
+ header?: string | ((params: import("vxe-table").VxeColumnPropTypes.HeaderSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3377
+ footer?: string | ((params: import("vxe-table").VxeColumnPropTypes.FooterSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3378
+ content?: string | ((params: import("vxe-table").VxeColumnPropTypes.ContentSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3379
+ filter?: string | ((params: import("vxe-table").VxeColumnPropTypes.FilterSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3380
+ edit?: string | ((params: import("vxe-table").VxeColumnPropTypes.EditSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3381
+ icon?: string | ((params: import("vxe-table").VxeColumnPropTypes.IconSlotParams) => import("vxe-table").SlotVNodeType | import("vxe-table").SlotVNodeType[]) | null | undefined;
3382
+ } | undefined;
3358
3383
  } | undefined;
3359
3384
  checkboxConfig?: {
3360
3385
  reserve?: boolean | undefined;
@@ -4538,6 +4563,7 @@ declare const _default: import("vue").DefineComponent<{
4538
4563
  isSingleSelect?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
4539
4564
  hideSettingBtn?: import("../../../../es/shared/types").MaybeString<0 | 1> | undefined;
4540
4565
  showSeq?: boolean | undefined;
4566
+ forceClearable?: boolean | undefined;
4541
4567
  selectType?: "checkbox" | "radio" | null | undefined;
4542
4568
  rowGroupSetting?: {
4543
4569
  firstRowGroup?: {
@@ -14,7 +14,9 @@ declare class ConfigHooks extends AbstractConfigHooks {
14
14
  readonly seqConfig: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.SeqConfig | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
15
15
  readonly sortConfig: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.SortConfig | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
16
16
  readonly filterConfig: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.FilterConfig | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
17
- readonly radioConfig: SyncWaterfallHook<[import("vxe-table").VxeTablePropTypes.RadioConfig | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
17
+ readonly radioConfig: SyncWaterfallHook<[(import("vxe-table").VxeTablePropTypes.RadioConfig & Partial<import("vxe-table").VxeTablePropTypes.RadioConfig & {
18
+ slots: import("vxe-table").VxeColumnPropTypes.Slots;
19
+ }>) | undefined, IhoTableConfig, IhoTableHandlerContext<true>], import("../../../../../../es/shared/utils/tapable").UnsetAdditionalOptions>;
18
20
  readonly checkboxConfig: SyncWaterfallHook<[(import("vxe-table").VxeTablePropTypes.CheckboxConfig & Partial<import("vxe-table").VxeTablePropTypes.CheckboxConfig & {
19
21
  slots: import("vxe-table").VxeColumnPropTypes.Slots;
20
22
  maxCheckSize: number;
@@ -1 +1 @@
1
- import{toRaw as e,h as t,inject as l,createVNode as i}from"vue";import{arrayed as o,widthAppend as s}from"../../../../../shared/utils/index.js";import{isObject as n,isFunction as a,cloneDeep as d,isString as r}from"lodash-es";import u from"../../../../annotation-edit/index.js";import{HIGHEST_PRIORITY as c,IHO_TABLE_FIXED_STATUS as f,LOWEST_PRIORITY as m,WIDGET_TYPE as p,InjectionIhoTableAnnotation as h,InjectionIhoTableConfig as v}from"../../constants/index.js";import{defineTablePlugin as b}from"../../hooks/useTablePlugin.js";import{IhoTableStatusHelper as g,IhoTableUtils as x,IhoTableRenderHelper as R}from"../../utils/index.js";import{getDefaultValue as j}from"../rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js";function w(){const w="lowCodeFieldAdaptorPlugin";return b({name:w,apply(b){b.fieldHooks.field.tap({name:w,stage:c},((c,m,b)=>{const w=c,P={className:w.bold?"iho-table__boldCell":"",field:w.columnName,showOverflow:"ellipsis",visible:g.notNegative(w.isShow),minWidth:w.colWidth,sortable:g.isPositive(w.isSort),fixed:f[w.isFixed],...w,title:w.alias||w.title};return function(e,d){const c={default:d.slotFn,header:d.headerSlotFn,edit:d.editSlotFn,footer:d.footerSlotFn,...d.slots};if(a(d.checkEditStatus)){const{default:e}=c;a(e)&&(c.default=l=>d.checkEditStatus(l)?e(l):[t("span",null,j(l.row,l.column.editRender.props))])}const f=c.header;c.header=e=>function(e,t,d){var c;const f=l(h),m=l(v),p=l("$xetable"),b=e.column||{},g=n(null==f?void 0:f.value)&&!1!==t.annotation,x=R.isEditableColumn(m.value,b),j=R.hasFilter(t)||R.hasDateFiler(t),w=null==(c=t.titlePrefix)?void 0:c.content,P=r(d)?d:a(d)?d(e):null;let F=!1;if(m.value){const e=m.value.editRules&&m.value.editRules[b.field];e&&(F=o(e).some((e=>e.required)))}const S=m.value.border?Math.max(2,Math.ceil(p.reactData.scrollbarWidth/p.reactData.tableColumn.length)):1,W=s(Math.max(0,b.renderWidth-20-S-(F?14:0)-(g?18:0)-(j?23:0)-(x?22:0)-(w?20:0)-(b.sortable?23:0)));return i("section",{class:"iho-table__headerWrapper"},[i("section",{style:{width:W}},[null!=P?P:i("div",{style:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},[b.title])]),g?i(u,{modelValue:f.value[b.field],"onUpdate:modelValue":e=>f.value[b.field]=e},null):null])}(e,d,f),e.slots=c}(P,w),function(t,l,i){var o,s;const r=d(e(l));r.componentProps={size:"mini"===i.size?"small":i.size,...r.componentProps},t.editRender={name:x.getCellType(l),...t.editRender,props:r},t.editRender.enabled=!Reflect.get(p,t.editRender.name),a(null==(o=t.slots)?void 0:o.default)&&(t.editRender.enabled=t.editRender.enabled&&a(null==(s=t.slots)?void 0:s.edit));if(!n(l.settingObj))return;Reflect.has(l.settingObj,"isHide")&&(t.visible=t.visible&&g.notPositive(l.settingObj.isHide))}(P,w,b),P})),b.fieldHooks.field.tap({name:w+"After",stage:m},(e=>(n(e.slots)&&Object.entries(e.slots).forEach((([t,l])=>{null==l&&Reflect.deleteProperty(e.slots,t)})),e)))}})}export{w as lowCodeFieldAdaptorPlugin};
1
+ import{toRaw as e,h as t,inject as l,createVNode as i}from"vue";import{arrayed as o,widthAppend as s}from"../../../../../shared/utils/index.js";import{isObject as n,isFunction as a,cloneDeep as r,isString as d}from"lodash-es";import u from"../../../../annotation-edit/index.js";import{HIGHEST_PRIORITY as c,IHO_TABLE_FIXED_STATUS as f,LOWEST_PRIORITY as m,WIDGET_TYPE as p,InjectionIhoTableAnnotation as h,InjectionIhoTableConfig as b}from"../../constants/index.js";import{defineTablePlugin as v}from"../../hooks/useTablePlugin.js";import{IhoTableStatusHelper as g,IhoTableUtils as x,IhoTableRenderHelper as R}from"../../utils/index.js";import{getDefaultValue as P}from"../rendererPlugins/editableWidgets/selectRendererPlugin/selectUtils.js";function j(){const j="lowCodeFieldAdaptorPlugin";return v({name:j,apply(v){v.fieldHooks.field.tap({name:j,stage:c},((c,m,v)=>{const j=c,w={className:j.bold?"iho-table__boldCell":"",field:j.columnName,showOverflow:"ellipsis",visible:g.notNegative(j.isShow),minWidth:j.colWidth,sortable:g.isPositive(j.isSort),fixed:f[j.isFixed],...j,title:j.alias||j.title};return function(e,r){const c={default:r.slotFn,header:r.headerSlotFn,edit:r.editSlotFn,footer:r.footerSlotFn,...r.slots};if(a(r.checkEditStatus)){const{default:e}=c;a(e)&&(c.default=l=>r.checkEditStatus(l)?e(l):[t("span",null,P(l.row,l.column.editRender.props))])}const f=c.header;c.header=e=>function(e,t,r){var c;const f=l(h),m=l(b),p=l("$xetable"),v=e.column||{},g=n(null==f?void 0:f.value)&&!1!==t.annotation,x=R.isEditableColumn(m.value,v),P=R.hasFilter(t)||R.hasDateFiler(t),j=null==(c=t.titlePrefix)?void 0:c.content,w=d(r)?r:a(r)?r(e):null;let F=!1;if(m.value){const e=m.value.editRules&&m.value.editRules[v.field];e&&(F=o(e).some((e=>e.required)))}const S=m.value.border?Math.max(2,Math.ceil(p.reactData.scrollbarWidth/p.reactData.tableColumn.length)):1,W=s(Math.max(0,v.renderWidth-20-S-(F?14:0)-(g?18:0)-(P?23:0)-(x?22:0)-(j?20:0)-(v.sortable?23:0)));return i("section",{class:"iho-table__headerWrapper"},[i("section",{style:{width:W}},[null!=w?w:i("div",{style:{maxWidth:"100%",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}},[v.title])]),g?i(u,{modelValue:f.value[v.field],"onUpdate:modelValue":e=>f.value[v.field]=e},null):null])}(e,r,f),e.slots=c}(w,j),function(t,l,i){var o,s;const d=r(e(l));d.componentProps={size:"mini"===i.size?"small":i.size,...d.componentProps},i.forceClearable&&(d.componentProps.clearable=!0);t.editRender={name:x.getCellType(l),...t.editRender,props:d},t.editRender.enabled=!Reflect.get(p,t.editRender.name),a(null==(o=t.slots)?void 0:o.default)&&(t.editRender.enabled=t.editRender.enabled&&a(null==(s=t.slots)?void 0:s.edit));if(!n(l.settingObj))return;Reflect.has(l.settingObj,"isHide")&&(t.visible=t.visible&&g.notPositive(l.settingObj.isHide))}(w,j,v),w})),v.fieldHooks.field.tap({name:j+"After",stage:m},(e=>(n(e.slots)&&Object.entries(e.slots).forEach((([t,l])=>{null==l&&Reflect.deleteProperty(e.slots,t)})),e)))}})}export{j as lowCodeFieldAdaptorPlugin};