courthive-components 1.0.3 → 1.1.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/courthive-components.css +1 -1
- package/dist/courthive-components.es.js +4830 -4612
- package/dist/courthive-components.umd.js +42 -42
- package/dist/index.d.ts +93 -0
- package/package.json +7 -7
package/dist/index.d.ts
CHANGED
|
@@ -546,6 +546,11 @@ declare interface Configuration {
|
|
|
546
546
|
};
|
|
547
547
|
}
|
|
548
548
|
|
|
549
|
+
declare interface ContentBlock {
|
|
550
|
+
draw?: DrawContent;
|
|
551
|
+
schedule?: ScheduleContent;
|
|
552
|
+
}
|
|
553
|
+
|
|
549
554
|
export declare function controlBar(params: {
|
|
550
555
|
table?: any;
|
|
551
556
|
targetClassName?: string;
|
|
@@ -696,6 +701,8 @@ export declare function createInlineScoringFooter(params: FooterParams): {
|
|
|
696
701
|
|
|
697
702
|
export declare function createPolicyCatalog(config: PolicyCatalogConfig, container: HTMLElement): PolicyCatalogControl;
|
|
698
703
|
|
|
704
|
+
export declare function createPrintCompositionEditor(container: HTMLElement, config: PrintCompositionEditorConfig): PrintCompositionEditorHandle;
|
|
705
|
+
|
|
699
706
|
export declare function createSchedulePage(config: SchedulePageConfig, container: HTMLElement): SchedulePageControl;
|
|
700
707
|
|
|
701
708
|
/**
|
|
@@ -753,6 +760,13 @@ export declare interface DisplayExtensionValue {
|
|
|
753
760
|
|
|
754
761
|
export declare type DragPayload = CatalogDragPayload | PlannedDragPayload;
|
|
755
762
|
|
|
763
|
+
declare interface DrawContent {
|
|
764
|
+
includeSeedings?: boolean;
|
|
765
|
+
includeScores?: boolean;
|
|
766
|
+
showByes?: boolean;
|
|
767
|
+
showDrawPositions?: boolean;
|
|
768
|
+
}
|
|
769
|
+
|
|
756
770
|
export declare const drawer: (drawerId?: string) => any;
|
|
757
771
|
|
|
758
772
|
export declare interface DrawerOptions {
|
|
@@ -1027,6 +1041,12 @@ export declare interface FlightProfileConfig {
|
|
|
1027
1041
|
eventType?: string;
|
|
1028
1042
|
}
|
|
1029
1043
|
|
|
1044
|
+
declare interface FooterBlock {
|
|
1045
|
+
layout?: PrintFooterLayout;
|
|
1046
|
+
showTimestamp?: boolean;
|
|
1047
|
+
showPageNumbers?: boolean;
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1030
1050
|
declare interface FooterConfig {
|
|
1031
1051
|
layout: string;
|
|
1032
1052
|
showPageNumbers?: boolean;
|
|
@@ -1307,6 +1327,12 @@ export declare function groupMatchUpCatalog(items: CatalogMatchUpItem[], mode: M
|
|
|
1307
1327
|
*/
|
|
1308
1328
|
export declare function groupPolicyCatalog(catalog: PolicyCatalogItem[], groupBy: PolicyCatalogGroupBy): Map<string, PolicyCatalogItem[]>;
|
|
1309
1329
|
|
|
1330
|
+
declare interface HeaderBlock {
|
|
1331
|
+
layout?: PrintHeaderLayout;
|
|
1332
|
+
tournamentName?: string;
|
|
1333
|
+
subtitle?: string;
|
|
1334
|
+
}
|
|
1335
|
+
|
|
1310
1336
|
/**
|
|
1311
1337
|
* Composition Editor Modal — configure PDF header/footer layouts.
|
|
1312
1338
|
*
|
|
@@ -1907,6 +1933,17 @@ export declare function openScheduleCellConfigModal(options?: ScheduleCellConfig
|
|
|
1907
1933
|
|
|
1908
1934
|
export declare function padelCourt(className: string): SVGSVGElement;
|
|
1909
1935
|
|
|
1936
|
+
declare interface PageBlock {
|
|
1937
|
+
pageSize?: PrintPageSize;
|
|
1938
|
+
orientation?: PrintPageOrientation;
|
|
1939
|
+
margins?: {
|
|
1940
|
+
top: number;
|
|
1941
|
+
right: number;
|
|
1942
|
+
bottom: number;
|
|
1943
|
+
left: number;
|
|
1944
|
+
};
|
|
1945
|
+
}
|
|
1946
|
+
|
|
1910
1947
|
declare interface Participant {
|
|
1911
1948
|
participantId: string;
|
|
1912
1949
|
participantName?: string;
|
|
@@ -2088,6 +2125,56 @@ declare interface PositionChip {
|
|
|
2088
2125
|
targetName: string;
|
|
2089
2126
|
}
|
|
2090
2127
|
|
|
2128
|
+
export declare interface PrintCompositionConfig {
|
|
2129
|
+
name?: string;
|
|
2130
|
+
page?: PageBlock;
|
|
2131
|
+
header?: HeaderBlock;
|
|
2132
|
+
footer?: FooterBlock;
|
|
2133
|
+
content?: ContentBlock;
|
|
2134
|
+
}
|
|
2135
|
+
|
|
2136
|
+
export declare interface PrintCompositionEditorConfig {
|
|
2137
|
+
/** The print type whose composition is being edited. Determines which content fields render. */
|
|
2138
|
+
printType: PrintType;
|
|
2139
|
+
/** Initial config to seed the form. Defaults applied for missing fields. */
|
|
2140
|
+
config?: PrintCompositionConfig;
|
|
2141
|
+
/** When true, all fields are disabled. */
|
|
2142
|
+
readOnly?: boolean;
|
|
2143
|
+
/** Fired when the user clicks Save. */
|
|
2144
|
+
onSave?: (config: PrintCompositionConfig) => void;
|
|
2145
|
+
/** Fired on every field change with the current config. */
|
|
2146
|
+
onChange?: (config: PrintCompositionConfig) => void;
|
|
2147
|
+
}
|
|
2148
|
+
|
|
2149
|
+
export declare interface PrintCompositionEditorHandle {
|
|
2150
|
+
/** Remove the editor from the DOM and detach listeners. */
|
|
2151
|
+
destroy: () => void;
|
|
2152
|
+
/** Get the current config (deep clone). */
|
|
2153
|
+
getConfig: () => PrintCompositionConfig;
|
|
2154
|
+
/** Replace the config and re-render. */
|
|
2155
|
+
setConfig: (config: PrintCompositionConfig) => void;
|
|
2156
|
+
}
|
|
2157
|
+
|
|
2158
|
+
export declare type PrintFooterLayout = 'standard' | 'seedings' | 'officials' | 'none';
|
|
2159
|
+
|
|
2160
|
+
export declare type PrintHeaderLayout = 'grand-slam' | 'itf' | 'minimal' | 'none';
|
|
2161
|
+
|
|
2162
|
+
export declare type PrintPageOrientation = 'portrait' | 'landscape' | 'auto';
|
|
2163
|
+
|
|
2164
|
+
export declare type PrintPageSize = 'a4' | 'letter';
|
|
2165
|
+
|
|
2166
|
+
/**
|
|
2167
|
+
* Types for the print-composition editor.
|
|
2168
|
+
*
|
|
2169
|
+
* The editor produces a config that mirrors pdf-factory's `CompositionConfig`
|
|
2170
|
+
* shape but is defined locally to avoid a hard runtime dep on pdf-factory.
|
|
2171
|
+
* Callers (admin-client) bridge this object to pdf-factory at print time.
|
|
2172
|
+
*
|
|
2173
|
+
* See `Mentat/planning/PRINT_COMPOSITION_POLICY_PLAN.md` for the
|
|
2174
|
+
* end-to-end architecture.
|
|
2175
|
+
*/
|
|
2176
|
+
export declare type PrintType = 'draw' | 'schedule' | 'playerList' | 'courtCard' | 'signInSheet' | 'matchCard';
|
|
2177
|
+
|
|
2091
2178
|
declare type ProfileChangeListener = (state: ProfileStoreState) => void;
|
|
2092
2179
|
|
|
2093
2180
|
export declare class ProfileStore {
|
|
@@ -2564,6 +2651,12 @@ export declare interface ScheduleCellTypeAheadOptions {
|
|
|
2564
2651
|
onCancel?: () => void;
|
|
2565
2652
|
}
|
|
2566
2653
|
|
|
2654
|
+
declare interface ScheduleContent {
|
|
2655
|
+
cellStyle?: 'detailed' | 'compact';
|
|
2656
|
+
showMatchNumbers?: boolean;
|
|
2657
|
+
alertBanner?: string;
|
|
2658
|
+
}
|
|
2659
|
+
|
|
2567
2660
|
export declare interface ScheduleDate {
|
|
2568
2661
|
date: string;
|
|
2569
2662
|
isActive: boolean;
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "courthive-components",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"engines": {
|
|
5
|
-
"node": ">=
|
|
5
|
+
"node": ">=22"
|
|
6
6
|
},
|
|
7
7
|
"description": "Components for competitions projects",
|
|
8
8
|
"files": [
|
|
@@ -67,7 +67,7 @@
|
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@chromatic-com/storybook": "^5.0.0",
|
|
70
|
-
"@commitlint/cli": "20.5.
|
|
70
|
+
"@commitlint/cli": "20.5.2",
|
|
71
71
|
"@commitlint/config-conventional": "20.5.0",
|
|
72
72
|
"@eslint/js": "^10.0.1",
|
|
73
73
|
"@fortawesome/fontawesome-free": "^7.2.0",
|
|
@@ -76,8 +76,8 @@
|
|
|
76
76
|
"@storybook/test-runner": "^0.24.0",
|
|
77
77
|
"@types/d3": "^7.4.3",
|
|
78
78
|
"@types/vanillajs-datepicker": "^1.3.5",
|
|
79
|
-
"@typescript-eslint/eslint-plugin": "8.59.
|
|
80
|
-
"@typescript-eslint/parser": "8.59.
|
|
79
|
+
"@typescript-eslint/eslint-plugin": "8.59.1",
|
|
80
|
+
"@typescript-eslint/parser": "8.59.1",
|
|
81
81
|
"@vitest/browser-playwright": "^4.0.16",
|
|
82
82
|
"@vitest/coverage-v8": "^4.0.16",
|
|
83
83
|
"eslint": "10.2.1",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"storybook": "^10.2.17",
|
|
95
95
|
"tabulator-tables": "6.4.0",
|
|
96
96
|
"typescript": "^6.0.2",
|
|
97
|
-
"vite": "8.0.
|
|
97
|
+
"vite": "8.0.10",
|
|
98
98
|
"vite-plugin-dts": "^4.5.4",
|
|
99
99
|
"vitest": "^4.0.16"
|
|
100
100
|
},
|
|
@@ -107,7 +107,7 @@
|
|
|
107
107
|
"focus-trap": "^8.0.0",
|
|
108
108
|
"timepicker-ui": "^4.1.2",
|
|
109
109
|
"tippy.js": "6.3.7",
|
|
110
|
-
"tods-competition-factory": "^3.1.
|
|
110
|
+
"tods-competition-factory": "^3.1.3",
|
|
111
111
|
"vanillajs-datepicker": "1.3.4"
|
|
112
112
|
}
|
|
113
113
|
}
|