diff --git a/packages/web/src/commands/runCommand.ts b/packages/web/src/commands/runCommand.ts index 627cce78..8ae9672e 100644 --- a/packages/web/src/commands/runCommand.ts +++ b/packages/web/src/commands/runCommand.ts @@ -1,5 +1,5 @@ import { getCommands, visibleCommandPalette } from '../stores'; -import { GlobalCommand } from './registerCommand'; +import type { GlobalCommand } from './registerCommand'; export default function runCommand(id) { const commandsValue = getCommands(); diff --git a/packages/web/src/datagrid/ChangeSetGrider.ts b/packages/web/src/datagrid/ChangeSetGrider.ts index fc400216..5d442f98 100644 --- a/packages/web/src/datagrid/ChangeSetGrider.ts +++ b/packages/web/src/datagrid/ChangeSetGrider.ts @@ -1,5 +1,6 @@ +import type { ChangeSet, MacroDefinition, MacroSelectedCell } from 'dbgate-datalib'; + import { - ChangeSet, changeSetContainsChanges, changeSetInsertNewRow, createChangeSet, @@ -7,8 +8,6 @@ import { findExistingChangeSetItem, getChangeSetInsertedRows, GridDisplay, - MacroDefinition, - MacroSelectedCell, revertChangeSetRowChanges, setChangeSetValue, setChangeSetRowData, @@ -16,7 +15,8 @@ import { runMacroOnValue, changeSetInsertDocuments, } from 'dbgate-datalib'; -import Grider, { GriderRowStatus } from './Grider'; +import Grider from './Grider'; +import type { GriderRowStatus } from './Grider'; function getRowFromItem(row, matchedChangeSetItem) { return matchedChangeSetItem.document diff --git a/packages/web/src/datagrid/RowsArrayGrider.ts b/packages/web/src/datagrid/RowsArrayGrider.ts index 0e21c75e..9df3046d 100644 --- a/packages/web/src/datagrid/RowsArrayGrider.ts +++ b/packages/web/src/datagrid/RowsArrayGrider.ts @@ -1,4 +1,4 @@ -import Grider, { GriderRowStatus } from './Grider'; +import Grider from './Grider'; export default class RowsArrayGrider extends Grider { constructor(private rows: any[]) { diff --git a/packages/web/src/datagrid/gridutil.ts b/packages/web/src/datagrid/gridutil.ts index 499368d6..a631cd51 100644 --- a/packages/web/src/datagrid/gridutil.ts +++ b/packages/web/src/datagrid/gridutil.ts @@ -1,8 +1,8 @@ import _ from 'lodash'; import { SeriesSizes } from './SeriesSizes'; -import { CellAddress } from './selection'; -import { GridDisplay } from 'dbgate-datalib'; -import Grider from './Grider'; +import type { CellAddress } from './selection'; +import type { GridDisplay } from 'dbgate-datalib'; +import type Grider from './Grider'; import { isJsonLikeLongString, safeJsonParse } from 'dbgate-tools'; export function countColumnSizes(grider: Grider, columns, containerWidth, display: GridDisplay) { diff --git a/packages/web/src/designer/DesignerQueryDumper.ts b/packages/web/src/designer/DesignerQueryDumper.ts index e4f7e026..39f3f663 100644 --- a/packages/web/src/designer/DesignerQueryDumper.ts +++ b/packages/web/src/designer/DesignerQueryDumper.ts @@ -1,17 +1,9 @@ import _ from 'lodash'; -import { - dumpSqlSelect, - Select, - JoinType, - Condition, - Relation, - mergeConditions, - Source, - ResultField, - Expression, -} from 'dbgate-sqltree'; -import { DesignerInfo, DesignerTableInfo, DesignerReferenceInfo, DesignerJoinType } from './types'; -import { DesignerComponent } from './DesignerComponentCreator'; +import type { Select, JoinType, Condition, ResultField, Expression } from 'dbgate-sqltree'; + +import { mergeConditions } from 'dbgate-sqltree'; +import type { DesignerInfo, DesignerTableInfo } from './types'; +import type { DesignerComponent } from './DesignerComponentCreator'; import { getReferenceConditions, referenceIsCrossJoin, diff --git a/packages/web/src/designer/DomTableRef.ts b/packages/web/src/designer/DomTableRef.ts index 27b775f5..85f6c759 100644 --- a/packages/web/src/designer/DomTableRef.ts +++ b/packages/web/src/designer/DomTableRef.ts @@ -1,4 +1,4 @@ -import { DesignerTableInfo } from './types'; +import type { DesignerTableInfo } from './types'; export default class DomTableRef { domTable: Element; diff --git a/packages/web/src/designer/GraphLayout.ts b/packages/web/src/designer/GraphLayout.ts index caa81888..b0e33a27 100644 --- a/packages/web/src/designer/GraphLayout.ts +++ b/packages/web/src/designer/GraphLayout.ts @@ -1,12 +1,6 @@ import _ from 'lodash'; -import { - IBoxBounds, - IPoint, - rectangleDistance, - rectangleIntersectArea, - solveOverlapsInIntervalArray, - Vector2D, -} from './designerMath'; +import type { IBoxBounds, IPoint } from './designerMath'; +import { rectangleDistance, rectangleIntersectArea, solveOverlapsInIntervalArray, Vector2D } from './designerMath'; import { union, intersection } from 'interval-operations'; const MIN_NODE_DISTANCE = 50; diff --git a/packages/web/src/formview/ChangeSetFormer.ts b/packages/web/src/formview/ChangeSetFormer.ts index 7b640e8d..d107c70e 100644 --- a/packages/web/src/formview/ChangeSetFormer.ts +++ b/packages/web/src/formview/ChangeSetFormer.ts @@ -1,5 +1,5 @@ +import type { ChangeSet, ChangeSetRowDefinition } from 'dbgate-datalib'; import { - ChangeSet, changeSetContainsChanges, changeSetInsertNewRow, createChangeSet, @@ -9,7 +9,6 @@ import { TableFormViewDisplay, revertChangeSetRowChanges, setChangeSetValue, - ChangeSetRowDefinition, } from 'dbgate-datalib'; import Former from './Former'; diff --git a/packages/web/src/freetable/FreeTableGrider.ts b/packages/web/src/freetable/FreeTableGrider.ts index e209b76a..2f31cdaa 100644 --- a/packages/web/src/freetable/FreeTableGrider.ts +++ b/packages/web/src/freetable/FreeTableGrider.ts @@ -1,5 +1,5 @@ -import { FreeTableModel } from 'dbgate-datalib'; -import Grider, { GriderRowStatus } from '../datagrid/Grider'; +import type { FreeTableModel } from 'dbgate-datalib'; +import Grider from '../datagrid/Grider'; export default class FreeTableGrider extends Grider { public model: FreeTableModel; diff --git a/packages/web/src/freetable/MacroPreviewGrider.ts b/packages/web/src/freetable/MacroPreviewGrider.ts index 6503dc09..aa640fd6 100644 --- a/packages/web/src/freetable/MacroPreviewGrider.ts +++ b/packages/web/src/freetable/MacroPreviewGrider.ts @@ -1,5 +1,7 @@ -import { FreeTableModel, MacroDefinition, MacroSelectedCell, runMacro } from 'dbgate-datalib'; -import Grider, { GriderRowStatus } from '../datagrid/Grider'; +import type { FreeTableModel, MacroDefinition, MacroSelectedCell } from 'dbgate-datalib'; +import { runMacro } from 'dbgate-datalib'; +import Grider from '../datagrid/Grider'; +import type { GriderRowStatus } from '../datagrid/Grider'; import _ from 'lodash'; function convertToSet(row, field) { diff --git a/packages/web/src/perspectives/CustomJoinModal.svelte b/packages/web/src/perspectives/CustomJoinModal.svelte index 9d4170f9..d1415ef8 100644 --- a/packages/web/src/perspectives/CustomJoinModal.svelte +++ b/packages/web/src/perspectives/CustomJoinModal.svelte @@ -16,13 +16,8 @@ useViewInfo, } from '../utility/metadataLoaders'; import { onMount, tick } from 'svelte'; - import { - ChangePerspectiveConfigFunc, - createPerspectiveNodeConfig, - PerspectiveConfig, - PerspectiveCustomJoinConfig, - PerspectiveTreeNode, - } from 'dbgate-datalib'; + import { createPerspectiveNodeConfig, PerspectiveTreeNode } from 'dbgate-datalib'; + import type { ChangePerspectiveConfigFunc, PerspectiveConfig, PerspectiveCustomJoinConfig } from 'dbgate-datalib'; import getConnectionLabel from '../utility/getConnectionLabel'; import uuidv1 from 'uuid/v1'; import TextField from '../forms/TextField.svelte'; diff --git a/packages/web/src/perspectives/PerspectiveDesigner.svelte b/packages/web/src/perspectives/PerspectiveDesigner.svelte index c73a3a55..4731813f 100644 --- a/packages/web/src/perspectives/PerspectiveDesigner.svelte +++ b/packages/web/src/perspectives/PerspectiveDesigner.svelte @@ -1,13 +1,11 @@