cnhis-design-vue 3.2.7-beta.17 → 3.2.7-beta.18

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 (72) hide show
  1. package/README.md +87 -87
  2. package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -0
  3. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  4. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
  5. package/es/components/field-set/src/FieldColor.vue.d.ts +2 -2
  6. package/es/components/field-set/src/FieldFilter.vue.d.ts +2 -2
  7. package/es/components/field-set/src/FieldSet.vue.d.ts +4 -4
  8. package/es/components/field-set/src/components/Row.vue.d.ts +2 -2
  9. package/es/components/form-config/index.d.ts +3 -0
  10. package/es/components/form-config/src/FormConfig.vue.d.ts +3 -0
  11. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +3 -0
  12. package/es/components/form-render/src/components/renderer/formItem.js +1 -1
  13. package/es/components/form-render/src/components/tooltipMessage.vue2.js +1 -1
  14. package/es/components/form-render/src/types/fieldItem.d.ts +1 -0
  15. package/es/components/iho-chat/index.d.ts +33 -6
  16. package/es/components/iho-chat/src/Index.vue.d.ts +33 -6
  17. package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +1 -1
  18. package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
  19. package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +5 -2
  20. package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
  21. package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
  22. package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +14 -2
  23. package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +1 -1
  24. package/es/components/iho-chat/src/components/Video.vue.d.ts +14 -2
  25. package/es/components/iho-chat/src/components/Video.vue2.js +1 -1
  26. package/es/components/iho-chat/src/hooks/useState.js +1 -1
  27. package/es/components/iho-chat/src/hooks/useVideo.d.ts +11 -0
  28. package/es/components/iho-chat/src/hooks/useVideo.js +1 -1
  29. package/es/components/iho-chat/src/utils/index.js +1 -1
  30. package/es/components/iho-chat/style/index.css +1 -1
  31. package/es/components/index.css +1 -1
  32. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  33. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  34. package/es/components/shortcut-setter/index.d.ts +1 -0
  35. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -0
  36. package/es/env.d.ts +25 -25
  37. package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
  38. package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
  39. package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
  40. package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
  41. package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
  42. package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
  43. package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
  44. package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
  45. package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
  46. package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
  47. package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
  48. package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
  49. package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
  50. package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
  51. package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
  52. package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
  53. package/es/shared/assets/img/failure.png.js +1 -1
  54. package/es/shared/assets/img/no-permission.png.js +1 -1
  55. package/es/shared/assets/img/nodata.png.js +1 -1
  56. package/es/shared/assets/img/notfound.png.js +1 -1
  57. package/es/shared/assets/img/qr.png.js +1 -1
  58. package/es/shared/assets/img/success.png.js +1 -1
  59. package/es/shared/assets/img/table_style_2.png.js +1 -1
  60. package/es/shared/assets/img/video.png.js +1 -1
  61. package/es/shared/assets/img/video_default_cover.png.js +1 -1
  62. package/es/shared/assets/img/xb_big.png.js +1 -1
  63. package/es/shared/assets/img/xb_small.png.js +1 -1
  64. package/es/shared/package.json.js +1 -1
  65. package/package.json +2 -2
  66. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  67. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
  68. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
  69. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
  70. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
  71. package/es/shared/utils/fabricjs/index.d.ts +0 -6823
  72. package/es/shared/utils/tapable/index.d.ts +0 -139
