@mtgame/core 0.1.35 → 0.1.37
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 +78 -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 +13 -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 +13 -3
- package/esm5/utils/errors.js +2 -2
- package/fesm2015/mtgame-core.js +46 -4
- package/fesm2015/mtgame-core.js.map +1 -1
- package/fesm5/mtgame-core.js +74 -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 +10 -0
- package/mtgame-core.metadata.json +1 -1
- package/package.json +2 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http'), require('rxjs/operators'), require('rxjs'), require('rxjs/internal/Subject'), require('rxjs/internal/ReplaySubject'), require('centrifuge'), require('@sentry/
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@mtgame/core', ['exports', '@angular/core', '@angular/common/http', 'rxjs/operators', 'rxjs', 'rxjs/internal/Subject', 'rxjs/internal/ReplaySubject', 'centrifuge', '@sentry/
|
|
4
|
-
(global = global || self, factory((global.mtgame = global.mtgame || {}, global.mtgame.core = {}), global.ng.core, global.ng.common.http, global.rxjs.operators, global.rxjs, global.rxjs['internal/Subject'], global.rxjs['internal/ReplaySubject'], global.Centrifuge, global.
|
|
5
|
-
}(this, (function (exports, core, http, operators, rxjs, Subject, ReplaySubject, Centrifuge,
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common/http'), require('rxjs/operators'), require('rxjs'), require('rxjs/internal/Subject'), require('rxjs/internal/ReplaySubject'), require('centrifuge'), require('@sentry/angular'), require('@angular/forms'), require('@angular/common')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@mtgame/core', ['exports', '@angular/core', '@angular/common/http', 'rxjs/operators', 'rxjs', 'rxjs/internal/Subject', 'rxjs/internal/ReplaySubject', 'centrifuge', '@sentry/angular', '@angular/forms', '@angular/common'], factory) :
|
|
4
|
+
(global = global || self, factory((global.mtgame = global.mtgame || {}, global.mtgame.core = {}), global.ng.core, global.ng.common.http, global.rxjs.operators, global.rxjs, global.rxjs['internal/Subject'], global.rxjs['internal/ReplaySubject'], global.Centrifuge, global.angular, global.ng.forms, global.ng.common));
|
|
5
|
+
}(this, (function (exports, core, http, operators, rxjs, Subject, ReplaySubject, Centrifuge, angular, forms, common) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/*! *****************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation.
|
|
@@ -3288,6 +3288,8 @@
|
|
|
3288
3288
|
HockeyGameLogTypes[HockeyGameLogTypes["penalty_end"] = 22] = "penalty_end";
|
|
3289
3289
|
HockeyGameLogTypes[HockeyGameLogTypes["after_game_shootout_attempt"] = 23] = "after_game_shootout_attempt";
|
|
3290
3290
|
HockeyGameLogTypes[HockeyGameLogTypes["after_game_shootout_goal"] = 24] = "after_game_shootout_goal";
|
|
3291
|
+
HockeyGameLogTypes[HockeyGameLogTypes["after_game_shootout_save"] = 25] = "after_game_shootout_save";
|
|
3292
|
+
HockeyGameLogTypes[HockeyGameLogTypes["shootout_save"] = 26] = "shootout_save";
|
|
3291
3293
|
})(exports.HockeyGameLogTypes || (exports.HockeyGameLogTypes = {}));
|
|
3292
3294
|
|
|
3293
3295
|
(function (HockeyAdvantageTypes) {
|
|
@@ -3448,7 +3450,14 @@
|
|
|
3448
3450
|
});
|
|
3449
3451
|
Object.defineProperty(HockeyGameStatistic.prototype, "shots", {
|
|
3450
3452
|
get: function () {
|
|
3451
|
-
return this.ppShots + this.evShots + this.shShots;
|
|
3453
|
+
return this.ppShots + this.evShots + this.shShots + (this.shootoutAttempts || 0);
|
|
3454
|
+
},
|
|
3455
|
+
enumerable: true,
|
|
3456
|
+
configurable: true
|
|
3457
|
+
});
|
|
3458
|
+
Object.defineProperty(HockeyGameStatistic.prototype, "totalShots", {
|
|
3459
|
+
get: function () {
|
|
3460
|
+
return this.shots + (this.shootoutAttempts || 0);
|
|
3452
3461
|
},
|
|
3453
3462
|
enumerable: true,
|
|
3454
3463
|
configurable: true
|
|
@@ -3460,6 +3469,13 @@
|
|
|
3460
3469
|
enumerable: true,
|
|
3461
3470
|
configurable: true
|
|
3462
3471
|
});
|
|
3472
|
+
Object.defineProperty(HockeyGameStatistic.prototype, "totalGoals", {
|
|
3473
|
+
get: function () {
|
|
3474
|
+
return this.goals + (this.shootoutGoals || 0);
|
|
3475
|
+
},
|
|
3476
|
+
enumerable: true,
|
|
3477
|
+
configurable: true
|
|
3478
|
+
});
|
|
3463
3479
|
Object.defineProperty(HockeyGameStatistic.prototype, "assists", {
|
|
3464
3480
|
get: function () {
|
|
3465
3481
|
return (this.ppAssists || 0) + (this.evAssists || 0) + (this.shAssists || 0);
|
|
@@ -3488,6 +3504,20 @@
|
|
|
3488
3504
|
enumerable: true,
|
|
3489
3505
|
configurable: true
|
|
3490
3506
|
});
|
|
3507
|
+
Object.defineProperty(HockeyGameStatistic.prototype, "shootoutShotsAgainst", {
|
|
3508
|
+
get: function () {
|
|
3509
|
+
return (this.shootoutSaves || 0) + (this.shootoutGoalsAgainst || 0);
|
|
3510
|
+
},
|
|
3511
|
+
enumerable: true,
|
|
3512
|
+
configurable: true
|
|
3513
|
+
});
|
|
3514
|
+
Object.defineProperty(HockeyGameStatistic.prototype, "totalShotsAgainst", {
|
|
3515
|
+
get: function () {
|
|
3516
|
+
return this.shotsAgainst + this.shootoutShotsAgainst;
|
|
3517
|
+
},
|
|
3518
|
+
enumerable: true,
|
|
3519
|
+
configurable: true
|
|
3520
|
+
});
|
|
3491
3521
|
Object.defineProperty(HockeyGameStatistic.prototype, "savesPercent", {
|
|
3492
3522
|
get: function () {
|
|
3493
3523
|
if (!this.shotsAgainst || !this.saves) {
|
|
@@ -3498,6 +3528,30 @@
|
|
|
3498
3528
|
enumerable: true,
|
|
3499
3529
|
configurable: true
|
|
3500
3530
|
});
|
|
3531
|
+
Object.defineProperty(HockeyGameStatistic.prototype, "totalSaves", {
|
|
3532
|
+
get: function () {
|
|
3533
|
+
return (this.saves || 0) + (this.shootoutSaves || 0);
|
|
3534
|
+
},
|
|
3535
|
+
enumerable: true,
|
|
3536
|
+
configurable: true
|
|
3537
|
+
});
|
|
3538
|
+
Object.defineProperty(HockeyGameStatistic.prototype, "totalSavesPercent", {
|
|
3539
|
+
get: function () {
|
|
3540
|
+
if (!this.totalShotsAgainst || !this.totalSaves) {
|
|
3541
|
+
return 0;
|
|
3542
|
+
}
|
|
3543
|
+
return Math.round(1000 * this.totalSaves / this.totalShotsAgainst) / 10;
|
|
3544
|
+
},
|
|
3545
|
+
enumerable: true,
|
|
3546
|
+
configurable: true
|
|
3547
|
+
});
|
|
3548
|
+
Object.defineProperty(HockeyGameStatistic.prototype, "totalGoalsAgainst", {
|
|
3549
|
+
get: function () {
|
|
3550
|
+
return (this.goalsAgainst || 0) + (this.shootoutGoalsAgainst || 0);
|
|
3551
|
+
},
|
|
3552
|
+
enumerable: true,
|
|
3553
|
+
configurable: true
|
|
3554
|
+
});
|
|
3501
3555
|
Object.defineProperty(HockeyGameStatistic.prototype, "gameMinutes", {
|
|
3502
3556
|
get: function () {
|
|
3503
3557
|
return Math.floor(this.gameTime / 60);
|
|
@@ -3542,7 +3596,11 @@
|
|
|
3542
3596
|
face_off_losses: 'faceOffLosses',
|
|
3543
3597
|
face_off_wins: 'faceOffWins',
|
|
3544
3598
|
saves: 'saves',
|
|
3599
|
+
shootout_save: 'shootoutSaves',
|
|
3600
|
+
after_game_shootout_saves: 'afterGameShootoutSaves',
|
|
3545
3601
|
goals_against: 'goalsAgainst',
|
|
3602
|
+
shootout_goals_against: 'shootoutGoalsAgainst',
|
|
3603
|
+
after_game_shootout_goals_against: 'afterGameShootoutGoalsAgainst',
|
|
3546
3604
|
safety_rate: 'safetyRate',
|
|
3547
3605
|
penalty_minutes: 'penaltyMinutes',
|
|
3548
3606
|
game_time: 'gameTime',
|
|
@@ -3638,14 +3696,15 @@
|
|
|
3638
3696
|
ev_goals: 'evGoals',
|
|
3639
3697
|
sh_goals_percent: 'shGoalsPercent',
|
|
3640
3698
|
goals: 'goals',
|
|
3699
|
+
total_goals: 'totalGoals',
|
|
3641
3700
|
sh_goals: 'shGoals',
|
|
3642
3701
|
shot_misses: 'shotMisses',
|
|
3643
3702
|
shots_on_goal: 'shotsOnGoal',
|
|
3644
3703
|
shots_blocked: 'shotsBlocked',
|
|
3645
3704
|
shots: 'shots',
|
|
3705
|
+
total_shots: 'totalShots',
|
|
3646
3706
|
goals_percent: 'goalsPercent',
|
|
3647
|
-
|
|
3648
|
-
saves_percent: 'savesPercent',
|
|
3707
|
+
total_goals_percent: 'totalGoalsPercent',
|
|
3649
3708
|
pp_assists: 'ppAssists',
|
|
3650
3709
|
ev_assists: 'evAssists',
|
|
3651
3710
|
sh_assists: 'shAssists',
|
|
@@ -3659,7 +3718,16 @@
|
|
|
3659
3718
|
face_offs: 'faceOffs',
|
|
3660
3719
|
face_off_percent: 'faceOffPercent',
|
|
3661
3720
|
saves: 'saves',
|
|
3721
|
+
total_saves: 'totalSaves',
|
|
3722
|
+
shootout_saves: 'shootoutSaves',
|
|
3723
|
+
shots_against: 'shotsAgainst',
|
|
3724
|
+
shootout_shots_against: 'shootoutShotsAgainst',
|
|
3725
|
+
total_shots_against: 'totalShotsAgainst',
|
|
3726
|
+
saves_percent: 'savesPercent',
|
|
3727
|
+
total_saves_percent: 'totalSavesPercent',
|
|
3662
3728
|
goals_against: 'goalsAgainst',
|
|
3729
|
+
shootout_goals_against: 'shootoutGoalsAgainst',
|
|
3730
|
+
total_goals_against: 'totalGoalsAgainst',
|
|
3663
3731
|
safety_rate: 'safetyRate',
|
|
3664
3732
|
penalty_minutes: 'penaltyMinutes',
|
|
3665
3733
|
game_time: 'gameTime',
|
|
@@ -8620,6 +8688,8 @@
|
|
|
8620
8688
|
_a$2[exports.HockeyGameLogTypes.face_off_lose] = 'Проигрыш в вбрасывании',
|
|
8621
8689
|
_a$2[exports.HockeyGameLogTypes.face_off_win] = 'Победа в вбрасывании',
|
|
8622
8690
|
_a$2[exports.HockeyGameLogTypes.save] = 'Отражен бросок',
|
|
8691
|
+
_a$2[exports.HockeyGameLogTypes.shootout_save] = 'Отражен бросок',
|
|
8692
|
+
_a$2[exports.HockeyGameLogTypes.after_game_shootout_save] = 'Отражен бросок',
|
|
8623
8693
|
_a$2[exports.HockeyGameLogTypes.timeout] = 'Таймаут',
|
|
8624
8694
|
_a$2[exports.HockeyGameLogTypes.penalty_start] = 'Начало штрафного времени',
|
|
8625
8695
|
_a$2[exports.HockeyGameLogTypes.penalty_end] = 'Конец штрафного времени',
|
|
@@ -9089,7 +9159,7 @@
|
|
|
9089
9159
|
if (force === void 0) { force = false; }
|
|
9090
9160
|
if (production === void 0) { production = true; }
|
|
9091
9161
|
if (!(error && (error.status === 0 || error.status === 404)) || (force && error.status !== 0)) {
|
|
9092
|
-
|
|
9162
|
+
angular.captureException(error);
|
|
9093
9163
|
}
|
|
9094
9164
|
if (!production) {
|
|
9095
9165
|
console.error(error);
|