Convert filter_bar.js to TypeScript (issue #17)
- Add ts/filter_bar.ts: typed port of the filter bar. Criterion / PillEntry / RangeField / DeselectableRadio interfaces replace the loose objects and the radio.wasChecked custom property; var → const/let throughout - Window entry points (applyFilterBar/clearFilterBar/toggleStringFilterInput/ showPresetNameInput/savePreset) declared in ts/globals.d.ts; readSearchSelect now called as window.readSearchSelect - Drop the dead selectValue helper; factor the repeated path→mode mapping into presetMode() - Point the FilterBar component Media and every e2e/test reference at the compiled dist/filter_bar.js Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -52,11 +52,11 @@ _FILTER_RADIO_CLASS = (
|
||||
_FILTER_GRID_CLASS = "grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4 mb-4"
|
||||
|
||||
|
||||
# range_slider.js wires RangeSlider; filter_bar.js wires the bar chrome
|
||||
# (Apply/Clear, presets, search injection). Widget media (search_select.js,
|
||||
# range_slider.js wires RangeSlider; ts/filter_bar.ts wires the bar chrome
|
||||
# (Apply/Clear, presets, search injection). Widget media (dist/search_select.js,
|
||||
# date_range_picker.js) bubbles up from the contained FilterSelect / picker.
|
||||
_RANGE_SLIDER_MEDIA = Media(js=("range_slider.js",))
|
||||
_FILTER_BAR_MEDIA = Media(js=("filter_bar.js",))
|
||||
_FILTER_BAR_MEDIA = Media(js=("dist/filter_bar.js",))
|
||||
|
||||
|
||||
def _filter_parse(filter_json: str) -> dict:
|
||||
|
||||
Reference in New Issue
Block a user