cnhis-design-vue 3.1.47-beta.20 → 3.1.47-beta.21

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 (42) hide show
  1. package/es/components/fabric-chart/index.d.ts +3 -20
  2. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +3 -20
  3. package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
  4. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.d.ts +2 -1
  5. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.d.ts +2 -18
  6. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
  7. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.d.ts +2 -1
  8. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
  9. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.d.ts +2 -18
  10. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
  11. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.d.ts +2 -1
  12. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
  13. package/es/components/fabric-chart/src/hooks/temperature/useCenter.d.ts +2 -4
  14. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  15. package/es/components/fabric-chart/src/hooks/temperature/useLeft.d.ts +2 -3
  16. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.d.ts +2 -18
  17. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
  18. package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -1
  19. package/es/components/fabric-chart/src/interface.d.ts +12 -1
  20. package/es/components/index.js +1 -1
  21. package/es/components/insurance-sdk/index.d.ts +2 -1
  22. package/es/components/insurance-sdk/index.js +1 -1
  23. package/es/components/insurance-sdk/src/constants/index.d.ts +158 -154
  24. package/es/components/insurance-sdk/src/constants/index.js +1 -1
  25. package/es/components/insurance-sdk/src/insurance.d.ts +29 -0
  26. package/es/components/insurance-sdk/src/insurance.js +1 -0
  27. package/es/components/insurance-sdk/src/types/index.d.ts +27 -0
  28. package/es/components/insurance-sdk/src/types/index.js +1 -0
  29. package/es/components/insurance-sdk/src/utils/index.d.ts +9 -1
  30. package/es/components/insurance-sdk/src/utils/index.js +1 -1
  31. package/es/components/scale-view/index.d.ts +1 -0
  32. package/es/components/scale-view/src/ScaleView.vue.d.ts +1 -0
  33. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  34. package/es/components/scale-view/src/components/formitem/r-radio.js +1 -1
  35. package/es/components/shortcut-provider/src/types/index.d.ts +1 -0
  36. package/es/components/shortcut-setter/src/ShortcutSetter.vue2.js +1 -1
  37. package/es/components/shortcut-setter/src/ShortcutSetterItem.vue.d.ts +12 -0
  38. package/es/components/shortcut-setter/src/ShortcutSetterItem.vue2.js +1 -1
  39. package/es/shared/package.json.js +1 -1
  40. package/package.json +2 -2
  41. package/es/components/insurance-sdk/src/utils/insurance.d.ts +0 -260
  42. package/es/components/insurance-sdk/src/utils/insurance.js +0 -1
