@mtgame/core 0.1.28 → 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 +29 -1
- 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-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-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 +25 -1
- package/fesm2015/mtgame-core.js.map +1 -1
- package/fesm5/mtgame-core.js +29 -1
- 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,
|
|
@@ -3826,6 +3845,7 @@ var FootballStatistic = /** @class */ (function (_super) {
|
|
|
3826
3845
|
FootballStatistic = __decorate([
|
|
3827
3846
|
ModelInstance({
|
|
3828
3847
|
mappingFields: {
|
|
3848
|
+
league_player: 'leaguePlayer',
|
|
3829
3849
|
tournament_team_user: 'tournamentTeamUser',
|
|
3830
3850
|
team: 'team',
|
|
3831
3851
|
team_user: 'teamUser',
|
|
@@ -3884,6 +3904,7 @@ var FootballStatistic = /** @class */ (function (_super) {
|
|
|
3884
3904
|
auto_goals_against: 'autoGoalsAgainst',
|
|
3885
3905
|
},
|
|
3886
3906
|
relation: {
|
|
3907
|
+
leaguePlayer: LeaguePlayer,
|
|
3887
3908
|
tournamentTeamUser: TournamentTeamUser,
|
|
3888
3909
|
team: Team,
|
|
3889
3910
|
teamUser: TeamUser,
|
|
@@ -4274,6 +4295,7 @@ var HandballStatistic = /** @class */ (function (_super) {
|
|
|
4274
4295
|
HandballStatistic = __decorate([
|
|
4275
4296
|
ModelInstance({
|
|
4276
4297
|
mappingFields: {
|
|
4298
|
+
league_player: 'leaguePlayer',
|
|
4277
4299
|
tournament_team_user: 'tournamentTeamUser',
|
|
4278
4300
|
team: 'team',
|
|
4279
4301
|
team_user: 'teamUser',
|
|
@@ -4321,6 +4343,7 @@ var HandballStatistic = /** @class */ (function (_super) {
|
|
|
4321
4343
|
rank: 'rank',
|
|
4322
4344
|
},
|
|
4323
4345
|
relation: {
|
|
4346
|
+
leaguePlayer: LeaguePlayer,
|
|
4324
4347
|
tournamentTeamUser: TournamentTeamUser,
|
|
4325
4348
|
team: Team,
|
|
4326
4349
|
teamUser: TeamUser,
|
|
@@ -4569,6 +4592,7 @@ var VolleyballStatistic = /** @class */ (function (_super) {
|
|
|
4569
4592
|
mappingFields: {
|
|
4570
4593
|
team: 'team',
|
|
4571
4594
|
team_user: 'teamUser',
|
|
4595
|
+
league_player: 'leaguePlayer',
|
|
4572
4596
|
tournament_team_user: 'tournamentTeamUser',
|
|
4573
4597
|
tournament_team: 'tournamentTeam',
|
|
4574
4598
|
user: 'user',
|
|
@@ -4605,6 +4629,7 @@ var VolleyballStatistic = /** @class */ (function (_super) {
|
|
|
4605
4629
|
relation: {
|
|
4606
4630
|
team: Team,
|
|
4607
4631
|
teamUser: TeamUser,
|
|
4632
|
+
leaguePlayer: LeaguePlayer,
|
|
4608
4633
|
tournamentTeamUser: TournamentTeamUser,
|
|
4609
4634
|
tournamentTeam: TournamentTeam,
|
|
4610
4635
|
user: User,
|
|
@@ -5229,6 +5254,9 @@ function applyGamesFilters(filters, params) {
|
|
|
5229
5254
|
if (filters.tournamentCourtId) {
|
|
5230
5255
|
params = params.set('tournament_court_id', filters.tournamentCourtId.toString());
|
|
5231
5256
|
}
|
|
5257
|
+
if (filters.leaguePlayerId) {
|
|
5258
|
+
params = params.set('league_player_id', filters.leaguePlayerId.toString());
|
|
5259
|
+
}
|
|
5232
5260
|
if (filters.userId) {
|
|
5233
5261
|
params = params.set('user_id', filters.userId.toString());
|
|
5234
5262
|
}
|