mirror of
https://github.com/h-sphere/sql-seal.git
synced 2026-07-22 10:10:28 +00:00
chore: typecheck fixes
This commit is contained in:
parent
346e358863
commit
fde71f2d73
4 changed files with 12 additions and 16 deletions
|
|
@ -1,6 +1,8 @@
|
|||
import { TFile } from "obsidian";
|
||||
import { MemoryDatabase } from "./memoryDatabase";
|
||||
// @ts-ignore
|
||||
import wasmBinary from '../../../../node_modules/@jlongster/sql.js/dist/sql-wasm.wasm'
|
||||
// @ts-ignore
|
||||
import initSqlJs from '@jlongster/sql.js';
|
||||
|
||||
export class DatabaseManager {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,8 @@ export const explorer = buildContainer((c) =>
|
|||
rendererRegistry: RendererRegistry,
|
||||
plugin: Plugin,
|
||||
viewPluginGenerator: ViewPluginGeneratorType
|
||||
}>(),
|
||||
}>()
|
||||
.exports('init'),
|
||||
);
|
||||
|
||||
export type ExplorerModule = typeof explorer;
|
||||
|
|
|
|||
|
|
@ -49,16 +49,6 @@ export class SchemaVisualiser {
|
|||
stroke: '#666',
|
||||
fill: '#f9f9f9',
|
||||
fontSize: 12,
|
||||
// Relationship line styling
|
||||
relationshipLabelColor: '#333',
|
||||
relationshipLabelBackground: '#fff',
|
||||
relationshipLabelBorder: '#666',
|
||||
// Make relationships more visible
|
||||
primaryColor: '#4a90e2',
|
||||
primaryTextColor: '#333',
|
||||
primaryBorderColor: '#666',
|
||||
lineColor: '#666',
|
||||
arrowheadColor: '#666',
|
||||
// Force full width usage
|
||||
useMaxWidth: true
|
||||
},
|
||||
|
|
|
|||
|
|
@ -175,12 +175,15 @@ class UIBuilder {
|
|||
createInputSection(container: HTMLElement, currentPath: string, isDisabled: boolean): HTMLInputElement {
|
||||
const inputSection = container.createDiv({ cls: 'sqlseal-json-input-section' });
|
||||
inputSection.createEl('label', { text: 'JSONPath Query:' });
|
||||
return inputSection.createEl('input', {
|
||||
const input = inputSection.createEl('input', {
|
||||
type: 'text',
|
||||
value: currentPath,
|
||||
placeholder: '$.users[*] or $.data.items[?(@.active)]',
|
||||
disabled: isDisabled
|
||||
placeholder: '$.users[*] or $.data.items[?(@.active)]'
|
||||
});
|
||||
if (isDisabled) {
|
||||
input.disabled = true;
|
||||
}
|
||||
return input;
|
||||
}
|
||||
|
||||
createContentPanels(container: HTMLElement): {
|
||||
|
|
@ -198,7 +201,7 @@ class UIBuilder {
|
|||
return { jsonContainer, tableContainer };
|
||||
}
|
||||
|
||||
createGenerateCodeButton(container: HTMLElement, onGenerate: () => void): HTMLElement {
|
||||
createGenerateCodeButton(container: HTMLElement, onGenerate: () => void): HTMLButtonElement {
|
||||
const buttonContainer = container.createDiv({ cls: 'sqlseal-button-container' });
|
||||
|
||||
const buttonComponent = new ButtonComponent(buttonContainer);
|
||||
|
|
@ -340,7 +343,7 @@ export class JsonView extends TextFileView {
|
|||
}
|
||||
|
||||
this.generateCodeButton = this.uiBuilder.createGenerateCodeButton(mainContainer, () => this.generateSQLSealCode());
|
||||
if (this.isLargeFile && !this.isAnalyzed) {
|
||||
if (this.isLargeFile && !this.isAnalyzed && this.generateCodeButton) {
|
||||
this.generateCodeButton.style.display = 'none';
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue