@ethlete/cdk 4.71.1 → 4.72.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/CHANGELOG.md +29 -0
- package/fesm2022/ethlete-cdk.mjs +767 -236
- package/fesm2022/ethlete-cdk.mjs.map +1 -1
- package/index.d.ts +122 -8
- package/package.json +1 -1
package/fesm2022/ethlete-cdk.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { InjectionToken, inject, TemplateRef, ViewContainerRef, Directive, input, booleanAttribute, computed, isDevMode, model, contentChild, effect, untracked, ChangeDetectionStrategy, ViewEncapsulation, Component, contentChildren, ElementRef, Injector, HostBinding, Input, numberAttribute, Renderer2,
|
|
2
|
+
import { InjectionToken, inject, TemplateRef, ViewContainerRef, Directive, input, booleanAttribute, computed, isDevMode, model, contentChild, effect, untracked, ChangeDetectionStrategy, ViewEncapsulation, Component, contentChildren, ElementRef, Injector, HostBinding, Input, numberAttribute, Renderer2, NgZone, Injectable, ChangeDetectorRef, signal, viewChild, runInInjectionContext, ViewChild, ContentChildren, forwardRef, assertInInjectionContext, ContentChild, DestroyRef, viewChildren, EventEmitter, Output, ViewChildren, Optional, Inject, HostListener, SkipSelf, NgModule, isSignal, IterableDiffers, ComponentFactoryResolver, HostAttributeToken } from '@angular/core';
|
|
3
3
|
import * as i2 from '@angular/cdk/portal';
|
|
4
4
|
import { CdkPortal, PortalModule, ComponentPortal, TemplatePortal, CdkPortalOutlet } from '@angular/cdk/portal';
|
|
5
5
|
import { DomSanitizer, Title } from '@angular/platform-browser';
|
|
@@ -7,9 +7,9 @@ import { trigger, state, style, transition, animate } from '@angular/animations'
|
|
|
7
7
|
import { toObservable, takeUntilDestroyed, toSignal, outputFromObservable } from '@angular/core/rxjs-interop';
|
|
8
8
|
import { map, switchMap, combineLatest, pairwise, tap, BehaviorSubject, filter, Subject, Observable, of, takeUntil, startWith, debounceTime, fromEvent, take, merge, skipUntil, withLatestFrom, skip, timer, takeWhile, distinctUntilChanged, skipWhile, catchError, throwError, defer, partition, from, finalize, Subscription } from 'rxjs';
|
|
9
9
|
import { __decorate, __metadata } from 'tslib';
|
|
10
|
-
import { AsyncPipe, NgComponentOutlet, NgClass, NgTemplateOutlet, DOCUMENT
|
|
10
|
+
import { AsyncPipe, NgComponentOutlet, NgClass, NgTemplateOutlet, DOCUMENT, Location, NgStyle } from '@angular/common';
|
|
11
11
|
import * as i1 from '@ethlete/core';
|
|
12
|
-
import { Memo, createComponentId, IS_EMAIL, MUST_MATCH, IS_ARRAY_NOT_EMPTY, AT_LEAST_ONE_REQUIRED, createDestroy, equal, signalHostAttributes, signalElementDimensions, signalElementScrollState, createIsRenderedSignal, createCanAnimateSignal, useCursorDragScroll, signalElementIntersection, signalElementChildren, signalClasses, signalHostClasses, signalHostStyles, signalStyles, getIntersectionInfo, getElementScrollCoordinates, AnimatedOverlayDirective, AnimatedLifecycleDirective, ANIMATED_LIFECYCLE_TOKEN, ClickObserverService, switchQueryListChanges, controlValueSignal, signalAttributes, injectTemplateRef, signalHostElementScrollState, signalHostElementDimensions, previousSignalValue, nextFrame, syncSignal, injectHostElement, ObserveVisibilityDirective, signalVisibilityChangeClasses, ResizeObserverService, createFlipAnimation, RuntimeError, SelectionModel, ActiveSelectionModel, KeyPressManager, scrollToElement, isEmptyArray, isObjectArray, isPrimitiveArray, ClickOutsideDirective, ObserveContentDirective, clamp, DELAYABLE_TOKEN, ObserveResizeDirective, SmartBlockScrollStrategy, RootBoundaryDirective, elementCanScroll, cloneFormGroup, getFormGroupValue, ViewportService, injectRoute, ROOT_BOUNDARY_TOKEN, injectQueryParam, RouterStateService, fromNextFrame, isElementVisible, AnimatedIfDirective, FocusVisibleService, inferMimeType, TypedQueryList } from '@ethlete/core';
|
|
12
|
+
import { Memo, createStaticRootProvider, createComponentId, IS_EMAIL, MUST_MATCH, IS_ARRAY_NOT_EMPTY, AT_LEAST_ONE_REQUIRED, createDestroy, equal, signalHostAttributes, signalElementDimensions, signalElementScrollState, createIsRenderedSignal, createCanAnimateSignal, useCursorDragScroll, signalElementIntersection, signalElementChildren, signalClasses, signalHostClasses, signalHostStyles, signalStyles, getIntersectionInfo, getElementScrollCoordinates, AnimatedOverlayDirective, AnimatedLifecycleDirective, ANIMATED_LIFECYCLE_TOKEN, ClickObserverService, switchQueryListChanges, controlValueSignal, signalAttributes, injectTemplateRef, signalHostElementScrollState, signalHostElementDimensions, previousSignalValue, nextFrame, syncSignal, injectHostElement, ObserveVisibilityDirective, signalVisibilityChangeClasses, ResizeObserverService, createFlipAnimation, RuntimeError, SelectionModel, ActiveSelectionModel, KeyPressManager, scrollToElement, isEmptyArray, isObjectArray, isPrimitiveArray, ClickOutsideDirective, ObserveContentDirective, clamp, DELAYABLE_TOKEN, ObserveResizeDirective, SmartBlockScrollStrategy, RootBoundaryDirective, elementCanScroll, cloneFormGroup, getFormGroupValue, ViewportService, injectRoute, ROOT_BOUNDARY_TOKEN, injectQueryParam, RouterStateService, fromNextFrame, isElementVisible, AnimatedIfDirective, FocusVisibleService, inferMimeType, TypedQueryList } from '@ethlete/core';
|
|
13
13
|
import { ESCAPE, hasModifierKey, ENTER, SPACE, TAB as TAB$1, END, HOME, LEFT_ARROW, UP_ARROW, RIGHT_ARROW, DOWN_ARROW, BACKSPACE, A } from '@angular/cdk/keycodes';
|
|
14
14
|
import * as i1$1 from '@angular/cdk/a11y';
|
|
15
15
|
import { FocusMonitor, FocusKeyManager, FocusTrapFactory, InteractivityChecker, InputModalityDetector, AriaDescriber, A11yModule } from '@angular/cdk/a11y';
|
|
@@ -1770,7 +1770,13 @@ const generateMatchRelationsNew = (bracketData) => {
|
|
|
1770
1770
|
}
|
|
1771
1771
|
for (const match of bracketData.matches.values()) {
|
|
1772
1772
|
const relation = match.round.relation;
|
|
1773
|
-
const
|
|
1773
|
+
const positions = generateMatchRelationPositions(relation, match);
|
|
1774
|
+
// A round without a resolved relation (e.g. a truncated bracket where a round has no
|
|
1775
|
+
// successor/predecessor to wire up) keeps the placeholder relation from createNewBracket.
|
|
1776
|
+
// Skip it so the match renders without connector lines instead of crashing the whole bracket.
|
|
1777
|
+
if (!positions)
|
|
1778
|
+
continue;
|
|
1779
|
+
const { nextRoundMatchPosition, previousUpperRoundMatchPosition, previousLowerRoundMatchPosition } = positions;
|
|
1774
1780
|
switch (relation.type) {
|
|
1775
1781
|
case 'nothing-to-one':
|
|
1776
1782
|
matchRelations.push(createNothingToOneRelation$1({
|
|
@@ -2049,22 +2055,31 @@ const generateRoundRelationsNew = (bracketData) => {
|
|
|
2049
2055
|
}
|
|
2050
2056
|
if (hasLowerRounds && firstLowerRound) {
|
|
2051
2057
|
const assignedRoundIds = new Set(relations.map((r) => r.currentRound.id));
|
|
2052
|
-
for (let i = 0; i < lowerRounds.length
|
|
2058
|
+
for (let i = 0; i < lowerRounds.length; i++) {
|
|
2053
2059
|
const lowerRound = lowerRounds[i];
|
|
2054
2060
|
if (!lowerRound || assignedRoundIds.has(lowerRound.id))
|
|
2055
2061
|
continue;
|
|
2056
2062
|
const prevLowerRound = i > 0 ? (lowerRounds[i - 1] ?? null) : null;
|
|
2057
|
-
const nextLowerRound = lowerRounds[i + 1];
|
|
2058
|
-
if (
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2063
|
+
const nextLowerRound = lowerRounds[i + 1] ?? null;
|
|
2064
|
+
if (nextLowerRound) {
|
|
2065
|
+
if (!prevLowerRound) {
|
|
2066
|
+
relations.push(createNothingToOneRelation({ currentRound: lowerRound, nextRound: nextLowerRound }));
|
|
2067
|
+
}
|
|
2068
|
+
else {
|
|
2069
|
+
relations.push(createOneToOneRelation({
|
|
2070
|
+
currentRound: lowerRound,
|
|
2071
|
+
previousRound: prevLowerRound,
|
|
2072
|
+
nextRound: nextLowerRound,
|
|
2073
|
+
rootRound: firstLowerRound,
|
|
2074
|
+
}));
|
|
2075
|
+
}
|
|
2062
2076
|
}
|
|
2063
|
-
else {
|
|
2064
|
-
|
|
2077
|
+
else if (prevLowerRound) {
|
|
2078
|
+
// Truncated bracket: the last lower round has no final round to feed into, so it terminates here.
|
|
2079
|
+
// In a complete bracket this round is wired up by handleFinalRound and already in assignedRoundIds.
|
|
2080
|
+
relations.push(createOneToNothingRelation({
|
|
2065
2081
|
currentRound: lowerRound,
|
|
2066
2082
|
previousRound: prevLowerRound,
|
|
2067
|
-
nextRound: nextLowerRound,
|
|
2068
2083
|
rootRound: firstLowerRound,
|
|
2069
2084
|
}));
|
|
2070
2085
|
}
|
|
@@ -2254,10 +2269,31 @@ const logRoundRelations = (bracketData) => {
|
|
|
2254
2269
|
console.log();
|
|
2255
2270
|
};
|
|
2256
2271
|
|
|
2272
|
+
const SWISS_ADVANCE_WINS = 3;
|
|
2273
|
+
const SWISS_ELIMINATE_LOSSES = 3;
|
|
2274
|
+
const BRACKET_SWISS_GROUP_COLOR_TYPE = {
|
|
2275
|
+
/** The starting group (0-0) */
|
|
2276
|
+
NEUTRAL: 'neutral',
|
|
2277
|
+
/** The group has more wins than losses */
|
|
2278
|
+
POSITIVE: 'positive',
|
|
2279
|
+
/** The group is one loss away from elimination */
|
|
2280
|
+
NEGATIVE: 'negative',
|
|
2281
|
+
/** Everything in between */
|
|
2282
|
+
WARNING: 'warning',
|
|
2283
|
+
};
|
|
2284
|
+
const getSwissGroupColorType = (wins, losses) => {
|
|
2285
|
+
if (wins === 0 && losses === 0)
|
|
2286
|
+
return BRACKET_SWISS_GROUP_COLOR_TYPE.NEUTRAL;
|
|
2287
|
+
if (losses === SWISS_ELIMINATE_LOSSES - 1)
|
|
2288
|
+
return BRACKET_SWISS_GROUP_COLOR_TYPE.NEGATIVE;
|
|
2289
|
+
if (wins > losses)
|
|
2290
|
+
return BRACKET_SWISS_GROUP_COLOR_TYPE.POSITIVE;
|
|
2291
|
+
return BRACKET_SWISS_GROUP_COLOR_TYPE.WARNING;
|
|
2292
|
+
};
|
|
2257
2293
|
const factorialCache = new Map();
|
|
2258
2294
|
const getAvailableSwissGroupsForRound = (roundNumber, totalMatchesInRound) => {
|
|
2259
|
-
const ADVANCE_WINS =
|
|
2260
|
-
const ELIMINATE_LOSSES =
|
|
2295
|
+
const ADVANCE_WINS = SWISS_ADVANCE_WINS;
|
|
2296
|
+
const ELIMINATE_LOSSES = SWISS_ELIMINATE_LOSSES;
|
|
2261
2297
|
// Cache factorial calculations
|
|
2262
2298
|
const getFactorial = (n) => {
|
|
2263
2299
|
if (n <= 1)
|
|
@@ -2346,6 +2382,20 @@ const generateBracketRoundSwissGroupMaps = (bracketData) => {
|
|
|
2346
2382
|
return roundsWithSwissGroups;
|
|
2347
2383
|
};
|
|
2348
2384
|
|
|
2385
|
+
class NewBracketDefaultContinueComponent {
|
|
2386
|
+
constructor() {
|
|
2387
|
+
this.bracketMatches = input.required(...(ngDevMode ? [{ debugName: "bracketMatches" }] : []));
|
|
2388
|
+
}
|
|
2389
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: NewBracketDefaultContinueComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2390
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.3.6", type: NewBracketDefaultContinueComponent, isStandalone: true, selector: "et-new-bracket-default-continue", inputs: { bracketMatches: { classPropertyName: "bracketMatches", publicName: "bracketMatches", isSignal: true, isRequired: true, transformFunction: null } }, host: { classAttribute: "et-new-bracket-default-continue-host" }, ngImport: i0, template: ` Next stage ({{ bracketMatches().length }}) `, isInline: true, styles: [".et-new-bracket-default-continue-host{display:flex;padding:8px;border:1px dashed cyan;inline-size:100%;block-size:100%;justify-content:center;align-items:center;box-sizing:border-box;font-size:12px}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
2391
|
+
}
|
|
2392
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: NewBracketDefaultContinueComponent, decorators: [{
|
|
2393
|
+
type: Component,
|
|
2394
|
+
args: [{ selector: 'et-new-bracket-default-continue', template: ` Next stage ({{ bracketMatches().length }}) `, changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
2395
|
+
class: 'et-new-bracket-default-continue-host',
|
|
2396
|
+
}, styles: [".et-new-bracket-default-continue-host{display:flex;padding:8px;border:1px dashed cyan;inline-size:100%;block-size:100%;justify-content:center;align-items:center;box-sizing:border-box;font-size:12px}\n"] }]
|
|
2397
|
+
}], propDecorators: { bracketMatches: [{ type: i0.Input, args: [{ isSignal: true, alias: "bracketMatches", required: true }] }] } });
|
|
2398
|
+
|
|
2349
2399
|
class NewBracketDefaultMatchComponent {
|
|
2350
2400
|
constructor() {
|
|
2351
2401
|
this.bracketRound = input.required(...(ngDevMode ? [{ debugName: "bracketRound" }] : []));
|
|
@@ -2389,7 +2439,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImpor
|
|
|
2389
2439
|
}, styles: [".et-new-bracket-default-round-header-host{display:block;padding:8px;border:1px solid green;inline-size:100%;block-size:100%;display:flex;justify-content:center;align-items:center;box-sizing:border-box}\n"] }]
|
|
2390
2440
|
}], propDecorators: { bracketRound: [{ type: i0.Input, args: [{ isSignal: true, alias: "bracketRound", required: true }] }], bracketRoundSwissGroup: [{ type: i0.Input, args: [{ isSignal: true, alias: "bracketRoundSwissGroup", required: true }] }] } });
|
|
2391
2441
|
|
|
2392
|
-
const path = (d, options) => `<path d="${d.replace(/\s+/g, ' ').trim()}" stroke="currentColor" fill="none" stroke-width="${options.width}" stroke-dasharray="${options.dashArray}" stroke-dashoffset="${options.dashOffset}" class="${options.className}" />`;
|
|
2442
|
+
const path = (d, options) => `<path d="${d.replace(/\s+/g, ' ').trim()}" stroke="${options.stroke ?? 'currentColor'}" fill="none" stroke-width="${options.width}" stroke-dasharray="${options.dashArray}" stroke-dashoffset="${options.dashOffset}" class="${options.className}" />`;
|
|
2393
2443
|
|
|
2394
2444
|
const curvePath = (from, to, direction, options) => {
|
|
2395
2445
|
const inverted = options.inverted ?? false;
|
|
@@ -2426,97 +2476,6 @@ const curvePath = (from, to, direction, options) => {
|
|
|
2426
2476
|
return path(d, options.path);
|
|
2427
2477
|
};
|
|
2428
2478
|
|
|
2429
|
-
const linePath = (from, to, options) => {
|
|
2430
|
-
return path(`M ${from.inline.end} ${from.block.center} L ${to.inline.start} ${to.block.center}`, options.path);
|
|
2431
|
-
};
|
|
2432
|
-
|
|
2433
|
-
const makePos = (dimensions) => ({
|
|
2434
|
-
block: {
|
|
2435
|
-
start: dimensions.top,
|
|
2436
|
-
end: dimensions.top + dimensions.height,
|
|
2437
|
-
center: dimensions.top + dimensions.height / 2,
|
|
2438
|
-
},
|
|
2439
|
-
inline: {
|
|
2440
|
-
start: dimensions.left,
|
|
2441
|
-
end: dimensions.left + dimensions.width,
|
|
2442
|
-
center: dimensions.left + dimensions.width / 2,
|
|
2443
|
-
},
|
|
2444
|
-
});
|
|
2445
|
-
const drawMan = (dimensions) => {
|
|
2446
|
-
const svgParts = [];
|
|
2447
|
-
for (const col of dimensions.bracketGrid.columns) {
|
|
2448
|
-
for (const el of col.elements) {
|
|
2449
|
-
if (el.type === 'header')
|
|
2450
|
-
continue;
|
|
2451
|
-
const currentMatchParticipantsShortIds = [el.match.home?.shortId, el.match.away?.shortId]
|
|
2452
|
-
.filter((id) => !!id)
|
|
2453
|
-
.join(' ');
|
|
2454
|
-
const pathOptions = { ...dimensions.path, className: currentMatchParticipantsShortIds };
|
|
2455
|
-
const currentPos = makePos(el.dimensions);
|
|
2456
|
-
// No lines for the third place match
|
|
2457
|
-
if (el.round.type === COMMON_BRACKET_ROUND_TYPE.THIRD_PLACE)
|
|
2458
|
-
continue;
|
|
2459
|
-
switch (el.match.relation.type) {
|
|
2460
|
-
case 'nothing-to-one': {
|
|
2461
|
-
continue;
|
|
2462
|
-
}
|
|
2463
|
-
case 'one-to-nothing':
|
|
2464
|
-
case 'one-to-one': {
|
|
2465
|
-
const prev = dimensions.bracketGrid.matchElementMap.getOrThrow(el.match.relation.previousMatch.id);
|
|
2466
|
-
const prevPos = makePos(prev.dimensions);
|
|
2467
|
-
// draw a straight line
|
|
2468
|
-
svgParts.push(linePath(prevPos, currentPos, { path: pathOptions }));
|
|
2469
|
-
break;
|
|
2470
|
-
}
|
|
2471
|
-
case 'two-to-nothing':
|
|
2472
|
-
case 'two-to-one': {
|
|
2473
|
-
const prevUpper = dimensions.bracketGrid.matchElementMap.getOrThrow(el.match.relation.previousUpperMatch.id);
|
|
2474
|
-
const prevLower = dimensions.bracketGrid.matchElementMap.getOrThrow(el.match.relation.previousLowerMatch.id);
|
|
2475
|
-
const prevUpperPos = makePos(prevUpper.dimensions);
|
|
2476
|
-
const prevLowerPos = makePos(prevLower.dimensions);
|
|
2477
|
-
const isLowerUpperMerger = el.match.relation.previousLowerRound.id !== el.match.relation.previousUpperRound.id;
|
|
2478
|
-
const invertCurve = el.round.mirrorRoundType === BRACKET_ROUND_MIRROR_TYPE.RIGHT;
|
|
2479
|
-
const curveOptions = {
|
|
2480
|
-
...dimensions.curve,
|
|
2481
|
-
inverted: invertCurve,
|
|
2482
|
-
path: { ...dimensions.path, className: '' },
|
|
2483
|
-
};
|
|
2484
|
-
if (isLowerUpperMerger) {
|
|
2485
|
-
svgParts.push(linePath(prevUpperPos, currentPos, { path: pathOptions }));
|
|
2486
|
-
}
|
|
2487
|
-
else {
|
|
2488
|
-
// draw two lines that merge into one in the middle
|
|
2489
|
-
svgParts.push(curvePath(prevUpperPos, currentPos, 'down', {
|
|
2490
|
-
...curveOptions,
|
|
2491
|
-
path: {
|
|
2492
|
-
...curveOptions.path,
|
|
2493
|
-
className: el.match.relation.previousUpperMatch.winner?.shortId || '',
|
|
2494
|
-
},
|
|
2495
|
-
}));
|
|
2496
|
-
}
|
|
2497
|
-
svgParts.push(curvePath(prevLowerPos, currentPos, 'up', {
|
|
2498
|
-
...curveOptions,
|
|
2499
|
-
path: {
|
|
2500
|
-
...curveOptions.path,
|
|
2501
|
-
className: el.match.relation.previousLowerMatch.winner?.shortId || '',
|
|
2502
|
-
},
|
|
2503
|
-
}));
|
|
2504
|
-
if (el.round.mirrorRoundType === BRACKET_ROUND_MIRROR_TYPE.RIGHT &&
|
|
2505
|
-
el.match.relation.type === 'two-to-one' &&
|
|
2506
|
-
el.match.relation.nextRound.mirrorRoundType === null) {
|
|
2507
|
-
// draw a straight line for the special case of connecting the final match to the mirrored semi final match
|
|
2508
|
-
const next = dimensions.bracketGrid.matchElementMap.getOrThrow(el.match.relation.nextMatch.id);
|
|
2509
|
-
const nextPos = makePos(next.dimensions);
|
|
2510
|
-
svgParts.push(linePath(nextPos, currentPos, { path: pathOptions }));
|
|
2511
|
-
}
|
|
2512
|
-
break;
|
|
2513
|
-
}
|
|
2514
|
-
}
|
|
2515
|
-
}
|
|
2516
|
-
}
|
|
2517
|
-
return svgParts.join('');
|
|
2518
|
-
};
|
|
2519
|
-
|
|
2520
2479
|
const createBracketElementPart = (config) => {
|
|
2521
2480
|
const { elementPartHeight } = config;
|
|
2522
2481
|
const newElementPart = {
|
|
@@ -2578,6 +2537,13 @@ const createBracketElement = (config) => {
|
|
|
2578
2537
|
...newElementBase,
|
|
2579
2538
|
type,
|
|
2580
2539
|
};
|
|
2540
|
+
case 'continue':
|
|
2541
|
+
return {
|
|
2542
|
+
...newElementBase,
|
|
2543
|
+
type,
|
|
2544
|
+
component: config.component,
|
|
2545
|
+
matches: config.matches,
|
|
2546
|
+
};
|
|
2581
2547
|
default:
|
|
2582
2548
|
throw new Error(`Unknown element type: ${type}`);
|
|
2583
2549
|
}
|
|
@@ -2634,6 +2600,14 @@ const finalizeBracketGrid = (grid) => {
|
|
|
2634
2600
|
elements.push(matchEl);
|
|
2635
2601
|
finalizedElementMap.set(element.match.id, matchEl);
|
|
2636
2602
|
}
|
|
2603
|
+
else if (element.type === 'continue') {
|
|
2604
|
+
elements.push({
|
|
2605
|
+
type: 'continue',
|
|
2606
|
+
dimensions: element.dimensions,
|
|
2607
|
+
component: element.component,
|
|
2608
|
+
matches: element.matches,
|
|
2609
|
+
});
|
|
2610
|
+
}
|
|
2637
2611
|
}
|
|
2638
2612
|
if (!lastSubColumn.span.isEnd) {
|
|
2639
2613
|
for (let index = masterColumnIndex + 1; index < grid.grid.masterColumns.length; index++) {
|
|
@@ -2696,22 +2670,23 @@ const createBracketGrid = (config) => {
|
|
|
2696
2670
|
}
|
|
2697
2671
|
for (let secIdx = 0; secIdx < sections.length; secIdx++) {
|
|
2698
2672
|
const section = sections[secIdx];
|
|
2673
|
+
const sectionPadding = section.padding ?? padding;
|
|
2699
2674
|
let sectionPaddingTop;
|
|
2700
2675
|
if (secIdx === 0) {
|
|
2701
|
-
sectionPaddingTop = firstSectionIsHeader ? 0 :
|
|
2676
|
+
sectionPaddingTop = firstSectionIsHeader ? 0 : sectionPadding.top;
|
|
2702
2677
|
}
|
|
2703
2678
|
else {
|
|
2704
|
-
sectionPaddingTop =
|
|
2679
|
+
sectionPaddingTop = sectionPadding.top;
|
|
2705
2680
|
}
|
|
2706
2681
|
section.dimensions.width = masterColumn.dimensions.width;
|
|
2707
2682
|
section.dimensions.left = masterColumn.dimensions.left;
|
|
2708
2683
|
section.dimensions.top = runningTop;
|
|
2709
2684
|
runningTop += sectionPaddingTop;
|
|
2710
|
-
const contentWidth = masterColumn.dimensions.width -
|
|
2685
|
+
const contentWidth = masterColumn.dimensions.width - sectionPadding.left - sectionPadding.right;
|
|
2711
2686
|
const subColumns = section.subColumns;
|
|
2712
2687
|
const totalSubColumns = subColumns.length;
|
|
2713
2688
|
const subColumnWidth = contentWidth / totalSubColumns;
|
|
2714
|
-
let currentSubColumnLeft = masterColumn.dimensions.left +
|
|
2689
|
+
let currentSubColumnLeft = masterColumn.dimensions.left + sectionPadding.left;
|
|
2715
2690
|
let maxSectionHeight = 0;
|
|
2716
2691
|
for (let scIdx = 0; scIdx < totalSubColumns; scIdx++) {
|
|
2717
2692
|
const subColumn = subColumns[scIdx];
|
|
@@ -2747,8 +2722,8 @@ const createBracketGrid = (config) => {
|
|
|
2747
2722
|
maxSectionHeight = totalSubColumnHeight;
|
|
2748
2723
|
currentSubColumnLeft += subColumnWidth;
|
|
2749
2724
|
}
|
|
2750
|
-
section.dimensions.height = maxSectionHeight +
|
|
2751
|
-
runningTop += maxSectionHeight +
|
|
2725
|
+
section.dimensions.height = maxSectionHeight + sectionPadding.bottom;
|
|
2726
|
+
runningTop += maxSectionHeight + sectionPadding.bottom;
|
|
2752
2727
|
}
|
|
2753
2728
|
masterColumn.dimensions.height = runningTop;
|
|
2754
2729
|
if (masterColumn.dimensions.height > maxGridHeight)
|
|
@@ -2782,7 +2757,14 @@ const createBracketGrid = (config) => {
|
|
|
2782
2757
|
const totalSpannedWidth = calculateSpannedWidth(span, masterCols);
|
|
2783
2758
|
const spanStartLeft = calculateSpanStartLeft(span, masterCols);
|
|
2784
2759
|
const width = config.spanElementWidth;
|
|
2785
|
-
|
|
2760
|
+
// Winner bracket rounds span two lower bracket columns. Left-align them within that
|
|
2761
|
+
// span (factor 0) instead of centering (factor 0.5) so each winner round n sits above
|
|
2762
|
+
// the lower bracket round its losers drop into (round 2n-2) — the round whose matches
|
|
2763
|
+
// merge into the next one. That makes the participant's drop target unambiguous. Every
|
|
2764
|
+
// other spanning round (e.g. lower rounds split across sub-columns) stays centered.
|
|
2765
|
+
const round = element.type === 'header' || element.type === 'match' ? element.round : null;
|
|
2766
|
+
const alignFactor = round?.type === DOUBLE_ELIMINATION_BRACKET_ROUND_TYPE.UPPER_BRACKET ? 0 : 0.5;
|
|
2767
|
+
spanDimensions.set(spanKey, { width, left: spanStartLeft + (totalSpannedWidth - width) * alignFactor });
|
|
2786
2768
|
}
|
|
2787
2769
|
const storedDimensions = spanDimensions.get(spanKey);
|
|
2788
2770
|
if (storedDimensions) {
|
|
@@ -2950,7 +2932,7 @@ const createBracketMasterColumn = (config) => {
|
|
|
2950
2932
|
};
|
|
2951
2933
|
|
|
2952
2934
|
const createBracketMasterColumnSection = (config) => {
|
|
2953
|
-
const { type } = config;
|
|
2935
|
+
const { type, padding } = config;
|
|
2954
2936
|
const subColumns = [];
|
|
2955
2937
|
const newMasterColumnSection = {
|
|
2956
2938
|
dimensions: {
|
|
@@ -2961,6 +2943,7 @@ const createBracketMasterColumnSection = (config) => {
|
|
|
2961
2943
|
},
|
|
2962
2944
|
subColumns,
|
|
2963
2945
|
type,
|
|
2946
|
+
padding,
|
|
2964
2947
|
};
|
|
2965
2948
|
const pushSubColumn = (...newSubColumns) => {
|
|
2966
2949
|
subColumns.push(...newSubColumns);
|
|
@@ -3172,6 +3155,63 @@ const calculateUpperRoundIndex = (subColumnIndex, upperToLowerRatio, splitFactor
|
|
|
3172
3155
|
return Math.floor(adjustedColumnIndex / upperToLowerRatio) + 1;
|
|
3173
3156
|
};
|
|
3174
3157
|
|
|
3158
|
+
const isBracketContinueMatch = (match) => match.round.type !== COMMON_BRACKET_ROUND_TYPE.THIRD_PLACE &&
|
|
3159
|
+
(match.relation.type === 'one-to-nothing' || match.relation.type === 'two-to-nothing');
|
|
3160
|
+
const getBracketContinueMatches = (bracketData) => Array.from(bracketData.matches.values()).filter((match) => isBracketContinueMatch(match));
|
|
3161
|
+
const createBracketContinueMasterColumn = (config) => {
|
|
3162
|
+
const { existingMasterColumns, columnWidth, elementHeight, headerOffset, component, matches } = config;
|
|
3163
|
+
const lastMasterColumn = existingMasterColumns[existingMasterColumns.length - 1];
|
|
3164
|
+
if (!lastMasterColumn) {
|
|
3165
|
+
throw new Error('No last master column found in existing master columns');
|
|
3166
|
+
}
|
|
3167
|
+
// Dimensions are not calculated yet at this point, but all part heights are static, so the
|
|
3168
|
+
// total column height is the sum of the tallest sub column of every section.
|
|
3169
|
+
const totalHeight = lastMasterColumn.sections.reduce((height, section) => {
|
|
3170
|
+
const sectionHeight = Math.max(0, ...section.subColumns.map((subColumn) => subColumn.elements.reduce((subColumnHeight, element) => subColumnHeight + element.parts.reduce((sum, part) => sum + part.dimensions.height, 0), 0)));
|
|
3171
|
+
return height + sectionHeight;
|
|
3172
|
+
}, 0);
|
|
3173
|
+
const { masterColumn, pushSection } = createBracketMasterColumn({
|
|
3174
|
+
columnWidth,
|
|
3175
|
+
padding: {
|
|
3176
|
+
bottom: 0,
|
|
3177
|
+
left: 0,
|
|
3178
|
+
right: 0,
|
|
3179
|
+
top: 0,
|
|
3180
|
+
},
|
|
3181
|
+
});
|
|
3182
|
+
const { masterColumnSection, pushSubColumn } = createBracketMasterColumnSection({
|
|
3183
|
+
type: 'round',
|
|
3184
|
+
});
|
|
3185
|
+
const { subColumn, pushElement } = createBracketSubColumn({
|
|
3186
|
+
span: {
|
|
3187
|
+
isStart: true,
|
|
3188
|
+
isEnd: true,
|
|
3189
|
+
},
|
|
3190
|
+
});
|
|
3191
|
+
if (headerOffset > 0) {
|
|
3192
|
+
const { element: headerGapElement } = createBracketElement({
|
|
3193
|
+
area: '.',
|
|
3194
|
+
type: 'colGap',
|
|
3195
|
+
elementHeight: headerOffset,
|
|
3196
|
+
partHeights: [headerOffset],
|
|
3197
|
+
});
|
|
3198
|
+
pushElement(headerGapElement);
|
|
3199
|
+
}
|
|
3200
|
+
const containerHeight = Math.max(elementHeight, totalHeight - headerOffset);
|
|
3201
|
+
const { element: continueElement } = createBracketElement({
|
|
3202
|
+
area: 'continue',
|
|
3203
|
+
type: 'continue',
|
|
3204
|
+
elementHeight,
|
|
3205
|
+
partHeights: [containerHeight],
|
|
3206
|
+
component,
|
|
3207
|
+
matches,
|
|
3208
|
+
});
|
|
3209
|
+
pushElement(continueElement);
|
|
3210
|
+
pushSubColumn(subColumn);
|
|
3211
|
+
pushSection(masterColumnSection);
|
|
3212
|
+
return masterColumn;
|
|
3213
|
+
};
|
|
3214
|
+
|
|
3175
3215
|
const createBracketGapMasterColumn = (config) => {
|
|
3176
3216
|
const { existingMasterColumns, columnGap } = config;
|
|
3177
3217
|
const lastMasterColumn = existingMasterColumns[existingMasterColumns.length - 1];
|
|
@@ -3327,14 +3367,26 @@ const createRoundBracketSubColumnRelativeToFirstRound = (config) => {
|
|
|
3327
3367
|
|
|
3328
3368
|
const createDoubleEliminationGrid = (bracketData, options, components) => {
|
|
3329
3369
|
const grid = createBracketGrid({ spanElementWidth: options.columnWidth });
|
|
3330
|
-
const
|
|
3370
|
+
const presentUpperBracketRounds = Array.from(bracketData.roundsByType.getOrThrow(DOUBLE_ELIMINATION_BRACKET_ROUND_TYPE.UPPER_BRACKET).values());
|
|
3331
3371
|
const lowerBracketRounds = Array.from(bracketData.roundsByType.getOrThrow(DOUBLE_ELIMINATION_BRACKET_ROUND_TYPE.LOWER_BRACKET).values());
|
|
3372
|
+
// A complete winner bracket has (lowerRounds / 2) + 1 rounds. If fewer are present, the winner
|
|
3373
|
+
// bracket starts later than round 1 — e.g. a small double elimination where lower-round 1 is
|
|
3374
|
+
// seeded directly from a group phase and has no winner round feeding it. Pad the front of the
|
|
3375
|
+
// winner rounds with nulls so the column mapping keeps treating the winner bracket as complete:
|
|
3376
|
+
// the missing early rounds become empty slots above the lower rounds they never fed, and every
|
|
3377
|
+
// present winner round lines up above its real drop-in lower round.
|
|
3378
|
+
const fullUpperRoundCount = Math.floor(lowerBracketRounds.length / 2) + 1;
|
|
3379
|
+
const frontMissingUpperRounds = Math.max(0, fullUpperRoundCount - presentUpperBracketRounds.length);
|
|
3380
|
+
const upperBracketRounds = [
|
|
3381
|
+
...Array.from({ length: frontMissingUpperRounds }, () => null),
|
|
3382
|
+
...presentUpperBracketRounds,
|
|
3383
|
+
];
|
|
3332
3384
|
const remainingRounds = Array.from(bracketData.rounds.values()).filter((r) => r.type !== DOUBLE_ELIMINATION_BRACKET_ROUND_TYPE.UPPER_BRACKET &&
|
|
3333
3385
|
r.type !== DOUBLE_ELIMINATION_BRACKET_ROUND_TYPE.LOWER_BRACKET &&
|
|
3334
3386
|
r.type !== COMMON_BRACKET_ROUND_TYPE.THIRD_PLACE);
|
|
3335
3387
|
const thirdPlaceRound = bracketData.roundsByType.get(COMMON_BRACKET_ROUND_TYPE.THIRD_PLACE)?.first() ?? null;
|
|
3336
3388
|
const hasReverseFinal = !!bracketData.roundsByType.get(DOUBLE_ELIMINATION_BRACKET_ROUND_TYPE.REVERSE_FINAL)?.first();
|
|
3337
|
-
const firstUpperRound =
|
|
3389
|
+
const firstUpperRound = presentUpperBracketRounds[0];
|
|
3338
3390
|
const firstLowerRound = lowerBracketRounds[0];
|
|
3339
3391
|
if (!firstUpperRound || !firstLowerRound) {
|
|
3340
3392
|
throw new Error('No upper or lower rounds found in bracket data');
|
|
@@ -3377,10 +3429,11 @@ const createDoubleEliminationGrid = (bracketData, options, components) => {
|
|
|
3377
3429
|
const nextUpperRoundIndex = calculateUpperRoundIndex(nextSubColumnIndex, upperToLowerRatio, columnSplitFactor);
|
|
3378
3430
|
const previousLowerRoundIndex = previousSubColumnIndex >= 0 ? calculateLowerRoundIndex(previousSubColumnIndex, columnSplitFactor) : -1;
|
|
3379
3431
|
const nextLowerRoundIndex = calculateLowerRoundIndex(nextSubColumnIndex, columnSplitFactor);
|
|
3380
|
-
|
|
3381
|
-
if (!upperRound) {
|
|
3432
|
+
if (currentUpperRoundIndex < 0 || currentUpperRoundIndex >= upperBracketRounds.length) {
|
|
3382
3433
|
throw new Error('Upper round not found for subColumnIndex: ' + subColumnIndex);
|
|
3383
3434
|
}
|
|
3435
|
+
// May be null for a leading winner slot that does not exist (front-truncated winner bracket).
|
|
3436
|
+
const upperRound = upperBracketRounds[currentUpperRoundIndex];
|
|
3384
3437
|
// For upper bracket spans - check if this round is different from the previous occurrence
|
|
3385
3438
|
const isUpperSpanStart = isFirstSubColumnInMasterColumn
|
|
3386
3439
|
? lowerRoundIndex === 0 || lastRoundLastSubColumnUpperIndex !== currentUpperRoundIndex
|
|
@@ -3400,18 +3453,34 @@ const createDoubleEliminationGrid = (bracketData, options, components) => {
|
|
|
3400
3453
|
calculateLowerRoundIndex((lowerRoundIndex + 1) * columnSplitFactor, columnSplitFactor) !==
|
|
3401
3454
|
currentLowerRoundIndex
|
|
3402
3455
|
: nextLowerRoundIndex !== currentLowerRoundIndex;
|
|
3403
|
-
const
|
|
3404
|
-
|
|
3405
|
-
|
|
3406
|
-
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
}
|
|
3414
|
-
|
|
3456
|
+
const upperSpan = { isStart: isUpperSpanStart, isEnd: isUpperSpanEnd };
|
|
3457
|
+
if (upperRound) {
|
|
3458
|
+
pushUpperSubColumn(createRoundBracketSubColumnRelativeToFirstRound({
|
|
3459
|
+
firstRound: firstUpperRound,
|
|
3460
|
+
round: upperRound,
|
|
3461
|
+
options,
|
|
3462
|
+
hasReverseFinal,
|
|
3463
|
+
span: upperSpan,
|
|
3464
|
+
components,
|
|
3465
|
+
}));
|
|
3466
|
+
}
|
|
3467
|
+
else {
|
|
3468
|
+
// Empty leading winner slot: reserve the same vertical space a real winner round (rendered
|
|
3469
|
+
// relative to the first present round) would occupy, so the lower bracket rows below stay
|
|
3470
|
+
// aligned, but render nothing in it.
|
|
3471
|
+
const emptyUpperHeight = (options.roundHeaderHeight > 0 ? options.roundHeaderHeight + options.roundHeaderGap : 0) +
|
|
3472
|
+
firstUpperRound.matchCount * options.matchHeight +
|
|
3473
|
+
Math.max(0, firstUpperRound.matchCount - 1) * options.rowGap;
|
|
3474
|
+
const { subColumn: emptyUpperSubColumn, pushElement: pushEmptyUpperElement } = createBracketSubColumn({ span: upperSpan });
|
|
3475
|
+
const { element: emptyUpperElement } = createBracketElement({
|
|
3476
|
+
area: '.',
|
|
3477
|
+
type: 'colGap',
|
|
3478
|
+
elementHeight: emptyUpperHeight,
|
|
3479
|
+
partHeights: [emptyUpperHeight],
|
|
3480
|
+
});
|
|
3481
|
+
pushEmptyUpperElement(emptyUpperElement);
|
|
3482
|
+
pushUpperSubColumn(emptyUpperSubColumn);
|
|
3483
|
+
}
|
|
3415
3484
|
const upperLowerGapSubColumn = createBracketSubColumn({
|
|
3416
3485
|
span: {
|
|
3417
3486
|
isStart: true,
|
|
@@ -3445,7 +3514,11 @@ const createDoubleEliminationGrid = (bracketData, options, components) => {
|
|
|
3445
3514
|
}
|
|
3446
3515
|
pushSection(upperSection, upperLowerGapSection, lowerSection);
|
|
3447
3516
|
grid.pushMasterColumn(masterColumn);
|
|
3448
|
-
|
|
3517
|
+
// Always separate consecutive lower rounds with a gap column. The trailing gap after the
|
|
3518
|
+
// last lower round is only needed to connect to the finals section (remainingRounds); in a
|
|
3519
|
+
// truncated bracket without a final we must still gap the intermediate rounds, otherwise the
|
|
3520
|
+
// rounds sit flush against each other and their connector lines collapse to zero width.
|
|
3521
|
+
if (!isLastLowerRound || remainingRounds.length) {
|
|
3449
3522
|
grid.pushMasterColumn(createBracketGapMasterColumn({
|
|
3450
3523
|
existingMasterColumns: grid.grid.masterColumns,
|
|
3451
3524
|
columnGap: options.columnGap,
|
|
@@ -3552,6 +3625,23 @@ const createDoubleEliminationGrid = (bracketData, options, components) => {
|
|
|
3552
3625
|
}));
|
|
3553
3626
|
}
|
|
3554
3627
|
}
|
|
3628
|
+
if (options.continueElement && components.continue) {
|
|
3629
|
+
const continueMatches = getBracketContinueMatches(bracketData);
|
|
3630
|
+
if (continueMatches.length) {
|
|
3631
|
+
grid.pushMasterColumn(createBracketGapMasterColumn({
|
|
3632
|
+
existingMasterColumns: grid.grid.masterColumns,
|
|
3633
|
+
columnGap: options.columnGap,
|
|
3634
|
+
}));
|
|
3635
|
+
grid.pushMasterColumn(createBracketContinueMasterColumn({
|
|
3636
|
+
existingMasterColumns: grid.grid.masterColumns,
|
|
3637
|
+
columnWidth: options.continueElement.columnWidth,
|
|
3638
|
+
elementHeight: options.continueElement.elementHeight,
|
|
3639
|
+
headerOffset: options.roundHeaderHeight > 0 ? options.roundHeaderHeight + options.roundHeaderGap : 0,
|
|
3640
|
+
component: components.continue,
|
|
3641
|
+
matches: continueMatches,
|
|
3642
|
+
}));
|
|
3643
|
+
}
|
|
3644
|
+
}
|
|
3555
3645
|
grid.setupElementSpans();
|
|
3556
3646
|
grid.calculateDimensions();
|
|
3557
3647
|
const finalizedGrid = finalizeBracketGrid(grid);
|
|
@@ -3604,6 +3694,23 @@ const createSingleEliminationGrid = (bracketData, options, components) => {
|
|
|
3604
3694
|
}));
|
|
3605
3695
|
}
|
|
3606
3696
|
}
|
|
3697
|
+
if (options.continueElement && components.continue) {
|
|
3698
|
+
const continueMatches = getBracketContinueMatches(bracketData);
|
|
3699
|
+
if (continueMatches.length) {
|
|
3700
|
+
grid.pushMasterColumn(createBracketGapMasterColumn({
|
|
3701
|
+
existingMasterColumns: grid.grid.masterColumns,
|
|
3702
|
+
columnGap: options.columnGap,
|
|
3703
|
+
}));
|
|
3704
|
+
grid.pushMasterColumn(createBracketContinueMasterColumn({
|
|
3705
|
+
existingMasterColumns: grid.grid.masterColumns,
|
|
3706
|
+
columnWidth: options.continueElement.columnWidth,
|
|
3707
|
+
elementHeight: options.continueElement.elementHeight,
|
|
3708
|
+
headerOffset: options.roundHeaderHeight > 0 ? options.roundHeaderHeight + options.roundHeaderGap : 0,
|
|
3709
|
+
component: components.continue,
|
|
3710
|
+
matches: continueMatches,
|
|
3711
|
+
}));
|
|
3712
|
+
}
|
|
3713
|
+
}
|
|
3607
3714
|
grid.calculateDimensions();
|
|
3608
3715
|
const finalizedGrid = finalizeBracketGrid(grid);
|
|
3609
3716
|
return {
|
|
@@ -3613,47 +3720,84 @@ const createSingleEliminationGrid = (bracketData, options, components) => {
|
|
|
3613
3720
|
};
|
|
3614
3721
|
};
|
|
3615
3722
|
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3723
|
+
const getSwissGroupBoxPadding = (options) => options.swissGroupPadding + options.swissGroupBorderWidth;
|
|
3724
|
+
const calculateSwissColumnMetrics = (groupMap, options) => {
|
|
3725
|
+
const includeHeaders = options.roundHeaderHeight > 0;
|
|
3726
|
+
const boxPadding = getSwissGroupBoxPadding(options);
|
|
3727
|
+
let naturalHeight = 0;
|
|
3728
|
+
let stretchableGapCount = 0;
|
|
3729
|
+
for (const [groupIndex, group] of Array.from(groupMap.groups.values()).entries()) {
|
|
3730
|
+
if (groupIndex !== 0) {
|
|
3731
|
+
// The gap section between two groups
|
|
3732
|
+
naturalHeight += options.rowRoundGap;
|
|
3733
|
+
stretchableGapCount++;
|
|
3734
|
+
}
|
|
3735
|
+
// The round header gap is not stretchable: the first match should always sit directly
|
|
3736
|
+
// below it, no matter how much a column gets stretched.
|
|
3737
|
+
if (includeHeaders) {
|
|
3738
|
+
naturalHeight += options.roundHeaderHeight + options.roundHeaderGap;
|
|
3739
|
+
}
|
|
3740
|
+
const matchGapCount = Math.max(0, group.matches.size - 1);
|
|
3741
|
+
naturalHeight += boxPadding * 2 + group.matches.size * options.matchHeight + matchGapCount * options.rowGap;
|
|
3742
|
+
stretchableGapCount += matchGapCount;
|
|
3743
|
+
}
|
|
3744
|
+
return { naturalHeight, stretchableGapCount };
|
|
3745
|
+
};
|
|
3746
|
+
// The naturally tallest master column (the round with the most groups) keeps the original
|
|
3747
|
+
// gaps (rowGap, rowRoundGap, roundHeaderGap) and defines the total bracket height.
|
|
3748
|
+
// The master cols before it are stretched to that height by distributing the missing
|
|
3749
|
+
// height evenly across all of their gap elements.
|
|
3750
|
+
// The master cols after it keep the original gaps, resulting in a top alignment. They get
|
|
3751
|
+
// one more gap element at the end of the column to fill the remaining space if any.
|
|
3624
3752
|
const createSwissGrid = (bracketData, options, components) => {
|
|
3625
3753
|
const swissGroupMaps = generateBracketRoundSwissGroupMaps(bracketData);
|
|
3626
3754
|
if (!swissGroupMaps)
|
|
3627
3755
|
throw new Error('Unable to generate Swiss groups for the provided bracket data');
|
|
3628
3756
|
const grid = createBracketGrid({ spanElementWidth: options.columnWidth });
|
|
3629
|
-
|
|
3757
|
+
const groupMaps = Array.from(swissGroupMaps.values());
|
|
3758
|
+
const columnMetrics = groupMaps.map((groupMap) => calculateSwissColumnMetrics(groupMap, options));
|
|
3759
|
+
const totalHeight = Math.max(...columnMetrics.map((metrics) => metrics.naturalHeight));
|
|
3760
|
+
const longestColumnIndex = columnMetrics.findIndex((metrics) => metrics.naturalHeight === totalHeight);
|
|
3761
|
+
for (const [groupMapIndex, groupMap] of groupMaps.entries()) {
|
|
3630
3762
|
const isLastGroupMap = groupMapIndex === swissGroupMaps.size - 1;
|
|
3763
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
3764
|
+
const metrics = columnMetrics[groupMapIndex];
|
|
3765
|
+
const heightToFill = totalHeight - metrics.naturalHeight;
|
|
3766
|
+
const isStretched = groupMapIndex < longestColumnIndex && metrics.stretchableGapCount > 0;
|
|
3767
|
+
const gapStretch = isStretched ? heightToFill / metrics.stretchableGapCount : 0;
|
|
3768
|
+
const rowGap = options.rowGap + gapStretch;
|
|
3769
|
+
const rowRoundGap = options.rowRoundGap + gapStretch;
|
|
3770
|
+
// The border and group padding are part of the column width (the match elements
|
|
3771
|
+
// shrink by them), so the column footprint stays at columnWidth and the group borders
|
|
3772
|
+
// drawn around the matches don't overflow the bracket container. The padding lives on
|
|
3773
|
+
// the match list sections, the header and gap sections stay unpadded and span the
|
|
3774
|
+
// whole column width.
|
|
3775
|
+
const boxPadding = getSwissGroupBoxPadding(options);
|
|
3631
3776
|
const { masterColumn, pushSection } = createBracketMasterColumn({
|
|
3632
3777
|
columnWidth: options.columnWidth,
|
|
3633
3778
|
padding: {
|
|
3634
|
-
bottom:
|
|
3635
|
-
left:
|
|
3636
|
-
right:
|
|
3637
|
-
top:
|
|
3779
|
+
bottom: 0,
|
|
3780
|
+
left: 0,
|
|
3781
|
+
right: 0,
|
|
3782
|
+
top: 0,
|
|
3638
3783
|
},
|
|
3639
3784
|
});
|
|
3640
3785
|
for (const [groupIndex, group] of Array.from(groupMap.groups.values()).entries()) {
|
|
3641
3786
|
const isLastGroup = groupIndex === groupMap.groups.size - 1;
|
|
3642
|
-
const { masterColumnSection, pushSubColumn } = createBracketMasterColumnSection({
|
|
3643
|
-
type: 'round',
|
|
3644
|
-
});
|
|
3645
|
-
const { subColumn, pushElement } = createBracketSubColumn({
|
|
3646
|
-
span: {
|
|
3647
|
-
isStart: true,
|
|
3648
|
-
isEnd: true,
|
|
3649
|
-
},
|
|
3650
|
-
});
|
|
3651
|
-
const elementsToCreate = [];
|
|
3652
3787
|
if (options.roundHeaderHeight > 0) {
|
|
3653
3788
|
const firstMatchRound = group.matches.first()?.round;
|
|
3654
3789
|
if (!firstMatchRound)
|
|
3655
3790
|
throw new Error('No rounds found in Swiss group');
|
|
3656
|
-
|
|
3791
|
+
const headerColumnSection = createBracketMasterColumnSection({
|
|
3792
|
+
type: 'round',
|
|
3793
|
+
});
|
|
3794
|
+
const headerSubColumn = createBracketSubColumn({
|
|
3795
|
+
span: {
|
|
3796
|
+
isStart: true,
|
|
3797
|
+
isEnd: true,
|
|
3798
|
+
},
|
|
3799
|
+
});
|
|
3800
|
+
const headerElement = createBracketElement({
|
|
3657
3801
|
type: 'header',
|
|
3658
3802
|
area: `h${group.id}`,
|
|
3659
3803
|
partHeights: [options.roundHeaderHeight],
|
|
@@ -3661,13 +3805,33 @@ const createSwissGrid = (bracketData, options, components) => {
|
|
|
3661
3805
|
component: components.roundHeader,
|
|
3662
3806
|
round: firstMatchRound,
|
|
3663
3807
|
roundSwissGroup: group,
|
|
3664
|
-
}
|
|
3808
|
+
});
|
|
3809
|
+
const headerGapElement = createBracketElement({
|
|
3665
3810
|
type: 'roundHeaderGap',
|
|
3666
3811
|
area: '.',
|
|
3667
3812
|
partHeights: [options.roundHeaderGap],
|
|
3668
3813
|
elementHeight: options.roundHeaderGap,
|
|
3669
3814
|
});
|
|
3815
|
+
headerSubColumn.pushElement(headerElement.element, headerGapElement.element);
|
|
3816
|
+
headerColumnSection.pushSubColumn(headerSubColumn.subColumn);
|
|
3817
|
+
pushSection(headerColumnSection.masterColumnSection);
|
|
3670
3818
|
}
|
|
3819
|
+
const { masterColumnSection, pushSubColumn } = createBracketMasterColumnSection({
|
|
3820
|
+
type: 'round',
|
|
3821
|
+
padding: {
|
|
3822
|
+
bottom: boxPadding,
|
|
3823
|
+
left: boxPadding,
|
|
3824
|
+
right: boxPadding,
|
|
3825
|
+
top: boxPadding,
|
|
3826
|
+
},
|
|
3827
|
+
});
|
|
3828
|
+
const { subColumn, pushElement } = createBracketSubColumn({
|
|
3829
|
+
span: {
|
|
3830
|
+
isStart: true,
|
|
3831
|
+
isEnd: true,
|
|
3832
|
+
},
|
|
3833
|
+
});
|
|
3834
|
+
const elementsToCreate = [];
|
|
3671
3835
|
for (const [matchIndex, match] of Array.from(group.matches.values()).entries()) {
|
|
3672
3836
|
const isLastMatch = matchIndex === group.matches.size - 1;
|
|
3673
3837
|
elementsToCreate.push({
|
|
@@ -3684,8 +3848,8 @@ const createSwissGrid = (bracketData, options, components) => {
|
|
|
3684
3848
|
elementsToCreate.push({
|
|
3685
3849
|
type: 'matchGap',
|
|
3686
3850
|
area: '.',
|
|
3687
|
-
partHeights: [
|
|
3688
|
-
elementHeight:
|
|
3851
|
+
partHeights: [rowGap],
|
|
3852
|
+
elementHeight: rowGap,
|
|
3689
3853
|
});
|
|
3690
3854
|
}
|
|
3691
3855
|
}
|
|
@@ -3708,14 +3872,37 @@ const createSwissGrid = (bracketData, options, components) => {
|
|
|
3708
3872
|
const groupGapElement = createBracketElement({
|
|
3709
3873
|
area: '.',
|
|
3710
3874
|
type: 'roundGap',
|
|
3711
|
-
elementHeight:
|
|
3712
|
-
partHeights: [
|
|
3875
|
+
elementHeight: rowRoundGap,
|
|
3876
|
+
partHeights: [rowRoundGap],
|
|
3713
3877
|
});
|
|
3714
3878
|
groupGapSubColumn.pushElement(groupGapElement.element);
|
|
3715
3879
|
groupGapColumnSection.pushSubColumn(groupGapSubColumn.subColumn);
|
|
3716
3880
|
pushSection(groupGapColumnSection.masterColumnSection);
|
|
3717
3881
|
}
|
|
3718
3882
|
}
|
|
3883
|
+
// Top aligned columns end above the total height, so we fill the remaining space with
|
|
3884
|
+
// one last gap element.
|
|
3885
|
+
const fillerHeight = isStretched ? 0 : heightToFill;
|
|
3886
|
+
if (fillerHeight > 0) {
|
|
3887
|
+
const fillerColumnSection = createBracketMasterColumnSection({
|
|
3888
|
+
type: 'gap',
|
|
3889
|
+
});
|
|
3890
|
+
const fillerSubColumn = createBracketSubColumn({
|
|
3891
|
+
span: {
|
|
3892
|
+
isStart: true,
|
|
3893
|
+
isEnd: true,
|
|
3894
|
+
},
|
|
3895
|
+
});
|
|
3896
|
+
const fillerElement = createBracketElement({
|
|
3897
|
+
area: '.',
|
|
3898
|
+
type: 'colGap',
|
|
3899
|
+
elementHeight: fillerHeight,
|
|
3900
|
+
partHeights: [fillerHeight],
|
|
3901
|
+
});
|
|
3902
|
+
fillerSubColumn.pushElement(fillerElement.element);
|
|
3903
|
+
fillerColumnSection.pushSubColumn(fillerSubColumn.subColumn);
|
|
3904
|
+
pushSection(fillerColumnSection.masterColumnSection);
|
|
3905
|
+
}
|
|
3719
3906
|
grid.pushMasterColumn(masterColumn);
|
|
3720
3907
|
if (!isLastGroupMap) {
|
|
3721
3908
|
grid.pushMasterColumn(createBracketGapMasterColumn({
|
|
@@ -3726,7 +3913,6 @@ const createSwissGrid = (bracketData, options, components) => {
|
|
|
3726
3913
|
}
|
|
3727
3914
|
grid.calculateDimensions();
|
|
3728
3915
|
const finalizedGrid = finalizeBracketGrid(grid);
|
|
3729
|
-
console.log(grid);
|
|
3730
3916
|
return {
|
|
3731
3917
|
raw: grid,
|
|
3732
3918
|
columns: finalizedGrid.columns,
|
|
@@ -3734,50 +3920,367 @@ const createSwissGrid = (bracketData, options, components) => {
|
|
|
3734
3920
|
};
|
|
3735
3921
|
};
|
|
3736
3922
|
|
|
3737
|
-
const
|
|
3738
|
-
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3923
|
+
const linePath = (from, to, options) => {
|
|
3924
|
+
return path(`M ${from.inline.end} ${from.block.center} L ${to.inline.start} ${to.block.center}`, options.path);
|
|
3925
|
+
};
|
|
3926
|
+
|
|
3927
|
+
const makePos = (dimensions) => ({
|
|
3928
|
+
block: {
|
|
3929
|
+
start: dimensions.top,
|
|
3930
|
+
end: dimensions.top + dimensions.height,
|
|
3931
|
+
center: dimensions.top + dimensions.height / 2,
|
|
3932
|
+
},
|
|
3933
|
+
inline: {
|
|
3934
|
+
start: dimensions.left,
|
|
3935
|
+
end: dimensions.left + dimensions.width,
|
|
3936
|
+
center: dimensions.left + dimensions.width / 2,
|
|
3937
|
+
},
|
|
3938
|
+
});
|
|
3939
|
+
const drawMan = (dimensions) => {
|
|
3940
|
+
const svgParts = [];
|
|
3941
|
+
const continueElement = dimensions.bracketGrid.columns
|
|
3942
|
+
.flatMap((col) => col.elements)
|
|
3943
|
+
.find((el) => el.type === 'continue');
|
|
3944
|
+
const continuePos = continueElement ? makePos(continueElement.dimensions) : null;
|
|
3945
|
+
const continueSources = [];
|
|
3946
|
+
for (const col of dimensions.bracketGrid.columns) {
|
|
3947
|
+
for (const el of col.elements) {
|
|
3948
|
+
if (el.type !== 'match')
|
|
3949
|
+
continue;
|
|
3950
|
+
const currentMatchParticipantsShortIds = [el.match.home?.shortId, el.match.away?.shortId]
|
|
3951
|
+
.filter((id) => !!id)
|
|
3952
|
+
.join(' ');
|
|
3953
|
+
const pathOptions = { ...dimensions.path, className: currentMatchParticipantsShortIds };
|
|
3954
|
+
const currentPos = makePos(el.dimensions);
|
|
3955
|
+
// No lines for the third place match
|
|
3956
|
+
if (el.round.type === COMMON_BRACKET_ROUND_TYPE.THIRD_PLACE)
|
|
3957
|
+
continue;
|
|
3958
|
+
if (continuePos && isBracketContinueMatch(el.match)) {
|
|
3959
|
+
continueSources.push({ pos: currentPos, className: el.match.winner?.shortId || '' });
|
|
3960
|
+
}
|
|
3961
|
+
switch (el.match.relation.type) {
|
|
3962
|
+
case 'nothing-to-one': {
|
|
3963
|
+
continue;
|
|
3964
|
+
}
|
|
3965
|
+
case 'one-to-nothing':
|
|
3966
|
+
case 'one-to-one': {
|
|
3967
|
+
const prev = dimensions.bracketGrid.matchElementMap.getOrThrow(el.match.relation.previousMatch.id);
|
|
3968
|
+
const prevPos = makePos(prev.dimensions);
|
|
3969
|
+
// draw a straight line
|
|
3970
|
+
svgParts.push(linePath(prevPos, currentPos, { path: pathOptions }));
|
|
3971
|
+
break;
|
|
3972
|
+
}
|
|
3973
|
+
case 'two-to-nothing':
|
|
3974
|
+
case 'two-to-one': {
|
|
3975
|
+
const prevUpper = dimensions.bracketGrid.matchElementMap.getOrThrow(el.match.relation.previousUpperMatch.id);
|
|
3976
|
+
const prevLower = dimensions.bracketGrid.matchElementMap.getOrThrow(el.match.relation.previousLowerMatch.id);
|
|
3977
|
+
const prevUpperPos = makePos(prevUpper.dimensions);
|
|
3978
|
+
const prevLowerPos = makePos(prevLower.dimensions);
|
|
3979
|
+
const isLowerUpperMerger = el.match.relation.previousLowerRound.id !== el.match.relation.previousUpperRound.id;
|
|
3980
|
+
const invertCurve = el.round.mirrorRoundType === BRACKET_ROUND_MIRROR_TYPE.RIGHT;
|
|
3981
|
+
const curveOptions = {
|
|
3982
|
+
...dimensions.curve,
|
|
3983
|
+
inverted: invertCurve,
|
|
3984
|
+
path: { ...dimensions.path, className: '' },
|
|
3985
|
+
};
|
|
3986
|
+
if (isLowerUpperMerger) {
|
|
3987
|
+
svgParts.push(linePath(prevUpperPos, currentPos, { path: pathOptions }));
|
|
3988
|
+
}
|
|
3989
|
+
else {
|
|
3990
|
+
// draw two lines that merge into one in the middle
|
|
3991
|
+
svgParts.push(curvePath(prevUpperPos, currentPos, 'down', {
|
|
3992
|
+
...curveOptions,
|
|
3993
|
+
path: {
|
|
3994
|
+
...curveOptions.path,
|
|
3995
|
+
className: el.match.relation.previousUpperMatch.winner?.shortId || '',
|
|
3996
|
+
},
|
|
3997
|
+
}));
|
|
3998
|
+
}
|
|
3999
|
+
svgParts.push(curvePath(prevLowerPos, currentPos, 'up', {
|
|
4000
|
+
...curveOptions,
|
|
4001
|
+
path: {
|
|
4002
|
+
...curveOptions.path,
|
|
4003
|
+
className: el.match.relation.previousLowerMatch.winner?.shortId || '',
|
|
4004
|
+
},
|
|
4005
|
+
}));
|
|
4006
|
+
if (el.round.mirrorRoundType === BRACKET_ROUND_MIRROR_TYPE.RIGHT &&
|
|
4007
|
+
el.match.relation.type === 'two-to-one' &&
|
|
4008
|
+
el.match.relation.nextRound.mirrorRoundType === null) {
|
|
4009
|
+
// draw a straight line for the special case of connecting the final match to the mirrored semi final match
|
|
4010
|
+
const next = dimensions.bracketGrid.matchElementMap.getOrThrow(el.match.relation.nextMatch.id);
|
|
4011
|
+
const nextPos = makePos(next.dimensions);
|
|
4012
|
+
svgParts.push(linePath(nextPos, currentPos, { path: pathOptions }));
|
|
4013
|
+
}
|
|
4014
|
+
break;
|
|
4015
|
+
}
|
|
4016
|
+
}
|
|
4017
|
+
}
|
|
4018
|
+
}
|
|
4019
|
+
if (continuePos && continueSources.length) {
|
|
4020
|
+
const continuePathOptions = dimensions.continuePath ?? dimensions.path;
|
|
4021
|
+
const sharedPathOptions = { ...continuePathOptions, className: '' };
|
|
4022
|
+
const curveAmount = dimensions.curve.lineStartingCurveAmount;
|
|
4023
|
+
const trunkInline = continuePos.inline.start - dimensions.columnGap / 2;
|
|
4024
|
+
const continueBlockCenter = continuePos.block.center;
|
|
4025
|
+
const sourceBlocks = continueSources.map((source) => source.pos.block.center);
|
|
4026
|
+
const firstSourceBlock = Math.min(...sourceBlocks);
|
|
4027
|
+
const lastSourceBlock = Math.max(...sourceBlocks);
|
|
4028
|
+
const trunkBlocks = [continueBlockCenter];
|
|
4029
|
+
for (const source of continueSources) {
|
|
4030
|
+
const sourceBlockCenter = source.pos.block.center;
|
|
4031
|
+
const blockDistance = continueBlockCenter - sourceBlockCenter;
|
|
4032
|
+
const sourcePathOptions = { ...continuePathOptions, className: source.className };
|
|
4033
|
+
const isTrunkCorner = (sourceBlockCenter === firstSourceBlock && blockDistance > 0.5) ||
|
|
4034
|
+
(sourceBlockCenter === lastSourceBlock && blockDistance < -0.5);
|
|
4035
|
+
if (!isTrunkCorner) {
|
|
4036
|
+
svgParts.push(path(`M ${source.pos.inline.end} ${sourceBlockCenter} H ${trunkInline}`, sourcePathOptions));
|
|
4037
|
+
trunkBlocks.push(sourceBlockCenter);
|
|
4038
|
+
}
|
|
4039
|
+
else {
|
|
4040
|
+
const curve = Math.min(curveAmount, Math.abs(blockDistance));
|
|
4041
|
+
const curveEndBlock = sourceBlockCenter + curve * Math.sign(blockDistance);
|
|
4042
|
+
svgParts.push(path(`M ${source.pos.inline.end} ${sourceBlockCenter}
|
|
4043
|
+
H ${trunkInline - curve}
|
|
4044
|
+
Q ${trunkInline} ${sourceBlockCenter}, ${trunkInline} ${curveEndBlock}`, sourcePathOptions));
|
|
4045
|
+
trunkBlocks.push(curveEndBlock);
|
|
3744
4046
|
}
|
|
4047
|
+
}
|
|
4048
|
+
const trunkBlockStart = Math.min(...trunkBlocks);
|
|
4049
|
+
const trunkBlockEnd = Math.max(...trunkBlocks);
|
|
4050
|
+
if (trunkBlockEnd - trunkBlockStart > 0.5) {
|
|
4051
|
+
svgParts.push(path(`M ${trunkInline} ${trunkBlockStart} V ${trunkBlockEnd}`, sharedPathOptions));
|
|
4052
|
+
}
|
|
4053
|
+
svgParts.push(path(`M ${trunkInline} ${continueBlockCenter} H ${continuePos.inline.start}`, sharedPathOptions));
|
|
4054
|
+
}
|
|
4055
|
+
return svgParts.join('');
|
|
4056
|
+
};
|
|
3745
4057
|
|
|
3746
|
-
|
|
3747
|
-
|
|
4058
|
+
// Every finalized column of a swiss grid is one group section. The connection lines run
|
|
4059
|
+
// from group to group instead of match to match: the winners of group (w-l) move to group
|
|
4060
|
+
// (w+1-l) inside the next round, the losers move to group (w-l+1).
|
|
4061
|
+
const collectSwissRoundGeometries = (bracketGrid) => {
|
|
4062
|
+
const rounds = new Map();
|
|
4063
|
+
for (const column of bracketGrid.columns) {
|
|
4064
|
+
const matchElements = column.elements.filter((element) => element.type === 'match');
|
|
4065
|
+
const group = matchElements[0]?.roundSwissGroup;
|
|
4066
|
+
const round = matchElements[0]?.round;
|
|
4067
|
+
if (!group || !round)
|
|
4068
|
+
continue;
|
|
4069
|
+
const [wins, losses] = group.id.split('-').map(Number);
|
|
4070
|
+
if (wins === undefined || losses === undefined || isNaN(wins) || isNaN(losses)) {
|
|
4071
|
+
throw new Error(`Unable to parse wins and losses from Swiss group id: ${group.id}`);
|
|
4072
|
+
}
|
|
4073
|
+
const matchesTop = Math.min(...matchElements.map((element) => element.dimensions.top));
|
|
4074
|
+
const matchesBottom = Math.max(...matchElements.map((element) => element.dimensions.top + element.dimensions.height));
|
|
4075
|
+
const winnerShortIds = [];
|
|
4076
|
+
const loserShortIds = [];
|
|
4077
|
+
for (const element of matchElements) {
|
|
4078
|
+
if (!element.match.winner)
|
|
4079
|
+
continue;
|
|
4080
|
+
const winner = element.match.winner;
|
|
4081
|
+
const loser = element.match.home?.id === winner.id ? element.match.away : element.match.home;
|
|
4082
|
+
winnerShortIds.push(winner.shortId);
|
|
4083
|
+
if (loser)
|
|
4084
|
+
loserShortIds.push(loser.shortId);
|
|
4085
|
+
}
|
|
4086
|
+
// The lines attach to the group border, which wraps the matches plus the group
|
|
4087
|
+
// padding and therefore matches the section bounds horizontally.
|
|
4088
|
+
const position = {
|
|
4089
|
+
block: {
|
|
4090
|
+
start: matchesTop,
|
|
4091
|
+
end: matchesBottom,
|
|
4092
|
+
center: (matchesTop + matchesBottom) / 2,
|
|
4093
|
+
},
|
|
4094
|
+
inline: {
|
|
4095
|
+
start: column.dimensions.left,
|
|
4096
|
+
end: column.dimensions.left + column.dimensions.width,
|
|
4097
|
+
center: column.dimensions.left + column.dimensions.width / 2,
|
|
4098
|
+
},
|
|
4099
|
+
};
|
|
4100
|
+
let roundGeometry = rounds.get(round.id);
|
|
4101
|
+
if (!roundGeometry) {
|
|
4102
|
+
roundGeometry = { groups: new Map() };
|
|
4103
|
+
rounds.set(round.id, roundGeometry);
|
|
4104
|
+
}
|
|
4105
|
+
roundGeometry.groups.set(group.id, {
|
|
4106
|
+
id: group.id,
|
|
4107
|
+
wins,
|
|
4108
|
+
losses,
|
|
4109
|
+
colorType: getSwissGroupColorType(wins, losses),
|
|
4110
|
+
position,
|
|
4111
|
+
winnerShortIds,
|
|
4112
|
+
loserShortIds,
|
|
4113
|
+
});
|
|
4114
|
+
}
|
|
4115
|
+
// The finalized columns are ordered left to right, so first appearance equals round order
|
|
4116
|
+
return Array.from(rounds.values());
|
|
4117
|
+
};
|
|
4118
|
+
const groupBorderRect = (group, border, color) => {
|
|
4119
|
+
// The group box wraps the matches plus the group padding plus the border itself. The
|
|
4120
|
+
// rect is inset by half the stroke width so the stroke renders fully inside the group
|
|
4121
|
+
// bounds instead of getting cut off at the edges of the bracket container.
|
|
4122
|
+
const boxPadding = border.padding + border.width;
|
|
4123
|
+
const strokeInset = border.width / 2;
|
|
4124
|
+
const x = group.position.inline.start + strokeInset;
|
|
4125
|
+
const y = group.position.block.start - boxPadding + strokeInset;
|
|
4126
|
+
const width = group.position.inline.end - group.position.inline.start - border.width;
|
|
4127
|
+
const height = group.position.block.end - group.position.block.start + boxPadding * 2 - border.width;
|
|
4128
|
+
return `<rect x="${x}" y="${y}" width="${width}" height="${height}" rx="${border.radius}" stroke="${color ?? 'currentColor'}" fill="none" stroke-width="${border.width}" class="et-bracket-new-swiss-group-border et-bracket-new-swiss-group-border--${group.id} et-bracket-new-swiss-group-border--${group.colorType}" />`;
|
|
4129
|
+
};
|
|
4130
|
+
// A horizontal gradient for the connection lines: they leave the source group in its
|
|
4131
|
+
// color, fade to the neutral color towards their vertical jog in the middle and fade into
|
|
4132
|
+
// the target group color on the second half. The connection lines always run from left to
|
|
4133
|
+
// right, so user space coordinates can be used (they also work for straight lines, where
|
|
4134
|
+
// the bounding box has no height).
|
|
4135
|
+
const lineGradientDef = (id, fromX, toX, from, neutral, to) => `<linearGradient id="${id}" gradientUnits="userSpaceOnUse" x1="${fromX}" y1="0" x2="${toX}" y2="0"><stop offset="0%" stop-color="${from}" /><stop offset="50%" stop-color="${neutral}" /><stop offset="100%" stop-color="${to}" /></linearGradient>`;
|
|
4136
|
+
const drawSwissMan = (dimensions) => {
|
|
4137
|
+
const svgParts = [];
|
|
4138
|
+
const gradientDefs = [];
|
|
4139
|
+
const roundGeometries = collectSwissRoundGeometries(dimensions.bracketGrid);
|
|
4140
|
+
const colors = dimensions.colors;
|
|
4141
|
+
for (const roundGeometry of roundGeometries) {
|
|
4142
|
+
for (const group of roundGeometry.groups.values()) {
|
|
4143
|
+
svgParts.push(groupBorderRect(group, dimensions.groupBorder, colors?.[group.colorType]));
|
|
4144
|
+
}
|
|
4145
|
+
}
|
|
4146
|
+
const curveOptions = {
|
|
4147
|
+
lineStartingCurveAmount: dimensions.curve.lineStartingCurveAmount,
|
|
4148
|
+
lineEndingCurveAmount: dimensions.curve.lineStartingCurveAmount,
|
|
4149
|
+
};
|
|
4150
|
+
let edgeIndex = 0;
|
|
4151
|
+
for (const [roundIndex, roundGeometry] of roundGeometries.entries()) {
|
|
4152
|
+
const nextRoundGeometry = roundGeometries[roundIndex + 1];
|
|
4153
|
+
if (!nextRoundGeometry)
|
|
4154
|
+
break;
|
|
4155
|
+
for (const group of roundGeometry.groups.values()) {
|
|
4156
|
+
const targets = [
|
|
4157
|
+
{ geometry: nextRoundGeometry.groups.get(`${group.wins + 1}-${group.losses}`), shortIds: group.winnerShortIds },
|
|
4158
|
+
{ geometry: nextRoundGeometry.groups.get(`${group.wins}-${group.losses + 1}`), shortIds: group.loserShortIds },
|
|
4159
|
+
];
|
|
4160
|
+
for (const { geometry: target, shortIds } of targets) {
|
|
4161
|
+
if (!target)
|
|
4162
|
+
continue;
|
|
4163
|
+
const neutralColor = colors?.neutral;
|
|
4164
|
+
const fromColor = colors?.[group.colorType] ?? neutralColor;
|
|
4165
|
+
const toColor = colors?.[target.colorType] ?? neutralColor;
|
|
4166
|
+
let stroke = neutralColor;
|
|
4167
|
+
if (neutralColor && (fromColor !== neutralColor || toColor !== neutralColor)) {
|
|
4168
|
+
const gradientId = `${dimensions.idPrefix}-swiss-line-${edgeIndex}`;
|
|
4169
|
+
const fromX = group.position.inline.end;
|
|
4170
|
+
const toX = target.position.inline.start;
|
|
4171
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
4172
|
+
gradientDefs.push(lineGradientDef(gradientId, fromX, toX, fromColor, neutralColor, toColor));
|
|
4173
|
+
stroke = `url(#${gradientId})`;
|
|
4174
|
+
}
|
|
4175
|
+
const pathOptions = { ...dimensions.path, className: shortIds.join(' '), stroke };
|
|
4176
|
+
const blockDelta = target.position.block.center - group.position.block.center;
|
|
4177
|
+
if (Math.abs(blockDelta) < 0.5) {
|
|
4178
|
+
svgParts.push(linePath(group.position, target.position, { path: pathOptions }));
|
|
4179
|
+
}
|
|
4180
|
+
else {
|
|
4181
|
+
svgParts.push(curvePath(group.position, target.position, blockDelta > 0 ? 'down' : 'up', {
|
|
4182
|
+
...curveOptions,
|
|
4183
|
+
path: pathOptions,
|
|
4184
|
+
}));
|
|
4185
|
+
}
|
|
4186
|
+
edgeIndex++;
|
|
3748
4187
|
}
|
|
3749
|
-
|
|
3750
|
-
`;
|
|
4188
|
+
}
|
|
3751
4189
|
}
|
|
3752
|
-
|
|
4190
|
+
const defs = gradientDefs.length ? `<defs>${gradientDefs.join('')}</defs>` : '';
|
|
4191
|
+
return defs + svgParts.join('');
|
|
3753
4192
|
};
|
|
3754
4193
|
|
|
4194
|
+
const PARTICIPANT_SHORT_ID_PATTERN = /^p\d+$/;
|
|
4195
|
+
const JOURNEY_HOVER_HOST_CLASS = 'et-new-bracket-host--journey-hover';
|
|
4196
|
+
const JOURNEY_ACTIVE_ELEMENT_CLASS = 'et-bracket-new-journey-active';
|
|
4197
|
+
const getParticipantShortIds = (element) => element ? Array.from(element.classList).filter((cls) => PARTICIPANT_SHORT_ID_PATTERN.test(cls)) : [];
|
|
4198
|
+
const setupJourneyHighlight = (host, renderer) => {
|
|
4199
|
+
let activeElements = [];
|
|
4200
|
+
let activeShortIds = [];
|
|
4201
|
+
const clear = () => {
|
|
4202
|
+
if (!activeElements.length)
|
|
4203
|
+
return;
|
|
4204
|
+
for (const el of activeElements) {
|
|
4205
|
+
renderer.removeClass(el, JOURNEY_ACTIVE_ELEMENT_CLASS);
|
|
4206
|
+
}
|
|
4207
|
+
renderer.removeClass(host, JOURNEY_HOVER_HOST_CLASS);
|
|
4208
|
+
activeElements = [];
|
|
4209
|
+
activeShortIds = [];
|
|
4210
|
+
};
|
|
4211
|
+
const activate = (shortIds) => {
|
|
4212
|
+
const isSame = shortIds.length === activeShortIds.length && shortIds.every((id, index) => id === activeShortIds[index]);
|
|
4213
|
+
if (isSame)
|
|
4214
|
+
return;
|
|
4215
|
+
clear();
|
|
4216
|
+
const elements = [];
|
|
4217
|
+
for (const shortId of shortIds) {
|
|
4218
|
+
elements.push(...Array.from(host.querySelectorAll(`.${shortId}`)));
|
|
4219
|
+
}
|
|
4220
|
+
for (const el of elements) {
|
|
4221
|
+
renderer.addClass(el, JOURNEY_ACTIVE_ELEMENT_CLASS);
|
|
4222
|
+
}
|
|
4223
|
+
renderer.addClass(host, JOURNEY_HOVER_HOST_CLASS);
|
|
4224
|
+
activeElements = elements;
|
|
4225
|
+
activeShortIds = shortIds;
|
|
4226
|
+
};
|
|
4227
|
+
const onMouseOver = (event) => {
|
|
4228
|
+
const target = event.target;
|
|
4229
|
+
const container = target?.closest('.et-bracket-new-element--match, path') ?? null;
|
|
4230
|
+
const shortIds = getParticipantShortIds(container);
|
|
4231
|
+
if (shortIds.length) {
|
|
4232
|
+
activate(shortIds);
|
|
4233
|
+
}
|
|
4234
|
+
else {
|
|
4235
|
+
clear();
|
|
4236
|
+
}
|
|
4237
|
+
};
|
|
4238
|
+
const onMouseLeave = () => clear();
|
|
4239
|
+
const removeMouseOverListener = renderer.listen(host, 'mouseover', onMouseOver);
|
|
4240
|
+
const removeMouseLeaveListener = renderer.listen(host, 'mouseleave', onMouseLeave);
|
|
4241
|
+
return () => {
|
|
4242
|
+
removeMouseOverListener();
|
|
4243
|
+
removeMouseLeaveListener();
|
|
4244
|
+
clear();
|
|
4245
|
+
};
|
|
4246
|
+
};
|
|
4247
|
+
|
|
4248
|
+
const [provideNewBracketConfig, injectNewBracketConfig] = createStaticRootProvider({}, { name: 'NewBracketConfig' });
|
|
4249
|
+
|
|
3755
4250
|
class NewBracketComponent {
|
|
3756
4251
|
constructor() {
|
|
3757
4252
|
this.domSanitizer = inject(DomSanitizer);
|
|
3758
4253
|
this.elementId = createComponentId('et-new-bracket');
|
|
4254
|
+
this.config = injectNewBracketConfig();
|
|
3759
4255
|
this.source = input.required(...(ngDevMode ? [{ debugName: "source" }] : []));
|
|
3760
|
-
this.columnWidth = input(250, ...(ngDevMode ? [{ debugName: "columnWidth", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
3761
|
-
this.matchHeight = input(75, ...(ngDevMode ? [{ debugName: "matchHeight", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
3762
|
-
this.finalMatchHeight = input(75, ...(ngDevMode ? [{ debugName: "finalMatchHeight", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
3763
|
-
this.finalColumnWidth = input(300, ...(ngDevMode ? [{ debugName: "finalColumnWidth", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
3764
|
-
this.roundHeaderHeight = input(50, ...(ngDevMode ? [{ debugName: "roundHeaderHeight", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
3765
|
-
this.roundHeaderGap = input(20, ...(ngDevMode ? [{ debugName: "roundHeaderGap", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
3766
|
-
this.columnGap = input(60, ...(ngDevMode ? [{ debugName: "columnGap", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
3767
|
-
this.rowGap = input(30, ...(ngDevMode ? [{ debugName: "rowGap", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
3768
|
-
this.rowRoundGap = input(20, ...(ngDevMode ? [{ debugName: "rowRoundGap", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
3769
|
-
this.lineStartingCurveAmount = input(10, ...(ngDevMode ? [{ debugName: "lineStartingCurveAmount", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
3770
|
-
this.lineEndingCurveAmount = input(0, ...(ngDevMode ? [{ debugName: "lineEndingCurveAmount", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
3771
|
-
this.lineWidth = input(2, ...(ngDevMode ? [{ debugName: "lineWidth", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
3772
|
-
this.lineDashArray = input(0, ...(ngDevMode ? [{ debugName: "lineDashArray", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
3773
|
-
this.lineDashOffset = input(0, ...(ngDevMode ? [{ debugName: "lineDashOffset", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
3774
|
-
this.disableJourneyHighlight = input(false, ...(ngDevMode ? [{ debugName: "disableJourneyHighlight", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
3775
|
-
this.swissGroupPadding = input(10, ...(ngDevMode ? [{ debugName: "swissGroupPadding", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
3776
|
-
this.
|
|
3777
|
-
this.
|
|
4256
|
+
this.columnWidth = input(this.config.columnWidth ?? 250, ...(ngDevMode ? [{ debugName: "columnWidth", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
4257
|
+
this.matchHeight = input(this.config.matchHeight ?? 75, ...(ngDevMode ? [{ debugName: "matchHeight", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
4258
|
+
this.finalMatchHeight = input(this.config.finalMatchHeight ?? 75, ...(ngDevMode ? [{ debugName: "finalMatchHeight", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
4259
|
+
this.finalColumnWidth = input(this.config.finalColumnWidth ?? 300, ...(ngDevMode ? [{ debugName: "finalColumnWidth", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
4260
|
+
this.roundHeaderHeight = input(this.config.roundHeaderHeight ?? 50, ...(ngDevMode ? [{ debugName: "roundHeaderHeight", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
4261
|
+
this.roundHeaderGap = input(this.config.roundHeaderGap ?? 20, ...(ngDevMode ? [{ debugName: "roundHeaderGap", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
4262
|
+
this.columnGap = input(this.config.columnGap ?? 60, ...(ngDevMode ? [{ debugName: "columnGap", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
4263
|
+
this.rowGap = input(this.config.rowGap ?? 30, ...(ngDevMode ? [{ debugName: "rowGap", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
4264
|
+
this.rowRoundGap = input(this.config.rowRoundGap ?? 20, ...(ngDevMode ? [{ debugName: "rowRoundGap", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
4265
|
+
this.lineStartingCurveAmount = input(this.config.lineStartingCurveAmount ?? 10, ...(ngDevMode ? [{ debugName: "lineStartingCurveAmount", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
4266
|
+
this.lineEndingCurveAmount = input(this.config.lineEndingCurveAmount ?? 0, ...(ngDevMode ? [{ debugName: "lineEndingCurveAmount", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
4267
|
+
this.lineWidth = input(this.config.lineWidth ?? 2, ...(ngDevMode ? [{ debugName: "lineWidth", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
4268
|
+
this.lineDashArray = input(this.config.lineDashArray ?? 0, ...(ngDevMode ? [{ debugName: "lineDashArray", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
4269
|
+
this.lineDashOffset = input(this.config.lineDashOffset ?? 0, ...(ngDevMode ? [{ debugName: "lineDashOffset", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
4270
|
+
this.disableJourneyHighlight = input(this.config.disableJourneyHighlight ?? false, ...(ngDevMode ? [{ debugName: "disableJourneyHighlight", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
4271
|
+
this.swissGroupPadding = input(this.config.swissGroupPadding ?? 10, ...(ngDevMode ? [{ debugName: "swissGroupPadding", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
4272
|
+
this.swissGroupBorderRadius = input(this.config.swissGroupBorderRadius ?? 12, ...(ngDevMode ? [{ debugName: "swissGroupBorderRadius", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
4273
|
+
this.swissColors = input(this.config.swiss?.colors, ...(ngDevMode ? [{ debugName: "swissColors" }] : []));
|
|
4274
|
+
this.layout = input(this.config.layout ?? BRACKET_DATA_LAYOUT.LEFT_TO_RIGHT, ...(ngDevMode ? [{ debugName: "layout" }] : []));
|
|
4275
|
+
this.hideRoundHeaders = input(this.config.hideRoundHeaders ?? false, ...(ngDevMode ? [{ debugName: "hideRoundHeaders", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
4276
|
+
this.showContinueElement = input(this.config.showContinueElement ?? false, ...(ngDevMode ? [{ debugName: "showContinueElement", transform: booleanAttribute }] : [{ transform: booleanAttribute }]));
|
|
4277
|
+
this.continueColumnWidth = input(this.config.continueColumnWidth ?? 250, ...(ngDevMode ? [{ debugName: "continueColumnWidth", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
4278
|
+
this.continueElementHeight = input(this.config.continueElementHeight ?? 75, ...(ngDevMode ? [{ debugName: "continueElementHeight", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
4279
|
+
this.continueLineDashArray = input(this.config.continueLineDashArray ?? 6, ...(ngDevMode ? [{ debugName: "continueLineDashArray", transform: numberAttribute }] : [{ transform: numberAttribute }]));
|
|
3778
4280
|
this.roundHeaderComponent = input(...(ngDevMode ? [undefined, { debugName: "roundHeaderComponent" }] : []));
|
|
3779
4281
|
this.matchComponent = input(...(ngDevMode ? [undefined, { debugName: "matchComponent" }] : []));
|
|
3780
4282
|
this.finalMatchComponent = input(...(ngDevMode ? [undefined, { debugName: "finalMatchComponent" }] : []));
|
|
4283
|
+
this.continueComponent = input(...(ngDevMode ? [undefined, { debugName: "continueComponent" }] : []));
|
|
3781
4284
|
this.bracketData = computed(() => createNewBracket(this.source(), { layout: this.layout() }), ...(ngDevMode ? [{ debugName: "bracketData" }] : []));
|
|
3782
4285
|
this.swissGroups = computed(() => generateBracketRoundSwissGroupMaps(this.bracketData()), ...(ngDevMode ? [{ debugName: "swissGroups" }] : []));
|
|
3783
4286
|
this.bracketGrid = computed(() => {
|
|
@@ -3795,11 +4298,26 @@ class NewBracketComponent {
|
|
|
3795
4298
|
finalColumnWidth: this.finalColumnWidth(),
|
|
3796
4299
|
roundHeaderGap: this.hideRoundHeaders() ? 0 : this.roundHeaderGap(),
|
|
3797
4300
|
swissGroupPadding: this.swissGroupPadding(),
|
|
4301
|
+
swissGroupBorderWidth: this.lineWidth(),
|
|
4302
|
+
continueElement: this.showContinueElement() && this.layout() === BRACKET_DATA_LAYOUT.LEFT_TO_RIGHT
|
|
4303
|
+
? {
|
|
4304
|
+
columnWidth: this.continueColumnWidth(),
|
|
4305
|
+
elementHeight: this.continueElementHeight(),
|
|
4306
|
+
}
|
|
4307
|
+
: null,
|
|
3798
4308
|
};
|
|
4309
|
+
const swissConfig = bracketData.mode === TOURNAMENT_MODE.SWISS_WITH_ELIMINATION ? this.config.swiss : undefined;
|
|
3799
4310
|
const components = {
|
|
3800
|
-
match: this.matchComponent() ??
|
|
3801
|
-
|
|
3802
|
-
|
|
4311
|
+
match: this.matchComponent() ??
|
|
4312
|
+
swissConfig?.matchComponent ??
|
|
4313
|
+
this.config.matchComponent ??
|
|
4314
|
+
NewBracketDefaultMatchComponent,
|
|
4315
|
+
finalMatch: this.finalMatchComponent() ?? this.config.finalMatchComponent ?? NewBracketDefaultMatchComponent,
|
|
4316
|
+
roundHeader: this.roundHeaderComponent() ??
|
|
4317
|
+
swissConfig?.roundHeaderComponent ??
|
|
4318
|
+
this.config.roundHeaderComponent ??
|
|
4319
|
+
NewBracketDefaultRoundHeaderComponent,
|
|
4320
|
+
continue: this.continueComponent() ?? this.config.continueComponent ?? NewBracketDefaultContinueComponent,
|
|
3803
4321
|
};
|
|
3804
4322
|
switch (bracketData.mode) {
|
|
3805
4323
|
case TOURNAMENT_MODE.DOUBLE_ELIMINATION:
|
|
@@ -3812,8 +4330,28 @@ class NewBracketComponent {
|
|
|
3812
4330
|
}, ...(ngDevMode ? [{ debugName: "bracketGrid" }] : []));
|
|
3813
4331
|
this.drawManData = computed(() => {
|
|
3814
4332
|
const bracketGrid = this.bracketGrid();
|
|
3815
|
-
if (!bracketGrid
|
|
4333
|
+
if (!bracketGrid)
|
|
3816
4334
|
return '';
|
|
4335
|
+
if (this.bracketData().mode === TOURNAMENT_MODE.SWISS_WITH_ELIMINATION) {
|
|
4336
|
+
return drawSwissMan({
|
|
4337
|
+
bracketGrid,
|
|
4338
|
+
curve: {
|
|
4339
|
+
lineStartingCurveAmount: this.lineStartingCurveAmount(),
|
|
4340
|
+
},
|
|
4341
|
+
path: {
|
|
4342
|
+
dashArray: this.lineDashArray(),
|
|
4343
|
+
dashOffset: this.lineDashOffset(),
|
|
4344
|
+
width: this.lineWidth(),
|
|
4345
|
+
},
|
|
4346
|
+
groupBorder: {
|
|
4347
|
+
padding: this.swissGroupPadding(),
|
|
4348
|
+
radius: this.swissGroupBorderRadius(),
|
|
4349
|
+
width: this.lineWidth(),
|
|
4350
|
+
},
|
|
4351
|
+
colors: this.swissColors(),
|
|
4352
|
+
idPrefix: this.elementId,
|
|
4353
|
+
});
|
|
4354
|
+
}
|
|
3817
4355
|
return drawMan({
|
|
3818
4356
|
columnGap: this.columnGap(),
|
|
3819
4357
|
upperLowerGap: this.rowRoundGap(),
|
|
@@ -3831,64 +4369,54 @@ class NewBracketComponent {
|
|
|
3831
4369
|
dashOffset: this.lineDashOffset(),
|
|
3832
4370
|
width: this.lineWidth(),
|
|
3833
4371
|
},
|
|
4372
|
+
continuePath: {
|
|
4373
|
+
dashArray: this.continueLineDashArray(),
|
|
4374
|
+
dashOffset: this.lineDashOffset(),
|
|
4375
|
+
width: this.lineWidth(),
|
|
4376
|
+
},
|
|
3834
4377
|
});
|
|
3835
4378
|
}, ...(ngDevMode ? [{ debugName: "drawManData" }] : []));
|
|
3836
4379
|
this.svgContent = computed(() => this.domSanitizer.bypassSecurityTrustHtml(this.drawManData()), ...(ngDevMode ? [{ debugName: "svgContent" }] : []));
|
|
3837
|
-
this.journeyHighlight = computed(() => this.disableJourneyHighlight() ? null : createJourneyHighlight(this.bracketData()), ...(ngDevMode ? [{ debugName: "journeyHighlight" }] : []));
|
|
3838
4380
|
this.setupJourneyHighlight();
|
|
3839
4381
|
}
|
|
3840
4382
|
setupJourneyHighlight() {
|
|
3841
4383
|
const renderer = inject(Renderer2);
|
|
3842
|
-
const
|
|
3843
|
-
const
|
|
3844
|
-
let oldStyleEl = null;
|
|
4384
|
+
const ngZone = inject(NgZone);
|
|
4385
|
+
const host = inject((ElementRef)).nativeElement;
|
|
3845
4386
|
effect(() => {
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
}
|
|
3851
|
-
if (newHighlightStyle) {
|
|
3852
|
-
const el = renderer.createElement('style');
|
|
3853
|
-
renderer.setAttribute(el, 'id', styleId);
|
|
3854
|
-
renderer.appendChild(el, renderer.createText(newHighlightStyle));
|
|
3855
|
-
renderer.appendChild(head, el);
|
|
3856
|
-
oldStyleEl = el;
|
|
3857
|
-
}
|
|
3858
|
-
else {
|
|
3859
|
-
oldStyleEl = null;
|
|
3860
|
-
}
|
|
3861
|
-
return () => {
|
|
3862
|
-
if (oldStyleEl) {
|
|
3863
|
-
renderer.removeChild(head, oldStyleEl);
|
|
3864
|
-
oldStyleEl = null;
|
|
3865
|
-
}
|
|
3866
|
-
};
|
|
4387
|
+
if (this.disableJourneyHighlight())
|
|
4388
|
+
return;
|
|
4389
|
+
const teardown = ngZone.runOutsideAngular(() => setupJourneyHighlight(host, renderer));
|
|
4390
|
+
return () => teardown();
|
|
3867
4391
|
});
|
|
3868
4392
|
}
|
|
3869
4393
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: NewBracketComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3870
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.6", type: NewBracketComponent, isStandalone: true, selector: "et-new-bracket", inputs: { source: { classPropertyName: "source", publicName: "source", isSignal: true, isRequired: true, transformFunction: null }, columnWidth: { classPropertyName: "columnWidth", publicName: "columnWidth", isSignal: true, isRequired: false, transformFunction: null }, matchHeight: { classPropertyName: "matchHeight", publicName: "matchHeight", isSignal: true, isRequired: false, transformFunction: null }, finalMatchHeight: { classPropertyName: "finalMatchHeight", publicName: "finalMatchHeight", isSignal: true, isRequired: false, transformFunction: null }, finalColumnWidth: { classPropertyName: "finalColumnWidth", publicName: "finalColumnWidth", isSignal: true, isRequired: false, transformFunction: null }, roundHeaderHeight: { classPropertyName: "roundHeaderHeight", publicName: "roundHeaderHeight", isSignal: true, isRequired: false, transformFunction: null }, roundHeaderGap: { classPropertyName: "roundHeaderGap", publicName: "roundHeaderGap", isSignal: true, isRequired: false, transformFunction: null }, columnGap: { classPropertyName: "columnGap", publicName: "columnGap", isSignal: true, isRequired: false, transformFunction: null }, rowGap: { classPropertyName: "rowGap", publicName: "rowGap", isSignal: true, isRequired: false, transformFunction: null }, rowRoundGap: { classPropertyName: "rowRoundGap", publicName: "rowRoundGap", isSignal: true, isRequired: false, transformFunction: null }, lineStartingCurveAmount: { classPropertyName: "lineStartingCurveAmount", publicName: "lineStartingCurveAmount", isSignal: true, isRequired: false, transformFunction: null }, lineEndingCurveAmount: { classPropertyName: "lineEndingCurveAmount", publicName: "lineEndingCurveAmount", isSignal: true, isRequired: false, transformFunction: null }, lineWidth: { classPropertyName: "lineWidth", publicName: "lineWidth", isSignal: true, isRequired: false, transformFunction: null }, lineDashArray: { classPropertyName: "lineDashArray", publicName: "lineDashArray", isSignal: true, isRequired: false, transformFunction: null }, lineDashOffset: { classPropertyName: "lineDashOffset", publicName: "lineDashOffset", isSignal: true, isRequired: false, transformFunction: null }, disableJourneyHighlight: { classPropertyName: "disableJourneyHighlight", publicName: "disableJourneyHighlight", isSignal: true, isRequired: false, transformFunction: null }, swissGroupPadding: { classPropertyName: "swissGroupPadding", publicName: "swissGroupPadding", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, hideRoundHeaders: { classPropertyName: "hideRoundHeaders", publicName: "hideRoundHeaders", isSignal: true, isRequired: false, transformFunction: null }, roundHeaderComponent: { classPropertyName: "roundHeaderComponent", publicName: "roundHeaderComponent", isSignal: true, isRequired: false, transformFunction: null }, matchComponent: { classPropertyName: "matchComponent", publicName: "matchComponent", isSignal: true, isRequired: false, transformFunction: null }, finalMatchComponent: { classPropertyName: "finalMatchComponent", publicName: "finalMatchComponent", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "et-new-bracket-host" }, ngImport: i0, template: "@if (bracketGrid(); as grid) {\n <section\n [style.width.px]=\"grid.raw.grid.dimensions.width\"\n [style.height.px]=\"grid.raw.grid.dimensions.height\"\n class=\"et-bracket-new et-bracket-new--{{ bracketData().mode }}\"\n >\n <svg [innerHTML]=\"svgContent()\" class=\"et-bracket-new-svg\" xmlns=\"http://www.w3.org/2000/svg\" />\n\n @for (round of grid.columns; track $index) {\n <ul\n [style.width.px]=\"round.dimensions.width\"\n [style.height.px]=\"round.dimensions.height\"\n [style.top.px]=\"round.dimensions.top\"\n [style.left.px]=\"round.dimensions.left\"\n class=\"et-bracket-new-round\"\n >\n @for (element of round.elements; track $index) {\n @let inputs =\n element.type === 'header'\n ? { bracketRound: element.round, bracketRoundSwissGroup: element.roundSwissGroup }\n : {\n
|
|
4394
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.6", type: NewBracketComponent, isStandalone: true, selector: "et-new-bracket", inputs: { source: { classPropertyName: "source", publicName: "source", isSignal: true, isRequired: true, transformFunction: null }, columnWidth: { classPropertyName: "columnWidth", publicName: "columnWidth", isSignal: true, isRequired: false, transformFunction: null }, matchHeight: { classPropertyName: "matchHeight", publicName: "matchHeight", isSignal: true, isRequired: false, transformFunction: null }, finalMatchHeight: { classPropertyName: "finalMatchHeight", publicName: "finalMatchHeight", isSignal: true, isRequired: false, transformFunction: null }, finalColumnWidth: { classPropertyName: "finalColumnWidth", publicName: "finalColumnWidth", isSignal: true, isRequired: false, transformFunction: null }, roundHeaderHeight: { classPropertyName: "roundHeaderHeight", publicName: "roundHeaderHeight", isSignal: true, isRequired: false, transformFunction: null }, roundHeaderGap: { classPropertyName: "roundHeaderGap", publicName: "roundHeaderGap", isSignal: true, isRequired: false, transformFunction: null }, columnGap: { classPropertyName: "columnGap", publicName: "columnGap", isSignal: true, isRequired: false, transformFunction: null }, rowGap: { classPropertyName: "rowGap", publicName: "rowGap", isSignal: true, isRequired: false, transformFunction: null }, rowRoundGap: { classPropertyName: "rowRoundGap", publicName: "rowRoundGap", isSignal: true, isRequired: false, transformFunction: null }, lineStartingCurveAmount: { classPropertyName: "lineStartingCurveAmount", publicName: "lineStartingCurveAmount", isSignal: true, isRequired: false, transformFunction: null }, lineEndingCurveAmount: { classPropertyName: "lineEndingCurveAmount", publicName: "lineEndingCurveAmount", isSignal: true, isRequired: false, transformFunction: null }, lineWidth: { classPropertyName: "lineWidth", publicName: "lineWidth", isSignal: true, isRequired: false, transformFunction: null }, lineDashArray: { classPropertyName: "lineDashArray", publicName: "lineDashArray", isSignal: true, isRequired: false, transformFunction: null }, lineDashOffset: { classPropertyName: "lineDashOffset", publicName: "lineDashOffset", isSignal: true, isRequired: false, transformFunction: null }, disableJourneyHighlight: { classPropertyName: "disableJourneyHighlight", publicName: "disableJourneyHighlight", isSignal: true, isRequired: false, transformFunction: null }, swissGroupPadding: { classPropertyName: "swissGroupPadding", publicName: "swissGroupPadding", isSignal: true, isRequired: false, transformFunction: null }, swissGroupBorderRadius: { classPropertyName: "swissGroupBorderRadius", publicName: "swissGroupBorderRadius", isSignal: true, isRequired: false, transformFunction: null }, swissColors: { classPropertyName: "swissColors", publicName: "swissColors", isSignal: true, isRequired: false, transformFunction: null }, layout: { classPropertyName: "layout", publicName: "layout", isSignal: true, isRequired: false, transformFunction: null }, hideRoundHeaders: { classPropertyName: "hideRoundHeaders", publicName: "hideRoundHeaders", isSignal: true, isRequired: false, transformFunction: null }, showContinueElement: { classPropertyName: "showContinueElement", publicName: "showContinueElement", isSignal: true, isRequired: false, transformFunction: null }, continueColumnWidth: { classPropertyName: "continueColumnWidth", publicName: "continueColumnWidth", isSignal: true, isRequired: false, transformFunction: null }, continueElementHeight: { classPropertyName: "continueElementHeight", publicName: "continueElementHeight", isSignal: true, isRequired: false, transformFunction: null }, continueLineDashArray: { classPropertyName: "continueLineDashArray", publicName: "continueLineDashArray", isSignal: true, isRequired: false, transformFunction: null }, roundHeaderComponent: { classPropertyName: "roundHeaderComponent", publicName: "roundHeaderComponent", isSignal: true, isRequired: false, transformFunction: null }, matchComponent: { classPropertyName: "matchComponent", publicName: "matchComponent", isSignal: true, isRequired: false, transformFunction: null }, finalMatchComponent: { classPropertyName: "finalMatchComponent", publicName: "finalMatchComponent", isSignal: true, isRequired: false, transformFunction: null }, continueComponent: { classPropertyName: "continueComponent", publicName: "continueComponent", isSignal: true, isRequired: false, transformFunction: null } }, host: { classAttribute: "et-new-bracket-host" }, ngImport: i0, template: "@if (bracketGrid(); as grid) {\n <section\n [style.width.px]=\"grid.raw.grid.dimensions.width\"\n [style.height.px]=\"grid.raw.grid.dimensions.height\"\n class=\"et-bracket-new et-bracket-new--{{ bracketData().mode }}\"\n >\n <svg [innerHTML]=\"svgContent()\" class=\"et-bracket-new-svg\" xmlns=\"http://www.w3.org/2000/svg\" />\n\n @for (round of grid.columns; track $index) {\n <ul\n [style.width.px]=\"round.dimensions.width\"\n [style.height.px]=\"round.dimensions.height\"\n [style.top.px]=\"round.dimensions.top\"\n [style.left.px]=\"round.dimensions.left\"\n class=\"et-bracket-new-round\"\n >\n @for (element of round.elements; track $index) {\n @let inputs =\n element.type === 'header'\n ? { bracketRound: element.round, bracketRoundSwissGroup: element.roundSwissGroup }\n : element.type === 'continue'\n ? { bracketMatches: element.matches }\n : {\n bracketRound: element.round,\n bracketMatch: element.match,\n bracketRoundSwissGroup: element.roundSwissGroup,\n };\n\n @let highlightClass = element.type === 'match' ? element.classes : '';\n\n <li\n [style.width.px]=\"element.dimensions.width\"\n [style.height.px]=\"element.dimensions.height\"\n [style.top.px]=\"element.dimensions.top - round.dimensions.top\"\n [style.left.px]=\"element.dimensions.left - round.dimensions.left\"\n class=\"et-bracket-new-element et-bracket-new-element--{{ element.type }} {{ highlightClass }}\"\n >\n <ng-container *ngComponentOutlet=\"$any(element.component); inputs: inputs\" />\n </li>\n }\n </ul>\n }\n </section>\n}\n", styles: [".et-bracket-new{position:relative;--bracket-line-color: red}.et-bracket-new-round{position:absolute;list-style:none;margin:0;padding:0}.et-bracket-new-element{position:absolute;list-style:none;margin:0;padding:0;transition:opacity .2s}.et-bracket-new-svg{inline-size:100%;block-size:100%;position:absolute}.et-bracket-new-svg path{color:var(--bracket-line-color);transition:opacity .2s}.et-bracket-new-svg .et-bracket-new-swiss-group-border{color:var(--bracket-swiss-group-border-color, var(--bracket-line-color))}.et-new-bracket-host--journey-hover path,.et-new-bracket-host--journey-hover .et-bracket-new-element--match{opacity:.5}.et-new-bracket-host--journey-hover .et-bracket-new-journey-active{opacity:1!important}\n"], dependencies: [{ kind: "directive", type: NgComponentOutlet, selector: "[ngComponentOutlet]", inputs: ["ngComponentOutlet", "ngComponentOutletInputs", "ngComponentOutletInjector", "ngComponentOutletEnvironmentInjector", "ngComponentOutletContent", "ngComponentOutletNgModule", "ngComponentOutletNgModuleFactory"], exportAs: ["ngComponentOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
3871
4395
|
}
|
|
3872
4396
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: NewBracketComponent, decorators: [{
|
|
3873
4397
|
type: Component,
|
|
3874
4398
|
args: [{ selector: 'et-new-bracket', changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, host: {
|
|
3875
4399
|
class: 'et-new-bracket-host',
|
|
3876
|
-
}, imports: [NgComponentOutlet], template: "@if (bracketGrid(); as grid) {\n <section\n [style.width.px]=\"grid.raw.grid.dimensions.width\"\n [style.height.px]=\"grid.raw.grid.dimensions.height\"\n class=\"et-bracket-new et-bracket-new--{{ bracketData().mode }}\"\n >\n <svg [innerHTML]=\"svgContent()\" class=\"et-bracket-new-svg\" xmlns=\"http://www.w3.org/2000/svg\" />\n\n @for (round of grid.columns; track $index) {\n <ul\n [style.width.px]=\"round.dimensions.width\"\n [style.height.px]=\"round.dimensions.height\"\n [style.top.px]=\"round.dimensions.top\"\n [style.left.px]=\"round.dimensions.left\"\n class=\"et-bracket-new-round\"\n >\n @for (element of round.elements; track $index) {\n @let inputs =\n element.type === 'header'\n ? { bracketRound: element.round, bracketRoundSwissGroup: element.roundSwissGroup }\n : {\n
|
|
3877
|
-
}], ctorParameters: () => [], propDecorators: { source: [{ type: i0.Input, args: [{ isSignal: true, alias: "source", required: true }] }], columnWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnWidth", required: false }] }], matchHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "matchHeight", required: false }] }], finalMatchHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "finalMatchHeight", required: false }] }], finalColumnWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "finalColumnWidth", required: false }] }], roundHeaderHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "roundHeaderHeight", required: false }] }], roundHeaderGap: [{ type: i0.Input, args: [{ isSignal: true, alias: "roundHeaderGap", required: false }] }], columnGap: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnGap", required: false }] }], rowGap: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowGap", required: false }] }], rowRoundGap: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowRoundGap", required: false }] }], lineStartingCurveAmount: [{ type: i0.Input, args: [{ isSignal: true, alias: "lineStartingCurveAmount", required: false }] }], lineEndingCurveAmount: [{ type: i0.Input, args: [{ isSignal: true, alias: "lineEndingCurveAmount", required: false }] }], lineWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "lineWidth", required: false }] }], lineDashArray: [{ type: i0.Input, args: [{ isSignal: true, alias: "lineDashArray", required: false }] }], lineDashOffset: [{ type: i0.Input, args: [{ isSignal: true, alias: "lineDashOffset", required: false }] }], disableJourneyHighlight: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableJourneyHighlight", required: false }] }], swissGroupPadding: [{ type: i0.Input, args: [{ isSignal: true, alias: "swissGroupPadding", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], hideRoundHeaders: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideRoundHeaders", required: false }] }], roundHeaderComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "roundHeaderComponent", required: false }] }], matchComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "matchComponent", required: false }] }], finalMatchComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "finalMatchComponent", required: false }] }] } });
|
|
4400
|
+
}, imports: [NgComponentOutlet], template: "@if (bracketGrid(); as grid) {\n <section\n [style.width.px]=\"grid.raw.grid.dimensions.width\"\n [style.height.px]=\"grid.raw.grid.dimensions.height\"\n class=\"et-bracket-new et-bracket-new--{{ bracketData().mode }}\"\n >\n <svg [innerHTML]=\"svgContent()\" class=\"et-bracket-new-svg\" xmlns=\"http://www.w3.org/2000/svg\" />\n\n @for (round of grid.columns; track $index) {\n <ul\n [style.width.px]=\"round.dimensions.width\"\n [style.height.px]=\"round.dimensions.height\"\n [style.top.px]=\"round.dimensions.top\"\n [style.left.px]=\"round.dimensions.left\"\n class=\"et-bracket-new-round\"\n >\n @for (element of round.elements; track $index) {\n @let inputs =\n element.type === 'header'\n ? { bracketRound: element.round, bracketRoundSwissGroup: element.roundSwissGroup }\n : element.type === 'continue'\n ? { bracketMatches: element.matches }\n : {\n bracketRound: element.round,\n bracketMatch: element.match,\n bracketRoundSwissGroup: element.roundSwissGroup,\n };\n\n @let highlightClass = element.type === 'match' ? element.classes : '';\n\n <li\n [style.width.px]=\"element.dimensions.width\"\n [style.height.px]=\"element.dimensions.height\"\n [style.top.px]=\"element.dimensions.top - round.dimensions.top\"\n [style.left.px]=\"element.dimensions.left - round.dimensions.left\"\n class=\"et-bracket-new-element et-bracket-new-element--{{ element.type }} {{ highlightClass }}\"\n >\n <ng-container *ngComponentOutlet=\"$any(element.component); inputs: inputs\" />\n </li>\n }\n </ul>\n }\n </section>\n}\n", styles: [".et-bracket-new{position:relative;--bracket-line-color: red}.et-bracket-new-round{position:absolute;list-style:none;margin:0;padding:0}.et-bracket-new-element{position:absolute;list-style:none;margin:0;padding:0;transition:opacity .2s}.et-bracket-new-svg{inline-size:100%;block-size:100%;position:absolute}.et-bracket-new-svg path{color:var(--bracket-line-color);transition:opacity .2s}.et-bracket-new-svg .et-bracket-new-swiss-group-border{color:var(--bracket-swiss-group-border-color, var(--bracket-line-color))}.et-new-bracket-host--journey-hover path,.et-new-bracket-host--journey-hover .et-bracket-new-element--match{opacity:.5}.et-new-bracket-host--journey-hover .et-bracket-new-journey-active{opacity:1!important}\n"] }]
|
|
4401
|
+
}], ctorParameters: () => [], propDecorators: { source: [{ type: i0.Input, args: [{ isSignal: true, alias: "source", required: true }] }], columnWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnWidth", required: false }] }], matchHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "matchHeight", required: false }] }], finalMatchHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "finalMatchHeight", required: false }] }], finalColumnWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "finalColumnWidth", required: false }] }], roundHeaderHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "roundHeaderHeight", required: false }] }], roundHeaderGap: [{ type: i0.Input, args: [{ isSignal: true, alias: "roundHeaderGap", required: false }] }], columnGap: [{ type: i0.Input, args: [{ isSignal: true, alias: "columnGap", required: false }] }], rowGap: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowGap", required: false }] }], rowRoundGap: [{ type: i0.Input, args: [{ isSignal: true, alias: "rowRoundGap", required: false }] }], lineStartingCurveAmount: [{ type: i0.Input, args: [{ isSignal: true, alias: "lineStartingCurveAmount", required: false }] }], lineEndingCurveAmount: [{ type: i0.Input, args: [{ isSignal: true, alias: "lineEndingCurveAmount", required: false }] }], lineWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "lineWidth", required: false }] }], lineDashArray: [{ type: i0.Input, args: [{ isSignal: true, alias: "lineDashArray", required: false }] }], lineDashOffset: [{ type: i0.Input, args: [{ isSignal: true, alias: "lineDashOffset", required: false }] }], disableJourneyHighlight: [{ type: i0.Input, args: [{ isSignal: true, alias: "disableJourneyHighlight", required: false }] }], swissGroupPadding: [{ type: i0.Input, args: [{ isSignal: true, alias: "swissGroupPadding", required: false }] }], swissGroupBorderRadius: [{ type: i0.Input, args: [{ isSignal: true, alias: "swissGroupBorderRadius", required: false }] }], swissColors: [{ type: i0.Input, args: [{ isSignal: true, alias: "swissColors", required: false }] }], layout: [{ type: i0.Input, args: [{ isSignal: true, alias: "layout", required: false }] }], hideRoundHeaders: [{ type: i0.Input, args: [{ isSignal: true, alias: "hideRoundHeaders", required: false }] }], showContinueElement: [{ type: i0.Input, args: [{ isSignal: true, alias: "showContinueElement", required: false }] }], continueColumnWidth: [{ type: i0.Input, args: [{ isSignal: true, alias: "continueColumnWidth", required: false }] }], continueElementHeight: [{ type: i0.Input, args: [{ isSignal: true, alias: "continueElementHeight", required: false }] }], continueLineDashArray: [{ type: i0.Input, args: [{ isSignal: true, alias: "continueLineDashArray", required: false }] }], roundHeaderComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "roundHeaderComponent", required: false }] }], matchComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "matchComponent", required: false }] }], finalMatchComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "finalMatchComponent", required: false }] }], continueComponent: [{ type: i0.Input, args: [{ isSignal: true, alias: "continueComponent", required: false }] }] } });
|
|
3878
4402
|
|
|
3879
4403
|
var index = /*#__PURE__*/Object.freeze({
|
|
3880
4404
|
__proto__: null,
|
|
3881
4405
|
BRACKET_DATA_LAYOUT: BRACKET_DATA_LAYOUT,
|
|
3882
4406
|
BRACKET_ROUND_MIRROR_TYPE: BRACKET_ROUND_MIRROR_TYPE,
|
|
4407
|
+
BRACKET_SWISS_GROUP_COLOR_TYPE: BRACKET_SWISS_GROUP_COLOR_TYPE,
|
|
3883
4408
|
BracketMap: BracketMap,
|
|
3884
4409
|
COMMON_BRACKET_ROUND_TYPE: COMMON_BRACKET_ROUND_TYPE,
|
|
3885
4410
|
DOUBLE_ELIMINATION_BRACKET_ROUND_TYPE: DOUBLE_ELIMINATION_BRACKET_ROUND_TYPE,
|
|
3886
4411
|
GROUP_BRACKET_ROUND_TYPE: GROUP_BRACKET_ROUND_TYPE,
|
|
3887
4412
|
NewBracketComponent: NewBracketComponent,
|
|
4413
|
+
NewBracketDefaultContinueComponent: NewBracketDefaultContinueComponent,
|
|
3888
4414
|
NewBracketDefaultMatchComponent: NewBracketDefaultMatchComponent,
|
|
3889
4415
|
NewBracketDefaultRoundHeaderComponent: NewBracketDefaultRoundHeaderComponent,
|
|
3890
4416
|
SINGLE_ELIMINATION_BRACKET_ROUND_TYPE: SINGLE_ELIMINATION_BRACKET_ROUND_TYPE,
|
|
4417
|
+
SWISS_ADVANCE_WINS: SWISS_ADVANCE_WINS,
|
|
3891
4418
|
SWISS_BRACKET_ROUND_TYPE: SWISS_BRACKET_ROUND_TYPE,
|
|
4419
|
+
SWISS_ELIMINATE_LOSSES: SWISS_ELIMINATE_LOSSES,
|
|
3892
4420
|
TOURNAMENT_MODE: TOURNAMENT_MODE,
|
|
3893
4421
|
canRenderLayoutInTournamentMode: canRenderLayoutInTournamentMode,
|
|
3894
4422
|
createMatchesMapBase: createMatchesMapBase,
|
|
@@ -3909,7 +4437,10 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
3909
4437
|
generateTournamentModeFormEthleteRounds: generateTournamentModeFormEthleteRounds,
|
|
3910
4438
|
generateTournamentModeFormGgData: generateTournamentModeFormGgData,
|
|
3911
4439
|
getAvailableSwissGroupsForRound: getAvailableSwissGroupsForRound,
|
|
3912
|
-
|
|
4440
|
+
getSwissGroupColorType: getSwissGroupColorType,
|
|
4441
|
+
injectNewBracketConfig: injectNewBracketConfig,
|
|
4442
|
+
logRoundRelations: logRoundRelations,
|
|
4443
|
+
provideNewBracketConfig: provideNewBracketConfig
|
|
3913
4444
|
});
|
|
3914
4445
|
|
|
3915
4446
|
const VALIDATOR_ERROR_SERVICE_TOKEN = new InjectionToken('VALIDATOR_ERROR_SERVICE');
|
|
@@ -11995,7 +12526,7 @@ class SliderComponent {
|
|
|
11995
12526
|
constructor() {
|
|
11996
12527
|
this._elementRef = inject(ElementRef);
|
|
11997
12528
|
this._dirService = inject(Directionality);
|
|
11998
|
-
this._document = inject(DOCUMENT
|
|
12529
|
+
this._document = inject(DOCUMENT);
|
|
11999
12530
|
this._destroy$ = createDestroy();
|
|
12000
12531
|
this._mouseDown$ = fromEvent(this._elementRef.nativeElement, 'mousedown', { passive: false });
|
|
12001
12532
|
this._touchStart$ = fromEvent(this._elementRef.nativeElement, 'touchstart', {
|
|
@@ -12682,7 +13213,7 @@ class BottomSheetContainerBaseComponent extends CdkDialogContainer {
|
|
|
12682
13213
|
this._trapFocus();
|
|
12683
13214
|
}
|
|
12684
13215
|
}
|
|
12685
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: BottomSheetContainerBaseComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.FocusTrapFactory }, { token: DOCUMENT
|
|
13216
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: BottomSheetContainerBaseComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.FocusTrapFactory }, { token: DOCUMENT, optional: true }, { token: BOTTOM_SHEET_CONFIG }, { token: i1$1.InteractivityChecker }, { token: i0.NgZone }, { token: i2$1.OverlayRef }, { token: i1$1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
12686
13217
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.6", type: BottomSheetContainerBaseComponent, isStandalone: true, selector: "et-bottom-sheet-container-base", usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
12687
13218
|
}
|
|
12688
13219
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: BottomSheetContainerBaseComponent, decorators: [{
|
|
@@ -12695,7 +13226,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImpor
|
|
|
12695
13226
|
type: Optional
|
|
12696
13227
|
}, {
|
|
12697
13228
|
type: Inject,
|
|
12698
|
-
args: [DOCUMENT
|
|
13229
|
+
args: [DOCUMENT]
|
|
12699
13230
|
}] }, { type: undefined, decorators: [{
|
|
12700
13231
|
type: Inject,
|
|
12701
13232
|
args: [BOTTOM_SHEET_CONFIG]
|
|
@@ -12712,7 +13243,7 @@ class BottomSheetContainerComponent extends BottomSheetContainerBaseComponent {
|
|
|
12712
13243
|
constructor() {
|
|
12713
13244
|
const elementRef = inject(ElementRef);
|
|
12714
13245
|
const focusTrapFactory = inject(FocusTrapFactory);
|
|
12715
|
-
const document = inject(DOCUMENT
|
|
13246
|
+
const document = inject(DOCUMENT);
|
|
12716
13247
|
const bottomSheetConfig = inject(BOTTOM_SHEET_CONFIG);
|
|
12717
13248
|
const checker = inject(InteractivityChecker);
|
|
12718
13249
|
const ngZone = inject(NgZone);
|
|
@@ -13383,7 +13914,7 @@ class DialogContainerBaseComponent extends CdkDialogContainer {
|
|
|
13383
13914
|
this._trapFocus();
|
|
13384
13915
|
}
|
|
13385
13916
|
}
|
|
13386
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: DialogContainerBaseComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.FocusTrapFactory }, { token: DOCUMENT
|
|
13917
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: DialogContainerBaseComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.FocusTrapFactory }, { token: DOCUMENT, optional: true }, { token: DIALOG_CONFIG }, { token: i1$1.InteractivityChecker }, { token: i0.NgZone }, { token: i2$1.OverlayRef }, { token: i1$1.FocusMonitor }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
13387
13918
|
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.6", type: DialogContainerBaseComponent, isStandalone: true, selector: "et-dialog-container-base", usesInheritance: true, ngImport: i0, template: '', isInline: true }); }
|
|
13388
13919
|
}
|
|
13389
13920
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: DialogContainerBaseComponent, decorators: [{
|
|
@@ -13396,7 +13927,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImpor
|
|
|
13396
13927
|
type: Optional
|
|
13397
13928
|
}, {
|
|
13398
13929
|
type: Inject,
|
|
13399
|
-
args: [DOCUMENT
|
|
13930
|
+
args: [DOCUMENT]
|
|
13400
13931
|
}] }, { type: undefined, decorators: [{
|
|
13401
13932
|
type: Inject,
|
|
13402
13933
|
args: [DIALOG_CONFIG]
|
|
@@ -13413,7 +13944,7 @@ class DialogContainerComponent extends DialogContainerBaseComponent {
|
|
|
13413
13944
|
constructor() {
|
|
13414
13945
|
const elementRef = inject(ElementRef);
|
|
13415
13946
|
const focusTrapFactory = inject(FocusTrapFactory);
|
|
13416
|
-
const document = inject(DOCUMENT
|
|
13947
|
+
const document = inject(DOCUMENT);
|
|
13417
13948
|
const dialogConfig = inject(DIALOG_CONFIG);
|
|
13418
13949
|
const checker = inject(InteractivityChecker);
|
|
13419
13950
|
const ngZone = inject(NgZone);
|
|
@@ -15347,7 +15878,7 @@ class OverlayContainerComponent extends CdkDialogContainer {
|
|
|
15347
15878
|
return super._ariaLabelledBy;
|
|
15348
15879
|
}
|
|
15349
15880
|
constructor() {
|
|
15350
|
-
super(inject(ElementRef), inject(FocusTrapFactory), inject(DOCUMENT
|
|
15881
|
+
super(inject(ElementRef), inject(FocusTrapFactory), inject(DOCUMENT), inject(OVERLAY_CONFIG), inject(InteractivityChecker), inject(NgZone), inject(OverlayRef$1), inject(FocusMonitor));
|
|
15351
15882
|
this._swipeHandlerService = inject(SwipeHandlerService);
|
|
15352
15883
|
this._dragToDismissStop$ = new Subject();
|
|
15353
15884
|
this._themeProvider = inject(THEME_PROVIDER);
|
|
@@ -18213,7 +18744,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.6", ngImpor
|
|
|
18213
18744
|
class PaginationHeadService {
|
|
18214
18745
|
constructor() {
|
|
18215
18746
|
this._config = null;
|
|
18216
|
-
this._document = inject(DOCUMENT
|
|
18747
|
+
this._document = inject(DOCUMENT);
|
|
18217
18748
|
this._titleService = inject(Title);
|
|
18218
18749
|
this._router = inject(Router);
|
|
18219
18750
|
this._head = this._document.getElementsByTagName('head')[0];
|
|
@@ -20068,7 +20599,7 @@ class InlineTabBodyHostDirective extends CdkPortalOutlet {
|
|
|
20068
20599
|
constructor() {
|
|
20069
20600
|
const componentFactoryResolver = inject(ComponentFactoryResolver);
|
|
20070
20601
|
const viewContainerRef = inject(ViewContainerRef);
|
|
20071
|
-
const _document = inject(DOCUMENT
|
|
20602
|
+
const _document = inject(DOCUMENT);
|
|
20072
20603
|
super(componentFactoryResolver, viewContainerRef, _document);
|
|
20073
20604
|
}
|
|
20074
20605
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.6", ngImport: i0, type: InlineTabBodyHostDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
@@ -21188,5 +21719,5 @@ const TABS_CONFIG = new InjectionToken('TABS_CONFIG');
|
|
|
21188
21719
|
* Generated bundle index. Do not edit.
|
|
21189
21720
|
*/
|
|
21190
21721
|
|
|
21191
|
-
export { ACCORDION_COMPONENT, ACCORDION_HINT_WRAPPER_DIRECTIVE, ACCORDION_LABEL_WRAPPER_DIRECTIVE, AccordionComponent, AccordionGroupComponent, AccordionHintDirective, AccordionHintWrapperDirective, AccordionImports, AccordionLabelDirective, AccordionLabelWrapperDirective, ActiveTabUnderlineBarManager, ActiveTabUnderlineDirective, AutosizeTextareaDirective, BOTTOM_SHEET_CONFIG, BOTTOM_SHEET_DATA, BOTTOM_SHEET_DEFAULT_CONFIG, BOTTOM_SHEET_DEFAULT_OPTIONS, BOTTOM_SHEET_MIN_SWIPE_TO_CLOSE_LENGTH, BOTTOM_SHEET_MIN_VELOCITY_TO_CLOSE, BOTTOM_SHEET_SCROLL_STRATEGY, BOTTOM_SHEET_SCROLL_STRATEGY_PROVIDER, BOTTOM_SHEET_SCROLL_STRATEGY_PROVIDER_FACTORY, BRACKET_CONFIG_TOKEN, BRACKET_DEFAULT_CONFIG, BRACKET_MATCH_ID_TOKEN, BRACKET_ROUND_ID_TOKEN, BRACKET_TOKEN, BottomSheetContainerBaseComponent, BottomSheetContainerComponent, BottomSheetDragHandleComponent, BottomSheetImports, BottomSheetRef, BottomSheetService, BottomSheetServiceBase, BottomSheetSwipeHandlerService, BottomSheetTitleDirective, Bracket, BracketComponent, BracketImports, BracketMatchComponent, BracketMatchDirective, index as BracketNew, BracketRoundDirective, BracketRoundHeaderComponent, BreadcrumbComponent, BreadcrumbImports, BreadcrumbItemDirective, BreadcrumbItemTemplateDirective, BreadcrumbOutletComponent, BreadcrumbTemplateDirective, ButtonComponent, ButtonDirective, ButtonImports, CAROUSEL_ITEM_NAV_TOKEN, CAROUSEL_ITEM_TOKEN, CAROUSEL_NEXT_BUTTON_TOKEN, CAROUSEL_PREVIOUS_BUTTON_TOKEN, CAROUSEL_TOGGLE_AUTO_PLAY_BUTTON_TOKEN, CAROUSEL_TOKEN, CDK_MENU, CHECKBOX_FIELD_TOKEN, CHECKBOX_GROUP_CONTROL_TOKEN, CHECKBOX_GROUP_TOKEN, CHECKBOX_TOKEN, CHEVRON_ICON, COLOR_INPUT_TOKEN, COMBOBOX_BODY_EMPTY_TEMPLATE_TOKEN, COMBOBOX_BODY_ERROR_TEMPLATE_TOKEN, COMBOBOX_BODY_LOADING_TEMPLATE_TOKEN, COMBOBOX_BODY_MORE_ITEMS_HINT_TEMPLATE_TOKEN, COMBOBOX_BODY_TOKEN, COMBOBOX_CONFIG_TOKEN, COMBOBOX_DEFAULT_CONFIG, COMBOBOX_OPTION_TEMPLATE_TOKEN, COMBOBOX_OPTION_TOKEN, COMBOBOX_SELECTED_OPTION_TEMPLATE_TOKEN, COMBOBOX_TOKEN, CarouselComponent, CarouselDirective, CarouselImports, CarouselItemComponent, CarouselItemDirective, CarouselItemNavComponent, CarouselItemNavDirective, CarouselNextButtonDirective, CarouselPreviousButtonDirective, CarouselToggleAutoPlayButtonDirective, CdkContextMenuTrigger, CdkMenu, CdkMenuBar, CdkMenuBase, CdkMenuGroup, CdkMenuItem, CdkMenuItemCheckbox, CdkMenuItemRadio, CdkMenuItemSelectable, CdkMenuModule, CdkMenuTrigger, CdkMenuTriggerBase, CdkTargetMenuAim, CellDefDirective, CellDirective, CheckboxComponent, CheckboxDirective, CheckboxFieldComponent, CheckboxFieldDirective, CheckboxGroupComponent, CheckboxGroupControlDirective, CheckboxGroupDirective, CheckboxImports, ColorInputComponent, ColorInputDirective, ColumnDefDirective, ComboboxBodyComponent, ComboboxBodyEmptyTemplateDirective, ComboboxBodyErrorTemplateDirective, ComboboxBodyLoadingTemplateDirective, ComboboxBodyMoreItemsHintTemplateDirective, ComboboxComponent, ComboboxDirective, ComboboxImports, ComboboxOptionComponent, ComboboxOptionTemplateDirective, ComboboxSelectedOptionTemplateDirective, ContextMenuTracker, DATE_INPUT_FORMAT_TOKEN, DATE_INPUT_TOKEN, DATE_TIME_INPUT_FORMAT_TOKEN, DATE_TIME_INPUT_TOKEN, DEFAULT_DATE_INPUT_FORMAT, DEFAULT_DATE_TIME_INPUT_FORMAT, DEFAULT_TIME_INPUT_FORMAT, DIALOG_CONFIG, DIALOG_DATA, DIALOG_DEFAULT_CONFIG, DIALOG_DEFAULT_OPTIONS, DIALOG_SCROLL_STRATEGY, DIALOG_SCROLL_STRATEGY_PROVIDER, DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY, DYNAMIC_FORM_FIELD_TOKEN, DYNAMIC_FORM_GROUP_TOKEN, DateInputComponent, DateInputDirective, DateTimeInputComponent, DateTimeInputDirective, DecoratedFormFieldBase, DecoratedInputBase, DefaultValidatorErrorsService, DialogCloseDirective, DialogContainerBaseComponent, DialogContainerComponent, DialogImports, DialogRef, DialogService, DialogServiceBase, DialogTitleDirective, DynamicFormFieldDirective, DynamicFormGroupDirective, DynamicOverlayService, DynamicOverlayTitleDirective, EMAIL_INPUT_TOKEN, ET_OVERLAY_ANCHORED_DIALOG_CLASS, ET_OVERLAY_BOTTOM_SHEET_CLASS, ET_OVERLAY_CONFIG_CLASS_KEYS, ET_OVERLAY_DIALOG_CLASS, ET_OVERLAY_FULL_SCREEN_DIALOG_CLASS, ET_OVERLAY_LAYOUT_CLASSES, ET_OVERLAY_LEFT_SHEET_CLASS, ET_OVERLAY_RIGHT_SHEET_CLASS, ET_OVERLAY_TOP_SHEET_CLASS, EXPOSE_INPUT_VARS_TOKEN, EmailInputComponent, EmailInputDirective, ErrorComponent, ExposeInputVarsDirective, FILTER_OVERLAY_CONFIG, FLOATING_UI_PLACEMENTS, FilterOverlayService, FooterCellDefDirective, FooterCellDirective, FooterRowComponent, FooterRowDefDirective, FormFieldStateService, FormGroupStateService, HeaderCellDefDirective, HeaderCellDirective, HeaderRowComponent, HeaderRowDefDirective, ICONS_TOKEN, ICON_DIRECTIVE_TOKEN, IMAGE_CONFIG_TOKEN, INPUT_PREFIX_TOKEN, INPUT_SUFFIX_TOKEN, INPUT_TOKEN, IconDirective, IconImports, IfInputEmptyDirective, IfInputFilledDirective, IfSupportsShowPickerDirective, InlineTabBodyComponent, InlineTabBodyHostDirective, InlineTabChangeEvent, InlineTabComponent, InlineTabContentDirective, InlineTabHeaderComponent, InlineTabLabelDirective, InlineTabLabelWrapperDirective, InlineTabsComponent, InputBase, InputDirective, InputFieldComponent, InputImports, InputPrefixDirective, InputStateService, InputSuffixDirective, LABEL_TOKEN, LabelComponent, LabelImports, LabelSuffixDirective, MASONRY_ITEM_TOKEN, MAX_SAFE_INTEGER, MENU, MENU_AIM, MENU_CHECKBOX_GROUP_TOKEN, MENU_CONTAINER, MENU_GROUP_TITLE_TOKEN, MENU_GROUP_TOKEN, MENU_ITEM_TOKEN, MENU_RADIO_GROUP_TOKEN, MENU_SEARCH_TEMPLATE_TOKEN, MENU_STACK, MENU_TEMPLATE, MENU_TRIGGER, MENU_TRIGGER_TOKEN, MasonryComponent, MasonryImports, MasonryItemComponent, MenuCheckboxGroupDirective, MenuCheckboxItemComponent, MenuComponent, MenuContainerComponent, MenuGroupDirective, MenuGroupTitleDirective, MenuImports, MenuItemDirective, MenuRadioGroupDirective, MenuRadioItemComponent, MenuSearchTemplateDirective, MenuStack, MenuTriggerDirective, NATIVE_INPUT_REF_TOKEN, NATIVE_SELECT_INPUT_TOKEN, NATIVE_SELECT_OPTION_TOKEN, NUMBER_INPUT_TOKEN, NativeInputRefDirective, NativeSelectImports, NativeSelectInputComponent, NativeSelectInputDirective, NativeSelectOptionComponent, NativeSelectOptionDirective, NavTabLinkComponent, NavTabsComponent, NavTabsOutletComponent, NewBracketComponent, NewBracketDefaultMatchComponent, NewBracketDefaultRoundHeaderComponent, NoDataRowDirective, NumberInputComponent, NumberInputDirective, OVERLAY_BACK_OR_CLOSE_TOKEN, OVERLAY_BODY_TOKEN, OVERLAY_CLOSE_BLOCKER_TOKEN, OVERLAY_CONFIG, OVERLAY_DATA, OVERLAY_DEFAULT_CONFIG, OVERLAY_DEFAULT_OPTIONS, OVERLAY_FOOTER_TOKEN, OVERLAY_HEADER_TEMPLATE_TOKEN, OVERLAY_HEADER_TOKEN, OVERLAY_MAIN_TOKEN, OVERLAY_QUERY_PARAM_INPUT_NAME, OVERLAY_ROUTER_CONFIG_TOKEN, OVERLAY_ROUTER_LINK_TOKEN, OVERLAY_ROUTER_OUTLET_DISABLED_TEMPLATE_TOKEN, OVERLAY_ROUTER_OUTLET_TOKEN, OVERLAY_SCROLL_STRATEGY, OVERLAY_SHARED_ROUTE_TEMPLATE_TOKEN, OVERLAY_STATE, OverlayBackOrCloseDirective, OverlayBodyComponent, OverlayCloseBlockerDirective, OverlayCloseDirective, OverlayContainerComponent, OverlayFooterDirective, OverlayHandlerLinkDirective, OverlayHeaderDirective, OverlayHeaderTemplateDirective, OverlayImports, OverlayMainDirective, OverlayPositionBuilder, OverlayRef, OverlayRouteHeaderTemplateOutletComponent, OverlayRouterLinkDirective, OverlayRouterOutletComponent, OverlayRouterOutletDisabledTemplateDirective, OverlayRouterService, OverlayService, OverlaySharedRouteTemplateDirective, OverlaySharedRouteTemplateOutletComponent, OverlaySidebarComponent, OverlaySidebarPageComponent, OverlayTitleDirective, OverlayWithRoutingImports, OverlayWithSidebarImports, PARENT_OR_NEW_INLINE_MENU_STACK_PROVIDER, PARENT_OR_NEW_MENU_STACK_PROVIDER, PASSWORD_INPUT_TOKEN, PROGRESS_SPINNER_DEFAULT_OPTIONS, PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY, PaginatedTabHeaderDirective, PaginationComponent, PaginationHeadService, PaginationImports, PaginationLinkDirective, PasswordInputComponent, PasswordInputDirective, PasswordInputToggleComponent, PictureComponent, PointerFocusTracker, ProgressSpinnerComponent, ProvideThemeDirective, QUERY_ERROR_TOKEN, QueryButtonComponent, QueryButtonDirective, QueryErrorComponent, QueryErrorDirective, RADIO_FIELD_TOKEN, RADIO_GROUP_TOKEN, RADIO_TOKEN, RICH_FILTER_BUTTON_SLOT_TOKEN, RICH_FILTER_BUTTON_TOKEN, RICH_FILTER_CONTENT_TOKEN, RICH_FILTER_TOP_TOKEN, RadioComponent, RadioDirective, RadioFieldComponent, RadioFieldDirective, RadioGroupComponent, RadioGroupDirective, RadioImports, RecycleRowsDirective, RichFilterButtonDirective, RichFilterButtonSlotDirective, RichFilterContentDirective, RichFilterHostComponent, RichFilterImports, RichFilterTopDirective, RowComponent, RowDefDirective, SCROLLABLE_IGNORE_CHILD_ATTRIBUTE, SCROLLABLE_IGNORE_CHILD_TOKEN, SCROLLABLE_IS_ACTIVE_CHILD_ATTRIBUTE, SCROLLABLE_IS_ACTIVE_CHILD_TOKEN, SCROLLABLE_LOADING_TEMPLATE_TOKEN, SCROLLABLE_PLACEHOLDER_ITEM_TEMPLATE_TOKEN, SCROLLABLE_PLACEHOLDER_OVERLAY_TEMPLATE_TOKEN, SEARCH_INPUT_TOKEN, SEGMENTED_BUTTON_FIELD_TOKEN, SEGMENTED_BUTTON_GROUP_TOKEN, SEGMENTED_BUTTON_TOKEN, SELECTION_LIST_FIELD, SELECTION_LIST_OPTION, SELECT_BODY_TOKEN, SELECT_FIELD_TOKEN, SELECT_OPTION_TOKEN, SELECT_TOKEN, SHOW_PICKER_TRIGGER_TOKEN, SIDEBAR_OVERLAY_CONFIG, SLIDER_THUMB_CONTENT_TEMPLATE_TOKEN, SLIDE_TOGGLE_TOKEN, SORT_DEFAULT_OPTIONS, SORT_HEADER_COLUMN_DEF, SORT_HEADER_INTL_PROVIDER, SORT_HEADER_INTL_PROVIDER_FACTORY, STATIC_FORM_FIELD_TOKEN, STATIC_FORM_GROUP_TOKEN, ScrollableComponent, ScrollableIgnoreChildDirective, ScrollableImports, ScrollableIsActiveChildDirective, ScrollableLoadingTemplateDirective, ScrollablePlaceholderComponent, ScrollablePlaceholderItemTemplateDirective, ScrollablePlaceholderOverlayTemplateDirective, SearchInputClearComponent, SearchInputComponent, SearchInputDirective, SegmentedButtonComponent, SegmentedButtonDirective, SegmentedButtonFieldComponent, SegmentedButtonFieldDirective, SegmentedButtonGroupComponent, SegmentedButtonGroupDirective, SegmentedButtonImports, SelectBodyComponent, SelectBodyDirective, SelectComponent, SelectDirective, SelectFieldComponent, SelectFieldDirective, SelectImports, SelectOptionComponent, SelectOptionDirective, SelectionListFieldComponent, SelectionListFieldDirective, SelectionListImports, SelectionListOptionComponent, SelectionListOptionDirective, ShowPickerTriggerDirective, SidebarOverlayService, SkeletonComponent, SkeletonImports, SkeletonItemComponent, SlideToggleComponent, SlideToggleDirective, SlideToggleFieldComponent, SlideToggleImports, SliderComponent, SliderFieldComponent, SliderImports, SliderThumbContentTemplateDirective, SortDirective, SortHeaderComponent, SortHeaderIntl, SortImports, StaticFormFieldDirective, StaticFormGroupDirective, SwipeHandlerService, TAB, TABS_CONFIG, TAB_CONTENT, TAB_GROUP, TAB_LABEL, TEL_INPUT_TOKEN, TEXTAREA_INPUT_TOKEN, TEXT_INPUT_TOKEN, THEMES_TOKEN, THEME_PROVIDER, TIMES_ICON, TIME_INPUT_FORMAT_TOKEN, TIME_INPUT_TOKEN, TOGGLETIP, TOGGLETIP_CONFIG, TOGGLETIP_DEFAULT_CONFIG, TOGGLETIP_DIRECTIVE, TOGGLETIP_TEMPLATE, TOGGLETIP_TEXT, TOOLTIP, TOOLTIP_CONFIG, TOOLTIP_DEFAULT_CONFIG, TOOLTIP_DIRECTIVE, TOOLTIP_TEMPLATE, TOOLTIP_TEXT, TabImports, TableBusyDirective, TableBusyOutletDirective, TableComponent, TableDataSource, TableImports, TargetMenuAim, TelInputComponent, TelInputDirective, TextColumnComponent, TextInputComponent, TextInputDirective, TextareaInputComponent, TextareaInputDirective, TimeInputComponent, TimeInputDirective, ToggletipCloseDirective, ToggletipComponent, ToggletipDirective, ToggletipImports, TooltipComponent, TooltipDirective, TooltipImports, VALIDATOR_ERROR_SERVICE_TOKEN, WRITEABLE_INPUT_TOKEN, WRITEABLE_INPUT_VALUE_ACCESSOR, WriteableInputDirective, _MAT_INK_BAR_POSITIONER, _MAT_INK_BAR_POSITIONER_FACTORY, accordionAnimations, createBottomSheetConfig, createBracketConfig, createComboboxConfig, createCssThemeName, createDialogConfig, createFormChangesTracker, createNavigationDismissChecker, createOverlayConfig, createOverlayDismissChecker, createOverlayHandler, createOverlayHandlerWithQueryParamLifecycle, createProvider, createRootThemeCss, createSwatchCss, createTailwindColorThemes, createTailwindCssVar, createTailwindRgbVar, createThemeStyle, createToggletipConfig, createTooltipConfig, defaultSubmitButtonConfigFn, extractFirstImageUrl, getClosestBottomSheet, getClosestDialog, getClosestOverlay, injectBreadcrumbManager, injectRouterNavigationState, isScrollableChildActive, isScrollableChildIgnored, isUpperBracketMatch, normalizePictureSizes, normalizePictureSource, normalizeRoundType, orderRounds, orderRoundsByRoundNumber, paginate, provideBottomSheet, provideBottomSheetDefaultConfig, provideBracketConfig, provideBreadcrumbManager, provideColorThemes, provideComboboxConfig, provideDateFormat, provideDateTimeFormat, provideDialog, provideDialogDefaultConfig, provideFilterOverlayConfig, provideIcons, provideImageConfig, provideOverlay, provideOverlayDefaultConfig, provideOverlayRouterConfig, provideSidebarOverlayConfig, provideSort, provideSurfaceThemes, provideThemes, provideTimeFormat, provideToggletipConfig, provideTooltipConfig, provideValidatorErrorsService, tabAnimations };
|
|
21722
|
+
export { ACCORDION_COMPONENT, ACCORDION_HINT_WRAPPER_DIRECTIVE, ACCORDION_LABEL_WRAPPER_DIRECTIVE, AccordionComponent, AccordionGroupComponent, AccordionHintDirective, AccordionHintWrapperDirective, AccordionImports, AccordionLabelDirective, AccordionLabelWrapperDirective, ActiveTabUnderlineBarManager, ActiveTabUnderlineDirective, AutosizeTextareaDirective, BOTTOM_SHEET_CONFIG, BOTTOM_SHEET_DATA, BOTTOM_SHEET_DEFAULT_CONFIG, BOTTOM_SHEET_DEFAULT_OPTIONS, BOTTOM_SHEET_MIN_SWIPE_TO_CLOSE_LENGTH, BOTTOM_SHEET_MIN_VELOCITY_TO_CLOSE, BOTTOM_SHEET_SCROLL_STRATEGY, BOTTOM_SHEET_SCROLL_STRATEGY_PROVIDER, BOTTOM_SHEET_SCROLL_STRATEGY_PROVIDER_FACTORY, BRACKET_CONFIG_TOKEN, BRACKET_DEFAULT_CONFIG, BRACKET_MATCH_ID_TOKEN, BRACKET_ROUND_ID_TOKEN, BRACKET_TOKEN, BottomSheetContainerBaseComponent, BottomSheetContainerComponent, BottomSheetDragHandleComponent, BottomSheetImports, BottomSheetRef, BottomSheetService, BottomSheetServiceBase, BottomSheetSwipeHandlerService, BottomSheetTitleDirective, Bracket, BracketComponent, BracketImports, BracketMatchComponent, BracketMatchDirective, index as BracketNew, BracketRoundDirective, BracketRoundHeaderComponent, BreadcrumbComponent, BreadcrumbImports, BreadcrumbItemDirective, BreadcrumbItemTemplateDirective, BreadcrumbOutletComponent, BreadcrumbTemplateDirective, ButtonComponent, ButtonDirective, ButtonImports, CAROUSEL_ITEM_NAV_TOKEN, CAROUSEL_ITEM_TOKEN, CAROUSEL_NEXT_BUTTON_TOKEN, CAROUSEL_PREVIOUS_BUTTON_TOKEN, CAROUSEL_TOGGLE_AUTO_PLAY_BUTTON_TOKEN, CAROUSEL_TOKEN, CDK_MENU, CHECKBOX_FIELD_TOKEN, CHECKBOX_GROUP_CONTROL_TOKEN, CHECKBOX_GROUP_TOKEN, CHECKBOX_TOKEN, CHEVRON_ICON, COLOR_INPUT_TOKEN, COMBOBOX_BODY_EMPTY_TEMPLATE_TOKEN, COMBOBOX_BODY_ERROR_TEMPLATE_TOKEN, COMBOBOX_BODY_LOADING_TEMPLATE_TOKEN, COMBOBOX_BODY_MORE_ITEMS_HINT_TEMPLATE_TOKEN, COMBOBOX_BODY_TOKEN, COMBOBOX_CONFIG_TOKEN, COMBOBOX_DEFAULT_CONFIG, COMBOBOX_OPTION_TEMPLATE_TOKEN, COMBOBOX_OPTION_TOKEN, COMBOBOX_SELECTED_OPTION_TEMPLATE_TOKEN, COMBOBOX_TOKEN, CarouselComponent, CarouselDirective, CarouselImports, CarouselItemComponent, CarouselItemDirective, CarouselItemNavComponent, CarouselItemNavDirective, CarouselNextButtonDirective, CarouselPreviousButtonDirective, CarouselToggleAutoPlayButtonDirective, CdkContextMenuTrigger, CdkMenu, CdkMenuBar, CdkMenuBase, CdkMenuGroup, CdkMenuItem, CdkMenuItemCheckbox, CdkMenuItemRadio, CdkMenuItemSelectable, CdkMenuModule, CdkMenuTrigger, CdkMenuTriggerBase, CdkTargetMenuAim, CellDefDirective, CellDirective, CheckboxComponent, CheckboxDirective, CheckboxFieldComponent, CheckboxFieldDirective, CheckboxGroupComponent, CheckboxGroupControlDirective, CheckboxGroupDirective, CheckboxImports, ColorInputComponent, ColorInputDirective, ColumnDefDirective, ComboboxBodyComponent, ComboboxBodyEmptyTemplateDirective, ComboboxBodyErrorTemplateDirective, ComboboxBodyLoadingTemplateDirective, ComboboxBodyMoreItemsHintTemplateDirective, ComboboxComponent, ComboboxDirective, ComboboxImports, ComboboxOptionComponent, ComboboxOptionTemplateDirective, ComboboxSelectedOptionTemplateDirective, ContextMenuTracker, DATE_INPUT_FORMAT_TOKEN, DATE_INPUT_TOKEN, DATE_TIME_INPUT_FORMAT_TOKEN, DATE_TIME_INPUT_TOKEN, DEFAULT_DATE_INPUT_FORMAT, DEFAULT_DATE_TIME_INPUT_FORMAT, DEFAULT_TIME_INPUT_FORMAT, DIALOG_CONFIG, DIALOG_DATA, DIALOG_DEFAULT_CONFIG, DIALOG_DEFAULT_OPTIONS, DIALOG_SCROLL_STRATEGY, DIALOG_SCROLL_STRATEGY_PROVIDER, DIALOG_SCROLL_STRATEGY_PROVIDER_FACTORY, DYNAMIC_FORM_FIELD_TOKEN, DYNAMIC_FORM_GROUP_TOKEN, DateInputComponent, DateInputDirective, DateTimeInputComponent, DateTimeInputDirective, DecoratedFormFieldBase, DecoratedInputBase, DefaultValidatorErrorsService, DialogCloseDirective, DialogContainerBaseComponent, DialogContainerComponent, DialogImports, DialogRef, DialogService, DialogServiceBase, DialogTitleDirective, DynamicFormFieldDirective, DynamicFormGroupDirective, DynamicOverlayService, DynamicOverlayTitleDirective, EMAIL_INPUT_TOKEN, ET_OVERLAY_ANCHORED_DIALOG_CLASS, ET_OVERLAY_BOTTOM_SHEET_CLASS, ET_OVERLAY_CONFIG_CLASS_KEYS, ET_OVERLAY_DIALOG_CLASS, ET_OVERLAY_FULL_SCREEN_DIALOG_CLASS, ET_OVERLAY_LAYOUT_CLASSES, ET_OVERLAY_LEFT_SHEET_CLASS, ET_OVERLAY_RIGHT_SHEET_CLASS, ET_OVERLAY_TOP_SHEET_CLASS, EXPOSE_INPUT_VARS_TOKEN, EmailInputComponent, EmailInputDirective, ErrorComponent, ExposeInputVarsDirective, FILTER_OVERLAY_CONFIG, FLOATING_UI_PLACEMENTS, FilterOverlayService, FooterCellDefDirective, FooterCellDirective, FooterRowComponent, FooterRowDefDirective, FormFieldStateService, FormGroupStateService, HeaderCellDefDirective, HeaderCellDirective, HeaderRowComponent, HeaderRowDefDirective, ICONS_TOKEN, ICON_DIRECTIVE_TOKEN, IMAGE_CONFIG_TOKEN, INPUT_PREFIX_TOKEN, INPUT_SUFFIX_TOKEN, INPUT_TOKEN, IconDirective, IconImports, IfInputEmptyDirective, IfInputFilledDirective, IfSupportsShowPickerDirective, InlineTabBodyComponent, InlineTabBodyHostDirective, InlineTabChangeEvent, InlineTabComponent, InlineTabContentDirective, InlineTabHeaderComponent, InlineTabLabelDirective, InlineTabLabelWrapperDirective, InlineTabsComponent, InputBase, InputDirective, InputFieldComponent, InputImports, InputPrefixDirective, InputStateService, InputSuffixDirective, LABEL_TOKEN, LabelComponent, LabelImports, LabelSuffixDirective, MASONRY_ITEM_TOKEN, MAX_SAFE_INTEGER, MENU, MENU_AIM, MENU_CHECKBOX_GROUP_TOKEN, MENU_CONTAINER, MENU_GROUP_TITLE_TOKEN, MENU_GROUP_TOKEN, MENU_ITEM_TOKEN, MENU_RADIO_GROUP_TOKEN, MENU_SEARCH_TEMPLATE_TOKEN, MENU_STACK, MENU_TEMPLATE, MENU_TRIGGER, MENU_TRIGGER_TOKEN, MasonryComponent, MasonryImports, MasonryItemComponent, MenuCheckboxGroupDirective, MenuCheckboxItemComponent, MenuComponent, MenuContainerComponent, MenuGroupDirective, MenuGroupTitleDirective, MenuImports, MenuItemDirective, MenuRadioGroupDirective, MenuRadioItemComponent, MenuSearchTemplateDirective, MenuStack, MenuTriggerDirective, NATIVE_INPUT_REF_TOKEN, NATIVE_SELECT_INPUT_TOKEN, NATIVE_SELECT_OPTION_TOKEN, NUMBER_INPUT_TOKEN, NativeInputRefDirective, NativeSelectImports, NativeSelectInputComponent, NativeSelectInputDirective, NativeSelectOptionComponent, NativeSelectOptionDirective, NavTabLinkComponent, NavTabsComponent, NavTabsOutletComponent, NewBracketComponent, NewBracketDefaultMatchComponent, NewBracketDefaultRoundHeaderComponent, NoDataRowDirective, NumberInputComponent, NumberInputDirective, OVERLAY_BACK_OR_CLOSE_TOKEN, OVERLAY_BODY_TOKEN, OVERLAY_CLOSE_BLOCKER_TOKEN, OVERLAY_CONFIG, OVERLAY_DATA, OVERLAY_DEFAULT_CONFIG, OVERLAY_DEFAULT_OPTIONS, OVERLAY_FOOTER_TOKEN, OVERLAY_HEADER_TEMPLATE_TOKEN, OVERLAY_HEADER_TOKEN, OVERLAY_MAIN_TOKEN, OVERLAY_QUERY_PARAM_INPUT_NAME, OVERLAY_ROUTER_CONFIG_TOKEN, OVERLAY_ROUTER_LINK_TOKEN, OVERLAY_ROUTER_OUTLET_DISABLED_TEMPLATE_TOKEN, OVERLAY_ROUTER_OUTLET_TOKEN, OVERLAY_SCROLL_STRATEGY, OVERLAY_SHARED_ROUTE_TEMPLATE_TOKEN, OVERLAY_STATE, OverlayBackOrCloseDirective, OverlayBodyComponent, OverlayCloseBlockerDirective, OverlayCloseDirective, OverlayContainerComponent, OverlayFooterDirective, OverlayHandlerLinkDirective, OverlayHeaderDirective, OverlayHeaderTemplateDirective, OverlayImports, OverlayMainDirective, OverlayPositionBuilder, OverlayRef, OverlayRouteHeaderTemplateOutletComponent, OverlayRouterLinkDirective, OverlayRouterOutletComponent, OverlayRouterOutletDisabledTemplateDirective, OverlayRouterService, OverlayService, OverlaySharedRouteTemplateDirective, OverlaySharedRouteTemplateOutletComponent, OverlaySidebarComponent, OverlaySidebarPageComponent, OverlayTitleDirective, OverlayWithRoutingImports, OverlayWithSidebarImports, PARENT_OR_NEW_INLINE_MENU_STACK_PROVIDER, PARENT_OR_NEW_MENU_STACK_PROVIDER, PASSWORD_INPUT_TOKEN, PROGRESS_SPINNER_DEFAULT_OPTIONS, PROGRESS_SPINNER_DEFAULT_OPTIONS_FACTORY, PaginatedTabHeaderDirective, PaginationComponent, PaginationHeadService, PaginationImports, PaginationLinkDirective, PasswordInputComponent, PasswordInputDirective, PasswordInputToggleComponent, PictureComponent, PointerFocusTracker, ProgressSpinnerComponent, ProvideThemeDirective, QUERY_ERROR_TOKEN, QueryButtonComponent, QueryButtonDirective, QueryErrorComponent, QueryErrorDirective, RADIO_FIELD_TOKEN, RADIO_GROUP_TOKEN, RADIO_TOKEN, RICH_FILTER_BUTTON_SLOT_TOKEN, RICH_FILTER_BUTTON_TOKEN, RICH_FILTER_CONTENT_TOKEN, RICH_FILTER_TOP_TOKEN, RadioComponent, RadioDirective, RadioFieldComponent, RadioFieldDirective, RadioGroupComponent, RadioGroupDirective, RadioImports, RecycleRowsDirective, RichFilterButtonDirective, RichFilterButtonSlotDirective, RichFilterContentDirective, RichFilterHostComponent, RichFilterImports, RichFilterTopDirective, RowComponent, RowDefDirective, SCROLLABLE_IGNORE_CHILD_ATTRIBUTE, SCROLLABLE_IGNORE_CHILD_TOKEN, SCROLLABLE_IS_ACTIVE_CHILD_ATTRIBUTE, SCROLLABLE_IS_ACTIVE_CHILD_TOKEN, SCROLLABLE_LOADING_TEMPLATE_TOKEN, SCROLLABLE_PLACEHOLDER_ITEM_TEMPLATE_TOKEN, SCROLLABLE_PLACEHOLDER_OVERLAY_TEMPLATE_TOKEN, SEARCH_INPUT_TOKEN, SEGMENTED_BUTTON_FIELD_TOKEN, SEGMENTED_BUTTON_GROUP_TOKEN, SEGMENTED_BUTTON_TOKEN, SELECTION_LIST_FIELD, SELECTION_LIST_OPTION, SELECT_BODY_TOKEN, SELECT_FIELD_TOKEN, SELECT_OPTION_TOKEN, SELECT_TOKEN, SHOW_PICKER_TRIGGER_TOKEN, SIDEBAR_OVERLAY_CONFIG, SLIDER_THUMB_CONTENT_TEMPLATE_TOKEN, SLIDE_TOGGLE_TOKEN, SORT_DEFAULT_OPTIONS, SORT_HEADER_COLUMN_DEF, SORT_HEADER_INTL_PROVIDER, SORT_HEADER_INTL_PROVIDER_FACTORY, STATIC_FORM_FIELD_TOKEN, STATIC_FORM_GROUP_TOKEN, ScrollableComponent, ScrollableIgnoreChildDirective, ScrollableImports, ScrollableIsActiveChildDirective, ScrollableLoadingTemplateDirective, ScrollablePlaceholderComponent, ScrollablePlaceholderItemTemplateDirective, ScrollablePlaceholderOverlayTemplateDirective, SearchInputClearComponent, SearchInputComponent, SearchInputDirective, SegmentedButtonComponent, SegmentedButtonDirective, SegmentedButtonFieldComponent, SegmentedButtonFieldDirective, SegmentedButtonGroupComponent, SegmentedButtonGroupDirective, SegmentedButtonImports, SelectBodyComponent, SelectBodyDirective, SelectComponent, SelectDirective, SelectFieldComponent, SelectFieldDirective, SelectImports, SelectOptionComponent, SelectOptionDirective, SelectionListFieldComponent, SelectionListFieldDirective, SelectionListImports, SelectionListOptionComponent, SelectionListOptionDirective, ShowPickerTriggerDirective, SidebarOverlayService, SkeletonComponent, SkeletonImports, SkeletonItemComponent, SlideToggleComponent, SlideToggleDirective, SlideToggleFieldComponent, SlideToggleImports, SliderComponent, SliderFieldComponent, SliderImports, SliderThumbContentTemplateDirective, SortDirective, SortHeaderComponent, SortHeaderIntl, SortImports, StaticFormFieldDirective, StaticFormGroupDirective, SwipeHandlerService, TAB, TABS_CONFIG, TAB_CONTENT, TAB_GROUP, TAB_LABEL, TEL_INPUT_TOKEN, TEXTAREA_INPUT_TOKEN, TEXT_INPUT_TOKEN, THEMES_TOKEN, THEME_PROVIDER, TIMES_ICON, TIME_INPUT_FORMAT_TOKEN, TIME_INPUT_TOKEN, TOGGLETIP, TOGGLETIP_CONFIG, TOGGLETIP_DEFAULT_CONFIG, TOGGLETIP_DIRECTIVE, TOGGLETIP_TEMPLATE, TOGGLETIP_TEXT, TOOLTIP, TOOLTIP_CONFIG, TOOLTIP_DEFAULT_CONFIG, TOOLTIP_DIRECTIVE, TOOLTIP_TEMPLATE, TOOLTIP_TEXT, TabImports, TableBusyDirective, TableBusyOutletDirective, TableComponent, TableDataSource, TableImports, TargetMenuAim, TelInputComponent, TelInputDirective, TextColumnComponent, TextInputComponent, TextInputDirective, TextareaInputComponent, TextareaInputDirective, TimeInputComponent, TimeInputDirective, ToggletipCloseDirective, ToggletipComponent, ToggletipDirective, ToggletipImports, TooltipComponent, TooltipDirective, TooltipImports, VALIDATOR_ERROR_SERVICE_TOKEN, WRITEABLE_INPUT_TOKEN, WRITEABLE_INPUT_VALUE_ACCESSOR, WriteableInputDirective, _MAT_INK_BAR_POSITIONER, _MAT_INK_BAR_POSITIONER_FACTORY, accordionAnimations, createBottomSheetConfig, createBracketConfig, createComboboxConfig, createCssThemeName, createDialogConfig, createFormChangesTracker, createNavigationDismissChecker, createOverlayConfig, createOverlayDismissChecker, createOverlayHandler, createOverlayHandlerWithQueryParamLifecycle, createProvider, createRootThemeCss, createSwatchCss, createTailwindColorThemes, createTailwindCssVar, createTailwindRgbVar, createThemeStyle, createToggletipConfig, createTooltipConfig, defaultSubmitButtonConfigFn, extractFirstImageUrl, getClosestBottomSheet, getClosestDialog, getClosestOverlay, injectBreadcrumbManager, injectNewBracketConfig, injectRouterNavigationState, isScrollableChildActive, isScrollableChildIgnored, isUpperBracketMatch, normalizePictureSizes, normalizePictureSource, normalizeRoundType, orderRounds, orderRoundsByRoundNumber, paginate, provideBottomSheet, provideBottomSheetDefaultConfig, provideBracketConfig, provideBreadcrumbManager, provideColorThemes, provideComboboxConfig, provideDateFormat, provideDateTimeFormat, provideDialog, provideDialogDefaultConfig, provideFilterOverlayConfig, provideIcons, provideImageConfig, provideNewBracketConfig, provideOverlay, provideOverlayDefaultConfig, provideOverlayRouterConfig, provideSidebarOverlayConfig, provideSort, provideSurfaceThemes, provideThemes, provideTimeFormat, provideToggletipConfig, provideTooltipConfig, provideValidatorErrorsService, tabAnimations };
|
|
21192
21723
|
//# sourceMappingURL=ethlete-cdk.mjs.map
|