mirror of
https://github.com/svm0n/datadeck.git
synced 2026-07-22 08:31:46 +00:00
refactor: rename XLSXCardView → CardView
Class-internal rename. The CARD_VIEW_TYPE string registered with Obsidian is unchanged, so the rename is purely cosmetic from the API's perspective. Sweeps 8 sites: class def + instantiation in main.ts, plus mention-only references in test-plugin-logic.mjs, xlsx-to-csv-roundtrip.mjs, src/mobile-templates.ts, docs/architecture.md, docs/dev-workflow.md. Closes the follow-up flagged in handoff.md after SWITCH TO CSV AS MAIN. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
3b213d0650
commit
ee64788f55
3 changed files with 4 additions and 4 deletions
2
main.js
2
main.js
File diff suppressed because one or more lines are too long
4
main.ts
4
main.ts
|
|
@ -44,7 +44,7 @@ async function loadChart(): Promise<ChartModule> {
|
|||
|
||||
// ─── View ────────────────────────────────────────────────────────────────────
|
||||
|
||||
export class XLSXCardView extends FileView {
|
||||
export class CardView extends FileView {
|
||||
settings: CardViewSettings;
|
||||
headers: string[] = [];
|
||||
rows: CSVRow[] = [];
|
||||
|
|
@ -1784,7 +1784,7 @@ export default class CardViewPlugin extends Plugin {
|
|||
settings: CardViewSettings = DEFAULT_SETTINGS;
|
||||
async onload(): Promise<void> {
|
||||
await this.loadSettings();
|
||||
this.registerView(CARD_VIEW_TYPE, leaf=>new XLSXCardView(leaf, this.settings, () => this.saveSettings()));
|
||||
this.registerView(CARD_VIEW_TYPE, leaf=>new CardView(leaf, this.settings, () => this.saveSettings()));
|
||||
this.registerExtensions(["csv"], CARD_VIEW_TYPE);
|
||||
this.addSettingTab(new CardViewSettingTab(this.app, this));
|
||||
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ function parseCSV(raw) {
|
|||
return { headers, rows };
|
||||
}
|
||||
|
||||
// Simulates resolveCol from XLSXCardView
|
||||
// Simulates resolveCol from CardView
|
||||
function resolveCol(headers, candidates) {
|
||||
for (const c of candidates) {
|
||||
const found = headers.find(h => h.toLowerCase() === c.toLowerCase());
|
||||
|
|
|
|||
Loading…
Reference in a new issue