@mtgame/core 0.2.50 → 0.2.52
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 +56 -2
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/esm2015/models/tournament-stage-team.js +50 -3
- package/fesm2015/mtgame-core.js +48 -2
- package/fesm2015/mtgame-core.js.map +1 -1
- package/models/tournament-stage-team.d.ts +21 -0
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -6445,11 +6445,57 @@
|
|
|
6445
6445
|
})
|
|
6446
6446
|
], exports.VolleyballStatistic);
|
|
6447
6447
|
|
|
6448
|
+
exports.StageTeamGame = /** @class */ (function (_super) {
|
|
6449
|
+
__extends(StageTeamGame, _super);
|
|
6450
|
+
function StageTeamGame() {
|
|
6451
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
6452
|
+
}
|
|
6453
|
+
StageTeamGame.toFront = function (data) { };
|
|
6454
|
+
StageTeamGame.toBack = function (data) { };
|
|
6455
|
+
return StageTeamGame;
|
|
6456
|
+
}(BaseModel));
|
|
6457
|
+
__decorate([
|
|
6458
|
+
ToFrontHook
|
|
6459
|
+
], exports.StageTeamGame, "toFront", null);
|
|
6460
|
+
__decorate([
|
|
6461
|
+
ToBackHook
|
|
6462
|
+
], exports.StageTeamGame, "toBack", null);
|
|
6463
|
+
exports.StageTeamGame = __decorate([
|
|
6464
|
+
ModelInstance({
|
|
6465
|
+
mappingFields: {
|
|
6466
|
+
id: 'id',
|
|
6467
|
+
team_id: 'teamId',
|
|
6468
|
+
competitor_team_id: 'competitorTeamId',
|
|
6469
|
+
team_score: 'teamScore',
|
|
6470
|
+
competitor_team_score: 'competitorTeamScore',
|
|
6471
|
+
}
|
|
6472
|
+
})
|
|
6473
|
+
], exports.StageTeamGame);
|
|
6448
6474
|
exports.TournamentStageTeam = /** @class */ (function (_super) {
|
|
6449
6475
|
__extends(TournamentStageTeam, _super);
|
|
6450
6476
|
function TournamentStageTeam() {
|
|
6451
|
-
|
|
6477
|
+
var _this = _super.apply(this, __spreadArray([], __read(arguments))) || this;
|
|
6478
|
+
_this.gamesMapping = {};
|
|
6479
|
+
return _this;
|
|
6452
6480
|
}
|
|
6481
|
+
Object.defineProperty(TournamentStageTeam.prototype, "games", {
|
|
6482
|
+
get: function () {
|
|
6483
|
+
return this._games;
|
|
6484
|
+
},
|
|
6485
|
+
set: function (value) {
|
|
6486
|
+
var _this = this;
|
|
6487
|
+
this._games = value;
|
|
6488
|
+
this.gamesMapping = value.reduce(function (acc, game) {
|
|
6489
|
+
var _a;
|
|
6490
|
+
var competitorTeamId = game.teamId === _this.tournamentTeam.team.id ? game.competitorTeamId : game.teamId;
|
|
6491
|
+
return Object.assign(Object.assign({}, acc), (_a = {}, _a[competitorTeamId] = __spreadArray(__spreadArray([], __read((acc[competitorTeamId] || []))), [
|
|
6492
|
+
game,
|
|
6493
|
+
]), _a));
|
|
6494
|
+
}, {});
|
|
6495
|
+
},
|
|
6496
|
+
enumerable: false,
|
|
6497
|
+
configurable: true
|
|
6498
|
+
});
|
|
6453
6499
|
Object.defineProperty(TournamentStageTeam.prototype, "gamesWonPercent", {
|
|
6454
6500
|
get: function () {
|
|
6455
6501
|
if (!this.gamesCount) {
|
|
@@ -6488,10 +6534,18 @@
|
|
|
6488
6534
|
final_standing: 'finalStanding',
|
|
6489
6535
|
received_points: 'receivedPoints',
|
|
6490
6536
|
received_mt_points: 'receivedMtPoints',
|
|
6537
|
+
tries_scored: 'triesScored',
|
|
6538
|
+
tries_missed: 'triesMissed',
|
|
6539
|
+
attack_bonuses: 'attackBonuses',
|
|
6540
|
+
defense_bonuses: 'defenseBonuses',
|
|
6541
|
+
games: 'games',
|
|
6542
|
+
draw_games_count: 'drawGamesCount',
|
|
6543
|
+
lose_games_count: 'loseGamesCount',
|
|
6491
6544
|
},
|
|
6492
6545
|
relation: {
|
|
6493
6546
|
tournamentTeam: exports.TournamentTeam,
|
|
6494
|
-
group: exports.TournamentGroup
|
|
6547
|
+
group: exports.TournamentGroup,
|
|
6548
|
+
games: listField(exports.StageTeamGame),
|
|
6495
6549
|
}
|
|
6496
6550
|
})
|
|
6497
6551
|
], exports.TournamentStageTeam);
|