@mtgame/core 0.1.34 → 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 +81 -12
- 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 +7 -5
- 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 +7 -5
- 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 +49 -8
- package/fesm2015/mtgame-core.js.map +1 -1
- package/fesm5/mtgame-core.js +77 -8
- 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
|
@@ -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',
|
|
@@ -3643,9 +3701,9 @@
|
|
|
3643
3701
|
shots_on_goal: 'shotsOnGoal',
|
|
3644
3702
|
shots_blocked: 'shotsBlocked',
|
|
3645
3703
|
shots: 'shots',
|
|
3704
|
+
total_shots: 'totalShots',
|
|
3646
3705
|
goals_percent: 'goalsPercent',
|
|
3647
|
-
|
|
3648
|
-
saves_percent: 'savesPercent',
|
|
3706
|
+
total_goals_percent: 'totalGoalsPercent',
|
|
3649
3707
|
pp_assists: 'ppAssists',
|
|
3650
3708
|
ev_assists: 'evAssists',
|
|
3651
3709
|
sh_assists: 'shAssists',
|
|
@@ -3659,7 +3717,16 @@
|
|
|
3659
3717
|
face_offs: 'faceOffs',
|
|
3660
3718
|
face_off_percent: 'faceOffPercent',
|
|
3661
3719
|
saves: 'saves',
|
|
3720
|
+
total_saves: 'totalSaves',
|
|
3721
|
+
shootout_saves: 'shootoutSaves',
|
|
3722
|
+
shots_against: 'shotsAgainst',
|
|
3723
|
+
shootout_shots_against: 'shootoutShotsAgainst',
|
|
3724
|
+
total_shots_against: 'totalShotsAgainst',
|
|
3725
|
+
saves_percent: 'savesPercent',
|
|
3726
|
+
total_saves_percent: 'totalSavesPercent',
|
|
3662
3727
|
goals_against: 'goalsAgainst',
|
|
3728
|
+
shootout_goals_against: 'shootoutGoalsAgainst',
|
|
3729
|
+
total_goals_against: 'totalGoalsAgainst',
|
|
3663
3730
|
safety_rate: 'safetyRate',
|
|
3664
3731
|
penalty_minutes: 'penaltyMinutes',
|
|
3665
3732
|
game_time: 'gameTime',
|
|
@@ -8605,10 +8672,10 @@
|
|
|
8605
8672
|
_a$2[exports.HockeyGameLogTypes.shot_on_goal] = 'Бросок по воротам',
|
|
8606
8673
|
_a$2[exports.HockeyGameLogTypes.shot_blocked] = 'Заблокированный бросок',
|
|
8607
8674
|
_a$2[exports.HockeyGameLogTypes.goal] = 'Гол',
|
|
8608
|
-
_a$2[exports.HockeyGameLogTypes.shootout_attempt] = '
|
|
8609
|
-
_a$2[exports.HockeyGameLogTypes.shootout_goal] = '
|
|
8610
|
-
_a$2[exports.HockeyGameLogTypes.after_game_shootout_attempt] = '
|
|
8611
|
-
_a$2[exports.HockeyGameLogTypes.after_game_shootout_goal] = '
|
|
8675
|
+
_a$2[exports.HockeyGameLogTypes.shootout_attempt] = 'Буллит промах',
|
|
8676
|
+
_a$2[exports.HockeyGameLogTypes.shootout_goal] = 'Буллит гол',
|
|
8677
|
+
_a$2[exports.HockeyGameLogTypes.after_game_shootout_attempt] = 'Буллит промах',
|
|
8678
|
+
_a$2[exports.HockeyGameLogTypes.after_game_shootout_goal] = 'Буллит гол',
|
|
8612
8679
|
_a$2[exports.HockeyGameLogTypes.assist] = 'Передача',
|
|
8613
8680
|
_a$2[exports.HockeyGameLogTypes.block_shot] = 'Блокировка броска',
|
|
8614
8681
|
_a$2[exports.HockeyGameLogTypes.minor_penalty] = 'Малый штраф',
|
|
@@ -8620,6 +8687,8 @@
|
|
|
8620
8687
|
_a$2[exports.HockeyGameLogTypes.face_off_lose] = 'Проигрыш в вбрасывании',
|
|
8621
8688
|
_a$2[exports.HockeyGameLogTypes.face_off_win] = 'Победа в вбрасывании',
|
|
8622
8689
|
_a$2[exports.HockeyGameLogTypes.save] = 'Отражен бросок',
|
|
8690
|
+
_a$2[exports.HockeyGameLogTypes.shootout_save] = 'Отражен бросок',
|
|
8691
|
+
_a$2[exports.HockeyGameLogTypes.after_game_shootout_save] = 'Отражен бросок',
|
|
8623
8692
|
_a$2[exports.HockeyGameLogTypes.timeout] = 'Таймаут',
|
|
8624
8693
|
_a$2[exports.HockeyGameLogTypes.penalty_start] = 'Начало штрафного времени',
|
|
8625
8694
|
_a$2[exports.HockeyGameLogTypes.penalty_end] = 'Конец штрафного времени',
|
|
@@ -9089,7 +9158,7 @@
|
|
|
9089
9158
|
if (force === void 0) { force = false; }
|
|
9090
9159
|
if (production === void 0) { production = true; }
|
|
9091
9160
|
if (!(error && (error.status === 0 || error.status === 404)) || (force && error.status !== 0)) {
|
|
9092
|
-
|
|
9161
|
+
angular.captureException(error);
|
|
9093
9162
|
}
|
|
9094
9163
|
if (!production) {
|
|
9095
9164
|
console.error(error);
|