courthive-components 3.12.2 → 3.13.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/court-layout/buildCourtLayout.d.ts +24 -0
- package/dist/components/court-layout/defaultConfig.d.ts +3 -0
- package/dist/components/court-layout/index.d.ts +10 -0
- package/dist/components/court-layout/styles.d.ts +8 -0
- package/dist/components/court-layout/types.d.ts +46 -0
- package/dist/components/venue-locator/buildVenueLocator.d.ts +23 -0
- package/dist/components/venue-locator/defaultConfig.d.ts +3 -0
- package/dist/components/venue-locator/index.d.ts +12 -0
- package/dist/components/venue-locator/mapVenue.d.ts +2 -0
- package/dist/components/venue-locator/styles.d.ts +25 -0
- package/dist/components/venue-locator/types.d.ts +105 -0
- package/dist/courthive-components.css +1 -1
- package/dist/courthive-components.es.js +6527 -6149
- package/dist/courthive-components.umd.js +15 -15
- package/dist/helpers/cards/index.d.ts +2 -0
- package/dist/helpers/cards/sortCourts.d.ts +18 -0
- package/dist/index.d.ts +4 -0
- package/package.json +11 -3
|
@@ -6,6 +6,8 @@
|
|
|
6
6
|
*/
|
|
7
7
|
export { formatAddress, formatVenueLocation } from './formatAddress';
|
|
8
8
|
export { formatDateRange } from './formatDateRange';
|
|
9
|
+
export { sortCourtsByOrder } from './sortCourts';
|
|
10
|
+
export type { CourtOrderable } from './sortCourts';
|
|
9
11
|
export { extractImageURL, extractCourtSvgSport } from './resourceExtraction';
|
|
10
12
|
export { buildCardSkeleton } from './buildCardSkeleton';
|
|
11
13
|
export type { CardSkeletonConfig } from './buildCardSkeleton';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared court ordering.
|
|
3
|
+
*
|
|
4
|
+
* Both venue-locator (court list beside the map) and court-layout (the court grid) order a venue's
|
|
5
|
+
* courts the same way, so the comparator lives here rather than in either component.
|
|
6
|
+
*/
|
|
7
|
+
export interface CourtOrderable {
|
|
8
|
+
courtName: string;
|
|
9
|
+
courtOrder?: number;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* TODS `courtOrder` ascending when present, otherwise the court name compared natural-numerically so
|
|
13
|
+
* "Court 2" precedes "Court 10". Courts carrying an explicit order sort ahead of those without one —
|
|
14
|
+
* a venue that has bothered to order some of its courts means those to come first.
|
|
15
|
+
*
|
|
16
|
+
* Non-mutating.
|
|
17
|
+
*/
|
|
18
|
+
export declare function sortCourtsByOrder<T extends CourtOrderable>(courts: T[]): T[];
|
package/dist/index.d.ts
CHANGED
|
@@ -50,6 +50,10 @@ export { buildVenueCard, buildVenueSkeletonCard, mapVenueToCardData, DEFAULT_VEN
|
|
|
50
50
|
export type { MapVenueOptions, VenueCardCallbacks, VenueCardConfig, VenueCardCornerField, VenueCardData, VenueCardField } from './components/venue-card';
|
|
51
51
|
export { buildCourtCard, buildCourtSkeletonCard, mapCourtToCardData, DEFAULT_COURT_CARD_CONFIG, mergeCourtCardConfig } from './components/court-card';
|
|
52
52
|
export type { CourtCardCallbacks, CourtCardConfig, CourtCardCornerField, CourtCardData, CourtCardField, MapCourtOptions } from './components/court-card';
|
|
53
|
+
export { buildCourtLayout, cellCardConfig, groupCourts, settingOf, summarizeCourts, surfaceOf, DEFAULT_COURT_LAYOUT_CONFIG, mergeCourtLayoutConfig } from './components/court-layout';
|
|
54
|
+
export type { CourtGroup, CourtLayoutCallbacks, CourtLayoutConfig, CourtLayoutCourt, CourtLayoutData, CourtLayoutGrouping } from './components/court-layout';
|
|
55
|
+
export { buildVenueLocator, destroyVenueLocator, describeCourt, hasVenueGeo, sortVenueCourts, mapVenueToLocatorData, DEFAULT_VENUE_LOCATOR_CONFIG, mergeVenueLocatorConfig } from './components/venue-locator';
|
|
56
|
+
export type { VenueLocatorCallbacks, VenueLocatorConfig, VenueLocatorCourt, VenueLocatorData, VenueLocatorLayout, VenueLocatorTileLayer, VenueLocatorView } from './components/venue-locator';
|
|
53
57
|
export { buildTeamCard } from './components/team-card';
|
|
54
58
|
export type { TeamCardCallbacks, TeamCardData } from './components/team-card';
|
|
55
59
|
export { buildCompetitivenessBar, buildCompetitivenessDonut, aggregateCompetitiveness, totalBuckets, COMPETITIVENESS_BUCKETS } from './components/competitivenessBar';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "courthive-components",
|
|
3
3
|
"packageManager": "pnpm@11.20.0",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.13.0",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22"
|
|
7
7
|
},
|
|
@@ -78,6 +78,7 @@
|
|
|
78
78
|
"@storybook/html-vite": "^10.2.17",
|
|
79
79
|
"@storybook/test-runner": "^0.24.0",
|
|
80
80
|
"@types/d3": "^7.4.3",
|
|
81
|
+
"@types/leaflet": "^1.9.12",
|
|
81
82
|
"@types/vanillajs-datepicker": "^1.3.5",
|
|
82
83
|
"@typescript-eslint/eslint-plugin": "8.66.0",
|
|
83
84
|
"@typescript-eslint/parser": "8.66.0",
|
|
@@ -91,13 +92,14 @@
|
|
|
91
92
|
"globals": "^17.3.0",
|
|
92
93
|
"happy-dom": "^20.8.3",
|
|
93
94
|
"husky": "9.1.7",
|
|
95
|
+
"leaflet": "1.9.4",
|
|
94
96
|
"lint-staged": "17.3.0",
|
|
95
97
|
"playwright": "^1.57.0",
|
|
96
98
|
"prettier": "^3.8.1",
|
|
97
99
|
"semver": "7.8.5",
|
|
98
100
|
"storybook": "^10.2.17",
|
|
99
101
|
"tabulator-tables": "6.5.2",
|
|
100
|
-
"tods-competition-factory": "6.
|
|
102
|
+
"tods-competition-factory": "6.21.0",
|
|
101
103
|
"typescript": "^6.0.2",
|
|
102
104
|
"vite": "8.2.0",
|
|
103
105
|
"vite-plugin-dts": "^5.0.0",
|
|
@@ -122,6 +124,12 @@
|
|
|
122
124
|
"vanillajs-datepicker": "1.3.4"
|
|
123
125
|
},
|
|
124
126
|
"peerDependencies": {
|
|
125
|
-
"tods-competition-factory": "^6.0.0"
|
|
127
|
+
"tods-competition-factory": "^6.0.0",
|
|
128
|
+
"leaflet": "^1.9.4"
|
|
129
|
+
},
|
|
130
|
+
"peerDependenciesMeta": {
|
|
131
|
+
"leaflet": {
|
|
132
|
+
"optional": true
|
|
133
|
+
}
|
|
126
134
|
}
|
|
127
135
|
}
|