cnhis-design-vue 3.2.3-beta.16 → 3.2.3-beta.17

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 (24) hide show
  1. package/es/components/biunique-chat/index.d.ts +19 -2
  2. package/es/components/biunique-chat/src/Index.vue.d.ts +19 -2
  3. package/es/components/biunique-chat/src/Index.vue2.js +1 -1
  4. package/es/components/biunique-chat/src/components/ChatFooter.vue2.js +1 -1
  5. package/es/components/biunique-chat/src/components/ChatMain.vue.d.ts +5 -2
  6. package/es/components/biunique-chat/src/components/ChatMain.vue2.js +1 -1
  7. package/es/components/biunique-chat/src/components/MessageTemplate.vue.d.ts +2 -1
  8. package/es/components/biunique-chat/src/components/MessageTemplate.vue2.js +1 -1
  9. package/es/components/biunique-chat/src/components/SiderList.vue2.js +1 -1
  10. package/es/components/biunique-chat/src/hooks/useSession.d.ts +1 -0
  11. package/es/components/biunique-chat/src/hooks/useSession.js +1 -1
  12. package/es/components/biunique-chat/src/utils/index.d.ts +1 -1
  13. package/es/components/biunique-chat/src/utils/index.js +1 -1
  14. package/es/components/biunique-chat/style/index.css +1 -1
  15. package/es/components/calendar/index.d.ts +11 -2
  16. package/es/components/calendar/src/Calendar.vue.d.ts +11 -1
  17. package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcess.js +1 -1
  18. package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcessChart.js +1 -1
  19. package/es/components/index.css +1 -1
  20. package/es/shared/package.json.js +1 -1
  21. package/es/shared/utils/index.d.ts +3 -3
  22. package/package.json +2 -2
  23. package/es/components/node_modules/naive-ui/node_modules/date-fns/docs/logo.svg +0 -26
  24. package/es/components/node_modules/naive-ui/node_modules/date-fns/docs/logotype.svg +0 -1
