@next-bricks/diagram 0.23.2 → 0.24.1

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.
package/dist/types.json CHANGED
@@ -1,71 +1,4 @@
1
1
  {
2
- "diagram.editable-label": {
3
- "properties": [
4
- {
5
- "name": "label",
6
- "annotation": {
7
- "type": "keyword",
8
- "value": "string"
9
- }
10
- },
11
- {
12
- "name": "type",
13
- "annotation": {
14
- "type": "reference",
15
- "typeName": {
16
- "type": "identifier",
17
- "name": "LabelType"
18
- }
19
- }
20
- }
21
- ],
22
- "events": [
23
- {
24
- "name": "label.editing.change",
25
- "detail": {
26
- "annotation": {
27
- "type": "keyword",
28
- "value": "boolean"
29
- }
30
- }
31
- },
32
- {
33
- "name": "label.change",
34
- "detail": {
35
- "annotation": {
36
- "type": "keyword",
37
- "value": "string"
38
- }
39
- }
40
- }
41
- ],
42
- "methods": [
43
- {
44
- "name": "enableEditing",
45
- "params": [],
46
- "returns": {}
47
- }
48
- ],
49
- "types": [
50
- {
51
- "type": "typeAlias",
52
- "name": "LabelType",
53
- "annotation": {
54
- "type": "union",
55
- "types": [
56
- {
57
- "type": "jsLiteral",
58
- "value": "line"
59
- },
60
- {
61
- "type": "jsLiteral",
62
- "value": "default"
63
- }
64
- ]
65
- }
66
- }
67
- ]
68
- },
69
2
  "diagram.experimental-node": {
70
3
  "properties": [
71
4
  {
@@ -227,6 +160,73 @@
227
160
  }
228
161
  ]
229
162
  },
163
+ "diagram.editable-label": {
164
+ "properties": [
165
+ {
166
+ "name": "label",
167
+ "annotation": {
168
+ "type": "keyword",
169
+ "value": "string"
170
+ }
171
+ },
172
+ {
173
+ "name": "type",
174
+ "annotation": {
175
+ "type": "reference",
176
+ "typeName": {
177
+ "type": "identifier",
178
+ "name": "LabelType"
179
+ }
180
+ }
181
+ }
182
+ ],
183
+ "events": [
184
+ {
185
+ "name": "label.editing.change",
186
+ "detail": {
187
+ "annotation": {
188
+ "type": "keyword",
189
+ "value": "boolean"
190
+ }
191
+ }
192
+ },
193
+ {
194
+ "name": "label.change",
195
+ "detail": {
196
+ "annotation": {
197
+ "type": "keyword",
198
+ "value": "string"
199
+ }
200
+ }
201
+ }
202
+ ],
203
+ "methods": [
204
+ {
205
+ "name": "enableEditing",
206
+ "params": [],
207
+ "returns": {}
208
+ }
209
+ ],
210
+ "types": [
211
+ {
212
+ "type": "typeAlias",
213
+ "name": "LabelType",
214
+ "annotation": {
215
+ "type": "union",
216
+ "types": [
217
+ {
218
+ "type": "jsLiteral",
219
+ "value": "line"
220
+ },
221
+ {
222
+ "type": "jsLiteral",
223
+ "value": "default"
224
+ }
225
+ ]
226
+ }
227
+ }
228
+ ]
229
+ },
230
230
  "eo-diagram": {
231
231
  "properties": [
232
232
  {
@@ -2097,6 +2097,13 @@
2097
2097
  ]
2098
2098
  }
2099
2099
  },
2100
+ {
2101
+ "name": "fadeUnrelatedCells",
2102
+ "annotation": {
2103
+ "type": "keyword",
2104
+ "value": "boolean"
2105
+ }
2106
+ },
2100
2107
  {
2101
2108
  "name": "zoomable",
2102
2109
  "annotation": {
@@ -10,6 +10,7 @@ export interface CellComponentProps {
10
10
  transform: TransformLiteral;
11
11
  markerEnd: string;
12
12
  active: boolean;
13
+ unrelatedCells: Cell[];
13
14
  onCellMoving(info: MoveCellPayload): void;
14
15
  onCellMoved(info: MoveCellPayload): void;
15
16
  onCellResizing(info: ResizeCellPayload): void;
@@ -22,4 +23,4 @@ export interface CellComponentProps {
22
23
  }): void;
23
24
  onDecoratorTextChange(detail: DecoratorTextChangeDetail): void;
24
25
  }
25
- export declare function CellComponent({ cell, cells, defaultNodeBricks, defaultEdgeLines, markerEnd, active, transform, onCellMoving, onCellMoved, onCellResizing, onCellResized, onSwitchActiveTarget, onCellContextMenu, onDecoratorTextEditing, onDecoratorTextChange, }: CellComponentProps): JSX.Element | null;
26
+ export declare function CellComponent({ cell, cells, defaultNodeBricks, defaultEdgeLines, markerEnd, active, transform, unrelatedCells, onCellMoving, onCellMoved, onCellResizing, onCellResized, onSwitchActiveTarget, onCellContextMenu, onDecoratorTextEditing, onDecoratorTextChange, }: CellComponentProps): JSX.Element | null;
@@ -11,6 +11,7 @@ export interface EoDrawCanvasProps {
11
11
  defaultNodeBricks?: NodeBrickConf[];
12
12
  defaultEdgeLines?: EdgeLineConf[];
13
13
  activeTarget?: ActiveTarget | null;
14
+ fadeUnrelatedCells?: boolean;
14
15
  zoomable?: boolean;
15
16
  scrollable?: boolean;
16
17
  pannable?: boolean;
@@ -70,6 +71,7 @@ export declare class EoDrawCanvas extends ReactNextElement implements EoDrawCanv
70
71
  */
71
72
  accessor defaultEdgeLines: EdgeLineConf[] | undefined;
72
73
  accessor activeTarget: ActiveTarget | null | undefined;
74
+ accessor fadeUnrelatedCells: boolean | undefined;
73
75
  accessor zoomable: boolean | undefined;
74
76
  accessor scrollable: boolean | undefined;
75
77
  accessor pannable: boolean | undefined;
@@ -0,0 +1,2 @@
1
+ import type { ActiveTarget, Cell } from "../interfaces";
2
+ export declare function getUnrelatedCells(cells: Cell[], activeTarget: ActiveTarget | null): Cell[];
@@ -43,7 +43,7 @@
43
43
  }
44
44
  },
45
45
  ].concat(
46
- ["X", "Y", "Z"].map((id) => ({
46
+ ["X", "Y", "Z", "W"].map((id) => ({
47
47
  type: "node",
48
48
  id,
49
49
  data: {
@@ -286,6 +286,7 @@
286
286
  width: 100%
287
287
  height: 100%
288
288
  activeTarget: <%= CTX.activeTarget %>
289
+ fadeUnrelatedCells: true
289
290
  # Initial nodes only
290
291
  defaultNodeSize: [60, 60]
291
292
  defaultNodeBricks:
@@ -297,7 +298,9 @@
297
298
  <%=
298
299
  CTX.activeTarget?.type === "node" && CTX.activeTarget.id === DATA.node.id
299
300
  ? "highlighted"
300
- // : CTX.activeTarget && CTX.activeTarget?.id !== DATA.node.id
301
+ // : CTX.unrelated.some(n =>
302
+ // n.type === "node" && n.id === DATA.node.id
303
+ // )
301
304
  // ? "faded"
302
305
  : "default"
303
306
  %>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@next-bricks/diagram",
3
- "version": "0.23.2",
3
+ "version": "0.24.1",
4
4
  "homepage": "https://github.com/easyops-cn/next-bricks/tree/master/bricks/diagram",
5
5
  "repository": {
6
6
  "type": "git",
@@ -41,5 +41,5 @@
41
41
  "@next-bricks/basic": "*",
42
42
  "@next-bricks/icons": "*"
43
43
  },
44
- "gitHead": "f262c0593dd404acc8bbb9b08122b9259d1519a4"
44
+ "gitHead": "501a5f83e26e209a4b30e40fc3c75ff0cf2b62ab"
45
45
  }
@@ -1,2 +0,0 @@
1
- "use strict";(self.webpackChunk_next_bricks_diagram=self.webpackChunk_next_bricks_diagram||[]).push([[2696],{5776:(e,t,n)=>{n.d(t,{s:()=>E});var r=n(5600),a=n.n(r),o=n(1252),i=n.n(o),c=n(7181),l=n(6960),d=n(960);function s(e,t){return e.find((e=>(0,c.G4)(e)&&e.id===t))}function v(e){var{edge:t,cells:n,markerEnd:o,defaultEdgeLines:c}=e,v=(0,r.useMemo)((()=>s(n,t.source)),[n,t.source]),f=(0,r.useMemo)((()=>s(n,t.target)),[n,t.target]),h=(0,r.useMemo)((()=>null==c?void 0:c.find((e=>(0,l.checkIfByTransform)(e,{edge:t})))),[c,t]),w=(0,r.useMemo)((()=>v&&f?(0,d.g)(u(v.view,5),u(f.view,5)):null),[v,f]);if(!w)return null;var m="M".concat(w[0].x," ").concat(w[0].y,"L").concat(w[1].x," ").concat(w[1].y);return a().createElement(a().Fragment,null,a().createElement("path",{d:m,fill:"none",stroke:"transparent",strokeWidth:16}),a().createElement("path",{className:i()("line",{dashed:null==h?void 0:h.dashed}),d:m,fill:"none",stroke:"gray",markerEnd:"url(#".concat(o,")")}),a().createElement("path",{className:"line-active-bg",d:m,fill:"none"}))}function u(e,t){return{x:e.x+e.width/2,y:e.y+e.height/2,width:e.width+t,height:e.height+t}}var f=n(6196),h=n(7568);function w(e){var{node:t,defaultNodeBricks:n}=e,o=function(e){var[t,n]=(0,r.useState)(e);return(0,r.useEffect)((()=>{n((t=>(0,h.isEqual)(t,e)?t:e))}),[e]),t}({node:{id:t.id,data:t.data}}),i=t.useBrick,c=(0,r.useMemo)((()=>{var e;return null!=i?i:null==n||null===(e=n.find((e=>(0,l.checkIfByTransform)(e,o))))||void 0===e?void 0:e.useBrick}),[n,i,o]);return c?a().createElement("foreignObject",{width:t.view.width,height:t.view.height,className:"node"},c&&a().createElement(f.ReactUseBrick,{useBrick:c,data:o})):null}function m(e){return"edge"===e.type?(0,h.pick)(e,["type","source","target","data"]):(0,h.pick)(e,["type","id","data"])}function g(e,t){var{action:n,cell:r,scale:a,onCellMoving:o,onCellMoved:i,onCellResizing:c,onCellResized:l,onSwitchActiveTarget:d}=t;if(e.stopPropagation(),d(m(r)),"edge"!==r.type){var s=[e.clientX,e.clientY],v="move"===n?[r.view.x,r.view.y]:[r.view.width,r.view.height],u=!1,f=(e,t)=>{var d,f,h=function(e){return[(e.clientX-s[0])/a,(e.clientY-s[1])/a]}(e);u||(u=h[0]**2+h[1]**2>=9),u&&("move"===n?null===(d=t?i:o)||void 0===d||d({type:r.type,id:r.id,x:v[0]+h[0],y:v[1]+h[1]}):null===(f=t?l:c)||void 0===f||f({type:r.type,id:r.id,width:v[0]+h[0],height:v[1]+h[1]}))},h=e=>{f(e)},w=e=>{f(e,!0),u=!1,document.removeEventListener("mousemove",h),document.removeEventListener("mouseup",w)};document.addEventListener("mousemove",h),document.addEventListener("mouseup",w)}}function p(e){var{cell:t,transform:n,onCellResizing:o,onCellResized:i,onSwitchActiveTarget:c}=e,l=a().useRef(null);return(0,r.useEffect)((()=>{var e=l.current,r=e=>{g(e,{action:"resize",cell:t,scale:n.k,onCellResizing:o,onCellResized:i,onSwitchActiveTarget:c})};return null==e||e.addEventListener("mousedown",r),()=>{null==e||e.removeEventListener("mousedown",r)}}),[t,i,o,c,n.k]),a().createElement("g",{className:"decorator-area"},a().createElement("rect",{width:t.view.width,height:t.view.height,className:"area"}),a().createElement("g",{ref:l,className:"resize-handle",transform:"translate(".concat(t.view.width-20," ").concat(t.view.height-20,")")},a().createElement("rect",{width:20,height:20}),a().createElement("path",{d:"M10 18L18 10 M15 18L18 15"})))}var y=n(4412);function k(e){var t,{cell:n,onDecoratorTextEditing:o,onDecoratorTextChange:c}=e,l=null!==(t=n.view.text)&&void 0!==t?t:"",[d,s]=(0,r.useState)(l),[v,u]=(0,r.useState)(!1),f=(0,r.useRef)(!1),[h,w]=(0,r.useState)(!1),m=(0,r.useRef)(null),g=(0,r.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),u(!0)}),[]);(0,r.useEffect)((()=>{var e=m.current;e&&e.textContent!==d&&(e.textContent=d)}),[d]),(0,r.useEffect)((()=>{v&&m.current&&(m.current.focus(),function(e){var t=document.createRange();t.selectNodeContents(e);var n=window.getSelection();n.removeAllRanges(),n.addRange(t)}(m.current)),o({id:n.id,editing:v})}),[n.id,v,o]),(0,r.useEffect)((()=>{f.current?null==o||o({id:n.id,editing:v}):f.current=!0}),[n.id,v,o]);var p=(0,r.useCallback)((e=>{s(e.target.textContent)}),[]),k=(0,r.useCallback)((()=>{u(!1),w(!0)}),[]);return(0,r.useEffect)((()=>{h&&(null==c||c({id:n.id,view:(0,y.c)((0,y.c)({},n.view),{},{text:d})}),w(!1))}),[n,d,c,h]),a().createElement("foreignObject",{className:"decorator-text"},a().createElement("div",{className:i()("text-container",{editing:v}),onDoubleClick:g},a().createElement("div",{className:"text",contentEditable:v,ref:m,onInput:p,onBlur:k})))}function x(e){var t,{cell:n,transform:r,onCellResizing:o,onCellResized:i,onSwitchActiveTarget:c,onDecoratorTextEditing:l,onDecoratorTextChange:d}=e;switch(n.decorator){case"area":t=p;break;case"text":t=k;break;default:return console.error("Unknown decorator: ".concat(n.decorator)),null}return a().createElement(t,{cell:n,transform:r,onCellResizing:o,onCellResized:i,onSwitchActiveTarget:c,onDecoratorTextEditing:l,onDecoratorTextChange:d})}function E(e){var{cell:t,cells:n,defaultNodeBricks:o,defaultEdgeLines:l,markerEnd:d,active:s,transform:u,onCellMoving:f,onCellMoved:h,onCellResizing:p,onCellResized:y,onSwitchActiveTarget:k,onCellContextMenu:E,onDecoratorTextEditing:C,onDecoratorTextChange:M}=e,z=(0,r.useRef)(null);(0,r.useEffect)((()=>{var e=z.current,n=e=>{g(e,{action:"move",cell:t,scale:u.k,onCellMoving:f,onCellMoved:h,onSwitchActiveTarget:k})};return null==e||e.addEventListener("mousedown",n),()=>{null==e||e.removeEventListener("mousedown",n)}}),[t,h,f,k,u.k]);var b=(0,r.useCallback)((e=>{e.preventDefault(),k(m(t)),E({cell:t,clientX:e.clientX,clientY:e.clientY})}),[t,E,k]);return a().createElement("g",{className:i()("cell",{active:s}),ref:z,transform:"edge"===t.type?void 0:"translate(".concat(t.view.x," ").concat(t.view.y,")"),onContextMenu:b},(0,c.G4)(t)?a().createElement(w,{node:t,defaultNodeBricks:o}):(0,c.Wk)(t)?a().createElement(v,{edge:t,defaultEdgeLines:l,cells:n,markerEnd:d}):(0,c.c1)(t)?a().createElement(x,{cell:t,transform:u,onCellResizing:p,onCellResized:y,onSwitchActiveTarget:k,onDecoratorTextEditing:C,onDecoratorTextChange:M}):null)}},8044:(e,t,n)=>{n.d(t,{E:()=>c});var r=n(5600),a=n.n(r),o=n(1252),i=n.n(o);function c(e){var{connectLineState:t,transform:n,markerEnd:o,onConnect:c}=e,[l,d]=(0,r.useState)(null);return(0,r.useEffect)((()=>{t&&d(t.from)}),[t]),(0,r.useEffect)((()=>{if(t){var e=e=>{d([(e.clientX-n.x-t.offset[0])/n.k,(e.clientY-n.y-t.offset[1])/n.k])},r=e=>{e.stopPropagation()},a=e=>{e.stopPropagation(),o(),c(t,[(e.clientX-n.x-t.offset[0])/n.k,(e.clientY-n.y-t.offset[1])/n.k])},o=()=>{document.removeEventListener("mousemove",e),document.removeEventListener("mousedown",r,{capture:!0}),document.removeEventListener("click",a,{capture:!0}),d(null)};return document.addEventListener("mousemove",e),document.addEventListener("mousedown",r,{capture:!0}),document.addEventListener("click",a,{capture:!0}),o}}),[t,c,n]),a().createElement("path",{className:i()("connect-line",{connecting:!!t&&l&&(l[0]-t.from[0])**2+(l[1]-t.from[1])**2>25}),d:t&&l?"M".concat(t.from.join(" "),"L").concat(l.join(" ")):"",fill:"none",stroke:"gray",strokeWidth:1,markerEnd:"url(#".concat(o,")")})}},7181:(e,t,n)=>{function r(e){return"node"===e.type}function a(e){return"decorator"===e.type}function o(e){return"node"===e.type}function i(e){return"edge"===e.type}n.d(t,{Cy:()=>o,G4:()=>r,Wk:()=>i,c1:()=>a})},6876:(e,t,n)=>{n.d(t,{Y:()=>a});var r=n(4552);function a(e,t){var{cells:n,activeTarget:a}=t,o=n.find((e=>(0,r.M)(e,a)));if(o)switch(e.key||e.keyCode||e.which){case"Backspace":case 8:case"Delete":case 46:return e.preventDefault(),e.stopPropagation(),{action:"delete-cell",cell:o}}}},7876:(e,t,n)=>{n.d(t,{S:()=>o});var r=n(4412),a=n(7181);function o(e,t){var{defaultNodeSize:n}=t;return(null!=e?e:[]).map((e=>{var t,o;return!(0,a.Cy)(e)||void 0!==(null===(t=e.view)||void 0===t?void 0:t.width)&&void 0!==(null===(o=e.view)||void 0===o?void 0:o.height)?e:(0,r.c)((0,r.c)({},e),{},{view:(0,r.c)({width:n[0],height:n[1]},e.view)})}))}},4552:(e,t,n)=>{function r(e,t){return e?!!t&&e.type===t.type&&("node"===e.type||"decorator"===e.type?e.id===t.id:e.source===t.source&&e.target===t.target):!t}n.d(t,{M:()=>r})},3788:(e,t,n)=>{n.d(t,{c:()=>a});var r=n(7181);function a(e,t){var{canvasWidth:n,canvasHeight:a,scaleRange:o}=t,i=1/0,c=1/0,l=-1/0,d=-1/0,s=!0;for(var v of e)if(!(0,r.Wk)(v)){s=!1;var{view:u}=v,f=u.x+u.width,h=u.y+u.height;u.x<i&&(i=u.x),f>l&&(l=f),u.y<c&&(c=u.y),h>d&&(d=h)}var w=l-i,m=d-c,g=o&&!s&&(w>n||m>a)?Math.max(Math.min(n/w,a/m,o[1]),o[0]):1;return{x:s?0:(n-w*g)/2-i*g,y:s?0:(a-m*g)/2-c*g,k:g}}},2872:(e,t,n)=>{n.d(t,{s:()=>o});var r=n(7181),a=n(7876);function o(e){var{cells:t,defaultNodeSize:n,canvasHeight:o,transform:i,reason:c,parent:l}=e,d=(0,a.S)(t,{defaultNodeSize:n}),s=[],v=new Map;for(var u of d)(0,r.G4)(u)&&v.set(u.id,u);var f=!1;if("add-related-nodes"===c&&l){var h=new Set;for(var w of d)(0,r.Wk)(w)&&w.source===l&&w.target!==l&&h.add(w.target);var m=v.get(l);if(void 0!==(null==m?void 0:m.view.x)&&void 0!==m.view.y){f=!0;var g=[...h].map((e=>v.get(e))).filter(Boolean),p=void 0;for(var y of g)void 0!==y.view.x&&void 0!==y.view.y?(!p||y.view.x>p.view.x)&&y.view.y>m.view.y&&(p=y):s.push(y);if(s.length>0){var k,x;if(p)k=p.view.x+p.view.width+20,x=p.view.y;else{var E=s.reduce(((e,t)=>e+t.view.width+20),-20);k=m.view.x-E/2+m.view.width/2,x=m.view.y+m.view.height+20}for(var C of s)C.view.x=k,C.view.y=x,k+=C.view.width+20}}}if(!f){var M=n[0],z=n[1],b=[];for(var L of d)(0,r.G4)(L)&&(L.view.width>M&&(M=L.view.width),L.view.height>z&&(z=L.view.height),void 0===L.view.x||void 0===L.view.y?s.push(L):b.push(L.view));var R=M+20,S=z+20,T=new Set;for(var N of b)for(var D=Math.floor((N.x+i.x/i.k)/R),B=Math.floor((N.y+i.y/i.k)/S),A=Math.floor((N.x+i.x/i.k+N.width)/R),I=Math.floor((N.y+i.y/i.k+N.height)/S),W=D;W<=A;W++)for(var Y=B;Y<=I;Y++)T.add("".concat(W,",").concat(Y));var j=R*i.k,X=S*i.k,_=Math.max(1,Math.floor(o/X)),G=0;for(var P of s){var O=void 0,H=void 0;do{O=Math.floor(G/_),H=G%_,G++}while(T.has("".concat(O,",").concat(H)));P.view.x=(O*j-i.x)/i.k+10,P.view.y=(H*X-i.y)/i.k+10}}return{cells:d,updated:s}}},3876:(e,t,n)=>{n.d(t,{M:()=>i});var r=n(4412);function a(e,t,n){var r=e.findLastIndex(n)+1;return[...e.slice(0,r),t,...e.slice(r)]}var o,i=(o={cells:(e,t)=>{switch(t.type){case"drop-node":return a(e,t.payload,(e=>!("decorator"===e.type&&"text"===e.decorator)));case"drop-decorator":return"text"===t.payload.decorator?[...e,t.payload]:a(e,t.payload,(e=>"decorator"===e.type&&"area"===e.decorator));case"add-nodes":var n=e.findLastIndex((e=>!("decorator"===e.type&&"text"===e.decorator)))+1;return[...e.slice(0,n),...t.payload,...e.slice(n)];case"add-edge":return a(e,t.payload,(e=>"edge"===e.type||"decorator"===e.type&&"area"===e.decorator));case"move-cell":var{type:o,id:i,x:c,y:l}=t.payload,d=e.findIndex((e=>e.type===o&&e.id===i));if(-1!==d){var s=e[d];return[...e.slice(0,d),(0,r.c)((0,r.c)({},s),{},{view:(0,r.c)((0,r.c)({},s.view),{},{x:c,y:l})}),...e.slice(d+1)]}return e;case"resize-cell":var{type:v,id:u,width:f,height:h}=t.payload,w=e.findIndex((e=>e.type===v&&e.id===u));if(-1!==w){var m=e[w];return[...e.slice(0,w),(0,r.c)((0,r.c)({},m),{},{view:(0,r.c)((0,r.c)({},m.view),{},{width:f,height:h})}),...e.slice(w+1)]}return e;case"update-cells":return t.payload}return e}},(e,t)=>Object.fromEntries(Object.entries(o).map((n=>{var[r,a]=n;return[r,a(e[r],t)]}))))},7584:(e,t,n)=>{n.d(t,{c:()=>c});var r=n(8304),a=n.n(r),o=n(1849),i=n.n(o)()(a());i.push([e.id,"*{box-sizing:border-box}:host{display:block;position:relative;overflow:hidden}:host,\n.root{width:100%;height:100%}:host([hidden]){display:none}.root:focus{outline:none}.decorator-area .area{fill:rgba(119,141,195,0.1);stroke:none;stroke-width:0}.node,\n.decorator-text{overflow:visible}.cell.active .decorator-area .area,\n.cell.active .line-active-bg{stroke:var(--palette-blue-5);stroke-dasharray:4;stroke-width:1}.cell{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-handle{cursor:nwse-resize;opacity:0}.resize-handle rect{fill:transparent;stroke:none}.resize-handle path{fill:none;stroke:var(--palette-gray-5);stroke-width:1.5}.cell.active .decorator-area .resize-handle,\n.decorator-area:hover .resize-handle{opacity:1}.connect-line:not(.connecting){display:none}.line.dashed{stroke-dasharray:4}.cell.active .decorator-text .text-container{outline:1px dashed var(--palette-blue-5)}.decorator-text .text-container{width:-webkit-max-content;width:-moz-max-content;width:max-content;padding:0.5em}.decorator-text .text:focus{outline:none}",""]);const c=i.toString()}}]);
2
- //# sourceMappingURL=2696.826d69c1.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"chunks/2696.826d69c1.js","mappings":"oNAGO,SAASA,EAASC,EAAeC,GACtC,OAAOD,EAAME,MAAMC,IAASC,EAAAA,EAAAA,IAAWD,IAASA,EAAKF,KAAOA,GAG9D,CCQO,SAASI,EAAaC,GAKc,IALb,KAC5BC,EAAI,MACJP,EAAK,UACLQ,EAAS,iBACTC,GACmBH,EACbI,GAAaC,EAAAA,EAAAA,UACjB,IAAMZ,EAASC,EAAOO,EAAKK,SAC3B,CAACZ,EAAOO,EAAKK,SAETC,GAAaF,EAAAA,EAAAA,UACjB,IAAMZ,EAASC,EAAOO,EAAKO,SAC3B,CAACd,EAAOO,EAAKO,SAETC,GAAWJ,EAAAA,EAAAA,UACf,IAAMF,aAAgB,EAAhBA,EAAkBP,MAAMc,IAASC,EAAAA,EAAAA,oBAAmBD,EAAM,CAAET,YAClE,CAACE,EAAkBF,IAKfW,GAAOP,EAAAA,EAAAA,UACX,IACED,GAAcG,GACVM,EAAAA,EAAAA,GACEC,EAAmBV,EAAWW,KANxB,GAOND,EAAmBP,EAAWQ,KAPxB,IASR,MACN,CAACX,EAAYG,IAGf,IAAKK,EAEH,OAAO,KAGT,IAAMI,EAAI,IAAHC,OAAOL,EAAK,GAAGM,EAAC,KAAAD,OAAIL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DyJ,EACAvH,EAAMsM,EAAM/E,GAAiBrG,GAC9B,K,mECbH0L,E,MAA0B,GAA4B,KAE1DA,EAAwB1C,KAAK,CAAC2C,EAAOpP,GAAI,0iCAIqU,KAE9W,QAAemP,EAAwBE,U","sources":["webpack:///./src/draw-canvas/processors/findNode.ts","webpack:///./src/draw-canvas/EdgeComponent.tsx","webpack:///./src/draw-canvas/NodeComponent.tsx","webpack:///./src/draw-canvas/processors/cellToTarget.ts","webpack:///./src/draw-canvas/processors/handleMouseDown.ts","webpack:///./src/draw-canvas/decorators/DecoratorArea.tsx","webpack:///./src/draw-canvas/decorators/DecoratorText.tsx","webpack:///./src/draw-canvas/decorators/index.tsx","webpack:///./src/draw-canvas/CellComponent.tsx","webpack:///./src/draw-canvas/ConnectLineComponent.tsx","webpack:///./src/draw-canvas/processors/asserts.ts","webpack:///./src/draw-canvas/processors/handleKeyboard.ts","webpack:///./src/draw-canvas/processors/initializeCells.ts","webpack:///./src/draw-canvas/processors/sameTarget.ts","webpack:///./src/draw-canvas/processors/transformToCenter.ts","webpack:///./src/draw-canvas/processors/updateCells.ts","webpack:///./src/draw-canvas/reducers/cells.ts","webpack:///./src/draw-canvas/reducers/index.ts","webpack:///./src/draw-canvas/styles.shadow.css"],"sourcesContent":["import type { Cell, NodeCell, NodeId } from \"../interfaces\";\nimport { isNodeCell } from \"./asserts\";\n\nexport function findNode(cells: Cell[], id: NodeId): NodeCell | undefined {\n return cells.find((cell) => isNodeCell(cell) && cell.id === id) as\n | NodeCell\n | undefined;\n}\n","import React, { useMemo } from \"react\";\nimport { checkIfByTransform } from \"@next-core/runtime\";\nimport classNames from \"classnames\";\nimport type { Cell, EdgeCell, EdgeLineConf, NodeView } from \"./interfaces\";\nimport { getDirectLinePoints } from \"../diagram/lines/getDirectLinePoints\";\nimport type { NodeRect } from \"../diagram/interfaces\";\nimport { findNode } from \"./processors/findNode\";\n\nexport interface EdgeComponentProps {\n edge: EdgeCell;\n cells: Cell[];\n markerEnd: string;\n defaultEdgeLines?: EdgeLineConf[];\n}\n\nexport function EdgeComponent({\n edge,\n cells,\n markerEnd,\n defaultEdgeLines,\n}: EdgeComponentProps): JSX.Element | null {\n const sourceNode = useMemo(\n () => findNode(cells, edge.source),\n [cells, edge.source]\n );\n const targetNode = useMemo(\n () => findNode(cells, edge.target),\n [cells, edge.target]\n );\n const lineConf = useMemo(\n () => defaultEdgeLines?.find((item) => checkIfByTransform(item, { edge })),\n [defaultEdgeLines, edge]\n );\n\n const padding = 5;\n\n const line = useMemo(\n () =>\n sourceNode && targetNode\n ? getDirectLinePoints(\n nodeViewToNodeRect(sourceNode.view, padding),\n nodeViewToNodeRect(targetNode.view, padding)\n )\n : null,\n [sourceNode, targetNode]\n );\n\n if (!line) {\n // This happens when source or target is not found\n return null;\n }\n\n const d = `M${line[0].x} ${line[0].y}L${line[1].x} ${line[1].y}`;\n\n return (\n <>\n <path\n // This `path` is made for expanding interaction area of graph lines.\n d={d}\n fill=\"none\"\n stroke=\"transparent\"\n strokeWidth={16}\n />\n <path\n className={classNames(\"line\", { dashed: lineConf?.dashed })}\n d={d}\n fill=\"none\"\n stroke=\"gray\"\n markerEnd={`url(#${markerEnd})`}\n />\n <path className=\"line-active-bg\" d={d} fill=\"none\" />\n </>\n );\n}\n\nfunction nodeViewToNodeRect(view: NodeView, padding: number): NodeRect {\n return {\n x: view.x + view.width / 2,\n y: view.y + view.height / 2,\n width: view.width + padding,\n height: view.height + padding,\n };\n}\n","import React, { useEffect, useMemo, useState } from \"react\";\nimport { ReactUseBrick } from \"@next-core/react-runtime\";\nimport { checkIfByTransform } from \"@next-core/runtime\";\nimport { isEqual } from \"lodash\";\nimport type { NodeBrickCell, NodeBrickConf, NodeCell } from \"./interfaces\";\n\nexport interface NodeComponentProps {\n node: NodeCell;\n defaultNodeBricks?: NodeBrickConf[];\n}\n\nexport function NodeComponent({\n node,\n defaultNodeBricks,\n}: NodeComponentProps): JSX.Element | null {\n const memoizedData = useDeepMemo({ node: { id: node.id, data: node.data } });\n const specifiedUseBrick = (node as NodeBrickCell).useBrick;\n\n const useBrick = useMemo(() => {\n return (\n specifiedUseBrick ??\n defaultNodeBricks?.find((item) => checkIfByTransform(item, memoizedData))\n ?.useBrick\n );\n }, [defaultNodeBricks, specifiedUseBrick, memoizedData]);\n\n return useBrick ? (\n <foreignObject\n width={node.view.width}\n height={node.view.height}\n className=\"node\"\n >\n {useBrick && <ReactUseBrick useBrick={useBrick} data={memoizedData} />}\n </foreignObject>\n ) : null;\n}\n\nfunction useDeepMemo<T>(value: T): T {\n const [memoizedValue, setMemoizedValue] = useState(value);\n\n useEffect(() => {\n setMemoizedValue((prev) => (isEqual(prev, value) ? prev : value));\n }, [value]);\n\n return memoizedValue;\n}\n","import { pick } from \"lodash\";\nimport type { ActiveTarget, Cell } from \"../interfaces\";\n\nexport function cellToTarget(cell: Cell): ActiveTarget {\n return cell.type === \"edge\"\n ? pick(cell, [\"type\", \"source\", \"target\", \"data\"])\n : pick(cell, [\"type\", \"id\", \"data\"]);\n}\n","import type { PositionTuple } from \"../../diagram/interfaces\";\nimport type { ActiveTarget, Cell } from \"../interfaces\";\nimport type {\n MoveCellPayload,\n ResizeCellPayload,\n} from \"../reducers/interfaces\";\nimport { cellToTarget } from \"./cellToTarget\";\n\nexport function handleMouseDown(\n event: MouseEvent,\n {\n action,\n cell,\n scale,\n onCellMoving,\n onCellMoved,\n onCellResizing,\n onCellResized,\n onSwitchActiveTarget,\n }: {\n action: \"move\" | \"resize\";\n cell: Cell;\n scale: number;\n onCellMoving?(info: MoveCellPayload): void;\n onCellMoved?(info: MoveCellPayload): void;\n onCellResizing?(info: ResizeCellPayload): void;\n onCellResized?(info: ResizeCellPayload): void;\n onSwitchActiveTarget(activeTarget: ActiveTarget | null): void;\n }\n) {\n event.stopPropagation();\n // Drag node\n onSwitchActiveTarget(cellToTarget(cell));\n\n if (cell.type === \"edge\") {\n return;\n }\n\n const from: PositionTuple = [event.clientX, event.clientY];\n const original =\n action === \"move\"\n ? [cell.view.x, cell.view.y]\n : [cell.view.width, cell.view.height];\n\n function getMovement(e: MouseEvent): PositionTuple {\n return [(e.clientX - from[0]) / scale, (e.clientY - from[1]) / scale];\n }\n\n let moved = false;\n\n const handleMove = (e: MouseEvent, finished?: boolean) => {\n // Respect the scale\n const movement = getMovement(e);\n if (!moved) {\n moved = movement[0] ** 2 + movement[1] ** 2 >= 9;\n }\n // const [x, y] = getNewPosition(movement);\n // adjustCellPosition(x, y);\n if (moved) {\n if (action === \"move\") {\n (finished ? onCellMoved : onCellMoving)?.({\n type: cell.type,\n id: cell.id,\n x: original[0] + movement[0],\n y: original[1] + movement[1],\n });\n } else {\n (finished ? onCellResized : onCellResizing)?.({\n type: cell.type,\n id: cell.id,\n width: original[0] + movement[0],\n height: original[1] + movement[1],\n });\n }\n }\n };\n\n const onMouseMove = (e: MouseEvent) => {\n handleMove(e);\n };\n const onMouseUp = (e: MouseEvent) => {\n handleMove(e, true);\n moved = false;\n document.removeEventListener(\"mousemove\", onMouseMove);\n document.removeEventListener(\"mouseup\", onMouseUp);\n };\n document.addEventListener(\"mousemove\", onMouseMove);\n document.addEventListener(\"mouseup\", onMouseUp);\n}\n","import React, { useEffect } from \"react\";\nimport type { BasicDecoratorProps } from \"../interfaces\";\nimport { handleMouseDown } from \"../processors/handleMouseDown\";\n\nexport function DecoratorArea({\n cell,\n transform,\n onCellResizing,\n onCellResized,\n onSwitchActiveTarget,\n}: BasicDecoratorProps): JSX.Element {\n const resizeHandleRef = React.useRef<SVGGElement>(null);\n\n useEffect(() => {\n const resizeHandle = resizeHandleRef.current;\n const onMouseDown = (event: MouseEvent) => {\n handleMouseDown(event, {\n action: \"resize\",\n cell,\n scale: transform.k,\n onCellResizing,\n onCellResized,\n onSwitchActiveTarget,\n });\n };\n resizeHandle?.addEventListener(\"mousedown\", onMouseDown);\n return () => {\n resizeHandle?.removeEventListener(\"mousedown\", onMouseDown);\n };\n }, [cell, onCellResized, onCellResizing, onSwitchActiveTarget, transform.k]);\n\n return (\n <g className=\"decorator-area\">\n <rect\n // x={cell.view.x}\n // y={cell.view.y}\n width={cell.view.width}\n height={cell.view.height}\n className=\"area\"\n />\n <g\n ref={resizeHandleRef}\n className=\"resize-handle\"\n transform={`translate(${cell.view.width - 20} ${cell.view.height - 20})`}\n >\n <rect width={20} height={20} />\n <path d=\"M10 18L18 10 M15 18L18 15\" />\n </g>\n </g>\n );\n}\n","import React, { useCallback, useEffect, useRef, useState } from \"react\";\nimport type { BasicDecoratorProps } from \"../interfaces\";\nimport classNames from \"classnames\";\n\nexport type DecoratorTextProps = Pick<\n BasicDecoratorProps,\n \"cell\" | \"onDecoratorTextEditing\" | \"onDecoratorTextChange\"\n>;\n\nexport function DecoratorText({\n cell,\n onDecoratorTextEditing,\n onDecoratorTextChange,\n}: DecoratorTextProps): JSX.Element {\n const label = cell.view.text ?? \"\";\n const [currentLabel, setCurrentLabel] = useState<string>(label);\n const [editingLabel, setEditingLabel] = useState(false);\n const editingLabelInitialized = useRef(false);\n const [shouldEmitLabelChange, setShouldEmitLabelChange] = useState(false);\n const ref = useRef<HTMLDivElement>(null);\n\n const handleEnableEdit = useCallback((e: React.MouseEvent) => {\n e.preventDefault();\n e.stopPropagation();\n setEditingLabel(true);\n }, []);\n\n useEffect(() => {\n const element = ref.current;\n if (element && element.textContent !== currentLabel) {\n element.textContent = currentLabel;\n }\n }, [currentLabel]);\n\n useEffect(() => {\n if (editingLabel && ref.current) {\n ref.current.focus();\n selectAllText(ref.current);\n }\n onDecoratorTextEditing({ id: cell.id, editing: editingLabel });\n }, [cell.id, editingLabel, onDecoratorTextEditing]);\n\n useEffect(() => {\n if (editingLabelInitialized.current) {\n onDecoratorTextEditing?.({ id: cell.id, editing: editingLabel });\n } else {\n editingLabelInitialized.current = true;\n }\n }, [cell.id, editingLabel, onDecoratorTextEditing]);\n\n const handleInput = useCallback((event: React.FormEvent<HTMLDivElement>) => {\n setCurrentLabel((event.target as HTMLDivElement).textContent!);\n }, []);\n\n const handleBlur = useCallback(() => {\n setEditingLabel(false);\n setShouldEmitLabelChange(true);\n }, []);\n\n useEffect(() => {\n if (shouldEmitLabelChange) {\n onDecoratorTextChange?.({\n id: cell.id,\n view: { ...cell.view, text: currentLabel },\n });\n setShouldEmitLabelChange(false);\n }\n }, [cell, currentLabel, onDecoratorTextChange, shouldEmitLabelChange]);\n\n return (\n <foreignObject className=\"decorator-text\">\n <div\n className={classNames(\"text-container\", { editing: editingLabel })}\n onDoubleClick={handleEnableEdit}\n >\n <div\n className=\"text\"\n contentEditable={editingLabel}\n ref={ref}\n onInput={handleInput}\n onBlur={handleBlur}\n />\n </div>\n </foreignObject>\n );\n}\n\nfunction selectAllText(element: HTMLElement) {\n const range = document.createRange();\n range.selectNodeContents(element);\n const selection = window.getSelection()!;\n selection.removeAllRanges();\n selection.addRange(range);\n}\n","import React from \"react\";\nimport type { BasicDecoratorProps } from \"../interfaces\";\nimport { DecoratorArea } from \"./DecoratorArea\";\nimport { DecoratorText } from \"./DecoratorText\";\n\nexport function DecoratorComponent({\n cell,\n transform,\n onCellResizing,\n onCellResized,\n onSwitchActiveTarget,\n onDecoratorTextEditing,\n onDecoratorTextChange,\n}: BasicDecoratorProps): JSX.Element | null {\n let SpecifiedComponent: (props: BasicDecoratorProps) => JSX.Element | null;\n\n switch (cell.decorator) {\n case \"area\":\n SpecifiedComponent = DecoratorArea;\n break;\n case \"text\":\n SpecifiedComponent = DecoratorText;\n break;\n // istanbul ignore next\n default:\n // eslint-disable-next-line no-console\n console.error(`Unknown decorator: ${cell.decorator}`);\n return null;\n }\n\n return (\n <SpecifiedComponent\n cell={cell}\n transform={transform}\n onCellResizing={onCellResizing}\n onCellResized={onCellResized}\n onSwitchActiveTarget={onSwitchActiveTarget}\n onDecoratorTextEditing={onDecoratorTextEditing}\n onDecoratorTextChange={onDecoratorTextChange}\n />\n );\n}\n","import React, { useCallback, useEffect, useRef } from \"react\";\nimport classNames from \"classnames\";\nimport type {\n ActiveTarget,\n Cell,\n CellContextMenuDetail,\n DecoratorTextChangeDetail,\n EdgeLineConf,\n NodeBrickConf,\n} from \"./interfaces\";\nimport { isDecoratorCell, isEdgeCell, isNodeCell } from \"./processors/asserts\";\nimport { EdgeComponent } from \"./EdgeComponent\";\nimport { NodeComponent } from \"./NodeComponent\";\nimport { handleMouseDown } from \"./processors/handleMouseDown\";\nimport type { MoveCellPayload, ResizeCellPayload } from \"./reducers/interfaces\";\nimport { DecoratorComponent } from \"./decorators\";\nimport { cellToTarget } from \"./processors/cellToTarget\";\nimport type { TransformLiteral } from \"../diagram/interfaces\";\n\nexport interface CellComponentProps {\n cell: Cell;\n cells: Cell[];\n defaultNodeBricks?: NodeBrickConf[];\n defaultEdgeLines?: EdgeLineConf[];\n transform: TransformLiteral;\n markerEnd: string;\n active: boolean;\n onCellMoving(info: MoveCellPayload): void;\n onCellMoved(info: MoveCellPayload): void;\n onCellResizing(info: ResizeCellPayload): void;\n onCellResized(info: ResizeCellPayload): void;\n onSwitchActiveTarget(target: ActiveTarget | null): void;\n onCellContextMenu(detail: CellContextMenuDetail): void;\n onDecoratorTextEditing(detail: { id: string; editing: boolean }): void;\n onDecoratorTextChange(detail: DecoratorTextChangeDetail): void;\n}\n\nexport function CellComponent({\n cell,\n cells,\n defaultNodeBricks,\n defaultEdgeLines,\n markerEnd,\n active,\n transform,\n onCellMoving,\n onCellMoved,\n onCellResizing,\n onCellResized,\n onSwitchActiveTarget,\n onCellContextMenu,\n onDecoratorTextEditing,\n onDecoratorTextChange,\n}: CellComponentProps): JSX.Element | null {\n const gRef = useRef<SVGGElement>(null);\n\n useEffect(() => {\n const g = gRef.current;\n const onMouseDown = (event: MouseEvent) => {\n handleMouseDown(event, {\n action: \"move\",\n cell,\n scale: transform.k,\n onCellMoving,\n onCellMoved,\n onSwitchActiveTarget,\n });\n };\n g?.addEventListener(\"mousedown\", onMouseDown);\n return () => {\n g?.removeEventListener(\"mousedown\", onMouseDown);\n };\n }, [cell, onCellMoved, onCellMoving, onSwitchActiveTarget, transform.k]);\n\n const handleContextMenu = useCallback(\n (event: React.MouseEvent<SVGGElement>) => {\n event.preventDefault();\n onSwitchActiveTarget(cellToTarget(cell));\n onCellContextMenu({\n cell,\n clientX: event.clientX,\n clientY: event.clientY,\n });\n },\n [cell, onCellContextMenu, onSwitchActiveTarget]\n );\n\n return (\n <g\n className={classNames(\"cell\", { active })}\n ref={gRef}\n transform={\n cell.type === \"edge\"\n ? undefined\n : `translate(${cell.view.x} ${cell.view.y})`\n }\n onContextMenu={handleContextMenu}\n >\n {isNodeCell(cell) ? (\n <NodeComponent node={cell} defaultNodeBricks={defaultNodeBricks} />\n ) : isEdgeCell(cell) ? (\n <EdgeComponent\n edge={cell}\n defaultEdgeLines={defaultEdgeLines}\n cells={cells}\n markerEnd={markerEnd}\n />\n ) : isDecoratorCell(cell) ? (\n <DecoratorComponent\n cell={cell}\n transform={transform}\n onCellResizing={onCellResizing}\n onCellResized={onCellResized}\n onSwitchActiveTarget={onSwitchActiveTarget}\n onDecoratorTextEditing={onDecoratorTextEditing}\n onDecoratorTextChange={onDecoratorTextChange}\n />\n ) : null}\n </g>\n );\n}\n","import React, { useEffect, useState } from \"react\";\nimport classNames from \"classnames\";\nimport type { ConnectLineState } from \"./interfaces\";\nimport type { PositionTuple, TransformLiteral } from \"../diagram/interfaces\";\n\nexport interface ConnectLineComponentProps {\n connectLineState: ConnectLineState | null;\n transform: TransformLiteral;\n markerEnd: string;\n onConnect(state: ConnectLineState, to: PositionTuple): void;\n}\n\nexport function ConnectLineComponent({\n connectLineState,\n transform,\n markerEnd,\n onConnect,\n}: ConnectLineComponentProps): JSX.Element {\n const [connectLineTo, setConnectLineTo] = useState<PositionTuple | null>(\n null\n );\n\n useEffect(() => {\n if (connectLineState) {\n setConnectLineTo(connectLineState.from);\n }\n }, [connectLineState]);\n\n useEffect(() => {\n if (connectLineState) {\n const onMouseMove = (e: MouseEvent) => {\n // Set connect line to based on the mouse position and the transform\n setConnectLineTo([\n (e.clientX - transform.x - connectLineState.offset[0]) / transform.k,\n (e.clientY - transform.y - connectLineState.offset[1]) / transform.k,\n ]);\n };\n const onMouseDown = (e: MouseEvent) => {\n e.stopPropagation();\n };\n const onClick = (e: MouseEvent) => {\n e.stopPropagation();\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n reset();\n onConnect(connectLineState, [\n (e.clientX - transform.x - connectLineState.offset[0]) / transform.k,\n (e.clientY - transform.y - connectLineState.offset[1]) / transform.k,\n ]);\n };\n const reset = () => {\n document.removeEventListener(\"mousemove\", onMouseMove);\n document.removeEventListener(\"mousedown\", onMouseDown, {\n capture: true,\n });\n document.removeEventListener(\"click\", onClick, { capture: true });\n setConnectLineTo(null);\n };\n document.addEventListener(\"mousemove\", onMouseMove);\n document.addEventListener(\"mousedown\", onMouseDown, { capture: true });\n document.addEventListener(\"click\", onClick, { capture: true });\n\n return reset;\n }\n }, [connectLineState, onConnect, transform]);\n\n return (\n <path\n className={classNames(\"connect-line\", {\n connecting:\n !!connectLineState &&\n connectLineTo &&\n // Do not show when the distance of mouse move is less than 5px\n (connectLineTo[0] - connectLineState.from[0]) ** 2 +\n (connectLineTo[1] - connectLineState.from[1]) ** 2 >\n 25,\n })}\n d={\n connectLineState && connectLineTo\n ? `M${connectLineState.from.join(\" \")}L${connectLineTo.join(\" \")}`\n : \"\"\n }\n fill=\"none\"\n stroke=\"gray\"\n strokeWidth={1}\n markerEnd={`url(#${markerEnd})`}\n />\n );\n}\n","import type {\n Cell,\n DecoratorCell,\n EdgeCell,\n InitialCell,\n InitialNodeCell,\n NodeCell,\n} from \"../interfaces\";\n\nexport function isNodeCell(cell: Cell): cell is NodeCell {\n return cell.type === \"node\";\n}\n\nexport function isDecoratorCell(cell: Cell): cell is DecoratorCell {\n return cell.type === \"decorator\";\n}\n\nexport function isInitialNodeCell(cell: InitialCell): cell is InitialNodeCell {\n return cell.type === \"node\";\n}\n\nexport function isEdgeCell(cell: Cell): cell is EdgeCell {\n return cell.type === \"edge\";\n}\n","import type { ActiveTarget, Cell } from \"../interfaces\";\nimport { sameTarget } from \"./sameTarget\";\n\nexport type KeyboardAction = KeyboardActionDeleteCell;\n\nexport interface KeyboardActionDeleteCell {\n action: \"delete-cell\";\n cell: Cell;\n}\n\nexport function handleKeyboard(\n event: KeyboardEvent,\n {\n cells,\n activeTarget,\n }: {\n cells: Cell[];\n activeTarget: ActiveTarget | null | undefined;\n }\n): KeyboardAction | undefined {\n const activeCell = cells.find((cell) => sameTarget(cell, activeTarget));\n\n if (!activeCell) {\n return;\n }\n\n const key =\n event.key ||\n /* istanbul ignore next: compatibility */ event.keyCode ||\n /* istanbul ignore next: compatibility */ event.which;\n\n switch (key) {\n case \"Backspace\":\n case 8:\n case \"Delete\":\n case 46: {\n event.preventDefault();\n event.stopPropagation();\n return {\n action: \"delete-cell\",\n cell: activeCell,\n };\n }\n }\n}\n","import type { SizeTuple } from \"../../diagram/interfaces\";\nimport type { Cell, InitialCell, NodeCell } from \"../interfaces\";\nimport { isInitialNodeCell } from \"./asserts\";\n\nexport function initializeCells(\n initialCells: InitialCell[] | undefined,\n {\n defaultNodeSize,\n }: {\n defaultNodeSize: SizeTuple;\n }\n): Cell[] {\n const originalCells = initialCells ?? [];\n const finalCells: Cell[] = originalCells.map<Cell>((cell) => {\n if (\n !isInitialNodeCell(cell) ||\n (cell.view?.width !== undefined && cell.view?.height !== undefined)\n ) {\n return cell as NodeCell;\n }\n return {\n ...cell,\n view: {\n width: defaultNodeSize[0],\n height: defaultNodeSize[1],\n ...cell.view,\n },\n } as NodeCell;\n });\n return finalCells;\n}\n","import type {\n ActiveTarget,\n ActiveTargetOfEdge,\n ActiveTargetOfNode,\n} from \"../interfaces\";\n\nexport function sameTarget(\n a: ActiveTarget | null | undefined,\n b: ActiveTarget | null | undefined\n): boolean {\n return a\n ? !!b &&\n a.type === b.type &&\n (a.type === \"node\" || a.type === \"decorator\"\n ? a.id === (b as ActiveTargetOfNode).id\n : a.source === (b as ActiveTargetOfEdge).source &&\n a.target === (b as ActiveTargetOfEdge).target)\n : !b;\n}\n","import type { TransformLiteral } from \"../../diagram/interfaces\";\nimport type { Cell } from \"../interfaces\";\nimport { isEdgeCell } from \"./asserts\";\n\nexport interface TransformToCenterOptions {\n canvasWidth: number;\n canvasHeight: number;\n scaleRange?: [min: number, max: number];\n}\n\nexport function transformToCenter(\n cells: Cell[],\n { canvasWidth, canvasHeight, scaleRange }: TransformToCenterOptions\n): TransformLiteral {\n let left = Infinity;\n let top = Infinity;\n let right = -Infinity;\n let bottom = -Infinity;\n let empty = true;\n for (const cell of cells) {\n if (!isEdgeCell(cell)) {\n empty = false;\n const { view } = cell;\n const r = view.x + view.width;\n const b = view.y + view.height;\n if (view.x < left) {\n left = view.x;\n }\n if (r > right) {\n right = r;\n }\n if (view.y < top) {\n top = view.y;\n }\n if (b > bottom) {\n bottom = b;\n }\n }\n }\n\n const width = right - left;\n const height = bottom - top;\n\n const scale =\n scaleRange && !empty && (width > canvasWidth || height > canvasHeight)\n ? Math.max(\n Math.min(canvasWidth / width, canvasHeight / height, scaleRange[1]),\n scaleRange[0]\n )\n : 1;\n\n const x = empty ? 0 : (canvasWidth - width * scale) / 2 - left * scale;\n const y = empty ? 0 : (canvasHeight - height * scale) / 2 - top * scale;\n\n return { x, y, k: scale };\n}\n","import type { SizeTuple, TransformLiteral } from \"../../diagram/interfaces\";\nimport type {\n Cell,\n InitialCell,\n NodeCell,\n NodeId,\n NodeView,\n} from \"../interfaces\";\nimport { isEdgeCell, isNodeCell } from \"./asserts\";\nimport { initializeCells } from \"./initializeCells\";\n\nexport function updateCells({\n cells,\n defaultNodeSize,\n canvasHeight,\n transform,\n reason,\n parent,\n}: {\n cells: InitialCell[];\n defaultNodeSize: SizeTuple;\n canvasHeight: number;\n transform: TransformLiteral;\n reason?: \"add-related-nodes\";\n parent?: NodeId;\n}): {\n cells: Cell[];\n updated: Cell[];\n} {\n const newCells = initializeCells(cells, { defaultNodeSize });\n const updateCandidates: NodeCell[] = [];\n\n const nodesMap = new Map<string, NodeCell>();\n for (const cell of newCells) {\n if (isNodeCell(cell)) {\n nodesMap.set(cell.id, cell);\n }\n }\n\n let handled = false;\n\n if (reason === \"add-related-nodes\" && parent) {\n // Place these unpositioned downstream nodes below the parent node, and\n // on the right side of the positioned siblings.\n const downstreamNodeIds = new Set<string>();\n for (const cell of newCells) {\n if (\n isEdgeCell(cell) &&\n cell.source === parent &&\n cell.target !== parent\n ) {\n downstreamNodeIds.add(cell.target);\n }\n }\n const parentNode = nodesMap.get(parent);\n if (parentNode?.view.x !== undefined && parentNode.view.y !== undefined) {\n handled = true;\n const downstreamNodes = [...downstreamNodeIds]\n .map((id) => nodesMap.get(id))\n .filter(Boolean) as NodeCell[];\n let rightMostNode: NodeCell | undefined = undefined;\n for (const node of downstreamNodes) {\n if (node.view.x !== undefined && node.view.y !== undefined) {\n // Find the rightmost node that is below the parent node.\n if (\n (!rightMostNode || node.view.x > rightMostNode.view.x) &&\n node.view.y > parentNode.view.y\n ) {\n rightMostNode = node;\n }\n } else {\n // Unpositioned nodes\n updateCandidates.push(node);\n }\n }\n if (updateCandidates.length > 0) {\n const gap = 20;\n let nextX: number;\n let nextY: number;\n if (rightMostNode) {\n // Place unpositioned nodes on the right side of the rightmost positioned siblings.\n nextX = rightMostNode.view.x + rightMostNode.view.width + gap;\n nextY = rightMostNode.view.y;\n } else {\n // If there are no positioned siblings, just place them below the parent.\n const totalWidth = updateCandidates.reduce(\n (acc, node) => acc + node.view.width + gap,\n -gap\n );\n nextX =\n parentNode.view.x - totalWidth / 2 + parentNode.view.width / 2;\n nextY = parentNode.view.y + parentNode.view.height + gap;\n }\n for (const node of updateCandidates) {\n node.view.x = nextX;\n node.view.y = nextY;\n nextX += node.view.width + gap;\n }\n }\n }\n }\n\n if (!handled) {\n // By default, place unpositioned nodes in a grid.\n let maxWidth = defaultNodeSize[0];\n let maxHeight = defaultNodeSize[1];\n const gap = 20;\n const occupiedViews: NodeView[] = [];\n for (const cell of newCells) {\n if (isNodeCell(cell)) {\n if (cell.view.width > maxWidth) {\n maxWidth = cell.view.width;\n }\n if (cell.view.height > maxHeight) {\n maxHeight = cell.view.height;\n }\n if (cell.view.x === undefined || cell.view.y === undefined) {\n updateCandidates.push(cell);\n } else {\n occupiedViews.push(cell.view);\n }\n }\n }\n\n const deltaX = maxWidth + gap;\n const deltaY = maxHeight + gap;\n\n const occupiedIndexes = new Set<string>();\n for (const view of occupiedViews) {\n const x0 = Math.floor((view.x + transform.x / transform.k) / deltaX);\n const y0 = Math.floor((view.y + transform.y / transform.k) / deltaY);\n const x1 = Math.floor(\n (view.x + transform.x / transform.k + view.width) / deltaX\n );\n const y1 = Math.floor(\n (view.y + transform.y / transform.k + view.height) / deltaY\n );\n\n for (let i = x0; i <= x1; i++) {\n for (let j = y0; j <= y1; j++) {\n occupiedIndexes.add(`${i},${j}`);\n }\n }\n }\n\n const scaledDeltaX = deltaX * transform.k;\n const scaledDeltaY = deltaY * transform.k;\n const rows = Math.max(1, Math.floor(canvasHeight / scaledDeltaY));\n let i = 0;\n for (const node of updateCandidates) {\n let xIndex: number;\n let yIndex: number;\n do {\n xIndex = Math.floor(i / rows);\n yIndex = i % rows;\n i++;\n } while (occupiedIndexes.has(`${xIndex},${yIndex}`));\n\n node.view.x =\n (xIndex * scaledDeltaX - transform.x) / transform.k + gap / 2;\n node.view.y =\n (yIndex * scaledDeltaY - transform.y) / transform.k + gap / 2;\n }\n }\n\n return { cells: newCells, updated: updateCandidates };\n}\n","import type { Reducer } from \"react\";\nimport type { DrawCanvasAction } from \"./interfaces\";\nimport type { Cell, NodeCell } from \"../interfaces\";\n\nexport const cells: Reducer<Cell[], DrawCanvasAction> = (state, action) => {\n switch (action.type) {\n case \"drop-node\":\n return insertCellAfter(\n state,\n action.payload,\n (cell) => !(cell.type === \"decorator\" && cell.decorator === \"text\")\n );\n case \"drop-decorator\": {\n if (action.payload.decorator === \"text\") {\n return [...state, action.payload];\n }\n return insertCellAfter(\n state,\n action.payload,\n (cell) => cell.type === \"decorator\" && cell.decorator === \"area\"\n );\n }\n case \"add-nodes\": {\n const index =\n state.findLastIndex(\n (cell) => !(cell.type === \"decorator\" && cell.decorator === \"text\")\n ) + 1;\n return [\n ...state.slice(0, index),\n ...action.payload,\n ...state.slice(index),\n ];\n }\n case \"add-edge\":\n // Add the edge to just next to the previous last edge or area decorator.\n // If not found, append to the start.\n return insertCellAfter(\n state,\n action.payload,\n (cell) =>\n cell.type === \"edge\" ||\n (cell.type === \"decorator\" && cell.decorator === \"area\")\n );\n case \"move-cell\": {\n const { type, id, x, y } = action.payload;\n const index = state.findIndex(\n (cell) => cell.type === type && cell.id === id\n );\n if (index !== -1) {\n const node = state[index] as NodeCell;\n return [\n ...state.slice(0, index),\n { ...node, view: { ...node.view, x, y } },\n ...state.slice(index + 1),\n ];\n }\n return state;\n }\n case \"resize-cell\": {\n const { type, id, width, height } = action.payload;\n const index = state.findIndex(\n (cell) => cell.type === type && cell.id === id\n );\n if (index !== -1) {\n const node = state[index] as NodeCell;\n return [\n ...state.slice(0, index),\n { ...node, view: { ...node.view, width, height } },\n ...state.slice(index + 1),\n ];\n }\n return state;\n }\n case \"update-cells\":\n return action.payload;\n }\n return state;\n};\n\nfunction insertCellAfter(\n cells: Cell[],\n newCell: Cell,\n after: (cell: Cell) => boolean\n) {\n const index = cells.findLastIndex(after) + 1;\n return [...cells.slice(0, index), newCell, ...cells.slice(index)];\n}\n","import { Reducer } from \"react\";\nimport type { DrawCanvasAction, DrawCanvasState } from \"./interfaces\";\nimport { cells } from \"./cells\";\n\ntype ReducersMapObject<S, A> = {\n [K in keyof S]: Reducer<S[K], A>;\n};\n\nfunction combineReducers<S, A>(\n reducers: ReducersMapObject<S, A>\n): Reducer<S, A> {\n return ((state, action) =>\n Object.fromEntries(\n Object.entries<Reducer<any, A>>(reducers).map(([key, value]) => [\n key,\n value(state[key as keyof S], action),\n ])\n )) as Reducer<S, A>;\n}\n\nexport const rootReducer = combineReducers<DrawCanvasState, DrawCanvasAction>({\n cells,\n});\n","// Imports\nimport ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/noSourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `*{box-sizing:border-box}:host{display:block;position:relative;overflow:hidden}:host,\n.root{width:100%;height:100%}:host([hidden]){display:none}.root:focus{outline:none}.decorator-area .area{fill:rgba(119,141,195,0.1);stroke:none;stroke-width:0}.node,\n.decorator-text{overflow:visible}.cell.active .decorator-area .area,\n.cell.active .line-active-bg{stroke:var(--palette-blue-5);stroke-dasharray:4;stroke-width:1}.cell{-webkit-user-select:none;-moz-user-select:none;user-select:none}.resize-handle{cursor:nwse-resize;opacity:0}.resize-handle rect{fill:transparent;stroke:none}.resize-handle path{fill:none;stroke:var(--palette-gray-5);stroke-width:1.5}.cell.active .decorator-area .resize-handle,\n.decorator-area:hover .resize-handle{opacity:1}.connect-line:not(.connecting){display:none}.line.dashed{stroke-dasharray:4}.cell.active .decorator-text .text-container{outline:1px dashed var(--palette-blue-5)}.decorator-text .text-container{width:-webkit-max-content;width:-moz-max-content;width:max-content;padding:0.5em}.decorator-text .text:focus{outline:none}`, \"\"]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___.toString();\n"],"names":["findNode","cells","id","find","cell","isNodeCell","EdgeComponent","_ref","edge","markerEnd","defaultEdgeLines","sourceNode","useMemo","source","targetNode","target","lineConf","item","checkIfByTransform","line","getDirectLinePoints","nodeViewToNodeRect","view","d","concat","x","y","React","fill","stroke","strokeWidth","className","classNames","dashed","padding","width","height","NodeComponent","node","defaultNodeBricks","memoizedData","value","memoizedValue","setMemoizedValue","useState","useEffect","prev","isEqual","useDeepMemo","data","specifiedUseBrick","useBrick","_defaultNodeBricks$fi","ReactUseBrick","cellToTarget","type","pick","handleMouseDown","event","action","scale","onCellMoving","onCellMoved","onCellResizing","onCellResized","onSwitchActiveTarget","stopPropagation","from","clientX","clientY","original","moved","handleMove","e","finished","_ref2","_ref3","movement","getMovement","onMouseMove","onMouseUp","document","removeEventListener","addEventListener","DecoratorArea","transform","resizeHandleRef","resizeHandle","current","onMouseDown","k","ref","DecoratorText","_cell$view$text","onDecoratorTextEditing","onDecoratorTextChange","label","text","currentLabel","setCurrentLabel","editingLabel","setEditingLabel","editingLabelInitialized","useRef","shouldEmitLabelChange","setShouldEmitLabelChange","handleEnableEdit","useCallback","preventDefault","element","textContent","focus","range","createRange","selectNodeContents","selection","window","getSelection","removeAllRanges","addRange","selectAllText","editing","handleInput","handleBlur","_objectSpread","onDoubleClick","contentEditable","onInput","onBlur","DecoratorComponent","SpecifiedComponent","decorator","console","error","CellComponent","active","onCellContextMenu","gRef","g","handleContextMenu","undefined","onContextMenu","isEdgeCell","isDecoratorCell","ConnectLineComponent","connectLineState","onConnect","connectLineTo","setConnectLineTo","offset","onClick","reset","capture","connecting","join","isInitialNodeCell","handleKeyboard","activeTarget","activeCell","sameTarget","key","keyCode","which","initializeCells","initialCells","defaultNodeSize","map","_cell$view","_cell$view2","a","b","transformToCenter","canvasWidth","canvasHeight","scaleRange","left","Infinity","top","right","bottom","empty","r","Math","max","min","updateCells","reason","parent","newCells","updateCandidates","nodesMap","Map","set","handled","downstreamNodeIds","Set","add","parentNode","get","downstreamNodes","filter","Boolean","rightMostNode","push","length","nextX","nextY","totalWidth","reduce","acc","maxWidth","maxHeight","occupiedViews","deltaX","deltaY","occupiedIndexes","x0","floor","y0","x1","y1","i","j","scaledDeltaX","scaledDeltaY","rows","xIndex","yIndex","has","gap","updated","insertCellAfter","newCell","after","index","findLastIndex","slice","reducers","rootReducer","state","payload","findIndex","Object","fromEntries","entries","___CSS_LOADER_EXPORT___","module","toString"],"sourceRoot":""}
@@ -1,2 +0,0 @@
1
- "use strict";(self.webpackChunk_next_bricks_diagram=self.webpackChunk_next_bricks_diagram||[]).push([[5676],{5676:(e,t,a)=>{a.r(t);var n,l,i,r,s,c,o,u,d,h,v,p,g,b,f,w,m,k,y,M,x,E,W,C,N,z,S,R,L,T,D,B,A,H,P,I,O,Y,K,X,V,_,j,q,F,G,Z,$,U,J,Q,ee,te,ae,ne,le,ie,re,se=a(123),ce=a(592),oe=a(5866),ue=a(1412),de=a(8644),he=a(5600),ve=a.n(he),pe=a(7672),ge=a(8160),be=(a(48),a(5248)),fe=a(1920),we=a(1252),me=a.n(we),ke=a(7568),ye=a(2504),Me=a(8996),xe=a(9140),Ee=a(3600),We=a(3904),Ce=a(4378),Ne=a(8276),ze=a(2092),Se=a(8752),Re=a(4092),Le=a(3784),Te=a(3732),De=a(636),Be=a(6932),Ae=a(4580),He=a(9900),Pe=a(6152),Ie=a(3888),Oe=a(4588),Ye=a(3256),{defineElement:Ke,property:Xe,event:Ve,method:_e}=(0,pe.createDecorators)(),je=(0,he.forwardRef)(Ot);i=[Ke("eo-diagram",{styleTexts:[Pe.c]})],r=Xe({type:String}),c=Xe({attribute:!1}),u=Xe({attribute:!1}),h=Xe({attribute:!1}),p=Xe({attribute:!1}),b=Xe({attribute:!1}),w=Xe({attribute:!1}),k=Xe({type:Boolean}),M=Xe({attribute:!1}),E=Xe({attribute:!1}),C=Xe({type:Boolean}),z=Xe({type:Boolean}),R=Xe({type:Boolean}),T=Xe({attribute:!1}),B=Ve({type:"activeTarget.change"}),I=Ve({type:"node.delete"}),X=Ve({type:"edge.delete"}),q=Ve({type:"line.click"}),$=Ve({type:"line.dblclick"}),ee=Ve({type:"nodes.connect"}),le=_e();var qe=new WeakMap,Fe=new WeakMap,Ge=new WeakMap,Ze=new WeakMap,$e=new WeakMap,Ue=new WeakMap,Je=new WeakMap,Qe=new WeakMap,et=new WeakMap,tt=new WeakMap,at=new WeakMap,nt=new WeakMap,lt=new WeakMap,it=new WeakMap,rt=new WeakMap,st=new WeakMap,ct=new WeakMap,ot=new WeakMap,ut=new WeakMap,dt=new WeakMap,ht=new WeakMap,vt=new WeakMap,pt=new WeakMap,gt=new WeakMap,bt=new WeakMap,ft=new WeakMap,wt=new WeakMap,mt=new WeakMap,kt=new WeakMap,yt=new WeakMap,Mt=new WeakMap,xt=new WeakMap,Et=new WeakMap,Wt=new WeakMap;class Ct extends ge.ReactNextElement{constructor(){super(...arguments),(0,se.c)(this,Mt,{get:It,set:Pt}),(0,se.c)(this,mt,{get:Ht,set:At}),(0,se.c)(this,bt,{get:Bt,set:Dt}),(0,se.c)(this,vt,{get:Tt,set:Lt}),(0,se.c)(this,ut,{get:Rt,set:St}),(0,se.c)(this,st,{get:zt,set:Nt}),(0,se.c)(this,qe,{writable:!0,value:(n(this),s(this))}),(0,se.c)(this,Fe,{writable:!0,value:o(this)}),(0,se.c)(this,Ge,{writable:!0,value:d(this)}),(0,se.c)(this,Ze,{writable:!0,value:v(this)}),(0,se.c)(this,$e,{writable:!0,value:g(this)}),(0,se.c)(this,Ue,{writable:!0,value:f(this)}),(0,se.c)(this,Je,{writable:!0,value:m(this)}),(0,se.c)(this,Qe,{writable:!0,value:y(this)}),(0,se.c)(this,et,{writable:!0,value:x(this)}),(0,se.c)(this,tt,{writable:!0,value:W(this)}),(0,se.c)(this,at,{writable:!0,value:N(this,!0)}),(0,se.c)(this,nt,{writable:!0,value:S(this,!0)}),(0,se.c)(this,lt,{writable:!0,value:L(this,!0)}),(0,se.c)(this,it,{writable:!0,value:D(this)}),(0,se.c)(this,rt,{writable:!0,value:A(this)}),(0,se.c)(this,ct,{writable:!0,value:e=>{(0,ue.c)(this,st).emit(e)}}),(0,se.c)(this,ot,{writable:!0,value:O(this)}),(0,se.c)(this,dt,{writable:!0,value:e=>{(0,ue.c)(this,ut).emit(e)}}),(0,se.c)(this,ht,{writable:!0,value:V(this)}),(0,se.c)(this,pt,{writable:!0,value:e=>{(0,ue.c)(this,vt).emit(e)}}),(0,se.c)(this,gt,{writable:!0,value:F(this)}),(0,se.c)(this,ft,{writable:!0,value:e=>{(0,ue.c)(this,bt).emit(e)}}),(0,se.c)(this,wt,{writable:!0,value:U(this)}),(0,se.c)(this,kt,{writable:!0,value:e=>{(0,ue.c)(this,mt).emit(e)}}),(0,se.c)(this,yt,{writable:!0,value:te(this)}),(0,se.c)(this,xt,{writable:!0,value:e=>{(0,ue.c)(this,Mt).emit(e)}}),(0,se.c)(this,Et,{writable:!0,value:e=>{(0,Oe.M)(e,this.activeTarget)||(this.activeTarget=e)}}),(0,se.c)(this,Wt,{writable:!0,value:(0,he.createRef)()})}get layout(){return(0,ue.c)(this,qe)}set layout(e){(0,oe.c)(this,qe,e)}get nodes(){return(0,ue.c)(this,Fe)}set nodes(e){(0,oe.c)(this,Fe,e)}get edges(){return(0,ue.c)(this,Ge)}set edges(e){(0,oe.c)(this,Ge,e)}get nodeBricks(){return(0,ue.c)(this,Ze)}set nodeBricks(e){(0,oe.c)(this,Ze,e)}get lines(){return(0,ue.c)(this,$e)}set lines(e){(0,oe.c)(this,$e,e)}get layoutOptions(){return(0,ue.c)(this,Ue)}set layoutOptions(e){(0,oe.c)(this,Ue,e)}get activeTarget(){return(0,ue.c)(this,Je)}set activeTarget(e){(0,oe.c)(this,Je,e)}get disableKeyboardAction(){return(0,ue.c)(this,Qe)}set disableKeyboardAction(e){(0,oe.c)(this,Qe,e)}get connectNodes(){return(0,ue.c)(this,et)}set connectNodes(e){(0,oe.c)(this,et,e)}get dragNodes(){return(0,ue.c)(this,tt)}set dragNodes(e){(0,oe.c)(this,tt,e)}get zoomable(){return(0,ue.c)(this,at)}set zoomable(e){(0,oe.c)(this,at,e)}get scrollable(){return(0,ue.c)(this,nt)}set scrollable(e){(0,oe.c)(this,nt,e)}get pannable(){return(0,ue.c)(this,lt)}set pannable(e){(0,oe.c)(this,lt,e)}get scaleRange(){return(0,ue.c)(this,it)}set scaleRange(e){(0,oe.c)(this,it,e)}callOnLineLabel(e,t){for(var a,n=arguments.length,l=new Array(n>2?n-2:0),i=2;i<n;i++)l[i-2]=arguments[i];null===(a=(0,ue.c)(this,Wt).current)||void 0===a||a.callOnLineLabel(e,t,...l)}render(){return ve().createElement(je,{ref:(0,ue.c)(this,Wt),layout:this.layout,nodes:this.nodes,edges:this.edges,nodeBricks:this.nodeBricks,lines:this.lines,layoutOptions:this.layoutOptions,connectNodes:this.connectNodes,dragNodes:this.dragNodes,activeTarget:this.activeTarget,disableKeyboardAction:this.disableKeyboardAction,zoomable:this.zoomable,scrollable:this.scrollable,pannable:this.pannable,scaleRange:this.scaleRange,onActiveTargetChange:(0,ue.c)(this,ct),onSwitchActiveTarget:(0,ue.c)(this,Et),onNodeDelete:(0,ue.c)(this,dt),onEdgeDelete:(0,ue.c)(this,pt),onLineClick:(0,ue.c)(this,ft),onLineDoubleClick:(0,ue.c)(this,kt),onNodesConnect:(0,ue.c)(this,xt)})}}function Nt(e){P(this,e)}function zt(){return H(this)}function St(e){K(this,e)}function Rt(){return Y(this)}function Lt(e){j(this,e)}function Tt(){return _(this)}function Dt(e){Z(this,e)}function Bt(){return G(this)}function At(e){Q(this,e)}function Ht(){return J(this)}function Pt(e){ne(this,e)}function It(){return ae(this)}function Ot(e,t){var{layout:a,nodes:n,edges:l,nodeBricks:i,lines:r,layoutOptions:s,connectNodes:c,dragNodes:o,activeTarget:u,disableKeyboardAction:d,zoomable:h,scrollable:v,pannable:p,scaleRange:g,onActiveTargetChange:b,onSwitchActiveTarget:f,onNodeDelete:w,onEdgeDelete:m,onLineClick:k,onLineDoubleClick:y,onNodesConnect:M}=e,[x,E]=(0,he.useState)(!1),[W,C]=(0,he.useState)(0),[N,z]=(0,he.useState)(null),[S,R]=(0,he.useState)(!1),[L,T]=(0,he.useState)(0),[D,B]=(0,he.useState)(null),[A,H]=(0,he.useState)([]),[P,I]=(0,he.useState)(!1),[O,Y]=(0,he.useState)({k:1,x:0,y:0}),K=(0,he.useRef)(new Map),X=(0,he.useRef)(null),V=(0,he.useRef)(null),[_,j]=(0,he.useState)(!1),{userViewReady:q,userViewNodesMap:F,saveUserView:G}=(0,Ie.y)(null==o?void 0:o.save),[Z,$]=(0,he.useState)([0,0]),[U,J]=(0,he.useState)(null),[Q,ee]=(0,he.useState)("initial"),[te,ae]=(0,he.useState)(null);(0,he.useImperativeHandle)(t,(()=>({callOnLineLabel(e,t){for(var a,n=arguments.length,l=new Array(n>2?n-2:0),i=2;i<n;i++)l[i-2]=arguments[i];null==D||null===(a=D.get(e))||void 0===a||null===(a=a.firstElementChild)||void 0===a||a[t](...l)}}))),(0,he.useEffect)((()=>{var e=e=>{(0,De.w)(e,{nodes:n,nodesRefRepository:N,connectNodes:c,dragNodes:o,scale:O.k,setConnectLineState:J,setConnectLineTo:$,setManualLayoutStatus:ee,setNodeMovement:ae,onSwitchActiveTarget:f,onNodesConnect:M})},t=V.current;return null==t||t.addEventListener("mousedown",e),()=>{null==t||t.removeEventListener("mousedown",e)}}),[n,c,o,O.k,N,M,f]);var{normalizedLines:ne,normalizedLinesMap:le,markers:ie}=(0,he.useMemo)((()=>(0,Ce.K)(l,r)),[l,r]),re=(0,he.useMemo)((()=>ne.flatMap((e=>{var t,a,{line:{text:n,label:l,$id:i},edge:r}=e;return n||l?(l?(t="label",a=[].concat(l)):(t="text",a=[].concat(n)),a.map((e=>{var a;return{[t]:e,id:"".concat(i,"-").concat(null!==(a=e.placement)&&void 0!==a?a:"center"),edge:r}}))):[]}))),[ne]),{nodes:se,edges:ce}=(0,Ae.C)({layout:a,nodes:n,edges:l,manualLayoutStatus:Q,userViewReady:q,userViewNodesMap:F,nodeMovement:te,nodesRefRepository:N,lineLabelsRefRepository:D,normalizedLinesMap:le,layoutOptions:s,nodesRenderId:W,lineLabelsRenderId:L});(0,he.useEffect)((()=>{"finished"===Q&&G(se.map((e=>({id:e.id,x:e.x,y:e.y}))))}),[Q]);var oe=(0,he.useMemo)((()=>(0,We.e)(ce,se,ne)),[ne,se,ce]),ue=null!=u?u:null,[de,pe]=(0,he.useState)(ue);(0,he.useEffect)((()=>{pe((e=>(0,Oe.M)(e,ue)?e:ue))}),[ue]);var ge=(0,he.useRef)(!1);(0,he.useEffect)((()=>{ge.current?null==b||b(de):ge.current=!0}),[de,b]),(0,he.useEffect)((()=>{var e=X.current;if(e&&!d){var t=e=>{var t=(0,xe.Y)(e,{renderedNodes:se,activeTarget:de});"delete-node"===(null==t?void 0:t.action)?null==w||w(t.node):"delete-edge"===(null==t?void 0:t.action)?null==m||m(t.edge):"switch-active-node"===(null==t?void 0:t.action)&&t.node&&(null==f||f({type:"node",nodeId:t.node.id}))};return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}}),[de,se,d,f,w,m]);var we=(0,he.useCallback)((e=>{e&&(C((e=>e+1)),z(e)),E((t=>t||!!e))}),[]),Pe=(0,he.useCallback)((e=>{e&&(T((e=>e+1)),B(e)),R((t=>t||!!e))}),[]),Ke=(0,he.useMemo)((()=>null!=g?g:[Be.WH,Be.Oi]),[g]),Xe=(0,he.useMemo)((()=>(0,fe.AT)()),[]);(0,he.useEffect)((()=>{var e=!1;Xe.scaleExtent(h?Ke:[1,1]).on("start",(()=>{e=!1,I(!0)})).on("zoom",(t=>{e=!0,Y(t.transform)})).on("end",(()=>{I(!1),e||null==f||f(null)}))}),[f,Ke,h,Xe]),(0,he.useEffect)((()=>{var e=X.current;if(e){var t=(0,be.c)(e),a=()=>{t.on(".zoom",null).on(".zoom.custom",null).on("wheel",null)};if(h||v||p)return(h||v)&&t.on("wheel.zoom.custom",(e=>{e.ctrlKey||(e.stopImmediatePropagation(),v&&(e.preventDefault(),Xe.translateBy(t,e.wheelDeltaX/5,e.wheelDeltaY/5)))})),t.call(Xe).on("wheel",(e=>e.preventDefault())).on("dblclick.zoom",null),p||t.on("mousedown.zoom",null).on("touchstart.zoom",null).on("touchmove.zoom",null).on("touchend.zoom",null),a;a()}}),[p,v,h,Xe]),(0,he.useEffect)((()=>{var e=X.current;if(0!==se.length&&e&&!_){var{k:t,x:a,y:n}=(0,Ee.c)(se,{canvasWidth:e.clientWidth,canvasHeight:e.clientHeight,scaleRange:h?Ke:void 0});Xe.transform((0,be.c)(e),new fe.O(t,a,n)),j(!0)}}),[_,se,Ke,h,Xe]);var Ve=(0,he.useMemo)((()=>"".concat((0,ke.uniqueId)("diagram-"),"-")),[]),_e="".concat(Ve,"line-arrow-"),je="".concat(Ve,"mask-"),qe="".concat(Ve,"active-line-");(0,he.useEffect)((()=>{H((e=>(0,Te.c)(e,oe,K.current)))}),[oe]);var[Fe,Ge]=ve().useState(new Map);return(0,he.useEffect)((()=>{if(D){(0,He.c)(A,D);var e=new ye.c((()=>{Ge((0,Ye.E)(A,D))}));for(var t of D.values())e.observe(t);return()=>{e.disconnect()}}}),[L,D,A]),"dagre"!==a&&"force"!==a?ve().createElement("div",null,'Diagram layout not supported: "'.concat(a,'"')):ve().createElement("div",{className:me()("diagram",{ready:x&&_,grabbing:P,pannable:p}),tabIndex:-1,ref:X},ve().createElement("svg",{width:"100%",height:"100%",className:"lines"},ve().createElement("defs",null,ie.map(((e,t)=>{var{type:a,strokeColor:n}=e;return ve().createElement(Se.y,{key:t,id:"".concat(_e).concat(t),type:a,strokeColor:n})})),[...Fe].map((e=>{var[t,a]=e;return ve().createElement(Re.g,{key:t,lineId:t,rects:a,maskPrefix:je,renderedLineLabels:A})})),ve().createElement("marker",{id:"".concat(qe,"start"),viewBox:"0 0 8 8",refX:4,refY:4,markerWidth:8,markerHeight:8,orient:"auto"},ve().createElement("path",{d:"M 0.5 0.5 H 7.5 V 7.5 H 0.5 Z",stroke:"var(--palette-gray-7)",strokeWidth:1,fill:"var(--palette-gray-1)"})),ve().createElement("marker",{id:"".concat(qe,"end"),viewBox:"0 0 14 8",refX:3,refY:4,markerWidth:14,markerHeight:8,orient:"auto"},ve().createElement("path",{d:"M 0.5 1.5 L 5.5 4 L 0.5 6.5 z",stroke:"var(--palette-blue-3)",strokeWidth:1,fill:"var(--palette-blue-3)"}),ve().createElement("path",{d:"M 6.5 0.5 H 13.5 V 7.5 H 6.5 Z",stroke:"var(--palette-gray-7)",strokeWidth:1,fill:"var(--palette-gray-1)"}))),ve().createElement("g",{transform:"translate(".concat(O.x," ").concat(O.y,") scale(").concat(O.k,")")},oe.map((e=>ve().createElement(ze.k,{key:e.line.$id,line:e,linePaths:K.current,lineMaskRects:Fe,maskPrefix:je,markerPrefix:_e,activeLineMarkerPrefix:qe,active:"edge"===(null==de?void 0:de.type)&&de.edge.source===e.edge.source&&de.edge.target===e.edge.target,activeRelated:"node"===(null==de?void 0:de.type)&&(e.edge.source===de.nodeId||e.edge.target===de.nodeId),onLineClick:k,onLineDoubleClick:y}))))),ve().createElement("div",{className:me()("line-labels",{ready:S}),style:{left:O.x,top:O.y,transform:"scale(".concat(O.k,")")}},ve().createElement(Ne.Ar,{labels:re,onRendered:Pe})),ve().createElement("div",{className:"nodes",ref:V,style:{left:O.x,top:O.y,transform:"scale(".concat(O.k,")")}},ve().createElement(Me._,{nodes:n,nodeBricks:i,onRendered:we})),ve().createElement(Le.E,{connectLineState:U,connectLineTo:Z,markerPrefix:_e}))}ie=Ct,({e:[s,o,d,v,g,f,m,y,x,W,N,S,L,D,A,H,P,O,Y,K,V,_,j,F,G,Z,U,J,Q,te,ae,ne,n],c:[re,l]}=(0,de.c)(ie,[[r,1,"layout"],[c,1,"nodes"],[u,1,"edges"],[h,1,"nodeBricks"],[p,1,"lines"],[b,1,"layoutOptions"],[w,1,"activeTarget"],[k,1,"disableKeyboardAction"],[M,1,"connectNodes"],[E,1,"dragNodes"],[C,1,"zoomable"],[z,1,"scrollable"],[R,1,"pannable"],[T,1,"scaleRange"],[B,1,"activeTargetChangeEvent",e=>(0,ue.c)(e,rt),(e,t)=>(0,oe.c)(e,rt,t)],[I,1,"nodeDelete",e=>(0,ue.c)(e,ot),(e,t)=>(0,oe.c)(e,ot,t)],[X,1,"edgeDelete",e=>(0,ue.c)(e,ht),(e,t)=>(0,oe.c)(e,ht,t)],[q,1,"lineClick",e=>(0,ue.c)(e,gt),(e,t)=>(0,oe.c)(e,gt,t)],[$,1,"lineDoubleClick",e=>(0,ue.c)(e,wt),(e,t)=>(0,oe.c)(e,wt,t)],[ee,1,"connectNodes",e=>(0,ue.c)(e,yt),(e,t)=>(0,oe.c)(e,yt,t)],[le,2,"callOnLineLabel"]],i,0,(e=>Wt.has((0,ce.c)(e))),ge.ReactNextElement)),l();var Yt,Kt,Xt,Vt,_t,jt,qt,Ft,Gt,Zt,$t,Ut,Jt,Qt,ea,ta,aa,na,la=a(7518),{defineElement:ia,property:ra,event:sa,method:ca}=(0,pe.createDecorators)(),oa=(0,he.forwardRef)(Ea);Xt=[ia("diagram.editable-label",{styleTexts:[la.c]})],Vt=ra(),jt=ra({render:!1}),Ft=sa({type:"label.editing.change"}),Ut=sa({type:"label.change"}),ta=ca();var ua=new WeakMap,da=new WeakMap,ha=new WeakMap,va=new WeakMap,pa=new WeakMap,ga=new WeakMap,ba=new WeakMap,fa=new WeakMap,wa=new WeakMap;class ma extends ge.ReactNextElement{constructor(){super(...arguments),(0,se.c)(this,ba,{get:xa,set:Ma}),(0,se.c)(this,va,{get:ya,set:ka}),(0,se.c)(this,ua,{writable:!0,value:(Yt(this),_t(this))}),(0,se.c)(this,da,{writable:!0,value:qt(this)}),(0,se.c)(this,ha,{writable:!0,value:Gt(this)}),(0,se.c)(this,pa,{writable:!0,value:e=>{(0,ue.c)(this,va).emit(e)}}),(0,se.c)(this,ga,{writable:!0,value:Jt(this)}),(0,se.c)(this,fa,{writable:!0,value:e=>{(0,ue.c)(this,ba).emit(e)}}),(0,se.c)(this,wa,{writable:!0,value:(0,he.createRef)()})}get label(){return(0,ue.c)(this,ua)}set label(e){(0,oe.c)(this,ua,e)}get type(){return(0,ue.c)(this,da)}set type(e){(0,oe.c)(this,da,e)}enableEditing(){var e;null===(e=(0,ue.c)(this,wa).current)||void 0===e||e.enableEditing()}render(){return ve().createElement(oa,{ref:(0,ue.c)(this,wa),label:this.label,onLabelEditingChange:(0,ue.c)(this,pa),onLabelChange:(0,ue.c)(this,fa)})}}function ka(e){$t(this,e)}function ya(){return Zt(this)}function Ma(e){ea(this,e)}function xa(){return Qt(this)}function Ea(e,t){var{label:a,onLabelChange:n,onLabelEditingChange:l}=e,i=null!=a?a:"",[r,s]=(0,he.useState)(i),[c,o]=(0,he.useState)(!1),u=(0,he.useRef)(!1),[d,h]=(0,he.useState)(!1),v=(0,he.useRef)(null);(0,he.useImperativeHandle)(t,(()=>({enableEditing(){o(!0)}}))),(0,he.useEffect)((()=>{s(i)}),[i]);var p=(0,he.useCallback)((e=>{e.preventDefault(),e.stopPropagation(),o(!0)}),[]);(0,he.useEffect)((()=>{var e,t;c&&(null===(e=v.current)||void 0===e||e.focus({preventScroll:!0}),null===(t=v.current)||void 0===t||t.select())}),[c]),(0,he.useEffect)((()=>{u.current?null==l||l(c):u.current=!0}),[c,l]);var g=(0,he.useCallback)((e=>{s(e.target.value)}),[]),b=(0,he.useCallback)((e=>{var t,a=e.key||e.keyCode||e.which;"Enter"!==a&&13!==a||null===(t=v.current)||void 0===t||t.blur()}),[]),f=(0,he.useCallback)((()=>{o(!1),h(!0)}),[]);(0,he.useEffect)((()=>{d&&(null==n||n(r),h(!1))}),[r,n,d]);var w=(0,he.useCallback)((e=>{e.stopPropagation()}),[]);return ve().createElement("div",{className:me()("label",{editing:c,empty:!r}),onDoubleClick:w,onMouseDown:w},ve().createElement("input",{className:"label-input",value:r,ref:v,onChange:g,onKeyDown:b,onBlur:f}),ve().createElement("div",{className:"label-text",onDoubleClick:p},r))}aa=ma,({e:[_t,qt,Gt,Zt,$t,Jt,Qt,ea,Yt],c:[na,Kt]}=(0,de.c)(aa,[[Vt,1,"label"],[jt,1,"type"],[Ft,1,"labelEditingChange",e=>(0,ue.c)(e,ha),(e,t)=>(0,oe.c)(e,ha,t)],[Ut,1,"labelChange",e=>(0,ue.c)(e,ga),(e,t)=>(0,oe.c)(e,ga,t)],[ta,2,"enableEditing"]],Xt,0,(e=>wa.has((0,ce.c)(e))),ge.ReactNextElement)),Kt();var Wa,Ca,Na,za,Sa,Ra,La,Ta,Da,Ba,Aa,Ha,Pa,Ia,Oa,Ya,Ka,Xa,Va,_a,ja,qa,Fa,Ga,Za,$a,Ua,Ja,Qa,en,tn,an,nn,ln,rn,sn,cn,on,un,dn,hn,vn,pn,gn,bn,fn,wn,mn,kn,yn,Mn,xn,En,Wn,Cn,Nn,zn,Sn,Rn,Ln,Tn,Dn,Bn,An,Hn,Pn=a(4412),In=a(8944),On=a(4516),Yn=a(3876),Kn=a(7181),Xn=a(4552),Vn=a(6876),_n=a(5776),jn=a(7584),qn=a(8044),Fn=a(7876),Gn=a(3788),Zn=a(2872),$n=(0,On.unwrapProvider)("basic.lock-body-scroll"),{defineElement:Un,property:Jn,method:Qn,event:el}=(0,pe.createDecorators)(),tl=ve().forwardRef(ni);Na=[Un("eo-draw-canvas",{styleTexts:[jn.c]})],za=Jn({attribute:!1}),Ra=Jn({attribute:!1}),Ta=Jn({attribute:!1}),Ba=Jn({attribute:!1}),Ha=Jn({attribute:!1}),Ia=Jn({type:Boolean}),Ya=Jn({type:Boolean}),Xa=Jn({type:Boolean}),_a=Jn({attribute:!1}),qa=el({type:"activeTarget.change"}),$a=el({type:"node.move"}),en=el({type:"cell.move"}),ln=el({type:"cell.resize"}),on=el({type:"node.delete"}),vn=el({type:"cell.delete"}),fn=el({type:"cell.contextmenu"}),yn=el({type:"decorator.text.change"}),Wn=el({type:"scale.change"}),Sn=Qn(),Rn=Qn(),Ln=Qn(),Tn=Qn(),Dn=Qn(),Bn=Qn();var al=new WeakMap,nl=new WeakMap,ll=new WeakMap,il=new WeakMap,rl=new WeakMap,sl=new WeakMap,cl=new WeakMap,ol=new WeakMap,ul=new WeakMap,dl=new WeakMap,hl=new WeakMap,vl=new WeakMap,pl=new WeakMap,gl=new WeakMap,bl=new WeakMap,fl=new WeakMap,wl=new WeakMap,ml=new WeakMap,kl=new WeakMap,yl=new WeakMap,Ml=new WeakMap,xl=new WeakMap,El=new WeakMap,Wl=new WeakMap,Cl=new WeakMap,Nl=new WeakMap,zl=new WeakMap,Sl=new WeakMap,Rl=new WeakMap,Ll=new WeakMap,Tl=new WeakMap,Dl=new WeakMap,Bl=new WeakMap,Al=new WeakMap,Hl=new WeakMap,Pl=new WeakMap;class Il extends ge.ReactNextElement{constructor(){super(...arguments),(0,se.c)(this,Al,{get:ai,set:ti}),(0,se.c)(this,Tl,{get:ei,set:Ql}),(0,se.c)(this,Sl,{get:Jl,set:Ul}),(0,se.c)(this,Cl,{get:$l,set:Zl}),(0,se.c)(this,El,{get:Gl,set:Fl}),(0,se.c)(this,yl,{get:ql,set:jl}),(0,se.c)(this,wl,{get:_l,set:Vl}),(0,se.c)(this,bl,{get:Xl,set:Kl}),(0,se.c)(this,hl,{get:Yl,set:Ol}),(0,se.c)(this,al,{writable:!0,value:(Wa(this),Sa(this))}),(0,se.c)(this,nl,{writable:!0,value:La(this,[20,20])}),(0,se.c)(this,ll,{writable:!0,value:Da(this)}),(0,se.c)(this,il,{writable:!0,value:Aa(this)}),(0,se.c)(this,rl,{writable:!0,value:Pa(this)}),(0,se.c)(this,sl,{writable:!0,value:Oa(this,!0)}),(0,se.c)(this,cl,{writable:!0,value:Ka(this,!0)}),(0,se.c)(this,ol,{writable:!0,value:Va(this,!0)}),(0,se.c)(this,ul,{writable:!0,value:ja(this)}),(0,se.c)(this,dl,{writable:!0,value:Fa(this)}),(0,se.c)(this,vl,{writable:!0,value:e=>{(0,ue.c)(this,hl).emit(e)}}),(0,se.c)(this,pl,{writable:!0,value:e=>{(0,Xn.M)(e,this.activeTarget)||(this.activeTarget=e)}}),(0,se.c)(this,gl,{writable:!0,value:Ua(this)}),(0,se.c)(this,fl,{writable:!0,value:tn(this)}),(0,se.c)(this,ml,{writable:!0,value:e=>{(0,ue.c)(this,wl).emit(e),"node"===e.type&&(0,ue.c)(this,bl).emit(e)}}),(0,se.c)(this,kl,{writable:!0,value:rn(this)}),(0,se.c)(this,Ml,{writable:!0,value:e=>{(0,ue.c)(this,yl).emit(e)}}),(0,se.c)(this,xl,{writable:!0,value:un(this)}),(0,se.c)(this,Wl,{writable:!0,value:pn(this)}),(0,se.c)(this,Nl,{writable:!0,value:e=>{(0,ue.c)(this,Cl).emit(e),"node"===e.type&&(0,ue.c)(this,El).emit(e)}}),(0,se.c)(this,zl,{writable:!0,value:wn(this)}),(0,se.c)(this,Rl,{writable:!0,value:e=>{(0,ue.c)(this,Sl).emit(e)}}),(0,se.c)(this,Ll,{writable:!0,value:Mn(this)}),(0,se.c)(this,Dl,{writable:!0,value:e=>{(0,ue.c)(this,Tl).emit(e)}}),(0,se.c)(this,Bl,{writable:!0,value:Cn(this)}),(0,se.c)(this,Hl,{writable:!0,value:e=>{(0,ue.c)(this,Al).emit(e)}}),(0,se.c)(this,Pl,{writable:!0,value:(0,he.createRef)()})}get cells(){return(0,ue.c)(this,al)}set cells(e){(0,oe.c)(this,al,e)}get defaultNodeSize(){return(0,ue.c)(this,nl)}set defaultNodeSize(e){(0,oe.c)(this,nl,e)}get defaultNodeBricks(){return(0,ue.c)(this,ll)}set defaultNodeBricks(e){(0,oe.c)(this,ll,e)}get defaultEdgeLines(){return(0,ue.c)(this,il)}set defaultEdgeLines(e){(0,oe.c)(this,il,e)}get activeTarget(){return(0,ue.c)(this,rl)}set activeTarget(e){(0,oe.c)(this,rl,e)}get zoomable(){return(0,ue.c)(this,sl)}set zoomable(e){(0,oe.c)(this,sl,e)}get scrollable(){return(0,ue.c)(this,cl)}set scrollable(e){(0,oe.c)(this,cl,e)}get pannable(){return(0,ue.c)(this,ol)}set pannable(e){(0,oe.c)(this,ol,e)}get scaleRange(){return(0,ue.c)(this,ul)}set scaleRange(e){(0,oe.c)(this,ul,e)}dropNode(e){var t=this;return(0,In.c)((function*(){var a,n,{id:l,position:i,size:r,data:s,useBrick:c}=e;if(null===(a=(n=document).elementsFromPoint)||void 0===a||null===(a=a.call(n,i[0],i[1]))||void 0===a?void 0:a.includes(t)){var o,u,d,h=t.getBoundingClientRect(),v=(0,ue.c)(t,Pl).current.getTransform(),p={type:"node",id:l,view:{x:(i[0]-h.left-v.x)/v.k,y:(i[1]-h.top-v.y)/v.k,width:null!==(o=null==r?void 0:r[0])&&void 0!==o?o:t.defaultNodeSize[0],height:null!==(u=null==r?void 0:r[1])&&void 0!==u?u:t.defaultNodeSize[0]},data:s,useBrick:c};return null===(d=(0,ue.c)(t,Pl).current)||void 0===d||d.dropNode(p),p}return null}))()}dropDecorator(e){var t=this;return(0,In.c)((function*(){var a,n,{position:l,decorator:i,text:r}=e;if(null===(a=(n=document).elementsFromPoint)||void 0===a||null===(a=a.call(n,l[0],l[1]))||void 0===a?void 0:a.includes(t)){var s,c=t.getBoundingClientRect(),o=(0,ue.c)(t,Pl).current.getTransform(),u={type:"decorator",decorator:i,id:"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"==e?t:3&t|8).toString(16)})),view:{x:(l[0]-c.left-o.x)/o.k,y:(l[1]-c.top-o.y)/o.k,width:100,height:60,text:r}};return null===(s=(0,ue.c)(t,Pl).current)||void 0===s||s.dropDecorator(u),u}return null}))()}addNodes(e){var t=this;return(0,In.c)((function*(){if(0===e.length)return[];var a=e.map((e=>{var a,n,{size:l,useBrick:i,id:r,data:s}=e;return{type:"node",id:r,data:s,view:{width:null!==(a=null==l?void 0:l[0])&&void 0!==a?a:t.defaultNodeSize[0],height:null!==(n=null==l?void 0:l[1])&&void 0!==n?n:t.defaultNodeSize[0]},useBrick:i}}));return(0,ue.c)(t,Pl).current.addNodes(a,{defaultNodeSize:t.defaultNodeSize,canvasHeight:t.clientHeight})}))()}addEdge(e){var t=this;return(0,In.c)((function*(){var a,{source:n,target:l,data:i}=e,r={type:"edge",source:n,target:l,data:i};return null===(a=(0,ue.c)(t,Pl).current)||void 0===a||a.addEdge(r),r}))()}manuallyConnectNodes(e){return(0,ue.c)(this,Pl).current.manuallyConnectNodes(e)}updateCells(e,t){var a=this;return(0,In.c)((function*(){var n=(0,ue.c)(a,Pl).current.getTransform(),{cells:l,updated:i}=(0,Zn.s)((0,Pn.c)((0,Pn.c)({},t),{},{cells:e,defaultNodeSize:a.defaultNodeSize,canvasHeight:a.clientHeight,transform:n}));return(0,ue.c)(a,Pl).current.updateCells(l),{updated:i}}))()}disconnectedCallback(){super.disconnectedCallback(),$n(this,!1)}render(){return ve().createElement(tl,{host:this,ref:(0,ue.c)(this,Pl),cells:this.cells,defaultNodeSize:this.defaultNodeSize,defaultNodeBricks:this.defaultNodeBricks,defaultEdgeLines:this.defaultEdgeLines,activeTarget:this.activeTarget,zoomable:this.zoomable,scrollable:this.scrollable,pannable:this.pannable,scaleRange:this.scaleRange,onActiveTargetChange:(0,ue.c)(this,vl),onSwitchActiveTarget:(0,ue.c)(this,pl),onCellMove:(0,ue.c)(this,ml),onCellResize:(0,ue.c)(this,Ml),onCellDelete:(0,ue.c)(this,Nl),onCellContextMenu:(0,ue.c)(this,Rl),onDecoratorTextChange:(0,ue.c)(this,Dl),onScaleChange:(0,ue.c)(this,Hl)})}}function Ol(e){Za(this,e)}function Yl(){return Ga(this)}function Kl(e){Qa(this,e)}function Xl(){return Ja(this)}function Vl(e){nn(this,e)}function _l(){return an(this)}function jl(e){cn(this,e)}function ql(){return sn(this)}function Fl(e){hn(this,e)}function Gl(){return dn(this)}function Zl(e){bn(this,e)}function $l(){return gn(this)}function Ul(e){kn(this,e)}function Jl(){return mn(this)}function Ql(e){En(this,e)}function ei(){return xn(this)}function ti(e){zn(this,e)}function ai(){return Nn(this)}function ni(e,t){var{host:a,cells:n,defaultNodeSize:l,defaultNodeBricks:i,defaultEdgeLines:r,activeTarget:s,zoomable:c,scrollable:o,pannable:u,scaleRange:d,onActiveTargetChange:h,onSwitchActiveTarget:v,onCellMove:p,onCellResize:g,onCellDelete:b,onCellContextMenu:f,onDecoratorTextChange:w,onScaleChange:m}=e,[{cells:k},y]=(0,he.useReducer)(Yn.M,n,(e=>({cells:(0,Fn.S)(e,{defaultNodeSize:l})}))),M=(0,he.useRef)(null),x=(0,he.useRef)(null),E=(0,he.useRef)(null),[W,C]=(0,he.useState)([]),[N,z]=(0,he.useState)(!1),[S,R]=(0,he.useState)({k:1,x:0,y:0}),[L,T]=(0,he.useState)(!1);(0,he.useEffect)((()=>{m(S.k)}),[m,S.k]);var[D,B]=(0,he.useState)(null),A=(0,he.useMemo)((()=>null!=d?d:[.5,2]),[d]),H=(0,he.useMemo)((()=>(0,fe.AT)()),[]);(0,he.useEffect)((()=>{var e=!1;H.scaleExtent(c?A:[1,1]).on("start",(()=>{e=!1,z(!0)})).on("zoom",(t=>{e=!0,R(t.transform)})).on("end",(()=>{z(!1),e||null==v||v(null)}))}),[v,A,c,H]),(0,he.useEffect)((()=>{var e=M.current;if(e){var t=(0,be.c)(e),a=()=>{t.on(".zoom",null).on(".zoom.custom",null).on("wheel",null)};if(c||o||u)return(c||o)&&t.on("wheel.zoom.custom",(e=>{e.ctrlKey||(e.stopImmediatePropagation(),o&&(e.preventDefault(),H.translateBy(t,e.wheelDeltaX/5,e.wheelDeltaY/5)))})),t.call(H).on("wheel",(e=>e.preventDefault())).on("dblclick.zoom",null).on("mousedown.zoom",null),u||t.on("touchstart.zoom",null).on("touchmove.zoom",null).on("touchend.zoom",null),a;a()}}),[u,o,c,H]),(0,he.useEffect)((()=>{var e=M.current;if(e&&!L){var{k:t,x:a,y:n}=(0,Gn.c)(k,{canvasWidth:e.clientWidth,canvasHeight:e.clientHeight,scaleRange:c?A:void 0});H.transform((0,be.c)(e),new fe.O(t,a,n)),T(!0)}}),[k,L,A,c,H]),(0,he.useImperativeHandle)(t,(()=>({dropNode(e){y({type:"drop-node",payload:e})},dropDecorator(e){y({type:"drop-decorator",payload:e})},addNodes(e,t){var{defaultNodeSize:a,canvasHeight:n}=t,l=k.findLastIndex((e=>!("decorator"===e.type&&"text"===e.decorator)))+1,i=[...k.slice(0,l),...e,...k.slice(l)],{cells:r,updated:s}=(0,Zn.s)({cells:i,defaultNodeSize:a,canvasHeight:n,transform:S});return y({type:"update-cells",payload:r}),s.filter((t=>e.includes(t)))},addEdge(e){y({type:"add-edge",payload:e})},updateCells(e){y({type:"update-cells",payload:e})},getTransform:()=>S,manuallyConnectNodes(e){var t=k.find((t=>(0,Kn.G4)(t)&&t.id===e));if(t){var a=M.current.getBoundingClientRect();return B({source:t,from:[t.view.x+t.view.width/2,t.view.y+t.view.height/2],offset:[a.left,a.top]}),new Promise(((e,t)=>{E.current={resolve:e,reject:t}}))}return Promise.reject(null)}})),[k,S]);var P=(0,he.useCallback)(((e,t)=>{for(var a,n=0;n<k.length;n++){var l=k[n];if((0,Kn.G4)(l)&&l.id!==e.source.id&&l.view.x<t[0]&&l.view.x+l.view.width>t[0]&&l.view.y<t[1]&&l.view.y+l.view.height>t[1]){var i;null===(i=E.current)||void 0===i||i.resolve({source:e.source,target:l});break}}null===(a=E.current)||void 0===a||a.reject(null),B(null)}),[k]);(0,he.useEffect)((()=>{$n(a,!!D)}),[D,a]);var I=null!=s?s:null,[O,Y]=(0,he.useState)(I);(0,he.useEffect)((()=>{Y((e=>(0,Xn.M)(e,I)?e:I))}),[I]);var K=(0,he.useRef)(!1);(0,he.useEffect)((()=>{K.current?h(O):K.current=!0}),[O,h]),(0,he.useEffect)((()=>{if(O){var e=e=>{e.composedPath().indexOf(x.current)<=0&&Y(null)};return document.addEventListener("click",e),()=>{document.removeEventListener("click",e)}}}),[O]),(0,he.useEffect)((()=>{var e=M.current;if(e&&!(W.length>0)){var t=e=>{var t=(0,Vn.Y)(e,{cells:k,activeTarget:O});"delete-cell"===(null==t?void 0:t.action)&&b(t.cell)};return e.addEventListener("keydown",t),()=>{e.removeEventListener("keydown",t)}}}),[O,k,W.length,b]);var X=(0,he.useMemo)((()=>"".concat((0,ke.uniqueId)("diagram-"),"-")),[]),V="".concat(X,"line-arrow-"),_="".concat(V,"1"),j=(0,he.useCallback)((e=>{y({type:"move-cell",payload:e})}),[]),q=(0,he.useCallback)((e=>{y({type:"move-cell",payload:e}),p(e)}),[p]),F=(0,he.useCallback)((e=>{y({type:"resize-cell",payload:e})}),[]),G=(0,he.useCallback)((e=>{y({type:"resize-cell",payload:e}),g(e)}),[g]),Z=(0,he.useCallback)((e=>{var{id:t,editing:a}=e;C(a?e=>e.includes(t)?e:[...e,t]:e=>e.filter((e=>e!==t)))}),[]);return ve().createElement("svg",{width:"100%",height:"100%",ref:M,className:me()("root",{grabbing:N,pannable:u}),tabIndex:-1},ve().createElement("defs",null,ve().createElement(Se.y,{id:_,type:"arrow",strokeColor:"gray"})),ve().createElement("g",{transform:"translate(".concat(S.x," ").concat(S.y,") scale(").concat(S.k,")")},ve().createElement("g",{className:"cells",ref:x},k.map((e=>ve().createElement(_n.s,{key:"".concat(e.type,":").concat("edge"===e.type?"".concat(e.source,"~").concat(e.target):e.id),cell:e,cells:k,defaultNodeBricks:i,defaultEdgeLines:r,transform:S,markerEnd:_,active:(0,Xn.M)(O,e),onCellMoving:j,onCellMoved:q,onCellResizing:F,onCellResized:G,onSwitchActiveTarget:v,onCellContextMenu:f,onDecoratorTextChange:w,onDecoratorTextEditing:Z})))),ve().createElement(qn.E,{connectLineState:D,transform:S,markerEnd:_,onConnect:P})))}An=Il,({e:[Sa,La,Da,Aa,Pa,Oa,Ka,Va,ja,Fa,Ga,Za,Ua,Ja,Qa,tn,an,nn,rn,sn,cn,un,dn,hn,pn,gn,bn,wn,mn,kn,Mn,xn,En,Cn,Nn,zn,Wa],c:[Hn,Ca]}=(0,de.c)(An,[[za,1,"cells"],[Ra,1,"defaultNodeSize"],[Ta,1,"defaultNodeBricks"],[Ba,1,"defaultEdgeLines"],[Ha,1,"activeTarget"],[Ia,1,"zoomable"],[Ya,1,"scrollable"],[Xa,1,"pannable"],[_a,1,"scaleRange"],[qa,1,"activeTargetChangeEvent",e=>(0,ue.c)(e,dl),(e,t)=>(0,oe.c)(e,dl,t)],[$a,1,"nodeMoveEvent",e=>(0,ue.c)(e,gl),(e,t)=>(0,oe.c)(e,gl,t)],[en,1,"cellMoveEvent",e=>(0,ue.c)(e,fl),(e,t)=>(0,oe.c)(e,fl,t)],[ln,1,"cellResizeEvent",e=>(0,ue.c)(e,kl),(e,t)=>(0,oe.c)(e,kl,t)],[on,1,"nodeDelete",e=>(0,ue.c)(e,xl),(e,t)=>(0,oe.c)(e,xl,t)],[vn,1,"cellDelete",e=>(0,ue.c)(e,Wl),(e,t)=>(0,oe.c)(e,Wl,t)],[fn,1,"cellContextMenu",e=>(0,ue.c)(e,zl),(e,t)=>(0,oe.c)(e,zl,t)],[yn,1,"decoratorTextChange",e=>(0,ue.c)(e,Ll),(e,t)=>(0,oe.c)(e,Ll,t)],[Wn,1,"scaleChange",e=>(0,ue.c)(e,Bl),(e,t)=>(0,oe.c)(e,Bl,t)],[Sn,2,"dropNode"],[Rn,2,"dropDecorator"],[Ln,2,"addNodes"],[Tn,2,"addEdge"],[Dn,2,"manuallyConnectNodes"],[Bn,2,"updateCells"]],Na,0,(e=>Pl.has((0,ce.c)(e))),ge.ReactNextElement)),Ca();var li,ii,ri,si,ci,oi,ui,di,hi,vi,pi,gi,bi,fi,wi,mi,ki,yi,Mi,xi,Ei,Wi,Ci,Ni=a(3704),{defineElement:zi,property:Si,event:Ri}=(0,pe.createDecorators)();ri=[zi("diagram.experimental-node",{styleTexts:[Ni.c]})],si=Si(),oi=Si({type:String,render:!1}),di=Si({type:String}),vi=Ri({type:"drag.start"}),fi=Ri({type:"drag.move"}),yi=Ri({type:"drag.end"});var Li=new WeakMap,Ti=new WeakMap,Di=new WeakMap,Bi=new WeakMap,Ai=new WeakMap,Hi=new WeakMap,Pi=new WeakMap,Ii=new WeakMap,Oi=new WeakMap,Yi=new WeakMap,Ki=new WeakMap,Xi=new WeakMap;class Vi extends ge.ReactNextElement{constructor(){super(...arguments),(0,se.c)(this,Ki,{get:Zi,set:Gi}),(0,se.c)(this,Ii,{get:Fi,set:qi}),(0,se.c)(this,Ai,{get:ji,set:_i}),(0,se.c)(this,Li,{writable:!0,value:(li(this),ci(this))}),(0,se.c)(this,Ti,{writable:!0,value:ui(this)}),(0,se.c)(this,Di,{writable:!0,value:hi(this)}),(0,se.c)(this,Bi,{writable:!0,value:pi(this)}),(0,se.c)(this,Hi,{writable:!0,value:e=>{(0,ue.c)(this,Ai).emit(e)}}),(0,se.c)(this,Pi,{writable:!0,value:wi(this)}),(0,se.c)(this,Oi,{writable:!0,value:e=>{(0,ue.c)(this,Ii).emit(e)}}),(0,se.c)(this,Yi,{writable:!0,value:Mi(this)}),(0,se.c)(this,Xi,{writable:!0,value:e=>{(0,ue.c)(this,Ki).emit(e)}})}get usage(){return(0,ue.c)(this,Li)}set usage(e){(0,oe.c)(this,Li,e)}get status(){return(0,ue.c)(this,Ti)}set status(e){(0,oe.c)(this,Ti,e)}get decorator(){return(0,ue.c)(this,Di)}set decorator(e){(0,oe.c)(this,Di,e)}render(){return ve().createElement($i,{usage:this.usage,onDragStart:(0,ue.c)(this,Hi),onDragMove:(0,ue.c)(this,Oi),onDragEnd:(0,ue.c)(this,Xi)})}}function _i(e){bi(this,e)}function ji(){return gi(this)}function qi(e){ki(this,e)}function Fi(){return mi(this)}function Gi(e){Ei(this,e)}function Zi(){return xi(this)}function $i(e){var{usage:t,onDragStart:a,onDragMove:n,onDragEnd:l}=e,i=(0,he.useCallback)((e=>{if("library"===t){e.stopPropagation(),e.preventDefault();var i=[e.clientX,e.clientY],r=!1,s=e=>{r||(r=(e.clientX-i[0])**2+(e.clientY-i[1])**2>=9)&&(null==a||a([e.clientX,e.clientY])),r&&(null==n||n([e.clientX,e.clientY]))},c=e=>{document.removeEventListener("mousemove",s),document.removeEventListener("mouseup",c),r&&(null==l||l([e.clientX,e.clientY]))};document.addEventListener("mousemove",s),document.addEventListener("mouseup",c)}}),[l,n,a,t]);return ve().createElement("div",{onMouseDown:i},ve().createElement("slot",null))}Wi=Vi,({e:[ci,ui,hi,pi,gi,bi,wi,mi,ki,Mi,xi,Ei,li],c:[Ci,ii]}=(0,de.c)(Wi,[[si,1,"usage"],[oi,1,"status"],[di,1,"decorator"],[vi,1,"dragStartEvent",e=>(0,ue.c)(e,Bi),(e,t)=>(0,oe.c)(e,Bi,t)],[fi,1,"dragMoveEvent",e=>(0,ue.c)(e,Pi),(e,t)=>(0,oe.c)(e,Pi,t)],[yi,1,"dragEndEvent",e=>(0,ue.c)(e,Yi),(e,t)=>(0,oe.c)(e,Yi,t)]],ri,0,(e=>Xi.has((0,ce.c)(e))),ge.ReactNextElement)),ii()},7518:(e,t,a)=>{a.d(t,{c:()=>s});var n=a(8304),l=a.n(n),i=a(1849),r=a.n(i)()(l());r.push([e.id,':host{display:block;--local-label-line-height:inherit;--local-label-font-size:inherit;--local-label-color:inherit;--local-label-font-weight:inherit}:host([hidden]){display:none}:host([type="line"]){--local-label-line-height:18px;--local-label-font-size:11px;--local-label-color:var(--color-secondary-text);--local-label-font-weight:400}*{box-sizing:border-box}.label{max-width:168px;margin:-3px}.label-text,\n.label-input{width:100%;height:24px;padding:3px;border:none;line-height:var(--local-label-line-height);font-size:var(--local-label-font-size);color:var(--local-label-color);font-weight:var(--local-label-font-weight);text-align:center;font-family:inherit;cursor:text;-webkit-user-select:text;-moz-user-select:text;user-select:text}.label-text{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.label.editing .label-text,\n.label.empty:not(.editing) .label-text,\n.label:not(.editing) .label-input{display:none}',""]);const s=r.toString()},3704:(e,t,a)=>{a.d(t,{c:()=>s});var n=a(8304),l=a.n(n),i=a(1849),r=a.n(i)()(l());r.push([e.id,'*{box-sizing:border-box}:host{display:block;border:1px solid var(--palette-gray-5);cursor:default;-webkit-user-select:none;-moz-user-select:none;user-select:none}:host([hidden]){display:none}:host([usage="dragging"]){opacity:0.75;position:fixed}:host(:not([usage="library"])){background:var(--palette-gray-3);width:60px;height:60px}:host([usage="library"]){width:180px;height:30px;margin-bottom:10px}div{width:100%;height:100%;display:flex;align-items:center;justify-content:center}:host([status="highlighted"]){color:var(--palette-blue-5);background:var(--palette-blue-1);border-color:1px solid var(--palette-blue-4)}:host([status="faded"]){opacity:0.3}:host([decorator="area"]){width:100px;height:60px;background:rgba(119,141,195,0.1);border:none}:host([decorator="text"]){width:auto;height:auto;background:none;border:none}',""]);const s=r.toString()}}]);
2
- //# sourceMappingURL=5676.b73cbbce.js.map