@emuanalytics/flow-rdf-ui 4.2.1 → 4.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +58 -0
- package/THIRD_PARTY_NOTICES.md +220 -0
- package/dist/components/alert/alert.component.mjs +13 -10
- package/dist/components/animation/animation.component.mjs +3 -2
- package/dist/components/autocomplete/autocomplete.component.mjs +21 -20
- package/dist/components/avatar/avatar.component.mjs +10 -12
- 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 +15 -14
- package/dist/components/busy-overlay/busy-overlay.component.mjs +3 -0
- package/dist/components/button/button.component.mjs +7 -3
- package/dist/components/button/button.styles.mjs +5 -5
- package/dist/components/button-group/button-group.component.mjs +1 -0
- package/dist/components/calendar/calendar.component.mjs +29 -6
- package/dist/components/card/card.component.mjs +5 -4
- package/dist/components/carousel/carousel.component.mjs +45 -42
- package/dist/components/carousel-item/carousel-item.component.mjs +2 -0
- package/dist/components/chart/chart.component.mjs +5 -4
- package/dist/components/chart/chartjs-plugins/luxon.adapter.mjs +78 -0
- package/dist/components/chart/chartjs-plugins/plugin.flow-ui-colors.mjs +1 -1
- package/dist/components/chart/chartjs-support.mjs +2 -0
- package/dist/components/checkbox/checkbox.component.mjs +21 -18
- package/dist/components/checkbox-group/checkbox-group.component.mjs +3 -0
- package/dist/components/color-mapper/color-mapper.component.mjs +27 -6
- package/dist/components/color-picker/color-picker.component.mjs +79 -71
- package/dist/components/color-picker/color-picker.styles.mjs +4 -2
- package/dist/components/color-stop/color-stop.component.mjs +19 -2
- package/dist/components/date-time-picker/date-time-picker.component.mjs +35 -29
- 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 +68 -0
- package/dist/components/dialog/dialog.component.mjs +5 -1
- package/dist/components/divider/divider.component.mjs +1 -0
- package/dist/components/drawer/drawer.component.mjs +22 -19
- 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 +10 -2
- package/dist/components/icon/icon.component.mjs +1 -0
- package/dist/components/icon/library.mjs +7 -4
- 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 +21 -11
- package/dist/components/list/list.component.mjs +1 -0
- package/dist/components/list-item/list-item.component.mjs +34 -17
- 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 +5 -6
- 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 +14 -8
- package/dist/components/popup/popup.component.mjs +12 -11
- package/dist/components/progress-bar/progress-bar.component.mjs +3 -2
- package/dist/components/progress-ring/progress-ring.component.mjs +1 -0
- package/dist/components/query-builder/converters/javascript-filter-converter.mjs +0 -4
- package/dist/components/query-builder/converters/map-layer-filter-converter.mjs +0 -4
- package/dist/components/query-builder/query-builder.component.mjs +42 -15
- package/dist/components/radio/radio.component.mjs +10 -7
- package/dist/components/radio-group/radio-group.component.mjs +4 -1
- package/dist/components/range/range.component.mjs +4 -0
- package/dist/components/resize-observer/resize-observer.component.mjs +2 -1
- package/dist/components/scroll-view/scroll-view.component.mjs +1 -0
- package/dist/components/scroll-view/scroll-view.styles.mjs +20 -7
- package/dist/components/select/select.component.mjs +19 -21
- 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/split-view-toggle-button/split-view-toggle-button.styles.mjs +3 -3
- package/dist/components/stepper/stepper.component.mjs +3 -2
- package/dist/components/stepper-panel/stepper-panel.component.mjs +4 -3
- package/dist/components/switch/switch.component.mjs +9 -8
- package/dist/components/tab/tab.component.mjs +21 -17
- package/dist/components/tab-group/tab-group.component.mjs +218 -44
- 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 +13 -12
- package/dist/components/textarea/textarea.component.mjs +11 -4
- 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 +5 -2
- 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 +7890 -1741
- 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 +13296 -3667
- package/dist/index.d.ts +13296 -3667
- 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/internal/form.mjs +1 -1
- package/dist/internal/on-off-converter.mjs +21 -0
- package/dist/package.json.mjs +1 -1
- package/dist/utilities/register-components.mjs +77 -142
- package/dist/vscode.html-custom-data.json +426 -156
- package/package.json +35 -40
- package/themes/dark.css +7 -5
- package/themes/dark.styles.js +7 -5
- package/themes/light.css +7 -5
- package/themes/light.styles.js +7 -5
|
@@ -8,11 +8,30 @@ const styles = css`
|
|
|
8
8
|
display: block;
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
+
:host([dragging]) {
|
|
12
|
+
user-select: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/*
|
|
16
|
+
* The grid has a track for each pane and each divider, in DOM order, plus a trailing empty track for space no pane
|
|
17
|
+
* takes. Items are placed explicitly (grid-column or grid-row), so hidden dividers don't shift the panes.
|
|
18
|
+
*/
|
|
11
19
|
.split-view {
|
|
12
20
|
display: grid;
|
|
13
21
|
height: 100%;
|
|
14
22
|
}
|
|
15
23
|
|
|
24
|
+
/* One grid item per pane, even when the pane is hidden */
|
|
25
|
+
.split-view__pane {
|
|
26
|
+
display: block;
|
|
27
|
+
min-width: 0;
|
|
28
|
+
min-height: 0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
::slotted(*) {
|
|
32
|
+
height: 100%;
|
|
33
|
+
}
|
|
34
|
+
|
|
16
35
|
:host([vertical]) .split-view--animating {
|
|
17
36
|
transition: grid-template-rows var(--flow-ui-transition-medium) ease;
|
|
18
37
|
}
|
|
@@ -21,6 +40,12 @@ const styles = css`
|
|
|
21
40
|
transition: grid-template-columns var(--flow-ui-transition-medium) ease;
|
|
22
41
|
}
|
|
23
42
|
|
|
43
|
+
@media (prefers-reduced-motion: reduce) {
|
|
44
|
+
.split-view--animating {
|
|
45
|
+
transition: none !important;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
|
|
24
49
|
.split-view[dragging] {
|
|
25
50
|
cursor: ew-resize;
|
|
26
51
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { html } from 'lit';
|
|
2
2
|
import { property } from 'lit/decorators.js';
|
|
3
|
-
import { ifDefined } from 'lit/directives/if-defined.js';
|
|
4
3
|
import { boolean } from '../../internal/boolean.mjs';
|
|
5
|
-
import { drag } from '../../internal/drag.mjs';
|
|
6
4
|
import FlowRdfElement from '../../internal/flow-ui-rdf-element.mjs';
|
|
7
5
|
import styles from './split-view-divider.styles.mjs';
|
|
8
6
|
|
|
@@ -31,64 +29,15 @@ class FlowUiSplitViewDivider extends FlowRdfElement {
|
|
|
31
29
|
disconnectedCallback() {
|
|
32
30
|
super.disconnectedCallback();
|
|
33
31
|
}
|
|
34
|
-
/** @internal */
|
|
35
|
-
cancelDrag() {
|
|
36
|
-
if (this.dragCanceller) {
|
|
37
|
-
this.dragCanceller();
|
|
38
|
-
this.dragCanceller = void 0;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
handleDrag(event) {
|
|
42
|
-
if (this.disabled) {
|
|
43
|
-
return;
|
|
44
|
-
}
|
|
45
|
-
if (event.cancelable) {
|
|
46
|
-
event.preventDefault();
|
|
47
|
-
}
|
|
48
|
-
this.toggleAttribute("dragging", true);
|
|
49
|
-
const dragRoot = this.closestElement(".split-view-pane") ?? this.ownerDocument.body;
|
|
50
|
-
this.emit("flow-ui-drag-start");
|
|
51
|
-
this.dragCanceller = drag(dragRoot, {
|
|
52
|
-
onMove: (x, y) => {
|
|
53
|
-
this.emit("flow-ui-drag", { detail: { x, y } });
|
|
54
|
-
},
|
|
55
|
-
onStop: () => {
|
|
56
|
-
this.emit("flow-ui-drag-end");
|
|
57
|
-
this.toggleAttribute("dragging", false);
|
|
58
|
-
}
|
|
59
|
-
//initialEvent: event
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
closestElement(selector, base = this) {
|
|
63
|
-
function __closestFrom(el) {
|
|
64
|
-
if (!el || el === document || el === window)
|
|
65
|
-
return null;
|
|
66
|
-
if (el.matches(selector))
|
|
67
|
-
return el;
|
|
68
|
-
if (el.assignedSlot)
|
|
69
|
-
el = el.assignedSlot;
|
|
70
|
-
const found = el.closest(selector);
|
|
71
|
-
return found ? found : __closestFrom(el.getRootNode().host);
|
|
72
|
-
}
|
|
73
|
-
return __closestFrom(base);
|
|
74
|
-
}
|
|
75
32
|
render() {
|
|
76
33
|
return html`
|
|
77
|
-
<div
|
|
78
|
-
part="divider"
|
|
79
|
-
class="divider"
|
|
80
|
-
tabindex=${ifDefined(this.disabled ? void 0 : "0")}
|
|
81
|
-
role="separator"
|
|
82
|
-
aria-valuemin="0"
|
|
83
|
-
aria-valuemax="100"
|
|
84
|
-
@pointerdown=${this.handleDrag}
|
|
85
|
-
@touchstart=${this.handleDrag}
|
|
86
|
-
>
|
|
34
|
+
<div part="divider" class="divider">
|
|
87
35
|
<slot name="divider"><div class="divider-highlight"></div></slot>
|
|
88
36
|
</div>
|
|
89
37
|
`;
|
|
90
38
|
}
|
|
91
39
|
}
|
|
40
|
+
FlowUiSplitViewDivider.tagName = "flow-ui-split-view-divider";
|
|
92
41
|
FlowUiSplitViewDivider.styles = styles;
|
|
93
42
|
__decorateClass([
|
|
94
43
|
property({ type: Boolean, reflect: true })
|
|
@@ -4,29 +4,46 @@ import componentStyles from '../../styles/component.styles.mjs';
|
|
|
4
4
|
const styles = css`
|
|
5
5
|
${componentStyles}
|
|
6
6
|
|
|
7
|
+
/*
|
|
8
|
+
* The divider is a grid item in its own track of the split view, as wide (or, in a vertical split view, as tall) as
|
|
9
|
+
* the visible line. The split view measures that size to subtract it from the space it shares between the panes.
|
|
10
|
+
* The wider grab area overlaps the neighbouring panes.
|
|
11
|
+
*/
|
|
7
12
|
:host {
|
|
8
13
|
--divider-width: max(2px, var(--flow-ui-divider-width));
|
|
9
14
|
--divider-hit-area: 12px;
|
|
10
|
-
--color: var(--flow-ui-divider-color);
|
|
15
|
+
--color: var(--flow-ui-split-view-divider-color, var(--flow-ui-divider-color));
|
|
11
16
|
|
|
12
17
|
display: block;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.divider {
|
|
16
|
-
height: 100%;
|
|
17
|
-
display: flex;
|
|
18
18
|
position: relative;
|
|
19
|
+
touch-action: none;
|
|
20
|
+
/* The line is drawn by the host, so that the split view's ::part(divider) can restyle it */
|
|
19
21
|
background-color: var(--color);
|
|
20
22
|
}
|
|
21
23
|
|
|
22
|
-
:host(:
|
|
24
|
+
:host(:focus) {
|
|
25
|
+
outline: none;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
:host([hidden]) {
|
|
29
|
+
display: none;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
:host(:not([vertical])) {
|
|
23
33
|
width: var(--divider-width);
|
|
24
34
|
}
|
|
25
35
|
|
|
26
|
-
:host([vertical])
|
|
36
|
+
:host([vertical]) {
|
|
27
37
|
height: var(--divider-width);
|
|
28
38
|
}
|
|
29
39
|
|
|
40
|
+
.divider {
|
|
41
|
+
width: 100%;
|
|
42
|
+
height: 100%;
|
|
43
|
+
display: flex;
|
|
44
|
+
position: relative;
|
|
45
|
+
}
|
|
46
|
+
|
|
30
47
|
.divider-highlight {
|
|
31
48
|
width: 100%;
|
|
32
49
|
height: 100%;
|
|
@@ -37,22 +54,15 @@ const styles = css`
|
|
|
37
54
|
}
|
|
38
55
|
|
|
39
56
|
:host([dragging]) .divider-highlight,
|
|
57
|
+
:host(:focus-visible) .divider-highlight,
|
|
40
58
|
.divider:hover .divider-highlight {
|
|
41
59
|
transform: scale(1);
|
|
42
60
|
}
|
|
43
61
|
|
|
44
|
-
.divider:focus {
|
|
45
|
-
outline: none;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
62
|
:host([disabled]) .divider {
|
|
49
63
|
cursor: not-allowed;
|
|
50
64
|
}
|
|
51
65
|
|
|
52
|
-
:host([hidden]) .divider {
|
|
53
|
-
pointer-events: none;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
66
|
:host([dragging]) {
|
|
57
67
|
transition: none;
|
|
58
68
|
}
|
|
@@ -66,6 +76,7 @@ const styles = css`
|
|
|
66
76
|
display: flex;
|
|
67
77
|
content: '';
|
|
68
78
|
position: absolute;
|
|
79
|
+
top: 0;
|
|
69
80
|
height: 100%;
|
|
70
81
|
left: calc(var(--divider-hit-area) / -2 + var(--divider-width) / 2);
|
|
71
82
|
width: var(--divider-hit-area);
|
|
@@ -80,6 +91,7 @@ const styles = css`
|
|
|
80
91
|
:host([vertical]) .divider::after {
|
|
81
92
|
content: '';
|
|
82
93
|
position: absolute;
|
|
94
|
+
left: 0;
|
|
83
95
|
width: 100%;
|
|
84
96
|
top: calc(var(--divider-hit-area) / -2 + var(--divider-width) / 2);
|
|
85
97
|
height: var(--divider-hit-area);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { html
|
|
1
|
+
import { html } from 'lit';
|
|
2
2
|
import { query, property } from 'lit/decorators.js';
|
|
3
3
|
import { classMap } from 'lit/directives/class-map.js';
|
|
4
4
|
import { boolean } from '../../internal/boolean.mjs';
|
|
5
|
+
import { dispatchContentResize, isRendered, isContentMeasurable, PANE_FOLLOWER_TAGS } from '../../internal/content-size.mjs';
|
|
5
6
|
import FlowRdfElement from '../../internal/flow-ui-rdf-element.mjs';
|
|
6
7
|
import { isStringFull } from '../../internal/type-checks.mjs';
|
|
7
8
|
import { setDefaultAnimation } from '../../utilities/animation-registry.mjs';
|
|
@@ -19,11 +20,22 @@ var __decorateClass = (decorators, target, key, kind) => {
|
|
|
19
20
|
return result;
|
|
20
21
|
};
|
|
21
22
|
let id = 0;
|
|
23
|
+
const NESTED_SPLIT_VIEW_WARNING = 'flow-ui-split-view-pane: a pane whose content is a split view is not content-sized. size="content" is treated as "auto" and closed-size="content" as "0px".';
|
|
22
24
|
class FlowUiSplitViewPane extends FlowRdfElement {
|
|
23
25
|
constructor() {
|
|
24
26
|
super(...arguments);
|
|
25
27
|
this.attrId = ++id;
|
|
26
28
|
this.componentId = `flow-ui-split-view-pane-${this.attrId}`;
|
|
29
|
+
/** The followers (panels and tab groups) the pane asked to watch their natural size. */
|
|
30
|
+
this.watchedFollowers = /* @__PURE__ */ new Set();
|
|
31
|
+
/** Whether the split view is animating the panes' sizes, passed on to the followers. */
|
|
32
|
+
this.animating = false;
|
|
33
|
+
/**
|
|
34
|
+
* Watches the children of the pane's other child elements, which may wrap a follower (an Angular component's host
|
|
35
|
+
* element), so that a follower added to a wrapper later follows the pane too.
|
|
36
|
+
*/
|
|
37
|
+
this.wrapperObserver = new MutationObserver(() => this.handleSlotChange());
|
|
38
|
+
this.warnedNestedSplitView = false;
|
|
27
39
|
this.vertical = false;
|
|
28
40
|
this.closed = false;
|
|
29
41
|
this.divider = false;
|
|
@@ -36,17 +48,26 @@ class FlowUiSplitViewPane extends FlowRdfElement {
|
|
|
36
48
|
this.closed = boolean(this.closed, true);
|
|
37
49
|
this.divider = boolean(this.divider, true);
|
|
38
50
|
this.hidden = boolean(this.hidden, true);
|
|
51
|
+
this.configureContentSizing();
|
|
39
52
|
}
|
|
40
53
|
disconnectedCallback() {
|
|
54
|
+
this.wrapperObserver.disconnect();
|
|
55
|
+
this.stopContentSizing();
|
|
56
|
+
this.setAnimating(false);
|
|
41
57
|
super.disconnectedCallback();
|
|
42
58
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
if (
|
|
46
|
-
this.
|
|
59
|
+
updated(changed) {
|
|
60
|
+
super.updated(changed);
|
|
61
|
+
if (changed.has("closed")) {
|
|
62
|
+
this.syncFollowers();
|
|
63
|
+
}
|
|
64
|
+
if (changed.has("size") || changed.has("closedSize")) {
|
|
65
|
+
this.configureContentSizing();
|
|
66
|
+
} else if (changed.has("closed") && this.contentObserver) {
|
|
67
|
+
dispatchContentResize(this);
|
|
47
68
|
}
|
|
48
69
|
}
|
|
49
|
-
/**
|
|
70
|
+
/** Opens the pane. */
|
|
50
71
|
async expand(emitEvent = true) {
|
|
51
72
|
if (this.closed) {
|
|
52
73
|
this.closed = false;
|
|
@@ -55,7 +76,7 @@ class FlowUiSplitViewPane extends FlowRdfElement {
|
|
|
55
76
|
}
|
|
56
77
|
}
|
|
57
78
|
}
|
|
58
|
-
/**
|
|
79
|
+
/** Closes the pane. */
|
|
59
80
|
async collapse(emitEvent = true) {
|
|
60
81
|
if (!this.closed) {
|
|
61
82
|
this.closed = true;
|
|
@@ -64,6 +85,161 @@ class FlowUiSplitViewPane extends FlowRdfElement {
|
|
|
64
85
|
}
|
|
65
86
|
}
|
|
66
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* Whether `content` sizes apply to this pane. A pane whose content is a split view has no natural size, so its
|
|
90
|
+
* split view treats `size="content"` as `auto` and `closed-size="content"` as `0px`.
|
|
91
|
+
*
|
|
92
|
+
* @internal
|
|
93
|
+
*/
|
|
94
|
+
get contentSizable() {
|
|
95
|
+
return ![...this.children].some((child) => child.localName === "flow-ui-split-view");
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Called by the split view when it starts and stops animating the panes' sizes (opening and closing). Passed on to
|
|
99
|
+
* the followers, so that a closing tab group keeps its body until the animation ends.
|
|
100
|
+
*
|
|
101
|
+
* @internal
|
|
102
|
+
*/
|
|
103
|
+
setAnimating(animating) {
|
|
104
|
+
if (animating === this.animating) {
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
this.animating = animating;
|
|
108
|
+
for (const follower of this.followers()) {
|
|
109
|
+
follower.setAnimating?.(animating);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Measure the natural size of the content along the split view's axis, in px: `open` for the content as it renders
|
|
114
|
+
* while the pane is open, `closed` for while it is closed. A follower (panel or tab group) is measured in both
|
|
115
|
+
* states; other content only in its current state. `undefined` when the pane isn't content-sized or isn't rendered
|
|
116
|
+
* (the split view or the pane is hidden), so that a hidden pane never reports a size of 0. Synchronous: nothing is
|
|
117
|
+
* painted or observed.
|
|
118
|
+
*
|
|
119
|
+
* @internal
|
|
120
|
+
*/
|
|
121
|
+
measureContentSize(vertical) {
|
|
122
|
+
const pane = this.paneElement;
|
|
123
|
+
const contents = this.contentsElement;
|
|
124
|
+
if (!this.contentObserver || !pane || !contents || !isRendered(contents)) {
|
|
125
|
+
return void 0;
|
|
126
|
+
}
|
|
127
|
+
const followers = this.followers().filter(isContentMeasurable);
|
|
128
|
+
const measuringClass = vertical ? "split-view-pane--measuring-vertical" : "split-view-pane--measuring-horizontal";
|
|
129
|
+
const measure = (mode) => {
|
|
130
|
+
pane.classList.add(measuringClass);
|
|
131
|
+
followers.forEach((follower) => follower.setContentMeasuring(mode ?? false));
|
|
132
|
+
const rect = contents.getBoundingClientRect();
|
|
133
|
+
followers.forEach((follower) => follower.setContentMeasuring(false));
|
|
134
|
+
pane.classList.remove(measuringClass);
|
|
135
|
+
return vertical ? rect.height : rect.width;
|
|
136
|
+
};
|
|
137
|
+
if (followers.length > 0) {
|
|
138
|
+
return { open: measure("open"), closed: measure("closed") };
|
|
139
|
+
}
|
|
140
|
+
return this.hasAttribute("closed") ? { closed: measure() } : { open: measure() };
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* The elements that follow the pane's `closed` state: each panel or tab group (see {@link PANE_FOLLOWER_TAGS}) that
|
|
144
|
+
* is a direct child of the pane, or a child of a direct child that wraps it, such as an Angular component's host
|
|
145
|
+
* element. Upgraded or not.
|
|
146
|
+
*/
|
|
147
|
+
followers() {
|
|
148
|
+
const followers = [];
|
|
149
|
+
for (const element of this.contentSlot?.assignedElements() ?? []) {
|
|
150
|
+
if (isFollower(element)) {
|
|
151
|
+
followers.push(element);
|
|
152
|
+
} else if (element.localName !== "flow-ui-split-view") {
|
|
153
|
+
followers.push(...[...element.children].filter(isFollower));
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
return followers;
|
|
157
|
+
}
|
|
158
|
+
/** Pass the pane's `closed` state to its followers (a property set: no events, idempotent). */
|
|
159
|
+
syncFollowers() {
|
|
160
|
+
for (const follower of this.followers()) {
|
|
161
|
+
follower.closed = this.closed;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
/** Watch the children of the pane's child elements that aren't followers, which may wrap one. */
|
|
165
|
+
observeWrappers() {
|
|
166
|
+
this.wrapperObserver.disconnect();
|
|
167
|
+
for (const element of this.contentSlot?.assignedElements() ?? []) {
|
|
168
|
+
if (!isFollower(element) && element.localName !== "flow-ui-split-view") {
|
|
169
|
+
this.wrapperObserver.observe(element, { childList: true });
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
get contentSized() {
|
|
174
|
+
return this.size === "content" || this.closedSize === "content";
|
|
175
|
+
}
|
|
176
|
+
/** Start, update or stop watching the content, as the pane's sizes and content require. */
|
|
177
|
+
configureContentSizing() {
|
|
178
|
+
if (!this.hasUpdated) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
const wasContentSized = !!this.contentObserver;
|
|
182
|
+
const contentSized = this.contentSized;
|
|
183
|
+
const sizable = this.contentSizable;
|
|
184
|
+
if (contentSized && !sizable && !this.warnedNestedSplitView) {
|
|
185
|
+
this.warnedNestedSplitView = true;
|
|
186
|
+
console.warn(NESTED_SPLIT_VIEW_WARNING);
|
|
187
|
+
}
|
|
188
|
+
if (!contentSized || !sizable) {
|
|
189
|
+
this.stopContentSizing();
|
|
190
|
+
if (wasContentSized || contentSized) {
|
|
191
|
+
dispatchContentResize(this);
|
|
192
|
+
}
|
|
193
|
+
return;
|
|
194
|
+
}
|
|
195
|
+
this.contentObserver ?? (this.contentObserver = new ResizeObserver(() => dispatchContentResize(this)));
|
|
196
|
+
this.contentObserver.disconnect();
|
|
197
|
+
const elements = this.contentSlot?.assignedElements() ?? [];
|
|
198
|
+
const followers = this.followers();
|
|
199
|
+
const measurable = new Set(followers.filter(isContentMeasurable));
|
|
200
|
+
for (const follower of this.watchedFollowers) {
|
|
201
|
+
if (!measurable.has(follower)) {
|
|
202
|
+
follower.watchContentSize(false);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
measurable.forEach((follower) => follower.watchContentSize(true));
|
|
206
|
+
for (const element of elements) {
|
|
207
|
+
if (!followers.some((follower) => follower === element || follower.parentElement === element)) {
|
|
208
|
+
this.contentObserver.observe(element);
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
this.watchedFollowers = measurable;
|
|
212
|
+
const pendingTags = new Set(
|
|
213
|
+
followers.filter((f) => !measurable.has(f)).map((f) => f.localName)
|
|
214
|
+
);
|
|
215
|
+
for (const tag of pendingTags) {
|
|
216
|
+
customElements.whenDefined(tag).then(() => this.configureContentSizing());
|
|
217
|
+
}
|
|
218
|
+
this.paneElement?.classList.toggle("split-view-pane--content", this.size === "content");
|
|
219
|
+
dispatchContentResize(this);
|
|
220
|
+
}
|
|
221
|
+
stopContentSizing() {
|
|
222
|
+
this.paneElement?.classList.remove("split-view-pane--content");
|
|
223
|
+
this.contentObserver?.disconnect();
|
|
224
|
+
this.contentObserver = void 0;
|
|
225
|
+
this.watchedFollowers.forEach((follower) => follower.watchContentSize(false));
|
|
226
|
+
this.watchedFollowers.clear();
|
|
227
|
+
}
|
|
228
|
+
handleSlotChange(event) {
|
|
229
|
+
if (event) {
|
|
230
|
+
this.observeWrappers();
|
|
231
|
+
}
|
|
232
|
+
this.syncFollowers();
|
|
233
|
+
this.configureContentSizing();
|
|
234
|
+
}
|
|
235
|
+
handleContentResize(event) {
|
|
236
|
+
if (event.target !== this) {
|
|
237
|
+
event.stopPropagation();
|
|
238
|
+
if (this.contentObserver) {
|
|
239
|
+
dispatchContentResize(this);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
67
243
|
render() {
|
|
68
244
|
return html`
|
|
69
245
|
<div
|
|
@@ -83,24 +259,24 @@ class FlowUiSplitViewPane extends FlowRdfElement {
|
|
|
83
259
|
this.collapse();
|
|
84
260
|
}}
|
|
85
261
|
>
|
|
86
|
-
<div part="contents" class="split-view-pane__contents">
|
|
87
|
-
<slot></slot>
|
|
262
|
+
<div part="contents" class="split-view-pane__contents" @flow-ui-content-resize=${this.handleContentResize}>
|
|
263
|
+
<slot @slotchange=${this.handleSlotChange}></slot>
|
|
88
264
|
</div>
|
|
89
|
-
${this.divider ? html`
|
|
90
|
-
<flow-ui-split-view-divider
|
|
91
|
-
part="divider"
|
|
92
|
-
?vertical=${this.vertical}
|
|
93
|
-
class="split-view-pane__divider"
|
|
94
|
-
></flow-ui-split-view-divider>
|
|
95
|
-
` : nothing}
|
|
96
265
|
</div>
|
|
97
266
|
`;
|
|
98
267
|
}
|
|
99
268
|
}
|
|
269
|
+
FlowUiSplitViewPane.tagName = "flow-ui-split-view-pane";
|
|
100
270
|
FlowUiSplitViewPane.styles = styles;
|
|
101
271
|
__decorateClass([
|
|
102
|
-
query(".split-view-
|
|
103
|
-
], FlowUiSplitViewPane.prototype, "
|
|
272
|
+
query(".split-view-pane")
|
|
273
|
+
], FlowUiSplitViewPane.prototype, "paneElement", 2);
|
|
274
|
+
__decorateClass([
|
|
275
|
+
query(".split-view-pane__contents")
|
|
276
|
+
], FlowUiSplitViewPane.prototype, "contentsElement", 2);
|
|
277
|
+
__decorateClass([
|
|
278
|
+
query("slot")
|
|
279
|
+
], FlowUiSplitViewPane.prototype, "contentSlot", 2);
|
|
104
280
|
__decorateClass([
|
|
105
281
|
property({ type: Boolean, reflect: true })
|
|
106
282
|
], FlowUiSplitViewPane.prototype, "vertical", 2);
|
|
@@ -125,6 +301,9 @@ __decorateClass([
|
|
|
125
301
|
__decorateClass([
|
|
126
302
|
property({ type: Boolean, reflect: true })
|
|
127
303
|
], FlowUiSplitViewPane.prototype, "hidden", 2);
|
|
304
|
+
function isFollower(element) {
|
|
305
|
+
return PANE_FOLLOWER_TAGS.includes(element.localName);
|
|
306
|
+
}
|
|
128
307
|
setDefaultAnimation("split-view-pane.expand", {
|
|
129
308
|
keyframes: [{ height: "0" }, { height: "auto" }],
|
|
130
309
|
options: { duration: 250, easing: "linear" }
|
|
@@ -7,6 +7,11 @@ const styles = css`
|
|
|
7
7
|
:host {
|
|
8
8
|
display: block;
|
|
9
9
|
min-height: 0;
|
|
10
|
+
/*
|
|
11
|
+
* Positioned, so that z-index on a pane works: the split view slots each pane into its own grid item, so the pane
|
|
12
|
+
* isn't a grid item itself. Apps layer their side bars above a map with a fixed canvas this way.
|
|
13
|
+
*/
|
|
14
|
+
position: relative;
|
|
10
15
|
}
|
|
11
16
|
|
|
12
17
|
:host([hidden]) {
|
|
@@ -44,6 +49,53 @@ const styles = css`
|
|
|
44
49
|
/* Ensure panel ignores minimum content height */
|
|
45
50
|
min-width: 0;
|
|
46
51
|
}
|
|
52
|
+
|
|
53
|
+
/*
|
|
54
|
+
* Content-sized pane (size="content"): content keeps its natural size and the pane scrolls when it is dragged
|
|
55
|
+
* smaller; a panel or tab group fills the pane, so a scrollable panel scrolls its body, and a tab group its panels.
|
|
56
|
+
*/
|
|
57
|
+
.split-view-pane--content .split-view-pane__contents {
|
|
58
|
+
overflow: auto;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.split-view-pane--content ::slotted(*) {
|
|
62
|
+
flex: none;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.split-view-pane--content ::slotted(flow-ui-panel),
|
|
66
|
+
.split-view-pane--content ::slotted(flow-ui-tab-group) {
|
|
67
|
+
flex: 1 1 0;
|
|
68
|
+
min-height: 0;
|
|
69
|
+
min-width: 0;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/*
|
|
73
|
+
* Measuring pass (measureContentSize()): lay the content out at its natural size along the split view's axis.
|
|
74
|
+
* Added and removed synchronously, so it is never painted.
|
|
75
|
+
*/
|
|
76
|
+
.split-view-pane--measuring-vertical,
|
|
77
|
+
.split-view-pane--measuring-horizontal {
|
|
78
|
+
display: block;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.split-view-pane--measuring-vertical .split-view-pane__contents {
|
|
82
|
+
height: auto;
|
|
83
|
+
overflow: visible;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.split-view-pane--measuring-horizontal {
|
|
87
|
+
width: max-content;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.split-view-pane--measuring-horizontal .split-view-pane__contents {
|
|
91
|
+
width: max-content;
|
|
92
|
+
overflow: visible;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.split-view-pane--measuring-vertical ::slotted(*),
|
|
96
|
+
.split-view-pane--measuring-horizontal ::slotted(*) {
|
|
97
|
+
flex: none !important;
|
|
98
|
+
}
|
|
47
99
|
`;
|
|
48
100
|
|
|
49
101
|
export { styles as default };
|
|
@@ -45,6 +45,10 @@ class FlowUiSplitViewToggleButton extends FlowUiIconButton {
|
|
|
45
45
|
this.parentPanelObserver = null;
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
+
/**
|
|
49
|
+
* Toggles the button's state. Unless `emitEvents` is `false`, it emits `flow-ui-collapse` or `flow-ui-expand`,
|
|
50
|
+
* which closes or opens the parent split-view pane.
|
|
51
|
+
*/
|
|
48
52
|
toggle(emitEvents = true) {
|
|
49
53
|
this.closed = !this.closed;
|
|
50
54
|
if (emitEvents) {
|
|
@@ -69,6 +73,7 @@ class FlowUiSplitViewToggleButton extends FlowUiIconButton {
|
|
|
69
73
|
return __closestFrom(base);
|
|
70
74
|
}
|
|
71
75
|
}
|
|
76
|
+
FlowUiSplitViewToggleButton.tagName = "flow-ui-split-view-toggle-button";
|
|
72
77
|
FlowUiSplitViewToggleButton.styles = [FlowUiIconButton.styles, styles];
|
|
73
78
|
__decorateClass([
|
|
74
79
|
property()
|
|
@@ -9,17 +9,17 @@ const styles = css`
|
|
|
9
9
|
--open-rotation: 180deg;
|
|
10
10
|
}
|
|
11
11
|
|
|
12
|
-
:host([position='right'])
|
|
12
|
+
:host([position='right']) {
|
|
13
13
|
--closed-rotation: 180deg;
|
|
14
14
|
--open-rotation: 0deg;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
:host([position='top'])
|
|
17
|
+
:host([position='top']) {
|
|
18
18
|
--closed-rotation: 0deg;
|
|
19
19
|
--open-rotation: 90deg;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
-
:host([position='bottom'])
|
|
22
|
+
:host([position='bottom']) {
|
|
23
23
|
--closed-rotation: 0deg;
|
|
24
24
|
--open-rotation: 90deg;
|
|
25
25
|
}
|
|
@@ -96,8 +96,8 @@ class FlowUiStepper extends FlowRdfElement {
|
|
|
96
96
|
<div class="stepper__header-item-label">
|
|
97
97
|
<div class="stepper__header-item-title">${capitalize(panel.name)}</div>
|
|
98
98
|
${panel.subTitle ? html`
|
|
99
|
-
|
|
100
|
-
|
|
99
|
+
<div class="stepper__header-item-subtitle">${panel.subTitle}</div>
|
|
100
|
+
` : nothing}
|
|
101
101
|
</div>
|
|
102
102
|
</div>
|
|
103
103
|
`;
|
|
@@ -126,6 +126,7 @@ class FlowUiStepper extends FlowRdfElement {
|
|
|
126
126
|
`;
|
|
127
127
|
}
|
|
128
128
|
}
|
|
129
|
+
FlowUiStepper.tagName = "flow-ui-stepper";
|
|
129
130
|
FlowUiStepper.styles = styles;
|
|
130
131
|
__decorateClass([
|
|
131
132
|
query(".stepper__body-slot")
|
|
@@ -36,7 +36,7 @@ class FlowUiStepperPanel extends FlowRdfElement {
|
|
|
36
36
|
this.id = isStringFull(this.id) ? this.id : this.componentId;
|
|
37
37
|
this.setAttribute("role", "tabpanel");
|
|
38
38
|
}
|
|
39
|
-
|
|
39
|
+
handleActiveChange() {
|
|
40
40
|
this.setAttribute("aria-hidden", this.active ? "false" : "true");
|
|
41
41
|
}
|
|
42
42
|
render() {
|
|
@@ -52,6 +52,7 @@ class FlowUiStepperPanel extends FlowRdfElement {
|
|
|
52
52
|
`;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
|
+
FlowUiStepperPanel.tagName = "flow-ui-stepper-panel";
|
|
55
56
|
FlowUiStepperPanel.styles = styles;
|
|
56
57
|
__decorateClass([
|
|
57
58
|
property({ reflect: true })
|
|
@@ -66,7 +67,7 @@ __decorateClass([
|
|
|
66
67
|
property({ reflect: true, type: Boolean })
|
|
67
68
|
], FlowUiStepperPanel.prototype, "complete", 2);
|
|
68
69
|
__decorateClass([
|
|
69
|
-
watch("
|
|
70
|
-
], FlowUiStepperPanel.prototype, "
|
|
70
|
+
watch("active")
|
|
71
|
+
], FlowUiStepperPanel.prototype, "handleActiveChange", 1);
|
|
71
72
|
|
|
72
73
|
export { FlowUiStepperPanel as default };
|
|
@@ -9,6 +9,7 @@ import { FlowRdfFormControl } from '../../internal/flow-ui-rdf-element.mjs';
|
|
|
9
9
|
import { FormControlController } from '../../internal/form.mjs';
|
|
10
10
|
import { HasSlotController } from '../../internal/slot.mjs';
|
|
11
11
|
import { watch } from '../../internal/watch.mjs';
|
|
12
|
+
import FlowUiDivider from '../divider/divider.component.mjs';
|
|
12
13
|
import styles from './switch.styles.mjs';
|
|
13
14
|
|
|
14
15
|
var __defProp = Object.defineProperty;
|
|
@@ -80,15 +81,13 @@ class FlowUiSwitch extends FlowRdfFormControl {
|
|
|
80
81
|
this.emit("flow-ui-focus");
|
|
81
82
|
}
|
|
82
83
|
handleKeyDown(event) {
|
|
83
|
-
if (event.key
|
|
84
|
-
|
|
85
|
-
this.checked = false;
|
|
86
|
-
this.emit("flow-ui-change");
|
|
87
|
-
this.emit("flow-ui-input");
|
|
84
|
+
if (event.key !== "ArrowLeft" && event.key !== "ArrowRight") {
|
|
85
|
+
return;
|
|
88
86
|
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
87
|
+
event.preventDefault();
|
|
88
|
+
const checked = event.key === "ArrowRight";
|
|
89
|
+
if (this.checked !== checked) {
|
|
90
|
+
this.checked = checked;
|
|
92
91
|
this.emit("flow-ui-change");
|
|
93
92
|
this.emit("flow-ui-input");
|
|
94
93
|
}
|
|
@@ -195,7 +194,9 @@ class FlowUiSwitch extends FlowRdfFormControl {
|
|
|
195
194
|
`;
|
|
196
195
|
}
|
|
197
196
|
}
|
|
197
|
+
FlowUiSwitch.tagName = "flow-ui-switch";
|
|
198
198
|
FlowUiSwitch.styles = styles;
|
|
199
|
+
FlowUiSwitch.dependencies = [FlowUiDivider];
|
|
199
200
|
__decorateClass([
|
|
200
201
|
query('input[type="checkbox"]')
|
|
201
202
|
], FlowUiSwitch.prototype, "input", 2);
|