diff --git a/packages/datalib/src/ChangeSet.ts b/packages/datalib/src/ChangeSet.ts index ebf95b38..2e38d62b 100644 --- a/packages/datalib/src/ChangeSet.ts +++ b/packages/datalib/src/ChangeSet.ts @@ -9,7 +9,7 @@ import { AllowIdentityInsert, Expression, } from 'dbgate-sqltree'; -import { NamedObjectInfo, DatabaseInfo } from 'dbgate-types'; +import type { NamedObjectInfo, DatabaseInfo } from 'dbgate-types'; export interface ChangeSetItem { pureName: string; diff --git a/packages/datalib/src/CollectionGridDisplay.ts b/packages/datalib/src/CollectionGridDisplay.ts index a70c2096..6af931bb 100644 --- a/packages/datalib/src/CollectionGridDisplay.ts +++ b/packages/datalib/src/CollectionGridDisplay.ts @@ -1,6 +1,6 @@ import _ from 'lodash'; import { GridDisplay, ChangeCacheFunc, ChangeConfigFunc, DisplayColumn } from './GridDisplay'; -import { EngineDriver, ViewInfo, ColumnInfo, CollectionInfo } from 'dbgate-types'; +import type { EngineDriver, ViewInfo, ColumnInfo, CollectionInfo } from 'dbgate-types'; import { GridConfig, GridCache } from './GridConfig'; function getObjectKeys(obj) { diff --git a/packages/datalib/src/FormViewDisplay.ts b/packages/datalib/src/FormViewDisplay.ts index 20a372a1..4bba3c55 100644 --- a/packages/datalib/src/FormViewDisplay.ts +++ b/packages/datalib/src/FormViewDisplay.ts @@ -1,6 +1,6 @@ import _ from 'lodash'; import { GridConfig, GridCache, GridConfigColumns, createGridCache, GroupFunc } from './GridConfig'; -import { TableInfo, EngineDriver, DatabaseInfo, SqlDialect } from 'dbgate-types'; +import type { TableInfo, EngineDriver, DatabaseInfo, SqlDialect } from 'dbgate-types'; import { getFilterValueExpression } from 'dbgate-filterparser'; import { ChangeCacheFunc, ChangeConfigFunc, DisplayColumn } from './GridDisplay'; diff --git a/packages/datalib/src/FreeTableGridDisplay.ts b/packages/datalib/src/FreeTableGridDisplay.ts index f636fcf8..607abf4e 100644 --- a/packages/datalib/src/FreeTableGridDisplay.ts +++ b/packages/datalib/src/FreeTableGridDisplay.ts @@ -1,5 +1,5 @@ import _ from 'lodash'; -import { EngineDriver, ViewInfo, ColumnInfo } from 'dbgate-types'; +import type { EngineDriver, ViewInfo, ColumnInfo } from 'dbgate-types'; import { GridDisplay, ChangeCacheFunc, ChangeConfigFunc } from './GridDisplay'; import { GridConfig, GridCache } from './GridConfig'; import { FreeTableModel } from './FreeTableModel'; diff --git a/packages/datalib/src/FreeTableModel.ts b/packages/datalib/src/FreeTableModel.ts index e5cce2f7..616e0c8e 100644 --- a/packages/datalib/src/FreeTableModel.ts +++ b/packages/datalib/src/FreeTableModel.ts @@ -1,4 +1,4 @@ -import { TableInfo } from 'dbgate-types'; +import type { TableInfo } from 'dbgate-types'; export interface FreeTableModel { structure: TableInfo; diff --git a/packages/datalib/src/GridConfig.ts b/packages/datalib/src/GridConfig.ts index d38a468c..c6c7fd5e 100644 --- a/packages/datalib/src/GridConfig.ts +++ b/packages/datalib/src/GridConfig.ts @@ -1,6 +1,3 @@ -import { DisplayColumn } from './GridDisplay'; -import { TableInfo } from 'dbgate-types'; - export interface GridConfigColumns { hiddenColumns: string[]; expandedColumns: string[]; diff --git a/packages/datalib/src/GridDisplay.ts b/packages/datalib/src/GridDisplay.ts index b04f1783..7ac527d6 100644 --- a/packages/datalib/src/GridDisplay.ts +++ b/packages/datalib/src/GridDisplay.ts @@ -1,6 +1,6 @@ import _ from 'lodash'; import { GridConfig, GridCache, GridConfigColumns, createGridCache, GroupFunc, createGridConfig } from './GridConfig'; -import { +import type { ForeignKeyInfo, TableInfo, ColumnInfo, diff --git a/packages/datalib/src/JslGridDisplay.ts b/packages/datalib/src/JslGridDisplay.ts index 323f0175..698520b9 100644 --- a/packages/datalib/src/JslGridDisplay.ts +++ b/packages/datalib/src/JslGridDisplay.ts @@ -1,6 +1,5 @@ import _ from 'lodash'; import { GridDisplay, ChangeCacheFunc, ChangeConfigFunc } from './GridDisplay'; -import { QueryResultColumn } from 'dbgate-types'; import { GridConfig, GridCache } from './GridConfig'; import { analyseCollectionDisplayColumns } from './CollectionGridDisplay'; diff --git a/packages/datalib/src/PerspectiveCache.ts b/packages/datalib/src/PerspectiveCache.ts index e706b8ae..00ef68cd 100644 --- a/packages/datalib/src/PerspectiveCache.ts +++ b/packages/datalib/src/PerspectiveCache.ts @@ -1,4 +1,3 @@ -import { RangeDefinition } from 'dbgate-types'; import { PerspectiveDataLoadProps } from './PerspectiveDataProvider'; import _pick from 'lodash/pick'; import _zip from 'lodash/zip'; diff --git a/packages/datalib/src/PerspectiveConfig.ts b/packages/datalib/src/PerspectiveConfig.ts index d7af928f..fd80d83b 100644 --- a/packages/datalib/src/PerspectiveConfig.ts +++ b/packages/datalib/src/PerspectiveConfig.ts @@ -1,4 +1,4 @@ -import { DatabaseInfo, ForeignKeyInfo, NamedObjectInfo, TableInfo } from 'dbgate-types'; +import type { DatabaseInfo, ForeignKeyInfo, NamedObjectInfo, TableInfo } from 'dbgate-types'; import uuidv1 from 'uuid/v1'; // export interface PerspectiveConfigColumns { diff --git a/packages/datalib/src/PerspectiveDataProvider.ts b/packages/datalib/src/PerspectiveDataProvider.ts index 5c471c55..130f12d6 100644 --- a/packages/datalib/src/PerspectiveDataProvider.ts +++ b/packages/datalib/src/PerspectiveDataProvider.ts @@ -1,6 +1,6 @@ import debug from 'debug'; import { Condition } from 'dbgate-sqltree'; -import { RangeDefinition } from 'dbgate-types'; +import type { RangeDefinition } from 'dbgate-types'; import { PerspectiveBindingGroup, PerspectiveCache } from './PerspectiveCache'; import { PerspectiveDataLoader } from './PerspectiveDataLoader'; import { PerspectiveDataPatternDict } from './PerspectiveDataPattern'; diff --git a/packages/datalib/src/PerspectiveTreeNode.ts b/packages/datalib/src/PerspectiveTreeNode.ts index 4518c149..7774d73d 100644 --- a/packages/datalib/src/PerspectiveTreeNode.ts +++ b/packages/datalib/src/PerspectiveTreeNode.ts @@ -1,4 +1,4 @@ -import { +import type { CollectionInfo, ColumnInfo, DatabaseInfo, diff --git a/packages/datalib/src/TableFormViewDisplay.ts b/packages/datalib/src/TableFormViewDisplay.ts index ca1cfd3b..9502b85b 100644 --- a/packages/datalib/src/TableFormViewDisplay.ts +++ b/packages/datalib/src/TableFormViewDisplay.ts @@ -1,7 +1,7 @@ import { FormViewDisplay } from './FormViewDisplay'; import _ from 'lodash'; import { ChangeCacheFunc, DisplayColumn, ChangeConfigFunc } from './GridDisplay'; -import { EngineDriver, NamedObjectInfo, DatabaseInfo } from 'dbgate-types'; +import type { EngineDriver, NamedObjectInfo, DatabaseInfo } from 'dbgate-types'; import { GridConfig, GridCache } from './GridConfig'; import { mergeConditions, Condition, OrderByExpression } from 'dbgate-sqltree'; import { TableGridDisplay } from './TableGridDisplay'; diff --git a/packages/datalib/src/TableGridDisplay.ts b/packages/datalib/src/TableGridDisplay.ts index 9252c5ab..9896380e 100644 --- a/packages/datalib/src/TableGridDisplay.ts +++ b/packages/datalib/src/TableGridDisplay.ts @@ -1,7 +1,7 @@ import _ from 'lodash'; import { filterName, isTableColumnUnique } from 'dbgate-tools'; import { GridDisplay, ChangeCacheFunc, DisplayColumn, DisplayedColumnInfo, ChangeConfigFunc } from './GridDisplay'; -import { +import type { TableInfo, EngineDriver, ViewInfo, diff --git a/packages/datalib/src/ViewGridDisplay.ts b/packages/datalib/src/ViewGridDisplay.ts index 82d73505..40515db0 100644 --- a/packages/datalib/src/ViewGridDisplay.ts +++ b/packages/datalib/src/ViewGridDisplay.ts @@ -1,6 +1,6 @@ import _ from 'lodash'; import { GridDisplay, ChangeCacheFunc, ChangeConfigFunc } from './GridDisplay'; -import { EngineDriver, ViewInfo, ColumnInfo } from 'dbgate-types'; +import type { EngineDriver, ViewInfo, ColumnInfo } from 'dbgate-types'; import { GridConfig, GridCache } from './GridConfig'; export class ViewGridDisplay extends GridDisplay { diff --git a/packages/datalib/src/deleteCascade.ts b/packages/datalib/src/deleteCascade.ts index 77415f3a..973d5772 100644 --- a/packages/datalib/src/deleteCascade.ts +++ b/packages/datalib/src/deleteCascade.ts @@ -1,6 +1,6 @@ import _ from 'lodash'; import { Command, Insert, Update, Delete, UpdateField, Condition, AllowIdentityInsert } from 'dbgate-sqltree'; -import { NamedObjectInfo, DatabaseInfo, ForeignKeyInfo, TableInfo } from 'dbgate-types'; +import type { NamedObjectInfo, DatabaseInfo, ForeignKeyInfo, TableInfo } from 'dbgate-types'; import { ChangeSet, ChangeSetItem, extractChangeSetCondition } from './ChangeSet'; export interface ChangeSetDeleteCascade { diff --git a/packages/datalib/src/processPerspectiveDefaultColunns.ts b/packages/datalib/src/processPerspectiveDefaultColunns.ts index 2e106acf..564d2da0 100644 --- a/packages/datalib/src/processPerspectiveDefaultColunns.ts +++ b/packages/datalib/src/processPerspectiveDefaultColunns.ts @@ -1,5 +1,5 @@ import { findForeignKeyForColumn } from 'dbgate-tools'; -import { DatabaseInfo, TableInfo, ViewInfo } from 'dbgate-types'; +import type { DatabaseInfo, TableInfo, ViewInfo } from 'dbgate-types'; import { createPerspectiveNodeConfig, MultipleDatabaseInfo, PerspectiveConfig } from './PerspectiveConfig'; import { PerspectiveDataPattern, PerspectiveDataPatternDict } from './PerspectiveDataPattern'; import { PerspectiveTableNode } from './PerspectiveTreeNode'; diff --git a/packages/datalib/src/tests/chinookDbInfo.ts b/packages/datalib/src/tests/chinookDbInfo.ts index 20fbbb78..b36a8cda 100644 --- a/packages/datalib/src/tests/chinookDbInfo.ts +++ b/packages/datalib/src/tests/chinookDbInfo.ts @@ -1,4 +1,4 @@ -import { DatabaseInfo } from 'dbgate-types'; +import type { DatabaseInfo } from 'dbgate-types'; export const chinookDbInfo: DatabaseInfo = { tables: [ diff --git a/packages/filterparser/src/datetimeParser.ts b/packages/filterparser/src/datetimeParser.ts index 22d0dd68..d4355122 100644 --- a/packages/filterparser/src/datetimeParser.ts +++ b/packages/filterparser/src/datetimeParser.ts @@ -2,7 +2,7 @@ import P from 'parsimmon'; import moment from 'moment'; import { FilterType } from './types'; import { Condition } from 'dbgate-sqltree'; -import { TransformType } from 'dbgate-types'; +import type { TransformType } from 'dbgate-types'; import { interpretEscapes, token, word, whitespace } from './common'; const compoudCondition = conditionType => conditions => { diff --git a/packages/filterparser/src/parseFilter.ts b/packages/filterparser/src/parseFilter.ts index 35cb8fa4..65c2b988 100644 --- a/packages/filterparser/src/parseFilter.ts +++ b/packages/filterparser/src/parseFilter.ts @@ -2,7 +2,6 @@ import P from 'parsimmon'; import moment from 'moment'; import { FilterType } from './types'; import { Condition } from 'dbgate-sqltree'; -import { TransformType } from 'dbgate-types'; import { interpretEscapes, token, word, whitespace } from './common'; import { mongoParser } from './mongoParser'; import { datetimeParser } from './datetimeParser'; diff --git a/packages/sqltree/src/dumpSqlCommand.ts b/packages/sqltree/src/dumpSqlCommand.ts index ea7fa3ab..9a7ea6fe 100644 --- a/packages/sqltree/src/dumpSqlCommand.ts +++ b/packages/sqltree/src/dumpSqlCommand.ts @@ -1,4 +1,4 @@ -import { SqlDumper } from 'dbgate-types'; +import type { SqlDumper } from 'dbgate-types'; import { Command, Select, Update, Delete, Insert } from './types'; import { dumpSqlExpression } from './dumpSqlExpression'; import { dumpSqlFromDefinition, dumpSqlSourceRef } from './dumpSqlSource'; diff --git a/packages/sqltree/src/dumpSqlCondition.ts b/packages/sqltree/src/dumpSqlCondition.ts index ea2abc44..a95fa86f 100644 --- a/packages/sqltree/src/dumpSqlCondition.ts +++ b/packages/sqltree/src/dumpSqlCondition.ts @@ -1,4 +1,4 @@ -import { SqlDumper } from 'dbgate-types'; +import type { SqlDumper } from 'dbgate-types'; import { Condition, BinaryCondition } from './types'; import { dumpSqlExpression } from './dumpSqlExpression'; import { dumpSqlSelect } from './dumpSqlCommand'; diff --git a/packages/sqltree/src/dumpSqlExpression.ts b/packages/sqltree/src/dumpSqlExpression.ts index 7cd279a2..4772a4bd 100644 --- a/packages/sqltree/src/dumpSqlExpression.ts +++ b/packages/sqltree/src/dumpSqlExpression.ts @@ -1,5 +1,5 @@ import _ from 'lodash'; -import { SqlDumper } from 'dbgate-types'; +import type { SqlDumper } from 'dbgate-types'; import { Expression, ColumnRefExpression } from './types'; import { dumpSqlSourceRef } from './dumpSqlSource'; diff --git a/packages/sqltree/src/dumpSqlSource.ts b/packages/sqltree/src/dumpSqlSource.ts index e13dc1f2..0c5d4663 100644 --- a/packages/sqltree/src/dumpSqlSource.ts +++ b/packages/sqltree/src/dumpSqlSource.ts @@ -1,5 +1,5 @@ import { Source, FromDefinition, Relation } from './types'; -import { SqlDumper } from 'dbgate-types'; +import type { SqlDumper } from 'dbgate-types'; import { dumpSqlSelect } from './dumpSqlCommand'; import { dumpSqlCondition } from './dumpSqlCondition'; diff --git a/packages/sqltree/src/evaluateCondition.ts b/packages/sqltree/src/evaluateCondition.ts index 944c3ef8..f615af4e 100644 --- a/packages/sqltree/src/evaluateCondition.ts +++ b/packages/sqltree/src/evaluateCondition.ts @@ -1,10 +1,6 @@ -import { SqlDumper } from 'dbgate-types'; import _ from 'lodash'; import { Condition, BinaryCondition } from './types'; -import { dumpSqlExpression } from './dumpSqlExpression'; -import { link } from 'fs'; import { evaluateExpression } from './evaluateExpression'; -import { cond } from 'lodash'; function isEmpty(value) { if (value == null) return true; diff --git a/packages/sqltree/src/types.ts b/packages/sqltree/src/types.ts index 07e9e4b0..3e3e45a1 100644 --- a/packages/sqltree/src/types.ts +++ b/packages/sqltree/src/types.ts @@ -1,4 +1,4 @@ -import { NamedObjectInfo, RangeDefinition, TransformType } from 'dbgate-types'; +import type { NamedObjectInfo, RangeDefinition, TransformType } from 'dbgate-types'; // export interface Command { // } diff --git a/packages/sqltree/src/utility.ts b/packages/sqltree/src/utility.ts index 39301a9e..ccab90e8 100644 --- a/packages/sqltree/src/utility.ts +++ b/packages/sqltree/src/utility.ts @@ -1,4 +1,4 @@ -import { EngineDriver, SqlDumper } from 'dbgate-types'; +import type { EngineDriver, SqlDumper } from 'dbgate-types'; import { Command, Condition } from './types'; import { dumpSqlCommand } from './dumpSqlCommand'; diff --git a/packages/tools/src/SqlDumper.ts b/packages/tools/src/SqlDumper.ts index c8bb5c6a..82af25c6 100644 --- a/packages/tools/src/SqlDumper.ts +++ b/packages/tools/src/SqlDumper.ts @@ -1,5 +1,5 @@ import _ from 'lodash'; -import { +import type { ColumnInfo, ConstraintInfo, EngineDriver, diff --git a/packages/tools/src/SqlGenerator.ts b/packages/tools/src/SqlGenerator.ts index 48b0d103..edcefa6b 100644 --- a/packages/tools/src/SqlGenerator.ts +++ b/packages/tools/src/SqlGenerator.ts @@ -1,4 +1,4 @@ -import { +import type { DatabaseInfo, EngineDriver, FunctionInfo, diff --git a/packages/tools/src/computeDiffRows.ts b/packages/tools/src/computeDiffRows.ts index a5c64b48..a1fa836a 100644 --- a/packages/tools/src/computeDiffRows.ts +++ b/packages/tools/src/computeDiffRows.ts @@ -1,5 +1,5 @@ import { DbDiffOptions, testEqualColumns, testEqualTables, testEqualSqlObjects } from './diffTools'; -import { DatabaseInfo, EngineDriver, SqlObjectInfo, TableInfo } from 'dbgate-types'; +import type { DatabaseInfo, EngineDriver, SqlObjectInfo, TableInfo } from 'dbgate-types'; import _ from 'lodash'; export function computeDiffRowsCore(sourceList, targetList, testEqual) { diff --git a/packages/tools/src/createBulkInsertStreamBase.ts b/packages/tools/src/createBulkInsertStreamBase.ts index 01f8b1b2..9a881222 100644 --- a/packages/tools/src/createBulkInsertStreamBase.ts +++ b/packages/tools/src/createBulkInsertStreamBase.ts @@ -1,4 +1,3 @@ -import { EngineDriver } from 'dbgate-types'; import _intersection from 'lodash/intersection'; import { prepareTableForImport } from './tableTransforms'; diff --git a/packages/tools/src/diffTools.ts b/packages/tools/src/diffTools.ts index c7f19d3f..f3b7fb33 100644 --- a/packages/tools/src/diffTools.ts +++ b/packages/tools/src/diffTools.ts @@ -1,4 +1,4 @@ -import { +import type { ColumnInfo, ConstraintInfo, DatabaseInfo, diff --git a/packages/tools/src/nameTools.ts b/packages/tools/src/nameTools.ts index 14e2b896..617481a3 100644 --- a/packages/tools/src/nameTools.ts +++ b/packages/tools/src/nameTools.ts @@ -1,6 +1,6 @@ import _cloneDeep from 'lodash/cloneDeep'; import _isString from 'lodash/isString'; -import { +import type { ColumnInfo, ColumnReference, DatabaseInfo, diff --git a/packages/tools/src/packageTools.ts b/packages/tools/src/packageTools.ts index 5e204712..76c3897a 100644 --- a/packages/tools/src/packageTools.ts +++ b/packages/tools/src/packageTools.ts @@ -1,4 +1,4 @@ -import { EngineDriver, ExtensionsDirectory } from 'dbgate-types'; +import type { EngineDriver, ExtensionsDirectory } from 'dbgate-types'; import _camelCase from 'lodash/camelCase'; import _isString from 'lodash/isString'; import _isPlainObject from 'lodash/isPlainObject'; diff --git a/packages/tools/src/preloadedRowsTools.ts b/packages/tools/src/preloadedRowsTools.ts index d0be3806..09c2e083 100644 --- a/packages/tools/src/preloadedRowsTools.ts +++ b/packages/tools/src/preloadedRowsTools.ts @@ -1,5 +1,5 @@ import _ from 'lodash'; -import { DatabaseInfo, EngineDriver } from 'dbgate-types'; +import type { DatabaseInfo, EngineDriver } from 'dbgate-types'; export async function enrichWithPreloadedRows( dbModel: DatabaseInfo, diff --git a/packages/tools/src/schemaEditorTools.ts b/packages/tools/src/schemaEditorTools.ts index c67c3d2d..5c5c9265 100644 --- a/packages/tools/src/schemaEditorTools.ts +++ b/packages/tools/src/schemaEditorTools.ts @@ -1,6 +1,6 @@ import uuidv1 from 'uuid/v1'; import _omit from 'lodash/omit'; -import { +import type { ColumnInfo, ConstraintInfo, ForeignKeyInfo, diff --git a/packages/tools/src/structureTools.ts b/packages/tools/src/structureTools.ts index 660c5779..42b0ffbc 100644 --- a/packages/tools/src/structureTools.ts +++ b/packages/tools/src/structureTools.ts @@ -1,4 +1,4 @@ -import { DatabaseInfo, TableInfo, ApplicationDefinition, ViewInfo, CollectionInfo } from 'dbgate-types'; +import type { DatabaseInfo, TableInfo, ApplicationDefinition, ViewInfo, CollectionInfo } from 'dbgate-types'; import _flatten from 'lodash/flatten'; export function addTableDependencies(db: DatabaseInfo): DatabaseInfo { diff --git a/packages/tools/src/tableTransforms.ts b/packages/tools/src/tableTransforms.ts index 54f46ed0..d53c3857 100644 --- a/packages/tools/src/tableTransforms.ts +++ b/packages/tools/src/tableTransforms.ts @@ -1,4 +1,4 @@ -import { TableInfo } from 'dbgate-types'; +import type { TableInfo } from 'dbgate-types'; import _cloneDeep from 'lodash/cloneDeep'; import _fromPairs from 'lodash/fromPairs'; import _get from 'lodash/get'; diff --git a/packages/web/src/Screen.svelte b/packages/web/src/Screen.svelte index 7db86775..1ca9ed53 100644 --- a/packages/web/src/Screen.svelte +++ b/packages/web/src/Screen.svelte @@ -29,7 +29,7 @@ $: currentThemeType = $currentThemeDefinition?.themeType == 'dark' ? 'theme-type-dark' : 'theme-type-light'; - $: themeStyle = ``; + $: themeStyle = `${$currentThemeDefinition?.themeCss}`; const isElectron = !!getElectron(); diff --git a/packages/web/src/appobj/AppFileAppObject.svelte b/packages/web/src/appobj/AppFileAppObject.svelte index 7a70039f..c51176f6 100644 --- a/packages/web/src/appobj/AppFileAppObject.svelte +++ b/packages/web/src/appobj/AppFileAppObject.svelte @@ -16,7 +16,7 @@ tabComponent, tooltip, props: { - savedFile:fileName + '.' + fileType, + savedFile: fileName + '.' + fileType, savedFolder: 'app:' + folderName, savedFormat: 'text', appFolder: folderName, @@ -28,7 +28,10 @@ } export const extractKey = data => data.fileName; - export const createMatcher = ({ fileName }) => filter => filterName(filter, fileName); + export const createMatcher = + ({ fileName }) => + filter => + filterName(filter, fileName); const APP_ICONS = { 'config.json': 'img json', 'command.sql': 'img app-command', @@ -50,7 +53,6 @@ import InputTextModal from '../modals/InputTextModal.svelte'; import ConfirmModal from '../modals/ConfirmModal.svelte'; import { apiCall } from '../utility/api'; - import { currentDatabase, currentDatabase } from '../stores'; export let data; diff --git a/packages/web/src/charts/chartDataLoader.ts b/packages/web/src/charts/chartDataLoader.ts index 49534e2d..440b8c95 100644 --- a/packages/web/src/charts/chartDataLoader.ts +++ b/packages/web/src/charts/chartDataLoader.ts @@ -1,5 +1,5 @@ -import { dumpSqlSelect, Select } from 'dbgate-sqltree'; -import { EngineDriver } from 'dbgate-types'; +import type { Select } from 'dbgate-sqltree'; +import type { EngineDriver } from 'dbgate-types'; import _ from 'lodash'; import { apiCall } from '../utility/api'; diff --git a/packages/web/src/commands/invalidateCommands.ts b/packages/web/src/commands/invalidateCommands.ts index f6fcd630..2898bbed 100644 --- a/packages/web/src/commands/invalidateCommands.ts +++ b/packages/web/src/commands/invalidateCommands.ts @@ -1,6 +1,6 @@ import { tick } from 'svelte'; import { commands } from '../stores'; -import { GlobalCommand } from './registerCommand'; +import type { GlobalCommand } from './registerCommand'; let isInvalidated = false; diff --git a/packages/web/src/designer/DesignerComponentCreator.ts b/packages/web/src/designer/DesignerComponentCreator.ts index 0f4ad809..73714932 100644 --- a/packages/web/src/designer/DesignerComponentCreator.ts +++ b/packages/web/src/designer/DesignerComponentCreator.ts @@ -1,7 +1,5 @@ import _ from 'lodash'; -import { dumpSqlSelect, Select, JoinType, Condition, Relation, mergeConditions, Source } from 'dbgate-sqltree'; -import { EngineDriver } from 'dbgate-types'; -import { DesignerInfo, DesignerTableInfo, DesignerReferenceInfo, DesignerJoinType } from './types'; +import type { DesignerInfo, DesignerTableInfo, DesignerReferenceInfo, DesignerJoinType } from './types'; import { findPrimaryTable, findConnectingReference, referenceIsJoin, referenceIsExists } from './designerTools'; export class DesignerComponent { diff --git a/packages/web/src/designer/DesignerQueryDumper.ts b/packages/web/src/designer/DesignerQueryDumper.ts index c1930861..e4f7e026 100644 --- a/packages/web/src/designer/DesignerQueryDumper.ts +++ b/packages/web/src/designer/DesignerQueryDumper.ts @@ -10,7 +10,6 @@ import { ResultField, Expression, } from 'dbgate-sqltree'; -import { EngineDriver } from 'dbgate-types'; import { DesignerInfo, DesignerTableInfo, DesignerReferenceInfo, DesignerJoinType } from './types'; import { DesignerComponent } from './DesignerComponentCreator'; import { diff --git a/packages/web/src/designer/designerTools.ts b/packages/web/src/designer/designerTools.ts index a1170715..215744e7 100644 --- a/packages/web/src/designer/designerTools.ts +++ b/packages/web/src/designer/designerTools.ts @@ -1,7 +1,8 @@ import _ from 'lodash'; -import { dumpSqlSelect, Select, JoinType, Condition, Relation, mergeConditions, Source } from 'dbgate-sqltree'; -import { EngineDriver } from 'dbgate-types'; -import { DesignerInfo, DesignerTableInfo, DesignerReferenceInfo, DesignerJoinType } from './types'; +import type { Select, Condition, Source } from 'dbgate-sqltree'; +import { dumpSqlSelect, mergeConditions } from 'dbgate-sqltree'; +import type { EngineDriver } from 'dbgate-types'; +import type { DesignerInfo, DesignerTableInfo, DesignerReferenceInfo, DesignerJoinType } from './types'; import { DesignerComponentCreator } from './DesignerComponentCreator'; import { DesignerQueryDumper } from './DesignerQueryDumper'; import { getFilterType } from 'dbgate-filterparser'; diff --git a/packages/web/src/designer/types.ts b/packages/web/src/designer/types.ts index d42f2e07..7e835ef7 100644 --- a/packages/web/src/designer/types.ts +++ b/packages/web/src/designer/types.ts @@ -1,5 +1,5 @@ -import { JoinType } from 'dbgate-sqltree'; -import { TableInfo } from 'dbgate-types'; +import type { JoinType } from 'dbgate-sqltree'; +import type { TableInfo } from 'dbgate-types'; export type DesignerTableInfo = TableInfo & { designerId: string; diff --git a/packages/web/src/perspectives/PerspectiveCell.svelte b/packages/web/src/perspectives/PerspectiveCell.svelte index b95168b7..712f2c94 100644 --- a/packages/web/src/perspectives/PerspectiveCell.svelte +++ b/packages/web/src/perspectives/PerspectiveCell.svelte @@ -23,7 +23,7 @@ {:else} (no image) {/if} - {:else if !value.$oid && (_.isArray(value) || _.isPlainObject(value))} + {:else if !value?.$oid && (_.isArray(value) || _.isPlainObject(value))} {:else} diff --git a/packages/web/src/perspectives/PerspectiveDesigner.svelte b/packages/web/src/perspectives/PerspectiveDesigner.svelte index 7fb2fd62..c73a3a55 100644 --- a/packages/web/src/perspectives/PerspectiveDesigner.svelte +++ b/packages/web/src/perspectives/PerspectiveDesigner.svelte @@ -8,7 +8,7 @@ PerspectiveTreeNode, switchPerspectiveReferenceDirection, } from 'dbgate-datalib'; - import { CollectionInfo } from 'dbgate-types'; + import type { CollectionInfo } from 'dbgate-types'; import _ from 'lodash'; import { tick } from 'svelte'; import runCommand from '../commands/runCommand'; diff --git a/packages/web/src/plugins/fileformats.ts b/packages/web/src/plugins/fileformats.ts index f6a1c7b3..a65aef9d 100644 --- a/packages/web/src/plugins/fileformats.ts +++ b/packages/web/src/plugins/fileformats.ts @@ -1,4 +1,4 @@ -import { FileFormatDefinition, QuickExportDefinition } from 'dbgate-types'; +import type { FileFormatDefinition, QuickExportDefinition } from 'dbgate-types'; const jsonlFormat = { storageType: 'jsonl', diff --git a/packages/web/src/settings/ThemeSkeleton.svelte b/packages/web/src/settings/ThemeSkeleton.svelte index 43008dc8..a3c1208e 100644 --- a/packages/web/src/settings/ThemeSkeleton.svelte +++ b/packages/web/src/settings/ThemeSkeleton.svelte @@ -1,5 +1,5 @@