tenniscommon 1.0.2 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/common/matchplay/initialData.js +0 -2
- package/dist/cjs/common/matchplay/interfaces.d.ts +8 -1
- package/dist/cjs/common/opponent/initialData.d.ts +3 -2
- package/dist/cjs/common/opponent/initialData.js +11 -1
- package/dist/cjs/common/opponent/interfaces.d.ts +8 -1
- package/dist/cjs/common/tournament/initialData.d.ts +3 -1
- package/dist/cjs/common/tournament/initialData.js +20 -0
- package/dist/cjs/common/tournament/interfaces.d.ts +14 -0
- package/dist/esm/common/matchplay/initialData.js +0 -2
- package/dist/esm/common/matchplay/interfaces.d.ts +8 -1
- package/dist/esm/common/opponent/initialData.d.ts +3 -2
- package/dist/esm/common/opponent/initialData.js +10 -1
- package/dist/esm/common/opponent/interfaces.d.ts +8 -1
- package/dist/esm/common/tournament/initialData.d.ts +3 -1
- package/dist/esm/common/tournament/initialData.js +18 -0
- package/dist/esm/common/tournament/interfaces.d.ts +14 -0
- package/dist/types/common/matchplay/interfaces.d.ts +8 -1
- package/dist/types/common/opponent/initialData.d.ts +3 -2
- package/dist/types/common/opponent/interfaces.d.ts +8 -1
- package/dist/types/common/tournament/initialData.d.ts +3 -1
- package/dist/types/common/tournament/interfaces.d.ts +14 -0
- package/package.json +1 -1
|
@@ -30,7 +30,6 @@ function createInitialMatchplaySinglesItem(playerId, date) {
|
|
|
30
30
|
secondSetTieBreak: undefined,
|
|
31
31
|
decidingSet: undefined,
|
|
32
32
|
decidingSetTieBreak: undefined,
|
|
33
|
-
comment: '',
|
|
34
33
|
};
|
|
35
34
|
}
|
|
36
35
|
function createInitialMatchplayDoublesItem(playerId, date) {
|
|
@@ -60,6 +59,5 @@ function createInitialMatchplayDoublesItem(playerId, date) {
|
|
|
60
59
|
secondSetTieBreak: undefined,
|
|
61
60
|
decidingSet: undefined,
|
|
62
61
|
decidingSetTieBreak: undefined,
|
|
63
|
-
comment: '',
|
|
64
62
|
};
|
|
65
63
|
}
|
|
@@ -79,6 +79,11 @@ export declare const MATCH_ARRAYS: {
|
|
|
79
79
|
LOCATION: MATCH_LOCATION_UNION[];
|
|
80
80
|
SET_FORMAT: MATCH_SET_FORMAT_UNION[];
|
|
81
81
|
};
|
|
82
|
+
export interface MatchplayUIItem extends MatchplayItem {
|
|
83
|
+
groupKey: string;
|
|
84
|
+
groupDate: Date;
|
|
85
|
+
groupColor: string;
|
|
86
|
+
}
|
|
82
87
|
export interface MatchplayItem {
|
|
83
88
|
_id: string;
|
|
84
89
|
playerId: string;
|
|
@@ -105,7 +110,9 @@ export interface MatchplayItem {
|
|
|
105
110
|
secondSetTieBreak?: string;
|
|
106
111
|
decidingSet?: string;
|
|
107
112
|
decidingSetTieBreak?: string;
|
|
108
|
-
|
|
113
|
+
commentCoachBefore?: string;
|
|
114
|
+
commentCoachAfter?: string;
|
|
115
|
+
commentPlayer?: string;
|
|
109
116
|
}
|
|
110
117
|
export interface MatchplayStats {
|
|
111
118
|
Career: StatsPack;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { OpponentItem, OpponentStats } from './interfaces';
|
|
1
|
+
import { OpponentIndividualStats, OpponentItem, OpponentStats } from './interfaces';
|
|
2
2
|
export declare function createInitialOpponentItem(playerId: string, born: number): OpponentItem;
|
|
3
|
-
export declare function
|
|
3
|
+
export declare function createOpponentIndividualStats(name: string, hand: string): OpponentIndividualStats;
|
|
4
|
+
export declare function createOpponentStats(): OpponentStats;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createInitialOpponentItem = createInitialOpponentItem;
|
|
4
|
+
exports.createOpponentIndividualStats = createOpponentIndividualStats;
|
|
4
5
|
exports.createOpponentStats = createOpponentStats;
|
|
5
6
|
const interfaces_1 = require("./interfaces");
|
|
6
7
|
const general_1 = require("../general");
|
|
@@ -16,10 +17,19 @@ function createInitialOpponentItem(playerId, born) {
|
|
|
16
17
|
comment: '',
|
|
17
18
|
};
|
|
18
19
|
}
|
|
19
|
-
function
|
|
20
|
+
function createOpponentIndividualStats(name, hand) {
|
|
20
21
|
return {
|
|
21
22
|
name: name,
|
|
22
23
|
hand: hand,
|
|
23
24
|
basicStatsPack: (0, matchplay_1.createBasicStatsPack)(),
|
|
24
25
|
};
|
|
25
26
|
}
|
|
27
|
+
function createOpponentStats() {
|
|
28
|
+
return {
|
|
29
|
+
opponentLeft: createOpponentIndividualStats('Left Opponent', interfaces_1.HAND.Left),
|
|
30
|
+
opponentRight: createOpponentIndividualStats('Right Opponent', interfaces_1.HAND.Right),
|
|
31
|
+
opponentMostDefeats: createOpponentIndividualStats('', ''),
|
|
32
|
+
opponentMostVictories: createOpponentIndividualStats('', ''),
|
|
33
|
+
topSixMostMatchesAgainst: []
|
|
34
|
+
};
|
|
35
|
+
}
|
|
@@ -15,8 +15,15 @@ export interface OpponentItem {
|
|
|
15
15
|
show: BOOLEAN_UNION;
|
|
16
16
|
comment: string;
|
|
17
17
|
}
|
|
18
|
-
export interface
|
|
18
|
+
export interface OpponentIndividualStats {
|
|
19
19
|
name: string;
|
|
20
20
|
hand: string;
|
|
21
21
|
basicStatsPack: BasicStatsPack;
|
|
22
22
|
}
|
|
23
|
+
export interface OpponentStats {
|
|
24
|
+
opponentLeft: OpponentIndividualStats;
|
|
25
|
+
opponentRight: OpponentIndividualStats;
|
|
26
|
+
opponentMostDefeats: OpponentIndividualStats;
|
|
27
|
+
opponentMostVictories: OpponentIndividualStats;
|
|
28
|
+
topSixMostMatchesAgainst: OpponentIndividualStats[];
|
|
29
|
+
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import { TournamentItem, TournamentYearItem } from './interfaces';
|
|
1
|
+
import { MatchFormatStats, TournamentItem, TournamentStats, TournamentYearItem } from './interfaces';
|
|
2
2
|
export declare function createInitialTournamentYearItem(date: Date): TournamentYearItem;
|
|
3
3
|
export declare function createInitialTournamentItem(playerId: string): TournamentItem;
|
|
4
|
+
export declare function createTournamentStats(): TournamentStats;
|
|
5
|
+
export declare function createTournamentData(): MatchFormatStats;
|
|
@@ -2,8 +2,11 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.createInitialTournamentYearItem = createInitialTournamentYearItem;
|
|
4
4
|
exports.createInitialTournamentItem = createInitialTournamentItem;
|
|
5
|
+
exports.createTournamentStats = createTournamentStats;
|
|
6
|
+
exports.createTournamentData = createTournamentData;
|
|
5
7
|
const general_1 = require("../general");
|
|
6
8
|
const interfaces_1 = require("./interfaces");
|
|
9
|
+
const matchplay_1 = require("../matchplay");
|
|
7
10
|
// Factory function for creating initial TournamentYearItem
|
|
8
11
|
function createInitialTournamentYearItem(date) {
|
|
9
12
|
return {
|
|
@@ -25,3 +28,20 @@ function createInitialTournamentItem(playerId) {
|
|
|
25
28
|
tournamentYears: [], // Alternatively, you can use [createInitialTournamentYearItem()] if you need to initialize with a default year item
|
|
26
29
|
};
|
|
27
30
|
}
|
|
31
|
+
function createTournamentStats() {
|
|
32
|
+
return {
|
|
33
|
+
entered: 0,
|
|
34
|
+
Career: (0, matchplay_1.createSpecificStats)(),
|
|
35
|
+
Singles: createTournamentData(),
|
|
36
|
+
Doubles: createTournamentData(),
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
function createTournamentData() {
|
|
40
|
+
return {
|
|
41
|
+
winner: [],
|
|
42
|
+
runnerUp: [],
|
|
43
|
+
thirdPlace: [],
|
|
44
|
+
final: (0, matchplay_1.createBasicStatsPack)(),
|
|
45
|
+
semiFinal: (0, matchplay_1.createBasicStatsPack)(),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BOOLEAN_UNION } from '../general';
|
|
2
2
|
import { ValueOf } from '../general';
|
|
3
|
+
import { BasicStatsPack, MatchplayItem, SpecificStats } from '../matchplay';
|
|
3
4
|
export declare const TOURNAMENT: {
|
|
4
5
|
readonly TYPE: {
|
|
5
6
|
readonly TennisIreland: "Tennis Ireland";
|
|
@@ -41,3 +42,16 @@ export interface TournamentYearItem {
|
|
|
41
42
|
show: BOOLEAN_UNION;
|
|
42
43
|
comment: string;
|
|
43
44
|
}
|
|
45
|
+
export interface MatchFormatStats {
|
|
46
|
+
winner: MatchplayItem[];
|
|
47
|
+
runnerUp: MatchplayItem[];
|
|
48
|
+
thirdPlace: MatchplayItem[];
|
|
49
|
+
final: BasicStatsPack;
|
|
50
|
+
semiFinal: BasicStatsPack;
|
|
51
|
+
}
|
|
52
|
+
export interface TournamentStats {
|
|
53
|
+
entered: number;
|
|
54
|
+
Career: SpecificStats;
|
|
55
|
+
Singles: MatchFormatStats;
|
|
56
|
+
Doubles: MatchFormatStats;
|
|
57
|
+
}
|
|
@@ -26,7 +26,6 @@ export function createInitialMatchplaySinglesItem(playerId, date) {
|
|
|
26
26
|
secondSetTieBreak: undefined,
|
|
27
27
|
decidingSet: undefined,
|
|
28
28
|
decidingSetTieBreak: undefined,
|
|
29
|
-
comment: '',
|
|
30
29
|
};
|
|
31
30
|
}
|
|
32
31
|
export function createInitialMatchplayDoublesItem(playerId, date) {
|
|
@@ -56,6 +55,5 @@ export function createInitialMatchplayDoublesItem(playerId, date) {
|
|
|
56
55
|
secondSetTieBreak: undefined,
|
|
57
56
|
decidingSet: undefined,
|
|
58
57
|
decidingSetTieBreak: undefined,
|
|
59
|
-
comment: '',
|
|
60
58
|
};
|
|
61
59
|
}
|
|
@@ -79,6 +79,11 @@ export declare const MATCH_ARRAYS: {
|
|
|
79
79
|
LOCATION: MATCH_LOCATION_UNION[];
|
|
80
80
|
SET_FORMAT: MATCH_SET_FORMAT_UNION[];
|
|
81
81
|
};
|
|
82
|
+
export interface MatchplayUIItem extends MatchplayItem {
|
|
83
|
+
groupKey: string;
|
|
84
|
+
groupDate: Date;
|
|
85
|
+
groupColor: string;
|
|
86
|
+
}
|
|
82
87
|
export interface MatchplayItem {
|
|
83
88
|
_id: string;
|
|
84
89
|
playerId: string;
|
|
@@ -105,7 +110,9 @@ export interface MatchplayItem {
|
|
|
105
110
|
secondSetTieBreak?: string;
|
|
106
111
|
decidingSet?: string;
|
|
107
112
|
decidingSetTieBreak?: string;
|
|
108
|
-
|
|
113
|
+
commentCoachBefore?: string;
|
|
114
|
+
commentCoachAfter?: string;
|
|
115
|
+
commentPlayer?: string;
|
|
109
116
|
}
|
|
110
117
|
export interface MatchplayStats {
|
|
111
118
|
Career: StatsPack;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { OpponentItem, OpponentStats } from './interfaces';
|
|
1
|
+
import { OpponentIndividualStats, OpponentItem, OpponentStats } from './interfaces';
|
|
2
2
|
export declare function createInitialOpponentItem(playerId: string, born: number): OpponentItem;
|
|
3
|
-
export declare function
|
|
3
|
+
export declare function createOpponentIndividualStats(name: string, hand: string): OpponentIndividualStats;
|
|
4
|
+
export declare function createOpponentStats(): OpponentStats;
|
|
@@ -12,10 +12,19 @@ export function createInitialOpponentItem(playerId, born) {
|
|
|
12
12
|
comment: '',
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
export function
|
|
15
|
+
export function createOpponentIndividualStats(name, hand) {
|
|
16
16
|
return {
|
|
17
17
|
name: name,
|
|
18
18
|
hand: hand,
|
|
19
19
|
basicStatsPack: createBasicStatsPack(),
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
+
export function createOpponentStats() {
|
|
23
|
+
return {
|
|
24
|
+
opponentLeft: createOpponentIndividualStats('Left Opponent', HAND.Left),
|
|
25
|
+
opponentRight: createOpponentIndividualStats('Right Opponent', HAND.Right),
|
|
26
|
+
opponentMostDefeats: createOpponentIndividualStats('', ''),
|
|
27
|
+
opponentMostVictories: createOpponentIndividualStats('', ''),
|
|
28
|
+
topSixMostMatchesAgainst: []
|
|
29
|
+
};
|
|
30
|
+
}
|
|
@@ -15,8 +15,15 @@ export interface OpponentItem {
|
|
|
15
15
|
show: BOOLEAN_UNION;
|
|
16
16
|
comment: string;
|
|
17
17
|
}
|
|
18
|
-
export interface
|
|
18
|
+
export interface OpponentIndividualStats {
|
|
19
19
|
name: string;
|
|
20
20
|
hand: string;
|
|
21
21
|
basicStatsPack: BasicStatsPack;
|
|
22
22
|
}
|
|
23
|
+
export interface OpponentStats {
|
|
24
|
+
opponentLeft: OpponentIndividualStats;
|
|
25
|
+
opponentRight: OpponentIndividualStats;
|
|
26
|
+
opponentMostDefeats: OpponentIndividualStats;
|
|
27
|
+
opponentMostVictories: OpponentIndividualStats;
|
|
28
|
+
topSixMostMatchesAgainst: OpponentIndividualStats[];
|
|
29
|
+
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import { TournamentItem, TournamentYearItem } from './interfaces';
|
|
1
|
+
import { MatchFormatStats, TournamentItem, TournamentStats, TournamentYearItem } from './interfaces';
|
|
2
2
|
export declare function createInitialTournamentYearItem(date: Date): TournamentYearItem;
|
|
3
3
|
export declare function createInitialTournamentItem(playerId: string): TournamentItem;
|
|
4
|
+
export declare function createTournamentStats(): TournamentStats;
|
|
5
|
+
export declare function createTournamentData(): MatchFormatStats;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { COMMONS } from '../general';
|
|
2
2
|
import { TOURNAMENT } from './interfaces';
|
|
3
|
+
import { createBasicStatsPack, createSpecificStats, } from '../matchplay';
|
|
3
4
|
// Factory function for creating initial TournamentYearItem
|
|
4
5
|
export function createInitialTournamentYearItem(date) {
|
|
5
6
|
return {
|
|
@@ -21,3 +22,20 @@ export function createInitialTournamentItem(playerId) {
|
|
|
21
22
|
tournamentYears: [], // Alternatively, you can use [createInitialTournamentYearItem()] if you need to initialize with a default year item
|
|
22
23
|
};
|
|
23
24
|
}
|
|
25
|
+
export function createTournamentStats() {
|
|
26
|
+
return {
|
|
27
|
+
entered: 0,
|
|
28
|
+
Career: createSpecificStats(),
|
|
29
|
+
Singles: createTournamentData(),
|
|
30
|
+
Doubles: createTournamentData(),
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
export function createTournamentData() {
|
|
34
|
+
return {
|
|
35
|
+
winner: [],
|
|
36
|
+
runnerUp: [],
|
|
37
|
+
thirdPlace: [],
|
|
38
|
+
final: createBasicStatsPack(),
|
|
39
|
+
semiFinal: createBasicStatsPack(),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BOOLEAN_UNION } from '../general';
|
|
2
2
|
import { ValueOf } from '../general';
|
|
3
|
+
import { BasicStatsPack, MatchplayItem, SpecificStats } from '../matchplay';
|
|
3
4
|
export declare const TOURNAMENT: {
|
|
4
5
|
readonly TYPE: {
|
|
5
6
|
readonly TennisIreland: "Tennis Ireland";
|
|
@@ -41,3 +42,16 @@ export interface TournamentYearItem {
|
|
|
41
42
|
show: BOOLEAN_UNION;
|
|
42
43
|
comment: string;
|
|
43
44
|
}
|
|
45
|
+
export interface MatchFormatStats {
|
|
46
|
+
winner: MatchplayItem[];
|
|
47
|
+
runnerUp: MatchplayItem[];
|
|
48
|
+
thirdPlace: MatchplayItem[];
|
|
49
|
+
final: BasicStatsPack;
|
|
50
|
+
semiFinal: BasicStatsPack;
|
|
51
|
+
}
|
|
52
|
+
export interface TournamentStats {
|
|
53
|
+
entered: number;
|
|
54
|
+
Career: SpecificStats;
|
|
55
|
+
Singles: MatchFormatStats;
|
|
56
|
+
Doubles: MatchFormatStats;
|
|
57
|
+
}
|
|
@@ -79,6 +79,11 @@ export declare const MATCH_ARRAYS: {
|
|
|
79
79
|
LOCATION: MATCH_LOCATION_UNION[];
|
|
80
80
|
SET_FORMAT: MATCH_SET_FORMAT_UNION[];
|
|
81
81
|
};
|
|
82
|
+
export interface MatchplayUIItem extends MatchplayItem {
|
|
83
|
+
groupKey: string;
|
|
84
|
+
groupDate: Date;
|
|
85
|
+
groupColor: string;
|
|
86
|
+
}
|
|
82
87
|
export interface MatchplayItem {
|
|
83
88
|
_id: string;
|
|
84
89
|
playerId: string;
|
|
@@ -105,7 +110,9 @@ export interface MatchplayItem {
|
|
|
105
110
|
secondSetTieBreak?: string;
|
|
106
111
|
decidingSet?: string;
|
|
107
112
|
decidingSetTieBreak?: string;
|
|
108
|
-
|
|
113
|
+
commentCoachBefore?: string;
|
|
114
|
+
commentCoachAfter?: string;
|
|
115
|
+
commentPlayer?: string;
|
|
109
116
|
}
|
|
110
117
|
export interface MatchplayStats {
|
|
111
118
|
Career: StatsPack;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import { OpponentItem, OpponentStats } from './interfaces';
|
|
1
|
+
import { OpponentIndividualStats, OpponentItem, OpponentStats } from './interfaces';
|
|
2
2
|
export declare function createInitialOpponentItem(playerId: string, born: number): OpponentItem;
|
|
3
|
-
export declare function
|
|
3
|
+
export declare function createOpponentIndividualStats(name: string, hand: string): OpponentIndividualStats;
|
|
4
|
+
export declare function createOpponentStats(): OpponentStats;
|
|
@@ -15,8 +15,15 @@ export interface OpponentItem {
|
|
|
15
15
|
show: BOOLEAN_UNION;
|
|
16
16
|
comment: string;
|
|
17
17
|
}
|
|
18
|
-
export interface
|
|
18
|
+
export interface OpponentIndividualStats {
|
|
19
19
|
name: string;
|
|
20
20
|
hand: string;
|
|
21
21
|
basicStatsPack: BasicStatsPack;
|
|
22
22
|
}
|
|
23
|
+
export interface OpponentStats {
|
|
24
|
+
opponentLeft: OpponentIndividualStats;
|
|
25
|
+
opponentRight: OpponentIndividualStats;
|
|
26
|
+
opponentMostDefeats: OpponentIndividualStats;
|
|
27
|
+
opponentMostVictories: OpponentIndividualStats;
|
|
28
|
+
topSixMostMatchesAgainst: OpponentIndividualStats[];
|
|
29
|
+
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
import { TournamentItem, TournamentYearItem } from './interfaces';
|
|
1
|
+
import { MatchFormatStats, TournamentItem, TournamentStats, TournamentYearItem } from './interfaces';
|
|
2
2
|
export declare function createInitialTournamentYearItem(date: Date): TournamentYearItem;
|
|
3
3
|
export declare function createInitialTournamentItem(playerId: string): TournamentItem;
|
|
4
|
+
export declare function createTournamentStats(): TournamentStats;
|
|
5
|
+
export declare function createTournamentData(): MatchFormatStats;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BOOLEAN_UNION } from '../general';
|
|
2
2
|
import { ValueOf } from '../general';
|
|
3
|
+
import { BasicStatsPack, MatchplayItem, SpecificStats } from '../matchplay';
|
|
3
4
|
export declare const TOURNAMENT: {
|
|
4
5
|
readonly TYPE: {
|
|
5
6
|
readonly TennisIreland: "Tennis Ireland";
|
|
@@ -41,3 +42,16 @@ export interface TournamentYearItem {
|
|
|
41
42
|
show: BOOLEAN_UNION;
|
|
42
43
|
comment: string;
|
|
43
44
|
}
|
|
45
|
+
export interface MatchFormatStats {
|
|
46
|
+
winner: MatchplayItem[];
|
|
47
|
+
runnerUp: MatchplayItem[];
|
|
48
|
+
thirdPlace: MatchplayItem[];
|
|
49
|
+
final: BasicStatsPack;
|
|
50
|
+
semiFinal: BasicStatsPack;
|
|
51
|
+
}
|
|
52
|
+
export interface TournamentStats {
|
|
53
|
+
entered: number;
|
|
54
|
+
Career: SpecificStats;
|
|
55
|
+
Singles: MatchFormatStats;
|
|
56
|
+
Doubles: MatchFormatStats;
|
|
57
|
+
}
|