cnhis-design-vue 3.1.45-beta.2 → 3.1.45-beta.4

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 (31) hide show
  1. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
  2. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
  3. package/es/components/fabric-chart/src/hooks/temperature/useRight.js +1 -1
  4. package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -1
  5. package/es/components/fabric-chart/src/hooks/useDraw.js +1 -1
  6. package/es/components/fabric-chart/src/interface.d.ts +9 -0
  7. package/es/components/form-config/index.d.ts +3472 -13
  8. package/es/components/form-config/src/FormConfig.vue.d.ts +3472 -13
  9. package/es/components/form-config/src/FormConfig.vue2.js +1 -1
  10. package/es/components/form-config/src/components/FormConfigDragDisplay.vue2.js +1 -1
  11. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +2 -0
  12. package/es/components/form-config/src/components/FormConfigMaterialItem.d.ts +11 -1
  13. package/es/components/form-config/src/components/FormConfigMaterialItem.js +1 -1
  14. package/es/components/form-config/src/components/renderer/DefaultNode.vue.d.ts +2 -0
  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 -0
  17. package/es/components/form-config/src/constants/index.js +1 -1
  18. package/es/components/form-config/src/hooks/useSortalbeConfig.js +1 -1
  19. package/es/components/form-config/src/types/index.d.ts +2 -0
  20. package/es/components/form-config/style/index.css +1 -1
  21. package/es/components/form-render/src/components/renderer/levelSearchCascader.js +1 -1
  22. package/es/components/index.css +1 -1
  23. package/es/components/search-cascader/index.d.ts +16 -3
  24. package/es/components/search-cascader/src/SearchCascader.vue.d.ts +16 -3
  25. package/es/components/search-cascader/src/SearchCascader.vue2.js +1 -1
  26. package/es/shared/package.json.js +1 -1
  27. package/package.json +2 -2
  28. package/es/components/search-cascader/src/hooks/index.d.ts +0 -1
  29. package/es/components/search-cascader/src/hooks/index.js +0 -1
  30. package/es/components/search-cascader/src/hooks/useCssVariable.d.ts +0 -3
  31. package/es/components/search-cascader/src/hooks/useCssVariable.js +0 -1
@@ -1 +1 @@
1
- import{ref as t,reactive as r}from"vue";import{defaultBorderStyle as e}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import"date-fns";import"lodash-es";import"@vueuse/core";import"../temperature/useShadow.js";function o(o,a,i,s){t(),t(),t(),r({show:!1,point:{x:0,y:0},list:[]}),r({show:!1,point:{x:0,y:0},list:[],target:null});return{propItems:r({canvasWidth:a.data.width,canvasHeight:a.data.height,borderStyle:{...e,...a.data.borderStyle||{}},grid:a.data.grid,other:a.data.other})}}export{o as useSurgicalAnesthesiaChart};
1
+ import{ref as t,reactive as e,computed as a}from"vue";import{defaultBorderStyle as r}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import"date-fns";import"lodash-es";import"@vueuse/core";import"../temperature/useShadow.js";function i(i,l,o,n){t(),t(),t(),e({show:!1,point:{x:0,y:0},list:[]}),e({show:!1,point:{x:0,y:0},list:[],target:null});const u=a((()=>{let t=0;return function e(a){a.forEach((a=>{var r;(null==(r=a.children)?void 0:r.length)?e(a.children):t++}))}(l.data.top.treeData),t})),d=a((()=>l.data.top.tree.cellHeight)),s=a((()=>{const{xAxis:t}=l.data;return"top"===t.position?t.height:0}));a((()=>s.value+d.value*u.value));const h=a((()=>{const{grid:t}=l.data;return t.mainXCell*t.subXCell})),v=a((()=>{const{grid:t}=l.data;return t.mainYCell*t.subYCell}));a((()=>(p.value-c.value)/h.value)),a((()=>(m.value-g.value)/v.value));const c=a((()=>l.data.width-l.data.left.width)),p=a((()=>{var t;const{width:e,right:a}=l.data;if(!a)return e;return e-(null!=(t=a.width)?t:0)})),g=a((()=>l.data.xAxis.height+d.value*u.value)),m=a((()=>{var t;const{bottom:e=null,height:a}=l.data;if(!e)return a;return a-(null!=(t=e.height)?t:0)}));return{propItems:e({canvasWidth:l.data.width,canvasHeight:l.data.height,borderStyle:{...r,...l.data.borderStyle||{}},grid:l.data.grid,other:l.data.other})}}export{i as useSurgicalAnesthesiaChart};
@@ -1 +1 @@
1
- import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{defaultTextStyle as e,defaultStyle as i,drawPoint as n,drawTextGroup as o}from"../useDraw.js";import"date-fns";import{getType as l,isOneLine as r}from"../../utils/index.js";import"@vueuse/core";import{getScaleInfo as s,drawScaleNumber as a,drawScaleLine as u}from"../useScaleColumn.js";import{useCommon as h}from"../useCommon.js";import"vue";import"lodash-es";import"./useShadow.js";function g(g,p,c,d,f,y,m,v,w,S,b){var Y,x;const{getEqualXTypes:j,handleAddPrevent:T}=h(g,c),{originY:X,endY:C,originX:N,endX:V,xCellWidth:L,yCellHeight:M,left:k,vitalSignsOriginY:E,painOriginY:I,painHeight:A,iconsWidth:G,itemList:H,painIndex:O,right:W,canvasWidth:R,canvasHeight:_,getRightInfo:B,borderStyle:J}=p;function $(n){var l;if(!(null==n?void 0:n.length))return;const{layout:r}=n[0];let h=G,p=N;"right"===r&&(h=V,p=V+(null!=(l=null==W?void 0:W.width)?l:0));const c=[],d=A&&"right"!==r?n.length-1:n.length,f=(p-h)/d,y=f+(p-h)%d;n.forEach(((n,l)=>{if("pain"===n.type)return void function(i){const{list:n=[],spaceGridNumber:l=5,showScale:r,showNumber:u,position:h,showMaxMinNumber:p,style:c,title:d}=i,f=o({width:N-G,height:A,...J},{value:`${d}`,...e,...c||{}},{left:G,top:I.originY}),y=[];if(r||u){const{lineXMain:e,textLeft:o}=s(h,G,N-G),g=n.length;n.forEach(((n,s)=>{let h=I.endY-s*M*l;if(0===s&&(h=C-5),!u||(0===s||s===g-1)&&!p||y.push(a(n,i,o,h)),r&&0!==s){const[i,n]=e,o=new t.Line([i,h,n,h],{...J,...c});y.push(o)}}))}g.value.add(f,...y),f.sendToBack()}(n);const p=[],d=0===l?y:f,m=0===l?h:y+h+(l-1)*f,v="right"===r?0:E.originY,w="right"===r?_:E.endY,S=l>0?new t.Line([m,v,m,w],{...J}):null;S&&p.push(S);const b=m+d/2,{list:Y=[],spaceGridNumber:x=5,showScale:j,showNumber:T,position:X,showMaxMinNumber:V}=n;if(j||T){const{lineXMain:t,lineXSub:e,textLeft:i}=s(X,m,d),o=Y.length;Y.forEach(((l,r)=>{const s=E.endY-r*M*x;if(T&&(!(0===r||r===o-1)||V)){const t=0==r?s-5:s,e=a(l,n,i,t),o=E.originY+e.height/2;t<o&&e.set({top:o}),p.push(e)}p.push(...u(n,r,t,e,s,M,E.originY))}))}let L=n.title||"";n.unit&&(L+="\n"+n.unit),L&&p.push(new t.Text(String(L),{...e,left:b,top:E.originY+M*x/2,textAlign:"center",...n.style}));const k=new t.Group(p,{...i,objectCaching:!1});c.push(k)}));const m=c.length>0?new t.Group([...c],{...i,objectCaching:!1}):null;m&&g.value.add(m),m&&m.sendToBack()}function q(t){return t.left>=N&&t.left<V&&t.top>=X&&t.top<=C}G&&function(){const e=JSON.parse(JSON.stringify(H));let o=C;const s=G-k.icons.marginRight;e.reverse().forEach((e=>{o-=10;let a=e.title.replace(/(.{2})/g,"$1\n");a.endsWith("\n")&&(a=a.slice(0,a.length-1));const u=new t.Text(String(a),{...i,objectCaching:!1,...e.titleStyle||{},originX:"right",originY:"bottom",left:s-(e.pointAttr.width||10)-5,top:o,lineHeight:1,fontSize:12}),h=n(e.type,{left:s,top:o-(u.height||30)/2-1,...e.pointAttr,originY:"center",originX:"right",origin:{title:e.title,unit:e.unit,type:l(e.bigType),_type:e.bigType,dataIndex:e.dataIndex,key:e.key,isMenu:!0},originLeft:s,originTop:o-(u.height||30)/2-1,...p.event});var y;o-=u.height||30,(y=h).on("moving",(()=>{y.set("originX","center"),function(t){if(t.left>=N&&t.left<=V){t.setCoords();const e="pain"===t.origin.type?I:E;t.top<e.originY&&t.set("top",e.originY),t.top>e.endY&&t.set("top",e.endY)}}(y),q(y)?d(y):f.show=!1})),y.on("mouseup:before",(t=>{if(f.show=!1,0===t.e.button&&q(y)){const t=j(y.left,"_type",L).includes(y.origin._type),e=S(y.left);if(!e||t)t&&e&&T("repeat");else{const t={data:{time:v(y.left),value:w(y.origin.type,y.top),...r(y.origin.type)?{key:y.origin.key}:{}},...y.origin};c("add",t),b(t)}}!function(t){t.setCoords().set({originX:"right",left:t.originLeft,top:t.originTop})}(y)})),g.value.add(u,h)}))}();const z=k.yScaleValue.filter((t=>"left"===t.layout&&"pain"!==t.type&&t.show));if((null==W?void 0:W.width)&&"left"===(null==(Y=null==W?void 0:W.yScaleValue)?void 0:Y.layout)&&(null==(x=null==W?void 0:W.yScaleValue)?void 0:x.show)&&z.push(B),O>0&&k.yScaleValue[O].show){const t=k.yScaleValue[O];0===O&&k.yScaleValue.length>1&&z.unshift(t),O==k.yScaleValue.length-1&&z.push(t)}const D=z.findIndex((t=>"pulse"===t.type&&t.show&&t.doubleShow)),P=z[D];return D>-1&&z.splice(D,0,{...P,title:(null==P?void 0:P.doubleTitle)||(null==P?void 0:P.title)}),$(z),g.value.add(new t.Rect({left:G,top:0,width:R-G-1,height:_-1,fill:"transparent",...J})),{drawScaleValue:$}}export{g as useLeft};
1
+ import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as e,defaultTextStyle as i,defaultStyle as n,drawPoint as o,drawTextGroup as l}from"../useDraw.js";import"date-fns";import{getType as r,isOneLine as s}from"../../utils/index.js";import"@vueuse/core";import{getScaleInfo as a,drawScaleNumber as u,drawScaleLine as h}from"../useScaleColumn.js";import{useCommon as g}from"../useCommon.js";import"vue";import"lodash-es";import"./useShadow.js";function p(p,c,d,f,y,m,v,w,S,b,Y){var x,j;const{getEqualXTypes:C,handleAddPrevent:T}=g(p,d),{originY:X,endY:k,originX:N,endX:V,xCellWidth:M,yCellHeight:L,left:W,vitalSignsOriginY:E,painOriginY:I,painHeight:A,iconsWidth:G,itemList:H,painIndex:O,right:R,canvasWidth:_,canvasHeight:B,getRightInfo:J,borderStyle:$}=c;function q(o){var r;if(!(null==o?void 0:o.length))return;const{layout:s}=o[0];let g=G,c=N;"right"===s&&(g=V,c=V+(null!=(r=null==R?void 0:R.width)?r:0));const d=[],f=A&&"right"!==s?o.length-1:o.length,y=(c-g)/f,m=y+(c-g)%f;o.forEach(((o,r)=>{if("pain"===o.type)return void function(n){const{list:o=[],spaceGridNumber:r=5,showScale:s,showNumber:h,position:g,showMaxMinNumber:c,style:d,title:f}=n,y=l({width:N-G,height:A,...$},{value:`${f}`,...i,...d||{}},{left:G,top:I.originY}),m=e([G,I.originY,N,I.originY],$),v=[];if(s||h){const{lineXMain:e,textLeft:i}=a(g,G,N-G),l=o.length;o.forEach(((o,a)=>{let g=I.endY-a*L*r;if(0===a&&(g=k-5),!h||(0===a||a===l-1)&&!c||v.push(u(o,n,i,g)),s&&0!==a){const[i,n]=e,o=new t.Line([i,g,n,g],{...$,...d});v.push(o)}}))}p.value.add(m,y,...v),y.sendToBack()}(o);const c=[],f=0===r?m:y,v=0===r?g:m+g+(r-1)*y,w="right"===s?0:E.originY,S="right"===s?B:E.endY,b=r>0?e([v,w,v,S],{objectCaching:!1,...$}):null;b&&c.push(b);const Y=v+f/2,{list:x=[],spaceGridNumber:j=5,showScale:C,showNumber:T,position:X,showMaxMinNumber:V}=o;if(C||T){const{lineXMain:t,lineXSub:e,textLeft:i}=a(X,v,f),n=x.length;x.forEach(((l,r)=>{const s=E.endY-r*L*j;if(T&&(!(0===r||r===n-1)||V)){const t=0==r?s-5:s,e=u(l,o,i,t),n=E.originY+e.height/2;t<n&&e.set({top:n}),c.push(e)}c.push(...h(o,r,t,e,s,L,E.originY))}))}let M=o.title||"";o.unit&&(M+="\n"+o.unit),M&&c.push(new t.Text(String(M),{...i,left:Y,top:E.originY+L*j/2,textAlign:"center",...o.style}));const W=new t.Group(c,{...n,objectCaching:!1});d.push(W)}));const v=d.length>0?new t.Group([...d],{...n,objectCaching:!1}):null;v&&p.value.add(v),v&&v.sendToBack()}function z(t){return t.left>=N&&t.left<V&&t.top>=X&&t.top<=k}G&&function(){const e=JSON.parse(JSON.stringify(H));let i=k;const l=G-W.icons.marginRight;e.reverse().forEach((e=>{i-=10;let a=e.title.replace(/(.{2})/g,"$1\n");a.endsWith("\n")&&(a=a.slice(0,a.length-1));const u=new t.Text(String(a),{...n,objectCaching:!1,...e.titleStyle||{},originX:"right",originY:"bottom",left:l-(e.pointAttr.width||10)-5,top:i,lineHeight:1,fontSize:12}),h=o(e.type,{left:l,top:i-(u.height||30)/2-1,...e.pointAttr,originY:"center",originX:"right",origin:{title:e.title,unit:e.unit,type:r(e.bigType),_type:e.bigType,dataIndex:e.dataIndex,key:e.key,isMenu:!0},originLeft:l,originTop:i-(u.height||30)/2-1,...c.event});var g;i-=u.height||30,(g=h).on("moving",(()=>{g.set("originX","center"),function(t){if(t.left>=N&&t.left<=V){t.setCoords();const e="pain"===t.origin.type?I:E;t.top<e.originY&&t.set("top",e.originY),t.top>e.endY&&t.set("top",e.endY)}}(g),z(g)?f(g):y.show=!1})),g.on("mouseup:before",(t=>{if(y.show=!1,0===t.e.button&&z(g)){const t=C(g.left,"_type",M).includes(g.origin._type),e=b(g.left);if(!e||t)t&&e&&T("repeat");else{const t={data:{time:w(g.left),value:S(g.origin.type,g.top),...s(g.origin.type)?{key:g.origin.key}:{}},...g.origin};d("add",t),Y(t)}}!function(t){t.setCoords().set({originX:"right",left:t.originLeft,top:t.originTop})}(g)})),p.value.add(u,h)}))}();const D=W.yScaleValue.filter((t=>"left"===t.layout&&"pain"!==t.type&&t.show));if((null==R?void 0:R.width)&&"left"===(null==(x=null==R?void 0:R.yScaleValue)?void 0:x.layout)&&(null==(j=null==R?void 0:R.yScaleValue)?void 0:j.show)&&D.push(J),O>0&&W.yScaleValue[O].show){const t=W.yScaleValue[O];0===O&&W.yScaleValue.length>1&&D.unshift(t),O==W.yScaleValue.length-1&&D.push(t)}const P=D.findIndex((t=>"pulse"===t.type&&t.show&&t.doubleShow)),F=D[P];return P>-1&&D.splice(P,0,{...F,title:(null==F?void 0:F.doubleTitle)||(null==F?void 0:F.title)}),q(D),p.value.add(new t.Rect({left:G,top:0,width:_-G-$.strokeWidth,height:B-$.strokeWidth,fill:"transparent",...$})),{drawScaleValue:q}}export{p as useLeft};
@@ -1 +1 @@
1
- import{fabric as l}from"../../../../../shared/utils/fabricjs/index.js";function e(e,i,t){var o,n;const{left:d,right:u,getRightInfo:a,canvasWidth:s,endY:h,endX:r,originY:f,borderStyle:v}=i,c=d.yScaleValue.filter((l=>"right"===l.layout&&l.show));(null==u?void 0:u.width)&&"right"===(null==(o=null==u?void 0:u.yScaleValue)?void 0:o.layout)&&(null==(n=null==u?void 0:u.yScaleValue)?void 0:n.show)&&c.push(a);const w=c.findIndex((l=>"pulse"===l.type&&l.show&&l.doubleShow)),g=c[w];if(w>-1&&c.splice(w,0,{...g,title:(null==g?void 0:g.doubleTitle)||(null==g?void 0:g.title)}),(null==u?void 0:u.width)||c.length>0){const i=new l.Line([s-1,0,s-1,h],v),t=new l.Line([r+1,f,s-1,f],{...v,stroke:"#fff"});e.value.add(i,t)}t(c)}export{e as useRight};
1
+ function l(l,o,t){var e,i;const{left:u,right:n,getRightInfo:d}=o,h=u.yScaleValue.filter((l=>"right"===l.layout&&l.show));(null==n?void 0:n.width)&&"right"===(null==(e=null==n?void 0:n.yScaleValue)?void 0:e.layout)&&(null==(i=null==n?void 0:n.yScaleValue)?void 0:i.show)&&h.push(d);const a=h.findIndex((l=>"pulse"===l.type&&l.show&&l.doubleShow)),s=h[a];a>-1&&h.splice(a,0,{...s,title:(null==s?void 0:s.doubleTitle)||(null==s?void 0:s.title)}),t(h)}export{l as useRight};
@@ -1 +1 @@
1
- import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{defaultStyle as e,drawTextGroup as l,defaultTextStyle as i}from"../useDraw.js";import"date-fns";import"lodash-es";import"@vueuse/core";import"vue";import"./useShadow.js";function o(o,s){const{grid:u,originX:h,xCellWidth:n,gridXNumber:a,top:c,xScalevalueHeight:r,iconsWidth:d,topList:p,endXLimit:f,canvasWidth:v,borderStyle:g}=s;!function(){const y=[];f&&y.push(new t.Line([f,0,v,0],g));let m=0;p.forEach(((t,e)=>{e>0&&(m+=s[`${p[e-1].key}Height`]),"xScalevalue"==t.key?(function(t,e,o){if(!c.dayHeight)return!1;const s=c.dayHeight,r=n*u.subSecondXCell,d=(a-u.surplusXCell)/u.subSecondXCell;for(let u=0;u<d;u++){const n=h+u*r,a=u%2==0?"上午":"下午",c=l({width:r,height:s,...g},{value:a,...i,...t.style||{}},{left:n,top:o});e.push(c)}}(t,y,m),function(t,e,o){var s;const a=c.xScalevalue.show&&null!=(s=c.dayHeight)?s:0,p=r-a,f=l({width:h-d,height:r,...g},{value:c.xScalevalue.title,...i,...t.style||{},...t.titleStyle||{}},{left:d,top:o});e.push(f);const v=[];for(let t=0;t<u.mainXCell;t++)v.push(c.xScalevalue.list);v.flat().forEach(((s,u)=>{const c=h+u*n,r=l({width:n,height:p,...g},{value:s.value,...i,...t.style||{},...s.style||{}},{left:c,top:o+a});e.push(r)}))}(t,y,m)):s[`${t.key}Height`]&&function(t,e,o){const a=s[`${t.key}Height`],c=l({width:h-d,height:a,...g},{value:t.title,...i,...(null==t?void 0:t.style)||{},...t.titleStyle||{}},{left:d,top:o});e.push(c);const r=n*u.subXCell;t.list.forEach(((s,u)=>{const n=h+u*r,c=l({width:r,height:a,...g},{value:s,...i,...(null==t?void 0:t.style)||{}},{left:n,top:o});e.push(c)}))}(t,y,m)}));const S=y.length>0?new t.Group([...y],{...e,objectCaching:!1}):null;S&&S.sendToBack(),S&&o.value.add(S)}()}export{o as useTop};
1
+ import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as e,defaultStyle as l,drawTextGroup as s,defaultTextStyle as i}from"../useDraw.js";import"date-fns";import"lodash-es";import"@vueuse/core";import"vue";import"./useShadow.js";function o(o,u){const{grid:h,originX:n,endX:a,xCellWidth:c,gridXNumber:r,top:p,xScalevalueHeight:d,iconsWidth:f,topList:v,endXLimit:g,canvasWidth:y,borderStyle:m}=u;!function(){const S=[];g&&S.push(new t.Line([g,0,y,0],m));let w=0;v.forEach(((t,l)=>{if(l>0&&(w+=u[`${v[l-1].key}Height`]),"xScalevalue"==t.key)!function(t,l,o){const u=p.dayHeight;if(!u)return;l.push(e([n,o+u,a,o+u],m));const d=c*h.subSecondXCell,f=(r-h.surplusXCell)/h.subSecondXCell;for(let h=0;h<f;h++){const a=n+h*d,c=h%2==0?"上午":"下午",r=s({width:d,height:u,...m},{value:c,...i,...t.style||{}},{left:a,top:o});l.push(r),l.push(e([a+d,o,a+d,o+u],m))}}(t,S,w),function(t,l,o){var u;const r=p.xScalevalue.show&&null!=(u=p.dayHeight)?u:0,v=d-r;if(!v)return;l.push(e([f,o+d,a,o+d],m));const g=s({width:n-f,height:d,...m},{value:p.xScalevalue.title,...i,...t.style||{},...t.titleStyle||{}},{left:f,top:o});l.push(g),l.push(e([n,o,n,o+d],m));const y=[];for(let t=0;t<h.mainXCell;t++)y.push(p.xScalevalue.list);y.flat().forEach(((u,h)=>{const a=n+h*c,p=s({width:c,height:v,...m},{value:u.value,...i,...t.style||{},...u.style||{}},{left:a,top:o+r});l.push(p),l.push(e([a+c,o+r,a+c,o+r+v],m))}))}(t,S,w);else{if(!u[`${t.key}Height`])return;const o=u[`${v[l].key}Height`];!function(t,l,o){const a=u[`${t.key}Height`],r=s({width:n-f,height:a,...m},{value:t.title,...i,...(null==t?void 0:t.style)||{},...t.titleStyle||{}},{left:f,top:o});l.push(r);const p=c*h.subXCell;t.list.forEach(((u,h)=>{const c=n+h*p,r=s({width:p,height:a,...m},{value:u,...i,...(null==t?void 0:t.style)||{}},{left:c,top:o});l.push(e([c+p,o,c+p,o+a],m)),l.push(r)}))}(t,S,w),S.push(e([f,w+o,a,w+o],m)),S.push(e([n,w,n,w+o],m))}}));const X=S.length>0?new t.Group([...S],{...l,objectCaching:!1}):null;X&&X.sendToBack(),X&&o.value.add(X)}()}export{o as useTop};
@@ -1 +1 @@
1
- import{fabric as e}from"../../../../shared/utils/fabricjs/index.js";const t={evented:!1,selectable:!1},r={stroke:"#000",strokeWidth:1,...t},i={stroke:"#000",strokeWidth:1,strokeDashArray:[0,0],...t},n={fill:"transparent",stroke:"#000",strokeWidth:1,originX:"center",originY:"center",objectCaching:!1,...t},o={fontFamily:"微软雅黑",fontSize:12,fill:"#000",centeredRotation:!0,originX:"center",originY:"center",lineHeight:1,objectCaching:!1,...t};function c(t,r){return new e.Line(t,{...i,...r})}function s([t,r],i){return new e.Text(String(i.value),{...o,left:t,top:r,...i})}function l([r,i,n],o,l="down"){const a=c([r,i,r,n],{strokeWidth:1,stroke:o.fill}),u=s([r+.5,"up"===l?n-3:n+3],{value:"v",originX:"center",originY:"bottom",fontSize:16,angle:"up"===l?180:0,...o});return new e.Group([a,u],{...t,originX:"center",originY:"top"})}function a(r,i,c){const s=new e.Rect({...n,...r,strokeWidth:.5}),{value:l="标题",textAlign:a="center",verticalAlign:u="center"}=i,g=r.width/2,h=r.height/2,d=new e.Text(String(l),{...o,...i,..."left"==a||"right"==a?{originX:a,left:"left"==a?-g:g}:{},..."top"==u||"bottom"==u?{originY:u,top:"top"==u?-h:h}:{}});return new e.Group([s,d],{objectCaching:!1,...t,...c})}function u(t="circle",r){const i={originX:"center",originY:"center",hasControls:!1,hasBorders:!1,hoverCursor:"pointer",objectCaching:!1,...r},n=()=>new e.Circle({objectCaching:!1,strokeWidth:r.strokeWidth||1,stroke:r.stroke||"red",radius:r.radius||5,fill:"#fff"});switch(t){case"triangle":return new e.Triangle({width:20,height:20,strokeWidth:1,scale:1,...i});case"circle":return new e.Circle({objectCaching:!1,strokeWidth:1,radius:5,scale:1,...i});case"image":return new e.Image(r.element,{...i,scale:1});case"yemai":{const t=()=>{const t=2*((r.radius||5)+(r.strokeWidth||1)),i={stroke:r.strokeX||"blue",strokeWidth:r.strokeWidthX||1,originX:"center",originY:"center"},n=new e.Line([0,t/2,t,t/2],i),o=new e.Line([t/2,0,t/2,t],i);return new e.Group([n,o])};return new e.Group([n(),t()],{scale:1,...i})}case"koumai":{const t=(r.radius||5)+(r.strokeWidth||1),o=new e.Circle({objectCaching:!1,radius:r.radiusCircle||2,fill:r.fillCircle||"#000",originX:"center",originY:"center",left:t,top:t});return new e.Group([n(),o],{scale:1,...i})}default:return r&&Reflect.deleteProperty(r,"stroke"),new e.Text(String(t),{fontFamily:"微软雅黑",scale:1,fontSize:14,fill:"#000",...i})}}export{r as defaultBorderStyle,i as defaultLineStyle,n as defaultRectStyle,t as defaultStyle,o as defaultTextStyle,l as drawArrow,c as drawLine,u as drawPoint,s as drawText,a as drawTextGroup};
1
+ import{fabric as e}from"../../../../shared/utils/fabricjs/index.js";const t={evented:!1,selectable:!1},r={stroke:"#000",strokeWidth:1,...t},n={stroke:"#000",strokeWidth:1,strokeDashArray:[0,0],...t},i={fill:"transparent",stroke:"#000",strokeWidth:1,originX:"center",originY:"center",objectCaching:!1,...t},o={fontFamily:"微软雅黑",fontSize:12,fill:"#000",centeredRotation:!0,originX:"center",originY:"center",lineHeight:1,objectCaching:!1,...t};function c(t,r){return new e.Line(t,{...n,...r})}function s([t,r],n){return new e.Text(String(n.value),{...o,left:t,top:r,...n})}function l([r,n,i],o,l="down"){const a=c([r,n,r,i],{strokeWidth:1,stroke:o.fill}),u=s([r+.5,"up"===l?i-3:i+3],{value:"v",originX:"center",originY:"bottom",fontSize:16,angle:"up"===l?180:0,...o});return new e.Group([a,u],{...t,originX:"center",originY:"top"})}function a(r,n,c){const s=new e.Rect({...i,...r,stroke:"transparent"}),{value:l="标题",textAlign:a="center",verticalAlign:u="center"}=n,g=r.width/2,h=r.height/2,d=new e.Text(String(l),{...o,...n,..."left"==a||"right"==a?{originX:a,left:"left"==a?-g:g}:{},..."top"==u||"bottom"==u?{originY:u,top:"top"==u?-h:h}:{}});return new e.Group([s,d],{objectCaching:!1,...t,...c})}function u(t="circle",r){const n={originX:"center",originY:"center",hasControls:!1,hasBorders:!1,hoverCursor:"pointer",objectCaching:!1,...r},i=()=>new e.Circle({objectCaching:!1,strokeWidth:r.strokeWidth||1,stroke:r.stroke||"red",radius:r.radius||5,fill:"#fff"});switch(t){case"triangle":return new e.Triangle({width:20,height:20,strokeWidth:1,scale:1,...n});case"circle":return new e.Circle({objectCaching:!1,strokeWidth:1,radius:5,scale:1,...n});case"image":return new e.Image(r.element,{...n,scale:1});case"yemai":{const t=()=>{const t=2*((r.radius||5)+(r.strokeWidth||1)),n={stroke:r.strokeX||"blue",strokeWidth:r.strokeWidthX||1,originX:"center",originY:"center"},i=new e.Line([0,t/2,t,t/2],n),o=new e.Line([t/2,0,t/2,t],n);return new e.Group([i,o])};return new e.Group([i(),t()],{scale:1,...n})}case"koumai":{const t=(r.radius||5)+(r.strokeWidth||1),o=new e.Circle({objectCaching:!1,radius:r.radiusCircle||2,fill:r.fillCircle||"#000",originX:"center",originY:"center",left:t,top:t});return new e.Group([i(),o],{scale:1,...n})}default:return r&&Reflect.deleteProperty(r,"stroke"),new e.Text(String(t),{fontFamily:"微软雅黑",scale:1,fontSize:14,fill:"#000",...n})}}export{r as defaultBorderStyle,n as defaultLineStyle,i as defaultRectStyle,t as defaultStyle,o as defaultTextStyle,l as drawArrow,c as drawLine,u as drawPoint,s as drawText,a as drawTextGroup};
@@ -7,6 +7,15 @@ interface IEvent {
7
7
  evented: boolean;
8
8
  hovered: boolean;
9
9
  }
10
+ export declare type ITreeItem = Partial<{
11
+ title: string;
12
+ totle: number;
13
+ data: Array<{
14
+ time: string[];
15
+ value: AnyObject;
16
+ }>;
17
+ children: ITreeItem[];
18
+ }>;
10
19
  interface ImainLineStyle {
11
20
  x: fabric.ILineOptions;
12
21
  y: fabric.ILineOptions;