@moxa/graph 2.9.0 → 3.0.0-beta.2
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 +605 -121
- package/behaviors/brush-select/index.d.ts +10 -0
- package/behaviors/brush-select/index.d.ts.map +1 -0
- package/behaviors/brush-select/models/index.d.ts +2 -0
- package/behaviors/brush-select/models/index.d.ts.map +1 -0
- package/{lib/behavior/click-select.d.ts → behaviors/click-select/index.d.ts} +9 -9
- package/behaviors/click-select/index.d.ts.map +1 -0
- package/behaviors/click-select/models/index.d.ts +2 -0
- package/behaviors/click-select/models/index.d.ts.map +1 -0
- package/behaviors/collapse-expand/index.d.ts +4 -0
- package/behaviors/collapse-expand/index.d.ts.map +1 -0
- package/behaviors/collapse-expand/models/index.d.ts +2 -0
- package/behaviors/collapse-expand/models/index.d.ts.map +1 -0
- package/{lib/behavior/create-edge.d.ts → behaviors/create-edge/index.d.ts} +11 -11
- package/behaviors/create-edge/index.d.ts.map +1 -0
- package/behaviors/create-edge/models/index.d.ts +2 -0
- package/behaviors/create-edge/models/index.d.ts.map +1 -0
- package/behaviors/drag-canvas/index.d.ts +7 -0
- package/behaviors/drag-canvas/index.d.ts.map +1 -0
- package/behaviors/drag-canvas/models/index.d.ts +2 -0
- package/behaviors/drag-canvas/models/index.d.ts.map +1 -0
- package/behaviors/drag-element/index.d.ts +6 -0
- package/behaviors/drag-element/index.d.ts.map +1 -0
- package/behaviors/drag-element/models/index.d.ts +2 -0
- package/behaviors/drag-element/models/index.d.ts.map +1 -0
- package/behaviors/fix-element-size/index.d.ts +90 -0
- package/behaviors/fix-element-size/index.d.ts.map +1 -0
- package/behaviors/fix-element-size/models/index.d.ts +2 -0
- package/behaviors/fix-element-size/models/index.d.ts.map +1 -0
- package/behaviors/focus-element/index.d.ts +4 -0
- package/behaviors/focus-element/index.d.ts.map +1 -0
- package/behaviors/focus-element/models/index.d.ts +2 -0
- package/behaviors/focus-element/models/index.d.ts.map +1 -0
- package/behaviors/hover-activate/index.d.ts +4 -0
- package/behaviors/hover-activate/index.d.ts.map +1 -0
- package/behaviors/hover-activate/models/index.d.ts +2 -0
- package/behaviors/hover-activate/models/index.d.ts.map +1 -0
- package/behaviors/scroll-canvas/index.d.ts +4 -0
- package/behaviors/scroll-canvas/index.d.ts.map +1 -0
- package/behaviors/scroll-canvas/models/index.d.ts +2 -0
- package/behaviors/scroll-canvas/models/index.d.ts.map +1 -0
- package/behaviors/select-all/index.d.ts +14 -0
- package/behaviors/select-all/index.d.ts.map +1 -0
- package/behaviors/select-all/models/index.d.ts +2 -0
- package/behaviors/select-all/models/index.d.ts.map +1 -0
- package/behaviors/zoom-canvas/index.d.ts +4 -0
- package/behaviors/zoom-canvas/index.d.ts.map +1 -0
- package/behaviors/zoom-canvas/models/index.d.ts +2 -0
- package/behaviors/zoom-canvas/models/index.d.ts.map +1 -0
- package/components/edge-arrow/index.d.ts +18 -0
- package/components/edge-arrow/index.d.ts.map +1 -0
- package/components/edge-arrow/models/index.d.ts +3 -0
- package/components/edge-arrow/models/index.d.ts.map +1 -0
- package/components/edge-arrow/transforms/index.d.ts +5 -0
- package/components/edge-arrow/transforms/index.d.ts.map +1 -0
- package/components/edge-arrow/utils/index.d.ts +6 -0
- package/components/edge-arrow/utils/index.d.ts.map +1 -0
- package/components/edge-arrow/utils/label-arrow.d.ts +5 -0
- package/components/edge-arrow/utils/label-arrow.d.ts.map +1 -0
- package/components/edge-arrow/utils/middle-arrow.d.ts +5 -0
- package/components/edge-arrow/utils/middle-arrow.d.ts.map +1 -0
- package/components/edge-arrow/utils/offset.d.ts +3 -0
- package/components/edge-arrow/utils/offset.d.ts.map +1 -0
- package/components/edge-arrow/utils/padding.d.ts +2 -0
- package/components/edge-arrow/utils/padding.d.ts.map +1 -0
- package/components/edge-arrow/utils/style.d.ts +4 -0
- package/components/edge-arrow/utils/style.d.ts.map +1 -0
- package/components/edge-label/index.d.ts +15 -0
- package/components/edge-label/index.d.ts.map +1 -0
- package/components/edge-label/utils/color.d.ts +4 -0
- package/components/edge-label/utils/color.d.ts.map +1 -0
- package/components/edge-label/utils/index.d.ts +3 -0
- package/components/edge-label/utils/index.d.ts.map +1 -0
- package/components/edge-label/utils/style.d.ts +5 -0
- package/components/edge-label/utils/style.d.ts.map +1 -0
- package/components/edge-line/index.d.ts +13 -0
- package/components/edge-line/index.d.ts.map +1 -0
- package/components/edge-line/models/index.d.ts +2 -0
- package/components/edge-line/models/index.d.ts.map +1 -0
- package/components/edge-polyline/index.d.ts +18 -0
- package/components/edge-polyline/index.d.ts.map +1 -0
- package/components/edge-polyline/models/index.d.ts +2 -0
- package/components/edge-polyline/models/index.d.ts.map +1 -0
- package/components/edge-quadratic/index.d.ts +13 -0
- package/components/edge-quadratic/index.d.ts.map +1 -0
- package/components/edge-quadratic/models/index.d.ts +2 -0
- package/components/edge-quadratic/models/index.d.ts.map +1 -0
- package/{lib/group/custom/device-group.d.ts → components/group-device/index.d.ts} +6 -11
- package/components/group-device/index.d.ts.map +1 -0
- package/components/group-device/models/index.d.ts +17 -0
- package/components/group-device/models/index.d.ts.map +1 -0
- package/components/group-device/transforms/index.d.ts +4 -0
- package/components/group-device/transforms/index.d.ts.map +1 -0
- package/components/group-device/utils/index.d.ts +2 -0
- package/components/group-device/utils/index.d.ts.map +1 -0
- package/components/group-device/utils/style.d.ts +5 -0
- package/components/group-device/utils/style.d.ts.map +1 -0
- package/components/node-device/index.d.ts +18 -0
- package/components/node-device/index.d.ts.map +1 -0
- package/components/node-device/models/index.d.ts +21 -0
- package/components/node-device/models/index.d.ts.map +1 -0
- package/components/node-device/utils/index.d.ts +2 -0
- package/components/node-device/utils/index.d.ts.map +1 -0
- package/components/node-device/utils/style.d.ts +4 -0
- package/components/node-device/utils/style.d.ts.map +1 -0
- package/components/node-icon/index.d.ts +2 -0
- package/components/node-icon/index.d.ts.map +1 -0
- package/components/node-icon/utils/icon-image.d.ts +3 -0
- package/components/node-icon/utils/icon-image.d.ts.map +1 -0
- package/components/node-icon/utils/icon-style.d.ts +2 -0
- package/components/node-icon/utils/icon-style.d.ts.map +1 -0
- package/components/node-icon/utils/index.d.ts +3 -0
- package/components/node-icon/utils/index.d.ts.map +1 -0
- package/components/node-label/index.d.ts +44 -0
- package/components/node-label/index.d.ts.map +1 -0
- package/components/node-label/utils/index.d.ts +1 -0
- package/components/node-label/utils/index.d.ts.map +1 -0
- package/components/shared/index.d.ts +3 -0
- package/components/shared/index.d.ts.map +1 -0
- package/components/shared/transforms/edge-transform.d.ts +24 -0
- package/components/shared/transforms/edge-transform.d.ts.map +1 -0
- package/components/shared/transforms/group-transform.d.ts +20 -0
- package/components/shared/transforms/group-transform.d.ts.map +1 -0
- package/components/shared/transforms/index.d.ts +4 -0
- package/components/shared/transforms/index.d.ts.map +1 -0
- package/components/shared/transforms/node-transform.d.ts +16 -0
- package/components/shared/transforms/node-transform.d.ts.map +1 -0
- package/components/shared/utils/edge-utils/angle.d.ts +3 -0
- package/components/shared/utils/edge-utils/angle.d.ts.map +1 -0
- package/components/shared/utils/edge-utils/color.d.ts +5 -0
- package/components/shared/utils/edge-utils/color.d.ts.map +1 -0
- package/components/shared/utils/edge-utils/direction.d.ts +3 -0
- package/components/shared/utils/edge-utils/direction.d.ts.map +1 -0
- package/components/shared/utils/edge-utils/distance.d.ts +2 -0
- package/components/shared/utils/edge-utils/distance.d.ts.map +1 -0
- package/components/shared/utils/edge-utils/endpoint.d.ts +3 -0
- package/components/shared/utils/edge-utils/endpoint.d.ts.map +1 -0
- package/components/shared/utils/edge-utils/highlight.d.ts +3 -0
- package/components/shared/utils/edge-utils/highlight.d.ts.map +1 -0
- package/components/shared/utils/edge-utils/index.d.ts +11 -0
- package/components/shared/utils/edge-utils/index.d.ts.map +1 -0
- package/components/shared/utils/edge-utils/position.d.ts +9 -0
- package/components/shared/utils/edge-utils/position.d.ts.map +1 -0
- package/components/shared/utils/edge-utils/revert.d.ts +3 -0
- package/components/shared/utils/edge-utils/revert.d.ts.map +1 -0
- package/components/shared/utils/edge-utils/state.d.ts +3 -0
- package/components/shared/utils/edge-utils/state.d.ts.map +1 -0
- package/components/shared/utils/edge-utils/style.d.ts +3 -0
- package/components/shared/utils/edge-utils/style.d.ts.map +1 -0
- package/components/shared/utils/index.d.ts +8 -0
- package/components/shared/utils/index.d.ts.map +1 -0
- package/components/shared/utils/node-utils/config.d.ts +27 -0
- package/components/shared/utils/node-utils/config.d.ts.map +1 -0
- package/components/shared/utils/node-utils/icon-style.d.ts +5 -0
- package/components/shared/utils/node-utils/icon-style.d.ts.map +1 -0
- package/components/shared/utils/node-utils/index.d.ts +9 -0
- package/components/shared/utils/node-utils/index.d.ts.map +1 -0
- package/components/shared/utils/node-utils/label-background.d.ts +3 -0
- package/components/shared/utils/node-utils/label-background.d.ts.map +1 -0
- package/components/shared/utils/node-utils/offset.d.ts +14 -0
- package/components/shared/utils/node-utils/offset.d.ts.map +1 -0
- package/components/shared/utils/node-utils/status-style.d.ts +4 -0
- package/components/shared/utils/node-utils/status-style.d.ts.map +1 -0
- package/components/shared/utils/node-utils/text-style.d.ts +5 -0
- package/components/shared/utils/node-utils/text-style.d.ts.map +1 -0
- package/components/shared/utils/node-utils/theme.d.ts +5 -0
- package/components/shared/utils/node-utils/theme.d.ts.map +1 -0
- package/components/shared/utils/node-utils/title-background.d.ts +3 -0
- package/components/shared/utils/node-utils/title-background.d.ts.map +1 -0
- package/components/shared/utils/node-utils/title-style.d.ts +4 -0
- package/components/shared/utils/node-utils/title-style.d.ts.map +1 -0
- package/components/shared/utils/position-helpers.d.ts +50 -0
- package/components/shared/utils/position-helpers.d.ts.map +1 -0
- package/components/shared/utils/state-helpers.d.ts +84 -0
- package/components/shared/utils/state-helpers.d.ts.map +1 -0
- package/components/shared/utils/style-helpers.d.ts +67 -0
- package/components/shared/utils/style-helpers.d.ts.map +1 -0
- package/components/shared/utils/type-helpers.d.ts +95 -0
- package/components/shared/utils/type-helpers.d.ts.map +1 -0
- package/components/shared/utils/validation-helpers.d.ts +75 -0
- package/components/shared/utils/validation-helpers.d.ts.map +1 -0
- package/core/graph/config-manager.d.ts +51 -0
- package/core/graph/config-manager.d.ts.map +1 -0
- package/core/graph/data-manager.d.ts +45 -0
- package/core/graph/data-manager.d.ts.map +1 -0
- package/core/graph/graph-renderer.d.ts +31 -0
- package/core/graph/graph-renderer.d.ts.map +1 -0
- package/{lib → core}/graph/graph.d.ts +69 -63
- package/core/graph/graph.d.ts.map +1 -0
- package/core/graph/index.d.ts +5 -0
- package/core/graph/index.d.ts.map +1 -0
- package/{lib → core}/model/background.model.d.ts +1 -1
- package/core/model/background.model.d.ts.map +1 -0
- package/core/model/behavior.model.d.ts +72 -0
- package/core/model/behavior.model.d.ts.map +1 -0
- package/{lib → core}/model/edge.model.d.ts +24 -24
- package/core/model/edge.model.d.ts.map +1 -0
- package/core/model/element.model.d.ts +2 -0
- package/core/model/element.model.d.ts.map +1 -0
- package/core/model/event.model.d.ts +217 -0
- package/core/model/event.model.d.ts.map +1 -0
- package/core/model/extension.model.d.ts +15 -0
- package/core/model/extension.model.d.ts.map +1 -0
- package/core/model/graph.model.d.ts +34 -0
- package/core/model/graph.model.d.ts.map +1 -0
- package/core/model/group.model.d.ts +43 -0
- package/core/model/group.model.d.ts.map +1 -0
- package/core/model/icon.model.d.ts +11 -0
- package/core/model/icon.model.d.ts.map +1 -0
- package/core/model/image.model.d.ts +8 -0
- package/core/model/image.model.d.ts.map +1 -0
- package/{lib → core}/model/index.d.ts +3 -0
- package/core/model/index.d.ts.map +1 -0
- package/{lib → core}/model/label.model.d.ts +5 -3
- package/core/model/label.model.d.ts.map +1 -0
- package/core/model/layout.model.d.ts +35 -0
- package/core/model/layout.model.d.ts.map +1 -0
- package/core/model/node.model.d.ts +35 -0
- package/core/model/node.model.d.ts.map +1 -0
- package/core/model/plugin.model.d.ts +52 -0
- package/core/model/plugin.model.d.ts.map +1 -0
- package/core/model/shape.model.d.ts +8 -0
- package/core/model/shape.model.d.ts.map +1 -0
- package/core/model/state.model.d.ts +7 -0
- package/core/model/state.model.d.ts.map +1 -0
- package/core/model/text.model.d.ts +5 -0
- package/core/model/text.model.d.ts.map +1 -0
- package/{lib → core}/model/theme.model.d.ts +6 -6
- package/core/model/theme.model.d.ts.map +1 -0
- package/{lib → core}/model/viewport.model.d.ts +2 -2
- package/core/model/viewport.model.d.ts.map +1 -0
- package/core/utils/element.helper.d.ts +5 -0
- package/core/utils/element.helper.d.ts.map +1 -0
- package/core/utils/graph.helper.d.ts +5 -0
- package/core/utils/graph.helper.d.ts.map +1 -0
- package/core/utils/icon.helper.d.ts +5 -0
- package/core/utils/icon.helper.d.ts.map +1 -0
- package/{lib → core}/utils/index.d.ts +0 -1
- package/core/utils/index.d.ts.map +1 -0
- package/core/utils/platform.helper.d.ts.map +1 -0
- package/core/utils/rect.helper.d.ts.map +1 -0
- package/core/utils/state.helper.d.ts.map +1 -0
- package/core/utils/theme.helper.d.ts +4 -0
- package/core/utils/theme.helper.d.ts.map +1 -0
- package/core/utils/tree.helper.d.ts.map +1 -0
- package/index.cjs +114 -103
- package/index.d.ts +37 -9
- package/index.d.ts.map +1 -1
- package/index.js +45500 -36565
- package/layouts/align/helper/layout.helper.d.ts +4 -0
- package/layouts/align/helper/layout.helper.d.ts.map +1 -0
- package/layouts/align/index.d.ts +18 -0
- package/layouts/align/index.d.ts.map +1 -0
- package/layouts/align/models/index.d.ts +2 -0
- package/layouts/align/models/index.d.ts.map +1 -0
- package/layouts/force/helper/layout.helper.d.ts +4 -0
- package/layouts/force/helper/layout.helper.d.ts.map +1 -0
- package/layouts/force/index.d.ts +10 -0
- package/layouts/force/index.d.ts.map +1 -0
- package/layouts/force/models/index.d.ts +2 -0
- package/layouts/force/models/index.d.ts.map +1 -0
- package/layouts/grid/helper/layout.helper.d.ts +4 -0
- package/layouts/grid/helper/layout.helper.d.ts.map +1 -0
- package/layouts/grid/index.d.ts +17 -0
- package/layouts/grid/index.d.ts.map +1 -0
- package/layouts/grid/models/index.d.ts +2 -0
- package/layouts/grid/models/index.d.ts.map +1 -0
- package/layouts/ring/helper/layout.helper.d.ts +4 -0
- package/layouts/ring/helper/layout.helper.d.ts.map +1 -0
- package/layouts/ring/index.d.ts +10 -0
- package/layouts/ring/index.d.ts.map +1 -0
- package/layouts/ring/models/index.d.ts +2 -0
- package/layouts/ring/models/index.d.ts.map +1 -0
- package/layouts/tree/helper/layout.helper.d.ts +4 -0
- package/layouts/tree/helper/layout.helper.d.ts.map +1 -0
- package/layouts/tree/index.d.ts +12 -0
- package/layouts/tree/index.d.ts.map +1 -0
- package/layouts/tree/models/index.d.ts +2 -0
- package/layouts/tree/models/index.d.ts.map +1 -0
- package/package.json +2 -2
- package/plugins/context-menu/index.d.ts +16 -0
- package/plugins/context-menu/index.d.ts.map +1 -0
- package/plugins/context-menu/models/index.d.ts +2 -0
- package/plugins/context-menu/models/index.d.ts.map +1 -0
- package/{lib/plugin/element-toolbar.d.ts → plugins/element-toolbar/index.d.ts} +15 -14
- package/plugins/element-toolbar/index.d.ts.map +1 -0
- package/plugins/element-toolbar/models/index.d.ts +2 -0
- package/plugins/element-toolbar/models/index.d.ts.map +1 -0
- package/plugins/fixed-toolbar/index.d.ts +29 -0
- package/plugins/fixed-toolbar/index.d.ts.map +1 -0
- package/plugins/fixed-toolbar/models/index.d.ts +2 -0
- package/plugins/fixed-toolbar/models/index.d.ts.map +1 -0
- package/{lib/plugin/graph-background.d.ts → plugins/graph-background/index.d.ts} +9 -8
- package/plugins/graph-background/index.d.ts.map +1 -0
- package/plugins/graph-background/models/index.d.ts +2 -0
- package/plugins/graph-background/models/index.d.ts.map +1 -0
- package/plugins/history/index.d.ts +7 -0
- package/plugins/history/index.d.ts.map +1 -0
- package/plugins/history/models/index.d.ts +2 -0
- package/plugins/history/models/index.d.ts.map +1 -0
- package/plugins/minimap/index.d.ts +14 -0
- package/plugins/minimap/index.d.ts.map +1 -0
- package/plugins/minimap/models/index.d.ts +2 -0
- package/plugins/minimap/models/index.d.ts.map +1 -0
- package/plugins/snapline/index.d.ts +9 -0
- package/plugins/snapline/index.d.ts.map +1 -0
- package/plugins/snapline/models/index.d.ts +2 -0
- package/plugins/snapline/models/index.d.ts.map +1 -0
- package/plugins/tooltip/index.d.ts +11 -0
- package/plugins/tooltip/index.d.ts.map +1 -0
- package/plugins/tooltip/models/index.d.ts +2 -0
- package/plugins/tooltip/models/index.d.ts.map +1 -0
- package/shared/constants/index.d.ts +1 -0
- package/shared/constants/index.d.ts.map +1 -0
- package/shared/index.d.ts +2 -0
- package/shared/index.d.ts.map +1 -0
- package/shared/transforms/behavior-transform.d.ts +57 -0
- package/shared/transforms/behavior-transform.d.ts.map +1 -0
- package/shared/transforms/graph-transform.d.ts +16 -0
- package/shared/transforms/graph-transform.d.ts.map +1 -0
- package/shared/transforms/index.d.ts +7 -0
- package/shared/transforms/index.d.ts.map +1 -0
- package/shared/transforms/layout-transform.d.ts +55 -0
- package/shared/transforms/layout-transform.d.ts.map +1 -0
- package/shared/transforms/pipeline.d.ts +47 -0
- package/shared/transforms/pipeline.d.ts.map +1 -0
- package/shared/transforms/plugin-transform.d.ts +67 -0
- package/shared/transforms/plugin-transform.d.ts.map +1 -0
- package/shared/transforms/types.d.ts +61 -0
- package/shared/transforms/types.d.ts.map +1 -0
- package/shared/types/index.d.ts +1 -0
- package/shared/types/index.d.ts.map +1 -0
- package/shared/utils/components/code-viewer-box.component.d.ts +20 -0
- package/shared/utils/components/code-viewer-box.component.d.ts.map +1 -0
- package/shared/utils/components/index.d.ts +5 -0
- package/shared/utils/components/index.d.ts.map +1 -0
- package/shared/utils/components/json-viewer.component.d.ts +7 -0
- package/shared/utils/components/json-viewer.component.d.ts.map +1 -0
- package/shared/utils/components/story-wrapper.component.d.ts +3 -0
- package/shared/utils/components/story-wrapper.component.d.ts.map +1 -0
- package/shared/utils/components/switch-button.component.d.ts +8 -0
- package/shared/utils/components/switch-button.component.d.ts.map +1 -0
- package/shared/utils/device-node.d.ts +6 -0
- package/shared/utils/device-node.d.ts.map +1 -0
- package/shared/utils/edge-labels.d.ts +3 -0
- package/shared/utils/edge-labels.d.ts.map +1 -0
- package/shared/utils/five-nodes.d.ts +3 -0
- package/shared/utils/five-nodes.d.ts.map +1 -0
- package/shared/utils/index.d.ts +14 -0
- package/shared/utils/index.d.ts.map +1 -0
- package/shared/utils/moxa-graph.d.ts +3 -0
- package/shared/utils/moxa-graph.d.ts.map +1 -0
- package/shared/utils/node-edge-group.d.ts +3 -0
- package/shared/utils/node-edge-group.d.ts.map +1 -0
- package/shared/utils/utils/clean-object.d.ts +31 -0
- package/shared/utils/utils/clean-object.d.ts.map +1 -0
- package/shared/utils/utils/code-highlight.d.ts +2 -0
- package/shared/utils/utils/code-highlight.d.ts.map +1 -0
- package/shared/utils/utils/index.d.ts +4 -0
- package/shared/utils/utils/index.d.ts.map +1 -0
- package/shared/utils/utils/node-util.d.ts +13 -0
- package/shared/utils/utils/node-util.d.ts.map +1 -0
- package/lib/behavior/brush-select.d.ts +0 -10
- package/lib/behavior/brush-select.d.ts.map +0 -1
- package/lib/behavior/click-select.d.ts.map +0 -1
- package/lib/behavior/collapse-expand.d.ts +0 -4
- package/lib/behavior/collapse-expand.d.ts.map +0 -1
- package/lib/behavior/create-edge.d.ts.map +0 -1
- package/lib/behavior/drag-canvas.d.ts +0 -7
- package/lib/behavior/drag-canvas.d.ts.map +0 -1
- package/lib/behavior/drag-element.d.ts +0 -6
- package/lib/behavior/drag-element.d.ts.map +0 -1
- package/lib/behavior/fix-element-size.d.ts +0 -9
- package/lib/behavior/fix-element-size.d.ts.map +0 -1
- package/lib/behavior/focus-element.d.ts +0 -4
- package/lib/behavior/focus-element.d.ts.map +0 -1
- package/lib/behavior/helper/behavior.mapper.d.ts +0 -9
- package/lib/behavior/helper/behavior.mapper.d.ts.map +0 -1
- package/lib/behavior/helper/index.d.ts +0 -2
- package/lib/behavior/helper/index.d.ts.map +0 -1
- package/lib/behavior/hover-activate.d.ts +0 -4
- package/lib/behavior/hover-activate.d.ts.map +0 -1
- package/lib/behavior/index.d.ts +0 -13
- package/lib/behavior/index.d.ts.map +0 -1
- package/lib/behavior/scroll-canvas.d.ts +0 -4
- package/lib/behavior/scroll-canvas.d.ts.map +0 -1
- package/lib/behavior/select-all.d.ts +0 -14
- package/lib/behavior/select-all.d.ts.map +0 -1
- package/lib/behavior/zoom-canvas.d.ts +0 -4
- package/lib/behavior/zoom-canvas.d.ts.map +0 -1
- package/lib/edge/custom/index.d.ts +0 -4
- package/lib/edge/custom/index.d.ts.map +0 -1
- package/lib/edge/custom/line-edge.d.ts +0 -15
- package/lib/edge/custom/line-edge.d.ts.map +0 -1
- package/lib/edge/custom/polyline-edge.d.ts +0 -21
- package/lib/edge/custom/polyline-edge.d.ts.map +0 -1
- package/lib/edge/custom/quadratic-edge.d.ts +0 -15
- package/lib/edge/custom/quadratic-edge.d.ts.map +0 -1
- package/lib/edge/helper/custom-edge.helper.d.ts +0 -12
- package/lib/edge/helper/custom-edge.helper.d.ts.map +0 -1
- package/lib/edge/helper/edge-g6.mapper.d.ts +0 -19
- package/lib/edge/helper/edge-g6.mapper.d.ts.map +0 -1
- package/lib/edge/helper/edge.mapper.d.ts +0 -20
- package/lib/edge/helper/edge.mapper.d.ts.map +0 -1
- package/lib/edge/helper/edge.theme.d.ts +0 -10
- package/lib/edge/helper/edge.theme.d.ts.map +0 -1
- package/lib/edge/helper/index.d.ts +0 -5
- package/lib/edge/helper/index.d.ts.map +0 -1
- package/lib/edge/index.d.ts +0 -3
- package/lib/edge/index.d.ts.map +0 -1
- package/lib/graph/graph.d.ts.map +0 -1
- package/lib/graph/graph.mapper.d.ts +0 -15
- package/lib/graph/graph.mapper.d.ts.map +0 -1
- package/lib/graph/index.d.ts +0 -3
- package/lib/graph/index.d.ts.map +0 -1
- package/lib/group/custom/device-group.d.ts.map +0 -1
- package/lib/group/custom/index.d.ts +0 -2
- package/lib/group/custom/index.d.ts.map +0 -1
- package/lib/group/helper/group-g6.mapper.d.ts +0 -16
- package/lib/group/helper/group-g6.mapper.d.ts.map +0 -1
- package/lib/group/helper/group.mapper.d.ts +0 -21
- package/lib/group/helper/group.mapper.d.ts.map +0 -1
- package/lib/group/helper/index.d.ts +0 -3
- package/lib/group/helper/index.d.ts.map +0 -1
- package/lib/group/index.d.ts +0 -3
- package/lib/group/index.d.ts.map +0 -1
- package/lib/layout/align.d.ts +0 -18
- package/lib/layout/align.d.ts.map +0 -1
- package/lib/layout/force.d.ts +0 -10
- package/lib/layout/force.d.ts.map +0 -1
- package/lib/layout/grid.d.ts +0 -17
- package/lib/layout/grid.d.ts.map +0 -1
- package/lib/layout/helper/index.d.ts +0 -2
- package/lib/layout/helper/index.d.ts.map +0 -1
- package/lib/layout/helper/layout.helper.d.ts +0 -4
- package/lib/layout/helper/layout.helper.d.ts.map +0 -1
- package/lib/layout/helper/layout.mapper.d.ts +0 -6
- package/lib/layout/helper/layout.mapper.d.ts.map +0 -1
- package/lib/layout/index.d.ts +0 -7
- package/lib/layout/index.d.ts.map +0 -1
- package/lib/layout/ring.d.ts +0 -10
- package/lib/layout/ring.d.ts.map +0 -1
- package/lib/layout/tree.d.ts +0 -12
- package/lib/layout/tree.d.ts.map +0 -1
- package/lib/model/background.model.d.ts.map +0 -1
- package/lib/model/behavior.model.d.ts +0 -27
- package/lib/model/behavior.model.d.ts.map +0 -1
- package/lib/model/edge.model.d.ts.map +0 -1
- package/lib/model/element.model.d.ts +0 -2
- package/lib/model/element.model.d.ts.map +0 -1
- package/lib/model/event.model.d.ts +0 -216
- package/lib/model/event.model.d.ts.map +0 -1
- package/lib/model/extension.model.d.ts +0 -15
- package/lib/model/extension.model.d.ts.map +0 -1
- package/lib/model/graph.model.d.ts +0 -34
- package/lib/model/graph.model.d.ts.map +0 -1
- package/lib/model/group.model.d.ts +0 -43
- package/lib/model/group.model.d.ts.map +0 -1
- package/lib/model/icon.model.d.ts +0 -11
- package/lib/model/icon.model.d.ts.map +0 -1
- package/lib/model/image.model.d.ts +0 -8
- package/lib/model/image.model.d.ts.map +0 -1
- package/lib/model/index.d.ts.map +0 -1
- package/lib/model/label.model.d.ts.map +0 -1
- package/lib/model/layout.model.d.ts +0 -22
- package/lib/model/layout.model.d.ts.map +0 -1
- package/lib/model/node.model.d.ts +0 -35
- package/lib/model/node.model.d.ts.map +0 -1
- package/lib/model/plugin.model.d.ts +0 -19
- package/lib/model/plugin.model.d.ts.map +0 -1
- package/lib/model/shape.model.d.ts +0 -8
- package/lib/model/shape.model.d.ts.map +0 -1
- package/lib/model/state.model.d.ts +0 -6
- package/lib/model/state.model.d.ts.map +0 -1
- package/lib/model/theme.model.d.ts.map +0 -1
- package/lib/model/viewport.model.d.ts.map +0 -1
- package/lib/node/custom/device-node.d.ts +0 -36
- package/lib/node/custom/device-node.d.ts.map +0 -1
- package/lib/node/custom/index.d.ts +0 -2
- package/lib/node/custom/index.d.ts.map +0 -1
- package/lib/node/helper/icon-style.d.ts +0 -4
- package/lib/node/helper/icon-style.d.ts.map +0 -1
- package/lib/node/helper/index.d.ts +0 -5
- package/lib/node/helper/index.d.ts.map +0 -1
- package/lib/node/helper/key-style.d.ts +0 -5
- package/lib/node/helper/key-style.d.ts.map +0 -1
- package/lib/node/helper/node-g6.mapper.d.ts +0 -15
- package/lib/node/helper/node-g6.mapper.d.ts.map +0 -1
- package/lib/node/helper/node.mapper.d.ts +0 -26
- package/lib/node/helper/node.mapper.d.ts.map +0 -1
- package/lib/node/index.d.ts +0 -3
- package/lib/node/index.d.ts.map +0 -1
- package/lib/plugin/context-menu.d.ts +0 -6
- package/lib/plugin/context-menu.d.ts.map +0 -1
- package/lib/plugin/element-toolbar.d.ts.map +0 -1
- package/lib/plugin/fixed-toolbar.d.ts +0 -28
- package/lib/plugin/fixed-toolbar.d.ts.map +0 -1
- package/lib/plugin/graph-background.d.ts.map +0 -1
- package/lib/plugin/helper/index.d.ts +0 -2
- package/lib/plugin/helper/index.d.ts.map +0 -1
- package/lib/plugin/helper/plugin.mapper.d.ts +0 -8
- package/lib/plugin/helper/plugin.mapper.d.ts.map +0 -1
- package/lib/plugin/history.d.ts +0 -7
- package/lib/plugin/history.d.ts.map +0 -1
- package/lib/plugin/index.d.ts +0 -10
- package/lib/plugin/index.d.ts.map +0 -1
- package/lib/plugin/minimap.d.ts +0 -13
- package/lib/plugin/minimap.d.ts.map +0 -1
- package/lib/plugin/snapline.d.ts +0 -9
- package/lib/plugin/snapline.d.ts.map +0 -1
- package/lib/plugin/tooltip.d.ts +0 -11
- package/lib/plugin/tooltip.d.ts.map +0 -1
- package/lib/themes/dark.d.ts +0 -3
- package/lib/themes/dark.d.ts.map +0 -1
- package/lib/themes/index.d.ts +0 -4
- package/lib/themes/index.d.ts.map +0 -1
- package/lib/themes/light.d.ts +0 -3
- package/lib/themes/light.d.ts.map +0 -1
- package/lib/themes/theme.mapper.d.ts +0 -65
- package/lib/themes/theme.mapper.d.ts.map +0 -1
- package/lib/utils/edge.helper.d.ts +0 -19
- package/lib/utils/edge.helper.d.ts.map +0 -1
- package/lib/utils/element.helper.d.ts +0 -5
- package/lib/utils/element.helper.d.ts.map +0 -1
- package/lib/utils/graph.helper.d.ts +0 -5
- package/lib/utils/graph.helper.d.ts.map +0 -1
- package/lib/utils/icon.helper.d.ts +0 -3
- package/lib/utils/icon.helper.d.ts.map +0 -1
- package/lib/utils/index.d.ts.map +0 -1
- package/lib/utils/platform.helper.d.ts.map +0 -1
- package/lib/utils/rect.helper.d.ts.map +0 -1
- package/lib/utils/state.helper.d.ts.map +0 -1
- package/lib/utils/theme.helper.d.ts +0 -3
- package/lib/utils/theme.helper.d.ts.map +0 -1
- package/lib/utils/tree.helper.d.ts.map +0 -1
- /package/{lib → core}/utils/platform.helper.d.ts +0 -0
- /package/{lib → core}/utils/rect.helper.d.ts +0 -0
- /package/{lib → core}/utils/state.helper.d.ts +0 -0
- /package/{lib → core}/utils/tree.helper.d.ts +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from './icon-style';
|
|
2
|
+
export * from './label-background';
|
|
3
|
+
export * from './offset';
|
|
4
|
+
export * from './status-style';
|
|
5
|
+
export * from './text-style';
|
|
6
|
+
export * from './theme';
|
|
7
|
+
export * from './title-background';
|
|
8
|
+
export * from './title-style';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../libs/graph/src/components/shared/utils/node-utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,oBAAoB,CAAC;AACnC,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label-background.d.ts","sourceRoot":"","sources":["../../../../../../libs/graph/src/components/shared/utils/node-utils/label-background.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAKzC,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,GAAG,EACT,KAAK,EAAE,GAAG,GACT,cAAc,GAAG,KAAK,CAsCxB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { NodeUtilsConfig } from './config';
|
|
2
|
+
export interface ElementOffsets {
|
|
3
|
+
iconOffset: number;
|
|
4
|
+
titleOffset: number;
|
|
5
|
+
labelOffset: number;
|
|
6
|
+
}
|
|
7
|
+
export type OffsetConfig = NodeUtilsConfig;
|
|
8
|
+
export declare function getElementOffsets(attrs: {
|
|
9
|
+
title?: boolean;
|
|
10
|
+
label?: boolean;
|
|
11
|
+
labelText?: string;
|
|
12
|
+
titleText?: string;
|
|
13
|
+
}, config?: Partial<OffsetConfig>): ElementOffsets;
|
|
14
|
+
//# sourceMappingURL=offset.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"offset.d.ts","sourceRoot":"","sources":["../../../../../../libs/graph/src/components/shared/utils/node-utils/offset.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,OAAO,EAAkB,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3D,MAAM,MAAM,YAAY,GAAG,eAAe,CAAC;AAE3C,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE;IACL,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,EACD,MAAM,GAAE,OAAO,CAAC,YAAY,CAAM,GACjC,cAAc,CA6DhB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status-style.d.ts","sourceRoot":"","sources":["../../../../../../libs/graph/src/components/shared/utils/node-utils/status-style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAO1C,OAAO,EAAqB,YAAY,EAAE,MAAM,UAAU,CAAC;AAI3D,wBAAgB,cAAc,CAC5B,IAAI,EAAE,GAAG,EACT,KAAK,EAAE,GAAG,EACV,WAAW,EAAE,GAAG,EAChB,MAAM,GAAE,OAAO,CAAC,YAAY,CAAM,GACjC,eAAe,GAAG,KAAK,CA0BzB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { TextStyleProps } from '@antv/g';
|
|
2
|
+
import { LabelStyleProps } from '@antv/g6';
|
|
3
|
+
import { OffsetConfig } from './offset';
|
|
4
|
+
export declare function getTextStyle(node: any, attrs: any, labelStyle: TextStyleProps | LabelStyleProps, config?: Partial<OffsetConfig>): TextStyleProps;
|
|
5
|
+
//# sourceMappingURL=text-style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"text-style.d.ts","sourceRoot":"","sources":["../../../../../../libs/graph/src/components/shared/utils/node-utils/text-style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAI3C,OAAO,EAAqB,YAAY,EAAE,MAAM,UAAU,CAAC;AAwC3D,wBAAgB,YAAY,CAC1B,IAAI,EAAE,GAAG,EACT,KAAK,EAAE,GAAG,EACV,UAAU,EAAE,cAAc,GAAG,eAAe,EAC5C,MAAM,GAAE,OAAO,CAAC,YAAY,CAAM,GACjC,cAAc,CA0DhB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { BaseStyleProps } from '@antv/g';
|
|
2
|
+
import { State } from '@antv/g6';
|
|
3
|
+
import { Graph, NodeConfig } from '../../../../index.ts';
|
|
4
|
+
export declare const getNodeTheme: (graph: Graph, states: State[], status?: NodeConfig["highlight"]) => BaseStyleProps;
|
|
5
|
+
//# sourceMappingURL=theme.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../../../libs/graph/src/components/shared/utils/node-utils/theme.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEjC,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEhD,eAAO,MAAM,YAAY,GACvB,OAAO,KAAK,EACZ,QAAQ,KAAK,EAAE,EACf,SAAS,UAAU,CAAC,WAAW,CAAC,KAC/B,cAwFF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"title-background.d.ts","sourceRoot":"","sources":["../../../../../../libs/graph/src/components/shared/utils/node-utils/title-background.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAKzC,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,GAAG,EACT,KAAK,EAAE,GAAG,EACV,gBAAgB,EAAE,cAAc,GAAG,KAAK,GACvC,cAAc,GAAG,KAAK,CAiBxB"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { TextStyleProps } from '@antv/g';
|
|
2
|
+
import { OffsetConfig } from './offset';
|
|
3
|
+
export declare function getTitleStyle(node: any, attrs: any, baseLabelStyle: TextStyleProps, titleStyleProp?: Partial<TextStyleProps>, config?: Partial<OffsetConfig>): TextStyleProps | false;
|
|
4
|
+
//# sourceMappingURL=title-style.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"title-style.d.ts","sourceRoot":"","sources":["../../../../../../libs/graph/src/components/shared/utils/node-utils/title-style.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAGzC,OAAO,EAAqB,YAAY,EAAE,MAAM,UAAU,CAAC;AAI3D,wBAAgB,aAAa,CAC3B,IAAI,EAAE,GAAG,EACT,KAAK,EAAE,GAAG,EACV,cAAc,EAAE,cAAc,EAC9B,cAAc,GAAE,OAAO,CAAC,cAAc,CAAM,EAC5C,MAAM,GAAE,OAAO,CAAC,YAAY,CAAM,GACjC,cAAc,GAAG,KAAK,CA+BxB"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Position and geometry helper functions
|
|
3
|
+
*/
|
|
4
|
+
export interface Point {
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
}
|
|
8
|
+
export interface Size {
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
}
|
|
12
|
+
export interface Rect extends Point, Size {
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Get position relative to a center point
|
|
16
|
+
*/
|
|
17
|
+
export declare const getRelativePosition: (point: Point, center: Point) => Point;
|
|
18
|
+
/**
|
|
19
|
+
* Get absolute position from relative position and center
|
|
20
|
+
*/
|
|
21
|
+
export declare const getAbsolutePosition: (relative: Point, center: Point) => Point;
|
|
22
|
+
/**
|
|
23
|
+
* Check if point is inside rectangle
|
|
24
|
+
*/
|
|
25
|
+
export declare const isPointInRect: (point: Point, rect: Rect) => boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Get center point of rectangle
|
|
28
|
+
*/
|
|
29
|
+
export declare const getRectCenter: (rect: Rect) => Point;
|
|
30
|
+
/**
|
|
31
|
+
* Calculate bounding box for multiple points
|
|
32
|
+
*/
|
|
33
|
+
export declare const getBoundingBox: (points: Point[]) => Rect;
|
|
34
|
+
/**
|
|
35
|
+
* Normalize position to grid
|
|
36
|
+
*/
|
|
37
|
+
export declare const snapToGrid: (point: Point, gridSize: number) => Point;
|
|
38
|
+
/**
|
|
39
|
+
* Calculate offset for parallel edges
|
|
40
|
+
*/
|
|
41
|
+
export declare const getParallelEdgeOffset: (index: number, total: number, distance?: number) => number;
|
|
42
|
+
/**
|
|
43
|
+
* Get arrow offset for edge endpoints
|
|
44
|
+
*/
|
|
45
|
+
export declare const getArrowOffset: (nodeSize: Size, edgeAngle: number, arrowSize?: number) => Point;
|
|
46
|
+
/**
|
|
47
|
+
* Transform coordinate system (flip Y axis for different coordinate systems)
|
|
48
|
+
*/
|
|
49
|
+
export declare const transformCoordinates: (point: Point, canvasHeight: number, flipY?: boolean) => Point;
|
|
50
|
+
//# sourceMappingURL=position-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"position-helpers.d.ts","sourceRoot":"","sources":["../../../../../libs/graph/src/components/shared/utils/position-helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,KAAK;IACpB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,WAAW,IAAI;IACnB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,IAAK,SAAQ,KAAK,EAAE,IAAI;CAAG;AAyB5C;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,OAAO,KAAK,EAAE,QAAQ,KAAK,KAAG,KAKjE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,UAAU,KAAK,EAAE,QAAQ,KAAK,KAAG,KAKpE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,OAAO,KAAK,EAAE,MAAM,IAAI,KAAG,OAOxD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,MAAM,IAAI,KAAG,KAK1C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,GAAI,QAAQ,KAAK,EAAE,KAAG,IAmBhD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,KAAK,EAAE,UAAU,MAAM,KAAG,KAK3D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAChC,OAAO,MAAM,EACb,OAAO,MAAM,EACb,iBAAa,KACZ,MAGF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc,GACzB,UAAU,IAAI,EACd,WAAW,MAAM,EACjB,kBAAa,KACZ,KAQF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAC/B,OAAO,KAAK,EACZ,cAAc,MAAM,EACpB,eAAa,KACZ,KAOF,CAAC"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* State management helper functions
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Default states
|
|
6
|
+
*/
|
|
7
|
+
export declare const DEFAULT_STATES: {
|
|
8
|
+
readonly NORMAL: "normal";
|
|
9
|
+
readonly HOVER: "hover";
|
|
10
|
+
readonly SELECTED: "selected";
|
|
11
|
+
readonly ACTIVE: "active";
|
|
12
|
+
readonly DISABLED: "disabled";
|
|
13
|
+
readonly FOCUSED: "focused";
|
|
14
|
+
readonly HIGHLIGHTED: "highlighted";
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Check if states array contains a specific state
|
|
18
|
+
*/
|
|
19
|
+
export declare const hasState: (states: string[] | undefined, state: string) => boolean;
|
|
20
|
+
/**
|
|
21
|
+
* Add state to states array if not present
|
|
22
|
+
*/
|
|
23
|
+
export declare const addState: (states: string[] | undefined, state: string) => string[];
|
|
24
|
+
/**
|
|
25
|
+
* Remove state from states array
|
|
26
|
+
*/
|
|
27
|
+
export declare const removeState: (states: string[] | undefined, state: string) => string[];
|
|
28
|
+
/**
|
|
29
|
+
* Toggle state in states array
|
|
30
|
+
*/
|
|
31
|
+
export declare const toggleState: (states: string[] | undefined, state: string) => string[];
|
|
32
|
+
/**
|
|
33
|
+
* Get active states (non-normal states)
|
|
34
|
+
*/
|
|
35
|
+
export declare const getActiveStates: (states?: string[]) => string[];
|
|
36
|
+
/**
|
|
37
|
+
* Check if element has any active states
|
|
38
|
+
*/
|
|
39
|
+
export declare const hasActiveStates: (states?: string[]) => boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Match state pattern
|
|
42
|
+
*/
|
|
43
|
+
export declare const matchState: (states: string[] | undefined, pattern: string | string[] | RegExp) => boolean;
|
|
44
|
+
/**
|
|
45
|
+
* Normalize states array
|
|
46
|
+
*/
|
|
47
|
+
export declare const normalizeStates: (states?: string | string[]) => string[];
|
|
48
|
+
/**
|
|
49
|
+
* Get state priority (higher number = higher priority)
|
|
50
|
+
*/
|
|
51
|
+
export declare const getStatePriority: (state: string) => number;
|
|
52
|
+
/**
|
|
53
|
+
* Get highest priority state
|
|
54
|
+
*/
|
|
55
|
+
export declare const getHighestPriorityState: (states?: string[]) => string;
|
|
56
|
+
/**
|
|
57
|
+
* Merge states from multiple sources
|
|
58
|
+
*/
|
|
59
|
+
export declare const mergeStates: (...stateArrays: (string[] | undefined)[]) => string[];
|
|
60
|
+
/**
|
|
61
|
+
* Filter states by pattern
|
|
62
|
+
*/
|
|
63
|
+
export declare const filterStates: (states: string[] | undefined, predicate: (state: string) => boolean) => string[];
|
|
64
|
+
/**
|
|
65
|
+
* Get states by prefix
|
|
66
|
+
*/
|
|
67
|
+
export declare const getStatesByPrefix: (states: string[] | undefined, prefix: string) => string[];
|
|
68
|
+
/**
|
|
69
|
+
* Get common state between multiple elements
|
|
70
|
+
*/
|
|
71
|
+
export declare const getCommonStates: (...stateArrays: string[][]) => string[];
|
|
72
|
+
/**
|
|
73
|
+
* Get unique states across multiple elements
|
|
74
|
+
*/
|
|
75
|
+
export declare const getUniqueStates: (...stateArrays: string[][]) => string[];
|
|
76
|
+
/**
|
|
77
|
+
* Create state validator
|
|
78
|
+
*/
|
|
79
|
+
export declare const createStateValidator: (validStates: string[]) => (state: string) => boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Create state transformer
|
|
82
|
+
*/
|
|
83
|
+
export declare const createStateTransformer: (stateMap: Record<string, string>) => (states: string[]) => string[];
|
|
84
|
+
//# sourceMappingURL=state-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"state-helpers.d.ts","sourceRoot":"","sources":["../../../../../libs/graph/src/components/shared/utils/state-helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;CAQjB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,QAAQ,GAAI,QAAQ,MAAM,EAAE,YAAK,EAAE,OAAO,MAAM,KAAG,OAE/D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,GAAI,QAAQ,MAAM,EAAE,YAAK,EAAE,OAAO,MAAM,KAAG,MAAM,EAErE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,QAAQ,MAAM,EAAE,YAAK,EAAE,OAAO,MAAM,KAAG,MAAM,EAExE,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GAA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,GAAI,aAAa,MAAM,EAAE,MAChD,OAAO,MAAM,KAAG,OAGzB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,GAAI,UAAU,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAC7D,QAAQ,MAAM,EAAE,KAAG,MAAM,EAGlC,CAAC"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Style transformation helper functions
|
|
3
|
+
*/
|
|
4
|
+
export interface ColorRGB {
|
|
5
|
+
r: number;
|
|
6
|
+
g: number;
|
|
7
|
+
b: number;
|
|
8
|
+
}
|
|
9
|
+
export interface ColorHSL {
|
|
10
|
+
h: number;
|
|
11
|
+
s: number;
|
|
12
|
+
l: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Convert hex color to RGB
|
|
16
|
+
*/
|
|
17
|
+
export declare const hexToRgb: (hex: string) => ColorRGB | null;
|
|
18
|
+
/**
|
|
19
|
+
* Convert RGB to hex
|
|
20
|
+
*/
|
|
21
|
+
export declare const rgbToHex: (r: number, g: number, b: number) => string;
|
|
22
|
+
/**
|
|
23
|
+
* Convert RGB to HSL
|
|
24
|
+
*/
|
|
25
|
+
export declare const rgbToHsl: (r: number, g: number, b: number) => ColorHSL;
|
|
26
|
+
/**
|
|
27
|
+
* Darken a color by percentage
|
|
28
|
+
*/
|
|
29
|
+
export declare const darkenColor: (color: string, percent: number) => string;
|
|
30
|
+
/**
|
|
31
|
+
* Lighten a color by percentage
|
|
32
|
+
*/
|
|
33
|
+
export declare const lightenColor: (color: string, percent: number) => string;
|
|
34
|
+
/**
|
|
35
|
+
* Get contrast color (black or white) for better readability
|
|
36
|
+
*/
|
|
37
|
+
export declare const getContrastColor: (backgroundColor: string) => string;
|
|
38
|
+
/**
|
|
39
|
+
* Normalize line dash array
|
|
40
|
+
*/
|
|
41
|
+
export declare const normalizeLineDash: (lineDash: number | string | (string | number)[]) => number[];
|
|
42
|
+
/**
|
|
43
|
+
* Get font string from font properties
|
|
44
|
+
*/
|
|
45
|
+
export declare const getFontString: (fontSize?: number, fontFamily?: string, fontWeight?: string | number, fontStyle?: string) => string;
|
|
46
|
+
/**
|
|
47
|
+
* Parse font string to properties
|
|
48
|
+
*/
|
|
49
|
+
export declare const parseFontString: (fontString: string) => {
|
|
50
|
+
fontSize: number;
|
|
51
|
+
fontFamily: string;
|
|
52
|
+
fontWeight: string;
|
|
53
|
+
fontStyle: string;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Apply alpha to color
|
|
57
|
+
*/
|
|
58
|
+
export declare const applyAlpha: (color: string, alpha: number) => string;
|
|
59
|
+
/**
|
|
60
|
+
* Interpolate between two colors
|
|
61
|
+
*/
|
|
62
|
+
export declare const interpolateColor: (color1: string, color2: string, factor: number) => string;
|
|
63
|
+
/**
|
|
64
|
+
* Get theme-based color
|
|
65
|
+
*/
|
|
66
|
+
export declare const getThemeColor: (baseColor: string, theme: "light" | "dark", variant?: "normal" | "hover" | "active") => string;
|
|
67
|
+
//# sourceMappingURL=style-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style-helpers.d.ts","sourceRoot":"","sources":["../../../../../libs/graph/src/components/shared/utils/style-helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,QAAQ;IACvB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED,MAAM,WAAW,QAAQ;IACvB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ,GAAI,KAAK,MAAM,KAAG,QAAQ,GAAG,IASjD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM,KAAG,MAE1D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,QAAQ,GAAI,GAAG,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,MAAM,KAAG,QAgC1D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,EAAE,SAAS,MAAM,KAAG,MAU5D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,EAAE,SAAS,MAAM,KAAG,MAU7D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAAI,iBAAiB,MAAM,KAAG,MAQ1D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAC5B,UAAU,MAAM,GAAG,MAAM,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,KAC9C,MAAM,EAiBR,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,GACxB,iBAAa,EACb,mBAAoB,EACpB,aAAY,MAAM,GAAG,MAAiB,EACtC,kBAAoB,KACnB,MAEF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,eAAe,GAAI,YAAY,MAAM;;;;;CAWjD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,UAAU,GAAI,OAAO,MAAM,EAAE,OAAO,MAAM,KAAG,MAKzD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAC3B,QAAQ,MAAM,EACd,QAAQ,MAAM,EACd,QAAQ,MAAM,KACb,MAWF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,GACxB,WAAW,MAAM,EACjB,OAAO,OAAO,GAAG,MAAM,EACvB,UAAS,QAAQ,GAAG,OAAO,GAAG,QAAmB,KAChD,MAmBF,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { ElementType as G6ElementType } from '@antv/g6';
|
|
2
|
+
import { ElementType } from '../../../core/model';
|
|
3
|
+
/**
|
|
4
|
+
* Check if value is a plain object
|
|
5
|
+
*/
|
|
6
|
+
export declare const isPlainObject: (value: any) => value is Record<string, any>;
|
|
7
|
+
/**
|
|
8
|
+
* Check if value is a function
|
|
9
|
+
*/
|
|
10
|
+
export declare const isFunction: (value: any) => value is Function;
|
|
11
|
+
/**
|
|
12
|
+
* Check if value is a string
|
|
13
|
+
*/
|
|
14
|
+
export declare const isString: (value: any) => value is string;
|
|
15
|
+
/**
|
|
16
|
+
* Check if value is a number
|
|
17
|
+
*/
|
|
18
|
+
export declare const isNumber: (value: any) => value is number;
|
|
19
|
+
/**
|
|
20
|
+
* Check if value is a boolean
|
|
21
|
+
*/
|
|
22
|
+
export declare const isBoolean: (value: any) => value is boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Check if value is an array
|
|
25
|
+
*/
|
|
26
|
+
export declare const isArray: (value: any) => value is any[];
|
|
27
|
+
/**
|
|
28
|
+
* Check if value is undefined
|
|
29
|
+
*/
|
|
30
|
+
export declare const isUndefined: (value: any) => value is undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Check if value is null
|
|
33
|
+
*/
|
|
34
|
+
export declare const isNull: (value: any) => value is null;
|
|
35
|
+
/**
|
|
36
|
+
* Check if value is null or undefined
|
|
37
|
+
*/
|
|
38
|
+
export declare const isNullish: (value: any) => value is null | undefined;
|
|
39
|
+
/**
|
|
40
|
+
* Check if value is empty (null, undefined, empty string, empty array, empty object)
|
|
41
|
+
*/
|
|
42
|
+
export declare const isEmpty: (value: any) => boolean;
|
|
43
|
+
/**
|
|
44
|
+
* Map G6 element type to Mx element type
|
|
45
|
+
*/
|
|
46
|
+
export declare const mapG6ElementType: (type: G6ElementType) => ElementType;
|
|
47
|
+
/**
|
|
48
|
+
* Map Mx element type to G6 element type
|
|
49
|
+
*/
|
|
50
|
+
export declare const mapMxElementType: (type: ElementType) => G6ElementType;
|
|
51
|
+
/**
|
|
52
|
+
* Safe type conversion to string
|
|
53
|
+
*/
|
|
54
|
+
export declare const toString: (value: any) => string;
|
|
55
|
+
/**
|
|
56
|
+
* Safe type conversion to number
|
|
57
|
+
*/
|
|
58
|
+
export declare const toNumber: (value: any, defaultValue?: number) => number;
|
|
59
|
+
/**
|
|
60
|
+
* Safe type conversion to boolean
|
|
61
|
+
*/
|
|
62
|
+
export declare const toBoolean: (value: any) => boolean;
|
|
63
|
+
/**
|
|
64
|
+
* Safe type conversion to array
|
|
65
|
+
*/
|
|
66
|
+
export declare const toArray: <T>(value: any) => T[];
|
|
67
|
+
/**
|
|
68
|
+
* Deep clone object
|
|
69
|
+
*/
|
|
70
|
+
export declare const deepClone: <T>(obj: T) => T;
|
|
71
|
+
/**
|
|
72
|
+
* Merge objects deeply
|
|
73
|
+
*/
|
|
74
|
+
export declare const deepMerge: <T extends Record<string, any>>(target: T, ...sources: Partial<T>[]) => T;
|
|
75
|
+
/**
|
|
76
|
+
* Pick properties from object
|
|
77
|
+
*/
|
|
78
|
+
export declare const pick: <T extends object, K extends keyof T>(obj: T, keys: K[]) => Pick<T, K>;
|
|
79
|
+
/**
|
|
80
|
+
* Omit properties from object
|
|
81
|
+
*/
|
|
82
|
+
export declare const omit: <T, K extends keyof T>(obj: T, keys: K[]) => Omit<T, K>;
|
|
83
|
+
/**
|
|
84
|
+
* Check if object has property
|
|
85
|
+
*/
|
|
86
|
+
export declare const hasOwnProperty: <T>(obj: T, prop: PropertyKey) => prop is keyof T;
|
|
87
|
+
/**
|
|
88
|
+
* Get nested property value safely
|
|
89
|
+
*/
|
|
90
|
+
export declare const get: (obj: any, path: string | string[], defaultValue?: any) => any;
|
|
91
|
+
/**
|
|
92
|
+
* Set nested property value safely
|
|
93
|
+
*/
|
|
94
|
+
export declare const set: (obj: any, path: string | string[], value: any) => void;
|
|
95
|
+
//# sourceMappingURL=type-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-helpers.d.ts","sourceRoot":"","sources":["../../../../../libs/graph/src/components/shared/utils/type-helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,W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1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Data validation helper functions
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Validation result interface
|
|
6
|
+
*/
|
|
7
|
+
export interface ValidationResult {
|
|
8
|
+
isValid: boolean;
|
|
9
|
+
errors: string[];
|
|
10
|
+
warnings: string[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Create successful validation result
|
|
14
|
+
*/
|
|
15
|
+
export declare const createValidResult: () => ValidationResult;
|
|
16
|
+
/**
|
|
17
|
+
* Create failed validation result
|
|
18
|
+
*/
|
|
19
|
+
export declare const createInvalidResult: (errors: string[]) => ValidationResult;
|
|
20
|
+
/**
|
|
21
|
+
* Add warning to validation result
|
|
22
|
+
*/
|
|
23
|
+
export declare const addWarning: (result: ValidationResult, warning: string) => ValidationResult;
|
|
24
|
+
/**
|
|
25
|
+
* Validate required field
|
|
26
|
+
*/
|
|
27
|
+
export declare const validateRequired: (value: any, fieldName: string) => ValidationResult;
|
|
28
|
+
/**
|
|
29
|
+
* Validate string field
|
|
30
|
+
*/
|
|
31
|
+
export declare const validateString: (value: any, fieldName: string, options?: {
|
|
32
|
+
required?: boolean;
|
|
33
|
+
minLength?: number;
|
|
34
|
+
maxLength?: number;
|
|
35
|
+
pattern?: RegExp;
|
|
36
|
+
}) => ValidationResult;
|
|
37
|
+
/**
|
|
38
|
+
* Validate number field
|
|
39
|
+
*/
|
|
40
|
+
export declare const validateNumber: (value: any, fieldName: string, options?: {
|
|
41
|
+
required?: boolean;
|
|
42
|
+
min?: number;
|
|
43
|
+
max?: number;
|
|
44
|
+
integer?: boolean;
|
|
45
|
+
}) => ValidationResult;
|
|
46
|
+
/**
|
|
47
|
+
* Validate array field
|
|
48
|
+
*/
|
|
49
|
+
export declare const validateArray: (value: any, fieldName: string, options?: {
|
|
50
|
+
required?: boolean;
|
|
51
|
+
minLength?: number;
|
|
52
|
+
maxLength?: number;
|
|
53
|
+
itemValidator?: (item: any, index: number) => ValidationResult;
|
|
54
|
+
}) => ValidationResult;
|
|
55
|
+
/**
|
|
56
|
+
* Validate color value
|
|
57
|
+
*/
|
|
58
|
+
export declare const validateColor: (value: any, fieldName: string, required?: boolean) => ValidationResult;
|
|
59
|
+
/**
|
|
60
|
+
* Validate point object
|
|
61
|
+
*/
|
|
62
|
+
export declare const validatePoint: (value: any, fieldName: string, required?: boolean) => ValidationResult;
|
|
63
|
+
/**
|
|
64
|
+
* Validate enum value
|
|
65
|
+
*/
|
|
66
|
+
export declare const validateEnum: (value: any, fieldName: string, enumValues: string[], required?: boolean) => ValidationResult;
|
|
67
|
+
/**
|
|
68
|
+
* Combine multiple validation results
|
|
69
|
+
*/
|
|
70
|
+
export declare const combineValidationResults: (...results: ValidationResult[]) => ValidationResult;
|
|
71
|
+
/**
|
|
72
|
+
* Create object validator
|
|
73
|
+
*/
|
|
74
|
+
export declare const createObjectValidator: <T>(validators: Record<keyof T, (value: any) => ValidationResult>) => (obj: T) => ValidationResult;
|
|
75
|
+
//# sourceMappingURL=validation-helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validation-helpers.d.ts","sourceRoot":"","sources":["../../../../../libs/graph/src/components/shared/utils/validation-helpers.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,QAAO,gBAInC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,mBAAmB,GAAI,QAAQ,MAAM,EAAE,KAAG,gBAIrD,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,UAAU,GACrB,QAAQ,gBAAgB,EACxB,SAAS,MAAM,KACd,gBAGD,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB,GAC3B,OA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GACnC,GAAG,SAAS,gBAAgB,EAAE,KAC7B,gBASF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAI,CAAC,EACrC,YAAY,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,gBAAgB,CAAC,MAErD,KAAK,CAAC,KAAG,gBAOlB,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { GraphConfig, GraphRendererType, TokenConfig } from '../model';
|
|
2
|
+
/**
|
|
3
|
+
* Configuration manager for handling graph settings and resources
|
|
4
|
+
*/
|
|
5
|
+
export declare class ConfigManager {
|
|
6
|
+
private config;
|
|
7
|
+
private tokenConfig;
|
|
8
|
+
private iconSpriteText;
|
|
9
|
+
constructor(config: GraphConfig);
|
|
10
|
+
/**
|
|
11
|
+
* Get current configuration
|
|
12
|
+
*/
|
|
13
|
+
getConfig(): GraphConfig;
|
|
14
|
+
/**
|
|
15
|
+
* Update configuration
|
|
16
|
+
*/
|
|
17
|
+
updateConfig(newConfig: Partial<GraphConfig>): void;
|
|
18
|
+
/**
|
|
19
|
+
* Get token configuration
|
|
20
|
+
*/
|
|
21
|
+
getTokenConfig(): TokenConfig;
|
|
22
|
+
/**
|
|
23
|
+
* Get icon sprite text
|
|
24
|
+
*/
|
|
25
|
+
getIconSpriteText(): string;
|
|
26
|
+
/**
|
|
27
|
+
* Get version
|
|
28
|
+
*/
|
|
29
|
+
getVersion(): string;
|
|
30
|
+
/**
|
|
31
|
+
* Load token configuration
|
|
32
|
+
*/
|
|
33
|
+
private loadTokenConfig;
|
|
34
|
+
/**
|
|
35
|
+
* Load icon sprite from build-time embedded content
|
|
36
|
+
*/
|
|
37
|
+
private loadIconSprite;
|
|
38
|
+
/**
|
|
39
|
+
* Validate configuration
|
|
40
|
+
*/
|
|
41
|
+
validateConfig(): boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Get renderer type
|
|
44
|
+
*/
|
|
45
|
+
getRendererType(): GraphRendererType;
|
|
46
|
+
/**
|
|
47
|
+
* Check if should show version
|
|
48
|
+
*/
|
|
49
|
+
shouldShowVersion(): boolean;
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=config-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-manager.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/core/graph/config-manager.ts"],"names":[],"mappings":"AAGA,OAAO,EAEL,WAAW,EACX,iBAAiB,EACjB,WAAW,EACZ,MAAM,aAAa,CAAC;AAGrB;;GAEG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAc;IAC5B,OAAO,CAAC,WAAW,CAAe;IAClC,OAAO,CAAC,cAAc,CAAM;gBAEhB,MAAM,EAAE,WAAW;IAM/B;;OAEG;IACH,SAAS,IAAI,WAAW;IAIxB;;OAEG;IACH,YAAY,CAAC,SAAS,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,IAAI;IAInD;;OAEG;IACH,cAAc,IAAI,WAAW;IAI7B;;OAEG;IACH,iBAAiB,IAAI,MAAM;IAI3B;;OAEG;IACH,UAAU,IAAI,MAAM;IAIpB;;OAEG;IACH,OAAO,CAAC,eAAe;IAYvB;;OAEG;IACH,OAAO,CAAC,cAAc;IAiBtB;;OAEG;IACH,cAAc,IAAI,OAAO;IAYzB;;OAEG;IACH,eAAe,IAAI,iBAAiB;IAIpC;;OAEG;IACH,iBAAiB,IAAI,OAAO;CAG7B"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ComboData, EdgeData, GraphData as G6GraphData, NodeData } from '@antv/g6';
|
|
2
|
+
import { GraphData, PartialEdgeData, PartialGroupData, PartialNodeData } from '../model';
|
|
3
|
+
/**
|
|
4
|
+
* Data manager responsible for handling graph data transformations
|
|
5
|
+
*/
|
|
6
|
+
export declare class DataManager {
|
|
7
|
+
private pipeline;
|
|
8
|
+
/**
|
|
9
|
+
* Transform MxGraphData to G6 GraphData
|
|
10
|
+
*/
|
|
11
|
+
transformToG6Data(data: GraphData): G6GraphData;
|
|
12
|
+
/**
|
|
13
|
+
* Transform G6 GraphData back to MxGraphData
|
|
14
|
+
*/
|
|
15
|
+
transformToMxData(data: G6GraphData): GraphData;
|
|
16
|
+
/**
|
|
17
|
+
* Add nodes to the data
|
|
18
|
+
*/
|
|
19
|
+
addNodes(nodes: PartialNodeData[]): NodeData[];
|
|
20
|
+
/**
|
|
21
|
+
* Add edges to the data
|
|
22
|
+
*/
|
|
23
|
+
addEdges(edges: PartialEdgeData[]): EdgeData[];
|
|
24
|
+
/**
|
|
25
|
+
* Add groups to the data
|
|
26
|
+
*/
|
|
27
|
+
addGroups(groups: PartialGroupData[]): ComboData[];
|
|
28
|
+
/**
|
|
29
|
+
* Update edges to the data
|
|
30
|
+
*/
|
|
31
|
+
updateEdges(edges: PartialEdgeData[]): EdgeData[];
|
|
32
|
+
/**
|
|
33
|
+
* Update transformation pipeline
|
|
34
|
+
*/
|
|
35
|
+
updatePipeline(pipeline: any): void;
|
|
36
|
+
/**
|
|
37
|
+
* Validate data structure
|
|
38
|
+
*/
|
|
39
|
+
validateData(data: GraphData): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Normalize data format
|
|
42
|
+
*/
|
|
43
|
+
normalizeData(data: any): GraphData;
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=data-manager.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"data-manager.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/core/graph/data-manager.ts"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EACT,QAAQ,EACR,SAAS,IAAI,WAAW,EACxB,QAAQ,EACT,MAAM,UAAU,CAAC;AASlB,OAAO,EACL,SAAS,EACT,eAAe,EACf,gBAAgB,EAChB,eAAe,EAChB,MAAM,aAAa,CAAC;AAGrB;;GAEG;AACH,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAA4B;IAE5C;;OAEG;IACH,iBAAiB,CAAC,IAAI,EAAE,SAAS,GAAG,WAAW;IAgB/C;;OAEG;IACH,iBAAiB,CAAC,IAAI,EAAE,WAAW,GAAG,SAAS;IAQ/C;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,eAAe,EAAE,GAAG,QAAQ,EAAE;IAI9C;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,eAAe,EAAE,GAAG,QAAQ,EAAE;IAI9C;;OAEG;IACH,SAAS,CAAC,MAAM,EAAE,gBAAgB,EAAE,GAAG,SAAS,EAAE;IAIlD;;OAEG;IACH,WAAW,CAAC,KAAK,EAAE,eAAe,EAAE,GAAG,QAAQ,EAAE;IAKjD;;OAEG;IACH,cAAc,CAAC,QAAQ,EAAE,GAAG,GAAG,IAAI;IAInC;;OAEG;IACH,YAAY,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO;IAkBtC;;OAEG;IACH,aAAa,CAAC,IAAI,EAAE,GAAG,GAAG,SAAS;CAOpC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Graph } from '@antv/g6';
|
|
2
|
+
import { GraphConfig } from '../model';
|
|
3
|
+
/**
|
|
4
|
+
* Graph renderer responsible for creating and managing G6 graph instances
|
|
5
|
+
*/
|
|
6
|
+
export declare class GraphRenderer {
|
|
7
|
+
private _graph;
|
|
8
|
+
private config;
|
|
9
|
+
constructor(config: GraphConfig);
|
|
10
|
+
/**
|
|
11
|
+
* Get the G6 graph instance
|
|
12
|
+
*/
|
|
13
|
+
get graph(): Graph;
|
|
14
|
+
/**
|
|
15
|
+
* Initialize the graph with configuration
|
|
16
|
+
*/
|
|
17
|
+
initialize(mxGraph: any): void;
|
|
18
|
+
/**
|
|
19
|
+
* Render the graph
|
|
20
|
+
*/
|
|
21
|
+
render(): void;
|
|
22
|
+
/**
|
|
23
|
+
* Destroy the graph
|
|
24
|
+
*/
|
|
25
|
+
destroy(): void;
|
|
26
|
+
/**
|
|
27
|
+
* Update graph configuration
|
|
28
|
+
*/
|
|
29
|
+
updateConfig(config: Partial<GraphConfig>): void;
|
|
30
|
+
}
|
|
31
|
+
//# sourceMappingURL=graph-renderer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"graph-renderer.d.ts","sourceRoot":"","sources":["../../../../libs/graph/src/core/graph/graph-renderer.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACjC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C;;GAEG;AACH,qBAAa,aAAa;IACxB,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,MAAM,CAAc;gBAEhB,MAAM,EAAE,WAAW;IAI/B;;OAEG;IACH,IAAI,KAAK,IAAI,KAAK,CAEjB;IAED;;OAEG;IACH,UAAU,CAAC,OAAO,EAAE,GAAG,GAAG,IAAI;IAQ9B;;OAEG;IACH,MAAM,IAAI,IAAI;IAOd;;OAEG;IACH,OAAO,IAAI,IAAI;IAMf;;OAEG;IACH,YAAY,CAAC,MAAM,EAAE,OAAO,CAAC,WAAW,CAAC,GAAG,IAAI;CAIjD"}
|