@ethlete/components 1.0.0-next.108 → 1.0.0-next.109
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/CHANGELOG.md +6 -0
- package/fesm2022/ethlete-components-bracket.mjs +128 -118
- package/fesm2022/ethlete-components-bracket.mjs.map +1 -1
- package/fesm2022/ethlete-components.mjs +7 -5
- package/fesm2022/ethlete-components.mjs.map +1 -1
- package/package.json +1 -1
- package/types/ethlete-components-bracket.d.ts +11 -2
- package/types/ethlete-components.d.ts +6 -4
package/package.json
CHANGED
|
@@ -265,8 +265,11 @@ export declare const TOURNAMENT_MODE: {
|
|
|
265
265
|
readonly SINGLE_ELIMINATION: "single-elimination";
|
|
266
266
|
readonly DOUBLE_ELIMINATION: "double-elimination";
|
|
267
267
|
readonly SWISS_WITH_ELIMINATION: "swiss-with-elimination";
|
|
268
|
+
readonly SWISS: "swiss";
|
|
268
269
|
};
|
|
269
270
|
export type TournamentMode = (typeof TOURNAMENT_MODE)[keyof typeof TOURNAMENT_MODE];
|
|
271
|
+
/** Whether a stage is drawn as swiss record groups: `'swiss-with-elimination'` or `'swiss'`, which eliminates nobody. */
|
|
272
|
+
export declare const isSwissMode: (mode: TournamentMode) => mode is "swiss-with-elimination" | "swiss";
|
|
270
273
|
/** Wins that advance a participant out of a swiss stage. */
|
|
271
274
|
export declare const SWISS_ADVANCE_WINS = 3;
|
|
272
275
|
/** Losses that eliminate a participant from a swiss stage. */
|
|
@@ -464,6 +467,8 @@ export type BracketRoundSwissGroup<TRoundData, TMatchData> = {
|
|
|
464
467
|
name: string;
|
|
465
468
|
matches: BracketMap<BracketMatchId, BracketMatch<TRoundData, TMatchData>>;
|
|
466
469
|
allowedMatchCount: number;
|
|
470
|
+
/** The record tone of the group - see {@link getSwissGroupColorType}. */
|
|
471
|
+
colorType: BracketSwissGroupColorType;
|
|
467
472
|
};
|
|
468
473
|
export type BracketRoundSwissGroupMap<TRoundData, TMatchData> = Map<BracketRoundSwissGroupId, BracketRoundSwissGroup<TRoundData, TMatchData>>;
|
|
469
474
|
export type BracketRoundSwissData<TRoundData, TMatchData> = {
|
|
@@ -490,8 +495,11 @@ export type BracketSwissGroupColorType = (typeof BRACKET_SWISS_GROUP_COLOR_TYPE)
|
|
|
490
495
|
* which default to `--et-surface-border`).
|
|
491
496
|
*/
|
|
492
497
|
export type BracketSwissColors = Partial<Record<BracketSwissGroupColorType, string>>;
|
|
493
|
-
|
|
494
|
-
export declare const
|
|
498
|
+
/** The record tone of a swiss group. A `'swiss'` stage eliminates nobody, so it has no negative tone. */
|
|
499
|
+
export declare const getSwissGroupColorType: (wins: number, losses: number, mode?: TournamentMode) => BracketSwissGroupColorType;
|
|
500
|
+
export declare const getAvailableSwissGroupsForRound: (roundNumber: number, totalMatchesInRound: number, mode?: TournamentMode) => {
|
|
501
|
+
wins: number;
|
|
502
|
+
losses: number;
|
|
495
503
|
id: BracketRoundSwissGroupId;
|
|
496
504
|
name: string;
|
|
497
505
|
matchesInGroup: number;
|
|
@@ -1079,6 +1087,7 @@ export declare const gutterPath: (from: BracketPosition, to: BracketPosition, op
|
|
|
1079
1087
|
export type BracketLayoutRegistration = {
|
|
1080
1088
|
name: string;
|
|
1081
1089
|
mode: TournamentMode;
|
|
1090
|
+
extraModes?: readonly TournamentMode[];
|
|
1082
1091
|
};
|
|
1083
1092
|
/** Returns the first registered layout matching the tournament mode. */
|
|
1084
1093
|
export declare const resolveBracketLayout: <TLayout extends BracketLayoutRegistration>(layouts: readonly TLayout[] | undefined, mode: TournamentMode) => TLayout;
|
|
@@ -2205,6 +2205,8 @@ export type BracketLayout<TRoundData = any, TMatchData = any> = {
|
|
|
2205
2205
|
* match in the registered array wins.
|
|
2206
2206
|
*/
|
|
2207
2207
|
mode: TournamentMode$1;
|
|
2208
|
+
/** More tournament modes this layout draws - `swissBracketLayout()` draws `'swiss'` too. */
|
|
2209
|
+
extraModes?: readonly TournamentMode$1[];
|
|
2208
2210
|
/** Positions the linked bracket's rounds and matches into a grid of columns. */
|
|
2209
2211
|
createGrid: (bracket: Bracket$1<TRoundData, TMatchData>, options: CreateBracketGridConfig$1, components: BracketComponents$1<TRoundData, TMatchData>) => ComputedBracketGrid$1<TRoundData, TMatchData>;
|
|
2210
2212
|
/**
|
|
@@ -3623,9 +3625,9 @@ export type SwissBracketLayoutOptions<TRoundData = any, TMatchData = any> = {
|
|
|
3623
3625
|
roundHeaderComponent?: BracketRoundHeaderComponent$1<TRoundData, TMatchData>;
|
|
3624
3626
|
};
|
|
3625
3627
|
/**
|
|
3626
|
-
* Draws a swiss stage
|
|
3627
|
-
*
|
|
3628
|
-
*
|
|
3628
|
+
* Draws a swiss stage as standings groups per round - winners climbing, losers sinking, group-to-group
|
|
3629
|
+
* connection lines instead of match-to-match. What a `mode` of `'swiss-with-elimination'` or `'swiss'`
|
|
3630
|
+
* renders once this is registered.
|
|
3629
3631
|
*
|
|
3630
3632
|
* @example
|
|
3631
3633
|
* provideBracketConfig({ layouts: [swissBracketLayout()] });
|
|
@@ -37594,5 +37596,5 @@ export declare const provideUnsavedChangesLabels: (labels: import("@ethlete/core
|
|
|
37594
37596
|
export declare const injectUnsavedChangesLabels: () => import("@angular/core").Signal<UnsavedChangesLabels>;
|
|
37595
37597
|
export declare const UNSAVED_CHANGES_LABELS: import("@angular/core").InjectionToken<import("@ethlete/core").LabelsSource<UnsavedChangesLabels>>;
|
|
37596
37598
|
/** The version of `@ethlete/components` this build was cut from. */
|
|
37597
|
-
export declare const COMPONENTS_VERSION = "1.0.0-next.
|
|
37599
|
+
export declare const COMPONENTS_VERSION = "1.0.0-next.109";
|
|
37598
37600
|
export { type AlertDialogComponentSlot, type AlertDialogSlot, type AlertDialogTemplateSlot, type AppointmentTreeNode, BRACKET_DATA_LAYOUT, BRACKET_ERROR_CODES, BRACKET_FINAL_ALIGNMENT, BRACKET_ROUND_MIRROR_TYPE, BRACKET_SECTION_KEY, BRACKET_SWISS_GROUP_COLOR_TYPE, type Bracket, type BracketByeSlotSource, type BracketComponents, type BracketContinueComponent, type BracketDataLayout, type BracketDataSource, type BracketDrawing, type BracketEdge, type BracketExternalSlotSource, type BracketFinalAlignment, type BracketGradient, type BracketGradientStop, type BracketGridSection, type BracketLayoutSettings, BracketMap, type BracketMatch, type BracketMatchComponent, type BracketMatchFactor, type BracketMatchId, type BracketMatchInputs, type BracketMatchOutcomeSlotSource, type BracketMatchParticipant, type BracketMatchPosition, type BracketMatchRelation, type BracketMatchRelationNone, type BracketMatchRelationNothingToOne, type BracketMatchRelationOneToNothing, type BracketMatchRelationOneToOne, type BracketMatchRelationTwoToNothing, type BracketMatchRelationTwoToOne, type BracketMatchShortId, type BracketMatchSlot, type BracketMatchSource, type BracketMatchStatus, type BracketParticipant, type BracketParticipantMatch, type BracketPickMigration, type BracketPickMigrationOptions, type BracketPickSet, type BracketRect, type BracketRound, type BracketRoundHeaderComponent, type BracketRoundId, type BracketRoundMapWithSwissData, type BracketRoundMirrorType, type BracketRoundPosition, type BracketRoundRelation, type BracketRoundRelationNone, type BracketRoundRelationNothingToOne, type BracketRoundRelationOneToNothing, type BracketRoundRelationOneToOne, type BracketRoundRelationTwoToNothing, type BracketRoundRelationTwoToOne, type BracketRoundShortId, type BracketRoundSource, type BracketRoundSwissData, type BracketRoundSwissGroup, type BracketRoundSwissGroupId, type BracketRoundSwissGroupMap, type BracketRoundType, BracketRuntimeError, type BracketSectionKey, type BracketSectionTitleComponent, type BracketSeedSlotSource, type BracketSlotResolutionPolicy, type BracketSlotSource, type BracketSlotSourceKind, type BracketStandingRankSide, type BracketStandingRankSlotSource, type BracketSwissBucketSlotSource, type BracketSwissColors, type BracketSwissGroupColorType, type BracketWarning, COMMON_BRACKET_ROUND_TYPE, type CalendarBandPosition, type CalendarInterval, type CalendarPrecision, type CalendarSelectionFlags, type CalendarView, type CalendarWeekStartsOn, type CascaderCompareWith, type CascaderDataSource, type CascaderNode, type CommonBracketRoundType, type ComputedBracketGrid, type CreateBracketGridConfig, type CreateBracketOptions, type CreateGridAdapterOptions, DOUBLE_ELIMINATION_BRACKET_ROUND_TYPE, type DateRangeSide, type DateRangeSide as TimeRangeInputSide, type DateRangeValue, type DateRangeValue as DateTimeRangeValue, type DateRangeValue as TimeRangeValue, type DoubleEliminationBracketRoundType, type DropzoneCropConfig, type DropzoneCropCorner, type DropzoneCropRect, type DropzoneCropShape, type DurationFormatSpec, type DurationSegment, type DurationUnit, GROUP_BRACKET_ROUND_TYPE, type GridAdapter, type GridAdapterBreakpoints, type GridConfig, type GroupBracketRoundType, type MatchParticipantId, type MatchParticipantShortId, type MatchParticipantSide, type ParticipantMatchResult, type PlaceholderBracketShape, type RichTextEditorHeadingLevel, type RichTextEditorImageFailure, type RichTextEditorImageFailureReason, type RichTextEditorImageUpload, type RichTextEditorImageUploadContext, type RichTextEditorImageUploadFn, type RichTextEditorTokenChip, type RichTextEditorTokenCodec, SINGLE_ELIMINATION_BRACKET_ROUND_TYPE, SWISS_BRACKET_ROUND_TYPE, type SchedulerAgendaDay, type SchedulerMonthDayCell, type SchedulerTimeGridAllDayEntry, type SchedulerTimeGridBlock, type SchedulerTimeGridDay, type SchedulerTimeGridSegment, type ScrollableActiveChildRef, type ScrollableButtonPosition, type ScrollableButtonsConfig, type ScrollableButtonsDefaults, type ScrollableChrome, type ScrollableChromeSlot, type ScrollableConfig, type ScrollableDirection, type ScrollableIntersectionChange, type ScrollableItemSize, type ScrollableLoadingTemplatePosition, type ScrollableLoadingTemplateRef, type ScrollableMaskVariant, type ScrollableNavigation, type ScrollableNavigationConfig, type ScrollableNavigationItem, type ScrollableResponsive, type ScrollableScrollMode, type ScrollableScrollOrigin, type ScrollableScrollState, type ScrollbarGeometry, type ScrollbarOrientation, type ScrollbarTarget, type SerializeOptions, type SingleEliminationBracketRoundType, type StandingPick, type StandingPickOutcome, type SwissBracketRoundType, TOURNAMENT_MODE, type TournamentMode, bracketSlot, createBracket, createPlaceholderBracketSource, injectRichTextEditorTools, isBracketSlotPredictable, migrateBracketPicks, resolveBracketSlot, standingRankSides, swapStandingRank, validateBracketSource };
|