@ethlete/cdk 4.63.1 → 4.64.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 +14 -0
- package/fesm2022/ethlete-cdk.mjs +1196 -569
- package/fesm2022/ethlete-cdk.mjs.map +1 -1
- package/index.d.ts +103 -98
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -3803,21 +3803,6 @@ type NewBracketMatchParticipant<TRoundData, TMatchData> = NewBracketMatchPartici
|
|
|
3803
3803
|
matches: BracketMap<BracketMatchId, NewBracketMatch<TRoundData, TMatchData>>;
|
|
3804
3804
|
};
|
|
3805
3805
|
|
|
3806
|
-
declare const FIRST_ROUNDS_TYPE: {
|
|
3807
|
-
readonly SINGLE: "single";
|
|
3808
|
-
readonly DOUBLE: "double";
|
|
3809
|
-
};
|
|
3810
|
-
type FirstSingleRounds<TRoundData, TMatchData> = {
|
|
3811
|
-
type: typeof FIRST_ROUNDS_TYPE.SINGLE;
|
|
3812
|
-
first: NewBracketRound<TRoundData, TMatchData>;
|
|
3813
|
-
};
|
|
3814
|
-
type FirstDoubleRounds<TRoundData, TMatchData> = {
|
|
3815
|
-
type: typeof FIRST_ROUNDS_TYPE.DOUBLE;
|
|
3816
|
-
upper: NewBracketRound<TRoundData, TMatchData>;
|
|
3817
|
-
lower: NewBracketRound<TRoundData, TMatchData>;
|
|
3818
|
-
};
|
|
3819
|
-
type FirstRounds<TRoundData, TMatchData> = FirstSingleRounds<TRoundData, TMatchData> | FirstDoubleRounds<TRoundData, TMatchData>;
|
|
3820
|
-
|
|
3821
3806
|
type BracketRoundSwissGroupId = string & {
|
|
3822
3807
|
__brand: 'BracketRoundSwissGroupId';
|
|
3823
3808
|
};
|
|
@@ -3846,6 +3831,12 @@ declare class NewBracketDefaultRoundHeaderComponent<TRoundData = unknown, TMatch
|
|
|
3846
3831
|
static ɵcmp: i0.ɵɵComponentDeclaration<NewBracketDefaultRoundHeaderComponent<any, any>, "et-new-bracket-default-round-header", never, { "bracketRound": { "alias": "bracketRound"; "required": true; "isSignal": true; }; }, {}, never, never, true, never>;
|
|
3847
3832
|
}
|
|
3848
3833
|
|
|
3834
|
+
type Dimensions = {
|
|
3835
|
+
width: number;
|
|
3836
|
+
height: number;
|
|
3837
|
+
top: number;
|
|
3838
|
+
left: number;
|
|
3839
|
+
};
|
|
3849
3840
|
type BracketRoundHeaderComponent<TRoundData, TMatchData> = ComponentType<{
|
|
3850
3841
|
bracketRound: InputSignal<NewBracketRound<TRoundData, TMatchData>>;
|
|
3851
3842
|
}>;
|
|
@@ -3853,94 +3844,113 @@ type BracketMatchComponent<TRoundData, TMatchData> = ComponentType<{
|
|
|
3853
3844
|
bracketRound: InputSignal<NewBracketRound<TRoundData, TMatchData>>;
|
|
3854
3845
|
bracketMatch: InputSignal<NewBracketMatch<TRoundData, TMatchData>>;
|
|
3855
3846
|
}>;
|
|
3856
|
-
|
|
3857
|
-
|
|
3858
|
-
|
|
3859
|
-
|
|
3860
|
-
|
|
3861
|
-
|
|
3862
|
-
rowStart: number;
|
|
3863
|
-
rowEnd: number;
|
|
3864
|
-
rowDefinitions: string;
|
|
3865
|
-
roundRelation: BracketRoundRelation<TRoundData, TMatchData>;
|
|
3866
|
-
items: Map<BracketRoundId | BracketMatchId, BracketGridItem<TRoundData, TMatchData>>;
|
|
3847
|
+
|
|
3848
|
+
/**
|
|
3849
|
+
* A row is a part of an element.
|
|
3850
|
+
*/
|
|
3851
|
+
type BracketElementPart = {
|
|
3852
|
+
dimensions: Dimensions;
|
|
3867
3853
|
};
|
|
3868
|
-
|
|
3869
|
-
|
|
3870
|
-
|
|
3871
|
-
|
|
3872
|
-
|
|
3873
|
-
|
|
3874
|
-
|
|
3854
|
+
|
|
3855
|
+
/**
|
|
3856
|
+
* An element is a slice of a section.
|
|
3857
|
+
* It can be a match, a header, a gap, etc.
|
|
3858
|
+
*/
|
|
3859
|
+
type BracketElementBase = {
|
|
3860
|
+
area: string;
|
|
3861
|
+
/** The dimensions of the actual element */
|
|
3862
|
+
dimensions: Dimensions;
|
|
3863
|
+
/** The dimensions of the container that holds the element */
|
|
3864
|
+
containerDimensions: Dimensions;
|
|
3865
|
+
parts: ReadonlyArray<BracketElementPart>;
|
|
3866
|
+
span?: BracketElementSpanCoordinates;
|
|
3867
|
+
isHidden?: boolean;
|
|
3868
|
+
};
|
|
3869
|
+
type HeaderBracketElement<TRoundData, TMatchData> = BracketElementBase & HeaderBracketElementDetails<TRoundData, TMatchData>;
|
|
3870
|
+
type MatchBracketElement<TRoundData, TMatchData> = BracketElementBase & MatchBracketElementDetails<TRoundData, TMatchData>;
|
|
3871
|
+
type GapBracketElement = BracketElementBase & GapBracketElementDetails;
|
|
3872
|
+
type BracketElement<TRoundData, TMatchData> = HeaderBracketElement<TRoundData, TMatchData> | MatchBracketElement<TRoundData, TMatchData> | GapBracketElement;
|
|
3873
|
+
type BracketElementSpanCoordinates = {
|
|
3874
|
+
masterColumnStart: number;
|
|
3875
|
+
masterColumnEnd: number;
|
|
3876
|
+
sectionStart: number;
|
|
3877
|
+
sectionEnd: number;
|
|
3878
|
+
subColumnStart: number;
|
|
3879
|
+
subColumnEnd: number;
|
|
3880
|
+
};
|
|
3881
|
+
type HeaderBracketElementDetails<TRoundData, TMatchData> = {
|
|
3882
|
+
type: 'header';
|
|
3875
3883
|
component: BracketRoundHeaderComponent<TRoundData, TMatchData>;
|
|
3876
|
-
|
|
3877
|
-
data: {
|
|
3878
|
-
bracketRound: NewBracketRound<TRoundData, TMatchData>;
|
|
3879
|
-
};
|
|
3884
|
+
round: NewBracketRound<TRoundData, TMatchData>;
|
|
3880
3885
|
};
|
|
3881
|
-
type
|
|
3886
|
+
type MatchBracketElementDetails<TRoundData, TMatchData> = {
|
|
3882
3887
|
type: 'match';
|
|
3883
|
-
id: BracketMatchId;
|
|
3884
|
-
layoutId: `${BracketMatchId}-layout`;
|
|
3885
|
-
rowStart: number;
|
|
3886
|
-
rowEnd: number;
|
|
3887
|
-
className: string;
|
|
3888
3888
|
component: BracketMatchComponent<TRoundData, TMatchData>;
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
};
|
|
3889
|
+
match: NewBracketMatch<TRoundData, TMatchData>;
|
|
3890
|
+
round: NewBracketRound<TRoundData, TMatchData>;
|
|
3891
|
+
};
|
|
3892
|
+
type GapBracketElementDetails = {
|
|
3893
|
+
type: 'matchGap' | 'roundHeaderGap' | 'roundGap' | 'colGap';
|
|
3895
3894
|
};
|
|
3896
|
-
type BracketGridItem<TRoundData, TMatchData> = BracketGridRoundHeaderItem<TRoundData, TMatchData> | BracketGridMatchItem<TRoundData, TMatchData>;
|
|
3897
3895
|
|
|
3898
|
-
type
|
|
3899
|
-
|
|
3900
|
-
|
|
3896
|
+
type BracketSubColumn<TRoundData, TMatchData> = {
|
|
3897
|
+
dimensions: Dimensions;
|
|
3898
|
+
elements: ReadonlyArray<BracketElement<TRoundData, TMatchData>>;
|
|
3899
|
+
span: BracketSubColumnSpan;
|
|
3900
|
+
};
|
|
3901
|
+
type BracketSubColumnSpan = {
|
|
3902
|
+
isStart: boolean;
|
|
3903
|
+
isEnd: boolean;
|
|
3901
3904
|
};
|
|
3902
3905
|
|
|
3903
|
-
type
|
|
3904
|
-
|
|
3905
|
-
|
|
3906
|
+
type BracketMasterColumnSectionType = 'round' | 'gap';
|
|
3907
|
+
type BracketMasterColumnSection<TRoundData, TMatchData> = {
|
|
3908
|
+
subColumns: ReadonlyArray<BracketSubColumn<TRoundData, TMatchData>>;
|
|
3909
|
+
dimensions: Dimensions;
|
|
3910
|
+
type: BracketMasterColumnSectionType;
|
|
3906
3911
|
};
|
|
3907
3912
|
|
|
3908
|
-
type
|
|
3909
|
-
|
|
3910
|
-
|
|
3911
|
-
/** Height of one match */
|
|
3912
|
-
matchHeight: number;
|
|
3913
|
-
/** Gap between rows */
|
|
3914
|
-
rowGap: number;
|
|
3915
|
-
/** Gap between columns */
|
|
3916
|
-
columnGap: number;
|
|
3917
|
-
/**
|
|
3918
|
-
* Offset from the top.
|
|
3919
|
-
* Will be 0 if e.g. there is no round header and we are displaying a single elimination bracket.
|
|
3920
|
-
* Will be some value if there is a round header or if we want to display the lower bracket of a double elimination bracket.
|
|
3921
|
-
*/
|
|
3922
|
-
baseOffsetY: number;
|
|
3923
|
-
/**
|
|
3924
|
-
* The number of matches in the first round.
|
|
3925
|
-
* For double elimination brackets, this is the number of matches in the upper bracket or the lower bracket.
|
|
3926
|
-
* For double elimination matches after the upper and lower bracket have been merged, this is the sum of matches in the first round of the upper and lower bracket.
|
|
3927
|
-
*/
|
|
3928
|
-
baseRoundMatchCount: number;
|
|
3929
|
-
/** Gap between the upper and lower bracket in a double elimination bracket */
|
|
3930
|
-
upperLowerGap: number;
|
|
3931
|
-
includeUpperLowerGap: boolean;
|
|
3913
|
+
type BracketMasterColumn<TRoundData, TMatchData> = {
|
|
3914
|
+
sections: ReadonlyArray<BracketMasterColumnSection<TRoundData, TMatchData>>;
|
|
3915
|
+
dimensions: Dimensions;
|
|
3932
3916
|
};
|
|
3933
|
-
|
|
3934
|
-
|
|
3935
|
-
|
|
3936
|
-
|
|
3937
|
-
|
|
3938
|
-
|
|
3939
|
-
|
|
3940
|
-
|
|
3941
|
-
|
|
3942
|
-
|
|
3943
|
-
|
|
3917
|
+
|
|
3918
|
+
type BracketGrid<TRoundData, TMatchData> = {
|
|
3919
|
+
masterColumns: ReadonlyArray<BracketMasterColumn<TRoundData, TMatchData>>;
|
|
3920
|
+
dimensions: Dimensions;
|
|
3921
|
+
};
|
|
3922
|
+
type MutableBracketGrid<TRoundData, TMatchData> = {
|
|
3923
|
+
grid: BracketGrid<TRoundData, TMatchData>;
|
|
3924
|
+
pushMasterColumn: (...masterColumns: BracketMasterColumn<TRoundData, TMatchData>[]) => void;
|
|
3925
|
+
calculateDimensions: () => void;
|
|
3926
|
+
setupElementSpans: () => void;
|
|
3927
|
+
};
|
|
3928
|
+
|
|
3929
|
+
type FinalizedBracketColumn<TRoundData = unknown, TMatchData = unknown> = {
|
|
3930
|
+
dimensions: Dimensions;
|
|
3931
|
+
elements: FinalizedBracketElement<TRoundData, TMatchData>[];
|
|
3932
|
+
};
|
|
3933
|
+
type FinalizedHeaderBracketElement<TRoundData, TMatchData> = {
|
|
3934
|
+
type: 'header';
|
|
3935
|
+
dimensions: Dimensions;
|
|
3936
|
+
component: BracketRoundHeaderComponent<TRoundData, TMatchData>;
|
|
3937
|
+
round: NewBracketRound<TRoundData, TMatchData>;
|
|
3938
|
+
};
|
|
3939
|
+
type FinalizedMatchBracketElement<TRoundData, TMatchData> = {
|
|
3940
|
+
type: 'match';
|
|
3941
|
+
dimensions: Dimensions;
|
|
3942
|
+
component: BracketMatchComponent<TRoundData, TMatchData>;
|
|
3943
|
+
match: NewBracketMatch<TRoundData, TMatchData>;
|
|
3944
|
+
round: NewBracketRound<TRoundData, TMatchData>;
|
|
3945
|
+
classes: string;
|
|
3946
|
+
};
|
|
3947
|
+
type FinalizedBracketElement<TRoundData = unknown, TMatchData = unknown> = FinalizedHeaderBracketElement<TRoundData, TMatchData> | FinalizedMatchBracketElement<TRoundData, TMatchData>;
|
|
3948
|
+
type FinalizedBracketMatchElementMap<TRoundData, TMatchData> = BracketMap<string, FinalizedMatchBracketElement<TRoundData, TMatchData>>;
|
|
3949
|
+
|
|
3950
|
+
type ComputedBracketGrid<TRoundData, TMatchData> = {
|
|
3951
|
+
raw: MutableBracketGrid<TRoundData, TMatchData>;
|
|
3952
|
+
columns: FinalizedBracketColumn<TRoundData, TMatchData>[];
|
|
3953
|
+
matchElementMap: FinalizedBracketMatchElementMap<TRoundData, TMatchData>;
|
|
3944
3954
|
};
|
|
3945
3955
|
|
|
3946
3956
|
declare class NewBracketComponent<TRoundData = unknown, TMatchData = unknown> {
|
|
@@ -3969,13 +3979,8 @@ declare class NewBracketComponent<TRoundData = unknown, TMatchData = unknown> {
|
|
|
3969
3979
|
finalMatchComponent: i0.InputSignal<BracketMatchComponent<TRoundData, TMatchData> | undefined>;
|
|
3970
3980
|
bracketData: i0.Signal<NewBracket<TRoundData, TMatchData>>;
|
|
3971
3981
|
swissGroups: i0.Signal<BracketRoundMapWithSwissData<TRoundData, TMatchData> | null>;
|
|
3972
|
-
|
|
3973
|
-
|
|
3974
|
-
firstRounds: i0.Signal<FirstRounds<TRoundData, TMatchData>>;
|
|
3975
|
-
drawManData: i0.Signal<{
|
|
3976
|
-
svg: string;
|
|
3977
|
-
debugMap: Record<BracketMatchId, DrawManDebugData>;
|
|
3978
|
-
}>;
|
|
3982
|
+
bracketGrid: i0.Signal<ComputedBracketGrid<TRoundData, TMatchData> | null>;
|
|
3983
|
+
drawManData: i0.Signal<string>;
|
|
3979
3984
|
svgContent: i0.Signal<_angular_platform_browser.SafeHtml>;
|
|
3980
3985
|
journeyHighlight: i0.Signal<string | null>;
|
|
3981
3986
|
constructor();
|