Features: - Spreadsheet-like table with cell navigation (arrow keys) - Formula bar for editing cell values - Click and drag cell selection with Shift+Arrow extend - Column resize by dragging header borders, double-click for best fit - Editable headers via double-click - Command palette (Cmd+P) with 12 commands - Copy/Cut/Paste with CSV, Markdown, and Jira formats - Insert rows/columns above/below/left/right - File drag-and-drop to open CSV files - Native Open/Save dialogs - Go backend for CSV parsing, formatting, and file I/O - Vanilla JS frontend, no frameworks Co-authored-by: Shelley <shelley@exe.dev>
38 lines
863 B
TypeScript
Executable file
38 lines
863 B
TypeScript
Executable file
export namespace main {
|
|
|
|
export class CSVData {
|
|
Headers: string[];
|
|
Rows: string[][];
|
|
FilePath: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new CSVData(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.Headers = source["Headers"];
|
|
this.Rows = source["Rows"];
|
|
this.FilePath = source["FilePath"];
|
|
}
|
|
}
|
|
export class Command {
|
|
ID: string;
|
|
Name: string;
|
|
Shortcut: string;
|
|
|
|
static createFrom(source: any = {}) {
|
|
return new Command(source);
|
|
}
|
|
|
|
constructor(source: any = {}) {
|
|
if ('string' === typeof source) source = JSON.parse(source);
|
|
this.ID = source["ID"];
|
|
this.Name = source["Name"];
|
|
this.Shortcut = source["Shortcut"];
|
|
}
|
|
}
|
|
|
|
}
|
|
|