courthive-components 4.2.0 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/schedule-page/domain/activeStrip.d.ts +13 -1
- package/dist/components/schedule-page/index.d.ts +1 -1
- package/dist/components/schedule-page/ui/activeStrip.d.ts +39 -0
- package/dist/courthive-components.css +1 -1
- package/dist/courthive-components.es.js +45 -28
- package/dist/courthive-components.umd.js +2 -2
- package/dist/index.d.ts +1 -1
- package/package.json +1 -1
|
@@ -52,7 +52,7 @@ export interface ActiveStripCourtColumn {
|
|
|
52
52
|
export interface ActiveStripGrid {
|
|
53
53
|
columns: ActiveStripCourtColumn[];
|
|
54
54
|
}
|
|
55
|
-
export type ActiveStripCellState = 'free' | 'in-progress' | 'suspended' | 'next' | 'completed';
|
|
55
|
+
export type ActiveStripCellState = 'free' | 'in-progress' | 'suspended' | 'next' | 'due' | 'completed';
|
|
56
56
|
export interface ActiveStripCell {
|
|
57
57
|
courtId: string;
|
|
58
58
|
state: ActiveStripCellState;
|
|
@@ -73,6 +73,18 @@ export interface ActiveStripStatusOptions {
|
|
|
73
73
|
inProgressStatuses?: ReadonlySet<string>;
|
|
74
74
|
suspendedStatuses?: ReadonlySet<string>;
|
|
75
75
|
completedStatuses?: ReadonlySet<string>;
|
|
76
|
+
/**
|
|
77
|
+
* MatchUps that should have started by now and have not been called.
|
|
78
|
+
*
|
|
79
|
+
* The consumer decides — the rule needs a venue-local clock and knowledge of
|
|
80
|
+
* the schedule annotations (a "followed by" matchUp was never promised its
|
|
81
|
+
* `scheduledTime`), neither of which this component has.
|
|
82
|
+
*
|
|
83
|
+
* Only consulted for a court with nothing live and nothing called, which is
|
|
84
|
+
* the case where the `free` state was lying: the court is not free-and-fine,
|
|
85
|
+
* it is idle with work waiting on it.
|
|
86
|
+
*/
|
|
87
|
+
dueMatchUpIds?: ReadonlySet<string>;
|
|
76
88
|
}
|
|
77
89
|
export declare function computeActiveStripCell(column: ActiveStripCourtColumn, options?: ActiveStripStatusOptions): ActiveStripCell;
|
|
78
90
|
export declare function computeActiveStrip(grid: ActiveStripGrid, options?: ActiveStripStatusOptions): ActiveStripCell[];
|
|
@@ -23,7 +23,7 @@ export type { ScheduleInspectorPanelOptions } from './ui/inspectorPanel';
|
|
|
23
23
|
export { buildCourtGridSlot } from './ui/courtGridSlot';
|
|
24
24
|
export { buildSchedulePageLayout } from './ui/schedulePageLayout';
|
|
25
25
|
export { buildActiveStripPanel } from './ui/activeStrip';
|
|
26
|
-
export type { ActiveStripPanel, ActiveStripPanelCallbacks, ActiveStripPanelData, ActiveStripPanelOptions, ActiveStripCourtMeta, ActiveStripCourtBlock } from './ui/activeStrip';
|
|
26
|
+
export type { ActiveStripPanel, ActiveStripPanelCallbacks, ActiveStripPanelData, ActiveStripPanelOptions, ActiveStripCourtMeta, ActiveStripCourtBlock, ActiveStripUpcomingBlock } from './ui/activeStrip';
|
|
27
27
|
export { buildScheduleGridCell, mapMatchUpToCellData, DEFAULT_SCHEDULE_CELL_CONFIG } from './ui/scheduleGridCell';
|
|
28
28
|
export { activateScheduleCellTypeAhead } from './ui/scheduleCellTypeAhead';
|
|
29
29
|
export type { ScheduleCellTypeAheadOptions } from './ui/scheduleCellTypeAhead';
|
|
@@ -22,9 +22,48 @@ export interface ActiveStripCourtBlock {
|
|
|
22
22
|
/** Optional short note (block.reason, registrant name from a future practice-registration system, etc.). */
|
|
23
23
|
detail?: string;
|
|
24
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* A block that has not started yet on a court that is free right now.
|
|
27
|
+
*
|
|
28
|
+
* Distinct from `ActiveStripCourtBlock`, which is a block in force. This one is
|
|
29
|
+
* about the runway left before it: the question a director asks of an idle court
|
|
30
|
+
* is "can I still put something on it", and the answer is a duration, not a
|
|
31
|
+
* banner.
|
|
32
|
+
*/
|
|
33
|
+
export interface ActiveStripUpcomingBlock {
|
|
34
|
+
/** Block type, for the colour — same vocabulary as `ActiveStripCourtBlock.type`. */
|
|
35
|
+
type: string;
|
|
36
|
+
/** Pre-formatted by the consumer, e.g. "40m → MAINTENANCE". */
|
|
37
|
+
label: string;
|
|
38
|
+
/** Hover text — the consumer owns the wording. */
|
|
39
|
+
title?: string;
|
|
40
|
+
}
|
|
25
41
|
export interface ActiveStripPanelData {
|
|
26
42
|
/** Court columns, in display order. The strip computes one cell per column. */
|
|
27
43
|
grid: ActiveStripGrid;
|
|
44
|
+
/**
|
|
45
|
+
* MatchUps that should have started by now and have not been called — see
|
|
46
|
+
* `ActiveStripStatusOptions.dueMatchUpIds`. Supplied per refresh because it
|
|
47
|
+
* moves with the clock.
|
|
48
|
+
*/
|
|
49
|
+
dueMatchUpIds?: readonly string[];
|
|
50
|
+
/**
|
|
51
|
+
* courtId → the block bearing down on a court that is currently FREE. The
|
|
52
|
+
* consumer decides when one is worth showing; the strip only paints it.
|
|
53
|
+
*
|
|
54
|
+
* Ignored for a court that has a block in force (`courtBlocks` wins — a banner
|
|
55
|
+
* about now beats a countdown to later) and for one with a matchUp on it,
|
|
56
|
+
* where `courtBlockEdges` carries the same fact in the form that suits an
|
|
57
|
+
* occupied court.
|
|
58
|
+
*/
|
|
59
|
+
courtUpcomingBlocks?: Record<string, ActiveStripUpcomingBlock>;
|
|
60
|
+
/**
|
|
61
|
+
* courtId → a block that will come into force while the matchUp currently on
|
|
62
|
+
* that court is still expected to be playing. Painted as a top-edge stripe:
|
|
63
|
+
* a separate axis from the left-border state language, so a LIVE match on a
|
|
64
|
+
* court about to close shows both rather than one hiding the other.
|
|
65
|
+
*/
|
|
66
|
+
courtBlockEdges?: Record<string, ActiveStripUpcomingBlock>;
|
|
28
67
|
/** Optional display labels per courtId. Falls back to courtId. */
|
|
29
68
|
courts?: ActiveStripCourtMeta[];
|
|
30
69
|
/**
|