Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The published application is available at <https://daggerok.github.io/WisdomTree

Every column of the ETF catalog and of the Watchlist, Holdings, History and Distributions tabs has a type: text (`ABC`), number (`123`), percentage (`%`), money (`$`), date (`D`), date and time (`DT`) or time of day (`T`). The type is detected from the texts the column shows (80% of the filled cells must agree, otherwise text) and is written in the badge next to the column title: click it to cycle the type, Shift+click to return to auto-detection. Dates are read as `2024-06-15`, `6/15/2024`, `15.06.2024`, `Jun 15, 2024` or `15-Jun-2024`, date and time as `2024-06-15T09:30:00Z` or `2024-06-15 09:30`, time as `09:30`, `16:00:00` or `9:30 PM`

A row of filter inputs sits under the column headers (the `Filters` button hides it, `Clear filters` empties it). Filters of different columns are combined with AND, the search box applies on top, and Copy Tickers and the exports use the filtered rows. Filters and type overrides are remembered in the browser. `Sticky #` (next to `Filters`, off by default, remembered in the browser) numbers the rows by their rank in the table sorted by the current column before the column filters, so a filtered fund keeps its rank and the numbers keep gaps; the sort, the search and the category and blacklist choices rank again. The catalog starts sorted by Net Assets, largest first, unavailable values sort last in both directions, and every export starts with the `#` column. The red `Clear` button opens a dialog that lists what can be reset (the selection, searches, sort order, open tab, shown columns, column filters, remembered table views and the blacklist), all ticked the first time and afterwards as they were left at the last OK; `Enter` confirms, `Esc` or a click outside cancels, the theme is always kept, so the page looks like a first visit (also after a reload)
A row of filter inputs sits under the column headers (the `Filters` button hides it, `Clear filters` empties it). Filters of different columns are combined with AND, the search box applies on top, and Copy Tickers and the exports use the filtered rows. Filters and type overrides are remembered in the browser. `Sticky #` (next to `Filters`, off by default, remembered in the browser) numbers the rows by their rank in the table sorted by the current column before the column filters, so a filtered fund keeps its rank and the numbers keep gaps; the sort, the search and the category and blacklist choices rank again. The catalog starts sorted by Net Assets, largest first, unavailable values sort last in both directions, and every export starts with the `#` column. The action buttons (Copy Tickers, Upload / Drop N-PORT XML, Export .csv, Export .txt, Clear, Blacklist) sit in the ☰ menu at the left start of the toolbar: `Enter`, `Space` or the down arrow opens it, the arrows move between the items, `Esc` or a click outside closes it. The red `Clear` item opens a dialog that lists what can be reset (the selection, searches, sort order, open tab, shown columns, column filters, remembered table views and the blacklist), all ticked the first time and afterwards as they were left at the last OK; `Enter` confirms, `Esc` or a click outside cancels, the theme is always kept, so the page looks like a first visit (also after a reload)

Inside one filter: a space means AND, a comma means OR, a leading `!` means NOT, `?` matches an empty or unavailable value and `!?` a value that is there; a value that is unavailable matches only `?` and negated conditions. An unquoted space ends the value, so quote values that contain one (`>="2024-06-15 09:30"`)

Expand Down
32 changes: 32 additions & 0 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -340,3 +340,35 @@
/* 52-week range cell (ui-std range52w-block.tsx): a 3px bar under the percent, filled up to the position */
.range52w-cell{background-image:linear-gradient(to right,rgb(59 130 246 / .7) 0 var(--range52w,0%),rgb(148 163 184 / .35) var(--range52w,0%) 100%);background-repeat:no-repeat;background-size:calc(100% - 2rem) 3px;background-position:1rem calc(100% - .3rem)}
.range52w-cell.range52w-young{background-image:linear-gradient(to right,rgb(245 158 11 / .75) 0 var(--range52w,0%),rgb(148 163 184 / .35) var(--range52w,0%) 100%)}