package/README.md CHANGED
@@ -1,87 +1,87 @@
1
- # 安装
2
-
3
- ```shell
4
- npm i cnhis-design-vue@[版本号]
5
- # or
6
- yarn add cnhis-design-vue@[版本号] #推荐
7
- ```
8
-
9
- ## 1.全局引入
10
-
11
- ```typescript
12
- // main.ts
13
- import { createApp } from 'vue';
14
- import App from './App.vue';
15
- import 'cnhis-design-vue/es/packages/index.css';
16
- import cui from 'cnhis-design-vue';
17
-
18
- const app = createApp(App);
19
- app.use(cui).mount('#app');
20
- ```
21
-
22
- ## 2. 按需引入
23
-
24
- 组件现在支持了自动按需引入, 但是样式文件需要额外的处理
25
-
26
- ### 2.1 样式处理方式1 (按需引入样式)
27
-
28
- ```shell
29
- # 安装自动导入样式的插件
30
- npm i -d vite-plugin-style-import
31
- ```
32
-
33
- ```typescript
34
- // vite.config.ts
35
- import { defineConfig } from 'vite';
36
- import { createStyleImportPlugin } from 'vite-plugin-style-import';
37
-
38
- export default defineConfig({
39
- plugins: [
40
- // ...otherPlugins
41
- createStyleImportPlugin({
42
- libs: [
43
- {
44
- libraryName: 'cnhis-design-vue',
45
- esModule: true,
46
- ensureStyleFile: true,
47
- resolveStyle: name => {
48
- return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
49
- }
50
- }
51
- ]
52
- })
53
- ]
54
- });
55
- ```
56
-
57
- ### 2.2 样式处理方式2 (全局引入样式)
58
-
59
- ```typescript
60
- // main.ts
61
- import 'cnhis-design-vue/es/components/index.css';
62
- ```
63
-
64
- ## 3.FAQ
65
-
66
- ### 3.1 项目打包后样式丢失
67
-
68
- 处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
69
-
70
- ```typescript
71
- // vite.config.ts
72
- import { defineConfig } from 'vite';
73
-
74
- export default defineConfig({
75
- build: {
76
- rollupOptions: {
77
- // ..otherOptions
78
- output: {
79
- dir: './dist',
80
- manualChunks: {
81
- 'cnhis-vendor': ['cnhis-design-vue']
82
- }
83
- }
84
- }
85
- }
86
- });
87
- ```
1
+ # 安装
2
+
3
+ ```shell
4
+ npm i cnhis-design-vue@[版本号]
5
+ # or
6
+ yarn add cnhis-design-vue@[版本号] #推荐
7
+ ```
8
+
9
+ ## 1.全局引入
10
+
11
+ ```typescript
12
+ // main.ts
13
+ import { createApp } from 'vue';
14
+ import App from './App.vue';
15
+ import 'cnhis-design-vue/es/packages/index.css';
16
+ import cui from 'cnhis-design-vue';
17
+
18
+ const app = createApp(App);
19
+ app.use(cui).mount('#app');
20
+ ```
21
+
22
+ ## 2. 按需引入
23
+
24
+ 组件现在支持了自动按需引入, 但是样式文件需要额外的处理
25
+
26
+ ### 2.1 样式处理方式1 (按需引入样式)
27
+
28
+ ```shell
29
+ # 安装自动导入样式的插件
30
+ npm i -d vite-plugin-style-import
31
+ ```
32
+
33
+ ```typescript
34
+ // vite.config.ts
35
+ import { defineConfig } from 'vite';
36
+ import { createStyleImportPlugin } from 'vite-plugin-style-import';
37
+
38
+ export default defineConfig({
39
+ plugins: [
40
+ // ...otherPlugins
41
+ createStyleImportPlugin({
42
+ libs: [
43
+ {
44
+ libraryName: 'cnhis-design-vue',
45
+ esModule: true,
46
+ ensureStyleFile: true,
47
+ resolveStyle: name => {
48
+ return `cnhis-design-vue/es/components/${ name.slice(2) }/style/index.css`;
49
+ }
50
+ }
51
+ ]
52
+ })
53
+ ]
54
+ });
55
+ ```
56
+
57
+ ### 2.2 样式处理方式2 (全局引入样式)
58
+
59
+ ```typescript
60
+ // main.ts
61
+ import 'cnhis-design-vue/es/components/index.css';
62
+ ```
63
+
64
+ ## 3.FAQ
65
+
66
+ ### 3.1 项目打包后样式丢失
67
+
68
+ 处理方法, 将 cnhis-design-vue 从 vendor 包中移除 (没有出现此问题则不需要)
69
+
70
+ ```typescript
71
+ // vite.config.ts
72
+ import { defineConfig } from 'vite';
73
+
74
+ export default defineConfig({
75
+ build: {
76
+ rollupOptions: {
77
+ // ..otherOptions
78
+ output: {
79
+ dir: './dist',
80
+ manualChunks: {
81
+ 'cnhis-vendor': ['cnhis-design-vue']
82
+ }
83
+ }
84
+ }
85
+ }
86
+ });
87
+ ```
@@ -175,6 +175,9 @@ declare const _default: import("vue").DefineComponent<{
175
175
  modelValue: unknown[];
176
176
  componentData: Record<string, any>;
177
177
  } & {
178
+ /**
179
+ * 改变弹窗大小
180
+ */
178
181
  itemKey?: string | Function | undefined;
179
182
  }>, {
180
183
  move: Function;
@@ -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{format as u}from"date-fns";import{getType as a,getTime as c,isOneLine as d,isOverlapPoint as p,getFloorNumber as f,isValidValue as h,setOtherType as v,isEffectiveNode as g,deleteProperty as y,getIndex as m}from"../../utils/index.js";import{cloneDeep as x,flatten as b,last as j}from"lodash-es";import"../useEvent.js";import{useCommon as w}from"../useCommon.js";import"vue";import"naive-ui";import"@vueuse/core";import{TEMPERATURE_MENU as k,PAIN_MENU as L,OVERLAP as S}from"../../constants/index.js";import{promiseTimeout as Y}from"@vueuse/shared";function E(E,$,O,T,V,C,P,A,R,I){r(E,$);const{getEqualXTypes:X,handleAddPrevent:D,getPointEventProps:H}=w(E,O,$),{createShadowLines:z}=t(),{left:F,xScaleList:_,xCellWidth:W,yCellHeight:q,originX:G,endX:N,originY:B,endY:J,itemList:K,event:Q,vitalSignsOriginY:U,painOriginY:Z,hospitalizationDate:ee,config:te,canvasHeight:ie,painSurplusCell:ne}=$,oe=new Set,le=["xinmai","mai"],se=new Map,re=new Set,ue=new Set,ae=new Set,ce=x(F.yScaleValue),de=new Set;function pe(t){var o;const l=ce.find((e=>"pulse"===e.type));if(l&&(null==(o=l.dataList)?void 0:o.length)&&(oe.size&&E.value.remove(...oe),oe.clear(),se.size>1)){if(t){const{type:e,key:i}=t.origin||{};if("pulse"===e){const e=se.get(i),n=null==e?void 0:e.findIndex((e=>e[0]===t.left));e.splice(n,1,[t.left,t.top])}}const o=function(){const e=[],t=[],i=[];for(const e of se)t.push(e[1]),e[0]===le[0]&&e[1].forEach((e=>{(se.get(le[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)),u=n[i],a=o[r],c=n[i-1],d=n[i+1],p=o[r-1],f=o[r+1];if(c&&p){if(c[0]!==p[0]){const e=Math.max(c[0],p[0]);l.push([c,p].find((t=>t[0]===e)))}}else c?l.push(c):p&&s.push(p);const h=Math.min(u[1],a[1]);l.push([u,a].find((e=>e[1]===h)));const v=Math.max(u[1],a[1]);s.push([u,a].find((e=>e[1]===v)));const g=()=>{const t=[...l,...s.reverse()],[i]=t,n=j(t);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}();o.length>0&&function(e){Y(0).then((()=>{e.forEach((e=>{const t=[],i=[];Array.from(ae).forEach((n=>{var o,l;"pulse"===(null==(o=null==n?void 0:n.origin)?void 0:o.type)&&e.find((e=>Math.abs(n.left-e[0])<=1&&Math.abs(n.top-e[1])<=1))&&((null==(l=null==n?void 0:n.origin)?void 0:l.key)===le[0]?t.push(n):i.push(n))})),[t,i].forEach((e=>{1!==(null==e?void 0:e.length)&&e.sort(((e,t)=>e.left-t.left)).forEach(((e,t)=>{t>0&&e.leftLine&&E.value.remove(e.leftLine)}))}))}))}))}(o);const{mode:s,style:r={}}=l.shadow||{};o.forEach((t=>{const o=t.map((e=>({x:e[0],y:e[1]}))),l=new e.Polygon(o,{...n,...r,strokeWidth:1});if(["slash","line"].includes(s)){l.set({fill:"transparent",stroke:r.stroke||"#f00"});const e=[];if(["slash"].includes(s))e.push(...z(t,r._angle,r.space)),e.forEach((e=>{Object.assign(e,{...n,...r}),oe.add(e)}));else{const n=function(e){const t=e.reduce(((e,t)=>{const i=Math.trunc(t[0]);return e[i]=e[i]?e[i].concat([t]):[t],e}),{}),i=Object.values(t).filter((e=>2===e.length&&Math.trunc(e[0][1])!==Math.trunc(e[1][1])));return i}(t);n.forEach((t=>{const n=i([...b(t)],{...r,originX:"center"});e.push(n),oe.add(n)}))}E.value.add(...e)}oe.add(l),E.value.add(l)}))}}function fe(e,t,r){var u;const{type:a,riseStyle:c={},noRiseStyle:p={},verifiedStyle:g={},reduceStyle:y={},pacemaker:m={},upArrowStyle:x={},limitValueStyle:b={},nonePainPointStyle:j={},belowMinValueStyle:w={},respiratorStyle:k={},dataList:L=[],list:S=[]}=r,{type:Y,textStyle:$,showConnectLine:C=!1}=j,A=[],I=[],X=[];let D=null;const z=e=>"breathe"==a&&e.respirator&&k.type&&k.fixedValue&&!e.value&&ge(e.time);if(null==(u=e.list)||u.forEach(((u,j)=>{const F=d(a)?L.find((e=>e.key===u.key)):e,_=ye(z(u)?{...u,value:k.fixedValue}:u,r),G=e.list[j+1],N=G?ye(z(G)?{...G,value:k.fixedValue}:G,r):void 0,B=G?d(a)?L.find((e=>e.key===G.key)):e:{},{title:J=""}=F;if("脉搏"===J&&"脉搏"!==B.title||"脉搏"!==J&&"脉搏"===B.title||!_||!N||f(_[0],1)!==f(N[0],1))_&&D&&(_[0]=D),D=null;else{const e=_[0]-W/2;_[0]=e+W/4,N[0]=D=_[0]+W/2}const K={};K.value=function(e,t,i){if(!(null==e?void 0:e.length)||!te.showValue)return;const{lineAttr:n={}}=i,o=e[1]<=U.originY+q?e[1]+q:e[1]-q,s=l([e[0],o],{value:z(t)?k.fixedValue:t.value,originX:"center",originY:"center",fill:n.stroke||"#000"});return X.push(s),{obj:s,top:-q}}(_,u,F),function(e,t,r,u){var d,f;if(!["temperature","pain","breathe"].includes(a))return;if(!(null==e?void 0:e.length)&&"temperature"===a&&!ge(t.time))return;if(!(null==e?void 0:e.length)&&"pain"===a)return;if(!t.value&&"breathe"===a)return;const{lineAttr:v={}}=r,{value:m}=u,x=T(t.time);let b,j,w,L,Y,E;if(t.noRise&&p.show){const i=M(p,t)?V(a,S,35):(null==e?void 0:e[1])||0;if(p.text)w=l([x,M(p,t)?i:i+5],{value:p.text.split("").join("\n"),originY:"top",...p.style}),t.value||ae.add(w);else if(t.value){w=s([x,i,i+2*q],{...p.style})}w&&X.push(w),w&&M(p,t)&&de.add(w)}if(null==e?void 0:e[1]){if(t.rise&&c.show&&c.text&&(L=l([x,e[1]-(m?q:0)-5],{value:c.text.split("").join("\n"),originY:"bottom",...c.style}),X.push(L)),t.verified&&(Y=l([x,e[1]-(m?q:0)-5],{value:"v",originX:"center",originY:"bottom",...g}),X.push(Y)),h(t.physicsReduce)||h(t.drugReduce)){const l=V(a,S,null!=(d=t.physicsReduce)?d:t.drugReduce),s=l<e[1]&&(null==te?void 0:te.hypothermyViewCustom)?x+W/2:x;b=i([...e,s,l],{...v,...y.line,...n}),j=o((null==(f=null==y?void 0:y.point)?void 0:f.type)||"circle",{left:s,top:l,...y.point,...n,originY:l===ie?"bottom":"center"}),b&&X.push(b),j&&X.push(j)}t.respirator&&(E=o(k.type,{left:x,top:e[1]-(m?q:0)-5,originX:"center",originY:"bottom",...k.style}),X.push(E))}Object.assign(u,{reduceLine:{obj:b,type:"line"},noRiseText:{obj:w,top:p.text?5:2*q,isFixed:M(p,t)},riseText:{obj:L,top:(m?-q:0)-5},verifiedText:{obj:Y,top:(m?-q:0)-5},reducePoint:{obj:j,type:"reduce"},respirator:{obj:E,top:(m?-q:0)-5}})}(_,u,F,K),function(e,t,i,n){if(!(null==e?void 0:e.length)||!["pulse"].includes(a))return;const o=Math.max(...S),r=Math.min(...S);let u,c,d;const{upArrowShow:p=!1,limitValueShow:f=!1}=i;if(p&&+t.value>180){let t=e[1]-2.5*q,i=[e[1]-q/2,t];t<U.originY&&(t=e[1]+2.5*q,i=[t,e[1]+q/2]),u=s([e[0],i[0],i[1]],x,"up"),X.push(u)}if(f){const i={value:t.value,originX:"center",originY:"center",...b};if(+t.value>o){const t=u?e[1]+q/2+u.height:e[1]+q;c=l([e[0],t],i),X.push(c)}+t.value<r&&(c=l([e[0],e[1]-q],i),X.push(c))}if(w.show&&+t.value<r){const t=e[1];if(w.text)d=l([e[0],e[1]+5],{value:w.text.split("").join("\n"),originY:"top",...w.style});else{const i=t+2*q;d=s([e[0],t,i],{...w.style})}X.push(d)}Object.assign(n,{upArrow:{obj:u},limitValue:{obj:c,top:-q},belowMinValue:{obj:d,top:w.text?5:2*q,moveHide:!0}})}(_,u,F,K),function(n,l,s,u,c,d){let p,f;const{pointAttr:h={},lineAttr:g={},title:y="",key:x,type:b="circle"}=c,j=e.list[u+1],w=he(a,e.list[u].value),L=l&&he(a,j.value),S=()=>"pulse"==a&&s.pacemakerShow?m.value:z(s)?k.type:w&&"number"===Y?0:b;if(n&&l&&!s.breakpoint&&(!w&&!L||C)){f=i([...n,...l],{...g});const{obj:e}=(null==d?void 0:d.reducePoint)||{};if((null==e?void 0:e.top)<n[1]&&(null==te?void 0:te.hypothermyViewCustom)){const t=i([e.left,e.top,...l],{...g});X.unshift(t),Object.assign(d,{reduceRightLine:{obj:t,type:"reduce"}}),f.set("stroke","transparent")}}const M=S(),T=I[u-1],V={origin:{data:z(s)?{...s,value:k.fixedValue}:s,title:y,key:x||"",unit:r.unit,type:a,_type:v(y,a),dataIndex:t,index:u},leftLine:T,rightLine:f,otherObj:d,...s.pacemakerShow&&"pulse"==a?m.style:z(s)?k.style:h,lockMovementX:!0,...H(),...w?{selectable:!1,evented:!1,..."number"===Y?$:{}}:{}};n&&(T?V.leftLine.set("x2",n[0]):V.leftLine=null,p=o(M,{left:n[0],top:w&&!ne[1]?n[1]-5:n[1],...V}));I.push(f),p&&(x===le[1]?re.add(p):z(s)||ue.add(p),function(e){Q.hovered&&(e.on("mouseover",(()=>{ve(e,"hover")})),e.on("mouseout",(()=>{R.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{!function(e){e.setCoords();const t="pain"===e.origin.type?Z:U;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,moveHide:s=!1}=t||{};"reduce"!==n&&i&&("line"===n?i.setCoords().set({x1:e.left,y1:e.top}):(l||i.setCoords().set({left:e.left,top:e.top+o}),s&&(E.value.remove(i),delete e.otherObj.obj)))})),pe(e)}(e),Q.hovered&&ve(e)})),e.on("mouseup",(t=>{if(R.show=!1,1===t.button){const{type:t}=e.origin,i=P(t,e.top),n={...e.origin,data:{...e.origin.data,value:i}};E.value.discardActiveObject(),O("change",n),xe(n,"change")}}))}(p),A.push(p),ae.add(p))}(_,N,u,j,F,K)})),"pulse"===a){const{key:t}=e;let i=null;se.set(t,A.map(((e,t,n)=>{var o,l;const s=n[t+1];if(s&&f(e.left,1)===f(s.left,1)){const t=e.left-W/2;e.set("left",t+W/4),null==(o=e.rightLine)||o.set("x1",e.left),i=e.left+W/2,s.set("left",i)}else i&&(null==(l=e.leftLine)||l.set("x2",i),e.set("left",i)),i=null;return[e.left,e.top]})))}const F=I.filter((e=>e));E.value.add(...F,...A,...X)}function he(e,t){return"pain"===e&&0==t}function ve(e,t="moving"){const{title:i,unit:n,type:o,data:l}=e.origin;R.point={x:e.left,y:e.top};let s=`时间 ${((null==l?void 0:l.time)||C(e.left)).slice(-5)}`;R.list=[function(){const{drugReduce:r,physicsReduce:u}=l||{},a="hover"===t?l.value:P(o,e.top);if(h(r))return s+=(null==l?void 0:l.changeTime)?"—>"+(null==l?void 0:l.changeTime.slice(-5)):"",`药物降${"pain"==o?"痛":"温"} ${a}—>${r}${n||""}`;if(h(u))return s+=(null==l?void 0:l.changeTime)?"—>"+(null==l?void 0:l.changeTime.slice(-5)):"",`物理降${"pain"==o?"痛":"温"} ${a}—>${u}${n||""}`;return`${i} ${a}${n||""}`}(),s],R.show=!0}function ge(e){const[t]=_,i=j(_),n=t.start,o=i.end,l=c(e);return l>=n&&l<=o}function ye(e,t){const i="pain"===t.type?Z:U;if(!g(e)||!ge(e.time))return;const n=T(e.time),o=V(t.type,t.list,e.value);return[n,o<i.originY?i.originY:o>i.endY?i.endY:o]}function me(e){const t=new Date,i=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),o=c(`${t.getFullYear()}-${i}-${n} 23:59:59`),l=c(`${C(e)}:00`);return ee&&l<c(ee)?(D("exceedMin"),!1):!(l>o)||(D("exceedMax"),!1)}function xe(e,t="add"){const{type:i,dataIndex:n,index:o,data:l,key:s}=e,r=ce.find((e=>e.type===i));if("add"===t){const e=d(i)?r.dataList.find((e=>e.enable)):r.dataList[n],t=m(l.time,e.list);e.list.splice(t,0,l)}else r.dataList[n].list[o]=l;be()}function be(){var e;ae.size&&(null==(e=E.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}([...ae]))),ae.clear(),je()}function je(e){se.clear(),ae.clear(),re.clear(),de.clear(),ue.clear(),ce.forEach((t=>{null==e||e(t),t.dataList.forEach(((e,i)=>{!e.show||d(t.type)&&!e.enable||fe(e,i,t)}))})),pe(),[...ae].forEach((e=>{null==e||e.bringToFront()})),function(){var e;const t=ce.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({},S,F.overlap||{}),l=[];re.size&&[...re].forEach((e=>{[...ue].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),l.push(o(r,{...i[e],...s}))}}}))})),setTimeout((()=>{E.value.add(...l),l.forEach((e=>{null==e||e.bringToFront(),ae.add(e)}))}))}()}return je((e=>function(e){if("temperature"!==e.type||!e.positionLine)return;const t=V(e.type,e.list,e.positionLine.value),n=i([G,t,N,t],e.positionLine);E.value.add(n)}(e))),E.value.on("mouse:up",(e=>{const{button:t,target:i,pointer:n={}}=e;if(3===t){if(!$.event.evented)return;const{x:e=0,y:t=0}=n;if(e>=G&&e<=N&&t>=B&&t<=J){I.point={x:e,y:t},I.show=!0;const{type:o}=(null==i?void 0:i.origin)||{};if(i&&["temperature","pain"].includes(o))"temperature"===o&&(I.list=[...k]),"pain"===o&&(I.list=[...L]),I.target=i;else{I.target=null,I.list=["新增节点"],K.forEach((i=>{if(!X([...ae],e,"_type").includes(i.bigType)){const e=["pain"].includes(i.bigType)?Z:U;t>=e.originY&&t<=e.endY&&I.list.push({renderItem:A?A(i):()=>i.title,origin:{title:i.title,unit:i.unit,type:a(i.bigType),dataIndex:i.dataIndex,key:i.key},pointer:n})}}));const i=me(e);i&&1!==I.list.length||(I.show=!1,1===I.list.length&&i&&D("repeat"))}}}if(1===t){if(i)return;const{x:e=0,y:t=0}=n;e>=G&&e<=N&&t>0&&t<ie&&O("click:grid",{x:e,y:t,time:C(e)})}})),{clickMenu:function({item:e,target:t}){if(t){const{data:i,type:n,dataIndex:o,index:l}=t.origin,s=y(i,[...k,...L]);s[`${e.type}`]=e.value,s.changeTime=u(new Date,"yyyy-MM-dd HH:mm"),d(n)&&(s.key=t.origin.key);const r={...t.origin,data:s};O("change",r),xe(r,"change")}else{const t={data:{time:C(e.pointer.x),value:P(e.origin.type,e.pointer.y),...d(e.origin.type)?{key:e.origin.key}:{}},...e.origin};O("add",t),xe(t)}},setPopup:ve,isAddPoint:me,updateData:xe,redrawPoints:be,gridPoints:ae,fixedNoRisePoints:de}}function M(e,t){return e.fixed||!t.value&&0!==t.value}export{E 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{format as u}from"date-fns";import{getType as a,getTime as c,isOneLine as d,isOverlapPoint as p,getFloorNumber as f,isValidValue as h,setOtherType as v,isEffectiveNode as g,deleteProperty as y,getIndex as m}from"../../utils/index.js";import{cloneDeep as x,flatten as b,last as j}from"lodash-es";import"../useEvent.js";import{useCommon as w}from"../useCommon.js";import"vue";import"naive-ui";import"@vueuse/core";import{TEMPERATURE_MENU as k,PAIN_MENU as L,OVERLAP as S}from"../../constants/index.js";import{promiseTimeout as Y}from"@vueuse/shared";function E(E,$,O,T,V,C,P,R,A,I){r(E,$);const{getEqualXTypes:X,handleAddPrevent:D,getPointEventProps:H}=w(E,O,$),{createShadowLines:W}=t(),{left:z,xScaleList:F,xCellWidth:_,yCellHeight:q,originX:G,endX:N,originY:B,endY:J,itemList:K,event:Q,vitalSignsOriginY:U,painOriginY:Z,hospitalizationDate:ee,config:te,canvasHeight:ie,painSurplusCell:ne,iconsWidth:oe,canvasWidth:le,borderStyle:se}=$,re=new Set,ue=["xinmai","mai"],ae=new Map,ce=new Set,de=new Set,pe=new Set,fe=x(z.yScaleValue),he=new Set;function ve(t){var o;const l=fe.find((e=>"pulse"===e.type));if(l&&(null==(o=l.dataList)?void 0:o.length)&&(re.size&&E.value.remove(...re),re.clear(),ae.size>1)){if(t){const{type:e,key:i}=t.origin||{};if("pulse"===e){const e=ae.get(i),n=null==e?void 0:e.findIndex((e=>e[0]===t.left));e.splice(n,1,[t.left,t.top])}}const o=function(){const e=[],t=[],i=[];for(const e of ae)t.push(e[1]),e[0]===ue[0]&&e[1].forEach((e=>{(ae.get(ue[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)),u=n[i],a=o[r],c=n[i-1],d=n[i+1],p=o[r-1],f=o[r+1];if(c&&p){if(c[0]!==p[0]){const e=Math.max(c[0],p[0]);l.push([c,p].find((t=>t[0]===e)))}}else c?l.push(c):p&&s.push(p);const h=Math.min(u[1],a[1]);l.push([u,a].find((e=>e[1]===h)));const v=Math.max(u[1],a[1]);s.push([u,a].find((e=>e[1]===v)));const g=()=>{const t=[...l,...s.reverse()],[i]=t,n=j(t);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}();o.length>0&&function(e){Y(0).then((()=>{e.forEach((e=>{const t=[],i=[];Array.from(pe).forEach((n=>{var o,l;"pulse"===(null==(o=null==n?void 0:n.origin)?void 0:o.type)&&e.find((e=>Math.abs(n.left-e[0])<=1&&Math.abs(n.top-e[1])<=1))&&((null==(l=null==n?void 0:n.origin)?void 0:l.key)===ue[0]?t.push(n):i.push(n))})),[t,i].forEach((e=>{1!==(null==e?void 0:e.length)&&e.sort(((e,t)=>e.left-t.left)).forEach(((e,t)=>{t>0&&e.leftLine&&E.value.remove(e.leftLine)}))}))}))}))}(o);const{mode:s,style:r={}}=l.shadow||{};o.forEach((t=>{const o=t.map((e=>({x:e[0],y:e[1]}))),l=new e.Polygon(o,{...n,...r,strokeWidth:1});if(["slash","line"].includes(s)){l.set({fill:"transparent",stroke:r.stroke||"#f00"});const e=[];if(["slash"].includes(s))e.push(...W(t,r._angle,r.space)),e.forEach((e=>{Object.assign(e,{...n,...r}),re.add(e)}));else{const n=function(e){const t=e.reduce(((e,t)=>{const i=Math.trunc(t[0]);return e[i]=e[i]?e[i].concat([t]):[t],e}),{}),i=Object.values(t).filter((e=>2===e.length&&Math.trunc(e[0][1])!==Math.trunc(e[1][1])));return i}(t);n.forEach((t=>{const n=i([...b(t)],{...r,originX:"center"});e.push(n),re.add(n)}))}E.value.add(...e)}re.add(l),E.value.add(l)}))}}function ge(e,t,r){var u;const{type:a,riseStyle:c={},noRiseStyle:p={},verifiedStyle:g={},reduceStyle:y={},pacemaker:m={},upArrowStyle:x={},limitValueStyle:b={},nonePainPointStyle:j={},belowMinValueStyle:w={},respiratorStyle:k={},dataList:L=[],list:S=[]}=r,{type:Y,textStyle:$,showConnectLine:C=!1}=j,R=[],I=[],X=[];let D=null;const W=e=>"breathe"==a&&e.respirator&&k.type&&k.fixedValue&&!e.value&&xe(e.time);if(null==(u=e.list)||u.forEach(((u,j)=>{const z=d(a)?L.find((e=>e.key===u.key)):e,F=be(W(u)?{...u,value:k.fixedValue}:u,r),G=e.list[j+1],N=G?be(W(G)?{...G,value:k.fixedValue}:G,r):void 0,B=G?d(a)?L.find((e=>e.key===G.key)):e:{},{title:J=""}=z;if("脉搏"===J&&"脉搏"!==B.title||"脉搏"!==J&&"脉搏"===B.title||!F||!N||f(F[0],1)!==f(N[0],1))F&&D&&(F[0]=D),D=null;else{const e=F[0]-_/2;F[0]=e+_/4,N[0]=D=F[0]+_/2}const K={};K.value=function(e,t,i){if(!(null==e?void 0:e.length)||!te.showValue)return;const{lineAttr:n={}}=i,o=e[1]<=U.originY+q?e[1]+q:e[1]-q,s=l([e[0],o],{value:W(t)?k.fixedValue:t.value,originX:"center",originY:"center",fill:n.stroke||"#000"});return X.push(s),{obj:s,top:-q}}(F,u,z),function(e,t,r,u){var d,f;if(!["temperature","pain","breathe"].includes(a))return;if(!(null==e?void 0:e.length)&&"temperature"===a&&!xe(t.time))return;if(!(null==e?void 0:e.length)&&"pain"===a)return;if(!t.value&&"breathe"===a)return;const{lineAttr:v={}}=r,{value:m}=u,x=T(t.time);let b,j,w,L,Y,E;if(t.noRise&&p.show){const i=M(p,t)?V(a,S,35):(null==e?void 0:e[1])||0;if(p.text)w=l([x,M(p,t)?i:i+5],{value:p.text.split("").join("\n"),originY:"top",...p.style}),t.value||pe.add(w);else if(t.value){w=s([x,i,i+2*q],{...p.style})}w&&X.push(w),w&&M(p,t)&&he.add(w)}if(null==e?void 0:e[1]){if(t.rise&&c.show&&c.text&&(L=l([x,e[1]-(m?q:0)-5],{value:c.text.split("").join("\n"),originY:"bottom",...c.style}),X.push(L)),t.verified&&(Y=l([x,e[1]-(m?q:0)-5],{value:"v",originX:"center",originY:"bottom",...g}),X.push(Y)),h(t.physicsReduce)||h(t.drugReduce)){const l=V(a,S,null!=(d=t.physicsReduce)?d:t.drugReduce),s=l<e[1]&&(null==te?void 0:te.hypothermyViewCustom)?x+_/2:x;b=i([...e,s,l],{...v,...y.line,...n}),j=o((null==(f=null==y?void 0:y.point)?void 0:f.type)||"circle",{left:s,top:l,...y.point,...n,originY:l===ie?"bottom":"center"}),b&&X.push(b),j&&X.push(j)}t.respirator&&(E=o(k.type,{left:x,top:e[1]-(m?q:0)-5,originX:"center",originY:"bottom",...k.style}),X.push(E))}Object.assign(u,{reduceLine:{obj:b,type:"line"},noRiseText:{obj:w,top:p.text?5:2*q,isFixed:M(p,t)},riseText:{obj:L,top:(m?-q:0)-5},verifiedText:{obj:Y,top:(m?-q:0)-5},reducePoint:{obj:j,type:"reduce"},respirator:{obj:E,top:(m?-q:0)-5}})}(F,u,z,K),function(e,t,i,n){if(!(null==e?void 0:e.length)||!["pulse"].includes(a))return;const o=Math.max(...S),r=Math.min(...S);let u,c,d;const{upArrowShow:p=!1,limitValueShow:f=!1}=i;if(p&&+t.value>180){let t=e[1]-2.5*q,i=[e[1]-q/2,t];t<U.originY&&(t=e[1]+2.5*q,i=[t,e[1]+q/2]),u=s([e[0],i[0],i[1]],x,"up"),X.push(u)}if(f){const i={value:t.value,originX:"center",originY:"center",...b};if(+t.value>o){const t=u?e[1]+q/2+u.height:e[1]+q;c=l([e[0],t],i),X.push(c)}+t.value<r&&(c=l([e[0],e[1]-q],i),X.push(c))}if(w.show&&+t.value<r){const t=e[1];if(w.text)d=l([e[0],e[1]+5],{value:w.text.split("").join("\n"),originY:"top",...w.style});else{const i=t+2*q;d=s([e[0],t,i],{...w.style})}X.push(d)}Object.assign(n,{upArrow:{obj:u},limitValue:{obj:c,top:-q},belowMinValue:{obj:d,top:w.text?5:2*q,moveHide:!0}})}(F,u,z,K),function(n,l,s,u,c,d){let p,f;const{pointAttr:h={},lineAttr:g={},title:y="",key:x,type:b="circle"}=c,j=e.list[u+1],w=ye(a,e.list[u].value),L=l&&ye(a,j.value),S=()=>"pulse"==a&&s.pacemakerShow?m.value:W(s)?k.type:w&&"number"===Y?0:b;if(n&&l&&!s.breakpoint&&(!w&&!L||C)){f=i([...n,...l],{...g});const{obj:e}=(null==d?void 0:d.reducePoint)||{};if((null==e?void 0:e.top)<n[1]&&(null==te?void 0:te.hypothermyViewCustom)){const t=i([e.left,e.top,...l],{...g});X.unshift(t),Object.assign(d,{reduceRightLine:{obj:t,type:"reduce"}}),f.set("stroke","transparent")}}const M=S(),T=I[u-1],V={origin:{data:W(s)?{...s,value:k.fixedValue}:s,title:y,key:x||"",unit:r.unit,type:a,_type:v(y,a),dataIndex:t,index:u},leftLine:T,rightLine:f,otherObj:d,...s.pacemakerShow&&"pulse"==a?m.style:W(s)?k.style:h,lockMovementX:!0,...H(),...w?{selectable:!1,evented:!1,..."number"===Y?$:{}}:{}};n&&(T?V.leftLine.set("x2",n[0]):V.leftLine=null,p=o(M,{left:n[0],top:w&&!ne[1]?n[1]-5:n[1],...V}));I.push(f),p&&(x===ue[1]?ce.add(p):W(s)||de.add(p),function(e){Q.hovered&&(e.on("mouseover",(()=>{me(e,"hover")})),e.on("mouseout",(()=>{A.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{!function(e){e.setCoords();const t="pain"===e.origin.type?Z:U;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,moveHide:s=!1}=t||{};"reduce"!==n&&i&&("line"===n?i.setCoords().set({x1:e.left,y1:e.top}):(l||i.setCoords().set({left:e.left,top:e.top+o}),s&&(E.value.remove(i),delete e.otherObj.obj)))})),ve(e)}(e),Q.hovered&&me(e)})),e.on("mouseup",(t=>{if(A.show=!1,1===t.button){const{type:t}=e.origin,i=P(t,e.top),n={...e.origin,data:{...e.origin.data,value:i}};E.value.discardActiveObject(),O("change",n),we(n,"change")}}))}(p),R.push(p),pe.add(p))}(F,N,u,j,z,K)})),"pulse"===a){const{key:t}=e;let i=null;ae.set(t,R.map(((e,t,n)=>{var o,l;const s=n[t+1];if(s&&f(e.left,1)===f(s.left,1)){const t=e.left-_/2;e.set("left",t+_/4),null==(o=e.rightLine)||o.set("x1",e.left),i=e.left+_/2,s.set("left",i)}else i&&(null==(l=e.leftLine)||l.set("x2",i),e.set("left",i)),i=null;return[e.left,e.top]})))}const z=I.filter((e=>e));E.value.add(...z,...R,...X)}function ye(e,t){return"pain"===e&&0==t}function me(e,t="moving"){const{title:i,unit:n,type:o,data:l}=e.origin;A.point={x:e.left,y:e.top};let s=`时间 ${((null==l?void 0:l.time)||C(e.left)).slice(-5)}`;A.list=[function(){const{drugReduce:r,physicsReduce:u}=l||{},a="hover"===t?l.value:P(o,e.top);if(h(r))return s+=(null==l?void 0:l.changeTime)?"—>"+(null==l?void 0:l.changeTime.slice(-5)):"",`药物降${"pain"==o?"痛":"温"} ${a}—>${r}${n||""}`;if(h(u))return s+=(null==l?void 0:l.changeTime)?"—>"+(null==l?void 0:l.changeTime.slice(-5)):"",`物理降${"pain"==o?"痛":"温"} ${a}—>${u}${n||""}`;return`${i} ${a}${n||""}`}(),s],A.show=!0}function xe(e){const[t]=F,i=j(F),n=t.start,o=i.end,l=c(e);return l>=n&&l<=o}function be(e,t){const i="pain"===t.type?Z:U;if(!g(e)||!xe(e.time))return;const n=T(e.time),o=V(t.type,t.list,e.value);return[n,o<i.originY?i.originY:o>i.endY?i.endY:o]}function je(e){const t=new Date,i=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),o=c(`${t.getFullYear()}-${i}-${n} 23:59:59`),l=c(`${C(e)}:00`);return ee&&l<c(ee)?(D("exceedMin"),!1):!(l>o)||(D("exceedMax"),!1)}function we(e,t="add"){const{type:i,dataIndex:n,index:o,data:l,key:s}=e,r=fe.find((e=>e.type===i));if("add"===t){const e=d(i)?r.dataList.find((e=>e.enable)):r.dataList[n],t=m(l.time,e.list);e.list.splice(t,0,l)}else r.dataList[n].list[o]=l;ke()}function ke(){var e;pe.size&&(null==(e=E.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}([...pe]))),pe.clear(),Le()}function Le(e){ae.clear(),pe.clear(),ce.clear(),he.clear(),de.clear(),fe.forEach((t=>{null==e||e(t),t.dataList.forEach(((e,i)=>{!e.show||d(t.type)&&!e.enable||ge(e,i,t)}))})),ve(),[...pe].forEach((e=>{null==e||e.bringToFront()})),function(){var e;const t=fe.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({},S,z.overlap||{}),l=[];ce.size&&[...ce].forEach((e=>{[...de].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),l.push(o(r,{...i[e],...s}))}}}))})),setTimeout((()=>{E.value.add(...l),l.forEach((e=>{null==e||e.bringToFront(),pe.add(e)}))}))}()}return function(){const t=new e.Rect({left:oe,top:0,width:le-oe-se.strokeWidth,height:ie-se.strokeWidth,fill:"transparent",...se});E.value.add(t)}(),Le((e=>function(e){if("temperature"!==e.type||!e.positionLine)return;const t=V(e.type,e.list,e.positionLine.value),n=i([G,t,N,t],e.positionLine);E.value.add(n)}(e))),E.value.on("mouse:up",(e=>{const{button:t,target:i,pointer:n={}}=e;if(3===t){if(!$.event.evented)return;const{x:e=0,y:t=0}=n;if(e>=G&&e<=N&&t>=B&&t<=J){I.point={x:e,y:t},I.show=!0;const{type:o}=(null==i?void 0:i.origin)||{};if(i&&["temperature","pain"].includes(o))"temperature"===o&&(I.list=[...k]),"pain"===o&&(I.list=[...L]),I.target=i;else{I.target=null,I.list=["新增节点"],K.forEach((i=>{if(!X([...pe],e,"_type").includes(i.bigType)){const e=["pain"].includes(i.bigType)?Z:U;t>=e.originY&&t<=e.endY&&I.list.push({renderItem:R?R(i):()=>i.title,origin:{title:i.title,unit:i.unit,type:a(i.bigType),dataIndex:i.dataIndex,key:i.key},pointer:n})}}));const i=je(e);i&&1!==I.list.length||(I.show=!1,1===I.list.length&&i&&D("repeat"))}}}if(1===t){if(i)return;const{x:e=0,y:t=0}=n;e>=G&&e<=N&&t>0&&t<ie&&O("click:grid",{x:e,y:t,time:C(e)})}})),{clickMenu:function({item:e,target:t}){if(t){const{data:i,type:n,dataIndex:o,index:l}=t.origin,s=y(i,[...k,...L]);s[`${e.type}`]=e.value,s.changeTime=u(new Date,"yyyy-MM-dd HH:mm"),d(n)&&(s.key=t.origin.key);const r={...t.origin,data:s};O("change",r),we(r,"change")}else{const t={data:{time:C(e.pointer.x),value:P(e.origin.type,e.pointer.y),...d(e.origin.type)?{key:e.origin.key}:{}},...e.origin};O("add",t),we(t)}},setPopup:me,isAddPoint:je,updateData:we,redrawPoints:ke,gridPoints:pe,fixedNoRisePoints:he}}function M(e,t){return e.fixed||!t.value&&0!==t.value}export{E as useCenter};
@@ -1 +1 @@
1
- import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as t,defaultTextStyle as i,defaultStyle as n,drawTextAndIconGroup as o,drawTextGroup as l}from"../useDraw.js";import"date-fns";import{getType as s,isOneLine as r}from"../../utils/index.js";import{last as u}from"lodash-es";import"../useEvent.js";import{getScaleInfo as a,drawScaleNumber as h,drawScaleLine as c}from"../useScaleColumn.js";import{useCommon as d}from"../useCommon.js";import"vue";import"./useShadow.js";import"@vueuse/shared";import"naive-ui";import"@vueuse/core";function p(p,g,f,m,v,y,w,S,b,Y,x,j){var C,X;const{getEqualXTypes:N,handleAddPrevent:T,isGridLimit:V}=d(p,f,g),{originY:L,endY:k,originX:E,endX:M,xCellWidth:W,yCellHeight:G,left:I,vitalSignsOriginY:O,painOriginY:R,painHeight:A,iconsWidth:H,itemList:_,painIndex:B,right:J,canvasWidth:$,canvasHeight:q,getRightInfo:D,borderStyle:P,surplusCell:z,painSurplusCell:F}=g;function K(o){var s;if(!(null==o?void 0:o.length))return;const{layout:r}=o[0];let d=H,g=E;"right"===r&&(d=M,g=M+(null!=(s=null==J?void 0:J.width)?s:0));const f=[],m=A&&"right"!==r?o.length-1:o.length,v=(g-d)/m,y=v+(g-d)%m;o.forEach(((o,s)=>{if("pain"===o.type)return void function(n){const{list:o=[],spaceGridNumber:s=5,showScale:r,showNumber:u,position:c,showMaxMinNumber:d,style:g,title:f}=n,m=R.originY-F[0]*G,v=l({width:E-H,height:A+(F[0]+F[1])*G,...P},{value:`${f}`,...i,...g||{}},{left:H,top:m}),y=t([H,m,E,m],P),w=[];if(r||u){const{lineXMain:t,textLeft:i}=a(c,H,E-H),l=o.length;o.forEach(((o,a)=>{let c=R.endY-a*G*s;if(0===a&&0===F[1]&&(c=k-5),u&&(!(0===a||a===l-1)||d||0===a&&F[1]>0||a===l-1&&F[0]>0)&&w.push(h(o,n,i,c)),r&&(0!==a||F[1]>0)){const[i,n]=t,o=new e.Line([i,c,n,c],{...P,...g});w.push(o)}}))}p.value.add(y,v,...w),v.sendToBack()}(o);const g=[],m=0===s?y:v,w=0===s?d:y+d+(s-1)*v,S="right"===r?0:O.originY,b="right"===r?q:O.endY,Y=s>0?t([w,S,w,b],{objectCaching:!1,...P}):null;Y&&g.push(Y);const x=w+m/2,{list:j=[],spaceGridNumber:C=5,showScale:X,showNumber:N,position:T,showMaxMinNumber:V,detailedList:M=[],showdetailedScale:W,showRange:I=[]}=o;if(X||N){const{lineXMain:e,lineXSub:t,textLeft:i}=a(T,w,m),n=(j[1]-j[0])/2,l=W&&!M.length?j.reduce(((e,t,i)=>{const o=e[e.length-1];return 0===i?[t]:e.concat([o+n,o+2*n])}),[]):W&&(null==M?void 0:M.length)?M:j,[s=l[0],r=u(l)]=I;l.forEach(((n,u)=>{if(s&&+n<+s)return;if(r&&+n>+r)return;const a=O.endY-u*G*(W?C/2:C),d=[s,r].includes(n);if(N&&(!d||V)){const e=0==u?a-5:a,t=h(n,o,i,e),l=O.originY+t.height/2;e<l&&t.set({top:l}),g.push(t)}g.push(...c(o,u,e,t,a,G,O.originY,l.findIndex((e=>e==r))+1))}))}let _=o.title||"";o.unit&&(_+="\n"+o.unit);let J=O.originY+G;0!==B&&z[0]>1&&(J=L+G*z[0]/2),_&&g.push(new e.Text(String(_),{...i,left:x,top:J,textAlign:"center",...o.style}));const $=new e.Group(g,{...n,objectCaching:!1});f.push($)}));const w=f.length>0?new e.Group([...f],{...n,objectCaching:!1}):null;w&&p.value.add(w),w&&w.sendToBack()}H&&function(){const e=JSON.parse(JSON.stringify(_));let t=k;const i=H-I.icons.marginRight;e.reverse().forEach((e=>{t-=10;let n=e.title.replace(/(.{2})/g,"$1\n");n.endsWith("\n")&&(n=n.slice(0,n.length-1));const{text:l,icon:u}=o(n,e,{text:{left:i-(e.pointAttr.width||10)-5,top:t,originX:"right"},icon:{originX:"right",left:i,topY:t,origin:{type:s(e.bigType),_type:e.bigType},...g.event}});var a;t-=l.height||30,(a=u).on("moving",(()=>{a.set("originX","center"),function(e){if(e.left>=E&&e.left<=M){e.setCoords();const t="pain"===e.origin.type?R:O;e.top<t.originY&&e.set("top",t.originY),e.top>t.endY&&e.set("top",t.endY)}}(a),V(a)?m(a):v.show=!1})),a.on("mouseup:before",(e=>{if(v.show=!1,0===e.e.button&&V(a)){const e=N([...j],a.left,"_type").includes(a.origin._type),t=Y(a.left);if(!t||e)e&&t&&T("repeat");else{const e={data:{time:S(a.left),value:b(a.origin.type,a.top),...r(a.origin.type)?{key:a.origin.key}:{}},...a.origin};f("add",e),x(e)}}!function(e){e.setCoords().set({originX:"right",left:e.originLeft,top:e.originTop})}(a)})),p.value.add(l,u)}))}();const Q=I.yScaleValue.filter((e=>"left"===e.layout&&"pain"!==e.type&&e.show));if((null==J?void 0:J.width)&&"left"===(null==(C=null==J?void 0:J.yScaleValue)?void 0:C.layout)&&(null==(X=null==J?void 0:J.yScaleValue)?void 0:X.show)&&Q.push(D),B>0&&I.yScaleValue[B].show){const e=I.yScaleValue[B];0===B&&I.yScaleValue.length>1&&Q.unshift(e),B==I.yScaleValue.length-1&&Q.push(e)}const U=Q.findIndex((e=>"pulse"===e.type&&e.show&&e.doubleShow)),Z=Q[U];return U>-1&&Q.splice(U,0,{...Z,title:(null==Z?void 0:Z.doubleTitle)||(null==Z?void 0:Z.title)}),K(Q),p.value.add(new e.Rect({left:H,top:0,width:$-H-P.strokeWidth,height:q-P.strokeWidth,fill:"transparent",...P})),{drawScaleValue:K}}export{p as useLeft};
1
+ import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as t,defaultTextStyle as i,defaultStyle as n,drawTextAndIconGroup as o,drawTextGroup as l}from"../useDraw.js";import"date-fns";import{getType as s,isOneLine as r}from"../../utils/index.js";import{last as u}from"lodash-es";import"../useEvent.js";import{getScaleInfo as a,drawScaleNumber as h,drawScaleLine as c}from"../useScaleColumn.js";import{useCommon as p}from"../useCommon.js";import"vue";import"./useShadow.js";import"@vueuse/shared";import"naive-ui";import"@vueuse/core";function d(d,g,f,m,v,y,w,S,b,Y,x,j){var C,X;const{getEqualXTypes:N,handleAddPrevent:T,isGridLimit:V}=p(d,f,g),{originY:L,endY:E,originX:M,endX:G,xCellWidth:k,yCellHeight:I,left:O,vitalSignsOriginY:W,painOriginY:A,painHeight:H,iconsWidth:R,itemList:_,painIndex:B,right:J,canvasWidth:$,canvasHeight:q,getRightInfo:D,borderStyle:P,surplusCell:z,painSurplusCell:F}=g;function K(o){var s;if(!(null==o?void 0:o.length))return;const{layout:r}=o[0];let p=R,g=M;"right"===r&&(p=G,g=G+(null!=(s=null==J?void 0:J.width)?s:0));const f=[],m=H&&"right"!==r?o.length-1:o.length,v=(g-p)/m,y=v+(g-p)%m;o.forEach(((o,s)=>{if("pain"===o.type)return void function(n){const{list:o=[],spaceGridNumber:s=5,showScale:r,showNumber:u,position:c,showMaxMinNumber:p,style:g,title:f}=n,m=A.originY-F[0]*I,v=l({width:M-R,height:H+(F[0]+F[1])*I,...P},{value:`${f}`,...i,...g||{}},{left:R,top:m}),y=t([R,m,M,m],P),w=[];if(r||u){const{lineXMain:t,textLeft:i}=a(c,R,M-R),l=o.length;o.forEach(((o,a)=>{let c=A.endY-a*I*s;if(0===a&&0===F[1]&&(c=E-5),u&&(!(0===a||a===l-1)||p||0===a&&F[1]>0||a===l-1&&F[0]>0)&&w.push(h(o,n,i,c)),r&&(0!==a||F[1]>0)){const[i,n]=t,o=new e.Line([i,c,n,c],{...P,...g});w.push(o)}}))}d.value.add(y,v,...w),v.sendToBack()}(o);const g=[],m=0===s?y:v,w=0===s?p:y+p+(s-1)*v,S="right"===r?0:W.originY,b="right"===r?q:W.endY,Y=s>0?t([w,S,w,b],{objectCaching:!1,...P}):null;Y&&g.push(Y);const x=w+m/2,{list:j=[],spaceGridNumber:C=5,showScale:X,showNumber:N,position:T,showMaxMinNumber:V,detailedList:G=[],showdetailedScale:k,showRange:O=[]}=o;if(X||N){const{lineXMain:e,lineXSub:t,textLeft:i}=a(T,w,m),n=(j[1]-j[0])/2,l=k&&!G.length?j.reduce(((e,t,i)=>{const o=e[e.length-1];return 0===i?[t]:e.concat([o+n,o+2*n])}),[]):k&&(null==G?void 0:G.length)?G:j,[s=l[0],r=u(l)]=O;l.forEach(((n,u)=>{if(s&&+n<+s)return;if(r&&+n>+r)return;const a=W.endY-u*I*(k?C/2:C),p=[s,r].includes(n);if(N&&(!p||V)){const e=0==u?a-5:a,t=h(n,o,i,e),l=W.originY+t.height/2;e<l&&t.set({top:l}),g.push(t)}g.push(...c(o,u,e,t,a,I,W.originY,l.findIndex((e=>e==r))+1))}))}let _=o.title||"";o.unit&&(_+="\n"+o.unit);let J=W.originY+I;0!==B&&z[0]>1&&(J=L+I*z[0]/2),_&&g.push(new e.Text(String(_),{...i,left:x,top:J,textAlign:"center",...o.style}));const $=new e.Group(g,{...n,objectCaching:!1});f.push($)}));const w=f.length>0?new e.Group([...f],{...n,objectCaching:!1}):null;w&&d.value.add(w),w&&w.sendToBack()}R&&function(){const e=JSON.parse(JSON.stringify(_));let t=E;const i=R-O.icons.marginRight;e.reverse().forEach((e=>{t-=10;let n=e.title.replace(/(.{2})/g,"$1\n");n.endsWith("\n")&&(n=n.slice(0,n.length-1));const{text:l,icon:u}=o(n,e,{text:{left:i-(e.pointAttr.width||10)-5,top:t,originX:"right"},icon:{originX:"right",left:i,topY:t,origin:{type:s(e.bigType),_type:e.bigType},...g.event}});var a;t-=l.height||30,(a=u).on("moving",(()=>{a.set("originX","center"),function(e){if(e.left>=M&&e.left<=G){e.setCoords();const t="pain"===e.origin.type?A:W;e.top<t.originY&&e.set("top",t.originY),e.top>t.endY&&e.set("top",t.endY)}}(a),V(a)?m(a):v.show=!1})),a.on("mouseup:before",(e=>{if(v.show=!1,0===e.e.button&&V(a)){const e=N([...j],a.left,"_type").includes(a.origin._type),t=Y(a.left);if(!t||e)e&&t&&T("repeat");else{const e={data:{time:S(a.left),value:b(a.origin.type,a.top),...r(a.origin.type)?{key:a.origin.key}:{}},...a.origin};f("add",e),x(e)}}!function(e){e.setCoords().set({originX:"right",left:e.originLeft,top:e.originTop})}(a)})),d.value.add(l,u)}))}();const Q=O.yScaleValue.filter((e=>"left"===e.layout&&"pain"!==e.type&&e.show));if((null==J?void 0:J.width)&&"left"===(null==(C=null==J?void 0:J.yScaleValue)?void 0:C.layout)&&(null==(X=null==J?void 0:J.yScaleValue)?void 0:X.show)&&Q.push(D),B>0&&O.yScaleValue[B].show){const e=O.yScaleValue[B];0===B&&O.yScaleValue.length>1&&Q.unshift(e),B==O.yScaleValue.length-1&&Q.push(e)}const U=Q.findIndex((e=>"pulse"===e.type&&e.show&&e.doubleShow)),Z=Q[U];return U>-1&&Q.splice(U,0,{...Z,title:(null==Z?void 0:Z.doubleTitle)||(null==Z?void 0:Z.title)}),K(Q),{drawScaleValue:K}}export{d as useLeft};
@@ -466,11 +466,11 @@ declare const _default: import("vue").DefineComponent<{
466
466
  hide: boolean;
467
467
  }>;
