@mtgame/core 0.1.28 → 0.1.30

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.
Files changed (34) hide show
  1. package/api/tournament-api.d.ts +1 -0
  2. package/bundles/mtgame-core.umd.js +64 -1
  3. package/bundles/mtgame-core.umd.js.map +1 -1
  4. package/bundles/mtgame-core.umd.min.js +1 -1
  5. package/bundles/mtgame-core.umd.min.js.map +1 -1
  6. package/esm2015/api/tournament-api.js +4 -1
  7. package/esm2015/models/base-statistic.js +1 -1
  8. package/esm2015/models/basketball-statistic.js +7 -1
  9. package/esm2015/models/football-statistic.js +7 -1
  10. package/esm2015/models/handball-statistic.js +7 -1
  11. package/esm2015/models/hockey-statistic.js +7 -1
  12. package/esm2015/models/league-player.js +15 -3
  13. package/esm2015/models/volleyball-statistic.js +7 -1
  14. package/esm5/api/tournament-api.js +4 -1
  15. package/esm5/models/base-statistic.js +1 -1
  16. package/esm5/models/basketball-statistic.js +11 -1
  17. package/esm5/models/football-statistic.js +11 -1
  18. package/esm5/models/handball-statistic.js +11 -1
  19. package/esm5/models/hockey-statistic.js +11 -1
  20. package/esm5/models/league-player.js +19 -3
  21. package/esm5/models/volleyball-statistic.js +11 -1
  22. package/fesm2015/mtgame-core.js +40 -1
  23. package/fesm2015/mtgame-core.js.map +1 -1
  24. package/fesm5/mtgame-core.js +64 -1
  25. package/fesm5/mtgame-core.js.map +1 -1
  26. package/models/base-statistic.d.ts +3 -0
  27. package/models/basketball-statistic.d.ts +3 -0
  28. package/models/football-statistic.d.ts +3 -0
  29. package/models/handball-statistic.d.ts +3 -0
  30. package/models/hockey-statistic.d.ts +3 -0
  31. package/models/league-player.d.ts +4 -0
  32. package/models/volleyball-statistic.d.ts +3 -0
  33. package/mtgame-core.metadata.json +1 -1
  34. package/package.json +1 -1
@@ -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);
@@ -2412,6 +2427,13 @@ var BasketballStatistic = /** @class */ (function (_super) {
2412
2427
  enumerable: true,
2413
2428
  configurable: true
2414
2429
  });
2430
+ Object.defineProperty(BasketballStatistic.prototype, "tournamentTeamPoints", {
2431
+ get: function () {
2432
+ return this.tournamentTeam && this.tournamentTeam.points;
2433
+ },
2434
+ enumerable: true,
2435
+ configurable: true
2436
+ });
2415
2437
  BasketballStatistic.toFront = function (data) { };
2416
2438
  BasketballStatistic.toBack = function (data) { };
