courthive-components 1.1.0 → 1.1.1
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/assets/team-logos/index.d.ts +9 -0
- package/dist/components/burstChart/burstChart.d.ts +108 -0
- package/dist/components/burstChart/matchUpTransform.d.ts +11 -0
- package/dist/components/burstChart/textHelpers.d.ts +11 -0
- package/dist/components/button/barButton.d.ts +1 -0
- package/dist/components/button/cvaButton.d.ts +8 -0
- package/dist/components/button/dropDownButton.d.ts +5 -0
- package/dist/components/categories/ageCategory/ageCategory.d.ts +54 -0
- package/dist/components/categories/ageCategory/ageCategoryLogic.d.ts +55 -0
- package/dist/components/categories/category/category.d.ts +47 -0
- package/dist/components/composition-editor/compositionEditor.d.ts +6 -0
- package/dist/components/composition-editor/compositionEditorStore.d.ts +24 -0
- package/dist/components/composition-editor/compositionEditorTypes.d.ts +37 -0
- package/dist/components/composition-editor/compositionPreview.d.ts +2 -0
- package/dist/components/composition-editor/scaleConstants.d.ts +7 -0
- package/dist/components/composition-editor/sections/displaySection.d.ts +3 -0
- package/dist/components/composition-editor/sections/fieldBuilders.d.ts +20 -0
- package/dist/components/composition-editor/sections/layoutSection.d.ts +3 -0
- package/dist/components/composition-editor/sections/participantSection.d.ts +3 -0
- package/dist/components/composition-editor/sections/placeholderSection.d.ts +3 -0
- package/dist/components/composition-editor/sections/scaleSection.d.ts +3 -0
- package/dist/components/composition-editor/sections/scoreSection.d.ts +3 -0
- package/dist/components/composition-editor/sections/sectionBuilder.d.ts +8 -0
- package/dist/components/composition-editor/sections/themeSection.d.ts +3 -0
- package/dist/components/composition-editor/styles.d.ts +26 -0
- package/dist/components/controlBar/controlBar.d.ts +11 -0
- package/dist/components/controlBar/toggleOverlay.d.ts +3 -0
- package/dist/components/courts/courts.d.ts +7 -0
- package/dist/components/courts/index.d.ts +1 -0
- package/dist/components/drawer/drawer.d.ts +14 -0
- package/dist/components/flightProfile/flightProfileLogic.d.ts +51 -0
- package/dist/components/flightProfile/flightProfileNew.d.ts +34 -0
- package/dist/components/flightProfile/getFlightProfileFormItems.d.ts +13 -0
- package/dist/components/flightProfile/getFlightProfileFormRelationships.d.ts +1 -0
- package/dist/components/forms/createMultiSelect.d.ts +34 -0
- package/dist/components/forms/renderButtons.d.ts +3 -0
- package/dist/components/forms/renderField.d.ts +7 -0
- package/dist/components/forms/renderForm.d.ts +1 -0
- package/dist/components/forms/renderMenu.d.ts +3 -0
- package/dist/components/forms/renderValidator.d.ts +113 -0
- package/dist/components/forms/styles.d.ts +0 -0
- package/dist/components/generateRound.d.ts +6 -0
- package/dist/components/inline-scoring/engineToMatchUp.d.ts +6 -0
- package/dist/components/inline-scoring/index.d.ts +5 -0
- package/dist/components/inline-scoring/inlineScoringFooter.d.ts +18 -0
- package/dist/components/inline-scoring/inlineScoringManager.d.ts +49 -0
- package/dist/components/inline-scoring/inlineScoringTypes.d.ts +40 -0
- package/dist/components/inline-scoring/renderInlineMatchUp.d.ts +27 -0
- package/dist/components/interactive-scoring/buildInteractiveScoringShell.d.ts +28 -0
- package/dist/components/interactive-scoring/index.d.ts +2 -0
- package/dist/components/interactive-scoring/types.d.ts +60 -0
- package/dist/components/matchUpFormat/matchUpFormat.d.ts +81 -0
- package/dist/components/matchUpFormat/matchUpFormatLogic.d.ts +112 -0
- package/dist/components/modal/cmodal.d.ts +30 -0
- package/dist/components/modal/cmodalStyles.d.ts +8 -0
- package/dist/components/modal/compositionEditorModal.d.ts +46 -0
- package/dist/components/modal/generateTeamsModal.d.ts +26 -0
- package/dist/components/modal/mockParticipants.d.ts +91 -0
- package/dist/components/modal/scheduleCellConfigModal.d.ts +44 -0
- package/dist/components/modal/selectItem.d.ts +24 -0
- package/dist/components/notes-toolbar/notesToolbar.d.ts +20 -0
- package/dist/components/policy-catalog/controller/policyCatalogControl.d.ts +18 -0
- package/dist/components/policy-catalog/domain/catalogProjections.d.ts +11 -0
- package/dist/components/policy-catalog/domain/policyDefaults.d.ts +26 -0
- package/dist/components/policy-catalog/domain/utils.d.ts +4 -0
- package/dist/components/policy-catalog/editors/ranking/domain/emptyRankingPolicy.d.ts +2 -0
- package/dist/components/policy-catalog/editors/ranking/domain/rankingProjections.d.ts +32 -0
- package/dist/components/policy-catalog/editors/ranking/index.d.ts +9 -0
- package/dist/components/policy-catalog/editors/ranking/rankingPointsEditorControl.d.ts +27 -0
- package/dist/components/policy-catalog/editors/ranking/rankingPointsEditorPanel.d.ts +8 -0
- package/dist/components/policy-catalog/editors/ranking/rankingPointsEditorStore.d.ts +53 -0
- package/dist/components/policy-catalog/editors/ranking/sections/aggregationSection.d.ts +6 -0
- package/dist/components/policy-catalog/editors/ranking/sections/bonusPointsRow.d.ts +6 -0
- package/dist/components/policy-catalog/editors/ranking/sections/metadataSection.d.ts +6 -0
- package/dist/components/policy-catalog/editors/ranking/sections/perWinPointsRow.d.ts +6 -0
- package/dist/components/policy-catalog/editors/ranking/sections/positionPointsTable.d.ts +6 -0
- package/dist/components/policy-catalog/editors/ranking/sections/profileCard.d.ts +6 -0
- package/dist/components/policy-catalog/editors/ranking/sections/qualityWinSection.d.ts +6 -0
- package/dist/components/policy-catalog/editors/ranking/sections/scopeBadges.d.ts +2 -0
- package/dist/components/policy-catalog/editors/ranking/sections/scopeEditor.d.ts +6 -0
- package/dist/components/policy-catalog/editors/ranking/styles.d.ts +25 -0
- package/dist/components/policy-catalog/editors/ranking/types.d.ts +146 -0
- package/dist/components/policy-catalog/editors/scheduling/domain/schedulingProjections.d.ts +5 -0
- package/dist/components/policy-catalog/editors/scheduling/domain/schedulingValidation.d.ts +2 -0
- package/dist/components/policy-catalog/editors/scheduling/index.d.ts +11 -0
- package/dist/components/policy-catalog/editors/scheduling/schedulingEditorControl.d.ts +26 -0
- package/dist/components/policy-catalog/editors/scheduling/schedulingEditorPanel.d.ts +6 -0
- package/dist/components/policy-catalog/editors/scheduling/schedulingEditorStore.d.ts +32 -0
- package/dist/components/policy-catalog/editors/scheduling/sections/averageTimesSection.d.ts +6 -0
- package/dist/components/policy-catalog/editors/scheduling/sections/dailyLimitsSection.d.ts +6 -0
- package/dist/components/policy-catalog/editors/scheduling/sections/defaultTimesSection.d.ts +6 -0
- package/dist/components/policy-catalog/editors/scheduling/sections/formatTimeRow.d.ts +22 -0
- package/dist/components/policy-catalog/editors/scheduling/sections/modificationFlagsSection.d.ts +6 -0
- package/dist/components/policy-catalog/editors/scheduling/sections/recoveryTimesSection.d.ts +6 -0
- package/dist/components/policy-catalog/editors/scheduling/styles.d.ts +27 -0
- package/dist/components/policy-catalog/editors/scheduling/types.d.ts +65 -0
- package/dist/components/policy-catalog/engine/policyCatalogStore.d.ts +25 -0
- package/dist/components/policy-catalog/index.d.ts +22 -0
- package/dist/components/policy-catalog/types.d.ts +57 -0
- package/dist/components/policy-catalog/ui/editorShell.d.ts +11 -0
- package/dist/components/policy-catalog/ui/jsonEditor.d.ts +5 -0
- package/dist/components/policy-catalog/ui/policyCatalogLayout.d.ts +6 -0
- package/dist/components/policy-catalog/ui/policyCatalogPanel.d.ts +10 -0
- package/dist/components/policy-catalog/ui/styles.d.ts +28 -0
- package/dist/components/popover/tipster.d.ts +14 -0
- package/dist/components/print-composition-editor/printCompositionEditor.d.ts +2 -0
- package/dist/components/print-composition-editor/printCompositionEditorTypes.d.ts +77 -0
- package/dist/components/renderSchematicStructure/index.d.ts +4 -0
- package/dist/components/renderSchematicStructure/renderSchematicMatchUp.d.ts +26 -0
- package/dist/components/renderSchematicStructure/renderSchematicRound.d.ts +15 -0
- package/dist/components/renderSchematicStructure/renderSchematicStructure.d.ts +12 -0
- package/dist/components/renderStructure/isLuckyDraw.d.ts +9 -0
- package/dist/components/renderStructure/renderAddress.d.ts +5 -0
- package/dist/components/renderStructure/renderCenterInfo.d.ts +10 -0
- package/dist/components/renderStructure/renderContainer.d.ts +4 -0
- package/dist/components/renderStructure/renderFlag.d.ts +6 -0
- package/dist/components/renderStructure/renderFrill.d.ts +10 -0
- package/dist/components/renderStructure/renderGameScore.d.ts +3 -0
- package/dist/components/renderStructure/renderIndividual.d.ts +12 -0
- package/dist/components/renderStructure/renderMatchUp.d.ts +14 -0
- package/dist/components/renderStructure/renderParticipant.d.ts +11 -0
- package/dist/components/renderStructure/renderParticipantDetail.d.ts +7 -0
- package/dist/components/renderStructure/renderParticipantInput.d.ts +10 -0
- package/dist/components/renderStructure/renderPersonAttribute.d.ts +6 -0
- package/dist/components/renderStructure/renderRound.d.ts +17 -0
- package/dist/components/renderStructure/renderRoundHeader.d.ts +8 -0
- package/dist/components/renderStructure/renderScale.d.ts +8 -0
- package/dist/components/renderStructure/renderSchedule.d.ts +5 -0
- package/dist/components/renderStructure/renderSeeding.d.ts +6 -0
- package/dist/components/renderStructure/renderSide.d.ts +9 -0
- package/dist/components/renderStructure/renderSideScore.d.ts +16 -0
- package/dist/components/renderStructure/renderStatusPill.d.ts +3 -0
- package/dist/components/renderStructure/renderStructure.d.ts +13 -0
- package/dist/components/renderStructure/renderTeam.d.ts +5 -0
- package/dist/components/renderStructure/renderTeamLogo.d.ts +4 -0
- package/dist/components/renderStructure/renderTick.d.ts +3 -0
- package/dist/components/schedule-page/controller/schedulePageControl.d.ts +18 -0
- package/dist/components/schedule-page/domain/matchUpCatalogProjections.d.ts +4 -0
- package/dist/components/schedule-page/domain/scheduleIssues.d.ts +2 -0
- package/dist/components/schedule-page/domain/utils.d.ts +5 -0
- package/dist/components/schedule-page/engine/schedulePageStore.d.ts +34 -0
- package/dist/components/schedule-page/index.d.ts +24 -0
- package/dist/components/schedule-page/types.d.ts +218 -0
- package/dist/components/schedule-page/ui/courtGridSlot.d.ts +8 -0
- package/dist/components/schedule-page/ui/dateStrip.d.ts +5 -0
- package/dist/components/schedule-page/ui/inspectorPanel.d.ts +2 -0
- package/dist/components/schedule-page/ui/issuesPanel.d.ts +2 -0
- package/dist/components/schedule-page/ui/matchUpCard.d.ts +5 -0
- package/dist/components/schedule-page/ui/matchUpCatalog.d.ts +11 -0
- package/dist/components/schedule-page/ui/scheduleCellTypeAhead.d.ts +23 -0
- package/dist/components/schedule-page/ui/scheduleGridCell.d.ts +8 -0
- package/dist/components/schedule-page/ui/schedulePageLayout.d.ts +18 -0
- package/dist/components/schedule-page/ui/styles.d.ts +41 -0
- package/dist/components/scheduling-profile/controller/schedulingProfileControl.d.ts +14 -0
- package/dist/components/scheduling-profile/domain/catalogProjections.d.ts +16 -0
- package/dist/components/scheduling-profile/domain/dndApply.d.ts +2 -0
- package/dist/components/scheduling-profile/domain/issueIndex.d.ts +2 -0
- package/dist/components/scheduling-profile/domain/profileProjections.d.ts +6 -0
- package/dist/components/scheduling-profile/domain/utils.d.ts +7 -0
- package/dist/components/scheduling-profile/domain/validateProfile.d.ts +13 -0
- package/dist/components/scheduling-profile/engine/profileStore.d.ts +27 -0
- package/dist/components/scheduling-profile/index.d.ts +25 -0
- package/dist/components/scheduling-profile/types.d.ts +197 -0
- package/dist/components/scheduling-profile/ui/cardPopover.d.ts +11 -0
- package/dist/components/scheduling-profile/ui/dateStrip.d.ts +5 -0
- package/dist/components/scheduling-profile/ui/inspectorPanel.d.ts +2 -0
- package/dist/components/scheduling-profile/ui/issuesPanel.d.ts +5 -0
- package/dist/components/scheduling-profile/ui/roundCard.d.ts +12 -0
- package/dist/components/scheduling-profile/ui/roundCatalog.d.ts +8 -0
- package/dist/components/scheduling-profile/ui/schedulingProfileLayout.d.ts +15 -0
- package/dist/components/scheduling-profile/ui/styles.d.ts +46 -0
- package/dist/components/scheduling-profile/ui/venueBoard.d.ts +7 -0
- package/dist/components/scorecard/index.d.ts +2 -0
- package/dist/components/scorecard/renderScorecard.d.ts +26 -0
- package/dist/components/scoring/approaches/dialPadApproach.d.ts +2 -0
- package/dist/components/scoring/approaches/dialPadLogic.d.ts +12 -0
- package/dist/components/scoring/approaches/dynamicSetsApproach.d.ts +2 -0
- package/dist/components/scoring/approaches/freeScoreApproach.d.ts +2 -0
- package/dist/components/scoring/approaches/inlineScoringApproach.d.ts +2 -0
- package/dist/components/scoring/config.d.ts +28 -0
- package/dist/components/scoring/index.d.ts +6 -0
- package/dist/components/scoring/logic/dynamicSetsLogic.d.ts +124 -0
- package/dist/components/scoring/scoringModal.d.ts +2 -0
- package/dist/components/scoring/types.d.ts +60 -0
- package/dist/components/scoring/utils/scoreFormatters.d.ts +12 -0
- package/dist/components/scoring/utils/scoreValidator.d.ts +16 -0
- package/dist/components/scoring/utils/setExpansionLogic.d.ts +24 -0
- package/dist/components/temporal-grid/controller/temporalGridControl.d.ts +137 -0
- package/dist/components/temporal-grid/controller/viewProjections.d.ts +220 -0
- package/dist/components/temporal-grid/engine/viewState.d.ts +34 -0
- package/dist/components/temporal-grid/index.d.ts +18 -0
- package/dist/components/temporal-grid/timeline/CourtTimeline.d.ts +77 -0
- package/dist/components/temporal-grid/timeline/InteractionManager.d.ts +59 -0
- package/dist/components/temporal-grid/timeline/ItemRenderer.d.ts +35 -0
- package/dist/components/temporal-grid/timeline/RowLayout.d.ts +38 -0
- package/dist/components/temporal-grid/timeline/TimeAxis.d.ts +41 -0
- package/dist/components/temporal-grid/timeline/TimeScale.d.ts +106 -0
- package/dist/components/temporal-grid/timeline/types.d.ts +124 -0
- package/dist/components/temporal-grid/ui/blockPopover.d.ts +29 -0
- package/dist/components/temporal-grid/ui/courtAvailabilityModal.d.ts +29 -0
- package/dist/components/temporal-grid/ui/modernTimePicker.d.ts +46 -0
- package/dist/components/temporal-grid/ui/statsBar.d.ts +21 -0
- package/dist/components/temporal-grid/ui/temporalGrid.d.ts +149 -0
- package/dist/components/temporal-grid/ui/viewToolbar.d.ts +37 -0
- package/dist/components/topology-builder/controller/topologyBuilderControl.d.ts +19 -0
- package/dist/components/topology-builder/domain/feedRounds.d.ts +42 -0
- package/dist/components/topology-builder/domain/generateDrawFromTopology.d.ts +16 -0
- package/dist/components/topology-builder/domain/playoffProfilesCache.d.ts +16 -0
- package/dist/components/topology-builder/domain/previewGenerator.d.ts +9 -0
- package/dist/components/topology-builder/domain/templates.d.ts +2 -0
- package/dist/components/topology-builder/domain/topologyToDrawOptions.d.ts +6 -0
- package/dist/components/topology-builder/domain/topologyValidator.d.ts +8 -0
- package/dist/components/topology-builder/engine/topologyStore.d.ts +30 -0
- package/dist/components/topology-builder/index.d.ts +23 -0
- package/dist/components/topology-builder/types.d.ts +59 -0
- package/dist/components/topology-builder/ui/edgeEditor.d.ts +7 -0
- package/dist/components/topology-builder/ui/nodeEditor.d.ts +9 -0
- package/dist/components/topology-builder/ui/structureCard.d.ts +39 -0
- package/dist/components/topology-builder/ui/toolbar.d.ts +15 -0
- package/dist/components/topology-builder/ui/topologyBuilderLayout.d.ts +7 -0
- package/dist/components/topology-builder/ui/topologyCanvas.d.ts +10 -0
- package/dist/components/validators/numericRange.d.ts +1 -0
- package/dist/components/validators/numericValidator.d.ts +1 -0
- package/dist/compositions/compositions.d.ts +2 -0
- package/dist/compositions/lineHeights.d.ts +5 -0
- package/dist/compositions/resolvePublishedComposition.d.ts +12 -0
- package/dist/constants/matchUpFormats.d.ts +34 -0
- package/dist/courthive-components.css +1 -1
- package/dist/courthive-components.es.js +4 -4
- package/dist/courthive-components.umd.js +1 -1
- package/dist/data/componentConstants.d.ts +1 -0
- package/dist/data/generateEventData.d.ts +15 -0
- package/dist/data/generateMatchUps.d.ts +25 -0
- package/dist/helpers/createTypeAhead.d.ts +14 -0
- package/dist/helpers/drawStateManager.d.ts +91 -0
- package/dist/helpers/getAttr.d.ts +4 -0
- package/dist/helpers/typeOf.d.ts +4 -0
- package/dist/index.d.ts +80 -4006
- package/dist/styles/centerInfoStyle.d.ts +6 -0
- package/dist/styles/containerStyle.d.ts +1 -0
- package/dist/styles/flagStyle.d.ts +3 -0
- package/dist/styles/getChevronStyle.d.ts +4 -0
- package/dist/styles/getLinkStyle.d.ts +25 -0
- package/dist/styles/getMatchUpStyle.d.ts +4 -0
- package/dist/styles/getSelectedMatchUpStyle.d.ts +1 -0
- package/dist/styles/groupNameStyle.d.ts +1 -0
- package/dist/styles/groupSeparatorStyle.d.ts +4 -0
- package/dist/styles/matchUpContainerStyle.d.ts +1 -0
- package/dist/styles/participantDetailStyle.d.ts +1 -0
- package/dist/styles/participantStyle.d.ts +17 -0
- package/dist/styles/pillStyle.d.ts +3 -0
- package/dist/styles/resultStyles.d.ts +4 -0
- package/dist/styles/roundContainerStyle.d.ts +1 -0
- package/dist/styles/roundHeaderStyle.d.ts +1 -0
- package/dist/styles/roundStyle.d.ts +3 -0
- package/dist/styles/scaleStyle.d.ts +3 -0
- package/dist/styles/schedulingStyle.d.ts +1 -0
- package/dist/styles/scoreStyles.d.ts +9 -0
- package/dist/styles/scoreWrapperStyle.d.ts +4 -0
- package/dist/styles/seedStyle.d.ts +1 -0
- package/dist/styles/sideStyles.d.ts +3 -0
- package/dist/styles/structureStyle.d.ts +1 -0
- package/dist/styles/teamLogoStyle.d.ts +1 -0
- package/dist/styles/themes/australianTheme.d.ts +1 -0
- package/dist/styles/themes/basicCardTheme.d.ts +1 -0
- package/dist/styles/themes/basicTheme.d.ts +1 -0
- package/dist/styles/themes/createTheme.d.ts +5 -0
- package/dist/styles/themes/frenchTheme.d.ts +1 -0
- package/dist/styles/themes/index.d.ts +7 -0
- package/dist/styles/themes/itfTheme.d.ts +1 -0
- package/dist/styles/themes/usOpenTheme.d.ts +1 -0
- package/dist/styles/themes/wimbledonTheme.d.ts +1 -0
- package/dist/tools/freeScore/freeScore.d.ts +79 -0
- package/dist/types.d.ts +321 -0
- package/dist/utilities/isElement.d.ts +1 -0
- package/dist/validators/dateValidator.d.ts +1 -0
- package/dist/validators/emailValidator.d.ts +1 -0
- package/dist/validators/index.d.ts +7 -0
- package/dist/validators/nameValidator.d.ts +1 -0
- package/dist/validators/numericRange.d.ts +1 -0
- package/dist/validators/numericValidator.d.ts +1 -0
- package/dist/validators/passwordValidator.d.ts +1 -0
- package/dist/validators/wordValidator.d.ts +1 -0
- package/dist/version.d.ts +1 -0
- package/package.json +4 -4
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import { temporal, TemporalEngine } from 'tods-competition-factory';
|
|
2
|
+
import { TemporalViewState } from '../engine/viewState';
|
|
3
|
+
import { DEFAULT_COLOR_SCHEME, ResourceGroupingMode } from './viewProjections';
|
|
4
|
+
import { BlockPopoverManager } from '../ui/blockPopover';
|
|
5
|
+
import { CourtTimeline } from '../timeline/CourtTimeline';
|
|
6
|
+
type BlockType = temporal.BlockType;
|
|
7
|
+
type CourtRef = temporal.CourtRef;
|
|
8
|
+
type DayId = temporal.DayId;
|
|
9
|
+
export interface TemporalGridControlConfig {
|
|
10
|
+
/** Container element for the timeline */
|
|
11
|
+
container: HTMLElement;
|
|
12
|
+
/** Initial selected day */
|
|
13
|
+
initialDay?: DayId;
|
|
14
|
+
/** Initial view mode */
|
|
15
|
+
initialView?: 'day' | 'week';
|
|
16
|
+
/** Resource grouping mode */
|
|
17
|
+
groupingMode?: ResourceGroupingMode;
|
|
18
|
+
/** Whether to show conflict indicators */
|
|
19
|
+
showConflicts?: boolean;
|
|
20
|
+
/** Whether segments should have labels */
|
|
21
|
+
showSegmentLabels?: boolean;
|
|
22
|
+
/** Custom color scheme */
|
|
23
|
+
colorScheme?: typeof DEFAULT_COLOR_SCHEME;
|
|
24
|
+
/** Callback when a block is selected */
|
|
25
|
+
onBlockSelected?: (blockId: string) => void;
|
|
26
|
+
/** Callback when a court is selected */
|
|
27
|
+
onCourtSelected?: (court: CourtRef) => void;
|
|
28
|
+
/** Callback when time range is selected */
|
|
29
|
+
onTimeRangeSelected?: (params: {
|
|
30
|
+
courts: CourtRef[];
|
|
31
|
+
start: string;
|
|
32
|
+
end: string;
|
|
33
|
+
}) => void;
|
|
34
|
+
/** Callback when engine blocks change (for stats bar, external consumers) */
|
|
35
|
+
onBlocksChanged?: () => void;
|
|
36
|
+
/** Callback when a day label is double-clicked (for navigating to 1-Day view) */
|
|
37
|
+
onDayNavigate?: (day: string) => void;
|
|
38
|
+
}
|
|
39
|
+
export declare class TemporalGridControl {
|
|
40
|
+
private readonly engine;
|
|
41
|
+
private timeline;
|
|
42
|
+
private readonly config;
|
|
43
|
+
private unsubscribe;
|
|
44
|
+
private currentItems;
|
|
45
|
+
private isRendering;
|
|
46
|
+
private popoverManager;
|
|
47
|
+
private viewState;
|
|
48
|
+
private currentDay;
|
|
49
|
+
private currentView;
|
|
50
|
+
private selectedCourts;
|
|
51
|
+
private visibleCourts;
|
|
52
|
+
constructor(engine: TemporalEngine, config: TemporalGridControlConfig);
|
|
53
|
+
private initialize;
|
|
54
|
+
/**
|
|
55
|
+
* Ensure timeline exists. Defers creation to the next macro-task so the
|
|
56
|
+
* container has layout dimensions (matches the working story pattern).
|
|
57
|
+
*/
|
|
58
|
+
private ensureTimeline;
|
|
59
|
+
/**
|
|
60
|
+
* Build the current view data from the engine.
|
|
61
|
+
*/
|
|
62
|
+
/**
|
|
63
|
+
* Get the list of days visible in the current view.
|
|
64
|
+
*/
|
|
65
|
+
getViewDays(): string[];
|
|
66
|
+
private buildViewData;
|
|
67
|
+
/**
|
|
68
|
+
* Create the timeline with initial data already populated.
|
|
69
|
+
*/
|
|
70
|
+
private createTimelineWithData;
|
|
71
|
+
/** Set the selected day (public API) */
|
|
72
|
+
setDay(day: DayId): void;
|
|
73
|
+
/** Get current selected day */
|
|
74
|
+
getDay(): DayId | null;
|
|
75
|
+
/** Set view mode */
|
|
76
|
+
setView(view: string): void;
|
|
77
|
+
/** Set a named view preset (day/days3/week/all) */
|
|
78
|
+
setViewPreset(viewKey: string): void;
|
|
79
|
+
/** Select courts for multi-court operations */
|
|
80
|
+
setSelectedCourts(courts: CourtRef[]): void;
|
|
81
|
+
/** Get selected courts */
|
|
82
|
+
getSelectedCourts(): CourtRef[];
|
|
83
|
+
/** Set which courts are visible in the timeline */
|
|
84
|
+
setVisibleCourts(courts: Set<string> | null): void;
|
|
85
|
+
/** Set layer visibility */
|
|
86
|
+
setLayerVisibility(layerId: BlockType, visible: boolean): void;
|
|
87
|
+
/** Refresh the calendar display */
|
|
88
|
+
refresh(): void;
|
|
89
|
+
/** Destroy the controller and cleanup */
|
|
90
|
+
destroy(): void;
|
|
91
|
+
private updateTimelineWindow;
|
|
92
|
+
private render;
|
|
93
|
+
/**
|
|
94
|
+
* onMove: Called when user finishes dragging or resizing an item.
|
|
95
|
+
* Returns true to accept, false to reject.
|
|
96
|
+
*/
|
|
97
|
+
private handleOnMove;
|
|
98
|
+
/**
|
|
99
|
+
* onMoving: Live validation during drag (optional visual feedback).
|
|
100
|
+
* Destroys active popover, clamps to court availability.
|
|
101
|
+
* Returns clamped start/end, or null to reject.
|
|
102
|
+
*/
|
|
103
|
+
private handleOnMoving;
|
|
104
|
+
/**
|
|
105
|
+
* Timeline click handler: Routes to popover based on item type.
|
|
106
|
+
* Handles ghost confirmation (multi-row create) and block click → popover.
|
|
107
|
+
*/
|
|
108
|
+
private handleTimelineClick;
|
|
109
|
+
/**
|
|
110
|
+
* Multi-row ghost creation handler.
|
|
111
|
+
* Called when user confirms a ghost spanning one or more court rows.
|
|
112
|
+
* Creates one block per court via engine.applyBlock.
|
|
113
|
+
*/
|
|
114
|
+
private handleMultiRowCreate;
|
|
115
|
+
/** Get the popover manager (for external access) */
|
|
116
|
+
getPopoverManager(): BlockPopoverManager;
|
|
117
|
+
private handleEngineEvent;
|
|
118
|
+
/** Snap a date to the nearest N-minute increment */
|
|
119
|
+
private snapToMinutes;
|
|
120
|
+
/**
|
|
121
|
+
* Format a Date as a local-time ISO string (no timezone offset).
|
|
122
|
+
* Engine stores times as wall-clock strings like "2026-06-15T09:00:00".
|
|
123
|
+
* toISOString() converts to UTC which shifts the time by the local offset.
|
|
124
|
+
*/
|
|
125
|
+
private toLocalISO;
|
|
126
|
+
/** Show conflict dialog */
|
|
127
|
+
private showConflictDialog;
|
|
128
|
+
/** Get timeline instance (for advanced usage) */
|
|
129
|
+
getTimeline(): CourtTimeline | null;
|
|
130
|
+
/** Get engine instance */
|
|
131
|
+
getEngine(): TemporalEngine;
|
|
132
|
+
/** Get view state (for external consumers to subscribe to view changes) */
|
|
133
|
+
getViewState(): TemporalViewState;
|
|
134
|
+
}
|
|
135
|
+
/** Create a temporal grid controller */
|
|
136
|
+
export declare function createTemporalGridControl(engine: TemporalEngine, config: TemporalGridControlConfig): TemporalGridControl;
|
|
137
|
+
export {};
|
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
import { temporal } from 'tods-competition-factory';
|
|
2
|
+
type BlockType = temporal.BlockType;
|
|
3
|
+
type CourtMeta = temporal.CourtMeta;
|
|
4
|
+
type CourtRef = temporal.CourtRef;
|
|
5
|
+
type VenueDayTimeline = temporal.VenueDayTimeline;
|
|
6
|
+
/**
|
|
7
|
+
* Timeline Group (represents a court or facility group header)
|
|
8
|
+
*/
|
|
9
|
+
export interface TimelineGroup {
|
|
10
|
+
id: string;
|
|
11
|
+
content: string;
|
|
12
|
+
nestedGroups?: string[];
|
|
13
|
+
showNested?: boolean;
|
|
14
|
+
className?: string;
|
|
15
|
+
title?: string;
|
|
16
|
+
order?: number;
|
|
17
|
+
visible?: boolean;
|
|
18
|
+
courtRef?: CourtRef;
|
|
19
|
+
surface?: string;
|
|
20
|
+
indoor?: boolean;
|
|
21
|
+
hasLights?: boolean;
|
|
22
|
+
tags?: string[];
|
|
23
|
+
isGroup?: boolean;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Timeline Item (represents a block or segment)
|
|
27
|
+
*/
|
|
28
|
+
export interface TimelineItem {
|
|
29
|
+
id: string;
|
|
30
|
+
group: string;
|
|
31
|
+
content: string;
|
|
32
|
+
start: Date | string;
|
|
33
|
+
end?: Date | string;
|
|
34
|
+
type?: 'box' | 'point' | 'range' | 'background';
|
|
35
|
+
className?: string;
|
|
36
|
+
style?: string;
|
|
37
|
+
title?: string;
|
|
38
|
+
editable?: boolean | {
|
|
39
|
+
updateTime?: boolean;
|
|
40
|
+
updateGroup?: boolean;
|
|
41
|
+
remove?: boolean;
|
|
42
|
+
};
|
|
43
|
+
selectable?: boolean;
|
|
44
|
+
blockId?: string;
|
|
45
|
+
status?: string;
|
|
46
|
+
reason?: string;
|
|
47
|
+
isBlock?: boolean;
|
|
48
|
+
isSegment?: boolean;
|
|
49
|
+
isConflict?: boolean;
|
|
50
|
+
conflictCode?: string;
|
|
51
|
+
severity?: string;
|
|
52
|
+
message?: string;
|
|
53
|
+
contributingBlocks?: string[];
|
|
54
|
+
}
|
|
55
|
+
/** @deprecated Use TimelineGroup instead */
|
|
56
|
+
export type CalendarResource = TimelineGroup;
|
|
57
|
+
/** @deprecated Use TimelineItem instead */
|
|
58
|
+
export type CalendarEvent = TimelineItem;
|
|
59
|
+
/**
|
|
60
|
+
* Grouping modes for resources
|
|
61
|
+
*/
|
|
62
|
+
export type ResourceGroupingMode = 'BY_VENUE' | 'BY_SURFACE' | 'BY_TAG' | 'FLAT';
|
|
63
|
+
/**
|
|
64
|
+
* Configuration for view projections
|
|
65
|
+
*/
|
|
66
|
+
export interface ProjectionConfig {
|
|
67
|
+
groupingMode?: ResourceGroupingMode;
|
|
68
|
+
layerVisibility?: Map<BlockType, boolean>;
|
|
69
|
+
showSegmentLabels?: boolean;
|
|
70
|
+
colorScheme?: BlockColorScheme;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Color scheme for block types
|
|
74
|
+
*/
|
|
75
|
+
export interface BlockColorScheme {
|
|
76
|
+
AVAILABLE: string;
|
|
77
|
+
BLOCKED: string;
|
|
78
|
+
PRACTICE: string;
|
|
79
|
+
MAINTENANCE: string;
|
|
80
|
+
RESERVED: string;
|
|
81
|
+
CLOSED: string;
|
|
82
|
+
SCHEDULED: string;
|
|
83
|
+
SOFT_BLOCK: string;
|
|
84
|
+
HARD_BLOCK: string;
|
|
85
|
+
LOCKED: string;
|
|
86
|
+
UNSPECIFIED: string;
|
|
87
|
+
}
|
|
88
|
+
export declare const DEFAULT_COLOR_SCHEME: BlockColorScheme;
|
|
89
|
+
/**
|
|
90
|
+
* Build timeline groups from facility timelines.
|
|
91
|
+
* Converts courts into timeline groups, grouped by facility.
|
|
92
|
+
*/
|
|
93
|
+
export declare function buildResourcesFromTimelines(timelines: VenueDayTimeline[], courtMeta: CourtMeta[], _config?: ProjectionConfig): TimelineGroup[];
|
|
94
|
+
/**
|
|
95
|
+
* Build venue group headers for nested grouping.
|
|
96
|
+
* Creates group headers for CourtTimeline.
|
|
97
|
+
*/
|
|
98
|
+
export declare function buildVenueGroups(timelines: VenueDayTimeline[]): TimelineGroup[];
|
|
99
|
+
/**
|
|
100
|
+
* Build timeline items from facility timelines.
|
|
101
|
+
* Converts rail segments into background items showing availability status.
|
|
102
|
+
*/
|
|
103
|
+
export declare function buildEventsFromTimelines(timelines: VenueDayTimeline[], config?: ProjectionConfig): TimelineItem[];
|
|
104
|
+
/**
|
|
105
|
+
* Build draggable/editable block items.
|
|
106
|
+
* These represent user-created blocks that can be moved and resized.
|
|
107
|
+
*/
|
|
108
|
+
export declare function buildBlockEvents(blocks: Array<{
|
|
109
|
+
id: string;
|
|
110
|
+
court: CourtRef;
|
|
111
|
+
start: string;
|
|
112
|
+
end: string;
|
|
113
|
+
type: BlockType;
|
|
114
|
+
reason?: string;
|
|
115
|
+
}>, config?: ProjectionConfig): TimelineItem[];
|
|
116
|
+
/**
|
|
117
|
+
* Build visual indicators for conflicts.
|
|
118
|
+
* Creates overlay items showing where conflicts exist.
|
|
119
|
+
*/
|
|
120
|
+
export declare function buildConflictEvents(conflicts: Array<{
|
|
121
|
+
code: string;
|
|
122
|
+
message: string;
|
|
123
|
+
severity: 'ERROR' | 'WARN' | 'INFO';
|
|
124
|
+
timeRange: {
|
|
125
|
+
start: string;
|
|
126
|
+
end: string;
|
|
127
|
+
};
|
|
128
|
+
courts: CourtRef[];
|
|
129
|
+
}>): TimelineItem[];
|
|
130
|
+
/**
|
|
131
|
+
* Filter items by time range
|
|
132
|
+
*/
|
|
133
|
+
export declare function filterEventsByTimeRange(events: TimelineItem[], timeRange: {
|
|
134
|
+
start: string;
|
|
135
|
+
end: string;
|
|
136
|
+
}): TimelineItem[];
|
|
137
|
+
/**
|
|
138
|
+
* Filter groups by facility
|
|
139
|
+
*/
|
|
140
|
+
export declare function filterResourcesByVenue(resources: TimelineGroup[], venueId: string): TimelineGroup[];
|
|
141
|
+
/**
|
|
142
|
+
* Sort groups by court name
|
|
143
|
+
*/
|
|
144
|
+
export declare function sortResources(resources: TimelineGroup[]): TimelineGroup[];
|
|
145
|
+
/**
|
|
146
|
+
* Build capacity curve visualization.
|
|
147
|
+
* Creates a visual representation of courts available over time.
|
|
148
|
+
*/
|
|
149
|
+
export declare function buildCapacityVisualization(capacityPoints: Array<{
|
|
150
|
+
time: string;
|
|
151
|
+
courtsAvailable: number;
|
|
152
|
+
courtsSoftBlocked: number;
|
|
153
|
+
courtsHardBlocked: number;
|
|
154
|
+
}>): Array<{
|
|
155
|
+
time: string;
|
|
156
|
+
value: number;
|
|
157
|
+
label: string;
|
|
158
|
+
}>;
|
|
159
|
+
/**
|
|
160
|
+
* Parse group ID back to court reference
|
|
161
|
+
*/
|
|
162
|
+
export declare function parseResourceId(resourceId: string): CourtRef | null;
|
|
163
|
+
/**
|
|
164
|
+
* Parse item ID to extract block ID
|
|
165
|
+
*/
|
|
166
|
+
export declare function parseBlockEventId(eventId: string): string | null;
|
|
167
|
+
/**
|
|
168
|
+
* Check if an item is a segment (background) or block (editable)
|
|
169
|
+
*/
|
|
170
|
+
export declare function isSegmentEvent(event: TimelineItem): boolean;
|
|
171
|
+
export declare function isBlockEvent(event: TimelineItem): boolean;
|
|
172
|
+
export declare function isConflictEvent(event: TimelineItem): boolean;
|
|
173
|
+
/**
|
|
174
|
+
* Generate CSS patterns for different block types
|
|
175
|
+
* (stripes, dots, hatching, etc.)
|
|
176
|
+
*/
|
|
177
|
+
export declare function generateBlockPatternCSS(): string;
|
|
178
|
+
/**
|
|
179
|
+
* Build timeline window configuration
|
|
180
|
+
*/
|
|
181
|
+
export declare function buildTimelineWindowConfig(config: {
|
|
182
|
+
dayStartTime: string;
|
|
183
|
+
dayEndTime: string;
|
|
184
|
+
slotMinutes: number;
|
|
185
|
+
day: string;
|
|
186
|
+
}): {
|
|
187
|
+
start: Date;
|
|
188
|
+
end: Date;
|
|
189
|
+
min: Date;
|
|
190
|
+
max: Date;
|
|
191
|
+
zoomMin: number;
|
|
192
|
+
zoomMax: number;
|
|
193
|
+
};
|
|
194
|
+
/**
|
|
195
|
+
* Build hidden date ranges to collapse overnight gaps.
|
|
196
|
+
* Uses `repeat: 'daily'` so the gap is hidden every day in a multi-day view.
|
|
197
|
+
*/
|
|
198
|
+
export declare function buildHiddenDates(config: {
|
|
199
|
+
dayStartTime: string;
|
|
200
|
+
dayEndTime: string;
|
|
201
|
+
referenceDay: string;
|
|
202
|
+
bufferMinutes?: number;
|
|
203
|
+
}): Array<{
|
|
204
|
+
start: Date;
|
|
205
|
+
end: Date;
|
|
206
|
+
repeat: 'daily' | 'weekly' | 'monthly' | 'yearly';
|
|
207
|
+
}>;
|
|
208
|
+
/**
|
|
209
|
+
* @deprecated Use buildTimelineWindowConfig instead
|
|
210
|
+
*/
|
|
211
|
+
export declare function buildTimeSlotConfig(config: {
|
|
212
|
+
dayStartTime: string;
|
|
213
|
+
dayEndTime: string;
|
|
214
|
+
slotMinutes: number;
|
|
215
|
+
}): {
|
|
216
|
+
slotDuration: string;
|
|
217
|
+
slotMinTime: string;
|
|
218
|
+
slotMaxTime: string;
|
|
219
|
+
};
|
|
220
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { temporal } from 'tods-competition-factory';
|
|
2
|
+
type BlockType = temporal.BlockType;
|
|
3
|
+
type DayId = temporal.DayId;
|
|
4
|
+
export interface ViewStateSnapshot {
|
|
5
|
+
selectedDay: DayId | null;
|
|
6
|
+
selectedVenue: string | null;
|
|
7
|
+
selectedCourt: string | null;
|
|
8
|
+
layerVisibility: Map<BlockType, boolean>;
|
|
9
|
+
}
|
|
10
|
+
export interface ViewChangeEvent {
|
|
11
|
+
type: 'VIEW_CHANGED';
|
|
12
|
+
payload: Partial<ViewStateSnapshot>;
|
|
13
|
+
}
|
|
14
|
+
export type ViewChangeListener = (event: ViewChangeEvent) => void;
|
|
15
|
+
export declare class TemporalViewState {
|
|
16
|
+
private selectedDay;
|
|
17
|
+
private selectedVenue;
|
|
18
|
+
private selectedCourt;
|
|
19
|
+
private readonly layerVisibility;
|
|
20
|
+
private readonly listeners;
|
|
21
|
+
setSelectedDay(day: DayId): void;
|
|
22
|
+
getSelectedDay(): DayId | null;
|
|
23
|
+
setSelectedVenue(venueId: string | null): void;
|
|
24
|
+
getSelectedVenue(): string | null;
|
|
25
|
+
setSelectedCourt(courtId: string | null): void;
|
|
26
|
+
getSelectedCourt(): string | null;
|
|
27
|
+
setLayerVisibility(layerId: BlockType, visible: boolean): void;
|
|
28
|
+
getLayerVisibility(): Map<BlockType, boolean>;
|
|
29
|
+
isLayerVisible(layerId: BlockType): boolean;
|
|
30
|
+
getSnapshot(): ViewStateSnapshot;
|
|
31
|
+
subscribe(listener: ViewChangeListener): () => void;
|
|
32
|
+
private emit;
|
|
33
|
+
}
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Temporal Grid - Main Entry Point
|
|
3
|
+
*
|
|
4
|
+
* Engine modules re-exported from tods-competition-factory via `temporal` namespace.
|
|
5
|
+
* Controller, UI, and view state are local to courthive-components.
|
|
6
|
+
*/
|
|
7
|
+
export { TemporalEngine, TemporalEngine as TemporalGridEngine, temporal } from 'tods-competition-factory';
|
|
8
|
+
export { TemporalViewState, type ViewChangeEvent, type ViewChangeListener, type ViewStateSnapshot } from './engine/viewState';
|
|
9
|
+
export { createTemporalGridControl, TemporalGridControl, type TemporalGridControlConfig } from './controller/temporalGridControl';
|
|
10
|
+
export { buildBlockEvents, buildCapacityVisualization, buildConflictEvents, buildEventsFromTimelines, buildVenueGroups, buildHiddenDates, buildResourcesFromTimelines, buildTimeSlotConfig, buildTimelineWindowConfig, DEFAULT_COLOR_SCHEME, filterEventsByTimeRange, filterResourcesByVenue, generateBlockPatternCSS, isBlockEvent, isConflictEvent, isSegmentEvent, parseBlockEventId, parseResourceId, sortResources, type BlockColorScheme, type CalendarEvent, type CalendarResource, type TimelineGroup, type TimelineItem, type ProjectionConfig, type ResourceGroupingMode } from './controller/viewProjections';
|
|
11
|
+
export { createTemporalGrid, TemporalGrid, type TemporalGridCallbacks, type TemporalGridConfig, type TemporalGridLabels } from './ui/temporalGrid';
|
|
12
|
+
export { ModernTimePicker, showModernTimePicker, type TimePickerConfig } from './ui/modernTimePicker';
|
|
13
|
+
export { createBlockPopoverManager, type BlockPopoverManager, type BlockPopoverOptions, type EngineBlockPopoverOptions } from './ui/blockPopover';
|
|
14
|
+
export { buildStatsBar, type StatsBarUpdate } from './ui/statsBar';
|
|
15
|
+
export { buildViewToolbar, VIEW_PRESETS, type ViewPreset } from './ui/viewToolbar';
|
|
16
|
+
export { showCourtAvailabilityModal, type CourtAvailabilityModalConfig } from './ui/courtAvailabilityModal';
|
|
17
|
+
export { CourtTimeline } from './timeline/CourtTimeline';
|
|
18
|
+
export type { TimelineGroupData, TimelineItemData, TimelineOptions, TimelineCallbacks, MultiRowSpan } from './timeline/types';
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
import { TimelineGroupData, TimelineItemData, TimelineOptions, MultiRowSpan } from './types';
|
|
2
|
+
export declare class CourtTimeline {
|
|
3
|
+
private options;
|
|
4
|
+
private callbacks;
|
|
5
|
+
private scale;
|
|
6
|
+
private timeAxis;
|
|
7
|
+
private layout;
|
|
8
|
+
private renderer;
|
|
9
|
+
private interaction;
|
|
10
|
+
private rootEl;
|
|
11
|
+
private bodyEl;
|
|
12
|
+
private resizeObserver;
|
|
13
|
+
private _batchUpdating;
|
|
14
|
+
private eventListeners;
|
|
15
|
+
constructor(container: HTMLElement, items: TimelineItemData[], groups: TimelineGroupData[], options?: TimelineOptions);
|
|
16
|
+
setGroups(groups: TimelineGroupData[]): void;
|
|
17
|
+
setItems(items: TimelineItemData[]): void;
|
|
18
|
+
setWindow(start: Date, end: Date, _opts?: {
|
|
19
|
+
animation?: boolean;
|
|
20
|
+
}): void;
|
|
21
|
+
setOptions(opts: Partial<TimelineOptions>): void;
|
|
22
|
+
on(event: string, handler: (...args: any[]) => void): void;
|
|
23
|
+
off(event: string, handler: (...args: any[]) => void): void;
|
|
24
|
+
private emit;
|
|
25
|
+
/** Register callback for multi-row ghost creation */
|
|
26
|
+
onMultiRowCreate(handler: (span: MultiRowSpan) => void): void;
|
|
27
|
+
/** Register onAdd callback (double-click on empty area → single block) */
|
|
28
|
+
onAdd(handler: (item: {
|
|
29
|
+
group: string;
|
|
30
|
+
start: Date;
|
|
31
|
+
end: Date;
|
|
32
|
+
}) => void): void;
|
|
33
|
+
/** Register onMove callback (drag/resize completed) */
|
|
34
|
+
onMove(handler: (item: {
|
|
35
|
+
id: string;
|
|
36
|
+
group: string;
|
|
37
|
+
start: Date;
|
|
38
|
+
end: Date;
|
|
39
|
+
}) => boolean): void;
|
|
40
|
+
/** Register onMoving callback (live validation during drag) */
|
|
41
|
+
onMoving(handler: (item: {
|
|
42
|
+
id: string;
|
|
43
|
+
group: string;
|
|
44
|
+
start: Date;
|
|
45
|
+
end: Date;
|
|
46
|
+
}) => {
|
|
47
|
+
start: Date;
|
|
48
|
+
end: Date;
|
|
49
|
+
} | null): void;
|
|
50
|
+
/** Register callback for click on a day label in the axis header */
|
|
51
|
+
onDayClick(handler: (dayStr: string) => void): void;
|
|
52
|
+
/** Get the content area element (for external DOM queries like popover anchoring) */
|
|
53
|
+
getContentElement(): HTMLElement;
|
|
54
|
+
/**
|
|
55
|
+
* Set daily operating bounds. Overnight gaps are collapsed so each day
|
|
56
|
+
* only shows the operating window (e.g., "07:00" to "21:00").
|
|
57
|
+
*/
|
|
58
|
+
setDailyBounds(startTime: string, endTime: string): void;
|
|
59
|
+
/** Remove daily bounds — return to continuous 24-hour mode */
|
|
60
|
+
clearDailyBounds(): void;
|
|
61
|
+
/**
|
|
62
|
+
* Set the explicit list of days to display. In daily-bounds mode, only
|
|
63
|
+
* these days get column space — gap days are fully collapsed.
|
|
64
|
+
*/
|
|
65
|
+
setVisibleDays(days: string[]): void;
|
|
66
|
+
/** Clear visible days restriction while keeping daily bounds active */
|
|
67
|
+
clearVisibleDays(): void;
|
|
68
|
+
/**
|
|
69
|
+
* Begin a batch update. While batching, renderAll() calls are suppressed.
|
|
70
|
+
* Call endBatchUpdate() when done to trigger a single render.
|
|
71
|
+
*/
|
|
72
|
+
beginBatchUpdate(): void;
|
|
73
|
+
/** End batch update and trigger a single render. */
|
|
74
|
+
endBatchUpdate(): void;
|
|
75
|
+
private renderAll;
|
|
76
|
+
destroy(): void;
|
|
77
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { TimeScale } from './TimeScale';
|
|
2
|
+
import { RowLayout } from './RowLayout';
|
|
3
|
+
import { ItemRenderer } from './ItemRenderer';
|
|
4
|
+
import { InteractionMode, TimelineCallbacks, TimelineItemData } from './types';
|
|
5
|
+
export declare class InteractionManager {
|
|
6
|
+
private scale;
|
|
7
|
+
private layout;
|
|
8
|
+
private renderer;
|
|
9
|
+
private contentArea;
|
|
10
|
+
private callbacks;
|
|
11
|
+
private snapMinutes;
|
|
12
|
+
private enablePinchZoom;
|
|
13
|
+
/** Element that receives wheel events (defaults to contentArea, can be overridden) */
|
|
14
|
+
private wheelTarget;
|
|
15
|
+
private mode;
|
|
16
|
+
private gesture;
|
|
17
|
+
private items;
|
|
18
|
+
/** Ghost state for multi-row creation */
|
|
19
|
+
private ghostStartTime;
|
|
20
|
+
private ghostEndTime;
|
|
21
|
+
private ghostTopRow;
|
|
22
|
+
private ghostBottomRow;
|
|
23
|
+
/** Drag guard — suppresses click handler after drag */
|
|
24
|
+
private justDragged;
|
|
25
|
+
/** Auto-scroll RAF handle */
|
|
26
|
+
private autoScrollRaf;
|
|
27
|
+
private autoScrollDelta;
|
|
28
|
+
/** Scroll container (the body wrapper that scrolls vertically) */
|
|
29
|
+
private scrollContainer;
|
|
30
|
+
constructor(scale: TimeScale, layout: RowLayout, renderer: ItemRenderer, callbacks: TimelineCallbacks, snapMinutes?: number, enablePinchZoom?: boolean);
|
|
31
|
+
setItems(items: TimelineItemData[]): void;
|
|
32
|
+
setScrollContainer(el: HTMLElement): void;
|
|
33
|
+
/** Override the element that receives wheel events (e.g. timeline root instead of content area) */
|
|
34
|
+
setWheelTarget(el: HTMLElement): void;
|
|
35
|
+
/** Attach event listeners to the content area */
|
|
36
|
+
attach(): void;
|
|
37
|
+
/** Detach all event listeners */
|
|
38
|
+
detach(): void;
|
|
39
|
+
getMode(): InteractionMode;
|
|
40
|
+
private onPointerDown;
|
|
41
|
+
private startGesture;
|
|
42
|
+
private onPointerMove;
|
|
43
|
+
private handleDragMove;
|
|
44
|
+
private handleResizeMove;
|
|
45
|
+
private onPointerUp;
|
|
46
|
+
private onDblClick;
|
|
47
|
+
private handleGhostTimeResize;
|
|
48
|
+
private handleGhostRowResize;
|
|
49
|
+
private updateGhostDisplay;
|
|
50
|
+
private confirmGhost;
|
|
51
|
+
private cancelGhost;
|
|
52
|
+
private onWheel;
|
|
53
|
+
/** Callback set by CourtTimeline to trigger re-render when scale changes */
|
|
54
|
+
onScaleChanged: (() => void) | null;
|
|
55
|
+
private onKeyDown;
|
|
56
|
+
private checkAutoScroll;
|
|
57
|
+
private startAutoScroll;
|
|
58
|
+
private stopAutoScroll;
|
|
59
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { TimeScale } from './TimeScale';
|
|
2
|
+
import { RowLayout } from './RowLayout';
|
|
3
|
+
import { TimelineItemData } from './types';
|
|
4
|
+
export declare class ItemRenderer {
|
|
5
|
+
private scale;
|
|
6
|
+
private layout;
|
|
7
|
+
private contentArea;
|
|
8
|
+
private items;
|
|
9
|
+
/** Currently rendered item elements, keyed by item ID */
|
|
10
|
+
private itemElements;
|
|
11
|
+
/** Ghost element for multi-row creation */
|
|
12
|
+
private ghostEl;
|
|
13
|
+
private ghostCountBadge;
|
|
14
|
+
constructor(scale: TimeScale, layout: RowLayout);
|
|
15
|
+
setItems(items: TimelineItemData[]): void;
|
|
16
|
+
render(): void;
|
|
17
|
+
private renderItem;
|
|
18
|
+
updateItemPosition(itemId: string, x: number, y: number, width: number): void;
|
|
19
|
+
showGhost(opts: {
|
|
20
|
+
startTime: Date;
|
|
21
|
+
endTime: Date;
|
|
22
|
+
topRowIndex: number;
|
|
23
|
+
bottomRowIndex: number;
|
|
24
|
+
}): void;
|
|
25
|
+
clearGhost(): void;
|
|
26
|
+
isGhostVisible(): boolean;
|
|
27
|
+
highlightRows(indices: number[]): void;
|
|
28
|
+
clearHighlights(): void;
|
|
29
|
+
/** Find the item ID at a given DOM element (bubble up from event target) */
|
|
30
|
+
static hitTest(target: EventTarget | null): {
|
|
31
|
+
itemId: string | null;
|
|
32
|
+
handle: string | null;
|
|
33
|
+
};
|
|
34
|
+
destroy(): void;
|
|
35
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { TimelineGroupData } from './types';
|
|
2
|
+
export declare class RowLayout {
|
|
3
|
+
private groups;
|
|
4
|
+
private rowHeight;
|
|
5
|
+
/** Label panel (left side) */
|
|
6
|
+
private labelPanel;
|
|
7
|
+
/** Content area (right side, scrollable) */
|
|
8
|
+
private contentArea;
|
|
9
|
+
/** Group ID → row index lookup */
|
|
10
|
+
private groupIndex;
|
|
11
|
+
constructor(rowHeight?: number);
|
|
12
|
+
getLabelPanel(): HTMLDivElement;
|
|
13
|
+
getContentArea(): HTMLDivElement;
|
|
14
|
+
getRowHeight(): number;
|
|
15
|
+
getGroups(): TimelineGroupData[];
|
|
16
|
+
getGroupCount(): number;
|
|
17
|
+
/** Get the group at a given index */
|
|
18
|
+
getGroupAtIndex(index: number): TimelineGroupData | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Convert a y-offset (relative to content area top) to a group ID.
|
|
21
|
+
* Returns null if y is outside all rows.
|
|
22
|
+
*/
|
|
23
|
+
yToGroupId(y: number): string | null;
|
|
24
|
+
/** Convert a group ID to its row index (0-based). Returns -1 if not found. */
|
|
25
|
+
groupIdToRowIndex(id: string): number;
|
|
26
|
+
/**
|
|
27
|
+
* Get all group IDs whose rows intersect the vertical range [yStart, yEnd].
|
|
28
|
+
* Used for multi-row ghost creation.
|
|
29
|
+
*/
|
|
30
|
+
getRowRange(yStart: number, yEnd: number): string[];
|
|
31
|
+
/** Get the y-offset of a row's top edge */
|
|
32
|
+
getRowTop(index: number): number;
|
|
33
|
+
setGroups(groups: TimelineGroupData[]): void;
|
|
34
|
+
render(): void;
|
|
35
|
+
private renderLabels;
|
|
36
|
+
private renderRows;
|
|
37
|
+
destroy(): void;
|
|
38
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { TimeScale } from './TimeScale';
|
|
2
|
+
export declare class TimeAxis {
|
|
3
|
+
private readonly dayEl;
|
|
4
|
+
private readonly hourEl;
|
|
5
|
+
private readonly scale;
|
|
6
|
+
private tickConfig;
|
|
7
|
+
/** Callback fired when a day label is clicked, with the day string (YYYY-MM-DD) */
|
|
8
|
+
onDayClick?: (dayStr: string) => void;
|
|
9
|
+
constructor(scale: TimeScale, timeAxisOpts?: {
|
|
10
|
+
scale: string;
|
|
11
|
+
step: number;
|
|
12
|
+
});
|
|
13
|
+
/** Get the day-label row element */
|
|
14
|
+
getDayElement(): HTMLDivElement;
|
|
15
|
+
/** Get the hour-tick row element */
|
|
16
|
+
getHourElement(): HTMLDivElement;
|
|
17
|
+
/** Update the time axis options (e.g. when switching views) */
|
|
18
|
+
setTimeAxisOptions(opts: {
|
|
19
|
+
scale: string;
|
|
20
|
+
step: number;
|
|
21
|
+
}): void;
|
|
22
|
+
/** Re-render both rows for the current visible window */
|
|
23
|
+
render(): void;
|
|
24
|
+
private renderDayLabels;
|
|
25
|
+
private renderDayLabelsWithBounds;
|
|
26
|
+
private renderHourTicks;
|
|
27
|
+
private renderHourTicksWithBounds;
|
|
28
|
+
/**
|
|
29
|
+
* Get the list of day-start dates visible in the current window,
|
|
30
|
+
* respecting visibleDays if set, otherwise probing calendar days.
|
|
31
|
+
*/
|
|
32
|
+
private getVisibleDayDates;
|
|
33
|
+
/**
|
|
34
|
+
* Render vertical gridlines into a target container (e.g. content area).
|
|
35
|
+
* Uses the same tick positions as the hour ticks.
|
|
36
|
+
*/
|
|
37
|
+
renderGridlines(container: HTMLDivElement, totalHeight: number): void;
|
|
38
|
+
/** Compute x positions for all visible ticks */
|
|
39
|
+
private computeTickPositions;
|
|
40
|
+
destroy(): void;
|
|
41
|
+
}
|