468
468
  draggable: boolean;
469
- fieldDescribeMode: "column" | "tooltip";
470
- isFieldSet: boolean;
471
469
  idx: number;
472
470
  isHighlight: boolean;
473
471
  isHighlightRow: boolean;
472
+ isFieldSet: boolean;
473
+ fieldDescribeMode: "column" | "tooltip";
474
474
  }>;
475
475
  EditDialog: import("vue").DefineComponent<{
476
476
  visible: {
@@ -488,11 +488,11 @@ declare const _default: import("vue").DefineComponent<{
488
488
  hide: boolean;
489
489
  }>;
490
490
  draggable: boolean;
491
- fieldDescribeMode: "column" | "tooltip";
492
- isFieldSet: boolean;
493
491
  idx: number;
494
492
  isHighlight: boolean;
495
493
  isHighlightRow: boolean;
494
+ isFieldSet: boolean;
495
+ fieldDescribeMode: "column" | "tooltip";
496
496
  }>;
497
497
  setStyle: typeof setStyle;
498
498
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "save" | "reset")[], "close" | "save" | "reset", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -612,11 +612,11 @@ declare const _default: import("vue").DefineComponent<{
612
612
  hide: boolean;
613
613
  }>;
614
614
  draggable: boolean;
615
- fieldDescribeMode: "column" | "tooltip";
616
- isFieldSet: boolean;
617
615
  idx: number;
