@visuallyjs/browser-ui 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/css/visuallyjs-theme.css +148 -0
- package/css/visuallyjs.css +1879 -0
- package/js/visuallyjs.browser-ui.cjs.js +143 -0
- package/js/visuallyjs.browser-ui.esm.js +143 -0
- package/package.json +16 -0
- package/types/browser-ui/base-dom-ui-layout-adapter.d.ts +14 -0
- package/types/browser-ui/browser-ui.d.ts +95 -0
- package/types/browser-ui/browser-util.d.ts +233 -0
- package/types/browser-ui/browser-visuallyjs-instance.d.ts +881 -0
- package/types/browser-ui/canvas-layout-adapter.d.ts +15 -0
- package/types/browser-ui/collicat.d.ts +245 -0
- package/types/browser-ui/components/controls/controls-component.d.ts +137 -0
- package/types/browser-ui/components/controls/copy-paste-controls-component.d.ts +9 -0
- package/types/browser-ui/components/controls/css-classes.d.ts +79 -0
- package/types/browser-ui/components/controls/index.d.ts +4 -0
- package/types/browser-ui/components/controls/svg-export-component.d.ts +60 -0
- package/types/browser-ui/components/edge-type-picker/edge-type-picker.d.ts +37 -0
- package/types/browser-ui/components/edge-type-picker/index.d.ts +1 -0
- package/types/browser-ui/components/index.d.ts +4 -0
- package/types/browser-ui/components/inspector/color-picker-tag.d.ts +32 -0
- package/types/browser-ui/components/inspector/definitions.d.ts +114 -0
- package/types/browser-ui/components/inspector/edge-type-tag.d.ts +15 -0
- package/types/browser-ui/components/inspector/index.d.ts +6 -0
- package/types/browser-ui/components/inspector/inspector.d.ts +138 -0
- package/types/browser-ui/components/inspector/shape-type-inspector.d.ts +43 -0
- package/types/browser-ui/components/inspector/vanilla-inspector.d.ts +39 -0
- package/types/browser-ui/components/palette/index.d.ts +2 -0
- package/types/browser-ui/components/palette/palette-content-generator.d.ts +14 -0
- package/types/browser-ui/components/palette/palette-options.d.ts +159 -0
- package/types/browser-ui/components/palette/palette.d.ts +126 -0
- package/types/browser-ui/connector-editor.d.ts +65 -0
- package/types/browser-ui/connector-editors/anchors.d.ts +31 -0
- package/types/browser-ui/connector-editors/css-constants.d.ts +33 -0
- package/types/browser-ui/connector-editors/definitions.d.ts +74 -0
- package/types/browser-ui/connector-editors/editor-base.d.ts +177 -0
- package/types/browser-ui/connector-editors/index.d.ts +52 -0
- package/types/browser-ui/connector-editors/util.d.ts +33 -0
- package/types/browser-ui/connector-editors-bezier/bezier-editor.d.ts +82 -0
- package/types/browser-ui/connector-editors-bezier/css-constants.d.ts +42 -0
- package/types/browser-ui/connector-editors-bezier/index.d.ts +9 -0
- package/types/browser-ui/connector-editors-orthogonal/css-constants.d.ts +28 -0
- package/types/browser-ui/connector-editors-orthogonal/index.d.ts +9 -0
- package/types/browser-ui/connector-editors-orthogonal/orthogonal-editor.d.ts +86 -0
- package/types/browser-ui/connector-editors-straight/auto-split-mode.d.ts +24 -0
- package/types/browser-ui/connector-editors-straight/click-split-mode.d.ts +20 -0
- package/types/browser-ui/connector-editors-straight/css-constants.d.ts +30 -0
- package/types/browser-ui/connector-editors-straight/definitions.d.ts +69 -0
- package/types/browser-ui/connector-editors-straight/index.d.ts +11 -0
- package/types/browser-ui/connector-editors-straight/straight-editor.d.ts +42 -0
- package/types/browser-ui/constants.d.ts +79 -0
- package/types/browser-ui/copy-paste/clipboard.d.ts +34 -0
- package/types/browser-ui/copy-paste/index.d.ts +2 -0
- package/types/browser-ui/copy-paste/transformer.d.ts +14 -0
- package/types/browser-ui/css-constants.d.ts +436 -0
- package/types/browser-ui/d.d.ts +2 -0
- package/types/browser-ui/definitions.d.ts +442 -0
- package/types/browser-ui/dialogs/binder.d.ts +49 -0
- package/types/browser-ui/dialogs/constants.d.ts +51 -0
- package/types/browser-ui/dialogs/dialogs.d.ts +30 -0
- package/types/browser-ui/dialogs/index.d.ts +3 -0
- package/types/browser-ui/drag-manager-2.d.ts +54 -0
- package/types/browser-ui/edge-handler-base.d.ts +168 -0
- package/types/browser-ui/edge-input-handler.d.ts +116 -0
- package/types/browser-ui/edge-mappings/flowchart-basic.d.ts +22 -0
- package/types/browser-ui/edge-mappings/index.d.ts +1 -0
- package/types/browser-ui/edge-relocate-handler.d.ts +51 -0
- package/types/browser-ui/element-drag-handler-2.d.ts +254 -0
- package/types/browser-ui/element-dragger.d.ts +45 -0
- package/types/browser-ui/element-facade.d.ts +11 -0
- package/types/browser-ui/event-manager.d.ts +50 -0
- package/types/browser-ui/fixed-layer.d.ts +107 -0
- package/types/browser-ui/group-layout-adapter.d.ts +19 -0
- package/types/browser-ui/html-element-overlay.d.ts +32 -0
- package/types/browser-ui/icons/definitions.d.ts +59 -0
- package/types/browser-ui/icons/icon-renderer.d.ts +43 -0
- package/types/browser-ui/icons/index.d.ts +2 -0
- package/types/browser-ui/index.d.ts +48 -0
- package/types/browser-ui/pan-zoom-options.d.ts +262 -0
- package/types/browser-ui/pan-zoom.d.ts +674 -0
- package/types/browser-ui/paper-renderer/definitions.d.ts +83 -0
- package/types/browser-ui/paper-renderer/index.d.ts +2 -0
- package/types/browser-ui/paper-renderer/paper.d.ts +50 -0
- package/types/browser-ui/pinch-listener.d.ts +33 -0
- package/types/browser-ui/plugins/background/available-backgrounds.d.ts +12 -0
- package/types/browser-ui/plugins/background/background-options.d.ts +62 -0
- package/types/browser-ui/plugins/background/background-plugin.d.ts +62 -0
- package/types/browser-ui/plugins/background/generated-grid-background.d.ts +230 -0
- package/types/browser-ui/plugins/background/index.d.ts +6 -0
- package/types/browser-ui/plugins/background/simple-background.d.ts +33 -0
- package/types/browser-ui/plugins/background/tiled-background.d.ts +118 -0
- package/types/browser-ui/plugins/browser-ui-plugin.d.ts +90 -0
- package/types/browser-ui/plugins/edge-routing/index.d.ts +66 -0
- package/types/browser-ui/plugins/index.d.ts +5 -0
- package/types/browser-ui/plugins/selected-edge-highlight/index.d.ts +1 -0
- package/types/browser-ui/plugins/selected-edge-highlight/selected-edge-highlight-plugin.d.ts +36 -0
- package/types/browser-ui/plugins/ui-states/index.d.ts +2 -0
- package/types/browser-ui/plugins/ui-states/ui-state.d.ts +14 -0
- package/types/browser-ui/plugins/ui-states/ui-states-plugin.d.ts +69 -0
- package/types/browser-ui/positioning-and-sizing-utils.d.ts +103 -0
- package/types/browser-ui/shape-library/index.d.ts +4 -0
- package/types/browser-ui/shape-library/shape-library-definitions.d.ts +243 -0
- package/types/browser-ui/shape-library/shape-library.d.ts +266 -0
- package/types/browser-ui/shape-library/shapes-basic.d.ts +7 -0
- package/types/browser-ui/shape-library/shapes-flowchart.d.ts +7 -0
- package/types/browser-ui/storage.d.ts +8 -0
- package/types/browser-ui/surface-renderer/anim/anim.d.ts +64 -0
- package/types/browser-ui/surface-renderer/anim/constants.d.ts +74 -0
- package/types/browser-ui/surface-renderer/anim/definitions.d.ts +134 -0
- package/types/browser-ui/surface-renderer/anim/index.d.ts +4 -0
- package/types/browser-ui/surface-renderer/anim/path-transport.d.ts +23 -0
- package/types/browser-ui/surface-renderer/css-classes.d.ts +64 -0
- package/types/browser-ui/surface-renderer/decorators.d.ts +162 -0
- package/types/browser-ui/surface-renderer/definitions.d.ts +83 -0
- package/types/browser-ui/surface-renderer/diagrams/constants.d.ts +28 -0
- package/types/browser-ui/surface-renderer/diagrams/definitions.d.ts +528 -0
- package/types/browser-ui/surface-renderer/diagrams/diagram-cell.d.ts +123 -0
- package/types/browser-ui/surface-renderer/diagrams/diagram-link.d.ts +116 -0
- package/types/browser-ui/surface-renderer/diagrams/diagram-palette.d.ts +11 -0
- package/types/browser-ui/surface-renderer/diagrams/diagram-tools.d.ts +112 -0
- package/types/browser-ui/surface-renderer/diagrams/diagram.d.ts +221 -0
- package/types/browser-ui/surface-renderer/diagrams/index.d.ts +25 -0
- package/types/browser-ui/surface-renderer/diagrams/mediator.d.ts +59 -0
- package/types/browser-ui/surface-renderer/diagrams/util.d.ts +15 -0
- package/types/browser-ui/surface-renderer/elastic-group-manager.d.ts +102 -0
- package/types/browser-ui/surface-renderer/index.d.ts +34 -0
- package/types/browser-ui/surface-renderer/params.d.ts +175 -0
- package/types/browser-ui/surface-renderer/plugins/controls/controls-plugin.d.ts +26 -0
- package/types/browser-ui/surface-renderer/plugins/controls/index.d.ts +1 -0
- package/types/browser-ui/surface-renderer/plugins/drag-groups/drag-groups-plugin.d.ts +78 -0
- package/types/browser-ui/surface-renderer/plugins/drag-groups/index.d.ts +1 -0
- package/types/browser-ui/surface-renderer/plugins/export-controls/export-controls-plugin.d.ts +25 -0
- package/types/browser-ui/surface-renderer/plugins/export-controls/index.d.ts +1 -0
- package/types/browser-ui/surface-renderer/plugins/index.d.ts +10 -0
- package/types/browser-ui/surface-renderer/plugins/lasso/index.d.ts +2 -0
- package/types/browser-ui/surface-renderer/plugins/lasso/lasso-plugin.d.ts +78 -0
- package/types/browser-ui/surface-renderer/plugins/lasso/lasso.d.ts +74 -0
- package/types/browser-ui/surface-renderer/plugins/miniview/index.d.ts +1 -0
- package/types/browser-ui/surface-renderer/plugins/miniview/miniview-plugin.d.ts +235 -0
- package/types/browser-ui/surface-renderer/plugins/palette/index.d.ts +1 -0
- package/types/browser-ui/surface-renderer/plugins/palette/palette-plugin.d.ts +17 -0
- package/types/browser-ui/surface-renderer/plugins/pan-buttons/index.d.ts +1 -0
- package/types/browser-ui/surface-renderer/plugins/pan-buttons/pan-buttons-plugin.d.ts +55 -0
- package/types/browser-ui/surface-renderer/plugins/resizing-tools/border-drag-handlers.d.ts +3 -0
- package/types/browser-ui/surface-renderer/plugins/resizing-tools/definitions.d.ts +411 -0
- package/types/browser-ui/surface-renderer/plugins/resizing-tools/drag-handlers.d.ts +3 -0
- package/types/browser-ui/surface-renderer/plugins/resizing-tools/handle-gen.d.ts +15 -0
- package/types/browser-ui/surface-renderer/plugins/resizing-tools/index.d.ts +4 -0
- package/types/browser-ui/surface-renderer/plugins/resizing-tools/resizing-tools-plugin.d.ts +185 -0
- package/types/browser-ui/surface-renderer/plugins/resizing-tools/util.d.ts +16 -0
- package/types/browser-ui/surface-renderer/plugins/snaplines/index.d.ts +1 -0
- package/types/browser-ui/surface-renderer/plugins/snaplines/snaplines-plugin.d.ts +128 -0
- package/types/browser-ui/surface-renderer/plugins/vertex-drawing/definitions.d.ts +90 -0
- package/types/browser-ui/surface-renderer/plugins/vertex-drawing/index.d.ts +2 -0
- package/types/browser-ui/surface-renderer/plugins/vertex-drawing/vertex-drawing-plugin.d.ts +64 -0
- package/types/browser-ui/surface-renderer/shape-palette-options.d.ts +127 -0
- package/types/browser-ui/surface-renderer/shape-palette.d.ts +55 -0
- package/types/browser-ui/surface-renderer/surface-decorator.d.ts +35 -0
- package/types/browser-ui/surface-renderer/surface-events.d.ts +9 -0
- package/types/browser-ui/surface-renderer/surface-render-options.d.ts +125 -0
- package/types/browser-ui/surface-renderer/surface.d.ts +665 -0
- package/types/browser-ui/svg-component.d.ts +6 -0
- package/types/browser-ui/svg-element-connector.d.ts +16 -0
- package/types/browser-ui/svg-element-overlay.d.ts +55 -0
- package/types/browser-ui/svg-export/definitions.d.ts +153 -0
- package/types/browser-ui/svg-export/image-export-ui.d.ts +20 -0
- package/types/browser-ui/svg-export/image-exporter.d.ts +15 -0
- package/types/browser-ui/svg-export/index.d.ts +6 -0
- package/types/browser-ui/svg-export/svg-export-ui.d.ts +11 -0
- package/types/browser-ui/svg-export/svg-exporter.d.ts +8 -0
- package/types/browser-ui/svg-export/util.d.ts +23 -0
- package/types/browser-ui/svg-util.d.ts +27 -0
- package/types/browser-ui/templating/browser-ui-recado.d.ts +48 -0
- package/types/browser-ui/templating/custom-tag-definition.d.ts +32 -0
- package/types/browser-ui/templating/index.d.ts +11 -0
- package/types/browser-ui/templating/recado-template-renderer.d.ts +69 -0
- package/types/browser-ui/ui-path.d.ts +57 -0
- package/types/browser-ui/util.d.ts +4 -0
- package/types/browser-ui/wheel-listener.d.ts +2 -0
- package/types/charts/area/area-chart.d.ts +85 -0
- package/types/charts/area/index.d.ts +1 -0
- package/types/charts/bar-and-column/bar-chart.d.ts +34 -0
- package/types/charts/bar-and-column/bar-plot.d.ts +90 -0
- package/types/charts/bar-and-column/column-chart.d.ts +35 -0
- package/types/charts/bar-and-column/index.d.ts +3 -0
- package/types/charts/base-chart.d.ts +395 -0
- package/types/charts/base-xy-chart.d.ts +224 -0
- package/types/charts/bubble/bubble-chart.d.ts +30 -0
- package/types/charts/bubble/definitions.d.ts +32 -0
- package/types/charts/bubble/index.d.ts +2 -0
- package/types/charts/category-value-chart.d.ts +146 -0
- package/types/charts/chart-exporter.d.ts +38 -0
- package/types/charts/chart-zoom-controls.d.ts +23 -0
- package/types/charts/constants.d.ts +16 -0
- package/types/charts/css-classes.d.ts +312 -0
- package/types/charts/datasource.d.ts +61 -0
- package/types/charts/definitions.d.ts +261 -0
- package/types/charts/domain_scale_utilities.d.ts +72 -0
- package/types/charts/dual-value-chart.d.ts +60 -0
- package/types/charts/gauge/definitions.d.ts +108 -0
- package/types/charts/gauge/gauge-chart.d.ts +91 -0
- package/types/charts/gauge/index.d.ts +2 -0
- package/types/charts/index.d.ts +25 -0
- package/types/charts/legend.d.ts +120 -0
- package/types/charts/line/index.d.ts +1 -0
- package/types/charts/line/line-chart.d.ts +79 -0
- package/types/charts/markers.d.ts +13 -0
- package/types/charts/pie/index.d.ts +1 -0
- package/types/charts/pie/pie-chart.d.ts +146 -0
- package/types/charts/plot.d.ts +75 -0
- package/types/charts/sankey/index.d.ts +1 -0
- package/types/charts/sankey/preprocessor.d.ts +37 -0
- package/types/charts/sankey/sankey.d.ts +208 -0
- package/types/charts/scatter/definitions.d.ts +6 -0
- package/types/charts/scatter/index.d.ts +2 -0
- package/types/charts/scatter/scatter-chart.d.ts +16 -0
- package/types/charts/series/array-based-series.d.ts +95 -0
- package/types/charts/series/collation-series.d.ts +24 -0
- package/types/charts/series/definitions.d.ts +52 -0
- package/types/charts/series/dual-value-chart-series.d.ts +26 -0
- package/types/charts/series/index.d.ts +7 -0
- package/types/charts/series/record-based-series.d.ts +58 -0
- package/types/charts/series/series.d.ts +66 -0
- package/types/charts/series/summing-collation-series.d.ts +31 -0
- package/types/charts/series/summing-series.d.ts +19 -0
- package/types/charts/series-based-chart.d.ts +59 -0
- package/types/charts/tooltip.d.ts +167 -0
- package/types/charts/util.d.ts +149 -0
- package/types/core/astar/astar-path-finder.d.ts +37 -0
- package/types/core/astar/astar-util.d.ts +100 -0
- package/types/core/astar/candidate-finder.d.ts +16 -0
- package/types/core/astar/candidate-sorter.d.ts +10 -0
- package/types/core/astar/definitions.d.ts +185 -0
- package/types/core/astar/index.d.ts +3 -0
- package/types/core/astar/path-to-segments.d.ts +45 -0
- package/types/core/autosaver.d.ts +67 -0
- package/types/core/color-generator.d.ts +66 -0
- package/types/core/constants.d.ts +181 -0
- package/types/core/csv-loader.d.ts +84 -0
- package/types/core/datamodel/data-model.d.ts +23 -0
- package/types/core/datamodel/vertex-definition.d.ts +40 -0
- package/types/core/datasource.d.ts +87 -0
- package/types/core/event-constants.d.ts +308 -0
- package/types/core/event-generator.d.ts +102 -0
- package/types/core/filterable-dataset.d.ts +38 -0
- package/types/core/geom.d.ts +278 -0
- package/types/core/index.d.ts +39 -0
- package/types/core/io.d.ts +106 -0
- package/types/core/layout/absolute-layout.d.ts +91 -0
- package/types/core/layout/abstract-layout-adapter.d.ts +17 -0
- package/types/core/layout/abstract-layout.d.ts +192 -0
- package/types/core/layout/circular/circular-layout.d.ts +31 -0
- package/types/core/layout/circular/index.d.ts +1 -0
- package/types/core/layout/empty-layout.d.ts +17 -0
- package/types/core/layout/force-directed/force-directed-layout.d.ts +148 -0
- package/types/core/layout/force-directed/index.d.ts +1 -0
- package/types/core/layout/grid/definitions.d.ts +81 -0
- package/types/core/layout/grid/grid-layout.d.ts +60 -0
- package/types/core/layout/grid/index.d.ts +2 -0
- package/types/core/layout/hierarchical/abstract-hierarchical-layout.d.ts +90 -0
- package/types/core/layout/hierarchical/balloon-layout.d.ts +62 -0
- package/types/core/layout/hierarchical/definitions.d.ts +45 -0
- package/types/core/layout/hierarchical/hierarchical-layout.d.ts +102 -0
- package/types/core/layout/hierarchical/index.d.ts +5 -0
- package/types/core/layout/hierarchical/parent-relative-placement.d.ts +96 -0
- package/types/core/layout/hierarchy/assign-layers-stage.d.ts +26 -0
- package/types/core/layout/hierarchy/crossing-stage.d.ts +78 -0
- package/types/core/layout/hierarchy/definitions.d.ts +261 -0
- package/types/core/layout/hierarchy/edge-routing.d.ts +25 -0
- package/types/core/layout/hierarchy/hierarchy-layout-stage.d.ts +9 -0
- package/types/core/layout/hierarchy/hierarchy-layout.d.ts +87 -0
- package/types/core/layout/hierarchy/index.d.ts +11 -0
- package/types/core/layout/hierarchy/model.d.ts +167 -0
- package/types/core/layout/hierarchy/parent-relative-placement.d.ts +69 -0
- package/types/core/layout/hierarchy/placement-stage.d.ts +82 -0
- package/types/core/layout/hierarchy/util.d.ts +13 -0
- package/types/core/layout/hierarchy/vertex-set.d.ts +45 -0
- package/types/core/layout/index.d.ts +10 -0
- package/types/core/layout/layouts.d.ts +10 -0
- package/types/core/magnetizer.d.ts +232 -0
- package/types/core/model/anchor.d.ts +38 -0
- package/types/core/model/cluster.d.ts +19 -0
- package/types/core/model/defs.d.ts +8 -0
- package/types/core/model/djikstra.d.ts +26 -0
- package/types/core/model/floyd-warshall.d.ts +15 -0
- package/types/core/model/graph.d.ts +1166 -0
- package/types/core/model/path.d.ts +227 -0
- package/types/core/params.d.ts +476 -0
- package/types/core/renderer.d.ts +74 -0
- package/types/core/router/common.d.ts +104 -0
- package/types/core/router/direct-router.d.ts +12 -0
- package/types/core/router/index.d.ts +3 -0
- package/types/core/router/orthogonal-router.d.ts +46 -0
- package/types/core/rtree/definitions.d.ts +24 -0
- package/types/core/rtree/hilbert.d.ts +9 -0
- package/types/core/rtree/index.d.ts +4 -0
- package/types/core/rtree/rtree.d.ts +102 -0
- package/types/core/rtree/util.d.ts +55 -0
- package/types/core/search/index.d.ts +1 -0
- package/types/core/search/visuallyjs-search.d.ts +167 -0
- package/types/core/selection.d.ts +394 -0
- package/types/core/templates/abstract-entry.d.ts +19 -0
- package/types/core/templates/comment-entry.d.ts +11 -0
- package/types/core/templates/core.d.ts +162 -0
- package/types/core/templates/custom-tag.d.ts +74 -0
- package/types/core/templates/defs.d.ts +123 -0
- package/types/core/templates/each-entry.d.ts +23 -0
- package/types/core/templates/element-entry.d.ts +18 -0
- package/types/core/templates/elements.d.ts +14 -0
- package/types/core/templates/executions.d.ts +100 -0
- package/types/core/templates/expressions.d.ts +47 -0
- package/types/core/templates/fake-dom.d.ts +42 -0
- package/types/core/templates/headless.d.ts +15 -0
- package/types/core/templates/if-entry.d.ts +25 -0
- package/types/core/templates/index.d.ts +14 -0
- package/types/core/templates/parser.d.ts +84 -0
- package/types/core/templates/text-entry.d.ts +17 -0
- package/types/core/templates/tmpl-entry.d.ts +13 -0
- package/types/core/toolkit.d.ts +1314 -0
- package/types/core/undo-redo/compound-action.d.ts +19 -0
- package/types/core/undo-redo/edge-action.d.ts +62 -0
- package/types/core/undo-redo/group-action.d.ts +60 -0
- package/types/core/undo-redo/move-action.d.ts +18 -0
- package/types/core/undo-redo/node-group-action.d.ts +62 -0
- package/types/core/undo-redo/port-action.d.ts +29 -0
- package/types/core/undo-redo/renderer-vertex-removed-action.d.ts +17 -0
- package/types/core/undo-redo/set-type-action.d.ts +14 -0
- package/types/core/undo-redo/undo-redo.d.ts +203 -0
- package/types/core/undo-redo/update-action.d.ts +20 -0
- package/types/core/undo-redo/vertex-update-action.d.ts +12 -0
- package/types/core/util.d.ts +661 -0
- package/types/index.d.ts +16 -0
- package/types/l.d.ts +2 -0
- package/types/test-support/index.d.ts +1 -0
- package/types/test-support/test-support.d.ts +833 -0
- package/types/ui/common/abstract-segment.d.ts +88 -0
- package/types/ui/common/anchor.d.ts +280 -0
- package/types/ui/common/connector.d.ts +106 -0
- package/types/ui/common/index.d.ts +5 -0
- package/types/ui/common/overlay.d.ts +117 -0
- package/types/ui/common/paint-style.d.ts +33 -0
- package/types/ui/connector-bezier/abstract-bezier-connector.d.ts +68 -0
- package/types/ui/connector-bezier/bezier-connector.d.ts +34 -0
- package/types/ui/connector-bezier/bezier-segment.d.ts +31 -0
- package/types/ui/connector-bezier/bezier.d.ts +129 -0
- package/types/ui/connector-bezier/index.d.ts +6 -0
- package/types/ui/connector-bezier/operations.d.ts +18 -0
- package/types/ui/connector-bezier/quadratic-bezier-connector.d.ts +35 -0
- package/types/ui/connector-orthogonal/default-orthogonal-path-compute.d.ts +11 -0
- package/types/ui/connector-orthogonal/definitions.d.ts +120 -0
- package/types/ui/connector-orthogonal/index.d.ts +7 -0
- package/types/ui/connector-orthogonal/modern-source-target-relocator.d.ts +37 -0
- package/types/ui/connector-orthogonal/operations.d.ts +49 -0
- package/types/ui/connector-orthogonal/stub-calculators.d.ts +12 -0
- package/types/ui/connector-orthogonal/utils.d.ts +134 -0
- package/types/ui/connector-orthogonal/vertex-avoidance.d.ts +29 -0
- package/types/ui/connector-straight/index.d.ts +2 -0
- package/types/ui/connector-straight/operations.d.ts +55 -0
- package/types/ui/connector-straight/straight-connector.d.ts +121 -0
- package/types/ui/copy-paste/clipboard.d.ts +45 -0
- package/types/ui/copy-paste/copy-data.d.ts +93 -0
- package/types/ui/copy-paste/index.d.ts +2 -0
- package/types/ui/core/callbacks.d.ts +48 -0
- package/types/ui/core/component/component.d.ts +115 -0
- package/types/ui/core/connector/abstract-connector.d.ts +66 -0
- package/types/ui/core/connector/arc-segment.d.ts +39 -0
- package/types/ui/core/connector/connection-impl.d.ts +81 -0
- package/types/ui/core/connector/connections.d.ts +113 -0
- package/types/ui/core/connector/connectors.d.ts +205 -0
- package/types/ui/core/connector/operations.d.ts +0 -0
- package/types/ui/core/connector/segments.d.ts +24 -0
- package/types/ui/core/connector/straight-segment.d.ts +32 -0
- package/types/ui/core/constants.d.ts +181 -0
- package/types/ui/core/context.d.ts +26 -0
- package/types/ui/core/core-events.d.ts +7 -0
- package/types/ui/core/core.d.ts +1734 -0
- package/types/ui/core/css-constants.d.ts +149 -0
- package/types/ui/core/defaults.d.ts +242 -0
- package/types/ui/core/definitions.d.ts +540 -0
- package/types/ui/core/event-constants.d.ts +510 -0
- package/types/ui/core/factory/anchor-record-factory.d.ts +17 -0
- package/types/ui/core/factory/continuous-anchors.d.ts +27 -0
- package/types/ui/core/factory/overlay-factory.d.ts +8 -0
- package/types/ui/core/grid-profile.d.ts +28 -0
- package/types/ui/core/group-collapse-expand.d.ts +23 -0
- package/types/ui/core/group-sizer.d.ts +9 -0
- package/types/ui/core/index.d.ts +45 -0
- package/types/ui/core/magnetize-profile.d.ts +82 -0
- package/types/ui/core/overlay/arrow-overlay.d.ts +34 -0
- package/types/ui/core/overlay/custom-overlay.d.ts +38 -0
- package/types/ui/core/overlay/diamond-overlay.d.ts +14 -0
- package/types/ui/core/overlay/dot-overlay.d.ts +54 -0
- package/types/ui/core/overlay/ellipse-overlay.d.ts +60 -0
- package/types/ui/core/overlay/label-overlay.d.ts +37 -0
- package/types/ui/core/overlay/overlay.d.ts +131 -0
- package/types/ui/core/overlay/plain-arrow-overlay.d.ts +15 -0
- package/types/ui/core/overlay/rectangle-overlay.d.ts +66 -0
- package/types/ui/core/params.d.ts +223 -0
- package/types/ui/core/router/astar-path-finder.d.ts +29 -0
- package/types/ui/core/router/base-router.d.ts +100 -0
- package/types/ui/core/router/default-router.d.ts +38 -0
- package/types/ui/core/router/index.d.ts +5 -0
- package/types/ui/core/router/router-utils.d.ts +118 -0
- package/types/ui/core/router/router.d.ts +30 -0
- package/types/ui/core/type-descriptors.d.ts +83 -0
- package/types/ui/core/ui-model.d.ts +65 -0
- package/types/ui/core/view/common-options.d.ts +15 -0
- package/types/ui/core/view/edge-options.d.ts +126 -0
- package/types/ui/core/view/events.d.ts +159 -0
- package/types/ui/core/view/group-options.d.ts +75 -0
- package/types/ui/core/view/index.d.ts +35 -0
- package/types/ui/core/view/node-options.d.ts +20 -0
- package/types/ui/core/view/node-or-port-options.d.ts +28 -0
- package/types/ui/core/view/port-options.d.ts +51 -0
- package/types/ui/core/view/vertex-options.d.ts +28 -0
- package/types/ui/core/viewport.d.ts +297 -0
- package/types/ui/index.d.ts +9 -0
- package/types/ui/plugins/definitions.d.ts +118 -0
- package/types/ui/plugins/index.d.ts +2 -0
- package/types/ui/plugins/plugins.d.ts +7 -0
- package/types/ui/property-mappings/definitions.d.ts +28 -0
- package/types/ui/property-mappings/index.d.ts +2 -0
- package/types/ui/property-mappings/property-mapper.d.ts +16 -0
- package/types/ui/util/index.d.ts +3 -0
- package/types/ui/util/property-tracker.d.ts +8 -0
- package/types/ui/util/svg-constants.d.ts +111 -0
- package/types/ui/util/util.d.ts +69 -0
- package/types/version.d.ts +1 -0
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
import { DataSource, ObjectInfo } from "./datasource";
|
|
2
|
+
import { EVENT_DATA_LOAD_END, EVENT_DATA_LOAD_START, EVENT_EDGE_ADDED, EVENT_EDGE_REMOVED, EVENT_EDGE_SOURCE_CHANGED, EVENT_EDGE_TARGET_CHANGED, EVENT_EDGE_UPDATED, EVENT_GRAPH_CLEAR_START, EVENT_GROUP_UPDATED, EVENT_NODE_ADDED, EVENT_NODE_REMOVED, EVENT_NODE_UPDATED, EVENT_PORT_UPDATED } from "./event-constants";
|
|
3
|
+
import { VisuallyJsModel, ObjectFactory } from "./toolkit";
|
|
4
|
+
import { Graph, Base, Port, Group, Node, Edge, Vertex } from "./model/graph";
|
|
5
|
+
import { DataModel } from "./datamodel/data-model";
|
|
6
|
+
import { Path } from "./model/path";
|
|
7
|
+
import { OptimisticEventGenerator } from "./event-generator";
|
|
8
|
+
import { EVENT_GROUP_ADDED, EVENT_GROUP_REMOVED } from "./event-constants";
|
|
9
|
+
/**
|
|
10
|
+
* Defines the `mixed` selection mode - any combination of vertices and edges is supported.
|
|
11
|
+
* @group Model
|
|
12
|
+
* @constant
|
|
13
|
+
*/
|
|
14
|
+
export declare const SELECTION_MODE_MIXED = "mixed";
|
|
15
|
+
/**
|
|
16
|
+
* Defines the `isolated` selection mode - either a set of vertices, or a set of edges, but not both at the same time.
|
|
17
|
+
* @group Model
|
|
18
|
+
* @constant
|
|
19
|
+
*/
|
|
20
|
+
export declare const SELECTION_MODE_ISOLATED = "isolated";
|
|
21
|
+
/**
|
|
22
|
+
* Defines the `nodesOnly` selection mode - only Node objects
|
|
23
|
+
* @group Model
|
|
24
|
+
* @constant
|
|
25
|
+
*/
|
|
26
|
+
export declare const SELECTION_MODE_NODES_ONLY = "nodesOnly";
|
|
27
|
+
/**
|
|
28
|
+
* Defines the `groupsOnly` selection mode - only Group objects
|
|
29
|
+
* @group Model
|
|
30
|
+
* @constant
|
|
31
|
+
*/
|
|
32
|
+
export declare const SELECTION_MODE_GROUPS_ONLY = "groupsOnly";
|
|
33
|
+
/**
|
|
34
|
+
* Defines the `edgesOnly` selection mode - only Edge objects
|
|
35
|
+
* @group Model
|
|
36
|
+
* @constant
|
|
37
|
+
*/
|
|
38
|
+
export declare const SELECTION_MODE_EDGES_ONLY = "edgesOnly";
|
|
39
|
+
/**
|
|
40
|
+
* Possible modes for a Selection.
|
|
41
|
+
*
|
|
42
|
+
* @group Model
|
|
43
|
+
*/
|
|
44
|
+
export type SelectionMode = typeof SELECTION_MODE_ISOLATED | typeof SELECTION_MODE_EDGES_ONLY | typeof SELECTION_MODE_NODES_ONLY | typeof SELECTION_MODE_GROUPS_ONLY | typeof SELECTION_MODE_MIXED;
|
|
45
|
+
/**
|
|
46
|
+
* Options for the behaviour of a selection.
|
|
47
|
+
* @group Model
|
|
48
|
+
*/
|
|
49
|
+
export interface SelectionOptions {
|
|
50
|
+
/**
|
|
51
|
+
* Optional. called after a reload when a `generator` was supplied.
|
|
52
|
+
*/
|
|
53
|
+
onReload?: Function;
|
|
54
|
+
/**
|
|
55
|
+
* Optional. called before the selection is cleared at the beginning of a reload, when a `generator` is supplied.
|
|
56
|
+
*/
|
|
57
|
+
onBeforeReload?: Function;
|
|
58
|
+
/**
|
|
59
|
+
* Optional function to call when the selection is cleared.
|
|
60
|
+
*/
|
|
61
|
+
onClear?: Function;
|
|
62
|
+
/**
|
|
63
|
+
* Defaults to false. If true, and a `generator` is supplied,
|
|
64
|
+
*/
|
|
65
|
+
autoFill?: boolean;
|
|
66
|
+
/**
|
|
67
|
+
* Optional function that can be called to fill the selection. You'd use this when you are rendering individual selections and you need to be able to refresh the whole view based on some change in the data model.
|
|
68
|
+
*/
|
|
69
|
+
generator?: Function;
|
|
70
|
+
/**
|
|
71
|
+
* If true, the selection will not populate itself as soon as it is constructed. Otherwise, and this is the default behaviour, it will.
|
|
72
|
+
*/
|
|
73
|
+
lazy?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Defaults to SelectionModes.mixed, meaning any combination of nodes, groups and edges may be present in the selection at a given point in time.
|
|
76
|
+
*/
|
|
77
|
+
mode?: SelectionMode;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Events that a Selection can fire.
|
|
81
|
+
*/
|
|
82
|
+
export type SELECTION_EVENTS = typeof EVENT_EDGE_UPDATED | typeof EVENT_DATA_LOAD_END | typeof EVENT_DATA_LOAD_START | typeof EVENT_NODE_UPDATED | typeof EVENT_GRAPH_CLEAR_START | typeof EVENT_GROUP_UPDATED | typeof EVENT_PORT_UPDATED | typeof EVENT_EDGE_TARGET_CHANGED | typeof EVENT_EDGE_SOURCE_CHANGED | typeof EVENT_EDGE_REMOVED | typeof EVENT_EDGE_ADDED | typeof EVENT_GROUP_REMOVED | typeof EVENT_NODE_REMOVED | typeof EVENT_GROUP_ADDED | typeof EVENT_NODE_ADDED;
|
|
83
|
+
/**
|
|
84
|
+
* A selection is a group of vertices and edges, upon which you can perform bulk operations.
|
|
85
|
+
* @group Model
|
|
86
|
+
*/
|
|
87
|
+
export declare class VisuallyJsSelection extends OptimisticEventGenerator implements DataSource {
|
|
88
|
+
instance: VisuallyJsModel;
|
|
89
|
+
static DISCARD_EXISTING: string;
|
|
90
|
+
static DISCARD_NEW: string;
|
|
91
|
+
private _maxNodes;
|
|
92
|
+
private _maxEdges;
|
|
93
|
+
private _maxGroups;
|
|
94
|
+
_nodes: Array<Node>;
|
|
95
|
+
_groups: Array<Group>;
|
|
96
|
+
_edges: Array<Edge>;
|
|
97
|
+
capacityPolicy: string;
|
|
98
|
+
generator: Function;
|
|
99
|
+
onReload: Function;
|
|
100
|
+
onBeforeReload: Function;
|
|
101
|
+
onClear: Function;
|
|
102
|
+
private autoFill;
|
|
103
|
+
private _$_objMap;
|
|
104
|
+
private _mode;
|
|
105
|
+
private _loading;
|
|
106
|
+
edgeFactory: ObjectFactory;
|
|
107
|
+
/**
|
|
108
|
+
* Returns whether or not the selection has any nodes, edges or groups.
|
|
109
|
+
*/
|
|
110
|
+
isEmpty(): boolean;
|
|
111
|
+
private _getList;
|
|
112
|
+
/**
|
|
113
|
+
* Sets the selection's current mode, flushing any objects which do not match the given mode. If you switch to `SELECTION_MODE_ISOLATED` the entire selection is cleared, because it does not know what single supported type should be until something is subsequently added.
|
|
114
|
+
* @param mode
|
|
115
|
+
*/
|
|
116
|
+
setMode(mode: SelectionMode): void;
|
|
117
|
+
private _pushToList;
|
|
118
|
+
private _fireListEvent;
|
|
119
|
+
constructor(instance: VisuallyJsModel, params?: SelectionOptions);
|
|
120
|
+
private _addOne;
|
|
121
|
+
private _modePermitsAddition;
|
|
122
|
+
private _removeOne;
|
|
123
|
+
private _toggle;
|
|
124
|
+
private _makeSenseOf;
|
|
125
|
+
/**
|
|
126
|
+
* Removes the given object from the selection. May take many forms - a Group, Group Id, Node, Node Id, or Edge, or a list of these, or a Path.
|
|
127
|
+
* @param obj Object(s) to remove.
|
|
128
|
+
*/
|
|
129
|
+
remove(obj: string | Array<string> | Base | Array<Base> | Path | VisuallyJsSelection, evtPipe?: (b: Base, append: boolean) => any): any[];
|
|
130
|
+
/**
|
|
131
|
+
* Appends the given object to the selection. May take many forms - a Group, Group Id, Node, Node Id, or Edge, or a list of these, or a Path.
|
|
132
|
+
* @param obj Object(s) to add.
|
|
133
|
+
*/
|
|
134
|
+
append(obj: string | Array<string> | Base | Array<Base> | Path | VisuallyJsSelection, evtPipe?: (b: Base, append: boolean) => any): any[];
|
|
135
|
+
/**
|
|
136
|
+
* Toggles the given object's membership in the current selection. `obj` may take many forms - a Group, Group Id, Node, Node Id, or Edge, or a list of these, or a Path. If `obj` is a Path, then the individual members of the Path are toggled independently.
|
|
137
|
+
* @param obj Object(s) to add.
|
|
138
|
+
*/
|
|
139
|
+
toggle(obj: string | Array<string> | Base | Array<Base> | Path | VisuallyJsSelection, evtPipe?: (b: Base, append: boolean) => any): any[];
|
|
140
|
+
/**
|
|
141
|
+
* Sets the maximum number of nodes the selection can hold. The action taken when appending a node that would take the selection above its limit depends on the current `capacityPolicy`, which can be either Selection.DISCARD_EXISTING (the default) or Selection.DISCARD_NEW.
|
|
142
|
+
* @param _maxNodes
|
|
143
|
+
*/
|
|
144
|
+
setMaxNodes(_maxNodes: number): void;
|
|
145
|
+
/**
|
|
146
|
+
* Sets the maximum number of groups the selection can hold. The action taken when appending a group that would take the selection above its limit depends on the current `capacityPolicy`, which can be either Selection.DISCARD_EXISTING (the default) or Selection.DISCARD_NEW.
|
|
147
|
+
* @param _maxGroups
|
|
148
|
+
*/
|
|
149
|
+
setMaxGroups(_maxGroups: number): void;
|
|
150
|
+
/**
|
|
151
|
+
* Sets the maximum number of edges the selection can hold. The action taken when appending an edge that would take the selection above its limit depends on the current `capacityPolicy`, which can be either Selection.DISCARD_EXISTING (the default) or Selection.DISCARD_NEW.
|
|
152
|
+
* @param _maxEdges
|
|
153
|
+
*/
|
|
154
|
+
setMaxEdges(_maxEdges: number): void;
|
|
155
|
+
/**
|
|
156
|
+
* Sets the action taken when appending an edge or node that would take the selection above its limit for that given type. One of `Selection.DISCARD_EXISTING` (which removes the 0th entry from the list before insertion of the new value) or `Selection.DISCARD_NEW`.
|
|
157
|
+
* @param policy One of `Selection.DISCARD_EXISTING` (which removes the 0th entry from the list before insertion of the new value) or `Selection.DISCARD_NEW`.
|
|
158
|
+
*/
|
|
159
|
+
setCapacityPolicy(policy: string): void;
|
|
160
|
+
private _clearEdges;
|
|
161
|
+
private _clearNodes;
|
|
162
|
+
private _clearGroups;
|
|
163
|
+
private _clearVertices;
|
|
164
|
+
private _clearAll;
|
|
165
|
+
/**
|
|
166
|
+
* Clears the selection. Does not fire individual deselect events.
|
|
167
|
+
* @param doNotFireEvent
|
|
168
|
+
*/
|
|
169
|
+
clear(doNotFireEvent?: boolean): void;
|
|
170
|
+
private _filterEdgeList;
|
|
171
|
+
/**
|
|
172
|
+
* Reloads the content of this Selection, if a `generator` was supplied to the constructor. Otherwise does nothing. A data load start event is fired first, followed by a call to the generator to repopulate, and then a data load end event is fired. So calling this method on a Selection that you are rendering to a UI will cause the UI to repaint itself.
|
|
173
|
+
*/
|
|
174
|
+
reload(): void;
|
|
175
|
+
/**
|
|
176
|
+
* Iterates the objects of the given type in the selection, calling the supplied callback for each item. The callback's signature should be `function(index, item)`. If you don't supply `type`, the default of "Node" will be used.
|
|
177
|
+
* @param fn Function to call with each item.
|
|
178
|
+
* @param type Type of object to iterate. Defaults to Node.objectType.
|
|
179
|
+
* @internal
|
|
180
|
+
*/
|
|
181
|
+
private _each;
|
|
182
|
+
/**
|
|
183
|
+
* Iterates the Nodes in the selection, calling the supplied callback for each item. The callback's signature should be `function(index, item)`.
|
|
184
|
+
* @param fn Function to call with each item.
|
|
185
|
+
*/
|
|
186
|
+
eachNode(fn: (idx: number, n: Node) => any): void;
|
|
187
|
+
/**
|
|
188
|
+
* Iterates the Groups in the selection, calling the supplied callback for each item. The callback's signature should be `function(index, item)`.
|
|
189
|
+
* @param fn Function to call with each item.
|
|
190
|
+
*/
|
|
191
|
+
eachGroup(fn: (idx: number, g: Group) => any): void;
|
|
192
|
+
/**
|
|
193
|
+
* Iterates the Nodes and the Groups in the selection, calling the supplied callback for each item. The callback's signature should be `function(index, item)`.
|
|
194
|
+
* @param fn Function to call with each item.
|
|
195
|
+
*/
|
|
196
|
+
eachVertex(fn: (idx: number, v: Vertex) => any): void;
|
|
197
|
+
/**
|
|
198
|
+
* Iterates the Edges in the selection, calling the supplied callback for each item. The callback's signature should be `function(index, item)`.
|
|
199
|
+
* @param fn Function to call with each item.
|
|
200
|
+
*/
|
|
201
|
+
eachEdge(fn: (idx: number, e: Edge) => any): void;
|
|
202
|
+
/**
|
|
203
|
+
* Get the current number of Nodes in the selection.
|
|
204
|
+
*/
|
|
205
|
+
getNodeCount(): number;
|
|
206
|
+
/**
|
|
207
|
+
* Gets the node at the given index.
|
|
208
|
+
* @param idx Index of the Node to retrieve. Will return null if index out of range.
|
|
209
|
+
* @returns A Node, or null.
|
|
210
|
+
*/
|
|
211
|
+
getNodeAt(idx: number): Node;
|
|
212
|
+
/**
|
|
213
|
+
* Gets all the Nodes in the Selection.
|
|
214
|
+
*/
|
|
215
|
+
getNodes(): Array<Node>;
|
|
216
|
+
/**
|
|
217
|
+
* Gets the Node with the given ID, if it is in the current selection
|
|
218
|
+
* @param id ID of the Node to retrieve
|
|
219
|
+
*/
|
|
220
|
+
getNode(id: string): Node;
|
|
221
|
+
/**
|
|
222
|
+
* Gets the Group at the given index. Will return null if index out of range.
|
|
223
|
+
* @param idx Index of the Group to retrieve. Will return null if index out of range.
|
|
224
|
+
* @returns A Group, or null.
|
|
225
|
+
*/
|
|
226
|
+
getGroupAt(idx: number): Group;
|
|
227
|
+
/**
|
|
228
|
+
* Gets all the Groups in the Selection.
|
|
229
|
+
*/
|
|
230
|
+
getGroups(): Array<Group>;
|
|
231
|
+
/**
|
|
232
|
+
* Gets the Group with the given ID, if it is in the selection.
|
|
233
|
+
* @param id ID of the Group to retrieve
|
|
234
|
+
*/
|
|
235
|
+
getGroup(id: string): Group;
|
|
236
|
+
/**
|
|
237
|
+
* Get the current number of Groups in the selection.
|
|
238
|
+
*/
|
|
239
|
+
getGroupCount(): number;
|
|
240
|
+
/**
|
|
241
|
+
* Gets all the nodes, edges and groups.
|
|
242
|
+
*/
|
|
243
|
+
getAll(): Array<Node | Group | Edge>;
|
|
244
|
+
/**
|
|
245
|
+
* Gets all Edges for the given Node or Group.
|
|
246
|
+
* @param node The Node to get Edges for.
|
|
247
|
+
* @param filter Optional filter for edges.
|
|
248
|
+
* @returns An array of Edges, which may be empty. Never null.
|
|
249
|
+
*/
|
|
250
|
+
getAllEdgesFor(node: Vertex, filter?: (e: Edge) => boolean): Array<Edge>;
|
|
251
|
+
/**
|
|
252
|
+
* Gets all source Edges for the given Node or Group.
|
|
253
|
+
* @param v The Node/Group to get source Edges for.
|
|
254
|
+
* @returns An array of Edges, which may be empty. Never null.
|
|
255
|
+
*/
|
|
256
|
+
getSourceEdgesFor(v: Node | Group): Array<Edge>;
|
|
257
|
+
/**
|
|
258
|
+
* Get the current number of Edges in the selection.
|
|
259
|
+
*/
|
|
260
|
+
getEdgeCount(): number;
|
|
261
|
+
getAllEdges(): Array<Edge>;
|
|
262
|
+
/**
|
|
263
|
+
* Gets the Edge at the given index.
|
|
264
|
+
* @param idx Index of the Edge to retrieve.
|
|
265
|
+
* @returns Edge at the given index, null if nothing found at that index.
|
|
266
|
+
*/
|
|
267
|
+
getEdgeAt(idx: number): Edge;
|
|
268
|
+
/**
|
|
269
|
+
* Gets all the edges in the selection
|
|
270
|
+
* @returns All the edges in the selection, perhaps an empty list. Never null.
|
|
271
|
+
*/
|
|
272
|
+
getEdges(): Array<Edge>;
|
|
273
|
+
/**
|
|
274
|
+
* @internal
|
|
275
|
+
* @param groupData
|
|
276
|
+
*/
|
|
277
|
+
getGroupType(groupData: Record<string, any>): string;
|
|
278
|
+
/**
|
|
279
|
+
* @internal
|
|
280
|
+
* @param nodeData
|
|
281
|
+
*/
|
|
282
|
+
getNodeType(nodeData: Record<string, any>): string;
|
|
283
|
+
/**
|
|
284
|
+
* @internal
|
|
285
|
+
*/
|
|
286
|
+
getModel(): DataModel;
|
|
287
|
+
/**
|
|
288
|
+
* @internal
|
|
289
|
+
*/
|
|
290
|
+
getGraph(): Graph;
|
|
291
|
+
/**
|
|
292
|
+
* @internal
|
|
293
|
+
* @param node
|
|
294
|
+
*/
|
|
295
|
+
getNodeId(node: Record<string, any>): string;
|
|
296
|
+
/**
|
|
297
|
+
* @internal
|
|
298
|
+
* @param group
|
|
299
|
+
*/
|
|
300
|
+
getGroupId(group: Record<string, any>): string;
|
|
301
|
+
/**
|
|
302
|
+
* @internal
|
|
303
|
+
* @param port
|
|
304
|
+
*/
|
|
305
|
+
getPortType(port: Record<string, any>): string;
|
|
306
|
+
/**
|
|
307
|
+
* @internal
|
|
308
|
+
* @param node
|
|
309
|
+
* @param data
|
|
310
|
+
*/
|
|
311
|
+
addPort(node: string | Node, data: Record<string, any>): Port;
|
|
312
|
+
/**
|
|
313
|
+
* @internal
|
|
314
|
+
* @param port
|
|
315
|
+
*/
|
|
316
|
+
getPortId(port: Record<string, any>): string;
|
|
317
|
+
/**
|
|
318
|
+
* @internal
|
|
319
|
+
* @param edgeId
|
|
320
|
+
*/
|
|
321
|
+
getEdge(edgeId: string): Edge;
|
|
322
|
+
/**
|
|
323
|
+
* @internal
|
|
324
|
+
* @param edgeData
|
|
325
|
+
*/
|
|
326
|
+
getEdgeType(edgeData: Record<string, any>): string;
|
|
327
|
+
/**
|
|
328
|
+
* Returns the vertex with the given id, if it is in the selection.
|
|
329
|
+
* @param id
|
|
330
|
+
* @internal
|
|
331
|
+
*/
|
|
332
|
+
getVertex(id: string): Vertex;
|
|
333
|
+
/**
|
|
334
|
+
* Returns whether or not the vertex (node/group) with the given id is in the selection.
|
|
335
|
+
* @param id
|
|
336
|
+
*/
|
|
337
|
+
containsVertex(id: string): boolean;
|
|
338
|
+
/**
|
|
339
|
+
* @internal
|
|
340
|
+
* @param obj
|
|
341
|
+
*/
|
|
342
|
+
getObjectInfo<T>(obj: any): ObjectInfo<T>;
|
|
343
|
+
/**
|
|
344
|
+
* @internal
|
|
345
|
+
* @param source
|
|
346
|
+
* @param target
|
|
347
|
+
* @param data
|
|
348
|
+
* @param userInstigated
|
|
349
|
+
*/
|
|
350
|
+
beforeConnect(source: Vertex, target: Vertex, data?: Record<string, any>, userInstigated?: boolean): any;
|
|
351
|
+
/**
|
|
352
|
+
* @internal
|
|
353
|
+
* @param source
|
|
354
|
+
* @param target
|
|
355
|
+
* @param edge
|
|
356
|
+
*/
|
|
357
|
+
beforeMoveConnection(source: Vertex, target: Vertex, edge: Edge): any;
|
|
358
|
+
/**
|
|
359
|
+
* @internal
|
|
360
|
+
* @param source
|
|
361
|
+
* @param type
|
|
362
|
+
*/
|
|
363
|
+
beforeStartConnect(source: Vertex, type: string): any;
|
|
364
|
+
/**
|
|
365
|
+
* @internal
|
|
366
|
+
* @param source
|
|
367
|
+
* @param target
|
|
368
|
+
* @param edge
|
|
369
|
+
*/
|
|
370
|
+
beforeDetach(source: Vertex, target: Vertex, edge: Edge): any;
|
|
371
|
+
/**
|
|
372
|
+
* @internal
|
|
373
|
+
* @param source
|
|
374
|
+
* @param edge
|
|
375
|
+
*/
|
|
376
|
+
beforeStartDetach(source: Vertex, edge: Edge): any;
|
|
377
|
+
/**
|
|
378
|
+
* @internal
|
|
379
|
+
*/
|
|
380
|
+
get debugEnabled(): boolean;
|
|
381
|
+
private _createSelection;
|
|
382
|
+
/**
|
|
383
|
+
* Filter the selection and return a new selection with the filtered contents.
|
|
384
|
+
* @param spec
|
|
385
|
+
* @param includePartials
|
|
386
|
+
*/
|
|
387
|
+
filter(spec: any, includePartials?: boolean): VisuallyJsSelection;
|
|
388
|
+
getAncestors(vertex: Node | Group): Array<Group>;
|
|
389
|
+
getDescendants(vertex: Group): Array<Node | Group>;
|
|
390
|
+
getType(obj: Base): string;
|
|
391
|
+
isAncestor(focus: Node | Group, possibleAncestor: Group): boolean;
|
|
392
|
+
isDescendantGroup(possibleDescendant: Group, ancestor: Group): boolean;
|
|
393
|
+
resolveFullId(b: Base): string;
|
|
394
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Recado } from "./core";
|
|
2
|
+
import { Binding, CompiledBinding } from "./parser";
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare abstract class AbstractEntry {
|
|
7
|
+
instance: Recado;
|
|
8
|
+
abstract type: string;
|
|
9
|
+
tag: string;
|
|
10
|
+
remove: boolean;
|
|
11
|
+
uuid: string;
|
|
12
|
+
children: Array<AbstractEntry>;
|
|
13
|
+
elements: Array<any>;
|
|
14
|
+
bindings: Record<string, Binding>;
|
|
15
|
+
context: string;
|
|
16
|
+
compiledBindings: Record<string, CompiledBinding>;
|
|
17
|
+
protected constructor(instance: Recado);
|
|
18
|
+
protected _processBindings(bindings: Record<string, Binding>): void;
|
|
19
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { AbstractEntry } from './abstract-entry';
|
|
2
|
+
import { Recado } from "./core";
|
|
3
|
+
/**
|
|
4
|
+
* @internal
|
|
5
|
+
*/
|
|
6
|
+
export declare class CommentEntry extends AbstractEntry {
|
|
7
|
+
static type: string;
|
|
8
|
+
type: string;
|
|
9
|
+
comment: string;
|
|
10
|
+
constructor(comment: string, instance: Recado);
|
|
11
|
+
}
|
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import { CommentFacade, ElementFacade, FragmentFacade, RecadoOptions, RecadoValueFormatter, TextNodeFacade } from "./defs";
|
|
2
|
+
import { TemplateResolver } from "./defs";
|
|
3
|
+
import { CompiledBinding } from "./parser";
|
|
4
|
+
import { AbstractEntry } from './abstract-entry';
|
|
5
|
+
import { CustomTag, CustomTagOptions } from "./custom-tag";
|
|
6
|
+
import { IRootExecution, UpdateResult } from "./executions";
|
|
7
|
+
/**
|
|
8
|
+
* @internal
|
|
9
|
+
*/
|
|
10
|
+
export interface BindingResult {
|
|
11
|
+
id: string;
|
|
12
|
+
binding: CompiledBinding;
|
|
13
|
+
results: Array<{
|
|
14
|
+
source: string;
|
|
15
|
+
result: any;
|
|
16
|
+
}>;
|
|
17
|
+
originalValue: any;
|
|
18
|
+
type: "attribute" | "text";
|
|
19
|
+
once?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @internal
|
|
23
|
+
*/
|
|
24
|
+
export declare abstract class Recado {
|
|
25
|
+
templateResolver: TemplateResolver;
|
|
26
|
+
defaultTemplate: string;
|
|
27
|
+
defaultNamespace: string;
|
|
28
|
+
macros: Record<string, (d: Record<string, any>, context: Record<string, any>, ...args: Array<string>) => string>;
|
|
29
|
+
entries: Record<string, AbstractEntry>;
|
|
30
|
+
customTags: Record<string, CustomTag>;
|
|
31
|
+
formatter: RecadoValueFormatter;
|
|
32
|
+
private _cache;
|
|
33
|
+
private _templateCache;
|
|
34
|
+
openRe: RegExp;
|
|
35
|
+
closeRe: RegExp;
|
|
36
|
+
openCloseRe: RegExp;
|
|
37
|
+
tokenizerRe: RegExp;
|
|
38
|
+
commentRe: RegExp;
|
|
39
|
+
attributesRe: RegExp;
|
|
40
|
+
private readonly _templates;
|
|
41
|
+
abstract _getDefaultTemplateResolver(): TemplateResolver;
|
|
42
|
+
constructor(options: RecadoOptions);
|
|
43
|
+
/**
|
|
44
|
+
* Lookup a template by ID.
|
|
45
|
+
* @param id
|
|
46
|
+
* @internal
|
|
47
|
+
*/
|
|
48
|
+
resolveTemplate(id: string): string;
|
|
49
|
+
setAttribute(el: any, a: string, v: string): void;
|
|
50
|
+
clearCache(): void;
|
|
51
|
+
namespaceHandlers: Record<string, (tag: string) => ElementFacade>;
|
|
52
|
+
namespaces: Record<string, string>;
|
|
53
|
+
/**
|
|
54
|
+
* Create a Fragment for the current environment
|
|
55
|
+
*/
|
|
56
|
+
abstract cf(): FragmentFacade;
|
|
57
|
+
/**
|
|
58
|
+
* Create a text node for the current environment
|
|
59
|
+
* @param value
|
|
60
|
+
*/
|
|
61
|
+
abstract ctn(value: string): TextNodeFacade;
|
|
62
|
+
/**
|
|
63
|
+
* Create an element for the current environment
|
|
64
|
+
* @param tag
|
|
65
|
+
*/
|
|
66
|
+
abstract ce(tag: string): ElementFacade;
|
|
67
|
+
/**
|
|
68
|
+
* Create a comment element. Used as placeholders for loop/control structures.
|
|
69
|
+
* @param content
|
|
70
|
+
*/
|
|
71
|
+
abstract cc(content: string): CommentFacade;
|
|
72
|
+
abstract removeElement(e: ElementFacade): void;
|
|
73
|
+
abstract removeTextNode(e: TextNodeFacade): void;
|
|
74
|
+
parseAttributes(el: string): string[];
|
|
75
|
+
/**
|
|
76
|
+
* @internal
|
|
77
|
+
* @param resolver
|
|
78
|
+
* @param forceReload
|
|
79
|
+
*/
|
|
80
|
+
_wrapCache(resolver: TemplateResolver, forceReload?: boolean): TemplateResolver;
|
|
81
|
+
getTemplate(id: string): Array<AbstractEntry>;
|
|
82
|
+
/**
|
|
83
|
+
* Add a template. The template is not parsed until such time as someone asks for it.
|
|
84
|
+
* @param id
|
|
85
|
+
* @param content
|
|
86
|
+
* @internal
|
|
87
|
+
*/
|
|
88
|
+
addTemplate(id: string, content: string): void;
|
|
89
|
+
template(id: string, data: Record<string, any>, templateResolver?: TemplateResolver, forceReload?: boolean, context?: Record<string, any>): FragmentFacade;
|
|
90
|
+
mounted(fragment: FragmentFacade): void;
|
|
91
|
+
/**
|
|
92
|
+
* Resolve, parse and then cache the template with the given id. If the template has already been resolved and parsed,
|
|
93
|
+
* return the parsed value, unless `forceReload` is set to true.
|
|
94
|
+
* @param templateId
|
|
95
|
+
* @param templateResolver
|
|
96
|
+
* @param forceReload
|
|
97
|
+
*/
|
|
98
|
+
parseAndCache(templateId: string, templateResolver?: TemplateResolver, forceReload?: boolean): Array<AbstractEntry>;
|
|
99
|
+
/**
|
|
100
|
+
* Get, or set, a value from/to an object.
|
|
101
|
+
* @param inObj Object to operate on
|
|
102
|
+
* @param path Path to the value to get/set
|
|
103
|
+
* @param value If null, this method gets a value. Otherwise, this method sets a value.
|
|
104
|
+
*/
|
|
105
|
+
data(inObj: Record<string, any>, path: string, value?: any): any;
|
|
106
|
+
each(l: any, fn: Function, loopUuid: string, ctx: string, key: string): void;
|
|
107
|
+
lookupValueInDataOrContext(templateData: Record<string, any>, context: Record<string, any>, key: string): any;
|
|
108
|
+
update<T>(el: any, templateData: Record<string, any>, context?: Record<string, any>): UpdateResult<T>;
|
|
109
|
+
onUpdate(el: any, fn: Function): void;
|
|
110
|
+
private _updateExecution;
|
|
111
|
+
/**
|
|
112
|
+
* Removes the given element from this Recado instance, and optionally removes it from the DOM too.
|
|
113
|
+
* @param el Element to remove.
|
|
114
|
+
* @param removeFromDOM Whether or not to also remove from the DOM.
|
|
115
|
+
* @internal
|
|
116
|
+
*/
|
|
117
|
+
remove(el: any, removeFromDOM?: boolean): void;
|
|
118
|
+
/**
|
|
119
|
+
* Register a custom tag.
|
|
120
|
+
* @param tagName
|
|
121
|
+
* @param handlers
|
|
122
|
+
*
|
|
123
|
+
*/
|
|
124
|
+
registerTag(tagName: string, handlers: CustomTagOptions): void;
|
|
125
|
+
/**
|
|
126
|
+
* Parse the given template into an AST.
|
|
127
|
+
* @param str
|
|
128
|
+
* @param templateResolver
|
|
129
|
+
* @param extraProperties
|
|
130
|
+
* @param parseIdStack
|
|
131
|
+
* @internal
|
|
132
|
+
*/
|
|
133
|
+
parse(str: string, templateResolver?: TemplateResolver, extraProperties?: any, parseIdStack?: Array<string>): Array<AbstractEntry>;
|
|
134
|
+
/**
|
|
135
|
+
* Run the given macro, if found.
|
|
136
|
+
* @param expansionId
|
|
137
|
+
* @param data
|
|
138
|
+
* @param context
|
|
139
|
+
* @internal
|
|
140
|
+
*/
|
|
141
|
+
_expand(expansionId: string, data: Record<string, any>, context: Record<string, any>): string;
|
|
142
|
+
/**
|
|
143
|
+
* Render the given AST using the given data.
|
|
144
|
+
* @param p
|
|
145
|
+
* @param templateData
|
|
146
|
+
* @param templateResolver
|
|
147
|
+
*/
|
|
148
|
+
render(p: Array<AbstractEntry>, templateData?: Record<string, any>, templateResolver?: TemplateResolver, context?: Record<string, any>, defaultNamespace?: string): IRootExecution;
|
|
149
|
+
}
|
|
150
|
+
/**
|
|
151
|
+
* Formats a number according to a specifier string.
|
|
152
|
+
* d integer, locale separator
|
|
153
|
+
* ,d integer, comma separator
|
|
154
|
+
* 'd integer, space separator
|
|
155
|
+
* f float, any number of decimals, locale separator
|
|
156
|
+
* ,f float, any number of decimals, comma separator
|
|
157
|
+
* 'f float, any number of decimals, space separator
|
|
158
|
+
* .3f float, 3 decimal places, locale separator
|
|
159
|
+
* ,.3f float, 3 decimal places, comma separator
|
|
160
|
+
* '.3f float, 3 decimal places, space separator
|
|
161
|
+
*/
|
|
162
|
+
export declare function lightweightPrintfFormatter(value: number | string, format: string): string;
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import { Recado } from "./core";
|
|
2
|
+
import { AbstractEntry } from './abstract-entry';
|
|
3
|
+
import { ElementFacade } from "./defs";
|
|
4
|
+
import { ObjectData } from "../model/graph";
|
|
5
|
+
/** @internal */
|
|
6
|
+
export type MountFunction = (el: ElementFacade, data: any, instance: Recado, parent: ElementFacade, context?: Record<string, any>) => void;
|
|
7
|
+
/**
|
|
8
|
+
* Options for a custom tag
|
|
9
|
+
* @group Components
|
|
10
|
+
* @category Templating
|
|
11
|
+
*/
|
|
12
|
+
export interface CustomTagOptions {
|
|
13
|
+
/**
|
|
14
|
+
* Template to use to render the tag
|
|
15
|
+
*/
|
|
16
|
+
template: string;
|
|
17
|
+
/**
|
|
18
|
+
* Callback invoked when the tag has first been rendered.
|
|
19
|
+
* @param el
|
|
20
|
+
* @param data
|
|
21
|
+
* @param instance
|
|
22
|
+
* @param parent
|
|
23
|
+
* @param context
|
|
24
|
+
*/
|
|
25
|
+
rendered?: (el: any, data: any, instance: Recado, parent: ElementFacade, context?: Record<string, any>) => void;
|
|
26
|
+
/**
|
|
27
|
+
* Callback invoked after the tag has been re-rendered during an update.
|
|
28
|
+
* @param el
|
|
29
|
+
* @param data
|
|
30
|
+
* @param instance
|
|
31
|
+
*/
|
|
32
|
+
updated?: (el: any, data: any, instance: Recado) => void;
|
|
33
|
+
/**
|
|
34
|
+
* Callback invoked when the element this tag produced has been mounted. In the DOM this means that it is now in the Document, but this class does not know directly of the existence of the DOM.
|
|
35
|
+
* @param el
|
|
36
|
+
* @param data
|
|
37
|
+
* @param instance
|
|
38
|
+
* @param parent
|
|
39
|
+
* @param context
|
|
40
|
+
*/
|
|
41
|
+
mounted?: (el: any, data: any, instance: Recado, parent: ElementFacade, context?: Record<string, any>) => void;
|
|
42
|
+
fragments?: Record<string, Record<string, string>>;
|
|
43
|
+
defaultableFragmentKeys?: Array<string>;
|
|
44
|
+
/**
|
|
45
|
+
* Optional data decorator which will be invoked prior to a render and which can return additional data to use to render. The return value should be extra data: you should not manipulate the contents of the incoming `data` member. VisuallyJs will merge any data you return from this method into the current data prior to rendering.
|
|
46
|
+
* @param data Data to use to decorate.
|
|
47
|
+
*/
|
|
48
|
+
decorator?: (data: ObjectData, context?: Record<string, any>) => ObjectData | null;
|
|
49
|
+
defaultNamespace?: string;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* @internal
|
|
53
|
+
*/
|
|
54
|
+
export declare class CustomTag {
|
|
55
|
+
instance: Recado;
|
|
56
|
+
tagName: string;
|
|
57
|
+
options: CustomTagOptions;
|
|
58
|
+
id: string;
|
|
59
|
+
template: string;
|
|
60
|
+
rendered: (el: ElementFacade, data: any, instance: Recado, parent: ElementFacade, context?: Record<string, any>) => void;
|
|
61
|
+
updated: (el: ElementFacade, data: any, instance: Recado) => void;
|
|
62
|
+
fragments: Record<string, Record<string, Array<AbstractEntry>>>;
|
|
63
|
+
mounted: (el: any, data: any, instance: Recado, parent: ElementFacade, context?: Record<string, any>) => void;
|
|
64
|
+
defaultableFragmentKeys: Array<string>;
|
|
65
|
+
private fragmentKeys;
|
|
66
|
+
private parsedTemplates;
|
|
67
|
+
defaultNamespace: string;
|
|
68
|
+
decorator: (data: ObjectData, context?: Record<string, any>) => ObjectData | null;
|
|
69
|
+
constructor(instance: Recado, tagName: string, options: CustomTagOptions);
|
|
70
|
+
private _parseDefault;
|
|
71
|
+
private extractTemplateData;
|
|
72
|
+
getAST(templateData: Record<string, any>): AbstractEntry[];
|
|
73
|
+
private _replaceAST;
|
|
74
|
+
}
|