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.
- package/12/bundles/rete-angular-plugin-ng12.umd.js +2197 -0
- package/12/bundles/rete-angular-plugin-ng12.umd.js.map +1 -0
- package/12/core.d.ts +48 -0
- package/12/esm2015/core.js +103 -0
- package/12/esm2015/index.js +11 -0
- package/12/esm2015/module.js +58 -0
- package/12/esm2015/presets/classic/components/connection/connection-wrapper.component.js +84 -0
- package/12/esm2015/presets/classic/components/connection/connection.component.js +32 -0
- package/12/esm2015/presets/classic/components/control/control.component.js +54 -0
- package/12/esm2015/presets/classic/components/index.js +6 -0
- package/12/esm2015/presets/classic/components/node/node.component.js +143 -0
- package/12/esm2015/presets/classic/components/socket/socket.component.js +34 -0
- package/12/esm2015/presets/classic/index.js +108 -0
- package/12/esm2015/presets/classic/types.js +2 -0
- package/12/esm2015/presets/context-menu/components/index.js +4 -0
- package/12/esm2015/presets/context-menu/components/item/item.component.js +116 -0
- package/12/esm2015/presets/context-menu/components/menu/menu.component.js +111 -0
- package/12/esm2015/presets/context-menu/components/search/search.component.js +28 -0
- package/12/esm2015/presets/context-menu/debounce.js +17 -0
- package/12/esm2015/presets/context-menu/index.js +38 -0
- package/12/esm2015/presets/context-menu/module.js +40 -0
- package/12/esm2015/presets/context-menu/types.js +2 -0
- package/12/esm2015/presets/index.js +5 -0
- package/12/esm2015/presets/minimap/components/index.js +4 -0
- package/12/esm2015/presets/minimap/components/mini-node/mini-node.component.js +55 -0
- package/12/esm2015/presets/minimap/components/mini-viewport/mini-viewport.component.js +81 -0
- package/12/esm2015/presets/minimap/components/minimap/minimap.component.js +104 -0
- package/12/esm2015/presets/minimap/index.js +42 -0
- package/12/esm2015/presets/minimap/module.js +40 -0
- package/12/esm2015/presets/minimap/types.js +2 -0
- package/12/esm2015/presets/reroute/components/index.js +3 -0
- package/12/esm2015/presets/reroute/components/pin/pin.component.js +86 -0
- package/12/esm2015/presets/reroute/components/pins/pins.component.js +52 -0
- package/12/esm2015/presets/reroute/index.js +32 -0
- package/12/esm2015/presets/reroute/module.js +35 -0
- package/12/esm2015/presets/reroute/types.js +2 -0
- package/12/esm2015/presets/types.js +2 -0
- package/12/esm2015/rete-angular-plugin-ng12.js +5 -0
- package/12/esm2015/shared/drag.js +23 -0
- package/12/esm2015/types.js +2 -0
- package/12/fesm2015/rete-angular-plugin-ng12.js +1475 -0
- package/12/fesm2015/rete-angular-plugin-ng12.js.map +1 -0
- package/12/index.d.ts +12 -0
- package/12/module.d.ts +12 -0
- package/12/package.json +17 -0
- package/12/presets/classic/components/connection/connection-wrapper.component.d.ts +30 -0
- package/12/presets/classic/components/connection/connection.component.d.ts +11 -0
- package/12/presets/classic/components/control/control.component.d.ts +14 -0
- package/12/presets/classic/components/index.d.ts +5 -0
- package/12/presets/classic/components/node/node.component.d.ts +28 -0
- package/12/presets/classic/components/socket/socket.component.d.ts +12 -0
- package/12/presets/classic/index.d.ts +18 -0
- package/12/presets/classic/types.d.ts +49 -0
- package/12/presets/context-menu/components/index.d.ts +3 -0
- package/12/presets/context-menu/components/item/item.component.d.ts +26 -0
- package/12/presets/context-menu/components/menu/menu.component.d.ts +27 -0
- package/12/presets/context-menu/components/search/search.component.d.ts +8 -0
- package/12/presets/context-menu/debounce.d.ts +5 -0
- package/12/presets/context-menu/index.d.ts +6 -0
- package/12/presets/context-menu/module.d.ts +10 -0
- package/12/presets/context-menu/types.d.ts +12 -0
- package/12/presets/index.d.ts +4 -0
- package/12/presets/minimap/components/index.d.ts +3 -0
- package/12/presets/minimap/components/mini-node/mini-node.component.d.ts +14 -0
- package/12/presets/minimap/components/mini-viewport/mini-viewport.component.d.ts +27 -0
- package/12/presets/minimap/components/minimap/minimap.component.d.ts +25 -0
- package/12/presets/minimap/index.d.ts +6 -0
- package/12/presets/minimap/module.d.ts +10 -0
- package/12/presets/minimap/types.d.ts +22 -0
- package/12/presets/reroute/components/index.d.ts +2 -0
- package/12/presets/reroute/components/pin/pin.component.d.ts +30 -0
- package/12/presets/reroute/components/pins/pins.component.d.ts +17 -0
- package/12/presets/reroute/index.d.ts +10 -0
- package/12/presets/reroute/module.d.ts +9 -0
- package/12/presets/reroute/types.d.ts +18 -0
- package/12/presets/types.d.ts +15 -0
- package/12/rete-angular-plugin-ng12.d.ts +5 -0
- package/12/shared/drag.d.ts +10 -0
- package/12/types.d.ts +29 -0
- package/13/core.d.ts +48 -0
- package/13/esm2020/core.mjs +109 -0
- package/13/esm2020/index.mjs +11 -0
- package/13/esm2020/module.mjs +58 -0
- package/13/esm2020/presets/classic/components/connection/connection-wrapper.component.mjs +79 -0
- package/13/esm2020/presets/classic/components/connection/connection.component.mjs +28 -0
- package/13/esm2020/presets/classic/components/control/control.component.mjs +51 -0
- package/13/esm2020/presets/classic/components/index.mjs +6 -0
- package/13/esm2020/presets/classic/components/node/node.component.mjs +137 -0
- package/13/esm2020/presets/classic/components/socket/socket.component.mjs +31 -0
- package/13/esm2020/presets/classic/index.mjs +111 -0
- package/13/esm2020/presets/classic/types.mjs +2 -0
- package/13/esm2020/presets/context-menu/components/index.mjs +4 -0
- package/13/esm2020/presets/context-menu/components/item/item.component.mjs +111 -0
- package/13/esm2020/presets/context-menu/components/menu/menu.component.mjs +105 -0
- package/13/esm2020/presets/context-menu/components/search/search.component.mjs +24 -0
- package/13/esm2020/presets/context-menu/debounce.mjs +17 -0
- package/13/esm2020/presets/context-menu/index.mjs +38 -0
- package/13/esm2020/presets/context-menu/module.mjs +40 -0
- package/13/esm2020/presets/context-menu/types.mjs +2 -0
- package/13/esm2020/presets/index.mjs +5 -0
- package/13/esm2020/presets/minimap/components/index.mjs +4 -0
- package/13/esm2020/presets/minimap/components/mini-node/mini-node.component.mjs +50 -0
- package/13/esm2020/presets/minimap/components/mini-viewport/mini-viewport.component.mjs +76 -0
- package/13/esm2020/presets/minimap/components/minimap/minimap.component.mjs +100 -0
- package/13/esm2020/presets/minimap/index.mjs +42 -0
- package/13/esm2020/presets/minimap/module.mjs +40 -0
- package/13/esm2020/presets/minimap/types.mjs +2 -0
- package/13/esm2020/presets/reroute/components/index.mjs +3 -0
- package/13/esm2020/presets/reroute/components/pin/pin.component.mjs +81 -0
- package/13/esm2020/presets/reroute/components/pins/pins.component.mjs +50 -0
- package/13/esm2020/presets/reroute/index.mjs +40 -0
- package/13/esm2020/presets/reroute/module.mjs +35 -0
- package/13/esm2020/presets/reroute/types.mjs +2 -0
- package/13/esm2020/presets/types.mjs +2 -0
- package/13/esm2020/rete-angular-plugin-ng13.mjs +5 -0
- package/13/esm2020/shared/drag.mjs +23 -0
- package/13/esm2020/types.mjs +2 -0
- package/13/fesm2015/rete-angular-plugin-ng13.mjs +1545 -0
- package/13/fesm2015/rete-angular-plugin-ng13.mjs.map +1 -0
- package/13/fesm2020/rete-angular-plugin-ng13.mjs +1436 -0
- package/13/fesm2020/rete-angular-plugin-ng13.mjs.map +1 -0
- package/13/index.d.ts +12 -0
- package/13/module.d.ts +12 -0
- package/13/package.json +30 -0
- package/13/presets/classic/components/connection/connection-wrapper.component.d.ts +30 -0
- package/13/presets/classic/components/connection/connection.component.d.ts +11 -0
- package/13/presets/classic/components/control/control.component.d.ts +14 -0
- package/13/presets/classic/components/index.d.ts +5 -0
- package/13/presets/classic/components/node/node.component.d.ts +28 -0
- package/13/presets/classic/components/socket/socket.component.d.ts +12 -0
- package/13/presets/classic/index.d.ts +18 -0
- package/13/presets/classic/types.d.ts +49 -0
- package/13/presets/context-menu/components/index.d.ts +3 -0
- package/13/presets/context-menu/components/item/item.component.d.ts +26 -0
- package/13/presets/context-menu/components/menu/menu.component.d.ts +27 -0
- package/13/presets/context-menu/components/search/search.component.d.ts +8 -0
- package/13/presets/context-menu/debounce.d.ts +5 -0
- package/13/presets/context-menu/index.d.ts +6 -0
- package/13/presets/context-menu/module.d.ts +10 -0
- package/13/presets/context-menu/types.d.ts +12 -0
- package/13/presets/index.d.ts +4 -0
- package/13/presets/minimap/components/index.d.ts +3 -0
- package/13/presets/minimap/components/mini-node/mini-node.component.d.ts +14 -0
- package/13/presets/minimap/components/mini-viewport/mini-viewport.component.d.ts +27 -0
- package/13/presets/minimap/components/minimap/minimap.component.d.ts +25 -0
- package/13/presets/minimap/index.d.ts +6 -0
- package/13/presets/minimap/module.d.ts +10 -0
- package/13/presets/minimap/types.d.ts +22 -0
- package/13/presets/reroute/components/index.d.ts +2 -0
- package/13/presets/reroute/components/pin/pin.component.d.ts +30 -0
- package/13/presets/reroute/components/pins/pins.component.d.ts +17 -0
- package/13/presets/reroute/index.d.ts +10 -0
- package/13/presets/reroute/module.d.ts +9 -0
- package/13/presets/reroute/types.d.ts +18 -0
- package/13/presets/types.d.ts +15 -0
- package/13/rete-angular-plugin-ng13.d.ts +5 -0
- package/13/shared/drag.d.ts +10 -0
- package/13/types.d.ts +29 -0
- package/14/core.d.ts +48 -0
- package/14/esm2020/core.mjs +109 -0
- package/14/esm2020/index.mjs +11 -0
- package/14/esm2020/module.mjs +56 -0
- package/14/esm2020/presets/classic/components/connection/connection-wrapper.component.mjs +79 -0
- package/14/esm2020/presets/classic/components/connection/connection.component.mjs +28 -0
- package/14/esm2020/presets/classic/components/control/control.component.mjs +51 -0
- package/14/esm2020/presets/classic/components/index.mjs +6 -0
- package/14/esm2020/presets/classic/components/node/node.component.mjs +137 -0
- package/14/esm2020/presets/classic/components/socket/socket.component.mjs +31 -0
- package/14/esm2020/presets/classic/index.mjs +111 -0
- package/14/esm2020/presets/classic/types.mjs +2 -0
- package/14/esm2020/presets/context-menu/components/index.mjs +4 -0
- package/14/esm2020/presets/context-menu/components/item/item.component.mjs +111 -0
- package/14/esm2020/presets/context-menu/components/menu/menu.component.mjs +105 -0
- package/14/esm2020/presets/context-menu/components/search/search.component.mjs +24 -0
- package/14/esm2020/presets/context-menu/debounce.mjs +17 -0
- package/14/esm2020/presets/context-menu/index.mjs +38 -0
- package/14/esm2020/presets/context-menu/module.mjs +38 -0
- package/14/esm2020/presets/context-menu/types.mjs +2 -0
- package/14/esm2020/presets/index.mjs +5 -0
- package/14/esm2020/presets/minimap/components/index.mjs +4 -0
- package/14/esm2020/presets/minimap/components/mini-node/mini-node.component.mjs +50 -0
- package/14/esm2020/presets/minimap/components/mini-viewport/mini-viewport.component.mjs +76 -0
- package/14/esm2020/presets/minimap/components/minimap/minimap.component.mjs +100 -0
- package/14/esm2020/presets/minimap/index.mjs +42 -0
- package/14/esm2020/presets/minimap/module.mjs +38 -0
- package/14/esm2020/presets/minimap/types.mjs +2 -0
- package/14/esm2020/presets/reroute/components/index.mjs +3 -0
- package/14/esm2020/presets/reroute/components/pin/pin.component.mjs +81 -0
- package/14/esm2020/presets/reroute/components/pins/pins.component.mjs +50 -0
- package/14/esm2020/presets/reroute/index.mjs +40 -0
- package/14/esm2020/presets/reroute/module.mjs +33 -0
- package/14/esm2020/presets/reroute/types.mjs +2 -0
- package/14/esm2020/presets/types.mjs +2 -0
- package/14/esm2020/rete-angular-plugin-ng14.mjs +5 -0
- package/14/esm2020/shared/drag.mjs +23 -0
- package/14/esm2020/types.mjs +2 -0
- package/14/fesm2015/rete-angular-plugin-ng14.mjs +1537 -0
- package/14/fesm2015/rete-angular-plugin-ng14.mjs.map +1 -0
- package/14/fesm2020/rete-angular-plugin-ng14.mjs +1428 -0
- package/14/fesm2020/rete-angular-plugin-ng14.mjs.map +1 -0
- package/14/index.d.ts +12 -0
- package/14/module.d.ts +12 -0
- package/14/package.json +30 -0
- package/14/presets/classic/components/connection/connection-wrapper.component.d.ts +30 -0
- package/14/presets/classic/components/connection/connection.component.d.ts +11 -0
- package/14/presets/classic/components/control/control.component.d.ts +14 -0
- package/14/presets/classic/components/index.d.ts +5 -0
- package/14/presets/classic/components/node/node.component.d.ts +28 -0
- package/14/presets/classic/components/socket/socket.component.d.ts +12 -0
- package/14/presets/classic/index.d.ts +18 -0
- package/14/presets/classic/types.d.ts +49 -0
- package/14/presets/context-menu/components/index.d.ts +3 -0
- package/14/presets/context-menu/components/item/item.component.d.ts +26 -0
- package/14/presets/context-menu/components/menu/menu.component.d.ts +27 -0
- package/14/presets/context-menu/components/search/search.component.d.ts +8 -0
- package/14/presets/context-menu/debounce.d.ts +5 -0
- package/14/presets/context-menu/index.d.ts +6 -0
- package/14/presets/context-menu/module.d.ts +10 -0
- package/14/presets/context-menu/types.d.ts +12 -0
- package/14/presets/index.d.ts +4 -0
- package/14/presets/minimap/components/index.d.ts +3 -0
- package/14/presets/minimap/components/mini-node/mini-node.component.d.ts +14 -0
- package/14/presets/minimap/components/mini-viewport/mini-viewport.component.d.ts +27 -0
- package/14/presets/minimap/components/minimap/minimap.component.d.ts +25 -0
- package/14/presets/minimap/index.d.ts +6 -0
- package/14/presets/minimap/module.d.ts +10 -0
- package/14/presets/minimap/types.d.ts +22 -0
- package/14/presets/reroute/components/index.d.ts +2 -0
- package/14/presets/reroute/components/pin/pin.component.d.ts +30 -0
- package/14/presets/reroute/components/pins/pins.component.d.ts +17 -0
- package/14/presets/reroute/index.d.ts +10 -0
- package/14/presets/reroute/module.d.ts +9 -0
- package/14/presets/reroute/types.d.ts +18 -0
- package/14/presets/types.d.ts +15 -0
- package/14/shared/drag.d.ts +10 -0
- package/14/types.d.ts +29 -0
- package/15/core.d.ts +48 -0
- package/15/esm2020/core.mjs +109 -0
- package/15/esm2020/index.mjs +11 -0
- package/15/esm2020/module.mjs +56 -0
- package/15/esm2020/presets/classic/components/connection/connection-wrapper.component.mjs +79 -0
- package/15/esm2020/presets/classic/components/connection/connection.component.mjs +28 -0
- package/15/esm2020/presets/classic/components/control/control.component.mjs +51 -0
- package/15/esm2020/presets/classic/components/index.mjs +6 -0
- package/15/esm2020/presets/classic/components/node/node.component.mjs +137 -0
- package/15/esm2020/presets/classic/components/socket/socket.component.mjs +31 -0
- package/15/esm2020/presets/classic/index.mjs +111 -0
- package/15/esm2020/presets/classic/types.mjs +2 -0
- package/15/esm2020/presets/context-menu/components/index.mjs +4 -0
- package/15/esm2020/presets/context-menu/components/item/item.component.mjs +111 -0
- package/15/esm2020/presets/context-menu/components/menu/menu.component.mjs +105 -0
- package/15/esm2020/presets/context-menu/components/search/search.component.mjs +24 -0
- package/15/esm2020/presets/context-menu/debounce.mjs +17 -0
- package/15/esm2020/presets/context-menu/index.mjs +38 -0
- package/15/esm2020/presets/context-menu/module.mjs +38 -0
- package/15/esm2020/presets/context-menu/types.mjs +2 -0
- package/15/esm2020/presets/index.mjs +5 -0
- package/15/esm2020/presets/minimap/components/index.mjs +4 -0
- package/15/esm2020/presets/minimap/components/mini-node/mini-node.component.mjs +50 -0
- package/15/esm2020/presets/minimap/components/mini-viewport/mini-viewport.component.mjs +76 -0
- package/15/esm2020/presets/minimap/components/minimap/minimap.component.mjs +100 -0
- package/15/esm2020/presets/minimap/index.mjs +42 -0
- package/15/esm2020/presets/minimap/module.mjs +38 -0
- package/15/esm2020/presets/minimap/types.mjs +2 -0
- package/15/esm2020/presets/reroute/components/index.mjs +3 -0
- package/15/esm2020/presets/reroute/components/pin/pin.component.mjs +81 -0
- package/15/esm2020/presets/reroute/components/pins/pins.component.mjs +50 -0
- package/15/esm2020/presets/reroute/index.mjs +40 -0
- package/15/esm2020/presets/reroute/module.mjs +33 -0
- package/15/esm2020/presets/reroute/types.mjs +2 -0
- package/15/esm2020/presets/types.mjs +2 -0
- package/15/esm2020/rete-angular-plugin-ng15.mjs +5 -0
- package/15/esm2020/shared/drag.mjs +23 -0
- package/15/esm2020/types.mjs +2 -0
- package/15/fesm2015/rete-angular-plugin-ng15.mjs +1537 -0
- package/15/fesm2015/rete-angular-plugin-ng15.mjs.map +1 -0
- package/15/fesm2020/rete-angular-plugin-ng15.mjs +1428 -0
- package/15/fesm2020/rete-angular-plugin-ng15.mjs.map +1 -0
- package/15/index.d.ts +12 -0
- package/15/module.d.ts +12 -0
- package/15/package.json +30 -0
- package/15/presets/classic/components/connection/connection-wrapper.component.d.ts +30 -0
- package/15/presets/classic/components/connection/connection.component.d.ts +11 -0
- package/15/presets/classic/components/control/control.component.d.ts +14 -0
- package/15/presets/classic/components/index.d.ts +5 -0
- package/15/presets/classic/components/node/node.component.d.ts +28 -0
- package/15/presets/classic/components/socket/socket.component.d.ts +12 -0
- package/15/presets/classic/index.d.ts +18 -0
- package/15/presets/classic/types.d.ts +49 -0
- package/15/presets/context-menu/components/index.d.ts +3 -0
- package/15/presets/context-menu/components/item/item.component.d.ts +26 -0
- package/15/presets/context-menu/components/menu/menu.component.d.ts +27 -0
- package/15/presets/context-menu/components/search/search.component.d.ts +8 -0
- package/15/presets/context-menu/debounce.d.ts +5 -0
- package/15/presets/context-menu/index.d.ts +6 -0
- package/15/presets/context-menu/module.d.ts +10 -0
- package/15/presets/context-menu/types.d.ts +12 -0
- package/15/presets/index.d.ts +4 -0
- package/15/presets/minimap/components/index.d.ts +3 -0
- package/15/presets/minimap/components/mini-node/mini-node.component.d.ts +14 -0
- package/15/presets/minimap/components/mini-viewport/mini-viewport.component.d.ts +27 -0
- package/15/presets/minimap/components/minimap/minimap.component.d.ts +25 -0
- package/15/presets/minimap/index.d.ts +6 -0
- package/15/presets/minimap/module.d.ts +10 -0
- package/15/presets/minimap/types.d.ts +22 -0
- package/15/presets/reroute/components/index.d.ts +2 -0
- package/15/presets/reroute/components/pin/pin.component.d.ts +30 -0
- package/15/presets/reroute/components/pins/pins.component.d.ts +17 -0
- package/15/presets/reroute/index.d.ts +10 -0
- package/15/presets/reroute/module.d.ts +9 -0
- package/15/presets/reroute/types.d.ts +18 -0
- package/15/presets/types.d.ts +15 -0
- package/15/shared/drag.d.ts +10 -0
- package/15/types.d.ts +29 -0
- package/16/core.d.ts +48 -0
- package/16/esm2022/core.mjs +111 -0
- package/16/esm2022/index.mjs +11 -0
- package/16/esm2022/module.mjs +49 -0
- package/16/esm2022/presets/classic/components/connection/connection-wrapper.component.mjs +90 -0
- package/16/esm2022/presets/classic/components/connection/connection.component.mjs +32 -0
- package/16/esm2022/presets/classic/components/control/control.component.mjs +54 -0
- package/16/esm2022/presets/classic/components/index.mjs +6 -0
- package/16/esm2022/presets/classic/components/node/node.component.mjs +144 -0
- package/16/esm2022/presets/classic/components/socket/socket.component.mjs +34 -0
- package/16/esm2022/presets/classic/index.mjs +111 -0
- package/16/esm2022/presets/classic/types.mjs +2 -0
- package/16/esm2022/presets/context-menu/components/index.mjs +4 -0
- package/16/esm2022/presets/context-menu/components/item/item.component.mjs +114 -0
- package/16/esm2022/presets/context-menu/components/menu/menu.component.mjs +111 -0
- package/16/esm2022/presets/context-menu/components/search/search.component.mjs +23 -0
- package/16/esm2022/presets/context-menu/debounce.mjs +17 -0
- package/16/esm2022/presets/context-menu/index.mjs +38 -0
- package/16/esm2022/presets/context-menu/module.mjs +35 -0
- package/16/esm2022/presets/context-menu/types.mjs +2 -0
- package/16/esm2022/presets/index.mjs +5 -0
- package/16/esm2022/presets/minimap/components/index.mjs +4 -0
- package/16/esm2022/presets/minimap/components/mini-node/mini-node.component.mjs +54 -0
- package/16/esm2022/presets/minimap/components/mini-viewport/mini-viewport.component.mjs +80 -0
- package/16/esm2022/presets/minimap/components/minimap/minimap.component.mjs +109 -0
- package/16/esm2022/presets/minimap/index.mjs +42 -0
- package/16/esm2022/presets/minimap/module.mjs +35 -0
- package/16/esm2022/presets/minimap/types.mjs +2 -0
- package/16/esm2022/presets/reroute/components/index.mjs +3 -0
- package/16/esm2022/presets/reroute/components/pin/pin.component.mjs +85 -0
- package/16/esm2022/presets/reroute/components/pins/pins.component.mjs +57 -0
- package/16/esm2022/presets/reroute/index.mjs +40 -0
- package/16/esm2022/presets/reroute/module.mjs +30 -0
- package/16/esm2022/presets/reroute/types.mjs +2 -0
- package/16/esm2022/presets/types.mjs +2 -0
- package/16/esm2022/rete-angular-plugin-ng16.mjs +5 -0
- package/16/esm2022/shared/drag.mjs +23 -0
- package/16/esm2022/types.mjs +2 -0
- package/16/fesm2022/rete-angular-plugin-ng16.mjs +1478 -0
- package/16/fesm2022/rete-angular-plugin-ng16.mjs.map +1 -0
- package/16/index.d.ts +12 -0
- package/16/module.d.ts +12 -0
- package/16/package.json +24 -0
- package/16/presets/classic/components/connection/connection-wrapper.component.d.ts +30 -0
- package/16/presets/classic/components/connection/connection.component.d.ts +11 -0
- package/16/presets/classic/components/control/control.component.d.ts +14 -0
- package/16/presets/classic/components/index.d.ts +5 -0
- package/16/presets/classic/components/node/node.component.d.ts +28 -0
- package/16/presets/classic/components/socket/socket.component.d.ts +12 -0
- package/16/presets/classic/index.d.ts +18 -0
- package/16/presets/classic/types.d.ts +49 -0
- package/16/presets/context-menu/components/index.d.ts +3 -0
- package/16/presets/context-menu/components/item/item.component.d.ts +26 -0
- package/16/presets/context-menu/components/menu/menu.component.d.ts +27 -0
- package/16/presets/context-menu/components/search/search.component.d.ts +8 -0
- package/16/presets/context-menu/debounce.d.ts +5 -0
- package/16/presets/context-menu/index.d.ts +6 -0
- package/16/presets/context-menu/module.d.ts +10 -0
- package/16/presets/context-menu/types.d.ts +12 -0
- package/16/presets/index.d.ts +4 -0
- package/16/presets/minimap/components/index.d.ts +3 -0
- package/16/presets/minimap/components/mini-node/mini-node.component.d.ts +14 -0
- package/16/presets/minimap/components/mini-viewport/mini-viewport.component.d.ts +27 -0
- package/16/presets/minimap/components/minimap/minimap.component.d.ts +25 -0
- package/16/presets/minimap/index.d.ts +6 -0
- package/16/presets/minimap/module.d.ts +10 -0
- package/16/presets/minimap/types.d.ts +22 -0
- package/16/presets/reroute/components/index.d.ts +2 -0
- package/16/presets/reroute/components/pin/pin.component.d.ts +30 -0
- package/16/presets/reroute/components/pins/pins.component.d.ts +17 -0
- package/16/presets/reroute/index.d.ts +10 -0
- package/16/presets/reroute/module.d.ts +9 -0
- package/16/presets/reroute/types.d.ts +18 -0
- package/16/presets/types.d.ts +15 -0
- package/16/shared/drag.d.ts +10 -0
- package/16/types.d.ts +29 -0
- package/LICENSE +21 -0
- package/README.md +28 -0
- package/bundles/rete-angular-plugin.umd.js +1707 -0
- package/bundles/rete-angular-plugin.umd.js.map +1 -0
- package/core.d.ts +48 -0
- package/esm2015/core.js +103 -0
- package/esm2015/index.js +12 -0
- package/esm2015/module.js +40 -0
- package/esm2015/presets/classic/components/connection/connection-wrapper.component.js +80 -0
- package/esm2015/presets/classic/components/connection/connection.component.js +17 -0
- package/esm2015/presets/classic/components/control/control.component.js +42 -0
- package/esm2015/presets/classic/components/index.js +6 -0
- package/esm2015/presets/classic/components/node/node.component.js +62 -0
- package/esm2015/presets/classic/components/socket/socket.component.js +29 -0
- package/esm2015/presets/classic/index.js +108 -0
- package/esm2015/presets/classic/types.js +2 -0
- package/esm2015/presets/context-menu/components/index.js +4 -0
- package/esm2015/presets/context-menu/components/item/item.component.js +64 -0
- package/esm2015/presets/context-menu/components/menu/menu.component.js +62 -0
- package/esm2015/presets/context-menu/components/search/search.component.js +18 -0
- package/esm2015/presets/context-menu/debounce.js +17 -0
- package/esm2015/presets/context-menu/index.js +38 -0
- package/esm2015/presets/context-menu/module.js +28 -0
- package/esm2015/presets/context-menu/types.js +2 -0
- package/esm2015/presets/index.js +9 -0
- package/esm2015/presets/minimap/components/index.js +4 -0
- package/esm2015/presets/minimap/components/mini-node/mini-node.component.js +39 -0
- package/esm2015/presets/minimap/components/mini-viewport/mini-viewport.component.js +59 -0
- package/esm2015/presets/minimap/components/minimap/minimap.component.js +70 -0
- package/esm2015/presets/minimap/index.js +42 -0
- package/esm2015/presets/minimap/module.js +28 -0
- package/esm2015/presets/minimap/types.js +2 -0
- package/esm2015/presets/reroute/components/index.js +3 -0
- package/esm2015/presets/reroute/components/pin/pin.component.js +66 -0
- package/esm2015/presets/reroute/components/pins/pins.component.js +31 -0
- package/esm2015/presets/reroute/index.js +32 -0
- package/esm2015/presets/reroute/module.js +25 -0
- package/esm2015/presets/reroute/types.js +2 -0
- package/esm2015/presets/types.js +2 -0
- package/esm2015/rete-angular-plugin.js +18 -0
- package/esm2015/shared/drag.js +23 -0
- package/esm2015/types.js +2 -0
- package/fesm2015/rete-angular-plugin.js +1111 -0
- package/fesm2015/rete-angular-plugin.js.map +1 -0
- package/index.d.ts +12 -0
- package/module.d.ts +2 -0
- package/package.json +37 -5
- package/presets/classic/components/connection/connection-wrapper.component.d.ts +27 -0
- package/presets/classic/components/connection/connection.component.d.ts +8 -0
- package/presets/classic/components/control/control.component.d.ts +11 -0
- package/presets/classic/components/index.d.ts +5 -0
- package/presets/classic/components/node/node.component.d.ts +23 -0
- package/presets/classic/components/socket/socket.component.d.ts +9 -0
- package/presets/classic/index.d.ts +18 -0
- package/presets/classic/types.d.ts +49 -0
- package/presets/context-menu/components/index.d.ts +3 -0
- package/presets/context-menu/components/item/item.component.d.ts +23 -0
- package/presets/context-menu/components/menu/menu.component.d.ts +24 -0
- package/presets/context-menu/components/search/search.component.d.ts +5 -0
- package/presets/context-menu/debounce.d.ts +5 -0
- package/presets/context-menu/index.d.ts +6 -0
- package/presets/context-menu/module.d.ts +2 -0
- package/presets/context-menu/types.d.ts +12 -0
- package/presets/index.d.ts +4 -0
- package/presets/minimap/components/index.d.ts +3 -0
- package/presets/minimap/components/mini-node/mini-node.component.d.ts +11 -0
- package/presets/minimap/components/mini-viewport/mini-viewport.component.d.ts +24 -0
- package/presets/minimap/components/minimap/minimap.component.d.ts +22 -0
- package/presets/minimap/index.d.ts +6 -0
- package/presets/minimap/module.d.ts +2 -0
- package/presets/minimap/types.d.ts +22 -0
- package/presets/reroute/components/index.d.ts +2 -0
- package/presets/reroute/components/pin/pin.component.d.ts +27 -0
- package/presets/reroute/components/pins/pins.component.d.ts +14 -0
- package/presets/reroute/index.d.ts +10 -0
- package/presets/reroute/module.d.ts +2 -0
- package/presets/reroute/types.d.ts +18 -0
- package/presets/types.d.ts +15 -0
- package/rete-angular-plugin.d.ts +17 -0
- package/rete-angular-plugin.metadata.json +1 -0
- package/shared/drag.d.ts +10 -0
- package/types.d.ts +29 -0
|
@@ -0,0 +1,2197 @@
|
|
|
1
|
+
(function (global, factory) {
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('rete'), require('rete-render-utils'), require('@angular/core'), require('@angular/common'), require('rete-area-plugin'), require('@angular/elements')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('rete-angular-plugin-ng12', ['exports', 'rete', 'rete-render-utils', '@angular/core', '@angular/common', 'rete-area-plugin', '@angular/elements'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global["rete-angular-plugin-ng12"] = {}, global.rete, global.reteRenderUtils, global.ng.core, global.ng.common, global.reteAreaPlugin, global.ng.elements));
|
|
5
|
+
})(this, (function (exports, rete, reteRenderUtils, i0, i1, reteAreaPlugin, elements) { 'use strict';
|
|
6
|
+
|
|
7
|
+
function _interopNamespace(e) {
|
|
8
|
+
if (e && e.__esModule) return e;
|
|
9
|
+
var n = Object.create(null);
|
|
10
|
+
if (e) {
|
|
11
|
+
Object.keys(e).forEach(function (k) {
|
|
12
|
+
if (k !== 'default') {
|
|
13
|
+
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
+
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function () { return e[k]; }
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
n["default"] = e;
|
|
22
|
+
return Object.freeze(n);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
26
|
+
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
27
|
+
|
|
28
|
+
/******************************************************************************
|
|
29
|
+
Copyright (c) Microsoft Corporation.
|
|
30
|
+
|
|
31
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
32
|
+
purpose with or without fee is hereby granted.
|
|
33
|
+
|
|
34
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
35
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
36
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
37
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
38
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
39
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
40
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
41
|
+
***************************************************************************** */
|
|
42
|
+
/* global Reflect, Promise */
|
|
43
|
+
var extendStatics = function (d, b) {
|
|
44
|
+
extendStatics = Object.setPrototypeOf ||
|
|
45
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
46
|
+
function (d, b) { for (var p in b)
|
|
47
|
+
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
48
|
+
d[p] = b[p]; };
|
|
49
|
+
return extendStatics(d, b);
|
|
50
|
+
};
|
|
51
|
+
function __extends(d, b) {
|
|
52
|
+
if (typeof b !== "function" && b !== null)
|
|
53
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
54
|
+
extendStatics(d, b);
|
|
55
|
+
function __() { this.constructor = d; }
|
|
56
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
57
|
+
}
|
|
58
|
+
var __assign = function () {
|
|
59
|
+
__assign = Object.assign || function __assign(t) {
|
|
60
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
61
|
+
s = arguments[i];
|
|
62
|
+
for (var p in s)
|
|
63
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
64
|
+
t[p] = s[p];
|
|
65
|
+
}
|
|
66
|
+
return t;
|
|
67
|
+
};
|
|
68
|
+
return __assign.apply(this, arguments);
|
|
69
|
+
};
|
|
70
|
+
function __rest(s, e) {
|
|
71
|
+
var t = {};
|
|
72
|
+
for (var p in s)
|
|
73
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
74
|
+
t[p] = s[p];
|
|
75
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
76
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
77
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
78
|
+
t[p[i]] = s[p[i]];
|
|
79
|
+
}
|
|
80
|
+
return t;
|
|
81
|
+
}
|
|
82
|
+
function __decorate(decorators, target, key, desc) {
|
|
83
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
84
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
85
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
86
|
+
else
|
|
87
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
88
|
+
if (d = decorators[i])
|
|
89
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
90
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
91
|
+
}
|
|
92
|
+
function __param(paramIndex, decorator) {
|
|
93
|
+
return function (target, key) { decorator(target, key, paramIndex); };
|
|
94
|
+
}
|
|
95
|
+
function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
96
|
+
function accept(f) { if (f !== void 0 && typeof f !== "function")
|
|
97
|
+
throw new TypeError("Function expected"); return f; }
|
|
98
|
+
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
99
|
+
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
100
|
+
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
101
|
+
var _, done = false;
|
|
102
|
+
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
103
|
+
var context = {};
|
|
104
|
+
for (var p in contextIn)
|
|
105
|
+
context[p] = p === "access" ? {} : contextIn[p];
|
|
106
|
+
for (var p in contextIn.access)
|
|
107
|
+
context.access[p] = contextIn.access[p];
|
|
108
|
+
context.addInitializer = function (f) { if (done)
|
|
109
|
+
throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
110
|
+
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
111
|
+
if (kind === "accessor") {
|
|
112
|
+
if (result === void 0)
|
|
113
|
+
continue;
|
|
114
|
+
if (result === null || typeof result !== "object")
|
|
115
|
+
throw new TypeError("Object expected");
|
|
116
|
+
if (_ = accept(result.get))
|
|
117
|
+
descriptor.get = _;
|
|
118
|
+
if (_ = accept(result.set))
|
|
119
|
+
descriptor.set = _;
|
|
120
|
+
if (_ = accept(result.init))
|
|
121
|
+
initializers.push(_);
|
|
122
|
+
}
|
|
123
|
+
else if (_ = accept(result)) {
|
|
124
|
+
if (kind === "field")
|
|
125
|
+
initializers.push(_);
|
|
126
|
+
else
|
|
127
|
+
descriptor[key] = _;
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
if (target)
|
|
131
|
+
Object.defineProperty(target, contextIn.name, descriptor);
|
|
132
|
+
done = true;
|
|
133
|
+
}
|
|
134
|
+
;
|
|
135
|
+
function __runInitializers(thisArg, initializers, value) {
|
|
136
|
+
var useValue = arguments.length > 2;
|
|
137
|
+
for (var i = 0; i < initializers.length; i++) {
|
|
138
|
+
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
139
|
+
}
|
|
140
|
+
return useValue ? value : void 0;
|
|
141
|
+
}
|
|
142
|
+
;
|
|
143
|
+
function __propKey(x) {
|
|
144
|
+
return typeof x === "symbol" ? x : "".concat(x);
|
|
145
|
+
}
|
|
146
|
+
;
|
|
147
|
+
function __setFunctionName(f, name, prefix) {
|
|
148
|
+
if (typeof name === "symbol")
|
|
149
|
+
name = name.description ? "[".concat(name.description, "]") : "";
|
|
150
|
+
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
151
|
+
}
|
|
152
|
+
;
|
|
153
|
+
function __metadata(metadataKey, metadataValue) {
|
|
154
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
155
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
156
|
+
}
|
|
157
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
158
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
159
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
160
|
+
function fulfilled(value) { try {
|
|
161
|
+
step(generator.next(value));
|
|
162
|
+
}
|
|
163
|
+
catch (e) {
|
|
164
|
+
reject(e);
|
|
165
|
+
} }
|
|
166
|
+
function rejected(value) { try {
|
|
167
|
+
step(generator["throw"](value));
|
|
168
|
+
}
|
|
169
|
+
catch (e) {
|
|
170
|
+
reject(e);
|
|
171
|
+
} }
|
|
172
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
173
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
function __generator(thisArg, body) {
|
|
177
|
+
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
178
|
+
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
179
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
180
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
181
|
+
function step(op) {
|
|
182
|
+
if (f)
|
|
183
|
+
throw new TypeError("Generator is already executing.");
|
|
184
|
+
while (g && (g = 0, op[0] && (_ = 0)), _)
|
|
185
|
+
try {
|
|
186
|
+
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)
|
|
187
|
+
return t;
|
|
188
|
+
if (y = 0, t)
|
|
189
|
+
op = [op[0] & 2, t.value];
|
|
190
|
+
switch (op[0]) {
|
|
191
|
+
case 0:
|
|
192
|
+
case 1:
|
|
193
|
+
t = op;
|
|
194
|
+
break;
|
|
195
|
+
case 4:
|
|
196
|
+
_.label++;
|
|
197
|
+
return { value: op[1], done: false };
|
|
198
|
+
case 5:
|
|
199
|
+
_.label++;
|
|
200
|
+
y = op[1];
|
|
201
|
+
op = [0];
|
|
202
|
+
continue;
|
|
203
|
+
case 7:
|
|
204
|
+
op = _.ops.pop();
|
|
205
|
+
_.trys.pop();
|
|
206
|
+
continue;
|
|
207
|
+
default:
|
|
208
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
209
|
+
_ = 0;
|
|
210
|
+
continue;
|
|
211
|
+
}
|
|
212
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
213
|
+
_.label = op[1];
|
|
214
|
+
break;
|
|
215
|
+
}
|
|
216
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
217
|
+
_.label = t[1];
|
|
218
|
+
t = op;
|
|
219
|
+
break;
|
|
220
|
+
}
|
|
221
|
+
if (t && _.label < t[2]) {
|
|
222
|
+
_.label = t[2];
|
|
223
|
+
_.ops.push(op);
|
|
224
|
+
break;
|
|
225
|
+
}
|
|
226
|
+
if (t[2])
|
|
227
|
+
_.ops.pop();
|
|
228
|
+
_.trys.pop();
|
|
229
|
+
continue;
|
|
230
|
+
}
|
|
231
|
+
op = body.call(thisArg, _);
|
|
232
|
+
}
|
|
233
|
+
catch (e) {
|
|
234
|
+
op = [6, e];
|
|
235
|
+
y = 0;
|
|
236
|
+
}
|
|
237
|
+
finally {
|
|
238
|
+
f = t = 0;
|
|
239
|
+
}
|
|
240
|
+
if (op[0] & 5)
|
|
241
|
+
throw op[1];
|
|
242
|
+
return { value: op[0] ? op[1] : void 0, done: true };
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
246
|
+
if (k2 === undefined)
|
|
247
|
+
k2 = k;
|
|
248
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
249
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
250
|
+
desc = { enumerable: true, get: function () { return m[k]; } };
|
|
251
|
+
}
|
|
252
|
+
Object.defineProperty(o, k2, desc);
|
|
253
|
+
}) : (function (o, m, k, k2) {
|
|
254
|
+
if (k2 === undefined)
|
|
255
|
+
k2 = k;
|
|
256
|
+
o[k2] = m[k];
|
|
257
|
+
});
|
|
258
|
+
function __exportStar(m, o) {
|
|
259
|
+
for (var p in m)
|
|
260
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
261
|
+
__createBinding(o, m, p);
|
|
262
|
+
}
|
|
263
|
+
function __values(o) {
|
|
264
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
265
|
+
if (m)
|
|
266
|
+
return m.call(o);
|
|
267
|
+
if (o && typeof o.length === "number")
|
|
268
|
+
return {
|
|
269
|
+
next: function () {
|
|
270
|
+
if (o && i >= o.length)
|
|
271
|
+
o = void 0;
|
|
272
|
+
return { value: o && o[i++], done: !o };
|
|
273
|
+
}
|
|
274
|
+
};
|
|
275
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
276
|
+
}
|
|
277
|
+
function __read(o, n) {
|
|
278
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
279
|
+
if (!m)
|
|
280
|
+
return o;
|
|
281
|
+
var i = m.call(o), r, ar = [], e;
|
|
282
|
+
try {
|
|
283
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
284
|
+
ar.push(r.value);
|
|
285
|
+
}
|
|
286
|
+
catch (error) {
|
|
287
|
+
e = { error: error };
|
|
288
|
+
}
|
|
289
|
+
finally {
|
|
290
|
+
try {
|
|
291
|
+
if (r && !r.done && (m = i["return"]))
|
|
292
|
+
m.call(i);
|
|
293
|
+
}
|
|
294
|
+
finally {
|
|
295
|
+
if (e)
|
|
296
|
+
throw e.error;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
return ar;
|
|
300
|
+
}
|
|
301
|
+
/** @deprecated */
|
|
302
|
+
function __spread() {
|
|
303
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
304
|
+
ar = ar.concat(__read(arguments[i]));
|
|
305
|
+
return ar;
|
|
306
|
+
}
|
|
307
|
+
/** @deprecated */
|
|
308
|
+
function __spreadArrays() {
|
|
309
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
310
|
+
s += arguments[i].length;
|
|
311
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
312
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
313
|
+
r[k] = a[j];
|
|
314
|
+
return r;
|
|
315
|
+
}
|
|
316
|
+
function __spreadArray(to, from, pack) {
|
|
317
|
+
if (pack || arguments.length === 2)
|
|
318
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
319
|
+
if (ar || !(i in from)) {
|
|
320
|
+
if (!ar)
|
|
321
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
322
|
+
ar[i] = from[i];
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
326
|
+
}
|
|
327
|
+
function __await(v) {
|
|
328
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
329
|
+
}
|
|
330
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
331
|
+
if (!Symbol.asyncIterator)
|
|
332
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
333
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
334
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
335
|
+
function verb(n) { if (g[n])
|
|
336
|
+
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
337
|
+
function resume(n, v) { try {
|
|
338
|
+
step(g[n](v));
|
|
339
|
+
}
|
|
340
|
+
catch (e) {
|
|
341
|
+
settle(q[0][3], e);
|
|
342
|
+
} }
|
|
343
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
344
|
+
function fulfill(value) { resume("next", value); }
|
|
345
|
+
function reject(value) { resume("throw", value); }
|
|
346
|
+
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
347
|
+
resume(q[0][0], q[0][1]); }
|
|
348
|
+
}
|
|
349
|
+
function __asyncDelegator(o) {
|
|
350
|
+
var i, p;
|
|
351
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
352
|
+
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; }
|
|
353
|
+
}
|
|
354
|
+
function __asyncValues(o) {
|
|
355
|
+
if (!Symbol.asyncIterator)
|
|
356
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
357
|
+
var m = o[Symbol.asyncIterator], i;
|
|
358
|
+
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);
|
|
359
|
+
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); }); }; }
|
|
360
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
361
|
+
}
|
|
362
|
+
function __makeTemplateObject(cooked, raw) {
|
|
363
|
+
if (Object.defineProperty) {
|
|
364
|
+
Object.defineProperty(cooked, "raw", { value: raw });
|
|
365
|
+
}
|
|
366
|
+
else {
|
|
367
|
+
cooked.raw = raw;
|
|
368
|
+
}
|
|
369
|
+
return cooked;
|
|
370
|
+
}
|
|
371
|
+
;
|
|
372
|
+
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
373
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
374
|
+
}) : function (o, v) {
|
|
375
|
+
o["default"] = v;
|
|
376
|
+
};
|
|
377
|
+
function __importStar(mod) {
|
|
378
|
+
if (mod && mod.__esModule)
|
|
379
|
+
return mod;
|
|
380
|
+
var result = {};
|
|
381
|
+
if (mod != null)
|
|
382
|
+
for (var k in mod)
|
|
383
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
384
|
+
__createBinding(result, mod, k);
|
|
385
|
+
__setModuleDefault(result, mod);
|
|
386
|
+
return result;
|
|
387
|
+
}
|
|
388
|
+
function __importDefault(mod) {
|
|
389
|
+
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
390
|
+
}
|
|
391
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
392
|
+
if (kind === "a" && !f)
|
|
393
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
394
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
395
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
396
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
397
|
+
}
|
|
398
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
399
|
+
if (kind === "m")
|
|
400
|
+
throw new TypeError("Private method is not writable");
|
|
401
|
+
if (kind === "a" && !f)
|
|
402
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
403
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
404
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
405
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
406
|
+
}
|
|
407
|
+
function __classPrivateFieldIn(state, receiver) {
|
|
408
|
+
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function"))
|
|
409
|
+
throw new TypeError("Cannot use 'in' operator on non-object");
|
|
410
|
+
return typeof state === "function" ? receiver === state : state.has(receiver);
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
var _c0$1 = function (a2, a3, a4, a5) { return { type: "socket", side: "output", key: a2, nodeId: a3, payload: a4, seed: a5 }; };
|
|
414
|
+
function NodeComponent_div_2_Template(rf, ctx) {
|
|
415
|
+
if (rf & 1) {
|
|
416
|
+
i0__namespace.ɵɵelementStart(0, "div", 4);
|
|
417
|
+
i0__namespace.ɵɵelementStart(1, "div", 5);
|
|
418
|
+
i0__namespace.ɵɵtext(2);
|
|
419
|
+
i0__namespace.ɵɵelementEnd();
|
|
420
|
+
i0__namespace.ɵɵelement(3, "div", 6);
|
|
421
|
+
i0__namespace.ɵɵelementEnd();
|
|
422
|
+
}
|
|
423
|
+
if (rf & 2) {
|
|
424
|
+
var output_r3 = ctx.$implicit;
|
|
425
|
+
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
426
|
+
i0__namespace.ɵɵattribute("data-testid", "output-" + output_r3.key);
|
|
427
|
+
i0__namespace.ɵɵadvance(2);
|
|
428
|
+
i0__namespace.ɵɵtextInterpolate(output_r3.value == null ? null : output_r3.value.label);
|
|
429
|
+
i0__namespace.ɵɵadvance(1);
|
|
430
|
+
i0__namespace.ɵɵproperty("data", i0__namespace.ɵɵpureFunction4(4, _c0$1, output_r3.key, ctx_r0.data.id, output_r3.value == null ? null : output_r3.value.socket, ctx_r0.seed))("emit", ctx_r0.emit);
|
|
431
|
+
}
|
|
432
|
+
}
|
|
433
|
+
var _c1 = function (a1) { return { type: "control", payload: a1 }; };
|
|
434
|
+
function NodeComponent_div_4_Template(rf, ctx) {
|
|
435
|
+
if (rf & 1) {
|
|
436
|
+
i0__namespace.ɵɵelement(0, "div", 7);
|
|
437
|
+
}
|
|
438
|
+
if (rf & 2) {
|
|
439
|
+
var control_r4 = ctx.$implicit;
|
|
440
|
+
var ctx_r1 = i0__namespace.ɵɵnextContext();
|
|
441
|
+
i0__namespace.ɵɵproperty("data", i0__namespace.ɵɵpureFunction1(3, _c1, control_r4.value))("emit", ctx_r1.emit);
|
|
442
|
+
i0__namespace.ɵɵattribute("data-testid", "control-" + control_r4.key);
|
|
443
|
+
}
|
|
444
|
+
}
|
|
445
|
+
function NodeComponent_div_6_div_2_Template(rf, ctx) {
|
|
446
|
+
if (rf & 1) {
|
|
447
|
+
i0__namespace.ɵɵelementStart(0, "div", 12);
|
|
448
|
+
i0__namespace.ɵɵtext(1);
|
|
449
|
+
i0__namespace.ɵɵelementEnd();
|
|
450
|
+
}
|
|
451
|
+
if (rf & 2) {
|
|
452
|
+
var input_r5 = i0__namespace.ɵɵnextContext().$implicit;
|
|
453
|
+
i0__namespace.ɵɵadvance(1);
|
|
454
|
+
i0__namespace.ɵɵtextInterpolate(input_r5.value == null ? null : input_r5.value.label);
|
|
455
|
+
}
|
|
456
|
+
}
|
|
457
|
+
var _c2 = function (a2, a3, a4, a5) { return { type: "socket", side: "input", key: a2, nodeId: a3, payload: a4, seed: a5 }; };
|
|
458
|
+
function NodeComponent_div_6_Template(rf, ctx) {
|
|
459
|
+
if (rf & 1) {
|
|
460
|
+
i0__namespace.ɵɵelementStart(0, "div", 8);
|
|
461
|
+
i0__namespace.ɵɵelement(1, "div", 9);
|
|
462
|
+
i0__namespace.ɵɵtemplate(2, NodeComponent_div_6_div_2_Template, 2, 1, "div", 10);
|
|
463
|
+
i0__namespace.ɵɵelement(3, "div", 11);
|
|
464
|
+
i0__namespace.ɵɵelementEnd();
|
|
465
|
+
}
|
|
466
|
+
if (rf & 2) {
|
|
467
|
+
var input_r5 = ctx.$implicit;
|
|
468
|
+
var ctx_r2 = i0__namespace.ɵɵnextContext();
|
|
469
|
+
i0__namespace.ɵɵattribute("data-testid", "input-" + input_r5.key);
|
|
470
|
+
i0__namespace.ɵɵadvance(1);
|
|
471
|
+
i0__namespace.ɵɵproperty("data", i0__namespace.ɵɵpureFunction4(8, _c2, input_r5.key, ctx_r2.data.id, input_r5.value == null ? null : input_r5.value.socket, ctx_r2.seed))("emit", ctx_r2.emit);
|
|
472
|
+
i0__namespace.ɵɵadvance(1);
|
|
473
|
+
i0__namespace.ɵɵproperty("ngIf", !(input_r5.value == null ? null : input_r5.value.control) || !(input_r5.value == null ? null : input_r5.value.showControl));
|
|
474
|
+
i0__namespace.ɵɵadvance(1);
|
|
475
|
+
i0__namespace.ɵɵstyleProp("display", (input_r5.value == null ? null : input_r5.value.control) && (input_r5.value == null ? null : input_r5.value.showControl) ? "" : "none");
|
|
476
|
+
i0__namespace.ɵɵproperty("data", i0__namespace.ɵɵpureFunction1(13, _c1, input_r5.value == null ? null : input_r5.value.control))("emit", ctx_r2.emit);
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
var RefDirective = /** @class */ (function () {
|
|
480
|
+
function RefDirective(el) {
|
|
481
|
+
this.el = el;
|
|
482
|
+
}
|
|
483
|
+
RefDirective.prototype.ngOnChanges = function () {
|
|
484
|
+
this.emit({ type: 'render', data: Object.assign(Object.assign({}, this.data), { element: this.el.nativeElement }) });
|
|
485
|
+
};
|
|
486
|
+
return RefDirective;
|
|
487
|
+
}());
|
|
488
|
+
RefDirective.ɵfac = function RefDirective_Factory(t) { return new (t || RefDirective)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ElementRef)); };
|
|
489
|
+
RefDirective.ɵdir = /*@__PURE__*/ i0__namespace.ɵɵdefineDirective({ type: RefDirective, selectors: [["", "refComponent", ""]], inputs: { data: "data", emit: "emit" }, features: [i0__namespace.ɵɵNgOnChangesFeature] });
|
|
490
|
+
(function () {
|
|
491
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(RefDirective, [{
|
|
492
|
+
type: i0.Directive,
|
|
493
|
+
args: [{
|
|
494
|
+
selector: '[refComponent]'
|
|
495
|
+
}]
|
|
496
|
+
}], function () { return [{ type: i0__namespace.ElementRef }]; }, { data: [{
|
|
497
|
+
type: i0.Input
|
|
498
|
+
}], emit: [{
|
|
499
|
+
type: i0.Input
|
|
500
|
+
}] });
|
|
501
|
+
})();
|
|
502
|
+
var NodeComponent = /** @class */ (function () {
|
|
503
|
+
function NodeComponent(cdr) {
|
|
504
|
+
this.cdr = cdr;
|
|
505
|
+
this.seed = 0;
|
|
506
|
+
this.cdr.detach();
|
|
507
|
+
}
|
|
508
|
+
Object.defineProperty(NodeComponent.prototype, "selected", {
|
|
509
|
+
get: function () {
|
|
510
|
+
return this.data.selected;
|
|
511
|
+
},
|
|
512
|
+
enumerable: false,
|
|
513
|
+
configurable: true
|
|
514
|
+
});
|
|
515
|
+
NodeComponent.prototype.ngOnChanges = function () {
|
|
516
|
+
var _this = this;
|
|
517
|
+
this.cdr.detectChanges();
|
|
518
|
+
requestAnimationFrame(function () { return _this.rendered(); });
|
|
519
|
+
this.seed++; // force render sockets
|
|
520
|
+
};
|
|
521
|
+
NodeComponent.prototype.sortByIndex = function (a, b) {
|
|
522
|
+
var _a, _b;
|
|
523
|
+
var ai = ((_a = a.value) === null || _a === void 0 ? void 0 : _a.index) || 0;
|
|
524
|
+
var bi = ((_b = b.value) === null || _b === void 0 ? void 0 : _b.index) || 0;
|
|
525
|
+
return ai - bi;
|
|
526
|
+
};
|
|
527
|
+
return NodeComponent;
|
|
528
|
+
}());
|
|
529
|
+
NodeComponent.ɵfac = function NodeComponent_Factory(t) { return new (t || NodeComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef)); };
|
|
530
|
+
NodeComponent.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: NodeComponent, selectors: [["ng-component"]], hostAttrs: ["data-testid", "node"], hostVars: 2, hostBindings: function NodeComponent_HostBindings(rf, ctx) {
|
|
531
|
+
if (rf & 2) {
|
|
532
|
+
i0__namespace.ɵɵclassProp("selected", ctx.selected);
|
|
533
|
+
}
|
|
534
|
+
}, inputs: { data: "data", emit: "emit", rendered: "rendered" }, features: [i0__namespace.ɵɵNgOnChangesFeature], decls: 8, vars: 13, consts: [["data-testid", "title", 1, "title"], ["class", "output", 4, "ngFor", "ngForOf"], ["class", "control", "refComponent", "", 3, "data", "emit", 4, "ngFor", "ngForOf"], ["class", "input", 4, "ngFor", "ngForOf"], [1, "output"], ["data-testid", "output-title", 1, "output-title"], ["refComponent", "", "data-testid", "output-socket", 1, "output-socket", 3, "data", "emit"], ["refComponent", "", 1, "control", 3, "data", "emit"], [1, "input"], ["refComponent", "", "data-testid", "input-socket", 1, "input-socket", 3, "data", "emit"], ["class", "input-title", "data-testid", "input-title", 4, "ngIf"], ["refComponent", "", "data-testid", "input-control", 1, "input-control", 3, "data", "emit"], ["data-testid", "input-title", 1, "input-title"]], template: function NodeComponent_Template(rf, ctx) {
|
|
535
|
+
if (rf & 1) {
|
|
536
|
+
i0__namespace.ɵɵelementStart(0, "div", 0);
|
|
537
|
+
i0__namespace.ɵɵtext(1);
|
|
538
|
+
i0__namespace.ɵɵelementEnd();
|
|
539
|
+
i0__namespace.ɵɵtemplate(2, NodeComponent_div_2_Template, 4, 9, "div", 1);
|
|
540
|
+
i0__namespace.ɵɵpipe(3, "keyvalue");
|
|
541
|
+
i0__namespace.ɵɵtemplate(4, NodeComponent_div_4_Template, 1, 5, "div", 2);
|
|
542
|
+
i0__namespace.ɵɵpipe(5, "keyvalue");
|
|
543
|
+
i0__namespace.ɵɵtemplate(6, NodeComponent_div_6_Template, 4, 15, "div", 3);
|
|
544
|
+
i0__namespace.ɵɵpipe(7, "keyvalue");
|
|
545
|
+
}
|
|
546
|
+
if (rf & 2) {
|
|
547
|
+
i0__namespace.ɵɵadvance(1);
|
|
548
|
+
i0__namespace.ɵɵtextInterpolate(ctx.data.label);
|
|
549
|
+
i0__namespace.ɵɵadvance(1);
|
|
550
|
+
i0__namespace.ɵɵproperty("ngForOf", i0__namespace.ɵɵpipeBind2(3, 4, ctx.data.outputs, ctx.sortByIndex));
|
|
551
|
+
i0__namespace.ɵɵadvance(2);
|
|
552
|
+
i0__namespace.ɵɵproperty("ngForOf", i0__namespace.ɵɵpipeBind2(5, 7, ctx.data.controls, ctx.sortByIndex));
|
|
553
|
+
i0__namespace.ɵɵadvance(2);
|
|
554
|
+
i0__namespace.ɵɵproperty("ngForOf", i0__namespace.ɵɵpipeBind2(7, 10, ctx.data.inputs, ctx.sortByIndex));
|
|
555
|
+
}
|
|
556
|
+
}, directives: [i1__namespace.NgForOf, RefDirective, i1__namespace.NgIf], pipes: [i1__namespace.KeyValuePipe], styles: ["[_nghost-%COMP%]{display:block;background:rgba(110,136,255,.8);border:2px solid #4e58bf;border-radius:10px;cursor:pointer;box-sizing:border-box;min-width:180px;height:auto;padding-bottom:6px;position:relative;-webkit-user-select:none;user-select:none;line-height:initial;font-family:Arial}[_nghost-%COMP%]:hover{background:rgba(130,153,255,.8)}.selected[_nghost-%COMP%]{background:#ffd92c;border-color:#e3c000}[_nghost-%COMP%] .title[_ngcontent-%COMP%]{color:#fff;font-family:sans-serif;font-size:18px;padding:8px}[_nghost-%COMP%] .output[_ngcontent-%COMP%]{text-align:right}[_nghost-%COMP%] .input[_ngcontent-%COMP%]{text-align:left}[_nghost-%COMP%] .input-title[_ngcontent-%COMP%], [_nghost-%COMP%] .output-title[_ngcontent-%COMP%]{vertical-align:middle;color:#fff;display:inline-block;font-family:sans-serif;font-size:14px;margin:6px;line-height:24px}[_nghost-%COMP%] .input-title[hidden][_ngcontent-%COMP%], [_nghost-%COMP%] .output-title[hidden][_ngcontent-%COMP%]{display:none}[_nghost-%COMP%] .output-socket[_ngcontent-%COMP%]{text-align:right;margin-right:-18px;display:inline-block}[_nghost-%COMP%] .input-socket[_ngcontent-%COMP%]{text-align:left;margin-left:-18px;display:inline-block}[_nghost-%COMP%] .input-control[_ngcontent-%COMP%]{z-index:1;width:calc(100% - 36px);vertical-align:middle;display:inline-block}[_nghost-%COMP%] .control[_ngcontent-%COMP%]{padding:6px 18px}"] });
|
|
557
|
+
(function () {
|
|
558
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(NodeComponent, [{
|
|
559
|
+
type: i0.Component,
|
|
560
|
+
args: [{
|
|
561
|
+
templateUrl: './node.component.html',
|
|
562
|
+
styleUrls: ['./node.component.sass'],
|
|
563
|
+
host: {
|
|
564
|
+
'data-testid': 'node'
|
|
565
|
+
}
|
|
566
|
+
}]
|
|
567
|
+
}], function () { return [{ type: i0__namespace.ChangeDetectorRef }]; }, { data: [{
|
|
568
|
+
type: i0.Input
|
|
569
|
+
}], emit: [{
|
|
570
|
+
type: i0.Input
|
|
571
|
+
}], rendered: [{
|
|
572
|
+
type: i0.Input
|
|
573
|
+
}], selected: [{
|
|
574
|
+
type: i0.HostBinding,
|
|
575
|
+
args: ['class.selected']
|
|
576
|
+
}] });
|
|
577
|
+
})();
|
|
578
|
+
|
|
579
|
+
var SocketComponent = /** @class */ (function () {
|
|
580
|
+
function SocketComponent(cdr) {
|
|
581
|
+
this.cdr = cdr;
|
|
582
|
+
this.cdr.detach();
|
|
583
|
+
}
|
|
584
|
+
Object.defineProperty(SocketComponent.prototype, "title", {
|
|
585
|
+
get: function () {
|
|
586
|
+
return this.data.name;
|
|
587
|
+
},
|
|
588
|
+
enumerable: false,
|
|
589
|
+
configurable: true
|
|
590
|
+
});
|
|
591
|
+
SocketComponent.prototype.ngOnChanges = function () {
|
|
592
|
+
var _this = this;
|
|
593
|
+
this.cdr.detectChanges();
|
|
594
|
+
requestAnimationFrame(function () { return _this.rendered(); });
|
|
595
|
+
};
|
|
596
|
+
return SocketComponent;
|
|
597
|
+
}());
|
|
598
|
+
SocketComponent.ɵfac = function SocketComponent_Factory(t) { return new (t || SocketComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef)); };
|
|
599
|
+
SocketComponent.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: SocketComponent, selectors: [["ng-component"]], hostVars: 1, hostBindings: function SocketComponent_HostBindings(rf, ctx) {
|
|
600
|
+
if (rf & 2) {
|
|
601
|
+
i0__namespace.ɵɵhostProperty("title", ctx.title);
|
|
602
|
+
}
|
|
603
|
+
}, inputs: { data: "data", rendered: "rendered" }, features: [i0__namespace.ɵɵNgOnChangesFeature], decls: 0, vars: 0, template: function SocketComponent_Template(rf, ctx) { }, styles: ["[_nghost-%COMP%]{display:inline-block;cursor:pointer;border:1px solid white;border-radius:12px;width:24px;height:24px;margin:6px;vertical-align:middle;background:#96b38a;z-index:2;box-sizing:border-box}[_nghost-%COMP%]:hover{border-width:4px}.multiple[_nghost-%COMP%]{border-color:#ff0}.output[_nghost-%COMP%]{margin-right:-12px}.input[_nghost-%COMP%]{margin-left:-12px}"] });
|
|
604
|
+
(function () {
|
|
605
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(SocketComponent, [{
|
|
606
|
+
type: i0.Component,
|
|
607
|
+
args: [{
|
|
608
|
+
template: "",
|
|
609
|
+
styleUrls: ['./socket.component.sass']
|
|
610
|
+
}]
|
|
611
|
+
}], function () { return [{ type: i0__namespace.ChangeDetectorRef }]; }, { data: [{
|
|
612
|
+
type: i0.Input
|
|
613
|
+
}], rendered: [{
|
|
614
|
+
type: i0.Input
|
|
615
|
+
}], title: [{
|
|
616
|
+
type: i0.HostBinding,
|
|
617
|
+
args: ['title']
|
|
618
|
+
}] });
|
|
619
|
+
})();
|
|
620
|
+
|
|
621
|
+
var ControlComponent = /** @class */ (function () {
|
|
622
|
+
function ControlComponent(cdr) {
|
|
623
|
+
this.cdr = cdr;
|
|
624
|
+
this.cdr.detach();
|
|
625
|
+
}
|
|
626
|
+
ControlComponent.prototype.pointerdown = function (event) {
|
|
627
|
+
event.stopPropagation();
|
|
628
|
+
};
|
|
629
|
+
ControlComponent.prototype.ngOnChanges = function (changes) {
|
|
630
|
+
var _this = this;
|
|
631
|
+
var seed = changes['seed'];
|
|
632
|
+
var data = changes['data'];
|
|
633
|
+
if ((seed && seed.currentValue !== seed.previousValue)
|
|
634
|
+
|| (data && data.currentValue !== data.previousValue)) {
|
|
635
|
+
this.cdr.detectChanges();
|
|
636
|
+
}
|
|
637
|
+
requestAnimationFrame(function () { return _this.rendered(); });
|
|
638
|
+
};
|
|
639
|
+
ControlComponent.prototype.onChange = function (e) {
|
|
640
|
+
var target = e.target;
|
|
641
|
+
var value = (this.data.type === 'number'
|
|
642
|
+
? +target.value
|
|
643
|
+
: target.value);
|
|
644
|
+
this.data.setValue(value);
|
|
645
|
+
this.cdr.detectChanges();
|
|
646
|
+
};
|
|
647
|
+
return ControlComponent;
|
|
648
|
+
}());
|
|
649
|
+
ControlComponent.ɵfac = function ControlComponent_Factory(t) { return new (t || ControlComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef)); };
|
|
650
|
+
ControlComponent.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: ControlComponent, selectors: [["ng-component"]], hostBindings: function ControlComponent_HostBindings(rf, ctx) {
|
|
651
|
+
if (rf & 1) {
|
|
652
|
+
i0__namespace.ɵɵlistener("pointerdown", function ControlComponent_pointerdown_HostBindingHandler($event) { return ctx.pointerdown($event); });
|
|
653
|
+
}
|
|
654
|
+
}, inputs: { data: "data", rendered: "rendered" }, features: [i0__namespace.ɵɵNgOnChangesFeature], decls: 1, vars: 3, consts: [[3, "value", "readonly", "type", "input"]], template: function ControlComponent_Template(rf, ctx) {
|
|
655
|
+
if (rf & 1) {
|
|
656
|
+
i0__namespace.ɵɵelementStart(0, "input", 0);
|
|
657
|
+
i0__namespace.ɵɵlistener("input", function ControlComponent_Template_input_input_0_listener($event) { return ctx.onChange($event); });
|
|
658
|
+
i0__namespace.ɵɵelementEnd();
|
|
659
|
+
}
|
|
660
|
+
if (rf & 2) {
|
|
661
|
+
i0__namespace.ɵɵproperty("value", ctx.data.value)("readonly", ctx.data.readonly)("type", ctx.data.type);
|
|
662
|
+
}
|
|
663
|
+
}, styles: ["input[_ngcontent-%COMP%]{width:130px;border-radius:30px;background-color:#fff;padding:2px 6px;border:1px solid #999;font-size:110%}"] });
|
|
664
|
+
(function () {
|
|
665
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ControlComponent, [{
|
|
666
|
+
type: i0.Component,
|
|
667
|
+
args: [{
|
|
668
|
+
templateUrl: "./control.component.html",
|
|
669
|
+
styleUrls: ['./control.component.sass']
|
|
670
|
+
}]
|
|
671
|
+
}], function () { return [{ type: i0__namespace.ChangeDetectorRef }]; }, { data: [{
|
|
672
|
+
type: i0.Input
|
|
673
|
+
}], rendered: [{
|
|
674
|
+
type: i0.Input
|
|
675
|
+
}], pointerdown: [{
|
|
676
|
+
type: i0.HostListener,
|
|
677
|
+
args: ['pointerdown', ['$event']]
|
|
678
|
+
}] });
|
|
679
|
+
})();
|
|
680
|
+
|
|
681
|
+
var ConnectionComponent = /** @class */ (function () {
|
|
682
|
+
function ConnectionComponent() {
|
|
683
|
+
}
|
|
684
|
+
return ConnectionComponent;
|
|
685
|
+
}());
|
|
686
|
+
ConnectionComponent.ɵfac = function ConnectionComponent_Factory(t) { return new (t || ConnectionComponent)(); };
|
|
687
|
+
ConnectionComponent.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: ConnectionComponent, selectors: [["connection"]], inputs: { data: "data", start: "start", end: "end", path: "path" }, decls: 2, vars: 1, consts: [["data-testid", "connection"]], template: function ConnectionComponent_Template(rf, ctx) {
|
|
688
|
+
if (rf & 1) {
|
|
689
|
+
i0__namespace.ɵɵnamespaceSVG();
|
|
690
|
+
i0__namespace.ɵɵelementStart(0, "svg", 0);
|
|
691
|
+
i0__namespace.ɵɵelement(1, "path");
|
|
692
|
+
i0__namespace.ɵɵelementEnd();
|
|
693
|
+
}
|
|
694
|
+
if (rf & 2) {
|
|
695
|
+
i0__namespace.ɵɵadvance(1);
|
|
696
|
+
i0__namespace.ɵɵattribute("d", ctx.path);
|
|
697
|
+
}
|
|
698
|
+
}, styles: ["svg[_ngcontent-%COMP%]{overflow:visible!important;position:absolute;pointer-events:none;width:9999px;height:9999px}svg[_ngcontent-%COMP%] path[_ngcontent-%COMP%]{fill:none;stroke-width:5px;stroke:#4682b4;pointer-events:auto}"] });
|
|
699
|
+
(function () {
|
|
700
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ConnectionComponent, [{
|
|
701
|
+
type: i0.Component,
|
|
702
|
+
args: [{
|
|
703
|
+
selector: 'connection',
|
|
704
|
+
templateUrl: './connection.component.html',
|
|
705
|
+
styleUrls: ['./connection.component.sass']
|
|
706
|
+
}]
|
|
707
|
+
}], null, { data: [{
|
|
708
|
+
type: i0.Input
|
|
709
|
+
}], start: [{
|
|
710
|
+
type: i0.Input
|
|
711
|
+
}], end: [{
|
|
712
|
+
type: i0.Input
|
|
713
|
+
}], path: [{
|
|
714
|
+
type: i0.Input
|
|
715
|
+
}] });
|
|
716
|
+
})();
|
|
717
|
+
|
|
718
|
+
var ConnectionWrapperComponent = /** @class */ (function () {
|
|
719
|
+
function ConnectionWrapperComponent(cdr, viewContainerRef, componentFactoryResolver) {
|
|
720
|
+
this.cdr = cdr;
|
|
721
|
+
this.viewContainerRef = viewContainerRef;
|
|
722
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
723
|
+
this.startOb = null;
|
|
724
|
+
this.endOb = null;
|
|
725
|
+
this.cdr.detach();
|
|
726
|
+
}
|
|
727
|
+
Object.defineProperty(ConnectionWrapperComponent.prototype, "_start", {
|
|
728
|
+
get: function () {
|
|
729
|
+
return 'x' in this.start ? this.start : this.startOb;
|
|
730
|
+
},
|
|
731
|
+
enumerable: false,
|
|
732
|
+
configurable: true
|
|
733
|
+
});
|
|
734
|
+
Object.defineProperty(ConnectionWrapperComponent.prototype, "_end", {
|
|
735
|
+
get: function () {
|
|
736
|
+
return 'x' in this.end ? this.end : this.endOb;
|
|
737
|
+
},
|
|
738
|
+
enumerable: false,
|
|
739
|
+
configurable: true
|
|
740
|
+
});
|
|
741
|
+
ConnectionWrapperComponent.prototype.ngOnChanges = function () {
|
|
742
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
743
|
+
var _this = this;
|
|
744
|
+
return __generator(this, function (_a) {
|
|
745
|
+
switch (_a.label) {
|
|
746
|
+
case 0: return [4 /*yield*/, this.updatePath()];
|
|
747
|
+
case 1:
|
|
748
|
+
_a.sent();
|
|
749
|
+
requestAnimationFrame(function () { return _this.rendered(); });
|
|
750
|
+
this.cdr.detectChanges();
|
|
751
|
+
this.update();
|
|
752
|
+
return [2 /*return*/];
|
|
753
|
+
}
|
|
754
|
+
});
|
|
755
|
+
});
|
|
756
|
+
};
|
|
757
|
+
ConnectionWrapperComponent.prototype.updatePath = function () {
|
|
758
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
759
|
+
var _a;
|
|
760
|
+
return __generator(this, function (_b) {
|
|
761
|
+
switch (_b.label) {
|
|
762
|
+
case 0:
|
|
763
|
+
if (!(this._start && this._end)) return [3 /*break*/, 2];
|
|
764
|
+
_a = this;
|
|
765
|
+
return [4 /*yield*/, this.path(this._start, this._end)];
|
|
766
|
+
case 1:
|
|
767
|
+
_a._path = _b.sent();
|
|
768
|
+
_b.label = 2;
|
|
769
|
+
case 2: return [2 /*return*/];
|
|
770
|
+
}
|
|
771
|
+
});
|
|
772
|
+
});
|
|
773
|
+
};
|
|
774
|
+
ConnectionWrapperComponent.prototype.ngOnInit = function () {
|
|
775
|
+
var _this = this;
|
|
776
|
+
if (typeof this.start === 'function') {
|
|
777
|
+
this.start(function (value) { return __awaiter(_this, void 0, void 0, function () {
|
|
778
|
+
return __generator(this, function (_a) {
|
|
779
|
+
switch (_a.label) {
|
|
780
|
+
case 0:
|
|
781
|
+
this.startOb = value;
|
|
782
|
+
return [4 /*yield*/, this.updatePath()];
|
|
783
|
+
case 1:
|
|
784
|
+
_a.sent();
|
|
785
|
+
this.cdr.detectChanges();
|
|
786
|
+
this.update();
|
|
787
|
+
return [2 /*return*/];
|
|
788
|
+
}
|
|
789
|
+
});
|
|
790
|
+
}); });
|
|
791
|
+
}
|
|
792
|
+
if (typeof this.end === 'function') {
|
|
793
|
+
this.end(function (value) { return __awaiter(_this, void 0, void 0, function () {
|
|
794
|
+
return __generator(this, function (_a) {
|
|
795
|
+
switch (_a.label) {
|
|
796
|
+
case 0:
|
|
797
|
+
this.endOb = value;
|
|
798
|
+
return [4 /*yield*/, this.updatePath()];
|
|
799
|
+
case 1:
|
|
800
|
+
_a.sent();
|
|
801
|
+
this.cdr.detectChanges();
|
|
802
|
+
this.update();
|
|
803
|
+
return [2 /*return*/];
|
|
804
|
+
}
|
|
805
|
+
});
|
|
806
|
+
}); });
|
|
807
|
+
}
|
|
808
|
+
var componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.connectionComponent);
|
|
809
|
+
this.viewContainerRef.clear();
|
|
810
|
+
this.ref = this.viewContainerRef.createComponent(componentFactory);
|
|
811
|
+
this.update();
|
|
812
|
+
};
|
|
813
|
+
ConnectionWrapperComponent.prototype.update = function () {
|
|
814
|
+
this.ref.instance.data = this.data;
|
|
815
|
+
this.ref.instance.start = this._start;
|
|
816
|
+
this.ref.instance.end = this._end;
|
|
817
|
+
this.ref.instance.path = this._path;
|
|
818
|
+
};
|
|
819
|
+
return ConnectionWrapperComponent;
|
|
820
|
+
}());
|
|
821
|
+
ConnectionWrapperComponent.ɵfac = function ConnectionWrapperComponent_Factory(t) { return new (t || ConnectionWrapperComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef), i0__namespace.ɵɵdirectiveInject(i0__namespace.ViewContainerRef), i0__namespace.ɵɵdirectiveInject(i0__namespace.ComponentFactoryResolver)); };
|
|
822
|
+
ConnectionWrapperComponent.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: ConnectionWrapperComponent, selectors: [["ng-component"]], inputs: { data: "data", start: "start", end: "end", path: "path", rendered: "rendered", connectionComponent: "connectionComponent" }, features: [i0__namespace.ɵɵNgOnChangesFeature], decls: 0, vars: 0, template: function ConnectionWrapperComponent_Template(rf, ctx) { }, encapsulation: 2 });
|
|
823
|
+
(function () {
|
|
824
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ConnectionWrapperComponent, [{
|
|
825
|
+
type: i0.Component,
|
|
826
|
+
args: [{
|
|
827
|
+
template: ''
|
|
828
|
+
}]
|
|
829
|
+
}], function () { return [{ type: i0__namespace.ChangeDetectorRef }, { type: i0__namespace.ViewContainerRef }, { type: i0__namespace.ComponentFactoryResolver }]; }, { data: [{
|
|
830
|
+
type: i0.Input
|
|
831
|
+
}], start: [{
|
|
832
|
+
type: i0.Input
|
|
833
|
+
}], end: [{
|
|
834
|
+
type: i0.Input
|
|
835
|
+
}], path: [{
|
|
836
|
+
type: i0.Input
|
|
837
|
+
}], rendered: [{
|
|
838
|
+
type: i0.Input
|
|
839
|
+
}], connectionComponent: [{
|
|
840
|
+
type: i0.Input
|
|
841
|
+
}] });
|
|
842
|
+
})();
|
|
843
|
+
|
|
844
|
+
function setup$3(props) {
|
|
845
|
+
var positionWatcher = typeof (props === null || props === void 0 ? void 0 : props.socketPositionWatcher) === 'undefined'
|
|
846
|
+
? reteRenderUtils.getDOMSocketPosition() // fix Type instantiation is excessively deep and possibly infinite.
|
|
847
|
+
: props === null || props === void 0 ? void 0 : props.socketPositionWatcher;
|
|
848
|
+
var _a = (props === null || props === void 0 ? void 0 : props.customize) || {}, node = _a.node, connection = _a.connection, socket = _a.socket, control = _a.control;
|
|
849
|
+
return {
|
|
850
|
+
attach: function (plugin) {
|
|
851
|
+
positionWatcher.attach(plugin);
|
|
852
|
+
},
|
|
853
|
+
update: function (context) {
|
|
854
|
+
var data = context.data.payload;
|
|
855
|
+
if (context.data.type === 'connection') {
|
|
856
|
+
var _a = context.data, start = _a.start, end = _a.end;
|
|
857
|
+
return Object.assign(Object.assign({ data: data }, (start ? { start: start } : {})), (end ? { end: end } : {}));
|
|
858
|
+
}
|
|
859
|
+
return { data: data };
|
|
860
|
+
},
|
|
861
|
+
mount: function (context, plugin) {
|
|
862
|
+
var _this = this;
|
|
863
|
+
var parent = plugin.parentScope();
|
|
864
|
+
var emit = parent.emit.bind(parent);
|
|
865
|
+
var rendered = function () {
|
|
866
|
+
emit({ type: 'rendered', data: context.data });
|
|
867
|
+
};
|
|
868
|
+
if (context.data.type === 'node') {
|
|
869
|
+
var component = node ? node(context.data) : NodeComponent;
|
|
870
|
+
return {
|
|
871
|
+
key: "node-" + context.data.payload.id,
|
|
872
|
+
component: component,
|
|
873
|
+
props: {
|
|
874
|
+
data: context.data.payload,
|
|
875
|
+
emit: emit,
|
|
876
|
+
rendered: rendered
|
|
877
|
+
}
|
|
878
|
+
};
|
|
879
|
+
}
|
|
880
|
+
if (context.data.type === 'connection') {
|
|
881
|
+
var component = connection ? connection(context.data) : ConnectionComponent;
|
|
882
|
+
var id = context.data.payload.id;
|
|
883
|
+
var _a = context.data.payload, sourceOutput_1 = _a.sourceOutput, targetInput_1 = _a.targetInput, source_1 = _a.source, target_1 = _a.target;
|
|
884
|
+
var _b = context.data, start = _b.start, end = _b.end, payload_1 = _b.payload;
|
|
885
|
+
return {
|
|
886
|
+
key: "connection-" + id,
|
|
887
|
+
component: ConnectionWrapperComponent,
|
|
888
|
+
props: {
|
|
889
|
+
connectionComponent: component,
|
|
890
|
+
data: payload_1,
|
|
891
|
+
start: start || (function (change) { return positionWatcher.listen(source_1, 'output', sourceOutput_1, change); }),
|
|
892
|
+
end: end || (function (change) { return positionWatcher.listen(target_1, 'input', targetInput_1, change); }),
|
|
893
|
+
path: function (start, end) { return __awaiter(_this, void 0, void 0, function () {
|
|
894
|
+
var response, _a, path, points, curvature;
|
|
895
|
+
return __generator(this, function (_b) {
|
|
896
|
+
switch (_b.label) {
|
|
897
|
+
case 0: return [4 /*yield*/, plugin.emit({ type: 'connectionpath', data: { payload: payload_1, points: [start, end] } })];
|
|
898
|
+
case 1:
|
|
899
|
+
response = _b.sent();
|
|
900
|
+
if (!response)
|
|
901
|
+
return [2 /*return*/, ''];
|
|
902
|
+
_a = response.data, path = _a.path, points = _a.points;
|
|
903
|
+
curvature = 0.3;
|
|
904
|
+
if (!path && points.length !== 2)
|
|
905
|
+
throw new Error('cannot render connection with a custom number of points');
|
|
906
|
+
if (!path)
|
|
907
|
+
return [2 /*return*/, payload_1.isLoop
|
|
908
|
+
? reteRenderUtils.loopConnectionPath(points, curvature, 120)
|
|
909
|
+
: reteRenderUtils.classicConnectionPath(points, curvature)];
|
|
910
|
+
return [2 /*return*/, path];
|
|
911
|
+
}
|
|
912
|
+
});
|
|
913
|
+
}); },
|
|
914
|
+
rendered: rendered
|
|
915
|
+
}
|
|
916
|
+
};
|
|
917
|
+
}
|
|
918
|
+
if (context.data.type === 'socket') {
|
|
919
|
+
var component = socket ? socket(context.data) : SocketComponent;
|
|
920
|
+
return {
|
|
921
|
+
key: "socket-" + rete.getUID(),
|
|
922
|
+
component: component,
|
|
923
|
+
props: {
|
|
924
|
+
data: context.data.payload,
|
|
925
|
+
rendered: rendered
|
|
926
|
+
}
|
|
927
|
+
};
|
|
928
|
+
}
|
|
929
|
+
if (context.data.type === 'control') {
|
|
930
|
+
var component = control
|
|
931
|
+
? control(context.data)
|
|
932
|
+
: (context.data.payload instanceof rete.ClassicPreset.InputControl
|
|
933
|
+
? ControlComponent
|
|
934
|
+
: null);
|
|
935
|
+
if (component) {
|
|
936
|
+
return {
|
|
937
|
+
key: "control-" + context.data.payload.id,
|
|
938
|
+
component: component,
|
|
939
|
+
props: {
|
|
940
|
+
data: context.data.payload,
|
|
941
|
+
rendered: rendered
|
|
942
|
+
}
|
|
943
|
+
};
|
|
944
|
+
}
|
|
945
|
+
return;
|
|
946
|
+
}
|
|
947
|
+
return;
|
|
948
|
+
}
|
|
949
|
+
};
|
|
950
|
+
}
|
|
951
|
+
|
|
952
|
+
var index$4 = /*#__PURE__*/Object.freeze({
|
|
953
|
+
__proto__: null,
|
|
954
|
+
setup: setup$3
|
|
955
|
+
});
|
|
956
|
+
|
|
957
|
+
function debounce(cb) {
|
|
958
|
+
return {
|
|
959
|
+
timeout: null,
|
|
960
|
+
cancel: function () {
|
|
961
|
+
if (this.timeout) {
|
|
962
|
+
window.clearTimeout(this.timeout);
|
|
963
|
+
this.timeout = null;
|
|
964
|
+
}
|
|
965
|
+
},
|
|
966
|
+
call: function (delay) {
|
|
967
|
+
this.timeout = window.setTimeout(function () {
|
|
968
|
+
cb();
|
|
969
|
+
}, delay);
|
|
970
|
+
}
|
|
971
|
+
};
|
|
972
|
+
}
|
|
973
|
+
|
|
974
|
+
var ContextMenuSearchComponent = /** @class */ (function () {
|
|
975
|
+
function ContextMenuSearchComponent() {
|
|
976
|
+
this.update = new i0.EventEmitter();
|
|
977
|
+
}
|
|
978
|
+
return ContextMenuSearchComponent;
|
|
979
|
+
}());
|
|
980
|
+
ContextMenuSearchComponent.ɵfac = function ContextMenuSearchComponent_Factory(t) { return new (t || ContextMenuSearchComponent)(); };
|
|
981
|
+
ContextMenuSearchComponent.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: ContextMenuSearchComponent, selectors: [["context-menu-search"]], inputs: { value: "value" }, outputs: { update: "update" }, decls: 1, vars: 1, consts: [["data-testid", "context-menu-search-input", 1, "search", 3, "value", "input"]], template: function ContextMenuSearchComponent_Template(rf, ctx) {
|
|
982
|
+
if (rf & 1) {
|
|
983
|
+
i0__namespace.ɵɵelementStart(0, "input", 0);
|
|
984
|
+
i0__namespace.ɵɵlistener("input", function ContextMenuSearchComponent_Template_input_input_0_listener($event) { var tmp_b_0; return ctx.update.emit(((tmp_b_0 = $event.target) == null ? null : tmp_b_0.value) || ""); });
|
|
985
|
+
i0__namespace.ɵɵelementEnd();
|
|
986
|
+
}
|
|
987
|
+
if (rf & 2) {
|
|
988
|
+
i0__namespace.ɵɵproperty("value", ctx.value);
|
|
989
|
+
}
|
|
990
|
+
}, styles: [".search[_ngcontent-%COMP%]{color:#fff;padding:1px 8px;border:1px solid white;border-radius:10px;font-size:16px;font-family:serif;width:100%;box-sizing:border-box;background:transparent}"] });
|
|
991
|
+
(function () {
|
|
992
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ContextMenuSearchComponent, [{
|
|
993
|
+
type: i0.Component,
|
|
994
|
+
args: [{
|
|
995
|
+
selector: 'context-menu-search',
|
|
996
|
+
templateUrl: './search.component.html',
|
|
997
|
+
styleUrls: ['./search.component.sass']
|
|
998
|
+
}]
|
|
999
|
+
}], null, { value: [{
|
|
1000
|
+
type: i0.Input
|
|
1001
|
+
}], update: [{
|
|
1002
|
+
type: i0.Output
|
|
1003
|
+
}] });
|
|
1004
|
+
})();
|
|
1005
|
+
|
|
1006
|
+
function ContextMenuItemComponent_div_1_context_menu_item_1_Template(rf, ctx) {
|
|
1007
|
+
if (rf & 1) {
|
|
1008
|
+
var _r4_1 = i0__namespace.ɵɵgetCurrentView();
|
|
1009
|
+
i0__namespace.ɵɵelementStart(0, "context-menu-item", 3);
|
|
1010
|
+
i0__namespace.ɵɵlistener("select", function ContextMenuItemComponent_div_1_context_menu_item_1_Template_context_menu_item_select_0_listener() { var restoredCtx = i0__namespace.ɵɵrestoreView(_r4_1); var item_r2 = restoredCtx.$implicit; return item_r2.handler(); })("hide", function ContextMenuItemComponent_div_1_context_menu_item_1_Template_context_menu_item_hide_0_listener() { i0__namespace.ɵɵrestoreView(_r4_1); var ctx_r5 = i0__namespace.ɵɵnextContext(2); return ctx_r5.hide.emit(); });
|
|
1011
|
+
i0__namespace.ɵɵtext(1);
|
|
1012
|
+
i0__namespace.ɵɵelementEnd();
|
|
1013
|
+
}
|
|
1014
|
+
if (rf & 2) {
|
|
1015
|
+
var item_r2 = ctx.$implicit;
|
|
1016
|
+
var ctx_r1 = i0__namespace.ɵɵnextContext(2);
|
|
1017
|
+
i0__namespace.ɵɵproperty("delay", ctx_r1.delay);
|
|
1018
|
+
i0__namespace.ɵɵadvance(1);
|
|
1019
|
+
i0__namespace.ɵɵtextInterpolate1(" ", item_r2.label, " ");
|
|
1020
|
+
}
|
|
1021
|
+
}
|
|
1022
|
+
function ContextMenuItemComponent_div_1_Template(rf, ctx) {
|
|
1023
|
+
if (rf & 1) {
|
|
1024
|
+
i0__namespace.ɵɵelementStart(0, "div", 1);
|
|
1025
|
+
i0__namespace.ɵɵtemplate(1, ContextMenuItemComponent_div_1_context_menu_item_1_Template, 2, 2, "context-menu-item", 2);
|
|
1026
|
+
i0__namespace.ɵɵelementEnd();
|
|
1027
|
+
}
|
|
1028
|
+
if (rf & 2) {
|
|
1029
|
+
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
1030
|
+
i0__namespace.ɵɵadvance(1);
|
|
1031
|
+
i0__namespace.ɵɵproperty("ngForOf", ctx_r0.subitems);
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1034
|
+
var _c0 = ["*"];
|
|
1035
|
+
var ContextMenuItemComponent = /** @class */ (function () {
|
|
1036
|
+
function ContextMenuItemComponent(cdr) {
|
|
1037
|
+
var _this = this;
|
|
1038
|
+
this.cdr = cdr;
|
|
1039
|
+
this.select = new i0.EventEmitter();
|
|
1040
|
+
this.hide = new i0.EventEmitter();
|
|
1041
|
+
this.hideSubitems = debounce(function () {
|
|
1042
|
+
_this.visibleSubitems = false;
|
|
1043
|
+
_this.cdr.detectChanges();
|
|
1044
|
+
});
|
|
1045
|
+
this.visibleSubitems = false;
|
|
1046
|
+
this.cdr.detach();
|
|
1047
|
+
}
|
|
1048
|
+
Object.defineProperty(ContextMenuItemComponent.prototype, "block", {
|
|
1049
|
+
get: function () { return true; },
|
|
1050
|
+
enumerable: false,
|
|
1051
|
+
configurable: true
|
|
1052
|
+
});
|
|
1053
|
+
Object.defineProperty(ContextMenuItemComponent.prototype, "hasSubitems", {
|
|
1054
|
+
get: function () { return this.subitems; },
|
|
1055
|
+
enumerable: false,
|
|
1056
|
+
configurable: true
|
|
1057
|
+
});
|
|
1058
|
+
ContextMenuItemComponent.prototype.click = function (event) {
|
|
1059
|
+
event.stopPropagation();
|
|
1060
|
+
this.select.emit();
|
|
1061
|
+
this.hide.emit();
|
|
1062
|
+
};
|
|
1063
|
+
ContextMenuItemComponent.prototype.pointerdown = function (event) {
|
|
1064
|
+
event.stopPropagation();
|
|
1065
|
+
};
|
|
1066
|
+
ContextMenuItemComponent.prototype.wheel = function (event) {
|
|
1067
|
+
event.stopPropagation();
|
|
1068
|
+
};
|
|
1069
|
+
ContextMenuItemComponent.prototype.pointerover = function () {
|
|
1070
|
+
this.hideSubitems.cancel();
|
|
1071
|
+
this.visibleSubitems = true;
|
|
1072
|
+
this.cdr.detectChanges();
|
|
1073
|
+
};
|
|
1074
|
+
ContextMenuItemComponent.prototype.pointerleave = function () {
|
|
1075
|
+
this.hideSubitems.call(this.delay);
|
|
1076
|
+
this.cdr.detectChanges();
|
|
1077
|
+
};
|
|
1078
|
+
return ContextMenuItemComponent;
|
|
1079
|
+
}());
|
|
1080
|
+
ContextMenuItemComponent.ɵfac = function ContextMenuItemComponent_Factory(t) { return new (t || ContextMenuItemComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef)); };
|
|
1081
|
+
ContextMenuItemComponent.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: ContextMenuItemComponent, selectors: [["context-menu-item"]], hostAttrs: ["data-testid", "context-menu-item"], hostVars: 4, hostBindings: function ContextMenuItemComponent_HostBindings(rf, ctx) {
|
|
1082
|
+
if (rf & 1) {
|
|
1083
|
+
i0__namespace.ɵɵlistener("click", function ContextMenuItemComponent_click_HostBindingHandler($event) { return ctx.click($event); })("pointerdown", function ContextMenuItemComponent_pointerdown_HostBindingHandler($event) { return ctx.pointerdown($event); })("wheel", function ContextMenuItemComponent_wheel_HostBindingHandler($event) { return ctx.wheel($event); })("pointerover", function ContextMenuItemComponent_pointerover_HostBindingHandler() { return ctx.pointerover(); })("pointerleave", function ContextMenuItemComponent_pointerleave_HostBindingHandler() { return ctx.pointerleave(); });
|
|
1084
|
+
}
|
|
1085
|
+
if (rf & 2) {
|
|
1086
|
+
i0__namespace.ɵɵclassProp("block", ctx.block)("hasSubitems", ctx.hasSubitems);
|
|
1087
|
+
}
|
|
1088
|
+
}, inputs: { subitems: "subitems", delay: "delay" }, outputs: { select: "select", hide: "hide" }, ngContentSelectors: _c0, decls: 2, vars: 1, consts: [["class", "subitems", 4, "ngIf"], [1, "subitems"], [3, "delay", "select", "hide", 4, "ngFor", "ngForOf"], [3, "delay", "select", "hide"]], template: function ContextMenuItemComponent_Template(rf, ctx) {
|
|
1089
|
+
if (rf & 1) {
|
|
1090
|
+
i0__namespace.ɵɵprojectionDef();
|
|
1091
|
+
i0__namespace.ɵɵprojection(0);
|
|
1092
|
+
i0__namespace.ɵɵtemplate(1, ContextMenuItemComponent_div_1_Template, 2, 1, "div", 0);
|
|
1093
|
+
}
|
|
1094
|
+
if (rf & 2) {
|
|
1095
|
+
i0__namespace.ɵɵadvance(1);
|
|
1096
|
+
i0__namespace.ɵɵproperty("ngIf", ctx.subitems && ctx.visibleSubitems);
|
|
1097
|
+
}
|
|
1098
|
+
}, directives: [i1__namespace.NgIf, i1__namespace.NgForOf, ContextMenuItemComponent], styles: ["@charset \"UTF-8\";.hasSubitems[_nghost-%COMP%]:after{content:\"\\25ba\";position:absolute;opacity:.6;right:5px;top:5px;font-family:initial}.subitems[_ngcontent-%COMP%]{position:absolute;top:0;left:100%;width:120px}", ".block[_ngcontent-%COMP%]{display:block;color:#fff;padding:4px;border-bottom:1px solid rgba(69,103,255,.8);background-color:#6e88ffcc;cursor:pointer;width:100%;position:relative}.block[_ngcontent-%COMP%]:first-child{border-top-left-radius:5px;border-top-right-radius:5px}.block[_ngcontent-%COMP%]:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}.block[_ngcontent-%COMP%]:hover{background-color:#8299ffcc}"] });
|
|
1099
|
+
(function () {
|
|
1100
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ContextMenuItemComponent, [{
|
|
1101
|
+
type: i0.Component,
|
|
1102
|
+
args: [{
|
|
1103
|
+
selector: 'context-menu-item',
|
|
1104
|
+
templateUrl: './item.component.html',
|
|
1105
|
+
styleUrls: ['./item.component.sass', '../../block.sass'],
|
|
1106
|
+
host: {
|
|
1107
|
+
'data-testid': 'context-menu-item'
|
|
1108
|
+
}
|
|
1109
|
+
}]
|
|
1110
|
+
}], function () { return [{ type: i0__namespace.ChangeDetectorRef }]; }, { subitems: [{
|
|
1111
|
+
type: i0.Input
|
|
1112
|
+
}], delay: [{
|
|
1113
|
+
type: i0.Input
|
|
1114
|
+
}], select: [{
|
|
1115
|
+
type: i0.Output
|
|
1116
|
+
}], hide: [{
|
|
1117
|
+
type: i0.Output
|
|
1118
|
+
}], block: [{
|
|
1119
|
+
type: i0.HostBinding,
|
|
1120
|
+
args: ['class.block']
|
|
1121
|
+
}], hasSubitems: [{
|
|
1122
|
+
type: i0.HostBinding,
|
|
1123
|
+
args: ['class.hasSubitems']
|
|
1124
|
+
}], click: [{
|
|
1125
|
+
type: i0.HostListener,
|
|
1126
|
+
args: ['click', ['$event']]
|
|
1127
|
+
}], pointerdown: [{
|
|
1128
|
+
type: i0.HostListener,
|
|
1129
|
+
args: ['pointerdown', ['$event']]
|
|
1130
|
+
}], wheel: [{
|
|
1131
|
+
type: i0.HostListener,
|
|
1132
|
+
args: ['wheel', ['$event']]
|
|
1133
|
+
}], pointerover: [{
|
|
1134
|
+
type: i0.HostListener,
|
|
1135
|
+
args: ['pointerover']
|
|
1136
|
+
}], pointerleave: [{
|
|
1137
|
+
type: i0.HostListener,
|
|
1138
|
+
args: ['pointerleave']
|
|
1139
|
+
}] });
|
|
1140
|
+
})();
|
|
1141
|
+
|
|
1142
|
+
function ContextMenuComponent_div_0_Template(rf, ctx) {
|
|
1143
|
+
if (rf & 1) {
|
|
1144
|
+
var _r3_1 = i0__namespace.ɵɵgetCurrentView();
|
|
1145
|
+
i0__namespace.ɵɵelementStart(0, "div", 2);
|
|
1146
|
+
i0__namespace.ɵɵelementStart(1, "context-menu-search", 3);
|
|
1147
|
+
i0__namespace.ɵɵlistener("update", function ContextMenuComponent_div_0_Template_context_menu_search_update_1_listener($event) { i0__namespace.ɵɵrestoreView(_r3_1); var ctx_r2 = i0__namespace.ɵɵnextContext(); return ctx_r2.setFilter($event); });
|
|
1148
|
+
i0__namespace.ɵɵelementEnd();
|
|
1149
|
+
i0__namespace.ɵɵelementEnd();
|
|
1150
|
+
}
|
|
1151
|
+
if (rf & 2) {
|
|
1152
|
+
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
1153
|
+
i0__namespace.ɵɵadvance(1);
|
|
1154
|
+
i0__namespace.ɵɵproperty("value", ctx_r0.filter);
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
function ContextMenuComponent_context_menu_item_1_Template(rf, ctx) {
|
|
1158
|
+
if (rf & 1) {
|
|
1159
|
+
var _r6_1 = i0__namespace.ɵɵgetCurrentView();
|
|
1160
|
+
i0__namespace.ɵɵelementStart(0, "context-menu-item", 4);
|
|
1161
|
+
i0__namespace.ɵɵlistener("select", function ContextMenuComponent_context_menu_item_1_Template_context_menu_item_select_0_listener() { var restoredCtx = i0__namespace.ɵɵrestoreView(_r6_1); var item_r4 = restoredCtx.$implicit; return item_r4.handler(); })("hide", function ContextMenuComponent_context_menu_item_1_Template_context_menu_item_hide_0_listener() { i0__namespace.ɵɵrestoreView(_r6_1); var ctx_r7 = i0__namespace.ɵɵnextContext(); return ctx_r7.onHide(); });
|
|
1162
|
+
i0__namespace.ɵɵtext(1);
|
|
1163
|
+
i0__namespace.ɵɵelementEnd();
|
|
1164
|
+
}
|
|
1165
|
+
if (rf & 2) {
|
|
1166
|
+
var item_r4 = ctx.$implicit;
|
|
1167
|
+
var ctx_r1 = i0__namespace.ɵɵnextContext();
|
|
1168
|
+
i0__namespace.ɵɵproperty("delay", ctx_r1.delay)("subitems", item_r4.subitems);
|
|
1169
|
+
i0__namespace.ɵɵadvance(1);
|
|
1170
|
+
i0__namespace.ɵɵtextInterpolate1(" ", item_r4.label, "\n");
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
var ContextMenuComponent = /** @class */ (function () {
|
|
1174
|
+
function ContextMenuComponent(cdr) {
|
|
1175
|
+
var _this = this;
|
|
1176
|
+
this.cdr = cdr;
|
|
1177
|
+
this.filter = '';
|
|
1178
|
+
this.hide = debounce(function () {
|
|
1179
|
+
_this.onHide();
|
|
1180
|
+
_this.cdr.detectChanges();
|
|
1181
|
+
});
|
|
1182
|
+
this.customAttribute = '';
|
|
1183
|
+
this.cdr.detach();
|
|
1184
|
+
}
|
|
1185
|
+
ContextMenuComponent.prototype.pointerover = function () {
|
|
1186
|
+
this.hide.cancel();
|
|
1187
|
+
this.cdr.detectChanges();
|
|
1188
|
+
};
|
|
1189
|
+
ContextMenuComponent.prototype.pointerleave = function () {
|
|
1190
|
+
this.hide.call(this.delay);
|
|
1191
|
+
this.cdr.detectChanges();
|
|
1192
|
+
};
|
|
1193
|
+
ContextMenuComponent.prototype.ngOnChanges = function () {
|
|
1194
|
+
var _this = this;
|
|
1195
|
+
this.cdr.detectChanges();
|
|
1196
|
+
requestAnimationFrame(function () { return _this.rendered(); });
|
|
1197
|
+
};
|
|
1198
|
+
ContextMenuComponent.prototype.setFilter = function (value) {
|
|
1199
|
+
this.filter = value;
|
|
1200
|
+
this.cdr.detectChanges();
|
|
1201
|
+
};
|
|
1202
|
+
ContextMenuComponent.prototype.getItems = function () {
|
|
1203
|
+
var filterRegexp = new RegExp(this.filter, 'i');
|
|
1204
|
+
var filteredList = this.items.filter(function (item) { return (item.label.match(filterRegexp)); });
|
|
1205
|
+
return filteredList;
|
|
1206
|
+
};
|
|
1207
|
+
ContextMenuComponent.prototype.ngOnDestroy = function () {
|
|
1208
|
+
if (this.hide)
|
|
1209
|
+
this.hide.cancel();
|
|
1210
|
+
};
|
|
1211
|
+
return ContextMenuComponent;
|
|
1212
|
+
}());
|
|
1213
|
+
ContextMenuComponent.ɵfac = function ContextMenuComponent_Factory(t) { return new (t || ContextMenuComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef)); };
|
|
1214
|
+
ContextMenuComponent.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: ContextMenuComponent, selectors: [["ng-component"]], hostAttrs: ["data-testid", "context-menu"], hostVars: 1, hostBindings: function ContextMenuComponent_HostBindings(rf, ctx) {
|
|
1215
|
+
if (rf & 1) {
|
|
1216
|
+
i0__namespace.ɵɵlistener("mouseover", function ContextMenuComponent_mouseover_HostBindingHandler() { return ctx.pointerover(); })("mouseleave", function ContextMenuComponent_mouseleave_HostBindingHandler() { return ctx.pointerleave(); });
|
|
1217
|
+
}
|
|
1218
|
+
if (rf & 2) {
|
|
1219
|
+
i0__namespace.ɵɵattribute("rete-context-menu", ctx.customAttribute);
|
|
1220
|
+
}
|
|
1221
|
+
}, inputs: { items: "items", delay: "delay", searchBar: "searchBar", onHide: "onHide", rendered: "rendered" }, features: [i0__namespace.ɵɵNgOnChangesFeature], decls: 2, vars: 2, consts: [["class", "block", 4, "ngIf"], [3, "delay", "subitems", "select", "hide", 4, "ngFor", "ngForOf"], [1, "block"], [3, "value", "update"], [3, "delay", "subitems", "select", "hide"]], template: function ContextMenuComponent_Template(rf, ctx) {
|
|
1222
|
+
if (rf & 1) {
|
|
1223
|
+
i0__namespace.ɵɵtemplate(0, ContextMenuComponent_div_0_Template, 2, 1, "div", 0);
|
|
1224
|
+
i0__namespace.ɵɵtemplate(1, ContextMenuComponent_context_menu_item_1_Template, 2, 3, "context-menu-item", 1);
|
|
1225
|
+
}
|
|
1226
|
+
if (rf & 2) {
|
|
1227
|
+
i0__namespace.ɵɵproperty("ngIf", ctx.searchBar);
|
|
1228
|
+
i0__namespace.ɵɵadvance(1);
|
|
1229
|
+
i0__namespace.ɵɵproperty("ngForOf", ctx.getItems());
|
|
1230
|
+
}
|
|
1231
|
+
}, directives: [i1__namespace.NgIf, i1__namespace.NgForOf, ContextMenuSearchComponent, ContextMenuItemComponent], styles: ["[_nghost-%COMP%]{display:block;padding:10px;width:120px;margin-top:-20px;margin-left:-60px}", ".block[_ngcontent-%COMP%]{display:block;color:#fff;padding:4px;border-bottom:1px solid rgba(69,103,255,.8);background-color:#6e88ffcc;cursor:pointer;width:100%;position:relative}.block[_ngcontent-%COMP%]:first-child{border-top-left-radius:5px;border-top-right-radius:5px}.block[_ngcontent-%COMP%]:last-child{border-bottom-left-radius:5px;border-bottom-right-radius:5px}.block[_ngcontent-%COMP%]:hover{background-color:#8299ffcc}"] });
|
|
1232
|
+
(function () {
|
|
1233
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ContextMenuComponent, [{
|
|
1234
|
+
type: i0.Component,
|
|
1235
|
+
args: [{
|
|
1236
|
+
templateUrl: './menu.component.html',
|
|
1237
|
+
styleUrls: ['./menu.component.sass', '../../block.sass'],
|
|
1238
|
+
host: {
|
|
1239
|
+
'data-testid': 'context-menu'
|
|
1240
|
+
}
|
|
1241
|
+
}]
|
|
1242
|
+
}], function () { return [{ type: i0__namespace.ChangeDetectorRef }]; }, { items: [{
|
|
1243
|
+
type: i0.Input
|
|
1244
|
+
}], delay: [{
|
|
1245
|
+
type: i0.Input
|
|
1246
|
+
}], searchBar: [{
|
|
1247
|
+
type: i0.Input
|
|
1248
|
+
}], onHide: [{
|
|
1249
|
+
type: i0.Input
|
|
1250
|
+
}], rendered: [{
|
|
1251
|
+
type: i0.Input
|
|
1252
|
+
}], customAttribute: [{
|
|
1253
|
+
type: i0.HostBinding,
|
|
1254
|
+
args: ['attr.rete-context-menu']
|
|
1255
|
+
}], pointerover: [{
|
|
1256
|
+
type: i0.HostListener,
|
|
1257
|
+
args: ['mouseover']
|
|
1258
|
+
}], pointerleave: [{
|
|
1259
|
+
type: i0.HostListener,
|
|
1260
|
+
args: ['mouseleave']
|
|
1261
|
+
}] });
|
|
1262
|
+
})();
|
|
1263
|
+
|
|
1264
|
+
function setup$2(props) {
|
|
1265
|
+
var delay = typeof (props === null || props === void 0 ? void 0 : props.delay) === 'undefined' ? 1000 : props.delay;
|
|
1266
|
+
return {
|
|
1267
|
+
update: function (context) {
|
|
1268
|
+
if (context.data.type === 'contextmenu') {
|
|
1269
|
+
return {
|
|
1270
|
+
items: context.data.items,
|
|
1271
|
+
delay: delay,
|
|
1272
|
+
searchBar: context.data.searchBar,
|
|
1273
|
+
onHide: context.data.onHide
|
|
1274
|
+
};
|
|
1275
|
+
}
|
|
1276
|
+
},
|
|
1277
|
+
mount: function (context, plugin) {
|
|
1278
|
+
var parent = plugin.parentScope();
|
|
1279
|
+
var emit = parent.emit.bind(parent);
|
|
1280
|
+
var rendered = function () {
|
|
1281
|
+
emit({ type: 'rendered', data: context.data });
|
|
1282
|
+
};
|
|
1283
|
+
if (context.data.type === 'contextmenu') {
|
|
1284
|
+
return {
|
|
1285
|
+
key: 'context-menu',
|
|
1286
|
+
component: ContextMenuComponent,
|
|
1287
|
+
props: {
|
|
1288
|
+
items: context.data.items,
|
|
1289
|
+
delay: delay,
|
|
1290
|
+
searchBar: context.data.searchBar,
|
|
1291
|
+
onHide: context.data.onHide,
|
|
1292
|
+
rendered: rendered
|
|
1293
|
+
}
|
|
1294
|
+
};
|
|
1295
|
+
}
|
|
1296
|
+
return null;
|
|
1297
|
+
}
|
|
1298
|
+
};
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
var index$3 = /*#__PURE__*/Object.freeze({
|
|
1302
|
+
__proto__: null,
|
|
1303
|
+
setup: setup$2
|
|
1304
|
+
});
|
|
1305
|
+
|
|
1306
|
+
function useDrag(translate, getPointer) {
|
|
1307
|
+
return {
|
|
1308
|
+
start: function (e) {
|
|
1309
|
+
var previous = Object.assign({}, getPointer(e));
|
|
1310
|
+
function move(moveEvent) {
|
|
1311
|
+
var current = Object.assign({}, getPointer(moveEvent));
|
|
1312
|
+
var dx = current.x - previous.x;
|
|
1313
|
+
var dy = current.y - previous.y;
|
|
1314
|
+
previous = current;
|
|
1315
|
+
translate(dx, dy);
|
|
1316
|
+
}
|
|
1317
|
+
function up() {
|
|
1318
|
+
window.removeEventListener('pointermove', move);
|
|
1319
|
+
window.removeEventListener('pointerup', up);
|
|
1320
|
+
window.removeEventListener('pointercancel', up);
|
|
1321
|
+
}
|
|
1322
|
+
window.addEventListener('pointermove', move);
|
|
1323
|
+
window.addEventListener('pointerup', up);
|
|
1324
|
+
window.addEventListener('pointercancel', up);
|
|
1325
|
+
}
|
|
1326
|
+
};
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
var MiniViewportComponent = /** @class */ (function () {
|
|
1330
|
+
function MiniViewportComponent() {
|
|
1331
|
+
var _this = this;
|
|
1332
|
+
this.drag = useDrag(function (dx, dy) { return _this.onDrag(dx, dy); }, function (e) { return ({ x: e.pageX, y: e.pageY }); });
|
|
1333
|
+
}
|
|
1334
|
+
Object.defineProperty(MiniViewportComponent.prototype, "styleLeft", {
|
|
1335
|
+
get: function () {
|
|
1336
|
+
return this.px(this.scale(this.left));
|
|
1337
|
+
},
|
|
1338
|
+
enumerable: false,
|
|
1339
|
+
configurable: true
|
|
1340
|
+
});
|
|
1341
|
+
Object.defineProperty(MiniViewportComponent.prototype, "styleTop", {
|
|
1342
|
+
get: function () {
|
|
1343
|
+
return this.px(this.scale(this.top));
|
|
1344
|
+
},
|
|
1345
|
+
enumerable: false,
|
|
1346
|
+
configurable: true
|
|
1347
|
+
});
|
|
1348
|
+
Object.defineProperty(MiniViewportComponent.prototype, "styleWidth", {
|
|
1349
|
+
get: function () {
|
|
1350
|
+
return this.px(this.scale(this.width));
|
|
1351
|
+
},
|
|
1352
|
+
enumerable: false,
|
|
1353
|
+
configurable: true
|
|
1354
|
+
});
|
|
1355
|
+
Object.defineProperty(MiniViewportComponent.prototype, "styleHeight", {
|
|
1356
|
+
get: function () {
|
|
1357
|
+
return this.px(this.scale(this.height));
|
|
1358
|
+
},
|
|
1359
|
+
enumerable: false,
|
|
1360
|
+
configurable: true
|
|
1361
|
+
});
|
|
1362
|
+
MiniViewportComponent.prototype.pointerdown = function (event) {
|
|
1363
|
+
event.stopPropagation();
|
|
1364
|
+
this.drag.start(event);
|
|
1365
|
+
};
|
|
1366
|
+
MiniViewportComponent.prototype.px = function (value) {
|
|
1367
|
+
return value + "px";
|
|
1368
|
+
};
|
|
1369
|
+
MiniViewportComponent.prototype.scale = function (v) {
|
|
1370
|
+
return v * this.containerWidth;
|
|
1371
|
+
};
|
|
1372
|
+
MiniViewportComponent.prototype.invert = function (v) {
|
|
1373
|
+
return v / this.containerWidth;
|
|
1374
|
+
};
|
|
1375
|
+
MiniViewportComponent.prototype.onDrag = function (dx, dy) {
|
|
1376
|
+
this.translate(this.invert(-dx), this.invert(-dy));
|
|
1377
|
+
};
|
|
1378
|
+
return MiniViewportComponent;
|
|
1379
|
+
}());
|
|
1380
|
+
MiniViewportComponent.ɵfac = function MiniViewportComponent_Factory(t) { return new (t || MiniViewportComponent)(); };
|
|
1381
|
+
MiniViewportComponent.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: MiniViewportComponent, selectors: [["minimap-mini-viewport"]], hostAttrs: ["data-testid", "minimap-viewport"], hostVars: 8, hostBindings: function MiniViewportComponent_HostBindings(rf, ctx) {
|
|
1382
|
+
if (rf & 1) {
|
|
1383
|
+
i0__namespace.ɵɵlistener("pointerdown", function MiniViewportComponent_pointerdown_HostBindingHandler($event) { return ctx.pointerdown($event); });
|
|
1384
|
+
}
|
|
1385
|
+
if (rf & 2) {
|
|
1386
|
+
i0__namespace.ɵɵstyleProp("left", ctx.styleLeft)("top", ctx.styleTop)("width", ctx.styleWidth)("height", ctx.styleHeight);
|
|
1387
|
+
}
|
|
1388
|
+
}, inputs: { left: "left", top: "top", width: "width", height: "height", containerWidth: "containerWidth", translate: "translate" }, decls: 0, vars: 0, template: function MiniViewportComponent_Template(rf, ctx) { }, styles: ["[_nghost-%COMP%]{display:block;position:absolute;background:rgba(255,251,128,.32);border:1px solid #ffe52b}"] });
|
|
1389
|
+
(function () {
|
|
1390
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(MiniViewportComponent, [{
|
|
1391
|
+
type: i0.Component,
|
|
1392
|
+
args: [{
|
|
1393
|
+
selector: 'minimap-mini-viewport',
|
|
1394
|
+
templateUrl: './mini-viewport.component.html',
|
|
1395
|
+
styleUrls: ['./mini-viewport.component.sass'],
|
|
1396
|
+
host: {
|
|
1397
|
+
'data-testid': 'minimap-viewport'
|
|
1398
|
+
}
|
|
1399
|
+
}]
|
|
1400
|
+
}], null, { left: [{
|
|
1401
|
+
type: i0.Input
|
|
1402
|
+
}], top: [{
|
|
1403
|
+
type: i0.Input
|
|
1404
|
+
}], width: [{
|
|
1405
|
+
type: i0.Input
|
|
1406
|
+
}], height: [{
|
|
1407
|
+
type: i0.Input
|
|
1408
|
+
}], containerWidth: [{
|
|
1409
|
+
type: i0.Input
|
|
1410
|
+
}], translate: [{
|
|
1411
|
+
type: i0.Input
|
|
1412
|
+
}], styleLeft: [{
|
|
1413
|
+
type: i0.HostBinding,
|
|
1414
|
+
args: ['style.left']
|
|
1415
|
+
}], styleTop: [{
|
|
1416
|
+
type: i0.HostBinding,
|
|
1417
|
+
args: ['style.top']
|
|
1418
|
+
}], styleWidth: [{
|
|
1419
|
+
type: i0.HostBinding,
|
|
1420
|
+
args: ['style.width']
|
|
1421
|
+
}], styleHeight: [{
|
|
1422
|
+
type: i0.HostBinding,
|
|
1423
|
+
args: ['style.height']
|
|
1424
|
+
}], pointerdown: [{
|
|
1425
|
+
type: i0.HostListener,
|
|
1426
|
+
args: ['pointerdown', ['$event']]
|
|
1427
|
+
}] });
|
|
1428
|
+
})();
|
|
1429
|
+
|
|
1430
|
+
var MiniNodeComponent = /** @class */ (function () {
|
|
1431
|
+
function MiniNodeComponent() {
|
|
1432
|
+
}
|
|
1433
|
+
Object.defineProperty(MiniNodeComponent.prototype, "styleLeft", {
|
|
1434
|
+
get: function () {
|
|
1435
|
+
return this.px(this.left);
|
|
1436
|
+
},
|
|
1437
|
+
enumerable: false,
|
|
1438
|
+
configurable: true
|
|
1439
|
+
});
|
|
1440
|
+
Object.defineProperty(MiniNodeComponent.prototype, "styleTop", {
|
|
1441
|
+
get: function () {
|
|
1442
|
+
return this.px(this.top);
|
|
1443
|
+
},
|
|
1444
|
+
enumerable: false,
|
|
1445
|
+
configurable: true
|
|
1446
|
+
});
|
|
1447
|
+
Object.defineProperty(MiniNodeComponent.prototype, "styleWidth", {
|
|
1448
|
+
get: function () {
|
|
1449
|
+
return this.px(this.width);
|
|
1450
|
+
},
|
|
1451
|
+
enumerable: false,
|
|
1452
|
+
configurable: true
|
|
1453
|
+
});
|
|
1454
|
+
Object.defineProperty(MiniNodeComponent.prototype, "styleHeight", {
|
|
1455
|
+
get: function () {
|
|
1456
|
+
return this.px(this.height);
|
|
1457
|
+
},
|
|
1458
|
+
enumerable: false,
|
|
1459
|
+
configurable: true
|
|
1460
|
+
});
|
|
1461
|
+
MiniNodeComponent.prototype.px = function (value) {
|
|
1462
|
+
return value + "px";
|
|
1463
|
+
};
|
|
1464
|
+
return MiniNodeComponent;
|
|
1465
|
+
}());
|
|
1466
|
+
MiniNodeComponent.ɵfac = function MiniNodeComponent_Factory(t) { return new (t || MiniNodeComponent)(); };
|
|
1467
|
+
MiniNodeComponent.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: MiniNodeComponent, selectors: [["minimap-mini-node"]], hostAttrs: ["data-testid", "minimap-node"], hostVars: 8, hostBindings: function MiniNodeComponent_HostBindings(rf, ctx) {
|
|
1468
|
+
if (rf & 2) {
|
|
1469
|
+
i0__namespace.ɵɵstyleProp("left", ctx.styleLeft)("top", ctx.styleTop)("width", ctx.styleWidth)("height", ctx.styleHeight);
|
|
1470
|
+
}
|
|
1471
|
+
}, inputs: { left: "left", top: "top", width: "width", height: "height" }, decls: 0, vars: 0, template: function MiniNodeComponent_Template(rf, ctx) { }, styles: ["[_nghost-%COMP%]{display:block;position:absolute;background:rgba(110,136,255,.8);border:1px solid rgba(192,206,212,.6)}"] });
|
|
1472
|
+
(function () {
|
|
1473
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(MiniNodeComponent, [{
|
|
1474
|
+
type: i0.Component,
|
|
1475
|
+
args: [{
|
|
1476
|
+
selector: 'minimap-mini-node',
|
|
1477
|
+
templateUrl: './mini-node.component.html',
|
|
1478
|
+
styleUrls: ['./mini-node.component.sass'],
|
|
1479
|
+
host: {
|
|
1480
|
+
'data-testid': 'minimap-node'
|
|
1481
|
+
}
|
|
1482
|
+
}]
|
|
1483
|
+
}], null, { left: [{
|
|
1484
|
+
type: i0.Input
|
|
1485
|
+
}], top: [{
|
|
1486
|
+
type: i0.Input
|
|
1487
|
+
}], width: [{
|
|
1488
|
+
type: i0.Input
|
|
1489
|
+
}], height: [{
|
|
1490
|
+
type: i0.Input
|
|
1491
|
+
}], styleLeft: [{
|
|
1492
|
+
type: i0.HostBinding,
|
|
1493
|
+
args: ['style.left']
|
|
1494
|
+
}], styleTop: [{
|
|
1495
|
+
type: i0.HostBinding,
|
|
1496
|
+
args: ['style.top']
|
|
1497
|
+
}], styleWidth: [{
|
|
1498
|
+
type: i0.HostBinding,
|
|
1499
|
+
args: ['style.width']
|
|
1500
|
+
}], styleHeight: [{
|
|
1501
|
+
type: i0.HostBinding,
|
|
1502
|
+
args: ['style.height']
|
|
1503
|
+
}] });
|
|
1504
|
+
})();
|
|
1505
|
+
|
|
1506
|
+
function MinimapComponent_minimap_mini_node_0_Template(rf, ctx) {
|
|
1507
|
+
if (rf & 1) {
|
|
1508
|
+
i0__namespace.ɵɵelement(0, "minimap-mini-node", 2);
|
|
1509
|
+
}
|
|
1510
|
+
if (rf & 2) {
|
|
1511
|
+
var node_r1 = ctx.$implicit;
|
|
1512
|
+
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
1513
|
+
i0__namespace.ɵɵproperty("left", ctx_r0.scale(node_r1.left))("top", ctx_r0.scale(node_r1.top))("width", ctx_r0.scale(node_r1.width))("height", ctx_r0.scale(node_r1.height));
|
|
1514
|
+
}
|
|
1515
|
+
}
|
|
1516
|
+
var MinimapComponent = /** @class */ (function () {
|
|
1517
|
+
function MinimapComponent(el, cdr) {
|
|
1518
|
+
this.el = el;
|
|
1519
|
+
this.cdr = cdr;
|
|
1520
|
+
this.cdr.detach();
|
|
1521
|
+
}
|
|
1522
|
+
Object.defineProperty(MinimapComponent.prototype, "width", {
|
|
1523
|
+
get: function () {
|
|
1524
|
+
return this.px(this.size * this.ratio);
|
|
1525
|
+
},
|
|
1526
|
+
enumerable: false,
|
|
1527
|
+
configurable: true
|
|
1528
|
+
});
|
|
1529
|
+
Object.defineProperty(MinimapComponent.prototype, "height", {
|
|
1530
|
+
get: function () {
|
|
1531
|
+
return this.px(this.size);
|
|
1532
|
+
},
|
|
1533
|
+
enumerable: false,
|
|
1534
|
+
configurable: true
|
|
1535
|
+
});
|
|
1536
|
+
MinimapComponent.prototype.pointerdown = function (event) {
|
|
1537
|
+
event.stopPropagation();
|
|
1538
|
+
event.preventDefault();
|
|
1539
|
+
};
|
|
1540
|
+
MinimapComponent.prototype.dblclick = function (event) {
|
|
1541
|
+
event.stopPropagation();
|
|
1542
|
+
event.preventDefault();
|
|
1543
|
+
if (!this.el.nativeElement)
|
|
1544
|
+
return;
|
|
1545
|
+
var box = this.el.nativeElement.getBoundingClientRect();
|
|
1546
|
+
var x = (event.clientX - box.left) / (this.size * this.ratio);
|
|
1547
|
+
var y = (event.clientY - box.top) / (this.size * this.ratio);
|
|
1548
|
+
this.point(x, y);
|
|
1549
|
+
};
|
|
1550
|
+
MinimapComponent.prototype.ngOnChanges = function () {
|
|
1551
|
+
var _this = this;
|
|
1552
|
+
this.cdr.detectChanges();
|
|
1553
|
+
requestAnimationFrame(function () { return _this.rendered(); });
|
|
1554
|
+
};
|
|
1555
|
+
MinimapComponent.prototype.px = function (value) {
|
|
1556
|
+
return value + "px";
|
|
1557
|
+
};
|
|
1558
|
+
MinimapComponent.prototype.scale = function (value) {
|
|
1559
|
+
if (!this.el.nativeElement)
|
|
1560
|
+
return 0;
|
|
1561
|
+
return value * this.el.nativeElement.clientWidth;
|
|
1562
|
+
};
|
|
1563
|
+
MinimapComponent.prototype.identifyMiniNode = function (_, item) {
|
|
1564
|
+
return [item.top, item.left].join('_');
|
|
1565
|
+
};
|
|
1566
|
+
return MinimapComponent;
|
|
1567
|
+
}());
|
|
1568
|
+
MinimapComponent.ɵfac = function MinimapComponent_Factory(t) { return new (t || MinimapComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ElementRef), i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef)); };
|
|
1569
|
+
MinimapComponent.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: MinimapComponent, selectors: [["ng-component"]], hostAttrs: ["data-testid", "minimap"], hostVars: 4, hostBindings: function MinimapComponent_HostBindings(rf, ctx) {
|
|
1570
|
+
if (rf & 1) {
|
|
1571
|
+
i0__namespace.ɵɵlistener("pointerdown", function MinimapComponent_pointerdown_HostBindingHandler($event) { return ctx.pointerdown($event); })("dblclick", function MinimapComponent_dblclick_HostBindingHandler($event) { return ctx.dblclick($event); });
|
|
1572
|
+
}
|
|
1573
|
+
if (rf & 2) {
|
|
1574
|
+
i0__namespace.ɵɵstyleProp("width", ctx.width)("height", ctx.height);
|
|
1575
|
+
}
|
|
1576
|
+
}, inputs: { rendered: "rendered", size: "size", ratio: "ratio", nodes: "nodes", viewport: "viewport", translate: "translate", point: "point" }, features: [i0__namespace.ɵɵNgOnChangesFeature], decls: 2, vars: 8, consts: [[3, "left", "top", "width", "height", 4, "ngFor", "ngForOf", "ngForTrackBy"], [3, "left", "top", "width", "height", "containerWidth", "translate"], [3, "left", "top", "width", "height"]], template: function MinimapComponent_Template(rf, ctx) {
|
|
1577
|
+
if (rf & 1) {
|
|
1578
|
+
i0__namespace.ɵɵtemplate(0, MinimapComponent_minimap_mini_node_0_Template, 1, 4, "minimap-mini-node", 0);
|
|
1579
|
+
i0__namespace.ɵɵelement(1, "minimap-mini-viewport", 1);
|
|
1580
|
+
}
|
|
1581
|
+
if (rf & 2) {
|
|
1582
|
+
i0__namespace.ɵɵproperty("ngForOf", ctx.nodes)("ngForTrackBy", ctx.identifyMiniNode);
|
|
1583
|
+
i0__namespace.ɵɵadvance(1);
|
|
1584
|
+
i0__namespace.ɵɵproperty("left", ctx.viewport.left)("top", ctx.viewport.top)("width", ctx.viewport.width)("height", ctx.viewport.height)("containerWidth", ctx.el.nativeElement == null ? null : ctx.el.nativeElement.clientWidth)("translate", ctx.translate);
|
|
1585
|
+
}
|
|
1586
|
+
}, directives: [i1__namespace.NgForOf, MiniViewportComponent, MiniNodeComponent], styles: ["[_nghost-%COMP%]{position:absolute;right:24px;bottom:24px;background:rgba(229,234,239,.65);padding:20px;overflow:hidden;border:1px solid #b1b7ff;border-radius:8px;box-sizing:border-box}"] });
|
|
1587
|
+
(function () {
|
|
1588
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(MinimapComponent, [{
|
|
1589
|
+
type: i0.Component,
|
|
1590
|
+
args: [{
|
|
1591
|
+
templateUrl: './minimap.component.html',
|
|
1592
|
+
styleUrls: ['./minimap.component.sass'],
|
|
1593
|
+
host: {
|
|
1594
|
+
'data-testid': 'minimap'
|
|
1595
|
+
}
|
|
1596
|
+
}]
|
|
1597
|
+
}], function () { return [{ type: i0__namespace.ElementRef }, { type: i0__namespace.ChangeDetectorRef }]; }, { rendered: [{
|
|
1598
|
+
type: i0.Input
|
|
1599
|
+
}], size: [{
|
|
1600
|
+
type: i0.Input
|
|
1601
|
+
}], ratio: [{
|
|
1602
|
+
type: i0.Input
|
|
1603
|
+
}], nodes: [{
|
|
1604
|
+
type: i0.Input
|
|
1605
|
+
}], viewport: [{
|
|
1606
|
+
type: i0.Input
|
|
1607
|
+
}], translate: [{
|
|
1608
|
+
type: i0.Input
|
|
1609
|
+
}], point: [{
|
|
1610
|
+
type: i0.Input
|
|
1611
|
+
}], width: [{
|
|
1612
|
+
type: i0.HostBinding,
|
|
1613
|
+
args: ['style.width']
|
|
1614
|
+
}], height: [{
|
|
1615
|
+
type: i0.HostBinding,
|
|
1616
|
+
args: ['style.height']
|
|
1617
|
+
}], pointerdown: [{
|
|
1618
|
+
type: i0.HostListener,
|
|
1619
|
+
args: ['pointerdown', ['$event']]
|
|
1620
|
+
}], dblclick: [{
|
|
1621
|
+
type: i0.HostListener,
|
|
1622
|
+
args: ['dblclick', ['$event']]
|
|
1623
|
+
}] });
|
|
1624
|
+
})();
|
|
1625
|
+
|
|
1626
|
+
function setup$1(props) {
|
|
1627
|
+
return {
|
|
1628
|
+
update: function (context) {
|
|
1629
|
+
if (context.data.type === 'minimap') {
|
|
1630
|
+
return {
|
|
1631
|
+
nodes: context.data.nodes,
|
|
1632
|
+
size: (props === null || props === void 0 ? void 0 : props.size) || 200,
|
|
1633
|
+
ratio: context.data.ratio,
|
|
1634
|
+
viewport: context.data.viewport,
|
|
1635
|
+
translate: context.data.translate,
|
|
1636
|
+
point: context.data.point
|
|
1637
|
+
};
|
|
1638
|
+
}
|
|
1639
|
+
return null;
|
|
1640
|
+
},
|
|
1641
|
+
mount: function (context, plugin) {
|
|
1642
|
+
var parent = plugin.parentScope();
|
|
1643
|
+
var emit = parent.emit.bind(parent);
|
|
1644
|
+
var rendered = function () {
|
|
1645
|
+
emit({ type: 'rendered', data: context.data });
|
|
1646
|
+
};
|
|
1647
|
+
if (context.data.type === 'minimap') {
|
|
1648
|
+
return {
|
|
1649
|
+
key: 'rete-minimap',
|
|
1650
|
+
component: MinimapComponent,
|
|
1651
|
+
props: {
|
|
1652
|
+
nodes: context.data.nodes,
|
|
1653
|
+
size: (props === null || props === void 0 ? void 0 : props.size) || 200,
|
|
1654
|
+
ratio: context.data.ratio,
|
|
1655
|
+
viewport: context.data.viewport,
|
|
1656
|
+
translate: context.data.translate,
|
|
1657
|
+
point: context.data.point,
|
|
1658
|
+
rendered: rendered
|
|
1659
|
+
}
|
|
1660
|
+
};
|
|
1661
|
+
}
|
|
1662
|
+
return null;
|
|
1663
|
+
}
|
|
1664
|
+
};
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
var index$2 = /*#__PURE__*/Object.freeze({
|
|
1668
|
+
__proto__: null,
|
|
1669
|
+
setup: setup$1
|
|
1670
|
+
});
|
|
1671
|
+
|
|
1672
|
+
var pinSize = 20;
|
|
1673
|
+
var PinComponent = /** @class */ (function () {
|
|
1674
|
+
function PinComponent(cdr) {
|
|
1675
|
+
var _this = this;
|
|
1676
|
+
this.cdr = cdr;
|
|
1677
|
+
this.menu = new i0.EventEmitter();
|
|
1678
|
+
this.translate = new i0.EventEmitter();
|
|
1679
|
+
this.down = new i0.EventEmitter();
|
|
1680
|
+
this.drag = useDrag(function (dx, dy) {
|
|
1681
|
+
_this.translate.emit({ dx: dx, dy: dy });
|
|
1682
|
+
}, function () { return _this.getPointer(); });
|
|
1683
|
+
// this.cdr.detach()
|
|
1684
|
+
}
|
|
1685
|
+
Object.defineProperty(PinComponent.prototype, "_selected", {
|
|
1686
|
+
get: function () {
|
|
1687
|
+
return this.selected;
|
|
1688
|
+
},
|
|
1689
|
+
enumerable: false,
|
|
1690
|
+
configurable: true
|
|
1691
|
+
});
|
|
1692
|
+
Object.defineProperty(PinComponent.prototype, "top", {
|
|
1693
|
+
get: function () {
|
|
1694
|
+
return this.position.y - pinSize / 2 + "px";
|
|
1695
|
+
},
|
|
1696
|
+
enumerable: false,
|
|
1697
|
+
configurable: true
|
|
1698
|
+
});
|
|
1699
|
+
Object.defineProperty(PinComponent.prototype, "left", {
|
|
1700
|
+
get: function () {
|
|
1701
|
+
return this.position.x - pinSize / 2 + "px";
|
|
1702
|
+
},
|
|
1703
|
+
enumerable: false,
|
|
1704
|
+
configurable: true
|
|
1705
|
+
});
|
|
1706
|
+
PinComponent.prototype.pointerdown = function (event) {
|
|
1707
|
+
event.stopPropagation();
|
|
1708
|
+
event.preventDefault();
|
|
1709
|
+
this.drag.start(event);
|
|
1710
|
+
this.down.emit();
|
|
1711
|
+
};
|
|
1712
|
+
PinComponent.prototype.contextmenu = function (event) {
|
|
1713
|
+
event.stopPropagation();
|
|
1714
|
+
event.preventDefault();
|
|
1715
|
+
this.menu.emit();
|
|
1716
|
+
};
|
|
1717
|
+
PinComponent.prototype.ngOnChanges = function () {
|
|
1718
|
+
// this.cdr.detectChanges()
|
|
1719
|
+
// requestAnimationFrame(() => this.rendered())
|
|
1720
|
+
};
|
|
1721
|
+
return PinComponent;
|
|
1722
|
+
}());
|
|
1723
|
+
PinComponent.ɵfac = function PinComponent_Factory(t) { return new (t || PinComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef)); };
|
|
1724
|
+
PinComponent.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: PinComponent, selectors: [["reroute-pin"]], hostAttrs: ["data-testid", "pin"], hostVars: 6, hostBindings: function PinComponent_HostBindings(rf, ctx) {
|
|
1725
|
+
if (rf & 1) {
|
|
1726
|
+
i0__namespace.ɵɵlistener("pointerdown", function PinComponent_pointerdown_HostBindingHandler($event) { return ctx.pointerdown($event); })("contextmenu", function PinComponent_contextmenu_HostBindingHandler($event) { return ctx.contextmenu($event); });
|
|
1727
|
+
}
|
|
1728
|
+
if (rf & 2) {
|
|
1729
|
+
i0__namespace.ɵɵstyleProp("top", ctx.top)("left", ctx.left);
|
|
1730
|
+
i0__namespace.ɵɵclassProp("selected", ctx._selected);
|
|
1731
|
+
}
|
|
1732
|
+
}, inputs: { position: "position", selected: "selected", getPointer: "getPointer" }, outputs: { menu: "menu", translate: "translate", down: "down" }, features: [i0__namespace.ɵɵNgOnChangesFeature], decls: 0, vars: 0, template: function PinComponent_Template(rf, ctx) { }, styles: ["[_nghost-%COMP%]{display:block;width:20px;height:20px;box-sizing:border-box;background:steelblue;border:2px solid white;border-radius:20px;position:absolute}.selected[_nghost-%COMP%]{background:#ffd92c}"] });
|
|
1733
|
+
(function () {
|
|
1734
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(PinComponent, [{
|
|
1735
|
+
type: i0.Component,
|
|
1736
|
+
args: [{
|
|
1737
|
+
selector: 'reroute-pin',
|
|
1738
|
+
template: '',
|
|
1739
|
+
styleUrls: ['./pin.component.sass'],
|
|
1740
|
+
host: {
|
|
1741
|
+
'data-testid': 'pin'
|
|
1742
|
+
}
|
|
1743
|
+
}]
|
|
1744
|
+
}], function () { return [{ type: i0__namespace.ChangeDetectorRef }]; }, { position: [{
|
|
1745
|
+
type: i0.Input
|
|
1746
|
+
}], selected: [{
|
|
1747
|
+
type: i0.Input
|
|
1748
|
+
}], getPointer: [{
|
|
1749
|
+
type: i0.Input
|
|
1750
|
+
}], menu: [{
|
|
1751
|
+
type: i0.Output
|
|
1752
|
+
}], translate: [{
|
|
1753
|
+
type: i0.Output
|
|
1754
|
+
}], down: [{
|
|
1755
|
+
type: i0.Output
|
|
1756
|
+
}], _selected: [{
|
|
1757
|
+
type: i0.HostBinding,
|
|
1758
|
+
args: ['class.selected']
|
|
1759
|
+
}], top: [{
|
|
1760
|
+
type: i0.HostBinding,
|
|
1761
|
+
args: ['style.top']
|
|
1762
|
+
}], left: [{
|
|
1763
|
+
type: i0.HostBinding,
|
|
1764
|
+
args: ['style.left']
|
|
1765
|
+
}], pointerdown: [{
|
|
1766
|
+
type: i0.HostListener,
|
|
1767
|
+
args: ['pointerdown', ['$event']]
|
|
1768
|
+
}], contextmenu: [{
|
|
1769
|
+
type: i0.HostListener,
|
|
1770
|
+
args: ['contextmenu', ['$event']]
|
|
1771
|
+
}] });
|
|
1772
|
+
})();
|
|
1773
|
+
|
|
1774
|
+
function PinsComponent_reroute_pin_0_Template(rf, ctx) {
|
|
1775
|
+
if (rf & 1) {
|
|
1776
|
+
var _r3_1 = i0__namespace.ɵɵgetCurrentView();
|
|
1777
|
+
i0__namespace.ɵɵelementStart(0, "reroute-pin", 1);
|
|
1778
|
+
i0__namespace.ɵɵlistener("menu", function PinsComponent_reroute_pin_0_Template_reroute_pin_menu_0_listener() { var restoredCtx = i0__namespace.ɵɵrestoreView(_r3_1); var pin_r1 = restoredCtx.$implicit; var ctx_r2 = i0__namespace.ɵɵnextContext(); return ctx_r2.menu && ctx_r2.menu(pin_r1.id); })("translate", function PinsComponent_reroute_pin_0_Template_reroute_pin_translate_0_listener($event) { var restoredCtx = i0__namespace.ɵɵrestoreView(_r3_1); var pin_r1 = restoredCtx.$implicit; var ctx_r4 = i0__namespace.ɵɵnextContext(); return ctx_r4.translate && ctx_r4.translate(pin_r1.id, $event.dx, $event.dy); })("down", function PinsComponent_reroute_pin_0_Template_reroute_pin_down_0_listener() { var restoredCtx = i0__namespace.ɵɵrestoreView(_r3_1); var pin_r1 = restoredCtx.$implicit; var ctx_r5 = i0__namespace.ɵɵnextContext(); return ctx_r5.down && ctx_r5.down(pin_r1.id); });
|
|
1779
|
+
i0__namespace.ɵɵelementEnd();
|
|
1780
|
+
}
|
|
1781
|
+
if (rf & 2) {
|
|
1782
|
+
var pin_r1 = ctx.$implicit;
|
|
1783
|
+
var ctx_r0 = i0__namespace.ɵɵnextContext();
|
|
1784
|
+
i0__namespace.ɵɵproperty("position", pin_r1.position)("selected", pin_r1.selected)("getPointer", ctx_r0.getPointer);
|
|
1785
|
+
}
|
|
1786
|
+
}
|
|
1787
|
+
var PinsComponent = /** @class */ (function () {
|
|
1788
|
+
function PinsComponent(cdr) {
|
|
1789
|
+
this.cdr = cdr;
|
|
1790
|
+
this.cdr.detach();
|
|
1791
|
+
}
|
|
1792
|
+
PinsComponent.prototype.ngOnChanges = function () {
|
|
1793
|
+
var _this = this;
|
|
1794
|
+
this.cdr.detectChanges();
|
|
1795
|
+
requestAnimationFrame(function () { return _this.rendered(); });
|
|
1796
|
+
};
|
|
1797
|
+
PinsComponent.prototype.track = function (_, item) {
|
|
1798
|
+
return item.id;
|
|
1799
|
+
};
|
|
1800
|
+
return PinsComponent;
|
|
1801
|
+
}());
|
|
1802
|
+
PinsComponent.ɵfac = function PinsComponent_Factory(t) { return new (t || PinsComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.ChangeDetectorRef)); };
|
|
1803
|
+
PinsComponent.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: PinsComponent, selectors: [["ng-component"]], inputs: { rendered: "rendered", pins: "pins", down: "down", translate: "translate", menu: "menu", getPointer: "getPointer" }, features: [i0__namespace.ɵɵNgOnChangesFeature], decls: 1, vars: 2, consts: [[3, "position", "selected", "getPointer", "menu", "translate", "down", 4, "ngFor", "ngForOf", "ngForTrackBy"], [3, "position", "selected", "getPointer", "menu", "translate", "down"]], template: function PinsComponent_Template(rf, ctx) {
|
|
1804
|
+
if (rf & 1) {
|
|
1805
|
+
i0__namespace.ɵɵtemplate(0, PinsComponent_reroute_pin_0_Template, 1, 3, "reroute-pin", 0);
|
|
1806
|
+
}
|
|
1807
|
+
if (rf & 2) {
|
|
1808
|
+
i0__namespace.ɵɵproperty("ngForOf", ctx.pins)("ngForTrackBy", ctx.track);
|
|
1809
|
+
}
|
|
1810
|
+
}, directives: [i1__namespace.NgForOf, PinComponent], encapsulation: 2 });
|
|
1811
|
+
(function () {
|
|
1812
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(PinsComponent, [{
|
|
1813
|
+
type: i0.Component,
|
|
1814
|
+
args: [{
|
|
1815
|
+
templateUrl: './pins.component.html'
|
|
1816
|
+
}]
|
|
1817
|
+
}], function () { return [{ type: i0__namespace.ChangeDetectorRef }]; }, { rendered: [{
|
|
1818
|
+
type: i0.Input
|
|
1819
|
+
}], pins: [{
|
|
1820
|
+
type: i0.Input
|
|
1821
|
+
}], down: [{
|
|
1822
|
+
type: i0.Input
|
|
1823
|
+
}], translate: [{
|
|
1824
|
+
type: i0.Input
|
|
1825
|
+
}], menu: [{
|
|
1826
|
+
type: i0.Input
|
|
1827
|
+
}], getPointer: [{
|
|
1828
|
+
type: i0.Input
|
|
1829
|
+
}] });
|
|
1830
|
+
})();
|
|
1831
|
+
|
|
1832
|
+
function setup(props) {
|
|
1833
|
+
var getProps = function () { return ({
|
|
1834
|
+
menu: (props === null || props === void 0 ? void 0 : props.contextMenu) || (function () { return null; }),
|
|
1835
|
+
translate: (props === null || props === void 0 ? void 0 : props.translate) || (function () { return null; }),
|
|
1836
|
+
down: (props === null || props === void 0 ? void 0 : props.pointerdown) || (function () { return null; })
|
|
1837
|
+
}); };
|
|
1838
|
+
return {
|
|
1839
|
+
update: function (context) {
|
|
1840
|
+
if (context.data.type === 'reroute-pins') {
|
|
1841
|
+
return Object.assign(Object.assign({}, getProps()), { pins: context.data.data.pins });
|
|
1842
|
+
}
|
|
1843
|
+
return null;
|
|
1844
|
+
},
|
|
1845
|
+
mount: function (context, plugin) {
|
|
1846
|
+
var area = plugin.parentScope(reteAreaPlugin.BaseAreaPlugin);
|
|
1847
|
+
var rendered = function () {
|
|
1848
|
+
area.emit({ type: 'rendered', data: context.data });
|
|
1849
|
+
};
|
|
1850
|
+
if (context.data.type === 'reroute-pins') {
|
|
1851
|
+
return {
|
|
1852
|
+
key: 'rete-reroute',
|
|
1853
|
+
component: PinsComponent,
|
|
1854
|
+
props: Object.assign(Object.assign({}, getProps()), { pins: context.data.data.pins, rendered: rendered, getPointer: function () { return area.area.pointer; } })
|
|
1855
|
+
};
|
|
1856
|
+
}
|
|
1857
|
+
return null;
|
|
1858
|
+
}
|
|
1859
|
+
};
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1862
|
+
var index$1 = /*#__PURE__*/Object.freeze({
|
|
1863
|
+
__proto__: null,
|
|
1864
|
+
setup: setup
|
|
1865
|
+
});
|
|
1866
|
+
|
|
1867
|
+
var index = /*#__PURE__*/Object.freeze({
|
|
1868
|
+
__proto__: null,
|
|
1869
|
+
classic: index$4,
|
|
1870
|
+
contextMenu: index$3,
|
|
1871
|
+
minimap: index$2,
|
|
1872
|
+
reroute: index$1
|
|
1873
|
+
});
|
|
1874
|
+
|
|
1875
|
+
var ReteModule = /** @class */ (function () {
|
|
1876
|
+
function ReteModule() {
|
|
1877
|
+
}
|
|
1878
|
+
return ReteModule;
|
|
1879
|
+
}());
|
|
1880
|
+
ReteModule.ɵfac = function ReteModule_Factory(t) { return new (t || ReteModule)(); };
|
|
1881
|
+
ReteModule.ɵmod = /*@__PURE__*/ i0__namespace.ɵɵdefineNgModule({ type: ReteModule });
|
|
1882
|
+
ReteModule.ɵinj = /*@__PURE__*/ i0__namespace.ɵɵdefineInjector({ imports: [[
|
|
1883
|
+
i1.CommonModule
|
|
1884
|
+
]] });
|
|
1885
|
+
(function () {
|
|
1886
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ReteModule, [{
|
|
1887
|
+
type: i0.NgModule,
|
|
1888
|
+
args: [{
|
|
1889
|
+
declarations: [
|
|
1890
|
+
RefDirective,
|
|
1891
|
+
NodeComponent,
|
|
1892
|
+
ConnectionComponent,
|
|
1893
|
+
ConnectionWrapperComponent,
|
|
1894
|
+
SocketComponent,
|
|
1895
|
+
ControlComponent
|
|
1896
|
+
],
|
|
1897
|
+
imports: [
|
|
1898
|
+
i1.CommonModule
|
|
1899
|
+
],
|
|
1900
|
+
exports: [
|
|
1901
|
+
RefDirective,
|
|
1902
|
+
NodeComponent,
|
|
1903
|
+
ConnectionComponent,
|
|
1904
|
+
ConnectionWrapperComponent,
|
|
1905
|
+
SocketComponent,
|
|
1906
|
+
ControlComponent
|
|
1907
|
+
],
|
|
1908
|
+
entryComponents: [
|
|
1909
|
+
NodeComponent,
|
|
1910
|
+
ConnectionComponent,
|
|
1911
|
+
ConnectionWrapperComponent,
|
|
1912
|
+
SocketComponent,
|
|
1913
|
+
ControlComponent
|
|
1914
|
+
]
|
|
1915
|
+
}]
|
|
1916
|
+
}], null, null);
|
|
1917
|
+
})();
|
|
1918
|
+
(function () {
|
|
1919
|
+
(typeof ngJitMode === "undefined" || ngJitMode) && i0__namespace.ɵɵsetNgModuleScope(ReteModule, { declarations: [RefDirective,
|
|
1920
|
+
NodeComponent,
|
|
1921
|
+
ConnectionComponent,
|
|
1922
|
+
ConnectionWrapperComponent,
|
|
1923
|
+
SocketComponent,
|
|
1924
|
+
ControlComponent], imports: [i1.CommonModule], exports: [RefDirective,
|
|
1925
|
+
NodeComponent,
|
|
1926
|
+
ConnectionComponent,
|
|
1927
|
+
ConnectionWrapperComponent,
|
|
1928
|
+
SocketComponent,
|
|
1929
|
+
ControlComponent] });
|
|
1930
|
+
})();
|
|
1931
|
+
|
|
1932
|
+
var ReteContextMenuModule = /** @class */ (function () {
|
|
1933
|
+
function ReteContextMenuModule() {
|
|
1934
|
+
}
|
|
1935
|
+
return ReteContextMenuModule;
|
|
1936
|
+
}());
|
|
1937
|
+
ReteContextMenuModule.ɵfac = function ReteContextMenuModule_Factory(t) { return new (t || ReteContextMenuModule)(); };
|
|
1938
|
+
ReteContextMenuModule.ɵmod = /*@__PURE__*/ i0__namespace.ɵɵdefineNgModule({ type: ReteContextMenuModule });
|
|
1939
|
+
ReteContextMenuModule.ɵinj = /*@__PURE__*/ i0__namespace.ɵɵdefineInjector({ imports: [[
|
|
1940
|
+
i1.CommonModule
|
|
1941
|
+
]] });
|
|
1942
|
+
(function () {
|
|
1943
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ReteContextMenuModule, [{
|
|
1944
|
+
type: i0.NgModule,
|
|
1945
|
+
args: [{
|
|
1946
|
+
declarations: [
|
|
1947
|
+
ContextMenuComponent,
|
|
1948
|
+
ContextMenuSearchComponent,
|
|
1949
|
+
ContextMenuItemComponent
|
|
1950
|
+
],
|
|
1951
|
+
imports: [
|
|
1952
|
+
i1.CommonModule
|
|
1953
|
+
],
|
|
1954
|
+
exports: [
|
|
1955
|
+
ContextMenuComponent,
|
|
1956
|
+
ContextMenuSearchComponent,
|
|
1957
|
+
ContextMenuItemComponent,
|
|
1958
|
+
],
|
|
1959
|
+
entryComponents: [
|
|
1960
|
+
ContextMenuComponent
|
|
1961
|
+
]
|
|
1962
|
+
}]
|
|
1963
|
+
}], null, null);
|
|
1964
|
+
})();
|
|
1965
|
+
(function () {
|
|
1966
|
+
(typeof ngJitMode === "undefined" || ngJitMode) && i0__namespace.ɵɵsetNgModuleScope(ReteContextMenuModule, { declarations: [ContextMenuComponent,
|
|
1967
|
+
ContextMenuSearchComponent,
|
|
1968
|
+
ContextMenuItemComponent], imports: [i1.CommonModule], exports: [ContextMenuComponent,
|
|
1969
|
+
ContextMenuSearchComponent,
|
|
1970
|
+
ContextMenuItemComponent] });
|
|
1971
|
+
})();
|
|
1972
|
+
|
|
1973
|
+
var ReteMinimapModule = /** @class */ (function () {
|
|
1974
|
+
function ReteMinimapModule() {
|
|
1975
|
+
}
|
|
1976
|
+
return ReteMinimapModule;
|
|
1977
|
+
}());
|
|
1978
|
+
ReteMinimapModule.ɵfac = function ReteMinimapModule_Factory(t) { return new (t || ReteMinimapModule)(); };
|
|
1979
|
+
ReteMinimapModule.ɵmod = /*@__PURE__*/ i0__namespace.ɵɵdefineNgModule({ type: ReteMinimapModule });
|
|
1980
|
+
ReteMinimapModule.ɵinj = /*@__PURE__*/ i0__namespace.ɵɵdefineInjector({ imports: [[
|
|
1981
|
+
i1.CommonModule
|
|
1982
|
+
]] });
|
|
1983
|
+
(function () {
|
|
1984
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ReteMinimapModule, [{
|
|
1985
|
+
type: i0.NgModule,
|
|
1986
|
+
args: [{
|
|
1987
|
+
declarations: [
|
|
1988
|
+
MinimapComponent,
|
|
1989
|
+
MiniViewportComponent,
|
|
1990
|
+
MiniNodeComponent
|
|
1991
|
+
],
|
|
1992
|
+
imports: [
|
|
1993
|
+
i1.CommonModule
|
|
1994
|
+
],
|
|
1995
|
+
exports: [
|
|
1996
|
+
MinimapComponent,
|
|
1997
|
+
MiniViewportComponent,
|
|
1998
|
+
MiniNodeComponent
|
|
1999
|
+
],
|
|
2000
|
+
entryComponents: [
|
|
2001
|
+
MinimapComponent
|
|
2002
|
+
]
|
|
2003
|
+
}]
|
|
2004
|
+
}], null, null);
|
|
2005
|
+
})();
|
|
2006
|
+
(function () {
|
|
2007
|
+
(typeof ngJitMode === "undefined" || ngJitMode) && i0__namespace.ɵɵsetNgModuleScope(ReteMinimapModule, { declarations: [MinimapComponent,
|
|
2008
|
+
MiniViewportComponent,
|
|
2009
|
+
MiniNodeComponent], imports: [i1.CommonModule], exports: [MinimapComponent,
|
|
2010
|
+
MiniViewportComponent,
|
|
2011
|
+
MiniNodeComponent] });
|
|
2012
|
+
})();
|
|
2013
|
+
|
|
2014
|
+
var ReteRerouteModule = /** @class */ (function () {
|
|
2015
|
+
function ReteRerouteModule() {
|
|
2016
|
+
}
|
|
2017
|
+
return ReteRerouteModule;
|
|
2018
|
+
}());
|
|
2019
|
+
ReteRerouteModule.ɵfac = function ReteRerouteModule_Factory(t) { return new (t || ReteRerouteModule)(); };
|
|
2020
|
+
ReteRerouteModule.ɵmod = /*@__PURE__*/ i0__namespace.ɵɵdefineNgModule({ type: ReteRerouteModule });
|
|
2021
|
+
ReteRerouteModule.ɵinj = /*@__PURE__*/ i0__namespace.ɵɵdefineInjector({ imports: [[
|
|
2022
|
+
i1.CommonModule
|
|
2023
|
+
]] });
|
|
2024
|
+
(function () {
|
|
2025
|
+
(typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(ReteRerouteModule, [{
|
|
2026
|
+
type: i0.NgModule,
|
|
2027
|
+
args: [{
|
|
2028
|
+
declarations: [
|
|
2029
|
+
PinsComponent,
|
|
2030
|
+
PinComponent,
|
|
2031
|
+
],
|
|
2032
|
+
imports: [
|
|
2033
|
+
i1.CommonModule
|
|
2034
|
+
],
|
|
2035
|
+
exports: [
|
|
2036
|
+
PinsComponent,
|
|
2037
|
+
PinComponent,
|
|
2038
|
+
],
|
|
2039
|
+
entryComponents: [
|
|
2040
|
+
PinsComponent
|
|
2041
|
+
]
|
|
2042
|
+
}]
|
|
2043
|
+
}], null, null);
|
|
2044
|
+
})();
|
|
2045
|
+
(function () {
|
|
2046
|
+
(typeof ngJitMode === "undefined" || ngJitMode) && i0__namespace.ɵɵsetNgModuleScope(ReteRerouteModule, { declarations: [PinsComponent,
|
|
2047
|
+
PinComponent], imports: [i1.CommonModule], exports: [PinsComponent,
|
|
2048
|
+
PinComponent] });
|
|
2049
|
+
})();
|
|
2050
|
+
|
|
2051
|
+
function getRenderer() {
|
|
2052
|
+
var elements$1 = new WeakMap();
|
|
2053
|
+
return {
|
|
2054
|
+
get: function (element) {
|
|
2055
|
+
return elements$1.get(element);
|
|
2056
|
+
},
|
|
2057
|
+
mount: function (element, key, component, injector, props) {
|
|
2058
|
+
// LIMITATION: If an element is remounted with the same identifier, the component cannot be replaced
|
|
2059
|
+
var exists = customElements.get(key);
|
|
2060
|
+
if (!exists) {
|
|
2061
|
+
customElements.define(key, elements.createCustomElement(component, { injector: injector }));
|
|
2062
|
+
}
|
|
2063
|
+
var ngElement = document.createElement(key);
|
|
2064
|
+
Object.keys(props).forEach(function (key) {
|
|
2065
|
+
ngElement[key] = props[key];
|
|
2066
|
+
});
|
|
2067
|
+
element.appendChild(ngElement);
|
|
2068
|
+
elements$1.set(element, { key: key, ngElement: ngElement });
|
|
2069
|
+
},
|
|
2070
|
+
update: function (_a, props) {
|
|
2071
|
+
var ngElement = _a.ngElement;
|
|
2072
|
+
Object.keys(props).forEach(function (key) {
|
|
2073
|
+
ngElement.ngElementStrategy.setInputValue(key, props[key]);
|
|
2074
|
+
});
|
|
2075
|
+
ngElement.ngElementStrategy.setInputValue('seed', Math.random());
|
|
2076
|
+
},
|
|
2077
|
+
unmount: function (element) {
|
|
2078
|
+
var existing = elements$1.get(element);
|
|
2079
|
+
if (existing) {
|
|
2080
|
+
existing.ngElement.remove();
|
|
2081
|
+
elements$1.delete(element);
|
|
2082
|
+
}
|
|
2083
|
+
}
|
|
2084
|
+
};
|
|
2085
|
+
}
|
|
2086
|
+
var AngularPlugin = /** @class */ (function (_super) {
|
|
2087
|
+
__extends(AngularPlugin, _super);
|
|
2088
|
+
function AngularPlugin(params) {
|
|
2089
|
+
var _this = _super.call(this, 'angular-render') || this;
|
|
2090
|
+
_this.params = params;
|
|
2091
|
+
_this.presets = [];
|
|
2092
|
+
_this.owners = new WeakMap();
|
|
2093
|
+
_this.renderer = getRenderer();
|
|
2094
|
+
_this.addPipe(function (context) {
|
|
2095
|
+
if (!context || typeof context !== 'object' || !('type' in context))
|
|
2096
|
+
return context;
|
|
2097
|
+
if (context.type === 'unmount') {
|
|
2098
|
+
_this.unmount(context.data.element);
|
|
2099
|
+
}
|
|
2100
|
+
else if (context.type === 'render') {
|
|
2101
|
+
if ('filled' in context.data && context.data.filled) {
|
|
2102
|
+
return context;
|
|
2103
|
+
}
|
|
2104
|
+
if (_this.mount(context.data.element, context)) {
|
|
2105
|
+
return Object.assign(Object.assign({}, context), { data: Object.assign(Object.assign({}, context.data), { filled: true }) });
|
|
2106
|
+
}
|
|
2107
|
+
}
|
|
2108
|
+
return context;
|
|
2109
|
+
});
|
|
2110
|
+
return _this;
|
|
2111
|
+
}
|
|
2112
|
+
AngularPlugin.prototype.setParent = function (scope) {
|
|
2113
|
+
var _this = this;
|
|
2114
|
+
_super.prototype.setParent.call(this, scope);
|
|
2115
|
+
this.presets.forEach(function (preset) {
|
|
2116
|
+
if (preset.attach)
|
|
2117
|
+
preset.attach(_this);
|
|
2118
|
+
});
|
|
2119
|
+
};
|
|
2120
|
+
AngularPlugin.prototype.unmount = function (element) {
|
|
2121
|
+
this.owners.delete(element);
|
|
2122
|
+
this.renderer.unmount(element);
|
|
2123
|
+
};
|
|
2124
|
+
AngularPlugin.prototype.mount = function (element, context) {
|
|
2125
|
+
var e_1, _a;
|
|
2126
|
+
var _this = this;
|
|
2127
|
+
var existing = this.renderer.get(element);
|
|
2128
|
+
if (existing) {
|
|
2129
|
+
this.presets.forEach(function (preset) {
|
|
2130
|
+
if (_this.owners.get(element) !== preset)
|
|
2131
|
+
return;
|
|
2132
|
+
var result = preset.update(context, _this);
|
|
2133
|
+
if (result) {
|
|
2134
|
+
_this.renderer.update(existing, result);
|
|
2135
|
+
}
|
|
2136
|
+
});
|
|
2137
|
+
return true;
|
|
2138
|
+
}
|
|
2139
|
+
try {
|
|
2140
|
+
for (var _b = __values(this.presets), _c = _b.next(); !_c.done; _c = _b.next()) {
|
|
2141
|
+
var preset = _c.value;
|
|
2142
|
+
var result = preset.mount(context, this);
|
|
2143
|
+
if (!result)
|
|
2144
|
+
continue;
|
|
2145
|
+
var key = result.key, component = result.component, props = result.props;
|
|
2146
|
+
this.renderer.mount(element, key, component, this.params.injector, props);
|
|
2147
|
+
this.owners.set(element, preset);
|
|
2148
|
+
return true;
|
|
2149
|
+
}
|
|
2150
|
+
}
|
|
2151
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2152
|
+
finally {
|
|
2153
|
+
try {
|
|
2154
|
+
if (_c && !_c.done && (_a = _b.return)) _a.call(_b);
|
|
2155
|
+
}
|
|
2156
|
+
finally { if (e_1) throw e_1.error; }
|
|
2157
|
+
}
|
|
2158
|
+
return;
|
|
2159
|
+
};
|
|
2160
|
+
AngularPlugin.prototype.addPreset = function (preset) {
|
|
2161
|
+
var local = preset;
|
|
2162
|
+
if (local.attach)
|
|
2163
|
+
local.attach(this);
|
|
2164
|
+
this.presets.push(local);
|
|
2165
|
+
};
|
|
2166
|
+
return AngularPlugin;
|
|
2167
|
+
}(rete.Scope));
|
|
2168
|
+
|
|
2169
|
+
/**
|
|
2170
|
+
* Generated bundle index. Do not edit.
|
|
2171
|
+
*/
|
|
2172
|
+
|
|
2173
|
+
exports.AngularPlugin = AngularPlugin;
|
|
2174
|
+
exports.ConnectionComponent = ConnectionComponent;
|
|
2175
|
+
exports.ConnectionWrapperComponent = ConnectionWrapperComponent;
|
|
2176
|
+
exports.ContextMenuComponent = ContextMenuComponent;
|
|
2177
|
+
exports.ContextMenuItemComponent = ContextMenuItemComponent;
|
|
2178
|
+
exports.ContextMenuSearchComponent = ContextMenuSearchComponent;
|
|
2179
|
+
exports.ControlComponent = ControlComponent;
|
|
2180
|
+
exports.MiniNodeComponent = MiniNodeComponent;
|
|
2181
|
+
exports.MiniViewportComponent = MiniViewportComponent;
|
|
2182
|
+
exports.MinimapComponent = MinimapComponent;
|
|
2183
|
+
exports.NodeComponent = NodeComponent;
|
|
2184
|
+
exports.PinComponent = PinComponent;
|
|
2185
|
+
exports.PinsComponent = PinsComponent;
|
|
2186
|
+
exports.Presets = index;
|
|
2187
|
+
exports.RefDirective = RefDirective;
|
|
2188
|
+
exports.ReteContextMenuModule = ReteContextMenuModule;
|
|
2189
|
+
exports.ReteMinimapModule = ReteMinimapModule;
|
|
2190
|
+
exports.ReteModule = ReteModule;
|
|
2191
|
+
exports.ReteRerouteModule = ReteRerouteModule;
|
|
2192
|
+
exports.SocketComponent = SocketComponent;
|
|
2193
|
+
|
|
2194
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
2195
|
+
|
|
2196
|
+
}));
|
|
2197
|
+
//# sourceMappingURL=rete-angular-plugin-ng12.umd.js.map
|