@@ -34,9 +34,6 @@ declare const FabricChart: SFCWithInstall<import("vue").DefineComponent<{
34
34
  emits: (event: "select" | "add" | "change" | "remove" | "add:prevent", ...args: any[]) => void;
35
35
  canvasRef: import("vue").Ref<HTMLCanvasElement | null>;
36
36
  canvas: import("vue").Ref<any>;
37
- propItems: any;
38
- redrawPoints: import("vue").Ref<any>;
39
- select: import("vue").Ref<any>;
40
37
  pointTipProps: {
41
38
  show: boolean;
42
39
  point: {
@@ -54,28 +51,14 @@ declare const FabricChart: SFCWithInstall<import("vue").DefineComponent<{
54
51
  list: any[];
55
52
  target: any;
56
53
  };
54
+ propItems: any;
55
+ redrawPoints: import("vue").Ref<any>;
56
+ select: import("vue").Ref<any>;
57
57
  clickMenu: import("vue").Ref<any>;
58
58
  init: () => {
59
59
  propItems: any;
60
60
  redrawPoints: import("vue").Ref<any>;
61
61
  select: import("vue").Ref<any>;
62
- pointTipProps: {
63
- show: boolean;
64
- point: {
65
- x: number;
66
- y: number;
67
- };
68
- list: string[];
69
- };
70
- pointMenuProps: {
71
- show: boolean;
72
- point: {
73
- x: number;
74
- y: number;
75
- };
76
- list: any[];
77
- target: any;
78
- };
79
62
  clickMenu: import("vue").Ref<any>;
80
63
  };
81
64
  PopupTip: import("vue").DefineComponent<{
@@ -36,9 +36,6 @@ declare const _default: import("vue").DefineComponent<{
36
36
  emits: (event: "select" | "add" | "change" | "remove" | "add:prevent", ...args: any[]) => void;
37
37
  canvasRef: import("vue").Ref<HTMLCanvasElement | null>;
38
38
  canvas: import("vue").Ref<any>;
39
- propItems: any;
40
- redrawPoints: import("vue").Ref<any>;
41
- select: import("vue").Ref<any>;
42
39
  pointTipProps: {
43
40
  show: boolean;
44
41
  point: {
@@ -56,28 +53,14 @@ declare const _default: import("vue").DefineComponent<{
56
53
  list: any[];
57
54
  target: any;
58
55
  };
56
+ propItems: any;
57
+ redrawPoints: import("vue").Ref<any>;
58
+ select: import("vue").Ref<any>;
59
59
  clickMenu: import("vue").Ref<any>;
60
60
  init: () => {
61
61
  propItems: any;
62
62
  redrawPoints: import("vue").Ref<any>;
63
63
  select: import("vue").Ref<any>;
64
- pointTipProps: {
65
- show: boolean;
66
- point: {
67
- x: number;
68
- y: number;
69
- };
70
- list: string[];
71
- };
72
- pointMenuProps: {
73
- show: boolean;
74
- point: {
75
- x: number;
76
- y: number;
77
- };
78
- list: any[];
79
- target: any;
80
- };
81
64
  clickMenu: import("vue").Ref<any>;
82
65
  };
83
66
  PopupTip: import("vue").DefineComponent<{
@@ -1 +1 @@
1
- import{defineComponent as e,ref as r,onMounted as t,onBeforeUnmount as s,openBlock as o,createElementBlock as a,Fragment as i,createElementVNode as n,createBlock as p,mergeProps as u,unref as c,createCommentVNode as l}from"vue";import{fabric as m}from"../../../shared/utils/fabricjs/index.js";import h from"./components/PopupTip.vue.js";import f from"./components/PopupMenu.js";import"./hooks/useDraw.js";import"date-fns";import"lodash-es";import"@vueuse/core";import{useBirthProcessChart as d}from"./hooks/birthProcess/useBirthProcessChart.js";import{useTemperatureChart as v}from"./hooks/temperature/useTemperatureChart.js";import{useSurgicalAnesthesiaChart as k}from"./hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js";var w=e({__name:"FabricChart",props:{type:{type:String,default:"temperature"},data:{type:Object,required:!0},addRenderItem:{type:Function}},emits:["change","add","remove","select","add:prevent"],setup(e,{expose:w,emit:g}){const C=e,j=r(null),P=r(),{propItems:y,redrawPoints:b,select:I,pointTipProps:M,pointMenuProps:T,clickMenu:x}=function(){const e=[P,C,g,j];switch(C.type){case"birthProcess":return d(...e);case"surgicalAnesthesia":return k(...e);default:return v(...e)}}();return t((()=>{P.value=new m.Canvas(j.value,{width:y.canvasWidth,height:y.canvasHeight,backgroundColor:"#fff",selection:!1,containerClass:"c-fabric-chart",fireRightClick:!0,allowTouchScrolling:!0})})),s((()=>{P.value.off(),P.value.clear()})),w({redrawPoints:b,select:I,canvas:P}),(e,r)=>(o(),a(i,null,[n("canvas",{ref_key:"canvasRef",ref:j},null,512),P.value?(o(),p(h,u({key:0,propItems:c(y)},c(M)),null,16,["propItems"])):l("v-if",!0),P.value?(o(),p(c(f),u({key:1,propItems:c(y)},c(T),{show:c(T).show,"onUpdate:show":r[0]||(r[0]=e=>c(T).show=e),onClickMenu:c(x)}),null,16,["propItems","show","onClickMenu"])):l("v-if",!0)],64))}});export{w as default};
1
+ import{defineComponent as e,ref as t,reactive as r,onMounted as s,onBeforeUnmount as o,openBlock as a,createElementBlock as i,Fragment as n,createElementVNode as u,createBlock as p,mergeProps as l,unref as c,createCommentVNode as h}from"vue";import{fabric as m}from"../../../shared/utils/fabricjs/index.js";import f from"./components/PopupTip.vue.js";import d from"./components/PopupMenu.js";import"./hooks/useDraw.js";import"date-fns";import"lodash-es";import"@vueuse/core";import{useBirthProcessChart as v}from"./hooks/birthProcess/useBirthProcessChart.js";import{useTemperatureChart as w}from"./hooks/temperature/useTemperatureChart.js";import{useSurgicalAnesthesiaChart as k}from"./hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js";var g=e({__name:"FabricChart",props:{type:{type:String,default:"temperature"},data:{type:Object,required:!0},addRenderItem:{type:Function}},emits:["change","add","remove","select","add:prevent"],setup(e,{expose:g,emit:y}){const C=e,j=t(null),b=t(),P=r({show:!1,point:{x:0,y:0},list:[]}),I=r({show:!1,point:{x:0,y:0},list:[],target:null}),{propItems:x,redrawPoints:M,select:A,clickMenu:R}=function(){const e=[b,C,y,j,P,I];switch(C.type){case"birthProcess":return v(...e);case"surgicalAnesthesia":return k(...e);default:return w(...e)}}();return s((()=>{b.value=new m.Canvas(j.value,{width:x.canvasWidth,height:x.canvasHeight,backgroundColor:"#fff",selection:!1,containerClass:"c-fabric-chart",fireRightClick:!0,allowTouchScrolling:!0})})),o((()=>{b.value.off(),b.value.clear()})),g({redrawPoints:M,select:A,canvas:b}),(e,t)=>(a(),i(n,null,[u("canvas",{ref_key:"canvasRef",ref:j},null,512),b.value?(a(),p(f,l({key:0,propItems:c(x)},P),null,16,["propItems"])):h("v-if",!0),b.value?(a(),p(c(d),l({key:1,propItems:c(x)},I,{show:I.show,"onUpdate:show":t[0]||(t[0]=e=>I.show=e),onClickMenu:c(R)}),null,16,["propItems","show","onClickMenu"])):h("v-if",!0)],64))}});export{g as default};
@@ -1,7 +1,8 @@
1
1
  import { type Ref } from 'vue';
2
2
  import { fabric } from '../../../../../../es/shared/utils/fabricjs';
3
3
  import { AnyObject } from '../../../../../../es/shared/types';
4
- export declare function useBirthProcess(canvas: Ref<fabric.Canvas>, propItems: AnyObject, emits: Function, pointTipProps: AnyObject, pointMenuProps: AnyObject): {
4
+ import { IPointTipProps, IPointMenuProps } from '../../../../../../es/components/fabric-chart/src/interface';
5
+ export declare function useBirthProcess(canvas: Ref<fabric.Canvas>, propItems: AnyObject, emits: Function, pointTipProps: IPointTipProps, pointMenuProps: IPointMenuProps): {
5
6
  clickMenu: ({ item, target }: {
6
7
  item: any;
7
8
  target: any;
@@ -1,26 +1,10 @@
1
1
  import { Ref } from 'vue';
2
2
  import { fabric } from '../../../../../../es/shared/utils/fabricjs';
3
3
  import { AnyObject } from '../../../../../../es/shared/types';
4
- export declare function useBirthProcessChart(canvas: Ref<fabric.Canvas>, props: AnyObject, emits: Function, canvasRef: Ref<HTMLCanvasElement | null>): {
4
+ import { IPointTipProps, IPointMenuProps } from '../../../../../../es/components/fabric-chart/src/interface';
5
+ export declare function useBirthProcessChart(canvas: Ref<fabric.Canvas>, props: AnyObject, emits: Function, canvasRef: Ref<HTMLCanvasElement | null>, pointTipProps: IPointTipProps, pointMenuProps: IPointMenuProps): {
5
6
  propItems: any;
6
7
  redrawPoints: Ref<any>;
7
8
  select: Ref<any>;
8
- pointTipProps: {
9
- show: boolean;
10
- point: {
11
- x: number;
12
- y: number;
13
- };
14
- list: string[];
15
- };
16
- pointMenuProps: {
17
- show: boolean;
18
- point: {
19
- x: number;
20
- y: number;
21
- };
22
- list: any[];
23
- target: any;
24
- };
25
9
  clickMenu: Ref<any>;
26
10
  };
@@ -1 +1 @@
1
- import{ref as e,reactive as a,computed as t,onMounted as l,nextTick as r}from"vue";import{defaultBorderStyle as u}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import"date-fns";import{getTime as i}from"../../utils/index.js";import{useEvent as s,useCanvasEvent as n}from"../useEvent.js";import"../temperature/useShadow.js";import"lodash-es";import{useBirthProcess as o}from"./useBirthProcess.js";function d(d,v,c,h){const p=e(),m=e(),f=e(),x=a({show:!1,point:{x:0,y:0},list:[]}),g=a({show:!1,point:{x:0,y:0},list:[],target:null}),w=t((()=>v.data.scaleValues.filter((e=>"left"===e.layout&&e.show)))),y=t((()=>v.data.scaleValues.filter((e=>"right"===e.layout&&e.show)))),V=t((()=>{var e;return(null==(e=y.value)?void 0:e.length)?30:0})),b=t((()=>{var e;return 30+(null==(e=w.value)?void 0:e.reduce(((e,a)=>e+=a.width),0))})),j=t((()=>{var e;const{width:a}=v.data,t=null==(e=y.value)?void 0:e.reduce(((e,a)=>e+=a.width),0);return a-V.value-t})),A=t((()=>v.data.grid.mainXCell)),C=t((()=>{const e=v.data.grid.mainYCell||14;return v.data.scaleValues.find((e=>e.show&&"FHR"===e.key))||14!==e?e:10})),k=t((()=>(j.value-b.value)/A.value)),Y=t((()=>{const{xAxis:e,height:a}=v.data,t=Object.values(e).reduce(((e,a)=>(a.show&&e++,e)),0);return a/(C.value+t)})),P=t((()=>{const{xAxis:e}=v.data,a=Object.values(e).reduce(((e,a)=>(a.show&&"top"===a.position&&e++,e)),0);return Y.value*a})),S=t((()=>{var e;const{scaleValues:a}=v.data;if(!(null==(e=a.find((e=>"FHR"===e.key)))?void 0:e.show)&&!P.value)return P.value;const t=a.find((e=>"cervix"===e.key)),[,l]=(null==t?void 0:t.range)||[0,10],r=(null==t?void 0:t.spaceValue)||1;return H.value-l*r*Y.value})),H=t((()=>{const{xAxis:e,height:a}=v.data,t=Object.values(e).reduce(((e,a)=>(a.show&&"bottom"===a.position&&e++,e)),0);return a-Y.value*t})),X=t((()=>i(v.data.xAxis.time.startTime))),F=t((()=>36e5/k.value)),R=t((()=>{const{scaleValues:e}=v.data,a=e.find((e=>"cervix"===e.key));return((null==a?void 0:a.spaceValue)||1)/Y.value})),W=t((()=>{const{scaleValues:e}=v.data,a=e.find((e=>"FHR"===e.key));return((null==a?void 0:a.spaceValue)||10)/Y.value})),M=t((()=>{const{scaleValues:e}=v.data,a=e.find((e=>"fetalPresentation"===e.key));return((null==a?void 0:a.spaceValue)||1)/Y.value})),O=t((()=>{var e;return(null==(e=v.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),T=a({canvasWidth:v.data.width,canvasHeight:v.data.height,borderStyle:{...u,...v.data.borderStyle||{}},selectionStyle:v.data.selectionStyle||{},grid:v.data.grid,other:v.data.other,originX:b.value,endX:j.value,originY:P.value,endY:H.value,xCellWidth:k.value,yCellHeight:Y.value,gridXNumber:A.value,gridYNumber:C.value,xAxis:v.data.xAxis,leftScales:w.value,rightScales:y.value,leftAddAreaWidth:30,rightAddAreaWidth:V.value,startTime:X.value,timeXCell:F.value,cervixYCell:R.value,FHRYCell:W.value,fetalPresentationYCell:M.value,scaleValues:v.data.scaleValues,event:O.value,originYCervix:S.value});return l((()=>{r((()=>{const{clickMenu:e,redrawPoints:a}=o(d,T,c,x,g);m.value=a,f.value=e,s(h.value);const{select:t}=n(d,T,c);p.value=t}))})),{propItems:T,redrawPoints:m,select:p,pointTipProps:x,pointMenuProps:g,clickMenu:f}}export{d as useBirthProcessChart};
1
+ import{ref as e,computed as a,reactive as t,onMounted as l,nextTick as r}from"vue";import{defaultBorderStyle as u}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import"date-fns";import{getTime as i}from"../../utils/index.js";import{useEvent as s,useCanvasEvent as d}from"../useEvent.js";import"../temperature/useShadow.js";import"lodash-es";import{useBirthProcess as n}from"./useBirthProcess.js";function o(o,v,c,h,m,f){const g=e(),p=e(),x=e(),w=a((()=>v.data.scaleValues.filter((e=>"left"===e.layout&&e.show)))),y=a((()=>v.data.scaleValues.filter((e=>"right"===e.layout&&e.show)))),V=a((()=>{var e;return(null==(e=y.value)?void 0:e.length)?30:0})),b=a((()=>{var e;return 30+(null==(e=w.value)?void 0:e.reduce(((e,a)=>e+=a.width),0))})),j=a((()=>{var e;const{width:a}=v.data,t=null==(e=y.value)?void 0:e.reduce(((e,a)=>e+=a.width),0);return a-V.value-t})),A=a((()=>v.data.grid.mainXCell)),C=a((()=>{const e=v.data.grid.mainYCell||14;return v.data.scaleValues.find((e=>e.show&&"FHR"===e.key))||14!==e?e:10})),k=a((()=>(j.value-b.value)/A.value)),Y=a((()=>{const{xAxis:e,height:a}=v.data,t=Object.values(e).reduce(((e,a)=>(a.show&&e++,e)),0);return a/(C.value+t)})),S=a((()=>{const{xAxis:e}=v.data,a=Object.values(e).reduce(((e,a)=>(a.show&&"top"===a.position&&e++,e)),0);return Y.value*a})),H=a((()=>{var e;const{scaleValues:a}=v.data;if(!(null==(e=a.find((e=>"FHR"===e.key)))?void 0:e.show)&&!S.value)return S.value;const t=a.find((e=>"cervix"===e.key)),[,l]=(null==t?void 0:t.range)||[0,10],r=(null==t?void 0:t.spaceValue)||1;return P.value-l*r*Y.value})),P=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-Y.value*t})),X=a((()=>i(v.data.xAxis.time.startTime))),F=a((()=>36e5/k.value)),R=a((()=>{const{scaleValues:e}=v.data,a=e.find((e=>"cervix"===e.key));return Y.value/((null==a?void 0:a.spaceValue)||1)})),W=a((()=>{const{scaleValues:e}=v.data,a=e.find((e=>"FHR"===e.key));return Y.value/((null==a?void 0:a.spaceValue)||10)})),O=a((()=>{const{scaleValues:e}=v.data,a=e.find((e=>"fetalPresentation"===e.key));return Y.value/((null==a?void 0:a.spaceValue)||1)})),M=a((()=>{var e;return(null==(e=v.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),N=t({canvasWidth:v.data.width,canvasHeight:v.data.height,borderStyle:{...u,...v.data.borderStyle||{}},selectionStyle:v.data.selectionStyle||{},grid:v.data.grid,other:v.data.other,originX:b.value,endX:j.value,originY:S.value,endY:P.value,xCellWidth:k.value,yCellHeight:Y.value,gridXNumber:A.value,gridYNumber:C.value,xAxis:v.data.xAxis,leftScales:w.value,rightScales:y.value,leftAddAreaWidth:30,rightAddAreaWidth:V.value,startTime:X.value,timeXCell:F.value,cervixYCell:R.value,FHRYCell:W.value,fetalPresentationYCell:O.value,scaleValues:v.data.scaleValues,event:M.value,originYCervix:H.value});return l((()=>{r((()=>{const{clickMenu:e,redrawPoints:a}=n(o,N,c,m,f);p.value=a,x.value=e,s(h.value);const{select:t}=d(o,N,c);g.value=t}))})),{propItems:N,redrawPoints:p,select:g,clickMenu:x}}export{o as useBirthProcessChart};
@@ -1,4 +1,5 @@
1
1
  import { type Ref } from 'vue';
2
2
  import { fabric } from '../../../../../../es/shared/utils/fabricjs';
3
3
  import { AnyObject } from '../../../../../../es/shared/types';
4
- export declare function useCenter(canvas: Ref<fabric.Canvas>, propItems: AnyObject): void;
4
+ import { IPointTipProps, IPointMenuProps } from '../../../../../../es/components/fabric-chart/src/interface';
5
+ export declare function useCenter(canvas: Ref<fabric.Canvas>, propItems: AnyObject, emits: Function, pointTipProps: IPointTipProps, pointMenuProps: IPointMenuProps): void;
@@ -1 +1 @@
1
- import{drawLine as t,drawPoint as e}from"../useDraw.js";import{useGrid as o}from"../useGrid.js";import{useBirthProcessCumputedPoint as n}from"../useCumputedPoint.js";import"@vueuse/core";import"../../../../../shared/utils/fabricjs/index.js";import"vue";import{isEffectiveNode as i,getTime as s}from"../../utils/index.js";import{cloneDeep as l}from"lodash-es";import"date-fns";import"../temperature/useShadow.js";function r(r,u){const{cumputedX:a,cumputedY:p,getXValue:f,getYValue:c}=n(u),{left:m,xCellWidth:d,yCellHeight:v,originX:h,endX:x,originY:g,endY:y,itemList:L,event:P,canvasHeight:j,scaleValues:k,xAxis:C,startTime:X}=u,Y=new Set,b=l(k);function M(t,e){if(i(t)&&function(t){const e=Date.parse(C.list.at(-1)),o=s(t);return o>=X&&o<=e}(t.time)){const o=a(t.time),n=p(e.type,e.range,t.value);return[o,n<g?g:n>y?y:n]}}o(r,u),b.forEach((o=>{o.dataList.forEach(((n,i)=>{!function(o,n,i){var s;const{type:l,dataList:a=[]}=i,p=[],f=[];function c(o,s,r,a){let c,m;const{pointAttr:d={},lineAttr:v={},title:L="",key:j,type:k="circle"}=a,C=M(a.list[r+1],i);o&&C&&!s.breakpoint&&o[0]!==C[0]&&(m=t([...o,...C],{...v}));const X=f[r-1],b={origin:{data:s,title:L,key:j||"",unit:i.unit,type:l,dataIndex:n,index:r},leftLine:X,rightLine:m,...d,...u.event.hovered?u.event.evented?{selectable:!0}:{selectable:!0,lockMovementX:!0,lockMovementY:!0}:u.event};X?c=e(k,{left:X.get("x2"),top:X.get("y2"),...b}):o&&(b.leftLine=null,c=e(k,{left:o[0],top:o[1],...b})),f.push(m),c&&(function(t){P.hovered&&(t.on("mouseover",(()=>{})),t.on("mouseout",(()=>{}))),t.lockMovementX&&t.lockMovementY||(t.on("moving",(()=>{!function(t){t.setCoords();const e=t.prevPoint?t.prevPoint.left:h,o=t.nextPoint?t.nextPoint.left:x;t.top<g&&t.set("top",g),t.top>y&&t.set("top",y),t.left<e&&t.set("left",e),t.left>o&&t.set("left",o)}(t),function(t){var e,o;null==(e=t.leftLine)||e.setCoords().set({x2:t.left,y2:t.top}),null==(o=t.rightLine)||o.setCoords().set({x1:t.left,y1:t.top})}(t)})),t.on("mouseup",(t=>{})))}(c),p.push(c),Y.add(c))}null==(s=o.list)||s.forEach(((t,e)=>{c(M(t,i),t,e,o)})),Promise.all(p).then((t=>{const e=f.filter((t=>t));let o=null;t=t.map((t=>(t&&o&&(o.nextPoint=t,t.prevPoint=o),o=t||o,t))),r.value.add(...e,...t)}))}(n,i,o)}))}))}export{r as useCenter};
1
+ import{drawLine as t,drawPoint as e}from"../useDraw.js";import{useGrid as o}from"../useGrid.js";import{useBirthProcessCumputedPoint as n}from"../useCumputedPoint.js";import"@vueuse/core";import"../../../../../shared/utils/fabricjs/index.js";import"vue";import{getIndex as i,isEffectiveNode as l,getTime as s}from"../../utils/index.js";import{cloneDeep as r}from"lodash-es";import"date-fns";import"../temperature/useShadow.js";function a(a,u,c,d,f){const{cumputedX:p,cumputedY:v,getXValue:m,getYValue:h}=n(u),{left:g,xCellWidth:y,yCellHeight:x,originX:L,endX:k,originY:b,endY:j,itemList:P,event:w,canvasHeight:C,scaleValues:E,xAxis:X,startTime:Y}=u,$=new Set,A=r(E);function M(o,n,l){var s;const{type:r,unit:f,dataList:p=[]}=l,v=[],g=[];null==(s=o.list)||s.forEach(((s,p)=>{!function(o,s,p,y){let x,P;const{pointAttr:C={},lineAttr:E={},title:X="",key:Y,type:H="circle"}=y,I=D(y.list[p+1],l);o&&I&&!s.breakpoint&&o[0]!==I[0]&&(P=t([...o,...I],{...E}));const S=g[p-1],z={origin:{data:s,title:X,key:Y||"",unit:f,type:r,dataIndex:n,index:p},leftLine:S,rightLine:P,...C,...u.event.hovered?u.event.evented?{selectable:!0}:{selectable:!0,lockMovementX:!0,lockMovementY:!0}:u.event};S?x=e(H,{left:S.get("x2"),top:S.get("y2"),...z}):o&&(z.leftLine=null,x=e(H,{left:o[0],top:o[1],...z}));g.push(P),x&&(!function(t){w.hovered&&(t.on("mouseover",(()=>{V(t,"hover")})),t.on("mouseout",(()=>{d.show=!1})));if(t.lockMovementX&&t.lockMovementY)return;t.on("moving",(()=>{!function(t){t.setCoords();const e=t.prevPoint?t.prevPoint.left:L,o=t.nextPoint?t.nextPoint.left:k;t.top<b&&t.set("top",b),t.top>j&&t.set("top",j),t.left<e&&t.set("left",e),t.left>o&&t.set("left",o)}(t),function(t){var e,o;null==(e=t.leftLine)||e.setCoords().set({x2:t.left,y2:t.top}),null==(o=t.rightLine)||o.setCoords().set({x1:t.left,y1:t.top})}(t),w.hovered&&V(t)})),t.on("mouseup",(e=>{if(d.show=!1,1===e.button){const{key:e,type:o}=t.origin,n={...t.origin,data:{...t.origin.data,time:m(t.left),value:h(o,t.top)}};a.value.discardActiveObject(),c("change",n),function(t,e="add"){const{dataIndex:o,data:n,index:l,key:s,type:r}=t,u=A.find((t=>t.type===r)),c=u.dataList.find((t=>t.key===s));switch(e){case"remove":c.list.splice(l,1);break;case"change":c.list[l]=n;break;default:{const t=i(n.time,c.data);c.list.splice(t,0,n);break}}!function(){var t;$.size&&(null==(t=a.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}([...$]))),$.clear(),A.forEach((t=>{t.dataList.forEach(((e,o)=>{M(e,o,t)}))}))}()}(n,"change")}}))}(x),v.push(x),$.add(x))}(D(s,l),s,p,o)})),Promise.all(v).then((t=>{const e=g.filter((t=>t));let o=null;t=t.map((t=>(t&&o&&(o.nextPoint=t,t.prevPoint=o),o=t||o,t))),a.value.add(...e,...t)}))}function V(t,e="moving"){const{title:o,type:n,data:i,unit:l}=t.origin;d.point={x:t.left,y:t.top};const s=`${"hover"===e?i.value:h(n,t.top)}`;d.list=[`${o} ${s}${l||""}`,`时间 ${m(t.left).slice(-5)}`],d.show=!0}function D(t,e){if(l(t)&&function(t){const e=Date.parse(X.list.at(-1)),o=s(t);return o>=Y&&o<=e}(t.time)){const o=p(t.time),n=v(e.type,e.range,t.value);return[o,n<b?b:n>j?j:n]}}o(a,u),A.forEach((t=>{t.dataList.forEach(((e,o)=>{M(e,o,t)}))}))}export{a as useCenter};
@@ -1,26 +1,10 @@
1
1
  import { Ref } from 'vue';
2
2
  import { fabric } from '../../../../../../es/shared/utils/fabricjs';
3
3
  import { AnyObject } from '../../../../../../es/shared/types';
4
- export declare function useSurgicalAnesthesiaChart(canvas: Ref<fabric.Canvas>, props: AnyObject, emits: Function, canvasRef: Ref<HTMLCanvasElement | null>): {
4
+ import { IPointTipProps, IPointMenuProps } from '../../../../../../es/components/fabric-chart/src/interface';
5
+ export declare function useSurgicalAnesthesiaChart(canvas: Ref<fabric.Canvas>, props: AnyObject, emits: Function, canvasRef: Ref<HTMLCanvasElement | null>, pointTipProps: IPointTipProps, pointMenuProps: IPointMenuProps): {
5
6
  propItems: any;
6
7
  redrawPoints: Ref<any>;
7
8
  select: Ref<any>;
8
- pointTipProps: {
9
- show: boolean;
10
- point: {
11
- x: number;
12
- y: number;
13
- };
14
- list: string[];
15
- };
16
- pointMenuProps: {
17
- show: boolean;
18
- point: {
19
- x: number;
20
- y: number;
21
- };
22
- list: any[];
23
- target: any;
24
- };
25
9
  clickMenu: Ref<any>;
26
10
  };
@@ -1 +1 @@
1
- import{ref as e,reactive as t,computed as a,unref as r,onMounted as i,nextTick as l}from"vue";import{defaultBorderStyle as u}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import{format as n}from"date-fns";import{getChildrenSize as s}from"../../utils/index.js";import"@vueuse/core";import{cloneDeep as o,range as d}from"lodash-es";import"../temperature/useShadow.js";import{useTop as p}from"./useTop.js";import{useLeft as c}from"./useLeft.js";import{useCenter as h}from"./useCenter.js";import{useOther as m}from"./useOther.js";function v(v,f,g,y){const x=e(),w=e(),b=e(),Y=t({show:!1,point:{x:0,y:0},list:[]}),j=t({show:!1,point:{x:0,y:0},list:[],target:null}),C=a((()=>f.data.layout||{top:"drug",center:"xAxis",bottom:"intraoperatively"})),H=a((()=>{var e;return null!=(e=f.data.left.width)?e:0})),T=a((()=>{const{grid:e}=f.data;return e.mainXCell*e.subXCell})),V=a((()=>{const{grid:e}=f.data;return e.mainYCell*e.subYCell})),A=a((()=>s(f.data.top.treeData))),D=a((()=>f.data.top.tree.cellHeight)),X=a((()=>D.value*A.value)),M=a((()=>Z(R("drug")||"top"))),S=a((()=>M.value+X.value)),G=a((()=>{var e;return Date.parse((null==(e=f.data.xAxis)?void 0:e.startTime)||n(new Date,"yyyy-MM-dd HH:mm:ss"))})),O=a((()=>{const e=o(f.data.xAxis),{spaceValue:t,spaceTimeStamp:a}=e,r=d(T.value/t+1).map((r=>0===r?e.startTime:n(new Date(G.value+r*t*a),"yyyy-MM-dd HH:mm:ss")));return{...e,list:r,left:H.value}})),k=function(){const e=o(f.data.top.treeData);let t=0;const{cellWidth:a,cellHeight:r}=f.data.top.tree;return function e(i,l=0){i.forEach((i=>{var u;const n={top:t*r+M.value,left:l*a,width:a,height:r};if(t++,null==(u=i.children)?void 0:u.length){t--;const a=s(i.children);n.height=a*r,e(i.children,l+1)}else n.width=H.value-n.left;Object.assign(i,n)}))}(e),e}(),L=a((()=>Z(R("xAxis")||"center"))),N=a((()=>{var e;const{width:t,right:a}=f.data;if(!a)return t;return t-(null!=(e=a.width)?e:0)})),P=a((()=>Z(R("intraoperatively")||"bottom"))),W=a((()=>{var e;const{show:t=!0,height:a}=(null==(e=f.data.other)?void 0:e.mark)||{};return t&&a?a:0})),E=a((()=>P.value+(f.data.height-X.value-O.value.height-W.value))),I=a((()=>(N.value-H.value)/T.value)),q=a((()=>(E.value-P.value)/V.value)),z=a((()=>O.value.spaceTimeStamp/I.value)),B=a((()=>{const{scaleValues:e}=f.data;return e.map((e=>e.dataList.filter((e=>e.show)).map(((t,a)=>({...t,bigType:e.type,unit:e.unit,dataIndex:a}))))).flat()})),F=a((()=>{const{scaleValues:e}=f.data,t=e.find((e=>"pulse"===e.type));return((null==t?void 0:t.spaceValue)||20)/q.value})),J=a((()=>{const{scaleValues:e}=f.data,t=e.find((e=>"temperature"===e.type));return((null==t?void 0:t.spaceValue)||2)/q.value})),K=a((()=>{var e;return(null==(e=f.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),Q=t({canvasWidth:f.data.width,canvasHeight:f.data.height,borderStyle:{...u,...f.data.borderStyle||{}},grid:f.data.grid,top:f.data.top,left:f.data.left,other:f.data.other,topGridYNumber:r(A),topGridYCellHeight:r(D),topGridOriginY:r(M),topGridEndY:r(S),treeData:k,xAxis:r(O),originYXAxis:r(L),startTime:r(G),timeXCell:r(z),gridXNumber:r(T),gridYNumber:r(V),xCellWidth:r(I),yCellHeight:r(q),originX:r(H),endX:r(N),originY:r(P),endY:r(E),markHeight:r(W),itemList:r(B),scaleValues:f.data.scaleValues,pulseYCell:r(F),temperatureYCell:r(J),event:r(K)});function R(e){let t="";return Object.entries(C.value).some((([a,r])=>{if(r===e)return t=a,!0})),t}function U(e){const t=C.value[e],a=O.value.height;switch(t){case"drug":return X.value;case"xAxis":return a;default:return f.data.height-X.value-a}}function Z(e){switch(e){case"top":return 0;case"center":return U("top");default:return U("top")+U("center")}}return i((async()=>{await l(),p(v,Q),c(v,Q),m(v,Q),h(v,Q)})),{propItems:Q,redrawPoints:w,select:x,pointTipProps:Y,pointMenuProps:j,clickMenu:b}}export{v as useSurgicalAnesthesiaChart};
1
+ import{ref as e,computed as t,reactive as a,unref as r,onMounted as i,nextTick as l}from"vue";import{defaultBorderStyle as u}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import{format as n}from"date-fns";import{getChildrenSize as s}from"../../utils/index.js";import"@vueuse/core";import{cloneDeep as o,range as d}from"lodash-es";import"../temperature/useShadow.js";import{useTop as c}from"./useTop.js";import{useLeft as p}from"./useLeft.js";import{useCenter as m}from"./useCenter.js";import{useOther as h}from"./useOther.js";function v(v,f,g,x,y,w){const b=e(),Y=e(),j=e(),C=t((()=>f.data.layout||{top:"drug",center:"xAxis",bottom:"intraoperatively"})),H=t((()=>{var e;return null!=(e=f.data.left.width)?e:0})),A=t((()=>{const{grid:e}=f.data;return e.mainXCell*e.subXCell})),D=t((()=>{const{grid:e}=f.data;return e.mainYCell*e.subYCell})),T=t((()=>s(f.data.top.treeData))),X=t((()=>f.data.top.tree.cellHeight)),V=t((()=>X.value*T.value)),G=t((()=>Z(R("drug")||"top"))),M=t((()=>G.value+V.value)),S=t((()=>{var e;return Date.parse((null==(e=f.data.xAxis)?void 0:e.startTime)||n(new Date,"yyyy-MM-dd HH:mm:ss"))})),N=t((()=>{const e=o(f.data.xAxis),{spaceValue:t,spaceTimeStamp:a}=e,r=d(A.value/t+1).map((r=>0===r?e.startTime:n(new Date(S.value+r*t*a),"yyyy-MM-dd HH:mm:ss")));return{...e,list:r,left:H.value}})),O=function(){const e=o(f.data.top.treeData);let t=0;const{cellWidth:a,cellHeight:r}=f.data.top.tree;return function e(i,l=0){i.forEach((i=>{var u;const n={top:t*r+G.value,left:l*a,width:a,height:r};if(t++,null==(u=i.children)?void 0:u.length){t--;const a=s(i.children);n.height=a*r,e(i.children,l+1)}else n.width=H.value-n.left;Object.assign(i,n)}))}(e),e}(),k=t((()=>Z(R("xAxis")||"center"))),L=t((()=>{var e;const{width:t,right:a}=f.data;if(!a)return t;return t-(null!=(e=a.width)?e:0)})),W=t((()=>Z(R("intraoperatively")||"bottom"))),E=t((()=>{var e;const{show:t=!0,height:a}=(null==(e=f.data.other)?void 0:e.mark)||{};return t&&a?a:0})),I=t((()=>W.value+(f.data.height-V.value-N.value.height-E.value))),P=t((()=>(L.value-H.value)/A.value)),q=t((()=>(I.value-W.value)/D.value)),z=t((()=>N.value.spaceTimeStamp/P.value)),B=t((()=>{const{scaleValues:e}=f.data;return e.map((e=>e.dataList.filter((e=>e.show)).map(((t,a)=>({...t,bigType:e.type,unit:e.unit,dataIndex:a}))))).flat()})),F=t((()=>$("pulse"))),J=t((()=>$("temperature"))),K=t((()=>{var e;return(null==(e=f.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),Q=a({canvasWidth:f.data.width,canvasHeight:f.data.height,borderStyle:{...u,...f.data.borderStyle||{}},grid:f.data.grid,top:f.data.top,left:f.data.left,other:f.data.other,topGridYNumber:r(T),topGridYCellHeight:r(X),topGridOriginY:r(G),topGridEndY:r(M),treeData:O,xAxis:r(N),originYXAxis:r(k),startTime:r(S),timeXCell:r(z),gridXNumber:r(A),gridYNumber:r(D),xCellWidth:r(P),yCellHeight:r(q),originX:r(H),endX:r(L),originY:r(W),endY:r(I),markHeight:r(E),itemList:r(B),scaleValues:f.data.scaleValues,pulseYCell:r(F),temperatureYCell:r(J),event:r(K)});function R(e){let t="";return Object.entries(C.value).some((([a,r])=>{if(r===e)return t=a,!0})),t}function U(e){const t=C.value[e],a=N.value.height;switch(t){case"drug":return V.value;case"xAxis":return a;default:return f.data.height-V.value-a}}function Z(e){switch(e){case"top":return 0;case"center":return U("top");default:return U("top")+U("center")}}function $(e){const{scaleValues:t}=f.data,a=t.find((t=>t.type===e));return q.value*(a.spaceGridNumber||1)/(a.spaceValue||1)}return i((async()=>{await l(),c(v,Q,g,y),p(v,Q),h(v,Q),m(v,Q,g,y)})),{propItems:Q,redrawPoints:Y,select:b,clickMenu:j}}export{v as useSurgicalAnesthesiaChart};
@@ -1,4 +1,5 @@
1
1
  import { type Ref } from 'vue';
2
2
  import { fabric } from '../../../../../../es/shared/utils/fabricjs';
3
3
  import { AnyObject } from '../../../../../../es/shared/types';
4
- export declare function useTop(canvas: Ref<fabric.Canvas>, propItems: AnyObject, emits: Function): void;
4
+ import { IPointTipProps, IPointMenuProps } from '../../../../../../es/components/fabric-chart/src/interface';
5
+ export declare function useTop(canvas: Ref<fabric.Canvas>, propItems: AnyObject, emits: Function, pointTipProps: IPointTipProps, pointMenuProps: IPointMenuProps): void;
@@ -1 +1 @@
1
- import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawText as e,defaultStyle as i,defaultRectStyle as n,drawTextGroup as o,drawLine as l,drawPoint as r}from"../useDraw.js";import{useGrid as s}from"../useGrid.js";import{useBirthProcessCumputedPoint as f}from"../useCumputedPoint.js";import"@vueuse/core";import"vue";import"lodash-es";import"date-fns";import"../temperature/useShadow.js";function c(c,a,u){const{cumputedX:d}=f(a),{originX:p,endX:h,xCellWidth:L,originYXAxis:x,top:m,topList:g,canvasWidth:v,borderStyle:X,treeData:C,xAxis:w,topGridYNumber:y,topGridOriginY:Y,topGridYCellHeight:S,topGridEndY:j}=a,b=new Set;function G(t,i,n){let o;const{content:l}=t.value||{};if(l){const{lineStyle:t,textStyle:r,totalStyle:s}=m.data||{},{startLine:f,centerLine:c,endLine:a}=i;o=e([0,0],{...r,value:l,backgroundColor:"#fff"});const u=I(o,i,n);o&&(o.set(u),f&&(f.text=o),a&&(a.text=o))}return o}function I(t,e,i){const n=t.width+1,{startLine:o,centerLine:l,endLine:r}=e,s={top:i,originX:"center",originY:"center"};return l&&n<=l.width?s.left=l.x1+l.width/2:r&&n<=r.limitX.x2-r.left?(s.originX="left",s.left=r.left+1):o&&!r&&n<=o.limitX.x2-o.left?(s.originX="left",s.left=o.left+(o.isCustomIcon?5:1)):o&&n<=o.left-o.limitX.x1?(s.originX="right",s.left=o.left-(o.isCustomIcon?5:1)):l?(s.originY="top",s.left=l.x1+l.width/2,s.top=i+1,s.fontSize=10):o&&(s.originX="left",s.originY="top",s.fontSize=10,s.left=o.left,s.top=i+1),s}function A(e,{isCustomIcon:i,isContinue:n,isLeft:o}){const{x:s,y1:f,y2:c,halfY:a}=e;if(!s||s<p||s>h)return;const{lineStyle:u}=m.data||{};let d;const x={left:s,top:a};d=i?r("circle",{fill:u.stroke,...x}):n?r(">",{fill:u.stroke,...x,fontSize:18}):l([s,f,s,a],u);const g=new t.Rect({width:L,height:S,fill:"transparent",left:s-L/2,top:f}),v=new t.Group([d,g],{originX:"center",originY:"center",hasControls:!1,hasBorders:!1,objectCaching:!1,hoverCursor:"pointer",lockMovementY:!0});var X;return v.isLeft=o,v.isCustomIcon=i,(X=v).on("moving",(()=>{!function(t){t.setCoords(),t.left<t.limitX.x1&&t.set("left",t.limitX.x1),t.left>t.limitX.x2&&t.set("left",t.limitX.x2)}(X),function(t){if(t.centerLine){const e=t.isLeft?{x1:t.left}:{x2:t.left};t.centerLine.setCoords().set(e)}if(t.text){const e=I(t.text,{startLine:t.isLeft?t:t.nearLine,centerLine:t.centerLine,endLine:t.isLeft?t.nearLine:t},t.top);t.text.setCoords().set(e)}}(X)})),X.on("mouseup",(t=>{1===t.button&&function(t){t.isLeft?(t.prevLine&&(t.prevLine.limitX.x2=t.left),t.nearLine&&(t.nearLine.limitX.x1=t.left)):(t.nextLine&&(t.nextLine.limitX.x1=t.left),t.nearLine&&(t.nearLine.limitX.x2=t.left))}(X)})),v}s(c,{...a,gridYNumber:y,originY:Y,yCellHeight:S,endY:j}),function(){const{height:o,list:l,left:r,spaceValue:s}=w;if(!o)return;const f=[],a=x+o/2;l.forEach(((t,i)=>{const n=r+i*L*s;f.push(e([n,a],{value:t.slice(11,16)}))}));const u=f.length>0?new t.Group([...f],{...i,objectCaching:!1}):null;u&&c.value.add(u);const d=new t.Rect({width:v,height:o,left:0,top:x,...n,originX:"left",originY:"top",...X});c.value.add(d)}(),function(){var e;const n=(null==(e=null==m?void 0:m.tree)?void 0:e.textStyle)||{},r=[];!function t(e){e.forEach((e=>{var i;const{width:s,height:f,left:c,top:a,title:u=""}=e,L={value:u,...n};(null==(i=e.children)?void 0:i.length)?(L.value=u.split("").join("\n"),t(e.children)):(L.textAlign="left",function(t){if(!(null==t?void 0:t.data)||!Array.isArray(t.data))return;const{lineStyle:e,textStyle:i,totalStyle:n}=m.data||{},o=t.top,r=o+S,s=r-S/2,f={y1:o,y2:r,halfY:s},c=[];t.data.forEach(((t,i,n)=>{const{time:o,continue:r,value:a}=t,[u,L]=o,x=u&&d(u),m=L&&d(L),g=A({...f,x:x},{isCustomIcon:!m&&!r,isContinue:!1,isLeft:!0}),v=A({...f,x:m},{isCustomIcon:!1,isContinue:!!r});let X,C,w;if((g||x<p)&&(v||m>h)){X=l([g?x:p,s,v?m:h,s],e)}c.push({startLine:g,centerLine:X,endLine:v}),function(t,e){const{startLine:i,centerLine:n,endLine:o}=e[t],{startLine:l,endLine:r}=e[t-1]||{};if(i){const t={x1:p,x2:o?o.left:h};r?(t.x1=r.left,r.limitX.x2=i.left,i.prevLine=r,r.nextLine=i):l&&(t.x1=l.left,l.limitX.x2=i.left,i.prevLine=l,l.nextLine=i),i.limitX=t,n&&(i.centerLine=n)}if(o){const t={x1:i?i.left:p,x2:h};o.limitX=t,n&&(o.centerLine=n)}i&&o&&(i.nearLine=o,o.nearLine=i)}(i,c),n[i-1]&&(C=G(n[i-1],c[i-1],s)),i===n.length-1&&(w=G(t,c[i],s)),X&&b.add(X),g&&b.add(g),v&&b.add(v),C&&b.add(C),w&&b.add(w)}))}(e)),r.push(o({width:s,height:f,...X},L,{left:c,top:a},!0))}))}(C);const s=r.length>0?new t.Group([...r],{...i,objectCaching:!1}):null;s&&c.value.add(s),b.size&&c.value.add(...b)}()}export{c as useTop};
1
+ import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawText as e,defaultStyle as i,defaultRectStyle as n,drawTextGroup as o,drawLine as l,drawPoint as r}from"../useDraw.js";import{useGrid as s}from"../useGrid.js";import{useBirthProcessCumputedPoint as f}from"../useCumputedPoint.js";import"@vueuse/core";import"vue";import{cloneDeep as c}from"lodash-es";import"date-fns";import"../temperature/useShadow.js";function a(a,u,d,m,h){const{cumputedX:p,getXValue:x}=f(u),{originX:L,endX:g,xCellWidth:v,originYXAxis:X,top:C,topList:w,canvasWidth:y,borderStyle:Y,treeData:S,xAxis:j,topGridYNumber:b,topGridOriginY:k,topGridYCellHeight:G,topGridEndY:I,event:z}=u,A=new Set;function M(t,e,i){let n;const{content:o}=t.value||{};if(o){const{lineStyle:l,textStyle:s,totalStyle:f}=C.data||{},{startLine:c,centerLine:a,endLine:u}=e;n=r(o,{fontSize:12,...s,backgroundColor:"#fff",lockMovementX:!0,lockMovementY:!0});const d=$(n,e,i);n&&(n.set(d),n.origin={data:t},D(n),c&&(c.text=n),u&&(u.text=n))}return n}function $(t,e,i){const n=t.width+1,{startLine:o,centerLine:l,endLine:r}=e,s={top:i,originX:"center",originY:"center"};return l&&n<=l.width?s.left=l.x1+l.width/2:r&&n<=r.limitX.x2-r.left?(s.originX="left",s.left=r.left+1):o&&!r&&n<=o.limitX.x2-o.left?(s.originX="left",s.left=o.left+(o.isCustomIcon?5:1)):o&&n<=o.left-o.limitX.x1?(s.originX="right",s.left=o.left-(o.isCustomIcon?5:1)):l?(s.originY="top",s.left=l.x1+l.width/2,s.top=i+1,s.fontSize=10):o&&(s.originX="left",s.originY="top",s.fontSize=10,s.left=o.left,s.top=i+1),s}function E(e,{isCustomIcon:i,isContinue:n,isLeft:o}){const{x:s,y1:f,y2:c,halfY:a}=e;if(!s||s<L||s>g)return;const{lineStyle:u}=C.data||{};let d;const m={left:s,top:a};d=i?r("circle",{fill:u.stroke,...m}):n?r(">",{fill:u.stroke,...m,fontSize:18}):l([s,f,s,a],u);const h=new t.Rect({width:v,height:G,fill:"transparent",left:s-v/2,top:f}),p=new t.Group([d,h],{originX:"center",originY:"center",hasControls:!1,hasBorders:!1,objectCaching:!1,hoverCursor:"pointer",lockMovementY:!0});return p.isLeft=o,p.isCustomIcon=i,D(p),p}function D(t){z.hovered&&(t.on("mouseover",(()=>{H(t,"hover")})),t.on("mouseout",(()=>{m.show=!1}))),t.lockMovementX&&t.lockMovementY||(t.on("moving",(()=>{!function(t){t.setCoords(),t.left<t.limitX.x1&&t.set("left",t.limitX.x1);t.left>t.limitX.x2&&t.set("left",t.limitX.x2)}(t),function(t){if(t.centerLine){const e=t.isLeft?{x1:t.left}:{x2:t.left};t.centerLine.setCoords().set(e)}if(t.text){const e=$(t.text,{startLine:t.isLeft?t:t.nearLine,centerLine:t.centerLine,endLine:t.isLeft?t.nearLine:t},t.top);t.text.setCoords().set(e)}}(t),z.hovered&&H(t)})),t.on("mouseup",(e=>{if(1===e.button){!function(t){t.isLeft?(t.prevLine&&(t.prevLine.limitX.x2=t.left),t.nearLine&&(t.nearLine.limitX.x1=t.left)):(t.nextLine&&(t.nextLine.limitX.x1=t.left),t.nearLine&&(t.nearLine.limitX.x2=t.left))}(t);const e={type:"tree",...t.origin};d("change",e)}})))}function H(t,e="moving"){var i,n,o;const{data:l}=t.origin;m.point={x:t.left,y:t.top};let[r="",s=""]=l.time||[];if("moving"===e){const e=x(t.left);t.isLeft?r=e:s=e,l.time=[r,s],t.text&&(t.text.origin.data.time=[r,s])}m.list=[`开始时间 ${r}`,`结束时间 ${s}`,`流速 ${(null==(i=l.value)?void 0:i.currentSpeed)||""}`,`浓度 ${(null==(n=l.value)?void 0:n.consistence)||""}`,`总量 ${(null==(o=l.value)?void 0:o.total)||""}`],m.show=!0}s(a,{...u,gridYNumber:b,originY:k,yCellHeight:G,endY:I}),function(){const{height:o,list:l,left:r,spaceValue:s}=j;if(!o)return;const f=[],c=X+o/2;l.forEach(((t,i)=>{const n=r+i*v*s;f.push(e([n,c],{value:t.slice(11,16)}))}));const u=f.length>0?new t.Group([...f],{...i,objectCaching:!1}):null;u&&a.value.add(u);const d=new t.Rect({width:y,height:o,left:0,top:X,...n,originX:"left",originY:"top",...Y});a.value.add(d)}(),function(){var e;const n=(null==(e=null==C?void 0:C.tree)?void 0:e.textStyle)||{},r=[];!function t(e){e.forEach((e=>{var i;const{width:s,height:f,left:a,top:u,title:d=""}=e,m={value:d,...n};(null==(i=e.children)?void 0:i.length)?(m.value=d.split("").join("\n"),t(e.children)):(m.textAlign="left",function(t){if(!(null==t?void 0:t.data)||!Array.isArray(t.data))return;const{lineStyle:e,textStyle:i,totalStyle:n}=C.data||{},o=t.top,r=o+G,s=r-G/2,f={y1:o,y2:r,halfY:s},a=[],u=c(t);delete u.data,t.data.forEach(((t,i,n)=>{const{time:o,continue:r}=t,[c,d]=o,m=c&&p(c),h=d&&p(d),x=E({...f,x:m},{isCustomIcon:!h&&!r,isContinue:!1,isLeft:!0}),v=E({...f,x:h},{isCustomIcon:!1,isContinue:!!r});let X,C,w;if((x||m<L)&&(v||h>g)){X=l([x?m:L,s,v?h:g,s],e)}a.push({startLine:x,centerLine:X,endLine:v}),function(t,e,i){const{startLine:n,centerLine:o,endLine:l}=e[t],{startLine:r,endLine:s}=e[t-1]||{};if(n){n.origin=i;const t={x1:L,x2:l?l.left:g};s?(t.x1=s.left,s.limitX.x2=n.left,n.prevLine=s,s.nextLine=n):r&&(t.x1=r.left,r.limitX.x2=n.left,n.prevLine=r,r.nextLine=n),n.limitX=t,o&&(n.centerLine=o)}if(l){l.origin=i;const t={x1:n?n.left:L,x2:g};l.limitX=t,o&&(l.centerLine=o)}n&&l&&(n.nearLine=l,l.nearLine=n)}(i,a,Object.assign({},u,{data:t,index:i})),n[i-1]&&(C=M(n[i-1],a[i-1],s)),i===n.length-1&&(w=M(t,a[i],s)),X&&A.add(X),x&&A.add(x),v&&A.add(v),C&&A.add(C),w&&A.add(w)}))}(e)),r.push(o({width:s,height:f,...Y},m,{left:a,top:u},!0))}))}(S);const s=r.length>0?new t.Group([...r],{...i,objectCaching:!1}):null;s&&a.value.add(s),A.size&&a.value.add(...A)}()}export{a as useTop};
@@ -1,10 +1,8 @@
1
1
  import { type Ref } from 'vue';
2
2
  import { fabric } from '../../../../../../es/shared/utils/fabricjs';
3
- import { IPropItems } from '../../../../../../es/components/fabric-chart/src/interface';
3
+ import { IPropItems, IPointTipProps, IPointMenuProps } from '../../../../../../es/components/fabric-chart/src/interface';
4
4
  import { AnyObject } from '../../../../../../es/shared/types';
5
- export declare function useCenter(canvas: Ref<fabric.Canvas>, propItems: IPropItems, emits: Function, cumputedX: Function, cumputedY: Function, getXValue: Function, getYValue: Function, addRenderItem: Function | undefined, pointTipProps: AnyObject, pointMenuProps: AnyObject): {
6
- pointTipProps: AnyObject;
7
- pointMenuProps: AnyObject;
5
+ export declare function useCenter(canvas: Ref<fabric.Canvas>, propItems: IPropItems, emits: Function, cumputedX: Function, cumputedY: Function, getXValue: Function, getYValue: Function, addRenderItem: Function | undefined, pointTipProps: IPointTipProps, pointMenuProps: IPointMenuProps): {
8
6
  clickMenu: ({ item, target }: {
9
7
  item: any;
10
8
  target: any;
@@ -1 +1 @@
1
- import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{useShadow as t}from"./useShadow.js";import{drawLine as i,defaultStyle as n,drawPoint as o,drawText as l,drawArrow as s}from"../useDraw.js";import{useGrid as r}from"../useGrid.js";import"date-fns";import{isOneLine as a,getType as u,isOverlapPoint as p,isValidValue as d,setOtherType as c,isEffectiveNode as f,getTime as h,getIndex as v,deleteProperty as g}from"../../utils/index.js";import"@vueuse/core";import{useCommon as y}from"../useCommon.js";import"vue";import{cloneDeep as m}from"lodash-es";import{TEMPERATURE_MENU as x,PAIN_MENU as b,OVERLAP as w}from"../../constants/index.js";function j(j,k,Y,S,E,$,M,P,O,T){r(j,k);const{getEqualXTypes:A,handleAddPrevent:I}=y(j,Y,k),{createShadowLines:C}=t(),{left:R,xScaleList:X,xCellWidth:F,yCellHeight:z,originX:D,endX:V,originY:_,endY:G,itemList:H,event:q,vitalSignsOriginY:W,painOriginY:B,hospitalizationDate:J,config:K,canvasHeight:N}=k,Q=new Set,U=["xinmai","mai"],Z=new Map,ee=new Set,te=new Set,ie=new Set,ne=m(R.yScaleValue);function oe(t){var i;const o=ne.find((e=>"pulse"===e.type));if(o&&(null==(i=o.dataList)?void 0:i.length)&&(Q.size&&j.value.remove(...Q),Q.clear(),Z.size>1)){if(t){const{type:e,key:i}=t.origin||{};if("pulse"===e){const e=Z.get(i),n=null==e?void 0:e.findIndex((e=>e[0]===t.left));e.splice(n,1,[t.left,t.top])}}(function(){const e=[],t=[],i=[];for(const e of Z)t.push(e[1]),e[0]===U[0]&&e[1].forEach((e=>{(Z.get(U[1])||[]).findIndex((t=>t[0]===e[0]))>-1&&i.push(e[0])}));const[n,o]=t;let l=[],s=[];return i.forEach((t=>{const i=n.findIndex((e=>e[0]===t)),r=o.findIndex((e=>e[0]===t)),a=n[i],u=o[r],p=n[i-1],d=n[i+1],c=o[r-1],f=o[r+1];if(p&&c){if(p[0]!==c[0]){const e=Math.max(p[0],c[0]);l.push([p,c].find((t=>t[0]===e)))}}else p?l.push(p):c&&s.push(c);const h=Math.min(a[1],u[1]);l.push([a,u].find((e=>e[1]===h)));const v=Math.max(a[1],u[1]);s.push([a,u].find((e=>e[1]===v)));const g=()=>{const t=[...l,...s.reverse()],[i]=t,n=t.at(-1);i[0]===n[0]&&i[1]===n[1]&&t.splice(-1,1),e.push(t),l=[],s=[]};if(d&&f){if(d[0]!==f[0]){const e=Math.min(d[0],f[0]);l.push([d,f].find((t=>t[0]===e))),g()}}else d?(l.push(d),g()):f?(s.push(f),g()):g()})),e})().forEach((t=>{var i,l,s,r,a,u;const p=t.map((e=>({x:e[0],y:e[1]}))),d=new e.Polygon(p,{...n,...(null==(i=o.shadow)?void 0:i.style)||{}});if("slash"==(null==(l=o.shadow)?void 0:l.mode)){d.set({fill:"transparent",stroke:(null==(r=null==(s=o.shadow)?void 0:s.style)?void 0:r.stroke)||"#f00"});const e=C(t,null==(a=o.shadow)?void 0:a.style._angle,null==(u=o.shadow)?void 0:u.style.space);e.forEach((e=>{var t;Object.assign(e,{...n,...(null==(t=o.shadow)?void 0:t.style)||{}}),Q.add(e)})),j.value.add(...e)}Q.add(d),j.value.add(d)}))}}function le(){var e;const t=ne.find((e=>"pulse"===e.type));if(!t||!(null==(e=t.dataList)?void 0:e.length))return;if(!t.dataList.some((e=>e.title.includes("脉搏"))))return;const i=Object.assign({},w,R.overlap||{}),l=[];ee.size&&[...ee].forEach((e=>{[...te].forEach((t=>{if(t.origin&&p(e,t)){const e=t.origin.key;if(e){const s={left:t.left,top:t.top,...n,hoverCursor:"default"};let r="koumai";"yemai"===e&&(r=e),"humai"===e&&(r="circle"),l.push(o(r,{...i[e]||{},...s}))}}}))})),setTimeout((()=>{j.value.add(...l),l.forEach((e=>{null==e||e.bringToFront(),ie.add(e)}))}))}function se(e,t,r){var u;const{type:p,riseStyle:f={},noRiseStyle:h={},verifiedStyle:v={},reduceStyle:g={},pacemaker:y={},upArrowStyle:m={},limitValueStyle:x={},nonePainPointStyle:b={},dataList:w=[]}=r,S=[],$=[],P=[];null==(u=e.list)||u.forEach(((u,T)=>{const A=a(p)?w.find((e=>e.key===u.key)):e,I=ue(u,r),C={};C.value=function(e,t,i){if(!(null==e?void 0:e.length)||!K.showValue)return;const{lineAttr:n={}}=i,o=e[1]<=W.originY+z?e[1]+z:e[1]-z,s=l([e[0],o],{value:t.value,originX:"center",originY:"center",fill:n.stroke||"#000"});return P.push(s),{obj:s,top:-z}}(I,u,A),function(e,t,r,a,u){var c,y;if(!(null==e?void 0:e.length)||!["temperature","pain"].includes(p))return;const{lineAttr:m={}}=r,{value:x}=a;let b,w,j,k,Y,S;if(t.noRise&&h.show){const t=L(h)?E(u.type,u.list,35):e[1];if(h.text)j=l([e[0],L(h)?t:t+5],{value:h.text.split("").join("\n"),originY:"top",...h.style||{}}),P.push(j);else{const i=t+2*z;k=s([e[0],t,i],h.style||{}),P.push(k)}}t.rise&&f.show&&f.text&&(Y=l([e[0],e[1]-(x?z:0)-5],{value:f.text.split("").join("\n"),originY:"bottom",...f.style||{}}),P.push(Y));t.verified&&(S=l([e[0],e[1]-(x?z:0)-5],{value:"v",originX:"center",originY:"bottom",...v}),P.push(S));if(d(t.physicsReduce)||d(t.drugReduce)){const l=E(p,u.list,null!=(c=t.physicsReduce)?c:t.drugReduce);b=i([...e,e[0],l],{...m,...g.line,...n}),w=o((null==(y=null==g?void 0:g.point)?void 0:y.type)||"circle",{left:e[0],top:l,...g.point,...n,originY:l===N?"bottom":"center"}),b&&P.push(b),w&&P.push(w)}Object.assign(a,{reduceLine:{obj:b,type:"line"},noRiseText:{obj:j,top:5,isFixed:L(h)},arrowGroup:{obj:k,top:2*z,isFixed:L(h)},riseText:{obj:Y,top:(x?-z:0)-5},verifiedText:{obj:S,top:(x?-z:0)-5},reducePoint:{obj:w,type:"reduce"}})}(I,u,A,C,r),function(e,t,i,n){if(!(null==e?void 0:e.length)||!["pulse"].includes(p))return;let o,a;const{upArrowShow:u=!1,limitValueShow:d=!1}=i;if(u&&+t.value>180){let t=e[1]-2.5*z,i=[e[1]-z/2,t];t<W.originY&&(t=e[1]+2.5*z,i=[t,e[1]+z/2]),o=s([e[0],i[0],i[1]],m,"up"),P.push(o)}if(d){const i={value:t.value,originX:"center",originY:"center",...x};if(+t.value>Math.max(...r.list)){const t=o?e[1]+z/2+o.height:e[1]+z;a=l([e[0],t],i),P.push(a)}+t.value<Math.min(...r.list)&&(a=l([e[0],e[1]-z],i),P.push(a))}Object.assign(n,{upArrow:{obj:o},limitValue:{obj:a,top:-z}})}(I,u,A,C),function(n,l,s,a,u){let d,f;const{pointAttr:h={},lineAttr:v={},title:g="",key:m,type:x="circle"}=a,w=e.list[s+1],L=ue(w,r),E=re(p,e.list[s].value),P=L&&re(p,w.value);!n||!L||l.breakpoint||E||P||n[0]===L[0]||(f=i([...n,...L],{...v}));const T=l.pacemakerShow&&"pulse"==p?y.value:E?0:x,A=$[s-1],I={origin:{data:l,title:g,key:m||"",unit:r.unit,type:p,_type:c(g,p),dataIndex:t,index:s},leftLine:A,rightLine:f,otherObj:u,lockMovementX:!0,...l.pacemakerShow&&"pulse"==p?y.style:h,...k.event.hovered?k.event.evented?{selectable:!0}:{selectable:!0,lockMovementY:!0}:k.event,...E?{selectable:!1,evented:!1,...b}:{}};if(A){const e=A.get("y2");d=o(T,{left:A.get("x2"),top:E?e-5:e,...I})}else n&&(I.leftLine=null,d=o(T,{left:n[0],top:E?n[1]-5:n[1],...I}));$.push(f),d&&(g.includes("脉搏")?ee.add(d):te.add(d),function(e){q.hovered&&(e.on("mouseover",(()=>{ae(e,"hover")})),e.on("mouseout",(()=>{O.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{!function(e){e.setCoords();const t="pain"===e.origin.type?B:W;e.top<t.originY&&e.set("top",t.originY);e.top>t.endY&&e.set("top",t.endY)}(e),function(e){var t,i;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(i=e.rightLine)||i.setCoords().set({x1:e.left,y1:e.top}),Object.values(e.otherObj).forEach((t=>{const{obj:i,type:n="",top:o=0,isFixed:l}=t||{};"reduce"!==n&&("line"===n?null==i||i.setCoords().set({x1:e.left,y1:e.top}):!l&&(null==i||i.setCoords().set({left:e.left,top:e.top+o})))})),oe(e)}(e),q.hovered&&ae(e)})),e.on("mouseup",(t=>{if(O.show=!1,1===t.button){const{type:t}=e.origin,i=M(t,e.top),n={...e.origin,data:{...e.origin.data,value:i}};j.value.discardActiveObject(),Y("change",n),de(n,"change")}}))}(d),S.push(d),ie.add(d))}(I,u,T,A,C)})),"pulse"===p&&U.forEach((e=>{Z.set(e,S.filter((t=>{var i;return(null==(i=t.origin)?void 0:i.key)===e})).map((e=>[e.left,e.top])))})),Promise.all(S).then((e=>{const t=$.filter((e=>e));let i=null;e=e.map((e=>(e&&i&&(i.nextPoint=e,e.prevPoint=i),i=e||i,e))),Promise.all(P).then((i=>{j.value.add(...t,...e,...i),e.forEach((t=>{null==t||t.bringToFront(),function(e,t){if("pulse"===e.origin.type){t.filter((t=>t.left===e.left&&"pulse"===t.origin.type)).length>1&&(e.leftLine&&j.value.remove(e.leftLine),e.rightLine&&j.value.remove(e.rightLine))}}(t,e)}))}))}))}function re(e,t){return"pain"===e&&0==t}function ae(e,t="moving"){const{title:i,unit:n,type:o,data:l}=e.origin;O.point={x:e.left,y:e.top},O.list=[function(){const{drugReduce:s,physicsReduce:r}=l||{},a="hover"===t?l.value:M(o,e.top);if(d(s))return`药物降${"pain"==o?"痛":"温"} ${a}—>${s}${n||""}`;if(d(r))return`物理降${"pain"==o?"痛":"温"} ${a}—>${r}${n||""}`;return`${i} ${a}${n||""}`}(),`时间 ${((null==l?void 0:l.time)||$(e.left)).slice(-5)}`],O.show=!0}function ue(e,t){const i="pain"===t.type?B:W;if(f(e)&&function(e){const[t]=X,i=X.at(-1),n=t.start,o=i.end,l=h(e);return l>=n&&l<=o}(e.time)){const n=S(e.time),o=E(t.type,t.list,e.value);return[n,o<i.originY?i.originY:o>i.endY?i.endY:o]}}function pe(e){const t=new Date,i=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),o=h(`${t.getFullYear()}-${i}-${n} 23:59:59`),l=h(`${$(e)}:00`);return J&&l<h(J)?(I("exceedMin"),!1):!(l>o)||(I("exceedMax"),!1)}function de(e,t="add"){const{type:i,dataIndex:n,index:o,data:l,key:s}=e,r=ne.find((e=>e.type===i));if("add"===t){const e=a(i)?r.dataList.find((e=>e.enable)):r.dataList[n],t=v(l.time,e.list);e.list.splice(t,0,l)}else r.dataList[n].list[o]=l;ce()}function ce(){var e;ie.size&&(null==(e=j.value)||e.remove(...function(e){const t=[];return e.forEach((e=>{e&&t.push(e),(null==e?void 0:e.leftLine)&&t.push(null==e?void 0:e.leftLine),(null==e?void 0:e.rightLine)&&t.push(null==e?void 0:e.rightLine),Object.values((null==e?void 0:e.otherObj)||{}).forEach((e=>{(null==e?void 0:e.obj)&&t.push(null==e?void 0:e.obj)}))})),t}([...ie]))),Z.clear(),ie.clear(),ee.clear(),te.clear(),ne.forEach((e=>{e.dataList.forEach(((t,i)=>{a(e.type)&&!t.enable||se(t,i,e)}))})),oe(),le()}return Z.clear(),ee.clear(),te.clear(),ne.forEach((e=>{!function(e){if("temperature"!==e.type||!e.positionLine)return;const t=E(e.type,e.list,e.positionLine.value),n=i([D,t,V,t],e.positionLine);j.value.add(n)}(e),e.dataList.forEach(((t,i)=>{a(e.type)&&!t.enable||se(t,i,e)}))})),oe(),le(),k.event.evented&&j.value.on("mouse:up",(e=>{var t;if(3===e.button){const{x:i=0,y:n=0}=e.pointer||{};if(i>=D&&i<=V&&n>=_&&n<=G){T.point={x:i,y:n},T.show=!0;const{type:o}=(null==(t=e.target)?void 0:t.origin)||{};if(e.target&&["temperature","pain"].includes(o))"temperature"===o&&(T.list=[...x]),"pain"===o&&(T.list=[...b]),T.target=e.target;else{T.target=null,T.list=["新增节点"],H.forEach((t=>{if(!A(i,"_type",F).includes(t.bigType)){const i=["pain"].includes(t.bigType)?B:W;n>=i.originY&&n<=i.endY&&T.list.push({renderItem:P?P(t):()=>t.title,origin:{title:t.title,unit:t.unit,type:u(t.bigType),dataIndex:t.dataIndex,key:t.key},pointer:e.pointer})}}));const t=pe(i);t&&1!==T.list.length||(T.show=!1,1===T.list.length&&t&&I("repeat"))}}}})),{pointTipProps:O,pointMenuProps:T,clickMenu:function({item:e,target:t}){if(t){const{data:i,type:n,dataIndex:o,index:l}=t.origin,s=g(i,[...x,...b]);s[`${e.type}`]=e.value,a(n)&&(s.key=t.origin.key);const r={...t.origin,data:s};Y("change",r),de(r,"change")}else{const t={data:{time:$(e.pointer.x),value:M(e.origin.type,e.pointer.y),...a(e.origin.type)?{key:e.origin.key}:{}},...e.origin};Y("add",t),de(t)}},setPopup:ae,isAddPoint:pe,updateData:de,redrawPoints:ce}}function L(e){return"fixed"===e.position}export{j as useCenter};
1
+ import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{useShadow as t}from"./useShadow.js";import{drawLine as i,defaultStyle as n,drawPoint as o,drawText as l,drawArrow as s}from"../useDraw.js";import{useGrid as r}from"../useGrid.js";import"date-fns";import{isOneLine as a,getType as u,isOverlapPoint as d,isValidValue as c,setOtherType as p,isEffectiveNode as f,getTime as h,getIndex as v,deleteProperty as g}from"../../utils/index.js";import"@vueuse/core";import{useCommon as y}from"../useCommon.js";import"vue";import{cloneDeep as m}from"lodash-es";import{TEMPERATURE_MENU as x,PAIN_MENU as b,OVERLAP as w}from"../../constants/index.js";function j(j,k,Y,S,E,$,M,O,P,A){r(j,k);const{getEqualXTypes:I,handleAddPrevent:T}=y(j,Y,k),{createShadowLines:C}=t(),{left:R,xScaleList:X,xCellWidth:F,yCellHeight:z,originX:D,endX:V,originY:_,endY:G,itemList:H,event:q,vitalSignsOriginY:W,painOriginY:B,hospitalizationDate:J,config:K,canvasHeight:N}=k,Q=new Set,U=["xinmai","mai"],Z=new Map,ee=new Set,te=new Set,ie=new Set,ne=m(R.yScaleValue);function oe(t){var i;const o=ne.find((e=>"pulse"===e.type));if(o&&(null==(i=o.dataList)?void 0:i.length)&&(Q.size&&j.value.remove(...Q),Q.clear(),Z.size>1)){if(t){const{type:e,key:i}=t.origin||{};if("pulse"===e){const e=Z.get(i),n=null==e?void 0:e.findIndex((e=>e[0]===t.left));e.splice(n,1,[t.left,t.top])}}(function(){const e=[],t=[],i=[];for(const e of Z)t.push(e[1]),e[0]===U[0]&&e[1].forEach((e=>{(Z.get(U[1])||[]).findIndex((t=>t[0]===e[0]))>-1&&i.push(e[0])}));const[n,o]=t;let l=[],s=[];return i.forEach((t=>{const i=n.findIndex((e=>e[0]===t)),r=o.findIndex((e=>e[0]===t)),a=n[i],u=o[r],d=n[i-1],c=n[i+1],p=o[r-1],f=o[r+1];if(d&&p){if(d[0]!==p[0]){const e=Math.max(d[0],p[0]);l.push([d,p].find((t=>t[0]===e)))}}else d?l.push(d):p&&s.push(p);const h=Math.min(a[1],u[1]);l.push([a,u].find((e=>e[1]===h)));const v=Math.max(a[1],u[1]);s.push([a,u].find((e=>e[1]===v)));const g=()=>{const t=[...l,...s.reverse()],[i]=t,n=t.at(-1);i[0]===n[0]&&i[1]===n[1]&&t.splice(-1,1),e.push(t),l=[],s=[]};if(c&&f){if(c[0]!==f[0]){const e=Math.min(c[0],f[0]);l.push([c,f].find((t=>t[0]===e))),g()}}else c?(l.push(c),g()):f?(s.push(f),g()):g()})),e})().forEach((t=>{var i,l,s,r,a,u;const d=t.map((e=>({x:e[0],y:e[1]}))),c=new e.Polygon(d,{...n,...(null==(i=o.shadow)?void 0:i.style)||{}});if("slash"==(null==(l=o.shadow)?void 0:l.mode)){c.set({fill:"transparent",stroke:(null==(r=null==(s=o.shadow)?void 0:s.style)?void 0:r.stroke)||"#f00"});const e=C(t,null==(a=o.shadow)?void 0:a.style._angle,null==(u=o.shadow)?void 0:u.style.space);e.forEach((e=>{var t;Object.assign(e,{...n,...(null==(t=o.shadow)?void 0:t.style)||{}}),Q.add(e)})),j.value.add(...e)}Q.add(c),j.value.add(c)}))}}function le(){var e;const t=ne.find((e=>"pulse"===e.type));if(!t||!(null==(e=t.dataList)?void 0:e.length))return;if(!t.dataList.some((e=>e.title.includes("脉搏"))))return;const i=Object.assign({},w,R.overlap||{}),l=[];ee.size&&[...ee].forEach((e=>{[...te].forEach((t=>{if(t.origin&&d(e,t)){const e=t.origin.key;if(e){const s={left:t.left,top:t.top,...n,hoverCursor:"default"};let r="koumai";"yemai"===e&&(r=e),"humai"===e&&(r="circle"),l.push(o(r,{...i[e]||{},...s}))}}}))})),setTimeout((()=>{j.value.add(...l),l.forEach((e=>{null==e||e.bringToFront(),ie.add(e)}))}))}function se(e,t,r){var u;const{type:d,riseStyle:f={},noRiseStyle:h={},verifiedStyle:v={},reduceStyle:g={},pacemaker:y={},upArrowStyle:m={},limitValueStyle:x={},nonePainPointStyle:b={},dataList:w=[]}=r,S=[],$=[],O=[];null==(u=e.list)||u.forEach(((u,A)=>{const I=a(d)?w.find((e=>e.key===u.key)):e,T=ue(u,r),C={};C.value=function(e,t,i){if(!(null==e?void 0:e.length)||!K.showValue)return;const{lineAttr:n={}}=i,o=e[1]<=W.originY+z?e[1]+z:e[1]-z,s=l([e[0],o],{value:t.value,originX:"center",originY:"center",fill:n.stroke||"#000"});return O.push(s),{obj:s,top:-z}}(T,u,I),function(e,t,r,a,u){var p,y;if(!(null==e?void 0:e.length)||!["temperature","pain"].includes(d))return;const{lineAttr:m={}}=r,{value:x}=a;let b,w,j,k,Y,S;if(t.noRise&&h.show){const t=L(h)?E(u.type,u.list,35):e[1];if(h.text)j=l([e[0],L(h)?t:t+5],{value:h.text.split("").join("\n"),originY:"top",...h.style||{}}),O.push(j);else{const i=t+2*z;k=s([e[0],t,i],h.style||{}),O.push(k)}}t.rise&&f.show&&f.text&&(Y=l([e[0],e[1]-(x?z:0)-5],{value:f.text.split("").join("\n"),originY:"bottom",...f.style||{}}),O.push(Y));t.verified&&(S=l([e[0],e[1]-(x?z:0)-5],{value:"v",originX:"center",originY:"bottom",...v}),O.push(S));if(c(t.physicsReduce)||c(t.drugReduce)){const l=E(d,u.list,null!=(p=t.physicsReduce)?p:t.drugReduce);b=i([...e,e[0],l],{...m,...g.line,...n}),w=o((null==(y=null==g?void 0:g.point)?void 0:y.type)||"circle",{left:e[0],top:l,...g.point,...n,originY:l===N?"bottom":"center"}),b&&O.push(b),w&&O.push(w)}Object.assign(a,{reduceLine:{obj:b,type:"line"},noRiseText:{obj:j,top:5,isFixed:L(h)},arrowGroup:{obj:k,top:2*z,isFixed:L(h)},riseText:{obj:Y,top:(x?-z:0)-5},verifiedText:{obj:S,top:(x?-z:0)-5},reducePoint:{obj:w,type:"reduce"}})}(T,u,I,C,r),function(e,t,i,n){if(!(null==e?void 0:e.length)||!["pulse"].includes(d))return;let o,a;const{upArrowShow:u=!1,limitValueShow:c=!1}=i;if(u&&+t.value>180){let t=e[1]-2.5*z,i=[e[1]-z/2,t];t<W.originY&&(t=e[1]+2.5*z,i=[t,e[1]+z/2]),o=s([e[0],i[0],i[1]],m,"up"),O.push(o)}if(c){const i={value:t.value,originX:"center",originY:"center",...x};if(+t.value>Math.max(...r.list)){const t=o?e[1]+z/2+o.height:e[1]+z;a=l([e[0],t],i),O.push(a)}+t.value<Math.min(...r.list)&&(a=l([e[0],e[1]-z],i),O.push(a))}Object.assign(n,{upArrow:{obj:o},limitValue:{obj:a,top:-z}})}(T,u,I,C),function(n,l,s,a,u){let c,f;const{pointAttr:h={},lineAttr:v={},title:g="",key:m,type:x="circle"}=a,w=e.list[s+1],L=ue(w,r),E=re(d,e.list[s].value),O=L&&re(d,w.value);!n||!L||l.breakpoint||E||O||n[0]===L[0]||(f=i([...n,...L],{...v}));const A=l.pacemakerShow&&"pulse"==d?y.value:E?0:x,I=$[s-1],T={origin:{data:l,title:g,key:m||"",unit:r.unit,type:d,_type:p(g,d),dataIndex:t,index:s},leftLine:I,rightLine:f,otherObj:u,lockMovementX:!0,...l.pacemakerShow&&"pulse"==d?y.style:h,...k.event.hovered?k.event.evented?{selectable:!0}:{selectable:!0,lockMovementY:!0}:k.event,...E?{selectable:!1,evented:!1,...b}:{}};if(I){const e=I.get("y2");c=o(A,{left:I.get("x2"),top:E?e-5:e,...T})}else n&&(T.leftLine=null,c=o(A,{left:n[0],top:E?n[1]-5:n[1],...T}));$.push(f),c&&(g.includes("脉搏")?ee.add(c):te.add(c),function(e){q.hovered&&(e.on("mouseover",(()=>{ae(e,"hover")})),e.on("mouseout",(()=>{P.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{!function(e){e.setCoords();const t="pain"===e.origin.type?B:W;e.top<t.originY&&e.set("top",t.originY);e.top>t.endY&&e.set("top",t.endY)}(e),function(e){var t,i;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(i=e.rightLine)||i.setCoords().set({x1:e.left,y1:e.top}),Object.values(e.otherObj).forEach((t=>{const{obj:i,type:n="",top:o=0,isFixed:l}=t||{};"reduce"!==n&&("line"===n?null==i||i.setCoords().set({x1:e.left,y1:e.top}):!l&&(null==i||i.setCoords().set({left:e.left,top:e.top+o})))})),oe(e)}(e),q.hovered&&ae(e)})),e.on("mouseup",(t=>{if(P.show=!1,1===t.button){const{type:t}=e.origin,i=M(t,e.top),n={...e.origin,data:{...e.origin.data,value:i}};j.value.discardActiveObject(),Y("change",n),ce(n,"change")}}))}(c),S.push(c),ie.add(c))}(T,u,A,I,C)})),"pulse"===d&&U.forEach((e=>{Z.set(e,S.filter((t=>{var i;return(null==(i=t.origin)?void 0:i.key)===e})).map((e=>[e.left,e.top])))})),Promise.all(S).then((e=>{const t=$.filter((e=>e));let i=null;e=e.map((e=>(e&&i&&(i.nextPoint=e,e.prevPoint=i),i=e||i,e))),Promise.all(O).then((i=>{j.value.add(...t,...e,...i),e.forEach((t=>{null==t||t.bringToFront(),function(e,t){if("pulse"===e.origin.type){t.filter((t=>t.left===e.left&&"pulse"===t.origin.type)).length>1&&(e.leftLine&&j.value.remove(e.leftLine),e.rightLine&&j.value.remove(e.rightLine))}}(t,e)}))}))}))}function re(e,t){return"pain"===e&&0==t}function ae(e,t="moving"){const{title:i,unit:n,type:o,data:l}=e.origin;P.point={x:e.left,y:e.top},P.list=[function(){const{drugReduce:s,physicsReduce:r}=l||{},a="hover"===t?l.value:M(o,e.top);if(c(s))return`药物降${"pain"==o?"痛":"温"} ${a}—>${s}${n||""}`;if(c(r))return`物理降${"pain"==o?"痛":"温"} ${a}—>${r}${n||""}`;return`${i} ${a}${n||""}`}(),`时间 ${((null==l?void 0:l.time)||$(e.left)).slice(-5)}`],P.show=!0}function ue(e,t){const i="pain"===t.type?B:W;if(f(e)&&function(e){const[t]=X,i=X.at(-1),n=t.start,o=i.end,l=h(e);return l>=n&&l<=o}(e.time)){const n=S(e.time),o=E(t.type,t.list,e.value);return[n,o<i.originY?i.originY:o>i.endY?i.endY:o]}}function de(e){const t=new Date,i=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),o=h(`${t.getFullYear()}-${i}-${n} 23:59:59`),l=h(`${$(e)}:00`);return J&&l<h(J)?(T("exceedMin"),!1):!(l>o)||(T("exceedMax"),!1)}function ce(e,t="add"){const{type:i,dataIndex:n,index:o,data:l,key:s}=e,r=ne.find((e=>e.type===i));if("add"===t){const e=a(i)?r.dataList.find((e=>e.enable)):r.dataList[n],t=v(l.time,e.list);e.list.splice(t,0,l)}else r.dataList[n].list[o]=l;pe()}function pe(){var e;ie.size&&(null==(e=j.value)||e.remove(...function(e){const t=[];return e.forEach((e=>{e&&t.push(e),(null==e?void 0:e.leftLine)&&t.push(null==e?void 0:e.leftLine),(null==e?void 0:e.rightLine)&&t.push(null==e?void 0:e.rightLine),Object.values((null==e?void 0:e.otherObj)||{}).forEach((e=>{(null==e?void 0:e.obj)&&t.push(null==e?void 0:e.obj)}))})),t}([...ie]))),Z.clear(),ie.clear(),ee.clear(),te.clear(),ne.forEach((e=>{e.dataList.forEach(((t,i)=>{a(e.type)&&!t.enable||se(t,i,e)}))})),oe(),le()}return Z.clear(),ee.clear(),te.clear(),ne.forEach((e=>{!function(e){if("temperature"!==e.type||!e.positionLine)return;const t=E(e.type,e.list,e.positionLine.value),n=i([D,t,V,t],e.positionLine);j.value.add(n)}(e),e.dataList.forEach(((t,i)=>{a(e.type)&&!t.enable||se(t,i,e)}))})),oe(),le(),k.event.evented&&j.value.on("mouse:up",(e=>{var t;if(3===e.button){const{x:i=0,y:n=0}=e.pointer||{};if(i>=D&&i<=V&&n>=_&&n<=G){A.point={x:i,y:n},A.show=!0;const{type:o}=(null==(t=e.target)?void 0:t.origin)||{};if(e.target&&["temperature","pain"].includes(o))"temperature"===o&&(A.list=[...x]),"pain"===o&&(A.list=[...b]),A.target=e.target;else{A.target=null,A.list=["新增节点"],H.forEach((t=>{if(!I(i,"_type",F).includes(t.bigType)){const i=["pain"].includes(t.bigType)?B:W;n>=i.originY&&n<=i.endY&&A.list.push({renderItem:O?O(t):()=>t.title,origin:{title:t.title,unit:t.unit,type:u(t.bigType),dataIndex:t.dataIndex,key:t.key},pointer:e.pointer})}}));const t=de(i);t&&1!==A.list.length||(A.show=!1,1===A.list.length&&t&&T("repeat"))}}}})),{clickMenu:function({item:e,target:t}){if(t){const{data:i,type:n,dataIndex:o,index:l}=t.origin,s=g(i,[...x,...b]);s[`${e.type}`]=e.value,a(n)&&(s.key=t.origin.key);const r={...t.origin,data:s};Y("change",r),ce(r,"change")}else{const t={data:{time:$(e.pointer.x),value:M(e.origin.type,e.pointer.y),...a(e.origin.type)?{key:e.origin.key}:{}},...e.origin};Y("add",t),ce(t)}},setPopup:ae,isAddPoint:de,updateData:ce,redrawPoints:pe}}function L(e){return"fixed"===e.position}export{j as useCenter};
@@ -1,7 +1,6 @@
1
1
  import { Ref } from 'vue';
2
2
  import { fabric } from '../../../../../../es/shared/utils/fabricjs';
3
- import { IPropItems } from '../../../../../../es/components/fabric-chart/src/interface';
4
- import { AnyObject } from '../../../../../../es/shared/types';
5
- export declare function useLeft(canvas: Ref<fabric.Canvas>, propItems: IPropItems, emits: Function, setPopup: Function, pointTipProps: AnyObject, cumputedX: Function, cumputedY: Function, getXValue: Function, getYValue: Function, isAddPoint: Function, updateData: Function): {
3
+ import { IPropItems, IPointTipProps } from '../../../../../../es/components/fabric-chart/src/interface';
4
+ export declare function useLeft(canvas: Ref<fabric.Canvas>, propItems: IPropItems, emits: Function, setPopup: Function, pointTipProps: IPointTipProps, cumputedX: Function, cumputedY: Function, getXValue: Function, getYValue: Function, isAddPoint: Function, updateData: Function): {
6
5
  drawScaleValue: (yScaleValueList: any[]) => void;
7
6
  };
@@ -1,26 +1,10 @@
1
1
  import { type Ref } from 'vue';
2
2
  import { fabric } from '../../../../../../es/shared/utils/fabricjs';
3
+ import { IPointTipProps, IPointMenuProps } from '../../../../../../es/components/fabric-chart/src/interface';
3
4
  import { AnyObject } from '../../../../../../es/shared/types';
4
- export declare function useTemperatureChart(canvas: Ref<fabric.Canvas>, props: AnyObject, emits: Function, canvasRef: Ref<HTMLCanvasElement | null>): {
5
+ export declare function useTemperatureChart(canvas: Ref<fabric.Canvas>, props: AnyObject, emits: Function, canvasRef: Ref<HTMLCanvasElement | null>, pointTipProps: IPointTipProps, pointMenuProps: IPointMenuProps): {
5
6
  propItems: any;
6
7
  redrawPoints: Ref<any>;
7
8
  select: Ref<any>;
8
- pointTipProps: {
9
- show: boolean;
10
- point: {
11
- x: number;
12
- y: number;
13
- };
14
- list: string[];
15
- };
16
- pointMenuProps: {
17
- show: boolean;
18
- point: {
19
- x: number;
20
- y: number;
21
- };
22
- list: any[];
23
- target: any;
24
- };
25
9
  clickMenu: Ref<any>;
26
10
  };
@@ -1 +1 @@
1
- import{ref as e,reactive as t,computed as a,onMounted as l,nextTick as u}from"vue";import{defaultBorderStyle as i}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import{useCumputedPoint as r}from"../useCumputedPoint.js";import{useEvent as n,useCanvasEvent as o}from"../useEvent.js";import{setOtherType as s,getFloorNumber as d}from"../../utils/index.js";import"lodash-es";import{format as v,addDays as c}from"date-fns";import{useTop as p}from"./useTop.js";import{useLeft as h}from"./useLeft.js";import{useRight as g}from"./useRight.js";import{useCenter as m}from"./useCenter.js";import{useBottom as f}from"./useBottom.js";import{useOther as y}from"./useOther.js";function Y(Y,S,b,w){const C=15,x=e(),D=e(),j=e(),V=t({show:!1,point:{x:0,y:0},list:[]}),X=t({show:!1,point:{x:0,y:0},list:[],target:null}),H=a((()=>{const{top:e}=S.data;return e.date.show&&(e.date.height||C)||0})),L=a((()=>{var e;const{top:t}=S.data;return(null==(e=t.hospitalDays)?void 0:e.show)&&(t.hospitalDays.height||C)||0})),M=a((()=>{var e;const{top:t}=S.data;return(null==(e=t.operationDays)?void 0:e.show)&&(t.operationDays.height||C)||0})),P=a((()=>{var e,t,a;const{top:l}=S.data;return((null==(e=l.xScalevalue)?void 0:e.show)&&(l.xScalevalue.height||C)||0)+((null==(t=l.xScalevalue)?void 0:t.show)&&null!=(a=l.dayHeight)?a:0)})),I=a((()=>{var e;const{bottom:t}=S.data;return(null==(e=null==t?void 0:t.breathing)?void 0:e.show)&&(t.breathing.height||30)||0})),N=a((()=>{const{grid:e}=S.data;return e.mainXCell*e.subXCell+e.surplusXCell})),O=a((()=>{const{grid:e}=S.data;return e.mainYCell*e.subYCell+e.surplusYCell})),W=a((()=>{var e;const{width:t,right:a=null,top:l}=S.data;if(!a)return t;return t-(null!=(e=a.width)?e:0)})),$=a((()=>{const{grid:e}=S.data;return W.value-e.surplusXCell*q.value})),k=a((()=>{const{top:e,left:t}=S.data;return e.titleWidth+A.value})),G=a((()=>{const{bottom:e=null,height:t}=S.data;if(!e)return t;return t-(e.height||30)})),R=a((()=>{var e;const{top:t}=S.data,a=t.xScalevalue.show&&(null!=(e=t.dayHeight)?e:0)||0,l=t.xScalevalue.show&&(t.xScalevalue.height||C)||0;return H.value+a+l+L.value+M.value})),T=a((()=>{const{grid:e}=S.data;return R.value+e.surplusYCell*z.value})),q=a((()=>(W.value-k.value)/N.value)),z=a((()=>(G.value-R.value)/O.value)),A=a((()=>{var e,t;const{left:a}=S.data;return(null==(e=a.icons)?void 0:e.show)&&((null==(t=a.icons)?void 0:t.width)||100)||0})),B=a((()=>{var e,t;const{top:a,grid:l}=S.data,u=(null==(t=null==(e=a.date.list)?void 0:e.slice)?void 0:t.call(e,0,l.mainXCell))||[],i=a.xScalevalue.times;let r=k.value-q.value;const n=a.date.startDate||v(new Date,"yyyy-MM-dd");return u.reduce(((e,t,a)=>0===a?e.concat(n):e.concat(v(c(new Date(n.replace(/-/g,"/")),a),"yyyy-MM-dd"))),[]).map((e=>i.map((t=>{r+=q.value;const a=Date.parse(`${e} ${t.start}`),l=Date.parse(`${e} ${t.end}`);return{start:a,end:l,left:r,center:r+q.value/2,scaleCell:(l-a)/q.value}})))).flat()})),E=a((()=>ie("breathe"))),F=a((()=>ie("pulse"))),J=a((()=>ie("temperature"))),K=a((()=>ie("pain"))),Q=a((()=>{var e;return(null==(e=S.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),U=a((()=>{const{left:e}=S.data;return e.yScaleValue.map((e=>e.dataList.filter((e=>e.show)).map(((t,a)=>({...t,bigType:s(t.title,e.type),unit:e.unit,dataIndex:a}))))).flat()})),Z=a((()=>{const{left:e}=S.data;return e.yScaleValue.findIndex((e=>"pain"===e.type))})),_=a((()=>{const{grid:e}=S.data;return-1===Z.value?0:z.value*e.subYCell})),ee=a((()=>{const{left:e}=S.data,t={originY:G.value,endY:G.value};return 0===Z.value&&e.yScaleValue.length>1?(t.originY=T.value,t.endY=T.value+_.value):Z.value===e.yScaleValue.length-1&&(t.originY=G.value-_.value,t.endY=G.value),t})),te=a((()=>{const{left:e}=S.data,t={originY:R.value,endY:G.value};return 0===Z.value&&e.yScaleValue.length>1?(t.originY=T.value+_.value,t.endY=G.value):Z.value===e.yScaleValue.length-1&&(t.originY=T.value,t.endY=G.value-_.value),t})),ae=a((()=>{var e,t;const{top:a,grid:l}=S.data,u=[];for(const i in a)a[i].show&&u.push({...a[i],list:(null==(t=null==(e=a[i].list)?void 0:e.slice)?void 0:t.call(e,0,l.mainXCell))||[],key:i});return u.sort(((e,t)=>e.seq-t.seq))})),le=a((()=>{var e;const{left:t,right:a}=S.data,l=t.yScaleValue.find((e=>"temperature"===e.type)),u=(null==a?void 0:a.yScaleValue)||{};return(null==(e=null==l?void 0:l.list)?void 0:e.length)&&Object.assign(u,{list:l.list.map((e=>d(1.8*e+32))),spaceGridNumber:l.spaceGridNumber}),u})),ue=t({canvasWidth:S.data.width,canvasHeight:S.data.height,borderStyle:{...i,...S.data.borderStyle||{}},selectionStyle:S.data.selectionStyle||{},dateHeight:H.value,hospitalDaysHeight:L.value,operationDaysHeight:M.value,xScalevalueHeight:P.value,topList:ae.value,breathingHeight:I.value,hospitalizationDate:S.data.hospitalizationDate,grid:S.data.grid,top:S.data.top,left:S.data.left,right:S.data.right,bottom:S.data.bottom,other:S.data.other,painIndex:Z.value,painHeight:_.value,painOriginY:ee.value,vitalSignsOriginY:te.value,gridXNumber:N.value,gridYNumber:O.value,iconsWidth:A.value,originX:k.value,originY:R.value,originYLimit:T.value,endX:W.value,endXLimit:$.value,endY:G.value,xCellWidth:q.value,yCellHeight:z.value,xScaleList:B.value,breatheYCell:E.value,pulseYCell:F.value,temperatureYCell:J.value,painYCell:K.value,event:Q.value,itemList:U.value,getRightInfo:le.value,config:S.data.config||{}});function ie(e){const{yScaleValue:t}=S.data.left,a=t.find((t=>t.type===e)),l=(null==a?void 0:a.list)||[];return l.length?z.value/((l[1]-l[0])/a.spaceGridNumber):0}const{cumputedX:re,cumputedY:ne,getXValue:oe,getYValue:se}=r(ue);return l((()=>{u((()=>{p(Y,ue);const{setPopup:e,isAddPoint:t,updateData:a,redrawPoints:l,clickMenu:u}=m(Y,ue,b,re,ne,oe,se,S.addRenderItem,V,X);D.value=l,j.value=u;const{drawScaleValue:i}=h(Y,ue,b,e,V,re,ne,oe,se,t,a);g(Y,ue,i),f(Y,ue),y(Y,ue,re),n(w.value);const{select:r}=o(Y,ue,b);x.value=r}))})),{propItems:ue,redrawPoints:D,select:x,pointTipProps:V,pointMenuProps:X,clickMenu:j}}export{Y as useTemperatureChart};
1
+ import{ref as e,computed as t,reactive as a,onMounted as l,nextTick as u}from"vue";import{defaultBorderStyle as i}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import{useCumputedPoint as r}from"../useCumputedPoint.js";import{useEvent as n,useCanvasEvent as o}from"../useEvent.js";import{setOtherType as s,getFloorNumber as d}from"../../utils/index.js";import"lodash-es";import{format as v,addDays as c}from"date-fns";import{useTop as h}from"./useTop.js";import{useLeft as p}from"./useLeft.js";import{useRight as g}from"./useRight.js";import{useCenter as m}from"./useCenter.js";import{useBottom as f}from"./useBottom.js";import{useOther as y}from"./useOther.js";function Y(Y,S,b,w,C,x){const D=15,j=e(),V=e(),X=e(),H=t((()=>{const{top:e}=S.data;return e.date.show&&(e.date.height||D)||0})),L=t((()=>{var e;const{top:t}=S.data;return(null==(e=t.hospitalDays)?void 0:e.show)&&(t.hospitalDays.height||D)||0})),I=t((()=>{var e;const{top:t}=S.data;return(null==(e=t.operationDays)?void 0:e.show)&&(t.operationDays.height||D)||0})),M=t((()=>{var e,t,a;const{top:l}=S.data;return((null==(e=l.xScalevalue)?void 0:e.show)&&(l.xScalevalue.height||D)||0)+((null==(t=l.xScalevalue)?void 0:t.show)&&null!=(a=l.dayHeight)?a:0)})),N=t((()=>{var e;const{bottom:t}=S.data;return(null==(e=null==t?void 0:t.breathing)?void 0:e.show)&&(t.breathing.height||30)||0})),P=t((()=>{const{grid:e}=S.data;return e.mainXCell*e.subXCell+e.surplusXCell})),O=t((()=>{const{grid:e}=S.data;return e.mainYCell*e.subYCell+e.surplusYCell})),W=t((()=>{var e;const{width:t,right:a=null,top:l}=S.data;if(!a)return t;return t-(null!=(e=a.width)?e:0)})),$=t((()=>{const{grid:e}=S.data;return W.value-e.surplusXCell*z.value})),k=t((()=>{const{top:e,left:t}=S.data;return e.titleWidth+A.value})),G=t((()=>{const{bottom:e=null,height:t}=S.data;if(!e)return t;return t-(e.height||30)})),R=t((()=>{var e;const{top:t}=S.data,a=t.xScalevalue.show&&(null!=(e=t.dayHeight)?e:0)||0,l=t.xScalevalue.show&&(t.xScalevalue.height||D)||0;return H.value+a+l+L.value+I.value})),q=t((()=>{const{grid:e}=S.data;return R.value+e.surplusYCell*T.value})),z=t((()=>(W.value-k.value)/P.value)),T=t((()=>(G.value-R.value)/O.value)),A=t((()=>{var e,t;const{left:a}=S.data;return(null==(e=a.icons)?void 0:e.show)&&((null==(t=a.icons)?void 0:t.width)||100)||0})),B=t((()=>{var e,t;const{top:a,grid:l}=S.data,u=(null==(t=null==(e=a.date.list)?void 0:e.slice)?void 0:t.call(e,0,l.mainXCell))||[],i=a.xScalevalue.times;let r=k.value-z.value;const n=a.date.startDate||v(new Date,"yyyy-MM-dd");return u.reduce(((e,t,a)=>0===a?e.concat(n):e.concat(v(c(new Date(n.replace(/-/g,"/")),a),"yyyy-MM-dd"))),[]).map((e=>i.map((t=>{r+=z.value;const a=Date.parse(`${e} ${t.start}`),l=Date.parse(`${e} ${t.end}`);return{start:a,end:l,left:r,center:r+z.value/2,scaleCell:(l-a)/z.value}})))).flat()})),E=t((()=>ie("breathe"))),F=t((()=>ie("pulse"))),J=t((()=>ie("temperature"))),K=t((()=>ie("pain"))),Q=t((()=>{var e;return(null==(e=S.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),U=t((()=>{const{left:e}=S.data;return e.yScaleValue.map((e=>e.dataList.filter((e=>e.show)).map(((t,a)=>({...t,bigType:s(t.title,e.type),unit:e.unit,dataIndex:a}))))).flat()})),Z=t((()=>{const{left:e}=S.data;return e.yScaleValue.findIndex((e=>"pain"===e.type))})),_=t((()=>{const{grid:e}=S.data;return-1===Z.value?0:T.value*e.subYCell})),ee=t((()=>{const{left:e}=S.data,t={originY:G.value,endY:G.value};return 0===Z.value&&e.yScaleValue.length>1?(t.originY=q.value,t.endY=q.value+_.value):Z.value===e.yScaleValue.length-1&&(t.originY=G.value-_.value,t.endY=G.value),t})),te=t((()=>{const{left:e}=S.data,t={originY:R.value,endY:G.value};return 0===Z.value&&e.yScaleValue.length>1?(t.originY=q.value+_.value,t.endY=G.value):Z.value===e.yScaleValue.length-1&&(t.originY=q.value,t.endY=G.value-_.value),t})),ae=t((()=>{var e,t;const{top:a,grid:l}=S.data,u=[];for(const i in a)a[i].show&&u.push({...a[i],list:(null==(t=null==(e=a[i].list)?void 0:e.slice)?void 0:t.call(e,0,l.mainXCell))||[],key:i});return u.sort(((e,t)=>e.seq-t.seq))})),le=t((()=>{var e;const{left:t,right:a}=S.data,l=t.yScaleValue.find((e=>"temperature"===e.type)),u=(null==a?void 0:a.yScaleValue)||{};return(null==(e=null==l?void 0:l.list)?void 0:e.length)&&Object.assign(u,{list:l.list.map((e=>d(1.8*e+32))),spaceGridNumber:l.spaceGridNumber}),u})),ue=a({canvasWidth:S.data.width,canvasHeight:S.data.height,borderStyle:{...i,...S.data.borderStyle||{}},selectionStyle:S.data.selectionStyle||{},dateHeight:H.value,hospitalDaysHeight:L.value,operationDaysHeight:I.value,xScalevalueHeight:M.value,topList:ae.value,breathingHeight:N.value,hospitalizationDate:S.data.hospitalizationDate,grid:S.data.grid,top:S.data.top,left:S.data.left,right:S.data.right,bottom:S.data.bottom,other:S.data.other,painIndex:Z.value,painHeight:_.value,painOriginY:ee.value,vitalSignsOriginY:te.value,gridXNumber:P.value,gridYNumber:O.value,iconsWidth:A.value,originX:k.value,originY:R.value,originYLimit:q.value,endX:W.value,endXLimit:$.value,endY:G.value,xCellWidth:z.value,yCellHeight:T.value,xScaleList:B.value,breatheYCell:E.value,pulseYCell:F.value,temperatureYCell:J.value,painYCell:K.value,event:Q.value,itemList:U.value,getRightInfo:le.value,config:S.data.config||{}});function ie(e){const{yScaleValue:t}=S.data.left,a=t.find((t=>t.type===e)),l=(null==a?void 0:a.list)||[];return l.length?T.value/((l[1]-l[0])/a.spaceGridNumber):0}const{cumputedX:re,cumputedY:ne,getXValue:oe,getYValue:se}=r(ue);return l((()=>{u((()=>{h(Y,ue);const{setPopup:e,isAddPoint:t,updateData:a,redrawPoints:l,clickMenu:u}=m(Y,ue,b,re,ne,oe,se,S.addRenderItem,C,x);V.value=l,X.value=u;const{drawScaleValue:i}=p(Y,ue,b,e,C,re,ne,oe,se,t,a);g(Y,ue,i),f(Y,ue),y(Y,ue,re),n(w.value);const{select:r}=o(Y,ue,b);j.value=r}))})),{propItems:ue,redrawPoints:V,select:j,clickMenu:X}}export{Y as useTemperatureChart};
@@ -1 +1 @@
1
- import{format as n}from"date-fns";import{getTime as t,getFloorNumber as e}from"../utils/index.js";function i(i){const{xScaleList:r,xCellWidth:u,left:l,vitalSignsOriginY:c,painOriginY:o,canvasWidth:d}=i;return{cumputedX:function(n,e=!1){const i=t(n),[u]=r,l=r.at(-1);if(i<u.start)return 0;if(i>l.end)return d;const c=r.findIndex((n=>n.end>=i));if(c>-1){return r[c].center}},cumputedY:function(n,t,e){const r=i[`${n}YCell`],u=+e-Math.min(...t);return("pain"===n?o.endY:c.endY)-r*u},getXValue:function(t){const e=r.findIndex((n=>n.left+u>=t));if(e>-1){const i=r[e],u=t-i.left,l=i.scaleCell*u,c=i.start+l;return n(new Date(c),"yyyy-MM-dd HH:mm")}},getYValue:function(n,t){var r;const u=i[`${n}YCell`],d=(null==(r=l.yScaleValue.find((t=>t.type===n)))?void 0:r.list)||[],a=d.length?Math.min(...d):0,f="pain"===n?o.endY:c.endY;return e((f-t)/u+a)}}}function r(i){const{xAxis:r,originX:u,originY:l,xCellWidth:c,endY:o,timeXCell:d,startTime:a,scaleValues:f}=i;return{cumputedX:function(n){return(t(n)-a)/d+u},cumputedY:function(n,t,e){const[r]=t;return o-(+e-r)/i[`${n}YCell`]},getXValue:function(t){return n(new Date((t-u)*d+a),"yyyy-MM-dd HH:mm")},getYValue:function(n,t){const r=f.find((t=>n===t.key)),[u]=(null==r?void 0:r.range)||[0],l=(o-t)*i[`${n}YCell`]+u;return e(l)}}}export{r as useBirthProcessCumputedPoint,i as useCumputedPoint};
1
+ import{format as n}from"date-fns";import{getTime as t,getFloorNumber as e}from"../utils/index.js";function i(i){const{xScaleList:u,xCellWidth:r,left:l,vitalSignsOriginY:c,painOriginY:d,canvasWidth:o}=i;return{cumputedX:function(n,e=!1){const i=t(n),[r]=u,l=u.at(-1);if(i<r.start)return 0;if(i>l.end)return o;const c=u.findIndex((n=>n.end>=i));if(c>-1){return u[c].center}},cumputedY:function(n,t,e){const u=i[`${n}YCell`],r=+e-Math.min(...t);return("pain"===n?d.endY:c.endY)-u*r},getXValue:function(t){const e=u.findIndex((n=>n.left+r>=t));if(e>-1){const i=u[e],r=t-i.left,l=i.scaleCell*r,c=i.start+l;return n(new Date(c),"yyyy-MM-dd HH:mm")}},getYValue:function(n,t){var u;const r=i[`${n}YCell`],o=(null==(u=l.yScaleValue.find((t=>t.type===n)))?void 0:u.list)||[],a=o.length?Math.min(...o):0,s="pain"===n?d.endY:c.endY;return e((s-t)/r+a)}}}function u(i){const{xAxis:u,originX:r,originY:l,xCellWidth:c,endY:d,timeXCell:o,startTime:a,scaleValues:s}=i;return{cumputedX:function(n){return(t(n)-a)/o+r},cumputedY:function(n,t,e){const[u]=t;return d-(+e-u)*i[`${n}YCell`]},getXValue:function(t){return n(new Date((t-r)*o+a),"yyyy-MM-dd HH:mm")},getYValue:function(n,t){const u=s.find((t=>[t.key,t.type||""].includes(n))),[r]=(null==u?void 0:u.range)||[0],l=(d-t)/i[`${n}YCell`]+r;return e(l)}}}export{u as useBirthProcessCumputedPoint,i as useCumputedPoint};
@@ -163,5 +163,16 @@ export interface IBirthProcessData {
163
163
  scaleValues: AnyObject[];
164
164
  }
165
165
  export declare type IObject = fabric.Object & AnyObject;
166
- export declare type IFabricChartMainParam = [Ref<fabric.Canvas>, any, any, Ref<any>];
166
+ export declare type IPointTipProps = {
167
+ show: boolean;
168
+ point: ICoordinateValue;
169
+ list: Array<string>;
170
+ };
171
+ export declare type IPointMenuProps = {
172
+ show: boolean;
173
+ point: ICoordinateValue;
174
+ list: Array<any>;
175
+ target: any;
176
+ };
177
+ export declare type IFabricChartMainParam = [Ref<fabric.Canvas>, any, any, Ref<any>, IPointTipProps, IPointMenuProps];
167
178
  export {};
@@ -1 +1 @@
1
- import e from"./grid/index.js";export{default as CGrid}from"./grid/index.js";import r from"./big-table/index.js";export{default as CBigTable}from"./big-table/index.js";import o from"./field-set/index.js";export{default as CFieldSet}from"./field-set/index.js";import t from"./button-print/index.js";export{default as CButtonPrint}from"./button-print/index.js";import s from"./select-person/index.js";export{default as CSelectPerson}from"./select-person/index.js";import i,{CLabelFormContent as a}from"./select-label/index.js";export{CLabelFormContent,default as CSelectLabel}from"./select-label/index.js";import n from"./iho-select-label/index.js";export{CIhoLabelFormContent,default as CIhoSelectLabel}from"./iho-select-label/index.js";import d from"./map/index.js";export{default as CMap}from"./map/index.js";import m from"./vod-chunk-upload/index.js";export{default as CVodChunkUpload}from"./vod-chunk-upload/index.js";import{CScaleView as f,CRadio as l,CCheckbox as p,CSelect as c,CDatetime as u}from"./scale-view/index.js";export{CCheckbox,CDatetime,CRadio,CScaleView,CSelect}from"./scale-view/index.js";import x from"./info-header/index.js";export{default as CInfoHeader}from"./info-header/index.js";import C from"./time-line/index.js";export{default as CTimeLine}from"./time-line/index.js";import j from"./base-search/index.js";export{default as CBaseSearch}from"./base-search/index.js";import h from"./quick-search/index.js";export{default as CQuickSearch}from"./quick-search/index.js";import b from"./classification/index.js";export{default as CClassification}from"./classification/index.js";import k from"./bpmn-workflow/index.js";export{default as CBpmnWorkflow}from"./bpmn-workflow/index.js";import g from"./steps-wheel/index.js";export{default as CStepsWheel}from"./steps-wheel/index.js";import S from"./editor/index.js";export{default as CEditor}from"./editor/index.js";import F from"./form-render/index.js";export{default as CFormRender}from"./form-render/index.js";import P from"./fabric-chart/index.js";export{default as CFabricChart}from"./fabric-chart/index.js";import y from"./shortcut-provider/index.js";export{default as CShortcutProvider}from"./shortcut-provider/index.js";import v from"./shortcut-setter/index.js";export{default as CShortcutSetter}from"./shortcut-setter/index.js";import I from"./form-config/index.js";export{default as CFormConfig}from"./form-config/index.js";import B from"./iho-table/index.js";export{default as CIhoTable,useIhoTablePresetPlugins}from"./iho-table/index.js";import A from"./keyboard/index.js";export{default as CKeyboard}from"./keyboard/index.js";import L from"./search-cascader/index.js";export{default as CSearchCascader}from"./search-cascader/index.js";import T from"./recommend-search/index.js";export{default as CRecommendSearch}from"./recommend-search/index.js";import w from"./date-picker/index.js";export{default as CDatePicker}from"./date-picker/index.js";import D from"./time-picker/index.js";export{default as CTimePicker}from"./time-picker/index.js";import R from"./config-provider/index.js";export{default as CConfigProvider}from"./config-provider/index.js";import V from"./picture-clipper/index.js";export{default as CPictureClipper}from"./picture-clipper/index.js";import E from"./table-export-field/index.js";export{default as CTableExportField}from"./table-export-field/index.js";import M from"./multi-chat/index.js";export{default as CMultiChat}from"./multi-chat/index.js";export{Insurance}from"./insurance-sdk/src/utils/insurance.js";export{useGuide}from"./guide/src/useGuide.js";export{useFieldListAdaptor}from"./form-render/src/hooks/useFieldListAdaptor.js";export{useFormRequest}from"./form-render/src/hooks/useFormRequest.js";export{useCommonLog}from"./form-render/src/hooks/useCommonLog.js";export{useFormField}from"./form-render/src/hooks/useFormField.js";export{useFormAsyncQueue}from"./form-render/src/hooks/useFormAsyncQueue.js";export{useFieldVisitor}from"./form-render/src/hooks/useFieldVisitor.js";export{useFieldNormalize}from"./form-render/src/hooks/useFieldNormalize.js";export{useFormValidator,validateMessageLocale}from"./form-render/src/hooks/useFormValidator.js";export{BusinessCollector,useBusinessBinding}from"./form-render/src/hooks/useBusinessBinding.js";export{ContextCollector,useChangeContext}from"./form-render/src/hooks/useChangeContext.js";export{FormItemDepsCollector,useFormItemDeps}from"./form-render/src/hooks/useFormItemDeps.js";export{useAnchor}from"./form-render/src/hooks/useAnchor.js";export{useFormContext}from"./form-render/src/hooks/useFormContext.js";export{useCommonInjection,useSelectOptionProps}from"./form-render/src/hooks/useCommonInjection.js";export{searchContentMatcher,useAutographOptions,useRecommendOptions,useUrlConfigOptions}from"./form-render/src/hooks/useFormRenderOptions.js";export{businessDateParser,isIdCard,isMobile,parseAge2Birthday,parseAgeFromContext,parseBirthday,parseIdCard,transformDateFormat}from"./form-render/src/utils/business.js";export{findNextWidget,queryDecoratorByAddress,queryDecoratorByFieldKey,queryInput}from"./form-render/src/utils/dom.js";export{assignClearBindVisited,assignUpdateValue,assignValueBindKey,createLinebarId,createObjSchema,createVisitedSetter,dotEscape,fieldKeyEscape,getParentLinebar,traverseDependKey,traverseSchema}from"./form-render/src/utils/schema.js";export{combineExtendKey,createInputSlot,createSlot,createUrlConfigParams,formRenderLog,injectOrProvide,isNestedFieldType,isNestedType,keywordMatcher,mergeDeepProperties,parseNumberFromMaybeString,presetRequestHandler,splitExtendKey,validateMessageParser}from"./form-render/src/utils/index.js";export*from"@formily/core";export{GlobalShortcutProvider,ShortcutManager,useShortcuts}from"./shortcut-provider/src/hooks/useShortcuts.js";export{useShortcutSignature}from"./shortcut-provider/src/hooks/useShortcutSignature.js";export{defineTablePlugin,useTablePlugin}from"./iho-table/src/hooks/useTablePlugin.js";export{useColumnConfigAdaptor}from"./iho-table/src/hooks/useColumnConfigAdaptor.js";export{AbstractConfigHooks,AbstractDataHooks,AbstractDomInsertHooks,AbstractEventHooks,AbstractExposeHooks,AbstractFieldHooks,AbstractSetupHooks}from"./iho-table/src/types/pluginType.js";export{Print}from"./button-print/src/utils/print.js";export{getFileUrl,isIReport,useBrowserPrint}from"./button-print/src/utils/browserPrint.js";const H={CGrid:e,CBigTable:r,CFieldSet:o,CButtonPrint:t,CSelectPerson:s,CSelectLabel:i,CLabelFormContent:a,CIhoSelectLabel:n,CScaleView:f,CMap:d,CVodChunkUpload:m,CRadio:l,CCheckbox:p,CSelect:c,CDatetime:u,CInfoHeader:x,CTimeLine:C,CBaseSearch:j,CQuickSearch:h,CClassification:b,CBpmnWorkflow:k,CStepsWheel:g,CEditor:S,CFormRender:F,CFabricChart:P,CShortcutProvider:y,CShortcutSetter:v,CFormConfig:I,CIhoTable:B,CKeyboard:A,CSearchCascader:L,CRecommendSearch:T,CDatePicker:w,CTimePicker:D,CConfigProvider:R,CPictureClipper:V,CTableExportField:E,CMultiChat:M};var q={install:function(e){Object.values(H).forEach((r=>{r.install(e)}))},...H};export{q as default};
1
+ import e from"./grid/index.js";export{default as CGrid}from"./grid/index.js";import r from"./big-table/index.js";export{default as CBigTable}from"./big-table/index.js";import o from"./field-set/index.js";export{default as CFieldSet}from"./field-set/index.js";import t from"./button-print/index.js";export{default as CButtonPrint}from"./button-print/index.js";import s from"./select-person/index.js";export{default as CSelectPerson}from"./select-person/index.js";import i,{CLabelFormContent as a}from"./select-label/index.js";export{CLabelFormContent,default as CSelectLabel}from"./select-label/index.js";import d from"./iho-select-label/index.js";export{CIhoLabelFormContent,default as CIhoSelectLabel}from"./iho-select-label/index.js";import m from"./map/index.js";export{default as CMap}from"./map/index.js";import n from"./vod-chunk-upload/index.js";export{default as CVodChunkUpload}from"./vod-chunk-upload/index.js";import{CScaleView as f,CRadio as p,CCheckbox as l,CSelect as c,CDatetime as u}from"./scale-view/index.js";export{CCheckbox,CDatetime,CRadio,CScaleView,CSelect}from"./scale-view/index.js";import x from"./info-header/index.js";export{default as CInfoHeader}from"./info-header/index.js";import C from"./time-line/index.js";export{default as CTimeLine}from"./time-line/index.js";import h from"./base-search/index.js";export{default as CBaseSearch}from"./base-search/index.js";import j from"./quick-search/index.js";export{default as CQuickSearch}from"./quick-search/index.js";import b from"./classification/index.js";export{default as CClassification}from"./classification/index.js";import k from"./bpmn-workflow/index.js";export{default as CBpmnWorkflow}from"./bpmn-workflow/index.js";import g from"./steps-wheel/index.js";export{default as CStepsWheel}from"./steps-wheel/index.js";import S from"./editor/index.js";export{default as CEditor}from"./editor/index.js";import F from"./form-render/index.js";export{default as CFormRender}from"./form-render/index.js";import P from"./fabric-chart/index.js";export{default as CFabricChart}from"./fabric-chart/index.js";import y from"./shortcut-provider/index.js";export{default as CShortcutProvider}from"./shortcut-provider/index.js";import v from"./shortcut-setter/index.js";export{default as CShortcutSetter}from"./shortcut-setter/index.js";import B from"./form-config/index.js";export{default as CFormConfig}from"./form-config/index.js";import I from"./iho-table/index.js";export{default as CIhoTable,useIhoTablePresetPlugins}from"./iho-table/index.js";import A from"./keyboard/index.js";export{default as CKeyboard}from"./keyboard/index.js";import L from"./search-cascader/index.js";export{default as CSearchCascader}from"./search-cascader/index.js";import T from"./recommend-search/index.js";export{default as CRecommendSearch}from"./recommend-search/index.js";import w from"./date-picker/index.js";export{default as CDatePicker}from"./date-picker/index.js";import D from"./time-picker/index.js";export{default as CTimePicker}from"./time-picker/index.js";import R from"./config-provider/index.js";export{default as CConfigProvider}from"./config-provider/index.js";import V from"./picture-clipper/index.js";export{default as CPictureClipper}from"./picture-clipper/index.js";import E from"./table-export-field/index.js";export{default as CTableExportField}from"./table-export-field/index.js";import M from"./multi-chat/index.js";export{default as CMultiChat}from"./multi-chat/index.js";import"../shared/utils/index.js";import"lodash-es";import"axios";export{useGuide}from"./guide/src/useGuide.js";export{useFieldListAdaptor}from"./form-render/src/hooks/useFieldListAdaptor.js";export{useFormRequest}from"./form-render/src/hooks/useFormRequest.js";export{useCommonLog}from"./form-render/src/hooks/useCommonLog.js";export{useFormField}from"./form-render/src/hooks/useFormField.js";export{useFormAsyncQueue}from"./form-render/src/hooks/useFormAsyncQueue.js";export{useFieldVisitor}from"./form-render/src/hooks/useFieldVisitor.js";export{useFieldNormalize}from"./form-render/src/hooks/useFieldNormalize.js";export{useFormValidator,validateMessageLocale}from"./form-render/src/hooks/useFormValidator.js";export{BusinessCollector,useBusinessBinding}from"./form-render/src/hooks/useBusinessBinding.js";export{ContextCollector,useChangeContext}from"./form-render/src/hooks/useChangeContext.js";export{FormItemDepsCollector,useFormItemDeps}from"./form-render/src/hooks/useFormItemDeps.js";export{useAnchor}from"./form-render/src/hooks/useAnchor.js";export{useFormContext}from"./form-render/src/hooks/useFormContext.js";export{useCommonInjection,useSelectOptionProps}from"./form-render/src/hooks/useCommonInjection.js";export{searchContentMatcher,useAutographOptions,useRecommendOptions,useUrlConfigOptions}from"./form-render/src/hooks/useFormRenderOptions.js";export{businessDateParser,isIdCard,isMobile,parseAge2Birthday,parseAgeFromContext,parseBirthday,parseIdCard,transformDateFormat}from"./form-render/src/utils/business.js";export{findNextWidget,queryDecoratorByAddress,queryDecoratorByFieldKey,queryInput}from"./form-render/src/utils/dom.js";export{assignClearBindVisited,assignUpdateValue,assignValueBindKey,createLinebarId,createObjSchema,createVisitedSetter,dotEscape,fieldKeyEscape,getParentLinebar,traverseDependKey,traverseSchema}from"./form-render/src/utils/schema.js";export{combineExtendKey,createInputSlot,createSlot,createUrlConfigParams,formRenderLog,injectOrProvide,isNestedFieldType,isNestedType,keywordMatcher,mergeDeepProperties,parseNumberFromMaybeString,presetRequestHandler,splitExtendKey,validateMessageParser}from"./form-render/src/utils/index.js";export*from"@formily/core";export{GlobalShortcutProvider,ShortcutManager,useShortcuts}from"./shortcut-provider/src/hooks/useShortcuts.js";export{useShortcutSignature}from"./shortcut-provider/src/hooks/useShortcutSignature.js";export{defineTablePlugin,useTablePlugin}from"./iho-table/src/hooks/useTablePlugin.js";export{useColumnConfigAdaptor}from"./iho-table/src/hooks/useColumnConfigAdaptor.js";export{AbstractConfigHooks,AbstractDataHooks,AbstractDomInsertHooks,AbstractEventHooks,AbstractExposeHooks,AbstractFieldHooks,AbstractSetupHooks}from"./iho-table/src/types/pluginType.js";export{Print}from"./button-print/src/utils/print.js";export{getFileUrl,isIReport,useBrowserPrint}from"./button-print/src/utils/browserPrint.js";const H={CGrid:e,CBigTable:r,CFieldSet:o,CButtonPrint:t,CSelectPerson:s,CSelectLabel:i,CLabelFormContent:a,CIhoSelectLabel:d,CScaleView:f,CMap:m,CVodChunkUpload:n,CRadio:p,CCheckbox:l,CSelect:c,CDatetime:u,CInfoHeader:x,CTimeLine:C,CBaseSearch:h,CQuickSearch:j,CClassification:b,CBpmnWorkflow:k,CStepsWheel:g,CEditor:S,CFormRender:F,CFabricChart:P,CShortcutProvider:y,CShortcutSetter:v,CFormConfig:B,CIhoTable:I,CKeyboard:A,CSearchCascader:L,CRecommendSearch:T,CDatePicker:w,CTimePicker:D,CConfigProvider:R,CPictureClipper:V,CTableExportField:E,CMultiChat:M};var q={install:function(e){Object.values(H).forEach((r=>{r.install(e)}))},...H};export{q as default};
@@ -1 +1,2 @@
1
- export * from './src/utils';
1
+ import Insurance from './src/insurance';
2
+ export default Insurance;
@@ -1 +1 @@
1
- export{Insurance}from"./src/utils/insurance.js";
1
+ import r from"./src/insurance.js";export{default}from"./src/insurance.js";