cnhis-design-vue 3.1.56-release.2 → 3.1.57-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/es/components/audio-sdk/src/audioSDK.js +1 -1
  2. package/es/components/button-print/src/utils/print.d.ts +3 -0
  3. package/es/components/button-print/src/utils/print.js +1 -1
  4. package/es/components/classification/index.d.ts +19 -16
  5. package/es/components/classification/src/components/search-filter/index.vue2.js +1 -1
  6. package/es/components/classification/src/components/set-classification/index.vue.d.ts +0 -15
  7. package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -15
  8. package/es/components/classification/src/components/table-modal/index.vue2.js +1 -1
  9. package/es/components/classification/src/index.vue.d.ts +45 -38
  10. package/es/components/classification/src/index.vue2.js +1 -1
  11. package/es/components/classification/style/index.css +1 -1
  12. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
  13. package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
  14. package/es/components/fabric-chart/src/hooks/electrocardiogram/useMeasureInstrument.js +1 -1
  15. package/es/components/form-config/index.d.ts +9 -7
  16. package/es/components/form-config/src/FormConfig.vue.d.ts +9 -7
  17. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +3 -3
  18. package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +1 -0
  19. package/es/components/form-render/src/components/renderer/switch.d.ts +16 -2
  20. package/es/components/form-render/src/components/renderer/switch.js +1 -1
  21. package/es/components/form-render/src/hooks/useComplexOptions.d.ts +1 -1
  22. package/es/components/form-render/src/hooks/useComplexOptions.js +1 -1
  23. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  24. package/es/components/form-render/src/hooks/useLowCodeReactions.js +1 -1
  25. package/es/components/form-render/src/types/fieldItem.d.ts +3 -8
  26. package/es/components/iho-table/src/constants/index.d.ts +1 -0
  27. package/es/components/iho-table/src/constants/index.js +1 -1
  28. package/es/components/iho-table/src/plugins/index.js +1 -1
  29. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue.d.ts +48 -10
  30. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue2.js +1 -1
  31. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/radioRendererPlugin.js +1 -1
  32. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/switchRendererPlugin.d.ts +1 -0
  33. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/switchRendererPlugin.js +1 -0
  34. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
  35. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -1
  36. package/es/components/iho-table/src/types/index.d.ts +3 -0
  37. package/es/components/index.css +1 -1
  38. package/es/components/shortcut-setter/index.d.ts +1 -1
  39. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -1
  40. package/es/components/table-filter/src/types/index.d.ts +3 -1
  41. package/es/shared/hooks/selectHooks/useSelectRenders.d.ts +1 -1
  42. package/es/shared/hooks/selectHooks/useSelectRenders.js +1 -1
  43. package/es/shared/package.json.js +1 -1
  44. package/es/shared/types/business.d.ts +6 -0
  45. package/package.json +2 -2
@@ -413,7 +413,7 @@ declare const _default: import("vue").DefineComponent<{
413
413
  NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
414
414
  } | undefined;
415
415
  }[] | undefined;
416
- show_mode?: ("DROPDOWN" | "H_TILE" | "V_TILE" | "TILE") | undefined;
416
+ show_mode?: LowCodeTypes.showModeType | undefined;
417
417
  is_allow_check_mid?: import("../../../components/form-render").FormCommonState | undefined;
418
418
  allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
419
419
  prefix?: string | import("../../../shared/types").AnyObject | (() => any) | undefined;
@@ -2163,7 +2163,7 @@ declare const _default: import("vue").DefineComponent<{
2163
2163
  NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
2164
2164
  } | undefined;
2165
2165
  }[] | undefined;
2166
- show_mode?: ("DROPDOWN" | "H_TILE" | "V_TILE" | "TILE") | undefined;
2166
+ show_mode?: LowCodeTypes.showModeType | undefined;
2167
2167
  is_allow_check_mid?: import("../../../components/form-render").FormCommonState | undefined;
2168
2168
  allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
2169
2169
  prefix?: string | import("../../../shared/types").AnyObject | (() => any) | undefined;
@@ -3769,6 +3769,7 @@ declare const _default: import("vue").DefineComponent<{
3769
3769
  NEQ?: ((v1: any, v2: any) => boolean) | undefined;
3770
3770
  NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
3771
3771
  } | undefined;
3772
+ isRestoreDefault?: boolean | undefined;
3772
3773
  sqlExpression?: string | undefined;
3773
3774
  showField?: string[] | undefined;
3774
3775
  hideField?: string[] | undefined;
@@ -3950,7 +3951,7 @@ declare const _default: import("vue").DefineComponent<{
3950
3951
  NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
3951
3952
  } | undefined;
3952
3953
  }[] | undefined;
3953
- show_mode?: ("DROPDOWN" | "H_TILE" | "V_TILE" | "TILE") | undefined;
3954
+ show_mode?: LowCodeTypes.showModeType | undefined;
3954
3955
  is_allow_check_mid?: import("../../../components/form-render").FormCommonState | undefined;
3955
3956
  allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
3956
3957
  prefix?: string | import("../../../shared/types").AnyObject | (() => any) | undefined;
@@ -5700,7 +5701,7 @@ declare const _default: import("vue").DefineComponent<{
5700
5701
  NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
5701
5702
  } | undefined;
5702
5703
  }[] | undefined;
5703
- show_mode?: ("DROPDOWN" | "H_TILE" | "V_TILE" | "TILE") | undefined;
5704
+ show_mode?: LowCodeTypes.showModeType | undefined;
5704
5705
  is_allow_check_mid?: import("../../../components/form-render").FormCommonState | undefined;
5705
5706
  allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
5706
5707
  prefix?: string | import("../../../shared/types").AnyObject | (() => any) | undefined;
@@ -8701,7 +8702,7 @@ declare const _default: import("vue").DefineComponent<{
8701
8702
  NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
8702
8703
  } | undefined;
8703
8704
  }[] | undefined;
8704
- show_mode?: ("DROPDOWN" | "H_TILE" | "V_TILE" | "TILE") | undefined;
8705
+ show_mode?: LowCodeTypes.showModeType | undefined;
8705
8706
  is_allow_check_mid?: import("../../../components/form-render").FormCommonState | undefined;
8706
8707
  allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
8707
8708
  prefix?: string | import("../../../shared/types").AnyObject | (() => any) | undefined;
@@ -10462,7 +10463,7 @@ declare const _default: import("vue").DefineComponent<{
10462
10463
  NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
10463
10464
  } | undefined;
10464
10465
  }[] | undefined;
10465
- show_mode?: ("DROPDOWN" | "H_TILE" | "V_TILE" | "TILE") | undefined;
10466
+ show_mode?: LowCodeTypes.showModeType | undefined;
10466
10467
  is_allow_check_mid?: import("../../../components/form-render").FormCommonState | undefined;
10467
10468
  allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
10468
10469
  prefix?: string | import("../../../shared/types").AnyObject | (() => any) | undefined;
@@ -12196,7 +12197,7 @@ declare const _default: import("vue").DefineComponent<{
12196
12197
  NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
12197
12198
  } | undefined;
12198
12199
  }[] | undefined;
12199
- show_mode?: ("DROPDOWN" | "H_TILE" | "V_TILE" | "TILE") | undefined;
12200
+ show_mode?: LowCodeTypes.showModeType | undefined;
12200
12201
  is_allow_check_mid?: import("../../../components/form-render").FormCommonState | undefined;
12201
12202
  allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
12202
12203
  prefix?: string | import("../../../shared/types").AnyObject | (() => any) | undefined;
@@ -14779,6 +14780,7 @@ declare const _default: import("vue").DefineComponent<{
14779
14780
  NEQ?: ((v1: any, v2: any) => boolean) | undefined;
14780
14781
  NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
14781
14782
  } | undefined;
14783
+ isRestoreDefault?: boolean | undefined;
14782
14784
  sqlExpression?: string | undefined;
14783
14785
  showField?: string[] | undefined;
14784
14786
  hideField?: string[] | undefined;
@@ -362,7 +362,7 @@ declare const _default: import("vue").DefineComponent<{
362
362
  NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
363
363
  } | undefined;
364
364
  }[] | undefined;
365
- show_mode?: ("DROPDOWN" | "H_TILE" | "V_TILE" | "TILE") | undefined;
365
+ show_mode?: import("../../../../shared/types").LowCodeTypes.showModeType | undefined;
366
366
  is_allow_check_mid?: import("../../../../components/form-render").FormCommonState | undefined;
367
367
  allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
368
368
  prefix?: string | import("../../../../shared/types").AnyObject | (() => any) | undefined;
@@ -2123,7 +2123,7 @@ declare const _default: import("vue").DefineComponent<{
2123
2123
  NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
2124
2124
  } | undefined;
2125
2125
  }[] | undefined;
2126
- show_mode?: ("DROPDOWN" | "H_TILE" | "V_TILE" | "TILE") | undefined;
2126
+ show_mode?: import("../../../../shared/types").LowCodeTypes.showModeType | undefined;
2127
2127
  is_allow_check_mid?: import("../../../../components/form-render").FormCommonState | undefined;
2128
2128
  allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
2129
2129
  prefix?: string | import("../../../../shared/types").AnyObject | (() => any) | undefined;
@@ -3857,7 +3857,7 @@ declare const _default: import("vue").DefineComponent<{
3857
3857
  NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
3858
3858
  } | undefined;
3859
3859
  }[] | undefined;
3860
- show_mode?: ("DROPDOWN" | "H_TILE" | "V_TILE" | "TILE") | undefined;
3860
+ show_mode?: import("../../../../shared/types").LowCodeTypes.showModeType | undefined;
3861
3861
  is_allow_check_mid?: import("../../../../components/form-render").FormCommonState | undefined;
3862
3862
  allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
3863
3863
  prefix?: string | import("../../../../shared/types").AnyObject | (() => any) | undefined;
@@ -30,6 +30,7 @@ declare const _default: import("vue").DefineComponent<{
30
30
  NEQ?: ((v1: any, v2: any) => boolean) | undefined;
31
31
  NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
32
32
  } | undefined;
33
+ isRestoreDefault?: boolean | undefined;
33
34
  sqlExpression?: string | undefined;
34
35
  showField?: string[] | undefined;
35
36
  hideField?: string[] | undefined;
@@ -4,20 +4,34 @@ interface Description {
4
4
  describe: string;
5
5
  }
6
6
  export declare const SWITCH: import("vue").DefineComponent<{
7
+ value: {};
7
8
  openDescription: {
8
9
  type: PropType<Description>;
9
10
  };
10
11
  closeDescription: {
11
12
  type: PropType<Description>;
12
13
  };
14
+ showMode: {
15
+ type: PropType<"CHECKBOX" | "SWITCH">;
16
+ default: string;
17
+ };
13
18
  onChange: {};
14
- }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
19
+ }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
20
+ value: {};
15
21
  openDescription: {
16
22
  type: PropType<Description>;
17
23
  };
18
24
  closeDescription: {
19
25
  type: PropType<Description>;
20
26
  };
27
+ showMode: {
28
+ type: PropType<"CHECKBOX" | "SWITCH">;
29
+ default: string;
30
+ };
21
31
  onChange: {};
