@mtgame/core 0.2.36 → 0.2.38
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 +26 -2
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/esm2015/localization/basketball-game-log-types.js +3 -1
- package/esm2015/models/basketball-game-log.js +9 -3
- package/esm2015/models/game.js +13 -1
- package/fesm2015/mtgame-core.js +22 -2
- package/fesm2015/mtgame-core.js.map +1 -1
- package/localization/basketball-game-log-types.d.ts +2 -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,22 @@
|
|
|
2659
2659
|
enumerable: false,
|
|
2660
2660
|
configurable: true
|
|
2661
2661
|
});
|
|
2662
|
+
Object.defineProperty(Game.prototype, "sport", {
|
|
2663
|
+
get: function () {
|
|
2664
|
+
var _a, _b, _c, _d, _e, _f;
|
|
2665
|
+
if ((_b = (_a = this.tournament) === null || _a === void 0 ? void 0 : _a.sport) === null || _b === void 0 ? void 0 : _b.id) {
|
|
2666
|
+
return this.tournament.sport;
|
|
2667
|
+
}
|
|
2668
|
+
if ((_d = (_c = this.team) === null || _c === void 0 ? void 0 : _c.sport) === null || _d === void 0 ? void 0 : _d.id) {
|
|
2669
|
+
return this.team.sport;
|
|
2670
|
+
}
|
|
2671
|
+
if ((_f = (_e = this.competitorTeam) === null || _e === void 0 ? void 0 : _e.sport) === null || _f === void 0 ? void 0 : _f.id) {
|
|
2672
|
+
return this.competitorTeam.sport;
|
|
2673
|
+
}
|
|
2674
|
+
},
|
|
2675
|
+
enumerable: false,
|
|
2676
|
+
configurable: true
|
|
2677
|
+
});
|
|
2662
2678
|
Game.toFront = function (data) { };
|
|
2663
2679
|
Game.toBack = function (data) { };
|
|
2664
2680
|
return Game;
|
|
@@ -3828,6 +3844,8 @@
|
|
|
3828
3844
|
BasketballGameLogTypes[BasketballGameLogTypes["dunk_attempt"] = 27] = "dunk_attempt";
|
|
3829
3845
|
BasketballGameLogTypes[BasketballGameLogTypes["dunk_made"] = 28] = "dunk_made";
|
|
3830
3846
|
BasketballGameLogTypes[BasketballGameLogTypes["shootout"] = 29] = "shootout";
|
|
3847
|
+
BasketballGameLogTypes[BasketballGameLogTypes["shootout_won"] = 30] = "shootout_won";
|
|
3848
|
+
BasketballGameLogTypes[BasketballGameLogTypes["shootout_lost"] = 31] = "shootout_lost";
|
|
3831
3849
|
})(exports.BasketballGameLogTypes || (exports.BasketballGameLogTypes = {}));
|
|
3832
3850
|
exports.BasketballSubLogTypes = void 0;
|
|
3833
3851
|
(function (BasketballSubLogTypes) {
|
|
@@ -3905,6 +3923,7 @@
|
|
|
3905
3923
|
exports.BasketballGameLogTypes.one_point_made,
|
|
3906
3924
|
exports.BasketballGameLogTypes.four_point_made,
|
|
3907
3925
|
exports.BasketballGameLogTypes.dunk_made,
|
|
3926
|
+
exports.BasketballGameLogTypes.shootout_won,
|
|
3908
3927
|
].indexOf(this.logType) > -1;
|
|
3909
3928
|
};
|
|
3910
3929
|
BasketballGameLog.prototype.isReboundType = function () {
|
|
@@ -3933,7 +3952,10 @@
|
|
|
3933
3952
|
_a[exports.BasketballGameLogTypes.four_point_made] = 4,
|
|
3934
3953
|
_a[exports.BasketballGameLogTypes.dunk_made] = 3,
|
|
3935
3954
|
_a);
|
|
3936
|
-
|
|
3955
|
+
if (this.logType === exports.BasketballGameLogTypes.shootout_won) {
|
|
3956
|
+
return this.shootoutPoints;
|
|
3957
|
+
}
|
|
3958
|
+
return scoreMapping[this.logType] || 0;
|
|
3937
3959
|
};
|
|
3938
3960
|
BasketballGameLog.prototype.compare = function (model) {
|
|
3939
3961
|
if (this.time === model.time && this.period === model.period) {
|
|
@@ -3991,7 +4013,7 @@
|
|
|
3991
4013
|
group: 'group',
|
|
3992
4014
|
marked: 'marked',
|
|
3993
4015
|
coords: 'coords',
|
|
3994
|
-
|
|
4016
|
+
shootout_points: 'shootoutPoints',
|
|
3995
4017
|
},
|
|
3996
4018
|
relation: {
|
|
3997
4019
|
datetime: DateTimeField,
|
|
@@ -12868,6 +12890,8 @@
|
|
|
12868
12890
|
_a$f[exports.BasketballGameLogTypes.four_point_attempt] = 'Бросок 4 очка',
|
|
12869
12891
|
_a$f[exports.BasketballGameLogTypes.four_point_made] = '4 очка',
|
|
12870
12892
|
_a$f[exports.BasketballGameLogTypes.shootout] = 'Булит',
|
|
12893
|
+
_a$f[exports.BasketballGameLogTypes.shootout_won] = 'Булит выигран',
|
|
12894
|
+
_a$f[exports.BasketballGameLogTypes.shootout_lost] = 'Булит проигран',
|
|
12871
12895
|
_a$f);
|
|
12872
12896
|
|
|
12873
12897
|
var _a$e;
|