618
616
  isHighlight: boolean;
619
617
  isHighlightRow: boolean;
618
+ isFieldSet: boolean;
619
+ fieldDescribeMode: "column" | "tooltip";
620
620
  }>;
621
621
  isArray: {
622
622
  (value?: any): value is any[];
@@ -724,10 +724,10 @@ declare const _default: import("vue").DefineComponent<{
724
724
  rowDraggable: boolean;
725
725
  showSeq: boolean;
726
726
  footerFlag: boolean;
727
- customColumns: FieldSetColumnItem[];
727
+ fieldDescribeMode: "column" | "tooltip";
728
728
  showSearch: boolean;
729
+ customColumns: FieldSetColumnItem[];
729
730
  showSortPriority: boolean;
730
731
  showHeadFilter: boolean;
731
- fieldDescribeMode: "column" | "tooltip";
732
732
  }>;
733
733
  export default _default;
@@ -317,10 +317,10 @@ declare const _default: import("vue").DefineComponent<{
317
317
  hide: boolean;
318
318
  }>;
319
319
  draggable: boolean;
320
- fieldDescribeMode: "column" | "tooltip";
321
- isFieldSet: boolean;
322
320
  idx: number;
323
321
  isHighlight: boolean;
324
322
  isHighlightRow: boolean;
323
+ isFieldSet: boolean;
324
+ fieldDescribeMode: "column" | "tooltip";
325
325
  }>;