22
- }>>, {}>;
32
+ }>> & {
33
+ "onUpdate:value"?: ((...args: any[]) => any) | undefined;
34
+ }, {
35
+ showMode: "CHECKBOX" | "SWITCH";
36
+ }>;
23
37
  export {};
@@ -1 +1 @@
1
- import{defineComponent as e,computed as r,createVNode as o,createTextVNode as i}from"vue";import{NSwitch as t}from"naive-ui";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import"date-fns";import{assignUpdateValue as n,assignValueBindKey as l}from"../../utils/schema.js";import{connect as u,mapProps as c}from"@formily/vue";const p=u(e({name:"FormSwitch",props:{openDescription:{type:Object},closeDescription:{type:Object},onChange:{}},setup:e=>()=>{const n=r((()=>{var r,o;return null==(o=null==(r=e.openDescription)?void 0:r.value)||o})),l=r((()=>{var r,o;return null!=(o=null==(r=e.closeDescription)?void 0:r.value)&&o}));return o(t,{checkedValue:n.value,uncheckedValue:l.value},{checked:()=>{var r,o;return i(null!=(o=null==(r=e.openDescription)?void 0:r.describe)?o:"")},unchecked:()=>{var r,o;return i(null!=(o=null==(r=e.closeDescription)?void 0:r.describe)?o:"")}})}}),c(n,l));export{p as SWITCH};
1
+ import{defineComponent as e,computed as o,createVNode as r,createTextVNode as t}from"vue";import{NSwitch as i,NCheckbox as l}from"naive-ui";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import"date-fns";import{assignUpdateValue as u,assignValueBindKey as n}from"../../utils/schema.js";import{connect as a,mapProps as p}from"@formily/vue";const s=a(e({name:"FormSwitch",props:{value:{},openDescription:{type:Object},closeDescription:{type:Object},showMode:{type:String,default:"switch"},onChange:{}},emits:["update:value"],setup(e,{emit:u}){const n=o((()=>{var o,r;return null==(r=null==(o=e.openDescription)?void 0:o.value)||r})),a=o((()=>{var o,r;return null!=(r=null==(o=e.closeDescription)?void 0:o.value)&&r})),p=()=>{var o,r;return t(null!=(r=null==(o=e.openDescription)?void 0:o.describe)?r:"")},s=()=>{var o,r;return t(null!=(r=null==(o=e.closeDescription)?void 0:o.describe)?r:"")},c=o({get:()=>e.value===n.value,set:e=>u("update:value",e?n.value:a.value)});return()=>"SWITCH"===e.showMode?r(i,{value:c.value,"onUpdate:value":e=>c.value=e},{checked:p,unchecked:s}):r(l,{checked:c.value,"onUpdate:checked":e=>c.value=e},{default:p})}}),p(u,n));export{s as SWITCH};
@@ -19,7 +19,7 @@ export declare function useComplexOptions(props: {
19
19
  childWidthMode?: "inner" | "outer" | undefined;
20
20
  renderLabel?: boolean | undefined;
21
21
  attrs?: AnyObject | undefined;
22
- }) => any[];
22
+ }) => (JSX.Element | null)[];
23
23
  valueRef: Ref<any>;
24
24
  hasComplexOption: import("vue").ComputedRef<boolean>;
25
25
  };
