@emuanalytics/flow-rdf-ui 4.2.1 → 4.3.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/README.md +58 -0
- package/THIRD_PARTY_NOTICES.md +220 -0
- package/dist/components/alert/alert.component.mjs +3 -0
- package/dist/components/animation/animation.component.mjs +1 -0
- package/dist/components/autocomplete/autocomplete.component.mjs +3 -4
- package/dist/components/avatar/avatar.component.mjs +3 -0
- package/dist/components/badge/badge.component.mjs +1 -0
- package/dist/components/base-control/base-control.component.mjs +3 -0
- package/dist/components/breadcrumb/breadcrumb.component.mjs +3 -0
- package/dist/components/breadcrumb-item/breadcrumb-item.component.mjs +1 -0
- package/dist/components/busy-overlay/busy-overlay.component.mjs +3 -0
- package/dist/components/button/button.component.mjs +4 -0
- package/dist/components/button-group/button-group.component.mjs +1 -0
- package/dist/components/calendar/calendar.component.mjs +6 -0
- package/dist/components/card/card.component.mjs +1 -0
- package/dist/components/carousel/carousel.component.mjs +3 -0
- package/dist/components/carousel-item/carousel-item.component.mjs +1 -0
- package/dist/components/chart/chart.component.mjs +1 -0
- package/dist/components/chart/chartjs-plugins/luxon.adapter.mjs +78 -0
- package/dist/components/chart/chartjs-support.mjs +2 -0
- package/dist/components/checkbox/checkbox.component.mjs +3 -0
- package/dist/components/checkbox-group/checkbox-group.component.mjs +3 -0
- package/dist/components/color-mapper/color-mapper.component.mjs +21 -0
- package/dist/components/color-picker/color-picker.component.mjs +8 -0
- package/dist/components/color-stop/color-stop.component.mjs +17 -0
- package/dist/components/date-time-picker/date-time-picker.component.mjs +6 -0
- package/dist/components/details/details.component.mjs +3 -0
- package/dist/components/diagram/diagram-panel.styles.mjs +44 -0
- package/dist/components/diagram/diagram-tokens.styles.mjs +148 -0
- package/dist/components/diagram/diagram.component.mjs +355 -0
- package/dist/components/diagram/diagram.mjs +5 -0
- package/dist/components/diagram/diagram.styles.mjs +95 -0
- package/dist/components/diagram-background/diagram-background.component.mjs +163 -0
- package/dist/components/diagram-background/diagram-background.mjs +5 -0
- package/dist/components/diagram-background/diagram-background.styles.mjs +58 -0
- package/dist/components/diagram-base-edge/diagram-base-edge.component.mjs +326 -0
- package/dist/components/diagram-base-edge/diagram-base-edge.mjs +5 -0
- package/dist/components/diagram-base-edge/diagram-base-edge.styles.mjs +147 -0
- package/dist/components/diagram-base-node/diagram-base-node.component.mjs +84 -0
- package/dist/components/diagram-base-node/diagram-base-node.mjs +5 -0
- package/dist/components/diagram-base-node/diagram-base-node.styles.mjs +37 -0
- package/dist/components/diagram-edge/diagram-edge.component.mjs +56 -0
- package/dist/components/diagram-edge/diagram-edge.mjs +5 -0
- package/dist/components/diagram-edge/diagram-edge.styles.mjs +37 -0
- package/dist/components/diagram-edge-label/diagram-edge-label.component.mjs +202 -0
- package/dist/components/diagram-edge-label/diagram-edge-label.mjs +5 -0
- package/dist/components/diagram-edge-label/diagram-edge-label.styles.mjs +54 -0
- package/dist/components/diagram-marker/diagram-marker.component.mjs +84 -0
- package/dist/components/diagram-marker/diagram-marker.mjs +5 -0
- package/dist/components/diagram-marker/diagram-marker.styles.mjs +9 -0
- package/dist/components/diagram-minimap/diagram-minimap.component.mjs +298 -0
- package/dist/components/diagram-minimap/diagram-minimap.mjs +5 -0
- package/dist/components/diagram-minimap/diagram-minimap.styles.mjs +83 -0
- package/dist/components/diagram-node/diagram-node-template.styles.mjs +36 -0
- package/dist/components/diagram-node/diagram-node.component.mjs +183 -0
- package/dist/components/diagram-node/diagram-node.mjs +6 -0
- package/dist/components/diagram-node/diagram-node.styles.mjs +29 -0
- package/dist/components/diagram-palette-item/diagram-palette-item.component.mjs +168 -0
- package/dist/components/diagram-palette-item/diagram-palette-item.mjs +5 -0
- package/dist/components/diagram-palette-item/diagram-palette-item.styles.mjs +20 -0
- package/dist/components/diagram-palette-item-preview/diagram-palette-item-preview.component.mjs +245 -0
- package/dist/components/diagram-palette-item-preview/diagram-palette-item-preview.mjs +6 -0
- package/dist/components/diagram-palette-item-preview/diagram-palette-item-preview.styles.mjs +41 -0
- package/dist/components/diagram-port/diagram-port.component.mjs +273 -0
- package/dist/components/diagram-port/diagram-port.mjs +5 -0
- package/dist/components/diagram-port/diagram-port.styles.mjs +116 -0
- package/dist/components/diagram-resize-adornment/diagram-resize-adornment.component.mjs +124 -0
- package/dist/components/diagram-resize-adornment/diagram-resize-adornment.mjs +5 -0
- package/dist/components/diagram-resize-adornment/diagram-resize-adornment.styles.mjs +136 -0
- package/dist/components/diagram-rotate-adornment/diagram-rotate-adornment.component.mjs +125 -0
- package/dist/components/diagram-rotate-adornment/diagram-rotate-adornment.mjs +5 -0
- package/dist/components/diagram-rotate-adornment/diagram-rotate-adornment.styles.mjs +65 -0
- package/dist/components/diagram-zoom-controls/diagram-zoom-controls.component.mjs +158 -0
- package/dist/components/diagram-zoom-controls/diagram-zoom-controls.mjs +5 -0
- package/dist/components/diagram-zoom-controls/diagram-zoom-controls.styles.mjs +66 -0
- package/dist/components/dialog/dialog.component.mjs +4 -0
- package/dist/components/divider/divider.component.mjs +1 -0
- package/dist/components/drawer/drawer.component.mjs +3 -0
- package/dist/components/dropdown/dropdown.component.mjs +2 -1
- package/dist/components/form-group/form-group.component.mjs +1 -0
- package/dist/components/gauge/gauge.component.mjs +6 -0
- package/dist/components/icon/icon.component.mjs +1 -0
- package/dist/components/icon/library.system.mjs +2 -0
- package/dist/components/icon-button/icon-button.component.mjs +5 -0
- package/dist/components/input/input.component.mjs +5 -0
- package/dist/components/list/list.component.mjs +1 -0
- package/dist/components/list-item/list-item.component.mjs +17 -0
- package/dist/components/map/map.component.mjs +3 -0
- package/dist/components/map/map.styles.mjs +10 -0
- package/dist/components/menu/menu.component.mjs +1 -0
- package/dist/components/menu-item/menu-item.component.mjs +3 -0
- package/dist/components/menu-label/menu-label.component.mjs +1 -0
- package/dist/components/mutation-observer/mutation-observer.component.mjs +1 -0
- package/dist/components/option/option.component.mjs +2 -1
- package/dist/components/panel/panel.component.mjs +85 -1
- package/dist/components/panel/panel.styles.mjs +29 -0
- package/dist/components/panel-header/panel-header.component.mjs +3 -0
- package/dist/components/popup/popup.component.mjs +1 -0
- package/dist/components/progress-bar/progress-bar.component.mjs +1 -0
- package/dist/components/progress-ring/progress-ring.component.mjs +1 -0
- package/dist/components/query-builder/query-builder.component.mjs +27 -0
- package/dist/components/radio/radio.component.mjs +3 -0
- package/dist/components/radio-group/radio-group.component.mjs +3 -0
- package/dist/components/range/range.component.mjs +4 -0
- package/dist/components/resize-observer/resize-observer.component.mjs +1 -0
- package/dist/components/scroll-view/scroll-view.component.mjs +1 -0
- package/dist/components/select/select.component.mjs +3 -5
- package/dist/components/split-view/split-view-layout-registry.mjs +44 -0
- package/dist/components/split-view/split-view-layout.mjs +607 -0
- package/dist/components/split-view/split-view.component.mjs +502 -468
- package/dist/components/split-view/split-view.styles.mjs +25 -0
- package/dist/components/split-view-divider/split-view-divider.component.mjs +2 -53
- package/dist/components/split-view-divider/split-view-divider.styles.mjs +28 -16
- package/dist/components/split-view-pane/split-view-pane.component.mjs +197 -18
- package/dist/components/split-view-pane/split-view-pane.styles.mjs +52 -0
- package/dist/components/split-view-toggle-button/split-view-toggle-button.component.mjs +5 -0
- package/dist/components/stepper/stepper.component.mjs +1 -0
- package/dist/components/stepper-panel/stepper-panel.component.mjs +1 -0
- package/dist/components/switch/switch.component.mjs +3 -0
- package/dist/components/tab/tab.component.mjs +4 -0
- package/dist/components/tab-group/tab-group.component.mjs +176 -6
- package/dist/components/tab-group/tab-group.styles.mjs +44 -0
- package/dist/components/tab-panel/tab-panel.component.mjs +1 -0
- package/dist/components/tag/tag.component.mjs +2 -1
- package/dist/components/textarea/textarea.component.mjs +1 -0
- package/dist/components/timer/ticker.mjs +7 -0
- package/dist/components/timer/timer.component.mjs +44 -3
- package/dist/components/timer/timer.styles.mjs +6 -2
- package/dist/components/tool-button/tool-button.component.mjs +4 -0
- package/dist/components/tool-button-group/tool-button-group.component.mjs +3 -0
- package/dist/components/tooltip/tooltip.component.mjs +3 -0
- package/dist/components/tree/tree.component.mjs +1 -0
- package/dist/components/tree-item/tree-item.component.mjs +5 -0
- package/dist/components/visually-hidden/visually-hidden.component.mjs +1 -0
- package/dist/custom-elements.json +7002 -867
- package/dist/diagram/api/diagram-api-base.mjs +16 -0
- package/dist/diagram/api/diagram-api.mjs +399 -0
- package/dist/diagram/api/diagram-clipboard-api.mjs +52 -0
- package/dist/diagram/api/diagram-groups-api.mjs +46 -0
- package/dist/diagram/api/diagram-model-api.mjs +447 -0
- package/dist/diagram/api/diagram-nodes-api.mjs +61 -0
- package/dist/diagram/api/diagram-selection-api.mjs +56 -0
- package/dist/diagram/api/diagram-viewport-api.mjs +169 -0
- package/dist/diagram/api/emit-with-measurement-option.mjs +21 -0
- package/dist/diagram/input/box-selection-controller.mjs +104 -0
- package/dist/diagram/input/context-menu-controller.mjs +196 -0
- package/dist/diagram/input/cursor-position-tracker-controller.mjs +18 -0
- package/dist/diagram/input/input-controller.mjs +31 -0
- package/dist/diagram/input/keyboard-actions/moving-action.mjs +27 -0
- package/dist/diagram/input/keyboard-actions/panning-action.mjs +27 -0
- package/dist/diagram/input/keyboard-actions/paste-action.mjs +17 -0
- package/dist/diagram/input/keyboard-actions/zoom-action.mjs +30 -0
- package/dist/diagram/input/keyboard-inputs-controller.mjs +121 -0
- package/dist/diagram/input/linking-controller.mjs +127 -0
- package/dist/diagram/input/linking-events.mjs +61 -0
- package/dist/diagram/input/manual-linking.mjs +101 -0
- package/dist/diagram/input/mobile-box-selection-controller.mjs +133 -0
- package/dist/diagram/input/mobile-panning-controller.mjs +114 -0
- package/dist/diagram/input/mobile-zooming-controller.mjs +110 -0
- package/dist/diagram/input/object-selection-controller.mjs +152 -0
- package/dist/diagram/input/palette-drop-controller.mjs +92 -0
- package/dist/diagram/input/panning-controller.mjs +147 -0
- package/dist/diagram/input/pointer-move-selection-controller.mjs +191 -0
- package/dist/diagram/input/relinking-gesture.mjs +182 -0
- package/dist/diagram/input/resize-controller.mjs +122 -0
- package/dist/diagram/input/rotate-controller.mjs +126 -0
- package/dist/diagram/input/zooming-wheel-controller.mjs +55 -0
- package/dist/diagram/minimap/minimap-calculations.mjs +83 -0
- package/dist/diagram/minimap/minimap-navigation-controller.mjs +150 -0
- package/dist/diagram/minimap/minimap-node-cache.mjs +19 -0
- package/dist/diagram/minimap/minimap-strategies.mjs +44 -0
- package/dist/diagram/model/diagram-model-adapter.mjs +97 -0
- package/dist/diagram/model/initialize-model.mjs +31 -0
- package/dist/diagram/model/strip-runtime-properties.mjs +30 -0
- package/dist/diagram/runtime/attribute-converters.mjs +11 -0
- package/dist/diagram/runtime/batched-resize-observer.mjs +168 -0
- package/dist/diagram/runtime/box-selection-provider.mjs +9 -0
- package/dist/diagram/runtime/context.mjs +132 -0
- package/dist/diagram/runtime/contexts.mjs +8 -0
- package/dist/diagram/runtime/cursor-position-tracker.mjs +20 -0
- package/dist/diagram/runtime/default-edge-templates.mjs +21 -0
- package/dist/diagram/runtime/default-node-templates.mjs +20 -0
- package/dist/diagram/runtime/diagram-reference.mjs +126 -0
- package/dist/diagram/runtime/diagram-runtime.mjs +214 -0
- package/dist/diagram/runtime/dom-input-events-router.mjs +88 -0
- package/dist/diagram/runtime/environment.mjs +59 -0
- package/dist/diagram/runtime/event-bridge.mjs +31 -0
- package/dist/diagram/runtime/flow-offset.mjs +45 -0
- package/dist/diagram/runtime/group-highlighted.mjs +25 -0
- package/dist/diagram/runtime/hidden.mjs +147 -0
- package/dist/diagram/runtime/lit-renderer.mjs +33 -0
- package/dist/diagram/runtime/marker-registry.mjs +108 -0
- package/dist/diagram/runtime/middlewares.mjs +14 -0
- package/dist/diagram/runtime/model-owner.mjs +11 -0
- package/dist/diagram/runtime/node-selected.mjs +25 -0
- package/dist/diagram/runtime/observable.mjs +205 -0
- package/dist/diagram/runtime/palette-drag.mjs +56 -0
- package/dist/diagram/runtime/port-hover.mjs +27 -0
- package/dist/diagram/runtime/port-registry.mjs +87 -0
- package/dist/diagram/runtime/resize-processor.mjs +207 -0
- package/dist/diagram/runtime/template-resolver.mjs +98 -0
- package/dist/diagram/runtime/touch-events-state.mjs +52 -0
- package/dist/diagram/utilities.mjs +27 -0
- package/dist/diagram-core/action-state-manager/action-state-manager.mjs +238 -0
- package/dist/diagram-core/batch-processor/batch-processor.mjs +144 -0
- package/dist/diagram-core/command-handler/command-handler.mjs +62 -0
- package/dist/diagram-core/command-handler/commands/add-to-group.mjs +32 -0
- package/dist/diagram-core/command-handler/commands/add-update-delete.mjs +196 -0
- package/dist/diagram-core/command-handler/commands/centering.mjs +73 -0
- package/dist/diagram-core/command-handler/commands/copy-paste.mjs +223 -0
- package/dist/diagram-core/command-handler/commands/cut.mjs +9 -0
- package/dist/diagram-core/command-handler/commands/delete-selection.mjs +32 -0
- package/dist/diagram-core/command-handler/commands/detach-on-node-delete.mjs +77 -0
- package/dist/diagram-core/command-handler/commands/highlight-group.mjs +45 -0
- package/dist/diagram-core/command-handler/commands/index.mjs +88 -0
- package/dist/diagram-core/command-handler/commands/init.mjs +11 -0
- package/dist/diagram-core/command-handler/commands/linking/cancel-linking.mjs +26 -0
- package/dist/diagram-core/command-handler/commands/linking/finish-linking-to-position.mjs +33 -0
- package/dist/diagram-core/command-handler/commands/linking/finish-linking.mjs +108 -0
- package/dist/diagram-core/command-handler/commands/linking/finish-relinking.mjs +91 -0
- package/dist/diagram-core/command-handler/commands/linking/linking-gesture.mjs +13 -0
- package/dist/diagram-core/command-handler/commands/linking/move-temporary-edge.mjs +98 -0
- package/dist/diagram-core/command-handler/commands/linking/start-linking-from-position.mjs +23 -0
- package/dist/diagram-core/command-handler/commands/linking/start-linking.mjs +47 -0
- package/dist/diagram-core/command-handler/commands/linking/start-relinking.mjs +51 -0
- package/dist/diagram-core/command-handler/commands/linking/utils.mjs +103 -0
- package/dist/diagram-core/command-handler/commands/move-nodes-lifecycle.mjs +14 -0
- package/dist/diagram-core/command-handler/commands/move-viewport.mjs +48 -0
- package/dist/diagram-core/command-handler/commands/move.mjs +90 -0
- package/dist/diagram-core/command-handler/commands/remove-from-group.mjs +22 -0
- package/dist/diagram-core/command-handler/commands/resize-node-lifecycle.mjs +14 -0
- package/dist/diagram-core/command-handler/commands/resize-node.mjs +214 -0
- package/dist/diagram-core/command-handler/commands/rotate-node-lifecycle.mjs +14 -0
- package/dist/diagram-core/command-handler/commands/rotate-node.mjs +53 -0
- package/dist/diagram-core/command-handler/commands/selection.mjs +69 -0
- package/dist/diagram-core/command-handler/commands/z-order.mjs +125 -0
- package/dist/diagram-core/command-handler/commands/zoom-to-fit.mjs +118 -0
- package/dist/diagram-core/command-handler/commands/zoom.mjs +26 -0
- package/dist/diagram-core/edge-routing-manager/edge-routing-manager.mjs +253 -0
- package/dist/diagram-core/edge-routing-manager/resolve-label-position.mjs +13 -0
- package/dist/diagram-core/edge-routing-manager/routings/bezier/bezier-routing.mjs +73 -0
- package/dist/diagram-core/edge-routing-manager/routings/bezier/compute-bezier-path.mjs +24 -0
- package/dist/diagram-core/edge-routing-manager/routings/bezier/compute-bezier-point-at-distance.mjs +37 -0
- package/dist/diagram-core/edge-routing-manager/routings/bezier/compute-bezier-point-on-path.mjs +33 -0
- package/dist/diagram-core/edge-routing-manager/routings/bezier/compute-bezier-points.mjs +31 -0
- package/dist/diagram-core/edge-routing-manager/routings/orthogonal/compute-orthogonal-path.mjs +56 -0
- package/dist/diagram-core/edge-routing-manager/routings/orthogonal/compute-orthogonal-point-at-distance.mjs +12 -0
- package/dist/diagram-core/edge-routing-manager/routings/orthogonal/compute-orthogonal-point-on-path.mjs +38 -0
- package/dist/diagram-core/edge-routing-manager/routings/orthogonal/compute-orthogonal-points.mjs +26 -0
- package/dist/diagram-core/edge-routing-manager/routings/orthogonal/orthogonal-routing.mjs +69 -0
- package/dist/diagram-core/edge-routing-manager/routings/orthogonal/utils/get-offset-point.mjs +14 -0
- package/dist/diagram-core/edge-routing-manager/routings/orthogonal/utils/pathpoints/get-pathpoints-from-bottom.mjs +104 -0
- package/dist/diagram-core/edge-routing-manager/routings/orthogonal/utils/pathpoints/get-pathpoints-from-left.mjs +91 -0
- package/dist/diagram-core/edge-routing-manager/routings/orthogonal/utils/pathpoints/get-pathpoints-from-right.mjs +88 -0
- package/dist/diagram-core/edge-routing-manager/routings/orthogonal/utils/pathpoints/get-pathpoints-from-top.mjs +168 -0
- package/dist/diagram-core/edge-routing-manager/routings/orthogonal/utils/pathpoints/get-pathpoints.mjs +23 -0
- package/dist/diagram-core/edge-routing-manager/routings/polyline/compute-polyline-point-at-distance.mjs +12 -0
- package/dist/diagram-core/edge-routing-manager/routings/polyline/compute-polyline-point-on-path.mjs +41 -0
- package/dist/diagram-core/edge-routing-manager/routings/polyline/polyline-routing.mjs +81 -0
- package/dist/diagram-core/edge-routing-manager/utils/linear-segment-utils.mjs +27 -0
- package/dist/diagram-core/edge-routing-manager/utils/normalize-distance.mjs +6 -0
- package/dist/diagram-core/event-manager/event-manager.mjs +164 -0
- package/dist/diagram-core/flow-config/default-flow-config.mjs +143 -0
- package/dist/diagram-core/flow-core.mjs +541 -0
- package/dist/diagram-core/input-events/handlers/box-selection/box-selection.handler.mjs +69 -0
- package/dist/diagram-core/input-events/handlers/cancel-interaction/cancel-interaction.handler.mjs +9 -0
- package/dist/diagram-core/input-events/handlers/copy/copy.handler.mjs +9 -0
- package/dist/diagram-core/input-events/handlers/cut/cut.handler.mjs +9 -0
- package/dist/diagram-core/input-events/handlers/delete-selection/delete-selection.handler.mjs +9 -0
- package/dist/diagram-core/input-events/handlers/event-handler.mjs +29 -0
- package/dist/diagram-core/input-events/handlers/keyboard-move-selection/keyboard-move-selection.handler.mjs +130 -0
- package/dist/diagram-core/input-events/handlers/keyboard-panning/keyboard-panning.handler.mjs +31 -0
- package/dist/diagram-core/input-events/handlers/linking/linking.handler.mjs +77 -0
- package/dist/diagram-core/input-events/handlers/movable-selection.mjs +26 -0
- package/dist/diagram-core/input-events/handlers/palette-drop/palette-drop.handler.mjs +20 -0
- package/dist/diagram-core/input-events/handlers/panning/panning-handler-factory.mjs +8 -0
- package/dist/diagram-core/input-events/handlers/panning/panning.handler.mjs +41 -0
- package/dist/diagram-core/input-events/handlers/panning/virtualized-panning.handler.mjs +77 -0
- package/dist/diagram-core/input-events/handlers/paste/paste.handler.mjs +17 -0
- package/dist/diagram-core/input-events/handlers/pointer-move-selection/pointer-move-selection.handler.mjs +220 -0
- package/dist/diagram-core/input-events/handlers/redo/redo.handler.mjs +14 -0
- package/dist/diagram-core/input-events/handlers/relinking/relinking.handler.mjs +62 -0
- package/dist/diagram-core/input-events/handlers/resize/resize.handler.mjs +174 -0
- package/dist/diagram-core/input-events/handlers/rotate/rotate.handler.mjs +107 -0
- package/dist/diagram-core/input-events/handlers/select/select.handler.mjs +42 -0
- package/dist/diagram-core/input-events/handlers/select-all/select-all.handler.mjs +10 -0
- package/dist/diagram-core/input-events/handlers/undo/undo.handler.mjs +14 -0
- package/dist/diagram-core/input-events/handlers/wheel-panning/wheel-panning.handler.mjs +25 -0
- package/dist/diagram-core/input-events/handlers/zooming/zooming.handler.mjs +28 -0
- package/dist/diagram-core/input-events/input-events.router.mjs +75 -0
- package/dist/diagram-core/interaction-coordinator/interaction-coordinator.mjs +75 -0
- package/dist/diagram-core/label-batch-processor/label-batch-processor.mjs +19 -0
- package/dist/diagram-core/math/angle-between-points/angle-between-points.mjs +5 -0
- package/dist/diagram-core/math/angle-to-side/angle-to-side.mjs +27 -0
- package/dist/diagram-core/math/calculate-edge-panning-force/calculate-edge-panning-force.mjs +34 -0
- package/dist/diagram-core/math/clamp/clamp.mjs +5 -0
- package/dist/diagram-core/math/distance-between-points/distance-between-points.mjs +5 -0
- package/dist/diagram-core/math/ng-diagram-math.mjs +25 -0
- package/dist/diagram-core/math/normalize-angle/normalize-angle.mjs +5 -0
- package/dist/diagram-core/math/snap-angle/snap-angle.mjs +43 -0
- package/dist/diagram-core/math/snap-number/snap-number.mjs +3 -0
- package/dist/diagram-core/math/snap-point/snap-point.mjs +8 -0
- package/dist/diagram-core/math/subtract-points/subtract-points.mjs +5 -0
- package/dist/diagram-core/measurement-tracker/measurement-tracker.mjs +182 -0
- package/dist/diagram-core/middleware-manager/middleware-executor.mjs +246 -0
- package/dist/diagram-core/middleware-manager/middleware-manager.mjs +93 -0
- package/dist/diagram-core/middleware-manager/middlewares/edges-routing/edges-routing.mjs +149 -0
- package/dist/diagram-core/middleware-manager/middlewares/edges-routing/get-edge-points.mjs +93 -0
- package/dist/diagram-core/middleware-manager/middlewares/edges-routing/get-source-target-positions.mjs +90 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/clipboard-paste.emitter.mjs +34 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/diagram-init.emitter.mjs +190 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/edge-draw-ended.emitter.mjs +51 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/edge-drawn.emitter.mjs +35 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/edge-relink.emitter.mjs +58 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/group-membership-changed.emitter.mjs +49 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/node-drag-lifecycle.emitter.mjs +54 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/node-resize-lifecycle.emitter.mjs +44 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/node-rotate-lifecycle.emitter.mjs +44 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/palette-item-dropped.emitter.mjs +26 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/selection-changed.emitter.mjs +61 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/selection-gesture-ended.emitter.mjs +32 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/selection-moved.emitter.mjs +57 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/selection-removed.emitter.mjs +40 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/selection-rotated.emitter.mjs +33 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/size-changed.emitter.mjs +33 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/emitters/viewport-changed.emitter.mjs +19 -0
- package/dist/diagram-core/middleware-manager/middlewares/event-emitter/event-emitter.middleware.mjs +69 -0
- package/dist/diagram-core/middleware-manager/middlewares/hidden-computation/hidden-computation.mjs +66 -0
- package/dist/diagram-core/middleware-manager/middlewares/internal-id-assignment/internal-id-assignment.mjs +24 -0
- package/dist/diagram-core/middleware-manager/middlewares/logger/logger.mjs +18 -0
- package/dist/diagram-core/middleware-manager/middlewares/measured-bounds-assignment/is-node-fully-measured.mjs +20 -0
- package/dist/diagram-core/middleware-manager/middlewares/measured-bounds-assignment/measured-bounds-assignment.mjs +59 -0
- package/dist/diagram-core/middleware-manager/middlewares/measurement-tracking/measurement-tracking.middleware.mjs +55 -0
- package/dist/diagram-core/middleware-manager/middlewares/z-index-assignment/utils/assign-edges-z-index.mjs +12 -0
- package/dist/diagram-core/middleware-manager/middlewares/z-index-assignment/utils/assign-node-z-index.mjs +61 -0
- package/dist/diagram-core/middleware-manager/middlewares/z-index-assignment/utils/create-group-children-map.mjs +14 -0
- package/dist/diagram-core/middleware-manager/middlewares/z-index-assignment/utils/initialize-z-index.mjs +30 -0
- package/dist/diagram-core/middleware-manager/middlewares/z-index-assignment/utils/sort-children.mjs +36 -0
- package/dist/diagram-core/middleware-manager/middlewares/z-index-assignment/z-index-assignment.mjs +240 -0
- package/dist/diagram-core/middleware-manager/pass-settlement.mjs +68 -0
- package/dist/diagram-core/model-lookup/model-lookup.mjs +394 -0
- package/dist/diagram-core/port-batch-processor/port-batch-processor.mjs +20 -0
- package/dist/diagram-core/render-strategy/base-render-strategy.mjs +26 -0
- package/dist/diagram-core/render-strategy/direct/direct-render-strategy.mjs +33 -0
- package/dist/diagram-core/render-strategy/render-performance-logger.mjs +42 -0
- package/dist/diagram-core/render-strategy/virtualized/idle-render-scheduler.mjs +43 -0
- package/dist/diagram-core/render-strategy/virtualized/result-cache.mjs +63 -0
- package/dist/diagram-core/render-strategy/virtualized/viewport-utils.mjs +40 -0
- package/dist/diagram-core/render-strategy/virtualized/virtualized-render-strategy.mjs +91 -0
- package/dist/diagram-core/render-strategy/virtualized/visible-elements-resolver.mjs +120 -0
- package/dist/diagram-core/render-strategy/virtualized/zoom-tracker.mjs +38 -0
- package/dist/diagram-core/set.polyfill.mjs +24 -0
- package/dist/diagram-core/shortcut-manager/default-shortcuts.mjs +99 -0
- package/dist/diagram-core/shortcut-manager/shortcut-manager.mjs +140 -0
- package/dist/diagram-core/spatial-hash/collision-detection.mjs +74 -0
- package/dist/diagram-core/spatial-hash/spatial-hash.mjs +161 -0
- package/dist/diagram-core/spatial-hash/utils.mjs +92 -0
- package/dist/diagram-core/transaction-manager/transaction-context.mjs +40 -0
- package/dist/diagram-core/transaction-manager/transaction-manager.mjs +94 -0
- package/dist/diagram-core/transaction-manager/transaction.mjs +179 -0
- package/dist/diagram-core/types/edge.interface.mjs +3 -0
- package/dist/diagram-core/types/node.interface.mjs +3 -0
- package/dist/diagram-core/types/utils.mjs +3 -0
- package/dist/diagram-core/updater/init-updater/init-state.mjs +356 -0
- package/dist/diagram-core/updater/init-updater/init-updater.mjs +275 -0
- package/dist/diagram-core/updater/init-updater/late-arrival-queue.mjs +71 -0
- package/dist/diagram-core/updater/init-updater/stability-detector.mjs +63 -0
- package/dist/diagram-core/updater/internal-updater/internal-updater.mjs +166 -0
- package/dist/diagram-core/utils/change-generation.mjs +13 -0
- package/dist/diagram-core/utils/compute-floating-edge-side.mjs +35 -0
- package/dist/diagram-core/utils/constants.mjs +3 -0
- package/dist/diagram-core/utils/dangling-edges.mjs +89 -0
- package/dist/diagram-core/utils/deep-merge.mjs +22 -0
- package/dist/diagram-core/utils/dimensions.mjs +52 -0
- package/dist/diagram-core/utils/get-node-border-intersection.mjs +99 -0
- package/dist/diagram-core/utils/get-port-flow-position.mjs +55 -0
- package/dist/diagram-core/utils/group-size.mjs +32 -0
- package/dist/diagram-core/utils/is-group.mjs +5 -0
- package/dist/diagram-core/utils/measurement-validation.mjs +11 -0
- package/dist/diagram-core/utils/object-properties.mjs +22 -0
- package/dist/diagram-core/utils/rects-points-sizes.mjs +148 -0
- package/dist/diagram-core/utils/relinking.mjs +6 -0
- package/dist/diagram-core/utils/semaphore.mjs +43 -0
- package/dist/diagram-core/utils/snap-node-position.mjs +11 -0
- package/dist/diagram-core/utils/sort-nodes-by-z-index.mjs +22 -0
- package/dist/diagram-core/visibility/effective-visibility.mjs +28 -0
- package/dist/diagram-core/visibility/template-visibility-registry.mjs +87 -0
- package/dist/index.d.mts +13406 -3796
- package/dist/index.d.ts +13406 -3796
- package/dist/index.mjs +34 -0
- package/dist/internal/content-size.mjs +14 -0
- package/dist/internal/custom-boolean-converter.mjs +18 -0
- package/dist/internal/flow-ui-rdf-element.mjs +57 -5
- package/dist/package.json.mjs +1 -1
- package/dist/utilities/register-components.mjs +77 -142
- package/dist/vscode.html-custom-data.json +369 -96
- package/package.json +16 -8
- package/themes/dark.css +2 -0
- package/themes/dark.styles.js +2 -0
- package/themes/light.css +2 -0
- package/themes/light.styles.js +2 -0
|
@@ -0,0 +1,273 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import { property, state } from 'lit/decorators.js';
|
|
3
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
4
|
+
import { LinkingController } from '../../diagram/input/linking-controller.mjs';
|
|
5
|
+
import { ContextConsumer } from '../../diagram/runtime/context.mjs';
|
|
6
|
+
import { diagramRuntimeContext, diagramNodeContext } from '../../diagram/runtime/contexts.mjs';
|
|
7
|
+
import { isCurrentModelItem } from '../../diagram/runtime/model-owner.mjs';
|
|
8
|
+
import { isRotateHandleEvent, getPortHoverMode } from '../../diagram/runtime/port-hover.mjs';
|
|
9
|
+
import FlowRdfElement from '../../internal/flow-ui-rdf-element.mjs';
|
|
10
|
+
import styles from './diagram-port.styles.mjs';
|
|
11
|
+
|
|
12
|
+
var __defProp = Object.defineProperty;
|
|
13
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
14
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
15
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
16
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
17
|
+
if (decorator = decorators[i])
|
|
18
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
19
|
+
if (kind && result)
|
|
20
|
+
__defProp(target, key, result);
|
|
21
|
+
return result;
|
|
22
|
+
};
|
|
23
|
+
class FlowUiDiagramPort extends FlowRdfElement {
|
|
24
|
+
constructor() {
|
|
25
|
+
super();
|
|
26
|
+
this.type = "both";
|
|
27
|
+
this.side = "left";
|
|
28
|
+
this.originPoint = "center";
|
|
29
|
+
this.hidden = false;
|
|
30
|
+
this.hasContent = false;
|
|
31
|
+
this.highlighted = false;
|
|
32
|
+
this.subscriptions = [];
|
|
33
|
+
this.portHovered = false;
|
|
34
|
+
this.nodeHovered = false;
|
|
35
|
+
this.rotateHandleHovered = false;
|
|
36
|
+
this.onNodePointerEnter = () => this.setHovered("node", true);
|
|
37
|
+
this.onNodePointerLeave = () => this.setHovered("node", false);
|
|
38
|
+
// The over-node highlight is off while the pointer is over the node's rotation handle (ngDiagram's
|
|
39
|
+
// :not(:has(.ng-diagram-rotate-handle:hover))). pointerover fires on every element boundary inside the node.
|
|
40
|
+
this.onNodePointerOver = (event) => {
|
|
41
|
+
const overHandle = isRotateHandleEvent(event);
|
|
42
|
+
if (overHandle !== this.rotateHandleHovered) {
|
|
43
|
+
this.rotateHandleHovered = overHandle;
|
|
44
|
+
this.setHovered("node", this.nodeHovered);
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
new LinkingController(
|
|
48
|
+
this,
|
|
49
|
+
() => this.runtime,
|
|
50
|
+
() => this.id,
|
|
51
|
+
() => this.nodeContext?.node.value
|
|
52
|
+
);
|
|
53
|
+
this.addEventListener("pointerenter", () => this.setHovered("port", true));
|
|
54
|
+
this.addEventListener("pointerleave", () => this.setHovered("port", false));
|
|
55
|
+
new ContextConsumer(this, {
|
|
56
|
+
context: diagramRuntimeContext,
|
|
57
|
+
callback: (runtime) => {
|
|
58
|
+
this.runtime = runtime;
|
|
59
|
+
this.subscribe();
|
|
60
|
+
this.register();
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
new ContextConsumer(this, {
|
|
64
|
+
context: diagramNodeContext,
|
|
65
|
+
callback: (nodeContext) => {
|
|
66
|
+
this.nodeContext = nodeContext;
|
|
67
|
+
this.watchNodeHover();
|
|
68
|
+
this.subscribe();
|
|
69
|
+
this.register();
|
|
70
|
+
this.requestUpdate();
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
disconnectedCallback() {
|
|
75
|
+
super.disconnectedCallback();
|
|
76
|
+
this.unsubscribe();
|
|
77
|
+
this.unwatchNodeHover();
|
|
78
|
+
this.portHovered = false;
|
|
79
|
+
this.highlighted = false;
|
|
80
|
+
queueMicrotask(() => {
|
|
81
|
+
if (!this.isConnected) {
|
|
82
|
+
this.unregister();
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
updated(changed) {
|
|
87
|
+
this.setAttribute("data-port-id", this.id ?? "");
|
|
88
|
+
this.style.display = this.nodeContext ? "" : "none";
|
|
89
|
+
if (changed.has("id")) {
|
|
90
|
+
this.register();
|
|
91
|
+
}
|
|
92
|
+
this.syncRegistration();
|
|
93
|
+
}
|
|
94
|
+
render() {
|
|
95
|
+
return html`
|
|
96
|
+
<div
|
|
97
|
+
part="base"
|
|
98
|
+
class=${classMap({ port: true, "port--custom": this.hasContent, "port--highlighted": this.highlighted })}
|
|
99
|
+
>
|
|
100
|
+
<slot @slotchange=${this.onSlotChange}></slot>
|
|
101
|
+
</div>
|
|
102
|
+
`;
|
|
103
|
+
}
|
|
104
|
+
// Hover highlight (ngDiagram's port-hoverable classes). The classes are looked up on each hover change, so they
|
|
105
|
+
// can be toggled at any time; the pointer is tracked on the port and on its node element.
|
|
106
|
+
watchNodeHover() {
|
|
107
|
+
const element = this.nodeContext?.element;
|
|
108
|
+
if (element === this.hoverNodeElement) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
this.unwatchNodeHover();
|
|
112
|
+
if (element) {
|
|
113
|
+
element.addEventListener("pointerenter", this.onNodePointerEnter);
|
|
114
|
+
element.addEventListener("pointerleave", this.onNodePointerLeave);
|
|
115
|
+
element.addEventListener("pointerover", this.onNodePointerOver);
|
|
116
|
+
this.hoverNodeElement = element;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
unwatchNodeHover() {
|
|
120
|
+
this.hoverNodeElement?.removeEventListener("pointerenter", this.onNodePointerEnter);
|
|
121
|
+
this.hoverNodeElement?.removeEventListener("pointerleave", this.onNodePointerLeave);
|
|
122
|
+
this.hoverNodeElement?.removeEventListener("pointerover", this.onNodePointerOver);
|
|
123
|
+
this.hoverNodeElement = void 0;
|
|
124
|
+
this.nodeHovered = false;
|
|
125
|
+
this.rotateHandleHovered = false;
|
|
126
|
+
}
|
|
127
|
+
setHovered(target, hovered) {
|
|
128
|
+
if (target === "port") {
|
|
129
|
+
this.portHovered = hovered;
|
|
130
|
+
} else {
|
|
131
|
+
this.nodeHovered = hovered;
|
|
132
|
+
}
|
|
133
|
+
const actionState = this.runtime?.actionState.value;
|
|
134
|
+
if (actionState?.panning) {
|
|
135
|
+
this.highlighted = false;
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
const mode = getPortHoverMode(this, this.nodeContext?.element);
|
|
139
|
+
this.highlighted = this.portHovered && !!mode || this.nodeHovered && mode === "node" && !this.rotateHandleHovered && !actionState?.resize && !actionState?.rotation;
|
|
140
|
+
}
|
|
141
|
+
onSlotChange(event) {
|
|
142
|
+
const slot = event.target;
|
|
143
|
+
this.hasContent = slot.assignedNodes({ flatten: true }).some((node) => node.nodeType === Node.ELEMENT_NODE || !!node.textContent?.trim());
|
|
144
|
+
}
|
|
145
|
+
subscribe() {
|
|
146
|
+
this.unsubscribe();
|
|
147
|
+
if (this.runtime) {
|
|
148
|
+
this.subscriptions.push(this.runtime.flowCore.subscribe(() => this.register()));
|
|
149
|
+
}
|
|
150
|
+
if (this.nodeContext) {
|
|
151
|
+
this.subscriptions.push(this.nodeContext.node.subscribe(() => this.register()));
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
unsubscribe() {
|
|
155
|
+
this.subscriptions.forEach((unsubscribe) => unsubscribe());
|
|
156
|
+
this.subscriptions = [];
|
|
157
|
+
}
|
|
158
|
+
/** Registers with the node (ngOnInit of ngDiagram's port), or re-registers after the core, node or id changed. */
|
|
159
|
+
register() {
|
|
160
|
+
const runtime = this.runtime;
|
|
161
|
+
const nodeContext = this.nodeContext;
|
|
162
|
+
const flowCore = runtime?.flowCore.value;
|
|
163
|
+
const node = nodeContext?.node.value;
|
|
164
|
+
if (!runtime || !nodeContext || !flowCore || !node || !this.id || !this.isConnected) {
|
|
165
|
+
return;
|
|
166
|
+
}
|
|
167
|
+
const current = this.registration;
|
|
168
|
+
if (current && current.flowCore === flowCore && current.nodeElement === nodeContext.element && current.nodeId === node.id && current.portId === this.id) {
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
if (current) {
|
|
172
|
+
this.unregister();
|
|
173
|
+
}
|
|
174
|
+
if (!isCurrentModelItem(flowCore, "node", node)) {
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
if (this.hidden) {
|
|
178
|
+
flowCore.templateVisibilityRegistry?.setPortHidden(node.id, this.id, true);
|
|
179
|
+
}
|
|
180
|
+
flowCore.updater.addPort(node.id, { id: this.id, type: this.type, nodeId: node.id, side: this.side });
|
|
181
|
+
runtime.portRegistry.attach(this, nodeContext.element, this.id);
|
|
182
|
+
runtime.resizeObserver.observe(this, { type: "port", nodeId: node.id, portId: this.id });
|
|
183
|
+
this.registration = {
|
|
184
|
+
flowCore,
|
|
185
|
+
nodeElement: nodeContext.element,
|
|
186
|
+
nodeId: node.id,
|
|
187
|
+
ownerInternalId: node._internalId,
|
|
188
|
+
portId: this.id,
|
|
189
|
+
side: this.side,
|
|
190
|
+
type: this.type,
|
|
191
|
+
originPoint: this.originPoint,
|
|
192
|
+
hidden: this.hidden
|
|
193
|
+
};
|
|
194
|
+
}
|
|
195
|
+
/** Writes changed `side`, `type` and `hidden` to the core, and re-measures after a CSS-only move. */
|
|
196
|
+
syncRegistration() {
|
|
197
|
+
const registration = this.registration;
|
|
198
|
+
if (!registration || registration.flowCore !== this.runtime?.flowCore.value) {
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
const { flowCore, nodeId, portId } = registration;
|
|
202
|
+
const portChanges = {};
|
|
203
|
+
if (registration.side !== this.side) {
|
|
204
|
+
portChanges.side = this.side;
|
|
205
|
+
registration.side = this.side;
|
|
206
|
+
}
|
|
207
|
+
if (registration.type !== this.type) {
|
|
208
|
+
portChanges.type = this.type;
|
|
209
|
+
registration.type = this.type;
|
|
210
|
+
}
|
|
211
|
+
if (Object.keys(portChanges).length > 0) {
|
|
212
|
+
flowCore.updater.applyPortChanges(nodeId, [{ portId, portChanges }]);
|
|
213
|
+
}
|
|
214
|
+
const originPointChanged = registration.originPoint !== this.originPoint;
|
|
215
|
+
registration.originPoint = this.originPoint;
|
|
216
|
+
if (portChanges.side || originPointChanged) {
|
|
217
|
+
this.runtime?.resizeObserver.invalidate(this);
|
|
218
|
+
}
|
|
219
|
+
if (registration.hidden !== this.hidden) {
|
|
220
|
+
registration.hidden = this.hidden;
|
|
221
|
+
flowCore.templateVisibilityRegistry?.setPortHidden(nodeId, portId, this.hidden);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
/** Unregisters from the node (ngOnDestroy of ngDiagram's port). */
|
|
225
|
+
unregister() {
|
|
226
|
+
const registration = this.registration;
|
|
227
|
+
const runtime = this.runtime;
|
|
228
|
+
if (!registration || !runtime) {
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
this.registration = void 0;
|
|
232
|
+
runtime.resizeObserver.unobserve(this);
|
|
233
|
+
runtime.portRegistry.detach(this);
|
|
234
|
+
const { flowCore, nodeId, portId, ownerInternalId } = registration;
|
|
235
|
+
if (flowCore !== runtime.flowCore.value || !flowCore.isInitialized) {
|
|
236
|
+
return;
|
|
237
|
+
}
|
|
238
|
+
const currentNode = flowCore.getNodeById(nodeId);
|
|
239
|
+
if (!currentNode || ownerInternalId && currentNode._internalId !== ownerInternalId) {
|
|
240
|
+
return;
|
|
241
|
+
}
|
|
242
|
+
if (flowCore.isVirtualizationActive && !flowCore.isNodeCurrentlyRendered(nodeId)) {
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
flowCore.templateVisibilityRegistry?.setPortHidden(nodeId, portId, false);
|
|
246
|
+
flowCore.internalUpdater.deletePort(nodeId, portId);
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
FlowUiDiagramPort.tagName = "flow-ui-diagram-port";
|
|
250
|
+
FlowUiDiagramPort.styles = styles;
|
|
251
|
+
__decorateClass([
|
|
252
|
+
property({ reflect: true })
|
|
253
|
+
], FlowUiDiagramPort.prototype, "id", 2);
|
|
254
|
+
__decorateClass([
|
|
255
|
+
property({ reflect: true })
|
|
256
|
+
], FlowUiDiagramPort.prototype, "type", 2);
|
|
257
|
+
__decorateClass([
|
|
258
|
+
property({ reflect: true })
|
|
259
|
+
], FlowUiDiagramPort.prototype, "side", 2);
|
|
260
|
+
__decorateClass([
|
|
261
|
+
property({ attribute: "origin-point", reflect: true })
|
|
262
|
+
], FlowUiDiagramPort.prototype, "originPoint", 2);
|
|
263
|
+
__decorateClass([
|
|
264
|
+
property({ type: Boolean, reflect: true })
|
|
265
|
+
], FlowUiDiagramPort.prototype, "hidden", 2);
|
|
266
|
+
__decorateClass([
|
|
267
|
+
state()
|
|
268
|
+
], FlowUiDiagramPort.prototype, "hasContent", 2);
|
|
269
|
+
__decorateClass([
|
|
270
|
+
state()
|
|
271
|
+
], FlowUiDiagramPort.prototype, "highlighted", 2);
|
|
272
|
+
|
|
273
|
+
export { FlowUiDiagramPort as default };
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
import componentStyles from '../../styles/component.styles.mjs';
|
|
3
|
+
|
|
4
|
+
const styles = css`
|
|
5
|
+
${componentStyles}
|
|
6
|
+
|
|
7
|
+
:host {
|
|
8
|
+
display: block;
|
|
9
|
+
position: absolute;
|
|
10
|
+
top: 0;
|
|
11
|
+
left: 0;
|
|
12
|
+
width: fit-content;
|
|
13
|
+
height: fit-content;
|
|
14
|
+
box-sizing: content-box;
|
|
15
|
+
z-index: 2;
|
|
16
|
+
cursor: crosshair;
|
|
17
|
+
pointer-events: all;
|
|
18
|
+
/* Origin point: center (the default) */
|
|
19
|
+
transform: translate(-50%, -50%);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
:host([hidden]) {
|
|
23
|
+
display: none !important;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* Side */
|
|
27
|
+
:host([side='left']) {
|
|
28
|
+
top: 50%;
|
|
29
|
+
left: 0;
|
|
30
|
+
}
|
|
31
|
+
:host([side='right']) {
|
|
32
|
+
top: 50%;
|
|
33
|
+
left: 100%;
|
|
34
|
+
}
|
|
35
|
+
:host([side='top']) {
|
|
36
|
+
top: 0;
|
|
37
|
+
left: 50%;
|
|
38
|
+
}
|
|
39
|
+
:host([side='bottom']) {
|
|
40
|
+
top: 100%;
|
|
41
|
+
left: 50%;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/* Origin point: the point of the port that lies on the side */
|
|
45
|
+
:host([origin-point='topLeft']) {
|
|
46
|
+
transform: translate(0, 0);
|
|
47
|
+
}
|
|
48
|
+
:host([origin-point='topCenter']) {
|
|
49
|
+
transform: translate(-50%, 0);
|
|
50
|
+
}
|
|
51
|
+
:host([origin-point='topRight']) {
|
|
52
|
+
transform: translate(-100%, 0);
|
|
53
|
+
}
|
|
54
|
+
:host([origin-point='centerLeft']) {
|
|
55
|
+
transform: translate(0, -50%);
|
|
56
|
+
}
|
|
57
|
+
:host([origin-point='centerRight']) {
|
|
58
|
+
transform: translate(-100%, -50%);
|
|
59
|
+
}
|
|
60
|
+
:host([origin-point='bottomLeft']) {
|
|
61
|
+
transform: translate(0, -100%);
|
|
62
|
+
}
|
|
63
|
+
:host([origin-point='bottomCenter']) {
|
|
64
|
+
transform: translate(-50%, -100%);
|
|
65
|
+
}
|
|
66
|
+
:host([origin-point='bottomRight']) {
|
|
67
|
+
transform: translate(-100%, -100%);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.port {
|
|
71
|
+
position: relative;
|
|
72
|
+
display: flex;
|
|
73
|
+
box-sizing: content-box;
|
|
74
|
+
background: var(--flow-ui-diagram-port-background-color);
|
|
75
|
+
border: var(--flow-ui-diagram-port-border-size) solid var(--flow-ui-diagram-port-border-color);
|
|
76
|
+
border-radius: var(--flow-ui-diagram-port-border-radius);
|
|
77
|
+
transition-property: background-color, border-color, outline, box-shadow;
|
|
78
|
+
transition-timing-function: ease-in-out;
|
|
79
|
+
transition-duration: 0.1s;
|
|
80
|
+
transform-origin: center;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* The default round port, with a larger invisible hit area */
|
|
84
|
+
.port:not(.port--custom) {
|
|
85
|
+
width: var(--flow-ui-diagram-port-size);
|
|
86
|
+
height: var(--flow-ui-diagram-port-size);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.port:not(.port--custom)::before {
|
|
90
|
+
content: '';
|
|
91
|
+
position: absolute;
|
|
92
|
+
width: 18px;
|
|
93
|
+
height: 18px;
|
|
94
|
+
top: 50%;
|
|
95
|
+
left: 50%;
|
|
96
|
+
translate: -50% -50%;
|
|
97
|
+
border-radius: var(--flow-ui-diagram-port-border-radius);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.port--custom {
|
|
101
|
+
border-radius: 0;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/* Hover highlight (the port-hoverable classes) */
|
|
105
|
+
.port--highlighted {
|
|
106
|
+
background-color: var(--flow-ui-diagram-port-background-color-hover);
|
|
107
|
+
border-color: var(--flow-ui-diagram-port-background-color-hover);
|
|
108
|
+
/* A 1px overlap, so no gap shows between the outline and the border */
|
|
109
|
+
outline: calc(1px + var(--flow-ui-diagram-port-border-size)) solid
|
|
110
|
+
var(--flow-ui-diagram-port-background-color-hover);
|
|
111
|
+
outline-offset: -1px;
|
|
112
|
+
box-shadow: 0 0 0 var(--flow-ui-diagram-port-border-size-hover) var(--flow-ui-diagram-port-border-color-hover);
|
|
113
|
+
}
|
|
114
|
+
`;
|
|
115
|
+
|
|
116
|
+
export { styles as default };
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { html, nothing } from 'lit';
|
|
2
|
+
import { property } from 'lit/decorators.js';
|
|
3
|
+
import { classMap } from 'lit/directives/class-map.js';
|
|
4
|
+
import { ResizeController } from '../../diagram/input/resize-controller.mjs';
|
|
5
|
+
import { optionalBooleanConverter, sidesConverter } from '../../diagram/runtime/attribute-converters.mjs';
|
|
6
|
+
import { ContextConsumer } from '../../diagram/runtime/context.mjs';
|
|
7
|
+
import { diagramRuntimeContext, diagramNodeContext } from '../../diagram/runtime/contexts.mjs';
|
|
8
|
+
import { DiagramObserver } from '../../diagram/runtime/observable.mjs';
|
|
9
|
+
import FlowRdfElement from '../../internal/flow-ui-rdf-element.mjs';
|
|
10
|
+
import styles from './diagram-resize-adornment.styles.mjs';
|
|
11
|
+
|
|
12
|
+
var __defProp = Object.defineProperty;
|
|
13
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
14
|
+
var __decorateClass = (decorators, target, key, kind) => {
|
|
15
|
+
var result = kind > 1 ? void 0 : kind ? __getOwnPropDesc(target, key) : target;
|
|
16
|
+
for (var i = decorators.length - 1, decorator; i >= 0; i--)
|
|
17
|
+
if (decorator = decorators[i])
|
|
18
|
+
result = (kind ? decorator(target, key, result) : decorator(result)) || result;
|
|
19
|
+
if (kind && result)
|
|
20
|
+
__defProp(target, key, result);
|
|
21
|
+
return result;
|
|
22
|
+
};
|
|
23
|
+
const ALL_SIDES = ["top", "right", "bottom", "left"];
|
|
24
|
+
const HANDLE_SIDES = [
|
|
25
|
+
{ position: "top-left", sides: ["top", "left"] },
|
|
26
|
+
{ position: "top-right", sides: ["top", "right"] },
|
|
27
|
+
{ position: "bottom-left", sides: ["bottom", "left"] },
|
|
28
|
+
{ position: "bottom-right", sides: ["bottom", "right"] }
|
|
29
|
+
];
|
|
30
|
+
class FlowUiDiagramResizeAdornment extends FlowRdfElement {
|
|
31
|
+
constructor() {
|
|
32
|
+
super();
|
|
33
|
+
this.activeSides = ALL_SIDES;
|
|
34
|
+
this.onNode = false;
|
|
35
|
+
this.nodeObserver = new DiagramObserver(this);
|
|
36
|
+
this.configObserver = new DiagramObserver(this);
|
|
37
|
+
new ContextConsumer(this, {
|
|
38
|
+
context: diagramRuntimeContext,
|
|
39
|
+
callback: (runtime) => {
|
|
40
|
+
this.runtime = runtime;
|
|
41
|
+
this.configObserver.setSource(runtime.config);
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
new ContextConsumer(this, {
|
|
45
|
+
context: diagramNodeContext,
|
|
46
|
+
callback: (nodeContext) => {
|
|
47
|
+
this.onNode = true;
|
|
48
|
+
this.nodeObserver.setSource(nodeContext.node);
|
|
49
|
+
}
|
|
50
|
+
});
|
|
51
|
+
this.resizeController = new ResizeController(
|
|
52
|
+
this,
|
|
53
|
+
() => this.runtime,
|
|
54
|
+
() => this.nodeObserver.value,
|
|
55
|
+
(event) => this.getDirection(event)
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
/** Whether the node is resizable: the node's own setting, then this adornment's default, then the diagram's. */
|
|
59
|
+
get resizable() {
|
|
60
|
+
return !!(this.nodeObserver.value?.resizable ?? this.defaultResizable ?? this.configObserver.value?.resize?.defaultResizable);
|
|
61
|
+
}
|
|
62
|
+
get adornmentShown() {
|
|
63
|
+
const node = this.nodeObserver.value;
|
|
64
|
+
return this.onNode && !!node?.selected && !node.angle && this.resizable;
|
|
65
|
+
}
|
|
66
|
+
// The node changes on every drag step, but only its selection, rotation and resizable flag matter here
|
|
67
|
+
shouldUpdate(changed) {
|
|
68
|
+
return changed.size > 0 || this.adornmentShown !== this.renderedShown;
|
|
69
|
+
}
|
|
70
|
+
updated() {
|
|
71
|
+
this.renderedShown = this.adornmentShown;
|
|
72
|
+
if (!this.renderedShown && this.resizeController.active) {
|
|
73
|
+
this.resizeController.cancel();
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
render() {
|
|
77
|
+
return html`
|
|
78
|
+
<slot></slot>
|
|
79
|
+
${this.adornmentShown ? this.renderAdornment() : nothing}
|
|
80
|
+
`;
|
|
81
|
+
}
|
|
82
|
+
renderAdornment() {
|
|
83
|
+
const activeSides = new Set(this.activeSides);
|
|
84
|
+
return html`
|
|
85
|
+
${ALL_SIDES.map((side) => {
|
|
86
|
+
const active = activeSides.has(side);
|
|
87
|
+
return html`
|
|
88
|
+
<div
|
|
89
|
+
part=${active ? "line" : "line line-inactive"}
|
|
90
|
+
class=${classMap({ "resize-line": true, [`resize-line--${side}`]: true, "resize-line--inactive": !active })}
|
|
91
|
+
data-direction=${active ? side : nothing}
|
|
92
|
+
></div>
|
|
93
|
+
`;
|
|
94
|
+
})}
|
|
95
|
+
${HANDLE_SIDES.filter(({ sides }) => sides.every((side) => activeSides.has(side))).map(
|
|
96
|
+
({ position }) => html`
|
|
97
|
+
<div part="handle" class="resize-handle resize-handle--${position}" data-direction=${position}></div>
|
|
98
|
+
`
|
|
99
|
+
)}
|
|
100
|
+
`;
|
|
101
|
+
}
|
|
102
|
+
/** The direction of the line or handle a press landed on (in this shadow root), if any. */
|
|
103
|
+
getDirection(event) {
|
|
104
|
+
for (const target of event.composedPath()) {
|
|
105
|
+
if (target === this) {
|
|
106
|
+
break;
|
|
107
|
+
}
|
|
108
|
+
if (target instanceof HTMLElement && target.dataset.direction && target.getRootNode() === this.shadowRoot) {
|
|
109
|
+
return target.dataset.direction;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
return void 0;
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
FlowUiDiagramResizeAdornment.tagName = "flow-ui-diagram-resize-adornment";
|
|
116
|
+
FlowUiDiagramResizeAdornment.styles = styles;
|
|
117
|
+
__decorateClass([
|
|
118
|
+
property({ attribute: "default-resizable", converter: optionalBooleanConverter })
|
|
119
|
+
], FlowUiDiagramResizeAdornment.prototype, "defaultResizable", 2);
|
|
120
|
+
__decorateClass([
|
|
121
|
+
property({ attribute: "active-sides", converter: sidesConverter })
|
|
122
|
+
], FlowUiDiagramResizeAdornment.prototype, "activeSides", 2);
|
|
123
|
+
|
|
124
|
+
export { FlowUiDiagramResizeAdornment as default };
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import { css } from 'lit';
|
|
2
|
+
import componentStyles from '../../styles/component.styles.mjs';
|
|
3
|
+
import nodeTemplateStyles from '../diagram-node/diagram-node-template.styles.mjs';
|
|
4
|
+
|
|
5
|
+
const styles = css`
|
|
6
|
+
${componentStyles}
|
|
7
|
+
${nodeTemplateStyles}
|
|
8
|
+
|
|
9
|
+
:host {
|
|
10
|
+
display: flex;
|
|
11
|
+
position: relative;
|
|
12
|
+
width: 100%;
|
|
13
|
+
height: 100%;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/* Resize lines (ngDiagram's ng-diagram-resize-line), with a wider invisible hit area */
|
|
17
|
+
.resize-line {
|
|
18
|
+
position: absolute;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.resize-line::before {
|
|
22
|
+
content: '';
|
|
23
|
+
position: absolute;
|
|
24
|
+
top: 50%;
|
|
25
|
+
left: 50%;
|
|
26
|
+
transform: translate(-50%, -50%);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.resize-line--inactive {
|
|
30
|
+
pointer-events: none;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.resize-line--top::before,
|
|
34
|
+
.resize-line--bottom::before {
|
|
35
|
+
width: 100%;
|
|
36
|
+
height: 8px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
.resize-line--right::before,
|
|
40
|
+
.resize-line--left::before {
|
|
41
|
+
width: 8px;
|
|
42
|
+
height: 100%;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.resize-line--top {
|
|
46
|
+
top: 0;
|
|
47
|
+
left: 0;
|
|
48
|
+
width: 100%;
|
|
49
|
+
border-top: var(--flow-ui-diagram-resize-line-border-width) var(--flow-ui-diagram-resize-line-border-style)
|
|
50
|
+
var(--flow-ui-diagram-resize-line-border-color);
|
|
51
|
+
cursor: ns-resize;
|
|
52
|
+
transform: translateY(-50%);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.resize-line--right {
|
|
56
|
+
top: 0;
|
|
57
|
+
right: 0;
|
|
58
|
+
height: 100%;
|
|
59
|
+
border-right: var(--flow-ui-diagram-resize-line-border-width) var(--flow-ui-diagram-resize-line-border-style)
|
|
60
|
+
var(--flow-ui-diagram-resize-line-border-color);
|
|
61
|
+
cursor: ew-resize;
|
|
62
|
+
transform: translateX(50%);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.resize-line--bottom {
|
|
66
|
+
bottom: 0;
|
|
67
|
+
left: 0;
|
|
68
|
+
width: 100%;
|
|
69
|
+
border-bottom: var(--flow-ui-diagram-resize-line-border-width) var(--flow-ui-diagram-resize-line-border-style)
|
|
70
|
+
var(--flow-ui-diagram-resize-line-border-color);
|
|
71
|
+
cursor: ns-resize;
|
|
72
|
+
transform: translateY(50%);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.resize-line--left {
|
|
76
|
+
top: 0;
|
|
77
|
+
left: 0;
|
|
78
|
+
height: 100%;
|
|
79
|
+
border-left: var(--flow-ui-diagram-resize-line-border-width) var(--flow-ui-diagram-resize-line-border-style)
|
|
80
|
+
var(--flow-ui-diagram-resize-line-border-color);
|
|
81
|
+
cursor: ew-resize;
|
|
82
|
+
transform: translateX(-50%);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
/* Corner handles (ngDiagram's ng-diagram-resize-handle), with a 16px round hit area */
|
|
86
|
+
.resize-handle {
|
|
87
|
+
position: absolute;
|
|
88
|
+
width: var(--flow-ui-diagram-resize-handle-size);
|
|
89
|
+
height: var(--flow-ui-diagram-resize-handle-size);
|
|
90
|
+
background-color: var(--flow-ui-diagram-resize-handle-background-color);
|
|
91
|
+
border: var(--flow-ui-diagram-resize-handle-border-size) var(--flow-ui-diagram-resize-handle-border-style)
|
|
92
|
+
var(--flow-ui-diagram-resize-handle-border-color);
|
|
93
|
+
border-radius: var(--flow-ui-diagram-resize-handle-border-radius);
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.resize-handle::before {
|
|
97
|
+
content: '';
|
|
98
|
+
position: absolute;
|
|
99
|
+
width: 16px;
|
|
100
|
+
height: 16px;
|
|
101
|
+
top: 50%;
|
|
102
|
+
left: 50%;
|
|
103
|
+
transform: translate(-50%, -50%);
|
|
104
|
+
border-radius: 50%;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.resize-handle--top-left {
|
|
108
|
+
top: 0;
|
|
109
|
+
left: 0;
|
|
110
|
+
transform: translate(-50%, -50%);
|
|
111
|
+
cursor: nwse-resize;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.resize-handle--top-right {
|
|
115
|
+
top: 0;
|
|
116
|
+
right: 0;
|
|
117
|
+
transform: translate(50%, -50%);
|
|
118
|
+
cursor: nesw-resize;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.resize-handle--bottom-left {
|
|
122
|
+
bottom: 0;
|
|
123
|
+
left: 0;
|
|
124
|
+
transform: translate(-50%, 50%);
|
|
125
|
+
cursor: nesw-resize;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
.resize-handle--bottom-right {
|
|
129
|
+
bottom: 0;
|
|
130
|
+
right: 0;
|
|
131
|
+
transform: translate(50%, 50%);
|
|
132
|
+
cursor: nwse-resize;
|
|
133
|
+
}
|
|
134
|
+
`;
|
|
135
|
+
|
|
136
|
+
export { styles as default };
|