/* Actions menu (☰ at the left start of the toolbar, see setupActionsMenu in main.tsx): the action buttons as menu items, each with its old color as an accent bar */
.am-row{display:flex;align-items:center;gap:.5rem;min-width:0}
.am-row > .am-root{flex:none}
.am-row > :not(.am-root){flex:1 1 auto;min-width:0}
.am-trigger{display:inline-flex;align-items:center;justify-content:center;width:2.375rem;height:2.375rem;flex:none;border-radius:.5rem;border:1px solid #e2e8f0;background:#fff;color:#334155;font-size:1.125rem;line-height:1;cursor:pointer;transition:background-color .15s,border-color .15s,color .15s}
.am-trigger:hover,.am-trigger[aria-expanded="true"]{background:#f1f5f9;border-color:#cbd5e1}
.dark .am-trigger{background:#0f172a;border-color:#334155;color:#e2e8f0}
.dark .am-trigger:hover,.dark .am-trigger[aria-expanded="true"]{background:#1e293b;border-color:#475569}
.am-trigger:focus-visible,.am-item:focus-visible{outline:2px solid #3b82f6;outline-offset:2px}
.am-panel{position:fixed;left:0;top:0;z-index:1000;display:flex;flex-direction:column;gap:.125rem;min-width:13rem;max-width:calc(100vw - 1rem);overflow:auto;padding:.375rem;background:#fff;border:1px solid #e2e8f0;border-radius:.75rem;box-shadow:0 12px 30px rgb(15 23 42 / .16),0 2px 6px rgb(15 23 42 / .06);opacity:0;transform:translateY(-4px) scale(.98);transform-origin:top left;transition:opacity .14s ease,transform .14s ease}
.am-panel[hidden]{display:none}
.am-panel.is-open{opacity:1;transform:none}
.dark .am-panel{background:#0f172a;border-color:#334155;box-shadow:0 12px 30px rgb(0 0 0 / .5),0 2px 6px rgb(0 0 0 / .3)}
.am-item{--am-accent:#94a3b8;display:flex;align-items:center;gap:.5rem;width:100%;padding:.5rem .75rem .5rem .625rem;border:0;border-left:3px solid var(--am-accent);border-radius:.375rem;background:transparent;color:#334155;font-size:.875rem;line-height:1.25rem;font-weight:500;text-align:left;white-space:nowrap;cursor:pointer;transition:background-color .12s}
.am-item:hover:not(:disabled),.am-item:focus-visible{background:#f1f5f9}
.dark .am-item{color:#e2e8f0}
.dark .am-item:hover:not(:disabled),.dark .am-item:focus-visible{background:#1e293b}
.am-item:disabled{opacity:.5;cursor:not-allowed}
.am-item svg{width:1rem;height:1rem;flex:none}
.am-copy,.am-blacklist{--am-accent:#94a3b8}
.am-upload{--am-accent:#3b82f6;border-top:1px dashed #cbd5e1;border-right:1px dashed #cbd5e1;border-bottom:1px dashed #cbd5e1}
.dark .am-upload{border-top-color:#475569;border-right-color:#475569;border-bottom-color:#475569}
.am-csv{--am-accent:#2563eb}
.am-txt{--am-accent:#059669}
.am-clear{--am-accent:#e11d48;color:#be123c}
.dark .am-clear{color:#fda4af}
.am-sep{height:1px;margin:.25rem .25rem;background:#e2e8f0;flex:none}
.dark .am-sep{background:#334155}
@media (prefers-reduced-motion:reduce){.am-panel{transition:none}}
.am-upload.dz-active{border-color:#3b82f6;background:#eff6ff}
.dark .am-upload.dz-active{background:#1e293b}
76 changes: 37 additions & 39 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,43 @@ <h1 class="min-w-0 text-xl font-bold tracking-tight text-slate-900 dark:text-whi
<!-- One full-text search input, scoped to the active tab (per-tab filters
live in wisdomtree-tab-filters). The right-edge ✕ is the 1-click
clear button: it clears only the active tab's query. -->
<div class="relative flex items-center w-full lg:w-96 shrink-0">
<input
type="text"
id="search-input"
placeholder="Search ETFs, fund names, holdings, tickers, CUSIPs, ISINs..."
disabled
class="bg-white dark:bg-slate-900 text-slate-900 dark:text-slate-100 border border-slate-200 dark:border-slate-700 rounded-lg pl-4 pr-8 py-2 w-full focus:outline-hidden focus:border-blue-500 text-sm placeholder-slate-400 dark:placeholder-slate-500 disabled:opacity-50 disabled:cursor-not-allowed transition"
/>
<button
type="button"
id="search-clear-btn"
class="hidden absolute right-2.5 top-1/2 -translate-y-1/2 w-4 h-4 flex items-center justify-center rounded-sm text-slate-300 dark:text-slate-600 hover:text-rose-500 dark:hover:text-rose-400 text-sm leading-none transition focus:outline-hidden"
title="Clear search filter"
aria-label="Clear search filter"
>✕</button>
<!-- Actions menu (☰, owner 2026-11-14): the action buttons keep their ids and handlers, setupActionsMenu() in main.tsx opens and closes it -->
<div class="am-row w-full lg:w-auto shrink-0">
<div class="am-root">
<button type="button" id="actions-btn" class="am-trigger" aria-haspopup="menu" aria-expanded="false" aria-controls="actions-panel" aria-label="Actions" title="Actions: copy tickers, export, clear, blacklist">☰</button>
<div id="actions-panel" class="am-panel" role="menu" aria-label="Actions" hidden>
<button id="copy-btn" disabled class="am-item am-copy" role="menuitem" data-am-keep>Copy Tickers</button>
<!-- Integrated Drag & Drop Upload (same feature as daggerok/iShares, N-PORT flavor) -->
<div id="dropzone" class="am-item am-upload" title="Upload an SEC Form N-PORT-P XML payload (used as a session-only holdings override). Parsed in your browser; uploads live for this session only." role="menuitem">
<input type="file" id="file-input" accept=".xml" class="hidden" />
<svg class="w-4 h-4 text-blue-500 dark:text-blue-400 shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12" />
</svg>
<span id="dropzone-text" class="dz-label font-medium">Upload / Drop N-PORT XML</span>
</div>
<button id="export-csv-btn" disabled class="am-item am-csv" role="menuitem">Export .csv</button>
<button id="export-txt-btn" disabled class="am-item am-txt" role="menuitem">Export .txt</button>
<div class="am-sep" role="separator"></div>
<button id="reset-btn" disabled title="Choose what to reset to the first-visit view (the choice is remembered, the theme is kept)" class="am-item am-clear" role="menuitem">Clear</button>
<button id="blacklist-btn" class="am-item am-blacklist" title="Manage the blacklist of ETFs hidden from All ETFs (kept in browser localStorage)" aria-expanded="false" role="menuitem">Blacklist</button>
</div>
</div>
<div class="relative flex items-center lg:w-96">
<input
type="text"
id="search-input"
placeholder="Search ETFs, fund names, holdings, tickers, CUSIPs, ISINs..."
disabled
class="bg-white dark:bg-slate-900 text-slate-900 dark:text-slate-100 border border-slate-200 dark:border-slate-700 rounded-lg pl-4 pr-8 py-2 w-full focus:outline-hidden focus:border-blue-500 text-sm placeholder-slate-400 dark:placeholder-slate-500 disabled:opacity-50 disabled:cursor-not-allowed transition"
/>
<button
type="button"
id="search-clear-btn"
class="hidden absolute right-2.5 top-1/2 -translate-y-1/2 w-4 h-4 flex items-center justify-center rounded-sm text-slate-300 dark:text-slate-600 hover:text-rose-500 dark:hover:text-rose-400 text-sm leading-none transition focus:outline-hidden"
title="Clear search filter"
aria-label="Clear search filter"
>✕</button>
</div>
</div>

<!-- ETF catalogue tabs: All ETFs + WisdomTree categories. -->
Expand All @@ -84,30 +106,6 @@ <h1 class="min-w-0 text-xl font-bold tracking-tight text-slate-900 dark:text-whi
<button id="clear-filters-btn" type="button" hidden class="bg-blue-50 dark:bg-blue-950/30 text-blue-700 dark:text-blue-300 border border-blue-200 dark:border-blue-700/50 px-3 py-2 rounded-lg text-sm font-medium transition active:scale-95 hover:bg-blue-100 dark:hover:bg-blue-900/50" title="Clear every column filter of the shown table">Clear filters</button>
<button id="rank-btn" type="button" aria-pressed="false" class="bg-slate-100 dark:bg-slate-800 text-slate-700 dark:text-slate-200 border border-slate-200 dark:border-slate-700 px-3 py-2 rounded-lg text-sm font-medium transition active:scale-95 hover:bg-slate-200 dark:hover:bg-slate-700 disabled:opacity-50 disabled:cursor-not-allowed" title="Sticky #: number the rows by their rank in the sorted table before the column filters, so filtered rows keep their rank (1, 4, 7...). Off: 1..N of the shown rows">Sticky #: <span id="rank-summary">off</span></button>

<!-- Actions intentionally match Amplify / iShares naming and placement -->
<div class="flex flex-wrap items-center gap-2.5 w-full lg:w-auto lg:ml-auto justify-end shrink-0">

<button id="copy-btn" disabled class="bg-slate-100 dark:bg-slate-800 text-slate-700 dark:text-slate-200 border border-slate-200 dark:border-slate-700 px-4 py-2 rounded-lg text-sm font-medium transition active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed hover:bg-slate-200 dark:hover:bg-slate-700 disabled:hover:bg-slate-100 dark:disabled:hover:bg-slate-800">Copy Tickers</button>

<!-- Integrated Drag & Drop Upload (same feature as daggerok/iShares, N-PORT flavor) -->
<div
id="dropzone"
class="flex items-center gap-2 border border-dashed border-slate-300 dark:border-slate-600 hover:border-blue-500 bg-slate-50 dark:bg-slate-900/60 transition-all rounded-lg px-3.5 py-2 cursor-pointer text-sm text-slate-600 dark:text-slate-300"
title="Upload an SEC Form N-PORT-P XML payload (used as a session-only holdings override). Parsed in your browser; uploads live for this session only."
>
<input type="file" id="file-input" accept=".xml" class="hidden" />
<svg class="w-4 h-4 text-blue-500 dark:text-blue-400 shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12" />
</svg>
<span id="dropzone-text" class="dz-label font-medium">Upload / Drop N-PORT XML</span>
</div>

<button id="export-csv-btn" disabled class="bg-blue-600 hover:bg-blue-500 text-white px-4 py-2 rounded-lg text-sm font-medium transition active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-blue-600">Export .csv</button>
<button id="export-txt-btn" disabled class="bg-emerald-600 hover:bg-emerald-500 text-white px-4 py-2 rounded-lg text-sm font-medium transition active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:bg-emerald-600">Export .txt</button>
<button id="reset-btn" disabled title="Choose what to reset to the first-visit view (the choice is remembered, the theme is kept)" class="bg-rose-100 dark:bg-rose-900/40 text-rose-700 dark:text-rose-300 border border-rose-200 dark:border-rose-700/50 px-3 py-2 rounded-lg text-sm font-medium transition active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed hover:bg-rose-200 dark:hover:bg-rose-800/60 disabled:hover:bg-rose-100 dark:disabled:hover:bg-rose-900/40">Clear</button>
<button id="blacklist-btn" class="bg-slate-100 dark:bg-slate-800 text-slate-700 dark:text-slate-200 border border-slate-200 dark:border-slate-700 px-4 py-2 rounded-lg text-sm font-medium transition active:scale-95 hover:bg-slate-200 dark:hover:bg-slate-700" title="Manage the blacklist of ETFs hidden from All ETFs (kept in browser localStorage)" aria-expanded="false">Blacklist</button>
</div>

</div>
</div>

Expand Down
Loading
Loading