cnhis-design-vue 3.1.56-beta.11 → 3.1.56-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.
- package/es/components/form-config/index.d.ts +7 -7
- package/es/components/form-config/src/FormConfig.vue.d.ts +7 -7
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +3 -3
- package/es/components/form-render/src/components/renderer/switch.d.ts +16 -2
- package/es/components/form-render/src/components/renderer/switch.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +3 -8
- package/es/components/iho-table/src/constants/index.d.ts +1 -0
- package/es/components/iho-table/src/constants/index.js +1 -1
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/switchRendererPlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/switchRendererPlugin.js +1 -0
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +3 -0
- package/es/components/shortcut-setter/index.d.ts +1 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/types/business.d.ts +5 -0
- package/package.json +2 -2
|
@@ -410,7 +410,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
410
410
|
NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
|
|
411
411
|
} | undefined;
|
|
412
412
|
}[] | undefined;
|
|
413
|
-
show_mode?: ("
|
|
413
|
+
show_mode?: import("../../shared/types").LowCodeTypes.showModeType | undefined;
|
|
414
414
|
is_allow_check_mid?: import("..").FormCommonState | undefined;
|
|
415
415
|
allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
|
|
416
416
|
prefix?: string | import("../../shared/types").AnyObject | (() => any) | undefined;
|
|
@@ -2160,7 +2160,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2160
2160
|
NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
|
|
2161
2161
|
} | undefined;
|
|
2162
2162
|
}[] | undefined;
|
|
2163
|
-
show_mode?: ("
|
|
2163
|
+
show_mode?: import("../../shared/types").LowCodeTypes.showModeType | undefined;
|
|
2164
2164
|
is_allow_check_mid?: import("..").FormCommonState | undefined;
|
|
2165
2165
|
allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
|
|
2166
2166
|
prefix?: string | import("../../shared/types").AnyObject | (() => any) | undefined;
|
|
@@ -3948,7 +3948,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3948
3948
|
NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
|
|
3949
3949
|
} | undefined;
|
|
3950
3950
|
}[] | undefined;
|
|
3951
|
-
show_mode?: ("
|
|
3951
|
+
show_mode?: import("../../shared/types").LowCodeTypes.showModeType | undefined;
|
|
3952
3952
|
is_allow_check_mid?: import("..").FormCommonState | undefined;
|
|
3953
3953
|
allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
|
|
3954
3954
|
prefix?: string | import("../../shared/types").AnyObject | (() => any) | undefined;
|
|
@@ -5698,7 +5698,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
5698
5698
|
NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
|
|
5699
5699
|
} | undefined;
|
|
5700
5700
|
}[] | undefined;
|
|
5701
|
-
show_mode?: ("
|
|
5701
|
+
show_mode?: import("../../shared/types").LowCodeTypes.showModeType | undefined;
|
|
5702
5702
|
is_allow_check_mid?: import("..").FormCommonState | undefined;
|
|
5703
5703
|
allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
|
|
5704
5704
|
prefix?: string | import("../../shared/types").AnyObject | (() => any) | undefined;
|
|
@@ -8699,7 +8699,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
8699
8699
|
NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
|
|
8700
8700
|
} | undefined;
|
|
8701
8701
|
}[] | undefined;
|
|
8702
|
-
show_mode?: ("
|
|
8702
|
+
show_mode?: import("../../shared/types").LowCodeTypes.showModeType | undefined;
|
|
8703
8703
|
is_allow_check_mid?: import("..").FormCommonState | undefined;
|
|
8704
8704
|
allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
|
|
8705
8705
|
prefix?: string | import("../../shared/types").AnyObject | (() => any) | undefined;
|
|
@@ -10460,7 +10460,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
10460
10460
|
NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
|
|
10461
10461
|
} | undefined;
|
|
10462
10462
|
}[] | undefined;
|
|
10463
|
-
show_mode?: ("
|
|
10463
|
+
show_mode?: import("../../shared/types").LowCodeTypes.showModeType | undefined;
|
|
10464
10464
|
is_allow_check_mid?: import("..").FormCommonState | undefined;
|
|
10465
10465
|
allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
|
|
10466
10466
|
prefix?: string | import("../../shared/types").AnyObject | (() => any) | undefined;
|
|
@@ -12194,7 +12194,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
12194
12194
|
NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
|
|
12195
12195
|
} | undefined;
|
|
12196
12196
|
}[] | undefined;
|
|
12197
|
-
show_mode?: ("
|
|
12197
|
+
show_mode?: import("../../shared/types").LowCodeTypes.showModeType | undefined;
|
|
12198
12198
|
is_allow_check_mid?: import("..").FormCommonState | undefined;
|
|
12199
12199
|
allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
|
|
12200
12200
|
prefix?: string | import("../../shared/types").AnyObject | (() => any) | undefined;
|
|
@@ -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?:
|
|
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?:
|
|
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;
|
|
@@ -3951,7 +3951,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3951
3951
|
NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
|
|
3952
3952
|
} | undefined;
|
|
3953
3953
|
}[] | undefined;
|
|
3954
|
-
show_mode?:
|
|
3954
|
+
show_mode?: LowCodeTypes.showModeType | undefined;
|
|
3955
3955
|
is_allow_check_mid?: import("../../../components/form-render").FormCommonState | undefined;
|
|
3956
3956
|
allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
|
|
3957
3957
|
prefix?: string | import("../../../shared/types").AnyObject | (() => any) | undefined;
|
|
@@ -5701,7 +5701,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5701
5701
|
NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
|
|
5702
5702
|
} | undefined;
|
|
5703
5703
|
}[] | undefined;
|
|
5704
|
-
show_mode?:
|
|
5704
|
+
show_mode?: LowCodeTypes.showModeType | undefined;
|
|
5705
5705
|
is_allow_check_mid?: import("../../../components/form-render").FormCommonState | undefined;
|
|
5706
5706
|
allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
|
|
5707
5707
|
prefix?: string | import("../../../shared/types").AnyObject | (() => any) | undefined;
|
|
@@ -8702,7 +8702,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
8702
8702
|
NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
|
|
8703
8703
|
} | undefined;
|
|
8704
8704
|
}[] | undefined;
|
|
8705
|
-
show_mode?:
|
|
8705
|
+
show_mode?: LowCodeTypes.showModeType | undefined;
|
|
8706
8706
|
is_allow_check_mid?: import("../../../components/form-render").FormCommonState | undefined;
|
|
8707
8707
|
allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
|
|
8708
8708
|
prefix?: string | import("../../../shared/types").AnyObject | (() => any) | undefined;
|
|
@@ -10463,7 +10463,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
10463
10463
|
NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
|
|
10464
10464
|
} | undefined;
|
|
10465
10465
|
}[] | undefined;
|
|
10466
|
-
show_mode?:
|
|
10466
|
+
show_mode?: LowCodeTypes.showModeType | undefined;
|
|
10467
10467
|
is_allow_check_mid?: import("../../../components/form-render").FormCommonState | undefined;
|
|
10468
10468
|
allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
|
|
10469
10469
|
prefix?: string | import("../../../shared/types").AnyObject | (() => any) | undefined;
|
|
@@ -12197,7 +12197,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
12197
12197
|
NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
|
|
12198
12198
|
} | undefined;
|
|
12199
12199
|
}[] | undefined;
|
|
12200
|
-
show_mode?:
|
|
12200
|
+
show_mode?: LowCodeTypes.showModeType | undefined;
|
|
12201
12201
|
is_allow_check_mid?: import("../../../components/form-render").FormCommonState | undefined;
|
|
12202
12202
|
allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
|
|
12203
12203
|
prefix?: string | import("../../../shared/types").AnyObject | (() => any) | 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?: ("
|
|
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?: ("
|
|
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?: ("
|
|
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;
|
|
@@ -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,
|
|
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
|
|
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};
|
|
@@ -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};
|
|
@@ -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:
|
|
110
|
-
close:
|
|
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:
|
|
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);
|
|
@@ -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
|
|
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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function switchRendererPlugin(): import("../../../../../../components/iho-table").TablePlugin;
|
package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/switchRendererPlugin.js
ADDED
|
@@ -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
|
|
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
|
|
1
|
+
import{createVNode as e,defineComponent as a,inject as o}from"vue";import"../../../../index.js";import{NCheckbox as t}from"naive-ui";import{defineTablePlugin as l}from"../../../hooks/useTablePlugin.js";function s(){const a="checkRendererPlugin";return l({name:a,apply(o){o.fieldHooks.field.tap(a,((o,{index:t,insertBefore:l},s)=>{if(0===t&&s.selectType&&["checkbox","radio"].includes(s.selectType)){const{radioConfig:o,checkboxConfig:t={}}=s,r={width:45,align:"center",fixed:"left",..."radio"===s.selectType?o:t,field:a,type:s.selectType,annotation:!1};t.disableHeader&&(r.slots={header:()=>e("span",{class:"checkbox-cell--disable"},null),...r.slots}),t.useNCheckbox&&(r.slots={...t.showHeader?{header:a=>[e(n,{style:"margin-left: -1px",params:a},null)]}:{},checkbox:a=>[e(n,{params:a},null)],...r.slots}),l(r)}return o}))}})}const n=a({name:"Checkbox",props:{params:{type:Object,default:()=>({})}},setup(a){const l=o("$xetable");function s(e,o){var t;o.stopPropagation(),"header"===(null==(t=a.params)?void 0:t.type)?null==l||l.toggleAllCheckboxRow():null==l||l.toggleCheckboxRow(a.params.row)}return()=>e(t,{checked:a.params.checked,"onUpdate:checked":e=>a.params.checked=e,indeterminate:a.params.indeterminate,disabled:a.params.disabled,onUpdateChecked:s},null)}});export{s 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 = {
|
|
@@ -182,7 +182,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
182
182
|
NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
|
|
183
183
|
} | undefined;
|
|
184
184
|
}[] | undefined;
|
|
185
|
-
show_mode?: ("
|
|
185
|
+
show_mode?: import("../../shared/types").LowCodeTypes.showModeType | undefined;
|
|
186
186
|
is_allow_check_mid?: import("..").FormCommonState | undefined;
|
|
187
187
|
allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
|
|
188
188
|
prefix?: string | import("../../shared/types").AnyObject | (() => any) | undefined;
|
|
@@ -185,7 +185,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
185
185
|
NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
|
|
186
186
|
} | undefined;
|
|
187
187
|
}[] | undefined;
|
|
188
|
-
show_mode?: ("
|
|
188
|
+
show_mode?: import("../../../shared/types").LowCodeTypes.showModeType | undefined;
|
|
189
189
|
is_allow_check_mid?: import("../../../components/form-render").FormCommonState | undefined;
|
|
190
190
|
allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
|
|
191
191
|
prefix?: string | import("../../../shared/types").AnyObject | (() => any) | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.1.56-beta.
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.1.56-beta.12",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.1.56-beta.12",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
|
|
@@ -81,4 +81,9 @@ export declare namespace LowCodeTypes {
|
|
|
81
81
|
__oppositeBindField: reactionsConfig;
|
|
82
82
|
__oppositeTargetField: reactionsConfig;
|
|
83
83
|
}>;
|
|
84
|
+
type switchProperty = {
|
|
85
|
+
value?: any;
|
|
86
|
+
describe?: string;
|
|
87
|
+
};
|
|
88
|
+
type showModeType = 'DROPDOWN' | 'H_TILE' | 'V_TILE' | 'TILE' | 'SWITCH' | 'CHECKBOX';
|
|
84
89
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.56-beta.
|
|
3
|
+
"version": "3.1.56-beta.12",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"iOS 7",
|
|
65
65
|
"last 3 iOS versions"
|
|
66
66
|
],
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "090ee6ee95bf240c0fb1eb21f1e594e42af5079b"
|
|
68
68
|
}
|