326
326
  export default _default;
@@ -1887,6 +1887,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
1887
1887
  bordered?: string | boolean | undefined;
1888
1888
  displayMode?: "form" | "table" | undefined;
1889
1889
  editor_title?: string | undefined;
1890
+ editor_title_mode?: "EMBEDDED_FORM" | "HOVER_TOOLTIP" | "POPUP_ALERT" | undefined;
1890
1891
  linebarWidth?: string | undefined;
1891
1892
  linebarDirection?: "horizontal" | "vertical" | undefined;
1892
1893
  linebarTextDirection?: "horizontal" | "vertical" | undefined;
@@ -2134,6 +2135,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
2134
2135
  bordered?: string | boolean | undefined;
2135
2136
  displayMode?: "form" | "table" | undefined;
2136
2137
  editor_title?: string | undefined;
2138
+ editor_title_mode?: "EMBEDDED_FORM" | "HOVER_TOOLTIP" | "POPUP_ALERT" | undefined;
2137
2139
  linebarWidth?: string | undefined;
2138
2140
  linebarDirection?: "horizontal" | "vertical" | undefined;
2139
2141
  linebarTextDirection?: "horizontal" | "vertical" | undefined;
@@ -2352,6 +2354,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
2352
2354
  bordered?: string | boolean | undefined;
