courthive-components 3.5.0 → 3.6.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.
@@ -29,6 +29,12 @@ export interface ActiveStripGridMatchUp {
29
29
  roundNumber?: number;
30
30
  matchUpStatus?: string;
31
31
  winningSide?: number;
32
+ /**
33
+ * ISO timestamp set when the matchUp is "called to court". A pending matchUp
34
+ * surfaces on the strip as `next` ONLY once it has been called (or started) —
35
+ * merely organizing the grid must not populate the strip.
36
+ */
37
+ calledAt?: string;
32
38
  /** True when at least one set/score has been entered. */
33
39
  hasScore?: boolean;
34
40
  participantIds: string[];
@@ -46,7 +52,7 @@ export interface ActiveStripCourtColumn {
46
52
  export interface ActiveStripGrid {
47
53
  columns: ActiveStripCourtColumn[];
48
54
  }
49
- export type ActiveStripCellState = 'free' | 'in-progress' | 'next' | 'completed';
55
+ export type ActiveStripCellState = 'free' | 'in-progress' | 'suspended' | 'next' | 'completed';
50
56
  export interface ActiveStripCell {
51
57
  courtId: string;
52
58
  state: ActiveStripCellState;
@@ -65,8 +71,26 @@ export interface ActiveStripDropTarget {
65
71
  }
66
72
  export interface ActiveStripStatusOptions {
67
73
  inProgressStatuses?: ReadonlySet<string>;
74
+ suspendedStatuses?: ReadonlySet<string>;
68
75
  completedStatuses?: ReadonlySet<string>;
69
76
  }
70
77
  export declare function computeActiveStripCell(column: ActiveStripCourtColumn, options?: ActiveStripStatusOptions): ActiveStripCell;
71
78
  export declare function computeActiveStrip(grid: ActiveStripGrid, options?: ActiveStripStatusOptions): ActiveStripCell[];
72
- export declare function computeActiveStripDropTarget(grid: ActiveStripGrid, targetCourtId: string, dragged: ActiveStripDropCandidate): ActiveStripDropTarget;
79
+ export declare function computeActiveStripDropTarget(grid: ActiveStripGrid, targetCourtId: string, dragged: ActiveStripDropCandidate, options?: ActiveStripStatusOptions): ActiveStripDropTarget;
80
+ export interface RescheduleCandidate {
81
+ matchUpId: string;
82
+ /** Court to re-seat on in the target grid. Absent → cannot place (catalog). */
83
+ courtId?: string;
84
+ drawId?: string;
85
+ roundNumber?: number;
86
+ participantIds: string[];
87
+ }
88
+ export interface ReschedulePlacement {
89
+ matchUpId: string;
90
+ /** When placed: the (unchanged) court + 0-based row. Absent when sent to catalog. */
91
+ courtId?: string;
92
+ rowIndex?: number;
93
+ /** false → no legal row; caller should clear the court assignment. */
94
+ placed: boolean;
95
+ }
96
+ export declare function computeReschedulePlacements(targetGrid: ActiveStripGrid, candidates: RescheduleCandidate[]): ReschedulePlacement[];
@@ -10,8 +10,8 @@ export { SchedulePageStore } from './engine/schedulePageStore';
10
10
  export { filterMatchUpCatalog, groupMatchUpCatalog, computeBaseRoundByEvent, isCompletedStatus } from './domain/matchUpCatalogProjections';
11
11
  export { buildScheduleIssueIndex } from './domain/scheduleIssues';
12
12
  export { matchUpLabel, participantLabel, matchUpSearchKey, deepClone } from './domain/utils';
13
- export { computeActiveStrip, computeActiveStripCell, computeActiveStripDropTarget } from './domain/activeStrip';
14
- export type { ActiveStripCell, ActiveStripCellState, ActiveStripCourtColumn, ActiveStripDropCandidate, ActiveStripDropTarget, ActiveStripGrid, ActiveStripGridMatchUp, ActiveStripStatusOptions } from './domain/activeStrip';
13
+ export { computeActiveStrip, computeActiveStripCell, computeActiveStripDropTarget, computeReschedulePlacements } from './domain/activeStrip';
14
+ export type { ActiveStripCell, ActiveStripCellState, ActiveStripCourtColumn, ActiveStripDropCandidate, ActiveStripDropTarget, ActiveStripGrid, ActiveStripGridMatchUp, ActiveStripStatusOptions, RescheduleCandidate, ReschedulePlacement } from './domain/activeStrip';
15
15
  export { buildScheduleDateStrip } from './ui/dateStrip';
16
16
  export { buildScheduleIssuesPanel } from './ui/issuesPanel';
17
17
  export { buildMatchUpCatalog } from './ui/matchUpCatalog';