courthive-components 6.9.0 → 6.10.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/inline-scoring/inlineScoringManager.d.ts +5 -0
- package/dist/components/inline-scoring/inlineScoringTypes.d.ts +1 -0
- package/dist/components/matchUpFormat/machine/edits.d.ts +8 -1
- package/dist/components/schedule-page/controller/schedulePageControl.d.ts +6 -1
- package/dist/components/schedule-page/index.d.ts +2 -2
- package/dist/components/schedule-page/types.d.ts +14 -0
- package/dist/components/schedule-page/ui/floatingInspector.d.ts +17 -0
- package/dist/components/schedule-page/ui/schedulePageLayout.d.ts +8 -5
- package/dist/courthive-components.css +1 -1
- package/dist/courthive-components.es.js +7512 -7310
- package/dist/courthive-components.umd.js +50 -50
- package/dist/helpers/createTypeAhead.d.ts +8 -0
- package/dist/helpers/escapeHtml.d.ts +7 -0
- package/dist/index.d.ts +2 -1
- package/package.json +1 -1
|
@@ -43,6 +43,11 @@ export declare class InlineScoringManager {
|
|
|
43
43
|
canUndo(matchUpId: string): boolean;
|
|
44
44
|
canRedo(matchUpId: string): boolean;
|
|
45
45
|
isComplete(matchUpId: string): boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Whether the set in play takes this input. The factory reports what each segment can be scored with
|
|
48
|
+
* (`getInputLevels`): a segment of outs takes set totals only, a combined-point total has no games.
|
|
49
|
+
*/
|
|
50
|
+
accepts(matchUpId: string, level: 'point' | 'game'): boolean;
|
|
46
51
|
remove(matchUpId: string): void;
|
|
47
52
|
clear(): void;
|
|
48
53
|
private notifyAndReturn;
|
|
@@ -1,4 +1,11 @@
|
|
|
1
|
-
import { Capabilities, CombinedPointsConfig, Codec, Edit, EditorState } from './types';
|
|
1
|
+
import { Capabilities, CombinedPointsConfig, Codec, Edit, EditorState, FormatState } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Whether the format may be scored as an aggregate. The factory refuses an aggregate of standard sets for
|
|
4
|
+
* a new format (CA 2026-10-18, scoring engine spec § 9.3 rule 5): an aggregate sums segments whose scores
|
|
5
|
+
* are units — timed, tiebreak-only and outs segments — and a standard set's games are not. Every segment
|
|
6
|
+
* is summed except an "Exactly" aggregate's final set, which is the decider played after the N.
|
|
7
|
+
*/
|
|
8
|
+
export declare function aggregateAllowed(format: FormatState): boolean;
|
|
2
9
|
/** A final set's tiebreak targets outside "Exactly" mode; "Exactly" also offers 1 and 3. */
|
|
3
10
|
export declare const DEFAULT_TIEBREAK_TO_OPTIONS: number[];
|
|
4
11
|
export interface EditContext {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { SchedulePageStore } from '../engine/schedulePageStore';
|
|
2
|
-
import { SchedulePageConfig, CatalogMatchUpItem, ScheduleDate, ScheduleIssue, PendingScheduleAction } from '../types';
|
|
2
|
+
import { CatalogPlacement, InspectorPlacement, SchedulePageConfig, CatalogMatchUpItem, ScheduleDate, ScheduleIssue, PendingScheduleAction } from '../types';
|
|
3
3
|
export declare class SchedulePageControl {
|
|
4
4
|
private readonly store;
|
|
5
5
|
private readonly layout;
|
|
@@ -8,6 +8,11 @@ export declare class SchedulePageControl {
|
|
|
8
8
|
constructor(config: SchedulePageConfig);
|
|
9
9
|
render(container: HTMLElement): void;
|
|
10
10
|
destroy(): void;
|
|
11
|
+
/** Presentation-only changes retain the store and all pending scheduling work. */
|
|
12
|
+
setCatalogPlacement(placement: CatalogPlacement): void;
|
|
13
|
+
setCatalogVisible(visible: boolean): void;
|
|
14
|
+
setInspectorPlacement(placement: InspectorPlacement): void;
|
|
15
|
+
getCatalogRegion(): HTMLElement;
|
|
11
16
|
setMatchUpCatalog(catalog: CatalogMatchUpItem[]): void;
|
|
12
17
|
setScheduleDates(dates: ScheduleDate[]): void;
|
|
13
18
|
setIssues(issues: ScheduleIssue[]): void;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SchedulePageConfig } from './types';
|
|
2
1
|
import { SchedulePageControl } from './controller/schedulePageControl';
|
|
2
|
+
import { SchedulePageConfig } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* Schedule Page — Public API
|
|
5
5
|
*
|
|
@@ -27,5 +27,5 @@ export type { ActiveStripPanel, ActiveStripPanelCallbacks, ActiveStripPanelData,
|
|
|
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';
|
|
30
|
-
export type { CatalogMatchUpItem, CatalogFilters, MatchUpSide, ScheduleDate, ScheduleIssue, ScheduleIssueSeverity, ScheduleIssueIndex, ScheduleIssueCounts, MatchUpCatalogGroupBy, ScheduledBehavior, SchedulingMode, PendingScheduleAction, CatalogMatchUpDragPayload, GridMatchUpDragPayload, SchedulePageDragPayload, SchedulePageConfig, SchedulePageCatalogState, SchedulePageState, SchedulePageChangeListener, UIPanel, ScheduleCellConfig, ScheduleCellField, ParticipantDisplayConfig, ScheduleCellData, ScheduleCellSide } from './types';
|
|
30
|
+
export type { CatalogPlacement, InspectorPlacement, InspectorGeometry, CatalogMatchUpItem, CatalogFilters, MatchUpSide, ScheduleDate, ScheduleIssue, ScheduleIssueSeverity, ScheduleIssueIndex, ScheduleIssueCounts, MatchUpCatalogGroupBy, ScheduledBehavior, SchedulingMode, PendingScheduleAction, CatalogMatchUpDragPayload, GridMatchUpDragPayload, SchedulePageDragPayload, SchedulePageConfig, SchedulePageCatalogState, SchedulePageState, SchedulePageChangeListener, UIPanel, ScheduleCellConfig, ScheduleCellField, ParticipantDisplayConfig, ScheduleCellData, ScheduleCellSide } from './types';
|
|
31
31
|
export declare function createSchedulePage(config: SchedulePageConfig, container: HTMLElement): SchedulePageControl;
|
|
@@ -120,6 +120,14 @@ export interface SchedulePageCatalogState {
|
|
|
120
120
|
showCompleted?: boolean;
|
|
121
121
|
showScheduled?: boolean;
|
|
122
122
|
}
|
|
123
|
+
export type CatalogPlacement = 'left' | 'right' | 'bottom';
|
|
124
|
+
export type InspectorPlacement = 'docked' | 'floating';
|
|
125
|
+
export interface InspectorGeometry {
|
|
126
|
+
left: number;
|
|
127
|
+
top: number;
|
|
128
|
+
width: number;
|
|
129
|
+
height: number;
|
|
130
|
+
}
|
|
123
131
|
export interface SchedulePageConfig {
|
|
124
132
|
matchUpCatalog: CatalogMatchUpItem[];
|
|
125
133
|
scheduleDates: ScheduleDate[];
|
|
@@ -134,6 +142,12 @@ export interface SchedulePageConfig {
|
|
|
134
142
|
hideLeft?: boolean;
|
|
135
143
|
/** Which side to place the matchUp catalog. Defaults to 'right'. */
|
|
136
144
|
catalogSide?: 'left' | 'right';
|
|
145
|
+
/** Overrides catalogSide; changing presentation does not change scheduling state. */
|
|
146
|
+
catalogPlacement?: CatalogPlacement;
|
|
147
|
+
inspectorPlacement?: InspectorPlacement;
|
|
148
|
+
onInspectorPlacementChange?: (placement: InspectorPlacement) => void;
|
|
149
|
+
inspectorGeometry?: InspectorGeometry;
|
|
150
|
+
onInspectorGeometryChange?: (geometry: InspectorGeometry) => void;
|
|
137
151
|
scheduledBehavior?: ScheduledBehavior;
|
|
138
152
|
schedulingMode?: SchedulingMode;
|
|
139
153
|
/** Initial visibility of the active strip (one-row court summary above the grid). Defaults to true. */
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { InspectorGeometry } from '../types';
|
|
2
|
+
export declare function clampInspectorGeometry(value: Partial<InspectorGeometry>, width: number, height: number): InspectorGeometry;
|
|
3
|
+
interface FloatingInspectorOptions {
|
|
4
|
+
geometry?: InspectorGeometry;
|
|
5
|
+
onGeometryChange?: (geometry: InspectorGeometry) => void;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
onDock: () => void;
|
|
8
|
+
}
|
|
9
|
+
/** A non-modal host. The caller owns selection, content, visibility and persistence. */
|
|
10
|
+
export declare function buildFloatingInspector(panel: HTMLElement, options: FloatingInspectorOptions): {
|
|
11
|
+
element: HTMLElement;
|
|
12
|
+
content: HTMLDivElement;
|
|
13
|
+
setVisible: (visible: boolean) => void;
|
|
14
|
+
rememberFocus: () => void;
|
|
15
|
+
destroy: () => void;
|
|
16
|
+
};
|
|
17
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SchedulePageState, UIPanel } from '../types';
|
|
1
|
+
import { SchedulePageConfig, CatalogPlacement, InspectorPlacement, SchedulePageState, UIPanel } from '../types';
|
|
2
2
|
export interface SchedulePageLayoutPanels {
|
|
3
3
|
dateStrip: UIPanel<SchedulePageState>;
|
|
4
4
|
issuesPanel: UIPanel<SchedulePageState>;
|
|
@@ -8,11 +8,14 @@ export interface SchedulePageLayoutPanels {
|
|
|
8
8
|
}
|
|
9
9
|
export interface SchedulePageLayoutCallbacks {
|
|
10
10
|
onToggleLeft: () => void;
|
|
11
|
+
onInspectorClose?: () => void;
|
|
11
12
|
}
|
|
12
|
-
export declare function buildSchedulePageLayout(panels: SchedulePageLayoutPanels, callbacks: SchedulePageLayoutCallbacks, options?: {
|
|
13
|
-
hideLeft?: boolean;
|
|
14
|
-
catalogSide?: 'left' | 'right';
|
|
15
|
-
}): {
|
|
13
|
+
export declare function buildSchedulePageLayout(panels: SchedulePageLayoutPanels, callbacks: SchedulePageLayoutCallbacks, options?: Pick<SchedulePageConfig, 'hideLeft' | 'catalogSide' | 'catalogPlacement' | 'inspectorPlacement' | 'inspectorGeometry' | 'onInspectorGeometryChange' | 'onInspectorPlacementChange'>): {
|
|
16
14
|
element: HTMLElement;
|
|
17
15
|
update: (state: SchedulePageState) => void;
|
|
16
|
+
setCatalogPlacement: (placement: CatalogPlacement) => void;
|
|
17
|
+
setCatalogVisible: (visible: boolean) => void;
|
|
18
|
+
setInspectorPlacement: (placement: InspectorPlacement) => void;
|
|
19
|
+
catalogRegion: HTMLElement;
|
|
20
|
+
destroy: () => void;
|
|
18
21
|
};
|