2353
2355
  displayMode?: "form" | "table" | undefined;
2354
2356
  editor_title?: string | undefined;
2357
+ editor_title_mode?: "EMBEDDED_FORM" | "HOVER_TOOLTIP" | "POPUP_ALERT" | undefined;
2355
2358
  linebarWidth?: string | undefined;
2356
2359
  linebarDirection?: "horizontal" | "vertical" | undefined;
2357
2360
  linebarTextDirection?: "horizontal" | "vertical" | undefined;
@@ -1890,6 +1890,7 @@ declare const _default: import("vue").DefineComponent<{
1890
1890
  bordered?: string | boolean | undefined;
1891
1891
  displayMode?: "form" | "table" | undefined;
1892
1892
  editor_title?: string | undefined;
1893
+ editor_title_mode?: "EMBEDDED_FORM" | "HOVER_TOOLTIP" | "POPUP_ALERT" | undefined;
1893
1894
  linebarWidth?: string | undefined;
1894
1895
  linebarDirection?: "horizontal" | "vertical" | undefined;
1895
1896
  linebarTextDirection?: "horizontal" | "vertical" | undefined;
@@ -2137,6 +2138,7 @@ declare const _default: import("vue").DefineComponent<{
2137
2138
  bordered?: string | boolean | undefined;
2138
2139
  displayMode?: "form" | "table" | undefined;
2139
2140
  editor_title?: string | undefined;
2141
+ editor_title_mode?: "EMBEDDED_FORM" | "HOVER_TOOLTIP" | "POPUP_ALERT" | undefined;
2140
2142
  linebarWidth?: string | undefined;
2141
2143
  linebarDirection?: "horizontal" | "vertical" | undefined;
2142
2144
  linebarTextDirection?: "horizontal" | "vertical" | undefined;
@@ -2355,6 +2357,7 @@ declare const _default: import("vue").DefineComponent<{
2355
2357
  bordered?: string | boolean | undefined;
2356
2358
  displayMode?: "form" | "table" | undefined;
2357
2359
  editor_title?: string | undefined;
2360
+ editor_title_mode?: "EMBEDDED_FORM" | "HOVER_TOOLTIP" | "POPUP_ALERT" | undefined;
2358
2361
  linebarWidth?: string | undefined;
2359
2362
  linebarDirection?: "horizontal" | "vertical" | undefined;
2360
2363
  linebarTextDirection?: "horizontal" | "vertical" | undefined;
@@ -393,6 +393,7 @@ declare const _default: import("vue").DefineComponent<{
393
393
  bordered?: string | boolean | undefined;
394
394
  displayMode?: "form" | "table" | undefined;
395
395
  editor_title?: string | undefined;
396
+ editor_title_mode?: "EMBEDDED_FORM" | "HOVER_TOOLTIP" | "POPUP_ALERT" | undefined;
396
397
  linebarWidth?: string | undefined;
397
398
  linebarDirection?: "horizontal" | "vertical" | undefined;
398
399
  linebarTextDirection?: "horizontal" | "vertical" | undefined;
@@ -640,6 +641,7 @@ declare const _default: import("vue").DefineComponent<{
640
641
  bordered?: string | boolean | undefined;
641
642
  displayMode?: "form" | "table" | undefined;
642
643
  editor_title?: string | undefined;
644
+ editor_title_mode?: "EMBEDDED_FORM" | "HOVER_TOOLTIP" | "POPUP_ALERT" | undefined;
643
645
  linebarWidth?: string | undefined;
644
646
  linebarDirection?: "horizontal" | "vertical" | undefined;
645
647
  linebarTextDirection?: "horizontal" | "vertical" | undefined;
@@ -858,6 +860,7 @@ declare const _default: import("vue").DefineComponent<{
858
860
  bordered?: string | boolean | undefined;
859
861
  displayMode?: "form" | "table" | undefined;
860
862
  editor_title?: string | undefined;
863
+ editor_title_mode?: "EMBEDDED_FORM" | "HOVER_TOOLTIP" | "POPUP_ALERT" | undefined;
861
864
  linebarWidth?: string | undefined;
862
865
  linebarDirection?: "horizontal" | "vertical" | undefined;
863
866
  linebarTextDirection?: "horizontal" | "vertical" | undefined;
@@ -1 +1 @@
1
- import{defineComponent as e,inject as l,computed as r,ref as t,onUnmounted as o,createVNode as a,mergeProps as n,unref as i}from"vue";import{arrayed as u,getStringWidth as d,widthAppend as s}from"../../../../../shared/utils/index.js";import{isVoidField as m}from"@formily/core";import{observe as f,autorun as v}from"@formily/reactive";import{connect as c,mapProps as p}from"@formily/vue";import{useDebounceFn as b}from"@vueuse/core";import{isString as h,isArray as y,isObject as _,isNumber as k,isFunction as g,uniq as F}from"lodash-es";import{NFormItem as I}from"naive-ui";import x from"../../../../annotation-edit/index.js";import"../../../index.js";import j from"../tooltipMessage.vue.js";import{InjectionFormGlobalProps as R,InjectionFormGlobalEmit as M,InjectionFormUUID as S,InjectionFormGraph as L,InjectionAnnotation as W,InjectionAnnotationShortcuts as O,InjectionFormColumnWidth as q}from"../../constants/index.js";import{useComplexOptionsSpan as w}from"../../hooks/useComplexOptions.js";import{validateMessageParser as C,editorUnescape as E}from"../../utils/index.js";import{dotEscape as K,createFieldAddressId as N}from"../../utils/schema.js";import{useFormField as P}from"../../hooks/useFormField.js";const A=c(e({name:"FormRenderItem",props:{label:String,propertyKey:String,remark:String,span:{type:Number,default:6},suffixFields:{type:Array},labelRender:Function,annotation:{},isOptionChildField:Boolean,feedback:String,showFeedback:{type:Boolean,default:void 0},fieldItem:{type:Object}},setup(e,{slots:u,attrs:c}){const p=l(R),C=l(M),{field:A,fieldKey:B,fieldAddress:T}=P(),V=l(S),$=r((()=>K(`${V}-${T.value}`))),H=t(!1);if(m(A.value)&&y(e.suffixFields)){const r=l(L);o(f(r,b((()=>{m(A.value)&&y(e.suffixFields)&&(H.value=e.suffixFields.some((e=>{const l=A.value.form.query(e).take();return l&&Reflect.get(l,"required")})))}),100)))}else o(v((()=>{H.value=Reflect.get(A.value,"required")})));const U=l(W),z=r({get(){var l,r;return null!=(r=null==(l=U.value)?void 0:l[e.propertyKey])?r:""},set(l){U.value={property:e.propertyKey,value:l}}}),D=l(O);const G=r((()=>{var l;const r={color:null==(l=e.fieldItem)?void 0:l.labelColor};return _(c.labelStyle)&&Object.assign(r,c.labelStyle),r})),J=r((()=>U.value&&!1!==e.annotation)),Q=r((()=>e.label&&" "!==e.label)),X=r((()=>{let l=0;return J.value&&(l+=18),e.remark&&(l+=18),l})),Y=l(R,{}),Z=r((()=>{var l;const r=null==(l=e.fieldItem)?void 0:l.bordered;return null==r?Y.bordered:r})),ee=l("n-form",{}),le=r((()=>{var e,l,r,t;if("left"!==(null!=(l=c.labelPlacement)?l:null==(e=ee.props)?void 0:e.labelPlacement))return"";let o=null!=(t=c.labelWidth)?t:null==(r=ee.props)?void 0:r.labelWidth;return o&&"auto"!==o?(o=parseInt(o+""),isNaN(o)||!k(o)?"":o-12-X.value-(H.value?11:0)):""})),re=r((()=>g(e.labelRender)?"":h(e.label)?e.label:""));function te(){return Q.value?a("section",{class:"form-render__formItemLabel"},[a("span",{class:"form-render__formItemLabel--text",style:{marginRight:s(X.value),maxWidth:s(le.value)},title:re.value},[g(e.labelRender)?e.labelRender(e.label):e.label]),X.value?a("section",{class:"form-render__formItemLabel--operation"},[e.remark?a("div",{class:"form-render__formItemLabel--tooltip"},[a(j,{message:e.remark},null)]):null,J.value?a(x,{class:"form-render__formItemLabel--annotation",modelValue:z.value,"onUpdate:modelValue":e=>z.value=e,shortcuts:i(D)},null):null]):null]):null}const oe=r((()=>{let l=X.value;return H.value&&(l+=11),h(e.label)&&(l+=le.value||d(e.label)),l})),ae=l(q),{getSpan:ne}=w();function ie(){var l,r,t;const o="inner"===(null==(l=e.fieldItem)?void 0:l.childWidthMode)?e.span:ne(V,A.value.address,!1)+e.span;if("left"!==(null!=(t=c.labelPlacement)?t:null==(r=ee.props)?void 0:r.labelPlacement)||!i(ae)||!(null==p?void 0:p.autoWidth))return o;const a=16+ae.value;let n=o*a-16-oe.value;const u=k(null==p?void 0:p.autoWidth)?p.autoWidth:120;let d=o;for(;n<u&&d<12;)d++,n+=a;return d}function ue(){var l,r,t;const o=null==(l=e.fieldItem)?void 0:l.editor_title;return h(o)&&o?a("section",{style:"display:flex;flex-direction:column;gap:4px"},[null==(t=u.default)?void 0:t.call(u),a("div",{innerHTML:E(o)},null)]):null==(r=u.default)?void 0:r.call(u)}function de(){const e=[A.value.path+""];return A.value.form.query("*").forEach((l=>{(l.address+"").includes(A.value.address+"")&&((l.path+"").includes(A.value.path+"")||e.push(l.path+""))})),e}const se=r({get:()=>!(!(null==p?void 0:p.selectMode)||!y(null==p?void 0:p.selectedFields))&&p.selectedFields.includes(A.value.path+""),set(e){if(!y(null==p?void 0:p.selectedFields))return;let l=[...p.selectedFields];e?(l.push(...de()),l=F(l)):de().forEach((e=>{const r=l.indexOf(e);r>-1&&l.splice(r,1)})),null==C||C("update:selectedFields",l)}}),me=r((()=>(null==p?void 0:p.selectMode)&&!(A.value.parent&&"LINEBAR"!==A.value.parent.componentType)));function fe(){(null==p?void 0:p.selectMode)&&(se.value=!se.value)}const ve=r((()=>e.isOptionChildField?!!e.feedback&&" "!==e.feedback&&e.showFeedback:e.showFeedback));return()=>a(I,n({class:["form-render__formItem",{"form-render--no-border":!Z.value,"form-render--underline":"underline"===Z.value,"form-render__formItemMask":me.value,"form-render__formItemMask--selected":me.value&&se.value}],style:{"--form-item-column":ie()},showFeedback:ve.value,feedback:e.feedback,labelStyle:G.value},{id:$.value,uuid:V,onClick:fe,"widget-type":A.value.componentType,"field-key":K(B.value),"field-address":N(T.value),required:H.value}),{...u,default:ue,label:te})}}),p({title:"label"},((e,l)=>{const r=m(l)?void 0:u(l.selfErrors).length?function(e,l){if(!h(l.defined_error_msg)||!l.defined_error_msg)return e.map((e=>C(e,l))).join(",");return C(l.defined_error_msg,l)}(u(l.selfErrors),e.fieldItem):void 0;return{...e,fieldItem:void 0,feedback:r,"validation-status":r?"error":void 0}})));export{A as FORM_ITEM};
1
+ import{defineComponent as e,inject as l,computed as t,ref as r,onUnmounted as o,createVNode as a,mergeProps as i,withModifiers as n,createTextVNode as d,unref as u}from"vue";import{arrayed as s,getStringWidth as m,widthAppend as f}from"../../../../../shared/utils/index.js";import{isVoidField as v}from"@formily/core";import{observe as c,autorun as p}from"@formily/reactive";import{connect as b,mapProps as h}from"@formily/vue";import{useDebounceFn as y}from"@vueuse/core";import{isString as _,isArray as g,isObject as x,isNumber as k,isFunction as I,uniq as F}from"lodash-es";import{NFormItem as j,NTooltip as M,NButton as R}from"naive-ui";import w from"../../../../annotation-edit/index.js";import"../../../index.js";import E from"../tooltipMessage.vue.js";import{InjectionFormGlobalProps as L,InjectionFormGlobalEmit as S,InjectionFormUUID as O,InjectionFormGraph as C,InjectionAnnotation as P,InjectionAnnotationShortcuts as W,InjectionFormColumnWidth as q}from"../../constants/index.js";import{useComplexOptionsSpan as A}from"../../hooks/useComplexOptions.js";import{validateMessageParser as T,editorUnescape as B}from"../../utils/index.js";import{dotEscape as K,createFieldAddressId as N}from"../../utils/schema.js";import{useFormField as D}from"../../hooks/useFormField.js";const H=b(e({name:"FormRenderItem",props:{label:String,propertyKey:String,remark:String,span:{type:Number,default:6},suffixFields:{type:Array},labelRender:Function,annotation:{},isOptionChildField:Boolean,feedback:String,showFeedback:{type:Boolean,default:void 0},fieldItem:{type:Object}},setup(e,{slots:s,attrs:b}){const h=l(L),T=l(S),{field:H,fieldKey:U,fieldAddress:V}=D(),$=l(O),z=t((()=>K(`${$}-${V.value}`))),Y=r(!1);if(v(H.value)&&g(e.suffixFields)){const t=l(C);o(c(t,y((()=>{v(H.value)&&g(e.suffixFields)&&(Y.value=e.suffixFields.some((e=>{const l=H.value.form.query(e).take();return l&&Reflect.get(l,"required")})))}),100)))}else o(p((()=>{Y.value=Reflect.get(H.value,"required")})));const G=l(P),J=t({get(){var l,t;return null!=(t=null==(l=G.value)?void 0:l[e.propertyKey])?t:""},set(l){G.value={property:e.propertyKey,value:l}}}),Q=l(W);const X=t((()=>{var l;const t={color:null==(l=e.fieldItem)?void 0:l.labelColor};return x(b.labelStyle)&&Object.assign(t,b.labelStyle),t})),Z=t((()=>G.value&&!1!==e.annotation)),ee=t((()=>{var l,t;return _(null==(l=e.fieldItem)?void 0:l.editor_title)&&e.fieldItem.editor_title&&"POPUP_ALERT"===(null==(t=e.fieldItem)?void 0:t.editor_title_mode)})),le=r(!1),te=t((()=>e.label&&" "!==e.label)),re=t((()=>{let l=0;return Z.value&&(l+=18),e.remark&&(l+=18),ee.value&&(l+=32),l})),oe=l(L,{}),ae=t((()=>{var l;const t=null==(l=e.fieldItem)?void 0:l.bordered;return null==t?oe.bordered:t})),ie=l("n-form",{}),ne=t((()=>{var e,l,t,r;if("left"!==(null!=(l=b.labelPlacement)?l:null==(e=ie.props)?void 0:e.labelPlacement))return"";let o=null!=(r=b.labelWidth)?r:null==(t=ie.props)?void 0:t.labelWidth;return o&&"auto"!==o?(o=parseInt(o+""),isNaN(o)||!k(o)?"":o-12-re.value-(Y.value?11:0)):""})),de=t((()=>I(e.labelRender)?"":_(e.label)?e.label:""));function ue(){return te.value?a("section",{class:"form-render__formItemLabel"},[a("span",{class:"form-render__formItemLabel--text",style:{marginRight:f(re.value),maxWidth:f(ne.value)},title:de.value},[I(e.labelRender)?e.labelRender(e.label):e.label]),re.value?a("section",{class:"form-render__formItemLabel--operation"},[e.remark?a("div",{class:"form-render__formItemLabel--tooltip"},[a(E,{message:e.remark},null)]):null,Z.value?a(w,{class:"form-render__formItemLabel--annotation",modelValue:J.value,"onUpdate:modelValue":e=>J.value=e,shortcuts:u(Q)},null):null,ee.value?a(M,{zIndex:3e3,raw:!0,showArrow:!1,trigger:"manual",placement:"top-start",show:le.value,contentStyle:"background-color:white;color:rgb(51, 54, 57);padding:8px;position:relative;"},{trigger:()=>a(R,{onClick:n((()=>le.value=!le.value),["stop","prev"]),text:!0,type:"primary"},{default:()=>[a("span",{style:"display:inline-block;margin-left:4px"},[d("提示")])]}),default:()=>{var l,t;return[a("div",{innerHTML:B(null!=(t=null==(l=e.fieldItem)?void 0:l.editor_title)?t:"")},null),a(R,{text:!0,onClick:()=>le.value=!le.value,style:"position:absolute;right:2px;top:2px;line-height:1;height:12px;transform:scaleY(0.9)"},{default:()=>[d("x")]})]}}):null]):null]):null}const se=t((()=>{let l=re.value;return Y.value&&(l+=11),_(e.label)&&(l+=ne.value||m(e.label)),l})),me=l(q),{getSpan:fe}=A();function ve(){var l,t,r;const o="inner"===(null==(l=e.fieldItem)?void 0:l.childWidthMode)?e.span:fe($,H.value.address,!1)+e.span;if("left"!==(null!=(r=b.labelPlacement)?r:null==(t=ie.props)?void 0:t.labelPlacement)||!u(me)||!(null==h?void 0:h.autoWidth))return o;const a=16+me.value;let i=o*a-16-se.value;const n=k(null==h?void 0:h.autoWidth)?h.autoWidth:120;let d=o;for(;i<n&&d<12;)d++,i+=a;return d}function ce(){var l,t,r,o,i;const n=null==(l=e.fieldItem)?void 0:l.editor_title,d=!(null==(t=e.fieldItem)?void 0:t.editor_title_mode)||"EMBEDDED_FORM"===(null==(r=e.fieldItem)?void 0:r.editor_title_mode);return _(n)&&n&&d?a("section",{style:"display:flex;flex-direction:column;gap:4px"},[null==(i=s.default)?void 0:i.call(s),a("div",{innerHTML:B(n)},null)]):null==(o=s.default)?void 0:o.call(s)}function pe(){const e=[H.value.path+""];return H.value.form.query("*").forEach((l=>{(l.address+"").includes(H.value.address+"")&&((l.path+"").includes(H.value.path+"")||e.push(l.path+""))})),e}const be=t({get:()=>!(!(null==h?void 0:h.selectMode)||!g(null==h?void 0:h.selectedFields))&&h.selectedFields.includes(H.value.path+""),set(e){if(!g(null==h?void 0:h.selectedFields))return;let l=[...h.selectedFields];e?(l.push(...pe()),l=F(l)):pe().forEach((e=>{const t=l.indexOf(e);t>-1&&l.splice(t,1)})),null==T||T("update:selectedFields",l)}}),he=t((()=>(null==h?void 0:h.selectMode)&&!(H.value.parent&&"LINEBAR"!==H.value.parent.componentType)));function ye(){(null==h?void 0:h.selectMode)&&(be.value=!be.value)}const _e=t((()=>e.isOptionChildField?!!e.feedback&&" "!==e.feedback&&e.showFeedback:e.showFeedback));return()=>a(j,i({class:["form-render__formItem",{"form-render--no-border":!ae.value,"form-render--underline":"underline"===ae.value,"form-render__formItemMask":he.value,"form-render__formItemMask--selected":he.value&&be.value}],style:{"--form-item-column":ve()},showFeedback:_e.value,feedback:e.feedback,labelStyle:X.value},{id:z.value,uuid:$,onClick:ye,"widget-type":H.value.componentType,"field-key":K(U.value),"field-address":N(V.value),required:Y.value}),{...s,default:ce,label:ue})}}),h({title:"label"},((e,l)=>{const t=v(l)?void 0:s(l.selfErrors).length?function(e,l){if(!_(l.defined_error_msg)||!l.defined_error_msg)return e.map((e=>T(e,l))).join(",");return T(l.defined_error_msg,l)}(s(l.selfErrors),e.fieldItem):void 0;return{...e,fieldItem:void 0,feedback:t,"validation-status":t?"error":void 0}})));export{H as FORM_ITEM};
@@ -1 +1 @@
1
- import{defineComponent as e,computed as o,openBlock as s,createBlock as r,unref as i,withCtx as t,createVNode as n,createElementVNode as a,createElementBlock as l,Fragment as m,renderList as p,toDisplayString as g}from"vue";import{HelpCircleOutline as f}from"@vicons/ionicons5";import{isString as u}from"lodash-es";import{NTooltip as c}from"naive-ui";const d={style:{display:"inline-flex","flex-direction":"column"}};var v=e({__name:"tooltipMessage",props:{message:String},setup(e){const v=e,x=o((()=>u(v.message)?v.message.split("<br>"):[]));return(e,o)=>(s(),r(i(c),{trigger:"hover"},{trigger:t((()=>[n(i(f))])),default:t((()=>[a("section",d,[(s(!0),l(m,null,p(i(x),(e=>(s(),l("span",{key:e},g(e),1)))),128))])])),_:1}))}});export{v as default};
1
+ import{defineComponent as e,computed as s,openBlock as o,createBlock as r,unref as t,withCtx as i,renderSlot as n,createVNode as l,createElementVNode as a,createElementBlock as m,Fragment as p,renderList as g,toDisplayString as f}from"vue";import{HelpCircleOutline as u}from"@vicons/ionicons5";import{isString as c}from"lodash-es";import{NTooltip as d}from"naive-ui";const v={style:{display:"inline-flex","flex-direction":"column"}};var x=e({__name:"tooltipMessage",props:{message:String},setup(e){const x=e,y=s((()=>c(x.message)?x.message.split("<br>"):[]));return(e,s)=>(o(),r(t(d),{trigger:"hover"},{trigger:i((()=>[n(e.$slots,"trigger",{},(()=>[l(t(u))]))])),default:i((()=>[a("section",v,[(o(!0),m(p,null,g(t(y),(e=>(o(),m("span",{key:e},f(e),1)))),128))])])),_:3}))}});export{x as default};
@@ -131,6 +131,7 @@ export type FieldItem = {
131
131
  bordered: boolean | string;
132
132
  displayMode: 'table' | 'form';
133
133
  editor_title: string;
134
+ editor_title_mode: 'EMBEDDED_FORM' | 'HOVER_TOOLTIP' | 'POPUP_ALERT';
134
135
  linebarWidth: string;
135
136
  linebarDirection: 'horizontal' | 'vertical';
136
137
  linebarTextDirection: 'horizontal' | 'vertical';
@@ -652,12 +652,14 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
652
652
  setScrollToButtom: () => Promise<void>;
653
653
  resetInfo: () => void;
654
654
  setReferenceMsg: (msgItem: import("../../shared/types").AnyObject) => void;
655
+ handleSelect: (key: string, msgItem: import("../../shared/types").AnyObject) => void;
655
656
  NAvatar: any;
656
657
  NImageGroup: any;
657
658
  NImage: any;
658
659
  NIcon: any;
659
660
  NButtonGroup: any;
660
661
  NButton: any;
662
+ NFlex: any;
661
663
  PersonProfile: import("vue").DefineComponent<{
662
664
  userId: {
663
665
  type: StringConstructor;
@@ -838,18 +840,18 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
838
840
  }, {
839
841
  show: boolean;
840
842
  }>;
841
- downloadFile: typeof import("./src/utils").downloadFile;
842
843
  simplifyMessage: typeof import("./src/utils").simplifyMessage;
843
844
  isAudioOrVideoMessage: typeof import("./src/utils").isAudioOrVideoMessage;
844
845
  getAVTime: typeof import("./src/utils").getAVTime;
845
846
  MESSAGE_TYPE: typeof import("./src/constants").MESSAGE_TYPE;
846
847
  ChatbubbleEllipsesOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
848
+ EllipsisHorizontal: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
847
849
  CallOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
848
850
  VideocamOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
851
+ DocumentSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
849
852
  }, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
850
853
  ChatFooter: import("vue").DefineComponent<{}, {
851
854
  inputRef: import("vue").Ref<HTMLDivElement | undefined>;
852
- content: import("vue").Ref<string>;
853
855
  state: import("./src/types").IState;
854
856
  sendMessage: (message: {
855
857
  chatType?: string | undefined;
@@ -858,6 +860,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
858
860
  }) => Promise<void>;
859
861
  isGroupChat: import("vue").ComputedRef<boolean>;
860
862
  showEmoji: import("vue").Ref<boolean>;
863
+ content: import("vue").Ref<string>;
861
864
  chatAddProps: import("vue").ComputedRef<{
862
865
  options: import("../../shared/types").AnyObject[];
863
866
  defaultValue: import("../../shared/types").AnyObject[];
@@ -1141,6 +1144,20 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
1141
1144
  timer: any;
1142
1145
  seconds: number;
1143
1146
  };
1147
+ installEventHandlers: ({ handleError, handleRemoteUserEnter, handleRemoteAudioAvailable, handleRemoteUserExit, handleRemoteVideoAvailable }: {
1148
+ handleError: import("../../shared/types").AnyFn;
1149
+ handleRemoteUserEnter: import("../../shared/types").AnyFn;
1150
+ handleRemoteAudioAvailable: import("../../shared/types").AnyFn;
1151
+ handleRemoteUserExit: import("../../shared/types").AnyFn;
1152
+ handleRemoteVideoAvailable: import("../../shared/types").AnyFn;
1153
+ }) => void;
1154
+ uninstallEventHandlers: ({ handleError, handleRemoteUserEnter, handleRemoteAudioAvailable, handleRemoteUserExit, handleRemoteVideoAvailable }: {
1155
+ handleError: import("../../shared/types").AnyFn;
1156
+ handleRemoteUserEnter: import("../../shared/types").AnyFn;
1157
+ handleRemoteAudioAvailable: import("../../shared/types").AnyFn;
1158
+ handleRemoteUserExit: import("../../shared/types").AnyFn;
1159
+ handleRemoteVideoAvailable: import("../../shared/types").AnyFn;
1160
+ }) => void;
1144
1161
  videoRef: import("vue").Ref<any>;
1145
1162
  selfVideoRef: import("vue").Ref<any>;
1146
1163
  isConnect: import("vue").Ref<boolean>;
@@ -1157,8 +1174,6 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
1157
1174
  handleEnter: () => Promise<void>;
1158
1175
  handleFinish: () => void;
1159
1176
  handleExit: () => Promise<void>;
1160
- installEventHandlers: () => void;
1161
- uninstallEventHandlers: () => void;
1162
1177
  handleRemoteVideoAvailable: (event: any) => Promise<void>;
1163
1178
  handleRemoteAudioAvailable: (event: any) => void;
1164
1179
  handleRemoteUserEnter: () => void;
@@ -1195,6 +1210,20 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
1195
1210
  timing: import("vue").Ref<string>;
1196
1211
  toggleVideo: () => Promise<void>;
1197
1212
  videocamOpen: import("vue").Ref<boolean>;
1213
+ installEventHandlers: ({ handleError, handleRemoteUserEnter, handleRemoteAudioAvailable, handleRemoteUserExit, handleRemoteVideoAvailable }: {
1214
+ handleError: import("../../shared/types").AnyFn;
1215
+ handleRemoteUserEnter: import("../../shared/types").AnyFn;
1216
+ handleRemoteAudioAvailable: import("../../shared/types").AnyFn;
1217
+ handleRemoteUserExit: import("../../shared/types").AnyFn;
1218
+ handleRemoteVideoAvailable: import("../../shared/types").AnyFn;
1219
+ }) => void;
1220
+ uninstallEventHandlers: ({ handleError, handleRemoteUserEnter, handleRemoteAudioAvailable, handleRemoteUserExit, handleRemoteVideoAvailable }: {
1221
+ handleError: import("../../shared/types").AnyFn;
1222
+ handleRemoteUserEnter: import("../../shared/types").AnyFn;
1223
+ handleRemoteAudioAvailable: import("../../shared/types").AnyFn;
1224
+ handleRemoteUserExit: import("../../shared/types").AnyFn;
1225
+ handleRemoteVideoAvailable: import("../../shared/types").AnyFn;
1226
+ }) => void;
1198
1227
  isConnect: import("vue").Ref<boolean>;
1199
1228
  callUser: import("vue").ComputedRef<any>;
1200
1229
  title: import("vue").ComputedRef<string>;
@@ -1202,8 +1231,6 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
1202
1231
  handleCall: () => void;
1203
1232
  handleEnter: () => Promise<void>;
1204
1233
  handleExit: () => Promise<void>;
1205
- installEventHandlers: () => void;
1206
- uninstallEventHandlers: () => void;
1207
1234
  handleRemoteVideoAvailable: (event: any) => Promise<void>;
1208
1235
  handleRemoteAudioAvailable: (event: any) => Promise<void>;
1209
1236
  handleRemoteUserEnter: (event: any) => Promise<void>;