rete-angular-plugin 0.0.0 → 2.0.0

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 (472) hide show
  1. package/12/bundles/rete-angular-plugin-ng12.umd.js +2197 -0
  2. package/12/bundles/rete-angular-plugin-ng12.umd.js.map +1 -0
  3. package/12/core.d.ts +48 -0
  4. package/12/esm2015/core.js +103 -0
  5. package/12/esm2015/index.js +11 -0
  6. package/12/esm2015/module.js +58 -0
  7. package/12/esm2015/presets/classic/components/connection/connection-wrapper.component.js +84 -0
  8. package/12/esm2015/presets/classic/components/connection/connection.component.js +32 -0
  9. package/12/esm2015/presets/classic/components/control/control.component.js +54 -0
  10. package/12/esm2015/presets/classic/components/index.js +6 -0
  11. package/12/esm2015/presets/classic/components/node/node.component.js +143 -0
  12. package/12/esm2015/presets/classic/components/socket/socket.component.js +34 -0
  13. package/12/esm2015/presets/classic/index.js +108 -0
  14. package/12/esm2015/presets/classic/types.js +2 -0
  15. package/12/esm2015/presets/context-menu/components/index.js +4 -0
  16. package/12/esm2015/presets/context-menu/components/item/item.component.js +116 -0
  17. package/12/esm2015/presets/context-menu/components/menu/menu.component.js +111 -0
  18. package/12/esm2015/presets/context-menu/components/search/search.component.js +28 -0
  19. package/12/esm2015/presets/context-menu/debounce.js +17 -0
  20. package/12/esm2015/presets/context-menu/index.js +38 -0
  21. package/12/esm2015/presets/context-menu/module.js +40 -0
  22. package/12/esm2015/presets/context-menu/types.js +2 -0
  23. package/12/esm2015/presets/index.js +5 -0
  24. package/12/esm2015/presets/minimap/components/index.js +4 -0
  25. package/12/esm2015/presets/minimap/components/mini-node/mini-node.component.js +55 -0
  26. package/12/esm2015/presets/minimap/components/mini-viewport/mini-viewport.component.js +81 -0
  27. package/12/esm2015/presets/minimap/components/minimap/minimap.component.js +104 -0
  28. package/12/esm2015/presets/minimap/index.js +42 -0
  29. package/12/esm2015/presets/minimap/module.js +40 -0
  30. package/12/esm2015/presets/minimap/types.js +2 -0
  31. package/12/esm2015/presets/reroute/components/index.js +3 -0
  32. package/12/esm2015/presets/reroute/components/pin/pin.component.js +86 -0
  33. package/12/esm2015/presets/reroute/components/pins/pins.component.js +52 -0
  34. package/12/esm2015/presets/reroute/index.js +32 -0
  35. package/12/esm2015/presets/reroute/module.js +35 -0
  36. package/12/esm2015/presets/reroute/types.js +2 -0
  37. package/12/esm2015/presets/types.js +2 -0
  38. package/12/esm2015/rete-angular-plugin-ng12.js +5 -0
  39. package/12/esm2015/shared/drag.js +23 -0
  40. package/12/esm2015/types.js +2 -0
  41. package/12/fesm2015/rete-angular-plugin-ng12.js +1475 -0
  42. package/12/fesm2015/rete-angular-plugin-ng12.js.map +1 -0
  43. package/12/index.d.ts +12 -0
  44. package/12/module.d.ts +12 -0
  45. package/12/package.json +17 -0
  46. package/12/presets/classic/components/connection/connection-wrapper.component.d.ts +30 -0
  47. package/12/presets/classic/components/connection/connection.component.d.ts +11 -0
  48. package/12/presets/classic/components/control/control.component.d.ts +14 -0
  49. package/12/presets/classic/components/index.d.ts +5 -0
  50. package/12/presets/classic/components/node/node.component.d.ts +28 -0
  51. package/12/presets/classic/components/socket/socket.component.d.ts +12 -0
  52. package/12/presets/classic/index.d.ts +18 -0
  53. package/12/presets/classic/types.d.ts +49 -0
  54. package/12/presets/context-menu/components/index.d.ts +3 -0
  55. package/12/presets/context-menu/components/item/item.component.d.ts +26 -0
  56. package/12/presets/context-menu/components/menu/menu.component.d.ts +27 -0
  57. package/12/presets/context-menu/components/search/search.component.d.ts +8 -0
  58. package/12/presets/context-menu/debounce.d.ts +5 -0
  59. package/12/presets/context-menu/index.d.ts +6 -0
  60. package/12/presets/context-menu/module.d.ts +10 -0
  61. package/12/presets/context-menu/types.d.ts +12 -0
  62. package/12/presets/index.d.ts +4 -0
  63. package/12/presets/minimap/components/index.d.ts +3 -0
  64. package/12/presets/minimap/components/mini-node/mini-node.component.d.ts +14 -0
  65. package/12/presets/minimap/components/mini-viewport/mini-viewport.component.d.ts +27 -0
  66. package/12/presets/minimap/components/minimap/minimap.component.d.ts +25 -0
  67. package/12/presets/minimap/index.d.ts +6 -0
  68. package/12/presets/minimap/module.d.ts +10 -0
  69. package/12/presets/minimap/types.d.ts +22 -0
  70. package/12/presets/reroute/components/index.d.ts +2 -0
  71. package/12/presets/reroute/components/pin/pin.component.d.ts +30 -0
  72. package/12/presets/reroute/components/pins/pins.component.d.ts +17 -0
  73. package/12/presets/reroute/index.d.ts +10 -0
  74. package/12/presets/reroute/module.d.ts +9 -0
  75. package/12/presets/reroute/types.d.ts +18 -0
  76. package/12/presets/types.d.ts +15 -0
  77. package/12/rete-angular-plugin-ng12.d.ts +5 -0
  78. package/12/shared/drag.d.ts +10 -0
  79. package/12/types.d.ts +29 -0
  80. package/13/core.d.ts +48 -0
  81. package/13/esm2020/core.mjs +109 -0
  82. package/13/esm2020/index.mjs +11 -0
  83. package/13/esm2020/module.mjs +58 -0
  84. package/13/esm2020/presets/classic/components/connection/connection-wrapper.component.mjs +79 -0
  85. package/13/esm2020/presets/classic/components/connection/connection.component.mjs +28 -0
  86. package/13/esm2020/presets/classic/components/control/control.component.mjs +51 -0
  87. package/13/esm2020/presets/classic/components/index.mjs +6 -0
  88. package/13/esm2020/presets/classic/components/node/node.component.mjs +137 -0
  89. package/13/esm2020/presets/classic/components/socket/socket.component.mjs +31 -0
  90. package/13/esm2020/presets/classic/index.mjs +111 -0
  91. package/13/esm2020/presets/classic/types.mjs +2 -0
  92. package/13/esm2020/presets/context-menu/components/index.mjs +4 -0
  93. package/13/esm2020/presets/context-menu/components/item/item.component.mjs +111 -0
  94. package/13/esm2020/presets/context-menu/components/menu/menu.component.mjs +105 -0
  95. package/13/esm2020/presets/context-menu/components/search/search.component.mjs +24 -0
  96. package/13/esm2020/presets/context-menu/debounce.mjs +17 -0
  97. package/13/esm2020/presets/context-menu/index.mjs +38 -0
  98. package/13/esm2020/presets/context-menu/module.mjs +40 -0
  99. package/13/esm2020/presets/context-menu/types.mjs +2 -0
  100. package/13/esm2020/presets/index.mjs +5 -0
  101. package/13/esm2020/presets/minimap/components/index.mjs +4 -0
  102. package/13/esm2020/presets/minimap/components/mini-node/mini-node.component.mjs +50 -0
  103. package/13/esm2020/presets/minimap/components/mini-viewport/mini-viewport.component.mjs +76 -0
  104. package/13/esm2020/presets/minimap/components/minimap/minimap.component.mjs +100 -0
  105. package/13/esm2020/presets/minimap/index.mjs +42 -0
  106. package/13/esm2020/presets/minimap/module.mjs +40 -0
  107. package/13/esm2020/presets/minimap/types.mjs +2 -0
  108. package/13/esm2020/presets/reroute/components/index.mjs +3 -0
  109. package/13/esm2020/presets/reroute/components/pin/pin.component.mjs +81 -0
  110. package/13/esm2020/presets/reroute/components/pins/pins.component.mjs +50 -0
  111. package/13/esm2020/presets/reroute/index.mjs +40 -0
  112. package/13/esm2020/presets/reroute/module.mjs +35 -0
  113. package/13/esm2020/presets/reroute/types.mjs +2 -0
  114. package/13/esm2020/presets/types.mjs +2 -0
  115. package/13/esm2020/rete-angular-plugin-ng13.mjs +5 -0
  116. package/13/esm2020/shared/drag.mjs +23 -0
  117. package/13/esm2020/types.mjs +2 -0
  118. package/13/fesm2015/rete-angular-plugin-ng13.mjs +1545 -0
  119. package/13/fesm2015/rete-angular-plugin-ng13.mjs.map +1 -0
  120. package/13/fesm2020/rete-angular-plugin-ng13.mjs +1436 -0
  121. package/13/fesm2020/rete-angular-plugin-ng13.mjs.map +1 -0
  122. package/13/index.d.ts +12 -0
  123. package/13/module.d.ts +12 -0
  124. package/13/package.json +30 -0
  125. package/13/presets/classic/components/connection/connection-wrapper.component.d.ts +30 -0
  126. package/13/presets/classic/components/connection/connection.component.d.ts +11 -0
  127. package/13/presets/classic/components/control/control.component.d.ts +14 -0
  128. package/13/presets/classic/components/index.d.ts +5 -0
  129. package/13/presets/classic/components/node/node.component.d.ts +28 -0
  130. package/13/presets/classic/components/socket/socket.component.d.ts +12 -0
  131. package/13/presets/classic/index.d.ts +18 -0
  132. package/13/presets/classic/types.d.ts +49 -0
  133. package/13/presets/context-menu/components/index.d.ts +3 -0
  134. package/13/presets/context-menu/components/item/item.component.d.ts +26 -0
  135. package/13/presets/context-menu/components/menu/menu.component.d.ts +27 -0
  136. package/13/presets/context-menu/components/search/search.component.d.ts +8 -0
  137. package/13/presets/context-menu/debounce.d.ts +5 -0
  138. package/13/presets/context-menu/index.d.ts +6 -0
  139. package/13/presets/context-menu/module.d.ts +10 -0
  140. package/13/presets/context-menu/types.d.ts +12 -0
  141. package/13/presets/index.d.ts +4 -0
  142. package/13/presets/minimap/components/index.d.ts +3 -0
  143. package/13/presets/minimap/components/mini-node/mini-node.component.d.ts +14 -0
  144. package/13/presets/minimap/components/mini-viewport/mini-viewport.component.d.ts +27 -0
  145. package/13/presets/minimap/components/minimap/minimap.component.d.ts +25 -0
  146. package/13/presets/minimap/index.d.ts +6 -0
  147. package/13/presets/minimap/module.d.ts +10 -0
  148. package/13/presets/minimap/types.d.ts +22 -0
  149. package/13/presets/reroute/components/index.d.ts +2 -0
  150. package/13/presets/reroute/components/pin/pin.component.d.ts +30 -0
  151. package/13/presets/reroute/components/pins/pins.component.d.ts +17 -0
  152. package/13/presets/reroute/index.d.ts +10 -0
  153. package/13/presets/reroute/module.d.ts +9 -0
  154. package/13/presets/reroute/types.d.ts +18 -0
  155. package/13/presets/types.d.ts +15 -0
  156. package/13/rete-angular-plugin-ng13.d.ts +5 -0
  157. package/13/shared/drag.d.ts +10 -0
  158. package/13/types.d.ts +29 -0
  159. package/14/core.d.ts +48 -0
  160. package/14/esm2020/core.mjs +109 -0
  161. package/14/esm2020/index.mjs +11 -0
  162. package/14/esm2020/module.mjs +56 -0
  163. package/14/esm2020/presets/classic/components/connection/connection-wrapper.component.mjs +79 -0
  164. package/14/esm2020/presets/classic/components/connection/connection.component.mjs +28 -0
  165. package/14/esm2020/presets/classic/components/control/control.component.mjs +51 -0
  166. package/14/esm2020/presets/classic/components/index.mjs +6 -0
  167. package/14/esm2020/presets/classic/components/node/node.component.mjs +137 -0
  168. package/14/esm2020/presets/classic/components/socket/socket.component.mjs +31 -0
  169. package/14/esm2020/presets/classic/index.mjs +111 -0
  170. package/14/esm2020/presets/classic/types.mjs +2 -0
  171. package/14/esm2020/presets/context-menu/components/index.mjs +4 -0
  172. package/14/esm2020/presets/context-menu/components/item/item.component.mjs +111 -0
  173. package/14/esm2020/presets/context-menu/components/menu/menu.component.mjs +105 -0
  174. package/14/esm2020/presets/context-menu/components/search/search.component.mjs +24 -0
  175. package/14/esm2020/presets/context-menu/debounce.mjs +17 -0
  176. package/14/esm2020/presets/context-menu/index.mjs +38 -0
  177. package/14/esm2020/presets/context-menu/module.mjs +38 -0
  178. package/14/esm2020/presets/context-menu/types.mjs +2 -0
  179. package/14/esm2020/presets/index.mjs +5 -0
  180. package/14/esm2020/presets/minimap/components/index.mjs +4 -0
  181. package/14/esm2020/presets/minimap/components/mini-node/mini-node.component.mjs +50 -0
  182. package/14/esm2020/presets/minimap/components/mini-viewport/mini-viewport.component.mjs +76 -0
  183. package/14/esm2020/presets/minimap/components/minimap/minimap.component.mjs +100 -0
  184. package/14/esm2020/presets/minimap/index.mjs +42 -0
  185. package/14/esm2020/presets/minimap/module.mjs +38 -0
  186. package/14/esm2020/presets/minimap/types.mjs +2 -0
  187. package/14/esm2020/presets/reroute/components/index.mjs +3 -0
  188. package/14/esm2020/presets/reroute/components/pin/pin.component.mjs +81 -0
  189. package/14/esm2020/presets/reroute/components/pins/pins.component.mjs +50 -0
  190. package/14/esm2020/presets/reroute/index.mjs +40 -0
  191. package/14/esm2020/presets/reroute/module.mjs +33 -0
  192. package/14/esm2020/presets/reroute/types.mjs +2 -0
  193. package/14/esm2020/presets/types.mjs +2 -0
  194. package/14/esm2020/rete-angular-plugin-ng14.mjs +5 -0
  195. package/14/esm2020/shared/drag.mjs +23 -0
  196. package/14/esm2020/types.mjs +2 -0
  197. package/14/fesm2015/rete-angular-plugin-ng14.mjs +1537 -0
  198. package/14/fesm2015/rete-angular-plugin-ng14.mjs.map +1 -0
  199. package/14/fesm2020/rete-angular-plugin-ng14.mjs +1428 -0
  200. package/14/fesm2020/rete-angular-plugin-ng14.mjs.map +1 -0
  201. package/14/index.d.ts +12 -0
  202. package/14/module.d.ts +12 -0
  203. package/14/package.json +30 -0
  204. package/14/presets/classic/components/connection/connection-wrapper.component.d.ts +30 -0
  205. package/14/presets/classic/components/connection/connection.component.d.ts +11 -0
  206. package/14/presets/classic/components/control/control.component.d.ts +14 -0
  207. package/14/presets/classic/components/index.d.ts +5 -0
  208. package/14/presets/classic/components/node/node.component.d.ts +28 -0
  209. package/14/presets/classic/components/socket/socket.component.d.ts +12 -0
  210. package/14/presets/classic/index.d.ts +18 -0
  211. package/14/presets/classic/types.d.ts +49 -0
  212. package/14/presets/context-menu/components/index.d.ts +3 -0
  213. package/14/presets/context-menu/components/item/item.component.d.ts +26 -0
  214. package/14/presets/context-menu/components/menu/menu.component.d.ts +27 -0
  215. package/14/presets/context-menu/components/search/search.component.d.ts +8 -0
  216. package/14/presets/context-menu/debounce.d.ts +5 -0
  217. package/14/presets/context-menu/index.d.ts +6 -0
  218. package/14/presets/context-menu/module.d.ts +10 -0
  219. package/14/presets/context-menu/types.d.ts +12 -0
  220. package/14/presets/index.d.ts +4 -0
  221. package/14/presets/minimap/components/index.d.ts +3 -0
  222. package/14/presets/minimap/components/mini-node/mini-node.component.d.ts +14 -0
  223. package/14/presets/minimap/components/mini-viewport/mini-viewport.component.d.ts +27 -0
  224. package/14/presets/minimap/components/minimap/minimap.component.d.ts +25 -0
  225. package/14/presets/minimap/index.d.ts +6 -0
  226. package/14/presets/minimap/module.d.ts +10 -0
  227. package/14/presets/minimap/types.d.ts +22 -0
  228. package/14/presets/reroute/components/index.d.ts +2 -0
  229. package/14/presets/reroute/components/pin/pin.component.d.ts +30 -0
  230. package/14/presets/reroute/components/pins/pins.component.d.ts +17 -0
  231. package/14/presets/reroute/index.d.ts +10 -0
  232. package/14/presets/reroute/module.d.ts +9 -0
  233. package/14/presets/reroute/types.d.ts +18 -0
  234. package/14/presets/types.d.ts +15 -0
  235. package/14/shared/drag.d.ts +10 -0
  236. package/14/types.d.ts +29 -0
  237. package/15/core.d.ts +48 -0
  238. package/15/esm2020/core.mjs +109 -0
  239. package/15/esm2020/index.mjs +11 -0
  240. package/15/esm2020/module.mjs +56 -0
  241. package/15/esm2020/presets/classic/components/connection/connection-wrapper.component.mjs +79 -0
  242. package/15/esm2020/presets/classic/components/connection/connection.component.mjs +28 -0
  243. package/15/esm2020/presets/classic/components/control/control.component.mjs +51 -0
  244. package/15/esm2020/presets/classic/components/index.mjs +6 -0
  245. package/15/esm2020/presets/classic/components/node/node.component.mjs +137 -0
  246. package/15/esm2020/presets/classic/components/socket/socket.component.mjs +31 -0
  247. package/15/esm2020/presets/classic/index.mjs +111 -0
  248. package/15/esm2020/presets/classic/types.mjs +2 -0
  249. package/15/esm2020/presets/context-menu/components/index.mjs +4 -0
  250. package/15/esm2020/presets/context-menu/components/item/item.component.mjs +111 -0
  251. package/15/esm2020/presets/context-menu/components/menu/menu.component.mjs +105 -0
  252. package/15/esm2020/presets/context-menu/components/search/search.component.mjs +24 -0
  253. package/15/esm2020/presets/context-menu/debounce.mjs +17 -0
  254. package/15/esm2020/presets/context-menu/index.mjs +38 -0
  255. package/15/esm2020/presets/context-menu/module.mjs +38 -0
  256. package/15/esm2020/presets/context-menu/types.mjs +2 -0
  257. package/15/esm2020/presets/index.mjs +5 -0
  258. package/15/esm2020/presets/minimap/components/index.mjs +4 -0
  259. package/15/esm2020/presets/minimap/components/mini-node/mini-node.component.mjs +50 -0
  260. package/15/esm2020/presets/minimap/components/mini-viewport/mini-viewport.component.mjs +76 -0
  261. package/15/esm2020/presets/minimap/components/minimap/minimap.component.mjs +100 -0
  262. package/15/esm2020/presets/minimap/index.mjs +42 -0
  263. package/15/esm2020/presets/minimap/module.mjs +38 -0
  264. package/15/esm2020/presets/minimap/types.mjs +2 -0
  265. package/15/esm2020/presets/reroute/components/index.mjs +3 -0
  266. package/15/esm2020/presets/reroute/components/pin/pin.component.mjs +81 -0
  267. package/15/esm2020/presets/reroute/components/pins/pins.component.mjs +50 -0
  268. package/15/esm2020/presets/reroute/index.mjs +40 -0
  269. package/15/esm2020/presets/reroute/module.mjs +33 -0
  270. package/15/esm2020/presets/reroute/types.mjs +2 -0
  271. package/15/esm2020/presets/types.mjs +2 -0
  272. package/15/esm2020/rete-angular-plugin-ng15.mjs +5 -0
  273. package/15/esm2020/shared/drag.mjs +23 -0
  274. package/15/esm2020/types.mjs +2 -0
  275. package/15/fesm2015/rete-angular-plugin-ng15.mjs +1537 -0
  276. package/15/fesm2015/rete-angular-plugin-ng15.mjs.map +1 -0
  277. package/15/fesm2020/rete-angular-plugin-ng15.mjs +1428 -0
  278. package/15/fesm2020/rete-angular-plugin-ng15.mjs.map +1 -0
  279. package/15/index.d.ts +12 -0
  280. package/15/module.d.ts +12 -0
  281. package/15/package.json +30 -0
  282. package/15/presets/classic/components/connection/connection-wrapper.component.d.ts +30 -0
  283. package/15/presets/classic/components/connection/connection.component.d.ts +11 -0
  284. package/15/presets/classic/components/control/control.component.d.ts +14 -0
  285. package/15/presets/classic/components/index.d.ts +5 -0
  286. package/15/presets/classic/components/node/node.component.d.ts +28 -0
  287. package/15/presets/classic/components/socket/socket.component.d.ts +12 -0
  288. package/15/presets/classic/index.d.ts +18 -0
  289. package/15/presets/classic/types.d.ts +49 -0
  290. package/15/presets/context-menu/components/index.d.ts +3 -0
  291. package/15/presets/context-menu/components/item/item.component.d.ts +26 -0
  292. package/15/presets/context-menu/components/menu/menu.component.d.ts +27 -0
  293. package/15/presets/context-menu/components/search/search.component.d.ts +8 -0
  294. package/15/presets/context-menu/debounce.d.ts +5 -0
  295. package/15/presets/context-menu/index.d.ts +6 -0
  296. package/15/presets/context-menu/module.d.ts +10 -0
  297. package/15/presets/context-menu/types.d.ts +12 -0
  298. package/15/presets/index.d.ts +4 -0
  299. package/15/presets/minimap/components/index.d.ts +3 -0
  300. package/15/presets/minimap/components/mini-node/mini-node.component.d.ts +14 -0
  301. package/15/presets/minimap/components/mini-viewport/mini-viewport.component.d.ts +27 -0
  302. package/15/presets/minimap/components/minimap/minimap.component.d.ts +25 -0
  303. package/15/presets/minimap/index.d.ts +6 -0
  304. package/15/presets/minimap/module.d.ts +10 -0
  305. package/15/presets/minimap/types.d.ts +22 -0
  306. package/15/presets/reroute/components/index.d.ts +2 -0
  307. package/15/presets/reroute/components/pin/pin.component.d.ts +30 -0
  308. package/15/presets/reroute/components/pins/pins.component.d.ts +17 -0
  309. package/15/presets/reroute/index.d.ts +10 -0
  310. package/15/presets/reroute/module.d.ts +9 -0
  311. package/15/presets/reroute/types.d.ts +18 -0
  312. package/15/presets/types.d.ts +15 -0
  313. package/15/shared/drag.d.ts +10 -0
  314. package/15/types.d.ts +29 -0
  315. package/16/core.d.ts +48 -0
  316. package/16/esm2022/core.mjs +111 -0
  317. package/16/esm2022/index.mjs +11 -0
  318. package/16/esm2022/module.mjs +49 -0
  319. package/16/esm2022/presets/classic/components/connection/connection-wrapper.component.mjs +90 -0
  320. package/16/esm2022/presets/classic/components/connection/connection.component.mjs +32 -0
  321. package/16/esm2022/presets/classic/components/control/control.component.mjs +54 -0
  322. package/16/esm2022/presets/classic/components/index.mjs +6 -0
  323. package/16/esm2022/presets/classic/components/node/node.component.mjs +144 -0
  324. package/16/esm2022/presets/classic/components/socket/socket.component.mjs +34 -0
  325. package/16/esm2022/presets/classic/index.mjs +111 -0
  326. package/16/esm2022/presets/classic/types.mjs +2 -0
  327. package/16/esm2022/presets/context-menu/components/index.mjs +4 -0
  328. package/16/esm2022/presets/context-menu/components/item/item.component.mjs +114 -0
  329. package/16/esm2022/presets/context-menu/components/menu/menu.component.mjs +111 -0
  330. package/16/esm2022/presets/context-menu/components/search/search.component.mjs +23 -0
  331. package/16/esm2022/presets/context-menu/debounce.mjs +17 -0
  332. package/16/esm2022/presets/context-menu/index.mjs +38 -0
  333. package/16/esm2022/presets/context-menu/module.mjs +35 -0
  334. package/16/esm2022/presets/context-menu/types.mjs +2 -0
  335. package/16/esm2022/presets/index.mjs +5 -0
  336. package/16/esm2022/presets/minimap/components/index.mjs +4 -0
  337. package/16/esm2022/presets/minimap/components/mini-node/mini-node.component.mjs +54 -0
  338. package/16/esm2022/presets/minimap/components/mini-viewport/mini-viewport.component.mjs +80 -0
  339. package/16/esm2022/presets/minimap/components/minimap/minimap.component.mjs +109 -0
  340. package/16/esm2022/presets/minimap/index.mjs +42 -0
  341. package/16/esm2022/presets/minimap/module.mjs +35 -0
  342. package/16/esm2022/presets/minimap/types.mjs +2 -0
  343. package/16/esm2022/presets/reroute/components/index.mjs +3 -0
  344. package/16/esm2022/presets/reroute/components/pin/pin.component.mjs +85 -0
  345. package/16/esm2022/presets/reroute/components/pins/pins.component.mjs +57 -0
  346. package/16/esm2022/presets/reroute/index.mjs +40 -0
  347. package/16/esm2022/presets/reroute/module.mjs +30 -0
  348. package/16/esm2022/presets/reroute/types.mjs +2 -0
  349. package/16/esm2022/presets/types.mjs +2 -0
  350. package/16/esm2022/rete-angular-plugin-ng16.mjs +5 -0
  351. package/16/esm2022/shared/drag.mjs +23 -0
  352. package/16/esm2022/types.mjs +2 -0
  353. package/16/fesm2022/rete-angular-plugin-ng16.mjs +1478 -0
  354. package/16/fesm2022/rete-angular-plugin-ng16.mjs.map +1 -0
  355. package/16/index.d.ts +12 -0
  356. package/16/module.d.ts +12 -0
  357. package/16/package.json +24 -0
  358. package/16/presets/classic/components/connection/connection-wrapper.component.d.ts +30 -0
  359. package/16/presets/classic/components/connection/connection.component.d.ts +11 -0
  360. package/16/presets/classic/components/control/control.component.d.ts +14 -0
  361. package/16/presets/classic/components/index.d.ts +5 -0
  362. package/16/presets/classic/components/node/node.component.d.ts +28 -0
  363. package/16/presets/classic/components/socket/socket.component.d.ts +12 -0
  364. package/16/presets/classic/index.d.ts +18 -0
  365. package/16/presets/classic/types.d.ts +49 -0
  366. package/16/presets/context-menu/components/index.d.ts +3 -0
  367. package/16/presets/context-menu/components/item/item.component.d.ts +26 -0
  368. package/16/presets/context-menu/components/menu/menu.component.d.ts +27 -0
  369. package/16/presets/context-menu/components/search/search.component.d.ts +8 -0
  370. package/16/presets/context-menu/debounce.d.ts +5 -0
  371. package/16/presets/context-menu/index.d.ts +6 -0
  372. package/16/presets/context-menu/module.d.ts +10 -0
  373. package/16/presets/context-menu/types.d.ts +12 -0
  374. package/16/presets/index.d.ts +4 -0
  375. package/16/presets/minimap/components/index.d.ts +3 -0
  376. package/16/presets/minimap/components/mini-node/mini-node.component.d.ts +14 -0
  377. package/16/presets/minimap/components/mini-viewport/mini-viewport.component.d.ts +27 -0
  378. package/16/presets/minimap/components/minimap/minimap.component.d.ts +25 -0
  379. package/16/presets/minimap/index.d.ts +6 -0
  380. package/16/presets/minimap/module.d.ts +10 -0
  381. package/16/presets/minimap/types.d.ts +22 -0
  382. package/16/presets/reroute/components/index.d.ts +2 -0
  383. package/16/presets/reroute/components/pin/pin.component.d.ts +30 -0
  384. package/16/presets/reroute/components/pins/pins.component.d.ts +17 -0
  385. package/16/presets/reroute/index.d.ts +10 -0
  386. package/16/presets/reroute/module.d.ts +9 -0
  387. package/16/presets/reroute/types.d.ts +18 -0
  388. package/16/presets/types.d.ts +15 -0
  389. package/16/shared/drag.d.ts +10 -0
  390. package/16/types.d.ts +29 -0
  391. package/LICENSE +21 -0
  392. package/README.md +28 -0
  393. package/bundles/rete-angular-plugin.umd.js +1707 -0
  394. package/bundles/rete-angular-plugin.umd.js.map +1 -0
  395. package/core.d.ts +48 -0
  396. package/esm2015/core.js +103 -0
  397. package/esm2015/index.js +12 -0
  398. package/esm2015/module.js +40 -0
  399. package/esm2015/presets/classic/components/connection/connection-wrapper.component.js +80 -0
  400. package/esm2015/presets/classic/components/connection/connection.component.js +17 -0
  401. package/esm2015/presets/classic/components/control/control.component.js +42 -0
  402. package/esm2015/presets/classic/components/index.js +6 -0
  403. package/esm2015/presets/classic/components/node/node.component.js +62 -0
  404. package/esm2015/presets/classic/components/socket/socket.component.js +29 -0
  405. package/esm2015/presets/classic/index.js +108 -0
  406. package/esm2015/presets/classic/types.js +2 -0
  407. package/esm2015/presets/context-menu/components/index.js +4 -0
  408. package/esm2015/presets/context-menu/components/item/item.component.js +64 -0
  409. package/esm2015/presets/context-menu/components/menu/menu.component.js +62 -0
  410. package/esm2015/presets/context-menu/components/search/search.component.js +18 -0
  411. package/esm2015/presets/context-menu/debounce.js +17 -0
  412. package/esm2015/presets/context-menu/index.js +38 -0
  413. package/esm2015/presets/context-menu/module.js +28 -0
  414. package/esm2015/presets/context-menu/types.js +2 -0
  415. package/esm2015/presets/index.js +9 -0
  416. package/esm2015/presets/minimap/components/index.js +4 -0
  417. package/esm2015/presets/minimap/components/mini-node/mini-node.component.js +39 -0
  418. package/esm2015/presets/minimap/components/mini-viewport/mini-viewport.component.js +59 -0
  419. package/esm2015/presets/minimap/components/minimap/minimap.component.js +70 -0
  420. package/esm2015/presets/minimap/index.js +42 -0
  421. package/esm2015/presets/minimap/module.js +28 -0
  422. package/esm2015/presets/minimap/types.js +2 -0
  423. package/esm2015/presets/reroute/components/index.js +3 -0
  424. package/esm2015/presets/reroute/components/pin/pin.component.js +66 -0
  425. package/esm2015/presets/reroute/components/pins/pins.component.js +31 -0
  426. package/esm2015/presets/reroute/index.js +32 -0
  427. package/esm2015/presets/reroute/module.js +25 -0
  428. package/esm2015/presets/reroute/types.js +2 -0
  429. package/esm2015/presets/types.js +2 -0
  430. package/esm2015/rete-angular-plugin.js +18 -0
  431. package/esm2015/shared/drag.js +23 -0
  432. package/esm2015/types.js +2 -0
  433. package/fesm2015/rete-angular-plugin.js +1111 -0
  434. package/fesm2015/rete-angular-plugin.js.map +1 -0
  435. package/index.d.ts +12 -0
  436. package/module.d.ts +2 -0
  437. package/package.json +37 -5
  438. package/presets/classic/components/connection/connection-wrapper.component.d.ts +27 -0
  439. package/presets/classic/components/connection/connection.component.d.ts +8 -0
  440. package/presets/classic/components/control/control.component.d.ts +11 -0
  441. package/presets/classic/components/index.d.ts +5 -0
  442. package/presets/classic/components/node/node.component.d.ts +23 -0
  443. package/presets/classic/components/socket/socket.component.d.ts +9 -0
  444. package/presets/classic/index.d.ts +18 -0
  445. package/presets/classic/types.d.ts +49 -0
  446. package/presets/context-menu/components/index.d.ts +3 -0
  447. package/presets/context-menu/components/item/item.component.d.ts +23 -0
  448. package/presets/context-menu/components/menu/menu.component.d.ts +24 -0
  449. package/presets/context-menu/components/search/search.component.d.ts +5 -0
  450. package/presets/context-menu/debounce.d.ts +5 -0
  451. package/presets/context-menu/index.d.ts +6 -0
  452. package/presets/context-menu/module.d.ts +2 -0
  453. package/presets/context-menu/types.d.ts +12 -0
  454. package/presets/index.d.ts +4 -0
  455. package/presets/minimap/components/index.d.ts +3 -0
  456. package/presets/minimap/components/mini-node/mini-node.component.d.ts +11 -0
  457. package/presets/minimap/components/mini-viewport/mini-viewport.component.d.ts +24 -0
  458. package/presets/minimap/components/minimap/minimap.component.d.ts +22 -0
  459. package/presets/minimap/index.d.ts +6 -0
  460. package/presets/minimap/module.d.ts +2 -0
  461. package/presets/minimap/types.d.ts +22 -0
  462. package/presets/reroute/components/index.d.ts +2 -0
  463. package/presets/reroute/components/pin/pin.component.d.ts +27 -0
  464. package/presets/reroute/components/pins/pins.component.d.ts +14 -0
  465. package/presets/reroute/index.d.ts +10 -0
  466. package/presets/reroute/module.d.ts +2 -0
  467. package/presets/reroute/types.d.ts +18 -0
  468. package/presets/types.d.ts +15 -0
  469. package/rete-angular-plugin.d.ts +17 -0
  470. package/rete-angular-plugin.metadata.json +1 -0
  471. package/shared/drag.d.ts +10 -0
  472. package/types.d.ts +29 -0
