@mtgame/core 0.1.27 → 0.1.29
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/api/tournament-api.d.ts +1 -0
- package/bundles/mtgame-core.umd.js +35 -2
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/bundles/mtgame-core.umd.min.js +2 -2
- package/bundles/mtgame-core.umd.min.js.map +1 -1
- package/esm2015/api/tournament-api.js +4 -1
- package/esm2015/models/base-statistic.js +1 -1
- package/esm2015/models/basketball-statistic.js +4 -1
- package/esm2015/models/football-game-log.js +7 -2
- package/esm2015/models/football-statistic.js +4 -1
- package/esm2015/models/handball-statistic.js +4 -1
- package/esm2015/models/hockey-statistic.js +4 -1
- package/esm2015/models/league-player.js +15 -3
- package/esm2015/models/volleyball-statistic.js +4 -1
- package/esm5/api/tournament-api.js +4 -1
- package/esm5/models/base-statistic.js +1 -1
- package/esm5/models/basketball-statistic.js +4 -1
- package/esm5/models/football-game-log.js +7 -2
- package/esm5/models/football-statistic.js +4 -1
- package/esm5/models/handball-statistic.js +4 -1
- package/esm5/models/hockey-statistic.js +4 -1
- package/esm5/models/league-player.js +19 -3
- package/esm5/models/volleyball-statistic.js +4 -1
- package/fesm2015/mtgame-core.js +31 -2
- package/fesm2015/mtgame-core.js.map +1 -1
- package/fesm5/mtgame-core.js +35 -2
- package/fesm5/mtgame-core.js.map +1 -1
- package/models/base-statistic.d.ts +2 -0
- package/models/basketball-statistic.d.ts +2 -0
- package/models/football-statistic.d.ts +2 -0
- package/models/handball-statistic.d.ts +2 -0
- package/models/hockey-statistic.d.ts +2 -0
- package/models/league-player.d.ts +4 -0
- package/models/volleyball-statistic.d.ts +2 -0
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
package/fesm5/mtgame-core.js
CHANGED
|
@@ -2328,6 +2328,17 @@ var LeaguePlayer = /** @class */ (function (_super) {
|
|
|
2328
2328
|
enumerable: true,
|
|
2329
2329
|
configurable: true
|
|
2330
2330
|
});
|
|
2331
|
+
Object.defineProperty(LeaguePlayer.prototype, "age", {
|
|
2332
|
+
get: function () {
|
|
2333
|
+
if (!this.birthDate) {
|
|
2334
|
+
return null;
|
|
2335
|
+
}
|
|
2336
|
+
var diff = (new Date()).getTime() - this.birthDate.getTime();
|
|
2337
|
+
return Math.floor(diff / (365 * 86400 * 1000));
|
|
2338
|
+
},
|
|
2339
|
+
enumerable: true,
|
|
2340
|
+
configurable: true
|
|
2341
|
+
});
|
|
2331
2342
|
LeaguePlayer.toFront = function (data) {
|
|
2332
2343
|
};
|
|
2333
2344
|
LeaguePlayer.toBack = function (data) {
|
|
@@ -2347,12 +2358,16 @@ var LeaguePlayer = /** @class */ (function (_super) {
|
|
|
2347
2358
|
first_name: 'firstName',
|
|
2348
2359
|
last_name: 'lastName',
|
|
2349
2360
|
middle_name: 'middleName',
|
|
2361
|
+
birth_date: 'birthDate',
|
|
2350
2362
|
photo: 'photo',
|
|
2363
|
+
user: 'user',
|
|
2351
2364
|
has_changes: 'hasChanges',
|
|
2352
|
-
rating: 'rating'
|
|
2365
|
+
rating: 'rating',
|
|
2353
2366
|
},
|
|
2354
2367
|
relation: {
|
|
2368
|
+
birthDate: DateField,
|
|
2355
2369
|
photo: File,
|
|
2370
|
+
user: User,
|
|
2356
2371
|
}
|
|
2357
2372
|
})
|
|
2358
2373
|
], LeaguePlayer);
|
|
@@ -2423,6 +2438,7 @@ var BasketballStatistic = /** @class */ (function (_super) {
|
|
|
2423
2438
|
BasketballStatistic = __decorate([
|
|
2424
2439
|
ModelInstance({
|
|
2425
2440
|
mappingFields: {
|
|
2441
|
+
league_player: 'leaguePlayer',
|
|
2426
2442
|
tournament_team_user: 'tournamentTeamUser',
|
|
2427
2443
|
team: 'team',
|
|
2428
2444
|
team_user: 'teamUser',
|
|
@@ -2460,6 +2476,7 @@ var BasketballStatistic = /** @class */ (function (_super) {
|
|
|
2460
2476
|
rank: 'rank',
|
|
2461
2477
|
},
|
|
2462
2478
|
relation: {
|
|
2479
|
+
leaguePlayer: LeaguePlayer,
|
|
2463
2480
|
tournamentTeamUser: TournamentTeamUser,
|
|
2464
2481
|
team: Team,
|
|
2465
2482
|
teamUser: TeamUser,
|
|
@@ -3323,6 +3340,7 @@ var HockeyStatistic = /** @class */ (function (_super) {
|
|
|
3323
3340
|
HockeyStatistic = __decorate([
|
|
3324
3341
|
ModelInstance({
|
|
3325
3342
|
mappingFields: {
|
|
3343
|
+
league_player: 'leaguePlayer',
|
|
3326
3344
|
tournament_team_user: 'tournamentTeamUser',
|
|
3327
3345
|
team: 'team',
|
|
3328
3346
|
team_user: 'teamUser',
|
|
@@ -3380,6 +3398,7 @@ var HockeyStatistic = /** @class */ (function (_super) {
|
|
|
3380
3398
|
rank: 'rank',
|
|
3381
3399
|
},
|
|
3382
3400
|
relation: {
|
|
3401
|
+
leaguePlayer: LeaguePlayer,
|
|
3383
3402
|
tournamentTeamUser: TournamentTeamUser,
|
|
3384
3403
|
team: Team,
|
|
3385
3404
|
teamUser: TeamUser,
|
|
@@ -3542,7 +3561,12 @@ var FootballGameLog = /** @class */ (function (_super) {
|
|
|
3542
3561
|
configurable: true
|
|
3543
3562
|
});
|
|
3544
3563
|
FootballGameLog.prototype.isScoreType = function () {
|
|
3545
|
-
return [
|
|
3564
|
+
return [
|
|
3565
|
+
FootballGameLogTypes.goal,
|
|
3566
|
+
FootballGameLogTypes.penalty_goal,
|
|
3567
|
+
FootballGameLogTypes.small_penalty_goal,
|
|
3568
|
+
FootballGameLogTypes.auto_goal,
|
|
3569
|
+
].indexOf(this.logType) > -1;
|
|
3546
3570
|
};
|
|
3547
3571
|
FootballGameLog.prototype.isAfter = function (log) {
|
|
3548
3572
|
if (this.time === log.time && this.period === log.period) {
|
|
@@ -3821,6 +3845,7 @@ var FootballStatistic = /** @class */ (function (_super) {
|
|
|
3821
3845
|
FootballStatistic = __decorate([
|
|
3822
3846
|
ModelInstance({
|
|
3823
3847
|
mappingFields: {
|
|
3848
|
+
league_player: 'leaguePlayer',
|
|
3824
3849
|
tournament_team_user: 'tournamentTeamUser',
|
|
3825
3850
|
team: 'team',
|
|
3826
3851
|
team_user: 'teamUser',
|
|
@@ -3879,6 +3904,7 @@ var FootballStatistic = /** @class */ (function (_super) {
|
|
|
3879
3904
|
auto_goals_against: 'autoGoalsAgainst',
|
|
3880
3905
|
},
|
|
3881
3906
|
relation: {
|
|
3907
|
+
leaguePlayer: LeaguePlayer,
|
|
3882
3908
|
tournamentTeamUser: TournamentTeamUser,
|
|
3883
3909
|
team: Team,
|
|
3884
3910
|
teamUser: TeamUser,
|
|
@@ -4269,6 +4295,7 @@ var HandballStatistic = /** @class */ (function (_super) {
|
|
|
4269
4295
|
HandballStatistic = __decorate([
|
|
4270
4296
|
ModelInstance({
|
|
4271
4297
|
mappingFields: {
|
|
4298
|
+
league_player: 'leaguePlayer',
|
|
4272
4299
|
tournament_team_user: 'tournamentTeamUser',
|
|
4273
4300
|
team: 'team',
|
|
4274
4301
|
team_user: 'teamUser',
|
|
@@ -4316,6 +4343,7 @@ var HandballStatistic = /** @class */ (function (_super) {
|
|
|
4316
4343
|
rank: 'rank',
|
|
4317
4344
|
},
|
|
4318
4345
|
relation: {
|
|
4346
|
+
leaguePlayer: LeaguePlayer,
|
|
4319
4347
|
tournamentTeamUser: TournamentTeamUser,
|
|
4320
4348
|
team: Team,
|
|
4321
4349
|
teamUser: TeamUser,
|
|
@@ -4564,6 +4592,7 @@ var VolleyballStatistic = /** @class */ (function (_super) {
|
|
|
4564
4592
|
mappingFields: {
|
|
4565
4593
|
team: 'team',
|
|
4566
4594
|
team_user: 'teamUser',
|
|
4595
|
+
league_player: 'leaguePlayer',
|
|
4567
4596
|
tournament_team_user: 'tournamentTeamUser',
|
|
4568
4597
|
tournament_team: 'tournamentTeam',
|
|
4569
4598
|
user: 'user',
|
|
@@ -4600,6 +4629,7 @@ var VolleyballStatistic = /** @class */ (function (_super) {
|
|
|
4600
4629
|
relation: {
|
|
4601
4630
|
team: Team,
|
|
4602
4631
|
teamUser: TeamUser,
|
|
4632
|
+
leaguePlayer: LeaguePlayer,
|
|
4603
4633
|
tournamentTeamUser: TournamentTeamUser,
|
|
4604
4634
|
tournamentTeam: TournamentTeam,
|
|
4605
4635
|
user: User,
|
|
@@ -5224,6 +5254,9 @@ function applyGamesFilters(filters, params) {
|
|
|
5224
5254
|
if (filters.tournamentCourtId) {
|
|
5225
5255
|
params = params.set('tournament_court_id', filters.tournamentCourtId.toString());
|
|
5226
5256
|
}
|
|
5257
|
+
if (filters.leaguePlayerId) {
|
|
5258
|
+
params = params.set('league_player_id', filters.leaguePlayerId.toString());
|
|
5259
|
+
}
|
|
5227
5260
|
if (filters.userId) {
|
|
5228
5261
|
params = params.set('user_id', filters.userId.toString());
|
|
5229
5262
|
}
|