@@ -1 +1 @@
1
- import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawText as e,defaultTextStyle as i,defaultStyle as n,drawPoint as o}from"../useDraw.js";import{useGrid as r}from"../useGrid.js";import{useBirthProcessCumputedPoint as l}from"../useCumputedPoint.js";import"../useEvent.js";import{getScaleInfo as s,drawScaleNumber as a,drawScaleLine as u}from"../useScaleColumn.js";import{useCommon as c}from"../useCommon.js";import"vue";import{isEffectiveNode as h,getTime as f,getScaleNumberList as d}from"../../utils/index.js";import{cloneDeep as p}from"lodash-es";import"date-fns";import"../temperature/useShadow.js";import"naive-ui";import"@vueuse/core";function m(m,v,g,x,y){const{computedX:b,computedY:w,getXValue:S,getYValue:E}=l(v),{getEqualXTypes:L,handleAddPrevent:j,isGridLimit:k,setPrevAndNextPoint:X,getPointEventProps:P}=c(m,g,v),{xAxis:A,grid:C,originX:T,originY:G,xCellWidth:Y,endY:N,startTime:V,leftScales:H,rightScales:M,yCellHeight:$,endX:B,scaleValues:W,canvasWidth:q,borderStyle:z,event:D,other:F,timeXAxisHeight:I,canvasHeight:R,extraTimeXAxisList:J}=v,K=p(W),O=new Set;function Q(){K.filter((t=>t.show)).forEach(((t,r)=>{var l;const s=[],a=[],u=[];null==(l=t.data)||l.forEach(((l,c)=>{!function(l,c,h){let f,d;const{pointAttr:p={},lineAttr:m={},title:v="",key:g,type:y="circle",childbirthStyle:b={}}=t,w=t.data[h+1],L=Z(w,t);if(l&&L&&!c.breakpoint)d=U([...l,...L],m);else if(l&&!L&&!c.breakpoint){const e=Z(w,t);d=e?U([...l,...e],m):null}if(c.childbirth){const t=l[0]+Y,n=l[1]+$/2,o=U([l[0],l[1],t,n],m);u.push(o);const r=e([t,n],{value:String(c.childbirth),...i,...b,backgroundColor:"#fff"});u.push(r)}const j=a[h-1],k={origin:{data:c,title:v,key:g||"",dataIndex:r,index:h},leftLine:j,rightLine:d,...p,...P(),...n};l&&(j||(k.leftLine=null),f=o(y,{left:l[0],top:l[1],...k}));a.push(d),f&&(!function(t){D.hovered&&(t.on("mouseover",(()=>{!function(t,e="moving"){const{title:i,key:n,data:o}=t.origin;x.point={x:t.left,y:t.top},x.list=[`${i} ${"hover"===e?o.value:E(n,t.top)}`,`时间 ${S(t.left).slice(-5)}`],x.show=!0}(t,"hover")})),t.on("mouseout",(()=>{x.show=!1})))}(f),s.push(f),O.add(f))}(Z(l,t),l,c)})),Promise.all(s).then((t=>{const e=a.filter((t=>t));X(t),Promise.all(u).then((i=>{m.value.add(...e,...t,...i),t.forEach((t=>{null==t||t.bringToFront()}))}))}))}))}function U([e,i,o,r],l){return new t.Polyline([{x:e,y:i},{x:o,y:i},{x:o,y:r}],{...l,fill:"transparent",...n})}function Z(t,e){if(h(t)&&function(t){const e=V+864e5,i=f(t);return i>=V&&i<=e}(t.time)){const i=b(t.time),n=w(e.key,e.range,t.value);return[i,n<G?G:n>N?N:n]}}return r(m,v),function(){const e=new t.Rect({...z,width:B-T,height:N-G,left:T,top:G,fill:"transparent"});m.value.add(e)}(),function(){function o(o,r="left"){const l=10;let c="left"===r?0:B;o.forEach(((o,r)=>{const{range:h,spaceValue:f,width:p,title:v,titleStyle:g,unit:x,key:y,position:b="center",spaceGridNumber:w=1,showNumber:S,showMaxMinNumber:E}=o,L=[],j=[],k=d(h,f),X=k.length,{lineXMain:P,lineXSub:A,textLeft:C}=s(b,c,p);k.forEach(((t,e)=>{const i=N-e*$*w;!S||(0===e||e===X-1)&&!E||L.push(a(String(t),o,C,i)),j.push(...u(o,e,P,A,i,$,G,X))}));const T=e([c+l,G+(N-G)/2],{value:String(v+"("+x+")"),...i,originX:"center",angle:-90,...g}),Y=new t.Group([...j,...L,...T?[T]:[]],{objectCaching:!1,...n});m.value.add(Y),Y.sendToBack(),c+=p}))}o(H),o(M,"right")}(),function(){const{show:o,range:r=[0,20],position:l="top",style:s,spaceGridNumber:a=2,spaceValue:u=2}=A.time;if(o){const o=[],c=$/2;d(r,u).forEach(((t,n)=>{const r="top"===l?G-c:N+I+c;o.push(e([T+n*Y*a,r],{value:0===n?"Admission":String(t),...i,...s}))}));const h=new t.Group(o,{objectCaching:!1,...n});m.value.add(h),m.value.sendToBack(h)}!function(){if((null==J?void 0:J.length)>0){const t=[];J.forEach((n=>{const o=b(n),r=N+I;t.push(e([o,r],{value:String(n.slice(11,16)),...i,originY:"bottom"}))})),m.value.add(...t)}}()}(),function(){const{alertLineList:t=[],alertLineTitle:n="入院时宫颈扩张不同情况"}=F;if(t.length<1)return;const o=e([B,0],{value:n,...i,originX:"right",originY:"top"});m.value.add(o),t.forEach((t=>{const{style:i,data:n=[]}=t;if(n.length<1)return;const o=[],r=K.find((t=>"cervix"===t.key));n.map((t=>({...t,time:V+60*t.time*60*1e3}))).forEach(((t,n,l)=>{const s=Z(t,r),a=Z(l[n+1],r);s&&!a&&o.push(e([s[0],G-10],{value:l[0].value+(r.unit||"cm"),fill:i.stroke||"#000"})),s&&a&&o.push(U([...s,...a],i))})),m.value.add(...o)}))}(),Q(),{redrawPoints:function(){var t;O.size&&(null==(t=m.value)||t.remove(...function(t){const e=[];return t.forEach((t=>{t&&e.push(t),(null==t?void 0:t.leftLine)&&e.push(null==t?void 0:t.leftLine),(null==t?void 0:t.rightLine)&&e.push(null==t?void 0:t.rightLine)})),e}([...O]))),O.clear(),Q()}}}export{m as useNewBirthProcess};
1
+ import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawText as e,defaultTextStyle as i,defaultStyle as n,drawPoint as o}from"../useDraw.js";import{useGrid as r}from"../useGrid.js";import{useBirthProcessCumputedPoint as l}from"../useCumputedPoint.js";import"../useEvent.js";import{getScaleInfo as s,drawScaleNumber as a,drawScaleLine as u}from"../useScaleColumn.js";import{useCommon as c}from"../useCommon.js";import"vue";import{isEffectiveNode as f,getTime as h,getScaleNumberList as d}from"../../utils/index.js";import{cloneDeep as p}from"lodash-es";import"date-fns";import"../temperature/useShadow.js";import"naive-ui";import"@vueuse/core";function m(m,v,g,x,y){const{computedX:b,computedY:w,getXValue:S,getYValue:E}=l(v),{getEqualXTypes:L,handleAddPrevent:j,isGridLimit:k,setPrevAndNextPoint:X,getPointEventProps:P}=c(m,g,v),{xAxis:A,grid:C,originX:T,originY:G,xCellWidth:Y,endY:N,startTime:V,leftScales:H,rightScales:M,yCellHeight:$,endX:B,scaleValues:W,canvasWidth:q,borderStyle:z,event:D,other:F,timeXAxisHeight:I,canvasHeight:R,extraTimeXAxisList:J}=v,K=p(W),O=new Set;function Q(){K.filter((t=>t.show)).forEach(((t,r)=>{var l;const s=[],a=[],u=[];null==(l=t.data)||l.forEach(((l,c)=>{!function(l,c,f){if(!l)return;let h,d;const{pointAttr:p={},lineAttr:m={},title:v="",key:g,type:y="circle",childbirthStyle:b={}}=t,w=t.data[f+1],L=Z(w,t);if(l&&L&&!c.breakpoint)d=U([...l,...L],m);else if(l&&!L&&!c.breakpoint){const e=Z(w,t);d=e?U([...l,...e],m):null}if(c.childbirth){const t=l[0]+Y,n=l[1]+$/2,o=U([l[0],l[1],t,n],m);u.push(o);const r=e([t,n],{value:String(c.childbirth),...i,...b,backgroundColor:"#fff"});u.push(r)}const j=a[f-1],k={origin:{data:c,title:v,key:g||"",dataIndex:r,index:f},leftLine:j,rightLine:d,...p,...P(),...n};l&&(j||(k.leftLine=null),h=o(y,{left:l[0],top:l[1],...k}));a.push(d),h&&(!function(t){D.hovered&&(t.on("mouseover",(()=>{!function(t,e="moving"){const{title:i,key:n,data:o}=t.origin;x.point={x:t.left,y:t.top},x.list=[`${i} ${"hover"===e?o.value:E(n,t.top)}`,`时间 ${S(t.left).slice(-5)}`],x.show=!0}(t,"hover")})),t.on("mouseout",(()=>{x.show=!1})))}(h),s.push(h),O.add(h))}(Z(l,t),l,c)})),Promise.all(s).then((t=>{const e=a.filter((t=>t));X(t),Promise.all(u).then((i=>{m.value.add(...e,...t,...i),t.forEach((t=>{null==t||t.bringToFront()}))}))}))}))}function U([e,i,o,r],l){return new t.Polyline([{x:e,y:i},{x:o,y:i},{x:o,y:r}],{...l,fill:"transparent",...n})}function Z(t,e){if(f(t)&&function(t){const e=V+864e5,i=h(t);return i>=V&&i<=e}(t.time)){const i=b(t.time),n=w(e.key,e.range,t.value);return[i,n<G?G:n>N?N:n]}}return r(m,v),function(){const e=new t.Rect({...z,width:B-T,height:N-G,left:T,top:G,fill:"transparent"});m.value.add(e)}(),function(){function o(o,r="left"){const l=10;let c="left"===r?0:B;o.forEach(((o,r)=>{const{range:f,spaceValue:h,width:p,title:v,titleStyle:g,unit:x,key:y,position:b="center",spaceGridNumber:w=1,showNumber:S,showMaxMinNumber:E}=o,L=[],j=[],k=d(f,h),X=k.length,{lineXMain:P,lineXSub:A,textLeft:C}=s(b,c,p);k.forEach(((t,e)=>{const i=N-e*$*w;!S||(0===e||e===X-1)&&!E||L.push(a(String(t),o,C,i)),j.push(...u(o,e,P,A,i,$,G,X))}));const T=e([c+l,G+(N-G)/2],{value:String(v+"("+x+")"),...i,originX:"center",angle:-90,...g}),Y=new t.Group([...j,...L,...T?[T]:[]],{objectCaching:!1,...n});m.value.add(Y),Y.sendToBack(),c+=p}))}o(H),o(M,"right")}(),function(){const{show:o,range:r=[0,20],position:l="top",style:s,spaceGridNumber:a=2,spaceValue:u=2}=A.time;if(o){const o=[],c=$/2;d(r,u).forEach(((t,n)=>{const r="top"===l?G-c:N+I+c;o.push(e([T+n*Y*a,r],{value:0===n?"Admission":String(t),...i,...s}))}));const f=new t.Group(o,{objectCaching:!1,...n});m.value.add(f),m.value.sendToBack(f)}!function(){if((null==J?void 0:J.length)>0){const t=[];J.forEach((n=>{const o=b(n),r=N+I;t.push(e([o,r],{value:String(n.slice(11,16)),...i,originY:"bottom"}))})),m.value.add(...t)}}()}(),function(){const{alertLineList:t=[],alertLineTitle:n="入院时宫颈扩张不同情况"}=F;if(t.length<1)return;const o=e([B,0],{value:n,...i,originX:"right",originY:"top"});m.value.add(o),t.forEach((t=>{const{style:i,data:n=[]}=t;if(n.length<1)return;const o=[],r=K.find((t=>"cervix"===t.key));n.map((t=>({...t,time:V+60*t.time*60*1e3}))).forEach(((t,n,l)=>{const s=Z(t,r),a=Z(l[n+1],r);s&&!a&&o.push(e([s[0],G-10],{value:l[0].value+(r.unit||"cm"),fill:i.stroke||"#000"})),s&&a&&o.push(U([...s,...a],i))})),m.value.add(...o)}))}(),Q(),{redrawPoints:function(){var t;O.size&&(null==(t=m.value)||t.remove(...function(t){const e=[];return t.forEach((t=>{t&&e.push(t),(null==t?void 0:t.leftLine)&&e.push(null==t?void 0:t.leftLine),(null==t?void 0:t.rightLine)&&e.push(null==t?void 0:t.rightLine)})),e}([...O]))),O.clear(),Q()}}}export{m as useNewBirthProcess};
@@ -1 +1 @@
1
- import{ref as e,computed as a,reactive as t,watch as l}from"vue";import{defaultBorderStyle as i}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import{format as r}from"date-fns";import{getTime as u}from"../../utils/index.js";import{range as s}from"lodash-es";import"../useEvent.js";import"../temperature/useShadow.js";import"naive-ui";import"@vueuse/core";import{useNewBirthProcess as n}from"./useNewBirthProcess.js";function o(o,d,v,c,m,h){const x=e(),p=e(),g=e(),f=a((()=>d.data.scaleValues.filter((e=>"left"===e.layout&&e.show)))),w=a((()=>d.data.scaleValues.filter((e=>"right"===e.layout&&e.show)))),b=a((()=>{var e;return null==(e=f.value)?void 0:e.reduce(((e,a)=>e+=a.width),0)})),y=a((()=>{var e;const{width:a}=d.data;return a-((null==(e=w.value)?void 0:e.reduce(((e,a)=>e+=a.width),0))||12)})),j=a((()=>d.data.grid.mainXCell||20)),A=a((()=>d.data.grid.mainYCell||8)),M=a((()=>(y.value-b.value)/j.value)),S=a((()=>{var e;const{xAxis:a,height:t,other:l}=d.data,i=Object.values(a).reduce(((e,a)=>(a.show&&e++,e)),0),r=(null!=(e=null==l?void 0:l.alertLineList.length)?e:0)>0;return(t-C.value)/(A.value+i+(r?1:0))})),V=a((()=>{var e;const{xAxis:a,other:t}=d.data,l=Object.values(a).reduce(((e,a)=>(a.show&&"top"===a.position&&e++,e)),0),i=(null!=(e=null==t?void 0:t.alertLineList.length)?e:0)>0;return S.value*(l||i?1:0)})),X=a((()=>{const{xAxis:e,height:a}=d.data,t=Object.values(e).reduce(((e,a)=>(a.show&&"bottom"===a.position&&e++,e)),0);return a-S.value*t-C.value})),C=a((()=>{const e=f.value.concat(w.value);return(null==e?void 0:e.length)>0?20:0})),H=a((()=>u(d.data.xAxis.time.startTime))),L=a((()=>{const{spaceValue:e,spaceGridNumber:a}=d.data.xAxis.time||{};return 60*e*60*1e3/(M.value*a)})),Y=a((()=>{var e,a,t;const l=null==(t=null==(a=null==(e=f.value.concat(w.value))?void 0:e[0])?void 0:a.data)?void 0:t.map((e=>u(e.time))),i=Math.min(...l),n=Math.max(...l),o=L.value*M.value,d=s(1,j.value+1).reduce(((e,a,t)=>e.concat(H.value+a*o)),[H.value]),v=d.findIndex((e=>Math.abs(e-i)<o)),c=d.findIndex((e=>Math.abs(e-n)<o))+1;return d.filter(((e,a)=>a>=v&&a<=c)).map((e=>r(new Date(e),"yyyy-MM-dd HH:mm:ss")))})),N=a((()=>{const{scaleValues:e}=d.data,a=e.find((e=>"cervix"===e.key));return S.value/((null==a?void 0:a.spaceValue)||1)})),I=a((()=>{var e;return(null==(e=d.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),O=t({canvasWidth:d.data.width,canvasHeight:d.data.height,borderStyle:{...i,...d.data.borderStyle||{}},selectionStyle:d.data.selectionStyle||{},grid:d.data.grid,other:d.data.other,originX:b.value,endX:y.value,originY:V.value,endY:X.value,xCellWidth:M.value,yCellHeight:S.value,gridXNumber:j.value,gridYNumber:A.value,xAxis:d.data.xAxis,leftScales:f.value,rightScales:w.value,startTime:H.value,timeXCell:L.value,cervixYCell:N.value,scaleValues:d.data.scaleValues,timeXAxisHeight:C.value,extraTimeXAxisList:Y.value,event:I.value});return l((()=>o.value),(e=>{e&&function(){const{redrawPoints:e}=n(o,O,v,m);p.value=e}()}),{immediate:!0}),{propItems:O,redrawPoints:p,select:x,clickMenu:g}}export{o as useNewBirthProcessChart};
1
+ import{ref as e,computed as a,reactive as t,watch as l}from"vue";import{defaultBorderStyle as i}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import{format as r}from"date-fns";import{getTime as u}from"../../utils/index.js";import{range as s,last as n}from"lodash-es";import"../useEvent.js";import"../temperature/useShadow.js";import"naive-ui";import"@vueuse/core";import{useNewBirthProcess as o}from"./useNewBirthProcess.js";function d(d,v,c,m,h,x){const p=e(),g=e(),f=e(),w=a((()=>v.data.scaleValues.filter((e=>"left"===e.layout&&e.show)))),b=a((()=>v.data.scaleValues.filter((e=>"right"===e.layout&&e.show)))),y=a((()=>{var e;return null==(e=w.value)?void 0:e.reduce(((e,a)=>e+=a.width),0)})),j=a((()=>{var e;const{width:a}=v.data;return a-((null==(e=b.value)?void 0:e.reduce(((e,a)=>e+=a.width),0))||15)})),A=a((()=>v.data.grid.mainXCell||20)),M=a((()=>v.data.grid.mainYCell||8)),S=a((()=>(j.value-y.value)/A.value)),V=a((()=>{var e;const{xAxis:a,height:t,other:l}=v.data,i=Object.values(a).reduce(((e,a)=>(a.show&&e++,e)),0),r=(null!=(e=null==l?void 0:l.alertLineList.length)?e:0)>0;return(t-H.value)/(M.value+i+(r?1:0))})),X=a((()=>{var e;const{xAxis:a,other:t}=v.data,l=Object.values(a).reduce(((e,a)=>(a.show&&"top"===a.position&&e++,e)),0),i=(null!=(e=null==t?void 0:t.alertLineList.length)?e:0)>0;return V.value*(l||i?1:0)})),C=a((()=>{const{xAxis:e,height:a}=v.data,t=Object.values(e).reduce(((e,a)=>(a.show&&"bottom"===a.position&&e++,e)),0);return a-V.value*t-H.value})),H=a((()=>{const e=w.value.concat(b.value);return(null==e?void 0:e.length)>0?20:0})),L=a((()=>u(v.data.xAxis.time.startTime))),Y=a((()=>{const{spaceValue:e,spaceGridNumber:a}=v.data.xAxis.time||{};return 60*e*60*1e3/(S.value*a)})),N=a((()=>{var e,a,t;const l=null==(t=null==(a=null==(e=w.value.concat(b.value))?void 0:e[0])?void 0:a.data)?void 0:t.map((e=>u(e.time))),i=Math.min(...l);let o=Math.min(Math.max(...l));const d=Y.value*S.value,v=s(1,A.value+1).reduce(((e,a,t)=>e.concat(L.value+a*d)),[L.value]);o=Math.min(o,n(v));const c=v.findIndex((e=>Math.abs(e-i)<d)),m=v.findIndex((e=>Math.abs(e-o)<d))+1;return v.filter(((e,a)=>a>=c&&a<=m)).map((e=>r(new Date(e),"yyyy-MM-dd HH:mm:ss")))})),I=a((()=>{const{scaleValues:e}=v.data,a=e.find((e=>"cervix"===e.key));return V.value/((null==a?void 0:a.spaceValue)||1)})),O=a((()=>{var e;return(null==(e=v.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),P=t({canvasWidth:v.data.width,canvasHeight:v.data.height,borderStyle:{...i,...v.data.borderStyle||{}},selectionStyle:v.data.selectionStyle||{},grid:v.data.grid,other:v.data.other,originX:y.value,endX:j.value,originY:X.value,endY:C.value,xCellWidth:S.value,yCellHeight:V.value,gridXNumber:A.value,gridYNumber:M.value,xAxis:v.data.xAxis,leftScales:w.value,rightScales:b.value,startTime:L.value,timeXCell:Y.value,cervixYCell:I.value,scaleValues:v.data.scaleValues,timeXAxisHeight:H.value,extraTimeXAxisList:N.value,event:O.value});return l((()=>d.value),(e=>{e&&function(){const{redrawPoints:e}=o(d,P,c,h);g.value=e}()}),{immediate:!0}),{propItems:P,redrawPoints:g,select:p,clickMenu:f}}export{d as useNewBirthProcessChart};