@@ -0,0 +1,1475 @@
1
+ import { __awaiter } from 'tslib';
2
+ import { getUID, ClassicPreset, Scope } from 'rete';
3
+ import { getDOMSocketPosition, loopConnectionPath, classicConnectionPath } from 'rete-render-utils';
4
+ import * as i0 from '@angular/core';
5
+ import { Directive, Input, Component, HostBinding, HostListener, EventEmitter, Output, NgModule } from '@angular/core';
6
+ import * as i1 from '@angular/common';
7
+ import { CommonModule } from '@angular/common';
8
+ import { BaseAreaPlugin } from 'rete-area-plugin';
9
+ import { createCustomElement } from '@angular/elements';
10
+
11
+ const _c0$1 = function (a2, a3, a4, a5) { return { type: "socket", side: "output", key: a2, nodeId: a3, payload: a4, seed: a5 }; };
12
+ function NodeComponent_div_2_Template(rf, ctx) { if (rf & 1) {
13
+ i0.ɵɵelementStart(0, "div", 4);
14
+ i0.ɵɵelementStart(1, "div", 5);
15
+ i0.ɵɵtext(2);
16
+ i0.ɵɵelementEnd();
17
+ i0.ɵɵelement(3, "div", 6);
18
+ i0.ɵɵelementEnd();
19
+ } if (rf & 2) {
20
+ const output_r3 = ctx.$implicit;
21
+ const ctx_r0 = i0.ɵɵnextContext();
22
+ i0.ɵɵattribute("data-testid", "output-" + output_r3.key);
23
+ i0.ɵɵadvance(2);
24
+ i0.ɵɵtextInterpolate(output_r3.value == null ? null : output_r3.value.label);
25
+ i0.ɵɵadvance(1);
26
+ i0.ɵɵproperty("data", i0.ɵɵpureFunction4(4, _c0$1, output_r3.key, ctx_r0.data.id, output_r3.value == null ? null : output_r3.value.socket, ctx_r0.seed))("emit", ctx_r0.emit);
27
+ } }
28
+ const _c1 = function (a1) { return { type: "control", payload: a1 }; };
29
+ function NodeComponent_div_4_Template(rf, ctx) { if (rf & 1) {
30
+ i0.ɵɵelement(0, "div", 7);
31
+ } if (rf & 2) {
32
+ const control_r4 = ctx.$implicit;
33
+ const ctx_r1 = i0.ɵɵnextContext();
34
+ i0.ɵɵproperty("data", i0.ɵɵpureFunction1(3, _c1, control_r4.value))("emit", ctx_r1.emit);
35
+ i0.ɵɵattribute("data-testid", "control-" + control_r4.key);
36
+ } }
37
+ function NodeComponent_div_6_div_2_Template(rf, ctx) { if (rf & 1) {
38
+ i0.ɵɵelementStart(0, "div", 12);
39
+ i0.ɵɵtext(1);
40
+ i0.ɵɵelementEnd();
41
+ } if (rf & 2) {
42
+ const input_r5 = i0.ɵɵnextContext().$implicit;
43
+ i0.ɵɵadvance(1);
44
+ i0.ɵɵtextInterpolate(input_r5.value == null ? null : input_r5.value.label);
45
+ } }
46
+ const _c2 = function (a2, a3, a4, a5) { return { type: "socket", side: "input", key: a2, nodeId: a3, payload: a4, seed: a5 }; };
47
+ function NodeComponent_div_6_Template(rf, ctx) { if (rf & 1) {
48
+ i0.ɵɵelementStart(0, "div", 8);
49
+ i0.ɵɵelement(1, "div", 9);
50
+ i0.ɵɵtemplate(2, NodeComponent_div_6_div_2_Template, 2, 1, "div", 10);
51
+ i0.ɵɵelement(3, "div", 11);
52
+ i0.ɵɵelementEnd();
53
+ } if (rf & 2) {
54
+ const input_r5 = ctx.$implicit;
55
+ const ctx_r2 = i0.ɵɵnextContext();
56
+ i0.ɵɵattribute("data-testid", "input-" + input_r5.key);
57
+ i0.ɵɵadvance(1);
58
+ i0.ɵɵproperty("data", i0.ɵɵpureFunction4(8, _c2, input_r5.key, ctx_r2.data.id, input_r5.value == null ? null : input_r5.value.socket, ctx_r2.seed))("emit", ctx_r2.emit);
59
+ i0.ɵɵadvance(1);
60
+ i0.ɵɵproperty("ngIf", !(input_r5.value == null ? null : input_r5.value.control) || !(input_r5.value == null ? null : input_r5.value.showControl));
61
+ i0.ɵɵadvance(1);
62
+ i0.ɵɵstyleProp("display", (input_r5.value == null ? null : input_r5.value.control) && (input_r5.value == null ? null : input_r5.value.showControl) ? "" : "none");
63
+ i0.ɵɵproperty("data", i0.ɵɵpureFunction1(13, _c1, input_r5.value == null ? null : input_r5.value.control))("emit", ctx_r2.emit);
64
+ } }
65
+ class RefDirective {
66
+ constructor(el) {
67
+ this.el = el;
68
+ }
69
+ ngOnChanges() {
70
+ this.emit({ type: 'render', data: Object.assign(Object.assign({}, this.data), { element: this.el.nativeElement }) });
71
+ }
72
+ }
73
+ RefDirective.ɵfac = function RefDirective_Factory(t) { return new (t || RefDirective)(i0.ɵɵdirectiveInject(i0.ElementRef)); };
74
+ RefDirective.ɵdir = /*@__PURE__*/ i0.ɵɵdefineDirective({ type: RefDirective, selectors: [["", "refComponent", ""]], inputs: { data: "data", emit: "emit" }, features: [i0.ɵɵNgOnChangesFeature] });
75
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(RefDirective, [{
76
+ type: Directive,
77
+ args: [{
78
+ selector: '[refComponent]'
79
+ }]
80
+ }], function () { return [{ type: i0.ElementRef }]; }, { data: [{
81
+ type: Input
82
+ }], emit: [{
83
+ type: Input
84
+ }] }); })();
85
+ class NodeComponent {
86
+ constructor(cdr) {
87
+ this.cdr = cdr;
88
+ this.seed = 0;
89
+ this.cdr.detach();
90
+ }
91
+ get selected() {
92
+ return this.data.selected;
93
+ }
94
+ ngOnChanges() {
95
+ this.cdr.detectChanges();
96
+ requestAnimationFrame(() => this.rendered());
97
+ this.seed++; // force render sockets
98
+ }
99
+ sortByIndex(a, b) {
100
+ var _a, _b;
101
+ const ai = ((_a = a.value) === null || _a === void 0 ? void 0 : _a.index) || 0;
102
+ const bi = ((_b = b.value) === null || _b === void 0 ? void 0 : _b.index) || 0;
103
+ return ai - bi;
104
+ }
105
+ }
106
+ NodeComponent.ɵfac = function NodeComponent_Factory(t) { return new (t || NodeComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
107
+ NodeComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NodeComponent, selectors: [["ng-component"]], hostAttrs: ["data-testid", "node"], hostVars: 2, hostBindings: function NodeComponent_HostBindings(rf, ctx) { if (rf & 2) {
108
+ i0.ɵɵclassProp("selected", ctx.selected);
109
+ } }, inputs: { data: "data", emit: "emit", rendered: "rendered" }, features: [i0.ɵɵNgOnChangesFeature], decls: 8, vars: 13, consts: [["data-testid", "title", 1, "title"], ["class", "output", 4, "ngFor", "ngForOf"], ["class", "control", "refComponent", "", 3, "data", "emit", 4, "ngFor", "ngForOf"], ["class", "input", 4, "ngFor", "ngForOf"], [1, "output"], ["data-testid", "output-title", 1, "output-title"], ["refComponent", "", "data-testid", "output-socket", 1, "output-socket", 3, "data", "emit"], ["refComponent", "", 1, "control", 3, "data", "emit"], [1, "input"], ["refComponent", "", "data-testid", "input-socket", 1, "input-socket", 3, "data", "emit"], ["class", "input-title", "data-testid", "input-title", 4, "ngIf"], ["refComponent", "", "data-testid", "input-control", 1, "input-control", 3, "data", "emit"], ["data-testid", "input-title", 1, "input-title"]], template: function NodeComponent_Template(rf, ctx) { if (rf & 1) {
110
+ i0.ɵɵelementStart(0, "div", 0);
111
+ i0.ɵɵtext(1);
112
+ i0.ɵɵelementEnd();
113
+ i0.ɵɵtemplate(2, NodeComponent_div_2_Template, 4, 9, "div", 1);
114
+ i0.ɵɵpipe(3, "keyvalue");
115
+ i0.ɵɵtemplate(4, NodeComponent_div_4_Template, 1, 5, "div", 2);
116
+ i0.ɵɵpipe(5, "keyvalue");
117
+ i0.ɵɵtemplate(6, NodeComponent_div_6_Template, 4, 15, "div", 3);
118
+ i0.ɵɵpipe(7, "keyvalue");
119
+ } if (rf & 2) {
120
+ i0.ɵɵadvance(1);
121
+ i0.ɵɵtextInterpolate(ctx.data.label);
122
+ i0.ɵɵadvance(1);
123
+ i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind2(3, 4, ctx.data.outputs, ctx.sortByIndex));
124
+ i0.ɵɵadvance(2);
125
+ i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind2(5, 7, ctx.data.controls, ctx.sortByIndex));
126
+ i0.ɵɵadvance(2);
127
+ i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind2(7, 10, ctx.data.inputs, ctx.sortByIndex));
128
+ } }, directives: [i1.NgForOf, RefDirective, i1.NgIf], pipes: [i1.KeyValuePipe], styles: ["[_nghost-%COMP%]{display:block;background:rgba(110,136,255,.8);border:2px solid #4e58bf;border-radius:10px;cursor:pointer;box-sizing:border-box;min-width:180px;height:auto;padding-bottom:6px;position:relative;-webkit-user-select:none;user-select:none;line-height:initial;font-family:Arial}[_nghost-%COMP%]:hover{background:rgba(130,153,255,.8)}.selected[_nghost-%COMP%]{background:#ffd92c;border-color:#e3c000}[_nghost-%COMP%] .title[_ngcontent-%COMP%]{color:#fff;font-family:sans-serif;font-size:18px;padding:8px}[_nghost-%COMP%] .output[_ngcontent-%COMP%]{text-align:right}[_nghost-%COMP%] .input[_ngcontent-%COMP%]{text-align:left}[_nghost-%COMP%] .input-title[_ngcontent-%COMP%], [_nghost-%COMP%] .output-title[_ngcontent-%COMP%]{vertical-align:middle;color:#fff;display:inline-block;font-family:sans-serif;font-size:14px;margin:6px;line-height:24px}[_nghost-%COMP%] .input-title[hidden][_ngcontent-%COMP%], [_nghost-%COMP%] .output-title[hidden][_ngcontent-%COMP%]{display:none}[_nghost-%COMP%] .output-socket[_ngcontent-%COMP%]{text-align:right;margin-right:-18px;display:inline-block}[_nghost-%COMP%] .input-socket[_ngcontent-%COMP%]{text-align:left;margin-left:-18px;display:inline-block}[_nghost-%COMP%] .input-control[_ngcontent-%COMP%]{z-index:1;width:calc(100% - 36px);vertical-align:middle;display:inline-block}[_nghost-%COMP%] .control[_ngcontent-%COMP%]{padding:6px 18px}"] });
129
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NodeComponent, [{
130
+ type: Component,
131
+ args: [{
132
+ templateUrl: './node.component.html',
133
+ styleUrls: ['./node.component.sass'],
134
+ host: {
135
+ 'data-testid': 'node'
136
+ }
137
+ }]
138
+ }], function () { return [{ type: i0.ChangeDetectorRef }]; }, { data: [{
139
+ type: Input
140
+ }], emit: [{
141
+ type: Input
142
+ }], rendered: [{
143
+ type: Input
144
+ }], selected: [{
145
+ type: HostBinding,
146
+ args: ['class.selected']
147
+ }] }); })();
148
+
149
+ class SocketComponent {
150
+ constructor(cdr) {
151
+ this.cdr = cdr;
152
+ this.cdr.detach();
153
+ }
154
+ get title() {
155
+ return this.data.name;
156
+ }
157
+ ngOnChanges() {
158
+ this.cdr.detectChanges();
159
+ requestAnimationFrame(() => this.rendered());
160
+ }
161
+ }
162
+ SocketComponent.ɵfac = function SocketComponent_Factory(t) { return new (t || SocketComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
163
+ SocketComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: SocketComponent, selectors: [["ng-component"]], hostVars: 1, hostBindings: function SocketComponent_HostBindings(rf, ctx) { if (rf & 2) {
164
+ i0.ɵɵhostProperty("title", ctx.title);
165
+ } }, inputs: { data: "data", rendered: "rendered" }, features: [i0.ɵɵNgOnChangesFeature], decls: 0, vars: 0, template: function SocketComponent_Template(rf, ctx) { }, styles: ["[_nghost-%COMP%]{display:inline-block;cursor:pointer;border:1px solid white;border-radius:12px;width:24px;height:24px;margin:6px;vertical-align:middle;background:#96b38a;z-index:2;box-sizing:border-box}[_nghost-%COMP%]:hover{border-width:4px}.multiple[_nghost-%COMP%]{border-color:#ff0}.output[_nghost-%COMP%]{margin-right:-12px}.input[_nghost-%COMP%]{margin-left:-12px}"] });
166
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(SocketComponent, [{
167
+ type: Component,
168
+ args: [{
169
+ template: ``,
170
+ styleUrls: ['./socket.component.sass']
171
+ }]
172
+ }], function () { return [{ type: i0.ChangeDetectorRef }]; }, { data: [{
173
+ type: Input
174
+ }], rendered: [{
175
+ type: Input
176
+ }], title: [{
177
+ type: HostBinding,
178
+ args: ['title']
179
+ }] }); })();
180
+
181
+ class ControlComponent {
182
+ constructor(cdr) {
183
+ this.cdr = cdr;
184
+ this.cdr.detach();
185
+ }
186
+ pointerdown(event) {
187
+ event.stopPropagation();
188
+ }
189
+ ngOnChanges(changes) {
190
+ const seed = changes['seed'];
191
+ const data = changes['data'];
192
+ if ((seed && seed.currentValue !== seed.previousValue)
193
+ || (data && data.currentValue !== data.previousValue)) {
194
+ this.cdr.detectChanges();
195
+ }
196
+ requestAnimationFrame(() => this.rendered());
197
+ }
198
+ onChange(e) {
199
+ const target = e.target;
200
+ const value = (this.data.type === 'number'
201
+ ? +target.value
202
+ : target.value);
203
+ this.data.setValue(value);
204
+ this.cdr.detectChanges();
205
+ }
206
+ }
207
+ ControlComponent.ɵfac = function ControlComponent_Factory(t) { return new (t || ControlComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
208
+ ControlComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ControlComponent, selectors: [["ng-component"]], hostBindings: function ControlComponent_HostBindings(rf, ctx) { if (rf & 1) {
209
+ i0.ɵɵlistener("pointerdown", function ControlComponent_pointerdown_HostBindingHandler($event) { return ctx.pointerdown($event); });
210
+ } }, inputs: { data: "data", rendered: "rendered" }, features: [i0.ɵɵNgOnChangesFeature], decls: 1, vars: 3, consts: [[3, "value", "readonly", "type", "input"]], template: function ControlComponent_Template(rf, ctx) { if (rf & 1) {
211
+ i0.ɵɵelementStart(0, "input", 0);
212
+ i0.ɵɵlistener("input", function ControlComponent_Template_input_input_0_listener($event) { return ctx.onChange($event); });
213
+ i0.ɵɵelementEnd();
214
+ } if (rf & 2) {
215
+ i0.ɵɵproperty("value", ctx.data.value)("readonly", ctx.data.readonly)("type", ctx.data.type);
216
+ } }, styles: ["input[_ngcontent-%COMP%]{width:130px;border-radius:30px;background-color:#fff;padding:2px 6px;border:1px solid #999;font-size:110%}"] });
217
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ControlComponent, [{
218
+ type: Component,
219
+ args: [{
220
+ templateUrl: `./control.component.html`,
221
+ styleUrls: ['./control.component.sass']
222
+ }]
223
+ }], function () { return [{ type: i0.ChangeDetectorRef }]; }, { data: [{
224
+ type: Input
225
+ }], rendered: [{
226
+ type: Input
227
+ }], pointerdown: [{
228
+ type: HostListener,
229
+ args: ['pointerdown', ['$event']]
230
+ }] }); })();
231
+
232
+ class ConnectionComponent {
233
+ }
234
+ ConnectionComponent.ɵfac = function ConnectionComponent_Factory(t) { return new (t || ConnectionComponent)(); };
235
+ ConnectionComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ConnectionComponent, selectors: [["connection"]], inputs: { data: "data", start: "start", end: "end", path: "path" }, decls: 2, vars: 1, consts: [["data-testid", "connection"]], template: function ConnectionComponent_Template(rf, ctx) { if (rf & 1) {
236
+ i0.ɵɵnamespaceSVG();
237
+ i0.ɵɵelementStart(0, "svg", 0);
238
+ i0.ɵɵelement(1, "path");
239
+ i0.ɵɵelementEnd();
240
+ } if (rf & 2) {
241
+ i0.ɵɵadvance(1);
242
+ i0.ɵɵattribute("d", ctx.path);
243
+ } }, styles: ["svg[_ngcontent-%COMP%]{overflow:visible!important;position:absolute;pointer-events:none;width:9999px;height:9999px}svg[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:none;stroke-width:5px;stroke:#4682b4;pointer-events:auto}"] });
244
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ConnectionComponent, [{
245
+ type: Component,
246
+ args: [{
247
+ selector: 'connection',
248
+ templateUrl: './connection.component.html',
249
+ styleUrls: ['./connection.component.sass']
250
+ }]
251
+ }], null, { data: [{
252
+ type: Input
253
+ }], start: [{
254
+ type: Input
255
+ }], end: [{
256
+ type: Input
257
+ }], path: [{
258
+ type: Input
259
+ }] }); })();
260
+
261
+ class ConnectionWrapperComponent {
262
+ constructor(cdr, viewContainerRef, componentFactoryResolver) {
263
+ this.cdr = cdr;
264
+ this.viewContainerRef = viewContainerRef;
265
+ this.componentFactoryResolver = componentFactoryResolver;
266
+ this.startOb = null;
267
+ this.endOb = null;
268
+ this.cdr.detach();
269
+ }
270
+ get _start() {
271
+ return 'x' in this.start ? this.start : this.startOb;
272
+ }
273
+ get _end() {
274
+ return 'x' in this.end ? this.end : this.endOb;
275
+ }
276
+ ngOnChanges() {
277
+ return __awaiter(this, void 0, void 0, function* () {
278
+ yield this.updatePath();
279
+ requestAnimationFrame(() => this.rendered());
280
+ this.cdr.detectChanges();
281
+ this.update();
282
+ });
283
+ }
284
+ updatePath() {
285
+ return __awaiter(this, void 0, void 0, function* () {
286
+ if (this._start && this._end) {
287
+ this._path = yield this.path(this._start, this._end);
288
+ }
289
+ });
290
+ }
291
+ ngOnInit() {
292
+ if (typeof this.start === 'function') {
293
+ this.start((value) => __awaiter(this, void 0, void 0, function* () {
294
+ this.startOb = value;
295
+ yield this.updatePath();
296
+ this.cdr.detectChanges();
297
+ this.update();
298
+ }));
299
+ }
300
+ if (typeof this.end === 'function') {
301
+ this.end((value) => __awaiter(this, void 0, void 0, function* () {
302
+ this.endOb = value;
303
+ yield this.updatePath();
304
+ this.cdr.detectChanges();
305
+ this.update();
306
+ }));
307
+ }
308
+ const componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.connectionComponent);
309
+ this.viewContainerRef.clear();
310
+ this.ref = this.viewContainerRef.createComponent(componentFactory);
311
+ this.update();
312
+ }
313
+ update() {
314
+ this.ref.instance.data = this.data;
315
+ this.ref.instance.start = this._start;
316
+ this.ref.instance.end = this._end;
317
+ this.ref.instance.path = this._path;
318
+ }
319
+ }
320
+ ConnectionWrapperComponent.ɵfac = function ConnectionWrapperComponent_Factory(t) { return new (t || ConnectionWrapperComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef), i0.ɵɵdirectiveInject(i0.ViewContainerRef), i0.ɵɵdirectiveInject(i0.ComponentFactoryResolver)); };
321
+ ConnectionWrapperComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ConnectionWrapperComponent, selectors: [["ng-component"]], inputs: { data: "data", start: "start", end: "end", path: "path", rendered: "rendered", connectionComponent: "connectionComponent" }, features: [i0.ɵɵNgOnChangesFeature], decls: 0, vars: 0, template: function ConnectionWrapperComponent_Template(rf, ctx) { }, encapsulation: 2 });
322
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ConnectionWrapperComponent, [{
323
+ type: Component,
324
+ args: [{
325
+ template: ''
326
+ }]
327
+ }], function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.ViewContainerRef }, { type: i0.ComponentFactoryResolver }]; }, { data: [{
328
+ type: Input
329
+ }], start: [{
330
+ type: Input
331
+ }], end: [{
332
+ type: Input
333
+ }], path: [{
334
+ type: Input
335
+ }], rendered: [{
336
+ type: Input
337
+ }], connectionComponent: [{
338
+ type: Input
339
+ }] }); })();
340
+
341
+ function setup$3(props) {
342
+ const positionWatcher = typeof (props === null || props === void 0 ? void 0 : props.socketPositionWatcher) === 'undefined'
343
+ ? getDOMSocketPosition() // fix Type instantiation is excessively deep and possibly infinite.
344
+ : props === null || props === void 0 ? void 0 : props.socketPositionWatcher;
345
+ const { node, connection, socket, control } = (props === null || props === void 0 ? void 0 : props.customize) || {};
346
+ return {
347
+ attach(plugin) {
348
+ positionWatcher.attach(plugin);
349
+ },
350
+ update(context) {
351
+ const data = context.data.payload;
352
+ if (context.data.type === 'connection') {
353
+ const { start, end } = context.data;
354
+ return Object.assign(Object.assign({ data }, (start ? { start } : {})), (end ? { end } : {}));
355
+ }
356
+ return { data };
357
+ },
358
+ mount(context, plugin) {
359
+ const parent = plugin.parentScope();
360
+ const emit = parent.emit.bind(parent);
361
+ const rendered = () => {
362
+ emit({ type: 'rendered', data: context.data });
363
+ };
364
+ if (context.data.type === 'node') {
365
+ const component = node ? node(context.data) : NodeComponent;
366
+ return {
367
+ key: `node-${context.data.payload.id}`,
368
+ component,
369
+ props: {
370
+ data: context.data.payload,
371
+ emit,
372
+ rendered
373
+ }
374
+ };
375
+ }
376
+ if (context.data.type === 'connection') {
377
+ const component = connection ? connection(context.data) : ConnectionComponent;
378
+ const id = context.data.payload.id;
379
+ const { sourceOutput, targetInput, source, target } = context.data.payload;
380
+ const { start, end, payload } = context.data;
381
+ return {
382
+ key: `connection-${id}`,
383
+ component: ConnectionWrapperComponent,
384
+ props: {
385
+ connectionComponent: component,
386
+ data: payload,
387
+ start: start || ((change) => positionWatcher.listen(source, 'output', sourceOutput, change)),
388
+ end: end || ((change) => positionWatcher.listen(target, 'input', targetInput, change)),
389
+ path: (start, end) => __awaiter(this, void 0, void 0, function* () {
390
+ const response = yield plugin.emit({ type: 'connectionpath', data: { payload, points: [start, end] } });
391
+ if (!response)
392
+ return '';
393
+ const { path, points } = response.data;
394
+ const curvature = 0.3;
395
+ if (!path && points.length !== 2)
396
+ throw new Error('cannot render connection with a custom number of points');
397
+ if (!path)
398
+ return payload.isLoop
399
+ ? loopConnectionPath(points, curvature, 120)
400
+ : classicConnectionPath(points, curvature);
401
+ return path;
402
+ }),
403
+ rendered
404
+ }
405
+ };
406
+ }
407
+ if (context.data.type === 'socket') {
408
+ const component = socket ? socket(context.data) : SocketComponent;
409
+ return {
410
+ key: `socket-${getUID()}`,
411
+ component,
412
+ props: {
413
+ data: context.data.payload,
414
+ rendered
415
+ }
416
+ };
417
+ }
418
+ if (context.data.type === 'control') {
419
+ const component = control
420
+ ? control(context.data)
421
+ : (context.data.payload instanceof ClassicPreset.InputControl
422
+ ? ControlComponent
423
+ : null);
424
+ if (component) {
425
+ return {
426
+ key: `control-${context.data.payload.id}`,
427
+ component,
428
+ props: {
429
+ data: context.data.payload,
430
+ rendered
431
+ }
432
+ };
433
+ }
434
+ return;
435
+ }
436
+ return;
437
+ }
438
+ };
439
+ }
440
+
441
+ var index$4 = /*#__PURE__*/Object.freeze({
442
+ __proto__: null,
443
+ setup: setup$3
444
+ });
445
+
446
+ function debounce(cb) {
447
+ return {
448
+ timeout: null,
449
+ cancel() {
450
+ if (this.timeout) {
451
+ window.clearTimeout(this.timeout);
452
+ this.timeout = null;
453
+ }
454
+ },
455
+ call(delay) {
456
+ this.timeout = window.setTimeout(() => {
457
+ cb();
458
+ }, delay);
459
+ }
460
+ };
461
+ }
462
+
463
+ class ContextMenuSearchComponent {
464
+ constructor() {
465
+ this.update = new EventEmitter();
466
+ }
467
+ }
468
+ ContextMenuSearchComponent.ɵfac = function ContextMenuSearchComponent_Factory(t) { return new (t || ContextMenuSearchComponent)(); };
469
+ ContextMenuSearchComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ContextMenuSearchComponent, selectors: [["context-menu-search"]], inputs: { value: "value" }, outputs: { update: "update" }, decls: 1, vars: 1, consts: [["data-testid", "context-menu-search-input", 1, "search", 3, "value", "input"]], template: function ContextMenuSearchComponent_Template(rf, ctx) { if (rf & 1) {
470
+ i0.ɵɵelementStart(0, "input", 0);
471
+ i0.ɵɵlistener("input", function ContextMenuSearchComponent_Template_input_input_0_listener($event) { let tmp_b_0; return ctx.update.emit(((tmp_b_0 = $event.target) == null ? null : tmp_b_0.value) || ""); });
472
+ i0.ɵɵelementEnd();
473
+ } if (rf & 2) {
474
+ i0.ɵɵproperty("value", ctx.value);
475
+ } }, styles: [".search[_ngcontent-%COMP%]{color:#fff;padding:1px 8px;border:1px solid white;border-radius:10px;font-size:16px;font-family:serif;width:100%;box-sizing:border-box;background:transparent}"] });
476
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ContextMenuSearchComponent, [{
477
+ type: Component,
478
+ args: [{
479
+ selector: 'context-menu-search',
480
+ templateUrl: './search.component.html',
481
+ styleUrls: ['./search.component.sass']
482
+ }]
483
+ }], null, { value: [{
484
+ type: Input
485
+ }], update: [{
486
+ type: Output
487
+ }] }); })();
488
+
489
+ function ContextMenuItemComponent_div_1_context_menu_item_1_Template(rf, ctx) { if (rf & 1) {
490
+ const _r4 = i0.ɵɵgetCurrentView();
491
+ i0.ɵɵelementStart(0, "context-menu-item", 3);
492
+ i0.ɵɵlistener("select", function ContextMenuItemComponent_div_1_context_menu_item_1_Template_context_menu_item_select_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r4); const item_r2 = restoredCtx.$implicit; return item_r2.handler(); })("hide", function ContextMenuItemComponent_div_1_context_menu_item_1_Template_context_menu_item_hide_0_listener() { i0.ɵɵrestoreView(_r4); const ctx_r5 = i0.ɵɵnextContext(2); return ctx_r5.hide.emit(); });
493
+ i0.ɵɵtext(1);
494
+ i0.ɵɵelementEnd();
495
+ } if (rf & 2) {
496
+ const item_r2 = ctx.$implicit;
497
+ const ctx_r1 = i0.ɵɵnextContext(2);
498
+ i0.ɵɵproperty("delay", ctx_r1.delay);
499
+ i0.ɵɵadvance(1);
500
+ i0.ɵɵtextInterpolate1(" ", item_r2.label, " ");
501
+ } }
502
+ function ContextMenuItemComponent_div_1_Template(rf, ctx) { if (rf & 1) {
503
+ i0.ɵɵelementStart(0, "div", 1);
504
+ i0.ɵɵtemplate(1, ContextMenuItemComponent_div_1_context_menu_item_1_Template, 2, 2, "context-menu-item", 2);
505
+ i0.ɵɵelementEnd();
506
+ } if (rf & 2) {
507
+ const ctx_r0 = i0.ɵɵnextContext();
508
+ i0.ɵɵadvance(1);
509
+ i0.ɵɵproperty("ngForOf", ctx_r0.subitems);
510
+ } }
511
+ const _c0 = ["*"];
512
+ class ContextMenuItemComponent {
513
+ constructor(cdr) {
514
+ this.cdr = cdr;
515
+ this.select = new EventEmitter();
516
+ this.hide = new EventEmitter();
517
+ this.hideSubitems = debounce(() => {
518
+ this.visibleSubitems = false;
519
+ this.cdr.detectChanges();
520
+ });
521
+ this.visibleSubitems = false;
522
+ this.cdr.detach();
523
+ }
524
+ get block() { return true; }
525
+ get hasSubitems() { return this.subitems; }
526
+ click(event) {
527
+ event.stopPropagation();
528
+ this.select.emit();
529
+ this.hide.emit();
530
+ }
531
+ pointerdown(event) {
532
+ event.stopPropagation();
533
+ }
534
+ wheel(event) {
535
+ event.stopPropagation();
536
+ }
537
+ pointerover() {
538
+ this.hideSubitems.cancel();
539
+ this.visibleSubitems = true;
540
+ this.cdr.detectChanges();
541
+ }
542
+ pointerleave() {
543
+ this.hideSubitems.call(this.delay);
544
+ this.cdr.detectChanges();
545
+ }
546
+ }
547
+ ContextMenuItemComponent.ɵfac = function ContextMenuItemComponent_Factory(t) { return new (t || ContextMenuItemComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
548
+ ContextMenuItemComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ContextMenuItemComponent, selectors: [["context-menu-item"]], hostAttrs: ["data-testid", "context-menu-item"], hostVars: 4, hostBindings: function ContextMenuItemComponent_HostBindings(rf, ctx) { if (rf & 1) {
549
+ i0.ɵɵlistener("click", function ContextMenuItemComponent_click_HostBindingHandler($event) { return ctx.click($event); })("pointerdown", function ContextMenuItemComponent_pointerdown_HostBindingHandler($event) { return ctx.pointerdown($event); })("wheel", function ContextMenuItemComponent_wheel_HostBindingHandler($event) { return ctx.wheel($event); })("pointerover", function ContextMenuItemComponent_pointerover_HostBindingHandler() { return ctx.pointerover(); })("pointerleave", function ContextMenuItemComponent_pointerleave_HostBindingHandler() { return ctx.pointerleave(); });
550
+ } if (rf & 2) {
551
+ i0.ɵɵclassProp("block", ctx.block)("hasSubitems", ctx.hasSubitems);
552
+ } }, inputs: { subitems: "subitems", delay: "delay" }, outputs: { select: "select", hide: "hide" }, ngContentSelectors: _c0, decls: 2, vars: 1, consts: [["class", "subitems", 4, "ngIf"], [1, "subitems"], [3, "delay", "select", "hide", 4, "ngFor", "ngForOf"], [3, "delay", "select", "hide"]], template: function ContextMenuItemComponent_Template(rf, ctx) { if (rf & 1) {
553
+ i0.ɵɵprojectionDef();
554
+ i0.ɵɵprojection(0);
555
+ i0.ɵɵtemplate(1, ContextMenuItemComponent_div_1_Template, 2, 1, "div", 0);
556
+ } if (rf & 2) {
557
+ i0.ɵɵadvance(1);
558
+ i0.ɵɵproperty("ngIf", ctx.subitems && ctx.visibleSubitems);
559
+ } }, directives: [i1.NgIf, i1.NgForOf, ContextMenuItemComponent], styles: ["@charset \"UTF-8\";.hasSubitems[_nghost-%COMP%]:after{content:\"\\25ba\";position:absolute;opacity:.6;right:5px;top:5px;font-family:initial}.subitems[_ngcontent-%COMP%]{position:absolute;top:0;left:100%;width:120px}", ".block[_ngcontent-%COMP%]{display:block;color:#fff;padding:4px;border-bottom:1px solid rgba(69,103,255,.8);background-color:#6e88ffcc;cursor:pointer;width:100%;position:relative}.block[_ngcontent-%COMP%]:first-child{border-top-left-radius:5px;border-top-right-radius:5px}.block[_ngcontent-%COMP%]:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}.block[_ngcontent-%COMP%]:hover{background-color:#8299ffcc}"] });
560
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ContextMenuItemComponent, [{
561
+ type: Component,
562
+ args: [{
563
+ selector: 'context-menu-item',
564
+ templateUrl: './item.component.html',
565
+ styleUrls: ['./item.component.sass', '../../block.sass'],
566
+ host: {
567
+ 'data-testid': 'context-menu-item'
568
+ }
569
+ }]
570
+ }], function () { return [{ type: i0.ChangeDetectorRef }]; }, { subitems: [{
571
+ type: Input
572
+ }], delay: [{
573
+ type: Input
574
+ }], select: [{
575
+ type: Output
576
+ }], hide: [{
577
+ type: Output
578
+ }], block: [{
579
+ type: HostBinding,
580
+ args: ['class.block']
581
+ }], hasSubitems: [{
582
+ type: HostBinding,
583
+ args: ['class.hasSubitems']
584
+ }], click: [{
585
+ type: HostListener,
586
+ args: ['click', ['$event']]
587
+ }], pointerdown: [{
588
+ type: HostListener,
589
+ args: ['pointerdown', ['$event']]
590
+ }], wheel: [{
591
+ type: HostListener,
592
+ args: ['wheel', ['$event']]
593
+ }], pointerover: [{
594
+ type: HostListener,
595
+ args: ['pointerover']
596
+ }], pointerleave: [{
597
+ type: HostListener,
598
+ args: ['pointerleave']
599
+ }] }); })();
600
+
601
+ function ContextMenuComponent_div_0_Template(rf, ctx) { if (rf & 1) {
602
+ const _r3 = i0.ɵɵgetCurrentView();
603
+ i0.ɵɵelementStart(0, "div", 2);
604
+ i0.ɵɵelementStart(1, "context-menu-search", 3);
605
+ i0.ɵɵlistener("update", function ContextMenuComponent_div_0_Template_context_menu_search_update_1_listener($event) { i0.ɵɵrestoreView(_r3); const ctx_r2 = i0.ɵɵnextContext(); return ctx_r2.setFilter($event); });
606
+ i0.ɵɵelementEnd();
607
+ i0.ɵɵelementEnd();
608
+ } if (rf & 2) {
609
+ const ctx_r0 = i0.ɵɵnextContext();
610
+ i0.ɵɵadvance(1);
611
+ i0.ɵɵproperty("value", ctx_r0.filter);
612
+ } }
613
+ function ContextMenuComponent_context_menu_item_1_Template(rf, ctx) { if (rf & 1) {
614
+ const _r6 = i0.ɵɵgetCurrentView();
615
+ i0.ɵɵelementStart(0, "context-menu-item", 4);
616
+ i0.ɵɵlistener("select", function ContextMenuComponent_context_menu_item_1_Template_context_menu_item_select_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r6); const item_r4 = restoredCtx.$implicit; return item_r4.handler(); })("hide", function ContextMenuComponent_context_menu_item_1_Template_context_menu_item_hide_0_listener() { i0.ɵɵrestoreView(_r6); const ctx_r7 = i0.ɵɵnextContext(); return ctx_r7.onHide(); });
617
+ i0.ɵɵtext(1);
618
+ i0.ɵɵelementEnd();
619
+ } if (rf & 2) {
620
+ const item_r4 = ctx.$implicit;
621
+ const ctx_r1 = i0.ɵɵnextContext();
622
+ i0.ɵɵproperty("delay", ctx_r1.delay)("subitems", item_r4.subitems);
623
+ i0.ɵɵadvance(1);
624
+ i0.ɵɵtextInterpolate1(" ", item_r4.label, "\n");
625
+ } }
626
+ class ContextMenuComponent {
627
+ constructor(cdr) {
628
+ this.cdr = cdr;
629
+ this.filter = '';
630
+ this.hide = debounce(() => {
631
+ this.onHide();
632
+ this.cdr.detectChanges();
633
+ });
634
+ this.customAttribute = '';
635
+ this.cdr.detach();
636
+ }
637
+ pointerover() {
638
+ this.hide.cancel();
639
+ this.cdr.detectChanges();
640
+ }
641
+ pointerleave() {
642
+ this.hide.call(this.delay);
643
+ this.cdr.detectChanges();
644
+ }
645
+ ngOnChanges() {
646
+ this.cdr.detectChanges();
647
+ requestAnimationFrame(() => this.rendered());
648
+ }
649
+ setFilter(value) {
650
+ this.filter = value;
651
+ this.cdr.detectChanges();
652
+ }
653
+ getItems() {
654
+ const filterRegexp = new RegExp(this.filter, 'i');
655
+ const filteredList = this.items.filter(item => (item.label.match(filterRegexp)));
656
+ return filteredList;
657
+ }
658
+ ngOnDestroy() {
659
+ if (this.hide)
660
+ this.hide.cancel();
661
+ }
662
+ }
663
+ ContextMenuComponent.ɵfac = function ContextMenuComponent_Factory(t) { return new (t || ContextMenuComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
664
+ ContextMenuComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: ContextMenuComponent, selectors: [["ng-component"]], hostAttrs: ["data-testid", "context-menu"], hostVars: 1, hostBindings: function ContextMenuComponent_HostBindings(rf, ctx) { if (rf & 1) {
665
+ i0.ɵɵlistener("mouseover", function ContextMenuComponent_mouseover_HostBindingHandler() { return ctx.pointerover(); })("mouseleave", function ContextMenuComponent_mouseleave_HostBindingHandler() { return ctx.pointerleave(); });
666
+ } if (rf & 2) {
667
+ i0.ɵɵattribute("rete-context-menu", ctx.customAttribute);
668
+ } }, inputs: { items: "items", delay: "delay", searchBar: "searchBar", onHide: "onHide", rendered: "rendered" }, features: [i0.ɵɵNgOnChangesFeature], decls: 2, vars: 2, consts: [["class", "block", 4, "ngIf"], [3, "delay", "subitems", "select", "hide", 4, "ngFor", "ngForOf"], [1, "block"], [3, "value", "update"], [3, "delay", "subitems", "select", "hide"]], template: function ContextMenuComponent_Template(rf, ctx) { if (rf & 1) {
669
+ i0.ɵɵtemplate(0, ContextMenuComponent_div_0_Template, 2, 1, "div", 0);
670
+ i0.ɵɵtemplate(1, ContextMenuComponent_context_menu_item_1_Template, 2, 3, "context-menu-item", 1);
671
+ } if (rf & 2) {
672
+ i0.ɵɵproperty("ngIf", ctx.searchBar);
673
+ i0.ɵɵadvance(1);
674
+ i0.ɵɵproperty("ngForOf", ctx.getItems());
675
+ } }, directives: [i1.NgIf, i1.NgForOf, ContextMenuSearchComponent, ContextMenuItemComponent], styles: ["[_nghost-%COMP%]{display:block;padding:10px;width:120px;margin-top:-20px;margin-left:-60px}", ".block[_ngcontent-%COMP%]{display:block;color:#fff;padding:4px;border-bottom:1px solid rgba(69,103,255,.8);background-color:#6e88ffcc;cursor:pointer;width:100%;position:relative}.block[_ngcontent-%COMP%]:first-child{border-top-left-radius:5px;border-top-right-radius:5px}.block[_ngcontent-%COMP%]:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}.block[_ngcontent-%COMP%]:hover{background-color:#8299ffcc}"] });
676
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ContextMenuComponent, [{
677
+ type: Component,
678
+ args: [{
679
+ templateUrl: './menu.component.html',
680
+ styleUrls: ['./menu.component.sass', '../../block.sass'],
681
+ host: {
682
+ 'data-testid': 'context-menu'
683
+ }
684
+ }]
685
+ }], function () { return [{ type: i0.ChangeDetectorRef }]; }, { items: [{
686
+ type: Input
687
+ }], delay: [{
688
+ type: Input
689
+ }], searchBar: [{
690
+ type: Input
691
+ }], onHide: [{
692
+ type: Input
693
+ }], rendered: [{
694
+ type: Input
695
+ }], customAttribute: [{
696
+ type: HostBinding,
697
+ args: ['attr.rete-context-menu']
698
+ }], pointerover: [{
699
+ type: HostListener,
700
+ args: ['mouseover']
701
+ }], pointerleave: [{
702
+ type: HostListener,
703
+ args: ['mouseleave']
704
+ }] }); })();
705
+
706
+ function setup$2(props) {
707
+ const delay = typeof (props === null || props === void 0 ? void 0 : props.delay) === 'undefined' ? 1000 : props.delay;
708
+ return {
709
+ update(context) {
710
+ if (context.data.type === 'contextmenu') {
711
+ return {
712
+ items: context.data.items,
713
+ delay,
714
+ searchBar: context.data.searchBar,
715
+ onHide: context.data.onHide
716
+ };
717
+ }
718
+ },
719
+ mount(context, plugin) {
720
+ const parent = plugin.parentScope();
721
+ const emit = parent.emit.bind(parent);
722
+ const rendered = () => {
723
+ emit({ type: 'rendered', data: context.data });
724
+ };
725
+ if (context.data.type === 'contextmenu') {
726
+ return {
727
+ key: 'context-menu',
728
+ component: ContextMenuComponent,
729
+ props: {
730
+ items: context.data.items,
731
+ delay,
732
+ searchBar: context.data.searchBar,
733
+ onHide: context.data.onHide,
734
+ rendered
735
+ }
736
+ };
737
+ }
738
+ return null;
739
+ }
740
+ };
741
+ }
742
+
743
+ var index$3 = /*#__PURE__*/Object.freeze({
744
+ __proto__: null,
745
+ setup: setup$2
746
+ });
747
+
748
+ function useDrag(translate, getPointer) {
749
+ return {
750
+ start(e) {
751
+ let previous = Object.assign({}, getPointer(e));
752
+ function move(moveEvent) {
753
+ const current = Object.assign({}, getPointer(moveEvent));
754
+ const dx = current.x - previous.x;
755
+ const dy = current.y - previous.y;
756
+ previous = current;
757
+ translate(dx, dy);
758
+ }
759
+ function up() {
760
+ window.removeEventListener('pointermove', move);
761
+ window.removeEventListener('pointerup', up);
762
+ window.removeEventListener('pointercancel', up);
763
+ }
764
+ window.addEventListener('pointermove', move);
765
+ window.addEventListener('pointerup', up);
766
+ window.addEventListener('pointercancel', up);
767
+ }
768
+ };
769
+ }
770
+
771
+ class MiniViewportComponent {
772
+ constructor() {
773
+ this.drag = useDrag((dx, dy) => this.onDrag(dx, dy), e => ({ x: e.pageX, y: e.pageY }));
774
+ }
775
+ get styleLeft() {
776
+ return this.px(this.scale(this.left));
777
+ }
778
+ get styleTop() {
779
+ return this.px(this.scale(this.top));
780
+ }
781
+ get styleWidth() {
782
+ return this.px(this.scale(this.width));
783
+ }
784
+ get styleHeight() {
785
+ return this.px(this.scale(this.height));
786
+ }
787
+ pointerdown(event) {
788
+ event.stopPropagation();
789
+ this.drag.start(event);
790
+ }
791
+ px(value) {
792
+ return `${value}px`;
793
+ }
794
+ scale(v) {
795
+ return v * this.containerWidth;
796
+ }
797
+ invert(v) {
798
+ return v / this.containerWidth;
799
+ }
800
+ onDrag(dx, dy) {
801
+ this.translate(this.invert(-dx), this.invert(-dy));
802
+ }
803
+ }
804
+ MiniViewportComponent.ɵfac = function MiniViewportComponent_Factory(t) { return new (t || MiniViewportComponent)(); };
805
+ MiniViewportComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MiniViewportComponent, selectors: [["minimap-mini-viewport"]], hostAttrs: ["data-testid", "minimap-viewport"], hostVars: 8, hostBindings: function MiniViewportComponent_HostBindings(rf, ctx) { if (rf & 1) {
806
+ i0.ɵɵlistener("pointerdown", function MiniViewportComponent_pointerdown_HostBindingHandler($event) { return ctx.pointerdown($event); });
807
+ } if (rf & 2) {
808
+ i0.ɵɵstyleProp("left", ctx.styleLeft)("top", ctx.styleTop)("width", ctx.styleWidth)("height", ctx.styleHeight);
809
+ } }, inputs: { left: "left", top: "top", width: "width", height: "height", containerWidth: "containerWidth", translate: "translate" }, decls: 0, vars: 0, template: function MiniViewportComponent_Template(rf, ctx) { }, styles: ["[_nghost-%COMP%]{display:block;position:absolute;background:rgba(255,251,128,.32);border:1px solid #ffe52b}"] });
810
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MiniViewportComponent, [{
811
+ type: Component,
812
+ args: [{
813
+ selector: 'minimap-mini-viewport',
814
+ templateUrl: './mini-viewport.component.html',
815
+ styleUrls: ['./mini-viewport.component.sass'],
816
+ host: {
817
+ 'data-testid': 'minimap-viewport'
818
+ }
819
+ }]
820
+ }], null, { left: [{
821
+ type: Input
822
+ }], top: [{
823
+ type: Input
824
+ }], width: [{
825
+ type: Input
826
+ }], height: [{
827
+ type: Input
828
+ }], containerWidth: [{
829
+ type: Input
830
+ }], translate: [{
831
+ type: Input
832
+ }], styleLeft: [{
833
+ type: HostBinding,
834
+ args: ['style.left']
835
+ }], styleTop: [{
836
+ type: HostBinding,
837
+ args: ['style.top']
838
+ }], styleWidth: [{
839
+ type: HostBinding,
840
+ args: ['style.width']
841
+ }], styleHeight: [{
842
+ type: HostBinding,
843
+ args: ['style.height']
844
+ }], pointerdown: [{
845
+ type: HostListener,
846
+ args: ['pointerdown', ['$event']]
847
+ }] }); })();
848
+
849
+ class MiniNodeComponent {
850
+ get styleLeft() {
851
+ return this.px(this.left);
852
+ }
853
+ get styleTop() {
854
+ return this.px(this.top);
855
+ }
856
+ get styleWidth() {
857
+ return this.px(this.width);
858
+ }
859
+ get styleHeight() {
860
+ return this.px(this.height);
861
+ }
862
+ px(value) {
863
+ return `${value}px`;
864
+ }
865
+ }
866
+ MiniNodeComponent.ɵfac = function MiniNodeComponent_Factory(t) { return new (t || MiniNodeComponent)(); };
867
+ MiniNodeComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MiniNodeComponent, selectors: [["minimap-mini-node"]], hostAttrs: ["data-testid", "minimap-node"], hostVars: 8, hostBindings: function MiniNodeComponent_HostBindings(rf, ctx) { if (rf & 2) {
868
+ i0.ɵɵstyleProp("left", ctx.styleLeft)("top", ctx.styleTop)("width", ctx.styleWidth)("height", ctx.styleHeight);
869
+ } }, inputs: { left: "left", top: "top", width: "width", height: "height" }, decls: 0, vars: 0, template: function MiniNodeComponent_Template(rf, ctx) { }, styles: ["[_nghost-%COMP%]{display:block;position:absolute;background:rgba(110,136,255,.8);border:1px solid rgba(192,206,212,.6)}"] });
870
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MiniNodeComponent, [{
871
+ type: Component,
872
+ args: [{
873
+ selector: 'minimap-mini-node',
874
+ templateUrl: './mini-node.component.html',
875
+ styleUrls: ['./mini-node.component.sass'],
876
+ host: {
877
+ 'data-testid': 'minimap-node'
878
+ }
879
+ }]
880
+ }], null, { left: [{
881
+ type: Input
882
+ }], top: [{
883
+ type: Input
884
+ }], width: [{
885
+ type: Input
886
+ }], height: [{
887
+ type: Input
888
+ }], styleLeft: [{
889
+ type: HostBinding,
890
+ args: ['style.left']
891
+ }], styleTop: [{
892
+ type: HostBinding,
893
+ args: ['style.top']
894
+ }], styleWidth: [{
895
+ type: HostBinding,
896
+ args: ['style.width']
897
+ }], styleHeight: [{
898
+ type: HostBinding,
899
+ args: ['style.height']
900
+ }] }); })();
901
+
902
+ function MinimapComponent_minimap_mini_node_0_Template(rf, ctx) { if (rf & 1) {
903
+ i0.ɵɵelement(0, "minimap-mini-node", 2);
904
+ } if (rf & 2) {
905
+ const node_r1 = ctx.$implicit;
906
+ const ctx_r0 = i0.ɵɵnextContext();
907
+ i0.ɵɵproperty("left", ctx_r0.scale(node_r1.left))("top", ctx_r0.scale(node_r1.top))("width", ctx_r0.scale(node_r1.width))("height", ctx_r0.scale(node_r1.height));
908
+ } }
909
+ class MinimapComponent {
910
+ constructor(el, cdr) {
911
+ this.el = el;
912
+ this.cdr = cdr;
913
+ this.cdr.detach();
914
+ }
915
+ get width() {
916
+ return this.px(this.size * this.ratio);
917
+ }
918
+ get height() {
919
+ return this.px(this.size);
920
+ }
921
+ pointerdown(event) {
922
+ event.stopPropagation();
923
+ event.preventDefault();
924
+ }
925
+ dblclick(event) {
926
+ event.stopPropagation();
927
+ event.preventDefault();
928
+ if (!this.el.nativeElement)
929
+ return;
930
+ const box = this.el.nativeElement.getBoundingClientRect();
931
+ const x = (event.clientX - box.left) / (this.size * this.ratio);
932
+ const y = (event.clientY - box.top) / (this.size * this.ratio);
933
+ this.point(x, y);
934
+ }
935
+ ngOnChanges() {
936
+ this.cdr.detectChanges();
937
+ requestAnimationFrame(() => this.rendered());
938
+ }
939
+ px(value) {
940
+ return `${value}px`;
941
+ }
942
+ scale(value) {
943
+ if (!this.el.nativeElement)
944
+ return 0;
945
+ return value * this.el.nativeElement.clientWidth;
946
+ }
947
+ identifyMiniNode(_, item) {
948
+ return [item.top, item.left].join('_');
949
+ }
950
+ }
951
+ MinimapComponent.ɵfac = function MinimapComponent_Factory(t) { return new (t || MinimapComponent)(i0.ɵɵdirectiveInject(i0.ElementRef), i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
952
+ MinimapComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: MinimapComponent, selectors: [["ng-component"]], hostAttrs: ["data-testid", "minimap"], hostVars: 4, hostBindings: function MinimapComponent_HostBindings(rf, ctx) { if (rf & 1) {
953
+ i0.ɵɵlistener("pointerdown", function MinimapComponent_pointerdown_HostBindingHandler($event) { return ctx.pointerdown($event); })("dblclick", function MinimapComponent_dblclick_HostBindingHandler($event) { return ctx.dblclick($event); });
954
+ } if (rf & 2) {
955
+ i0.ɵɵstyleProp("width", ctx.width)("height", ctx.height);
956
+ } }, inputs: { rendered: "rendered", size: "size", ratio: "ratio", nodes: "nodes", viewport: "viewport", translate: "translate", point: "point" }, features: [i0.ɵɵNgOnChangesFeature], decls: 2, vars: 8, consts: [[3, "left", "top", "width", "height", 4, "ngFor", "ngForOf", "ngForTrackBy"], [3, "left", "top", "width", "height", "containerWidth", "translate"], [3, "left", "top", "width", "height"]], template: function MinimapComponent_Template(rf, ctx) { if (rf & 1) {
957
+ i0.ɵɵtemplate(0, MinimapComponent_minimap_mini_node_0_Template, 1, 4, "minimap-mini-node", 0);
958
+ i0.ɵɵelement(1, "minimap-mini-viewport", 1);
959
+ } if (rf & 2) {
960
+ i0.ɵɵproperty("ngForOf", ctx.nodes)("ngForTrackBy", ctx.identifyMiniNode);
961
+ i0.ɵɵadvance(1);
962
+ i0.ɵɵproperty("left", ctx.viewport.left)("top", ctx.viewport.top)("width", ctx.viewport.width)("height", ctx.viewport.height)("containerWidth", ctx.el.nativeElement == null ? null : ctx.el.nativeElement.clientWidth)("translate", ctx.translate);
963
+ } }, directives: [i1.NgForOf, MiniViewportComponent, MiniNodeComponent], styles: ["[_nghost-%COMP%]{position:absolute;right:24px;bottom:24px;background:rgba(229,234,239,.65);padding:20px;overflow:hidden;border:1px solid #b1b7ff;border-radius:8px;box-sizing:border-box}"] });
964
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(MinimapComponent, [{
965
+ type: Component,
966
+ args: [{
967
+ templateUrl: './minimap.component.html',
968
+ styleUrls: ['./minimap.component.sass'],
969
+ host: {
970
+ 'data-testid': 'minimap'
971
+ }
972
+ }]
973
+ }], function () { return [{ type: i0.ElementRef }, { type: i0.ChangeDetectorRef }]; }, { rendered: [{
974
+ type: Input
975
+ }], size: [{
976
+ type: Input
977
+ }], ratio: [{
978
+ type: Input
979
+ }], nodes: [{
980
+ type: Input
981
+ }], viewport: [{
982
+ type: Input
983
+ }], translate: [{
984
+ type: Input
985
+ }], point: [{
986
+ type: Input
987
+ }], width: [{
988
+ type: HostBinding,
989
+ args: ['style.width']
990
+ }], height: [{
991
+ type: HostBinding,
992
+ args: ['style.height']
993
+ }], pointerdown: [{
994
+ type: HostListener,
995
+ args: ['pointerdown', ['$event']]
996
+ }], dblclick: [{
997
+ type: HostListener,
998
+ args: ['dblclick', ['$event']]
999
+ }] }); })();
1000
+
1001
+ function setup$1(props) {
1002
+ return {
1003
+ update(context) {
1004
+ if (context.data.type === 'minimap') {
1005
+ return {
1006
+ nodes: context.data.nodes,
1007
+ size: (props === null || props === void 0 ? void 0 : props.size) || 200,
1008
+ ratio: context.data.ratio,
1009
+ viewport: context.data.viewport,
1010
+ translate: context.data.translate,
1011
+ point: context.data.point
1012
+ };
1013
+ }
1014
+ return null;
1015
+ },
1016
+ mount(context, plugin) {
1017
+ const parent = plugin.parentScope();
1018
+ const emit = parent.emit.bind(parent);
1019
+ const rendered = () => {
1020
+ emit({ type: 'rendered', data: context.data });
1021
+ };
1022
+ if (context.data.type === 'minimap') {
1023
+ return {
1024
+ key: 'rete-minimap',
1025
+ component: MinimapComponent,
1026
+ props: {
1027
+ nodes: context.data.nodes,
1028
+ size: (props === null || props === void 0 ? void 0 : props.size) || 200,
1029
+ ratio: context.data.ratio,
1030
+ viewport: context.data.viewport,
1031
+ translate: context.data.translate,
1032
+ point: context.data.point,
1033
+ rendered
1034
+ }
1035
+ };
1036
+ }
1037
+ return null;
1038
+ }
1039
+ };
1040
+ }
1041
+
1042
+ var index$2 = /*#__PURE__*/Object.freeze({
1043
+ __proto__: null,
1044
+ setup: setup$1
1045
+ });
1046
+
1047
+ const pinSize = 20;
1048
+ class PinComponent {
1049
+ constructor(cdr) {
1050
+ this.cdr = cdr;
1051
+ this.menu = new EventEmitter();
1052
+ this.translate = new EventEmitter();
1053
+ this.down = new EventEmitter();
1054
+ this.drag = useDrag((dx, dy) => {
1055
+ this.translate.emit({ dx, dy });
1056
+ }, () => this.getPointer());
1057
+ // this.cdr.detach()
1058
+ }
1059
+ get _selected() {
1060
+ return this.selected;
1061
+ }
1062
+ get top() {
1063
+ return `${this.position.y - pinSize / 2}px`;
1064
+ }
1065
+ get left() {
1066
+ return `${this.position.x - pinSize / 2}px`;
1067
+ }
1068
+ pointerdown(event) {
1069
+ event.stopPropagation();
1070
+ event.preventDefault();
1071
+ this.drag.start(event);
1072
+ this.down.emit();
1073
+ }
1074
+ contextmenu(event) {
1075
+ event.stopPropagation();
1076
+ event.preventDefault();
1077
+ this.menu.emit();
1078
+ }
1079
+ ngOnChanges() {
1080
+ // this.cdr.detectChanges()
1081
+ // requestAnimationFrame(() => this.rendered())
1082
+ }
1083
+ }
1084
+ PinComponent.ɵfac = function PinComponent_Factory(t) { return new (t || PinComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
1085
+ PinComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PinComponent, selectors: [["reroute-pin"]], hostAttrs: ["data-testid", "pin"], hostVars: 6, hostBindings: function PinComponent_HostBindings(rf, ctx) { if (rf & 1) {
1086
+ i0.ɵɵlistener("pointerdown", function PinComponent_pointerdown_HostBindingHandler($event) { return ctx.pointerdown($event); })("contextmenu", function PinComponent_contextmenu_HostBindingHandler($event) { return ctx.contextmenu($event); });
1087
+ } if (rf & 2) {
1088
+ i0.ɵɵstyleProp("top", ctx.top)("left", ctx.left);
1089
+ i0.ɵɵclassProp("selected", ctx._selected);
1090
+ } }, inputs: { position: "position", selected: "selected", getPointer: "getPointer" }, outputs: { menu: "menu", translate: "translate", down: "down" }, features: [i0.ɵɵNgOnChangesFeature], decls: 0, vars: 0, template: function PinComponent_Template(rf, ctx) { }, styles: ["[_nghost-%COMP%]{display:block;width:20px;height:20px;box-sizing:border-box;background:steelblue;border:2px solid white;border-radius:20px;position:absolute}.selected[_nghost-%COMP%]{background:#ffd92c}"] });
1091
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PinComponent, [{
1092
+ type: Component,
1093
+ args: [{
1094
+ selector: 'reroute-pin',
1095
+ template: '',
1096
+ styleUrls: ['./pin.component.sass'],
1097
+ host: {
1098
+ 'data-testid': 'pin'
1099
+ }
1100
+ }]
1101
+ }], function () { return [{ type: i0.ChangeDetectorRef }]; }, { position: [{
1102
+ type: Input
1103
+ }], selected: [{
1104
+ type: Input
1105
+ }], getPointer: [{
1106
+ type: Input
1107
+ }], menu: [{
1108
+ type: Output
1109
+ }], translate: [{
1110
+ type: Output
1111
+ }], down: [{
1112
+ type: Output
1113
+ }], _selected: [{
1114
+ type: HostBinding,
1115
+ args: ['class.selected']
1116
+ }], top: [{
1117
+ type: HostBinding,
1118
+ args: ['style.top']
1119
+ }], left: [{
1120
+ type: HostBinding,
1121
+ args: ['style.left']
1122
+ }], pointerdown: [{
1123
+ type: HostListener,
1124
+ args: ['pointerdown', ['$event']]
1125
+ }], contextmenu: [{
1126
+ type: HostListener,
1127
+ args: ['contextmenu', ['$event']]
1128
+ }] }); })();
1129
+
1130
+ function PinsComponent_reroute_pin_0_Template(rf, ctx) { if (rf & 1) {
1131
+ const _r3 = i0.ɵɵgetCurrentView();
1132
+ i0.ɵɵelementStart(0, "reroute-pin", 1);
1133
+ i0.ɵɵlistener("menu", function PinsComponent_reroute_pin_0_Template_reroute_pin_menu_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r3); const pin_r1 = restoredCtx.$implicit; const ctx_r2 = i0.ɵɵnextContext(); return ctx_r2.menu && ctx_r2.menu(pin_r1.id); })("translate", function PinsComponent_reroute_pin_0_Template_reroute_pin_translate_0_listener($event) { const restoredCtx = i0.ɵɵrestoreView(_r3); const pin_r1 = restoredCtx.$implicit; const ctx_r4 = i0.ɵɵnextContext(); return ctx_r4.translate && ctx_r4.translate(pin_r1.id, $event.dx, $event.dy); })("down", function PinsComponent_reroute_pin_0_Template_reroute_pin_down_0_listener() { const restoredCtx = i0.ɵɵrestoreView(_r3); const pin_r1 = restoredCtx.$implicit; const ctx_r5 = i0.ɵɵnextContext(); return ctx_r5.down && ctx_r5.down(pin_r1.id); });
1134
+ i0.ɵɵelementEnd();
1135
+ } if (rf & 2) {
1136
+ const pin_r1 = ctx.$implicit;
1137
+ const ctx_r0 = i0.ɵɵnextContext();
1138
+ i0.ɵɵproperty("position", pin_r1.position)("selected", pin_r1.selected)("getPointer", ctx_r0.getPointer);
1139
+ } }
1140
+ class PinsComponent {
1141
+ constructor(cdr) {
1142
+ this.cdr = cdr;
1143
+ this.cdr.detach();
1144
+ }
1145
+ ngOnChanges() {
1146
+ this.cdr.detectChanges();
1147
+ requestAnimationFrame(() => this.rendered());
1148
+ }
1149
+ track(_, item) {
1150
+ return item.id;
1151
+ }
1152
+ }
1153
+ PinsComponent.ɵfac = function PinsComponent_Factory(t) { return new (t || PinsComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
1154
+ PinsComponent.ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: PinsComponent, selectors: [["ng-component"]], inputs: { rendered: "rendered", pins: "pins", down: "down", translate: "translate", menu: "menu", getPointer: "getPointer" }, features: [i0.ɵɵNgOnChangesFeature], decls: 1, vars: 2, consts: [[3, "position", "selected", "getPointer", "menu", "translate", "down", 4, "ngFor", "ngForOf", "ngForTrackBy"], [3, "position", "selected", "getPointer", "menu", "translate", "down"]], template: function PinsComponent_Template(rf, ctx) { if (rf & 1) {
1155
+ i0.ɵɵtemplate(0, PinsComponent_reroute_pin_0_Template, 1, 3, "reroute-pin", 0);
1156
+ } if (rf & 2) {
1157
+ i0.ɵɵproperty("ngForOf", ctx.pins)("ngForTrackBy", ctx.track);
1158
+ } }, directives: [i1.NgForOf, PinComponent], encapsulation: 2 });
1159
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(PinsComponent, [{
1160
+ type: Component,
1161
+ args: [{
1162
+ templateUrl: './pins.component.html'
1163
+ }]
1164
+ }], function () { return [{ type: i0.ChangeDetectorRef }]; }, { rendered: [{
1165
+ type: Input
1166
+ }], pins: [{
1167
+ type: Input
1168
+ }], down: [{
1169
+ type: Input
1170
+ }], translate: [{
1171
+ type: Input
1172
+ }], menu: [{
1173
+ type: Input
1174
+ }], getPointer: [{
1175
+ type: Input
1176
+ }] }); })();
1177
+
1178
+ function setup(props) {
1179
+ const getProps = () => ({
1180
+ menu: (props === null || props === void 0 ? void 0 : props.contextMenu) || (() => null),
1181
+ translate: (props === null || props === void 0 ? void 0 : props.translate) || (() => null),
1182
+ down: (props === null || props === void 0 ? void 0 : props.pointerdown) || (() => null)
1183
+ });
1184
+ return {
1185
+ update(context) {
1186
+ if (context.data.type === 'reroute-pins') {
1187
+ return Object.assign(Object.assign({}, getProps()), { pins: context.data.data.pins });
1188
+ }
1189
+ return null;
1190
+ },
1191
+ mount(context, plugin) {
1192
+ const area = plugin.parentScope(BaseAreaPlugin);
1193
+ const rendered = () => {
1194
+ area.emit({ type: 'rendered', data: context.data });
1195
+ };
1196
+ if (context.data.type === 'reroute-pins') {
1197
+ return {
1198
+ key: 'rete-reroute',
1199
+ component: PinsComponent,
1200
+ props: Object.assign(Object.assign({}, getProps()), { pins: context.data.data.pins, rendered, getPointer: () => area.area.pointer })
1201
+ };
1202
+ }
1203
+ return null;
1204
+ }
1205
+ };
1206
+ }
1207
+
1208
+ var index$1 = /*#__PURE__*/Object.freeze({
1209
+ __proto__: null,
1210
+ setup: setup
1211
+ });
1212
+
1213
+ var index = /*#__PURE__*/Object.freeze({
1214
+ __proto__: null,
1215
+ classic: index$4,
1216
+ contextMenu: index$3,
1217
+ minimap: index$2,
1218
+ reroute: index$1
1219
+ });
1220
+
1221
+ class ReteModule {
1222
+ }
1223
+ ReteModule.ɵfac = function ReteModule_Factory(t) { return new (t || ReteModule)(); };
1224
+ ReteModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: ReteModule });
1225
+ ReteModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [[
1226
+ CommonModule
1227
+ ]] });
1228
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReteModule, [{
1229
+ type: NgModule,
1230
+ args: [{
1231
+ declarations: [
1232
+ RefDirective,
1233
+ NodeComponent,
1234
+ ConnectionComponent,
1235
+ ConnectionWrapperComponent,
1236
+ SocketComponent,
1237
+ ControlComponent
1238
+ ],
1239
+ imports: [
1240
+ CommonModule
1241
+ ],
1242
+ exports: [
1243
+ RefDirective,
1244
+ NodeComponent,
1245
+ ConnectionComponent,
1246
+ ConnectionWrapperComponent,
1247
+ SocketComponent,
1248
+ ControlComponent
1249
+ ],
1250
+ entryComponents: [
1251
+ NodeComponent,
1252
+ ConnectionComponent,
1253
+ ConnectionWrapperComponent,
1254
+ SocketComponent,
1255
+ ControlComponent
1256
+ ]
1257
+ }]
1258
+ }], null, null); })();
1259
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(ReteModule, { declarations: [RefDirective,
1260
+ NodeComponent,
1261
+ ConnectionComponent,
1262
+ ConnectionWrapperComponent,
1263
+ SocketComponent,
1264
+ ControlComponent], imports: [CommonModule], exports: [RefDirective,
1265
+ NodeComponent,
1266
+ ConnectionComponent,
1267
+ ConnectionWrapperComponent,
1268
+ SocketComponent,
1269
+ ControlComponent] }); })();
1270
+
1271
+ class ReteContextMenuModule {
1272
+ }
1273
+ ReteContextMenuModule.ɵfac = function ReteContextMenuModule_Factory(t) { return new (t || ReteContextMenuModule)(); };
1274
+ ReteContextMenuModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: ReteContextMenuModule });
1275
+ ReteContextMenuModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [[
1276
+ CommonModule
1277
+ ]] });
1278
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReteContextMenuModule, [{
1279
+ type: NgModule,
1280
+ args: [{
1281
+ declarations: [
1282
+ ContextMenuComponent,
1283
+ ContextMenuSearchComponent,
1284
+ ContextMenuItemComponent
1285
+ ],
1286
+ imports: [
1287
+ CommonModule
1288
+ ],
1289
+ exports: [
1290
+ ContextMenuComponent,
1291
+ ContextMenuSearchComponent,
1292
+ ContextMenuItemComponent,
1293
+ ],
1294
+ entryComponents: [
1295
+ ContextMenuComponent
1296
+ ]
1297
+ }]
1298
+ }], null, null); })();
1299
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(ReteContextMenuModule, { declarations: [ContextMenuComponent,
1300
+ ContextMenuSearchComponent,
1301
+ ContextMenuItemComponent], imports: [CommonModule], exports: [ContextMenuComponent,
1302
+ ContextMenuSearchComponent,
1303
+ ContextMenuItemComponent] }); })();
1304
+
1305
+ class ReteMinimapModule {
1306
+ }
1307
+ ReteMinimapModule.ɵfac = function ReteMinimapModule_Factory(t) { return new (t || ReteMinimapModule)(); };
1308
+ ReteMinimapModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: ReteMinimapModule });
1309
+ ReteMinimapModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [[
1310
+ CommonModule
1311
+ ]] });
1312
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReteMinimapModule, [{
1313
+ type: NgModule,
1314
+ args: [{
1315
+ declarations: [
1316
+ MinimapComponent,
1317
+ MiniViewportComponent,
1318
+ MiniNodeComponent
1319
+ ],
1320
+ imports: [
1321
+ CommonModule
1322
+ ],
1323
+ exports: [
1324
+ MinimapComponent,
1325
+ MiniViewportComponent,
1326
+ MiniNodeComponent
1327
+ ],
1328
+ entryComponents: [
1329
+ MinimapComponent
1330
+ ]
1331
+ }]
1332
+ }], null, null); })();
1333
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(ReteMinimapModule, { declarations: [MinimapComponent,
1334
+ MiniViewportComponent,
1335
+ MiniNodeComponent], imports: [CommonModule], exports: [MinimapComponent,
1336
+ MiniViewportComponent,
1337
+ MiniNodeComponent] }); })();
1338
+
1339
+ class ReteRerouteModule {
1340
+ }
1341
+ ReteRerouteModule.ɵfac = function ReteRerouteModule_Factory(t) { return new (t || ReteRerouteModule)(); };
1342
+ ReteRerouteModule.ɵmod = /*@__PURE__*/ i0.ɵɵdefineNgModule({ type: ReteRerouteModule });
1343
+ ReteRerouteModule.ɵinj = /*@__PURE__*/ i0.ɵɵdefineInjector({ imports: [[
1344
+ CommonModule
1345
+ ]] });
1346
+ (function () { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ReteRerouteModule, [{
1347
+ type: NgModule,
1348
+ args: [{
1349
+ declarations: [
1350
+ PinsComponent,
1351
+ PinComponent,
1352
+ ],
1353
+ imports: [
1354
+ CommonModule
1355
+ ],
1356
+ exports: [
1357
+ PinsComponent,
1358
+ PinComponent,
1359
+ ],
1360
+ entryComponents: [
1361
+ PinsComponent
1362
+ ]
1363
+ }]
1364
+ }], null, null); })();
1365
+ (function () { (typeof ngJitMode === "undefined" || ngJitMode) && i0.ɵɵsetNgModuleScope(ReteRerouteModule, { declarations: [PinsComponent,
1366
+ PinComponent], imports: [CommonModule], exports: [PinsComponent,
1367
+ PinComponent] }); })();
1368
+
1369
+ function getRenderer() {
1370
+ const elements = new WeakMap();
1371
+ return {
1372
+ get(element) {
1373
+ return elements.get(element);
1374
+ },
1375
+ mount(element, key, component, injector, props) {
1376
+ // LIMITATION: If an element is remounted with the same identifier, the component cannot be replaced
1377
+ const exists = customElements.get(key);
1378
+ if (!exists) {
1379
+ customElements.define(key, createCustomElement(component, { injector }));
1380
+ }
1381
+ const ngElement = document.createElement(key);
1382
+ Object.keys(props).forEach(key => {
1383
+ ngElement[key] = props[key];
1384
+ });
1385
+ element.appendChild(ngElement);
1386
+ elements.set(element, { key, ngElement });
1387
+ },
1388
+ update({ ngElement }, props) {
1389
+ Object.keys(props).forEach(key => {
1390
+ ngElement.ngElementStrategy.setInputValue(key, props[key]);
1391
+ });
1392
+ ngElement.ngElementStrategy.setInputValue('seed', Math.random());
1393
+ },
1394
+ unmount(element) {
1395
+ const existing = elements.get(element);
1396
+ if (existing) {
1397
+ existing.ngElement.remove();
1398
+ elements.delete(element);
1399
+ }
1400
+ }
1401
+ };
1402
+ }
1403
+ class AngularPlugin extends Scope {
1404
+ constructor(params) {
1405
+ super('angular-render');
1406
+ this.params = params;
1407
+ this.presets = [];
1408
+ this.owners = new WeakMap();
1409
+ this.renderer = getRenderer();
1410
+ this.addPipe(context => {
1411
+ if (!context || typeof context !== 'object' || !('type' in context))
1412
+ return context;
1413
+ if (context.type === 'unmount') {
1414
+ this.unmount(context.data.element);
1415
+ }
1416
+ else if (context.type === 'render') {
1417
+ if ('filled' in context.data && context.data.filled) {
1418
+ return context;
1419
+ }
1420
+ if (this.mount(context.data.element, context)) {
1421
+ return Object.assign(Object.assign({}, context), { data: Object.assign(Object.assign({}, context.data), { filled: true }) });
1422
+ }
1423
+ }
1424
+ return context;
1425
+ });
1426
+ }
1427
+ setParent(scope) {
1428
+ super.setParent(scope);
1429
+ this.presets.forEach(preset => {
1430
+ if (preset.attach)
1431
+ preset.attach(this);
1432
+ });
1433
+ }
1434
+ unmount(element) {
1435
+ this.owners.delete(element);
1436
+ this.renderer.unmount(element);
1437
+ }
1438
+ mount(element, context) {
1439
+ const existing = this.renderer.get(element);
1440
+ if (existing) {
1441
+ this.presets.forEach(preset => {
1442
+ if (this.owners.get(element) !== preset)
1443
+ return;
1444
+ const result = preset.update(context, this);
1445
+ if (result) {
1446
+ this.renderer.update(existing, result);
1447
+ }
1448
+ });
1449
+ return true;
1450
+ }
1451
+ for (const preset of this.presets) {
1452
+ const result = preset.mount(context, this);
1453
+ if (!result)
1454
+ continue;
1455
+ const { key, component, props } = result;
1456
+ this.renderer.mount(element, key, component, this.params.injector, props);
1457
+ this.owners.set(element, preset);
1458
+ return true;
1459
+ }
1460
+ return;
1461
+ }
1462
+ addPreset(preset) {
1463
+ const local = preset;
1464
+ if (local.attach)
1465
+ local.attach(this);
1466
+ this.presets.push(local);
1467
+ }
1468
+ }
1469
+
1470
+ /**
1471
+ * Generated bundle index. Do not edit.
1472
+ */
1473
+
1474
+ export { AngularPlugin, ConnectionComponent, ConnectionWrapperComponent, ContextMenuComponent, ContextMenuItemComponent, ContextMenuSearchComponent, ControlComponent, MiniNodeComponent, MiniViewportComponent, MinimapComponent, NodeComponent, PinComponent, PinsComponent, index as Presets, RefDirective, ReteContextMenuModule, ReteMinimapModule, ReteModule, ReteRerouteModule, SocketComponent };
1475
+ //# sourceMappingURL=rete-angular-plugin-ng12.js.map