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,1707 @@
1
+ (function (global, factory) {
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rete'), require('rete-render-utils'), require('@angular/core'), require('rete-area-plugin'), require('@angular/common'), require('@angular/elements')) :
3
+ typeof define === 'function' && define.amd ? define('rete-angular-plugin', ['exports', 'rete', 'rete-render-utils', '@angular/core', 'rete-area-plugin', '@angular/common', '@angular/elements'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["rete-angular-plugin"] = {}, global.rete, global.reteRenderUtils, global.ng.core, global.reteAreaPlugin, global.ng.common, global.ng.elements));
5
+ })(this, (function (exports, rete, reteRenderUtils, core, reteAreaPlugin, common, elements) { 'use strict';
6
+
7
+ /******************************************************************************
8
+ Copyright (c) Microsoft Corporation.
9
+
10
+ Permission to use, copy, modify, and/or distribute this software for any
11
+ purpose with or without fee is hereby granted.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
14
+ REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
15
+ AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
16
+ INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
17
+ LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
18
+ OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
+ PERFORMANCE OF THIS SOFTWARE.
20
+ ***************************************************************************** */
21
+ /* global Reflect, Promise */
22
+ var extendStatics = function (d, b) {
23
+ extendStatics = Object.setPrototypeOf ||
24
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
25
+ function (d, b) { for (var p in b)
26
+ if (Object.prototype.hasOwnProperty.call(b, p))
27
+ d[p] = b[p]; };
28
+ return extendStatics(d, b);
29
+ };
30
+ function __extends(d, b) {
31
+ if (typeof b !== "function" && b !== null)
32
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
33
+ extendStatics(d, b);
34
+ function __() { this.constructor = d; }
35
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
36
+ }
37
+ var __assign = function () {
38
+ __assign = Object.assign || function __assign(t) {
39
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
40
+ s = arguments[i];
41
+ for (var p in s)
42
+ if (Object.prototype.hasOwnProperty.call(s, p))
43
+ t[p] = s[p];
44
+ }
45
+ return t;
46
+ };
47
+ return __assign.apply(this, arguments);
48
+ };
49
+ function __rest(s, e) {
50
+ var t = {};
51
+ for (var p in s)
52
+ if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
53
+ t[p] = s[p];
54
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
55
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
56
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
57
+ t[p[i]] = s[p[i]];
58
+ }
59
+ return t;
60
+ }
61
+ function __decorate(decorators, target, key, desc) {
62
+ var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
63
+ if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
64
+ r = Reflect.decorate(decorators, target, key, desc);
65
+ else
66
+ for (var i = decorators.length - 1; i >= 0; i--)
67
+ if (d = decorators[i])
68
+ r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
69
+ return c > 3 && r && Object.defineProperty(target, key, r), r;
70
+ }
71
+ function __param(paramIndex, decorator) {
72
+ return function (target, key) { decorator(target, key, paramIndex); };
73
+ }
74
+ function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
75
+ function accept(f) { if (f !== void 0 && typeof f !== "function")
76
+ throw new TypeError("Function expected"); return f; }
77
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
78
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
79
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
80
+ var _, done = false;
81
+ for (var i = decorators.length - 1; i >= 0; i--) {
82
+ var context = {};
83
+ for (var p in contextIn)
84
+ context[p] = p === "access" ? {} : contextIn[p];
85
+ for (var p in contextIn.access)
86
+ context.access[p] = contextIn.access[p];
87
+ context.addInitializer = function (f) { if (done)
88
+ throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
89
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
90
+ if (kind === "accessor") {
91
+ if (result === void 0)
92
+ continue;
93
+ if (result === null || typeof result !== "object")
94
+ throw new TypeError("Object expected");
95
+ if (_ = accept(result.get))
96
+ descriptor.get = _;
97
+ if (_ = accept(result.set))
98
+ descriptor.set = _;
99
+ if (_ = accept(result.init))
100
+ initializers.push(_);
101
+ }
102
+ else if (_ = accept(result)) {
103
+ if (kind === "field")
104
+ initializers.push(_);
105
+ else
106
+ descriptor[key] = _;
107
+ }
108
+ }
109
+ if (target)
110
+ Object.defineProperty(target, contextIn.name, descriptor);
111
+ done = true;
112
+ }
113
+ ;
114
+ function __runInitializers(thisArg, initializers, value) {
115
+ var useValue = arguments.length > 2;
116
+ for (var i = 0; i < initializers.length; i++) {
117
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
118
+ }
119
+ return useValue ? value : void 0;
120
+ }
121
+ ;
122
+ function __propKey(x) {
123
+ return typeof x === "symbol" ? x : "".concat(x);
124
+ }
125
+ ;
126
+ function __setFunctionName(f, name, prefix) {
127
+ if (typeof name === "symbol")
128
+ name = name.description ? "[".concat(name.description, "]") : "";
129
+ return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
130
+ }
131
+ ;
132
+ function __metadata(metadataKey, metadataValue) {
133
+ if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
134
+ return Reflect.metadata(metadataKey, metadataValue);
135
+ }
136
+ function __awaiter(thisArg, _arguments, P, generator) {
137
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
138
+ return new (P || (P = Promise))(function (resolve, reject) {
139
+ function fulfilled(value) { try {
140
+ step(generator.next(value));
141
+ }
142
+ catch (e) {
143
+ reject(e);
144
+ } }
145
+ function rejected(value) { try {
146
+ step(generator["throw"](value));
147
+ }
148
+ catch (e) {
149
+ reject(e);
150
+ } }
151
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
152
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
153
+ });
154
+ }
155
+ function __generator(thisArg, body) {
156
+ var _ = { label: 0, sent: function () { if (t[0] & 1)
157
+ throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
158
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
159
+ function verb(n) { return function (v) { return step([n, v]); }; }
160
+ function step(op) {
161
+ if (f)
162
+ throw new TypeError("Generator is already executing.");
163
+ while (g && (g = 0, op[0] && (_ = 0)), _)
164
+ try {
165
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
166
+ return t;
167
+ if (y = 0, t)
168
+ op = [op[0] & 2, t.value];
169
+ switch (op[0]) {
170
+ case 0:
171
+ case 1:
172
+ t = op;
173
+ break;
174
+ case 4:
175
+ _.label++;
176
+ return { value: op[1], done: false };
177
+ case 5:
178
+ _.label++;
179
+ y = op[1];
180
+ op = [0];
181
+ continue;
182
+ case 7:
183
+ op = _.ops.pop();
184
+ _.trys.pop();
185
+ continue;
186
+ default:
187
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
188
+ _ = 0;
189
+ continue;
190
+ }
191
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
192
+ _.label = op[1];
193
+ break;
194
+ }
195
+ if (op[0] === 6 && _.label < t[1]) {
196
+ _.label = t[1];
197
+ t = op;
198
+ break;
199
+ }
200
+ if (t && _.label < t[2]) {
201
+ _.label = t[2];
202
+ _.ops.push(op);
203
+ break;
204
+ }
205
+ if (t[2])
206
+ _.ops.pop();
207
+ _.trys.pop();
208
+ continue;
209
+ }
210
+ op = body.call(thisArg, _);
211
+ }
212
+ catch (e) {
213
+ op = [6, e];
214
+ y = 0;
215
+ }
216
+ finally {
217
+ f = t = 0;
218
+ }
219
+ if (op[0] & 5)
220
+ throw op[1];
221
+ return { value: op[0] ? op[1] : void 0, done: true };
222
+ }
223
+ }
224
+ var __createBinding = Object.create ? (function (o, m, k, k2) {
225
+ if (k2 === undefined)
226
+ k2 = k;
227
+ var desc = Object.getOwnPropertyDescriptor(m, k);
228
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
229
+ desc = { enumerable: true, get: function () { return m[k]; } };
230
+ }
231
+ Object.defineProperty(o, k2, desc);
232
+ }) : (function (o, m, k, k2) {
233
+ if (k2 === undefined)
234
+ k2 = k;
235
+ o[k2] = m[k];
236
+ });
237
+ function __exportStar(m, o) {
238
+ for (var p in m)
239
+ if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
240
+ __createBinding(o, m, p);
241
+ }
242
+ function __values(o) {
243
+ var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
244
+ if (m)
245
+ return m.call(o);
246
+ if (o && typeof o.length === "number")
247
+ return {
248
+ next: function () {
249
+ if (o && i >= o.length)
250
+ o = void 0;
251
+ return { value: o && o[i++], done: !o };
252
+ }
253
+ };
254
+ throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
255
+ }
256
+ function __read(o, n) {
257
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
258
+ if (!m)
259
+ return o;
260
+ var i = m.call(o), r, ar = [], e;
261
+ try {
262
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
263
+ ar.push(r.value);
264
+ }
265
+ catch (error) {
266
+ e = { error: error };
267
+ }
268
+ finally {
269
+ try {
270
+ if (r && !r.done && (m = i["return"]))
271
+ m.call(i);
272
+ }
273
+ finally {
274
+ if (e)
275
+ throw e.error;
276
+ }
277
+ }
278
+ return ar;
279
+ }
280
+ /** @deprecated */
281
+ function __spread() {
282
+ for (var ar = [], i = 0; i < arguments.length; i++)
283
+ ar = ar.concat(__read(arguments[i]));
284
+ return ar;
285
+ }
286
+ /** @deprecated */
287
+ function __spreadArrays() {
288
+ for (var s = 0, i = 0, il = arguments.length; i < il; i++)
289
+ s += arguments[i].length;
290
+ for (var r = Array(s), k = 0, i = 0; i < il; i++)
291
+ for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
292
+ r[k] = a[j];
293
+ return r;
294
+ }
295
+ function __spreadArray(to, from, pack) {
296
+ if (pack || arguments.length === 2)
297
+ for (var i = 0, l = from.length, ar; i < l; i++) {
298
+ if (ar || !(i in from)) {
299
+ if (!ar)
300
+ ar = Array.prototype.slice.call(from, 0, i);
301
+ ar[i] = from[i];
302
+ }
303
+ }
304
+ return to.concat(ar || Array.prototype.slice.call(from));
305
+ }
306
+ function __await(v) {
307
+ return this instanceof __await ? (this.v = v, this) : new __await(v);
308
+ }
309
+ function __asyncGenerator(thisArg, _arguments, generator) {
310
+ if (!Symbol.asyncIterator)
311
+ throw new TypeError("Symbol.asyncIterator is not defined.");
312
+ var g = generator.apply(thisArg, _arguments || []), i, q = [];
313
+ return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
314
+ function verb(n) { if (g[n])
315
+ i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
316
+ function resume(n, v) { try {
317
+ step(g[n](v));
318
+ }
319
+ catch (e) {
320
+ settle(q[0][3], e);
321
+ } }
322
+ function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
323
+ function fulfill(value) { resume("next", value); }
324
+ function reject(value) { resume("throw", value); }
325
+ function settle(f, v) { if (f(v), q.shift(), q.length)
326
+ resume(q[0][0], q[0][1]); }
327
+ }
328
+ function __asyncDelegator(o) {
329
+ var i, p;
330
+ return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
331
+ function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }
332
+ }
333
+ function __asyncValues(o) {
334
+ if (!Symbol.asyncIterator)
335
+ throw new TypeError("Symbol.asyncIterator is not defined.");
336
+ var m = o[Symbol.asyncIterator], i;
337
+ return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
338
+ function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
339
+ function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
340
+ }
341
+ function __makeTemplateObject(cooked, raw) {
342
+ if (Object.defineProperty) {
343
+ Object.defineProperty(cooked, "raw", { value: raw });
344
+ }
345
+ else {
346
+ cooked.raw = raw;
347
+ }
348
+ return cooked;
349
+ }
350
+ ;
351
+ var __setModuleDefault = Object.create ? (function (o, v) {
352
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
353
+ }) : function (o, v) {
354
+ o["default"] = v;
355
+ };
356
+ function __importStar(mod) {
357
+ if (mod && mod.__esModule)
358
+ return mod;
359
+ var result = {};
360
+ if (mod != null)
361
+ for (var k in mod)
362
+ if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
363
+ __createBinding(result, mod, k);
364
+ __setModuleDefault(result, mod);
365
+ return result;
366
+ }
367
+ function __importDefault(mod) {
368
+ return (mod && mod.__esModule) ? mod : { default: mod };
369
+ }
370
+ function __classPrivateFieldGet(receiver, state, kind, f) {
371
+ if (kind === "a" && !f)
372
+ throw new TypeError("Private accessor was defined without a getter");
373
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
374
+ throw new TypeError("Cannot read private member from an object whose class did not declare it");
375
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
376
+ }
377
+ function __classPrivateFieldSet(receiver, state, value, kind, f) {
378
+ if (kind === "m")
379
+ throw new TypeError("Private method is not writable");
380
+ if (kind === "a" && !f)
381
+ throw new TypeError("Private accessor was defined without a setter");
382
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
383
+ throw new TypeError("Cannot write private member to an object whose class did not declare it");
384
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
385
+ }
386
+ function __classPrivateFieldIn(state, receiver) {
387
+ if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
388
+ throw new TypeError("Cannot use 'in' operator on non-object");
389
+ return typeof state === "function" ? receiver === state : state.has(receiver);
390
+ }
391
+
392
+ var RefDirective = /** @class */ (function () {
393
+ function RefDirective(el) {
394
+ this.el = el;
395
+ }
396
+ RefDirective.prototype.ngOnChanges = function () {
397
+ this.emit({ type: 'render', data: Object.assign(Object.assign({}, this.data), { element: this.el.nativeElement }) });
398
+ };
399
+ return RefDirective;
400
+ }());
401
+ RefDirective.decorators = [
402
+ { type: core.Directive, args: [{
403
+ selector: '[refComponent]'
404
+ },] }
405
+ ];
406
+ RefDirective.ctorParameters = function () { return [
407
+ { type: core.ElementRef }
408
+ ]; };
409
+ RefDirective.propDecorators = {
410
+ data: [{ type: core.Input }],
411
+ emit: [{ type: core.Input }]
412
+ };
413
+ var NodeComponent = /** @class */ (function () {
414
+ function NodeComponent(cdr) {
415
+ this.cdr = cdr;
416
+ this.seed = 0;
417
+ this.cdr.detach();
418
+ }
419
+ Object.defineProperty(NodeComponent.prototype, "selected", {
420
+ get: function () {
421
+ return this.data.selected;
422
+ },
423
+ enumerable: false,
424
+ configurable: true
425
+ });
426
+ NodeComponent.prototype.ngOnChanges = function () {
427
+ var _this = this;
428
+ this.cdr.detectChanges();
429
+ requestAnimationFrame(function () { return _this.rendered(); });
430
+ this.seed++; // force render sockets
431
+ };
432
+ NodeComponent.prototype.sortByIndex = function (a, b) {
433
+ var _a, _b;
434
+ var ai = ((_a = a.value) === null || _a === void 0 ? void 0 : _a.index) || 0;
435
+ var bi = ((_b = b.value) === null || _b === void 0 ? void 0 : _b.index) || 0;
436
+ return ai - bi;
437
+ };
438
+ return NodeComponent;
439
+ }());
440
+ NodeComponent.decorators = [
441
+ { type: core.Component, args: [{
442
+ template: "<div class=\"title\" data-testid=\"title\">{{data.label}}</div>\n<div class=\"output\" *ngFor=\"let output of data.outputs | keyvalue: sortByIndex\" [attr.data-testid]=\"'output-'+output.key\">\n <div class=\"output-title\" data-testid=\"output-title\">{{output.value?.label}}</div>\n <div\n class=\"output-socket\"\n refComponent\n [data]=\"{type: 'socket', side: 'output', key: output.key, nodeId: data.id, payload: output.value?.socket, seed: seed }\"\n [emit]=\"emit\"\n data-testid=\"output-socket\"\n ></div>\n</div>\n<div\n class=\"control\"\n *ngFor=\"let control of data.controls | keyvalue: sortByIndex\"\n refComponent\n [data]=\"{type: 'control', payload: control.value }\"\n [emit]=\"emit\"\n [attr.data-testid]=\"'control-'+control.key\"\n></div>\n<div class=\"input\" *ngFor=\"let input of data.inputs | keyvalue: sortByIndex\" [attr.data-testid]=\"'input-'+input.key\">\n <div\n class=\"input-socket\"\n refComponent\n [data]=\"{type: 'socket', side: 'input', key: input.key, nodeId: data.id, payload: input.value?.socket, seed: seed }\"\n [emit]=\"emit\"\n data-testid=\"input-socket\"\n ></div>\n <div class=\"input-title\" data-testid=\"input-title\" *ngIf=\"!input.value?.control || !input.value?.showControl\">{{input.value?.label}}</div>\n <div\n class=\"input-control\"\n [style.display]=\"input.value?.control && input.value?.showControl ? '' : 'none'\"\n refComponent\n [data]=\"{type: 'control', payload: input.value?.control }\"\n [emit]=\"emit\"\n data-testid=\"input-control\"\n ></div>\n</div>\n",
443
+ host: {
444
+ 'data-testid': 'node'
445
+ },
446
+ styles: [":host{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}:host:hover{background:rgba(130,153,255,.8)}:host.selected{background:#ffd92c;border-color:#e3c000}:host .title{color:#fff;font-family:sans-serif;font-size:18px;padding:8px}:host .output{text-align:right}:host .input{text-align:left}:host .input-title,:host .output-title{vertical-align:middle;color:#fff;display:inline-block;font-family:sans-serif;font-size:14px;margin:6px;line-height:24px}:host .input-title[hidden],:host .output-title[hidden]{display:none}:host .output-socket{text-align:right;margin-right:-18px;display:inline-block}:host .input-socket{text-align:left;margin-left:-18px;display:inline-block}:host .input-control{z-index:1;width:calc(100% - 36px);vertical-align:middle;display:inline-block}:host .control{padding:6px 18px}\n"]
447
+ },] }
448
+ ];
449
+ NodeComponent.ctorParameters = function () { return [
450
+ { type: core.ChangeDetectorRef }
451
+ ]; };
452
+ NodeComponent.propDecorators = {
453
+ data: [{ type: core.Input }],
454
+ emit: [{ type: core.Input }],
455
+ rendered: [{ type: core.Input }],
456
+ selected: [{ type: core.HostBinding, args: ['class.selected',] }]
457
+ };
458
+
459
+ var SocketComponent = /** @class */ (function () {
460
+ function SocketComponent(cdr) {
461
+ this.cdr = cdr;
462
+ this.cdr.detach();
463
+ }
464
+ Object.defineProperty(SocketComponent.prototype, "title", {
465
+ get: function () {
466
+ return this.data.name;
467
+ },
468
+ enumerable: false,
469
+ configurable: true
470
+ });
471
+ SocketComponent.prototype.ngOnChanges = function () {
472
+ var _this = this;
473
+ this.cdr.detectChanges();
474
+ requestAnimationFrame(function () { return _this.rendered(); });
475
+ };
476
+ return SocketComponent;
477
+ }());
478
+ SocketComponent.decorators = [
479
+ { type: core.Component, args: [{
480
+ template: "",
481
+ styles: [":host{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}:host:hover{border-width:4px}:host.multiple{border-color:#ff0}:host.output{margin-right:-12px}:host.input{margin-left:-12px}\n"]
482
+ },] }
483
+ ];
484
+ SocketComponent.ctorParameters = function () { return [
485
+ { type: core.ChangeDetectorRef }
486
+ ]; };
487
+ SocketComponent.propDecorators = {
488
+ data: [{ type: core.Input }],
489
+ rendered: [{ type: core.Input }],
490
+ title: [{ type: core.HostBinding, args: ['title',] }]
491
+ };
492
+
493
+ var ControlComponent = /** @class */ (function () {
494
+ function ControlComponent(cdr) {
495
+ this.cdr = cdr;
496
+ this.cdr.detach();
497
+ }
498
+ ControlComponent.prototype.pointerdown = function (event) {
499
+ event.stopPropagation();
500
+ };
501
+ ControlComponent.prototype.ngOnChanges = function (changes) {
502
+ var _this = this;
503
+ var seed = changes['seed'];
504
+ var data = changes['data'];
505
+ if ((seed && seed.currentValue !== seed.previousValue)
506
+ || (data && data.currentValue !== data.previousValue)) {
507
+ this.cdr.detectChanges();
508
+ }
509
+ requestAnimationFrame(function () { return _this.rendered(); });
510
+ };
511
+ ControlComponent.prototype.onChange = function (e) {
512
+ var target = e.target;
513
+ var value = (this.data.type === 'number'
514
+ ? +target.value
515
+ : target.value);
516
+ this.data.setValue(value);
517
+ this.cdr.detectChanges();
518
+ };
519
+ return ControlComponent;
520
+ }());
521
+ ControlComponent.decorators = [
522
+ { type: core.Component, args: [{
523
+ template: "<input\n [value]=\"data.value\"\n [readonly]=\"data.readonly\"\n [type]=\"data.type\"\n (input)=\"onChange($event)\"\n/>\n",
524
+ styles: ["input{width:130px;border-radius:30px;background-color:#fff;padding:2px 6px;border:1px solid #999;font-size:110%}\n"]
525
+ },] }
526
+ ];
527
+ ControlComponent.ctorParameters = function () { return [
528
+ { type: core.ChangeDetectorRef }
529
+ ]; };
530
+ ControlComponent.propDecorators = {
531
+ data: [{ type: core.Input }],
532
+ rendered: [{ type: core.Input }],
533
+ pointerdown: [{ type: core.HostListener, args: ['pointerdown', ['$event'],] }]
534
+ };
535
+
536
+ var ConnectionComponent = /** @class */ (function () {
537
+ function ConnectionComponent() {
538
+ }
539
+ return ConnectionComponent;
540
+ }());
541
+ ConnectionComponent.decorators = [
542
+ { type: core.Component, args: [{
543
+ selector: 'connection',
544
+ template: "<svg data-testid=\"connection\">\n <path [attr.d]=\"path\" />\n</svg>\n",
545
+ styles: ["svg{overflow:visible!important;position:absolute;pointer-events:none;width:9999px;height:9999px}svg path{fill:none;stroke-width:5px;stroke:#4682b4;pointer-events:auto}\n"]
546
+ },] }
547
+ ];
548
+ ConnectionComponent.propDecorators = {
549
+ data: [{ type: core.Input }],
550
+ start: [{ type: core.Input }],
551
+ end: [{ type: core.Input }],
552
+ path: [{ type: core.Input }]
553
+ };
554
+
555
+ var ConnectionWrapperComponent = /** @class */ (function () {
556
+ function ConnectionWrapperComponent(cdr, viewContainerRef, componentFactoryResolver) {
557
+ this.cdr = cdr;
558
+ this.viewContainerRef = viewContainerRef;
559
+ this.componentFactoryResolver = componentFactoryResolver;
560
+ this.startOb = null;
561
+ this.endOb = null;
562
+ this.cdr.detach();
563
+ }
564
+ Object.defineProperty(ConnectionWrapperComponent.prototype, "_start", {
565
+ get: function () {
566
+ return 'x' in this.start ? this.start : this.startOb;
567
+ },
568
+ enumerable: false,
569
+ configurable: true
570
+ });
571
+ Object.defineProperty(ConnectionWrapperComponent.prototype, "_end", {
572
+ get: function () {
573
+ return 'x' in this.end ? this.end : this.endOb;
574
+ },
575
+ enumerable: false,
576
+ configurable: true
577
+ });
578
+ ConnectionWrapperComponent.prototype.ngOnChanges = function () {
579
+ return __awaiter(this, void 0, void 0, function () {
580
+ var _this = this;
581
+ return __generator(this, function (_a) {
582
+ switch (_a.label) {
583
+ case 0: return [4 /*yield*/, this.updatePath()];
584
+ case 1:
585
+ _a.sent();
586
+ requestAnimationFrame(function () { return _this.rendered(); });
587
+ this.cdr.detectChanges();
588
+ this.update();
589
+ return [2 /*return*/];
590
+ }
591
+ });
592
+ });
593
+ };
594
+ ConnectionWrapperComponent.prototype.updatePath = function () {
595
+ return __awaiter(this, void 0, void 0, function () {
596
+ var _a;
597
+ return __generator(this, function (_b) {
598
+ switch (_b.label) {
599
+ case 0:
600
+ if (!(this._start && this._end)) return [3 /*break*/, 2];
601
+ _a = this;
602
+ return [4 /*yield*/, this.path(this._start, this._end)];
603
+ case 1:
604
+ _a._path = _b.sent();
605
+ _b.label = 2;
606
+ case 2: return [2 /*return*/];
607
+ }
608
+ });
609
+ });
610
+ };
611
+ ConnectionWrapperComponent.prototype.ngOnInit = function () {
612
+ var _this = this;
613
+ if (typeof this.start === 'function') {
614
+ this.start(function (value) { return __awaiter(_this, void 0, void 0, function () {
615
+ return __generator(this, function (_a) {
616
+ switch (_a.label) {
617
+ case 0:
618
+ this.startOb = value;
619
+ return [4 /*yield*/, this.updatePath()];
620
+ case 1:
621
+ _a.sent();
622
+ this.cdr.detectChanges();
623
+ this.update();
624
+ return [2 /*return*/];
625
+ }
626
+ });
627
+ }); });
628
+ }
629
+ if (typeof this.end === 'function') {
630
+ this.end(function (value) { return __awaiter(_this, void 0, void 0, function () {
631
+ return __generator(this, function (_a) {
632
+ switch (_a.label) {
633
+ case 0:
634
+ this.endOb = value;
635
+ return [4 /*yield*/, this.updatePath()];
636
+ case 1:
637
+ _a.sent();
638
+ this.cdr.detectChanges();
639
+ this.update();
640
+ return [2 /*return*/];
641
+ }
642
+ });
643
+ }); });
644
+ }
645
+ var componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.connectionComponent);
646
+ this.viewContainerRef.clear();
647
+ this.ref = this.viewContainerRef.createComponent(componentFactory);
648
+ this.update();
649
+ };
650
+ ConnectionWrapperComponent.prototype.update = function () {
651
+ this.ref.instance.data = this.data;
652
+ this.ref.instance.start = this._start;
653
+ this.ref.instance.end = this._end;
654
+ this.ref.instance.path = this._path;
655
+ };
656
+ return ConnectionWrapperComponent;
657
+ }());
658
+ ConnectionWrapperComponent.decorators = [
659
+ { type: core.Component, args: [{
660
+ template: ''
661
+ },] }
662
+ ];
663
+ ConnectionWrapperComponent.ctorParameters = function () { return [
664
+ { type: core.ChangeDetectorRef },
665
+ { type: core.ViewContainerRef },
666
+ { type: core.ComponentFactoryResolver }
667
+ ]; };
668
+ ConnectionWrapperComponent.propDecorators = {
669
+ data: [{ type: core.Input }],
670
+ start: [{ type: core.Input }],
671
+ end: [{ type: core.Input }],
672
+ path: [{ type: core.Input }],
673
+ rendered: [{ type: core.Input }],
674
+ connectionComponent: [{ type: core.Input }]
675
+ };
676
+
677
+ function setup$3(props) {
678
+ var positionWatcher = typeof (props === null || props === void 0 ? void 0 : props.socketPositionWatcher) === 'undefined'
679
+ ? reteRenderUtils.getDOMSocketPosition() // fix Type instantiation is excessively deep and possibly infinite.
680
+ : props === null || props === void 0 ? void 0 : props.socketPositionWatcher;
681
+ var _a = (props === null || props === void 0 ? void 0 : props.customize) || {}, node = _a.node, connection = _a.connection, socket = _a.socket, control = _a.control;
682
+ return {
683
+ attach: function (plugin) {
684
+ positionWatcher.attach(plugin);
685
+ },
686
+ update: function (context) {
687
+ var data = context.data.payload;
688
+ if (context.data.type === 'connection') {
689
+ var _a = context.data, start = _a.start, end = _a.end;
690
+ return Object.assign(Object.assign({ data: data }, (start ? { start: start } : {})), (end ? { end: end } : {}));
691
+ }
692
+ return { data: data };
693
+ },
694
+ mount: function (context, plugin) {
695
+ var _this = this;
696
+ var parent = plugin.parentScope();
697
+ var emit = parent.emit.bind(parent);
698
+ var rendered = function () {
699
+ emit({ type: 'rendered', data: context.data });
700
+ };
701
+ if (context.data.type === 'node') {
702
+ var component = node ? node(context.data) : NodeComponent;
703
+ return {
704
+ key: "node-" + context.data.payload.id,
705
+ component: component,
706
+ props: {
707
+ data: context.data.payload,
708
+ emit: emit,
709
+ rendered: rendered
710
+ }
711
+ };
712
+ }
713
+ if (context.data.type === 'connection') {
714
+ var component = connection ? connection(context.data) : ConnectionComponent;
715
+ var id = context.data.payload.id;
716
+ var _a = context.data.payload, sourceOutput_1 = _a.sourceOutput, targetInput_1 = _a.targetInput, source_1 = _a.source, target_1 = _a.target;
717
+ var _b = context.data, start = _b.start, end = _b.end, payload_1 = _b.payload;
718
+ return {
719
+ key: "connection-" + id,
720
+ component: ConnectionWrapperComponent,
721
+ props: {
722
+ connectionComponent: component,
723
+ data: payload_1,
724
+ start: start || (function (change) { return positionWatcher.listen(source_1, 'output', sourceOutput_1, change); }),
725
+ end: end || (function (change) { return positionWatcher.listen(target_1, 'input', targetInput_1, change); }),
726
+ path: function (start, end) { return __awaiter(_this, void 0, void 0, function () {
727
+ var response, _a, path, points, curvature;
728
+ return __generator(this, function (_b) {
729
+ switch (_b.label) {
730
+ case 0: return [4 /*yield*/, plugin.emit({ type: 'connectionpath', data: { payload: payload_1, points: [start, end] } })];
731
+ case 1:
732
+ response = _b.sent();
733
+ if (!response)
734
+ return [2 /*return*/, ''];
735
+ _a = response.data, path = _a.path, points = _a.points;
736
+ curvature = 0.3;
737
+ if (!path && points.length !== 2)
738
+ throw new Error('cannot render connection with a custom number of points');
739
+ if (!path)
740
+ return [2 /*return*/, payload_1.isLoop
741
+ ? reteRenderUtils.loopConnectionPath(points, curvature, 120)
742
+ : reteRenderUtils.classicConnectionPath(points, curvature)];
743
+ return [2 /*return*/, path];
744
+ }
745
+ });
746
+ }); },
747
+ rendered: rendered
748
+ }
749
+ };
750
+ }
751
+ if (context.data.type === 'socket') {
752
+ var component = socket ? socket(context.data) : SocketComponent;
753
+ return {
754
+ key: "socket-" + rete.getUID(),
755
+ component: component,
756
+ props: {
757
+ data: context.data.payload,
758
+ rendered: rendered
759
+ }
760
+ };
761
+ }
762
+ if (context.data.type === 'control') {
763
+ var component = control
764
+ ? control(context.data)
765
+ : (context.data.payload instanceof rete.ClassicPreset.InputControl
766
+ ? ControlComponent
767
+ : null);
768
+ if (component) {
769
+ return {
770
+ key: "control-" + context.data.payload.id,
771
+ component: component,
772
+ props: {
773
+ data: context.data.payload,
774
+ rendered: rendered
775
+ }
776
+ };
777
+ }
778
+ return;
779
+ }
780
+ return;
781
+ }
782
+ };
783
+ }
784
+
785
+ var index$4 = /*#__PURE__*/Object.freeze({
786
+ __proto__: null,
787
+ setup: setup$3
788
+ });
789
+
790
+ function debounce(cb) {
791
+ return {
792
+ timeout: null,
793
+ cancel: function () {
794
+ if (this.timeout) {
795
+ window.clearTimeout(this.timeout);
796
+ this.timeout = null;
797
+ }
798
+ },
799
+ call: function (delay) {
800
+ this.timeout = window.setTimeout(function () {
801
+ cb();
802
+ }, delay);
803
+ }
804
+ };
805
+ }
806
+
807
+ var ContextMenuComponent = /** @class */ (function () {
808
+ function ContextMenuComponent(cdr) {
809
+ var _this = this;
810
+ this.cdr = cdr;
811
+ this.filter = '';
812
+ this.hide = debounce(function () {
813
+ _this.onHide();
814
+ _this.cdr.detectChanges();
815
+ });
816
+ this.customAttribute = '';
817
+ this.cdr.detach();
818
+ }
819
+ ContextMenuComponent.prototype.pointerover = function () {
820
+ this.hide.cancel();
821
+ this.cdr.detectChanges();
822
+ };
823
+ ContextMenuComponent.prototype.pointerleave = function () {
824
+ this.hide.call(this.delay);
825
+ this.cdr.detectChanges();
826
+ };
827
+ ContextMenuComponent.prototype.ngOnChanges = function () {
828
+ var _this = this;
829
+ this.cdr.detectChanges();
830
+ requestAnimationFrame(function () { return _this.rendered(); });
831
+ };
832
+ ContextMenuComponent.prototype.setFilter = function (value) {
833
+ this.filter = value;
834
+ this.cdr.detectChanges();
835
+ };
836
+ ContextMenuComponent.prototype.getItems = function () {
837
+ var filterRegexp = new RegExp(this.filter, 'i');
838
+ var filteredList = this.items.filter(function (item) { return (item.label.match(filterRegexp)); });
839
+ return filteredList;
840
+ };
841
+ ContextMenuComponent.prototype.ngOnDestroy = function () {
842
+ if (this.hide)
843
+ this.hide.cancel();
844
+ };
845
+ return ContextMenuComponent;
846
+ }());
847
+ ContextMenuComponent.decorators = [
848
+ { type: core.Component, args: [{
849
+ template: "<div class=\"block\" *ngIf=\"searchBar\">\n <context-menu-search [value]=\"filter\" (update)=\"setFilter($event)\"></context-menu-search>\n</div>\n\n<context-menu-item *ngFor=\"let item of getItems()\" [delay]=\"delay\" (select)=\"item.handler()\" [subitems]=\"item.subitems\"\n (hide)=\"onHide()\">\n {{ item.label }}\n</context-menu-item>\n",
850
+ host: {
851
+ 'data-testid': 'context-menu'
852
+ },
853
+ styles: [":host{display:block;padding:10px;width:120px;margin-top:-20px;margin-left:-60px}\n", ".block{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:first-child{border-top-left-radius:5px;border-top-right-radius:5px}.block:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}.block:hover{background-color:#8299ffcc}\n"]
854
+ },] }
855
+ ];
856
+ ContextMenuComponent.ctorParameters = function () { return [
857
+ { type: core.ChangeDetectorRef }
858
+ ]; };
859
+ ContextMenuComponent.propDecorators = {
860
+ items: [{ type: core.Input }],
861
+ delay: [{ type: core.Input }],
862
+ searchBar: [{ type: core.Input }],
863
+ onHide: [{ type: core.Input }],
864
+ rendered: [{ type: core.Input }],
865
+ customAttribute: [{ type: core.HostBinding, args: ['attr.rete-context-menu',] }],
866
+ pointerover: [{ type: core.HostListener, args: ['mouseover',] }],
867
+ pointerleave: [{ type: core.HostListener, args: ['mouseleave',] }]
868
+ };
869
+
870
+ function setup$2(props) {
871
+ var delay = typeof (props === null || props === void 0 ? void 0 : props.delay) === 'undefined' ? 1000 : props.delay;
872
+ return {
873
+ update: function (context) {
874
+ if (context.data.type === 'contextmenu') {
875
+ return {
876
+ items: context.data.items,
877
+ delay: delay,
878
+ searchBar: context.data.searchBar,
879
+ onHide: context.data.onHide
880
+ };
881
+ }
882
+ },
883
+ mount: function (context, plugin) {
884
+ var parent = plugin.parentScope();
885
+ var emit = parent.emit.bind(parent);
886
+ var rendered = function () {
887
+ emit({ type: 'rendered', data: context.data });
888
+ };
889
+ if (context.data.type === 'contextmenu') {
890
+ return {
891
+ key: 'context-menu',
892
+ component: ContextMenuComponent,
893
+ props: {
894
+ items: context.data.items,
895
+ delay: delay,
896
+ searchBar: context.data.searchBar,
897
+ onHide: context.data.onHide,
898
+ rendered: rendered
899
+ }
900
+ };
901
+ }
902
+ return null;
903
+ }
904
+ };
905
+ }
906
+
907
+ var index$3 = /*#__PURE__*/Object.freeze({
908
+ __proto__: null,
909
+ setup: setup$2
910
+ });
911
+
912
+ var MinimapComponent = /** @class */ (function () {
913
+ function MinimapComponent(el, cdr) {
914
+ this.el = el;
915
+ this.cdr = cdr;
916
+ this.cdr.detach();
917
+ }
918
+ Object.defineProperty(MinimapComponent.prototype, "width", {
919
+ get: function () {
920
+ return this.px(this.size * this.ratio);
921
+ },
922
+ enumerable: false,
923
+ configurable: true
924
+ });
925
+ Object.defineProperty(MinimapComponent.prototype, "height", {
926
+ get: function () {
927
+ return this.px(this.size);
928
+ },
929
+ enumerable: false,
930
+ configurable: true
931
+ });
932
+ MinimapComponent.prototype.pointerdown = function (event) {
933
+ event.stopPropagation();
934
+ event.preventDefault();
935
+ };
936
+ MinimapComponent.prototype.dblclick = function (event) {
937
+ event.stopPropagation();
938
+ event.preventDefault();
939
+ if (!this.el.nativeElement)
940
+ return;
941
+ var box = this.el.nativeElement.getBoundingClientRect();
942
+ var x = (event.clientX - box.left) / (this.size * this.ratio);
943
+ var y = (event.clientY - box.top) / (this.size * this.ratio);
944
+ this.point(x, y);
945
+ };
946
+ MinimapComponent.prototype.ngOnChanges = function () {
947
+ var _this = this;
948
+ this.cdr.detectChanges();
949
+ requestAnimationFrame(function () { return _this.rendered(); });
950
+ };
951
+ MinimapComponent.prototype.px = function (value) {
952
+ return value + "px";
953
+ };
954
+ MinimapComponent.prototype.scale = function (value) {
955
+ if (!this.el.nativeElement)
956
+ return 0;
957
+ return value * this.el.nativeElement.clientWidth;
958
+ };
959
+ MinimapComponent.prototype.identifyMiniNode = function (_, item) {
960
+ return [item.top, item.left].join('_');
961
+ };
962
+ return MinimapComponent;
963
+ }());
964
+ MinimapComponent.decorators = [
965
+ { type: core.Component, args: [{
966
+ template: "<minimap-mini-node *ngFor=\"let node of nodes; trackBy: identifyMiniNode\" [left]=\"scale(node.left)\"\n [top]=\"scale(node.top)\" [width]=\"scale(node.width)\" [height]=\"scale(node.height)\">\n\n</minimap-mini-node>\n<minimap-mini-viewport [left]=\"viewport.left\" [top]=\"viewport.top\" [width]=\"viewport.width\" [height]=\"viewport.height\"\n [containerWidth]=\"el.nativeElement?.clientWidth\" [translate]=\"translate\"></minimap-mini-viewport>\n",
967
+ host: {
968
+ 'data-testid': 'minimap'
969
+ },
970
+ styles: [":host{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}\n"]
971
+ },] }
972
+ ];
973
+ MinimapComponent.ctorParameters = function () { return [
974
+ { type: core.ElementRef },
975
+ { type: core.ChangeDetectorRef }
976
+ ]; };
977
+ MinimapComponent.propDecorators = {
978
+ rendered: [{ type: core.Input }],
979
+ size: [{ type: core.Input }],
980
+ ratio: [{ type: core.Input }],
981
+ nodes: [{ type: core.Input }],
982
+ viewport: [{ type: core.Input }],
983
+ translate: [{ type: core.Input }],
984
+ point: [{ type: core.Input }],
985
+ width: [{ type: core.HostBinding, args: ['style.width',] }],
986
+ height: [{ type: core.HostBinding, args: ['style.height',] }],
987
+ pointerdown: [{ type: core.HostListener, args: ['pointerdown', ['$event'],] }],
988
+ dblclick: [{ type: core.HostListener, args: ['dblclick', ['$event'],] }]
989
+ };
990
+
991
+ function setup$1(props) {
992
+ return {
993
+ update: function (context) {
994
+ if (context.data.type === 'minimap') {
995
+ return {
996
+ nodes: context.data.nodes,
997
+ size: (props === null || props === void 0 ? void 0 : props.size) || 200,
998
+ ratio: context.data.ratio,
999
+ viewport: context.data.viewport,
1000
+ translate: context.data.translate,
1001
+ point: context.data.point
1002
+ };
1003
+ }
1004
+ return null;
1005
+ },
1006
+ mount: function (context, plugin) {
1007
+ var parent = plugin.parentScope();
1008
+ var emit = parent.emit.bind(parent);
1009
+ var rendered = function () {
1010
+ emit({ type: 'rendered', data: context.data });
1011
+ };
1012
+ if (context.data.type === 'minimap') {
1013
+ return {
1014
+ key: 'rete-minimap',
1015
+ component: MinimapComponent,
1016
+ props: {
1017
+ nodes: context.data.nodes,
1018
+ size: (props === null || props === void 0 ? void 0 : props.size) || 200,
1019
+ ratio: context.data.ratio,
1020
+ viewport: context.data.viewport,
1021
+ translate: context.data.translate,
1022
+ point: context.data.point,
1023
+ rendered: rendered
1024
+ }
1025
+ };
1026
+ }
1027
+ return null;
1028
+ }
1029
+ };
1030
+ }
1031
+
1032
+ var index$2 = /*#__PURE__*/Object.freeze({
1033
+ __proto__: null,
1034
+ setup: setup$1
1035
+ });
1036
+
1037
+ var PinsComponent = /** @class */ (function () {
1038
+ function PinsComponent(cdr) {
1039
+ this.cdr = cdr;
1040
+ this.cdr.detach();
1041
+ }
1042
+ PinsComponent.prototype.ngOnChanges = function () {
1043
+ var _this = this;
1044
+ this.cdr.detectChanges();
1045
+ requestAnimationFrame(function () { return _this.rendered(); });
1046
+ };
1047
+ PinsComponent.prototype.track = function (_, item) {
1048
+ return item.id;
1049
+ };
1050
+ return PinsComponent;
1051
+ }());
1052
+ PinsComponent.decorators = [
1053
+ { type: core.Component, args: [{
1054
+ template: "<reroute-pin *ngFor=\"let pin of pins; trackBy: track\" [position]=\"pin.position\" [selected]=\"pin.selected\"\n (menu)=\"menu && menu(pin.id)\" (translate)=\"translate && translate(pin.id, $event.dx, $event.dy)\"\n (down)=\"down && down(pin.id)\" [getPointer]=\"getPointer\"></reroute-pin>\n"
1055
+ },] }
1056
+ ];
1057
+ PinsComponent.ctorParameters = function () { return [
1058
+ { type: core.ChangeDetectorRef }
1059
+ ]; };
1060
+ PinsComponent.propDecorators = {
1061
+ rendered: [{ type: core.Input }],
1062
+ pins: [{ type: core.Input }],
1063
+ down: [{ type: core.Input }],
1064
+ translate: [{ type: core.Input }],
1065
+ menu: [{ type: core.Input }],
1066
+ getPointer: [{ type: core.Input }]
1067
+ };
1068
+
1069
+ function setup(props) {
1070
+ var getProps = function () { return ({
1071
+ menu: (props === null || props === void 0 ? void 0 : props.contextMenu) || (function () { return null; }),
1072
+ translate: (props === null || props === void 0 ? void 0 : props.translate) || (function () { return null; }),
1073
+ down: (props === null || props === void 0 ? void 0 : props.pointerdown) || (function () { return null; })
1074
+ }); };
1075
+ return {
1076
+ update: function (context) {
1077
+ if (context.data.type === 'reroute-pins') {
1078
+ return Object.assign(Object.assign({}, getProps()), { pins: context.data.data.pins });
1079
+ }
1080
+ return null;
1081
+ },
1082
+ mount: function (context, plugin) {
1083
+ var area = plugin.parentScope(reteAreaPlugin.BaseAreaPlugin);
1084
+ var rendered = function () {
1085
+ area.emit({ type: 'rendered', data: context.data });
1086
+ };
1087
+ if (context.data.type === 'reroute-pins') {
1088
+ return {
1089
+ key: 'rete-reroute',
1090
+ component: PinsComponent,
1091
+ props: Object.assign(Object.assign({}, getProps()), { pins: context.data.data.pins, rendered: rendered, getPointer: function () { return area.area.pointer; } })
1092
+ };
1093
+ }
1094
+ return null;
1095
+ }
1096
+ };
1097
+ }
1098
+
1099
+ var index$1 = /*#__PURE__*/Object.freeze({
1100
+ __proto__: null,
1101
+ setup: setup
1102
+ });
1103
+
1104
+ var index = /*#__PURE__*/Object.freeze({
1105
+ __proto__: null,
1106
+ classic: index$4,
1107
+ contextMenu: index$3,
1108
+ minimap: index$2,
1109
+ reroute: index$1
1110
+ });
1111
+
1112
+ var ReteModule = /** @class */ (function () {
1113
+ function ReteModule() {
1114
+ }
1115
+ return ReteModule;
1116
+ }());
1117
+ ReteModule.decorators = [
1118
+ { type: core.NgModule, args: [{
1119
+ declarations: [
1120
+ RefDirective,
1121
+ NodeComponent,
1122
+ ConnectionComponent,
1123
+ ConnectionWrapperComponent,
1124
+ SocketComponent,
1125
+ ControlComponent
1126
+ ],
1127
+ imports: [
1128
+ common.CommonModule
1129
+ ],
1130
+ exports: [
1131
+ RefDirective,
1132
+ NodeComponent,
1133
+ ConnectionComponent,
1134
+ ConnectionWrapperComponent,
1135
+ SocketComponent,
1136
+ ControlComponent
1137
+ ],
1138
+ entryComponents: [
1139
+ NodeComponent,
1140
+ ConnectionComponent,
1141
+ ConnectionWrapperComponent,
1142
+ SocketComponent,
1143
+ ControlComponent
1144
+ ]
1145
+ },] }
1146
+ ];
1147
+
1148
+ var ContextMenuSearchComponent = /** @class */ (function () {
1149
+ function ContextMenuSearchComponent() {
1150
+ this.update = new core.EventEmitter();
1151
+ }
1152
+ return ContextMenuSearchComponent;
1153
+ }());
1154
+ ContextMenuSearchComponent.decorators = [
1155
+ { type: core.Component, args: [{
1156
+ selector: 'context-menu-search',
1157
+ template: "<input class=\"search\" [value]=\"value\" (input)=\"update.emit($any($event.target)?.value || '')\"\n data-testid=\"context-menu-search-input\" />\n",
1158
+ styles: [".search{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}\n"]
1159
+ },] }
1160
+ ];
1161
+ ContextMenuSearchComponent.propDecorators = {
1162
+ value: [{ type: core.Input }],
1163
+ update: [{ type: core.Output }]
1164
+ };
1165
+
1166
+ var ContextMenuItemComponent = /** @class */ (function () {
1167
+ function ContextMenuItemComponent(cdr) {
1168
+ var _this = this;
1169
+ this.cdr = cdr;
1170
+ this.select = new core.EventEmitter();
1171
+ this.hide = new core.EventEmitter();
1172
+ this.hideSubitems = debounce(function () {
1173
+ _this.visibleSubitems = false;
1174
+ _this.cdr.detectChanges();
1175
+ });
1176
+ this.visibleSubitems = false;
1177
+ this.cdr.detach();
1178
+ }
1179
+ Object.defineProperty(ContextMenuItemComponent.prototype, "block", {
1180
+ get: function () { return true; },
1181
+ enumerable: false,
1182
+ configurable: true
1183
+ });
1184
+ Object.defineProperty(ContextMenuItemComponent.prototype, "hasSubitems", {
1185
+ get: function () { return this.subitems; },
1186
+ enumerable: false,
1187
+ configurable: true
1188
+ });
1189
+ ContextMenuItemComponent.prototype.click = function (event) {
1190
+ event.stopPropagation();
1191
+ this.select.emit();
1192
+ this.hide.emit();
1193
+ };
1194
+ ContextMenuItemComponent.prototype.pointerdown = function (event) {
1195
+ event.stopPropagation();
1196
+ };
1197
+ ContextMenuItemComponent.prototype.wheel = function (event) {
1198
+ event.stopPropagation();
1199
+ };
1200
+ ContextMenuItemComponent.prototype.pointerover = function () {
1201
+ this.hideSubitems.cancel();
1202
+ this.visibleSubitems = true;
1203
+ this.cdr.detectChanges();
1204
+ };
1205
+ ContextMenuItemComponent.prototype.pointerleave = function () {
1206
+ this.hideSubitems.call(this.delay);
1207
+ this.cdr.detectChanges();
1208
+ };
1209
+ return ContextMenuItemComponent;
1210
+ }());
1211
+ ContextMenuItemComponent.decorators = [
1212
+ { type: core.Component, args: [{
1213
+ selector: 'context-menu-item',
1214
+ template: "<ng-content></ng-content>\n<div class=\"subitems\" *ngIf=\"subitems && visibleSubitems\">\n <context-menu-item *ngFor=\"let item of subitems\" [delay]=\"delay\" (select)=\"item.handler()\" (hide)=\"hide.emit()\">\n {{ item.label }}\n </context-menu-item>\n</div>\n",
1215
+ host: {
1216
+ 'data-testid': 'context-menu-item'
1217
+ },
1218
+ styles: ["@charset \"UTF-8\";:host(.hasSubitems):after{content:\"\\25ba\";position:absolute;opacity:.6;right:5px;top:5px;font-family:initial}.subitems{position:absolute;top:0;left:100%;width:120px}\n", ".block{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:first-child{border-top-left-radius:5px;border-top-right-radius:5px}.block:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}.block:hover{background-color:#8299ffcc}\n"]
1219
+ },] }
1220
+ ];
1221
+ ContextMenuItemComponent.ctorParameters = function () { return [
1222
+ { type: core.ChangeDetectorRef }
1223
+ ]; };
1224
+ ContextMenuItemComponent.propDecorators = {
1225
+ subitems: [{ type: core.Input }],
1226
+ delay: [{ type: core.Input }],
1227
+ select: [{ type: core.Output }],
1228
+ hide: [{ type: core.Output }],
1229
+ block: [{ type: core.HostBinding, args: ['class.block',] }],
1230
+ hasSubitems: [{ type: core.HostBinding, args: ['class.hasSubitems',] }],
1231
+ click: [{ type: core.HostListener, args: ['click', ['$event'],] }],
1232
+ pointerdown: [{ type: core.HostListener, args: ['pointerdown', ['$event'],] }],
1233
+ wheel: [{ type: core.HostListener, args: ['wheel', ['$event'],] }],
1234
+ pointerover: [{ type: core.HostListener, args: ['pointerover',] }],
1235
+ pointerleave: [{ type: core.HostListener, args: ['pointerleave',] }]
1236
+ };
1237
+
1238
+ var ReteContextMenuModule = /** @class */ (function () {
1239
+ function ReteContextMenuModule() {
1240
+ }
1241
+ return ReteContextMenuModule;
1242
+ }());
1243
+ ReteContextMenuModule.decorators = [
1244
+ { type: core.NgModule, args: [{
1245
+ declarations: [
1246
+ ContextMenuComponent,
1247
+ ContextMenuSearchComponent,
1248
+ ContextMenuItemComponent
1249
+ ],
1250
+ imports: [
1251
+ common.CommonModule
1252
+ ],
1253
+ exports: [
1254
+ ContextMenuComponent,
1255
+ ContextMenuSearchComponent,
1256
+ ContextMenuItemComponent,
1257
+ ],
1258
+ entryComponents: [
1259
+ ContextMenuComponent
1260
+ ]
1261
+ },] }
1262
+ ];
1263
+
1264
+ function useDrag(translate, getPointer) {
1265
+ return {
1266
+ start: function (e) {
1267
+ var previous = Object.assign({}, getPointer(e));
1268
+ function move(moveEvent) {
1269
+ var current = Object.assign({}, getPointer(moveEvent));
1270
+ var dx = current.x - previous.x;
1271
+ var dy = current.y - previous.y;
1272
+ previous = current;
1273
+ translate(dx, dy);
1274
+ }
1275
+ function up() {
1276
+ window.removeEventListener('pointermove', move);
1277
+ window.removeEventListener('pointerup', up);
1278
+ window.removeEventListener('pointercancel', up);
1279
+ }
1280
+ window.addEventListener('pointermove', move);
1281
+ window.addEventListener('pointerup', up);
1282
+ window.addEventListener('pointercancel', up);
1283
+ }
1284
+ };
1285
+ }
1286
+
1287
+ var MiniViewportComponent = /** @class */ (function () {
1288
+ function MiniViewportComponent() {
1289
+ var _this = this;
1290
+ this.drag = useDrag(function (dx, dy) { return _this.onDrag(dx, dy); }, function (e) { return ({ x: e.pageX, y: e.pageY }); });
1291
+ }
1292
+ Object.defineProperty(MiniViewportComponent.prototype, "styleLeft", {
1293
+ get: function () {
1294
+ return this.px(this.scale(this.left));
1295
+ },
1296
+ enumerable: false,
1297
+ configurable: true
1298
+ });
1299
+ Object.defineProperty(MiniViewportComponent.prototype, "styleTop", {
1300
+ get: function () {
1301
+ return this.px(this.scale(this.top));
1302
+ },
1303
+ enumerable: false,
1304
+ configurable: true
1305
+ });
1306
+ Object.defineProperty(MiniViewportComponent.prototype, "styleWidth", {
1307
+ get: function () {
1308
+ return this.px(this.scale(this.width));
1309
+ },
1310
+ enumerable: false,
1311
+ configurable: true
1312
+ });
1313
+ Object.defineProperty(MiniViewportComponent.prototype, "styleHeight", {
1314
+ get: function () {
1315
+ return this.px(this.scale(this.height));
1316
+ },
1317
+ enumerable: false,
1318
+ configurable: true
1319
+ });
1320
+ MiniViewportComponent.prototype.pointerdown = function (event) {
1321
+ event.stopPropagation();
1322
+ this.drag.start(event);
1323
+ };
1324
+ MiniViewportComponent.prototype.px = function (value) {
1325
+ return value + "px";
1326
+ };
1327
+ MiniViewportComponent.prototype.scale = function (v) {
1328
+ return v * this.containerWidth;
1329
+ };
1330
+ MiniViewportComponent.prototype.invert = function (v) {
1331
+ return v / this.containerWidth;
1332
+ };
1333
+ MiniViewportComponent.prototype.onDrag = function (dx, dy) {
1334
+ this.translate(this.invert(-dx), this.invert(-dy));
1335
+ };
1336
+ return MiniViewportComponent;
1337
+ }());
1338
+ MiniViewportComponent.decorators = [
1339
+ { type: core.Component, args: [{
1340
+ selector: 'minimap-mini-viewport',
1341
+ template: "",
1342
+ host: {
1343
+ 'data-testid': 'minimap-viewport'
1344
+ },
1345
+ styles: [":host{display:block;position:absolute;background:rgba(255,251,128,.32);border:1px solid #ffe52b}\n"]
1346
+ },] }
1347
+ ];
1348
+ MiniViewportComponent.propDecorators = {
1349
+ left: [{ type: core.Input }],
1350
+ top: [{ type: core.Input }],
1351
+ width: [{ type: core.Input }],
1352
+ height: [{ type: core.Input }],
1353
+ containerWidth: [{ type: core.Input }],
1354
+ translate: [{ type: core.Input }],
1355
+ styleLeft: [{ type: core.HostBinding, args: ['style.left',] }],
1356
+ styleTop: [{ type: core.HostBinding, args: ['style.top',] }],
1357
+ styleWidth: [{ type: core.HostBinding, args: ['style.width',] }],
1358
+ styleHeight: [{ type: core.HostBinding, args: ['style.height',] }],
1359
+ pointerdown: [{ type: core.HostListener, args: ['pointerdown', ['$event'],] }]
1360
+ };
1361
+
1362
+ var MiniNodeComponent = /** @class */ (function () {
1363
+ function MiniNodeComponent() {
1364
+ }
1365
+ Object.defineProperty(MiniNodeComponent.prototype, "styleLeft", {
1366
+ get: function () {
1367
+ return this.px(this.left);
1368
+ },
1369
+ enumerable: false,
1370
+ configurable: true
1371
+ });
1372
+ Object.defineProperty(MiniNodeComponent.prototype, "styleTop", {
1373
+ get: function () {
1374
+ return this.px(this.top);
1375
+ },
1376
+ enumerable: false,
1377
+ configurable: true
1378
+ });
1379
+ Object.defineProperty(MiniNodeComponent.prototype, "styleWidth", {
1380
+ get: function () {
1381
+ return this.px(this.width);
1382
+ },
1383
+ enumerable: false,
1384
+ configurable: true
1385
+ });
1386
+ Object.defineProperty(MiniNodeComponent.prototype, "styleHeight", {
1387
+ get: function () {
1388
+ return this.px(this.height);
1389
+ },
1390
+ enumerable: false,
1391
+ configurable: true
1392
+ });
1393
+ MiniNodeComponent.prototype.px = function (value) {
1394
+ return value + "px";
1395
+ };
1396
+ return MiniNodeComponent;
1397
+ }());
1398
+ MiniNodeComponent.decorators = [
1399
+ { type: core.Component, args: [{
1400
+ selector: 'minimap-mini-node',
1401
+ template: "",
1402
+ host: {
1403
+ 'data-testid': 'minimap-node'
1404
+ },
1405
+ styles: [":host{display:block;position:absolute;background:rgba(110,136,255,.8);border:1px solid rgba(192,206,212,.6)}\n"]
1406
+ },] }
1407
+ ];
1408
+ MiniNodeComponent.propDecorators = {
1409
+ left: [{ type: core.Input }],
1410
+ top: [{ type: core.Input }],
1411
+ width: [{ type: core.Input }],
1412
+ height: [{ type: core.Input }],
1413
+ styleLeft: [{ type: core.HostBinding, args: ['style.left',] }],
1414
+ styleTop: [{ type: core.HostBinding, args: ['style.top',] }],
1415
+ styleWidth: [{ type: core.HostBinding, args: ['style.width',] }],
1416
+ styleHeight: [{ type: core.HostBinding, args: ['style.height',] }]
1417
+ };
1418
+
1419
+ var ReteMinimapModule = /** @class */ (function () {
1420
+ function ReteMinimapModule() {
1421
+ }
1422
+ return ReteMinimapModule;
1423
+ }());
1424
+ ReteMinimapModule.decorators = [
1425
+ { type: core.NgModule, args: [{
1426
+ declarations: [
1427
+ MinimapComponent,
1428
+ MiniViewportComponent,
1429
+ MiniNodeComponent
1430
+ ],
1431
+ imports: [
1432
+ common.CommonModule
1433
+ ],
1434
+ exports: [
1435
+ MinimapComponent,
1436
+ MiniViewportComponent,
1437
+ MiniNodeComponent
1438
+ ],
1439
+ entryComponents: [
1440
+ MinimapComponent
1441
+ ]
1442
+ },] }
1443
+ ];
1444
+
1445
+ var pinSize = 20;
1446
+ var PinComponent = /** @class */ (function () {
1447
+ function PinComponent(cdr) {
1448
+ var _this = this;
1449
+ this.cdr = cdr;
1450
+ this.menu = new core.EventEmitter();
1451
+ this.translate = new core.EventEmitter();
1452
+ this.down = new core.EventEmitter();
1453
+ this.drag = useDrag(function (dx, dy) {
1454
+ _this.translate.emit({ dx: dx, dy: dy });
1455
+ }, function () { return _this.getPointer(); });
1456
+ // this.cdr.detach()
1457
+ }
1458
+ Object.defineProperty(PinComponent.prototype, "_selected", {
1459
+ get: function () {
1460
+ return this.selected;
1461
+ },
1462
+ enumerable: false,
1463
+ configurable: true
1464
+ });
1465
+ Object.defineProperty(PinComponent.prototype, "top", {
1466
+ get: function () {
1467
+ return this.position.y - pinSize / 2 + "px";
1468
+ },
1469
+ enumerable: false,
1470
+ configurable: true
1471
+ });
1472
+ Object.defineProperty(PinComponent.prototype, "left", {
1473
+ get: function () {
1474
+ return this.position.x - pinSize / 2 + "px";
1475
+ },
1476
+ enumerable: false,
1477
+ configurable: true
1478
+ });
1479
+ PinComponent.prototype.pointerdown = function (event) {
1480
+ event.stopPropagation();
1481
+ event.preventDefault();
1482
+ this.drag.start(event);
1483
+ this.down.emit();
1484
+ };
1485
+ PinComponent.prototype.contextmenu = function (event) {
1486
+ event.stopPropagation();
1487
+ event.preventDefault();
1488
+ this.menu.emit();
1489
+ };
1490
+ PinComponent.prototype.ngOnChanges = function () {
1491
+ // this.cdr.detectChanges()
1492
+ // requestAnimationFrame(() => this.rendered())
1493
+ };
1494
+ return PinComponent;
1495
+ }());
1496
+ PinComponent.decorators = [
1497
+ { type: core.Component, args: [{
1498
+ selector: 'reroute-pin',
1499
+ template: '',
1500
+ host: {
1501
+ 'data-testid': 'pin'
1502
+ },
1503
+ styles: [":host{display:block;width:20px;height:20px;box-sizing:border-box;background:steelblue;border:2px solid white;border-radius:20px;position:absolute}:host.selected{background:#ffd92c}\n"]
1504
+ },] }
1505
+ ];
1506
+ PinComponent.ctorParameters = function () { return [
1507
+ { type: core.ChangeDetectorRef }
1508
+ ]; };
1509
+ PinComponent.propDecorators = {
1510
+ position: [{ type: core.Input }],
1511
+ selected: [{ type: core.Input }],
1512
+ getPointer: [{ type: core.Input }],
1513
+ menu: [{ type: core.Output }],
1514
+ translate: [{ type: core.Output }],
1515
+ down: [{ type: core.Output }],
1516
+ _selected: [{ type: core.HostBinding, args: ['class.selected',] }],
1517
+ top: [{ type: core.HostBinding, args: ['style.top',] }],
1518
+ left: [{ type: core.HostBinding, args: ['style.left',] }],
1519
+ pointerdown: [{ type: core.HostListener, args: ['pointerdown', ['$event'],] }],
1520
+ contextmenu: [{ type: core.HostListener, args: ['contextmenu', ['$event'],] }]
1521
+ };
1522
+
1523
+ var ReteRerouteModule = /** @class */ (function () {
1524
+ function ReteRerouteModule() {
1525
+ }
1526
+ return ReteRerouteModule;
1527
+ }());
1528
+ ReteRerouteModule.decorators = [
1529
+ { type: core.NgModule, args: [{
1530
+ declarations: [
1531
+ PinsComponent,
1532
+ PinComponent,
1533
+ ],
1534
+ imports: [
1535
+ common.CommonModule
1536
+ ],
1537
+ exports: [
1538
+ PinsComponent,
1539
+ PinComponent,
1540
+ ],
1541
+ entryComponents: [
1542
+ PinsComponent
1543
+ ]
1544
+ },] }
1545
+ ];
1546
+
1547
+ function getRenderer() {
1548
+ var elements$1 = new WeakMap();
1549
+ return {
1550
+ get: function (element) {
1551
+ return elements$1.get(element);
1552
+ },
1553
+ mount: function (element, key, component, injector, props) {
1554
+ // LIMITATION: If an element is remounted with the same identifier, the component cannot be replaced
1555
+ var exists = customElements.get(key);
1556
+ if (!exists) {
1557
+ customElements.define(key, elements.createCustomElement(component, { injector: injector }));
1558
+ }
1559
+ var ngElement = document.createElement(key);
1560
+ Object.keys(props).forEach(function (key) {
1561
+ ngElement[key] = props[key];
1562
+ });
1563
+ element.appendChild(ngElement);
1564
+ elements$1.set(element, { key: key, ngElement: ngElement });
1565
+ },
1566
+ update: function (_a, props) {
1567
+ var ngElement = _a.ngElement;
1568
+ Object.keys(props).forEach(function (key) {
1569
+ ngElement.ngElementStrategy.setInputValue(key, props[key]);
1570
+ });
1571
+ ngElement.ngElementStrategy.setInputValue('seed', Math.random());
1572
+ },
1573
+ unmount: function (element) {
1574
+ var existing = elements$1.get(element);
1575
+ if (existing) {
1576
+ existing.ngElement.remove();
1577
+ elements$1.delete(element);
1578
+ }
1579
+ }
1580
+ };
1581
+ }
1582
+ var AngularPlugin = /** @class */ (function (_super) {
1583
+ __extends(AngularPlugin, _super);
1584
+ function AngularPlugin(params) {
1585
+ var _this = _super.call(this, 'angular-render') || this;
1586
+ _this.params = params;
1587
+ _this.presets = [];
1588
+ _this.owners = new WeakMap();
1589
+ _this.renderer = getRenderer();
1590
+ _this.addPipe(function (context) {
1591
+ if (!context || typeof context !== 'object' || !('type' in context))
1592
+ return context;
1593
+ if (context.type === 'unmount') {
1594
+ _this.unmount(context.data.element);
1595
+ }
1596
+ else if (context.type === 'render') {
1597
+ if ('filled' in context.data && context.data.filled) {
1598
+ return context;
1599
+ }
1600
+ if (_this.mount(context.data.element, context)) {
1601
+ return Object.assign(Object.assign({}, context), { data: Object.assign(Object.assign({}, context.data), { filled: true }) });
1602
+ }
1603
+ }
1604
+ return context;
1605
+ });
1606
+ return _this;
1607
+ }
1608
+ AngularPlugin.prototype.setParent = function (scope) {
1609
+ var _this = this;
1610
+ _super.prototype.setParent.call(this, scope);
1611
+ this.presets.forEach(function (preset) {
1612
+ if (preset.attach)
1613
+ preset.attach(_this);
1614
+ });
1615
+ };
1616
+ AngularPlugin.prototype.unmount = function (element) {
1617
+ this.owners.delete(element);
1618
+ this.renderer.unmount(element);
1619
+ };
1620
+ AngularPlugin.prototype.mount = function (element, context) {
1621
+ var e_1, _a;
1622
+ var _this = this;
1623
+ var existing = this.renderer.get(element);
1624
+ if (existing) {
1625
+ this.presets.forEach(function (preset) {
1626
+ if (_this.owners.get(element) !== preset)
1627
+ return;
1628
+ var result = preset.update(context, _this);
1629
+ if (result) {
1630
+ _this.renderer.update(existing, result);
1631
+ }
1632
+ });
1633
+ return true;
1634
+ }
1635
+ try {
1636
+ for (var _b = __values(this.presets), _c = _b.next(); !_c.done; _c = _b.next()) {
1637
+ var preset = _c.value;
1638
+ var result = preset.mount(context, this);
1639
+ if (!result)
1640
+ continue;
1641
+ var key = result.key, component = result.component, props = result.props;
1642
+ this.renderer.mount(element, key, component, this.params.injector, props);
1643
+ this.owners.set(element, preset);
1644
+ return true;
1645
+ }
1646
+ }
1647
+ catch (e_1_1) { e_1 = { error: e_1_1 }; }
1648
+ finally {
1649
+ try {
1650
+ if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
1651
+ }
1652
+ finally { if (e_1) throw e_1.error; }
1653
+ }
1654
+ return;
1655
+ };
1656
+ AngularPlugin.prototype.addPreset = function (preset) {
1657
+ var local = preset;
1658
+ if (local.attach)
1659
+ local.attach(this);
1660
+ this.presets.push(local);
1661
+ };
1662
+ return AngularPlugin;
1663
+ }(rete.Scope));
1664
+
1665
+ /**
1666
+ * Generated bundle index. Do not edit.
1667
+ */
1668
+
1669
+ exports.AngularPlugin = AngularPlugin;
1670
+ exports.ConnectionComponent = ConnectionComponent;
1671
+ exports.ConnectionWrapperComponent = ConnectionWrapperComponent;
1672
+ exports.ContextMenuComponent = ContextMenuComponent;
1673
+ exports.ContextMenuItemComponent = ContextMenuItemComponent;
1674
+ exports.ContextMenuSearchComponent = ContextMenuSearchComponent;
1675
+ exports.ControlComponent = ControlComponent;
1676
+ exports.MiniNodeComponent = MiniNodeComponent;
1677
+ exports.MiniViewportComponent = MiniViewportComponent;
1678
+ exports.MinimapComponent = MinimapComponent;
1679
+ exports.NodeComponent = NodeComponent;
1680
+ exports.PinComponent = PinComponent;
1681
+ exports.PinsComponent = PinsComponent;
1682
+ exports.Presets = index;
1683
+ exports.RefDirective = RefDirective;
1684
+ exports.ReteContextMenuModule = ReteContextMenuModule;
1685
+ exports.ReteMinimapModule = ReteMinimapModule;
1686
+ exports.ReteModule = ReteModule;
1687
+ exports.ReteRerouteModule = ReteRerouteModule;
1688
+ exports.SocketComponent = SocketComponent;
1689
+ exports["ɵa"] = RefDirective;
1690
+ exports["ɵb"] = NodeComponent;
1691
+ exports["ɵc"] = ConnectionComponent;
1692
+ exports["ɵd"] = ConnectionWrapperComponent;
1693
+ exports["ɵe"] = SocketComponent;
1694
+ exports["ɵf"] = ControlComponent;
1695
+ exports["ɵg"] = ContextMenuComponent;
1696
+ exports["ɵh"] = ContextMenuSearchComponent;
1697
+ exports["ɵi"] = ContextMenuItemComponent;
1698
+ exports["ɵj"] = MinimapComponent;
1699
+ exports["ɵk"] = MiniViewportComponent;
1700
+ exports["ɵl"] = MiniNodeComponent;
1701
+ exports["ɵm"] = PinsComponent;
1702
+ exports["ɵn"] = PinComponent;
1703
+
1704
+ Object.defineProperty(exports, '__esModule', { value: true });
1705
+
1706
+ }));
1707
+ //# sourceMappingURL=rete-angular-plugin.umd.js.map