@api-client/ui 0.2.2 → 0.2.4
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/.vscode/settings.json +3 -3
- package/build/src/elements/authorization/ui/ApiKeyAuthorization.d.ts +1 -1
- package/build/src/elements/authorization/ui/ApiKeyAuthorization.d.ts.map +1 -1
- package/build/src/elements/authorization/ui/ApiKeyAuthorization.js +7 -7
- package/build/src/elements/authorization/ui/ApiKeyAuthorization.js.map +1 -1
- package/build/src/elements/authorization/ui/Authorization.styles.js +4 -4
- package/build/src/elements/authorization/ui/Authorization.styles.js.map +1 -1
- package/build/src/elements/authorization/ui/BasicAuthorization.d.ts +1 -1
- package/build/src/elements/authorization/ui/BasicAuthorization.d.ts.map +1 -1
- package/build/src/elements/authorization/ui/BasicAuthorization.js +5 -5
- package/build/src/elements/authorization/ui/BasicAuthorization.js.map +1 -1
- package/build/src/elements/authorization/ui/BearerAuthorization.d.ts +1 -1
- package/build/src/elements/authorization/ui/BearerAuthorization.d.ts.map +1 -1
- package/build/src/elements/authorization/ui/BearerAuthorization.js +3 -3
- package/build/src/elements/authorization/ui/BearerAuthorization.js.map +1 -1
- package/build/src/elements/authorization/ui/NtlmAuthorization.d.ts +1 -1
- package/build/src/elements/authorization/ui/NtlmAuthorization.d.ts.map +1 -1
- package/build/src/elements/authorization/ui/NtlmAuthorization.js +7 -7
- package/build/src/elements/authorization/ui/NtlmAuthorization.js.map +1 -1
- package/build/src/elements/authorization/ui/OAuth2Authorization.d.ts +1 -1
- package/build/src/elements/authorization/ui/OAuth2Authorization.d.ts.map +1 -1
- package/build/src/elements/authorization/ui/OAuth2Authorization.js +32 -27
- package/build/src/elements/authorization/ui/OAuth2Authorization.js.map +1 -1
- package/build/src/elements/authorization/ui/OidcAuthorization.js +4 -4
- package/build/src/elements/authorization/ui/OidcAuthorization.js.map +1 -1
- package/build/src/elements/autocomplete/autocomplete-input.d.ts +10 -0
- package/build/src/elements/autocomplete/autocomplete-input.d.ts.map +1 -0
- package/build/src/{md/text-field/ui-text-field.js → elements/autocomplete/autocomplete-input.js} +9 -9
- package/build/src/elements/autocomplete/autocomplete-input.js.map +1 -0
- package/build/src/elements/autocomplete/internals/autocomplete.d.ts +209 -0
- package/build/src/elements/autocomplete/internals/autocomplete.d.ts.map +1 -0
- package/build/src/elements/autocomplete/internals/autocomplete.js +493 -0
- package/build/src/elements/autocomplete/internals/autocomplete.js.map +1 -0
- package/build/src/elements/autocomplete/internals/autocomplete.styles.d.ts +3 -0
- package/build/src/elements/autocomplete/internals/autocomplete.styles.d.ts.map +1 -0
- package/build/src/elements/autocomplete/internals/autocomplete.styles.js +25 -0
- package/build/src/elements/autocomplete/internals/autocomplete.styles.js.map +1 -0
- package/build/src/elements/dialog/internals/DeleteCookieAction.element.d.ts +1 -1
- package/build/src/elements/dialog/internals/DeleteCookieAction.element.d.ts.map +1 -1
- package/build/src/elements/dialog/internals/DeleteCookieAction.element.js +5 -5
- package/build/src/elements/dialog/internals/DeleteCookieAction.element.js.map +1 -1
- package/build/src/elements/dialog/internals/Rename.d.ts +1 -1
- package/build/src/elements/dialog/internals/Rename.d.ts.map +1 -1
- package/build/src/elements/dialog/internals/Rename.js +3 -3
- package/build/src/elements/dialog/internals/Rename.js.map +1 -1
- package/build/src/elements/dialog/internals/SetCookieAction.element.d.ts +1 -1
- package/build/src/elements/dialog/internals/SetCookieAction.element.d.ts.map +1 -1
- package/build/src/elements/dialog/internals/SetCookieAction.element.js +9 -9
- package/build/src/elements/dialog/internals/SetCookieAction.element.js.map +1 -1
- package/build/src/elements/environment/EnvironmentEditor.d.ts +1 -1
- package/build/src/elements/environment/EnvironmentEditor.d.ts.map +1 -1
- package/build/src/elements/environment/EnvironmentEditor.js +3 -3
- package/build/src/elements/environment/EnvironmentEditor.js.map +1 -1
- package/build/src/elements/environment/EnvironmentEditor.styles.js +1 -1
- package/build/src/elements/environment/EnvironmentEditor.styles.js.map +1 -1
- package/build/src/elements/environment/ServerEditor.d.ts +1 -1
- package/build/src/elements/environment/ServerEditor.d.ts.map +1 -1
- package/build/src/elements/environment/ServerEditor.js +7 -7
- package/build/src/elements/environment/ServerEditor.js.map +1 -1
- package/build/src/elements/environment/ServerEditor.styles.js +1 -1
- package/build/src/elements/environment/ServerEditor.styles.js.map +1 -1
- package/build/src/elements/http/BodyMultipartEditor.d.ts.map +1 -1
- package/build/src/elements/http/BodyMultipartEditor.js +4 -0
- package/build/src/elements/http/BodyMultipartEditor.js.map +1 -1
- package/build/src/elements/http/CertificateAdd.element.d.ts +1 -1
- package/build/src/elements/http/CertificateAdd.element.d.ts.map +1 -1
- package/build/src/elements/http/CertificateAdd.element.js +8 -8
- package/build/src/elements/http/CertificateAdd.element.js.map +1 -1
- package/build/src/elements/http/CertificateAdd.styles.js +1 -1
- package/build/src/elements/http/CertificateAdd.styles.js.map +1 -1
- package/build/src/elements/http/HttpAssertions.element.js +3 -3
- package/build/src/elements/http/HttpAssertions.element.js.map +1 -1
- package/build/src/elements/http/HttpFlows.element.js +3 -3
- package/build/src/elements/http/HttpFlows.element.js.map +1 -1
- package/build/src/elements/http/HttpFlowsUi.d.ts +1 -1
- package/build/src/elements/http/HttpFlowsUi.d.ts.map +1 -1
- package/build/src/elements/http/HttpFlowsUi.js +31 -31
- package/build/src/elements/http/HttpFlowsUi.js.map +1 -1
- package/build/src/elements/http/RequestConfigElement.d.ts +1 -1
- package/build/src/elements/http/RequestConfigElement.d.ts.map +1 -1
- package/build/src/elements/http/RequestConfigElement.js +7 -7
- package/build/src/elements/http/RequestConfigElement.js.map +1 -1
- package/build/src/elements/http/UrlParamsForm.d.ts +1 -1
- package/build/src/elements/http/UrlParamsForm.d.ts.map +1 -1
- package/build/src/elements/http/UrlParamsForm.js +1 -1
- package/build/src/elements/http/UrlParamsForm.js.map +1 -1
- package/build/src/elements/project/ProjectRunner.d.ts +1 -1
- package/build/src/elements/project/ProjectRunner.d.ts.map +1 -1
- package/build/src/elements/project/ProjectRunner.js +5 -5
- package/build/src/elements/project/ProjectRunner.js.map +1 -1
- package/build/src/md/input/Input.d.ts +0 -15
- package/build/src/md/input/Input.d.ts.map +1 -1
- package/build/src/md/input/Input.js +7 -42
- package/build/src/md/input/Input.js.map +1 -1
- package/build/src/md/list/internals/List.d.ts +7 -2
- package/build/src/md/list/internals/List.d.ts.map +1 -1
- package/build/src/md/list/internals/List.js +6 -0
- package/build/src/md/list/internals/List.js.map +1 -1
- package/build/src/md/list/internals/ListItem.styles.d.ts.map +1 -1
- package/build/src/md/list/internals/ListItem.styles.js +8 -0
- package/build/src/md/list/internals/ListItem.styles.js.map +1 -1
- package/build/src/md/listbox/internals/Listbox.d.ts +2 -2
- package/build/src/md/listbox/internals/Listbox.d.ts.map +1 -1
- package/build/src/md/listbox/internals/Listbox.js.map +1 -1
- package/build/src/md/text-area/internals/TextAreaElement.d.ts.map +1 -1
- package/build/src/md/text-area/internals/TextAreaElement.js +0 -5
- package/build/src/md/text-area/internals/TextAreaElement.js.map +1 -1
- package/build/src/md/text-area/ui-text-area.d.ts.map +1 -1
- package/build/src/md/text-area/ui-text-area.js +3 -2
- package/build/src/md/text-area/ui-text-area.js.map +1 -1
- package/build/src/md/text-field/internals/{TextFieldElement.d.ts → TextField.d.ts} +2 -2
- package/build/src/md/text-field/internals/TextField.d.ts.map +1 -0
- package/build/src/md/text-field/internals/{TextFieldElement.js → TextField.js} +2 -5
- package/build/src/md/text-field/internals/TextField.js.map +1 -0
- package/build/src/{visualization/elements/WorkspaceStyles.d.ts → md/text-field/internals/common.styles.d.ts} +1 -1
- package/build/src/md/text-field/internals/common.styles.d.ts.map +1 -0
- package/build/src/md/text-field/internals/{TextField.styles.js → common.styles.js} +8 -94
- package/build/src/md/text-field/internals/common.styles.js.map +1 -0
- package/build/src/md/text-field/internals/{TextField.styles.d.ts → filled.styles.d.ts} +1 -1
- package/build/src/md/text-field/internals/filled.styles.d.ts.map +1 -0
- package/build/src/md/text-field/internals/filled.styles.js +107 -0
- package/build/src/md/text-field/internals/filled.styles.js.map +1 -0
- package/build/src/md/text-field/internals/outlined.styles.d.ts +3 -0
- package/build/src/md/text-field/internals/outlined.styles.d.ts.map +1 -0
- package/build/src/md/text-field/internals/outlined.styles.js +43 -0
- package/build/src/md/text-field/internals/outlined.styles.js.map +1 -0
- package/build/src/md/text-field/ui-filled-text-field.d.ts +11 -0
- package/build/src/md/text-field/ui-filled-text-field.d.ts.map +1 -0
- package/build/src/md/text-field/ui-filled-text-field.js +28 -0
- package/build/src/md/text-field/ui-filled-text-field.js.map +1 -0
- package/build/src/md/text-field/ui-outlined-text-field.d.ts +11 -0
- package/build/src/md/text-field/ui-outlined-text-field.d.ts.map +1 -0
- package/build/src/md/text-field/ui-outlined-text-field.js +28 -0
- package/build/src/md/text-field/ui-outlined-text-field.js.map +1 -0
- package/build/src/types/input.d.ts +1 -1
- package/build/src/types/input.d.ts.map +1 -1
- package/build/src/types/input.js.map +1 -1
- package/demo/elements/authorization/oauth-authorize.html +4 -4
- package/demo/elements/authorization/oauth-authorize.ts +1 -1
- package/demo/elements/autocomplete/index.html +24 -0
- package/demo/elements/autocomplete/index.ts +123 -0
- package/demo/elements/http/body-editor.ts +3 -3
- package/demo/elements/index.html +15 -11
- package/demo/md/index.html +1 -1
- package/demo/md/inputs/input.html +10 -15
- package/demo/md/inputs/input.ts +389 -101
- package/demo/page.css +4 -0
- package/package.json +7 -2
- package/src/elements/authorization/ui/ApiKeyAuthorization.ts +7 -7
- package/src/elements/authorization/ui/Authorization.styles.ts +4 -4
- package/src/elements/authorization/ui/BasicAuthorization.ts +5 -5
- package/src/elements/authorization/ui/BearerAuthorization.ts +3 -3
- package/src/elements/authorization/ui/NtlmAuthorization.ts +7 -7
- package/src/elements/authorization/ui/OAuth2Authorization.ts +32 -27
- package/src/elements/authorization/ui/OidcAuthorization.ts +4 -4
- package/src/elements/autocomplete/autocomplete-input.ts +14 -0
- package/src/elements/autocomplete/internals/autocomplete.styles.ts +25 -0
- package/src/elements/autocomplete/internals/autocomplete.ts +490 -0
- package/src/elements/dialog/internals/DeleteCookieAction.element.ts +5 -5
- package/src/elements/dialog/internals/Rename.ts +3 -3
- package/src/elements/dialog/internals/SetCookieAction.element.ts +9 -9
- package/src/elements/environment/EnvironmentEditor.styles.ts +1 -1
- package/src/elements/environment/EnvironmentEditor.ts +3 -3
- package/src/elements/environment/ServerEditor.styles.ts +1 -1
- package/src/elements/environment/ServerEditor.ts +7 -7
- package/src/elements/http/BodyMultipartEditor.ts +4 -0
- package/src/elements/http/CertificateAdd.element.ts +8 -8
- package/src/elements/http/CertificateAdd.styles.ts +1 -1
- package/src/elements/http/HttpAssertions.element.ts +3 -3
- package/src/elements/http/HttpFlows.element.ts +3 -3
- package/src/elements/http/HttpFlowsUi.ts +31 -31
- package/src/elements/http/RequestConfigElement.ts +7 -7
- package/src/elements/http/UrlParamsForm.ts +1 -1
- package/src/elements/project/ProjectRunner.ts +5 -5
- package/src/md/input/Input.ts +6 -21
- package/src/md/list/internals/List.ts +14 -2
- package/src/md/list/internals/ListItem.styles.ts +8 -0
- package/src/md/listbox/internals/Listbox.ts +2 -2
- package/src/md/text-area/internals/TextAreaElement.ts +0 -5
- package/src/md/text-area/ui-text-area.ts +3 -2
- package/src/md/text-field/internals/{TextFieldElement.ts → TextField.ts} +1 -4
- package/src/md/text-field/internals/{TextField.styles.ts → common.styles.ts} +7 -93
- package/src/md/text-field/internals/filled.styles.ts +107 -0
- package/src/md/text-field/internals/outlined.styles.ts +43 -0
- package/src/md/text-field/ui-filled-text-field.ts +16 -0
- package/src/md/text-field/ui-outlined-text-field.ts +16 -0
- package/src/types/input.ts +0 -1
- package/test/elements/authorization/basic-method.test.ts +3 -3
- package/test/elements/authorization/bearer-method.test.ts +2 -2
- package/test/elements/authorization/ntlm-method.test.ts +4 -4
- package/test/elements/autocomplete/autocomplete-input.spec.ts +448 -0
- package/test/elements/http/BodyMultipartEditorElement.test.ts +15 -16
- package/test/elements/http/CertificateAdd.test.ts +11 -11
- package/test/elements/http/HttpAssertions.test.ts +9 -9
- package/test/elements/http/HttpFlows.test.ts +4 -4
- package/test/env.ts +15 -0
- package/test/tsconfig.json +1 -7
- package/web-test-runner.config.js +5 -1
- package/build/src/md/text-field/internals/TextField.styles.d.ts.map +0 -1
- package/build/src/md/text-field/internals/TextField.styles.js.map +0 -1
- package/build/src/md/text-field/internals/TextFieldElement.d.ts.map +0 -1
- package/build/src/md/text-field/internals/TextFieldElement.js.map +0 -1
- package/build/src/md/text-field/ui-text-field.d.ts +0 -11
- package/build/src/md/text-field/ui-text-field.d.ts.map +0 -1
- package/build/src/md/text-field/ui-text-field.js.map +0 -1
- package/build/src/visualization/elements/VizAssociationElement.d.ts +0 -4
- package/build/src/visualization/elements/VizAssociationElement.d.ts.map +0 -1
- package/build/src/visualization/elements/VizAssociationElement.js +0 -4
- package/build/src/visualization/elements/VizAssociationElement.js.map +0 -1
- package/build/src/visualization/elements/VizWorkspaceElement.d.ts +0 -110
- package/build/src/visualization/elements/VizWorkspaceElement.d.ts.map +0 -1
- package/build/src/visualization/elements/VizWorkspaceElement.js +0 -321
- package/build/src/visualization/elements/VizWorkspaceElement.js.map +0 -1
- package/build/src/visualization/elements/WorkspaceStyles.d.ts.map +0 -1
- package/build/src/visualization/elements/WorkspaceStyles.js +0 -168
- package/build/src/visualization/elements/WorkspaceStyles.js.map +0 -1
- package/build/src/visualization/lib/AnchorFinder.d.ts +0 -64
- package/build/src/visualization/lib/AnchorFinder.d.ts.map +0 -1
- package/build/src/visualization/lib/AnchorFinder.js +0 -107
- package/build/src/visualization/lib/AnchorFinder.js.map +0 -1
- package/build/src/visualization/lib/AnchorUtils.d.ts +0 -10
- package/build/src/visualization/lib/AnchorUtils.d.ts.map +0 -1
- package/build/src/visualization/lib/AnchorUtils.js +0 -44
- package/build/src/visualization/lib/AnchorUtils.js.map +0 -1
- package/build/src/visualization/lib/AssociationAnchors.d.ts +0 -134
- package/build/src/visualization/lib/AssociationAnchors.d.ts.map +0 -1
- package/build/src/visualization/lib/AssociationAnchors.js +0 -351
- package/build/src/visualization/lib/AssociationAnchors.js.map +0 -1
- package/build/src/visualization/lib/LabelSketch.d.ts +0 -16
- package/build/src/visualization/lib/LabelSketch.d.ts.map +0 -1
- package/build/src/visualization/lib/LabelSketch.js +0 -53
- package/build/src/visualization/lib/LabelSketch.js.map +0 -1
- package/build/src/visualization/lib/LineSketch.d.ts +0 -26
- package/build/src/visualization/lib/LineSketch.d.ts.map +0 -1
- package/build/src/visualization/lib/LineSketch.js +0 -55
- package/build/src/visualization/lib/LineSketch.js.map +0 -1
- package/build/src/visualization/lib/Point.d.ts +0 -74
- package/build/src/visualization/lib/Point.d.ts.map +0 -1
- package/build/src/visualization/lib/Point.js +0 -121
- package/build/src/visualization/lib/Point.js.map +0 -1
- package/build/src/visualization/lib/PositionUtils.d.ts +0 -65
- package/build/src/visualization/lib/PositionUtils.d.ts.map +0 -1
- package/build/src/visualization/lib/PositionUtils.js +0 -205
- package/build/src/visualization/lib/PositionUtils.js.map +0 -1
- package/build/src/visualization/lib/SelectionManager.d.ts +0 -183
- package/build/src/visualization/lib/SelectionManager.d.ts.map +0 -1
- package/build/src/visualization/lib/SelectionManager.js +0 -481
- package/build/src/visualization/lib/SelectionManager.js.map +0 -1
- package/build/src/visualization/lib/ShapeArtist.d.ts +0 -45
- package/build/src/visualization/lib/ShapeArtist.d.ts.map +0 -1
- package/build/src/visualization/lib/ShapeArtist.js +0 -209
- package/build/src/visualization/lib/ShapeArtist.js.map +0 -1
- package/build/src/visualization/lib/SvgMarkers.d.ts +0 -14
- package/build/src/visualization/lib/SvgMarkers.d.ts.map +0 -1
- package/build/src/visualization/lib/SvgMarkers.js +0 -77
- package/build/src/visualization/lib/SvgMarkers.js.map +0 -1
- package/build/src/visualization/lib/TipSketch.d.ts +0 -26
- package/build/src/visualization/lib/TipSketch.d.ts.map +0 -1
- package/build/src/visualization/lib/TipSketch.js +0 -77
- package/build/src/visualization/lib/TipSketch.js.map +0 -1
- package/build/src/visualization/lib/TouchSupport.d.ts +0 -14
- package/build/src/visualization/lib/TouchSupport.d.ts.map +0 -1
- package/build/src/visualization/lib/TouchSupport.js +0 -55
- package/build/src/visualization/lib/TouchSupport.js.map +0 -1
- package/build/src/visualization/lib/Utils.d.ts +0 -25
- package/build/src/visualization/lib/Utils.d.ts.map +0 -1
- package/build/src/visualization/lib/Utils.js +0 -59
- package/build/src/visualization/lib/Utils.js.map +0 -1
- package/build/src/visualization/lib/VisualizationTypes.d.ts +0 -216
- package/build/src/visualization/lib/VisualizationTypes.d.ts.map +0 -1
- package/build/src/visualization/lib/VisualizationTypes.js +0 -3
- package/build/src/visualization/lib/VisualizationTypes.js.map +0 -1
- package/build/src/visualization/lib/WorkspaceAlignment.d.ts +0 -51
- package/build/src/visualization/lib/WorkspaceAlignment.d.ts.map +0 -1
- package/build/src/visualization/lib/WorkspaceAlignment.js +0 -243
- package/build/src/visualization/lib/WorkspaceAlignment.js.map +0 -1
- package/build/src/visualization/lib/WorkspaceDebugging.d.ts +0 -104
- package/build/src/visualization/lib/WorkspaceDebugging.d.ts.map +0 -1
- package/build/src/visualization/lib/WorkspaceDebugging.js +0 -286
- package/build/src/visualization/lib/WorkspaceDebugging.js.map +0 -1
- package/build/src/visualization/lib/WorkspaceEdges.d.ts +0 -293
- package/build/src/visualization/lib/WorkspaceEdges.d.ts.map +0 -1
- package/build/src/visualization/lib/WorkspaceEdges.js +0 -1073
- package/build/src/visualization/lib/WorkspaceEdges.js.map +0 -1
- package/build/src/visualization/lib/WorkspaceGestures.d.ts +0 -119
- package/build/src/visualization/lib/WorkspaceGestures.d.ts.map +0 -1
- package/build/src/visualization/lib/WorkspaceGestures.js +0 -376
- package/build/src/visualization/lib/WorkspaceGestures.js.map +0 -1
- package/build/src/visualization/lib/WorkspaceSizing.d.ts +0 -66
- package/build/src/visualization/lib/WorkspaceSizing.d.ts.map +0 -1
- package/build/src/visualization/lib/WorkspaceSizing.js +0 -168
- package/build/src/visualization/lib/WorkspaceSizing.js.map +0 -1
- package/build/src/visualization/lib/lines/RectilinearLine.d.ts +0 -114
- package/build/src/visualization/lib/lines/RectilinearLine.d.ts.map +0 -1
- package/build/src/visualization/lib/lines/RectilinearLine.js +0 -605
- package/build/src/visualization/lib/lines/RectilinearLine.js.map +0 -1
- package/build/src/visualization/lib/tips/RectilinearTip.d.ts +0 -26
- package/build/src/visualization/lib/tips/RectilinearTip.d.ts.map +0 -1
- package/build/src/visualization/lib/tips/RectilinearTip.js +0 -149
- package/build/src/visualization/lib/tips/RectilinearTip.js.map +0 -1
- package/build/src/visualization/lib/tips/TipArtist.d.ts +0 -22
- package/build/src/visualization/lib/tips/TipArtist.d.ts.map +0 -1
- package/build/src/visualization/lib/tips/TipArtist.js +0 -31
- package/build/src/visualization/lib/tips/TipArtist.js.map +0 -1
- package/build/src/visualization/lib/types.d.ts +0 -164
- package/build/src/visualization/lib/types.d.ts.map +0 -1
- package/build/src/visualization/lib/types.js +0 -2
- package/build/src/visualization/lib/types.js.map +0 -1
- package/build/src/visualization/plugin/dnd/DragAndDropPlugin.d.ts +0 -126
- package/build/src/visualization/plugin/dnd/DragAndDropPlugin.d.ts.map +0 -1
- package/build/src/visualization/plugin/dnd/DragAndDropPlugin.js +0 -260
- package/build/src/visualization/plugin/dnd/DragAndDropPlugin.js.map +0 -1
- package/build/src/visualization/plugin/group-selection/GroupSelection.d.ts +0 -93
- package/build/src/visualization/plugin/group-selection/GroupSelection.d.ts.map +0 -1
- package/build/src/visualization/plugin/group-selection/GroupSelection.js +0 -250
- package/build/src/visualization/plugin/group-selection/GroupSelection.js.map +0 -1
- package/build/src/visualization/plugin/positioning/DataModelLayout.d.ts +0 -10
- package/build/src/visualization/plugin/positioning/DataModelLayout.d.ts.map +0 -1
- package/build/src/visualization/plugin/positioning/DataModelLayout.js +0 -105
- package/build/src/visualization/plugin/positioning/DataModelLayout.js.map +0 -1
- package/build/src/visualization/plugin/positioning/WorkspaceLayout.d.ts +0 -93
- package/build/src/visualization/plugin/positioning/WorkspaceLayout.d.ts.map +0 -1
- package/build/src/visualization/plugin/positioning/WorkspaceLayout.js +0 -96
- package/build/src/visualization/plugin/positioning/WorkspaceLayout.js.map +0 -1
- package/build/src/visualization/viz-association.d.ts +0 -7
- package/build/src/visualization/viz-association.d.ts.map +0 -1
- package/build/src/visualization/viz-association.js +0 -3
- package/build/src/visualization/viz-association.js.map +0 -1
- package/build/src/visualization/viz-workspace.d.ts +0 -7
- package/build/src/visualization/viz-workspace.d.ts.map +0 -1
- package/build/src/visualization/viz-workspace.js +0 -3
- package/build/src/visualization/viz-workspace.js.map +0 -1
- package/src/md/text-field/ui-text-field.ts +0 -15
- package/src/visualization/elements/VizAssociationElement.ts +0 -3
- package/src/visualization/elements/VizWorkspaceElement.ts +0 -302
- package/src/visualization/elements/WorkspaceStyles.ts +0 -168
- package/src/visualization/lib/AnchorFinder.ts +0 -112
- package/src/visualization/lib/AnchorUtils.ts +0 -53
- package/src/visualization/lib/AssociationAnchors.ts +0 -418
- package/src/visualization/lib/LabelSketch.ts +0 -67
- package/src/visualization/lib/LineSketch.ts +0 -62
- package/src/visualization/lib/Point.ts +0 -134
- package/src/visualization/lib/PositionUtils.ts +0 -218
- package/src/visualization/lib/SelectionManager.ts +0 -513
- package/src/visualization/lib/ShapeArtist.ts +0 -222
- package/src/visualization/lib/SvgMarkers.ts +0 -80
- package/src/visualization/lib/TipSketch.ts +0 -91
- package/src/visualization/lib/TouchSupport.ts +0 -72
- package/src/visualization/lib/Utils.ts +0 -63
- package/src/visualization/lib/VisualizationTypes.ts +0 -232
- package/src/visualization/lib/WorkspaceAlignment.ts +0 -261
- package/src/visualization/lib/WorkspaceDebugging.ts +0 -313
- package/src/visualization/lib/WorkspaceEdges.ts +0 -1153
- package/src/visualization/lib/WorkspaceGestures.ts +0 -400
- package/src/visualization/lib/WorkspaceSizing.ts +0 -181
- package/src/visualization/lib/lines/RectilinearLine.ts +0 -589
- package/src/visualization/lib/tips/RectilinearTip.ts +0 -156
- package/src/visualization/lib/tips/TipArtist.ts +0 -34
- package/src/visualization/lib/types.ts +0 -173
- package/src/visualization/plugin/dnd/DragAndDropPlugin.ts +0 -294
- package/src/visualization/plugin/group-selection/GroupSelection.ts +0 -271
- package/src/visualization/plugin/positioning/DataModelLayout.ts +0 -114
- package/src/visualization/plugin/positioning/WorkspaceLayout.ts +0 -149
- package/src/visualization/viz-association.ts +0 -9
- package/src/visualization/viz-workspace.ts +0 -9
- package/test/env.d.ts +0 -9
- package/test/env.js +0 -7
- package/test/visualization/lib/AnchorFinder.test.ts +0 -313
- package/test/visualization/lib/AnchorUtils.test.ts +0 -178
- package/test/visualization/lib/PositionUtils.test.ts +0 -406
- package/test/visualization/lib/test-styles.css +0 -80
|
@@ -1,605 +0,0 @@
|
|
|
1
|
-
import { findDirection } from '../PositionUtils.js';
|
|
2
|
-
import { Point } from '../Point.js';
|
|
3
|
-
export const startWest = Symbol('startWest');
|
|
4
|
-
export const startEast = Symbol('startEast');
|
|
5
|
-
export const startSouth = Symbol('startSouth');
|
|
6
|
-
export const startNorth = Symbol('startNorth');
|
|
7
|
-
export const sketchEastEast = Symbol('sketchEastEast');
|
|
8
|
-
export const sketchEastWest = Symbol('sketchEastWest');
|
|
9
|
-
export const sketchEastSouth = Symbol('sketchEastSouth');
|
|
10
|
-
export const sketchEastNorth = Symbol('sketchEastNorth');
|
|
11
|
-
export const sketchNorthWest = Symbol('sketchNorthWest');
|
|
12
|
-
export const sketchNorthEast = Symbol('sketchNorthEast');
|
|
13
|
-
export const sketchNorthSouth = Symbol('sketchNorthSouth');
|
|
14
|
-
export const sketchNorthNorth = Symbol('sketchNorthNorth');
|
|
15
|
-
export const sketchWestSouth = Symbol('sketchWestSouth');
|
|
16
|
-
export const sketchWestWest = Symbol('sketchWestWest');
|
|
17
|
-
export const sketchWestEast = Symbol('sketchWestEast');
|
|
18
|
-
export const sketchWestNorth = Symbol('sketchWestNorth');
|
|
19
|
-
export const sketchSouthNorth = Symbol('sketchSouthNorth');
|
|
20
|
-
export const sketchSouthWest = Symbol('sketchSouthWest');
|
|
21
|
-
export const sketchSouthSouth = Symbol('sketchSouthSouth');
|
|
22
|
-
export const sketchSouthEast = Symbol('sketchSouthEast');
|
|
23
|
-
export const ElbowThreshold = 24;
|
|
24
|
-
/**
|
|
25
|
-
* A class that draws a rectilinear line
|
|
26
|
-
*/
|
|
27
|
-
export class RectilinearLine {
|
|
28
|
-
ep;
|
|
29
|
-
sp;
|
|
30
|
-
source;
|
|
31
|
-
target;
|
|
32
|
-
others;
|
|
33
|
-
/**
|
|
34
|
-
* The default padding to use when computing distance between the line and an object.
|
|
35
|
-
*/
|
|
36
|
-
overlapPadding = 20;
|
|
37
|
-
/**
|
|
38
|
-
* The list of all points (start + end + control points)
|
|
39
|
-
*/
|
|
40
|
-
coordinates;
|
|
41
|
-
/**
|
|
42
|
-
* The list of all control points.
|
|
43
|
-
*/
|
|
44
|
-
controlPoints = [];
|
|
45
|
-
transformOrigin;
|
|
46
|
-
/**
|
|
47
|
-
* The delta between Y coordinates
|
|
48
|
-
*/
|
|
49
|
-
dx;
|
|
50
|
-
/**
|
|
51
|
-
* The delta between Y coordinates
|
|
52
|
-
*/
|
|
53
|
-
dy;
|
|
54
|
-
/**
|
|
55
|
-
* Half distance between start.x and end.x
|
|
56
|
-
*/
|
|
57
|
-
halfX;
|
|
58
|
-
/**
|
|
59
|
-
* Half distance between start.y and end.y
|
|
60
|
-
*/
|
|
61
|
-
halfY;
|
|
62
|
-
constructor(config) {
|
|
63
|
-
const { endPoint, target, startPoint, source, others } = config;
|
|
64
|
-
this.ep = endPoint;
|
|
65
|
-
this.sp = startPoint;
|
|
66
|
-
this.source = source;
|
|
67
|
-
this.target = target;
|
|
68
|
-
this.others = others;
|
|
69
|
-
this.coordinates = [startPoint];
|
|
70
|
-
this.transformOrigin = `${startPoint.x}px ${endPoint.y}px`;
|
|
71
|
-
this.dx = endPoint.x - startPoint.x;
|
|
72
|
-
this.dy = endPoint.y - startPoint.y;
|
|
73
|
-
this.halfX = Math.abs(this.dx) / 2;
|
|
74
|
-
this.halfY = Math.abs(this.dy) / 2;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Sketches a regular line.
|
|
78
|
-
* @returns Computed model for the association.
|
|
79
|
-
*/
|
|
80
|
-
sketch() {
|
|
81
|
-
const { sp, ep, source, target } = this;
|
|
82
|
-
if (!sp.validate() || !ep.validate()) {
|
|
83
|
-
return null;
|
|
84
|
-
}
|
|
85
|
-
const directions = findDirection(sp, ep, source, target);
|
|
86
|
-
const { start, end } = directions;
|
|
87
|
-
// console.log(start, end);
|
|
88
|
-
if (start === 'west') {
|
|
89
|
-
this[startWest](end);
|
|
90
|
-
}
|
|
91
|
-
else if (start === 'south') {
|
|
92
|
-
this[startSouth](end);
|
|
93
|
-
}
|
|
94
|
-
else if (start === 'east') {
|
|
95
|
-
this[startEast](end);
|
|
96
|
-
}
|
|
97
|
-
else {
|
|
98
|
-
this[startNorth](end);
|
|
99
|
-
}
|
|
100
|
-
const { coordinates, controlPoints, transformOrigin } = this;
|
|
101
|
-
coordinates.push(this.ep);
|
|
102
|
-
const path = coordinates.map((item) => `${item.x},${item.y}`).join(' ');
|
|
103
|
-
const result = {
|
|
104
|
-
controlPoints,
|
|
105
|
-
transformOrigin,
|
|
106
|
-
type: 'rectilinear',
|
|
107
|
-
coordinates,
|
|
108
|
-
rotate: 0,
|
|
109
|
-
path,
|
|
110
|
-
startPoint: sp,
|
|
111
|
-
endPoint: ep,
|
|
112
|
-
};
|
|
113
|
-
return result;
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Adds a control point to the list of points.
|
|
117
|
-
*/
|
|
118
|
-
addCP(x = 0, y = 0) {
|
|
119
|
-
const cp = new Point(x, y);
|
|
120
|
-
this.coordinates.push(cp);
|
|
121
|
-
this.controlPoints.push(cp);
|
|
122
|
-
return cp;
|
|
123
|
-
}
|
|
124
|
-
/**
|
|
125
|
-
* Computes the line that starts on the west side of the source object
|
|
126
|
-
* and end in the `end`
|
|
127
|
-
* @param end The direction where the line ends.
|
|
128
|
-
*/
|
|
129
|
-
[startWest](end) {
|
|
130
|
-
if (end === 'west') {
|
|
131
|
-
this[sketchWestWest]();
|
|
132
|
-
}
|
|
133
|
-
else if (end === 'south') {
|
|
134
|
-
this[sketchWestSouth]();
|
|
135
|
-
}
|
|
136
|
-
else if (end === 'east') {
|
|
137
|
-
this[sketchWestEast]();
|
|
138
|
-
}
|
|
139
|
-
else {
|
|
140
|
-
this[sketchWestNorth]();
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
[sketchWestSouth]() {
|
|
144
|
-
const { target, sp, ep, overlapPadding, dx, dy } = this;
|
|
145
|
-
if (dx >= 0) {
|
|
146
|
-
if (dy < 0) {
|
|
147
|
-
// go around the source to the right
|
|
148
|
-
const cp1 = this.addCP(sp.x - overlapPadding, sp.y);
|
|
149
|
-
const cp2 = this.addCP(cp1.x, target.bottom + overlapPadding);
|
|
150
|
-
this.addCP(ep.x, cp2.y);
|
|
151
|
-
}
|
|
152
|
-
else {
|
|
153
|
-
const cp1 = this.addCP(sp.x - overlapPadding, sp.y);
|
|
154
|
-
const cp2 = this.addCP(cp1.x, target.bottom + overlapPadding);
|
|
155
|
-
this.addCP(ep.x, cp2.y);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
else if (dy < 0) {
|
|
159
|
-
this.addCP(ep.x, sp.y);
|
|
160
|
-
}
|
|
161
|
-
else {
|
|
162
|
-
const cp1 = this.addCP(sp.x - overlapPadding, sp.y);
|
|
163
|
-
const cp2 = this.addCP(cp1.x, target.bottom + overlapPadding);
|
|
164
|
-
this.addCP(ep.x, cp2.y);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
[sketchWestWest]() {
|
|
168
|
-
const { source, target, sp, ep, overlapPadding, halfX, dy } = this;
|
|
169
|
-
const overlap = source.left < target.right;
|
|
170
|
-
if (overlap) {
|
|
171
|
-
const cp1 = this.addCP(sp.x - overlapPadding, sp.y);
|
|
172
|
-
const cp2 = this.addCP(cp1.x, source.top - overlapPadding);
|
|
173
|
-
const cp3 = this.addCP(Math.max(target.right, source.right) + overlapPadding, cp2.y);
|
|
174
|
-
this.addCP(cp3.x, ep.y);
|
|
175
|
-
}
|
|
176
|
-
else {
|
|
177
|
-
// draw a straight line when distance between the two is below the threshold
|
|
178
|
-
if (Math.abs(dy) > ElbowThreshold) {
|
|
179
|
-
this.addCP(sp.x - halfX, sp.y);
|
|
180
|
-
this.addCP(ep.x + halfX, ep.y);
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
}
|
|
184
|
-
[sketchWestEast]() {
|
|
185
|
-
const { source, target, sp, ep, overlapPadding } = this;
|
|
186
|
-
const overlap = source.left < target.left;
|
|
187
|
-
if (overlap) {
|
|
188
|
-
const cp1 = this.addCP(sp.x - overlapPadding, sp.y);
|
|
189
|
-
this.addCP(cp1.x, ep.y);
|
|
190
|
-
}
|
|
191
|
-
else {
|
|
192
|
-
const cp1 = this.addCP(ep.x - overlapPadding, sp.y);
|
|
193
|
-
this.addCP(cp1.x, ep.y);
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
[sketchWestNorth]() {
|
|
197
|
-
const { source, target, sp, ep, overlapPadding } = this;
|
|
198
|
-
const overlap = source.left < target.right;
|
|
199
|
-
if (overlap) {
|
|
200
|
-
const cp1 = this.addCP(sp.x - overlapPadding, sp.y);
|
|
201
|
-
const cp2 = this.addCP(cp1.x, ep.y - overlapPadding);
|
|
202
|
-
this.addCP(ep.x, cp2.y);
|
|
203
|
-
}
|
|
204
|
-
else {
|
|
205
|
-
this.addCP(ep.x, sp.y);
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
/**
|
|
209
|
-
* Computes the line that starts on the west side of the source object
|
|
210
|
-
* and end in the `end`
|
|
211
|
-
* @param end The direction where the line ends.
|
|
212
|
-
*/
|
|
213
|
-
[startSouth](end) {
|
|
214
|
-
if (end === 'west') {
|
|
215
|
-
this[sketchSouthWest]();
|
|
216
|
-
}
|
|
217
|
-
else if (end === 'south') {
|
|
218
|
-
this[sketchSouthSouth]();
|
|
219
|
-
}
|
|
220
|
-
else if (end === 'east') {
|
|
221
|
-
this[sketchSouthEast]();
|
|
222
|
-
}
|
|
223
|
-
else {
|
|
224
|
-
this[sketchSouthNorth]();
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
[sketchSouthNorth]() {
|
|
228
|
-
const { source, target, sp, ep, halfY, overlapPadding, dx } = this;
|
|
229
|
-
const overlapping = source.bottom + overlapPadding > target.top - overlapPadding;
|
|
230
|
-
if (overlapping) {
|
|
231
|
-
const cp1 = this.addCP(sp.x, sp.y + overlapPadding);
|
|
232
|
-
let cp2;
|
|
233
|
-
if (source.right < target.left) {
|
|
234
|
-
// the target is on the right
|
|
235
|
-
cp2 = this.addCP(target.left - overlapPadding, cp1.y);
|
|
236
|
-
}
|
|
237
|
-
else {
|
|
238
|
-
// the target is on the left
|
|
239
|
-
cp2 = this.addCP(target.right + overlapPadding, cp1.y);
|
|
240
|
-
}
|
|
241
|
-
const cp3 = this.addCP(cp2.x, target.top - overlapPadding);
|
|
242
|
-
this.addCP(ep.x, cp3.y);
|
|
243
|
-
}
|
|
244
|
-
else {
|
|
245
|
-
// draw a straight line instead of the elbow when the distance is below the threshold
|
|
246
|
-
if (Math.abs(dx) > ElbowThreshold) {
|
|
247
|
-
const cp1 = this.addCP(sp.x, sp.y + halfY);
|
|
248
|
-
this.addCP(ep.x, cp1.y);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
[sketchSouthWest]() {
|
|
253
|
-
const { sp, ep, dx, dy, halfY, halfX, overlapPadding } = this;
|
|
254
|
-
if (dx >= 0) {
|
|
255
|
-
if (dy < 0) {
|
|
256
|
-
const cp1 = this.addCP(sp.x, sp.y + overlapPadding);
|
|
257
|
-
const cp2 = this.addCP(ep.x + overlapPadding, cp1.y);
|
|
258
|
-
this.addCP(cp2.x, ep.y);
|
|
259
|
-
}
|
|
260
|
-
else {
|
|
261
|
-
const cp1 = this.addCP(sp.x, sp.y + halfY);
|
|
262
|
-
const cp2 = this.addCP(ep.x + overlapPadding, cp1.y);
|
|
263
|
-
this.addCP(cp2.x, ep.y);
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
else if (dy < 0) {
|
|
267
|
-
const cp1 = this.addCP(sp.x, sp.y + overlapPadding);
|
|
268
|
-
const cp2 = this.addCP(ep.x + halfX, cp1.y);
|
|
269
|
-
this.addCP(cp2.x, ep.y);
|
|
270
|
-
}
|
|
271
|
-
else {
|
|
272
|
-
this.addCP(sp.x, ep.y);
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
[sketchSouthSouth]() {
|
|
276
|
-
const { source, target, sp, ep, overlapPadding } = this;
|
|
277
|
-
if (source.bottom + 2 * overlapPadding > target.bottom) {
|
|
278
|
-
const cp1 = this.addCP(sp.x, sp.y + overlapPadding);
|
|
279
|
-
this.addCP(ep.x, cp1.y);
|
|
280
|
-
}
|
|
281
|
-
else {
|
|
282
|
-
const cp1 = this.addCP(sp.x, ep.y + overlapPadding);
|
|
283
|
-
this.addCP(ep.x, cp1.y);
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
[sketchSouthEast]() {
|
|
287
|
-
const { source, sp, ep, dx, dy, overlapPadding, halfX, halfY } = this;
|
|
288
|
-
if (dx >= 0) {
|
|
289
|
-
if (dy < 0) {
|
|
290
|
-
const cp1 = this.addCP(sp.x, sp.y + overlapPadding);
|
|
291
|
-
let c2x = sp.x + halfX;
|
|
292
|
-
if (c2x < source.right + overlapPadding) {
|
|
293
|
-
c2x = ep.x - overlapPadding;
|
|
294
|
-
}
|
|
295
|
-
const cp2 = this.addCP(c2x, cp1.y);
|
|
296
|
-
this.addCP(cp2.x, ep.y);
|
|
297
|
-
}
|
|
298
|
-
else {
|
|
299
|
-
this.addCP(sp.x, ep.y);
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
else if (dy < 0) {
|
|
303
|
-
const cp1 = this.addCP(sp.x, sp.y + overlapPadding);
|
|
304
|
-
const cp2 = this.addCP(ep.x - overlapPadding, cp1.y);
|
|
305
|
-
this.addCP(cp2.x, ep.y);
|
|
306
|
-
}
|
|
307
|
-
else {
|
|
308
|
-
const cp1 = this.addCP(sp.x, sp.y + halfY);
|
|
309
|
-
const cp2 = this.addCP(ep.x - overlapPadding, cp1.y);
|
|
310
|
-
this.addCP(cp2.x, ep.y);
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
/**
|
|
314
|
-
* Computes the line that starts on the west side of the source object
|
|
315
|
-
* and end in the `end`
|
|
316
|
-
* @param end The direction where the line ends.
|
|
317
|
-
*/
|
|
318
|
-
[startEast](end) {
|
|
319
|
-
if (end === 'west') {
|
|
320
|
-
this[sketchEastWest]();
|
|
321
|
-
}
|
|
322
|
-
else if (end === 'east') {
|
|
323
|
-
this[sketchEastEast]();
|
|
324
|
-
}
|
|
325
|
-
else if (end === 'south') {
|
|
326
|
-
this[sketchEastSouth]();
|
|
327
|
-
}
|
|
328
|
-
else {
|
|
329
|
-
this[sketchEastNorth]();
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
[sketchEastEast]() {
|
|
333
|
-
const { source, target, sp, ep, overlapPadding, halfX, dy } = this;
|
|
334
|
-
if (sp.x + 2 * overlapPadding > target.x) {
|
|
335
|
-
const cp1 = this.addCP(sp.x + overlapPadding, sp.y);
|
|
336
|
-
const cp2 = this.addCP(cp1.x, source.top - overlapPadding);
|
|
337
|
-
const cp3 = this.addCP(ep.x - overlapPadding, cp2.y);
|
|
338
|
-
this.addCP(cp3.x, ep.y);
|
|
339
|
-
}
|
|
340
|
-
else {
|
|
341
|
-
// draw a straight line when distance between the two is below the threshold
|
|
342
|
-
if (Math.abs(dy) > ElbowThreshold) {
|
|
343
|
-
const cp1 = this.addCP(sp.x + halfX, sp.y);
|
|
344
|
-
this.addCP(cp1.x, ep.y);
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
[sketchEastWest]() {
|
|
349
|
-
const { source, target, sp, ep, overlapPadding, dx } = this;
|
|
350
|
-
if (dx >= 0) {
|
|
351
|
-
// target on the right
|
|
352
|
-
if (sp.y > target.top - overlapPadding && sp.y < target.bottom + overlapPadding) {
|
|
353
|
-
// line is going through the target object
|
|
354
|
-
const targetAbove = ep.y < sp.y;
|
|
355
|
-
const cp1 = this.addCP(target.left - overlapPadding, sp.y);
|
|
356
|
-
const cp2 = this.addCP(cp1.x);
|
|
357
|
-
if (targetAbove) {
|
|
358
|
-
cp2.y = target.bottom + overlapPadding;
|
|
359
|
-
}
|
|
360
|
-
else {
|
|
361
|
-
cp2.y = target.top - overlapPadding;
|
|
362
|
-
}
|
|
363
|
-
const cp3 = this.addCP(ep.x + overlapPadding, cp2.y);
|
|
364
|
-
this.addCP(cp3.x, ep.y);
|
|
365
|
-
}
|
|
366
|
-
else {
|
|
367
|
-
const cp1 = this.addCP(ep.x + overlapPadding, sp.y);
|
|
368
|
-
this.addCP(cp1.x, ep.y);
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
else {
|
|
372
|
-
// target on the left
|
|
373
|
-
const cp1 = this.addCP(sp.x + overlapPadding, sp.y);
|
|
374
|
-
if (ep.y > source.top - overlapPadding && ep.y < source.bottom + overlapPadding) {
|
|
375
|
-
// line is going through the source object
|
|
376
|
-
const targetAbove = ep.y < sp.y;
|
|
377
|
-
const cp2 = this.addCP(cp1.x);
|
|
378
|
-
if (targetAbove) {
|
|
379
|
-
cp2.y = source.top - overlapPadding;
|
|
380
|
-
}
|
|
381
|
-
else {
|
|
382
|
-
cp2.y = source.bottom + overlapPadding;
|
|
383
|
-
}
|
|
384
|
-
const cp3 = this.addCP(source.left - overlapPadding, cp2.y);
|
|
385
|
-
this.addCP(cp3.x, ep.y);
|
|
386
|
-
}
|
|
387
|
-
else {
|
|
388
|
-
this.addCP(cp1.x, ep.y);
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
}
|
|
392
|
-
[sketchEastSouth]() {
|
|
393
|
-
const { source, target, sp, ep, overlapPadding } = this;
|
|
394
|
-
const targetAround = ep.y > sp.y;
|
|
395
|
-
const sourceAround = sp.x > ep.x;
|
|
396
|
-
if (targetAround && sourceAround) {
|
|
397
|
-
const cp1 = this.addCP(sp.x + overlapPadding, sp.y);
|
|
398
|
-
const cp2 = this.addCP(cp1.x, Math.max(ep.y, source.bottom) + overlapPadding);
|
|
399
|
-
this.addCP(ep.x, cp2.y);
|
|
400
|
-
}
|
|
401
|
-
else if (targetAround) {
|
|
402
|
-
const overlapping = sp.x + overlapPadding > target.left;
|
|
403
|
-
if (overlapping) {
|
|
404
|
-
const cp1 = this.addCP(sp.x + overlapPadding, sp.y);
|
|
405
|
-
const cp2 = this.addCP(cp1.x, target.bottom + overlapPadding);
|
|
406
|
-
const cp3 = this.addCP(target.left - overlapPadding, cp2.y);
|
|
407
|
-
const cp4 = this.addCP(cp3.x, ep.y - overlapPadding);
|
|
408
|
-
this.addCP(ep.x, cp4.y);
|
|
409
|
-
}
|
|
410
|
-
else {
|
|
411
|
-
const cp1 = this.addCP(target.left - overlapPadding, sp.y);
|
|
412
|
-
const cp2 = this.addCP(cp1.x, ep.y + overlapPadding);
|
|
413
|
-
this.addCP(ep.x, cp2.y);
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
else if (sourceAround) {
|
|
417
|
-
const cp1 = this.addCP(sp.x + overlapPadding, sp.y);
|
|
418
|
-
const cp2 = this.addCP(cp1.x, source.bottom + overlapPadding);
|
|
419
|
-
const cp3 = this.addCP(target.right + overlapPadding, cp2.y);
|
|
420
|
-
const cp4 = this.addCP(cp3.x, target.bottom + overlapPadding);
|
|
421
|
-
this.addCP(ep.x, cp4.y);
|
|
422
|
-
}
|
|
423
|
-
else {
|
|
424
|
-
this.addCP(ep.x, sp.y);
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
[sketchEastNorth]() {
|
|
428
|
-
const { source, target, sp, ep, overlapPadding, dx, dy } = this;
|
|
429
|
-
if (dx >= 0) {
|
|
430
|
-
if (dy < 0) {
|
|
431
|
-
const cp1 = this.addCP(target.right + overlapPadding, sp.y);
|
|
432
|
-
const cp2 = this.addCP(cp1.x, target.top - overlapPadding);
|
|
433
|
-
this.addCP(ep.x, cp2.y);
|
|
434
|
-
}
|
|
435
|
-
else if (source.right > target.left - overlapPadding) {
|
|
436
|
-
// go around the source
|
|
437
|
-
const cp1 = this.addCP(sp.x + overlapPadding, sp.y);
|
|
438
|
-
const cp2 = this.addCP(cp1.x, source.bottom + overlapPadding);
|
|
439
|
-
const cp3 = this.addCP(target.left - overlapPadding, cp2.y);
|
|
440
|
-
const cp4 = this.addCP(cp3.x, target.bottom + overlapPadding);
|
|
441
|
-
this.addCP(ep.x, cp4.y);
|
|
442
|
-
}
|
|
443
|
-
else {
|
|
444
|
-
this.addCP(ep.x, sp.y);
|
|
445
|
-
}
|
|
446
|
-
}
|
|
447
|
-
else if (source.bottom + 2 * overlapPadding < target.top) {
|
|
448
|
-
const cp1 = this.addCP(sp.x + overlapPadding, sp.y);
|
|
449
|
-
const cp2 = this.addCP(cp1.x, source.bottom + overlapPadding);
|
|
450
|
-
this.addCP(ep.x, cp2.y);
|
|
451
|
-
}
|
|
452
|
-
else {
|
|
453
|
-
const cp1 = this.addCP(sp.x + overlapPadding, sp.y);
|
|
454
|
-
const cp2 = this.addCP(cp1.x, Math.min(target.top, source.top) - overlapPadding);
|
|
455
|
-
this.addCP(ep.x, cp2.y);
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
/**
|
|
459
|
-
* Computes the line that starts on the west side of the source object
|
|
460
|
-
* and end in the `end`
|
|
461
|
-
* @param end The direction where the line ends.
|
|
462
|
-
*/
|
|
463
|
-
[startNorth](end) {
|
|
464
|
-
if (end === 'west') {
|
|
465
|
-
this[sketchNorthWest]();
|
|
466
|
-
}
|
|
467
|
-
else if (end === 'north') {
|
|
468
|
-
this[sketchNorthNorth]();
|
|
469
|
-
}
|
|
470
|
-
else if (end === 'east') {
|
|
471
|
-
this[sketchNorthEast]();
|
|
472
|
-
}
|
|
473
|
-
else {
|
|
474
|
-
this[sketchNorthSouth]();
|
|
475
|
-
}
|
|
476
|
-
}
|
|
477
|
-
[sketchNorthWest]() {
|
|
478
|
-
const { source, target, sp, ep, overlapPadding, dx, dy } = this;
|
|
479
|
-
if (dx >= 0) {
|
|
480
|
-
if (dy < 0) {
|
|
481
|
-
if (target.bottom + 2 * overlapPadding > sp.y) {
|
|
482
|
-
// go above the target
|
|
483
|
-
const cp1 = this.addCP(sp.x, target.top - overlapPadding);
|
|
484
|
-
const cp2 = this.addCP(ep.x + overlapPadding, cp1.y);
|
|
485
|
-
this.addCP(cp2.x, ep.y);
|
|
486
|
-
}
|
|
487
|
-
else {
|
|
488
|
-
// go below the target
|
|
489
|
-
const cp1 = this.addCP(sp.x, target.bottom + overlapPadding);
|
|
490
|
-
const cp2 = this.addCP(ep.x + overlapPadding, cp1.y);
|
|
491
|
-
this.addCP(cp2.x, ep.y);
|
|
492
|
-
}
|
|
493
|
-
}
|
|
494
|
-
else {
|
|
495
|
-
const cp1 = this.addCP(sp.x, Math.min(sp.y, target.top) - overlapPadding);
|
|
496
|
-
const cp2 = this.addCP(Math.max(ep.x, source.right) + overlapPadding, cp1.y);
|
|
497
|
-
this.addCP(cp2.x, ep.y);
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
else if (dx < 0) {
|
|
501
|
-
if (ep.y < sp.y - overlapPadding) {
|
|
502
|
-
this.addCP(sp.x, ep.y);
|
|
503
|
-
}
|
|
504
|
-
else {
|
|
505
|
-
const cp1 = this.addCP(sp.x, Math.min(sp.y, target.top) - overlapPadding);
|
|
506
|
-
if (ep.x + 2 * overlapPadding > source.left) {
|
|
507
|
-
const cp2 = this.addCP(source.left - overlapPadding, cp1.y);
|
|
508
|
-
const cp3 = this.addCP(cp2.x, target.top - overlapPadding);
|
|
509
|
-
const cp4 = this.addCP(target.right + overlapPadding, cp3.y);
|
|
510
|
-
this.addCP(cp4.x, ep.y);
|
|
511
|
-
}
|
|
512
|
-
else {
|
|
513
|
-
const cp2 = this.addCP(Math.min(ep.x, source.left) + overlapPadding, cp1.y);
|
|
514
|
-
this.addCP(cp2.x, ep.y);
|
|
515
|
-
}
|
|
516
|
-
}
|
|
517
|
-
}
|
|
518
|
-
}
|
|
519
|
-
[sketchNorthEast]() {
|
|
520
|
-
const { source, target, sp, ep, overlapPadding, dx, dy } = this;
|
|
521
|
-
const cp1 = this.addCP(sp.x, sp.y - overlapPadding);
|
|
522
|
-
if (dx >= 0) {
|
|
523
|
-
if (dy < 0) {
|
|
524
|
-
this.addCP(sp.x, ep.y);
|
|
525
|
-
}
|
|
526
|
-
else if (source.right > target.left - overlapPadding) {
|
|
527
|
-
const cp2 = this.addCP(source.right + overlapPadding, cp1.y);
|
|
528
|
-
const cp3 = this.addCP(cp2.x, source.bottom + overlapPadding);
|
|
529
|
-
const cp4 = this.addCP(ep.x - overlapPadding, cp3.y);
|
|
530
|
-
this.addCP(cp4.x, ep.y);
|
|
531
|
-
}
|
|
532
|
-
else {
|
|
533
|
-
const cp2 = this.addCP(ep.x - overlapPadding, cp1.y);
|
|
534
|
-
this.addCP(cp2.x, ep.y);
|
|
535
|
-
}
|
|
536
|
-
}
|
|
537
|
-
else {
|
|
538
|
-
if (cp1.y > target.top - overlapPadding && cp1.y < target.bottom + overlapPadding) {
|
|
539
|
-
const cp2 = this.addCP(target.right + overlapPadding, cp1.y);
|
|
540
|
-
const posy = ep.y < sp.y ? target.bottom + overlapPadding : target.top - overlapPadding;
|
|
541
|
-
const cp3 = this.addCP(cp2.x, posy);
|
|
542
|
-
this.addCP(ep.x - overlapPadding, cp3.y);
|
|
543
|
-
}
|
|
544
|
-
else {
|
|
545
|
-
const overlapping = ep.x - overlapPadding > source.left;
|
|
546
|
-
if (overlapping) {
|
|
547
|
-
const cp2 = this.addCP(source.left - overlapPadding, cp1.y);
|
|
548
|
-
this.addCP(cp2.x, ep.y);
|
|
549
|
-
}
|
|
550
|
-
else {
|
|
551
|
-
this.addCP(ep.x - overlapPadding, cp1.y);
|
|
552
|
-
}
|
|
553
|
-
}
|
|
554
|
-
this.addCP(ep.x - overlapPadding, ep.y);
|
|
555
|
-
}
|
|
556
|
-
}
|
|
557
|
-
[sketchNorthSouth]() {
|
|
558
|
-
const { source, target, sp, ep, overlapPadding, dy, dx, halfY } = this;
|
|
559
|
-
// (dy < 0) - the source is below target
|
|
560
|
-
// (ep.y + 2*overlapPadding < sp.y) - there is a room to render the line between the boxes
|
|
561
|
-
if (dy < 0 && ep.y + 2 * overlapPadding < sp.y) {
|
|
562
|
-
// draw a straight line instead of the elbow when the distance is below the threshold
|
|
563
|
-
if (Math.abs(dx) > ElbowThreshold) {
|
|
564
|
-
const cp1 = this.addCP(sp.x, ep.y + halfY); // ep.y + overlapPadding
|
|
565
|
-
this.addCP(ep.x, cp1.y);
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
else {
|
|
569
|
-
const cp1 = this.addCP(sp.x, sp.y - overlapPadding);
|
|
570
|
-
let cp2;
|
|
571
|
-
if (sp.x < ep.x) {
|
|
572
|
-
// to the left
|
|
573
|
-
cp2 = this.addCP(Math.max(target.left - overlapPadding, source.right + overlapPadding), cp1.y);
|
|
574
|
-
}
|
|
575
|
-
else {
|
|
576
|
-
// to the right
|
|
577
|
-
cp2 = this.addCP(Math.min(target.right + overlapPadding, source.left - overlapPadding), cp1.y);
|
|
578
|
-
}
|
|
579
|
-
const cp3 = this.addCP(cp2.x, ep.y - overlapPadding);
|
|
580
|
-
this.addCP(ep.x, cp3.y);
|
|
581
|
-
}
|
|
582
|
-
}
|
|
583
|
-
[sketchNorthNorth]() {
|
|
584
|
-
const { source, target, sp, ep, overlapPadding, dy } = this;
|
|
585
|
-
if (dy < 0 && ep.y + 2 * overlapPadding < sp.y) {
|
|
586
|
-
const cp1 = this.addCP(sp.x, ep.y - overlapPadding);
|
|
587
|
-
this.addCP(ep.x, cp1.y);
|
|
588
|
-
}
|
|
589
|
-
else {
|
|
590
|
-
const cp1 = this.addCP(sp.x, sp.y - overlapPadding);
|
|
591
|
-
let cp2;
|
|
592
|
-
if (sp.x < ep.x) {
|
|
593
|
-
// to the left
|
|
594
|
-
cp2 = this.addCP(Math.max(target.left - overlapPadding, source.right + overlapPadding), cp1.y);
|
|
595
|
-
}
|
|
596
|
-
else {
|
|
597
|
-
// to the right
|
|
598
|
-
cp2 = this.addCP(Math.min(target.right + overlapPadding, source.left - overlapPadding), cp1.y);
|
|
599
|
-
}
|
|
600
|
-
const cp3 = this.addCP(cp2.x, ep.y - overlapPadding);
|
|
601
|
-
this.addCP(ep.x, cp3.y);
|
|
602
|
-
}
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
//# sourceMappingURL=RectilinearLine.js.map
|