mirror of
https://dev.azure.com/hugendubel/ISA/_git/ISA-Frontend
synced 2025-12-28 22:42:11 +01:00
feat(shared-filter, ui-switch): add switch filter menu button for inline toggle filters
Add a new SwitchMenuButtonComponent that renders filter inputs as compact toggle switches
without an overlay menu. This provides a more streamlined UX for simple boolean/single-option
filters directly in the controls panel.
Key changes:
- Create new switch-menu module with button component and tests
- Extend FilterControlsPanelComponent to accept switchFilters input array
- Rename IconSwitchComponent to SwitchComponent for consistency
- Update filter actions to use 'target' property instead of 'group' for filtering
- Add isEmptyFilterInput support for NumberRange inputs
- Export switch-menu module from shared/filter public API
The switch button auto-commits on toggle and uses the checkbox filter model internally,
allowing simple configuration like:
switchFilters = [{ filter: stockFilter, icon: 'isaFiliale' }]
This implementation follows the existing filter architecture patterns and maintains
full accessibility support through ARIA attributes and keyboard navigation.
Ref: #5427
21 lines
465 B
JSON
21 lines
465 B
JSON
{
|
|
"name": "ui-switch",
|
|
"$schema": "../../../node_modules/nx/schemas/project-schema.json",
|
|
"sourceRoot": "libs/ui/switch/src",
|
|
"prefix": "lib",
|
|
"projectType": "library",
|
|
"tags": [],
|
|
"targets": {
|
|
"test": {
|
|
"executor": "@nx/vite:test",
|
|
"outputs": ["{options.reportsDirectory}"],
|
|
"options": {
|
|
"reportsDirectory": "../../../coverage/libs/ui/switch"
|
|
}
|
|
},
|
|
"lint": {
|
|
"executor": "@nx/eslint:lint"
|
|
}
|
|
}
|
|
}
|