@darajs/ui-causal-graph-editor 0.4.8
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/README.md +12 -0
- package/dist/CanvasPool.5cd3cdcd.js +30 -0
- package/dist/SharedSystems.140ebe02.js +1905 -0
- package/dist/WebGLRenderer.6ede660f.js +2241 -0
- package/dist/WebGPURenderer.f884c756.js +1544 -0
- package/dist/browserAll.2dcaa9f7.js +953 -0
- package/dist/colorToUniform.7c604fe6.js +76 -0
- package/dist/index.a01cfc5f.js +61895 -0
- package/dist/index.js +35 -0
- package/dist/index.umd.cjs +10287 -0
- package/dist/init.73e5c5e2.js +2602 -0
- package/dist/style.css +1 -0
- package/dist/types/graph-viewer/causal-graph-editor.d.ts +58 -0
- package/dist/types/graph-viewer/causal-graph-editor.d.ts.map +1 -0
- package/dist/types/graph-viewer/storybook/stories-utils.d.ts +1247 -0
- package/dist/types/graph-viewer/storybook/stories-utils.d.ts.map +1 -0
- package/dist/types/graph-viewer/utils/use-iterate-edges.d.ts +32 -0
- package/dist/types/graph-viewer/utils/use-iterate-edges.d.ts.map +1 -0
- package/dist/types/graph-viewer/utils/use-iterate-nodes.d.ts +32 -0
- package/dist/types/graph-viewer/utils/use-iterate-nodes.d.ts.map +1 -0
- package/dist/types/index.d.ts +32 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/jest-setup.d.ts +18 -0
- package/dist/types/jest-setup.d.ts.map +1 -0
- package/dist/types/node-hierarchy-builder/index.d.ts +19 -0
- package/dist/types/node-hierarchy-builder/index.d.ts.map +1 -0
- package/dist/types/node-hierarchy-builder/layer-divider.d.ts +15 -0
- package/dist/types/node-hierarchy-builder/layer-divider.d.ts.map +1 -0
- package/dist/types/node-hierarchy-builder/layer-label-editor.d.ts +24 -0
- package/dist/types/node-hierarchy-builder/layer-label-editor.d.ts.map +1 -0
- package/dist/types/node-hierarchy-builder/layer.d.ts +35 -0
- package/dist/types/node-hierarchy-builder/layer.d.ts.map +1 -0
- package/dist/types/node-hierarchy-builder/node-hierarchy-builder.d.ts +27 -0
- package/dist/types/node-hierarchy-builder/node-hierarchy-builder.d.ts.map +1 -0
- package/dist/types/node-hierarchy-builder/node.d.ts +21 -0
- package/dist/types/node-hierarchy-builder/node.d.ts.map +1 -0
- package/dist/types/node-hierarchy-builder/shared.d.ts +93 -0
- package/dist/types/node-hierarchy-builder/shared.d.ts.map +1 -0
- package/dist/types/shared/causal-graph-store.d.ts +118 -0
- package/dist/types/shared/causal-graph-store.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/buttons/add-node-button.d.ts +25 -0
- package/dist/types/shared/editor-overlay/buttons/add-node-button.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/buttons/center-graph-button.d.ts +7 -0
- package/dist/types/shared/editor-overlay/buttons/center-graph-button.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/buttons/collapse-all-button.d.ts +7 -0
- package/dist/types/shared/editor-overlay/buttons/collapse-all-button.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/buttons/collapse-expand-button.d.ts +26 -0
- package/dist/types/shared/editor-overlay/buttons/collapse-expand-button.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/buttons/drag-mode-button.d.ts +27 -0
- package/dist/types/shared/editor-overlay/buttons/drag-mode-button.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/buttons/index.d.ts +24 -0
- package/dist/types/shared/editor-overlay/buttons/index.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/buttons/recalculate-layout-button.d.ts +7 -0
- package/dist/types/shared/editor-overlay/buttons/recalculate-layout-button.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/buttons/save-image-button.d.ts +7 -0
- package/dist/types/shared/editor-overlay/buttons/save-image-button.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/buttons/soft-edge-arrow-button.d.ts +19 -0
- package/dist/types/shared/editor-overlay/buttons/soft-edge-arrow-button.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/floating-elements.d.ts +29 -0
- package/dist/types/shared/editor-overlay/floating-elements.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/index.d.ts +22 -0
- package/dist/types/shared/editor-overlay/index.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/legend/index.d.ts +19 -0
- package/dist/types/shared/editor-overlay/legend/index.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/legend/legend-data.d.ts +49 -0
- package/dist/types/shared/editor-overlay/legend/legend-data.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/legend/legend-list.d.ts +6 -0
- package/dist/types/shared/editor-overlay/legend/legend-list.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/legend/legend.d.ts +7 -0
- package/dist/types/shared/editor-overlay/legend/legend.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/overlay.d.ts +42 -0
- package/dist/types/shared/editor-overlay/overlay.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/panel-content/edge/edge-editor.d.ts +8 -0
- package/dist/types/shared/editor-overlay/panel-content/edge/edge-editor.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/panel-content/edge/edge-info-content.d.ts +41 -0
- package/dist/types/shared/editor-overlay/panel-content/edge/edge-info-content.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/panel-content/edge/editor-props.d.ts +35 -0
- package/dist/types/shared/editor-overlay/panel-content/edge/editor-props.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/panel-content/edge/encoder-editor.d.ts +23 -0
- package/dist/types/shared/editor-overlay/panel-content/edge/encoder-editor.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/panel-content/edge/index.d.ts +18 -0
- package/dist/types/shared/editor-overlay/panel-content/edge/index.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/panel-content/edge/pag-editor.d.ts +23 -0
- package/dist/types/shared/editor-overlay/panel-content/edge/pag-editor.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/panel-content/edge/resolver-editor.d.ts +7 -0
- package/dist/types/shared/editor-overlay/panel-content/edge/resolver-editor.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/panel-content/edge/sections/constraint-editor.d.ts +27 -0
- package/dist/types/shared/editor-overlay/panel-content/edge/sections/constraint-editor.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/panel-content/edge/sections/description-editor.d.ts +15 -0
- package/dist/types/shared/editor-overlay/panel-content/edge/sections/description-editor.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/panel-content/edge/sections/direction-editor.d.ts +21 -0
- package/dist/types/shared/editor-overlay/panel-content/edge/sections/direction-editor.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/panel-content/edge/sections/edge-type-editor.d.ts +17 -0
- package/dist/types/shared/editor-overlay/panel-content/edge/sections/edge-type-editor.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/panel-content/edge/sections/index.d.ts +19 -0
- package/dist/types/shared/editor-overlay/panel-content/edge/sections/index.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/panel-content/index.d.ts +20 -0
- package/dist/types/shared/editor-overlay/panel-content/index.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/panel-content/node/index.d.ts +18 -0
- package/dist/types/shared/editor-overlay/panel-content/node/index.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/panel-content/node/label-editor.d.ts +11 -0
- package/dist/types/shared/editor-overlay/panel-content/node/label-editor.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/panel-content/node/node-info-content.d.ts +34 -0
- package/dist/types/shared/editor-overlay/panel-content/node/node-info-content.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/panel-content/panel-content.d.ts +17 -0
- package/dist/types/shared/editor-overlay/panel-content/panel-content.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/panel-content/panel-title.d.ts +12 -0
- package/dist/types/shared/editor-overlay/panel-content/panel-title.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/panel-content/styled.d.ts +9 -0
- package/dist/types/shared/editor-overlay/panel-content/styled.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/positional-divs.d.ts +25 -0
- package/dist/types/shared/editor-overlay/positional-divs.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/search-bar/index.d.ts +19 -0
- package/dist/types/shared/editor-overlay/search-bar/index.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/search-bar/search-bar.d.ts +21 -0
- package/dist/types/shared/editor-overlay/search-bar/search-bar.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/search-bar/use-search.d.ts +32 -0
- package/dist/types/shared/editor-overlay/search-bar/use-search.d.ts.map +1 -0
- package/dist/types/shared/editor-overlay/zoom-prompt.d.ts +9 -0
- package/dist/types/shared/editor-overlay/zoom-prompt.d.ts.map +1 -0
- package/dist/types/shared/graph-context.d.ts +26 -0
- package/dist/types/shared/graph-context.d.ts.map +1 -0
- package/dist/types/shared/graph-layout/circular-layout.d.ts +32 -0
- package/dist/types/shared/graph-layout/circular-layout.d.ts.map +1 -0
- package/dist/types/shared/graph-layout/common.d.ts +96 -0
- package/dist/types/shared/graph-layout/common.d.ts.map +1 -0
- package/dist/types/shared/graph-layout/custom-layout.d.ts +36 -0
- package/dist/types/shared/graph-layout/custom-layout.d.ts.map +1 -0
- package/dist/types/shared/graph-layout/fcose-layout.d.ts +132 -0
- package/dist/types/shared/graph-layout/fcose-layout.d.ts.map +1 -0
- package/dist/types/shared/graph-layout/force-atlas-layout.d.ts +103 -0
- package/dist/types/shared/graph-layout/force-atlas-layout.d.ts.map +1 -0
- package/dist/types/shared/graph-layout/index.d.ts +25 -0
- package/dist/types/shared/graph-layout/index.d.ts.map +1 -0
- package/dist/types/shared/graph-layout/marketing-layout.d.ts +63 -0
- package/dist/types/shared/graph-layout/marketing-layout.d.ts.map +1 -0
- package/dist/types/shared/graph-layout/planar-layout.d.ts +67 -0
- package/dist/types/shared/graph-layout/planar-layout.d.ts.map +1 -0
- package/dist/types/shared/graph-layout/spring-layout.d.ts +101 -0
- package/dist/types/shared/graph-layout/spring-layout.d.ts.map +1 -0
- package/dist/types/shared/graph-layout/worker/circular.d.ts +5 -0
- package/dist/types/shared/graph-layout/worker/circular.d.ts.map +1 -0
- package/dist/types/shared/graph-layout/worker/client.d.ts +22 -0
- package/dist/types/shared/graph-layout/worker/client.d.ts.map +1 -0
- package/dist/types/shared/graph-layout/worker/fcose.d.ts +18 -0
- package/dist/types/shared/graph-layout/worker/fcose.d.ts.map +1 -0
- package/dist/types/shared/graph-layout/worker/force-atlas.d.ts +5 -0
- package/dist/types/shared/graph-layout/worker/force-atlas.d.ts.map +1 -0
- package/dist/types/shared/graph-layout/worker/marketing.d.ts +5 -0
- package/dist/types/shared/graph-layout/worker/marketing.d.ts.map +1 -0
- package/dist/types/shared/graph-layout/worker/planar.d.ts +5 -0
- package/dist/types/shared/graph-layout/worker/planar.d.ts.map +1 -0
- package/dist/types/shared/graph-layout/worker/spring.d.ts +19 -0
- package/dist/types/shared/graph-layout/worker/spring.d.ts.map +1 -0
- package/dist/types/shared/graph-layout/worker/worker.d.ts +27 -0
- package/dist/types/shared/graph-layout/worker/worker.d.ts.map +1 -0
- package/dist/types/shared/parsers.d.ts +43 -0
- package/dist/types/shared/parsers.d.ts.map +1 -0
- package/dist/types/shared/pointer-context.d.ts +20 -0
- package/dist/types/shared/pointer-context.d.ts.map +1 -0
- package/dist/types/shared/rendering/background.d.ts +48 -0
- package/dist/types/shared/rendering/background.d.ts.map +1 -0
- package/dist/types/shared/rendering/colors.d.ts +27 -0
- package/dist/types/shared/rendering/colors.d.ts.map +1 -0
- package/dist/types/shared/rendering/edge/curve.d.ts +51 -0
- package/dist/types/shared/rendering/edge/curve.d.ts.map +1 -0
- package/dist/types/shared/rendering/edge/definitions.d.ts +73 -0
- package/dist/types/shared/rendering/edge/definitions.d.ts.map +1 -0
- package/dist/types/shared/rendering/edge/edge-object.d.ts +93 -0
- package/dist/types/shared/rendering/edge/edge-object.d.ts.map +1 -0
- package/dist/types/shared/rendering/edge/index.d.ts +19 -0
- package/dist/types/shared/rendering/edge/index.d.ts.map +1 -0
- package/dist/types/shared/rendering/edge/symbols.d.ts +40 -0
- package/dist/types/shared/rendering/edge/symbols.d.ts.map +1 -0
- package/dist/types/shared/rendering/edge/utils.d.ts +27 -0
- package/dist/types/shared/rendering/edge/utils.d.ts.map +1 -0
- package/dist/types/shared/rendering/engine.d.ts +436 -0
- package/dist/types/shared/rendering/engine.d.ts.map +1 -0
- package/dist/types/shared/rendering/grouping/group-container-object.d.ts +56 -0
- package/dist/types/shared/rendering/grouping/group-container-object.d.ts.map +1 -0
- package/dist/types/shared/rendering/grouping/index.d.ts +2 -0
- package/dist/types/shared/rendering/grouping/index.d.ts.map +1 -0
- package/dist/types/shared/rendering/node/definitions.d.ts +59 -0
- package/dist/types/shared/rendering/node/definitions.d.ts.map +1 -0
- package/dist/types/shared/rendering/node/index.d.ts +20 -0
- package/dist/types/shared/rendering/node/index.d.ts.map +1 -0
- package/dist/types/shared/rendering/node/node-object.d.ts +78 -0
- package/dist/types/shared/rendering/node/node-object.d.ts.map +1 -0
- package/dist/types/shared/rendering/node/utils.d.ts +33 -0
- package/dist/types/shared/rendering/node/utils.d.ts.map +1 -0
- package/dist/types/shared/rendering/svg.d.ts +26 -0
- package/dist/types/shared/rendering/svg.d.ts.map +1 -0
- package/dist/types/shared/rendering/text.d.ts +33 -0
- package/dist/types/shared/rendering/text.d.ts.map +1 -0
- package/dist/types/shared/rendering/texture-cache.d.ts +47 -0
- package/dist/types/shared/rendering/texture-cache.d.ts.map +1 -0
- package/dist/types/shared/rendering/use-render-engine.d.ts +115 -0
- package/dist/types/shared/rendering/use-render-engine.d.ts.map +1 -0
- package/dist/types/shared/rendering/utils.d.ts +27 -0
- package/dist/types/shared/rendering/utils.d.ts.map +1 -0
- package/dist/types/shared/serializer.d.ts +39 -0
- package/dist/types/shared/serializer.d.ts.map +1 -0
- package/dist/types/shared/settings-context.d.ts +56 -0
- package/dist/types/shared/settings-context.d.ts.map +1 -0
- package/dist/types/shared/styles.d.ts +4 -0
- package/dist/types/shared/styles.d.ts.map +1 -0
- package/dist/types/shared/use-causal-graph-editor.d.ts +22 -0
- package/dist/types/shared/use-causal-graph-editor.d.ts.map +1 -0
- package/dist/types/shared/use-drag-mode.d.ts +33 -0
- package/dist/types/shared/use-drag-mode.d.ts.map +1 -0
- package/dist/types/shared/use-edge-encoder.d.ts +45 -0
- package/dist/types/shared/use-edge-encoder.d.ts.map +1 -0
- package/dist/types/shared/use-graph-tooltip.d.ts +15 -0
- package/dist/types/shared/use-graph-tooltip.d.ts.map +1 -0
- package/dist/types/shared/use-pane-visibility.d.ts +12 -0
- package/dist/types/shared/use-pane-visibility.d.ts.map +1 -0
- package/dist/types/shared/utils.d.ts +79 -0
- package/dist/types/shared/utils.d.ts.map +1 -0
- package/dist/types/types.d.ts +277 -0
- package/dist/types/types.d.ts.map +1 -0
- package/dist/webworkerAll.2e3715a5.js +7 -0
- package/package.json +120 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stories-utils.d.ts","sourceRoot":"","sources":["../../../../src/graph-viewer/storybook/stories-utils.tsx"],"names":[],"mappings":"AAkBA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAgB,MAAM,aAAa,CAAC;AACrD,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAGrE,eAAO,MAAM,QAAQ,SAAU,sBAAsB,KAAG,GAAG,CAAC,OAS3D,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,WAyIzB,CAAC;AAEF,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;CAY1B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsEhC,CAAC;AAEF,eAAO,MAAM,aAAa,YAA2D,CAAC;AAEtF,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoNjC,CAAC;AAEF,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAo3BnC,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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 type { Dispatch, SetStateAction } from 'react';
|
|
18
|
+
import { type GraphState } from '../../types';
|
|
19
|
+
type UseIterateEdges = {
|
|
20
|
+
nextEdge: () => void;
|
|
21
|
+
prevEdge: () => void;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Given a graph and a currently selected edge,
|
|
25
|
+
* provide next/previous functions for selecting the next/previous edge.
|
|
26
|
+
* @param selectedEdge Tuple indicating the currently selected edge
|
|
27
|
+
* @param setSelectedEdge Method for setting the selected edge state variable
|
|
28
|
+
* @param state graph viewer state
|
|
29
|
+
*/
|
|
30
|
+
declare const useIterateEdges: (selectedEdge: [string, string], setSelectedEdge: Dispatch<SetStateAction<[string, string]>>, state: GraphState) => UseIterateEdges;
|
|
31
|
+
export default useIterateEdges;
|
|
32
|
+
//# sourceMappingURL=use-iterate-edges.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-iterate-edges.d.ts","sourceRoot":"","sources":["../../../../src/graph-viewer/utils/use-iterate-edges.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEzC,KAAK,eAAe,GAAG;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAEF;;;;;;GAMG;AACH,QAAA,MAAM,eAAe,iBACH,CAAC,MAAM,EAAE,MAAM,CAAC,mBACb,QAAQ,CAAC,cAAc,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,SACpD,UAAU,KAClB,eAmCF,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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 type React from 'react';
|
|
18
|
+
import type { GraphState } from '../../types';
|
|
19
|
+
type UseIterateNodes = {
|
|
20
|
+
nextNode: () => void;
|
|
21
|
+
prevNode: () => void;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Given a graph and a currently selected node,
|
|
25
|
+
* provide next/previous functions for selecting the next/previous node.
|
|
26
|
+
* @param selectedNode id of the currently selected node
|
|
27
|
+
* @param setSelectedNode Method for setting the selected node state variable
|
|
28
|
+
* @param state graph viewer state
|
|
29
|
+
*/
|
|
30
|
+
declare const useIterateNodes: (selectedNode: string, setSelectedNode: React.Dispatch<React.SetStateAction<string>>, state: GraphState) => UseIterateNodes;
|
|
31
|
+
export default useIterateNodes;
|
|
32
|
+
//# sourceMappingURL=use-iterate-nodes.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-iterate-nodes.d.ts","sourceRoot":"","sources":["../../../../src/graph-viewer/utils/use-iterate-nodes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEzC,KAAK,eAAe,GAAG;IACnB,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAC;CACxB,CAAC;AAEF;;;;;;GAMG;AACH,QAAA,MAAM,eAAe,iBACH,MAAM,mBACH,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC,SACtD,UAAU,KAClB,eA4BF,CAAC;AAEF,eAAe,eAAe,CAAC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
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 CausalGraphViewer } from './graph-viewer/causal-graph-editor';
|
|
18
|
+
export type { CausalGraphEditorProps as CausalGraphViewerProps } from './graph-viewer/causal-graph-editor';
|
|
19
|
+
export { NodeHierarchyBuilder } from './node-hierarchy-builder';
|
|
20
|
+
export type { Node } from './node-hierarchy-builder';
|
|
21
|
+
export * from './types';
|
|
22
|
+
export { useSettings } from './shared/settings-context';
|
|
23
|
+
export type { Settings } from './shared/settings-context';
|
|
24
|
+
export { CustomLayout, GraphLayout, MarketingLayout, PlanarLayout, CircularLayout, SpringLayout, FcoseLayout, ForceAtlasLayout, type GraphLayoutBuilder, } from './shared/graph-layout';
|
|
25
|
+
export { default as GraphContext } from './shared/graph-context';
|
|
26
|
+
export { causalGraphParser } from './shared/parsers';
|
|
27
|
+
export { causalGraphSerializer, serializeGraphEdge, serializeGraphNode } from './shared/serializer';
|
|
28
|
+
export { GraphActionCreators, GraphReducer } from './shared/causal-graph-store';
|
|
29
|
+
export type { GraphLegendDefinition } from './shared/editor-overlay';
|
|
30
|
+
export { FloatingButton } from './shared/editor-overlay/floating-elements';
|
|
31
|
+
export type { PixiEdgeStyle } from './shared/rendering/edge';
|
|
32
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AAClF,YAAY,EAAE,sBAAsB,IAAI,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC3G,OAAO,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAChE,YAAY,EAAE,IAAI,EAAE,MAAM,0BAA0B,CAAC;AACrD,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,YAAY,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EACH,YAAY,EACZ,WAAW,EACX,eAAe,EACf,YAAY,EACZ,cAAc,EACd,YAAY,EACZ,WAAW,EACX,gBAAgB,EAChB,KAAK,kBAAkB,GAC1B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACpG,OAAO,EAAE,mBAAmB,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChF,YAAY,EAAE,qBAAqB,EAAE,MAAM,yBAAyB,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAC3E,YAAY,EAAE,aAAa,EAAE,MAAM,yBAAyB,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
|
+
import '@testing-library/jest-dom';
|
|
18
|
+
//# sourceMappingURL=jest-setup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"jest-setup.d.ts","sourceRoot":"","sources":["../../src/jest-setup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,2BAA2B,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
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 NodeHierarchyBuilder } from './node-hierarchy-builder';
|
|
18
|
+
export type { Node } from './shared';
|
|
19
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/node-hierarchy-builder/index.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,OAAO,IAAI,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AAC3E,YAAY,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
interface LayerDividerProps {
|
|
2
|
+
/** Click handler */
|
|
3
|
+
onClick: () => void;
|
|
4
|
+
/** Where to position the divider in relation to its parent */
|
|
5
|
+
position?: 'top' | 'bottom';
|
|
6
|
+
/** Whether we're in view-only mode */
|
|
7
|
+
viewOnly?: boolean;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* A divider between layers in the hierarchy builder; allows adding a new layer in between two existing ones
|
|
11
|
+
* or at the start/end of the hierarchy
|
|
12
|
+
*/
|
|
13
|
+
declare function LayerDivider({ onClick, position, viewOnly }: LayerDividerProps): JSX.Element;
|
|
14
|
+
export default LayerDivider;
|
|
15
|
+
//# sourceMappingURL=layer-divider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layer-divider.d.ts","sourceRoot":"","sources":["../../../src/node-hierarchy-builder/layer-divider.tsx"],"names":[],"mappings":"AAyHA,UAAU,iBAAiB;IACvB,oBAAoB;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,KAAK,GAAG,QAAQ,CAAC;IAC5B,sCAAsC;IACtC,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;GAGG;AACH,iBAAS,YAAY,CAAC,EAAE,OAAO,EAAE,QAAmB,EAAE,QAAQ,EAAE,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAWhG;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
interface LayerLabelEditorProps {
|
|
2
|
+
/**
|
|
3
|
+
* The label to be edited
|
|
4
|
+
*/
|
|
5
|
+
label?: string;
|
|
6
|
+
/**
|
|
7
|
+
* The index of the layer in the hierarchy
|
|
8
|
+
*/
|
|
9
|
+
number: number;
|
|
10
|
+
/**
|
|
11
|
+
* Callback to be called when the label changes
|
|
12
|
+
*/
|
|
13
|
+
onChange: (label: string) => void;
|
|
14
|
+
/**
|
|
15
|
+
* Whether we're in view-only mode
|
|
16
|
+
*/
|
|
17
|
+
viewOnly?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Displays the label of the layer, allows user to change it if editable
|
|
21
|
+
*/
|
|
22
|
+
declare function LayerLabelEditor(props: LayerLabelEditorProps): JSX.Element;
|
|
23
|
+
export default LayerLabelEditor;
|
|
24
|
+
//# sourceMappingURL=layer-label-editor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layer-label-editor.d.ts","sourceRoot":"","sources":["../../../src/node-hierarchy-builder/layer-label-editor.tsx"],"names":[],"mappings":"AAuBA,UAAU,qBAAqB;IAC3B;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAsDD;;GAEG;AACH,iBAAS,gBAAgB,CAAC,KAAK,EAAE,qBAAqB,GAAG,GAAG,CAAC,OAAO,CA6CnE;AAED,eAAe,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { DragItem, NodeItem } from './shared';
|
|
2
|
+
import { NewLayerPosition } from './shared';
|
|
3
|
+
interface LayerProps {
|
|
4
|
+
/** Layer id */
|
|
5
|
+
id: string;
|
|
6
|
+
/** Whether the layer is the first one */
|
|
7
|
+
isFirst: boolean;
|
|
8
|
+
/** Whether the layer is the only one */
|
|
9
|
+
isOnly: boolean;
|
|
10
|
+
/** Custom tier label */
|
|
11
|
+
label?: string;
|
|
12
|
+
/** Optional node text size in pixels */
|
|
13
|
+
nodeFontSize?: number;
|
|
14
|
+
/** Optional node size in pixels */
|
|
15
|
+
nodeSize?: number;
|
|
16
|
+
/** Nodes within the layer */
|
|
17
|
+
nodes: NodeItem[];
|
|
18
|
+
/** Layer number */
|
|
19
|
+
number: number;
|
|
20
|
+
/** Handler called when a node is added to this layer */
|
|
21
|
+
onAddLayer: (reference: string, position: NewLayerPosition) => void;
|
|
22
|
+
/** Handler called when this layer should be deleted */
|
|
23
|
+
onDeleteLayer: () => void | Promise<void>;
|
|
24
|
+
/** Handler called upon dropping a node on this layer */
|
|
25
|
+
onDrop: (item: DragItem) => void | Promise<void>;
|
|
26
|
+
/** Handler called when a tier label is updated */
|
|
27
|
+
onUpdateLabel: (id: string, label: string) => void;
|
|
28
|
+
/** Don't allow edits to be made */
|
|
29
|
+
viewOnly?: boolean;
|
|
30
|
+
/** Optional whether to wrap text within nodes */
|
|
31
|
+
wrapNodeText?: boolean;
|
|
32
|
+
}
|
|
33
|
+
declare const _default: import("react").ForwardRefExoticComponent<LayerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
34
|
+
export default _default;
|
|
35
|
+
//# sourceMappingURL=layer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"layer.d.ts","sourceRoot":"","sources":["../../../src/node-hierarchy-builder/layer.tsx"],"names":[],"mappings":"AA2BA,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAgB,MAAM,UAAU,CAAC;AACjE,OAAO,EAA2B,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAoErE,UAAU,UAAU;IAChB,eAAe;IACf,EAAE,EAAE,MAAM,CAAC;IACX,yCAAyC;IACzC,OAAO,EAAE,OAAO,CAAC;IACjB,wCAAwC;IACxC,MAAM,EAAE,OAAO,CAAC;IAChB,wBAAwB;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,6BAA6B;IAC7B,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,mBAAmB;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,wDAAwD;IACxD,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACpE,wDAAwD;IACxD,aAAa,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,wDAAwD;IACxD,MAAM,EAAE,CAAC,IAAI,EAAE,QAAQ,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,kDAAkD;IAClD,aAAa,EAAE,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnD,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;;AA6FD,wBAAiC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import type { Node } from './shared';
|
|
3
|
+
export interface NodeHierarchyBuilderProps<T> {
|
|
4
|
+
/** Standard react className property */
|
|
5
|
+
className?: string;
|
|
6
|
+
/** Optional node text size in pixels */
|
|
7
|
+
nodeFontSize?: number;
|
|
8
|
+
/** Optional node size in pixels */
|
|
9
|
+
nodeSize?: number;
|
|
10
|
+
/** Nodes input list */
|
|
11
|
+
nodes: Array<Array<T>>;
|
|
12
|
+
/** Optional update handler which is called on every update */
|
|
13
|
+
onUpdate?: (nodes: Array<T[]>) => void | Promise<void>;
|
|
14
|
+
/** Standard styling prop */
|
|
15
|
+
style?: React.CSSProperties;
|
|
16
|
+
/** Don't allow edits to be made */
|
|
17
|
+
viewOnly?: boolean;
|
|
18
|
+
/** Optional whether to wrap text within nodes */
|
|
19
|
+
wrapNodeText?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* The NodeHierarchyBuilder component visually represents node hierarchy in layers, allowing the user
|
|
23
|
+
* to re-arrange the nodes inside layers, move them between layers and add/delete new layers.
|
|
24
|
+
*/
|
|
25
|
+
declare function NodeHierarchyBuilder<T extends string | Node>(props: NodeHierarchyBuilderProps<T>): JSX.Element;
|
|
26
|
+
export default NodeHierarchyBuilder;
|
|
27
|
+
//# sourceMappingURL=node-hierarchy-builder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-hierarchy-builder.d.ts","sourceRoot":"","sources":["../../../src/node-hierarchy-builder/node-hierarchy-builder.tsx"],"names":[],"mappings":"AAmBA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,KAAK,EAAuB,IAAI,EAAE,MAAM,UAAU,CAAC;AAgD1D,MAAM,WAAW,yBAAyB,CAAC,CAAC;IACxC,wCAAwC;IACxC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uBAAuB;IACvB,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IACvB,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,EAAE,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACvD,4BAA4B;IAC5B,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;;GAGG;AACH,iBAAS,oBAAoB,CAAC,CAAC,SAAS,MAAM,GAAG,IAAI,EAAE,KAAK,EAAE,yBAAyB,CAAC,CAAC,CAAC,GAAG,GAAG,CAAC,OAAO,CAqLvG;AAED,eAAe,oBAAoB,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { NodeItem } from './shared';
|
|
2
|
+
interface NodeProps {
|
|
3
|
+
/** Index of the node */
|
|
4
|
+
index: number;
|
|
5
|
+
/** Node to render */
|
|
6
|
+
node: NodeItem;
|
|
7
|
+
/** Optional node font size */
|
|
8
|
+
nodeFontSize?: number;
|
|
9
|
+
/** Optional node size */
|
|
10
|
+
nodeSize?: number;
|
|
11
|
+
/** Don't allow edits to be made */
|
|
12
|
+
viewOnly?: boolean;
|
|
13
|
+
/** Optional whether to wrap text within nodes */
|
|
14
|
+
wrapNodeText?: boolean;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* The Node component represents a single Node circle which can be dragged between layers and within them
|
|
18
|
+
*/
|
|
19
|
+
declare function Node(props: NodeProps): JSX.Element;
|
|
20
|
+
export default Node;
|
|
21
|
+
//# sourceMappingURL=node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../../../src/node-hierarchy-builder/node.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAY,QAAQ,EAAgB,MAAM,UAAU,CAAC;AAwDjE,UAAU,SAAS;IACf,yBAAyB;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,IAAI,EAAE,QAAQ,CAAC;IACf,8BAA8B;IAC9B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yBAAyB;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,YAAY,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,iBAAS,IAAI,CAAC,KAAK,EAAE,SAAS,GAAG,GAAG,CAAC,OAAO,CAkC3C;AAED,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
export declare const NODE = "node";
|
|
2
|
+
export declare const DEFAULT_NODE_SIZE = 75;
|
|
3
|
+
export declare enum NewLayerPosition {
|
|
4
|
+
TOP = 0,
|
|
5
|
+
BOTTOM = 1
|
|
6
|
+
}
|
|
7
|
+
export interface NodeSizeProp {
|
|
8
|
+
$nodeSize?: number;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Node metadata
|
|
12
|
+
*/
|
|
13
|
+
export interface NodeMeta {
|
|
14
|
+
/**
|
|
15
|
+
* Alternative display label
|
|
16
|
+
*/
|
|
17
|
+
label?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Font size to use
|
|
20
|
+
*/
|
|
21
|
+
label_size?: number;
|
|
22
|
+
/**
|
|
23
|
+
* Tooltip to display on node hover
|
|
24
|
+
*/
|
|
25
|
+
tooltip?: string | Record<string, string>;
|
|
26
|
+
/**
|
|
27
|
+
* Override the wrap text setting per-node
|
|
28
|
+
*/
|
|
29
|
+
wrap_text?: boolean;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Base NodeHierarchyBuilder Node representation - can be accepted as an input
|
|
33
|
+
*/
|
|
34
|
+
export interface Node {
|
|
35
|
+
meta?: NodeMeta;
|
|
36
|
+
name: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Internal node representation
|
|
40
|
+
*/
|
|
41
|
+
export interface NodeItem extends Node {
|
|
42
|
+
/**
|
|
43
|
+
* Internal ID to identify the node
|
|
44
|
+
*/
|
|
45
|
+
id: string;
|
|
46
|
+
/**
|
|
47
|
+
* Selection status based on search
|
|
48
|
+
*/
|
|
49
|
+
selected: boolean;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Node representation with current index within its layer attached, used when sending data using drag&drop
|
|
53
|
+
*/
|
|
54
|
+
export interface DragItem extends NodeItem {
|
|
55
|
+
index: number;
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Layer representation with an internal ID
|
|
59
|
+
*/
|
|
60
|
+
export interface LayerItem {
|
|
61
|
+
id: string;
|
|
62
|
+
/** Custom label */
|
|
63
|
+
label?: string;
|
|
64
|
+
nodes: NodeItem[];
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Parse a list of lists of nodes into Objects with IDs for easier internal handling
|
|
68
|
+
*
|
|
69
|
+
* @param nodes nodes to parse
|
|
70
|
+
*/
|
|
71
|
+
export declare function parseNodes(nodes: Array<Array<string | Node>>): LayerItem[];
|
|
72
|
+
/**
|
|
73
|
+
* Parse list of layer objects back into a list of lists of nodes
|
|
74
|
+
*
|
|
75
|
+
* @param layerItems layer items to parse
|
|
76
|
+
*/
|
|
77
|
+
export declare function parseLayerItems(layerItems: LayerItem[], returnStrings: true): Array<Array<string>>;
|
|
78
|
+
export declare function parseLayerItems(layerItems: LayerItem[], returnStrings: false): Array<Array<Node>>;
|
|
79
|
+
/**
|
|
80
|
+
* Check whether a given string matches a given query.
|
|
81
|
+
*
|
|
82
|
+
* @param string string to check against the query
|
|
83
|
+
* @param query query to check the string against
|
|
84
|
+
*/
|
|
85
|
+
export declare function matchesQuery(string: any, query: string): boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Check if a given element is currently in view, given its inside a scrollable container.
|
|
88
|
+
*
|
|
89
|
+
* @param element element to check
|
|
90
|
+
* @param scrollableElement scrollable container element
|
|
91
|
+
*/
|
|
92
|
+
export declare function isInView(element: HTMLDivElement, scrollableElement: HTMLDivElement): boolean;
|
|
93
|
+
//# sourceMappingURL=shared.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../../src/node-hierarchy-builder/shared.tsx"],"names":[],"mappings":"AAkBA,eAAO,MAAM,IAAI,SAAS,CAAC;AAC3B,eAAO,MAAM,iBAAiB,KAAK,CAAC;AAEpC,oBAAY,gBAAgB;IACxB,GAAG,IAAA;IACH,MAAM,IAAA;CACT;AAED,MAAM,WAAW,YAAY;IACzB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,MAAM,WAAW,QAAQ;IACrB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,IAAI;IACjB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,QAAS,SAAQ,IAAI;IAClC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,QAAS,SAAQ,QAAQ;IACtC,KAAK,EAAE,MAAM,CAAC;CACjB;AAED;;GAEG;AACH,MAAM,WAAW,SAAS;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,mBAAmB;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,QAAQ,EAAE,CAAC;CACrB;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC,GAAG,SAAS,EAAE,CAW1E;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,EAAE,aAAa,EAAE,IAAI,GAAG,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;AACpG,wBAAgB,eAAe,CAAC,UAAU,EAAE,SAAS,EAAE,EAAE,aAAa,EAAE,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC;AAenG;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAEhE;AAED;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,cAAc,GAAG,OAAO,CAoB5F"}
|
|
@@ -0,0 +1,118 @@
|
|
|
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 type { PointData } from 'pixi.js';
|
|
18
|
+
import type { Reducer } from 'react';
|
|
19
|
+
import type { GraphState, SimulationGraph } from '../types';
|
|
20
|
+
import { EdgeType, EditorMode } from '../types';
|
|
21
|
+
export declare enum GraphActionType {
|
|
22
|
+
ACCEPT_EDGE = "ACCEPT_EDGE",
|
|
23
|
+
ADD_EDGE = "ADD_EDGE",
|
|
24
|
+
ADD_LATENT_NODE = "ADD_LATENT_NODE",
|
|
25
|
+
INIT = "INIT",
|
|
26
|
+
INIT_GRAPH = "INIT_GRAPH",
|
|
27
|
+
REMOVE_EDGE = "REMOVE_EDGE",
|
|
28
|
+
REMOVE_NODE = "REMOVE_NODE",
|
|
29
|
+
RENAME_NODE = "RENAME_NODE",
|
|
30
|
+
REVERSE_EDGE = "REVERSE_EDGE",
|
|
31
|
+
UPDATE_EDGE = "UPDATE_EDGE",
|
|
32
|
+
UPDATE_EDGE_NOTE = "UPDATE_EDGE_NOTE",
|
|
33
|
+
UPDATE_EDGE_TYPE = "UPDATE_EDGE_TYPE",
|
|
34
|
+
UPDATE_NODE = "UPDATE_NODE"
|
|
35
|
+
}
|
|
36
|
+
interface AcceptEdgeAction {
|
|
37
|
+
source: string;
|
|
38
|
+
target: string;
|
|
39
|
+
type: GraphActionType.ACCEPT_EDGE;
|
|
40
|
+
}
|
|
41
|
+
interface AddEdgeAction {
|
|
42
|
+
edgeEncoderMode?: boolean;
|
|
43
|
+
source: string;
|
|
44
|
+
target: string;
|
|
45
|
+
type: GraphActionType.ADD_EDGE;
|
|
46
|
+
}
|
|
47
|
+
interface AddLatentNodeAction {
|
|
48
|
+
position: PointData;
|
|
49
|
+
type: GraphActionType.ADD_LATENT_NODE;
|
|
50
|
+
}
|
|
51
|
+
interface InitGraphAction {
|
|
52
|
+
graph: SimulationGraph;
|
|
53
|
+
editorMode: EditorMode;
|
|
54
|
+
type: GraphActionType.INIT_GRAPH;
|
|
55
|
+
}
|
|
56
|
+
interface RenameNodeAction {
|
|
57
|
+
label: string;
|
|
58
|
+
node: string;
|
|
59
|
+
type: GraphActionType.RENAME_NODE;
|
|
60
|
+
}
|
|
61
|
+
interface RemoveEdgeAction {
|
|
62
|
+
edge: [string, string];
|
|
63
|
+
type: GraphActionType.REMOVE_EDGE;
|
|
64
|
+
}
|
|
65
|
+
interface ReverseEdgeAction {
|
|
66
|
+
edge: [string, string];
|
|
67
|
+
type: GraphActionType.REVERSE_EDGE;
|
|
68
|
+
}
|
|
69
|
+
interface RemoveNodeAction {
|
|
70
|
+
node: string;
|
|
71
|
+
type: GraphActionType.REMOVE_NODE;
|
|
72
|
+
}
|
|
73
|
+
interface UpdateEdgeAction {
|
|
74
|
+
extras: Record<string, any>;
|
|
75
|
+
source: string;
|
|
76
|
+
target: string;
|
|
77
|
+
type: GraphActionType.UPDATE_EDGE;
|
|
78
|
+
}
|
|
79
|
+
interface UpdateEdgeTypeAction {
|
|
80
|
+
edge_type: EdgeType;
|
|
81
|
+
source: string;
|
|
82
|
+
target: string;
|
|
83
|
+
type: GraphActionType.UPDATE_EDGE_TYPE;
|
|
84
|
+
}
|
|
85
|
+
interface UpdateEdgeNoteAction {
|
|
86
|
+
note: string;
|
|
87
|
+
source: string;
|
|
88
|
+
target: string;
|
|
89
|
+
type: GraphActionType.UPDATE_EDGE_NOTE;
|
|
90
|
+
}
|
|
91
|
+
interface UpdateNodeAction {
|
|
92
|
+
extras: Record<string, any>;
|
|
93
|
+
node: string;
|
|
94
|
+
type: GraphActionType.UPDATE_NODE;
|
|
95
|
+
}
|
|
96
|
+
export type GraphAction = AcceptEdgeAction | AddEdgeAction | AddLatentNodeAction | InitGraphAction | RenameNodeAction | RemoveEdgeAction | ReverseEdgeAction | RemoveNodeAction | UpdateEdgeAction | UpdateEdgeTypeAction | UpdateNodeAction | UpdateEdgeNoteAction;
|
|
97
|
+
/**
|
|
98
|
+
* The main reducer for applying edits to a graph and keeping the structure consistent.
|
|
99
|
+
*
|
|
100
|
+
* @param state the current state of the graph to apply mutations to
|
|
101
|
+
* @param action the action to perform
|
|
102
|
+
*/
|
|
103
|
+
export declare const GraphReducer: Reducer<GraphState, GraphAction>;
|
|
104
|
+
export declare const GraphActionCreators: {
|
|
105
|
+
acceptEdge: ([source, target]: [string, string]) => AcceptEdgeAction;
|
|
106
|
+
addEdge: (edge: [string, string]) => AddEdgeAction;
|
|
107
|
+
addLatentNode: (position: PointData) => AddLatentNodeAction;
|
|
108
|
+
removeEdge: (edge: [string, string]) => RemoveEdgeAction;
|
|
109
|
+
removeNode: (node: string) => RemoveNodeAction;
|
|
110
|
+
renameNode: (node: string, label: string) => RenameNodeAction;
|
|
111
|
+
reverseEdge: (edge: [string, string]) => ReverseEdgeAction;
|
|
112
|
+
updateEdge: (edge: [string, string], extras: Record<string, any>) => UpdateEdgeAction;
|
|
113
|
+
updateEdgeNote: (edge: [string, string], note: string) => UpdateEdgeNoteAction;
|
|
114
|
+
updateEdgeType: (edge: [string, string], symbol: string) => UpdateEdgeTypeAction;
|
|
115
|
+
updateNode: (node: string, extras: Record<string, any>) => UpdateNodeAction;
|
|
116
|
+
};
|
|
117
|
+
export {};
|
|
118
|
+
//# sourceMappingURL=causal-graph-store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"causal-graph-store.d.ts","sourceRoot":"","sources":["../../../src/shared/causal-graph-store.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAErC,OAAO,KAAK,EAAE,UAAU,EAAkB,eAAe,EAAE,MAAM,UAAU,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAgB,MAAM,UAAU,CAAC;AAE9D,oBAAY,eAAe;IACvB,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;IACrB,eAAe,oBAAoB;IACnC,IAAI,SAAS;IACb,UAAU,eAAe;IACzB,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,WAAW,gBAAgB;IAC3B,YAAY,iBAAiB;IAC7B,WAAW,gBAAgB;IAC3B,gBAAgB,qBAAqB;IACrC,gBAAgB,qBAAqB;IACrC,WAAW,gBAAgB;CAC9B;AAED,UAAU,gBAAgB;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,eAAe,CAAC,WAAW,CAAC;CACrC;AAED,UAAU,aAAa;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,eAAe,CAAC,QAAQ,CAAC;CAClC;AAED,UAAU,mBAAmB;IACzB,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,EAAE,eAAe,CAAC,eAAe,CAAC;CACzC;AAED,UAAU,eAAe;IACrB,KAAK,EAAE,eAAe,CAAC;IACvB,UAAU,EAAE,UAAU,CAAC;IACvB,IAAI,EAAE,eAAe,CAAC,UAAU,CAAC;CACpC;AAED,UAAU,gBAAgB;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,eAAe,CAAC,WAAW,CAAC;CACrC;AAED,UAAU,gBAAgB;IACtB,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvB,IAAI,EAAE,eAAe,CAAC,WAAW,CAAC;CACrC;AAED,UAAU,iBAAiB;IACvB,IAAI,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACvB,IAAI,EAAE,eAAe,CAAC,YAAY,CAAC;CACtC;AAED,UAAU,gBAAgB;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,eAAe,CAAC,WAAW,CAAC;CACrC;AAED,UAAU,gBAAgB;IACtB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,eAAe,CAAC,WAAW,CAAC;CACrC;AAED,UAAU,oBAAoB;IAC1B,SAAS,EAAE,QAAQ,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,eAAe,CAAC,gBAAgB,CAAC;CAC1C;AAED,UAAU,oBAAoB;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,eAAe,CAAC,gBAAgB,CAAC;CAC1C;AAED,UAAU,gBAAgB;IACtB,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,eAAe,CAAC,WAAW,CAAC;CACrC;AAED,MAAM,MAAM,WAAW,GACjB,gBAAgB,GAChB,aAAa,GACb,mBAAmB,GACnB,eAAe,GACf,gBAAgB,GAChB,gBAAgB,GAChB,iBAAiB,GACjB,gBAAgB,GAChB,gBAAgB,GAChB,oBAAoB,GACpB,gBAAgB,GAChB,oBAAoB,CAAC;AAE3B;;;;;GAKG;AACH,eAAO,MAAM,YAAY,EAAE,OAAO,CAAC,UAAU,EAAE,WAAW,CA8HzD,CAAC;AAoDF,eAAO,MAAM,mBAAmB;mCAXM,CAAC,MAAM,EAAE,MAAM,CAAC,KAAG,gBAAgB;oBAjClD,CAAC,MAAM,EAAE,MAAM,CAAC,KAAG,aAAa;8BANtB,SAAS,KAAG,mBAAmB;uBAItC,CAAC,MAAM,EAAE,MAAM,CAAC,KAAG,gBAAgB;uBACnC,MAAM,KAAG,gBAAgB;uBA4BzB,MAAM,SAAS,MAAM,KAAG,gBAAgB;wBAJvC,CAAC,MAAM,EAAE,MAAM,CAAC,KAAG,iBAAiB;uBAlBrC,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAG,gBAAgB;2BAY5D,CAAC,MAAM,EAAE,MAAM,CAAC,QAAQ,MAAM,KAAG,oBAAoB;2BANrD,CAAC,MAAM,EAAE,MAAM,CAAC,UAAU,MAAM,KAAG,oBAAoB;uBA2B3D,MAAM,UAAU,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAG,gBAAgB;CAkB/E,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
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 { type ComponentProps } from 'react';
|
|
18
|
+
import { FloatingButton } from '../floating-elements';
|
|
19
|
+
interface EditControlsProps extends ComponentProps<typeof FloatingButton> {
|
|
20
|
+
/** Handler for adding a new node */
|
|
21
|
+
onAddNode: () => void;
|
|
22
|
+
}
|
|
23
|
+
declare function EditControls(props: EditControlsProps): JSX.Element;
|
|
24
|
+
export default EditControls;
|
|
25
|
+
//# sourceMappingURL=add-node-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"add-node-button.d.ts","sourceRoot":"","sources":["../../../../../src/shared/editor-overlay/buttons/add-node-button.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,KAAK,cAAc,EAAc,MAAM,OAAO,CAAC;AASxD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,UAAU,iBAAkB,SAAQ,cAAc,CAAC,OAAO,cAAc,CAAC;IACrE,oCAAoC;IACpC,SAAS,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,iBAAS,YAAY,CAAC,KAAK,EAAE,iBAAiB,GAAG,GAAG,CAAC,OAAO,CAsB3D;AAED,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface CenterGraphButtonProps {
|
|
2
|
+
/** Handler for resetting the zoom */
|
|
3
|
+
onResetZoom: () => void | Promise<void>;
|
|
4
|
+
}
|
|
5
|
+
declare function CenterGraphButton(props: CenterGraphButtonProps): JSX.Element;
|
|
6
|
+
export default CenterGraphButton;
|
|
7
|
+
//# sourceMappingURL=center-graph-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"center-graph-button.d.ts","sourceRoot":"","sources":["../../../../../src/shared/editor-overlay/buttons/center-graph-button.tsx"],"names":[],"mappings":"AAwBA,UAAU,sBAAsB;IAC5B,qCAAqC;IACrC,WAAW,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC3C;AAED,iBAAS,iBAAiB,CAAC,KAAK,EAAE,sBAAsB,GAAG,GAAG,CAAC,OAAO,CAiCrE;AAED,eAAe,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface CollapseGroupButtonProps {
|
|
2
|
+
/** Handler for resetting the zoom */
|
|
3
|
+
onCollapseAll: () => void | Promise<void>;
|
|
4
|
+
}
|
|
5
|
+
declare function CollapseGroupButton(props: CollapseGroupButtonProps): JSX.Element;
|
|
6
|
+
export default CollapseGroupButton;
|
|
7
|
+
//# sourceMappingURL=collapse-all-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collapse-all-button.d.ts","sourceRoot":"","sources":["../../../../../src/shared/editor-overlay/buttons/collapse-all-button.tsx"],"names":[],"mappings":"AAwBA,UAAU,wBAAwB;IAC9B,qCAAqC;IACrC,aAAa,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC7C;AAED,iBAAS,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,GAAG,GAAG,CAAC,OAAO,CAgBzE;AAED,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
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 { type ComponentProps } from 'react';
|
|
18
|
+
import { FloatingButton } from '../floating-elements';
|
|
19
|
+
interface CollapseExpandGroupButtonProps extends ComponentProps<typeof FloatingButton> {
|
|
20
|
+
onCollapseAll: () => void | Promise<void>;
|
|
21
|
+
onExpandAll: () => void | Promise<void>;
|
|
22
|
+
showExpandAll: boolean;
|
|
23
|
+
}
|
|
24
|
+
declare function CollapseExpandGroupButton(props: CollapseExpandGroupButtonProps): JSX.Element;
|
|
25
|
+
export default CollapseExpandGroupButton;
|
|
26
|
+
//# sourceMappingURL=collapse-expand-button.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"collapse-expand-button.d.ts","sourceRoot":"","sources":["../../../../../src/shared/editor-overlay/buttons/collapse-expand-button.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,KAAK,cAAc,EAAc,MAAM,OAAO,CAAC;AAMxD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,UAAU,8BAA+B,SAAQ,cAAc,CAAC,OAAO,cAAc,CAAC;IAClF,aAAa,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1C,WAAW,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,aAAa,EAAE,OAAO,CAAC;CAC1B;AAED,iBAAS,yBAAyB,CAAC,KAAK,EAAE,8BAA8B,GAAG,GAAG,CAAC,OAAO,CAqBrF;AAED,eAAe,yBAAyB,CAAC"}
|