2417
2439
  __decorate([
@@ -2423,6 +2445,7 @@ var BasketballStatistic = /** @class */ (function (_super) {
2423
2445
  BasketballStatistic = __decorate([
2424
2446
  ModelInstance({
2425
2447
  mappingFields: {
2448
+ league_player: 'leaguePlayer',
2426
2449
  tournament_team_user: 'tournamentTeamUser',
2427
2450
  team: 'team',
2428
2451
  team_user: 'teamUser',
@@ -2460,6 +2483,7 @@ var BasketballStatistic = /** @class */ (function (_super) {
2460
2483
  rank: 'rank',
2461
2484
  },
2462
2485
  relation: {
2486
+ leaguePlayer: LeaguePlayer,
2463
2487
  tournamentTeamUser: TournamentTeamUser,
2464
2488
  team: Team,
2465
2489
  teamUser: TeamUser,
@@ -3312,6 +3336,13 @@ var HockeyStatistic = /** @class */ (function (_super) {
3312
3336
  enumerable: true,
3313
3337
  configurable: true
3314
3338
  });
3339
+ Object.defineProperty(HockeyStatistic.prototype, "tournamentTeamPoints", {
3340
+ get: function () {
3341
+ return this.tournamentTeam && this.tournamentTeam.points;
3342
+ },
3343
+ enumerable: true,
3344
+ configurable: true
3345
+ });
3315
3346
  HockeyStatistic.toFront = function (data) { };
3316
3347
  HockeyStatistic.toBack = function (data) { };
3317
3348
  __decorate([
@@ -3323,6 +3354,7 @@ var HockeyStatistic = /** @class */ (function (_super) {
3323
3354
  HockeyStatistic = __decorate([
3324
3355
  ModelInstance({
3325
3356
  mappingFields: {
3357
+ league_player: 'leaguePlayer',
3326
3358
  tournament_team_user: 'tournamentTeamUser',
3327
3359
  team: 'team',
3328
3360
  team_user: 'teamUser',
@@ -3380,6 +3412,7 @@ var HockeyStatistic = /** @class */ (function (_super) {
3380
3412
  rank: 'rank',
3381
3413
  },
3382
3414
  relation: {
3415
+ leaguePlayer: LeaguePlayer,
3383
3416
  tournamentTeamUser: TournamentTeamUser,
3384
3417
  team: Team,
3385
3418
  teamUser: TeamUser,
@@ -3815,6 +3848,13 @@ var FootballStatistic = /** @class */ (function (_super) {
3815
3848
  enumerable: true,
3816
3849
  configurable: true
3817
3850
  });
3851
+ Object.defineProperty(FootballStatistic.prototype, "tournamentTeamPoints", {
3852
+ get: function () {
3853
+ return this.tournamentTeam && this.tournamentTeam.points;
3854
+ },
3855
+ enumerable: true,
3856
+ configurable: true
3857
+ });
3818
3858
  FootballStatistic.toFront = function (data) { };
3819
3859
  FootballStatistic.toBack = function (data) { };
3820
3860
  __decorate([
@@ -3826,6 +3866,7 @@ var FootballStatistic = /** @class */ (function (_super) {
3826
3866
  FootballStatistic = __decorate([
3827
3867
  ModelInstance({
3828
3868
  mappingFields: {
3869
+ league_player: 'leaguePlayer',
3829
3870
  tournament_team_user: 'tournamentTeamUser',
3830
3871
  team: 'team',
3831
3872
  team_user: 'teamUser',
@@ -3884,6 +3925,7 @@ var FootballStatistic = /** @class */ (function (_super) {
3884
3925
  auto_goals_against: 'autoGoalsAgainst',
3885
3926
  },
3886
3927
  relation: {
3928
+ leaguePlayer: LeaguePlayer,
3887
3929
  tournamentTeamUser: TournamentTeamUser,
3888
3930
  team: Team,
3889
3931
  teamUser: TeamUser,
@@ -4263,6 +4305,13 @@ var HandballStatistic = /** @class */ (function (_super) {
4263
4305
  enumerable: true,
4264
4306
  configurable: true
4265
4307
  });
4308
+ Object.defineProperty(HandballStatistic.prototype, "tournamentTeamPoints", {
4309
+ get: function () {
4310
+ return this.tournamentTeam && this.tournamentTeam.points;
4311
+ },
4312
+ enumerable: true,
4313
+ configurable: true
4314
+ });
4266
4315
  HandballStatistic.toFront = function (data) { };
4267
4316
  HandballStatistic.toBack = function (data) { };
4268
4317
  __decorate([
@@ -4274,6 +4323,7 @@ var HandballStatistic = /** @class */ (function (_super) {
4274
4323
  HandballStatistic = __decorate([
4275
4324
  ModelInstance({
4276
4325
  mappingFields: {
4326
+ league_player: 'leaguePlayer',
4277
4327
  tournament_team_user: 'tournamentTeamUser',
4278
4328
  team: 'team',
4279
4329
  team_user: 'teamUser',
@@ -4321,6 +4371,7 @@ var HandballStatistic = /** @class */ (function (_super) {
4321
4371
  rank: 'rank',
4322
4372
  },
4323
4373
  relation: {
4374
+ leaguePlayer: LeaguePlayer,
4324
4375
  tournamentTeamUser: TournamentTeamUser,
4325
4376
  team: Team,
4326
4377
  teamUser: TeamUser,
@@ -4556,6 +4607,13 @@ var VolleyballStatistic = /** @class */ (function (_super) {
4556
4607
  function VolleyballStatistic() {
4557
4608
  return _super !== null && _super.apply(this, arguments) || this;
4558
4609
  }
4610
+ Object.defineProperty(VolleyballStatistic.prototype, "tournamentTeamPoints", {
4611
+ get: function () {
4612
+ return this.tournamentTeam && this.tournamentTeam.points;
4613
+ },
4614
+ enumerable: true,
4615
+ configurable: true
4616
+ });
4559
4617
  VolleyballStatistic.toFront = function (data) { };
4560
4618
  VolleyballStatistic.toBack = function (data) { };
4561
4619
  __decorate([
@@ -4569,6 +4627,7 @@ var VolleyballStatistic = /** @class */ (function (_super) {
4569
4627
  mappingFields: {
4570
4628
  team: 'team',
4571
4629
  team_user: 'teamUser',
4630
+ league_player: 'leaguePlayer',
4572
4631
  tournament_team_user: 'tournamentTeamUser',
4573
4632
  tournament_team: 'tournamentTeam',
4574
4633
  user: 'user',
@@ -4605,6 +4664,7 @@ var VolleyballStatistic = /** @class */ (function (_super) {
4605
4664
  relation: {
4606
4665
  team: Team,
4607
4666
  teamUser: TeamUser,
4667
+ leaguePlayer: LeaguePlayer,
4608
4668
  tournamentTeamUser: TournamentTeamUser,
4609
4669
  tournamentTeam: TournamentTeam,
4610
4670
  user: User,
@@ -5229,6 +5289,9 @@ function applyGamesFilters(filters, params) {
5229
5289
  if (filters.tournamentCourtId) {
5230
5290
  params = params.set('tournament_court_id', filters.tournamentCourtId.toString());
5231
5291
  }
5292
+ if (filters.leaguePlayerId) {
5293
+ params = params.set('league_player_id', filters.leaguePlayerId.toString());
5294
+ }
5232
5295
  if (filters.userId) {
5233
5296
  params = params.set('user_id', filters.userId.toString());
5234
5297
  }