@mtgame/core 0.2.35 → 0.2.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 +30 -2
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/esm2015/localization/basketball-game-log-types.js +8 -1
- package/esm2015/models/basketball-game-log.js +9 -3
- package/esm2015/models/game.js +12 -1
- package/fesm2015/mtgame-core.js +26 -2
- package/fesm2015/mtgame-core.js.map +1 -1
- package/localization/basketball-game-log-types.d.ts +7 -0
- package/models/basketball-game-log.d.ts +5 -3
- package/models/game.d.ts +2 -0
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -2659,6 +2659,21 @@
|
|
|
2659
2659
|
enumerable: false,
|
|
2660
2660
|
configurable: true
|
|
2661
2661
|
});
|
|
2662
|
+
Object.defineProperty(Game.prototype, "sport", {
|
|
2663
|
+
get: function () {
|
|
2664
|
+
if (this.tournament && this.tournament.sport) {
|
|
2665
|
+
return this.tournament.sport;
|
|
2666
|
+
}
|
|
2667
|
+
if (this.team && this.team.sport) {
|
|
2668
|
+
return this.team.sport;
|
|
2669
|
+
}
|
|
2670
|
+
if (this.competitorTeam && this.competitorTeam.sport) {
|
|
2671
|
+
return this.competitorTeam.sport;
|
|
2672
|
+
}
|
|
2673
|
+
},
|
|
2674
|
+
enumerable: false,
|
|
2675
|
+
configurable: true
|
|
2676
|
+
});
|
|
2662
2677
|
Game.toFront = function (data) { };
|
|
2663
2678
|
Game.toBack = function (data) { };
|
|
2664
2679
|
return Game;
|
|
@@ -3828,6 +3843,8 @@
|
|
|
3828
3843
|
BasketballGameLogTypes[BasketballGameLogTypes["dunk_attempt"] = 27] = "dunk_attempt";
|
|
3829
3844
|
BasketballGameLogTypes[BasketballGameLogTypes["dunk_made"] = 28] = "dunk_made";
|
|
3830
3845
|
BasketballGameLogTypes[BasketballGameLogTypes["shootout"] = 29] = "shootout";
|
|
3846
|
+
BasketballGameLogTypes[BasketballGameLogTypes["shootout_won"] = 30] = "shootout_won";
|
|
3847
|
+
BasketballGameLogTypes[BasketballGameLogTypes["shootout_lost"] = 31] = "shootout_lost";
|
|
3831
3848
|
})(exports.BasketballGameLogTypes || (exports.BasketballGameLogTypes = {}));
|
|
3832
3849
|
exports.BasketballSubLogTypes = void 0;
|
|
3833
3850
|
(function (BasketballSubLogTypes) {
|
|
@@ -3905,6 +3922,7 @@
|
|
|
3905
3922
|
exports.BasketballGameLogTypes.one_point_made,
|
|
3906
3923
|
exports.BasketballGameLogTypes.four_point_made,
|
|
3907
3924
|
exports.BasketballGameLogTypes.dunk_made,
|
|
3925
|
+
exports.BasketballGameLogTypes.shootout_won,
|
|
3908
3926
|
].indexOf(this.logType) > -1;
|
|
3909
3927
|
};
|
|
3910
3928
|
BasketballGameLog.prototype.isReboundType = function () {
|
|
@@ -3933,7 +3951,10 @@
|
|
|
3933
3951
|
_a[exports.BasketballGameLogTypes.four_point_made] = 4,
|
|
3934
3952
|
_a[exports.BasketballGameLogTypes.dunk_made] = 3,
|
|
3935
3953
|
_a);
|
|
3936
|
-
|
|
3954
|
+
if (this.logType === exports.BasketballGameLogTypes.shootout_won) {
|
|
3955
|
+
return this.shootoutPoints;
|
|
3956
|
+
}
|
|
3957
|
+
return scoreMapping[this.logType] || 0;
|
|
3937
3958
|
};
|
|
3938
3959
|
BasketballGameLog.prototype.compare = function (model) {
|
|
3939
3960
|
if (this.time === model.time && this.period === model.period) {
|
|
@@ -3991,7 +4012,7 @@
|
|
|
3991
4012
|
group: 'group',
|
|
3992
4013
|
marked: 'marked',
|
|
3993
4014
|
coords: 'coords',
|
|
3994
|
-
|
|
4015
|
+
shootout_points: 'shootoutPoints',
|
|
3995
4016
|
},
|
|
3996
4017
|
relation: {
|
|
3997
4018
|
datetime: DateTimeField,
|
|
@@ -12863,6 +12884,13 @@
|
|
|
12863
12884
|
_a$f[exports.BasketballGameLogTypes.unsportsmanlike_foul] = 'Неспортиный фол',
|
|
12864
12885
|
_a$f[exports.BasketballGameLogTypes.timeout] = 'Таймаут',
|
|
12865
12886
|
_a$f[exports.BasketballGameLogTypes.team_rebound] = 'Командный подбор',
|
|
12887
|
+
_a$f[exports.BasketballGameLogTypes.dunk_attempt] = 'Данк мимо',
|
|
12888
|
+
_a$f[exports.BasketballGameLogTypes.dunk_made] = 'Данк',
|
|
12889
|
+
_a$f[exports.BasketballGameLogTypes.four_point_attempt] = 'Бросок 4 очка',
|
|
12890
|
+
_a$f[exports.BasketballGameLogTypes.four_point_made] = '4 очка',
|
|
12891
|
+
_a$f[exports.BasketballGameLogTypes.shootout] = 'Булит',
|
|
12892
|
+
_a$f[exports.BasketballGameLogTypes.shootout_won] = 'Булит выигран',
|
|
12893
|
+
_a$f[exports.BasketballGameLogTypes.shootout_lost] = 'Булит проигран',
|
|
12866
12894
|
_a$f);
|
|
12867
12895
|
|
|
12868
12896
|
var _a$e;
|