@mtgame/core 0.1.35 → 0.1.36
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 +77 -8
- 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/localization/hockey-game-log-types.js +3 -1
- package/esm2015/models/hockey-game-log.js +3 -1
- package/esm2015/models/hockey-game-statistic.js +30 -2
- package/esm2015/models/hockey-statistic.js +12 -3
- package/esm2015/utils/errors.js +2 -2
- package/esm5/localization/hockey-game-log-types.js +3 -1
- package/esm5/models/hockey-game-log.js +3 -1
- package/esm5/models/hockey-game-statistic.js +58 -2
- package/esm5/models/hockey-statistic.js +12 -3
- package/esm5/utils/errors.js +2 -2
- package/fesm2015/mtgame-core.js +45 -4
- package/fesm2015/mtgame-core.js.map +1 -1
- package/fesm5/mtgame-core.js +73 -4
- package/fesm5/mtgame-core.js.map +1 -1
- package/localization/hockey-game-log-types.d.ts +2 -0
- package/models/hockey-game-log.d.ts +3 -1
- package/models/hockey-game-statistic.d.ts +11 -0
- package/models/hockey-statistic.d.ts +9 -0
- package/mtgame-core.metadata.json +1 -1
- package/package.json +2 -2
package/fesm5/mtgame-core.js
CHANGED
|
@@ -6,7 +6,7 @@ import { BehaviorSubject, Observable, of } from 'rxjs';
|
|
|
6
6
|
import { Subject } from 'rxjs/internal/Subject';
|
|
7
7
|
import { ReplaySubject } from 'rxjs/internal/ReplaySubject';
|
|
8
8
|
import * as Centrifuge from 'centrifuge';
|
|
9
|
-
import { captureException } from '@sentry/
|
|
9
|
+
import { captureException } from '@sentry/angular';
|
|
10
10
|
import { FormGroup } from '@angular/forms';
|
|
11
11
|
import { isPlatformBrowser } from '@angular/common';
|
|
12
12
|
|
|
@@ -3075,6 +3075,8 @@ var HockeyGameLogTypes;
|
|
|
3075
3075
|
HockeyGameLogTypes[HockeyGameLogTypes["penalty_end"] = 22] = "penalty_end";
|
|
3076
3076
|
HockeyGameLogTypes[HockeyGameLogTypes["after_game_shootout_attempt"] = 23] = "after_game_shootout_attempt";
|
|
3077
3077
|
HockeyGameLogTypes[HockeyGameLogTypes["after_game_shootout_goal"] = 24] = "after_game_shootout_goal";
|
|
3078
|
+
HockeyGameLogTypes[HockeyGameLogTypes["after_game_shootout_save"] = 25] = "after_game_shootout_save";
|
|
3079
|
+
HockeyGameLogTypes[HockeyGameLogTypes["shootout_save"] = 26] = "shootout_save";
|
|
3078
3080
|
})(HockeyGameLogTypes || (HockeyGameLogTypes = {}));
|
|
3079
3081
|
var HockeyAdvantageTypes;
|
|
3080
3082
|
(function (HockeyAdvantageTypes) {
|
|
@@ -3235,7 +3237,14 @@ var HockeyGameStatistic = /** @class */ (function (_super) {
|
|
|
3235
3237
|
});
|
|
3236
3238
|
Object.defineProperty(HockeyGameStatistic.prototype, "shots", {
|
|
3237
3239
|
get: function () {
|
|
3238
|
-
return this.ppShots + this.evShots + this.shShots;
|
|
3240
|
+
return this.ppShots + this.evShots + this.shShots + (this.shootoutAttempts || 0);
|
|
3241
|
+
},
|
|
3242
|
+
enumerable: true,
|
|
3243
|
+
configurable: true
|
|
3244
|
+
});
|
|
3245
|
+
Object.defineProperty(HockeyGameStatistic.prototype, "totalShots", {
|
|
3246
|
+
get: function () {
|
|
3247
|
+
return this.shots + (this.shootoutAttempts || 0);
|
|
3239
3248
|
},
|
|
3240
3249
|
enumerable: true,
|
|
3241
3250
|
configurable: true
|
|
@@ -3247,6 +3256,13 @@ var HockeyGameStatistic = /** @class */ (function (_super) {
|
|
|
3247
3256
|
enumerable: true,
|
|
3248
3257
|
configurable: true
|
|
3249
3258
|
});
|
|
3259
|
+
Object.defineProperty(HockeyGameStatistic.prototype, "totalGoals", {
|
|
3260
|
+
get: function () {
|
|
3261
|
+
return this.goals + (this.shootoutGoals || 0);
|
|
3262
|
+
},
|
|
3263
|
+
enumerable: true,
|
|
3264
|
+
configurable: true
|
|
3265
|
+
});
|
|
3250
3266
|
Object.defineProperty(HockeyGameStatistic.prototype, "assists", {
|
|
3251
3267
|
get: function () {
|
|
3252
3268
|
return (this.ppAssists || 0) + (this.evAssists || 0) + (this.shAssists || 0);
|
|
@@ -3275,6 +3291,20 @@ var HockeyGameStatistic = /** @class */ (function (_super) {
|
|
|
3275
3291
|
enumerable: true,
|
|
3276
3292
|
configurable: true
|
|
3277
3293
|
});
|
|
3294
|
+
Object.defineProperty(HockeyGameStatistic.prototype, "shootoutShotsAgainst", {
|
|
3295
|
+
get: function () {
|
|
3296
|
+
return (this.shootoutSaves || 0) + (this.shootoutGoalsAgainst || 0);
|
|
3297
|
+
},
|
|
3298
|
+
enumerable: true,
|
|
3299
|
+
configurable: true
|
|
3300
|
+
});
|
|
3301
|
+
Object.defineProperty(HockeyGameStatistic.prototype, "totalShotsAgainst", {
|
|
3302
|
+
get: function () {
|
|
3303
|
+
return this.shotsAgainst + this.shootoutShotsAgainst;
|
|
3304
|
+
},
|
|
3305
|
+
enumerable: true,
|
|
3306
|
+
configurable: true
|
|
3307
|
+
});
|
|
3278
3308
|
Object.defineProperty(HockeyGameStatistic.prototype, "savesPercent", {
|
|
3279
3309
|
get: function () {
|
|
3280
3310
|
if (!this.shotsAgainst || !this.saves) {
|
|
@@ -3285,6 +3315,30 @@ var HockeyGameStatistic = /** @class */ (function (_super) {
|
|
|
3285
3315
|
enumerable: true,
|
|
3286
3316
|
configurable: true
|
|
3287
3317
|
});
|
|
3318
|
+
Object.defineProperty(HockeyGameStatistic.prototype, "totalSaves", {
|
|
3319
|
+
get: function () {
|
|
3320
|
+
return (this.saves || 0) + (this.shootoutSaves || 0);
|
|
3321
|
+
},
|
|
3322
|
+
enumerable: true,
|
|
3323
|
+
configurable: true
|
|
3324
|
+
});
|
|
3325
|
+
Object.defineProperty(HockeyGameStatistic.prototype, "totalSavesPercent", {
|
|
3326
|
+
get: function () {
|
|
3327
|
+
if (!this.totalShotsAgainst || !this.totalSaves) {
|
|
3328
|
+
return 0;
|
|
3329
|
+
}
|
|
3330
|
+
return Math.round(1000 * this.totalSaves / this.totalShotsAgainst) / 10;
|
|
3331
|
+
},
|
|
3332
|
+
enumerable: true,
|
|
3333
|
+
configurable: true
|
|
3334
|
+
});
|
|
3335
|
+
Object.defineProperty(HockeyGameStatistic.prototype, "totalGoalsAgainst", {
|
|
3336
|
+
get: function () {
|
|
3337
|
+
return (this.goalsAgainst || 0) + (this.shootoutGoalsAgainst || 0);
|
|
3338
|
+
},
|
|
3339
|
+
enumerable: true,
|
|
3340
|
+
configurable: true
|
|
3341
|
+
});
|
|
3288
3342
|
Object.defineProperty(HockeyGameStatistic.prototype, "gameMinutes", {
|
|
3289
3343
|
get: function () {
|
|
3290
3344
|
return Math.floor(this.gameTime / 60);
|
|
@@ -3329,7 +3383,11 @@ var HockeyGameStatistic = /** @class */ (function (_super) {
|
|
|
3329
3383
|
face_off_losses: 'faceOffLosses',
|
|
3330
3384
|
face_off_wins: 'faceOffWins',
|
|
3331
3385
|
saves: 'saves',
|
|
3386
|
+
shootout_save: 'shootoutSaves',
|
|
3387
|
+
after_game_shootout_saves: 'afterGameShootoutSaves',
|
|
3332
3388
|
goals_against: 'goalsAgainst',
|
|
3389
|
+
shootout_goals_against: 'shootoutGoalsAgainst',
|
|
3390
|
+
after_game_shootout_goals_against: 'afterGameShootoutGoalsAgainst',
|
|
3333
3391
|
safety_rate: 'safetyRate',
|
|
3334
3392
|
penalty_minutes: 'penaltyMinutes',
|
|
3335
3393
|
game_time: 'gameTime',
|
|
@@ -3430,9 +3488,9 @@ var HockeyStatistic = /** @class */ (function (_super) {
|
|
|
3430
3488
|
shots_on_goal: 'shotsOnGoal',
|
|
3431
3489
|
shots_blocked: 'shotsBlocked',
|
|
3432
3490
|
shots: 'shots',
|
|
3491
|
+
total_shots: 'totalShots',
|
|
3433
3492
|
goals_percent: 'goalsPercent',
|
|
3434
|
-
|
|
3435
|
-
saves_percent: 'savesPercent',
|
|
3493
|
+
total_goals_percent: 'totalGoalsPercent',
|
|
3436
3494
|
pp_assists: 'ppAssists',
|
|
3437
3495
|
ev_assists: 'evAssists',
|
|
3438
3496
|
sh_assists: 'shAssists',
|
|
@@ -3446,7 +3504,16 @@ var HockeyStatistic = /** @class */ (function (_super) {
|
|
|
3446
3504
|
face_offs: 'faceOffs',
|
|
3447
3505
|
face_off_percent: 'faceOffPercent',
|
|
3448
3506
|
saves: 'saves',
|
|
3507
|
+
total_saves: 'totalSaves',
|
|
3508
|
+
shootout_saves: 'shootoutSaves',
|
|
3509
|
+
shots_against: 'shotsAgainst',
|
|
3510
|
+
shootout_shots_against: 'shootoutShotsAgainst',
|
|
3511
|
+
total_shots_against: 'totalShotsAgainst',
|
|
3512
|
+
saves_percent: 'savesPercent',
|
|
3513
|
+
total_saves_percent: 'totalSavesPercent',
|
|
3449
3514
|
goals_against: 'goalsAgainst',
|
|
3515
|
+
shootout_goals_against: 'shootoutGoalsAgainst',
|
|
3516
|
+
total_goals_against: 'totalGoalsAgainst',
|
|
3450
3517
|
safety_rate: 'safetyRate',
|
|
3451
3518
|
penalty_minutes: 'penaltyMinutes',
|
|
3452
3519
|
game_time: 'gameTime',
|
|
@@ -8407,6 +8474,8 @@ var HockeyGameLogTypeLocalization = (_a$2 = {},
|
|
|
8407
8474
|
_a$2[HockeyGameLogTypes.face_off_lose] = 'Проигрыш в вбрасывании',
|
|
8408
8475
|
_a$2[HockeyGameLogTypes.face_off_win] = 'Победа в вбрасывании',
|
|
8409
8476
|
_a$2[HockeyGameLogTypes.save] = 'Отражен бросок',
|
|
8477
|
+
_a$2[HockeyGameLogTypes.shootout_save] = 'Отражен бросок',
|
|
8478
|
+
_a$2[HockeyGameLogTypes.after_game_shootout_save] = 'Отражен бросок',
|
|
8410
8479
|
_a$2[HockeyGameLogTypes.timeout] = 'Таймаут',
|
|
8411
8480
|
_a$2[HockeyGameLogTypes.penalty_start] = 'Начало штрафного времени',
|
|
8412
8481
|
_a$2[HockeyGameLogTypes.penalty_end] = 'Конец штрафного времени',
|