@darajs/ui-causal-graph-editor 1.0.0-a.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +201 -0
- package/dist/graph-viewer/causal-graph-editor.d.ts +44 -0
- package/dist/graph-viewer/causal-graph-editor.d.ts.map +1 -0
- package/dist/graph-viewer/causal-graph-editor.js +357 -0
- package/dist/graph-viewer/causal-graph-editor.js.map +1 -0
- package/dist/graph-viewer/utils/use-iterate-edges.d.ts +32 -0
- package/dist/graph-viewer/utils/use-iterate-edges.d.ts.map +1 -0
- package/dist/graph-viewer/utils/use-iterate-edges.js +34 -0
- package/dist/graph-viewer/utils/use-iterate-edges.js.map +1 -0
- package/dist/graph-viewer/utils/use-iterate-nodes.d.ts +32 -0
- package/dist/graph-viewer/utils/use-iterate-nodes.d.ts.map +1 -0
- package/dist/graph-viewer/utils/use-iterate-nodes.js +30 -0
- package/dist/graph-viewer/utils/use-iterate-nodes.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +21 -0
- package/dist/index.js.map +1 -0
- package/dist/jest-setup.d.ts +18 -0
- package/dist/jest-setup.d.ts.map +1 -0
- package/dist/jest-setup.js +18 -0
- package/dist/jest-setup.js.map +1 -0
- package/dist/node-hierarchy-builder/index.d.ts +19 -0
- package/dist/node-hierarchy-builder/index.d.ts.map +1 -0
- package/dist/node-hierarchy-builder/index.js +18 -0
- package/dist/node-hierarchy-builder/index.js.map +1 -0
- package/dist/node-hierarchy-builder/layer-divider.d.ts +15 -0
- package/dist/node-hierarchy-builder/layer-divider.d.ts.map +1 -0
- package/dist/node-hierarchy-builder/layer-divider.js +122 -0
- package/dist/node-hierarchy-builder/layer-divider.js.map +1 -0
- package/dist/node-hierarchy-builder/layer-label-editor.d.ts +24 -0
- package/dist/node-hierarchy-builder/layer-label-editor.d.ts.map +1 -0
- package/dist/node-hierarchy-builder/layer-label-editor.js +93 -0
- package/dist/node-hierarchy-builder/layer-label-editor.js.map +1 -0
- package/dist/node-hierarchy-builder/layer.d.ts +35 -0
- package/dist/node-hierarchy-builder/layer.d.ts.map +1 -0
- package/dist/node-hierarchy-builder/layer.js +114 -0
- package/dist/node-hierarchy-builder/layer.js.map +1 -0
- package/dist/node-hierarchy-builder/node-hierarchy-builder.d.ts +27 -0
- package/dist/node-hierarchy-builder/node-hierarchy-builder.d.ts.map +1 -0
- package/dist/node-hierarchy-builder/node-hierarchy-builder.js +190 -0
- package/dist/node-hierarchy-builder/node-hierarchy-builder.js.map +1 -0
- package/dist/node-hierarchy-builder/node.d.ts +21 -0
- package/dist/node-hierarchy-builder/node.d.ts.map +1 -0
- package/dist/node-hierarchy-builder/node.js +90 -0
- package/dist/node-hierarchy-builder/node.js.map +1 -0
- package/dist/node-hierarchy-builder/shared.d.ts +93 -0
- package/dist/node-hierarchy-builder/shared.d.ts.map +1 -0
- package/dist/node-hierarchy-builder/shared.js +88 -0
- package/dist/node-hierarchy-builder/shared.js.map +1 -0
- package/dist/shared/causal-graph-store.d.ts +107 -0
- package/dist/shared/causal-graph-store.d.ts.map +1 -0
- package/dist/shared/causal-graph-store.js +142 -0
- package/dist/shared/causal-graph-store.js.map +1 -0
- package/dist/shared/editor-overlay/buttons/add-node-button.d.ts +7 -0
- package/dist/shared/editor-overlay/buttons/add-node-button.d.ts.map +1 -0
- package/dist/shared/editor-overlay/buttons/add-node-button.js +31 -0
- package/dist/shared/editor-overlay/buttons/add-node-button.js.map +1 -0
- package/dist/shared/editor-overlay/buttons/center-graph-button.d.ts +7 -0
- package/dist/shared/editor-overlay/buttons/center-graph-button.d.ts.map +1 -0
- package/dist/shared/editor-overlay/buttons/center-graph-button.js +32 -0
- package/dist/shared/editor-overlay/buttons/center-graph-button.js.map +1 -0
- package/dist/shared/editor-overlay/buttons/drag-mode-button.d.ts +27 -0
- package/dist/shared/editor-overlay/buttons/drag-mode-button.d.ts.map +1 -0
- package/dist/shared/editor-overlay/buttons/drag-mode-button.js +35 -0
- package/dist/shared/editor-overlay/buttons/drag-mode-button.js.map +1 -0
- package/dist/shared/editor-overlay/buttons/index.d.ts +21 -0
- package/dist/shared/editor-overlay/buttons/index.d.ts.map +1 -0
- package/dist/shared/editor-overlay/buttons/index.js +21 -0
- package/dist/shared/editor-overlay/buttons/index.js.map +1 -0
- package/dist/shared/editor-overlay/buttons/recalculate-layout-button.d.ts +7 -0
- package/dist/shared/editor-overlay/buttons/recalculate-layout-button.d.ts.map +1 -0
- package/dist/shared/editor-overlay/buttons/recalculate-layout-button.js +28 -0
- package/dist/shared/editor-overlay/buttons/recalculate-layout-button.js.map +1 -0
- package/dist/shared/editor-overlay/floating-elements.d.ts +29 -0
- package/dist/shared/editor-overlay/floating-elements.d.ts.map +1 -0
- package/dist/shared/editor-overlay/floating-elements.js +17 -0
- package/dist/shared/editor-overlay/floating-elements.js.map +1 -0
- package/dist/shared/editor-overlay/index.d.ts +22 -0
- package/dist/shared/editor-overlay/index.d.ts.map +1 -0
- package/dist/shared/editor-overlay/index.js +22 -0
- package/dist/shared/editor-overlay/index.js.map +1 -0
- package/dist/shared/editor-overlay/legend/index.d.ts +19 -0
- package/dist/shared/editor-overlay/legend/index.d.ts.map +1 -0
- package/dist/shared/editor-overlay/legend/index.js +19 -0
- package/dist/shared/editor-overlay/legend/index.js.map +1 -0
- package/dist/shared/editor-overlay/legend/legend-data.d.ts +34 -0
- package/dist/shared/editor-overlay/legend/legend-data.d.ts.map +1 -0
- package/dist/shared/editor-overlay/legend/legend-data.js +41 -0
- package/dist/shared/editor-overlay/legend/legend-data.js.map +1 -0
- package/dist/shared/editor-overlay/legend/legend-list.d.ts +6 -0
- package/dist/shared/editor-overlay/legend/legend-list.d.ts.map +1 -0
- package/dist/shared/editor-overlay/legend/legend-list.js +96 -0
- package/dist/shared/editor-overlay/legend/legend-list.js.map +1 -0
- package/dist/shared/editor-overlay/legend/legend.d.ts +7 -0
- package/dist/shared/editor-overlay/legend/legend.d.ts.map +1 -0
- package/dist/shared/editor-overlay/legend/legend.js +80 -0
- package/dist/shared/editor-overlay/legend/legend.js.map +1 -0
- package/dist/shared/editor-overlay/overlay.d.ts +35 -0
- package/dist/shared/editor-overlay/overlay.d.ts.map +1 -0
- package/dist/shared/editor-overlay/overlay.js +41 -0
- package/dist/shared/editor-overlay/overlay.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/edge-editor.d.ts +8 -0
- package/dist/shared/editor-overlay/panel-content/edge/edge-editor.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/edge-editor.js +40 -0
- package/dist/shared/editor-overlay/panel-content/edge/edge-editor.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/edge-info-content.d.ts +22 -0
- package/dist/shared/editor-overlay/panel-content/edge/edge-info-content.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/edge-info-content.js +36 -0
- package/dist/shared/editor-overlay/panel-content/edge/edge-info-content.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/editor-props.d.ts +35 -0
- package/dist/shared/editor-overlay/panel-content/edge/editor-props.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/editor-props.js +2 -0
- package/dist/shared/editor-overlay/panel-content/edge/editor-props.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/encoder-editor.d.ts +23 -0
- package/dist/shared/editor-overlay/panel-content/edge/encoder-editor.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/encoder-editor.js +10 -0
- package/dist/shared/editor-overlay/panel-content/edge/encoder-editor.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/index.d.ts +18 -0
- package/dist/shared/editor-overlay/panel-content/edge/index.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/index.js +18 -0
- package/dist/shared/editor-overlay/panel-content/edge/index.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/pag-editor.d.ts +23 -0
- package/dist/shared/editor-overlay/panel-content/edge/pag-editor.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/pag-editor.js +10 -0
- package/dist/shared/editor-overlay/panel-content/edge/pag-editor.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/resolver-editor.d.ts +7 -0
- package/dist/shared/editor-overlay/panel-content/edge/resolver-editor.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/resolver-editor.js +31 -0
- package/dist/shared/editor-overlay/panel-content/edge/resolver-editor.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/constraint-editor.d.ts +27 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/constraint-editor.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/constraint-editor.js +53 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/constraint-editor.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/description-editor.d.ts +15 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/description-editor.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/description-editor.js +60 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/description-editor.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/direction-editor.d.ts +21 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/direction-editor.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/direction-editor.js +90 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/direction-editor.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/edge-type-editor.d.ts +17 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/edge-type-editor.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/edge-type-editor.js +61 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/edge-type-editor.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/index.d.ts +19 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/index.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/index.js +19 -0
- package/dist/shared/editor-overlay/panel-content/edge/sections/index.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/index.d.ts +20 -0
- package/dist/shared/editor-overlay/panel-content/index.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/index.js +20 -0
- package/dist/shared/editor-overlay/panel-content/index.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/node/index.d.ts +18 -0
- package/dist/shared/editor-overlay/panel-content/node/index.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/node/index.js +18 -0
- package/dist/shared/editor-overlay/panel-content/node/index.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/node/label-editor.d.ts +11 -0
- package/dist/shared/editor-overlay/panel-content/node/label-editor.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/node/label-editor.js +89 -0
- package/dist/shared/editor-overlay/panel-content/node/label-editor.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/node/node-info-content.d.ts +32 -0
- package/dist/shared/editor-overlay/panel-content/node/node-info-content.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/node/node-info-content.js +12 -0
- package/dist/shared/editor-overlay/panel-content/node/node-info-content.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/panel-content.d.ts +17 -0
- package/dist/shared/editor-overlay/panel-content/panel-content.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/panel-content.js +27 -0
- package/dist/shared/editor-overlay/panel-content/panel-content.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/panel-title.d.ts +12 -0
- package/dist/shared/editor-overlay/panel-content/panel-title.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/panel-title.js +48 -0
- package/dist/shared/editor-overlay/panel-content/panel-title.js.map +1 -0
- package/dist/shared/editor-overlay/panel-content/styled.d.ts +9 -0
- package/dist/shared/editor-overlay/panel-content/styled.d.ts.map +1 -0
- package/dist/shared/editor-overlay/panel-content/styled.js +43 -0
- package/dist/shared/editor-overlay/panel-content/styled.js.map +1 -0
- package/dist/shared/editor-overlay/positional-divs.d.ts +14 -0
- package/dist/shared/editor-overlay/positional-divs.d.ts.map +1 -0
- package/dist/shared/editor-overlay/positional-divs.js +117 -0
- package/dist/shared/editor-overlay/positional-divs.js.map +1 -0
- package/dist/shared/editor-overlay/search-bar/index.d.ts +19 -0
- package/dist/shared/editor-overlay/search-bar/index.d.ts.map +1 -0
- package/dist/shared/editor-overlay/search-bar/index.js +19 -0
- package/dist/shared/editor-overlay/search-bar/index.js.map +1 -0
- package/dist/shared/editor-overlay/search-bar/search-bar.d.ts +21 -0
- package/dist/shared/editor-overlay/search-bar/search-bar.d.ts.map +1 -0
- package/dist/shared/editor-overlay/search-bar/search-bar.js +160 -0
- package/dist/shared/editor-overlay/search-bar/search-bar.js.map +1 -0
- package/dist/shared/editor-overlay/search-bar/use-search.d.ts +32 -0
- package/dist/shared/editor-overlay/search-bar/use-search.d.ts.map +1 -0
- package/dist/shared/editor-overlay/search-bar/use-search.js +75 -0
- package/dist/shared/editor-overlay/search-bar/use-search.js.map +1 -0
- package/dist/shared/graph-layout/circular-layout.d.ts +18 -0
- package/dist/shared/graph-layout/circular-layout.d.ts.map +1 -0
- package/dist/shared/graph-layout/circular-layout.js +38 -0
- package/dist/shared/graph-layout/circular-layout.js.map +1 -0
- package/dist/shared/graph-layout/common.d.ts +64 -0
- package/dist/shared/graph-layout/common.d.ts.map +1 -0
- package/dist/shared/graph-layout/common.js +42 -0
- package/dist/shared/graph-layout/common.js.map +1 -0
- package/dist/shared/graph-layout/custom-layout.d.ts +35 -0
- package/dist/shared/graph-layout/custom-layout.d.ts.map +1 -0
- package/dist/shared/graph-layout/custom-layout.js +29 -0
- package/dist/shared/graph-layout/custom-layout.js.map +1 -0
- package/dist/shared/graph-layout/fcose-layout.d.ts +88 -0
- package/dist/shared/graph-layout/fcose-layout.d.ts.map +1 -0
- package/dist/shared/graph-layout/fcose-layout.js +196 -0
- package/dist/shared/graph-layout/fcose-layout.js.map +1 -0
- package/dist/shared/graph-layout/force-atlas-layout.d.ts +79 -0
- package/dist/shared/graph-layout/force-atlas-layout.d.ts.map +1 -0
- package/dist/shared/graph-layout/force-atlas-layout.js +163 -0
- package/dist/shared/graph-layout/force-atlas-layout.js.map +1 -0
- package/dist/shared/graph-layout/index.d.ts +25 -0
- package/dist/shared/graph-layout/index.d.ts.map +1 -0
- package/dist/shared/graph-layout/index.js +25 -0
- package/dist/shared/graph-layout/index.js.map +1 -0
- package/dist/shared/graph-layout/marketing-layout.d.ts +30 -0
- package/dist/shared/graph-layout/marketing-layout.d.ts.map +1 -0
- package/dist/shared/graph-layout/marketing-layout.js +105 -0
- package/dist/shared/graph-layout/marketing-layout.js.map +1 -0
- package/dist/shared/graph-layout/planar-layout.d.ts +32 -0
- package/dist/shared/graph-layout/planar-layout.d.ts.map +1 -0
- package/dist/shared/graph-layout/planar-layout.js +95 -0
- package/dist/shared/graph-layout/planar-layout.js.map +1 -0
- package/dist/shared/graph-layout/spring-layout.d.ts +56 -0
- package/dist/shared/graph-layout/spring-layout.d.ts.map +1 -0
- package/dist/shared/graph-layout/spring-layout.js +148 -0
- package/dist/shared/graph-layout/spring-layout.js.map +1 -0
- package/dist/shared/parsers.d.ts +63 -0
- package/dist/shared/parsers.d.ts.map +1 -0
- package/dist/shared/parsers.js +176 -0
- package/dist/shared/parsers.js.map +1 -0
- package/dist/shared/pointer-context.d.ts +21 -0
- package/dist/shared/pointer-context.d.ts.map +1 -0
- package/dist/shared/pointer-context.js +23 -0
- package/dist/shared/pointer-context.js.map +1 -0
- package/dist/shared/rendering/background.d.ts +32 -0
- package/dist/shared/rendering/background.d.ts.map +1 -0
- package/dist/shared/rendering/background.js +91 -0
- package/dist/shared/rendering/background.js.map +1 -0
- package/dist/shared/rendering/colors.d.ts +27 -0
- package/dist/shared/rendering/colors.d.ts.map +1 -0
- package/dist/shared/rendering/colors.js +14 -0
- package/dist/shared/rendering/colors.js.map +1 -0
- package/dist/shared/rendering/edge/curve.d.ts +51 -0
- package/dist/shared/rendering/edge/curve.d.ts.map +1 -0
- package/dist/shared/rendering/edge/curve.js +122 -0
- package/dist/shared/rendering/edge/curve.js.map +1 -0
- package/dist/shared/rendering/edge/definitions.d.ts +71 -0
- package/dist/shared/rendering/edge/definitions.d.ts.map +1 -0
- package/dist/shared/rendering/edge/definitions.js +31 -0
- package/dist/shared/rendering/edge/definitions.js.map +1 -0
- package/dist/shared/rendering/edge/edge-object.d.ts +93 -0
- package/dist/shared/rendering/edge/edge-object.d.ts.map +1 -0
- package/dist/shared/rendering/edge/edge-object.js +483 -0
- package/dist/shared/rendering/edge/edge-object.js.map +1 -0
- package/dist/shared/rendering/edge/index.d.ts +19 -0
- package/dist/shared/rendering/edge/index.d.ts.map +1 -0
- package/dist/shared/rendering/edge/index.js +19 -0
- package/dist/shared/rendering/edge/index.js.map +1 -0
- package/dist/shared/rendering/edge/symbols.d.ts +40 -0
- package/dist/shared/rendering/edge/symbols.d.ts.map +1 -0
- package/dist/shared/rendering/edge/symbols.js +150 -0
- package/dist/shared/rendering/edge/symbols.js.map +1 -0
- package/dist/shared/rendering/engine.d.ts +342 -0
- package/dist/shared/rendering/engine.d.ts.map +1 -0
- package/dist/shared/rendering/engine.js +990 -0
- package/dist/shared/rendering/engine.js.map +1 -0
- package/dist/shared/rendering/node/definitions.d.ts +57 -0
- package/dist/shared/rendering/node/definitions.d.ts.map +1 -0
- package/dist/shared/rendering/node/definitions.js +2 -0
- package/dist/shared/rendering/node/definitions.js.map +1 -0
- package/dist/shared/rendering/node/index.d.ts +20 -0
- package/dist/shared/rendering/node/index.d.ts.map +1 -0
- package/dist/shared/rendering/node/index.js +19 -0
- package/dist/shared/rendering/node/index.js.map +1 -0
- package/dist/shared/rendering/node/node-object.d.ts +77 -0
- package/dist/shared/rendering/node/node-object.d.ts.map +1 -0
- package/dist/shared/rendering/node/node-object.js +241 -0
- package/dist/shared/rendering/node/node-object.js.map +1 -0
- package/dist/shared/rendering/node/utils.d.ts +33 -0
- package/dist/shared/rendering/node/utils.d.ts.map +1 -0
- package/dist/shared/rendering/node/utils.js +27 -0
- package/dist/shared/rendering/node/utils.js.map +1 -0
- package/dist/shared/rendering/svg.d.ts +26 -0
- package/dist/shared/rendering/svg.d.ts.map +1 -0
- package/dist/shared/rendering/svg.js +44 -0
- package/dist/shared/rendering/svg.js.map +1 -0
- package/dist/shared/rendering/text.d.ts +33 -0
- package/dist/shared/rendering/text.d.ts.map +1 -0
- package/dist/shared/rendering/text.js +107 -0
- package/dist/shared/rendering/text.js.map +1 -0
- package/dist/shared/rendering/texture-cache.d.ts +32 -0
- package/dist/shared/rendering/texture-cache.d.ts.map +1 -0
- package/dist/shared/rendering/texture-cache.js +76 -0
- package/dist/shared/rendering/texture-cache.js.map +1 -0
- package/dist/shared/rendering/use-render-engine.d.ts +86 -0
- package/dist/shared/rendering/use-render-engine.d.ts.map +1 -0
- package/dist/shared/rendering/use-render-engine.js +89 -0
- package/dist/shared/rendering/use-render-engine.js.map +1 -0
- package/dist/shared/rendering/utils.d.ts +24 -0
- package/dist/shared/rendering/utils.d.ts.map +1 -0
- package/dist/shared/rendering/utils.js +60 -0
- package/dist/shared/rendering/utils.js.map +1 -0
- package/dist/shared/serializer.d.ts +39 -0
- package/dist/shared/serializer.d.ts.map +1 -0
- package/dist/shared/serializer.js +131 -0
- package/dist/shared/serializer.js.map +1 -0
- package/dist/shared/settings-context.d.ts +56 -0
- package/dist/shared/settings-context.d.ts.map +1 -0
- package/dist/shared/settings-context.js +36 -0
- package/dist/shared/settings-context.js.map +1 -0
- package/dist/shared/styles.d.ts +4 -0
- package/dist/shared/styles.d.ts.map +1 -0
- package/dist/shared/styles.js +52 -0
- package/dist/shared/styles.js.map +1 -0
- package/dist/shared/use-causal-graph-editor.d.ts +19 -0
- package/dist/shared/use-causal-graph-editor.d.ts.map +1 -0
- package/dist/shared/use-causal-graph-editor.js +58 -0
- package/dist/shared/use-causal-graph-editor.js.map +1 -0
- package/dist/shared/use-drag-mode.d.ts +33 -0
- package/dist/shared/use-drag-mode.d.ts.map +1 -0
- package/dist/shared/use-drag-mode.js +75 -0
- package/dist/shared/use-drag-mode.js.map +1 -0
- package/dist/shared/use-edge-encoder.d.ts +45 -0
- package/dist/shared/use-edge-encoder.d.ts.map +1 -0
- package/dist/shared/use-edge-encoder.js +121 -0
- package/dist/shared/use-edge-encoder.js.map +1 -0
- package/dist/shared/utils.d.ts +52 -0
- package/dist/shared/utils.d.ts.map +1 -0
- package/dist/shared/utils.js +99 -0
- package/dist/shared/utils.js.map +1 -0
- package/dist/types.d.ts +213 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +98 -0
- package/dist/types.js.map +1 -0
- package/package.json +123 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { GraphApi } from '../../../use-causal-graph-editor';
|
|
2
|
+
import { EdgeConstraintItem, GraphState } from '../../../../types';
|
|
3
|
+
export interface EdgeInfoContentProps {
|
|
4
|
+
/** Graph API */
|
|
5
|
+
api: GraphApi;
|
|
6
|
+
/** Handler to confirm/reverse currently selected edge */
|
|
7
|
+
onConfirmDirection: (reverse: boolean) => void;
|
|
8
|
+
/** Handler to update a given constraint */
|
|
9
|
+
onUpdateConstraint: (constraint: EdgeConstraintItem) => void | Promise<void>;
|
|
10
|
+
/** Constraint related to the edge */
|
|
11
|
+
selectedConstraint?: EdgeConstraintItem;
|
|
12
|
+
/** Currently selected edge */
|
|
13
|
+
selectedEdge: [string, string];
|
|
14
|
+
/** Graph data */
|
|
15
|
+
state: GraphState;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Content of the editor frame info panel related to the selected edge.
|
|
19
|
+
*/
|
|
20
|
+
declare function EdgeInfoContent(props: EdgeInfoContentProps): JSX.Element;
|
|
21
|
+
export default EdgeInfoContent;
|
|
22
|
+
//# sourceMappingURL=edge-info-content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge-info-content.d.ts","sourceRoot":"","sources":["../../../../../src/shared/editor-overlay/panel-content/edge/edge-info-content.tsx"],"names":[],"mappings":"AAiBA,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAOxD,MAAM,WAAW,oBAAoB;IACjC,gBAAgB;IAChB,GAAG,EAAE,QAAQ,CAAC;IACd,yDAAyD;IACzD,kBAAkB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,2CAA2C;IAC3C,kBAAkB,EAAE,CAAC,UAAU,EAAE,kBAAkB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7E,qCAAqC;IACrC,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IACxC,8BAA8B;IAC9B,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,kBAAkB;IAClB,KAAK,EAAE,UAAU,CAAC;CACrB;AAED;;GAEG;AACH,iBAAS,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,GAAG,CAAC,OAAO,CAmCjE;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2023 Impulse Innovations Limited
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { useSettings } from '../../../settings-context';
|
|
19
|
+
import { ColumnWrapper } from '../styled';
|
|
20
|
+
import EdgeEditor from './edge-editor';
|
|
21
|
+
import DescriptionEditor from './sections/description-editor';
|
|
22
|
+
import DirectionEditor from './sections/direction-editor';
|
|
23
|
+
/**
|
|
24
|
+
* Content of the editor frame info panel related to the selected edge.
|
|
25
|
+
*/
|
|
26
|
+
function EdgeInfoContent(props) {
|
|
27
|
+
var _a, _b;
|
|
28
|
+
const { editable } = useSettings();
|
|
29
|
+
const [source, target] = props.selectedEdge;
|
|
30
|
+
const edgeAttributes = props.state.graph.getEdgeAttributes(source, target);
|
|
31
|
+
const sourceAttributes = props.state.graph.getNodeAttributes(source);
|
|
32
|
+
const targetAttributes = props.state.graph.getNodeAttributes(target);
|
|
33
|
+
return (_jsxs(_Fragment, { children: [_jsx(DirectionEditor, { edgeType: edgeAttributes.edge_type, onConfirmDirection: props.onConfirmDirection, source: (_a = sourceAttributes['meta.rendering_properties.label']) !== null && _a !== void 0 ? _a : source, target: (_b = targetAttributes['meta.rendering_properties.label']) !== null && _b !== void 0 ? _b : target }), _jsxs(ColumnWrapper, { "$gap": 1, "$scrollable": true, children: [(editable || edgeAttributes['meta.rendering_properties.description']) && (_jsx(DescriptionEditor, { api: props.api, edge: edgeAttributes, selectedEdge: props.selectedEdge })), editable && (_jsx(EdgeEditor, { api: props.api, edge: edgeAttributes, edgeConstraint: props.selectedConstraint, onUpdateConstraint: props.onUpdateConstraint, source: source, state: props.state, target: target }))] })] }));
|
|
34
|
+
}
|
|
35
|
+
export default EdgeInfoContent;
|
|
36
|
+
//# sourceMappingURL=edge-info-content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge-info-content.js","sourceRoot":"","sources":["../../../../../src/shared/editor-overlay/panel-content/edge/edge-info-content.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAIvD,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,UAAU,MAAM,eAAe,CAAC;AACvC,OAAO,iBAAiB,MAAM,+BAA+B,CAAC;AAC9D,OAAO,eAAe,MAAM,6BAA6B,CAAC;AAiB1D;;GAEG;AACH,SAAS,eAAe,CAAC,KAA2B;;IAChD,MAAM,EAAE,QAAQ,EAAE,GAAG,WAAW,EAAE,CAAC;IAEnC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC;IAC5C,MAAM,cAAc,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC3E,MAAM,gBAAgB,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;IACrE,MAAM,gBAAgB,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAErE,OAAO,CACH,8BACI,KAAC,eAAe,IACZ,QAAQ,EAAE,cAAc,CAAC,SAAS,EAClC,kBAAkB,EAAE,KAAK,CAAC,kBAAkB,EAC5C,MAAM,EAAE,MAAA,gBAAgB,CAAC,iCAAiC,CAAC,mCAAI,MAAM,EACrE,MAAM,EAAE,MAAA,gBAAgB,CAAC,iCAAiC,CAAC,mCAAI,MAAM,GACvE,EAEF,MAAC,aAAa,YAAO,CAAC,kCACjB,CAAC,QAAQ,IAAI,cAAc,CAAC,uCAAuC,CAAC,CAAC,IAAI,CACtE,KAAC,iBAAiB,IAAC,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,IAAI,EAAE,cAAc,EAAE,YAAY,EAAE,KAAK,CAAC,YAAY,GAAI,CAChG,EACA,QAAQ,IAAI,CACT,KAAC,UAAU,IACP,GAAG,EAAE,KAAK,CAAC,GAAG,EACd,IAAI,EAAE,cAAc,EACpB,cAAc,EAAE,KAAK,CAAC,kBAAkB,EACxC,kBAAkB,EAAE,KAAK,CAAC,kBAAkB,EAC5C,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,MAAM,EAAE,MAAM,GAChB,CACL,IACW,IACjB,CACN,CAAC;AACN,CAAC;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023 Impulse Innovations Limited
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { GraphApi } from '../../../use-causal-graph-editor';
|
|
18
|
+
import { EdgeConstraintItem, GraphState, SimulationEdge } from '../../../../types';
|
|
19
|
+
export interface EdgeEditorProps {
|
|
20
|
+
/** Graph API */
|
|
21
|
+
api: GraphApi;
|
|
22
|
+
/** The edge meta data */
|
|
23
|
+
edge: SimulationEdge;
|
|
24
|
+
/** Edge constraint for the specific edge */
|
|
25
|
+
edgeConstraint: EdgeConstraintItem;
|
|
26
|
+
/** Handler called when the type of the constraint is updated */
|
|
27
|
+
onUpdateConstraint: (constraint: EdgeConstraintItem) => void | Promise<void>;
|
|
28
|
+
/** The id of the source node */
|
|
29
|
+
source: string;
|
|
30
|
+
/** Graph data */
|
|
31
|
+
state: GraphState;
|
|
32
|
+
/** The id of the target node */
|
|
33
|
+
target: string;
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=editor-props.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-props.d.ts","sourceRoot":"","sources":["../../../../../src/shared/editor-overlay/panel-content/edge/editor-props.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AAExE,MAAM,WAAW,eAAe;IAC5B,gBAAgB;IAChB,GAAG,EAAE,QAAQ,CAAC;IACd,yBAAyB;IACzB,IAAI,EAAE,cAAc,CAAC;IACrB,4CAA4C;IAC5C,cAAc,EAAE,kBAAkB,CAAC;IACnC,gEAAgE;IAChE,kBAAkB,EAAE,CAAC,UAAU,EAAE,kBAAkB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7E,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB;IAClB,KAAK,EAAE,UAAU,CAAC;IAClB,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAC;CAClB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"editor-props.js","sourceRoot":"","sources":["../../../../../src/shared/editor-overlay/panel-content/edge/editor-props.tsx"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023 Impulse Innovations Limited
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { EdgeEditorProps } from './editor-props';
|
|
18
|
+
/**
|
|
19
|
+
* Edge Editor for EdgeEncoder EditorMode
|
|
20
|
+
*/
|
|
21
|
+
declare function EncoderEditor(props: EdgeEditorProps): JSX.Element;
|
|
22
|
+
export default EncoderEditor;
|
|
23
|
+
//# sourceMappingURL=encoder-editor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encoder-editor.d.ts","sourceRoot":"","sources":["../../../../../src/shared/editor-overlay/panel-content/edge/encoder-editor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjD;;GAEG;AACH,iBAAS,aAAa,CAAC,KAAK,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CAW1D;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { ConstraintEditor } from './sections';
|
|
3
|
+
/**
|
|
4
|
+
* Edge Editor for EdgeEncoder EditorMode
|
|
5
|
+
*/
|
|
6
|
+
function EncoderEditor(props) {
|
|
7
|
+
return (_jsx(_Fragment, { children: _jsx(ConstraintEditor, { edgeConstraint: props.edgeConstraint, onUpdate: props.onUpdateConstraint, source: props.source, target: props.target }) }));
|
|
8
|
+
}
|
|
9
|
+
export default EncoderEditor;
|
|
10
|
+
//# sourceMappingURL=encoder-editor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"encoder-editor.js","sourceRoot":"","sources":["../../../../../src/shared/editor-overlay/panel-content/edge/encoder-editor.tsx"],"names":[],"mappings":";AAiBA,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C;;GAEG;AACH,SAAS,aAAa,CAAC,KAAsB;IACzC,OAAO,CACH,4BACI,KAAC,gBAAgB,IACb,cAAc,EAAE,KAAK,CAAC,cAAc,EACpC,QAAQ,EAAE,KAAK,CAAC,kBAAkB,EAClC,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,MAAM,EAAE,KAAK,CAAC,MAAM,GACtB,GACH,CACN,CAAC;AACN,CAAC;AAED,eAAe,aAAa,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023 Impulse Innovations Limited
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export { default as EdgeInfoContent } from './edge-info-content';
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/shared/editor-overlay/panel-content/edge/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023 Impulse Innovations Limited
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
export { default as EdgeInfoContent } from './edge-info-content';
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/shared/editor-overlay/panel-content/edge/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright 2023 Impulse Innovations Limited
|
|
3
|
+
*
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
import { EdgeEditorProps } from './editor-props';
|
|
18
|
+
/**
|
|
19
|
+
* EdgeEditor for PAG EditorMode
|
|
20
|
+
*/
|
|
21
|
+
declare function PagEditor(props: EdgeEditorProps): JSX.Element;
|
|
22
|
+
export default PagEditor;
|
|
23
|
+
//# sourceMappingURL=pag-editor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pag-editor.d.ts","sourceRoot":"","sources":["../../../../../src/shared/editor-overlay/panel-content/edge/pag-editor.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAGjD;;GAEG;AACH,iBAAS,SAAS,CAAC,KAAK,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CAYtD;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { EdgeTypeEditor } from './sections';
|
|
3
|
+
/**
|
|
4
|
+
* EdgeEditor for PAG EditorMode
|
|
5
|
+
*/
|
|
6
|
+
function PagEditor(props) {
|
|
7
|
+
return (_jsx(_Fragment, { children: _jsx(EdgeTypeEditor, { api: props.api, edge: props.edge, source: props.source, state: props.state, target: props.target }) }));
|
|
8
|
+
}
|
|
9
|
+
export default PagEditor;
|
|
10
|
+
//# sourceMappingURL=pag-editor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pag-editor.js","sourceRoot":"","sources":["../../../../../src/shared/editor-overlay/panel-content/edge/pag-editor.tsx"],"names":[],"mappings":";AAiBA,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAE5C;;GAEG;AACH,SAAS,SAAS,CAAC,KAAsB;IACrC,OAAO,CACH,4BACI,KAAC,cAAc,IACX,GAAG,EAAE,KAAK,CAAC,GAAG,EACd,IAAI,EAAE,KAAK,CAAC,IAAI,EAChB,MAAM,EAAE,KAAK,CAAC,MAAM,EACpB,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,MAAM,EAAE,KAAK,CAAC,MAAM,GACtB,GACH,CACN,CAAC;AACN,CAAC;AAED,eAAe,SAAS,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { EdgeEditorProps } from './editor-props';
|
|
2
|
+
/**
|
|
3
|
+
* EdgeEditor for RESOLVER_BASIC and RESOLVER_ADVANCED EditorMode
|
|
4
|
+
*/
|
|
5
|
+
declare function ResolverEditor(props: EdgeEditorProps): JSX.Element;
|
|
6
|
+
export default ResolverEditor;
|
|
7
|
+
//# sourceMappingURL=resolver-editor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolver-editor.d.ts","sourceRoot":"","sources":["../../../../../src/shared/editor-overlay/panel-content/edge/resolver-editor.tsx"],"names":[],"mappings":"AAsBA,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD;;GAEG;AACH,iBAAS,cAAc,CAAC,KAAK,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CAqB3D;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2023 Impulse Innovations Limited
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { Button } from '@darajs/ui-components';
|
|
19
|
+
import { useSettings } from '../../../settings-context';
|
|
20
|
+
import { EdgeType, EditorMode } from '../../../../types';
|
|
21
|
+
import { ColumnWrapper } from '../styled';
|
|
22
|
+
/**
|
|
23
|
+
* EdgeEditor for RESOLVER_BASIC and RESOLVER_ADVANCED EditorMode
|
|
24
|
+
*/
|
|
25
|
+
function ResolverEditor(props) {
|
|
26
|
+
const { editorMode } = useSettings();
|
|
27
|
+
return (_jsx(ColumnWrapper, { "$fillHeight": true, "$gap": 2, children: editorMode === EditorMode.RESOLVER &&
|
|
28
|
+
!(props.edge['meta.rendering_properties.accepted'] || props.edge['meta.rendering_properties.forced']) && (_jsx("div", { style: { display: 'flex', justifyContent: 'center' }, children: _jsx(Button, { disabled: props.edge.edge_type !== EdgeType.DIRECTED_EDGE, onClick: () => props.api.acceptEdge([props.source, props.target]), style: { width: 'max-content' }, children: "Accept Edge" }) })) }));
|
|
29
|
+
}
|
|
30
|
+
export default ResolverEditor;
|
|
31
|
+
//# sourceMappingURL=resolver-editor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"resolver-editor.js","sourceRoot":"","sources":["../../../../../src/shared/editor-overlay/panel-content/edge/resolver-editor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE/C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,WAAW,CAAC;AAG1C;;GAEG;AACH,SAAS,cAAc,CAAC,KAAsB;IAC1C,MAAM,EAAE,UAAU,EAAE,GAAG,WAAW,EAAE,CAAC;IAErC,OAAO,CACH,KAAC,aAAa,iCAAmB,CAAC,YAC7B,UAAU,KAAK,UAAU,CAAC,QAAQ;YAC/B,CAAC,CACG,KAAK,CAAC,IAAI,CAAC,oCAAoC,CAAC,IAAI,KAAK,CAAC,IAAI,CAAC,kCAAkC,CAAC,CACrG,IAAI,CACD,cAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,YACrD,KAAC,MAAM,IACH,QAAQ,EAAE,KAAK,CAAC,IAAI,CAAC,SAAS,KAAK,QAAQ,CAAC,aAAa,EACzD,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,EACjE,KAAK,EAAE,EAAE,KAAK,EAAE,aAAa,EAAE,4BAG1B,GACP,CACT,GACO,CACnB,CAAC;AACN,CAAC;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { EdgeConstraintItem } from '../../../../../types';
|
|
2
|
+
export interface ConstraintEditorProps {
|
|
3
|
+
/**
|
|
4
|
+
* Edge constraint for the specific edge
|
|
5
|
+
*/
|
|
6
|
+
edgeConstraint?: EdgeConstraintItem;
|
|
7
|
+
/**
|
|
8
|
+
* Handler called when the type of the constraint is updated
|
|
9
|
+
*/
|
|
10
|
+
onUpdate: (constraint: EdgeConstraintItem) => void | Promise<void>;
|
|
11
|
+
/**
|
|
12
|
+
* Source of the selected edge
|
|
13
|
+
*/
|
|
14
|
+
source: string;
|
|
15
|
+
/**
|
|
16
|
+
* Target of the selected edge
|
|
17
|
+
*/
|
|
18
|
+
target: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* ConstraintEditor component represents a constraint related to a specific edge.
|
|
22
|
+
* It should be displayed inside the EditorFrame's sidebar to allow the user to
|
|
23
|
+
* specify a constraint type & type of relationship.
|
|
24
|
+
*/
|
|
25
|
+
declare function ConstraintEditor(props: ConstraintEditorProps): JSX.Element;
|
|
26
|
+
export default ConstraintEditor;
|
|
27
|
+
//# sourceMappingURL=constraint-editor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constraint-editor.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/editor-overlay/panel-content/edge/sections/constraint-editor.tsx"],"names":[],"mappings":"AAmBA,OAAO,EAAE,kBAAkB,EAAsB,MAAM,QAAQ,CAAC;AA4ChE,MAAM,WAAW,qBAAqB;IAClC;;OAEG;IACH,cAAc,CAAC,EAAE,kBAAkB,CAAC;IACpC;;OAEG;IACH,QAAQ,EAAE,CAAC,UAAU,EAAE,kBAAkB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnE;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAClB;AAED;;;;GAIG;AACH,iBAAS,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,GAAG,CAAC,OAAO,CAsBnE;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2023 Impulse Innovations Limited
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
import { ButtonBar, Tooltip } from '@darajs/ui-components';
|
|
19
|
+
import { ArrowRightLong, ArrowsHorizontal, Ban } from '@darajs/ui-icons';
|
|
20
|
+
import { EdgeConstraintType } from '../../../../../types';
|
|
21
|
+
import { ColumnWrapper, SectionTitle } from '../../styled';
|
|
22
|
+
const constraintItems = [
|
|
23
|
+
{
|
|
24
|
+
label: (_jsx(Tooltip, { content: "Undirected", children: _jsx("span", { children: _jsx(ArrowsHorizontal, { size: "lg" }) }) })),
|
|
25
|
+
value: EdgeConstraintType.UNDIRECTED,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
label: (_jsx(Tooltip, { content: "Directed", children: _jsx("span", { children: _jsx(ArrowRightLong, { size: "lg" }) }) })),
|
|
29
|
+
value: EdgeConstraintType.DIRECTED,
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
label: (_jsx(Tooltip, { content: "Forbidden", children: _jsx("span", { children: _jsx(Ban, { size: "lg" }) }) })),
|
|
33
|
+
value: EdgeConstraintType.FORBIDDEN,
|
|
34
|
+
},
|
|
35
|
+
];
|
|
36
|
+
/**
|
|
37
|
+
* ConstraintEditor component represents a constraint related to a specific edge.
|
|
38
|
+
* It should be displayed inside the EditorFrame's sidebar to allow the user to
|
|
39
|
+
* specify a constraint type & type of relationship.
|
|
40
|
+
*/
|
|
41
|
+
function ConstraintEditor(props) {
|
|
42
|
+
function updateConstraintType(constraintType) {
|
|
43
|
+
props.onUpdate({
|
|
44
|
+
id: props.edgeConstraint.id,
|
|
45
|
+
source: props.source,
|
|
46
|
+
target: props.target,
|
|
47
|
+
type: constraintType,
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
return (_jsxs(ColumnWrapper, { children: [_jsx(SectionTitle, { children: "Connection" }), _jsx(ButtonBar, { initialValue: constraintItems.find((i) => i.value === props.edgeConstraint.type), items: constraintItems, onSelect: (e) => updateConstraintType(e.value), styling: "secondary" }, props.edgeConstraint.id)] }));
|
|
51
|
+
}
|
|
52
|
+
export default ConstraintEditor;
|
|
53
|
+
//# sourceMappingURL=constraint-editor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constraint-editor.js","sourceRoot":"","sources":["../../../../../../src/shared/editor-overlay/panel-content/edge/sections/constraint-editor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,SAAS,EAAQ,OAAO,EAAE,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAEzE,OAAO,EAAsB,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAEhE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAS3D,MAAM,eAAe,GAAe;IAChC;QACI,KAAK,EAAE,CACH,KAAC,OAAO,IAAC,OAAO,EAAC,YAAY,YACzB,yBACI,KAAC,gBAAgB,IAAC,IAAI,EAAC,IAAI,GAAG,GAC3B,GACD,CACb;QACD,KAAK,EAAE,kBAAkB,CAAC,UAAU;KACvC;IACD;QACI,KAAK,EAAE,CACH,KAAC,OAAO,IAAC,OAAO,EAAC,UAAU,YACvB,yBACI,KAAC,cAAc,IAAC,IAAI,EAAC,IAAI,GAAG,GACzB,GACD,CACb;QACD,KAAK,EAAE,kBAAkB,CAAC,QAAQ;KACrC;IACD;QACI,KAAK,EAAE,CACH,KAAC,OAAO,IAAC,OAAO,EAAC,WAAW,YACxB,yBACI,KAAC,GAAG,IAAC,IAAI,EAAC,IAAI,GAAG,GACd,GACD,CACb;QACD,KAAK,EAAE,kBAAkB,CAAC,SAAS;KACtC;CACJ,CAAC;AAqBF;;;;GAIG;AACH,SAAS,gBAAgB,CAAC,KAA4B;IAClD,SAAS,oBAAoB,CAAC,cAA0C;QACpE,KAAK,CAAC,QAAQ,CAAC;YACX,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,EAAE;YAC3B,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,IAAI,EAAE,cAAc;SACvB,CAAC,CAAC;IACP,CAAC;IAED,OAAO,CACH,MAAC,aAAa,eACV,KAAC,YAAY,6BAA0B,EACvC,KAAC,SAAS,IACN,YAAY,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,KAAK,CAAC,cAAc,CAAC,IAAI,CAAS,EACxF,KAAK,EAAE,eAAsB,EAE7B,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC,KAAK,CAAC,EAC9C,OAAO,EAAC,WAAW,IAFd,KAAK,CAAC,cAAc,CAAC,EAAE,CAG9B,IACU,CACnB,CAAC;AACN,CAAC;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { GraphApi } from '../../../../use-causal-graph-editor';
|
|
2
|
+
import { SimulationEdge } from '../../../../../types';
|
|
3
|
+
interface DescriptionEditorProps {
|
|
4
|
+
/** Graph API */
|
|
5
|
+
api: GraphApi;
|
|
6
|
+
/**
|
|
7
|
+
* Selected edge attributes
|
|
8
|
+
*/
|
|
9
|
+
edge: SimulationEdge;
|
|
10
|
+
/** Selected edge */
|
|
11
|
+
selectedEdge: [string, string];
|
|
12
|
+
}
|
|
13
|
+
declare function DescriptionEditor(props: DescriptionEditorProps): JSX.Element;
|
|
14
|
+
export default DescriptionEditor;
|
|
15
|
+
//# sourceMappingURL=description-editor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"description-editor.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/editor-overlay/panel-content/edge/sections/description-editor.tsx"],"names":[],"mappings":"AAuBA,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAC3D,OAAO,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AA2BxC,UAAU,sBAAsB;IAC5B,gBAAgB;IAChB,GAAG,EAAE,QAAQ,CAAC;IACd;;OAEG;IACH,IAAI,EAAE,cAAc,CAAC;IACrB,oBAAoB;IACpB,YAAY,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,iBAAS,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,GAAG,CAAC,OAAO,CA4BrE;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2023 Impulse Innovations Limited
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
import debounce from 'lodash/debounce';
|
|
19
|
+
import { useCallback, useMemo, useState } from 'react';
|
|
20
|
+
import styled from '@darajs/styled-components';
|
|
21
|
+
import { Textarea } from '@darajs/ui-components';
|
|
22
|
+
import { useSettings } from '../../../../settings-context';
|
|
23
|
+
import { ColumnWrapper, SectionTitle } from '../../styled';
|
|
24
|
+
const EdgeNote = styled(Textarea) `
|
|
25
|
+
width: 100%;
|
|
26
|
+
|
|
27
|
+
div,
|
|
28
|
+
textarea {
|
|
29
|
+
width: 100%;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
& > div::after {
|
|
33
|
+
background-color: ${(props) => props.theme.colors.blue1};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
textarea {
|
|
37
|
+
resize: vertical;
|
|
38
|
+
max-height: 8rem;
|
|
39
|
+
background-color: ${(props) => props.theme.colors.blue1};
|
|
40
|
+
|
|
41
|
+
&:disabled {
|
|
42
|
+
color: ${(props) => props.theme.colors.grey3};
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
`;
|
|
46
|
+
function DescriptionEditor(props) {
|
|
47
|
+
const { editable } = useSettings();
|
|
48
|
+
const [note, setNote] = useState(() => props.edge['meta.rendering_properties.description'] || '');
|
|
49
|
+
const updateNote = useCallback((newDesc) => {
|
|
50
|
+
props.api.updateEdgeNote(props.selectedEdge, newDesc);
|
|
51
|
+
}, [props.api, props.selectedEdge]);
|
|
52
|
+
const debouncedUpdateNote = useMemo(() => debounce(updateNote, 300), [updateNote]);
|
|
53
|
+
function onNoteChange(newDesc) {
|
|
54
|
+
setNote(newDesc);
|
|
55
|
+
debouncedUpdateNote(newDesc);
|
|
56
|
+
}
|
|
57
|
+
return (_jsxs(ColumnWrapper, { children: [_jsx(SectionTitle, { children: "Note" }), _jsx(EdgeNote, { disabled: !editable, onChange: (newDesc) => onNoteChange(newDesc), placeholder: "Add a note.", value: note })] }));
|
|
58
|
+
}
|
|
59
|
+
export default DescriptionEditor;
|
|
60
|
+
//# sourceMappingURL=description-editor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"description-editor.js","sourceRoot":"","sources":["../../../../../../src/shared/editor-overlay/panel-content/edge/sections/description-editor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,QAAQ,MAAM,iBAAiB,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAIvD,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAE3D,MAAM,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC,CAAA;;;;;;;;;4BASL,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK;;;;;;4BAMnC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK;;;qBAG1C,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK;;;CAGvD,CAAC;AAaF,SAAS,iBAAiB,CAAC,KAA6B;IACpD,MAAM,EAAE,QAAQ,EAAE,GAAG,WAAW,EAAE,CAAC;IACnC,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,uCAAuC,CAAC,IAAI,EAAE,CAAC,CAAC;IAElG,MAAM,UAAU,GAAG,WAAW,CAC1B,CAAC,OAAe,EAAE,EAAE;QAChB,KAAK,CAAC,GAAG,CAAC,cAAc,CAAC,KAAK,CAAC,YAAY,EAAE,OAAO,CAAC,CAAC;IAC1D,CAAC,EACD,CAAC,KAAK,CAAC,GAAG,EAAE,KAAK,CAAC,YAAY,CAAC,CAClC,CAAC;IACF,MAAM,mBAAmB,GAAG,OAAO,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,GAAG,CAAC,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC;IAEnF,SAAS,YAAY,CAAC,OAAe;QACjC,OAAO,CAAC,OAAO,CAAC,CAAC;QACjB,mBAAmB,CAAC,OAAO,CAAC,CAAC;IACjC,CAAC;IAED,OAAO,CACH,MAAC,aAAa,eACV,KAAC,YAAY,uBAAoB,EACjC,KAAC,QAAQ,IACL,QAAQ,EAAE,CAAC,QAAQ,EACnB,QAAQ,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,YAAY,CAAC,OAAO,CAAC,EAC5C,WAAW,EAAC,aAAa,EACzB,KAAK,EAAE,IAAI,GACb,IACU,CACnB,CAAC;AACN,CAAC;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { EdgeType } from '../../../../../types';
|
|
2
|
+
interface DirectionEditorProps {
|
|
3
|
+
/** Current edge type */
|
|
4
|
+
edgeType: EdgeType;
|
|
5
|
+
/** Handler to confirm/reverse currently selected edge */
|
|
6
|
+
onConfirmDirection: (reverse: boolean) => void;
|
|
7
|
+
/**
|
|
8
|
+
* Name of the edge source
|
|
9
|
+
*/
|
|
10
|
+
source: string;
|
|
11
|
+
/**
|
|
12
|
+
* Name of the edge target
|
|
13
|
+
*/
|
|
14
|
+
target: string;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* Displays the direction of the edge, allows user to change in resolver mode
|
|
18
|
+
*/
|
|
19
|
+
declare function DirectionEditor(props: DirectionEditorProps): JSX.Element;
|
|
20
|
+
export default DirectionEditor;
|
|
21
|
+
//# sourceMappingURL=direction-editor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"direction-editor.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/editor-overlay/panel-content/edge/sections/direction-editor.tsx"],"names":[],"mappings":"AAqBA,OAAO,EAAE,QAAQ,EAAc,MAAM,QAAQ,CAAC;AAmE9C,UAAU,oBAAoB;IAC1B,wBAAwB;IACxB,QAAQ,EAAE,QAAQ,CAAC;IACnB,yDAAyD;IACzD,kBAAkB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,iBAAS,eAAe,CAAC,KAAK,EAAE,oBAAoB,GAAG,GAAG,CAAC,OAAO,CAoCjE;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* Copyright 2023 Impulse Innovations Limited
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
7
|
+
* you may not use this file except in compliance with the License.
|
|
8
|
+
* You may obtain a copy of the License at
|
|
9
|
+
*
|
|
10
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
11
|
+
*
|
|
12
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
13
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
14
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
15
|
+
* See the License for the specific language governing permissions and
|
|
16
|
+
* limitations under the License.
|
|
17
|
+
*/
|
|
18
|
+
import styled from '@darajs/styled-components';
|
|
19
|
+
import { Button } from '@darajs/ui-components';
|
|
20
|
+
import { ArrowLeft, ArrowRight } from '@darajs/ui-icons';
|
|
21
|
+
import { useSettings } from '../../../../settings-context';
|
|
22
|
+
import { EdgeType, EditorMode } from '../../../../../types';
|
|
23
|
+
const EdgeName = styled.h6 `
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
|
|
26
|
+
width: 40%;
|
|
27
|
+
max-height: 3.75rem;
|
|
28
|
+
margin: 0;
|
|
29
|
+
|
|
30
|
+
font-size: 1rem;
|
|
31
|
+
font-weight: 700;
|
|
32
|
+
line-height: 1.25rem;
|
|
33
|
+
color: ${(props) => props.theme.colors.text};
|
|
34
|
+
text-align: center;
|
|
35
|
+
text-overflow: ellipsis;
|
|
36
|
+
white-space: nowrap;
|
|
37
|
+
`;
|
|
38
|
+
const ArrowsWrapper = styled.div `
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
width: 10%;
|
|
42
|
+
color: ${(props) => props.theme.colors.text};
|
|
43
|
+
`;
|
|
44
|
+
const ArrowButton = styled(Button) `
|
|
45
|
+
width: 1rem;
|
|
46
|
+
min-width: 0;
|
|
47
|
+
height: 1rem;
|
|
48
|
+
margin: 0;
|
|
49
|
+
padding: 0;
|
|
50
|
+
|
|
51
|
+
color: ${(props) => props.theme.colors.grey3};
|
|
52
|
+
${(props) => props.disabled &&
|
|
53
|
+
`
|
|
54
|
+
user-select: none;
|
|
55
|
+
cursor: default;
|
|
56
|
+
background-color: transparent;
|
|
57
|
+
color: ${props.theme.colors.text};
|
|
58
|
+
`};
|
|
59
|
+
`;
|
|
60
|
+
const HorizontalLine = styled.hr `
|
|
61
|
+
position: relative;
|
|
62
|
+
top: 2px;
|
|
63
|
+
|
|
64
|
+
width: 1.75rem;
|
|
65
|
+
margin: 0;
|
|
66
|
+
|
|
67
|
+
border-top: 2px solid ${(props) => props.theme.colors.text};
|
|
68
|
+
`;
|
|
69
|
+
const ReminderText = styled.span `
|
|
70
|
+
width: 100%;
|
|
71
|
+
font-weight: 400;
|
|
72
|
+
color: ${(props) => props.theme.colors.primary};
|
|
73
|
+
text-align: center;
|
|
74
|
+
`;
|
|
75
|
+
const DirectionEditorWrapper = styled.div `
|
|
76
|
+
display: flex;
|
|
77
|
+
align-items: center;
|
|
78
|
+
justify-content: space-between;
|
|
79
|
+
width: 100%;
|
|
80
|
+
`;
|
|
81
|
+
/**
|
|
82
|
+
* Displays the direction of the edge, allows user to change in resolver mode
|
|
83
|
+
*/
|
|
84
|
+
function DirectionEditor(props) {
|
|
85
|
+
const { editable, editorMode } = useSettings();
|
|
86
|
+
const canChangeDirection = editable && EditorMode.RESOLVER === editorMode;
|
|
87
|
+
return (_jsxs(_Fragment, { children: [_jsxs(DirectionEditorWrapper, { children: [_jsx(EdgeName, { children: props.source }), canChangeDirection && (_jsxs(ArrowsWrapper, { children: [_jsx(ArrowButton, { disabled: props.edgeType === EdgeType.DIRECTED_EDGE, onClick: () => props.onConfirmDirection(false), styling: "ghost", children: _jsx(ArrowRight, {}) }), _jsx(ArrowButton, { onClick: () => props.onConfirmDirection(true), styling: "ghost", children: _jsx(ArrowLeft, {}) })] })), !canChangeDirection && (_jsxs(ArrowsWrapper, { children: [editorMode === EditorMode.PAG_VIEWER && _jsx(HorizontalLine, {}), editorMode !== EditorMode.PAG_VIEWER && _jsx(ArrowRight, {})] })), _jsx(EdgeName, { children: props.target })] }), canChangeDirection && props.edgeType !== EdgeType.DIRECTED_EDGE && (_jsx(ReminderText, { children: "Select edge direction" }))] }));
|
|
88
|
+
}
|
|
89
|
+
export default DirectionEditor;
|
|
90
|
+
//# sourceMappingURL=direction-editor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"direction-editor.js","sourceRoot":"","sources":["../../../../../../src/shared/editor-overlay/panel-content/edge/sections/direction-editor.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,MAAM,MAAM,2BAA2B,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAE9C,MAAM,QAAQ,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;;;;;;aAUb,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI;;;;CAI9C,CAAC;AAEF,MAAM,aAAa,GAAG,MAAM,CAAC,GAAG,CAAA;;;;aAInB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI;CAC9C,CAAC;AAEF,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,CAAA;;;;;;;aAOrB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,KAAK;MAC1C,CAAC,KAAK,EAAE,EAAE,CACR,KAAK,CAAC,QAAQ;IACd;;;;iBAIS,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI;KACnC;CACJ,CAAC;AAEF,MAAM,cAAc,GAAG,MAAM,CAAC,EAAE,CAAA;;;;;;;4BAOJ,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI;CAC7D,CAAC;AAEF,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAA;;;aAGnB,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO;;CAEjD,CAAC;AAEF,MAAM,sBAAsB,GAAG,MAAM,CAAC,GAAG,CAAA;;;;;CAKxC,CAAC;AAiBF;;GAEG;AACH,SAAS,eAAe,CAAC,KAA2B;IAChD,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,WAAW,EAAE,CAAC;IAE/C,MAAM,kBAAkB,GAAG,QAAQ,IAAI,UAAU,CAAC,QAAQ,KAAK,UAAU,CAAC;IAE1E,OAAO,CACH,8BACI,MAAC,sBAAsB,eACnB,KAAC,QAAQ,cAAE,KAAK,CAAC,MAAM,GAAY,EAClC,kBAAkB,IAAI,CACnB,MAAC,aAAa,eACV,KAAC,WAAW,IACR,QAAQ,EAAE,KAAK,CAAC,QAAQ,KAAK,QAAQ,CAAC,aAAa,EACnD,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,kBAAkB,CAAC,KAAK,CAAC,EAC9C,OAAO,EAAC,OAAO,YAEf,KAAC,UAAU,KAAG,GACJ,EACd,KAAC,WAAW,IAAC,OAAO,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,kBAAkB,CAAC,IAAI,CAAC,EAAE,OAAO,EAAC,OAAO,YACvE,KAAC,SAAS,KAAG,GACH,IACF,CACnB,EACA,CAAC,kBAAkB,IAAI,CACpB,MAAC,aAAa,eACT,UAAU,KAAK,UAAU,CAAC,UAAU,IAAI,KAAC,cAAc,KAAG,EAC1D,UAAU,KAAK,UAAU,CAAC,UAAU,IAAI,KAAC,UAAU,KAAG,IAC3C,CACnB,EACD,KAAC,QAAQ,cAAE,KAAK,CAAC,MAAM,GAAY,IACd,EACxB,kBAAkB,IAAI,KAAK,CAAC,QAAQ,KAAK,QAAQ,CAAC,aAAa,IAAI,CAChE,KAAC,YAAY,wCAAqC,CACrD,IACF,CACN,CAAC;AACN,CAAC;AAED,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { GraphApi } from '../../../../use-causal-graph-editor';
|
|
2
|
+
import { GraphState, SimulationEdge } from '../../../../../types';
|
|
3
|
+
interface EdgeTypeEditorProps {
|
|
4
|
+
/** Graph API */
|
|
5
|
+
api: GraphApi;
|
|
6
|
+
/** The edge meta data */
|
|
7
|
+
edge: SimulationEdge;
|
|
8
|
+
/** The id of the source node */
|
|
9
|
+
source: string;
|
|
10
|
+
/** Graph data */
|
|
11
|
+
state: GraphState;
|
|
12
|
+
/** The id of the target node */
|
|
13
|
+
target: string;
|
|
14
|
+
}
|
|
15
|
+
declare function EdgeTypeEditor(props: EdgeTypeEditorProps): JSX.Element;
|
|
16
|
+
export default EdgeTypeEditor;
|
|
17
|
+
//# sourceMappingURL=edge-type-editor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"edge-type-editor.d.ts","sourceRoot":"","sources":["../../../../../../src/shared/editor-overlay/panel-content/edge/sections/edge-type-editor.tsx"],"names":[],"mappings":"AAoBA,OAAO,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAE3D,OAAO,EAAY,UAAU,EAAa,cAAc,EAAkC,MAAM,QAAQ,CAAC;AAYzG,UAAU,mBAAmB;IACzB,gBAAgB;IAChB,GAAG,EAAE,QAAQ,CAAC;IACd,yBAAyB;IACzB,IAAI,EAAE,cAAc,CAAC;IACrB,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,kBAAkB;IAClB,KAAK,EAAE,UAAU,CAAC;IAClB,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,iBAAS,cAAc,CAAC,KAAK,EAAE,mBAAmB,GAAG,GAAG,CAAC,OAAO,CAwD/D;AAED,eAAe,cAAc,CAAC"}
|