cnhis-design-vue 3.1.46-beta.34 → 3.1.46-beta.36
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 +51 -7
- package/es/components/form-config/src/FormConfig.vue.d.ts +51 -7
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +1 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +22 -3
- package/es/components/form-render/index.d.ts +1 -0
- package/es/components/form-render/src/FormRender.vue.d.ts +1 -0
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +1 -0
- package/es/components/form-render/src/components/renderer/levelSearchCascader.d.ts +14 -2
- package/es/components/form-render/src/components/renderer/radio&checkbox.d.ts +28 -4
- package/es/components/form-render/src/components/renderer/select.d.ts +14 -2
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useWordbookSetting.d.ts +5 -0
- package/es/components/form-render/src/hooks/useWordbookSetting.js +1 -0
- package/es/components/form-render/src/types/fieldItem.d.ts +7 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/index.d.ts +2 -0
- package/es/components/info-header/src/InfoHeader.vue.d.ts +2 -0
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +1 -0
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +1 -0
- package/es/components/select-person/index.d.ts +5 -0
- package/es/components/select-person/src/SearchMultiple.vue2.js +1 -1
- package/es/components/select-person/src/SearchOrgAndStaff.vue2.js +1 -1
- package/es/components/select-person/src/SelectPerson.vue.d.ts +2 -0
- package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
- package/es/components/select-person/style/index.css +1 -1
- package/es/components/shortcut-setter/index.d.ts +8 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +8 -1
- package/es/components/steps-wheel/index.d.ts +16 -0
- package/es/components/steps-wheel/src/StepsWheel.vue.d.ts +16 -0
- package/es/components/steps-wheel/src/StepsWheel.vue2.js +1 -1
- package/es/components/steps-wheel/style/index.css +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
|
@@ -42,15 +42,21 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
|
42
42
|
name: string;
|
|
43
43
|
render_key: string[];
|
|
44
44
|
search_key: string[];
|
|
45
|
+
value_key: string;
|
|
45
46
|
primary_key: string;
|
|
46
47
|
type: string;
|
|
47
|
-
value_key: string;
|
|
48
48
|
level_key: string;
|
|
49
49
|
link_key: string;
|
|
50
50
|
link_key_split: string;
|
|
51
51
|
show_key: string[];
|
|
52
52
|
conObj: AnyObject[];
|
|
53
53
|
conObjFirstLevel: AnyObject[];
|
|
54
|
+
setting: Partial<{
|
|
55
|
+
cascading: {
|
|
56
|
+
'form.name': string;
|
|
57
|
+
value: string;
|
|
58
|
+
}[];
|
|
59
|
+
}>;
|
|
54
60
|
}>>;
|
|
55
61
|
};
|
|
56
62
|
recommend: {
|
|
@@ -117,15 +123,21 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
|
117
123
|
name: string;
|
|
118
124
|
render_key: string[];
|
|
119
125
|
search_key: string[];
|
|
126
|
+
value_key: string;
|
|
120
127
|
primary_key: string;
|
|
121
128
|
type: string;
|
|
122
|
-
value_key: string;
|
|
123
129
|
level_key: string;
|
|
124
130
|
link_key: string;
|
|
125
131
|
link_key_split: string;
|
|
126
132
|
show_key: string[];
|
|
127
133
|
conObj: AnyObject[];
|
|
128
134
|
conObjFirstLevel: AnyObject[];
|
|
135
|
+
setting: Partial<{
|
|
136
|
+
cascading: {
|
|
137
|
+
'form.name': string;
|
|
138
|
+
value: string;
|
|
139
|
+
}[];
|
|
140
|
+
}>;
|
|
129
141
|
}>>;
|
|
130
142
|
};
|
|
131
143
|
recommend: {
|
|
@@ -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 r,formRenderLog as i}from"../utils/index.js";import{useFieldNormalize as s}from"./useFieldNormalize.js";import{fieldKeyEscape as a,createLinebarId as p}from"../utils/schema.js";import{useFormValidator as l}from"./useFormValidator.js";import{transformDateFormat as c}from"../utils/business.js";function m(e,o){Object.assign(e["x-component-props"],{...n(o,["wordbook","autograph"])})}function d(d){const{createValidatorSchema:u}=l(),x=e=>{var o;const t={name:e.val_key,type:null!=(o=e.fieldType)?o:"string",title:e.alias||e.name,"x-component":e.html_type,default:e.default_val,"x-component-props":{placeholder:e.placeholder,clearable:"0"===e.is_empty,...e.componentProps||{}},"x-content":e.slots,"x-display":"0"===e.is_show?"hidden":"visible","x-pattern":"0"===e.is_edit?"disabled":"editable","x-compile-omitted":["title","x-component-props","x-decorator-props"]};e.reactions&&(t["x-reactions"]=e.reactions),e.noDecorator||Object.assign(t,{"x-decorator":"FORM_ITEM","x-decorator-props":{fieldItem:e,span:2*(e.elem_width||3),showLabel:"1"!==e.hide_title,remark:e.remark,propertyKey:e.val_key,annotation:e.annotation,...e.decoratorProps||{}}});const n=u(e);return n&&(t["x-validator"]=n),"0"===e.is_null&&(t.required=!0),t},f=e=>{var o;const t=x(e);e.urlConfig?function(e,o){Object.assign(e["x-component-props"],{...n(o,["urlConfig"])})}(t,e):e.autograph&&m(t,e);const i=!!e.__multiple;return Object.assign(t["x-component-props"],{multiple:i,options:e.option||(null==(o=e.componentProps)?void 0:o.options),allowCreate:"1"===e.free_entry||!!t["x-component-props"].allowCreate,maxTagCount:r(e.multi_select_value),...n(e,["lazyRequest","requestCache"])}),i&&(t.type="array"),t},_=e=>{const o=x(e);return Object.assign(o["x-component-props"],{options:e.option,childFieldStrategy:e.childFieldStrategy,vertical:e.__vertical}),m(o,e),o},h=e=>{const t=x(e);return Object.assign(t["x-component-props"],{fieldItem:o(e,["reactions"])}),t},g=e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINEBAR","x-display":"visible","x-component-props":{disabled:"1"===e.is_not_fold,id:p(e.val_key),show:"0"!==e.is_show,remark:e.remark}}),b=new Map([["LINEBAR",g],["LINE_BREAKS",e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINE_BREAKS","x-display":"0"===e.is_show?"hidden":"visible"})],["INPUT",e=>{const o=x(e);return Object.assign(o["x-component-props"],{...n(e,["prefix","suffix"])}),o}],["TEXTAREA",e=>{const o=x(e);return Object.assign(o["x-component-props"],{rows:e.initialize_high||3}),o}],["INPUT_NUMBER",e=>{const o=x(e),{decimal_length:t,validate:n}=e;return Object.assign(o["x-component-props"],{precision:null!=t?t:null==n?void 0:n.decimal_length,prefix:e.prefix,suffix:e.suffix}),o}],["SELECT",f],["REMOTE_SEARCH",f],["DATE",e=>{const o=x(e);return Object.assign(o["x-component-props"],{valueFormat:e.date_format,type:c(e.date_format),validate:e.validate}),o}],["LEVEL_SEARCH_CASCADER",e=>{const o=x(e);return Object.assign(o["x-component-props"],{...n(e,["wordbook","lazyRequest","autograph"])}),o}],["SEARCH_CASCADER",e=>{var o;const t=x(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=x(e);return o.type="array",!1!==e.jsonCombination&&(o["x-component"]="JSON_COMBINATION"),Object.assign(o["x-decorator-props"],{showLabel:!1,showFeedback:!1}),Object.assign(o["x-component-props"],{title:e.alias||e.name,maxGroupNum:e.maxGroupNum,properties:e.children||[],combinationItemDeletable:e.combinationItemDeletable}),o}],["RADIO",_],["CHECKBOX",_],["SWITCH",e=>{const o=x(e);return Object.assign(o["x-component-props"],{openDescription:e.open,closeDescription:e.close}),o}],["SLIDER",e=>{const o=x(e);return Object.assign(o["x-component-props"],{step:r(e.step_length),max:r(e.max_length),min:r(e.min_length),option:e.option}),o}],["COMPLEX",e=>{const o=x(e);Array.isArray(e.properties)&&i("COMPLEX控件的properties属性已经废弃, 请使用children作为替代, 在之后的版本中properties属性将不再支持");const t=Array.isArray(e.properties||e.children)?C(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}]]),y=e=>{if(e.suffixConfig)return v(e);return(b.get(e.html_type)||h)(e)},v=o=>{if(!o.suffixConfig)return y(o);const t=e(o.suffixConfig),n=[{...o,is_show:"1",hide_title:"1",suffixConfig:void 0}].concat(t.map((e=>({...e,hide_title:"1",is_show:"1"})))),r=x(o);return Object.assign(r,{type:"void",name:a(n),title:o.alias||o.name,"x-component":"INPUT_GROUP","x-component-props":{span:2*(o.elem_width||3)},"x-decorator-props":{...r["x-decorator-props"],showFeedback:!1,suffixFields:n.map((e=>e.val_key))},properties:C(n)}),r},{FieldNormalizeWaterfallHook:O}=s();function C(o){let n=null;return o.reduce(((e,o,s)=>{var a;const p=null==(a=(o=O.call(t(o))).validate)?void 0:a.obj_type;return p&&d&&d.collect(p,t(o)),"LINEBAR"===o.html_type?(e[i(o)]=r(g(o),s),n=e[i(o)].properties={}):n?n[i(o)]=r(y(o),s):(n=null,e[i(o)]=r(y(o),s)),e}),{});function r(e,o){return e["x-index"]=o,e}function i(o){return o.suffixConfig?a([o,...e(o.suffixConfig)]):o.val_key}}return{schemaAdaptor:C}}export{d 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 r,formRenderLog as i}from"../utils/index.js";import{useFieldNormalize as s}from"./useFieldNormalize.js";import{fieldKeyEscape as a,createLinebarId as p}from"../utils/schema.js";import{useFormValidator as l}from"./useFormValidator.js";import{transformDateFormat as c}from"../utils/business.js";function m(e,o){Object.assign(e["x-component-props"],{...n(o,["wordbook","autograph"])})}function d(d){const{createValidatorSchema:u}=l(),x=e=>{var o;const t={name:e.val_key,type:null!=(o=e.fieldType)?o:"string",title:e.alias||e.name,"x-component":e.html_type,default:e.default_val,"x-component-props":{placeholder:e.placeholder,clearable:"0"===e.is_empty,...e.componentProps||{}},"x-content":e.slots,"x-display":"0"===e.is_show?"hidden":"visible","x-pattern":"0"===e.is_edit?"disabled":"editable","x-compile-omitted":["title","x-component-props","x-decorator-props"]};e.reactions&&(t["x-reactions"]=e.reactions),e.noDecorator||Object.assign(t,{"x-decorator":"FORM_ITEM","x-decorator-props":{fieldItem:e,span:2*(e.elem_width||3),showLabel:"1"!==e.hide_title,remark:e.remark,propertyKey:e.val_key,annotation:e.annotation,...e.decoratorProps||{}}});const n=u(e);return n&&(t["x-validator"]=n),"0"===e.is_null&&(t.required=!0),t},f=e=>{var o;const t=x(e);e.urlConfig?function(e,o){Object.assign(e["x-component-props"],{...n(o,["urlConfig","wordbook"])})}(t,e):e.autograph&&m(t,e);const i=!!e.__multiple;return Object.assign(t["x-component-props"],{multiple:i,options:e.option||(null==(o=e.componentProps)?void 0:o.options),allowCreate:"1"===e.free_entry||!!t["x-component-props"].allowCreate,maxTagCount:r(e.multi_select_value),...n(e,["lazyRequest","requestCache"])}),i&&(t.type="array"),t},_=e=>{const o=x(e);return Object.assign(o["x-component-props"],{options:e.option,childFieldStrategy:e.childFieldStrategy,vertical:e.__vertical}),m(o,e),o},h=e=>{const t=x(e);return Object.assign(t["x-component-props"],{fieldItem:o(e,["reactions"])}),t},g=e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINEBAR","x-display":"visible","x-component-props":{disabled:"1"===e.is_not_fold,id:p(e.val_key),show:"0"!==e.is_show,remark:e.remark}}),b=new Map([["LINEBAR",g],["LINE_BREAKS",e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINE_BREAKS","x-display":"0"===e.is_show?"hidden":"visible"})],["INPUT",e=>{const o=x(e);return Object.assign(o["x-component-props"],{...n(e,["prefix","suffix"])}),o}],["TEXTAREA",e=>{const o=x(e);return Object.assign(o["x-component-props"],{rows:e.initialize_high||3}),o}],["INPUT_NUMBER",e=>{const o=x(e),{decimal_length:t,validate:n}=e;return Object.assign(o["x-component-props"],{precision:null!=t?t:null==n?void 0:n.decimal_length,prefix:e.prefix,suffix:e.suffix}),o}],["SELECT",f],["REMOTE_SEARCH",f],["DATE",e=>{const o=x(e);return Object.assign(o["x-component-props"],{valueFormat:e.date_format,type:c(e.date_format),validate:e.validate}),o}],["LEVEL_SEARCH_CASCADER",e=>{const o=x(e);return Object.assign(o["x-component-props"],{...n(e,["wordbook","lazyRequest","autograph"])}),o}],["SEARCH_CASCADER",e=>{var o;const t=x(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=x(e);return o.type="array",!1!==e.jsonCombination&&(o["x-component"]="JSON_COMBINATION"),Object.assign(o["x-decorator-props"],{showLabel:!1,showFeedback:!1}),Object.assign(o["x-component-props"],{title:e.alias||e.name,maxGroupNum:e.maxGroupNum,properties:e.children||[],combinationItemDeletable:e.combinationItemDeletable}),o}],["RADIO",_],["CHECKBOX",_],["SWITCH",e=>{const o=x(e);return Object.assign(o["x-component-props"],{openDescription:e.open,closeDescription:e.close}),o}],["SLIDER",e=>{const o=x(e);return Object.assign(o["x-component-props"],{step:r(e.step_length),max:r(e.max_length),min:r(e.min_length),option:e.option}),o}],["COMPLEX",e=>{const o=x(e);Array.isArray(e.properties)&&i("COMPLEX控件的properties属性已经废弃, 请使用children作为替代, 在之后的版本中properties属性将不再支持");const t=Array.isArray(e.properties||e.children)?C(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}]]),y=e=>{if(e.suffixConfig)return v(e);return(b.get(e.html_type)||h)(e)},v=o=>{if(!o.suffixConfig)return y(o);const t=e(o.suffixConfig),n=[{...o,is_show:"1",hide_title:"1",suffixConfig:void 0}].concat(t.map((e=>({...e,hide_title:"1",is_show:"1"})))),r=x(o);return Object.assign(r,{type:"void",name:a(n),title:o.alias||o.name,"x-component":"INPUT_GROUP","x-component-props":{span:2*(o.elem_width||3)},"x-decorator-props":{...r["x-decorator-props"],showFeedback:!1,suffixFields:n.map((e=>e.val_key))},properties:C(n)}),r},{FieldNormalizeWaterfallHook:O}=s();function C(o){let n=null;return o.reduce(((e,o,s)=>{var a;const p=null==(a=(o=O.call(t(o))).validate)?void 0:a.obj_type;return p&&d&&d.collect(p,t(o)),"LINEBAR"===o.html_type?(e[i(o)]=r(g(o),s),n=e[i(o)].properties={}):n?n[i(o)]=r(y(o),s):(n=null,e[i(o)]=r(y(o),s)),e}),{});function r(e,o){return e["x-index"]=o,e}function i(o){return o.suffixConfig?a([o,...e(o.suffixConfig)]):o.val_key}}return{schemaAdaptor:C}}export{d as useFieldListAdaptor};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { Form } from '@formily/core';
|
|
2
|
+
import { ContextCollector } from '../../../../../es/components/form-render';
|
|
3
|
+
export declare function useWordbookSetting(formModel: Form, changeContextCollector: ContextCollector): {
|
|
4
|
+
wordbookSettingHandler: (fieldKey: string, value: unknown) => void;
|
|
5
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{isField as n}from"@formily/core";function t(t,o){return{wordbookSettingHandler:function(r,e){var i,l;const u=t.query(r).take();if(!n(u))return;const c=function(n){var t,o;return null==(o=null==(t=n.decoratorProps)?void 0:t.fieldItem)?void 0:o.wordbook}(u);(null==(l=null==(i=null==c?void 0:c.setting)?void 0:i.cascading)?void 0:l.length)&&c.setting.cascading.forEach((i=>{var l;const u=function(n,t){return Object.values(n.fields).find((n=>n.title===t))}(t,i["form.name"]);if(!u||!n(u))return;const c=null==(l=o.getContext(r,e))?void 0:l.currentOption;c&&u.setValue(c[i.value])}))}}}export{t as useWordbookSetting};
|
|
@@ -78,15 +78,21 @@ export declare type FormWordbook = Partial<{
|
|
|
78
78
|
name: string;
|
|
79
79
|
render_key: string[];
|
|
80
80
|
search_key: string[];
|
|
81
|
+
value_key: string;
|
|
81
82
|
primary_key: string;
|
|
82
83
|
type: string;
|
|
83
|
-
value_key: string;
|
|
84
84
|
level_key: string;
|
|
85
85
|
link_key: string;
|
|
86
86
|
link_key_split: string;
|
|
87
87
|
show_key: string[];
|
|
88
88
|
conObj: AnyObject[];
|
|
89
89
|
conObjFirstLevel: AnyObject[];
|
|
90
|
+
setting: Partial<{
|
|
91
|
+
cascading: {
|
|
92
|
+
'form.name': string;
|
|
93
|
+
value: string;
|
|
94
|
+
}[];
|
|
95
|
+
}>;
|
|
90
96
|
}>;
|
|
91
97
|
export declare type CombinationItemDeletableFn = (itemData: AnyObject, index: number) => boolean;
|
|
92
98
|
export declare type FieldItem = {
|