courthive-components 6.10.3 → 6.12.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/README.md +2 -0
- package/dist/components/interactive-scoring/index.d.ts +1 -1
- package/dist/components/ladderChart/index.d.ts +1 -1
- package/dist/components/policy-catalog/editors/privacy/domain/privacyProjections.d.ts +16 -3
- package/dist/components/policy-catalog/editors/privacy/index.d.ts +1 -1
- package/dist/components/policy-catalog/editors/scoring/index.d.ts +2 -2
- package/dist/components/policy-catalog/index.d.ts +3 -3
- package/dist/components/ratingDistributionChart/index.d.ts +1 -1
- package/dist/components/topology-builder/domain/edgeTraversal.d.ts +15 -0
- package/dist/components/topology-builder/ui/edgeEditMode.d.ts +15 -0
- package/dist/courthive-components.es.js +1510 -1441
- package/dist/courthive-components.umd.js +46 -46
- package/dist/{dist-D160D4O-.mjs → dist-DPnSc4eG.mjs} +492 -393
- package/dist/{range-CbB5sPGX.mjs → range-C-KhEV-d.mjs} +263 -84
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -17,6 +17,8 @@ This library provides a comprehensive set of UI components for building tourname
|
|
|
17
17
|
|
|
18
18
|
## Installation
|
|
19
19
|
|
|
20
|
+
Requires **Node.js 24** or later (`engines.node` is `>=24`; 22 is maintenance-only, end of life April 2027).
|
|
21
|
+
|
|
20
22
|
```bash
|
|
21
23
|
pnpm add courthive-components
|
|
22
24
|
```
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { buildInteractiveScoringShell } from './buildInteractiveScoringShell';
|
|
2
|
-
export type { InteractiveScoringShell, InteractiveScoringShellConfig, StateChangedDetail
|
|
2
|
+
export type { InteractiveScoringShell, InteractiveScoringShellConfig, StateChangedDetail } from './types';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { buildLadderChart } from './ladderChart';
|
|
2
|
-
export type { LadderChartDatum, LadderChartConfig, LadderChartMargins, LadderChartInstance
|
|
2
|
+
export type { LadderChartDatum, LadderChartConfig, LadderChartMargins, LadderChartInstance } from './types';
|
|
@@ -11,13 +11,26 @@ export interface PrivacyFieldMeta {
|
|
|
11
11
|
* `{ policyName, participant: { ...attributeFilter } }`.
|
|
12
12
|
*/
|
|
13
13
|
export declare function emptyPrivacyPolicy(): PrivacyPolicyData;
|
|
14
|
-
/** All
|
|
15
|
-
export declare function privacyFields(): PrivacyFieldMeta[];
|
|
14
|
+
/** All toggleable attributes (flags and shapes) from the template — participant-level, then person. */
|
|
15
|
+
export declare function privacyFields(template?: PrivacyPolicyData): PrivacyFieldMeta[];
|
|
16
|
+
/** Published when the attribute is `true` or carries a shape; stripped when `false` or absent. */
|
|
16
17
|
export declare function readField(policy: PrivacyPolicyData, group: 'participant' | 'person', field: string): boolean;
|
|
17
18
|
/**
|
|
18
19
|
* Set an attribute on both the direct participant/person and the doubles/team
|
|
19
20
|
* `individualParticipants` branch, so singles and pair members stay consistent.
|
|
21
|
+
*
|
|
22
|
+
* On writes each level's TEMPLATE value: a shape stays a shape. An attribute the
|
|
23
|
+
* policy lacks but the template names is written too, so a policy saved before the
|
|
24
|
+
* factory added it (`teams`, 2026-10) can still be switched on.
|
|
20
25
|
*/
|
|
21
|
-
export declare function writeField(policy: PrivacyPolicyData, group: 'participant' | 'person', field: string, value: boolean): void;
|
|
26
|
+
export declare function writeField(policy: PrivacyPolicyData, group: 'participant' | 'person', field: string, value: boolean, template?: PrivacyPolicyData): void;
|
|
27
|
+
/**
|
|
28
|
+
* Fill every attribute the template names but the policy lacks with the template's default, at each level.
|
|
29
|
+
*
|
|
30
|
+
* A saved policy carries only the attributes that existed when it was saved. Without this, `teams` (added to the
|
|
31
|
+
* factory default 2026-10) would read as stripped in every older policy, though nobody had ever been offered it.
|
|
32
|
+
* Attributes the policy does carry are never changed.
|
|
33
|
+
*/
|
|
34
|
+
export declare function normalisePrivacyPolicy(policy: PrivacyPolicyData, template?: PrivacyPolicyData): PrivacyPolicyData;
|
|
22
35
|
export declare function readPolicyName(policy: PrivacyPolicyData): string;
|
|
23
36
|
export declare function writePolicyName(policy: PrivacyPolicyData, value: string): void;
|
|
@@ -4,6 +4,6 @@
|
|
|
4
4
|
export { PrivacyEditorControl, createPrivacyEditor } from './privacyEditorControl';
|
|
5
5
|
export { PrivacyEditorStore } from './privacyEditorStore';
|
|
6
6
|
export { buildPrivacyEditorPanel } from './privacyEditorPanel';
|
|
7
|
-
export { emptyPrivacyPolicy, privacyFields, readField, writeField, readPolicyName, writePolicyName
|
|
7
|
+
export { normalisePrivacyPolicy, emptyPrivacyPolicy, privacyFields, readField, writeField, readPolicyName, writePolicyName } from './domain/privacyProjections';
|
|
8
8
|
export type { PrivacyPolicyData, PrivacyEditorState, PrivacyEditorChangeListener, PrivacyEditorConfig } from './types';
|
|
9
9
|
export type { PrivacyFieldMeta } from './domain/privacyProjections';
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { ScoringEditorControl, createScoringEditor } from './scoringEditorControl';
|
|
2
|
-
export type { ScoringPolicyData, ScoringEditorConfig, MatchUpStatusKey, MatchUpFormatEntry, AllowedFormatEntry
|
|
3
|
-
export { MATCH_UP_FORMAT_REGISTRY_SORTED, lookupRegistryFormat, emptyScoringPolicy, FORMAT_STANDARD
|
|
2
|
+
export type { ScoringPolicyData, ScoringEditorConfig, MatchUpStatusKey, MatchUpFormatEntry, AllowedFormatEntry } from './types';
|
|
3
|
+
export { MATCH_UP_FORMAT_REGISTRY_SORTED, lookupRegistryFormat, emptyScoringPolicy, FORMAT_STANDARD } from './domain/scoringProjections';
|
|
@@ -17,9 +17,9 @@ export { buildJsonEditor } from './ui/jsonEditor';
|
|
|
17
17
|
export { SchedulingEditorControl, createSchedulingEditor, SchedulingEditorStore, validateSchedulingPolicy, formatCodeLabel, emptySchedulingPolicy, buildSchedulingEditorPanel } from './editors/scheduling';
|
|
18
18
|
export { RankingPointsEditorControl, createRankingPointsEditor, RankingPointsEditorStore, buildRankingPointsEditorPanel, emptyRankingPolicy } from './editors/ranking';
|
|
19
19
|
export { SeedingEditorControl, createSeedingEditor, SeedingEditorStore, buildSeedingEditorPanel, emptySeedingPolicy, POSITIONING_OPTIONS, DRAW_TYPE_OPTIONS } from './editors/seeding';
|
|
20
|
-
export { ScoringEditorControl, createScoringEditor, MATCH_UP_FORMAT_REGISTRY_SORTED, lookupRegistryFormat, emptyScoringPolicy, FORMAT_STANDARD
|
|
21
|
-
export type { ScoringPolicyData, ScoringEditorConfig, MatchUpStatusKey, MatchUpFormatEntry, AllowedFormatEntry
|
|
22
|
-
export { PrivacyEditorControl, createPrivacyEditor, PrivacyEditorStore, buildPrivacyEditorPanel, emptyPrivacyPolicy, privacyFields
|
|
20
|
+
export { ScoringEditorControl, createScoringEditor, MATCH_UP_FORMAT_REGISTRY_SORTED, lookupRegistryFormat, emptyScoringPolicy, FORMAT_STANDARD } from './editors/scoring';
|
|
21
|
+
export type { ScoringPolicyData, ScoringEditorConfig, MatchUpStatusKey, MatchUpFormatEntry, AllowedFormatEntry } from './editors/scoring';
|
|
22
|
+
export { PrivacyEditorControl, createPrivacyEditor, PrivacyEditorStore, buildPrivacyEditorPanel, emptyPrivacyPolicy, privacyFields } from './editors/privacy';
|
|
23
23
|
export type { PrivacyPolicyData, PrivacyEditorConfig, PrivacyFieldMeta } from './editors/privacy';
|
|
24
24
|
export type { PolicyCatalogItem, PolicyCatalogState, PolicyCatalogChangeListener, PolicyCatalogConfig, PolicyEditorInstance, PolicyEditorPlugin, PolicySource, PolicyTypeGroup, PolicyTypeMeta, CatalogGroupBy, UIPanel } from './types';
|
|
25
25
|
export type { SchedulingPolicyData, SchedulingEditorState, SchedulingEditorSection, SchedulingEditorChangeListener, SchedulingEditorConfig, SchedulingValidationResult, ValidationSeverity, MinutesEntry, AverageTimeEntry, RecoveryTimeEntry, MatchUpAverageTime, MatchUpRecoveryTime } from './editors/scheduling';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { buildRatingDistributionChart } from './ratingDistributionChart';
|
|
2
|
-
export type { RatingDistributionChartOptions, RatingDistributionChartMode
|
|
2
|
+
export type { RatingDistributionChartOptions, RatingDistributionChartMode } from './ratingDistributionChart';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TopologyEdge, TopologyNode } from '../types';
|
|
2
|
+
type EdgeLike = Pick<TopologyEdge, 'linkType' | 'sourceNodeId' | 'finishingPositions'>;
|
|
3
|
+
/** is the node an edge leaves a round robin */
|
|
4
|
+
export declare function leavesRoundRobin(edge: EdgeLike, nodes: TopologyNode[]): boolean;
|
|
5
|
+
/** a POSITION edge, or a WINNER edge out of a round robin that names finishingPositions */
|
|
6
|
+
export declare function traversesByFinishingPosition(edge: EdgeLike, nodes: TopologyNode[]): boolean;
|
|
7
|
+
/** a WINNER or LOSER edge that is not a finishing-position edge */
|
|
8
|
+
export declare function traversesByRound(edge: EdgeLike, nodes: TopologyNode[]): boolean;
|
|
9
|
+
/** a WINNER edge that carries the winners of a round */
|
|
10
|
+
export declare function isRoundWinnerEdge(edge: EdgeLike, nodes: TopologyNode[]): boolean;
|
|
11
|
+
/** an edge that carries a qualifying structure's qualifiers onward: its round winners, or its group finishers */
|
|
12
|
+
export declare function carriesQualifiers(edge: EdgeLike, nodes: TopologyNode[]): boolean;
|
|
13
|
+
/** the type an edge is drawn as: a finishing-position edge is drawn as POSITION whatever its label */
|
|
14
|
+
export declare function edgeDisplayType(edge: EdgeLike, nodes: TopologyNode[]): TopologyEdge['linkType'];
|
|
15
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { TopologyEdge, TopologyState } from '../types';
|
|
2
|
+
export interface EdgeEditMode {
|
|
3
|
+
/** a round winner edge out of a qualifying structure: edits its qualifying positions */
|
|
4
|
+
isQualifyingWinner: boolean;
|
|
5
|
+
/** a finishing-position edge out of a round robin, either label: edits finishing positions per group */
|
|
6
|
+
isRRPosition: boolean;
|
|
7
|
+
/** source and target round fields */
|
|
8
|
+
showRoundFields: boolean;
|
|
9
|
+
/** free-text finishing positions, for a finishing-position edge out of a structure that is not a round robin */
|
|
10
|
+
showFinishingPositionsInput: boolean;
|
|
11
|
+
showFeedProfile: boolean;
|
|
12
|
+
}
|
|
13
|
+
export declare function getEdgeEditMode(edge: TopologyEdge, state: Pick<TopologyState, 'nodes'>): EdgeEditMode;
|
|
14
|
+
/** the other finishing-position edges out of the same source: the positions they claim are not available */
|
|
15
|
+
export declare function siblingFinishingPositionEdges(edge: TopologyEdge, state: Pick<TopologyState, 'nodes' | 'edges'>): TopologyEdge[];
|