stable

Clone or download

Read-only

refactor: Selection element also handles multi-selection

How to test: - Lazybox in "multiple selection mode" (`is_multiple: true` in options) now has a button that can be focused through the keyboard with "tab". Pressing "enter" when the button is focused will clear the selection. - Pressing "tab" will no longer close the dropdown. - No other functional change expected. Notes: the button already existed but was a `<span>` and was not usable by keyboard. part of request #31583 Lazybox big clean-up Change-Id: I3f79216d019b23866207b233df088e54e847a2d6

Modified Files

Name
M lib/frontend/lazybox/src/SearchInput.test.ts +11 −4 Go to diff View file
M lib/frontend/lazybox/src/SearchInput.ts +10 −16 Go to diff View file
M lib/frontend/lazybox/src/dropdown/DropdownEventsHandler.test.ts +0 −6 Go to diff View file
M lib/frontend/lazybox/src/dropdown/DropdownEventsHandler.ts +2 −5 Go to diff View file
M lib/frontend/lazybox/src/events/EventManager.test.ts +6 −45 Go to diff View file
M lib/frontend/lazybox/src/events/EventManager.ts +8 −28 Go to diff View file
M lib/frontend/lazybox/src/helpers/keys-helper.test.ts +1 −15 Go to diff View file
M lib/frontend/lazybox/src/helpers/keys-helper.ts +0 −4 Go to diff View file
M lib/frontend/lazybox/src/lazybox.ts +18 −27 Go to diff View file
M lib/frontend/lazybox/src/navigation/FieldFocusManager.test.ts +14 −63 Go to diff View file
M lib/frontend/lazybox/src/navigation/FieldFocusManager.ts +3 −7 Go to diff View file
M lib/frontend/lazybox/src/renderers/BaseComponentRenderer.test.ts +6 −12 Go to diff View file
M lib/frontend/lazybox/src/renderers/BaseComponentRenderer.ts +8 −32 Go to diff View file
A lib/frontend/lazybox/src/selection/ClearSelectionTemplate.test.ts +95 −0 Go to diff View file
A lib/frontend/lazybox/src/selection/ClearSelectionTemplate.ts +58 −0 Go to diff View file
A lib/frontend/lazybox/src/selection/KeyboardSelector.test.ts +99 −0 Go to diff View file
A lib/frontend/lazybox/src/selection/KeyboardSelector.ts +47 −0 Go to diff View file
D lib/frontend/lazybox/src/selection/MultipleSelectionManager.test.ts +0 −260 Go to diff View file
D lib/frontend/lazybox/src/selection/MultipleSelectionManager.ts +0 −228 Go to diff View file
M lib/frontend/lazybox/src/selection/SelectionElement.test.ts +311 −150 Go to diff View file
M lib/frontend/lazybox/src/selection/SelectionElement.ts +161 −121 Go to diff View file
M lib/frontend/lazybox/src/selection/SelectionManager.test.ts +32 −18 Go to diff View file
M lib/frontend/lazybox/src/selection/SelectionManager.ts +11 −14 Go to diff View file
D lib/frontend/lazybox/src/selection/templates/clear-selection-button-template.test.ts +0 −32 Go to diff View file
D lib/frontend/lazybox/src/selection/templates/clear-selection-button-template.ts +0 −46 Go to diff View file
M lib/frontend/lazybox/src/type.ts +1 −7 Go to diff View file
M lib/frontend/lazybox/themes/style.scss +1 −1 Go to diff View file