diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..bcb6fb401 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,40 @@ +name: Build + +on: + push: + branches: + - development + paths: + - '.github/workflows/build.yml' + - 'packages/**/*' + - 'scripts/**/*' + - 'babel.config.js' + - 'package.json' + - 'webpack.config.js' + pull_request: + branches: + - development + paths: + - '.github/workflows/build.yml' + - 'packages/**/*' + - 'scripts/**/*' + - 'babel.config.js' + - 'package.json' + - 'webpack.config.js' + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + # we want to run the full build on all os: don't cancel running jobs even if one fails + fail-fast: false + matrix: + os: ['ubuntu-20.04', 'macos-11', 'windows-2019'] + steps: + - uses: actions/checkout@v2 + - name: Setup node + uses: actions/setup-node@v2 + with: + node-version: '16' + - name: Install dependencies and build @maxgraph/core + run: npm install diff --git a/.gitignore b/.gitignore index f19286d4e..43768eec7 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ javascript/dist .jshintrc javascript/examples/**/dist .idea/ +*.iml dist package-lock.json diff --git a/package.json b/package.json index 5dea14079..9924135a1 100644 --- a/package.json +++ b/package.json @@ -18,8 +18,8 @@ "main": "./javascript/dist/build.js", "scripts": { "dev": "node ./scripts/dev", - "bootstrap": "lerna bootstrap", - "postinstall": "lerna bootstrap", + "bootstrap": "lerna bootstrap --no-ci", + "postinstall": "lerna bootstrap --no-ci", "docs": "jsdoc -c jsdoc.json" }, "devDependencies": { diff --git a/packages/core/src/editor/Editor.ts b/packages/core/src/editor/Editor.ts index bc12893b1..fce762b42 100644 --- a/packages/core/src/editor/Editor.ts +++ b/packages/core/src/editor/Editor.ts @@ -20,7 +20,7 @@ import MaxForm from '../gui/MaxForm'; import Outline from '../view/other/Outline'; import Cell from '../view/cell/Cell'; import Geometry from '../view/geometry/Geometry'; -import { ALIGN, FONT } from '../util/constants'; +import { ALIGN, FONT } from '../util/Constants'; import { Graph } from '../view/Graph'; import SwimlaneManager from '../view/layout/SwimlaneManager'; import LayoutManager from '../view/layout/LayoutManager'; diff --git a/packages/core/src/editor/EditorToolbar.ts b/packages/core/src/editor/EditorToolbar.ts index ee2352103..9ad836dc5 100644 --- a/packages/core/src/editor/EditorToolbar.ts +++ b/packages/core/src/editor/EditorToolbar.ts @@ -10,7 +10,7 @@ import MaxToolbar from '../gui/MaxToolbar'; import Geometry from '../view/geometry/Geometry'; import { convertPoint } from '../util/styleUtils'; import InternalEvent from '../view/event/InternalEvent'; -import { getClientX, getClientY } from '../util/eventUtils'; +import { getClientX, getClientY } from '../util/EventUtils'; import { makeDraggable } from '../util/gestureUtils'; import Editor from './Editor'; import Cell from '../view/cell/Cell'; @@ -20,7 +20,7 @@ import EventObject from '../view/event/EventObject'; import ObjectCodec from '../serialization/ObjectCodec'; import CodecRegistry from '../serialization/CodecRegistry'; import { getChildNodes, getTextContent } from '../util/domUtils'; -import { NODETYPE } from '../util/constants'; +import { NODETYPE } from '../util/Constants'; import Translations from '../util/Translations'; import MaxLog from '../gui/MaxLog'; import Codec from '../serialization/Codec'; diff --git a/packages/core/src/gui/MaxLog.ts b/packages/core/src/gui/MaxLog.ts index f50b476b1..2a0391a3e 100644 --- a/packages/core/src/gui/MaxLog.ts +++ b/packages/core/src/gui/MaxLog.ts @@ -8,10 +8,10 @@ import Client from '../Client'; import InternalEvent from '../view/event/InternalEvent'; import { getInnerHtml, write } from '../util/domUtils'; -import { toString } from '../util/stringUtils'; +import { toString } from '../util/StringUtils'; import MaxWindow, { popup } from './MaxWindow'; import { KeyboardEventListener, MouseEventListener } from '../types'; -import { copyTextToClipboard } from '../util/utils'; +import { copyTextToClipboard } from '../util/Utils'; /** * A singleton class that implements a simple console. diff --git a/packages/core/src/gui/MaxPopupMenu.ts b/packages/core/src/gui/MaxPopupMenu.ts index 58b573f69..dfdbcf010 100644 --- a/packages/core/src/gui/MaxPopupMenu.ts +++ b/packages/core/src/gui/MaxPopupMenu.ts @@ -10,7 +10,7 @@ import EventObject from '../view/event/EventObject'; import Client from '../Client'; import InternalEvent from '../view/event/InternalEvent'; import { write } from '../util/domUtils'; -import { isLeftMouseButton } from '../util/eventUtils'; +import { isLeftMouseButton } from '../util/EventUtils'; import Cell from '../view/cell/Cell'; import InternalMouseEvent from '../view/event/InternalMouseEvent'; import { PopupMenuItem } from '../types'; diff --git a/packages/core/src/gui/MaxWindow.ts b/packages/core/src/gui/MaxWindow.ts index 92f09e19d..e25fd3081 100644 --- a/packages/core/src/gui/MaxWindow.ts +++ b/packages/core/src/gui/MaxWindow.ts @@ -11,12 +11,12 @@ import EventSource from '../view/event/EventSource'; import { fit, getCurrentStyle } from '../util/styleUtils'; import InternalEvent from '../view/event/InternalEvent'; import Client from '../Client'; -import { NODETYPE } from '../util/constants'; +import { NODETYPE } from '../util/Constants'; import { br, write } from '../util/domUtils'; import Translations from '../util/Translations'; -import { getClientX, getClientY } from '../util/eventUtils'; -import { htmlEntities } from '../util/stringUtils'; -import { utils } from '../util/utils'; +import { getClientX, getClientY } from '../util/EventUtils'; +import { htmlEntities } from '../util/StringUtils'; +import { utils } from '../util/Utils'; /** * Basic window inside a document. diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index bb033eb97..3885cac4e 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -126,15 +126,15 @@ export { default as RhombusShape } from './view/geometry/node/RhombusShape'; export { default as StencilShape } from './view/geometry/node/StencilShape'; export { default as StencilShapeRegistry } from './view/geometry/node/StencilShapeRegistry'; -export * as constants from './util/constants'; +export * as constants from './util/Constants'; export { default as Guide } from './view/other/Guide'; export { default as Translations } from './util/Translations'; -export * as utils from './util/utils'; +export * as utils from './util/Utils'; export * as cloneUtils from './util/cloneUtils'; export * as domUtils from './util/domUtils'; -export * as eventUtils from './util/eventUtils'; +export * as eventUtils from './util/EventUtils'; export * as gestureUtils from './util/gestureUtils'; -export * as stringUtils from './util/stringUtils'; +export * as stringUtils from './util/StringUtils'; export * as xmlUtils from './util/xmlUtils'; export * as styleUtils from './util/styleUtils'; export * as mathUtils from './util/mathUtils'; diff --git a/packages/core/src/serialization/Codec.ts b/packages/core/src/serialization/Codec.ts index 34430de6d..12937af5f 100644 --- a/packages/core/src/serialization/Codec.ts +++ b/packages/core/src/serialization/Codec.ts @@ -7,10 +7,10 @@ import CellPath from '../view/cell/CellPath'; import CodecRegistry from './CodecRegistry'; -import { NODETYPE } from '../util/constants'; +import { NODETYPE } from '../util/Constants'; import Cell from '../view/cell/Cell'; import MaxLog from '../gui/MaxLog'; -import { getFunctionName } from '../util/stringUtils'; +import { getFunctionName } from '../util/StringUtils'; import { importNode, isNode } from '../util/domUtils'; import ObjectCodec from './ObjectCodec'; diff --git a/packages/core/src/serialization/ObjectCodec.ts b/packages/core/src/serialization/ObjectCodec.ts index 7c16ae07d..816c5624b 100644 --- a/packages/core/src/serialization/ObjectCodec.ts +++ b/packages/core/src/serialization/ObjectCodec.ts @@ -9,7 +9,7 @@ import ObjectIdentity from '../util/ObjectIdentity'; import MaxLog from '../gui/MaxLog'; import Geometry from '../view/geometry/Geometry'; import Point from '../view/geometry/Point'; -import { NODETYPE } from '../util/constants'; +import { NODETYPE } from '../util/Constants'; import { isInteger, isNumeric } from '../util/mathUtils'; import { getTextContent } from '../util/domUtils'; import { load } from '../util/MaxXmlRequest'; diff --git a/packages/core/src/util/ObjectIdentity.ts b/packages/core/src/util/ObjectIdentity.ts index e58d8e4d9..67cc138b2 100644 --- a/packages/core/src/util/ObjectIdentity.ts +++ b/packages/core/src/util/ObjectIdentity.ts @@ -5,7 +5,7 @@ * Type definitions from the typed-mxgraph project */ -import { getFunctionName } from './stringUtils'; +import { getFunctionName } from './StringUtils'; const FIELD_NAME = 'mxObjectId'; diff --git a/packages/core/src/util/StringUtils.ts b/packages/core/src/util/StringUtils.ts index d4d1c2a84..97dd35369 100644 --- a/packages/core/src/util/StringUtils.ts +++ b/packages/core/src/util/StringUtils.ts @@ -1,11 +1,11 @@ import { NODETYPE, NONE, -} from './constants'; +} from './Constants'; import { getTextContent } from './domUtils'; import type { Properties } from '../types'; - + /** * Strips all whitespaces from the beginning of the string. Without the diff --git a/packages/core/src/util/Translations.ts b/packages/core/src/util/Translations.ts index d9c1185f8..fb266858b 100644 --- a/packages/core/src/util/Translations.ts +++ b/packages/core/src/util/Translations.ts @@ -3,7 +3,7 @@ * Copyright (c) 2006-2016, Gaudenz Alder */ import Client from '../Client'; -import { NONE } from './constants'; +import { NONE } from './Constants'; import MaxXmlRequest, { get, load } from './MaxXmlRequest'; /** diff --git a/packages/core/src/util/domUtils.ts b/packages/core/src/util/domUtils.ts index ae2105924..66c5a92e2 100644 --- a/packages/core/src/util/domUtils.ts +++ b/packages/core/src/util/domUtils.ts @@ -1,4 +1,4 @@ -import { NODETYPE } from './constants'; +import { NODETYPE } from './Constants'; /** * Returns the text content of the specified node. @@ -326,7 +326,7 @@ export const importNodeImplementation = (doc: Document, node: Element, allChildr export const clearSelection = () => { // @ts-ignore const sel = window.getSelection ? window.getSelection() : document.selection; - + if (sel) { if (sel.removeAllRanges) { sel.removeAllRanges(); diff --git a/packages/core/src/util/gestureUtils.ts b/packages/core/src/util/gestureUtils.ts index 152388b36..fd3973f7a 100644 --- a/packages/core/src/util/gestureUtils.ts +++ b/packages/core/src/util/gestureUtils.ts @@ -1,6 +1,6 @@ import DragSource, { DropHandler } from '../view/other/DragSource'; import Point from '../view/geometry/Point'; -import { TOOLTIP_VERTICAL_OFFSET } from './constants'; +import { TOOLTIP_VERTICAL_OFFSET } from './Constants'; import { Graph } from '../view/Graph'; import Cell from '../view/cell/Cell'; diff --git a/packages/core/src/util/mathUtils.ts b/packages/core/src/util/mathUtils.ts index 12c44f7d0..9874db56d 100644 --- a/packages/core/src/util/mathUtils.ts +++ b/packages/core/src/util/mathUtils.ts @@ -4,16 +4,15 @@ * Updated to ES9 syntax by David Morrissey 2021 * Type definitions from the typed-mxgraph project */ - import { - DIRECTION, - DIRECTION_MASK, - } from './constants'; - import Point from '../view/geometry/Point'; - import Rectangle from '../view/geometry/Rectangle'; - import CellState from '../view/cell/CellState'; - - import type { CellStateStyles } from '../types'; -import { getValue, isNullish } from './utils'; +import { + DIRECTION, + DIRECTION_MASK, +} from './Constants'; +import Point from '../view/geometry/Point'; +import Rectangle from '../view/geometry/Rectangle'; +import CellState from '../view/cell/CellState'; +import type { CellStateStyles } from '../types'; +import { getValue, isNullish } from './Utils'; /** * Converts the given degree to radians. diff --git a/packages/core/src/util/printUtils.ts b/packages/core/src/util/printUtils.ts index 49971009b..0d0a5e52b 100644 --- a/packages/core/src/util/printUtils.ts +++ b/packages/core/src/util/printUtils.ts @@ -5,7 +5,7 @@ * Type definitions from the typed-mxgraph project */ import Client from '../Client'; -import { PAGE_FORMAT_A4_PORTRAIT } from './constants'; +import { PAGE_FORMAT_A4_PORTRAIT } from './Constants'; import Rectangle from '../view/geometry/Rectangle'; import { getOuterHtml } from './domUtils'; import { Graph } from '../view/Graph'; diff --git a/packages/core/src/util/styleUtils.ts b/packages/core/src/util/styleUtils.ts index 630f7a811..36e5c69ae 100644 --- a/packages/core/src/util/styleUtils.ts +++ b/packages/core/src/util/styleUtils.ts @@ -11,7 +11,7 @@ import { DEFAULT_FONTSIZE, FONT, LINE_HEIGHT, -} from './constants'; +} from './Constants'; import Point from '../view/geometry/Point'; import Dictionary from './Dictionary'; import CellPath from '../view/cell/CellPath'; @@ -30,18 +30,18 @@ import CellArray from '../view/cell/CellArray'; if (element.style) { element.style.cursor = ''; } - + const children = element.children; - + if (children) { const childCount = children.length; - + for (let i = 0; i < childCount; i += 1) { removeCursors(children[i] as HTMLElement); } } }; - + /** * Function: getCurrentStyle * @@ -52,7 +52,7 @@ import CellArray from '../view/cell/CellArray'; export const getCurrentStyle = (element: HTMLElement) => { return element ? window.getComputedStyle(element, '') : null; }; - + /** * Function: parseCssNumber * @@ -67,16 +67,16 @@ import CellArray from '../view/cell/CellArray'; } else if (value === 'thick') { value = '6'; } - + let n = parseFloat(value); - + if (Number.isNaN(n)) { n = 0; } - + return n; }; - + /** * Function: setPrefixedStyle * @@ -93,21 +93,21 @@ import CellArray from '../view/cell/CellArray'; value: string ) => { let prefix = null; - + if (Client.IS_SF || Client.IS_GC) { prefix = 'Webkit'; } else if (Client.IS_MT) { prefix = 'Moz'; } - + style.setProperty(name, value); - + if (prefix !== null && name.length > 0) { name = prefix + name.substring(0, 1).toUpperCase() + name.substring(1); style.setProperty(name, value); } }; - + /** * Function: hasScrollbars * @@ -118,7 +118,7 @@ import CellArray from '../view/cell/CellArray'; */ export const hasScrollbars = (node: HTMLElement) => { const style = getCurrentStyle(node); - + return !!style && (style.overflow === 'scroll' || style.overflow === 'auto'); }; diff --git a/packages/core/src/util/xmlUtils.ts b/packages/core/src/util/xmlUtils.ts index 8fecfb789..4b1f0fc2f 100644 --- a/packages/core/src/util/xmlUtils.ts +++ b/packages/core/src/util/xmlUtils.ts @@ -5,12 +5,12 @@ * Updated to ES9 syntax by David Morrissey 2021 * Type definitions from the typed-mxgraph project */ -import { DIALECT, NODETYPE, NS_SVG } from './constants'; +import { DIALECT, NODETYPE, NS_SVG } from './Constants'; import Point from '../view/geometry/Point'; import Cell from '../view/cell/Cell'; import CellArray from '../view/cell/CellArray'; import { Graph } from '../view/Graph'; -import { htmlEntities, trim } from './stringUtils'; +import { htmlEntities, trim } from './StringUtils'; import TemporaryCellStates from '../view/cell/TemporaryCellStates'; import type { StyleValue } from '../types'; @@ -29,13 +29,13 @@ export const parseXml = (xmlString: string): HTMLElement => { } export const getViewXml = ( - graph: Graph, - scale: number=1, - cells: CellArray | null=null, - x0: number=0, + graph: Graph, + scale: number=1, + cells: CellArray | null=null, + x0: number=0, y0: number=0 ) => { - + if (cells == null) { const model = graph.getDataModel(); cells = new CellArray(model.getRoot()); @@ -161,7 +161,7 @@ export const getPrettyXml = (node: Element, tab: string, indent: string, newline } } else if (node.nodeType === NODETYPE.TEXT) { const value = trim(getTextContent(node)); - + if (value && value.length > 0) { result.push(indent + htmlEntities(value, false) + newline); } diff --git a/packages/core/src/view/Graph.ts b/packages/core/src/view/Graph.ts index bfa6f9d4d..758d006cf 100644 --- a/packages/core/src/view/Graph.ts +++ b/packages/core/src/view/Graph.ts @@ -25,7 +25,7 @@ import { getCurrentStyle, hasScrollbars, parseCssNumber } from '../util/styleUti import Cell from './cell/Cell'; import GraphDataModel from './GraphDataModel'; import Stylesheet from './style/Stylesheet'; -import { PAGE_FORMAT_A4_PORTRAIT } from '../util/constants'; +import { PAGE_FORMAT_A4_PORTRAIT } from '../util/Constants'; import ChildChange from './undoable_changes/ChildChange'; import GeometryChange from './undoable_changes/GeometryChange'; diff --git a/packages/core/src/view/GraphView.ts b/packages/core/src/view/GraphView.ts index c1fa690d5..e27d6a757 100644 --- a/packages/core/src/view/GraphView.ts +++ b/packages/core/src/view/GraphView.ts @@ -11,7 +11,7 @@ import Dictionary from '../util/Dictionary'; import EventSource from './event/EventSource'; import EventObject from './event/EventObject'; import RectangleShape from './geometry/node/RectangleShape'; -import { ALIGN } from '../util/constants'; +import { ALIGN } from '../util/Constants'; import Client from '../Client'; import InternalEvent from './event/InternalEvent'; import { @@ -38,7 +38,7 @@ import Shape from './geometry/Shape'; import Geometry from './geometry/Geometry'; import ConnectionConstraint from './other/ConnectionConstraint'; import PopupMenuHandler from './handler/PopupMenuHandler'; -import { getClientX, getClientY, getSource, isConsumed } from '../util/eventUtils'; +import { getClientX, getClientY, getSource, isConsumed } from '../util/EventUtils'; import { clone } from '../util/cloneUtils'; import CellArray from './cell/CellArray'; import type { Graph } from './Graph'; diff --git a/packages/core/src/view/canvas/AbstractCanvas2D.ts b/packages/core/src/view/canvas/AbstractCanvas2D.ts index 0e0d19f66..42888326c 100644 --- a/packages/core/src/view/canvas/AbstractCanvas2D.ts +++ b/packages/core/src/view/canvas/AbstractCanvas2D.ts @@ -14,7 +14,7 @@ import { SHADOW_OFFSET_X, SHADOW_OFFSET_Y, SHADOW_OPACITY, -} from '../../util/constants'; +} from '../../util/Constants'; import UrlConverter from '../../util/UrlConverter'; import Point from '../geometry/Point'; import { clone } from '../../util/cloneUtils'; diff --git a/packages/core/src/view/canvas/SvgCanvas2D.ts b/packages/core/src/view/canvas/SvgCanvas2D.ts index fad4b4e98..d1dd43ee9 100644 --- a/packages/core/src/view/canvas/SvgCanvas2D.ts +++ b/packages/core/src/view/canvas/SvgCanvas2D.ts @@ -5,7 +5,7 @@ * Type definitions from the typed-mxgraph project */ -import { isNotNullish } from '../../util/utils'; +import { isNotNullish } from '../../util/Utils'; import { mod } from '../../util/mathUtils'; import { getAlignmentAsPoint } from '../../util/styleUtils'; import Client from '../../Client'; @@ -22,12 +22,12 @@ import { NS_XLINK, SHADOWCOLOR, WORD_WRAP, -} from '../../util/constants'; +} from '../../util/Constants'; import Rectangle from '../geometry/Rectangle'; import AbstractCanvas2D from './AbstractCanvas2D'; import { getXml } from '../../util/xmlUtils'; import { isNode, write } from '../../util/domUtils'; -import { htmlEntities, trim } from '../../util/stringUtils'; +import { htmlEntities, trim } from '../../util/StringUtils'; import { AlignValue, ColorValue, diff --git a/packages/core/src/view/canvas/XmlCanvas2D.ts b/packages/core/src/view/canvas/XmlCanvas2D.ts index 6d5c5028a..7f925ec59 100644 --- a/packages/core/src/view/canvas/XmlCanvas2D.ts +++ b/packages/core/src/view/canvas/XmlCanvas2D.ts @@ -13,7 +13,7 @@ import { SHADOW_OFFSET_X, SHADOW_OFFSET_Y, SHADOW_OPACITY, -} from '../../util/constants'; +} from '../../util/Constants'; import { getOuterHtml, isNode } from '../../util/domUtils'; import { DirectionValue, TextDirectionValue } from '../../types'; diff --git a/packages/core/src/view/cell/Cell.ts b/packages/core/src/view/cell/Cell.ts index aadf057be..feb02427d 100644 --- a/packages/core/src/view/cell/Cell.ts +++ b/packages/core/src/view/cell/Cell.ts @@ -5,17 +5,17 @@ * Type definitions from the typed-mxgraph project */ -import { NODETYPE } from '../../util/constants'; +import { NODETYPE } from '../../util/Constants'; import Geometry from '../geometry/Geometry'; import CellOverlay from './CellOverlay'; import { clone } from '../../util/cloneUtils'; import Point from '../geometry/Point'; import CellPath from './CellPath'; import CellArray from './CellArray'; -import { isNotNullish } from '../../util/utils'; +import { isNotNullish } from '../../util/Utils'; import ObjectCodec from '../../serialization/ObjectCodec'; import CodecRegistry from '../../serialization/CodecRegistry'; -import { removeWhitespace } from '../../util/stringUtils'; +import { removeWhitespace } from '../../util/StringUtils'; import { importNode } from '../../util/domUtils'; import Codec from '../../serialization/Codec'; diff --git a/packages/core/src/view/cell/CellHighlight.ts b/packages/core/src/view/cell/CellHighlight.ts index d86421075..a98fbde7d 100644 --- a/packages/core/src/view/cell/CellHighlight.ts +++ b/packages/core/src/view/cell/CellHighlight.ts @@ -9,7 +9,7 @@ import { DIALECT, HIGHLIGHT_OPACITY, HIGHLIGHT_STROKEWIDTH, -} from '../../util/constants'; +} from '../../util/Constants'; import InternalEvent from '../event/InternalEvent'; import Rectangle from '../geometry/Rectangle'; import CellState from './CellState'; diff --git a/packages/core/src/view/cell/CellMarker.ts b/packages/core/src/view/cell/CellMarker.ts index a9958ae39..9e09f00a0 100644 --- a/packages/core/src/view/cell/CellMarker.ts +++ b/packages/core/src/view/cell/CellMarker.ts @@ -12,7 +12,7 @@ import { MAX_HOTSPOT_SIZE, MIN_HOTSPOT_SIZE, NONE, -} from '../../util/constants'; +} from '../../util/Constants'; import CellHighlight from './CellHighlight'; import EventObject from '../event/EventObject'; import InternalEvent from '../event/InternalEvent'; diff --git a/packages/core/src/view/cell/CellRenderer.ts b/packages/core/src/view/cell/CellRenderer.ts index c240e1657..7735bbd07 100644 --- a/packages/core/src/view/cell/CellRenderer.ts +++ b/packages/core/src/view/cell/CellRenderer.ts @@ -29,14 +29,14 @@ import { DIALECT, NONE, SHAPE, -} from '../../util/constants'; +} from '../../util/Constants'; import { getRotatedPoint, mod, toRadians, } from '../../util/mathUtils'; import { convertPoint } from '../../util/styleUtils'; -import { +import { equalEntries, equalPoints, } from '../../util/arrayUtils'; @@ -52,7 +52,7 @@ import Shape from '../geometry/Shape'; import CellState from './CellState'; import Cell from './Cell'; import CellOverlay from './CellOverlay'; -import { getClientX, getClientY, getSource } from '../../util/eventUtils'; +import { getClientX, getClientY, getSource } from '../../util/EventUtils'; import { isNode } from '../../util/domUtils'; import { CellStateStyles } from '../../types'; import CellArray from './CellArray'; diff --git a/packages/core/src/view/cell/CellState.ts b/packages/core/src/view/cell/CellState.ts index 6f646d68c..0ac857275 100644 --- a/packages/core/src/view/cell/CellState.ts +++ b/packages/core/src/view/cell/CellState.ts @@ -12,7 +12,7 @@ import GraphView from '../../view/GraphView'; import Shape from '../geometry/Shape'; import TextShape from '../geometry/node/TextShape'; import Dictionary from '../../util/Dictionary'; -import { ALIGN, NONE } from '../../util/constants'; +import { ALIGN, NONE } from '../../util/Constants'; import { CellStateStyles } from '../../types'; import RectangleShape from '../geometry/node/RectangleShape'; import CellOverlay from './CellOverlay'; diff --git a/packages/core/src/view/cell/VertexHandle.ts b/packages/core/src/view/cell/VertexHandle.ts index b722b1d27..8725e1ba4 100644 --- a/packages/core/src/view/cell/VertexHandle.ts +++ b/packages/core/src/view/cell/VertexHandle.ts @@ -15,7 +15,7 @@ import { HANDLE_FILLCOLOR, HANDLE_SIZE, HANDLE_STROKECOLOR, -} from '../../util/constants'; +} from '../../util/Constants'; import InternalEvent from '../event/InternalEvent'; import Shape from '../geometry/Shape'; import InternalMouseEvent from '../event/InternalMouseEvent'; diff --git a/packages/core/src/view/event/InternalEvent.ts b/packages/core/src/view/event/InternalEvent.ts index e8a0bdbaf..ec2196394 100644 --- a/packages/core/src/view/event/InternalEvent.ts +++ b/packages/core/src/view/event/InternalEvent.ts @@ -6,7 +6,7 @@ */ import InternalMouseEvent from './InternalMouseEvent'; import Client from '../../Client'; -import { isConsumed, isMouseEvent } from '../../util/eventUtils'; +import { isConsumed, isMouseEvent } from '../../util/EventUtils'; import CellState from '../cell/CellState'; import { EventCache, diff --git a/packages/core/src/view/event/InternalMouseEvent.ts b/packages/core/src/view/event/InternalMouseEvent.ts index b6ed39205..682dc0fff 100644 --- a/packages/core/src/view/event/InternalMouseEvent.ts +++ b/packages/core/src/view/event/InternalMouseEvent.ts @@ -10,7 +10,7 @@ import { getSource, isMouseEvent, isPopupTrigger, -} from '../../util/eventUtils'; +} from '../../util/EventUtils'; import { isAncestorNode } from '../../util/domUtils'; import CellState from '../cell/CellState'; import Shape from '../geometry/Shape'; diff --git a/packages/core/src/view/geometry/ActorShape.ts b/packages/core/src/view/geometry/ActorShape.ts index f484879c8..2c0a0f3b2 100644 --- a/packages/core/src/view/geometry/ActorShape.ts +++ b/packages/core/src/view/geometry/ActorShape.ts @@ -8,14 +8,14 @@ import Rectangle from './Rectangle'; import Shape from './Shape'; import SvgCanvas2D from '../canvas/SvgCanvas2D'; import { ColorValue } from '../../types'; -import { NONE } from '../../util/constants'; +import { NONE } from '../../util/Constants'; /** * Extends {@link Shape} to implement an actor shape. If a custom shape with one * filled area is needed, then this shape's {@link redrawPath} method should be overridden. * - * This shape is registered under {@link mxConstants.SHAPE_ACTOR} in {@link cellRenderer}. - * + * This shape is registered under {@link Constants.SHAPE_ACTOR} in {@link cellRenderer}. + * * ```javascript * function SampleShape() { } * diff --git a/packages/core/src/view/geometry/Shape.ts b/packages/core/src/view/geometry/Shape.ts index 073e334d2..60b8238e4 100644 --- a/packages/core/src/view/geometry/Shape.ts +++ b/packages/core/src/view/geometry/Shape.ts @@ -5,7 +5,7 @@ * Type definitions from the typed-mxgraph project */ import Rectangle from './Rectangle'; -import { isNotNullish } from '../../util/utils'; +import { isNotNullish } from '../../util/Utils'; import { getBoundingBox, getDirectedBounds, @@ -18,7 +18,7 @@ import { RECTANGLE_ROUNDING_FACTOR, SHADOW_OFFSET_X, SHADOW_OFFSET_Y, -} from '../../util/constants'; +} from '../../util/Constants'; import Point from './Point'; import AbstractCanvas2D from '../canvas/AbstractCanvas2D'; import SvgCanvas2D from '../canvas/SvgCanvas2D'; diff --git a/packages/core/src/view/geometry/edge/ArrowConnectorShape.ts b/packages/core/src/view/geometry/edge/ArrowConnectorShape.ts index 702798c0e..d93532709 100644 --- a/packages/core/src/view/geometry/edge/ArrowConnectorShape.ts +++ b/packages/core/src/view/geometry/edge/ArrowConnectorShape.ts @@ -5,7 +5,7 @@ * Type definitions from the typed-mxgraph project */ import Shape from '../Shape'; -import { ARROW_SIZE, ARROW_SPACING, ARROW_WIDTH, NONE } from '../../../util/constants'; +import { ARROW_SIZE, ARROW_SPACING, ARROW_WIDTH, NONE } from '../../../util/Constants'; import { relativeCcw } from '../../../util/mathUtils'; import AbstractCanvas2D from '../../canvas/AbstractCanvas2D'; import Point from '../Point'; diff --git a/packages/core/src/view/geometry/edge/ArrowShape.ts b/packages/core/src/view/geometry/edge/ArrowShape.ts index e723a4f3a..1be1dc85b 100644 --- a/packages/core/src/view/geometry/edge/ArrowShape.ts +++ b/packages/core/src/view/geometry/edge/ArrowShape.ts @@ -5,7 +5,7 @@ * Type definitions from the typed-mxgraph project */ import Shape from '../Shape'; -import { ARROW_SIZE, ARROW_SPACING, ARROW_WIDTH } from '../../../util/constants'; +import { ARROW_SIZE, ARROW_SPACING, ARROW_WIDTH } from '../../../util/Constants'; import Rectangle from '../Rectangle'; import AbstractCanvas2D from '../../canvas/AbstractCanvas2D'; import Point from '../Point'; diff --git a/packages/core/src/view/geometry/edge/ConnectorShape.ts b/packages/core/src/view/geometry/edge/ConnectorShape.ts index 5fbf9d223..d34bbd357 100644 --- a/packages/core/src/view/geometry/edge/ConnectorShape.ts +++ b/packages/core/src/view/geometry/edge/ConnectorShape.ts @@ -4,7 +4,7 @@ * Updated to ES9 syntax by David Morrissey 2021 * Type definitions from the typed-mxgraph project */ -import { DEFAULT_MARKERSIZE, NONE } from '../../../util/constants'; +import { DEFAULT_MARKERSIZE, NONE } from '../../../util/Constants'; import PolylineShape from './PolylineShape'; import MarkerShape from './MarkerShape'; import Point from '../Point'; diff --git a/packages/core/src/view/geometry/edge/MarkerShape.ts b/packages/core/src/view/geometry/edge/MarkerShape.ts index 596746812..a9fc77edd 100644 --- a/packages/core/src/view/geometry/edge/MarkerShape.ts +++ b/packages/core/src/view/geometry/edge/MarkerShape.ts @@ -6,7 +6,7 @@ */ import { ArrowType } from '../../../types'; import AbstractCanvas2D from '../../canvas/AbstractCanvas2D'; -import { ARROW } from '../../../util/constants'; +import { ARROW } from '../../../util/Constants'; import Point from '../Point'; import Shape from '../Shape'; diff --git a/packages/core/src/view/geometry/edge/PolylineShape.ts b/packages/core/src/view/geometry/edge/PolylineShape.ts index 4c5e9471f..9d5f674a0 100644 --- a/packages/core/src/view/geometry/edge/PolylineShape.ts +++ b/packages/core/src/view/geometry/edge/PolylineShape.ts @@ -5,7 +5,7 @@ * Type definitions from the typed-mxgraph project */ import Shape from '../Shape'; -import { LINE_ARCSIZE } from '../../../util/constants'; +import { LINE_ARCSIZE } from '../../../util/Constants'; import Point from '../Point'; import AbstractCanvas2D from '../../canvas/AbstractCanvas2D'; import { ColorValue } from '../../../types'; diff --git a/packages/core/src/view/geometry/node/CylinderShape.ts b/packages/core/src/view/geometry/node/CylinderShape.ts index 3d33997b3..8b47e691b 100644 --- a/packages/core/src/view/geometry/node/CylinderShape.ts +++ b/packages/core/src/view/geometry/node/CylinderShape.ts @@ -7,7 +7,7 @@ import Shape from '../Shape'; import AbstractCanvas2D from '../../canvas/AbstractCanvas2D'; import Rectangle from '../Rectangle'; -import { NONE } from '../../../util/constants'; +import { NONE } from '../../../util/Constants'; /** * Extends {@link Shape} to implement an cylinder shape. If a custom shape with one filled area and an overlay path is diff --git a/packages/core/src/view/geometry/node/HexagonShape.ts b/packages/core/src/view/geometry/node/HexagonShape.ts index c7f99723f..8a692824a 100644 --- a/packages/core/src/view/geometry/node/HexagonShape.ts +++ b/packages/core/src/view/geometry/node/HexagonShape.ts @@ -6,7 +6,7 @@ */ import ActorShape from '../ActorShape'; import Point from '../Point'; -import { LINE_ARCSIZE } from '../../../util/constants'; +import { LINE_ARCSIZE } from '../../../util/Constants'; import AbstractCanvas2D from '../../canvas/AbstractCanvas2D'; /** diff --git a/packages/core/src/view/geometry/node/ImageShape.ts b/packages/core/src/view/geometry/node/ImageShape.ts index 824a9e181..d24998e36 100644 --- a/packages/core/src/view/geometry/node/ImageShape.ts +++ b/packages/core/src/view/geometry/node/ImageShape.ts @@ -10,7 +10,7 @@ import Rectangle from '../Rectangle'; import CellState from '../../cell/CellState'; import AbstractCanvas2D from '../../canvas/SvgCanvas2D'; import CellOverlay from '../../cell/CellOverlay'; -import { NONE } from '../../../util/constants'; +import { NONE } from '../../../util/Constants'; import { ColorValue } from '../../../types'; /** diff --git a/packages/core/src/view/geometry/node/LabelShape.ts b/packages/core/src/view/geometry/node/LabelShape.ts index eabbbbf60..79c930fc2 100644 --- a/packages/core/src/view/geometry/node/LabelShape.ts +++ b/packages/core/src/view/geometry/node/LabelShape.ts @@ -9,7 +9,7 @@ import { ALIGN, DEFAULT_IMAGESIZE, NONE, -} from '../../../util/constants'; +} from '../../../util/Constants'; import RectangleShape from './RectangleShape'; import { ColorValue } from '../../../types'; import AbstractCanvas2D from '../../canvas/AbstractCanvas2D'; diff --git a/packages/core/src/view/geometry/node/RectangleShape.ts b/packages/core/src/view/geometry/node/RectangleShape.ts index b1d90668c..d3be55cdb 100644 --- a/packages/core/src/view/geometry/node/RectangleShape.ts +++ b/packages/core/src/view/geometry/node/RectangleShape.ts @@ -9,7 +9,7 @@ import { LINE_ARCSIZE, NONE, RECTANGLE_ROUNDING_FACTOR, -} from '../../../util/constants'; +} from '../../../util/Constants'; import Shape from '../Shape'; import AbstractCanvas2D from '../../canvas/AbstractCanvas2D'; import Rectangle from '../Rectangle'; diff --git a/packages/core/src/view/geometry/node/RhombusShape.ts b/packages/core/src/view/geometry/node/RhombusShape.ts index a29cae303..fe46e7f66 100644 --- a/packages/core/src/view/geometry/node/RhombusShape.ts +++ b/packages/core/src/view/geometry/node/RhombusShape.ts @@ -6,7 +6,7 @@ */ import Shape from '../Shape'; import Point from '../Point'; -import { LINE_ARCSIZE } from '../../../util/constants'; +import { LINE_ARCSIZE } from '../../../util/Constants'; import Rectangle from '../Rectangle'; import AbstractCanvas2D from '../../canvas/AbstractCanvas2D'; diff --git a/packages/core/src/view/geometry/node/StencilShape.ts b/packages/core/src/view/geometry/node/StencilShape.ts index 09df36bcc..d29ea0333 100644 --- a/packages/core/src/view/geometry/node/StencilShape.ts +++ b/packages/core/src/view/geometry/node/StencilShape.ts @@ -9,7 +9,7 @@ import ConnectionConstraint from '../../other/ConnectionConstraint'; import Rectangle from '../Rectangle'; import Shape from '../Shape'; import Translations from '../../../util/Translations'; -import { getValue, isNotNullish } from '../../../util/utils'; +import { getValue, isNotNullish } from '../../../util/Utils'; import { ALIGN, DIRECTION, @@ -17,13 +17,13 @@ import { NONE, RECTANGLE_ROUNDING_FACTOR, TEXT_DIRECTION, -} from '../../../util/constants'; +} from '../../../util/Constants'; import StencilShapeRegistry from './StencilShapeRegistry'; import { getChildNodes, getTextContent } from '../../../util/domUtils'; import Point from '../Point'; import AbstractCanvas2D from '../../canvas/AbstractCanvas2D'; import { AlignValue, ColorValue, VAlignValue } from '../../../types'; -import { getNumber } from '../../../util/stringUtils'; +import { getNumber } from '../../../util/StringUtils'; /** * Implements a generic shape which is based on a XML node as a description. diff --git a/packages/core/src/view/geometry/node/SwimlaneShape.ts b/packages/core/src/view/geometry/node/SwimlaneShape.ts index b5e9ffdc6..955be7aa4 100644 --- a/packages/core/src/view/geometry/node/SwimlaneShape.ts +++ b/packages/core/src/view/geometry/node/SwimlaneShape.ts @@ -12,7 +12,7 @@ import { LINE_ARCSIZE, NONE, RECTANGLE_ROUNDING_FACTOR, -} from '../../../util/constants'; +} from '../../../util/Constants'; import { ColorValue } from '../../../types'; import AbstractCanvas2D from '../../canvas/AbstractCanvas2D'; diff --git a/packages/core/src/view/geometry/node/TextShape.ts b/packages/core/src/view/geometry/node/TextShape.ts index d1f3f4606..e82d0643e 100644 --- a/packages/core/src/view/geometry/node/TextShape.ts +++ b/packages/core/src/view/geometry/node/TextShape.ts @@ -19,7 +19,7 @@ import { TEXT_DIRECTION, WORD_WRAP, LINE_HEIGHT, -} from '../../../util/constants'; +} from '../../../util/Constants'; import { getBoundingBox } from '../../../util/mathUtils'; import { getAlignmentAsPoint } from '../../../util/styleUtils'; import Point from '../Point'; @@ -31,7 +31,7 @@ import { htmlEntities, replaceTrailingNewlines, trim, -} from '../../../util/stringUtils'; +} from '../../../util/StringUtils'; import { isNode } from '../../../util/domUtils'; import { AlignValue, diff --git a/packages/core/src/view/geometry/node/TriangleShape.ts b/packages/core/src/view/geometry/node/TriangleShape.ts index f1383d0a7..e6d74df48 100644 --- a/packages/core/src/view/geometry/node/TriangleShape.ts +++ b/packages/core/src/view/geometry/node/TriangleShape.ts @@ -7,7 +7,7 @@ import Point from '../Point'; import ActorShape from '../ActorShape'; -import { LINE_ARCSIZE } from '../../../util/constants'; +import { LINE_ARCSIZE } from '../../../util/Constants'; import AbstractCanvas2D from '../../canvas/AbstractCanvas2D'; /** diff --git a/packages/core/src/view/handler/CellEditorHandler.ts b/packages/core/src/view/handler/CellEditorHandler.ts index f36f857bf..2a0d86baa 100644 --- a/packages/core/src/view/handler/CellEditorHandler.ts +++ b/packages/core/src/view/handler/CellEditorHandler.ts @@ -5,7 +5,7 @@ * Type definitions from the typed-mxgraph project */ -import { getValue } from '../../util/utils'; +import { getValue } from '../../util/Utils'; import { getAlignmentAsPoint, setPrefixedStyle, @@ -24,21 +24,21 @@ import { LINE_HEIGHT, NONE, WORD_WRAP, -} from '../../util/constants'; +} from '../../util/Constants'; import TextShape from '../geometry/node/TextShape'; import Cell from '../cell/Cell'; import InternalMouseEvent from '../event/InternalMouseEvent'; import CellState from '../cell/CellState'; import Shape from '../geometry/Shape'; import { clearSelection, extractTextWithWhitespace, isNode } from '../../util/domUtils'; -import { getStringValue, htmlEntities, replaceTrailingNewlines } from '../../util/stringUtils'; +import { getStringValue, htmlEntities, replaceTrailingNewlines } from '../../util/StringUtils'; import { getSource, isConsumed, isControlDown, isMetaDown, isShiftDown, -} from '../../util/eventUtils'; +} from '../../util/EventUtils'; import EventSource from '../event/EventSource'; import type { Graph } from '../Graph'; diff --git a/packages/core/src/view/handler/ConnectionHandler.ts b/packages/core/src/view/handler/ConnectionHandler.ts index e8d870d36..50f1674fd 100644 --- a/packages/core/src/view/handler/ConnectionHandler.ts +++ b/packages/core/src/view/handler/ConnectionHandler.ts @@ -18,7 +18,7 @@ import { OUTLINE_HIGHLIGHT_STROKEWIDTH, TOOLTIP_VERTICAL_OFFSET, VALID_COLOR, -} from '../../util/constants'; +} from '../../util/Constants'; import { getRotatedPoint, toRadians } from '../../util/mathUtils'; import { convertPoint, getOffset } from '../../util/styleUtils'; import InternalMouseEvent from '../event/InternalMouseEvent'; @@ -35,7 +35,7 @@ import { isAltDown, isConsumed, isShiftDown, -} from '../../util/eventUtils'; +} from '../../util/EventUtils'; import Image from '../image/ImageBox'; import CellState from '../cell/CellState'; import { Graph } from '../Graph'; diff --git a/packages/core/src/view/handler/ConstraintHandler.ts b/packages/core/src/view/handler/ConstraintHandler.ts index 97a8207d3..db93efcfc 100644 --- a/packages/core/src/view/handler/ConstraintHandler.ts +++ b/packages/core/src/view/handler/ConstraintHandler.ts @@ -12,13 +12,13 @@ import { HIGHLIGHT_OPACITY, HIGHLIGHT_SIZE, HIGHLIGHT_STROKEWIDTH, -} from '../../util/constants'; +} from '../../util/Constants'; import InternalEvent from '../event/InternalEvent'; import { intersects } from '../../util/mathUtils'; import Rectangle from '../geometry/Rectangle'; import ImageShape from '../geometry/node/ImageShape'; import RectangleShape from '../geometry/node/RectangleShape'; -import { isShiftDown } from '../../util/eventUtils'; +import { isShiftDown } from '../../util/EventUtils'; import { Graph } from '../Graph'; import CellState from '../cell/CellState'; import InternalMouseEvent from '../event/InternalMouseEvent'; diff --git a/packages/core/src/view/handler/EdgeHandler.ts b/packages/core/src/view/handler/EdgeHandler.ts index b4663f786..4d694d934 100644 --- a/packages/core/src/view/handler/EdgeHandler.ts +++ b/packages/core/src/view/handler/EdgeHandler.ts @@ -24,7 +24,7 @@ import { NONE, OUTLINE_HIGHLIGHT_COLOR, OUTLINE_HIGHLIGHT_STROKEWIDTH, -} from '../../util/constants'; +} from '../../util/Constants'; import { contains, findNearestSegment, @@ -50,7 +50,7 @@ import { isAltDown, isMouseEvent, isShiftDown, -} from '../../util/eventUtils'; +} from '../../util/EventUtils'; import { Graph } from '../Graph'; import CellState from '../cell/CellState'; import Shape from '../geometry/Shape'; diff --git a/packages/core/src/view/handler/EdgeSegmentHandler.ts b/packages/core/src/view/handler/EdgeSegmentHandler.ts index 979db4e17..7be6be25b 100644 --- a/packages/core/src/view/handler/EdgeSegmentHandler.ts +++ b/packages/core/src/view/handler/EdgeSegmentHandler.ts @@ -5,7 +5,7 @@ * Type definitions from the typed-mxgraph project */ import Point from '../geometry/Point'; -import { CURSOR } from '../../util/constants'; +import { CURSOR } from '../../util/Constants'; import Rectangle from '../geometry/Rectangle'; import { contains } from '../../util/mathUtils'; import { setOpacity } from '../../util/styleUtils'; diff --git a/packages/core/src/view/handler/ElbowEdgeHandler.ts b/packages/core/src/view/handler/ElbowEdgeHandler.ts index 402bba0ec..fbd5a28b0 100644 --- a/packages/core/src/view/handler/ElbowEdgeHandler.ts +++ b/packages/core/src/view/handler/ElbowEdgeHandler.ts @@ -10,14 +10,14 @@ import { EDGESTYLE, ELBOW, HANDLE_SIZE, -} from '../../util/constants'; +} from '../../util/Constants'; import InternalEvent from '../event/InternalEvent'; import Point from '../geometry/Point'; import Translations from '../../util/Translations'; import Rectangle from '../geometry/Rectangle'; import { intersects } from '../../util/mathUtils'; import Client from '../../Client'; -import { isConsumed } from '../../util/eventUtils'; +import { isConsumed } from '../../util/EventUtils'; import CellState from '../cell/CellState'; /** diff --git a/packages/core/src/view/handler/KeyHandler.ts b/packages/core/src/view/handler/KeyHandler.ts index 97491a64b..3e112835d 100644 --- a/packages/core/src/view/handler/KeyHandler.ts +++ b/packages/core/src/view/handler/KeyHandler.ts @@ -8,7 +8,7 @@ import { Graph } from '../Graph'; import InternalEvent from '../event/InternalEvent'; import { isAncestorNode } from '../../util/domUtils'; -import { getSource, isAltDown, isConsumed, isControlDown as _isControlDown, isShiftDown } from '../../util/eventUtils'; +import { getSource, isAltDown, isConsumed, isControlDown as _isControlDown, isShiftDown } from '../../util/EventUtils'; import CellEditorHandler from './CellEditorHandler'; /** diff --git a/packages/core/src/view/handler/PanningHandler.ts b/packages/core/src/view/handler/PanningHandler.ts index 840d66fa1..64a2d8713 100644 --- a/packages/core/src/view/handler/PanningHandler.ts +++ b/packages/core/src/view/handler/PanningHandler.ts @@ -15,7 +15,7 @@ import { isMultiTouchEvent, isPopupTrigger, isShiftDown, -} from '../../util/eventUtils'; +} from '../../util/EventUtils'; import PanningManager from '../other/PanningManager'; import InternalMouseEvent from '../event/InternalMouseEvent'; diff --git a/packages/core/src/view/handler/PopupMenuHandler.ts b/packages/core/src/view/handler/PopupMenuHandler.ts index 63a8a87d3..5be47a1cc 100644 --- a/packages/core/src/view/handler/PopupMenuHandler.ts +++ b/packages/core/src/view/handler/PopupMenuHandler.ts @@ -7,7 +7,7 @@ import MaxPopupMenu from '../../gui/MaxPopupMenu'; import InternalEvent from '../event/InternalEvent'; import { getScrollOrigin } from '../../util/styleUtils'; -import { getMainEvent, isMultiTouchEvent } from '../../util/eventUtils'; +import { getMainEvent, isMultiTouchEvent } from '../../util/EventUtils'; import { Graph } from '../Graph'; import InternalMouseEvent from '../event/InternalMouseEvent'; import { GraphPlugin } from '../../types'; diff --git a/packages/core/src/view/handler/RubberBandHandler.ts b/packages/core/src/view/handler/RubberBandHandler.ts index 47bd9c124..a321ae4bf 100644 --- a/packages/core/src/view/handler/RubberBandHandler.ts +++ b/packages/core/src/view/handler/RubberBandHandler.ts @@ -15,7 +15,7 @@ import Point from '../geometry/Point'; import InternalMouseEvent from '../event/InternalMouseEvent'; import Client from '../../Client'; import Rectangle from '../geometry/Rectangle'; -import { isAltDown, isMultiTouchEvent } from '../../util/eventUtils'; +import { isAltDown, isMultiTouchEvent } from '../../util/EventUtils'; import { clearSelection } from '../../util/domUtils'; import { Graph } from '../Graph'; import { GraphPlugin } from '../../types'; diff --git a/packages/core/src/view/handler/SelectionHandler.ts b/packages/core/src/view/handler/SelectionHandler.ts index 5c06b164e..ea9ee6310 100644 --- a/packages/core/src/view/handler/SelectionHandler.ts +++ b/packages/core/src/view/handler/SelectionHandler.ts @@ -24,11 +24,11 @@ import { INVALID_CONNECT_TARGET_COLOR, NONE, VALID_COLOR, -} from '../../util/constants'; +} from '../../util/Constants'; import Dictionary from '../../util/Dictionary'; import CellHighlight from '../cell/CellHighlight'; import Rectangle from '../geometry/Rectangle'; -import { getClientX, getClientY, isAltDown, isMultiTouchEvent } from '../../util/eventUtils'; +import { getClientX, getClientY, isAltDown, isMultiTouchEvent } from '../../util/EventUtils'; import { Graph } from '../Graph'; import Guide from '../other/Guide'; import Shape from '../geometry/Shape'; diff --git a/packages/core/src/view/handler/TooltipHandler.ts b/packages/core/src/view/handler/TooltipHandler.ts index 3f79507db..8d58805f3 100644 --- a/packages/core/src/view/handler/TooltipHandler.ts +++ b/packages/core/src/view/handler/TooltipHandler.ts @@ -6,8 +6,8 @@ */ import InternalEvent from '../event/InternalEvent'; import { fit, getScrollOrigin } from '../../util/styleUtils'; -import { TOOLTIP_VERTICAL_OFFSET } from '../../util/constants'; -import { getSource, isMouseEvent } from '../../util/eventUtils'; +import { TOOLTIP_VERTICAL_OFFSET } from '../../util/Constants'; +import { getSource, isMouseEvent } from '../../util/EventUtils'; import { isNode } from '../../util/domUtils'; import { Graph } from '../Graph'; import CellState from '../cell/CellState'; diff --git a/packages/core/src/view/handler/VertexHandler.ts b/packages/core/src/view/handler/VertexHandler.ts index 8df690959..ba7760950 100644 --- a/packages/core/src/view/handler/VertexHandler.ts +++ b/packages/core/src/view/handler/VertexHandler.ts @@ -17,7 +17,7 @@ import { VERTEX_SELECTION_COLOR, VERTEX_SELECTION_DASHED, VERTEX_SELECTION_STROKEWIDTH, -} from '../../util/constants'; +} from '../../util/Constants'; import InternalEvent from '../event/InternalEvent'; import RectangleShape from '../geometry/node/RectangleShape'; import ImageShape from '../geometry/node/ImageShape'; @@ -25,7 +25,7 @@ import EllipseShape from '../geometry/node/EllipseShape'; import Point from '../geometry/Point'; import { getRotatedPoint, intersects, mod, toRadians } from '../../util/mathUtils'; import Client from '../../Client'; -import { isMouseEvent, isShiftDown } from '../../util/eventUtils'; +import { isMouseEvent, isShiftDown } from '../../util/EventUtils'; import { Graph } from '../Graph'; import CellState from '../cell/CellState'; import Image from '../image/ImageBox'; diff --git a/packages/core/src/view/layout/HierarchicalLayout.ts b/packages/core/src/view/layout/HierarchicalLayout.ts index 6dd0f7464..6301a1bd6 100644 --- a/packages/core/src/view/layout/HierarchicalLayout.ts +++ b/packages/core/src/view/layout/HierarchicalLayout.ts @@ -5,7 +5,7 @@ * Type definitions from the typed-mxgraph project */ import GraphLayout from './GraphLayout'; -import { DIRECTION } from '../../util/constants'; +import { DIRECTION } from '../../util/Constants'; import HierarchicalEdgeStyle from './datatypes/HierarchicalEdgeStyle'; import Dictionary from '../../util/Dictionary'; import GraphHierarchyModel from './hierarchical/GraphHierarchyModel'; @@ -35,8 +35,8 @@ import GraphHierarchyNode from './datatypes/GraphHierarchyNode'; */ class HierarchicalLayout extends GraphLayout { constructor( - graph: Graph, - orientation: DIRECTION=DIRECTION.NORTH, + graph: Graph, + orientation: DIRECTION=DIRECTION.NORTH, deterministic: boolean=true ) { super(graph); diff --git a/packages/core/src/view/layout/LayoutManager.ts b/packages/core/src/view/layout/LayoutManager.ts index a750bfb95..f042a1ce7 100644 --- a/packages/core/src/view/layout/LayoutManager.ts +++ b/packages/core/src/view/layout/LayoutManager.ts @@ -17,7 +17,7 @@ import StyleChange from '../undoable_changes/StyleChange'; import EventObject from '../event/EventObject'; import Cell from '../cell/Cell'; import Rectangle from '../geometry/Rectangle'; -import { getClientX, getClientY } from '../../util/eventUtils'; +import { getClientX, getClientY } from '../../util/EventUtils'; import CellArray from '../cell/CellArray'; import { Graph } from '../Graph'; import GraphLayout from './GraphLayout'; diff --git a/packages/core/src/view/layout/StackLayout.ts b/packages/core/src/view/layout/StackLayout.ts index c8cdcc455..f5940593a 100644 --- a/packages/core/src/view/layout/StackLayout.ts +++ b/packages/core/src/view/layout/StackLayout.ts @@ -6,9 +6,9 @@ */ import GraphLayout from './GraphLayout'; import Rectangle from '../geometry/Rectangle'; -import { getValue } from '../../util/utils'; -import { getNumber } from '../../util/stringUtils'; -import { DEFAULT_STARTSIZE } from '../../util/constants'; +import { getValue } from '../../util/Utils'; +import { getNumber } from '../../util/StringUtils'; +import { DEFAULT_STARTSIZE } from '../../util/Constants'; import { Graph } from '../Graph'; import Cell from '../cell/Cell'; import Geometry from '../geometry/Geometry'; diff --git a/packages/core/src/view/layout/SwimlaneLayout.ts b/packages/core/src/view/layout/SwimlaneLayout.ts index b9430e25f..410cfc555 100644 --- a/packages/core/src/view/layout/SwimlaneLayout.ts +++ b/packages/core/src/view/layout/SwimlaneLayout.ts @@ -6,7 +6,7 @@ */ import GraphLayout from './GraphLayout'; -import { DIRECTION } from '../../util/constants'; +import { DIRECTION } from '../../util/Constants'; import HierarchicalEdgeStyle from './datatypes/HierarchicalEdgeStyle'; import Dictionary from '../../util/Dictionary'; import Rectangle from '../geometry/Rectangle'; diff --git a/packages/core/src/view/layout/hierarchical/CoordinateAssignment.ts b/packages/core/src/view/layout/hierarchical/CoordinateAssignment.ts index 717bc4329..c31480048 100644 --- a/packages/core/src/view/layout/hierarchical/CoordinateAssignment.ts +++ b/packages/core/src/view/layout/hierarchical/CoordinateAssignment.ts @@ -5,7 +5,7 @@ * Type definitions from the typed-mxgraph project */ import HierarchicalLayoutStage from './HierarchicalLayoutStage'; -import { DIRECTION } from '../../../util/constants'; +import { DIRECTION } from '../../../util/Constants'; import MaxLog from '../../../gui/MaxLog'; import WeightedCellSorter from '../util/WeightedCellSorter'; import Dictionary from '../../../util/Dictionary'; diff --git a/packages/core/src/view/mixins/CellsMixin.ts b/packages/core/src/view/mixins/CellsMixin.ts index f38d6b1fb..ed49acaac 100644 --- a/packages/core/src/view/mixins/CellsMixin.ts +++ b/packages/core/src/view/mixins/CellsMixin.ts @@ -1,6 +1,6 @@ import Cell from '../cell/Cell'; import CellArray from '../cell/CellArray'; -import { mixInto } from '../../util/utils'; +import { mixInto } from '../../util/Utils'; import { contains, getBoundingBox, @@ -21,14 +21,14 @@ import { DEFAULT_IMAGESIZE, DIRECTION, SHAPE, -} from '../../util/constants'; +} from '../../util/Constants'; import Geometry from '../geometry/Geometry'; import EventObject from '../event/EventObject'; import InternalEvent from '../event/InternalEvent'; import Rectangle from '../geometry/Rectangle'; import Dictionary from '../../util/Dictionary'; import Point from '../geometry/Point'; -import { htmlEntities } from '../../util/stringUtils'; +import { htmlEntities } from '../../util/StringUtils'; import CellState from '../cell/CellState'; import { Graph } from '../Graph'; diff --git a/packages/core/src/view/mixins/ConnectionsMixin.ts b/packages/core/src/view/mixins/ConnectionsMixin.ts index 081fb8996..1fb0ad6c1 100644 --- a/packages/core/src/view/mixins/ConnectionsMixin.ts +++ b/packages/core/src/view/mixins/ConnectionsMixin.ts @@ -3,8 +3,8 @@ import CellState from '../cell/CellState'; import InternalMouseEvent from '../event/InternalMouseEvent'; import ConnectionConstraint from '../other/ConnectionConstraint'; import Rectangle from '../geometry/Rectangle'; -import { DIRECTION } from '../../util/constants'; -import { mixInto } from '../../util/utils'; +import { DIRECTION } from '../../util/Constants'; +import { mixInto } from '../../util/Utils'; import { getRotatedPoint, toRadians } from '../../util/mathUtils'; import Cell from '../cell/Cell'; import CellArray from '../cell/CellArray'; diff --git a/packages/core/src/view/mixins/DragDropMixin.ts b/packages/core/src/view/mixins/DragDropMixin.ts index f04463afe..4cb9f4dc3 100644 --- a/packages/core/src/view/mixins/DragDropMixin.ts +++ b/packages/core/src/view/mixins/DragDropMixin.ts @@ -1,4 +1,4 @@ -import { mixInto } from '../../util/utils'; +import { mixInto } from '../../util/Utils'; import Cell from '../cell/Cell'; import CellArray from '../cell/CellArray'; import { Graph } from '../Graph'; diff --git a/packages/core/src/view/mixins/EdgeMixin.ts b/packages/core/src/view/mixins/EdgeMixin.ts index 961dddb6b..90bcfa6ba 100644 --- a/packages/core/src/view/mixins/EdgeMixin.ts +++ b/packages/core/src/view/mixins/EdgeMixin.ts @@ -1,6 +1,6 @@ import Cell from '../cell/Cell'; import CellArray from '../cell/CellArray'; -import { mixInto } from '../../util/utils'; +import { mixInto } from '../../util/Utils'; import { removeDuplicates } from '../../util/arrayUtils'; import { findNearestSegment } from '../../util/mathUtils'; import Geometry from '../geometry/Geometry'; diff --git a/packages/core/src/view/mixins/EditingMixin.ts b/packages/core/src/view/mixins/EditingMixin.ts index cf7180519..b364eb353 100644 --- a/packages/core/src/view/mixins/EditingMixin.ts +++ b/packages/core/src/view/mixins/EditingMixin.ts @@ -1,10 +1,10 @@ import Cell from '../cell/Cell'; -import { isMultiTouchEvent } from '../../util/eventUtils'; +import { isMultiTouchEvent } from '../../util/EventUtils'; import EventObject from '../event/EventObject'; import InternalEvent from '../event/InternalEvent'; import InternalMouseEvent from '../event/InternalMouseEvent'; import { Graph } from '../Graph'; -import { mixInto } from '../../util/utils'; +import { mixInto } from '../../util/Utils'; import CellEditorHandler from '../handler/CellEditorHandler'; declare module '../Graph' { diff --git a/packages/core/src/view/mixins/EventsMixin.ts b/packages/core/src/view/mixins/EventsMixin.ts index 39cb4c1a1..6478c7dd2 100644 --- a/packages/core/src/view/mixins/EventsMixin.ts +++ b/packages/core/src/view/mixins/EventsMixin.ts @@ -15,15 +15,15 @@ import { isPopupTrigger, isShiftDown, isTouchEvent, -} from '../../util/eventUtils'; +} from '../../util/EventUtils'; import CellState from '../cell/CellState'; import Cell from '../cell/Cell'; import PanningHandler from '../handler/PanningHandler'; import ConnectionHandler from '../handler/ConnectionHandler'; import Point from '../geometry/Point'; -import { mixInto } from '../../util/utils'; +import { mixInto } from '../../util/Utils'; import { convertPoint } from '../../util/styleUtils'; -import { NONE } from '../../util/constants'; +import { NONE } from '../../util/Constants'; import Client from '../../Client'; import EventSource from '../event/EventSource'; import CellEditorHandler from '../handler/CellEditorHandler'; diff --git a/packages/core/src/view/mixins/FoldingMixin.ts b/packages/core/src/view/mixins/FoldingMixin.ts index 039b8436d..2a039aadc 100644 --- a/packages/core/src/view/mixins/FoldingMixin.ts +++ b/packages/core/src/view/mixins/FoldingMixin.ts @@ -6,7 +6,7 @@ import CellArray from '../cell/CellArray'; import EventObject from '../event/EventObject'; import InternalEvent from '../event/InternalEvent'; import Geometry from '../geometry/Geometry'; -import { getValue, mixInto } from '../../util/utils'; +import { getValue, mixInto } from '../../util/Utils'; import { toRadians } from '../../util/mathUtils'; import Rectangle from '../geometry/Rectangle'; import { Graph } from '../Graph'; diff --git a/packages/core/src/view/mixins/GroupingMixin.ts b/packages/core/src/view/mixins/GroupingMixin.ts index ad7f1bceb..ebba05e6c 100644 --- a/packages/core/src/view/mixins/GroupingMixin.ts +++ b/packages/core/src/view/mixins/GroupingMixin.ts @@ -1,6 +1,6 @@ import Cell from '../cell/Cell'; import CellArray from '../cell/CellArray'; -import { mixInto } from '../../util/utils'; +import { mixInto } from '../../util/Utils'; import { sortCells } from '../../util/styleUtils'; import Geometry from '../geometry/Geometry'; import EventObject from '../event/EventObject'; diff --git a/packages/core/src/view/mixins/ImageMixin.ts b/packages/core/src/view/mixins/ImageMixin.ts index dfcb18e19..24d9d1768 100644 --- a/packages/core/src/view/mixins/ImageMixin.ts +++ b/packages/core/src/view/mixins/ImageMixin.ts @@ -1,4 +1,4 @@ -import { mixInto } from '../../util/utils'; +import { mixInto } from '../../util/Utils'; import { Graph } from '../Graph'; import ImageBundle from '../image/ImageBundle'; diff --git a/packages/core/src/view/mixins/LabelMixin.ts b/packages/core/src/view/mixins/LabelMixin.ts index 4220c8412..7c5035103 100644 --- a/packages/core/src/view/mixins/LabelMixin.ts +++ b/packages/core/src/view/mixins/LabelMixin.ts @@ -1,4 +1,4 @@ -import { mixInto } from '../../util/utils'; +import { mixInto } from '../../util/Utils'; import Cell from '../cell/Cell'; import { Graph } from '../Graph'; diff --git a/packages/core/src/view/mixins/OrderMixin.ts b/packages/core/src/view/mixins/OrderMixin.ts index e56f8004e..7fd397241 100644 --- a/packages/core/src/view/mixins/OrderMixin.ts +++ b/packages/core/src/view/mixins/OrderMixin.ts @@ -1,5 +1,5 @@ import CellArray from '../cell/CellArray'; -import { mixInto } from '../../util/utils'; +import { mixInto } from '../../util/Utils'; import { sortCells } from '../../util/styleUtils'; import EventObject from '../event/EventObject'; import InternalEvent from '../event/InternalEvent'; diff --git a/packages/core/src/view/mixins/OverlaysMixin.ts b/packages/core/src/view/mixins/OverlaysMixin.ts index ce00dbde8..3042d7474 100644 --- a/packages/core/src/view/mixins/OverlaysMixin.ts +++ b/packages/core/src/view/mixins/OverlaysMixin.ts @@ -5,7 +5,7 @@ import InternalEvent from '../event/InternalEvent'; import Image from '../image/ImageBox'; import InternalMouseEvent from '../event/InternalMouseEvent'; import { Graph } from '../Graph'; -import { mixInto } from '../../util/utils'; +import { mixInto } from '../../util/Utils'; declare module '../Graph' { interface Graph { diff --git a/packages/core/src/view/mixins/PageBreaksMixin.ts b/packages/core/src/view/mixins/PageBreaksMixin.ts index 2240f9fbf..1e292b29f 100644 --- a/packages/core/src/view/mixins/PageBreaksMixin.ts +++ b/packages/core/src/view/mixins/PageBreaksMixin.ts @@ -2,7 +2,7 @@ import Rectangle from '../geometry/Rectangle'; import Point from '../geometry/Point'; import PolylineShape from '../geometry/edge/PolylineShape'; import { Graph } from '../Graph'; -import { mixInto } from '../../util/utils'; +import { mixInto } from '../../util/Utils'; declare module '../Graph' { interface Graph { diff --git a/packages/core/src/view/mixins/PanningMixin.ts b/packages/core/src/view/mixins/PanningMixin.ts index b94c47788..37e628d35 100644 --- a/packages/core/src/view/mixins/PanningMixin.ts +++ b/packages/core/src/view/mixins/PanningMixin.ts @@ -1,4 +1,4 @@ -import { mixInto } from '../../util/utils'; +import { mixInto } from '../../util/Utils'; import { hasScrollbars } from '../../util/styleUtils'; import EventObject from '../event/EventObject'; import InternalEvent from '../event/InternalEvent'; diff --git a/packages/core/src/view/mixins/PortsMixin.ts b/packages/core/src/view/mixins/PortsMixin.ts index 916f8c065..6495cf67c 100644 --- a/packages/core/src/view/mixins/PortsMixin.ts +++ b/packages/core/src/view/mixins/PortsMixin.ts @@ -1,4 +1,4 @@ -import { mixInto } from '../../util/utils'; +import { mixInto } from '../../util/Utils'; import Cell from '../cell/Cell'; import { Graph } from '../Graph'; diff --git a/packages/core/src/view/mixins/SelectionMixin.ts b/packages/core/src/view/mixins/SelectionMixin.ts index 9f550e082..3e7c3c801 100644 --- a/packages/core/src/view/mixins/SelectionMixin.ts +++ b/packages/core/src/view/mixins/SelectionMixin.ts @@ -5,7 +5,7 @@ import Dictionary from '../../util/Dictionary'; import RootChange from '../undoable_changes/RootChange'; import ChildChange from '../undoable_changes/ChildChange'; import { Graph } from '../Graph'; -import { mixInto } from '../../util/utils'; +import { mixInto } from '../../util/Utils'; import GraphSelectionModel from '../GraphSelectionModel'; declare module '../Graph' { diff --git a/packages/core/src/view/mixins/SnapMixin.ts b/packages/core/src/view/mixins/SnapMixin.ts index 797167ad7..2bb9d78fe 100644 --- a/packages/core/src/view/mixins/SnapMixin.ts +++ b/packages/core/src/view/mixins/SnapMixin.ts @@ -1,4 +1,4 @@ -import { mixInto } from '../../util/utils'; +import { mixInto } from '../../util/Utils'; import Point from '../geometry/Point'; import Rectangle from '../geometry/Rectangle'; import { Graph } from '../Graph'; diff --git a/packages/core/src/view/mixins/SwimlaneMixin.ts b/packages/core/src/view/mixins/SwimlaneMixin.ts index 2eaa3062b..bc5d915e3 100644 --- a/packages/core/src/view/mixins/SwimlaneMixin.ts +++ b/packages/core/src/view/mixins/SwimlaneMixin.ts @@ -1,15 +1,15 @@ import Cell from '../cell/Cell'; import Rectangle from '../geometry/Rectangle'; -import { mixInto } from '../../util/utils'; +import { mixInto } from '../../util/Utils'; import { convertPoint } from '../../util/styleUtils'; import { mod } from '../../util/mathUtils'; import { DEFAULT_STARTSIZE, DIRECTION, SHAPE, -} from '../../util/constants'; +} from '../../util/Constants'; import CellArray from '../cell/CellArray'; -import { getClientX, getClientY } from '../../util/eventUtils'; +import { getClientX, getClientY } from '../../util/EventUtils'; import { Graph } from '../Graph'; import { CellStateStyles, DirectionValue } from '../../types'; diff --git a/packages/core/src/view/mixins/TerminalMixin.ts b/packages/core/src/view/mixins/TerminalMixin.ts index aabfebd3f..61fd5b22c 100644 --- a/packages/core/src/view/mixins/TerminalMixin.ts +++ b/packages/core/src/view/mixins/TerminalMixin.ts @@ -2,7 +2,7 @@ import CellArray from '../cell/CellArray'; import Cell from '../cell/Cell'; import Dictionary from '../../util/Dictionary'; import { Graph } from '../Graph'; -import { mixInto } from '../../util/utils'; +import { mixInto } from '../../util/Utils'; declare module '../Graph' { interface Graph { diff --git a/packages/core/src/view/mixins/TooltipMixin.ts b/packages/core/src/view/mixins/TooltipMixin.ts index e78cd7bd6..dd74fc7c9 100644 --- a/packages/core/src/view/mixins/TooltipMixin.ts +++ b/packages/core/src/view/mixins/TooltipMixin.ts @@ -1,12 +1,12 @@ import CellState from '../cell/CellState'; -import { htmlEntities } from '../../util/stringUtils'; +import { htmlEntities } from '../../util/StringUtils'; import Translations from '../../util/Translations'; import Shape from '../geometry/Shape'; import Cell from '../cell/Cell'; import { Graph } from '../Graph'; import SelectionCellsHandler from '../handler/SelectionCellsHandler'; import TooltipHandler from '../handler/TooltipHandler'; -import { mixInto } from '../../util/utils'; +import { mixInto } from '../../util/Utils'; declare module '../Graph' { interface Graph { diff --git a/packages/core/src/view/mixins/ValidationMixin.ts b/packages/core/src/view/mixins/ValidationMixin.ts index 990e514c6..664443eba 100644 --- a/packages/core/src/view/mixins/ValidationMixin.ts +++ b/packages/core/src/view/mixins/ValidationMixin.ts @@ -4,7 +4,7 @@ import { isNode } from '../../util/domUtils'; import CellState from '../cell/CellState'; import Multiplicity from '../other/Multiplicity'; import { Graph } from '../Graph'; -import { mixInto } from '../../util/utils'; +import { mixInto } from '../../util/Utils'; declare module '../Graph' { interface Graph { diff --git a/packages/core/src/view/mixins/VertexMixin.ts b/packages/core/src/view/mixins/VertexMixin.ts index 58e862acf..58c3f702f 100644 --- a/packages/core/src/view/mixins/VertexMixin.ts +++ b/packages/core/src/view/mixins/VertexMixin.ts @@ -2,7 +2,7 @@ import Cell from '../cell/Cell'; import Geometry from '../geometry/Geometry'; import { Graph } from '../Graph'; import CellArray from '../cell/CellArray'; -import { mixInto } from '../../util/utils'; +import { mixInto } from '../../util/Utils'; declare module '../Graph' { interface Graph { diff --git a/packages/core/src/view/mixins/ZoomMixin.ts b/packages/core/src/view/mixins/ZoomMixin.ts index ac4b8adbe..bebfd325b 100644 --- a/packages/core/src/view/mixins/ZoomMixin.ts +++ b/packages/core/src/view/mixins/ZoomMixin.ts @@ -1,5 +1,5 @@ import Rectangle from '../geometry/Rectangle'; -import { mixInto } from '../../util/utils'; +import { mixInto } from '../../util/Utils'; import { hasScrollbars } from '../../util/styleUtils'; import { Graph } from '../Graph'; diff --git a/packages/core/src/view/other/DragSource.ts b/packages/core/src/view/other/DragSource.ts index 30e910cf7..225d56019 100644 --- a/packages/core/src/view/other/DragSource.ts +++ b/packages/core/src/view/other/DragSource.ts @@ -15,7 +15,7 @@ import { import InternalEvent from '../event/InternalEvent'; import Client from '../../Client'; import Guide from './Guide'; -import { DROP_TARGET_COLOR } from '../../util/constants'; +import { DROP_TARGET_COLOR } from '../../util/Constants'; import Point from '../geometry/Point'; import { getClientX, @@ -25,7 +25,7 @@ import { isMouseEvent, isPenEvent, isTouchEvent, -} from '../../util/eventUtils'; +} from '../../util/EventUtils'; import EventSource from '../event/EventSource'; import EventObject from '../event/EventObject'; import { Graph } from '../Graph'; diff --git a/packages/core/src/view/other/Guide.ts b/packages/core/src/view/other/Guide.ts index 7d186adf0..b368dc892 100644 --- a/packages/core/src/view/other/Guide.ts +++ b/packages/core/src/view/other/Guide.ts @@ -5,7 +5,7 @@ * Type definitions from the typed-mxgraph project */ -import { DIALECT, GUIDE_COLOR, GUIDE_STROKEWIDTH } from '../../util/constants'; +import { DIALECT, GUIDE_COLOR, GUIDE_STROKEWIDTH } from '../../util/Constants'; import Point from '../geometry/Point'; import PolylineShape from '../geometry/edge/PolylineShape'; import CellState from '../cell/CellState'; diff --git a/packages/core/src/view/other/Outline.ts b/packages/core/src/view/other/Outline.ts index e384569ed..bc26600e7 100644 --- a/packages/core/src/view/other/Outline.ts +++ b/packages/core/src/view/other/Outline.ts @@ -12,7 +12,7 @@ import { OUTLINE_HANDLE_FILLCOLOR, OUTLINE_HANDLE_STROKECOLOR, OUTLINE_STROKEWIDTH, -} from '../../util/constants'; +} from '../../util/Constants'; import Point from '../geometry/Point'; import Rectangle from '../geometry/Rectangle'; import RectangleShape from '../geometry/node/RectangleShape'; @@ -21,7 +21,7 @@ import ImageShape from '../geometry/node/ImageShape'; import InternalEvent from '../event/InternalEvent'; import Image from '../image/ImageBox'; import EventObject from '../event/EventObject'; -import { getSource, isMouseEvent } from '../../util/eventUtils'; +import { getSource, isMouseEvent } from '../../util/EventUtils'; import EventSource from '../event/EventSource'; import { hasScrollbars } from '../../util/styleUtils'; import { Listenable } from '../../types'; diff --git a/packages/core/src/view/other/PrintPreview.ts b/packages/core/src/view/other/PrintPreview.ts index 2228c8a76..a3ffacbf0 100644 --- a/packages/core/src/view/other/PrintPreview.ts +++ b/packages/core/src/view/other/PrintPreview.ts @@ -9,7 +9,7 @@ import TemporaryCellStates from '../cell/TemporaryCellStates'; import InternalEvent from '../event/InternalEvent'; import Client from '../../Client'; import { intersects } from '../../util/mathUtils'; -import { DIALECT } from '../../util/constants'; +import { DIALECT } from '../../util/Constants'; import { write } from '../../util/domUtils'; import { Graph } from '../Graph'; import CellState from '../cell/CellState'; diff --git a/packages/core/src/view/style/EdgeStyle.ts b/packages/core/src/view/style/EdgeStyle.ts index e2abc1508..92d521fcd 100644 --- a/packages/core/src/view/style/EdgeStyle.ts +++ b/packages/core/src/view/style/EdgeStyle.ts @@ -5,8 +5,8 @@ * Type definitions from the typed-mxgraph project */ -import { getValue } from '../../util/utils'; -import { getNumber } from '../../util/stringUtils'; +import { getValue } from '../../util/Utils'; +import { getNumber } from '../../util/StringUtils'; import { contains, getBoundingBox, @@ -22,7 +22,7 @@ import { ELBOW, ENTITY_SEGMENT, NONE, -} from '../../util/constants'; +} from '../../util/Constants'; import Rectangle from '../geometry/Rectangle'; import Geometry from '../geometry/Geometry'; @@ -483,7 +483,7 @@ class EdgeStyle { * edge. */ static SegmentConnector(state: CellState, sourceScaled: CellState, targetScaled: CellState, controlHints: Point[], result: Point[]) { - + // Creates array of all way- and terminalpoints // TODO: Figure out what to do when there are nulls in `pts`! const pts = EdgeStyle.scalePointArray(state.absolutePoints, state.view.scale); diff --git a/packages/core/src/view/style/Perimeter.ts b/packages/core/src/view/style/Perimeter.ts index 652c95311..fdec4d674 100644 --- a/packages/core/src/view/style/Perimeter.ts +++ b/packages/core/src/view/style/Perimeter.ts @@ -7,7 +7,7 @@ import { intersection } from '../../util/mathUtils'; import Point from '../geometry/Point'; -import { DIRECTION } from '../../util/constants'; +import { DIRECTION } from '../../util/Constants'; import Rectangle from '../geometry/Rectangle'; import CellState from '../cell/CellState'; import { CellStateStyles } from '../../types'; diff --git a/packages/core/src/view/style/StyleRegistry.ts b/packages/core/src/view/style/StyleRegistry.ts index 1bfbacc64..9a228cc05 100644 --- a/packages/core/src/view/style/StyleRegistry.ts +++ b/packages/core/src/view/style/StyleRegistry.ts @@ -8,7 +8,7 @@ import { EDGESTYLE, PERIMETER, -} from '../../util/constants'; +} from '../../util/Constants'; import EdgeStyle from './EdgeStyle'; import Perimeter from './Perimeter'; diff --git a/packages/core/src/view/style/Stylesheet.ts b/packages/core/src/view/style/Stylesheet.ts index 4a744f0f3..05d8e9d1d 100644 --- a/packages/core/src/view/style/Stylesheet.ts +++ b/packages/core/src/view/style/Stylesheet.ts @@ -9,12 +9,12 @@ import { ARROW, NONE, SHAPE, -} from '../../util/constants'; +} from '../../util/Constants'; import Perimeter from './Perimeter'; import { clone } from '../../util/cloneUtils'; import { isNumeric } from '../../util/mathUtils'; import CodecRegistry from '../../serialization/CodecRegistry'; -import { NODETYPE } from '../../util/constants'; +import { NODETYPE } from '../../util/Constants'; import MaxLog from '../../gui/MaxLog'; import StyleRegistry from './StyleRegistry'; import ObjectCodec from '../../serialization/ObjectCodec'; diff --git a/packages/core/src/view/undoable_changes/CellAttributeChange.ts b/packages/core/src/view/undoable_changes/CellAttributeChange.ts index d10ae2649..6efc1f2e6 100644 --- a/packages/core/src/view/undoable_changes/CellAttributeChange.ts +++ b/packages/core/src/view/undoable_changes/CellAttributeChange.ts @@ -1,4 +1,4 @@ -import { isNullish } from '../../util/utils'; +import { isNullish } from '../../util/Utils'; import Cell from '../cell/Cell'; import CodecRegistry from '../../serialization/CodecRegistry'; import GenericChangeCodec from './GenericChangeCodec'; diff --git a/packages/core/src/view/undoable_changes/ChildChange.ts b/packages/core/src/view/undoable_changes/ChildChange.ts index 34c14748b..22b0d01fd 100644 --- a/packages/core/src/view/undoable_changes/ChildChange.ts +++ b/packages/core/src/view/undoable_changes/ChildChange.ts @@ -2,7 +2,7 @@ import GraphDataModel from '../GraphDataModel'; import Cell from '../cell/Cell'; import ObjectCodec from '../../serialization/ObjectCodec'; import CodecRegistry from '../../serialization/CodecRegistry'; -import { NODETYPE } from '../../util/constants'; +import { NODETYPE } from '../../util/Constants'; import type { UndoableChange } from '../../types'; import Codec from '../../serialization/Codec'; diff --git a/packages/core/src/view/undoable_changes/RootChange.ts b/packages/core/src/view/undoable_changes/RootChange.ts index 817e579aa..4797c39c3 100644 --- a/packages/core/src/view/undoable_changes/RootChange.ts +++ b/packages/core/src/view/undoable_changes/RootChange.ts @@ -1,7 +1,7 @@ import Cell from '../cell/Cell'; import GraphDataModel from '../GraphDataModel'; import CodecRegistry from '../../serialization/CodecRegistry'; -import { NODETYPE } from '../../util/constants'; +import { NODETYPE } from '../../util/Constants'; import ObjectCodec from '../../serialization/ObjectCodec'; import type { UndoableChange } from '../../types';