@mtgame/core 0.1.43 → 0.1.45
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/bundles/mtgame-core.umd.js +78 -70
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/bundles/mtgame-core.umd.min.js +1 -1
- package/bundles/mtgame-core.umd.min.js.map +1 -1
- package/esm2015/localization/rugby-game-log-types.js +10 -11
- package/esm2015/models/game.js +9 -11
- package/esm2015/models/rugby-game-log.js +36 -35
- package/esm2015/models/rugby-game-statistic.js +4 -6
- package/esm2015/models/rugby-statistic.js +24 -13
- package/esm2015/models/tournament-team.js +2 -1
- package/esm5/localization/rugby-game-log-types.js +10 -11
- package/esm5/models/game.js +9 -11
- package/esm5/models/rugby-game-log.js +35 -34
- package/esm5/models/rugby-game-statistic.js +4 -6
- package/esm5/models/rugby-statistic.js +24 -13
- package/esm5/models/tournament-team.js +2 -1
- package/fesm2015/mtgame-core.js +79 -71
- package/fesm2015/mtgame-core.js.map +1 -1
- package/fesm5/mtgame-core.js +78 -70
- package/fesm5/mtgame-core.js.map +1 -1
- package/localization/rugby-game-log-types.d.ts +2 -3
- package/models/rugby-game-log.d.ts +30 -30
- package/models/rugby-game-statistic.d.ts +4 -6
- package/models/rugby-statistic.d.ts +22 -11
- package/models/tournament-team.d.ts +1 -0
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
package/fesm2015/mtgame-core.js
CHANGED
|
@@ -1672,24 +1672,22 @@ let Game = class Game extends BaseModel {
|
|
|
1672
1672
|
return this.status === GameStatuses.closed;
|
|
1673
1673
|
}
|
|
1674
1674
|
get isTeamWon() {
|
|
1675
|
-
return
|
|
1675
|
+
return [GameResultTypes.team_won, GameResultTypes.competitor_team_technical_defeat].includes(this.resultType);
|
|
1676
1676
|
}
|
|
1677
1677
|
get isCompetitorTeamWon() {
|
|
1678
|
-
return
|
|
1678
|
+
return [GameResultTypes.competitor_team_won, GameResultTypes.team_technical_defeat].includes(this.resultType);
|
|
1679
1679
|
}
|
|
1680
1680
|
get teamWinnerId() {
|
|
1681
|
-
if (this.
|
|
1681
|
+
if (!this.isClosed) {
|
|
1682
1682
|
return null;
|
|
1683
1683
|
}
|
|
1684
|
-
if (this.
|
|
1685
|
-
return
|
|
1686
|
-
}
|
|
1687
|
-
if (this.team.id) {
|
|
1688
|
-
return this.teamScore > this.competitorTeamScore ? this.team.id : this.competitorTeam.id;
|
|
1684
|
+
if (this.isTeamWon) {
|
|
1685
|
+
return this.team.id;
|
|
1689
1686
|
}
|
|
1690
|
-
|
|
1691
|
-
return this.
|
|
1687
|
+
if (this.isCompetitorTeamWon) {
|
|
1688
|
+
return this.competitorTeam.id;
|
|
1692
1689
|
}
|
|
1690
|
+
return null;
|
|
1693
1691
|
}
|
|
1694
1692
|
static toFront(data) { }
|
|
1695
1693
|
static toBack(data) { }
|
|
@@ -1977,6 +1975,7 @@ TournamentTeam = __decorate([
|
|
|
1977
1975
|
games_count: 'gamesCount',
|
|
1978
1976
|
won_games_count: 'wonGamesCount',
|
|
1979
1977
|
draw_games_count: 'drawGamesCount',
|
|
1978
|
+
lose_games_count: 'loseGamesCount',
|
|
1980
1979
|
last_games_count: 'lastGamesCount',
|
|
1981
1980
|
last_games_won: 'lastGamesWon',
|
|
1982
1981
|
score_sum: 'scoreSum',
|
|
@@ -4241,21 +4240,25 @@ RugbyStatistic = __decorate([
|
|
|
4241
4240
|
win_lose: 'winLose',
|
|
4242
4241
|
games_count: 'gamesCount',
|
|
4243
4242
|
won_games_count: 'wonGamesCount',
|
|
4243
|
+
lose_games_count: 'loseGamesCount',
|
|
4244
|
+
draw_games_count: 'drawGamesCount',
|
|
4244
4245
|
newbie: 'newbie',
|
|
4245
4246
|
// User statistic
|
|
4246
4247
|
points: 'points',
|
|
4247
4248
|
tries: 'tries',
|
|
4248
4249
|
penalty_tries: 'penaltyTries',
|
|
4249
|
-
|
|
4250
|
+
conversion_kicks: 'conversionKicks',
|
|
4250
4251
|
conversion_goals: 'conversionGoals',
|
|
4251
4252
|
conversion_misses: 'conversionMisses',
|
|
4252
4253
|
conversion_goals_percent: 'conversionGoalsPercent',
|
|
4253
|
-
|
|
4254
|
-
|
|
4254
|
+
penalties: 'penalties',
|
|
4255
|
+
penalty_kicks_on_goal: 'penaltyKicksOnGoal',
|
|
4255
4256
|
penalty_misses: 'penaltyMisses',
|
|
4256
4257
|
penalty_goals: 'penaltyGoals',
|
|
4258
|
+
tap_penalties: 'tapPenalties',
|
|
4259
|
+
penalty_kicks_to_touch: 'penaltyKicksToTouch',
|
|
4257
4260
|
penalty_goals_percent: 'penaltyGoalsPercent',
|
|
4258
|
-
|
|
4261
|
+
drop_goal_kicks: 'dropGoalKicks',
|
|
4259
4262
|
drop_goals: 'dropGoals',
|
|
4260
4263
|
drop_goal_misses: 'dropGoalMisses',
|
|
4261
4264
|
drop_goal_percent: 'dropGoalPercent',
|
|
@@ -4264,31 +4267,38 @@ RugbyStatistic = __decorate([
|
|
|
4264
4267
|
red_cards: 'redCards',
|
|
4265
4268
|
offloads: 'offloads',
|
|
4266
4269
|
tackles: 'tackles',
|
|
4267
|
-
outs: 'outs',
|
|
4268
4270
|
handling_errors: 'handlingErrors',
|
|
4269
|
-
|
|
4271
|
+
carries_over_gainline: 'carriesOverGainline',
|
|
4270
4272
|
plus_minus: 'plusMinus',
|
|
4271
4273
|
game_time: 'gameTime',
|
|
4272
4274
|
// Team statistic
|
|
4273
4275
|
scrums: 'scrums',
|
|
4274
4276
|
scrums_won: 'scrumsWon',
|
|
4275
|
-
|
|
4277
|
+
scrums_lost: 'scrumsLost',
|
|
4276
4278
|
scrums_won_percent: 'scrumsWonPercent',
|
|
4277
4279
|
scrums_won_free: 'scrumsWonFree',
|
|
4280
|
+
opponent_scrums_won: 'opponentScrumsWon',
|
|
4281
|
+
opponent_scrums_lost: 'opponentScrumsLost',
|
|
4278
4282
|
lineouts: 'lineouts',
|
|
4279
|
-
|
|
4280
|
-
|
|
4283
|
+
lineouts_won: 'lineoutsWon',
|
|
4284
|
+
lineouts_lost: 'lineoutsLost',
|
|
4281
4285
|
lineouts_steal: 'lineoutsSteal',
|
|
4286
|
+
opponent_lineouts_lost: 'opponentLineoutsLost',
|
|
4282
4287
|
quick_throws: 'quickThrows',
|
|
4283
4288
|
rucks: 'rucks',
|
|
4284
4289
|
rucks_won: 'rucksWon',
|
|
4285
|
-
|
|
4290
|
+
rucks_lost: 'rucksLost',
|
|
4286
4291
|
rucks_won_percent: 'rucksWonPercent',
|
|
4292
|
+
opponent_rucks_won: 'opponentRucksWon',
|
|
4293
|
+
opponent_rucks_lost: 'opponentRucksLost',
|
|
4287
4294
|
mauls: 'mauls',
|
|
4288
4295
|
mauls_won: 'maulsWon',
|
|
4289
|
-
|
|
4296
|
+
mauls_lost: 'maulsLost',
|
|
4290
4297
|
mauls_won_percent: 'maulWonPercent',
|
|
4291
|
-
|
|
4298
|
+
opponent_mauls_won: 'opponentMaulsWon',
|
|
4299
|
+
opponent_mauls_lost: 'opponentMaulsLost',
|
|
4300
|
+
fouls: 'fouls',
|
|
4301
|
+
team_fouls: 'teamFouls',
|
|
4292
4302
|
},
|
|
4293
4303
|
relation: {
|
|
4294
4304
|
tournamentTeamUser: TournamentTeamUser,
|
|
@@ -5710,12 +5720,11 @@ RugbyGameStatistic = __decorate([
|
|
|
5710
5720
|
penalty_tries: 'penaltyTries',
|
|
5711
5721
|
conversion_goals: 'conversionGoals',
|
|
5712
5722
|
conversion_misses: 'conversionMisses',
|
|
5713
|
-
|
|
5723
|
+
conversion_kicks: 'conversionKicks',
|
|
5714
5724
|
conversion_goals_percent: 'conversionGoalsPercent',
|
|
5715
|
-
drawing_ball: 'drawingBall',
|
|
5716
5725
|
penalty_misses: 'penaltyMisses',
|
|
5717
5726
|
penalty_goals: 'penaltyGoals',
|
|
5718
|
-
|
|
5727
|
+
penalty_kicks_on_goal: 'penaltyKicksOnGoal',
|
|
5719
5728
|
penalty_goals_percent: 'penaltyGoalsPercent',
|
|
5720
5729
|
drop_goals: 'dropGoals',
|
|
5721
5730
|
drop_goal_misses: 'dropGoalMisses',
|
|
@@ -5726,9 +5735,8 @@ RugbyGameStatistic = __decorate([
|
|
|
5726
5735
|
red_cards: 'redCards',
|
|
5727
5736
|
offloads: 'offloads',
|
|
5728
5737
|
tackles: 'tackles',
|
|
5729
|
-
outs: 'outs',
|
|
5730
5738
|
handling_errors: 'handlingErrors',
|
|
5731
|
-
|
|
5739
|
+
carries_over_gainline: 'carriesOverGainline',
|
|
5732
5740
|
game_time: 'gameTime',
|
|
5733
5741
|
plus_minus: 'plusMinus'
|
|
5734
5742
|
},
|
|
@@ -5778,51 +5786,52 @@ var RugbyGameLogTypes;
|
|
|
5778
5786
|
RugbyGameLogTypes[RugbyGameLogTypes["penalty_try"] = 4] = "penalty_try";
|
|
5779
5787
|
RugbyGameLogTypes[RugbyGameLogTypes["conversion_goal"] = 5] = "conversion_goal";
|
|
5780
5788
|
RugbyGameLogTypes[RugbyGameLogTypes["conversion_miss"] = 6] = "conversion_miss";
|
|
5781
|
-
RugbyGameLogTypes[RugbyGameLogTypes["
|
|
5782
|
-
RugbyGameLogTypes[RugbyGameLogTypes["
|
|
5783
|
-
RugbyGameLogTypes[RugbyGameLogTypes["
|
|
5784
|
-
RugbyGameLogTypes[RugbyGameLogTypes["
|
|
5785
|
-
RugbyGameLogTypes[RugbyGameLogTypes["
|
|
5786
|
-
RugbyGameLogTypes[RugbyGameLogTypes["
|
|
5787
|
-
RugbyGameLogTypes[RugbyGameLogTypes["
|
|
5788
|
-
RugbyGameLogTypes[RugbyGameLogTypes["
|
|
5789
|
-
RugbyGameLogTypes[RugbyGameLogTypes["
|
|
5790
|
-
RugbyGameLogTypes[RugbyGameLogTypes["
|
|
5791
|
-
RugbyGameLogTypes[RugbyGameLogTypes["
|
|
5792
|
-
RugbyGameLogTypes[RugbyGameLogTypes["
|
|
5793
|
-
RugbyGameLogTypes[RugbyGameLogTypes["
|
|
5794
|
-
RugbyGameLogTypes[RugbyGameLogTypes["
|
|
5795
|
-
RugbyGameLogTypes[RugbyGameLogTypes["
|
|
5796
|
-
RugbyGameLogTypes[RugbyGameLogTypes["
|
|
5797
|
-
RugbyGameLogTypes[RugbyGameLogTypes["end_game_penalty_miss"] = 23] = "end_game_penalty_miss";
|
|
5798
|
-
RugbyGameLogTypes[RugbyGameLogTypes["end_game_penalty_goal"] = 24] = "end_game_penalty_goal";
|
|
5789
|
+
RugbyGameLogTypes[RugbyGameLogTypes["penalty_miss"] = 7] = "penalty_miss";
|
|
5790
|
+
RugbyGameLogTypes[RugbyGameLogTypes["penalty_goal"] = 8] = "penalty_goal";
|
|
5791
|
+
RugbyGameLogTypes[RugbyGameLogTypes["drop_goal"] = 9] = "drop_goal";
|
|
5792
|
+
RugbyGameLogTypes[RugbyGameLogTypes["drop_goal_miss"] = 10] = "drop_goal_miss";
|
|
5793
|
+
RugbyGameLogTypes[RugbyGameLogTypes["free_kick"] = 11] = "free_kick";
|
|
5794
|
+
RugbyGameLogTypes[RugbyGameLogTypes["foul"] = 12] = "foul";
|
|
5795
|
+
RugbyGameLogTypes[RugbyGameLogTypes["yellow_card"] = 13] = "yellow_card";
|
|
5796
|
+
RugbyGameLogTypes[RugbyGameLogTypes["red_card"] = 14] = "red_card";
|
|
5797
|
+
RugbyGameLogTypes[RugbyGameLogTypes["offload"] = 15] = "offload";
|
|
5798
|
+
RugbyGameLogTypes[RugbyGameLogTypes["tackle"] = 16] = "tackle";
|
|
5799
|
+
RugbyGameLogTypes[RugbyGameLogTypes["handling_error"] = 17] = "handling_error";
|
|
5800
|
+
RugbyGameLogTypes[RugbyGameLogTypes["carries_over_gainline"] = 18] = "carries_over_gainline";
|
|
5801
|
+
RugbyGameLogTypes[RugbyGameLogTypes["bleeding_injury"] = 19] = "bleeding_injury";
|
|
5802
|
+
RugbyGameLogTypes[RugbyGameLogTypes["head_injury"] = 20] = "head_injury";
|
|
5803
|
+
RugbyGameLogTypes[RugbyGameLogTypes["end_game_penalty_miss"] = 21] = "end_game_penalty_miss";
|
|
5804
|
+
RugbyGameLogTypes[RugbyGameLogTypes["end_game_penalty_goal"] = 22] = "end_game_penalty_goal";
|
|
5799
5805
|
// team actions
|
|
5800
|
-
RugbyGameLogTypes[RugbyGameLogTypes["timeout"] =
|
|
5806
|
+
RugbyGameLogTypes[RugbyGameLogTypes["timeout"] = 23] = "timeout";
|
|
5807
|
+
RugbyGameLogTypes[RugbyGameLogTypes["tap_penalty"] = 24] = "tap_penalty";
|
|
5808
|
+
RugbyGameLogTypes[RugbyGameLogTypes["penalty_kick_to_touch"] = 25] = "penalty_kick_to_touch";
|
|
5801
5809
|
RugbyGameLogTypes[RugbyGameLogTypes["scrum_won"] = 26] = "scrum_won";
|
|
5802
|
-
RugbyGameLogTypes[RugbyGameLogTypes["
|
|
5810
|
+
RugbyGameLogTypes[RugbyGameLogTypes["scrum_lost"] = 27] = "scrum_lost";
|
|
5803
5811
|
RugbyGameLogTypes[RugbyGameLogTypes["scrum_won_free"] = 28] = "scrum_won_free";
|
|
5804
|
-
RugbyGameLogTypes[RugbyGameLogTypes["
|
|
5805
|
-
RugbyGameLogTypes[RugbyGameLogTypes["
|
|
5806
|
-
RugbyGameLogTypes[RugbyGameLogTypes["
|
|
5807
|
-
RugbyGameLogTypes[RugbyGameLogTypes["
|
|
5808
|
-
RugbyGameLogTypes[RugbyGameLogTypes["
|
|
5809
|
-
RugbyGameLogTypes[RugbyGameLogTypes["
|
|
5810
|
-
RugbyGameLogTypes[RugbyGameLogTypes["
|
|
5811
|
-
RugbyGameLogTypes[RugbyGameLogTypes["
|
|
5812
|
-
RugbyGameLogTypes[RugbyGameLogTypes["team_foul"] = 37] = "team_foul";
|
|
5812
|
+
RugbyGameLogTypes[RugbyGameLogTypes["lineout_won"] = 29] = "lineout_won";
|
|
5813
|
+
RugbyGameLogTypes[RugbyGameLogTypes["lineout_lost"] = 30] = "lineout_lost";
|
|
5814
|
+
RugbyGameLogTypes[RugbyGameLogTypes["quick_throw"] = 31] = "quick_throw";
|
|
5815
|
+
RugbyGameLogTypes[RugbyGameLogTypes["ruck_won"] = 32] = "ruck_won";
|
|
5816
|
+
RugbyGameLogTypes[RugbyGameLogTypes["ruck_lost"] = 33] = "ruck_lost";
|
|
5817
|
+
RugbyGameLogTypes[RugbyGameLogTypes["maul_won"] = 34] = "maul_won";
|
|
5818
|
+
RugbyGameLogTypes[RugbyGameLogTypes["maul_lost"] = 35] = "maul_lost";
|
|
5819
|
+
RugbyGameLogTypes[RugbyGameLogTypes["team_foul"] = 36] = "team_foul";
|
|
5813
5820
|
})(RugbyGameLogTypes || (RugbyGameLogTypes = {}));
|
|
5814
5821
|
const RUGBY_GAME_LOG_TYPE_POINTS = {
|
|
5815
5822
|
[RugbyGameLogTypes.penalty_try]: 7,
|
|
5816
5823
|
[RugbyGameLogTypes.try]: 5,
|
|
5817
5824
|
[RugbyGameLogTypes.conversion_goal]: 2,
|
|
5818
5825
|
[RugbyGameLogTypes.penalty_goal]: 3,
|
|
5819
|
-
[RugbyGameLogTypes.drop_goal]: 3
|
|
5826
|
+
[RugbyGameLogTypes.drop_goal]: 3,
|
|
5827
|
+
[RugbyGameLogTypes.end_game_penalty_goal]: 1,
|
|
5820
5828
|
};
|
|
5821
5829
|
const RUGBY_TEAM_LOG_TYPES = [
|
|
5822
|
-
RugbyGameLogTypes.timeout, RugbyGameLogTypes.scrum_won, RugbyGameLogTypes.
|
|
5823
|
-
RugbyGameLogTypes.
|
|
5824
|
-
RugbyGameLogTypes.
|
|
5825
|
-
RugbyGameLogTypes.team_foul,
|
|
5830
|
+
RugbyGameLogTypes.timeout, RugbyGameLogTypes.scrum_won, RugbyGameLogTypes.scrum_lost, RugbyGameLogTypes.scrum_won_free,
|
|
5831
|
+
RugbyGameLogTypes.lineout_won, RugbyGameLogTypes.lineout_lost,
|
|
5832
|
+
RugbyGameLogTypes.quick_throw, RugbyGameLogTypes.ruck_won, RugbyGameLogTypes.ruck_lost,
|
|
5833
|
+
RugbyGameLogTypes.maul_won, RugbyGameLogTypes.maul_lost, RugbyGameLogTypes.team_foul,
|
|
5834
|
+
RugbyGameLogTypes.penalty_kick_to_touch, RugbyGameLogTypes.tap_penalty,
|
|
5826
5835
|
];
|
|
5827
5836
|
let RugbyGameLog = class RugbyGameLog extends BaseModel {
|
|
5828
5837
|
constructor() {
|
|
@@ -7479,9 +7488,10 @@ const RugbyGameLogTypeLocalization = {
|
|
|
7479
7488
|
[RugbyGameLogTypes.penalty_try]: 'Штрафная попытка',
|
|
7480
7489
|
[RugbyGameLogTypes.conversion_goal]: 'Реализация',
|
|
7481
7490
|
[RugbyGameLogTypes.conversion_miss]: 'Реализация промах',
|
|
7482
|
-
[RugbyGameLogTypes.drawing_ball]: 'Розыгрыш мяча',
|
|
7483
7491
|
[RugbyGameLogTypes.penalty_miss]: 'Штрафной промах',
|
|
7484
7492
|
[RugbyGameLogTypes.penalty_goal]: 'Штрафной гол',
|
|
7493
|
+
[RugbyGameLogTypes.penalty_kick_to_touch]: 'Штрафной в аут',
|
|
7494
|
+
[RugbyGameLogTypes.tap_penalty]: 'Штрафной розыгран',
|
|
7485
7495
|
[RugbyGameLogTypes.drop_goal]: 'Дроп-гол',
|
|
7486
7496
|
[RugbyGameLogTypes.drop_goal_miss]: 'Дроп-гол промах',
|
|
7487
7497
|
[RugbyGameLogTypes.free_kick]: 'Свободный удар',
|
|
@@ -7490,25 +7500,23 @@ const RugbyGameLogTypeLocalization = {
|
|
|
7490
7500
|
[RugbyGameLogTypes.red_card]: 'Красная карточка',
|
|
7491
7501
|
[RugbyGameLogTypes.offload]: 'Скидка при завхвате',
|
|
7492
7502
|
[RugbyGameLogTypes.tackle]: 'Успешный захват',
|
|
7493
|
-
[RugbyGameLogTypes.out]: 'Аут',
|
|
7494
7503
|
[RugbyGameLogTypes.handling_error]: 'Ошибка приема',
|
|
7495
|
-
[RugbyGameLogTypes.
|
|
7504
|
+
[RugbyGameLogTypes.carries_over_gainline]: 'Прорыв линии',
|
|
7496
7505
|
[RugbyGameLogTypes.bleeding_injury]: 'Кровоточащая травма',
|
|
7497
7506
|
[RugbyGameLogTypes.head_injury]: 'Травма головы',
|
|
7498
7507
|
[RugbyGameLogTypes.end_game_penalty_miss]: 'Штрафной промах',
|
|
7499
7508
|
[RugbyGameLogTypes.end_game_penalty_goal]: 'Штрафной гол',
|
|
7500
7509
|
[RugbyGameLogTypes.timeout]: 'Таймаут',
|
|
7501
|
-
[RugbyGameLogTypes.scrum_won]: '
|
|
7502
|
-
[RugbyGameLogTypes.
|
|
7510
|
+
[RugbyGameLogTypes.scrum_won]: 'Схватка выиграна',
|
|
7511
|
+
[RugbyGameLogTypes.scrum_lost]: 'Схватка проиграна',
|
|
7503
7512
|
[RugbyGameLogTypes.scrum_won_free]: 'Схватка выиграна без сопротивления',
|
|
7504
|
-
[RugbyGameLogTypes.
|
|
7505
|
-
[RugbyGameLogTypes.
|
|
7506
|
-
[RugbyGameLogTypes.lineout_steal]: 'Корридор перехват',
|
|
7513
|
+
[RugbyGameLogTypes.lineout_won]: 'Корридор выиграно',
|
|
7514
|
+
[RugbyGameLogTypes.lineout_lost]: 'Корридор проиграно',
|
|
7507
7515
|
[RugbyGameLogTypes.quick_throw]: 'Быстрый вброс',
|
|
7508
7516
|
[RugbyGameLogTypes.ruck_won]: 'Рак выиграно',
|
|
7509
|
-
[RugbyGameLogTypes.
|
|
7517
|
+
[RugbyGameLogTypes.ruck_lost]: 'Рак проиграно',
|
|
7510
7518
|
[RugbyGameLogTypes.maul_won]: 'Мол выиграно',
|
|
7511
|
-
[RugbyGameLogTypes.
|
|
7519
|
+
[RugbyGameLogTypes.maul_lost]: 'Мол проиграно',
|
|
7512
7520
|
[RugbyGameLogTypes.team_foul]: 'Фол',
|
|
7513
7521
|
};
|
|
7514
7522
|
|