cnhis-design-vue 3.2.14-beta.2 → 3.2.14-beta.7

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 (34) hide show
  1. package/es/components/ai-chat/src/components/ChatCard.js +1 -1
  2. package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
  3. package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
  4. package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -1
  5. package/es/components/fabric-chart/src/utils/index.d.ts +1 -0
  6. package/es/components/fabric-chart/src/utils/index.js +1 -1
  7. package/es/components/form-config/index.d.ts +7 -110
  8. package/es/components/form-config/index.js +1 -1
  9. package/es/components/form-config/src/FormConfig.vue.d.ts +7 -110
  10. package/es/components/form-config/src/FormConfig.vue2.js +1 -1
  11. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +2 -0
  12. package/es/components/form-config/src/components/FormConfigCreator.vue2.js +1 -1
  13. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +2 -2
  14. package/es/components/form-config/src/components/FormConfigEdit.vue2.js +1 -1
  15. package/es/components/form-config/src/components/renderer/DefaultNode.vue2.js +1 -1
  16. package/es/components/form-config/src/constants/index.d.ts +1 -11
  17. package/es/components/form-config/src/constants/index.js +1 -1
  18. package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
  19. package/es/components/form-config/src/hooks/useLocale.d.ts +52 -0
  20. package/es/components/form-config/src/hooks/useLocale.js +1 -0
  21. package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
  22. package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
  23. package/es/components/index.js +1 -1
  24. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  25. package/es/components/select-label/src/ihoLabel/IhoLabelFormContent.vue2.js +1 -1
  26. package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue2.js +1 -1
  27. package/es/env.d.ts +25 -25
  28. package/es/shared/package.json.js +1 -1
  29. package/es/shared/types/index.d.ts +3 -0
  30. package/es/shared/utils/index.d.ts +1 -0
  31. package/es/shared/utils/index.js +1 -1
  32. package/package.json +2 -2
  33. package/es/components/form-config/src/components/FormConfigEventSetting.vue.js +0 -1
  34. package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +0 -1
@@ -1 +1 @@
1
- import{defineComponent as e,inject as t,ref as a,reactive as l,computed as n,watch as o,createVNode as i}from"vue";import{NForm as s,NFormItem as r,NInput as u,NIcon as d,NButton as c}from"naive-ui";import{InjectionAIChat as v}from"../types/index.js";import"../../../index.js";import{cloneDeep as p,isArray as m}from"lodash-es";import{isValidJSON as f}from"../utils/index.js";import{ChevronDown as g,ChevronForward as b}from"@vicons/ionicons5";import{useTheme as h}from"../../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import"@vue/shared";import"../../../../shared/utils/index.js";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import"../../../../shared/hooks/useScrollLoading.js";import y from"../../../form-render/index.js";import E from"../../../template-render/index.js";var I=e({name:"ChatCard",inheritAttrs:!1,props:{msgItem:{type:Object,default:()=>({})},selectParams:{type:Object},configs:{type:Object},msgId:{type:String}},emits:["button-click"],setup(e,{attrs:I,slots:k,emit:x}){const T={TEXT:"INPUT",NUMBER:"INPUT_NUMBER",DATETIME:"DATETIME-INPUT",MULTI_SELECT:"REMOTE_SEARCH",SELECT:"REMOTE_SEARCH"},_=h(),{patientInfo:P,state:C,axiosInstance:O,isSmall:S}=t(v),j=a([]),R=a(),M=a(),N=l({vaa05:""}),w=a(),L=n((()=>{var t,a;return!!(null==(a=null==(t=e.msgItem)?void 0:t.content)?void 0:a.body)})),q=e.msgItem.content,A={},U=l(p(q.data||{})),F={beforeRequest(e,t,a){(null==t?void 0:t.params)&&(t.params.vaa05=M.value.selectedPatient.vaa01),t&&Reflect.has(t,"configs")&&(t.configs=M.value.selectedPatient)}};function K(e){const{eventName:t,data:a}=e;t&&x("button-click",{buttonInfo:a,isBI:!0})}function H(e){q.data[e.button.id+"Disabled"]="1",x("button-click",{buttonInfo:e.button})}function B(){if(!M.value)return null;function t(){e.msgItem.disabled||(C.showPatient=!0)}return i(s,{class:"form-render",ref:w,"require-mark-placement":"left",disabled:e.msgItem.disabled,model:N,rules:{vaa05:{required:M.value.required,message:M.value.name+"为必填",trigger:["input"]}}},{default:()=>[i(r,{label:M.value.name,path:"vaa05",class:"form-render__formItem",style:"--n-feedback-height: 16px; --n-feedback-padding: 0px; --n-feedback-font-size: 12px"},{default:()=>[i(u,{style:"--n-text-color-disabled: #000; --n-placeholder-color-disabled: #000;--n-padding-left: 8px; --n-padding-right: 8px",readonly:!0,value:N.vaa05,placeholder:"请选择",onClick:t},{suffix:()=>i(d,{color:"#c2c2c2",component:g},null)})]})]})}async function J(t,a){var l;try{const n=a||R.value.getFormValues();await(null==(l=R.value)?void 0:l.validate()),q.body.items.forEach((e=>{var t;"vaa05"===e.code?(e._value=C.selectedPatientLabel,e.value=M.value.selectedPatient.vaa01||e.value):n[e.code]&&(e.value=n[e.code]),(null==(t=A[e.code])?void 0:t[0])&&(e.options=A[e.code])})),C.loading=!0,x("button-click",{values:n,buttonInfo:t,patient:M.value.selectedPatient||e.configs,isForm:!0})}catch(e){C.loading=!1}}function z(e){const{fieldInstance:t,context:a,value:l,fieldKey:n}=e;"REMOTE_SEARCH"===t.componentType&&(null==l?void 0:l.length)&&(A[n]=[null==a?void 0:a.currentOption])}function D(){x("button-click",{showMore:!0})}function V(){var e;if("1834043761964638208"!==(null==(e=q.settings)?void 0:e.id)||!q.data)return null;const t=JSON.parse(q.settings.setting),a=e=>{var t;let l="";for(let n=0;n<e.length;n++){const o=e[n];if(o.setting.scopeKey){l=o.setting.scopeKey;break}if((null==(t=o.childrens)?void 0:t.length)&&(l=a(o.childrens),l))break}return l},l=a(t.templates);return!l||!f(q.data[l])||JSON.parse(q.data[l]).length<=5?null:(f(U[l])&&(U[l]=JSON.parse(U[l]).slice(0,5)),i(c,{block:!0,text:!0,"icon-placement":"right",color:_.value["--c-primary-color"],style:"margin-top: 10px",onClick:D},{icon:()=>i(d,{component:b},null),default:()=>"查看更多"}))}return L.value&&(j.value=(q.body.items||[]).map((t=>{var a,l,n;if("vaa05"===t.code&&!S.value)return M.value={...t},t._value?N.vaa05=t._value:(null==(a=t.options)?void 0:a.length)&&t.value&&(N.vaa05=null==(l=t.options.find((e=>e.value===t.value)))?void 0:l.label,M.value.selectedPatient=e.configs),null;const o={html_type:T[t.type]||t.type,val_key:t.code,name:t.name,elem_width:12,default_val:t.value,lazyRequest:!0,requestCache:!0,urlConfig:{nameKey:null!=(n=t.labelField)?n:"label"},option:[],is_null:t.required?"0":"1",is_edit:e.msgItem.disabled?"0":"1",componentProps:{},multi_select:"MULTI_SELECT"===t.type?"0":"1"};if("REMOTE_SEARCH"===o.html_type){if(o.componentProps={fallbackOption:!1},o.option=t.options||[],o.default_val=null,t.value&&m(t.options)&&t.options.length>0){t.options.find((e=>(null==e?void 0:e.value)===t.value))&&(o.default_val=t.value)}Object.assign(o.urlConfig,{url:"/flow/api/instruction/parameter/getOptionsValues",method:"post",params:{...e.selectParams,code:t.code,source:S.value?"inner":"global",configs:P.value.info||C.selectedPatient},dependKey:[]}),m(t.dependencies)&&t.dependencies.length&&(o.urlConfig.dependKey=t.dependencies,t.dependencies.includes("vaa05")&&(o.urlConfig.params.params={vaa05:""}))}return o})).filter((e=>!!e))),o((()=>C.showPatient),(t=>{!e.msgItem.disabled&&L.value&&!t&&C.selectedPatientLabel&&M.value&&(N.vaa05=C.selectedPatientLabel,M.value.selectedPatient={...C.selectedPatientForm})})),()=>{var t;return i("div",{class:"card"},[L.value?[i("p",null,[q.title||q.header.title]),i("div",{class:"form-box"},[[B(),i(y,{"request-instance":{get:O.get,post:O.post},"life-cycle":F,column:12,ref:R,"field-list":j.value,onFormChange:z},null)]]),q.footer.buttons.map((t=>function(t){const a={width:"100%","--n-height":"36px",fontSize:"15px",marginTop:"10px"},l=L.value?{...a,marginTop:"0"}:a;return i(c,{id:e.msgId,style:l,secondary:!0,class:"gradient",disabled:e.msgItem.disabled,onClick:async function(){var e;if(L.value){if(!R.value)return;try{M.value?null==(e=w.value)||e.validate((async e=>{var a,l;if(!e){const e=null==(l=(a=R.value).getFormValues)?void 0:l.call(a);Object.assign(e,{vaa05:M.value.selectedPatient.vaa01}),await J(t,e)}})):await J(t)}catch(e){}}else x("button-click")}},{default:()=>[L.value?null==t?void 0:t.text:q.buttonName]})}(t)))]:[i(E,{config:f(null==(t=q.settings)?void 0:t.setting)?JSON.parse(q.settings.setting):null,data:U,"onModule-click":K,"onButton-click":H},null),V()]])}}});export{I as default};
1
+ import{defineComponent as e,inject as t,ref as a,reactive as l,computed as n,watch as o,createVNode as i}from"vue";import{NForm as s,NFormItem as r,NInput as u,NIcon as d,NButton as c}from"naive-ui";import{InjectionAIChat as v}from"../types/index.js";import"../../../index.js";import{cloneDeep as m,isArray as p}from"lodash-es";import{isValidJSON as f}from"../utils/index.js";import{ChevronDown as g,ChevronForward as b}from"@vicons/ionicons5";import{useTheme as h}from"../../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import"@vue/shared";import"../../../../shared/utils/index.js";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import"../../../../shared/hooks/useScrollLoading.js";import y from"../../../form-render/index.js";import E from"../../../template-render/index.js";var I=e({name:"ChatCard",inheritAttrs:!1,props:{msgItem:{type:Object,default:()=>({})},selectParams:{type:Object},configs:{type:Object},msgId:{type:String}},emits:["button-click"],setup(e,{attrs:I,slots:k,emit:x}){const T={TEXT:"INPUT",NUMBER:"INPUT_NUMBER",DATETIME:"DATETIME-INPUT",MULTI_SELECT:"REMOTE_SEARCH",SELECT:"REMOTE_SEARCH"},_=h(),{patientInfo:P,state:C,axiosInstance:O,isSmall:S}=t(v),j=a([]),R=a(),M=a(),N=l({vaa05:""}),w=a(),L=n((()=>{var t,a;return!!(null==(a=null==(t=e.msgItem)?void 0:t.content)?void 0:a.body)})),q=e.msgItem.content,A={},U=l(m(q.data||{})),F={beforeRequest(e,t,a){(null==t?void 0:t.params)&&(t.params.vaa05=M.value.selectedPatient.vaa01),t&&Reflect.has(t,"configs")&&(t.configs=M.value.selectedPatient)}};function K(e){const{eventName:t,data:a}=e;t&&x("button-click",{buttonInfo:a,isBI:!0})}function H(e){q.data[e.button.id+"Disabled"]="1",x("button-click",{buttonInfo:e.button})}function B(){if(!M.value)return null;function t(){e.msgItem.disabled||(C.showPatient=!0)}return i(s,{class:"form-render",ref:w,"require-mark-placement":"left",disabled:e.msgItem.disabled,model:N,rules:{vaa05:{required:M.value.required,message:M.value.name+"为必填",trigger:["input"]}}},{default:()=>[i(r,{label:M.value.name,path:"vaa05",class:"form-render__formItem",style:"--n-feedback-height: 16px; --n-feedback-padding: 0px; --n-feedback-font-size: 12px"},{default:()=>[i(u,{style:"--n-text-color-disabled: #000; --n-placeholder-color-disabled: #000;--n-padding-left: 8px; --n-padding-right: 8px",readonly:!0,value:N.vaa05,placeholder:"请选择",onClick:t},{suffix:()=>i(d,{color:"#c2c2c2",component:g},null)})]})]})}async function J(t,a){var l;try{const n=a||R.value.getFormValues();await(null==(l=R.value)?void 0:l.validate()),q.body.items.forEach((e=>{var t;"vaa05"===e.code?(e._value=C.selectedPatientLabel,e.value=M.value.selectedPatient.vaa01||e.value):n[e.code]&&(e.value=n[e.code]),(null==(t=A[e.code])?void 0:t[0])&&(e.options=A[e.code])})),C.loading=!0,x("button-click",{values:n,buttonInfo:t,patient:M.value.selectedPatient||e.configs,isForm:!0})}catch(e){C.loading=!1}}function z(e){const{fieldInstance:t,context:a,value:l,fieldKey:n}=e;"REMOTE_SEARCH"===t.componentType&&(null==l?void 0:l.length)&&(A[n]=[null==a?void 0:a.currentOption])}function D(){x("button-click",{showMore:!0})}function V(){var e;if("1834043761964638208"!==(null==(e=q.settings)?void 0:e.id)||!q.data)return null;const t=JSON.parse(q.settings.setting),a=e=>{var t;let l="";for(let n=0;n<e.length;n++){const o=e[n];if(o.setting.scopeKey){l=o.setting.scopeKey;break}if((null==(t=o.childrens)?void 0:t.length)&&(l=a(o.childrens),l))break}return l},l=a(t.templates);return!l||!f(q.data[l])||JSON.parse(q.data[l]).length<=5?null:(f(U[l])&&(U[l]=JSON.parse(U[l]).slice(0,5)),i(c,{block:!0,text:!0,"icon-placement":"right",color:_.value["--c-primary-color"],style:"margin-top: 10px",onClick:D},{icon:()=>i(d,{component:b},null),default:()=>"查看更多"}))}return L.value&&(j.value=(q.body.items||[]).map((t=>{var a,l,n;if("vaa05"===t.code&&!S.value)return M.value={...t},t._value?N.vaa05=t._value:(null==(a=t.options)?void 0:a.length)&&t.value&&(N.vaa05=null==(l=t.options.find((e=>e.value===t.value)))?void 0:l.label,M.value.selectedPatient=e.configs),null;const o={html_type:T[t.type]||t.type,val_key:t.code,name:t.name,elem_width:12,default_val:t.value,lazyRequest:!0,requestCache:!0,urlConfig:{nameKey:null!=(n=t.labelField)?n:"label"},option:[],is_null:t.required?"0":"1",is_edit:e.msgItem.disabled?"0":"1",componentProps:{},multi_select:"MULTI_SELECT"===t.type?"0":"1"};if("REMOTE_SEARCH"===o.html_type){if(o.componentProps={fallbackOption:!1},o.option=t.options||[],o.default_val=null,t.value&&p(t.options)&&t.options.length>0){t.options.find((e=>(null==e?void 0:e.value)===t.value))&&(o.default_val=t.value)}if(Object.assign(o.urlConfig,{url:"/flow/api/instruction/parameter/getOptionsValues",method:"post",params:{...e.selectParams,code:t.code,source:S.value?"inner":"global",configs:P.value.info||C.selectedPatient},dependKey:[]}),t.dependencies){const e=t.dependencies.split(",");o.urlConfig.dependKey=e,e.includes("vaa05")&&(o.urlConfig.params.params={vaa05:""})}}return o})).filter((e=>!!e))),o((()=>C.showPatient),(t=>{!e.msgItem.disabled&&L.value&&!t&&C.selectedPatientLabel&&M.value&&(N.vaa05=C.selectedPatientLabel,M.value.selectedPatient={...C.selectedPatientForm})})),()=>{var t;return i("div",{class:"card"},[L.value?[i("p",null,[q.title||q.header.title]),i("div",{class:"form-box"},[[B(),i(y,{"request-instance":{get:O.get,post:O.post},"life-cycle":F,column:12,ref:R,"field-list":j.value,onFormChange:z},null)]]),q.footer.buttons.map((t=>function(t){const a={width:"100%","--n-height":"36px",fontSize:"15px",marginTop:"10px"},l=L.value?{...a,marginTop:"0"}:a;return i(c,{id:e.msgId,style:l,secondary:!0,class:"gradient",disabled:e.msgItem.disabled,onClick:async function(){var e;if(L.value){if(!R.value)return;try{M.value?null==(e=w.value)||e.validate((async e=>{var a,l;if(!e){const e=null==(l=(a=R.value).getFormValues)?void 0:l.call(a);Object.assign(e,{vaa05:M.value.selectedPatient.vaa01}),await J(t,e)}})):await J(t)}catch(e){}}else x("button-click")}},{default:()=>[L.value?null==t?void 0:t.text:q.buttonName]})}(t)))]:[i(E,{config:f(null==(t=q.settings)?void 0:t.setting)?JSON.parse(q.settings.setting):null,data:U,"onModule-click":K,"onButton-click":H},null),V()]])}}});export{I as default};
@@ -175,9 +175,6 @@ declare const _default: import("vue").DefineComponent<{
175
175
  modelValue: unknown[];
176
176
  componentData: Record<string, any>;
177
177
  } & {
178
- /**
179
- * 改变弹窗大小
180
- */
181
178
  itemKey?: string | Function | undefined;
182
179
  }>, {
183
180
  move: Function;
@@ -1 +1 @@
1
- import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{defaultStyle as t}from"../useDraw.js";import"date-fns";import{cloneDeep as i,last as l}from"lodash-es";import"../useEvent.js";import"vue";import"./useShadow.js";import"@vueuse/shared";import"naive-ui";import"@vueuse/core";function n(n,o,r,u,a,s){const{left:h,other:f,vitalSignsOriginY:c,xCellWidth:g,yCellHeight:v,endX:d}=o,p=(()=>{const e=Math.min(...((null==f?void 0:f.list)||[]).map((e=>{var t,i;return null!=(i=null==(t=e.style)?void 0:t.fontSize)?i:12})));return v<11?e:v})();let m=0;function b(i,l,o,u=!1){const a=[],s=u&&i.fixed&&i.fixedValue?i.fixedValue:i.value;String(s).split("").forEach(((l,n)=>{const o=new e.Text(l,{left:0,top:p*n,originX:"center",...t,objectCaching:!1,...i.style||{}});m=(p-(o.height||0))/2,a.push(o)}));const h=new e.Rect({left:0,top:0,width:g,height:p*a.length,fill:"transparent",originX:"center",...t}),{eventHighlight:c=!1}=f||{},d={originX:"center",left:l,top:o+m,baseTop:(i.baseTop||0)*v,trueLeft:l,trueHeight:a.length*p,objectCaching:!1,hoverCursor:"pointer",highlightObject:h,originData:i,selectable:!1,evented:c},b=new e.Group([h,...a],d);return function(e){const{highlightColor:t="#ffff00"}=f||{};e.on("mouseover",(()=>{e.highlightObject.set("fill",t),n.value.requestRenderAll()})),e.on("mouseout",(()=>{e.highlightObject.set("fill","transparent"),n.value.requestRenderAll()})),e.on("mousedown",(function(){r("eventClick",e.originData)}))}(b),n.value.add(b),b}!function(){var e,t;if(!(null==f?void 0:f.list))return!1;const n=[],o=[];i(f.list).forEach(((e,t)=>{e.value=e.value||"";const i=0===t?"vertical":e.align||"vertical",l=u(e.time,!0);if(l>d)return;const n=o.find((e=>e.left==l));if(n)n[i].push(e);else{const t={left:l,vertical:[],horizontal:[]};t[i].push(e),o.push(t)}}));const r=null==(t=null==(e=h.yScaleValue)?void 0:e.find((e=>"temperature"===e.type)))?void 0:t.list,m=(null==r?void 0:r.length)?a("temperature",35):0;o.forEach((e=>{let t=c.originY,i=e.left,o=0,r=m,u=i;function a(e,t){var o,a;if((e=>e.fixed&&m&&(e.fixedValue||e.value))(e)){const h=[...s].find((e=>Math.abs(e.left-i)<1));h&&(t||Math.abs(i-u)>1)&&(r=h.top+h.height),u=i,n.push(b(e,i,r,!0)),r+=null!=(a=null==(o=l(n))?void 0:o.trueHeight)?a:0}}e.vertical.forEach(((r,u)=>{var s,h,f;const d=(r.baseTop||0)*v,m=(null==(s=l(n))?void 0:s.left)||0;0===u&&e.left<=m&&(i=m+g);if(n.filter((e=>e.trueLeft===i)).length){const e=String(r.value).length;t+=o,t+e*p+d>c.endY&&(t=c.originY,i+=g)}t+=d,String(r.value).length&&(n.push(b(r,i,t)),o=null!=(f=null==(h=l(n))?void 0:h.trueHeight)?f:0),a(r,0===u)})),e.horizontal.forEach(((t,o)=>{var r,u;const s=c.originY+(t.baseTop||0)*v,h=(null==(r=l(n))?void 0:r.left)||0;e.left<=h&&(i=h+g),String(t.value).length&&n.push(b(t,i,s)),a(t,0===(null==(u=e.vertical)?void 0:u.length)&&0===o)}))}))}()}export{n as useOther};
1
+ import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{defaultStyle as t}from"../useDraw.js";import"date-fns";import{cloneDeep as i,last as l}from"lodash-es";import"../useEvent.js";import"vue";import"./useShadow.js";import"@vueuse/shared";import"naive-ui";import"@vueuse/core";function n(n,o,r,u,a,s){const{left:h,other:f,vitalSignsOriginY:c,xCellWidth:g,yCellHeight:v,endX:d}=o,p=(()=>{const e=Math.min(...((null==f?void 0:f.list)||[]).map((e=>{var t,i;return null!=(i=null==(t=e.style)?void 0:t.fontSize)?i:12})));return v<11?e:v})();let m=0;function b(i,l,o,u=!1){const a=[],s=u&&i.fixed&&i.fixedValue?i.fixedValue:i.value;String(s).split("").forEach(((l,n)=>{const o=new e.Text(l,{left:0,top:p*n,originX:"center",...t,objectCaching:!1,...i.style||{}});m=(p-(o.height||0))/2,a.push(o)}));const h=new e.Rect({left:0,top:0,width:g,height:p*a.length,fill:"transparent",originX:"center",...t}),{eventHighlight:c=!1}=f||{},d={originX:"center",left:l,top:o+m,baseTop:(i.baseTop||0)*v,trueLeft:l,trueHeight:a.length*p,objectCaching:!1,hoverCursor:"pointer",highlightObject:h,originData:i,selectable:!1,evented:c},b=new e.Group([h,...a],d);return function(e){const{highlightColor:t="#ffff00"}=f||{};e.on("mouseover",(()=>{e.highlightObject.set("fill",t),n.value.requestRenderAll()})),e.on("mouseout",(()=>{e.highlightObject.set("fill","transparent"),n.value.requestRenderAll()})),e.on("mousedown",(function(){r("eventClick",e.originData)}))}(b),n.value.add(b),b}!function(){var e,t;if(!(null==f?void 0:f.list))return!1;const n=[],o=[];i(f.list).forEach(((e,t)=>{e.value=e.value||"";const i=0===t?"vertical":e.align||"vertical",l=u(e.time,!0);if(l>d)return;const n=o.find((e=>e.left==l));if(n)n[i].push(e);else{const t={left:l,vertical:[],horizontal:[]};t[i].push(e),o.push(t)}}));const r=null==(t=null==(e=h.yScaleValue)?void 0:e.find((e=>"temperature"===e.type)))?void 0:t.list,m=(null==r?void 0:r.length)?a("temperature",35):0,j=e=>e.fixed&&m&&(e.fixedValue||e.value);o.forEach((e=>{let t=c.originY,i=e.left,o=0,r=m,u=i;function a(e,t){if(j(e)){const l=[...s].find((e=>Math.abs(e.left-i)<1));l&&(t||Math.abs(i-u)>1)&&(r=l.top+l.height),u=i,n.push(b(e,i,r,!0))}}e.vertical.forEach(((u,s)=>{var h,f,d,m,x;const S=(u.baseTop||0)*v,w=(null==(h=l(n))?void 0:h.left)||0;0===s&&e.left<=w&&(i=w+g);if(n.filter((e=>e.trueLeft===i)).length){const e=String(u.value).length;t+=o,t+e*p+S>c.endY&&(t=c.originY,i+=g)}t+=S,String(u.value).length&&(n.push(b(u,i,t)),o=null!=(d=null==(f=l(n))?void 0:f.trueHeight)?d:0),a(u,0===s),j(u)&&(r+=null!=(x=null==(m=l(n))?void 0:m.trueHeight)?x:0)})),e.horizontal.forEach(((t,o)=>{var u,s;const h=c.originY+(t.baseTop||0)*v;r=m;const f=(null==(u=l(n))?void 0:u.left)||0;e.left<=f&&(i=f+g),String(t.value).length&&n.push(b(t,i,h)),a(t,0===(null==(s=e.vertical)?void 0:s.length)&&0===o)}))}))}()}export{n as useOther};
@@ -1 +1 @@
1
- import{format as e}from"date-fns";import{getTime as n,getFloorNumber as t}from"../utils/index.js";import{last as l}from"lodash-es";function i(i){const{xScaleList:u,xCellWidth:r,yCellHeight:c,left:o,vitalSignsOriginY:a,painOriginY:d,canvasWidth:s}=i;function f(e){let n=0;const t=o.yScaleValue.find((n=>n.type===e)),l=(null==t?void 0:t.list)||[];return l.length?(n=c/((l[1]-l[0])/t.spaceGridNumber),{yScaleCell:n,list:l}):{yScaleCell:n,list:l}}return{computedX:function(e,t=!1){const i=n(e),[r]=u,c=l(u);if(i<r.start)return 0;if(i>c.end)return s;const o=u.findIndex((e=>e.end>=i));if(o>-1){return u[o].center}},computedY:function(e,n){const{yScaleCell:t,list:l}=f(e),i=+n-Math.min(...l);return("pain"===e?d.endY:a.endY)-t*i},getXValue:function(n){const t=u.findIndex((e=>e.left+r>=n));if(t>-1){const l=u[t],i=n-l.left,r=l.scaleCell*i,c=l.start+r;return e(new Date(c),"yyyy-MM-dd HH:mm")}},getYValue:function(e,n){const{yScaleCell:l,list:i}=f(e),u=i.length?Math.min(...i):0,r="pain"===e?d.endY:a.endY;return t((r-n)/l+u)}}}function u(l){const{xAxis:i,originX:u,originY:r,xCellWidth:c,endY:o,timeXCell:a,startTime:d,scaleValues:s}=l;return{computedX:function(e){return(n(e)-d)/a+u},computedY:function(e,n,t){const[i]=n;return o-(+t-i)*l[`${e}YCell`]},getXValue:function(n){return e(new Date((n-u)*a+d),"yyyy-MM-dd HH:mm")},getYValue:function(e,n){const i=s.find((n=>[n.key,n.type||""].includes(e))),[u]=(null==i?void 0:i.range)||[0],r=(o-n)/l[`${e}YCell`]+u;return t(r)}}}function r(e){const{config:n,xCellWidth:l,yCellHeight:i}=e,{hz:u,mainXCellValue:r,valueUnit:c,mainYCellValue:o}=n;return{computedX:function(e){return e/u/r*l},computedY:function(e){return("uv"===c?.001*e:"v"===c?1e3*e:e)/o*i},getXValue:function(e){return t(r/l*e)},getYValue:function(e){return t(o/i*e)}}}export{u as useBirthProcessCumputedPoint,i as useCumputedPoint,r as useElectrocardiogramCumputedPoint};
1
+ import{format as e}from"date-fns";import{getTime as n,getRoundNumber as t,getFloorNumber as l}from"../utils/index.js";import{last as i}from"lodash-es";function u(l){const{xScaleList:u,xCellWidth:r,yCellHeight:c,left:o,vitalSignsOriginY:a,painOriginY:d,canvasWidth:s}=l;function f(e){let n=0;const t=o.yScaleValue.find((n=>n.type===e)),l=(null==t?void 0:t.list)||[];return l.length?(n=c/((l[1]-l[0])/t.spaceGridNumber),{yScaleCell:n,list:l}):{yScaleCell:n,list:l}}return{computedX:function(e,t=!1){const l=n(e),[r]=u,c=i(u);if(l<r.start)return 0;if(l>c.end)return s;const o=u.findIndex((e=>e.end>=l));if(o>-1){return u[o].center}},computedY:function(e,n){const{yScaleCell:t,list:l}=f(e),i=+n-Math.min(...l);return("pain"===e?d.endY:a.endY)-t*i},getXValue:function(n){const t=u.findIndex((e=>e.left+r>=n));if(t>-1){const l=u[t],i=n-l.left,r=l.scaleCell*i,c=l.start+r;return e(new Date(c),"yyyy-MM-dd HH:mm")}},getYValue:function(e,n){const{yScaleCell:l,list:i}=f(e),u=i.length?Math.min(...i):0,r="pain"===e?d.endY:a.endY;return t((r-n)/l+u,"temperature"===e?10:1)}}}function r(t){const{xAxis:i,originX:u,originY:r,xCellWidth:c,endY:o,timeXCell:a,startTime:d,scaleValues:s}=t;return{computedX:function(e){return(n(e)-d)/a+u},computedY:function(e,n,l){const[i]=n;return o-(+l-i)*t[`${e}YCell`]},getXValue:function(n){return e(new Date((n-u)*a+d),"yyyy-MM-dd HH:mm")},getYValue:function(e,n){const i=s.find((n=>[n.key,n.type||""].includes(e))),[u]=(null==i?void 0:i.range)||[0],r=(o-n)/t[`${e}YCell`]+u;return l(r)}}}function c(e){const{config:n,xCellWidth:t,yCellHeight:i}=e,{hz:u,mainXCellValue:r,valueUnit:c,mainYCellValue:o}=n;return{computedX:function(e){return e/u/r*t},computedY:function(e){return("uv"===c?.001*e:"v"===c?1e3*e:e)/o*i},getXValue:function(e){return l(r/t*e)},getYValue:function(e){return l(o/i*e)}}}export{r as useBirthProcessCumputedPoint,u as useCumputedPoint,c as useElectrocardiogramCumputedPoint};
@@ -14,6 +14,7 @@ export declare function getType(type: string): string;
14
14
  export declare function isValidValue(value: number | string): boolean;
15
15
  export declare function isOverlapPoint(pointObj1: any, pointObj2: any): boolean;
16
16
  export declare function getFloorNumber(value: number, n?: number): number;
17
+ export declare function getRoundNumber(value: number, n?: number): number;
17
18
  export declare function getChildrenSize(treeData: ITreeItem[]): number;
18
19
  export declare function getTime(value: number | string): number;
19
20
  /**
@@ -1 +1 @@
1
- import{isNull as t,isNumber as n}from"lodash-es";function e(t){return(null==t?void 0:t.time)&&((null==t?void 0:t.value)||0===(null==t?void 0:t.value))}function r(t,n){const e={};for(const r in t)n.map((t=>t.type)).includes(r)||(e[r]=t[r]);return e}function u(t){return["temperature","pulse"].includes(t.type)&&t.dataList.length&&!!t.dataList.find((t=>t.enable))}function o(t,n){const e=n.findIndex((n=>d(n.time)>d(t)));return~e?e:n.length}function i(t,n){return t.includes("心率")?"pulse_other":n}function l(t){return t.includes("_other")?t.split("_")[0]:t}function c(n){return!Number.isNaN(+n)&&!t(n)}function f(t,n){return a(t.left,1)===a(n.left,1)&&Math.abs(a(t.top,1)-a(n.top,1))<=2}function a(t,n=100){return Math.floor(t*n)/n}function s(t){let n=0;return t.forEach((t=>{var e;(null==(e=t.children)?void 0:e.length)?n+=s(t.children):n++})),n}function d(t){return t?n(t)?new Date(t).getTime():Date.parse(t.replace(/-/g,"/")):Date.now()}function p(t,n){const e=[],[r,u]=t;n=n||1;for(let t=r;n>0?t<=u:t>=u;t+=n)e.push(t);return e}function h(t){const{width:n,height:e,left:r,top:u}=t,o=n/2,i=e/2;return{minLeft:r-o,maxLeft:r+o,minTop:u-i,maxTop:u+i}}export{r as deleteProperty,s as getChildrenSize,a as getFloorNumber,o as getIndex,h as getPointRange,p as getScaleNumberList,d as getTime,l as getType,e as isEffectiveNode,u as isOneLine,f as isOverlapPoint,c as isValidValue,i as setOtherType};
1
+ import{isNull as n,isNumber as t}from"lodash-es";function e(n){return(null==n?void 0:n.time)&&((null==n?void 0:n.value)||0===(null==n?void 0:n.value))}function r(n,t){const e={};for(const r in n)t.map((n=>n.type)).includes(r)||(e[r]=n[r]);return e}function u(n){return["temperature","pulse"].includes(n.type)&&n.dataList.length&&!!n.dataList.find((n=>n.enable))}function o(n,t){const e=t.findIndex((t=>p(t.time)>p(n)));return~e?e:t.length}function i(n,t){return n.includes("心率")?"pulse_other":t}function l(n){return n.includes("_other")?n.split("_")[0]:n}function c(t){return!Number.isNaN(+t)&&!n(t)}function f(n,t){return a(n.left,1)===a(t.left,1)&&Math.abs(a(n.top,1)-a(t.top,1))<=2}function a(n,t=100){return Math.floor(n*t)/t}function s(n,t=1){return Math.round(n*t)/t}function d(n){let t=0;return n.forEach((n=>{var e;(null==(e=n.children)?void 0:e.length)?t+=d(n.children):t++})),t}function p(n){return n?t(n)?new Date(n).getTime():Date.parse(n.replace(/-/g,"/")):Date.now()}function h(n,t){const e=[],[r,u]=n;t=t||1;for(let n=r;t>0?n<=u:n>=u;n+=t)e.push(n);return e}function m(n){const{width:t,height:e,left:r,top:u}=n,o=t/2,i=e/2;return{minLeft:r-o,maxLeft:r+o,minTop:u-i,maxTop:u+i}}export{r as deleteProperty,d as getChildrenSize,a as getFloorNumber,o as getIndex,m as getPointRange,s as getRoundNumber,h as getScaleNumberList,p as getTime,l as getType,e as isEffectiveNode,u as isOneLine,f as isOverlapPoint,c as isValidValue,i as setOtherType};
@@ -1,5 +1,6 @@
1
1
  import { SFCWithInstall } from '../../shared/types';
2
2
  export * from './src/types';
3
+ export * from './src/hooks/useLocale';
3
4
  declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
4
5
  maxHeight: {
5
6
  type: StringConstructor;
@@ -16,7 +17,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
16
17
  extraMaterialList: {
17
18
  type: import("vue").PropType<import("./src/types").FormConfigItem[] | (() => import("./src/types").FormConfigItem[] | Promise<import("./src/types").FormConfigItem[]>)>;
18
19
  };
19
- showLowCodeReactions: BooleanConstructor;
20
20
  formProps: {
21
21
  type: import("vue").PropType<Partial<Partial<{
22
22
  fieldList: import("..").FieldItem[];
@@ -144,7 +144,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
144
144
  extraMaterialList: {
145
145
  type: import("vue").PropType<import("./src/types").FormConfigItem[] | (() => import("./src/types").FormConfigItem[] | Promise<import("./src/types").FormConfigItem[]>)>;
146
146
  };
147
- showLowCodeReactions: BooleanConstructor;
148
147
  formProps: {
149
148
  type: import("vue").PropType<Partial<Partial<{
150
149
  fieldList: import("..").FieldItem[];
@@ -258,9 +257,8 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
258
257
  }>> & {
259
258
  onAddItem?: ((...args: any[]) => any) | undefined;
260
259
  onRemoveItem?: ((...args: any[]) => any) | undefined;
261
- onReactionsValidateFailure?: ((...args: any[]) => any) | undefined;
262
260
  }>>;
263
- emit: (event: "addItem" | "removeItem" | "reactionsValidateFailure", ...args: any[]) => void;
261
+ emit: (event: "addItem" | "removeItem", ...args: any[]) => void;
264
262
  uuid: string;
265
263
  cssVars: import("vue").ComputedRef<import("../../shared/types").AnyObject>;
266
264
  fieldListRef: import("vue").Ref<import("./src/types").FormConfigItem[]>;
@@ -317,6 +315,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
317
315
  extraOptions: import("vue").ComputedRef<import("./src/types").FormConfigItem[]>;
318
316
  onFocus: () => Promise<void>;
319
317
  useVersion: typeof import("../../shared/hooks").useVersion;
318
+ useFormConfigLocale: typeof import("./src/hooks/useLocale").useFormConfigLocale;
320
319
  Draggable: import("vue").DefineComponent<{
321
320
  list: {
322
321
  type: ArrayConstructor;
@@ -404,6 +403,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
404
403
  NButton: any;
405
404
  NButtonGroup: any;
406
405
  NPopconfirm: any;
406
+ useFormConfigLocale: typeof import("./src/hooks/useLocale").useFormConfigLocale;
407
407
  CFormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
408
408
  formRenderRef: import("vue").Ref<import("..").FormRenderExpose | undefined>;
409
409
  key: import("vue").Ref<number>;
@@ -2444,8 +2444,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
2444
2444
  __extra?: boolean | undefined;
2445
2445
  }>;
2446
2446
  generateFieldListByFormConfigItem: (formConfigItem: import("./src/types").FormConfigItem, fieldItem?: import("..").FieldItem | undefined) => import("..").FieldItem[];
2447
- showModal: import("vue").Ref<boolean>;
2448
- onPositiveClick: () => Promise<void>;
2449
2447
  prevOldField: null;
2450
2448
  onFormChange: ({ fieldKey, value }: import("..").FormChangePayload) => void;
2451
2449
  createLabelRender: (originOptions?: import("../../shared/types").AnyObject[] | undefined) => (label: string) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
@@ -2671,6 +2669,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
2671
2669
  }[]>;
2672
2670
  onOptionModalCancel: () => void;
2673
2671
  onOptionModalConfirm: () => void;
2672
+ useFormConfigLocale: typeof import("./src/hooks/useLocale").useFormConfigLocale;
2674
2673
  NModal: any;
2675
2674
  NSpace: any;
2676
2675
  NInput: any;
@@ -3785,104 +3784,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
3785
3784
  }>>>;
3786
3785
  };
3787
3786
  }>>, {}>;
3788
- FormConfigEventSetting: import("vue").DefineComponent<{
3789
- modelValue: {
3790
- type: ArrayConstructor;
3791
- required: true;
3792
- default: () => never[];
3793
- };
3794
- }, {
3795
- props: {
3796
- modelValue: import("../../shared/types").LowCodeTypes.reactionConfig[];
3797
- };
3798
- emit: (event: "update:modelValue" | "validateFailure", ...args: any[]) => void;
3799
- cssVars: import("vue").ComputedRef<import("../../shared/types").AnyObject>;
3800
- valueRef: import("vue").Ref<{
3801
- conObj: {
3802
- con: import("../../shared/types").LowCodeTypes.VALUE_RELATION;
3803
- field_key: string;
3804
- value: unknown;
3805
- }[];
3806
- compareMap?: {
3807
- NULL?: ((v1: any, v2: any) => boolean) | undefined;
3808
- EQ?: ((v1: any, v2: any) => boolean) | undefined;
3809
- BIG?: ((v1: any, v2: any) => boolean) | undefined;
3810
- LESS?: ((v1: any, v2: any) => boolean) | undefined;
3811
- BIGEQ?: ((v1: any, v2: any) => boolean) | undefined;
3812
- LESSEQ?: ((v1: any, v2: any) => boolean) | undefined;
3813
- CL?: ((v1: any, v2: any) => boolean) | undefined;
3814
- NC?: ((v1: any, v2: any) => boolean) | undefined;
3815
- NEQ?: ((v1: any, v2: any) => boolean) | undefined;
3816
- NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
3817
- } | undefined;
3818
- isRestoreDefault?: boolean | undefined;
3819
- sqlExpression?: string | undefined;
3820
- showField?: string[] | undefined;
3821
- hideField?: string[] | undefined;
3822
- requiredField?: string[] | undefined;
3823
- notRequiredField?: string[] | undefined;
3824
- enabledField?: string[] | undefined;
3825
- disabledField?: string[] | undefined;
3826
- __oppositeBindField?: any | undefined;
3827
- __oppositeTargetField?: any | undefined;
3828
- }[]>;
3829
- expandedName: import("vue").Ref<string>;
3830
- addConnection: () => void;
3831
- removeConnection: (index: number) => void;
3832
- getOppositeBtnText: (item: import("../../shared/types").LowCodeTypes.reactionConfig) => string | undefined;
3833
- unBindOpposite: (item: import("../../shared/types").LowCodeTypes.reactionConfig) => void;
3834
- addOppositeCondition: (item: import("../../shared/types").LowCodeTypes.reactionConfig) => void;
3835
- getOppositeSqlExpression: (expression?: string | undefined) => string | undefined;
3836
- createOppositeCondition: (config: import("../../shared/types").LowCodeTypes.reactionConfig) => import("../../shared/types").LowCodeTypes.reactionConfig;
3837
- isOppositeConfig: (c1: import("../../shared/types").LowCodeTypes.reactionConfig, c2: import("../../shared/types").LowCodeTypes.reactionConfig) => boolean;
3838
- onUpdateExpandedNames: (value: string[]) => void;
3839
- getBinderFieldDesc: (index: number) => string;
3840
- addCondition: (config: import("../../shared/types").LowCodeTypes.reactionConfig) => void;
3841
- removeCondition: (config: import("../../shared/types").LowCodeTypes.reactionConfig, index: number) => void;
3842
- onUpdateConditionType: (condition: import("../../shared/types").LowCodeTypes.reactionsConObj, type: import("../../shared/types").LowCodeTypes.VALUE_RELATION) => void;
3843
- showRef: import("vue").Ref<boolean>;
3844
- fieldListRef: import("vue").Ref<import("./src/types").FormConfigItem[]>;
3845
- fieldOptions: import("vue").ComputedRef<import("./src/types").FormConfigItem[]>;
3846
- currentTypeList: string[];
3847
- dialog: import("naive-ui").DialogApi;
3848
- onNegativeClick: () => Promise<void>;
3849
- onPositiveClick: () => Promise<void>;
3850
- configValidate: () => Promise<void>;
3851
- HelpCircleSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
3852
- NButton: any;
3853
- NModal: any;
3854
- NSpace: any;
3855
- NScrollbar: any;
3856
- NThing: any;
3857
- NInputGroup: any;
3858
- NSelect: any;
3859
- NInput: any;
3860
- NCollapse: any;
3861
- NCollapseItem: any;
3862
- NEllipsis: any;
3863
- NEmpty: any;
3864
- NTooltip: any;
3865
- NIcon: any;
3866
- conditionTypeOptions: {
3867
- value: import("../../shared/types").LowCodeTypes.VALUE_RELATION;
3868
- label: string;
3869
- }[];
3870
- connectionTypeOptions: {
3871
- value: string;
3872
- label: string;
3873
- }[];
3874
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "validateFailure")[], "update:modelValue" | "validateFailure", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
3875
- modelValue: {
3876
- type: ArrayConstructor;
3877
- required: true;
3878
- default: () => never[];
3879
- };
3880
- }>> & {
3881
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
3882
- onValidateFailure?: ((...args: any[]) => any) | undefined;
3883
- }, {
3884
- modelValue: unknown[];
3885
- }>;
3886
3787
  FormConfigMaterialItem: import("vue").DefineComponent<{
3887
3788
  formConfigItem: {
3888
3789
  type: import("vue").PropType<import("./src/types").FormConfigItem>;
@@ -3915,7 +3816,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
3915
3816
  FORM_CONFIG_GROUP: string;
3916
3817
  NSelect: any;
3917
3818
  NSpace: any;
3918
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("addItem" | "removeItem" | "reactionsValidateFailure")[], "addItem" | "removeItem" | "reactionsValidateFailure", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
3819
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("addItem" | "removeItem")[], "addItem" | "removeItem", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
3919
3820
  maxHeight: {
3920
3821
  type: StringConstructor;
3921
3822
  };
@@ -3931,7 +3832,6 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
3931
3832
  extraMaterialList: {
3932
3833
  type: import("vue").PropType<import("./src/types").FormConfigItem[] | (() => import("./src/types").FormConfigItem[] | Promise<import("./src/types").FormConfigItem[]>)>;
3933
3834
  };
3934
- showLowCodeReactions: BooleanConstructor;
3935
3835
  formProps: {
3936
3836
  type: import("vue").PropType<Partial<Partial<{
3937
3837
  fieldList: import("..").FieldItem[];
@@ -4045,8 +3945,5 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
4045
3945
  }>> & {
4046
3946
  onAddItem?: ((...args: any[]) => any) | undefined;
4047
3947
  onRemoveItem?: ((...args: any[]) => any) | undefined;
4048
- onReactionsValidateFailure?: ((...args: any[]) => any) | undefined;
4049
- }, {
4050
- showLowCodeReactions: boolean;
4051
- }>>;
3948
+ }, {}>>;
4052
3949
  export default FormConfig;
@@ -1 +1 @@
1
- import{COMPONENT_NAMESPACE as o}from"../../shared/global/variable.js";import{safeComponentRegister as r}from"../../shared/utils/index.js";import i from"./src/FormConfig.vue.js";const s=i;s.install=function(i){r(i,s,o+"FormConfig")};export{s as default};
1
+ import{COMPONENT_NAMESPACE as o}from"../../shared/global/variable.js";import{safeComponentRegister as r}from"../../shared/utils/index.js";import s from"./src/FormConfig.vue.js";export{registFormConfigLocale,useFormConfigLocale}from"./src/hooks/useLocale.js";const e=s;e.install=function(s){r(s,e,o+"FormConfig")};export{e as default};
@@ -1,5 +1,6 @@
1
1
  import { useVersion } from '../../../shared/hooks';
2
2
  import { AnyFn, LowCodeTypes } from '../../../shared/types';
3
+ import { useFormConfigLocale } from '@cnhis-design-vue/components/form-config/src/hooks/useLocale';
3
4
  import { PropType, Ref } from 'vue';
4
5
  import { FormConfigItem, FormConfigTextFormatter, FormConfigVisitor } from '../../../components/form-config/src/types';
5
6
  import { FormRenderExpose } from '../../../components/form-render';
@@ -19,7 +20,6 @@ declare const _default: import("vue").DefineComponent<{
19
20
  extraMaterialList: {
20
21
  type: PropType<FormConfigItem[] | (() => FormConfigItem[] | Promise<FormConfigItem[]>)>;
21
22
  };
22
- showLowCodeReactions: BooleanConstructor;
23
23
  formProps: {
24
24
  type: PropType<Partial<Partial<{
25
25
  fieldList: import("../../../components/form-render").FieldItem[];
@@ -147,7 +147,6 @@ declare const _default: import("vue").DefineComponent<{
147
147
  extraMaterialList: {
148
148
  type: PropType<FormConfigItem[] | (() => FormConfigItem[] | Promise<FormConfigItem[]>)>;
149
149
  };
150
- showLowCodeReactions: BooleanConstructor;
151
150
  formProps: {
152
151
  type: PropType<Partial<Partial<{
153
152
  fieldList: import("../../../components/form-render").FieldItem[];
@@ -261,9 +260,8 @@ declare const _default: import("vue").DefineComponent<{
261
260
  }>> & {
262
261
  onAddItem?: ((...args: any[]) => any) | undefined;
263
262
  onRemoveItem?: ((...args: any[]) => any) | undefined;
264
- onReactionsValidateFailure?: ((...args: any[]) => any) | undefined;
265
263
  }>>;
266
- emit: (event: "addItem" | "removeItem" | "reactionsValidateFailure", ...args: any[]) => void;
264
+ emit: (event: "addItem" | "removeItem", ...args: any[]) => void;
267
265
  uuid: string;
268
266
  cssVars: import("vue").ComputedRef<import("../../../shared/types").AnyObject>;
269
267
  fieldListRef: Ref<FormConfigItem[]>;
@@ -320,6 +318,7 @@ declare const _default: import("vue").DefineComponent<{
320
318
  extraOptions: import("vue").ComputedRef<FormConfigItem[]>;
321
319
  onFocus: () => Promise<void>;
322
320
  useVersion: typeof useVersion;
321
+ useFormConfigLocale: typeof useFormConfigLocale;
323
322
  Draggable: import("vue").DefineComponent<{
324
323
  list: {
325
324
  type: ArrayConstructor;
@@ -407,6 +406,7 @@ declare const _default: import("vue").DefineComponent<{
407
406
  NButton: any;
408
407
  NButtonGroup: any;
409
408
  NPopconfirm: any;
409
+ useFormConfigLocale: typeof useFormConfigLocale;
410
410
  CFormRender: import("../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{}, {
411
411
  formRenderRef: Ref<FormRenderExpose | undefined>;
412
412
  key: Ref<number>;
@@ -2447,8 +2447,6 @@ declare const _default: import("vue").DefineComponent<{
2447
2447
  __extra?: boolean | undefined;
2448
2448
  }>;
2449
2449
  generateFieldListByFormConfigItem: (formConfigItem: FormConfigItem, fieldItem?: import("../../../components/form-render").FieldItem | undefined) => import("../../../components/form-render").FieldItem[];
2450
- showModal: Ref<boolean>;
2451
- onPositiveClick: () => Promise<void>;
2452
2450
  prevOldField: null;
2453
2451
  onFormChange: ({ fieldKey, value }: import("../../../components/form-render").FormChangePayload) => void;
2454
2452
  createLabelRender: (originOptions?: import("../../../shared/types").AnyObject[] | undefined) => (label: string) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
@@ -2674,6 +2672,7 @@ declare const _default: import("vue").DefineComponent<{
2674
2672
  }[]>;
2675
2673
  onOptionModalCancel: () => void;
2676
2674
  onOptionModalConfirm: () => void;
2675
+ useFormConfigLocale: typeof useFormConfigLocale;
2677
2676
  NModal: any;
2678
2677
  NSpace: any;
2679
2678
  NInput: any;
@@ -3788,104 +3787,6 @@ declare const _default: import("vue").DefineComponent<{
3788
3787
  }>>>;
3789
3788
  };
3790
3789
  }>>, {}>;
3791
- FormConfigEventSetting: import("vue").DefineComponent<{
3792
- modelValue: {
3793
- type: ArrayConstructor;
3794
- required: true;
3795
- default: () => never[];
3796
- };
3797
- }, {
3798
- props: {
3799
- modelValue: LowCodeTypes.reactionConfig[];
3800
- };
3801
- emit: (event: "update:modelValue" | "validateFailure", ...args: any[]) => void;
3802
- cssVars: import("vue").ComputedRef<import("../../../shared/types").AnyObject>;
3803
- valueRef: Ref<{
3804
- conObj: {
3805
- con: LowCodeTypes.VALUE_RELATION;
3806
- field_key: string;
3807
- value: unknown;
3808
- }[];
3809
- compareMap?: {
3810
- NULL?: ((v1: any, v2: any) => boolean) | undefined;
3811
- EQ?: ((v1: any, v2: any) => boolean) | undefined;
3812
- BIG?: ((v1: any, v2: any) => boolean) | undefined;
3813
- LESS?: ((v1: any, v2: any) => boolean) | undefined;
3814
- BIGEQ?: ((v1: any, v2: any) => boolean) | undefined;
3815
- LESSEQ?: ((v1: any, v2: any) => boolean) | undefined;
3816
- CL?: ((v1: any, v2: any) => boolean) | undefined;
3817
- NC?: ((v1: any, v2: any) => boolean) | undefined;
3818
- NEQ?: ((v1: any, v2: any) => boolean) | undefined;
3819
- NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
3820
- } | undefined;
3821
- isRestoreDefault?: boolean | undefined;
3822
- sqlExpression?: string | undefined;
3823
- showField?: string[] | undefined;
3824
- hideField?: string[] | undefined;
3825
- requiredField?: string[] | undefined;
3826
- notRequiredField?: string[] | undefined;
3827
- enabledField?: string[] | undefined;
3828
- disabledField?: string[] | undefined;
3829
- __oppositeBindField?: any | undefined;
3830
- __oppositeTargetField?: any | undefined;
3831
- }[]>;
3832
- expandedName: Ref<string>;
3833
- addConnection: () => void;
3834
- removeConnection: (index: number) => void;
3835
- getOppositeBtnText: (item: LowCodeTypes.reactionConfig) => string | undefined;
3836
- unBindOpposite: (item: LowCodeTypes.reactionConfig) => void;
3837
- addOppositeCondition: (item: LowCodeTypes.reactionConfig) => void;
3838
- getOppositeSqlExpression: (expression?: string | undefined) => string | undefined;
3839
- createOppositeCondition: (config: LowCodeTypes.reactionConfig) => LowCodeTypes.reactionConfig;
3840
- isOppositeConfig: (c1: LowCodeTypes.reactionConfig, c2: LowCodeTypes.reactionConfig) => boolean;
3841
- onUpdateExpandedNames: (value: string[]) => void;
3842
- getBinderFieldDesc: (index: number) => string;
3843
- addCondition: (config: LowCodeTypes.reactionConfig) => void;
3844
- removeCondition: (config: LowCodeTypes.reactionConfig, index: number) => void;
3845
- onUpdateConditionType: (condition: LowCodeTypes.reactionsConObj, type: LowCodeTypes.VALUE_RELATION) => void;
3846
- showRef: Ref<boolean>;
3847
- fieldListRef: Ref<FormConfigItem[]>;
3848
- fieldOptions: import("vue").ComputedRef<FormConfigItem[]>;
3849
- currentTypeList: string[];
3850
- dialog: import("naive-ui").DialogApi;
3851
- onNegativeClick: () => Promise<void>;
3852
- onPositiveClick: () => Promise<void>;
3853
- configValidate: () => Promise<void>;
3854
- HelpCircleSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
3855
- NButton: any;
3856
- NModal: any;
3857
- NSpace: any;
3858
- NScrollbar: any;
3859
- NThing: any;
3860
- NInputGroup: any;
3861
- NSelect: any;
3862
- NInput: any;
3863
- NCollapse: any;
3864
- NCollapseItem: any;
3865
- NEllipsis: any;
3866
- NEmpty: any;
3867
- NTooltip: any;
3868
- NIcon: any;
3869
- conditionTypeOptions: {
3870
- value: LowCodeTypes.VALUE_RELATION;
3871
- label: string;
3872
- }[];
3873
- connectionTypeOptions: {
3874
- value: string;
3875
- label: string;
3876
- }[];
3877
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "validateFailure")[], "update:modelValue" | "validateFailure", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
3878
- modelValue: {
3879
- type: ArrayConstructor;
3880
- required: true;
3881
- default: () => never[];
3882
- };
3883
- }>> & {
3884
- "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
3885
- onValidateFailure?: ((...args: any[]) => any) | undefined;
3886
- }, {
3887
- modelValue: unknown[];
3888
- }>;
3889
3790
  FormConfigMaterialItem: import("vue").DefineComponent<{
3890
3791
  formConfigItem: {
3891
3792
  type: PropType<FormConfigItem>;
@@ -3918,7 +3819,7 @@ declare const _default: import("vue").DefineComponent<{
3918
3819
  FORM_CONFIG_GROUP: string;
3919
3820
  NSelect: any;
3920
3821
  NSpace: any;
3921
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("addItem" | "removeItem" | "reactionsValidateFailure")[], "addItem" | "removeItem" | "reactionsValidateFailure", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
3822
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("addItem" | "removeItem")[], "addItem" | "removeItem", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
3922
3823
  maxHeight: {
3923
3824
  type: StringConstructor;
3924
3825
  };
@@ -3934,7 +3835,6 @@ declare const _default: import("vue").DefineComponent<{
3934
3835
  extraMaterialList: {
3935
3836
  type: PropType<FormConfigItem[] | (() => FormConfigItem[] | Promise<FormConfigItem[]>)>;
3936
3837
  };
3937
- showLowCodeReactions: BooleanConstructor;
3938
3838
  formProps: {
3939
3839
  type: PropType<Partial<Partial<{
3940
3840
  fieldList: import("../../../components/form-render").FieldItem[];
@@ -4048,8 +3948,5 @@ declare const _default: import("vue").DefineComponent<{
4048
3948
  }>> & {
4049
3949
  onAddItem?: ((...args: any[]) => any) | undefined;
4050
3950
  onRemoveItem?: ((...args: any[]) => any) | undefined;
4051
- onReactionsValidateFailure?: ((...args: any[]) => any) | undefined;
4052
- }, {
4053
- showLowCodeReactions: boolean;
4054
- }>;
3951
+ }, {}>;
4055
3952
  export default _default;
@@ -1 +1 @@
1
- import{defineComponent as e,provide as o,ref as t,computed as r,toRaw as a,openBlock as i,createElementBlock as s,mergeProps as l,unref as n,createElementVNode as m,createVNode as u,isRef as f,withCtx as d,createBlock as c,createCommentVNode as p,createTextVNode as v}from"vue";import{useTheme as g}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isArray as h,cloneDeep as _,isFunction as y}from"lodash-es";import"@vue/shared";import{uuidGenerator as x,traverse as j}from"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NSelect as k,NSpace as C}from"naive-ui";import{useVersion as L}from"../../../shared/hooks/useVersion.js";import"../../../shared/hooks/useScrollLoading.js";import F from"../../../shared/components/VueDraggable/src/vuedraggable.js";import V from"./components/FormConfigCreator.vue.js";import b from"./components/FormConfigDragDisplay.vue.js";import w from"./components/FormConfigEdit.vue.js";import M from"./components/FormConfigEventSetting.vue.js";import R from"./components/FormConfigMaterialItem.js";import{useDataNormalize as D}from"./hooks/useDataNormalize.js";import{InjectionFormConfigProps as E,InjectionFormConfigEmit as H,InjectionFieldList as S,InjectionMaterialList as I,InjectionLowCodeReactions as U,InjectionActiveFieldItem as O,FORM_CONFIG_GROUP as P}from"./constants/index.js";import{fieldItemNormalize as T}from"./utils/index.js";import{useSortableConfig as z}from"./hooks/useSortalbeConfig.js";import"./hooks/useConfigurationField.js";const A=["id"],B={class:"form-config__material"},N=m("header",{class:"form-config__materialHeader"},"物料区",-1),W={class:"form-config__displayWrapper"},q={class:"form-config__displayHeader"},G={class:"form-config__config"},J=m("header",{class:"form-config__configHeader"},"配置区",-1),K={class:"form-config__configContent"};var Q=e({__name:"FormConfig",props:{maxHeight:{type:String},fieldVisitor:{type:Object},textFormatter:{type:Function},formRenderRef:{type:Object},extraMaterialList:{type:[Array,Function]},showLowCodeReactions:Boolean,formProps:{type:Object},beforeMove:{type:Function}},emits:["addItem","removeItem","reactionsValidateFailure"],setup(e,{expose:Q,emit:X}){const Y=e;o(E,Y),o(H,X);const Z=x(),$=g(),ee=t([]);o(S,ee);const oe=t([]);o(I,oe);const te=t([]);function re(e){ee.value.some((o=>o.key===e.key))||ee.value.push(e)}o(U,te);const ae=(e,o)=>y(Y.textFormatter)?Y.textFormatter(e,o):o,ie=t();o(O,ie);const se=t(),{transform:le,inverseTransform:ne}=D(Y),me=r({get:()=>null,set(e){if(!e)return;const o=fe.value.find((o=>o.key===e));o&&(o.__extra=!0,T(o),oe.value.push(o),X("addItem",o))}}),ue=t([]),fe=r((()=>{if(!h(ue.value))return[];const e=[];return j([...oe.value,...ee.value],(o=>e.push(o.key))),ue.value.filter((o=>!e.find((e=>e===o.key))))}));async function de(){Y.extraMaterialList&&!ue.value.length&&(ue.value=y(Y.extraMaterialList)?await Y.extraMaterialList():Y.extraMaterialList)}return Q({loadData({fieldList:e,lowCodeReactions:o=[]}){let t=[],r=[];e.forEach((e=>{return!1===(o=_(a(e))).show?r.push(o):t.push(o),void T(o);var o})),ee.value=le(t),oe.value=r,te.value=o,ie.value=void 0},validate(){var e;return null==(e=se.value)?void 0:e.validate()},getData:(e=!1)=>({fieldList:ne(_(a(ee.value)),e,{show:!0}),materialList:ne(_(a(oe.value)),e,{show:!1}),lowCodeReactions:_(a(te.value))}),clearExtraList(){ue.value=[]}}),(o,t)=>(i(),s("section",l({class:"form-config",style:{"--max-height":e.maxHeight,...n($)},id:n(Z)},n(L)()),[m("section",B,[N,u(n(F),l(z({fieldList:ee,materialList:oe,hooks:{beforeMove:Y.beforeMove}}),{class:"form-config__materialContent",modelValue:n(oe),"onUpdate:modelValue":t[0]||(t[0]=e=>f(oe)?oe.value=e:null)}),{item:d((({element:e})=>[u(n(R),{"form-config-item":e,"text-formatter":ae,"material-List":n(oe)},null,8,["form-config-item","material-List"])])),_:1},16,["modelValue"]),e.extraMaterialList?(i(),c(n(k),{key:0,class:"form-config__materialExtraList",filterable:"",value:n(me),"onUpdate:value":t[1]||(t[1]=e=>f(me)?me.value=e:null),placeholder:"请选择额外物料",options:n(fe),"label-field":"name","value-field":"key",onFocus:de},null,8,["value","options"])):p("v-if",!0)]),m("section",W,[m("header",q,[v(" 布局区 "),u(n(C),null,{default:d((()=>[e.showLowCodeReactions?(i(),c(M,{key:0,modelValue:te.value,"onUpdate:modelValue":t[2]||(t[2]=e=>te.value=e),onValidateFailure:t[3]||(t[3]=e=>X("reactionsValidateFailure",e))},null,8,["modelValue"])):p("v-if",!0),u(V,{onSubmit:re})])),_:1})]),u(b,{class:"form-config__displayContent",group:n(P),"text-formatter":ae,modelValue:n(ee),"onUpdate:modelValue":t[4]||(t[4]=e=>f(ee)?ee.value=e:null)},null,8,["group","modelValue"])]),m("section",G,[J,m("section",K,[u(w,{ref_key:"formConfigEditRef",ref:se,uuid:n(Z),"bind-form-render-ref":e.formRenderRef,"form-props":e.formProps},null,8,["uuid","bind-form-render-ref","form-props"])])])],16,A))}});export{Q as default};
1
+ import{defineComponent as e,provide as o,ref as t,computed as r,toRaw as a,openBlock as i,createElementBlock as s,mergeProps as l,unref as n,createElementVNode as m,toDisplayString as f,createVNode as u,isRef as c,withCtx as d,createBlock as p,createCommentVNode as v,createTextVNode as g}from"vue";import{useTheme as h}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isArray as _,cloneDeep as y,isFunction as x}from"lodash-es";import"@vue/shared";import{uuidGenerator as j,traverse as k}from"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{NSelect as L,NSpace as C}from"naive-ui";import{useVersion as b}from"../../../shared/hooks/useVersion.js";import"../../../shared/hooks/useScrollLoading.js";import{useFormConfigLocale as F}from"./hooks/useLocale.js";import M from"../../../shared/components/VueDraggable/src/vuedraggable.js";import R from"./components/FormConfigCreator.vue.js";import V from"./components/FormConfigDragDisplay.vue.js";import w from"./components/FormConfigEdit.vue.js";import D from"./components/FormConfigMaterialItem.js";import{useDataNormalize as H}from"./hooks/useDataNormalize.js";import{InjectionFormConfigProps as A,InjectionFormConfigEmit as E,InjectionFieldList as S,InjectionMaterialList as I,InjectionLowCodeReactions as O,InjectionActiveFieldItem as P,FORM_CONFIG_GROUP as U}from"./constants/index.js";import{fieldItemNormalize as T}from"./utils/index.js";import{useSortableConfig as z}from"./hooks/useSortalbeConfig.js";import"./hooks/useConfigurationField.js";const N=["id"],W={class:"form-config__material"},q={class:"form-config__materialHeader"},B={class:"form-config__displayWrapper"},G={class:"form-config__displayHeader"},J={class:"form-config__config"},K={class:"form-config__configHeader"},Q={class:"form-config__configContent"};var X=e({__name:"FormConfig",props:{maxHeight:{type:String},fieldVisitor:{type:Object},textFormatter:{type:Function},formRenderRef:{type:Object},extraMaterialList:{type:[Array,Function]},formProps:{type:Object},beforeMove:{type:Function}},emits:["addItem","removeItem"],setup(e,{expose:X,emit:Y}){const Z=e;o(A,Z),o(E,Y);const $=j(),ee=h(),oe=t([]);o(S,oe);const te=t([]);o(I,te);const re=t([]);function ae(e){oe.value.some((o=>o.key===e.key))||oe.value.push(e)}o(O,re);const ie=(e,o)=>x(Z.textFormatter)?Z.textFormatter(e,o):o,se=t();o(P,se);const le=t(),{transform:ne,inverseTransform:me}=H(Z),fe=r({get:()=>null,set(e){if(!e)return;const o=ce.value.find((o=>o.key===e));o&&(o.__extra=!0,T(o),te.value.push(o),Y("addItem",o))}}),ue=t([]),ce=r((()=>{if(!_(ue.value))return[];const e=[];return k([...te.value,...oe.value],(o=>e.push(o.key))),ue.value.filter((o=>!e.find((e=>e===o.key))))}));async function de(){Z.extraMaterialList&&!ue.value.length&&(ue.value=x(Z.extraMaterialList)?await Z.extraMaterialList():Z.extraMaterialList)}return X({loadData({fieldList:e,lowCodeReactions:o=[]}){let t=[],r=[];e.forEach((e=>{return!1===(o=y(a(e))).show?r.push(o):t.push(o),void T(o);var o})),oe.value=ne(t),te.value=r,re.value=o,se.value=void 0},validate(){var e;return null==(e=le.value)?void 0:e.validate()},getData:(e=!1)=>({fieldList:me(y(a(oe.value)),e,{show:!0}),materialList:me(y(a(te.value)),e,{show:!1}),lowCodeReactions:y(a(re.value))}),clearExtraList(){ue.value=[]}}),(o,t)=>(i(),s("section",l({class:"form-config",style:{"--max-height":e.maxHeight,...n(ee)},id:n($)},n(b)()),[m("section",W,[m("header",q,f(n(F)("materialArea")),1),u(n(M),l(z({fieldList:oe,materialList:te,hooks:{beforeMove:Z.beforeMove}}),{class:"form-config__materialContent",modelValue:n(te),"onUpdate:modelValue":t[0]||(t[0]=e=>c(te)?te.value=e:null)}),{item:d((({element:e})=>[u(n(D),{"form-config-item":e,"text-formatter":ie,"material-List":n(te)},null,8,["form-config-item","material-List"])])),_:1},16,["modelValue"]),e.extraMaterialList?(i(),p(n(L),{key:0,class:"form-config__materialExtraList",filterable:"",value:n(fe),"onUpdate:value":t[1]||(t[1]=e=>c(fe)?fe.value=e:null),placeholder:n(F)("materialArea.createMaterialPlaceholder"),options:n(ce),"label-field":"name","value-field":"key",onFocus:de},null,8,["value","placeholder","options"])):v("v-if",!0)]),m("section",B,[m("header",G,[g(f(n(F)("layoutArea"))+" ",1),u(n(C),null,{default:d((()=>[v("\t\t\t\t\t<form-config-event-setting"),v('\t\t\t\t\t\tv-if="showLowCodeReactions"'),v('\t\t\t\t\t\tv-model="lowCodeReactionsRef"'),v("\t\t\t\t\t\t@validate-failure=\"e => emit('reactionsValidateFailure', e)\""),v("\t\t\t\t\t/>"),u(R,{onSubmit:ae})])),_:1})]),u(V,{class:"form-config__displayContent",group:n(U),"text-formatter":ie,modelValue:n(oe),"onUpdate:modelValue":t[2]||(t[2]=e=>c(oe)?oe.value=e:null)},null,8,["group","modelValue"])]),m("section",J,[m("header",K,f(n(F)("configArea")),1),m("section",Q,[u(w,{ref_key:"formConfigEditRef",ref:le,uuid:n($),"bind-form-render-ref":e.formRenderRef,"form-props":e.formProps},null,8,["uuid","bind-form-render-ref","form-props"])])])],16,N))}});export{X as default};
@@ -1,3 +1,4 @@
1
+ import { useFormConfigLocale } from '../../../../components/form-config/src/hooks/useLocale';
1
2
  import { FieldItem, FormRenderExpose } from '../../../../components/form-render';
2
3
  import { AnyObject, FormConfigItem } from '../../..';
3
4
  declare const _default: import("vue").DefineComponent<{}, {
@@ -14,6 +15,7 @@ declare const _default: import("vue").DefineComponent<{}, {
14
15
  NButton: any;
15
16
  NButtonGroup: any;
16
17
  NPopconfirm: any;
18
+ useFormConfigLocale: typeof useFormConfigLocale;
17
19
  CFormRender: import("../../../../shared/types").SFCWithInstall<import("vue").DefineComponent<{}, {
18
20
  formRenderRef: import("vue").Ref<FormRenderExpose | undefined>;
19
21
  key: import("vue").Ref<number>;
@@ -1 +1 @@
1
- import{defineComponent as e,ref as t,openBlock as i,createBlock as l,unref as o,withCtx as a,createVNode as n,createTextVNode as r}from"vue";import{pick as s}from"lodash-es";import{NButtonGroup as m,NPopconfirm as u,NButton as d}from"naive-ui";import{EditAbleField as f}from"../constants/index.js";import{useConfigurationField as _}from"../hooks/useConfigurationField.js";import"../../../index.js";import c from"../../../form-render/index.js";var p=e({__name:"FormConfigCreator",emits:{submit:e=>e},setup(e,{emit:p}){const L=_().generateFieldListByKeys([f.NAME,f.LAYOUT_WIDTH_ENUM,f.NOTES,f.DEFAULT_EXPAND,f.FOLD]);Object.assign(L[0],{html_type:"INPUT",is_null:"0"});const h=t(),E=t(),y={defaultExpand:!0,fold:!0,layoutWidthEnum:"ALL_LINE"};async function w(e,t,i){if(!i)return;await i.validate();const l=i.getFormValues();p("submit",{layoutWidthEnum:"ALL_LINE",...l,type:e,key:l.name,...t,__new:!0})}return(e,t)=>(i(),l(o(m),{size:"small"},{default:a((()=>[n(o(u),{width:"200px","show-icon":!1,"show-arrow":!1,to:"body",onPositiveClick:t[0]||(t[0]=e=>w("NEWLINE",{},E.value))},{trigger:a((()=>[n(o(d),null,{default:a((()=>[r("新建分行符")])),_:1})])),default:a((()=>[n(o(c),{column:12,ref_key:"lineBreakFormRef",ref:E,"initial-data":o(s)(y,["layoutWidthEnum"]),size:"small","label-width":"auto","label-placement":"left",fieldList:o(L).slice(0,1)},null,8,["initial-data","fieldList"])])),_:1}),n(o(u),{width:"300px","show-icon":!1,"show-arrow":!1,to:"body",onPositiveClick:t[1]||(t[1]=e=>w("LINE_BAR",{children:[]},h.value))},{trigger:a((()=>[n(o(d),null,{default:a((()=>[r("新建分线栏")])),_:1})])),default:a((()=>[n(o(c),{column:12,ref_key:"linebarFormRef",ref:h,"initial-data":y,size:"small","label-width":"auto","label-placement":"left",fieldList:o(L)},null,8,["fieldList"])])),_:1})])),_:1}))}});export{p as default};
1
+ import{defineComponent as e,ref as t,openBlock as i,createBlock as a,unref as o,withCtx as l,createVNode as n,createTextVNode as r,toDisplayString as s}from"vue";import{pick as u}from"lodash-es";import{NButtonGroup as m,NPopconfirm as f,NButton as d}from"naive-ui";import{EditAbleField as c}from"../constants/index.js";import{useConfigurationField as p}from"../hooks/useConfigurationField.js";import{useFormConfigLocale as v}from"../hooks/useLocale.js";import"../../../index.js";import g from"../../../form-render/index.js";var L=e({__name:"FormConfigCreator",emits:{submit:e=>e},setup(e,{emit:L}){const _=p().generateFieldListByKeys([c.NAME,c.LAYOUT_WIDTH_ENUM,c.NOTES,c.DEFAULT_EXPAND,c.FOLD]);Object.assign(_[0],{html_type:"INPUT",is_null:"0"});const h=t(),x=t(),y={defaultExpand:!0,fold:!0,layoutWidthEnum:"ALL_LINE"};async function E(e,t,i){if(!i)return;await i.validate();const a=i.getFormValues();L("submit",{layoutWidthEnum:"ALL_LINE",...a,type:e,key:a.name,...t,__new:!0})}return(e,t)=>(i(),a(o(m),{size:"small"},{default:l((()=>[n(o(f),{width:"300px","show-icon":!1,"show-arrow":!1,to:"body","positive-text":o(v)("configArea.positiveBtn"),"negative-text":o(v)("configArea.negativeBtn"),onPositiveClick:t[0]||(t[0]=e=>E("NEWLINE",{},x.value))},{trigger:l((()=>[n(o(d),null,{default:l((()=>[r(s(o(v)("layoutArea.createLinebreak")),1)])),_:1})])),default:l((()=>[n(o(g),{column:12,ref_key:"lineBreakFormRef",ref:x,"initial-data":o(u)(y,["layoutWidthEnum"]),size:"small","label-width":"auto","label-placement":"left",fieldList:o(_).slice(0,1)},null,8,["initial-data","fieldList"])])),_:1},8,["positive-text","negative-text"]),n(o(f),{width:"300px","show-icon":!1,"show-arrow":!1,to:"body","positive-text":o(v)("configArea.positiveBtn"),"negative-text":o(v)("configArea.negativeBtn"),onPositiveClick:t[1]||(t[1]=e=>E("LINE_BAR",{children:[]},h.value))},{trigger:l((()=>[n(o(d),null,{default:l((()=>[r(s(o(v)("layoutArea.createLinebar")),1)])),_:1})])),default:l((()=>[n(o(g),{column:12,ref_key:"linebarFormRef",ref:h,"initial-data":y,size:"small","label-width":"auto","label-placement":"left",fieldList:o(_)},null,8,["fieldList"])])),_:1},8,["positive-text","negative-text"])])),_:1}))}});export{L as default};
@@ -1,5 +1,6 @@
1
1
  import { AnyObject } from '../../../../shared/types';
2
2
  import { PropType } from 'vue';
3
+ import { useFormConfigLocale } from '../../../../components/form-config/src/hooks/useLocale';
3
4
  import { FieldItem, FieldVisitor, FormChangePayload, FormRenderExpose } from '../../../../components/form-render';
4
5
  import { FormConfigItem } from '../../../../components/index';
5
6
  declare const _default: import("vue").DefineComponent<{
@@ -934,8 +935,6 @@ declare const _default: import("vue").DefineComponent<{
934
935
  __extra?: boolean | undefined;
935
936
  }>;
936
937
  generateFieldListByFormConfigItem: (formConfigItem: FormConfigItem, fieldItem?: FieldItem | undefined) => FieldItem[];
937
- showModal: import("vue").Ref<boolean>;
938
- onPositiveClick: () => Promise<void>;
939
938
  prevOldField: null;
940
939
  onFormChange: ({ fieldKey, value }: FormChangePayload) => void;
941
940
  createLabelRender: (originOptions?: AnyObject[]) => (label: string) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
@@ -1161,6 +1160,7 @@ declare const _default: import("vue").DefineComponent<{
1161
1160
  }[]>;
1162
1161
  onOptionModalCancel: () => void;
1163
1162
  onOptionModalConfirm: () => void;
1163
+ useFormConfigLocale: typeof useFormConfigLocale;
1164
1164
  NModal: any;
1165
1165
  NSpace: any;
1166
1166
  NInput: any;