Repository navigation
kerusiweb 4.1.0
Added
- The rows view (§4.5.1, #38, D27, D28). A new
viewinput/prop,'canonical'(the
default, unchanged) or'rows', identical in both bindings. The rows view
draws every row as a straight line in §4.2.1 order with its label beside it,
keeps skippedcols as gaps, puts seats with norowin a last line, and
draws no elements or group footprints. It is never switched on automatically.
Core exportscomputeRowsLayout(),computeViewLayout()and the
KerusiSeatmapViewtype;PlacedSectiongainsdrawsLabelandrowLabels
(PlacedRowLabel), and the map gets akerusi-seatmap--rowsclass in that
view.
The control that books an either group whole (D19), such as a tabletop, gets
the three things a seat already has (#56, D25). All three are additive: with
none of them set, seats and controls behave and render exactly as in 4.0.0, and
KerusiSeatCardContext is unchanged.
- Whole-unit cards.
renderWholeUnitHoverCardandrenderWholeUnitClickCard
in React,<ng-template kerusiWholeUnitHoverCard>and<ng-template kerusiWholeUnitClickCard>in Angular, open on the control, so an app can say
"Table 3: the whole table, 8 seats, EUR 800.00" where the customer is looking.
They are handed a newKerusiWholeUnitCardContext(unit,group,
selected,trigger,close), honourhoverCardOnFocus, and position,
dismiss and follow zoom and full screen as seat cards do. The control points
at its hover card witharia-describedby, and only one hover card shows at a
time across seats and controls.onSeatHover/seatHoverstill reports
seats only. - A refusal callback.
onWholeUnitDisallowed/(wholeUnitDisallowed)
fires with{ unit, group, reason }when the control is refused by a click,
Enter or Space (unit-unavailable,unit-too-largeormax-selection), so an
app can show a visible message of its own. The live-region announcement is
made as before. - The price from the app.
wholeUnitPrice?: (unit) => string | undefined
supplies the formatted price said in the control's name, in place of the map's
wholePrice, for apps that price per event on their own server.
wholeUnitAriaLabel()in core takes it as a fourth argument. - Core:
KerusiWholeUnitCardContext,WholeUnitDisallowed,
WholeUnitPriceFn,wholeUnitHoverKey()/wholeUnitOfHoverKey(), which
feed a control toreduceSeatHover(), andwholeUnitCardDataAttributes().
The card rules both bindings follow are core's too:wholeUnitControlGroups(),
isWholeUnitSelected(),wholeUnitCardGroup(),wholeUnitCardContext(),
seatCardKeyExists()andseatCardClickAction(). - Demos: with seat cards on, an
eithertable's top shows a card, and a
refused tabletop shows a visible message, in both demos.
A visible cue on the control itself is left for a separate issue (D26).