mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 15:56:00 +00:00
import type refactor
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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';
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { tick } from 'svelte';
|
||||
import { commands } from '../stores';
|
||||
import { GlobalCommand } from './registerCommand';
|
||||
import type { GlobalCommand } from './registerCommand';
|
||||
|
||||
let isInvalidated = false;
|
||||
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { FileFormatDefinition, QuickExportDefinition } from 'dbgate-types';
|
||||
import type { FileFormatDefinition, QuickExportDefinition } from 'dbgate-types';
|
||||
|
||||
const jsonlFormat = {
|
||||
storageType: 'jsonl',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { ThemeDefinition } from 'dbgate-types';
|
||||
import type { ThemeDefinition } from 'dbgate-types';
|
||||
import FontIcon from '../icons/FontIcon.svelte';
|
||||
import { currentTheme } from '../stores';
|
||||
import _ from 'lodash';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { writable, derived, readable } from 'svelte/store';
|
||||
import { ExtensionsDirectory } from 'dbgate-types';
|
||||
import type { ExtensionsDirectory } from 'dbgate-types';
|
||||
import invalidateCommands from './commands/invalidateCommands';
|
||||
import getElectron from './utility/getElectron';
|
||||
import { getSettings, useConfig, useSettings } from './utility/metadataLoaders';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { ApplicationDefinition, StoredConnection } from 'dbgate-types';
|
||||
import type { ApplicationDefinition, StoredConnection } from 'dbgate-types';
|
||||
import { apiCall } from '../utility/api';
|
||||
|
||||
export async function saveDbToApp(conid: string, database: string, app: string) {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { QuickExportDefinition } from 'dbgate-types';
|
||||
import type { QuickExportDefinition } from 'dbgate-types';
|
||||
import { getExtensions } from '../stores';
|
||||
|
||||
export function createQuickExportMenuItems(handler: (fmt: QuickExportDefinition) => Function, advancedExportMenuItem) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { DictionaryDescription } from 'dbgate-datalib';
|
||||
import { ApplicationDefinition, TableInfo } from 'dbgate-types';
|
||||
import type { ApplicationDefinition, TableInfo } from 'dbgate-types';
|
||||
import _ from 'lodash';
|
||||
import { apiCall } from './api';
|
||||
import { filterAppsForDatabase, saveDbToApp } from './appTools';
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import _ from 'lodash';
|
||||
import { loadCachedValue, subscribeCacheChange, unsubscribeCacheChange } from './cache';
|
||||
import stableStringify from 'json-stable-stringify';
|
||||
import getAsArray from './getAsArray';
|
||||
import { DatabaseInfo } from 'dbgate-types';
|
||||
import { derived } from 'svelte/store';
|
||||
import { extendDatabaseInfo } from 'dbgate-tools';
|
||||
import { setLocalStorage } from '../utility/storageCache';
|
||||
|
||||
Reference in New Issue
Block a user