@@ -1 +1 @@
1
- import{reactive as e,computed as t,createVNode as r,mergeProps as l,defineComponent as n,inject as o,provide as i,watch as a,onUnmounted as s,onMounted as d,withModifiers as c}from"vue";import{checkInSetupEnv as u}from"../../../../shared/utils/index.js";import{useField as p,useForm as m,RecursionField as h}from"@formily/vue";import{isArray as f,noop as v,isEmpty as y}from"lodash-es";import"../../index.js";import{InjectionFormUUID as g,InjectionBusinessCollector as x}from"../constants/index.js";import{renderDescOption as b}from"../utils/index.js";import{useFieldListAdaptor as F}from"./useFieldListAdaptor.js";import{createObjSchema as S}from"../utils/schema.js";const j=e(new Map);function O(e,t,r=0){j.set(e,j.get(e)||{});j.get(e)[t+""]=r}function M(e,t,r=!0){const l=j.get(e);return l?Object.entries(l).reduce(((e,[l,n])=>r&&l===`${t}`||l.startsWith(`${t}.`)?e+n:e),0):0}function W(e,t){const r=j.get(e);r&&Reflect.deleteProperty(r,t+"")}function $(e){j.delete(e)}const k=n({props:{fieldItems:{type:Array,default:()=>[]},childFieldStrategy:{type:String,default:"checked"},childWidthMode:{type:String,default:"outer"},name:{type:String,required:!0}},setup(e){const n=o(g),u=o(x),f=p(),y=o(n+"_virtualParent",""),b=`${y?y+".":""}${f.value.address}`;function j(e){return`${b}.${e}`}i(n+"_virtualParent",b);const{schemaAdaptor:$}=F(u);function k(t){var r,l,n,o;return Object.assign(t,{"x-decorator-props":{...t["x-decorator-props"],labelPlacement:"left",showFeedback:!1},"x-component-props":{...t["x-component-props"],childFieldStrategy:null!=(l=null==(r=t["x-component-props"])?void 0:r.childFieldStrategy)?l:e.childFieldStrategy,childWidthMode:null!=(o=null==(n=t["x-component-props"])?void 0:n.childWidthMode)?o:e.childWidthMode,size:"small"}})}const E=t((()=>{const t=$(e.fieldItems);return Object.values(t).forEach(k),S(t)}));a(E,(()=>{return e=E.value,void Object.values(e.properties||{}).forEach((e=>{var t;O(n,j(e.name),null==(t=null==e?void 0:e["x-decorator-props"])?void 0:t.span)}));var e}),{immediate:!0});const K=m();function P(){return e.fieldItems.map((e=>K.value.query(e.val_key).take()))}s((()=>{var e;P().forEach((e=>{e&&e.setDisplay("none")})),e=E.value,Object.values(e.properties||{}).forEach((e=>{W(n,j(e.name))}))})),d((()=>{P().forEach((e=>{e&&e.setDisplay("visible")}))}));const _=c(v,["stop"]),I=["onClick","onKeydown","onKeyup","onKeypress"].reduce(((e,t)=>(e[t]=_,e)),{});return()=>{return r("section",l({class:"form-render__labelField",style:{"--column":(e=E.value,Object.values(e.properties||{}).reduce(((e,t)=>e+M(n,j(t.name))),0)),flex:"1"}},I),[r(h,{basePath:".",schema:E.value},null)]);var e}}});function E(e,n){u();const o=t((()=>e.options.some((e=>f(e.childrenFields)&&e.childrenFields.length))));function i(e,t,r="value"){return!y(t.childrenFields)&&(f(e)?e.includes(t[r]):e===t[r])}return{renderComplexOption:function({value:e,option:t,valueKey:n="value",labelKey:a="label",childFieldStrategy:s,childWidthMode:d,renderLabel:c=!0,attrs:u}){return[c?t.desc?b(t[a],t):t[a]:null,o.value&&("all"===s||i(e,t,n))?r(k,l({fieldItems:t.childrenFields,name:t[n],childFieldStrategy:s,childWidthMode:d},u),null):null]},valueRef:n,hasComplexOption:o}}function K(){return{getSpan:M,setSpan:O,deleteSpan:W,clearSpan:$}}export{E as useComplexOptions,K as useComplexOptionsSpan};
1
+ import{reactive as e,computed as t,createVNode as r,mergeProps as n,defineComponent as l,inject as o,provide as i,watch as a,onUnmounted as s,onMounted as d,withModifiers as c}from"vue";import{checkInSetupEnv as u}from"../../../../shared/utils/index.js";import{useField as p,useForm as m,RecursionField as f}from"@formily/vue";import{isArray as h,noop as v,isEmpty as y}from"lodash-es";import"../../index.js";import{InjectionFormUUID as g,InjectionBusinessCollector as x}from"../constants/index.js";import{useFieldListAdaptor as b}from"./useFieldListAdaptor.js";import{createObjSchema as F}from"../utils/schema.js";import{renderDescOption as S}from"../utils/index.js";const j=e(new Map);function O(e,t,r=0){j.set(e,j.get(e)||{});j.get(e)[t+""]=r}function M(e,t,r=!0){const n=j.get(e);return n?Object.entries(n).reduce(((e,[n,l])=>r&&n===`${t}`||n.startsWith(`${t}.`)?e+l:e),0):0}function W(e,t){const r=j.get(e);r&&Reflect.deleteProperty(r,t+"")}function $(e){j.delete(e)}const k=l({props:{fieldItems:{type:Array,default:()=>[]},childFieldStrategy:{type:String,default:"checked"},childWidthMode:{type:String,default:"outer"},name:{type:String,required:!0}},setup(e){const l=o(g),u=o(x),h=p(),y=o(l+"_virtualParent",""),S=`${y?y+".":""}${h.value.address}`;function j(e){return`${S}.${e}`}i(l+"_virtualParent",S);const{schemaAdaptor:$}=b(u);function k(t){var r,n,l,o;return Object.assign(t,{"x-decorator-props":{...t["x-decorator-props"],labelPlacement:"left",showFeedback:!1},"x-component-props":{...t["x-component-props"],childFieldStrategy:null!=(n=null==(r=t["x-component-props"])?void 0:r.childFieldStrategy)?n:e.childFieldStrategy,childWidthMode:null!=(o=null==(l=t["x-component-props"])?void 0:l.childWidthMode)?o:e.childWidthMode,size:"small"}})}const E=t((()=>{const t=$(e.fieldItems);return Object.values(t).forEach(k),F(t)}));a(E,(()=>{return e=E.value,void Object.values(e.properties||{}).forEach((e=>{var t;O(l,j(e.name),null==(t=null==e?void 0:e["x-decorator-props"])?void 0:t.span)}));var e}),{immediate:!0});const K=m();function P(){return e.fieldItems.map((e=>K.value.query(e.val_key).take()))}s((()=>{var e;P().forEach((e=>{e&&e.setDisplay("none")})),e=E.value,Object.values(e.properties||{}).forEach((e=>{W(l,j(e.name))}))})),d((()=>{P().forEach((e=>{e&&e.setDisplay("visible")}))}));const _=c(v,["stop"]),I=["onClick","onKeydown","onKeyup","onKeypress"].reduce(((e,t)=>(e[t]=_,e)),{});return()=>{return r("section",n({class:"form-render__labelField",style:{"--column":(e=E.value,Object.values(e.properties||{}).reduce(((e,t)=>e+M(l,j(t.name))),0)),flex:"1"}},I),[r(f,{basePath:".",schema:E.value},null)]);var e}}});function E(e,l){u();const o=t((()=>e.options.some((e=>h(e.childrenFields)&&e.childrenFields.length))));function i(e,t,r="value"){return!y(t.childrenFields)&&(h(e)?e.includes(t[r]):e===t[r])}return{renderComplexOption:function({value:e,option:t,valueKey:l="value",labelKey:a="label",childFieldStrategy:s,childWidthMode:d,renderLabel:c=!0,attrs:u}){return[function(){var e;const n=null!=(e=t.title)?e:t[a],l=r("span",{title:n},[t[a]]);return c?t.desc?S(l,t):l:null}(),o.value&&("all"===s||i(e,t,l))?r(k,n({fieldItems:t.childrenFields,name:t[l],childFieldStrategy:s,childWidthMode:d},u),null):null]},valueRef:l,hasComplexOption:o}}function K(){return{getSpan:M,setSpan:O,deleteSpan:W,clearSpan:$}}export{E as useComplexOptions,K as useComplexOptionsSpan};
@@ -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{format as l}from"date-fns";import{useFieldNormalize as s}from"./useFieldNormalize.js";import{fieldKeyEscape as a,createLinebarId as p}from"../utils/schema.js";import{useFormValidator as c}from"./useFormValidator.js";import{transformDateFormat as d}from"../utils/business.js";function m(e,o){Object.assign(e["x-component-props"],{...n(o,["wordbook","autograph"])})}function u(e,o){Object.assign(e["x-component-props"],{...n(o,["urlConfig","wordbook"])})}function f(e){return"1"===e||!0===e}function _(_,x){const{createValidatorSchema:h}=c(),g=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,beforeSetValue:null==x?void 0:x.beforeSetValue,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=h(e);return n&&(t["x-validator"]=n),"0"===e.is_null&&(t.required=!0),t},y=e=>{var o,t,r,l,s,a,p,c,d,_,x,h,y,v;const b=g(e);e.urlConfig?u(b,e):e.autograph&&m(b,e);const w=!!e.__multiple,C=f(null!=(t=null==(o=e.componentProps)?void 0:o.allowModify)?t:e.allowModify),A=f(null!=(l=null==(r=e.componentProps)?void 0:r.selectAll)?l:e.selectAll),O=f(null!=(a=null==(s=e.componentProps)?void 0:s.shouldSave)?a:e.save_free_entry),E=f(null!=(c=null==(p=e.componentProps)?void 0:p.allowCreate)?c:e.free_entry),j=null!=(_=null==(d=e.componentProps)?void 0:d.showField)?_:e.show_key,k=null!=(h=null==(x=e.componentProps)?void 0:x.options)?h:e.option,I=null!=(v=i(e.multi_select_value))?v:null==(y=e.componentProps)?void 0:y.maxTagCount;return Object.assign(b["x-component-props"],{multiple:w,options:k,allowModify:C,allowCreate:E||C,shouldSave:O,showField:j,maxTagCount:I,selectAll:A,...n(e,["lazyRequest","requestCache"])}),w&&(b.type="array"),b},v=e=>{var o,t;const n=g(e),i=null!=(t=null==(o=e.componentProps)?void 0:o.selectAll)?t:e.selectAll;return Object.assign(n["x-component-props"],{options:e.option,childFieldStrategy:e.childFieldStrategy,childWidthMode:e.childWidthMode,vertical:e.__vertical,selectAll:"1"===i||!0===i}),e.urlConfig?u(n,e):e.autograph&&m(n,e),n},b=e=>{const t=g(e);return Object.assign(t["x-component-props"],{fieldItem:o(e,["reactions"])}),t},w=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}}),C=new Map([["LINEBAR",w],["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=g(e);return Object.assign(o["x-component-props"],{...n(e,["prefix","suffix"])}),o}],["TEXTAREA",e=>{const o=g(e);return Object.assign(o["x-component-props"],{rows:e.initialize_high||3}),o}],["INPUT_NUMBER",e=>{const o=g(e),{decimal_length:t,validate:n,allowSlash:i}=e;return!0!==i&&"1"!==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,whiteList:e.whiteList,prefix:e.prefix,suffix:e.suffix}),o}],["SELECT",y],["REMOTE_SEARCH",y],["DATE",e=>{const o=g(e);return Object.assign(o["x-component-props"],{valueFormat:e.date_format,type:d(e.date_format),validate:e.validate}),"current"===o.default&&(o.default=l(new Date,e.date_format||"yyyy-MM-dd")),o}],["LEVEL_SEARCH_CASCADER",e=>{const o=g(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=g(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=g(e);return o.type="array","table"===e.displayMode?o["x-component"]="TABLE_COMBINATION":!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",v],["CHECKBOX",v],["SWITCH",e=>{const o=g(e);return Object.assign(o["x-component-props"],{openDescription:e.open,closeDescription:e.close}),o}],["SLIDER",e=>{const o=g(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=g(e);Array.isArray(e.properties)&&r("COMPLEX控件的properties属性已经废弃, 请使用children作为替代, 在之后的版本中properties属性将不再支持");const t=Array.isArray(e.properties||e.children)?k(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}]]),A=e=>{if(e.suffixConfig)return O(e);return(C.get(e.html_type)||b)(e)},O=o=>{if(!o.suffixConfig&&!o.prefixConfig)return A(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=g(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:k(n)}),i},{FieldNormalizeWaterfallHook:E,FieldListNormalizeWaterfallHook:j}=s();function k(o,n={column:9999}){let i=null;return j.call(t(o),n).reduce(((e,o,s)=>{var a;const p=null==(a=(o=E.call(o,n)).validate)?void 0:a.obj_type;return p&&_&&_.collect(p,t(o)),"LINEBAR"===o.html_type?(e[l(o)]=r(w(o),s),i=e[l(o)].properties={}):i?i[l(o)]=r(A(o),s):(i=null,e[l(o)]=r(A(o),s)),e}),{});function r(e,o){return e["x-index"]=o,e}function l(o){return o.suffixConfig?a([o,...e(o.suffixConfig)]):o.val_key}}return{schemaAdaptor:k}}export{_ 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{format as l}from"date-fns";import{useFieldNormalize as s}from"./useFieldNormalize.js";import{fieldKeyEscape as a,createLinebarId as p}from"../utils/schema.js";import{useFormValidator as c}from"./useFormValidator.js";import{transformDateFormat as d}from"../utils/business.js";function m(e,o){Object.assign(e["x-component-props"],{...n(o,["wordbook","autograph"])})}function u(e,o){Object.assign(e["x-component-props"],{...n(o,["urlConfig","wordbook"])})}function f(e){return"1"===e||!0===e}function _(_,x){const{createValidatorSchema:h}=c(),g=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,beforeSetValue:null==x?void 0:x.beforeSetValue,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=h(e);return n&&(t["x-validator"]=n),"0"===e.is_null&&(t.required=!0),t},y=e=>{var o,t,r,l,s,a,p,c,d,_,x,h,y,v;const b=g(e);e.urlConfig?u(b,e):e.autograph&&m(b,e);const w=!!e.__multiple,C=f(null!=(t=null==(o=e.componentProps)?void 0:o.allowModify)?t:e.allowModify),A=f(null!=(l=null==(r=e.componentProps)?void 0:r.selectAll)?l:e.selectAll),O=f(null!=(a=null==(s=e.componentProps)?void 0:s.shouldSave)?a:e.save_free_entry),E=f(null!=(c=null==(p=e.componentProps)?void 0:p.allowCreate)?c:e.free_entry),j=null!=(_=null==(d=e.componentProps)?void 0:d.showField)?_:e.show_key,k=null!=(h=null==(x=e.componentProps)?void 0:x.options)?h:e.option,I=null!=(v=i(e.multi_select_value))?v:null==(y=e.componentProps)?void 0:y.maxTagCount;return Object.assign(b["x-component-props"],{multiple:w,options:k,allowModify:C,allowCreate:E||C,shouldSave:O,showField:j,maxTagCount:I,selectAll:A,...n(e,["lazyRequest","requestCache"])}),w&&(b.type="array"),b},v=e=>{var o,t;const n=g(e),i=null!=(t=null==(o=e.componentProps)?void 0:o.selectAll)?t:e.selectAll;return Object.assign(n["x-component-props"],{options:e.option,childFieldStrategy:e.childFieldStrategy,childWidthMode:e.childWidthMode,vertical:e.__vertical,selectAll:"1"===i||!0===i}),e.urlConfig?u(n,e):e.autograph&&m(n,e),n},b=e=>{const t=g(e);return Object.assign(t["x-component-props"],{fieldItem:o(e,["reactions"])}),t},w=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}}),C=new Map([["LINEBAR",w],["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=g(e);return Object.assign(o["x-component-props"],{...n(e,["prefix","suffix"])}),o}],["TEXTAREA",e=>{const o=g(e);return Object.assign(o["x-component-props"],{rows:e.initialize_high||3}),o}],["INPUT_NUMBER",e=>{const o=g(e),{decimal_length:t,validate:n,allowSlash:i}=e;return!0!==i&&"1"!==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,whiteList:e.whiteList,prefix:e.prefix,suffix:e.suffix}),o}],["SELECT",y],["REMOTE_SEARCH",y],["DATE",e=>{const o=g(e);return Object.assign(o["x-component-props"],{valueFormat:e.date_format,type:d(e.date_format),validate:e.validate}),"current"===o.default&&(o.default=l(new Date,e.date_format||"yyyy-MM-dd")),o}],["LEVEL_SEARCH_CASCADER",e=>{const o=g(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=g(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=g(e);return o.type="array","table"===e.displayMode?o["x-component"]="TABLE_COMBINATION":!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",v],["CHECKBOX",v],["SWITCH",e=>{const o=g(e);return Object.assign(o["x-component-props"],{openDescription:e.open,closeDescription:e.close,showMode:e.show_mode}),o}],["SLIDER",e=>{const o=g(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=g(e);Array.isArray(e.properties)&&r("COMPLEX控件的properties属性已经废弃, 请使用children作为替代, 在之后的版本中properties属性将不再支持");const t=Array.isArray(e.properties||e.children)?k(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}]]),A=e=>{if(e.suffixConfig)return O(e);return(C.get(e.html_type)||b)(e)},O=o=>{if(!o.suffixConfig&&!o.prefixConfig)return A(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=g(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:k(n)}),i},{FieldNormalizeWaterfallHook:E,FieldListNormalizeWaterfallHook:j}=s();function k(o,n={column:9999}){let i=null;return j.call(t(o),n).reduce(((e,o,s)=>{var a;const p=null==(a=(o=E.call(o,n)).validate)?void 0:a.obj_type;return p&&_&&_.collect(p,t(o)),"LINEBAR"===o.html_type?(e[l(o)]=r(w(o),s),i=e[l(o)].properties={}):i?i[l(o)]=r(A(o),s):(i=null,e[l(o)]=r(A(o),s)),e}),{});function r(e,o){return e["x-index"]=o,e}function l(o){return o.suffixConfig?a([o,...e(o.suffixConfig)]):o.val_key}}return{schemaAdaptor:k}}export{_ as useFieldListAdaptor};
@@ -1 +1 @@
1
- import"../../../../shared/utils/index.js";import{isField as e}from"@formily/core";import{isArray as o}from"lodash-es";import{computed as r,unref as i}from"vue";import{isMatchLowCodeConditionsWithSqlExpression as t}from"../../../../shared/utils/business.js";function n(n,s){const l={hideField:c((e=>e.setDisplay("none"))),showField:c((e=>e.setDisplay("visible"))),requiredField:c((e=>e.required=!0)),notRequiredField:c((e=>{e.required=!1,e.validate()})),enabledField:c((e=>e.editable=!0)),disabledField:c((e=>e.editable=!1))};function c(o){return r=>{r.forEach((r=>{const i=s.query(r).take();i&&e(i)&&o(i)}))}}const d=r((()=>i(n)?i(n).reduce(((e,r)=>(o(r.conObj)&&r.conObj.forEach((o=>e.push(o.field_key))),e)),[]):[]));function a(e){Object.entries(e).forEach((([e,o])=>l[e]&&l[e](o)))}return{lowCodeReactionsHandler:function(e){const o=i(n);if(!o||!d.value.includes(e))return;const r=s.getFormState().values;o.forEach((o=>{(function(e,o){return!!o.conObj&&o.conObj.some((o=>o.field_key===e))})(e,o)&&t(r,o)&&a(o)}))},triggerAllReactionsHandler:function(){const e=i(n);if(!e)return;const o=s.getFormState().values;e.forEach((e=>{t(o,e)&&a(e)}))}}}export{n as useLowCodeReactions};
1
+ import"../../../../shared/utils/index.js";import{isField as e}from"@formily/core";import{isArray as i}from"lodash-es";import{computed as t,unref as r}from"vue";import{isMatchLowCodeConditionsWithSqlExpression as o}from"../../../../shared/utils/business.js";function n(n,l){const s={hideField:a(((e,i)=>{var t;i.isRestoreDefault?(e.value=null!=(t=e.initialValue)?t:null,e.setDisplay("hidden")):e.setDisplay("none")})),showField:a((e=>e.setDisplay("visible"))),requiredField:a((e=>e.required=!0)),notRequiredField:a((e=>{e.required=!1,e.validate()})),enabledField:a((e=>e.editable=!0)),disabledField:a((e=>e.editable=!1))};function a(i){return(t,r)=>{t.forEach((t=>{const o=l.query(t).take();o&&e(o)&&i(o,r)}))}}const u=t((()=>r(n)?r(n).reduce(((e,t)=>(i(t.conObj)&&t.conObj.forEach((i=>e.push(i.field_key))),e)),[]):[]));function d(e){Object.entries(e).forEach((([i,t])=>s[i]&&s[i](t,e)))}return{lowCodeReactionsHandler:function(e){const i=r(n);if(!i||!u.value.includes(e))return;const t=l.getFormState().values;i.forEach((i=>{(function(e,i){return!!i.conObj&&i.conObj.some((i=>i.field_key===e))})(e,i)&&o(t,i)&&d(i)}))},triggerAllReactionsHandler:function(){const e=r(n);if(!e)return;const i=l.getFormState().values;e.forEach((e=>{o(i,e)&&d(e)}))}}}export{n as useLowCodeReactions};
@@ -6,7 +6,6 @@ import { DependKeyType, FormCommonState } from '../../../../components/form-rend
6
6
  declare type FieldBusinessType = 'password' | 'id_card' | 'age' | 'age_unit' | 'mobile' | 'telephone' | 'email' | 'sex' | 'birthday' | 'bank_card' | 'website' | 'gestational_weeks' | 'gestational_stage' | 'customer_name';
7
7
  declare type HtmlType = 'INPUT' | 'TEXTAREA' | 'SELECT' | 'LINEBAR' | 'LINE_BREAKS' | 'INPUT_NUMBER' | 'REMOTE_SEARCH' | 'DATE' | 'LEVEL_SEARCH_CASCADER' | 'SEARCH_CASCADER' | 'COMBINATION' | 'RADIO' | 'CHECKBOX' | 'SWITCH' | 'SLIDER' | 'COMPLEX' | 'SEARCH' | 'PHONE_TYPE' | 'IDCARD_TYPE' | 'SEARCH_MORE' | 'DIGITAL' | 'CHECKBOX_BLOCK' | 'RADIO_BLOCK' | 'DATE-INPUT' | 'DATETIME-INPUT' | 'SWITCH_COMPONENT' | 'SLIDER_COMPONENT' | 'LEVEL_SEARCH_CASCADE' | 'SEARCH_CASCADE' | ({} & string);
8
8
  declare type ValidateType = 'mobile' | 'integer' | 'number' | 'id_card' | 'regular' | string;
9
- declare type ShowModeType = 'DROPDOWN' | 'H_TILE' | 'V_TILE' | 'TILE';
10
9
  export declare type ValidateItem = Partial<{
11
10
  /**
12
11
  * 业务类型
@@ -57,10 +56,6 @@ export declare type UrlConfig = {
57
56
  dependKey: DependKeyType;
58
57
  [key: string]: any;
59
58
  }>;
60
- interface SwitchProperty {
61
- value?: any;
62
- describe?: string;
63
- }
64
59
  interface ReactionType {
65
60
  dependencies?: string[];
66
61
  target?: string;
@@ -106,8 +101,8 @@ export declare type FieldItem = {
106
101
  * 2.用于SEARCH控件提供字段信息
107
102
  */
108
103
  wordbook: LowCodeTypes.wordbook;
109
- open: SwitchProperty;
110
- close: SwitchProperty;
104
+ open: LowCodeTypes.switchProperty;
105
+ close: LowCodeTypes.switchProperty;
111
106
  date_format: string;
112
107
  step_length: string | number;
113
108
  urlConfig: UrlConfig;
@@ -122,7 +117,7 @@ export declare type FieldItem = {
122
117
  save_free_entry: FormCommonState;
123
118
  initialize_high: number;
124
119
  bindEventSetting: LowCodeTypes.BindEventSettingItem[];
125
- show_mode: ShowModeType;
120
+ show_mode: LowCodeTypes.showModeType;
126
121
  is_allow_check_mid: FormCommonState;
127
122
  allow_check_mid_level: '1' | '2' | '3' | '4';
128
123
  prefix: string | AnyObject | (() => any);
@@ -53,6 +53,7 @@ export declare enum EDITABLE_WIDGET_TYPE {
53
53
  TIME = "TIME",
54
54
  NUMBER = "NUMBER",
55
55
  RADIO = "RADIO",
56
+ SWITCH = "SWITCH",
56
57
  LEVEL_SEARCH_CASCADE = "LEVEL_SEARCH_CASCADE"
57
58
  }
58
59
  export declare enum IHO_TABLE_NUMBER_STATUS {
@@ -1 +1 @@
1
- import{eventListener2EventName as e}from"../utils/index.js";var o=(e=>(e.DEFAULT="DEFAULT",e.PICTURE="PICTURE",e.FILE="FILE",e.MONEY="MONEY",e.HEADPORTRAIT="HEADPORTRAIT",e.LABEL="LABEL",e.TELEPHONE="TELEPHONE",e.BIRTHDAY="BIRTHDAY",e.MULTISELECT="MULTISELECT",e.CASCADE="CASCADE",e.SEARCH_TREE="SEARCH_TREE",e.COLOR="COLOR",e.EVALUATE="EVALUATE",e.MAP="MAP",e.VIDEO="VIDEO",e.SYSTEMFIELDS="SYSTEMFIELDS",e.PERCENTAGE="PERCENTAGE",e.HTML="HTML",e.CANDIDATE_COMPONENTS="CANDIDATE_COMPONENTS",e.TASKDATE="TASKDATE",e.AGE="AGE",e.STATUS="STATUS",e.WEBSITE="WEBSITE",e.IDCARD="IDCARD",e.COUNTDOWN="COUNTDOWN",e.DURATION="DURATION",e.COMBINATION="COMBINATION",e.PASSWORD="PASSWORD",e.QR_CODE="QR_CODE",e.CUSTOMER_NAME="CUSTOMER_NAME",e.BANK_CARD="BANK_CARD",e.SEQUENCE="SEQUENCE",e))(o||{});const n=Object.freeze(["onKeydownStart","onKeydown","onKeydownEnd","onPaste","onCopy","onCut","onCurrentChange","onRadioChange","onCheckboxChange","onCheckboxAll","onCheckboxRangeStart","onCheckboxRangeChange","onCheckboxRangeEnd","onCellClick","onCellDblclick","onCellMenu","onCellMouseenter","onCellMouseleave","onHeaderCellClick","onHeaderCellDblclick","onHeaderCellMenu","onFooterCellClick","onFooterCellDblclick","onFooterCellMenu","onSortChange","onFilterChange","onFilterVisible","onResizableChange","onToggleRowExpand","onToggleTreeExpand","onMenuClick","onEditClosed","onEditActived","onEditDisabled","onValidError","onScroll","onCustom","onOpenFnr","onFnrChange","onFnrFind","onFnrFindAll","onFnrReplace","onFnrReplaceAll","onCellAreaCopy","onCellAreaCut","onCellAreaPaste","onCellAreaMerge","onClearCellAreaMerge","onHeaderCellAreaSelection","onCellAreaSelectionStart","onCellAreaSelectionDrag","onCellAreaSelectionEnd","onCellAreaExtensionStart","onCellAreaExtensionDrag","onCellAreaExtensionEnd","onCellAreaArrowsStart","onCellAreaArrowsEnd","onActiveCellChangeStart","onActiveCellChangeEnd","onPageChange"]),E=n.map(e),l=Object.freeze(["firstRowGroup","secondRowGroup","thirdRowGroup","fourthRowGroup","fifthRowGroup","sixthRowGroup","seventhRowGroup","eighthRowGroup","ninthRowGroup","tenthRowGroup"]),C=-1/0,A=1/0;var T=(e=>(e.INPUT="INPUT",e.SEPARATE="SEPARATE",e.SELECT="SELECT",e.SELECT_MORE="SELECT_MORE",e.DATE="DATE",e.TIME="TIME",e.NUMBER="NUMBER",e.RADIO="RADIO",e.LEVEL_SEARCH_CASCADE="LEVEL_SEARCH_CASCADE",e))(T||{}),r=(e=>(e[e.NEGATIVE=0]="NEGATIVE",e[e.POSITIVE=1]="POSITIVE",e))(r||{}),t=(e=>(e.NEGATIVE="0",e.POSITIVE="1",e))(t||{}),a=(e=>(e.NOT_TREE="0",e.UNKNOWN="1",e.TRANSFORM_TREE_TYPE="2",e.TRANSFORM_WITH_SPAN_METHOD="3",e))(a||{}),S=(e=>(e[e.left=1]="left",e[e.right=2]="right",e))(S||{});const R=["formChange","settingClick","formClick","keyboard","rowDrag"],i=[...R,...E],I=Symbol("injectionIhoTableConfig"),D=Symbol("injectionIhoTableFieldList"),O=Symbol("InjectionIhoTableEmits"),c=Symbol("InjectionIhoTableAnnotation"),N=Symbol("InjectionIhoTableUUID"),h=Symbol("InjectionIhoTableInstance"),M=Symbol("InjectionIhoTableHandler"),b=Symbol("InjectionIhoTableEventListener"),L=Symbol("InjectionTableAsyncQueue");export{T as EDITABLE_WIDGET_TYPE,C as HIGHEST_PRIORITY,S as IHO_TABLE_FIXED_STATUS,r as IHO_TABLE_NUMBER_STATUS,t as IHO_TABLE_STRING_STATUS,a as IHO_TABLE_TREE_TYPE,R as IhoTableCustomEventNameTuple,i as IhoTableEventNameTuple,l as IhoTableRowGroupSequence,c as InjectionIhoTableAnnotation,I as InjectionIhoTableConfig,O as InjectionIhoTableEmits,b as InjectionIhoTableEventListener,D as InjectionIhoTableFieldList,M as InjectionIhoTableHandler,h as InjectionIhoTableInstance,N as InjectionIhoTableUUID,L as InjectionTableAsyncQueue,A as LOWEST_PRIORITY,n as VxeEventListenerNameList,E as VxeTableEventNameList,o as WIDGET_TYPE};
1
+ import{eventListener2EventName as e}from"../utils/index.js";var o=(e=>(e.DEFAULT="DEFAULT",e.PICTURE="PICTURE",e.FILE="FILE",e.MONEY="MONEY",e.HEADPORTRAIT="HEADPORTRAIT",e.LABEL="LABEL",e.TELEPHONE="TELEPHONE",e.BIRTHDAY="BIRTHDAY",e.MULTISELECT="MULTISELECT",e.CASCADE="CASCADE",e.SEARCH_TREE="SEARCH_TREE",e.COLOR="COLOR",e.EVALUATE="EVALUATE",e.MAP="MAP",e.VIDEO="VIDEO",e.SYSTEMFIELDS="SYSTEMFIELDS",e.PERCENTAGE="PERCENTAGE",e.HTML="HTML",e.CANDIDATE_COMPONENTS="CANDIDATE_COMPONENTS",e.TASKDATE="TASKDATE",e.AGE="AGE",e.STATUS="STATUS",e.WEBSITE="WEBSITE",e.IDCARD="IDCARD",e.COUNTDOWN="COUNTDOWN",e.DURATION="DURATION",e.COMBINATION="COMBINATION",e.PASSWORD="PASSWORD",e.QR_CODE="QR_CODE",e.CUSTOMER_NAME="CUSTOMER_NAME",e.BANK_CARD="BANK_CARD",e.SEQUENCE="SEQUENCE",e))(o||{});const n=Object.freeze(["onKeydownStart","onKeydown","onKeydownEnd","onPaste","onCopy","onCut","onCurrentChange","onRadioChange","onCheckboxChange","onCheckboxAll","onCheckboxRangeStart","onCheckboxRangeChange","onCheckboxRangeEnd","onCellClick","onCellDblclick","onCellMenu","onCellMouseenter","onCellMouseleave","onHeaderCellClick","onHeaderCellDblclick","onHeaderCellMenu","onFooterCellClick","onFooterCellDblclick","onFooterCellMenu","onSortChange","onFilterChange","onFilterVisible","onResizableChange","onToggleRowExpand","onToggleTreeExpand","onMenuClick","onEditClosed","onEditActived","onEditDisabled","onValidError","onScroll","onCustom","onOpenFnr","onFnrChange","onFnrFind","onFnrFindAll","onFnrReplace","onFnrReplaceAll","onCellAreaCopy","onCellAreaCut","onCellAreaPaste","onCellAreaMerge","onClearCellAreaMerge","onHeaderCellAreaSelection","onCellAreaSelectionStart","onCellAreaSelectionDrag","onCellAreaSelectionEnd","onCellAreaExtensionStart","onCellAreaExtensionDrag","onCellAreaExtensionEnd","onCellAreaArrowsStart","onCellAreaArrowsEnd","onActiveCellChangeStart","onActiveCellChangeEnd","onPageChange"]),E=n.map(e),l=Object.freeze(["firstRowGroup","secondRowGroup","thirdRowGroup","fourthRowGroup","fifthRowGroup","sixthRowGroup","seventhRowGroup","eighthRowGroup","ninthRowGroup","tenthRowGroup"]),C=-1/0,A=1/0;var T=(e=>(e.INPUT="INPUT",e.SEPARATE="SEPARATE",e.SELECT="SELECT",e.SELECT_MORE="SELECT_MORE",e.DATE="DATE",e.TIME="TIME",e.NUMBER="NUMBER",e.RADIO="RADIO",e.SWITCH="SWITCH",e.LEVEL_SEARCH_CASCADE="LEVEL_SEARCH_CASCADE",e))(T||{}),r=(e=>(e[e.NEGATIVE=0]="NEGATIVE",e[e.POSITIVE=1]="POSITIVE",e))(r||{}),t=(e=>(e.NEGATIVE="0",e.POSITIVE="1",e))(t||{}),a=(e=>(e.NOT_TREE="0",e.UNKNOWN="1",e.TRANSFORM_TREE_TYPE="2",e.TRANSFORM_WITH_SPAN_METHOD="3",e))(a||{}),S=(e=>(e[e.left=1]="left",e[e.right=2]="right",e))(S||{});const R=["formChange","settingClick","formClick","keyboard","rowDrag"],i=[...R,...E],I=Symbol("injectionIhoTableConfig"),D=Symbol("injectionIhoTableFieldList"),O=Symbol("InjectionIhoTableEmits"),c=Symbol("InjectionIhoTableAnnotation"),N=Symbol("InjectionIhoTableUUID"),h=Symbol("InjectionIhoTableInstance"),M=Symbol("InjectionIhoTableHandler"),b=Symbol("InjectionIhoTableEventListener"),L=Symbol("InjectionTableAsyncQueue");export{T as EDITABLE_WIDGET_TYPE,C as HIGHEST_PRIORITY,S as IHO_TABLE_FIXED_STATUS,r as IHO_TABLE_NUMBER_STATUS,t as IHO_TABLE_STRING_STATUS,a as IHO_TABLE_TREE_TYPE,R as IhoTableCustomEventNameTuple,i as IhoTableEventNameTuple,l as IhoTableRowGroupSequence,c as InjectionIhoTableAnnotation,I as InjectionIhoTableConfig,O as InjectionIhoTableEmits,b as InjectionIhoTableEventListener,D as InjectionIhoTableFieldList,M as InjectionIhoTableHandler,h as InjectionIhoTableInstance,N as InjectionIhoTableUUID,L as InjectionTableAsyncQueue,A as LOWEST_PRIORITY,n as VxeEventListenerNameList,E as VxeTableEventNameList,o as WIDGET_TYPE};
@@ -1 +1 @@
1
- import*as e from"./anchorPlugin/index.js";import*as r from"./bindEventSettingPlugin/index.js";import*as i from"./colorAndIconPlugin.js";import*as n from"./copyPastePlugin.js";import*as s from"./defaultConfigPlugin/index.js";import*as t from"./defaultValuePlugin.js";import*as d from"./filterDaterangeRenderPlugin/index.js";import*as l from"./filterRenderPlugin/index.js";import*as g from"./filterVisibleEventPlugin.js";import*as o from"./forceArrowKeyPlugin.js";import*as u from"./headerPlugin.js";import*as a from"./highLightSetPlugin.js";import*as P from"./keyboardEventPlugin/index.js";import*as m from"./lowCodeFieldAdaptorPlugin/index.js";import*as x from"./maxCheckSizePlugin.js";import*as f from"./operationalFormPlugin/index.js";import*as p from"./rendererPlugins/editableWidgets/dateRendererPlugin/index.js";import*as j from"./rendererPlugins/editableWidgets/inputRendererPlugin.js";import*as R from"./rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js";import*as b from"./rendererPlugins/editableWidgets/numberRendererPlugin.js";import*as c from"./rendererPlugins/editableWidgets/radioRendererPlugin.js";import*as w from"./rendererPlugins/editableWidgets/selectRendererPlugin/index.js";import*as h from"./rendererPlugins/editableWidgets/separateRendererPlugin/index.js";import*as W from"./rendererPlugins/editableWidgets/timeRendererPlugin/index.js";import*as v from"./rendererPlugins/widgets/checkRendererPlugin.js";import*as S from"./rendererPlugins/widgets/colorRendererPlugin.js";import*as k from"./rendererPlugins/widgets/defaultRendererPlugin.js";import*as C from"./rendererPlugins/widgets/htmlRendererPlugin.js";import*as y from"./rendererPlugins/widgets/labelRendererPlugin.js";import*as A from"./rendererPlugins/widgets/pictureRendererPlugin.js";import*as E from"./rendererPlugins/widgets/seqRendererPlugin.js";import*as D from"./rowClickPlugin/index.js";import*as F from"./rowDragPlugin/index.js";import*as V from"./rowGroupSettingPlugin/index.js";import*as q from"./varialbleHeightPlugin/index.js";import*as z from"./virtualTreePlugin/index.js";import*as G from"./wordbookSettingPlugin.js";import{separateMetaModule as H}from"../../../../shared/utils/index.js";var I=H(Object.assign({"./anchorPlugin/index.tsx":e,"./bindEventSettingPlugin/index.ts":r,"./colorAndIconPlugin.ts":i,"./copyPastePlugin.ts":n,"./defaultConfigPlugin/index.ts":s,"./defaultValuePlugin.ts":t,"./filterDaterangeRenderPlugin/index.tsx":d,"./filterRenderPlugin/index.tsx":l,"./filterVisibleEventPlugin.ts":g,"./forceArrowKeyPlugin.ts":o,"./headerPlugin.tsx":u,"./highLightSetPlugin.tsx":a,"./keyboardEventPlugin/index.ts":P,"./lowCodeFieldAdaptorPlugin/index.tsx":m,"./maxCheckSizePlugin.ts":x,"./operationalFormPlugin/index.ts":f,"./rendererPlugins/editableWidgets/dateRendererPlugin/index.tsx":p,"./rendererPlugins/editableWidgets/inputRendererPlugin.tsx":j,"./rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.tsx":R,"./rendererPlugins/editableWidgets/numberRendererPlugin.tsx":b,"./rendererPlugins/editableWidgets/radioRendererPlugin.tsx":c,"./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx":w,"./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx":h,"./rendererPlugins/editableWidgets/timeRendererPlugin/index.tsx":W,"./rendererPlugins/widgets/checkRendererPlugin.tsx":v,"./rendererPlugins/widgets/colorRendererPlugin.tsx":S,"./rendererPlugins/widgets/defaultRendererPlugin.tsx":k,"./rendererPlugins/widgets/htmlRendererPlugin.tsx":C,"./rendererPlugins/widgets/labelRendererPlugin.tsx":y,"./rendererPlugins/widgets/pictureRendererPlugin.tsx":A,"./rendererPlugins/widgets/seqRendererPlugin.tsx":E,"./rowClickPlugin/index.ts":D,"./rowDragPlugin/index.ts":F,"./rowGroupSettingPlugin/index.ts":V,"./varialbleHeightPlugin/index.tsx":q,"./virtualTreePlugin/index.ts":z,"./wordbookSettingPlugin.ts":G}));export{I as default};
1
+ import*as e from"./anchorPlugin/index.js";import*as r from"./bindEventSettingPlugin/index.js";import*as i from"./colorAndIconPlugin.js";import*as n from"./copyPastePlugin.js";import*as s from"./defaultConfigPlugin/index.js";import*as t from"./defaultValuePlugin.js";import*as d from"./filterDaterangeRenderPlugin/index.js";import*as l from"./filterRenderPlugin/index.js";import*as g from"./filterVisibleEventPlugin.js";import*as o from"./forceArrowKeyPlugin.js";import*as u from"./headerPlugin.js";import*as a from"./highLightSetPlugin.js";import*as P from"./keyboardEventPlugin/index.js";import*as m from"./lowCodeFieldAdaptorPlugin/index.js";import*as x from"./maxCheckSizePlugin.js";import*as f from"./operationalFormPlugin/index.js";import*as p from"./rendererPlugins/editableWidgets/dateRendererPlugin/index.js";import*as j from"./rendererPlugins/editableWidgets/inputRendererPlugin.js";import*as R from"./rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.js";import*as b from"./rendererPlugins/editableWidgets/numberRendererPlugin.js";import*as c from"./rendererPlugins/editableWidgets/radioRendererPlugin.js";import*as w from"./rendererPlugins/editableWidgets/selectRendererPlugin/index.js";import*as h from"./rendererPlugins/editableWidgets/separateRendererPlugin/index.js";import*as W from"./rendererPlugins/editableWidgets/switchRendererPlugin.js";import*as v from"./rendererPlugins/editableWidgets/timeRendererPlugin/index.js";import*as S from"./rendererPlugins/widgets/checkRendererPlugin.js";import*as k from"./rendererPlugins/widgets/colorRendererPlugin.js";import*as C from"./rendererPlugins/widgets/defaultRendererPlugin.js";import*as y from"./rendererPlugins/widgets/htmlRendererPlugin.js";import*as A from"./rendererPlugins/widgets/labelRendererPlugin.js";import*as E from"./rendererPlugins/widgets/pictureRendererPlugin.js";import*as D from"./rendererPlugins/widgets/seqRendererPlugin.js";import*as F from"./rowClickPlugin/index.js";import*as V from"./rowDragPlugin/index.js";import*as q from"./rowGroupSettingPlugin/index.js";import*as z from"./varialbleHeightPlugin/index.js";import*as G from"./virtualTreePlugin/index.js";import*as H from"./wordbookSettingPlugin.js";import{separateMetaModule as I}from"../../../../shared/utils/index.js";var K=I(Object.assign({"./anchorPlugin/index.tsx":e,"./bindEventSettingPlugin/index.ts":r,"./colorAndIconPlugin.ts":i,"./copyPastePlugin.ts":n,"./defaultConfigPlugin/index.ts":s,"./defaultValuePlugin.ts":t,"./filterDaterangeRenderPlugin/index.tsx":d,"./filterRenderPlugin/index.tsx":l,"./filterVisibleEventPlugin.ts":g,"./forceArrowKeyPlugin.ts":o,"./headerPlugin.tsx":u,"./highLightSetPlugin.tsx":a,"./keyboardEventPlugin/index.ts":P,"./lowCodeFieldAdaptorPlugin/index.tsx":m,"./maxCheckSizePlugin.ts":x,"./operationalFormPlugin/index.ts":f,"./rendererPlugins/editableWidgets/dateRendererPlugin/index.tsx":p,"./rendererPlugins/editableWidgets/inputRendererPlugin.tsx":j,"./rendererPlugins/editableWidgets/levelSearchCascadePlugin/index.tsx":R,"./rendererPlugins/editableWidgets/numberRendererPlugin.tsx":b,"./rendererPlugins/editableWidgets/radioRendererPlugin.tsx":c,"./rendererPlugins/editableWidgets/selectRendererPlugin/index.tsx":w,"./rendererPlugins/editableWidgets/separateRendererPlugin/index.tsx":h,"./rendererPlugins/editableWidgets/switchRendererPlugin.tsx":W,"./rendererPlugins/editableWidgets/timeRendererPlugin/index.tsx":v,"./rendererPlugins/widgets/checkRendererPlugin.tsx":S,"./rendererPlugins/widgets/colorRendererPlugin.tsx":k,"./rendererPlugins/widgets/defaultRendererPlugin.tsx":C,"./rendererPlugins/widgets/htmlRendererPlugin.tsx":y,"./rendererPlugins/widgets/labelRendererPlugin.tsx":A,"./rendererPlugins/widgets/pictureRendererPlugin.tsx":E,"./rendererPlugins/widgets/seqRendererPlugin.tsx":D,"./rowClickPlugin/index.ts":F,"./rowDragPlugin/index.ts":V,"./rowGroupSettingPlugin/index.ts":q,"./varialbleHeightPlugin/index.tsx":z,"./virtualTreePlugin/index.ts":G,"./wordbookSettingPlugin.ts":H}));export{K as default};
@@ -4,7 +4,7 @@ import { VxeTableConstructor, VxeTableDefines, VxeTableMethods, VxeTablePrivateM
4
4
  declare const _default: import("vue").DefineComponent<{
5
5
  value: {
6
6
  type: StringConstructor;
7
- default: undefined;
7
+ default: null;
8
8
  };
9
9
  column: {
10
10
  type: PropType<VxeTableDefines.ColumnInfo>;
@@ -18,12 +18,24 @@ declare const _default: import("vue").DefineComponent<{
18
18
  type: NumberConstructor;
19
19
  required: true;
20
20
  };
21
+ isStartDate: {
22
+ type: BooleanConstructor;
23
+ default: boolean;
24
+ };
25
+ isEndDate: {
26
+ type: BooleanConstructor;
27
+ default: boolean;
28
+ };
29
+ connectField: {
30
+ type: StringConstructor;
31
+ default: string;
32
+ };
21
33
  }, {
22
34
  attr: AnyObject;
23
35
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
24
36
  value: {
25
37
  type: StringConstructor;
26
- default: undefined;
38
+ default: null;
27
39
  };
28
40
  column: {
29
41
  type: PropType<VxeTableDefines.ColumnInfo>;
@@ -37,6 +49,18 @@ declare const _default: import("vue").DefineComponent<{
37
49
  type: NumberConstructor;
38
50
  required: true;
39
51
  };
52
+ isStartDate: {
53
+ type: BooleanConstructor;
54
+ default: boolean;
55
+ };
56
+ isEndDate: {
57
+ type: BooleanConstructor;
58
+ default: boolean;
59
+ };
60
+ connectField: {
61
+ type: StringConstructor;
62
+ default: string;
63
+ };
40
64
  }>> & {
41
65
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
42
66
  }>>;
@@ -45,16 +69,16 @@ declare const _default: import("vue").DefineComponent<{
45
69
  emit: (event: "update:value", ...args: any[]) => void;
46
70
  formRef: import("vue").Ref<any>;
47
71
  formattedValue: import("vue").WritableComputedRef<string | null | undefined>;
48
- formatConfig: import("vue").ComputedRef<{
49
- valueFormat: string;
50
- format: string;
72
+ dateConfig: import("vue").ComputedRef<{
51
73
  timePickerProps: {
52
74
  format: string | undefined;
53
75
  };
76
+ isDateDisabled: (ts: number) => any;
77
+ isTimeDisabled: ((ts: number) => any) | undefined;
78
+ type: any;
79
+ clearable: boolean;
80
+ allowedInvalidValue: string;
54
81
  }>;
55
- isStartDate: any;
56
- isEndDate: any;
57
- connectField: string;
58
82
  setDateDisabled: (cur: number, date: number) => boolean;
59
83
  isDateDisabled: (ts: number) => boolean;
60
84
  isTimeDisabled: (ts: number) => {
@@ -62,7 +86,6 @@ declare const _default: import("vue").DefineComponent<{
62
86
  isMinuteDisabled: (minute: number) => boolean;
63
87
  isSecondDisabled: (second: number) => boolean;
64
88
  };
65
- dateConfig: AnyObject;
66
89
  customDateDisabledDecorator: (customDateDisabled?: AnyFn) => ((ts: number) => any) | null;
67
90
  getDetailTime: (date: Date) => {
68
91
  h: number;
@@ -147,7 +170,7 @@ declare const _default: import("vue").DefineComponent<{
147
170
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
148
171
  value: {
149
172
  type: StringConstructor;
150
- default: undefined;
173
+ default: null;
151
174
  };
152
175
  column: {
153
176
  type: PropType<VxeTableDefines.ColumnInfo>;
@@ -161,9 +184,24 @@ declare const _default: import("vue").DefineComponent<{
161
184
  type: NumberConstructor;
162
185
  required: true;
163
186
  };
187
+ isStartDate: {
188
+ type: BooleanConstructor;
189
+ default: boolean;
190
+ };
191
+ isEndDate: {
192
+ type: BooleanConstructor;
193
+ default: boolean;
194
+ };
195
+ connectField: {
196
+ type: StringConstructor;
197
+ default: string;
198
+ };
164
199
  }>> & {
165
200
  "onUpdate:value"?: ((...args: any[]) => any) | undefined;
166
201
  }, {
167
202
  value: string;
203
+ connectField: string;
204
+ isStartDate: boolean;
205
+ isEndDate: boolean;
168
206
  }>;
169
207
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as t,inject as r,ref as a,computed as i,openBlock as o,createBlock as s,unref as n,mergeProps as l,isRef as u}from"vue";import{generateTimeFormat as m}from"../../../../../../../shared/utils/index.js";import{isFunction as d}from"lodash-es";import{useIhoTableFormEvent as p}from"../../../../utils/index.js";import f from"../../../../../../date-picker/index.js";var w=e({__name:"editDate",props:{value:{type:String,default:void 0},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0}},emits:["update:value"],setup(e,{emit:w}){const c=e,D=t(),v=r("$xetable"),{emitFormChangeWithParams:b}=p({...c,$table:v}),y=a(),g=i({get:()=>c.value?c.value:null,set(e){const t=c.value;t!==e&&(w("update:value",e),b({oldValue:t}))}}),$=i((()=>{const e=D.valueFormat||"yyyy-MM-dd HH:mm:ss";return{valueFormat:e,format:e,timePickerProps:{format:m(e)}}})),{isStartDate:T=!1,isEndDate:h=!1}=D,x=D.connectField||"",j=(e,t)=>T&&x?e>t:!(!h||!x)&&e<t,F=e=>{const t=new Date(c.row[x]),r=new Date(e),{h:a,m:i,s:o}=S(t),s=(e,t,r,a)=>!(h&&r>a)&&(!(T&&r<a)&&j(e,t));return{isHourDisabled:t=>{if(!c.row[x])return!1;const i=new Date(`${c.row[x].split(" ")[0]} 00:00:00`).getTime(),{m:o,s:n}=S(r);return s(t,a,e-60*t*60*1e3-60*o*1e3-1e3*n,i)},isMinuteDisabled:t=>{if(!c.row[x])return!1;const o=new Date(`${c.row[x].split(" ")[0]} ${a}:00:00`).getTime(),{s:n}=S(r);return s(t,i,e-60*t*1e3-1e3*n,o)},isSecondDisabled:t=>{if(!c.row[x])return!1;const r=new Date(`${c.row[x].split(" ")[0]} ${a}:${i}:00`).getTime();return s(t,o,e-1e3*t,r)}}},H={type:D.type||"datetime",clearable:!0,allowedInvalidValue:"-",...D,...$.value,isDateDisabled:M(D.isDateDisabled)||(e=>!!c.row[x]&&j(e,h?new Date(`${c.row[x].split(" ")[0]} 00:00:00`).getTime():new Date(c.row[x]).getTime()))};function M(e){return d(e)?t=>e(t,c.row):null}function S(e){return{h:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}return H.type.includes("time")&&(H.isTimeDisabled=M(D.isTimeDisabled)||F),(e,t)=>(o(),s(n(f),l({ref_key:"formRef",ref:y},n(H),{"formatted-value":n(g),"onUpdate:formatted-value":t[0]||(t[0]=e=>u(g)?g.value=e:null)}),null,16,["formatted-value"]))}});export{w as default};
1
+ import{defineComponent as e,useAttrs as t,inject as i,ref as n,computed as r,openBlock as l,createBlock as o,unref as a,mergeProps as s,isRef as u}from"vue";import{generateTimeFormat as d}from"../../../../../../../shared/utils/index.js";import{isFunction as c}from"lodash-es";import{useIhoTableFormEvent as m}from"../../../../utils/index.js";import D from"../../../../../../date-picker/index.js";var f=e({__name:"editDate",props:{value:{type:String,default:null},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0},isStartDate:{type:Boolean,default:!1},isEndDate:{type:Boolean,default:!1},connectField:{type:String,default:"-_-"}},emits:["update:value"],setup(e,{emit:f}){const p=e,w=t(),v=i("$xetable"),{emitFormChangeWithParams:b}=m({...p,$table:v}),F=n(),g=r({get:()=>p.value?p.value:null,set(e){const t=p.value;if(t===e)return;const{isDateDisabled:i,isTimeDisabled:n}=y.value;if(e){const t=Date.parse(e);if(i(t))return;const{isHourDisabled:r,isMinuteDisabled:l,isSecondDisabled:o}=(null==n?void 0:n(t))||{},{h:a,m:s,s:u}=x(new Date(e)),d=null==r?void 0:r(a),c=null==l?void 0:l(s,a),m=null==o?void 0:o(u,s,a);if(d||c||m)return}f("update:value",e),b({oldValue:t})}}),y=r((()=>{const{valueFormat:e,format:t,type:i="datetime"}=w;return{type:i,clearable:!0,allowedInvalidValue:"-",...w,timePickerProps:{format:d(e||t)},isDateDisabled:h(w.isDateDisabled)||S,isTimeDisabled:(null==i?void 0:i.includes("time"))?h(w.isTimeDisabled)||T:void 0}}));function $(e,t){return p.isStartDate&&p.connectField?e>t:!(!p.isEndDate||!p.connectField)&&e<t}function S(e){return!!p.row[p.connectField]&&$(e,p.isEndDate?new Date(`${p.row[p.connectField].split(" ")[0]} 00:00:00`).getTime():new Date(p.row[p.connectField]).getTime())}function T(e){const t=new Date(p.row[p.connectField]),i=new Date(e),{h:n,m:r,s:l}=x(t),o=(e,t,i,n)=>!(p.isEndDate&&i>n)&&(!(p.isStartDate&&i<n)&&$(e,t));return{isHourDisabled:t=>{if(!p.row[p.connectField])return!1;const r=new Date(`${p.row[p.connectField].split(" ")[0]} 00:00:00`).getTime(),{m:l,s:a}=x(i);return o(t,n,e-60*t*60*1e3-60*l*1e3-1e3*a,r)},isMinuteDisabled:t=>{if(!p.row[p.connectField])return!1;const l=new Date(`${p.row[p.connectField].split(" ")[0]} ${n}:00:00`).getTime(),{s:a}=x(i);return o(t,r,e-60*t*1e3-1e3*a,l)},isSecondDisabled:t=>{if(!p.row[p.connectField])return!1;const i=new Date(`${p.row[p.connectField].split(" ")[0]} ${n}:${r}:00`).getTime();return o(t,l,e-1e3*t,i)}}}function h(e){return c(e)?t=>e(t,p.row):null}function x(e){return{h:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}return(e,t)=>(l(),o(a(D),s({ref_key:"formRef",ref:F},a(y),{"formatted-value":a(g),"onUpdate:formatted-value":t[0]||(t[0]=e=>u(g)?g.value=e:null)}),null,16,["formatted-value"]))}});export{f as default};
@@ -1 +1 @@
1
- import{computed as e,createVNode as t,mergeProps as o}from"vue";import{NRadio as n}from"naive-ui";import"../../../../index.js";import{EDITABLE_WIDGET_TYPE as r}from"../../../constants/index.js";import{IhoTableRenderHelper as i,getLowCodeFieldFromField as l,IhoTableUtils as d}from"../../../utils/index.js";import{defineTablePlugin as a}from"../../../hooks/useTablePlugin.js";function u(){const u="radioRendererPlugin";return a({name:u,vxe(l){l.renderer.add(r.RADIO,{renderCell:i.createRenderEdit((({fieldItem:r,emitFormChangeWithParams:i,row:l,column:d,$table:a})=>{const u=e({get:()=>l[d.field],set(){const{fullData:e}=a.getTableData();null==e||e.forEach((e=>e[d.field]=!1)),l[d.field]=!0,i({oldValue:!1})}}),f=(null==r?void 0:r.componentProps)||{};return[l.$__SEPARATE?"":t(n,o({checked:u.value,"onUpdate:checked":e=>u.value=e},f),null)]}))})},apply(e){function t(e){return d.getCellType(e)===r.RADIO}e.fieldHooks.field.tap(u,((e,o,n)=>{var r;const i=l(e);if(!i)return e;if(t(i)){const e=null==(r=n.editConfig)?void 0:r.beforeEditMethod;n.editConfig={...n.editConfig,beforeEditMethod:o=>{const{column:n}=o;return!t(l(n))&&(!e||e(o))}}}return e}))}})}export{u as radioRendererPlugin};
1
+ import{computed as e,createVNode as o,mergeProps as r}from"vue";import{NRadio as t}from"naive-ui";import"../../../../index.js";import{EDITABLE_WIDGET_TYPE as n}from"../../../constants/index.js";import{IhoTableRenderHelper as i,IhoTableUtils as l}from"../../../utils/index.js";import{isFunction as d}from"lodash-es";import{defineTablePlugin as a}from"../../../hooks/useTablePlugin.js";function u(){const u="radioRendererPlugin";return a({name:u,vxe(l){l.renderer.add(n.RADIO,{renderCell:i.createRenderEdit((({fieldItem:n,emitFormChangeWithParams:i,row:l,column:d,$table:a})=>{const u=e({get:()=>l[d.field],set(){const{fullData:e}=a.getTableData();null==e||e.forEach((e=>e[d.field]=!1)),l[d.field]=!0,i({oldValue:!1})}}),m=(null==n?void 0:n.componentProps)||{};return[l.$__SEPARATE?"":o(t,r({checked:u.value,"onUpdate:checked":e=>u.value=e},m),null)]}))})},apply(e){e.configHooks.editConfig.tap(u,((e={},o)=>{const r=e.beforeEditMethod;return e.beforeEditMethod=(...e)=>{var o;const{row:t,column:i}=e[0];return!function(e){return!!e&&l.getCellType(e)===n.RADIO}(null==(o=i.editRender)?void 0:o.props)&&(!d(r)||r(...e))},e}))}})}export{u as radioRendererPlugin};
@@ -0,0 +1 @@
1
+ export declare function switchRendererPlugin(): import("../../../../../../components/iho-table").TablePlugin;
@@ -0,0 +1 @@
1
+ import{computed as e,createVNode as i}from"vue";import{traverse as o}from"../../../../../../shared/utils/index.js";import{NSwitch as r,NCheckbox as t}from"naive-ui";import"../../../../index.js";import{EDITABLE_WIDGET_TYPE as d}from"../../../constants/index.js";import{IhoTableRenderHelper as n}from"../../../utils/index.js";import{defineTablePlugin as l}from"../../../hooks/useTablePlugin.js";function a(){const a="switchRendererPlugin";return l({name:a,vxe(o){o.renderer.add(d.SWITCH,{renderCell:n.createRenderEdit((({fieldItem:o,emitFormChangeWithParams:d,row:n,column:l})=>{var a,u;const{open:s={},close:c={},show_mode:m="SWITCH"}=o,f=null==(a=s.value)||a,v=null!=(u=c.value)&&u,p=e({get:()=>n[l.field]===f,set(e){const i=n[l.field];n[l.field]=e?f:v,d({oldValue:i})}});return[n.$__SEPARATE?"":"SWITCH"===m?i(r,{value:p.value,"onUpdate:value":e=>p.value=e},{checked:()=>s.describe,unchecked:()=>c.describe}):i(t,{checked:p.value,"onUpdate:checked":e=>p.value=e},{default:()=>s.describe})]}))})},apply(e){e.fieldHooks.fieldList.tap(a,((e,i)=>{var r;let t=!1;if(o(e,((e,i)=>{var o;(null==(o=e.editRender)?void 0:o.name)===d.SWITCH&&(t=!0,i())})),t){const e=null==(r=i.editConfig)?void 0:r.beforeEditMethod;i.editConfig={...i.editConfig,beforeEditMethod(i){var o;const{column:r}=i;return(null==(o=r.editRender)?void 0:o.name)!==d.SWITCH&&(!e||e(i))}}}return e}))}})}export{a as switchRendererPlugin};
@@ -1 +1 @@
1
- import{defineComponent as e,useAttrs as l,inject as t,ref as a,computed as r,reactive as u,watch as o,nextTick as i,openBlock as n,createBlock as d,unref as c,withCtx as v,createVNode as m,mergeProps as s,isRef as f,createElementBlock as p,Fragment as h,renderList as y,createTextVNode as k,toDisplayString as b,createCommentVNode as w}from"vue";import{NPopover as _,NInput as g,NSpace as V,NScrollbar as C,NButton as F}from"naive-ui";import{useIhoTableFormEvent as x}from"../../../../utils/index.js";import D from"../../../../../../time-picker/index.js";import{parse as q,isValid as O,getHours as j,getMinutes as S,getSeconds as $,format as A}from"date-fns";var H=e({__name:"editTime",props:{formattedValue:{type:String},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0},shortcutOptions:{type:Array,default:()=>[]}},emits:["update:formattedValue","click"],setup(e,{emit:H}){const I=e,P=l(),R=t("$xetable"),{emitFormChangeWithParams:E}=x({...I,$table:R}),M=a(null),U=a(!1),z=a(),K=a(),N=r((()=>K.value&&L(K.value)?{style:"text-decoration: line-through"}:{})),T=r({get(){if(!K.value)return null;const e=q(K.value,G.valueFormat,new Date);return O(e)?K.value:I.formattedValue?I.formattedValue:null},set(e){J(e)}}),{placeholder:W="请选择",valueFormat:B="HH:mm"}=P,G=u({...P,placeholder:W,valueFormat:B,format:B});function J(e){if(K.value=e||"",e&&L(e))return;const l=I.formattedValue;l!==e&&(H("update:formattedValue",e),E({oldValue:l}))}function L(e){var l,t,a;const r=q(e,G.format,new Date),u=j(r),o=S(r),i=$(r),n=null==(l=G.isHourDisabled)?void 0:l.call(G,u),d=null==(t=G.isMinuteDisabled)?void 0:t.call(G,o,u),c=null==(a=G.isSecondDisabled)?void 0:a.call(G,i,o,u);return!!n||(!!d||!!c)}function Q(){[G.valueFormat.replace(/[^\w]/g,""),G.valueFormat].some((e=>{const l=q(K.value,e,new Date);if(!K.value||O(l)){return J(K.value?A(l,G.valueFormat):null),!0}return!1}))}function X(e){var l;const{key:t}=e;"Enter"===t&&(null==(l=M.value)||l.blur(),U.value=!1)}return o((()=>I.formattedValue),(e=>{if(!e)return"";K.value=e}),{immediate:!0}),o((()=>U.value),(async e=>{var l,t,a,r,u;e&&(await i(),null==(u=null==(r=null==(a=null==(t=null==(l=z.value)?void 0:l.$timePicker)?void 0:t.panelInstRef)?void 0:a.$el)?void 0:r.querySelectorAll(".n-time-picker-col"))||u.forEach((e=>{var l,t;return null==(t=null==(l=null==e?void 0:e.querySelector)?void 0:l.call(e,".n-time-picker-col__item--active"))?void 0:t.scrollIntoView()})))})),(l,t)=>(n(),d(c(_),{show:U.value,trigger:"click",showArrow:!1,placement:"bottom-start",style:{padding:"0"},onClickoutside:t[4]||(t[4]=()=>U.value=!1)},{trigger:v((()=>[m(c(g),{ref_key:"formRef",ref:M,clearable:"",placeholder:c(W),value:K.value,"onUpdate:value":t[0]||(t[0]=e=>K.value=e),valueModifiers:{trim:!0},"input-props":c(N),onClick:t[1]||(t[1]=()=>U.value=!0),onChange:Q,onKeydown:X},null,8,["placeholder","value","input-props"])])),default:v((()=>[m(c(V),null,{default:v((()=>[m(c(D),s({ref_key:"timePickerRef",ref:z,show:""},c(G),{class:"iho-table__time-picker",to:!1,"formatted-value":c(T),"onUpdate:formatted-value":t[2]||(t[2]=e=>f(T)?T.value=e:null),onConfirm:t[3]||(t[3]=()=>U.value=!1)}),null,16,["formatted-value"]),m(c(C),{class:"iho-table__scrollbar"},{default:v((()=>[e.shortcutOptions.length?(n(),d(c(V),{key:0,vertical:"",wrap:!1},{default:v((()=>[(n(!0),p(h,null,y(e.shortcutOptions,(e=>(n(),d(c(F),{size:"tiny",key:e,disabled:L(e),onClick:l=>function(e){J(e),U.value=!1}(e)},{default:v((()=>[k(b(e),1)])),_:2},1032,["disabled","onClick"])))),128))])),_:1})):w("v-if",!0)])),_:1})])),_:1})])),_:1},8,["show"]))}});export{H as default};
1
+ import{defineComponent as e,useAttrs as l,inject as t,ref as a,computed as r,reactive as u,watch as o,nextTick as i,openBlock as n,createBlock as d,unref as c,withCtx as v,createVNode as m,mergeProps as s,isRef as f,createElementBlock as p,Fragment as h,renderList as y,createTextVNode as k,toDisplayString as b,createCommentVNode as w}from"vue";import{NPopover as _,NInput as g,NSpace as V,NScrollbar as C,NButton as F}from"naive-ui";import{useIhoTableFormEvent as x}from"../../../../utils/index.js";import D from"../../../../../../time-picker/index.js";import{parse as q,isValid as O,getHours as j,getMinutes as S,getSeconds as $,format as A}from"date-fns";var H=e({__name:"editTime",props:{formattedValue:{type:String},column:{type:Object,required:!0},row:{type:Object,required:!0},rowIndex:{type:Number,required:!0},shortcutOptions:{type:Array,default:()=>[]}},emits:["update:formattedValue","click"],setup(e,{emit:H}){const I=e,P=l(),R=t("$xetable"),{emitFormChangeWithParams:E}=x({...I,$table:R}),M=a(null),U=a(!1),z=a(),K=a(),N=r((()=>K.value&&L(K.value)?{style:"text-decoration: line-through"}:{})),T=r({get(){if(!K.value)return null;const e=q(K.value,G.valueFormat,new Date);return O(e)?K.value:I.formattedValue?I.formattedValue:null},set(e){J(e)}}),{placeholder:W="请选择",valueFormat:B="HH:mm"}=P,G=u({...P,placeholder:W,valueFormat:B,format:B});function J(e){if(K.value=e||"",e&&L(e))return;const l=I.formattedValue;l!==e&&(H("update:formattedValue",e),E({oldValue:l}))}function L(e){var l,t,a;const r=q(e,G.format,new Date),u=j(r),o=S(r),i=$(r),n=null==(l=G.isHourDisabled)?void 0:l.call(G,u),d=null==(t=G.isMinuteDisabled)?void 0:t.call(G,o,u),c=null==(a=G.isSecondDisabled)?void 0:a.call(G,i,o,u);return n||d||c}function Q(){[G.valueFormat.replace(/[^\w]/g,""),G.valueFormat].some((e=>{const l=q(K.value,e,new Date);if(!K.value||O(l)){return J(K.value?A(l,G.valueFormat):null),!0}return!1}))}function X(e){var l;const{key:t}=e;"Enter"===t&&(null==(l=M.value)||l.blur(),U.value=!1)}return o((()=>I.formattedValue),(e=>{if(!e)return"";K.value=e}),{immediate:!0}),o((()=>U.value),(async e=>{var l,t,a,r,u;e&&(await i(),null==(u=null==(r=null==(a=null==(t=null==(l=z.value)?void 0:l.$timePicker)?void 0:t.panelInstRef)?void 0:a.$el)?void 0:r.querySelectorAll(".n-time-picker-col"))||u.forEach((e=>{var l,t;return null==(t=null==(l=null==e?void 0:e.querySelector)?void 0:l.call(e,".n-time-picker-col__item--active"))?void 0:t.scrollIntoView()})))})),(l,t)=>(n(),d(c(_),{show:U.value,trigger:"click",showArrow:!1,placement:"bottom-start",style:{padding:"0"},onClickoutside:t[4]||(t[4]=()=>U.value=!1)},{trigger:v((()=>[m(c(g),{ref_key:"formRef",ref:M,clearable:"",placeholder:c(W),value:K.value,"onUpdate:value":t[0]||(t[0]=e=>K.value=e),valueModifiers:{trim:!0},"input-props":c(N),onClick:t[1]||(t[1]=()=>U.value=!0),onChange:Q,onKeydown:X},null,8,["placeholder","value","input-props"])])),default:v((()=>[m(c(V),null,{default:v((()=>[m(c(D),s({ref_key:"timePickerRef",ref:z,show:""},c(G),{class:"iho-table__time-picker",to:!1,"formatted-value":c(T),"onUpdate:formatted-value":t[2]||(t[2]=e=>f(T)?T.value=e:null),onConfirm:t[3]||(t[3]=()=>U.value=!1)}),null,16,["formatted-value"]),m(c(C),{class:"iho-table__scrollbar"},{default:v((()=>[e.shortcutOptions.length?(n(),d(c(V),{key:0,vertical:"",wrap:!1},{default:v((()=>[(n(!0),p(h,null,y(e.shortcutOptions,(e=>(n(),d(c(F),{size:"tiny",key:e,disabled:L(e),onClick:l=>function(e){J(e),U.value=!1}(e)},{default:v((()=>[k(b(e),1)])),_:2},1032,["disabled","onClick"])))),128))])),_:1})):w("v-if",!0)])),_:1})])),_:1})])),_:1},8,["show"]))}});export{H as default};
@@ -1 +1 @@
1
- import{createVNode as e,defineComponent as n,inject as t}from"vue";import"../../../../index.js";import{NCheckbox as a}from"naive-ui";import{defineTablePlugin as o}from"../../../hooks/useTablePlugin.js";function s(){const n="checkRendererPlugin";return o({name:n,apply(t){t.fieldHooks.field.tap(n,((t,{index:a,insertBefore:o},s)=>{if(0===a&&s.selectType&&["checkbox","radio"].includes(s.selectType)){const{radioConfig:t,checkboxConfig:a={}}=s,r={width:45,align:"center",fixed:"left",..."radio"===s.selectType?t:a,field:n,type:s.selectType,annotation:!1};a.disableHeader&&(r.slots={header:()=>e("span",{class:"checkbox-cell--disable"},null),...r.slots}),a.useNCheckbox&&(r.slots={header:n=>[e(l,{style:"margin-left: -1px",params:n},null)],checkbox:n=>[e(l,{params:n},null)],...r.slots}),o(r)}return t}))}})}const l=n({name:"Checkbox",props:{params:{type:Object,default:()=>({})}},setup(n){const o=t("$xetable");function s(e){var t;"header"===(null==(t=n.params)?void 0:t.type)?null==o||o.triggerCheckAllEvent(new MouseEvent("mouse-down"),e):null==o||o.triggerCheckRowEvent(new MouseEvent("mouse-down"),n.params,e)}return()=>e(a,{checked:n.params.checked,"onUpdate:checked":e=>n.params.checked=e,indeterminate:n.params.indeterminate,disabled:n.params.disabled,onUpdateChecked:s},null)}});export{s as checkRendererPlugin};
1
+ import{createVNode as e,defineComponent as o,inject as a}from"vue";import"../../../../index.js";import{NCheckbox as n}from"naive-ui";import{isNumber as t}from"lodash-es";import{defineTablePlugin as s}from"../../../hooks/useTablePlugin.js";function r(){const o="checkRendererPlugin";return s({name:o,apply(a){a.fieldHooks.field.tap(o,((a,{index:n,insertBefore:s},r)=>{if(0===n&&r.selectType&&["checkbox","radio"].includes(r.selectType)){const{radioConfig:a,checkboxConfig:n={}}=r,i={width:45,align:"center",fixed:"left",..."radio"===r.selectType?a:n,field:o,type:r.selectType,annotation:!1};n.disableHeader&&(i.slots={header:()=>e("span",{class:"checkbox-cell--disable"},null),...i.slots}),n.useNCheckbox&&(i.slots={...t(n.maxCheckSize)?{}:{header:o=>[e(l,{params:o},null)]},checkbox:o=>[e(l,{params:o},null)],...i.slots}),s(i)}return a}))}})}const l=o({name:"Checkbox",props:{params:{type:Object,default:()=>({})}},setup(o){const t=a("$xetable");function s(e,a){var n;a.stopPropagation(),"header"===(null==(n=o.params)?void 0:n.type)?null==t||t.triggerCheckAllEvent(new MouseEvent("mouse-down"),e):null==t||t.triggerCheckRowEvent(new MouseEvent("mouse-down"),o.params,e)}return()=>e(n,{checked:o.params.checked,"onUpdate:checked":e=>o.params.checked=e,indeterminate:o.params.indeterminate,disabled:o.params.disabled,onUpdateChecked:s},null)}});export{r as checkRendererPlugin};
@@ -160,6 +160,9 @@ export declare type LowCodeTableFieldItem = {
160
160
  autograph: string;
161
161
  wordbook: LowCodeTypes.wordbook;
162
162
  requestCache: boolean;
163
+ open: LowCodeTypes.switchProperty;
164
+ close: LowCodeTypes.switchProperty;
165
+ show_mode: LowCodeTypes.showModeType;
163
166
  lazyRequest: boolean;
164
167
  }> & Partial<VxeTableDefines.ColumnInfo>;
165
168
  export declare type IhoTableFormChangePayload = {