@mtgame/core 0.0.67 → 0.0.69
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/api/handball-game-api.d.ts +18 -0
- package/api/public-api.d.ts +1 -0
- package/api/tournament-api.d.ts +2 -0
- package/bundles/mtgame-core.umd.js +650 -54
- 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/api/handball-game-api.js +66 -0
- package/esm2015/api/public-api.js +2 -1
- package/esm2015/api/tournament-api.js +21 -1
- package/esm2015/localization/handball-game-log-types.js +24 -0
- package/esm2015/localization/public-api.js +2 -1
- package/esm2015/localization/user-profile.js +9 -1
- package/esm2015/models/base-statistic.js +1 -1
- package/esm2015/models/basketball-statistic.js +1 -1
- package/esm2015/models/football-statistic.js +1 -1
- package/esm2015/models/game.js +4 -1
- package/esm2015/models/handball-game-config.js +34 -0
- package/esm2015/models/handball-game-log.js +92 -0
- package/esm2015/models/handball-game-statistic.js +101 -0
- package/esm2015/models/handball-game-team-statistic.js +27 -0
- package/esm2015/models/handball-profile.js +39 -0
- package/esm2015/models/handball-statistic.js +86 -0
- package/esm2015/models/hockey-statistic.js +1 -1
- package/esm2015/models/public-api.js +7 -1
- package/esm2015/models/sport.js +9 -1
- package/esm2015/models/user.js +4 -1
- package/esm5/api/handball-game-api.js +81 -0
- package/esm5/api/public-api.js +2 -1
- package/esm5/api/tournament-api.js +35 -1
- package/esm5/localization/handball-game-log-types.js +25 -0
- package/esm5/localization/public-api.js +2 -1
- package/esm5/localization/user-profile.js +10 -2
- package/esm5/models/base-statistic.js +1 -1
- package/esm5/models/basketball-statistic.js +1 -1
- package/esm5/models/football-statistic.js +1 -1
- package/esm5/models/game.js +4 -1
- package/esm5/models/handball-game-config.js +39 -0
- package/esm5/models/handball-game-log.js +99 -0
- package/esm5/models/handball-game-statistic.js +162 -0
- package/esm5/models/handball-game-team-statistic.js +32 -0
- package/esm5/models/handball-profile.js +44 -0
- package/esm5/models/handball-statistic.js +95 -0
- package/esm5/models/hockey-statistic.js +1 -1
- package/esm5/models/public-api.js +7 -1
- package/esm5/models/sport.js +9 -1
- package/esm5/models/user.js +4 -1
- package/fesm2015/mtgame-core.js +466 -1
- package/fesm2015/mtgame-core.js.map +1 -1
- package/fesm5/mtgame-core.js +641 -54
- package/fesm5/mtgame-core.js.map +1 -1
- package/localization/handball-game-log-types.d.ts +23 -0
- package/localization/public-api.d.ts +1 -0
- package/localization/user-profile.d.ts +8 -0
- package/models/base-statistic.d.ts +2 -1
- package/models/basketball-statistic.d.ts +2 -2
- package/models/football-statistic.d.ts +2 -2
- package/models/game.d.ts +2 -0
- package/models/handball-game-config.d.ts +15 -0
- package/models/handball-game-log.d.ts +49 -0
- package/models/handball-game-statistic.d.ts +44 -0
- package/models/handball-game-team-statistic.d.ts +8 -0
- package/models/handball-profile.d.ts +17 -0
- package/models/handball-statistic.d.ts +55 -0
- package/models/hockey-statistic.d.ts +2 -2
- package/models/public-api.d.ts +6 -0
- package/models/sport.d.ts +5 -1
- package/models/user.d.ts +2 -0
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
package/fesm2015/mtgame-core.js
CHANGED
|
@@ -348,6 +348,8 @@ var SportTypes;
|
|
|
348
348
|
SportTypes[SportTypes["football"] = 10] = "football";
|
|
349
349
|
SportTypes[SportTypes["classic_football"] = 11] = "classic_football";
|
|
350
350
|
SportTypes[SportTypes["mini_football"] = 12] = "mini_football";
|
|
351
|
+
SportTypes[SportTypes["handball"] = 13] = "handball";
|
|
352
|
+
SportTypes[SportTypes["handball_classic"] = 14] = "handball_classic";
|
|
351
353
|
})(SportTypes || (SportTypes = {}));
|
|
352
354
|
let Sport = class Sport extends BaseModel {
|
|
353
355
|
isBasketball() {
|
|
@@ -386,6 +388,12 @@ let Sport = class Sport extends BaseModel {
|
|
|
386
388
|
isMiniFootball() {
|
|
387
389
|
return this.id === SportTypes.mini_football;
|
|
388
390
|
}
|
|
391
|
+
isHandball() {
|
|
392
|
+
return this.id === SportTypes.handball || this.parentId === SportTypes.handball;
|
|
393
|
+
}
|
|
394
|
+
isHandballClassic() {
|
|
395
|
+
return this.id === SportTypes.handball_classic;
|
|
396
|
+
}
|
|
389
397
|
static toFront(data) {
|
|
390
398
|
return null;
|
|
391
399
|
}
|
|
@@ -608,6 +616,41 @@ FootballProfile = __decorate([
|
|
|
608
616
|
})
|
|
609
617
|
], FootballProfile);
|
|
610
618
|
|
|
619
|
+
var GameHandballPosition;
|
|
620
|
+
(function (GameHandballPosition) {
|
|
621
|
+
GameHandballPosition[GameHandballPosition["goalkeeper"] = 1] = "goalkeeper";
|
|
622
|
+
GameHandballPosition[GameHandballPosition["winger"] = 2] = "winger";
|
|
623
|
+
GameHandballPosition[GameHandballPosition["pivot"] = 3] = "pivot";
|
|
624
|
+
GameHandballPosition[GameHandballPosition["centre_back"] = 4] = "centre_back";
|
|
625
|
+
GameHandballPosition[GameHandballPosition["fullback"] = 5] = "fullback";
|
|
626
|
+
})(GameHandballPosition || (GameHandballPosition = {}));
|
|
627
|
+
let HandballProfile = class HandballProfile extends BaseModel {
|
|
628
|
+
static toFront(value) {
|
|
629
|
+
}
|
|
630
|
+
static toBack(value) {
|
|
631
|
+
}
|
|
632
|
+
};
|
|
633
|
+
__decorate([
|
|
634
|
+
ToFrontHook
|
|
635
|
+
], HandballProfile, "toFront", null);
|
|
636
|
+
__decorate([
|
|
637
|
+
ToBackHook
|
|
638
|
+
], HandballProfile, "toBack", null);
|
|
639
|
+
HandballProfile = __decorate([
|
|
640
|
+
ModelInstance({
|
|
641
|
+
mappingFields: {
|
|
642
|
+
id: 'id',
|
|
643
|
+
user_id: 'userId',
|
|
644
|
+
position: 'position',
|
|
645
|
+
work_hand: 'workHand'
|
|
646
|
+
},
|
|
647
|
+
relation: {
|
|
648
|
+
position: enumField(GameHandballPosition),
|
|
649
|
+
workHand: enumField(WorkHand)
|
|
650
|
+
}
|
|
651
|
+
})
|
|
652
|
+
], HandballProfile);
|
|
653
|
+
|
|
611
654
|
var UserGender;
|
|
612
655
|
(function (UserGender) {
|
|
613
656
|
UserGender[UserGender["male"] = 1] = "male";
|
|
@@ -659,6 +702,7 @@ User = __decorate([
|
|
|
659
702
|
volleyball_profile: 'volleyballProfile',
|
|
660
703
|
hockey_profile: 'hockeyProfile',
|
|
661
704
|
football_profile: 'footballProfile',
|
|
705
|
+
handball_profile: 'handballProfile',
|
|
662
706
|
wizards: 'wizards',
|
|
663
707
|
city: 'city',
|
|
664
708
|
gender: 'gender',
|
|
@@ -672,6 +716,7 @@ User = __decorate([
|
|
|
672
716
|
volleyballProfile: VolleyballProfile,
|
|
673
717
|
hockeyProfile: HockeyProfile,
|
|
674
718
|
footballProfile: FootballProfile,
|
|
719
|
+
handballProfile: HandballProfile,
|
|
675
720
|
city: City,
|
|
676
721
|
gender: enumField(UserGender)
|
|
677
722
|
}
|
|
@@ -1236,6 +1281,36 @@ FootballGameConfig = __decorate([
|
|
|
1236
1281
|
})
|
|
1237
1282
|
], FootballGameConfig);
|
|
1238
1283
|
|
|
1284
|
+
let HandballGameConfig = class HandballGameConfig extends BaseModel {
|
|
1285
|
+
static toFront(data) { }
|
|
1286
|
+
static toBack(data) { }
|
|
1287
|
+
};
|
|
1288
|
+
__decorate([
|
|
1289
|
+
ToFrontHook
|
|
1290
|
+
], HandballGameConfig, "toFront", null);
|
|
1291
|
+
__decorate([
|
|
1292
|
+
ToBackHook
|
|
1293
|
+
], HandballGameConfig, "toBack", null);
|
|
1294
|
+
HandballGameConfig = __decorate([
|
|
1295
|
+
ModelInstance({
|
|
1296
|
+
mappingFields: {
|
|
1297
|
+
periods_count: 'periodsCount',
|
|
1298
|
+
period_time: 'periodTime',
|
|
1299
|
+
overtime_type: 'overtimeType',
|
|
1300
|
+
overtime_time: 'overtimeTime',
|
|
1301
|
+
max_game_players: 'maxGamePlayers',
|
|
1302
|
+
timeout_count: 'timeoutCount',
|
|
1303
|
+
overtime_timeout_count: 'overtimeTimeoutCount',
|
|
1304
|
+
timeout_time: 'timeoutTime',
|
|
1305
|
+
game_time_type: 'gameTimeType',
|
|
1306
|
+
},
|
|
1307
|
+
relation: {
|
|
1308
|
+
overtimeType: enumField(OvertimeTypes),
|
|
1309
|
+
gameTimeType: enumField(GameTimeTypes),
|
|
1310
|
+
}
|
|
1311
|
+
})
|
|
1312
|
+
], HandballGameConfig);
|
|
1313
|
+
|
|
1239
1314
|
var GameStatuses;
|
|
1240
1315
|
(function (GameStatuses) {
|
|
1241
1316
|
GameStatuses[GameStatuses["open"] = 1] = "open";
|
|
@@ -1318,6 +1393,7 @@ Game = __decorate([
|
|
|
1318
1393
|
volleyball_game_config: 'volleyballGameConfig',
|
|
1319
1394
|
hockey_game_config: 'hockeyGameConfig',
|
|
1320
1395
|
football_game_config: 'footballGameConfig',
|
|
1396
|
+
handball_game_config: 'handballGameConfig',
|
|
1321
1397
|
score_by_period: 'scoreByPeriod',
|
|
1322
1398
|
playoff_stage: 'playoffStage',
|
|
1323
1399
|
tournament_stage_id: 'tournamentStageId',
|
|
@@ -1338,6 +1414,7 @@ Game = __decorate([
|
|
|
1338
1414
|
volleyballGameConfig: VolleyballGameConfig,
|
|
1339
1415
|
hockeyGameConfig: HockeyGameConfig,
|
|
1340
1416
|
footballGameConfig: FootballGameConfig,
|
|
1417
|
+
handballGameConfig: HandballGameConfig,
|
|
1341
1418
|
tournamentCourt: LeagueCourt,
|
|
1342
1419
|
media: listField(MediaItem),
|
|
1343
1420
|
tournament: Tournament,
|
|
@@ -2916,6 +2993,345 @@ FootballGameApi = __decorate([
|
|
|
2916
2993
|
Injectable({ providedIn: 'root' })
|
|
2917
2994
|
], FootballGameApi);
|
|
2918
2995
|
|
|
2996
|
+
var HandballGameLogTypes;
|
|
2997
|
+
(function (HandballGameLogTypes) {
|
|
2998
|
+
HandballGameLogTypes[HandballGameLogTypes["enter_game"] = 1] = "enter_game";
|
|
2999
|
+
HandballGameLogTypes[HandballGameLogTypes["exit_game"] = 2] = "exit_game";
|
|
3000
|
+
HandballGameLogTypes[HandballGameLogTypes["shot_miss"] = 3] = "shot_miss";
|
|
3001
|
+
HandballGameLogTypes[HandballGameLogTypes["shot_on_goal"] = 4] = "shot_on_goal";
|
|
3002
|
+
HandballGameLogTypes[HandballGameLogTypes["shot_blocked"] = 5] = "shot_blocked";
|
|
3003
|
+
HandballGameLogTypes[HandballGameLogTypes["goal"] = 6] = "goal";
|
|
3004
|
+
HandballGameLogTypes[HandballGameLogTypes["assist"] = 7] = "assist";
|
|
3005
|
+
HandballGameLogTypes[HandballGameLogTypes["penalty_miss"] = 8] = "penalty_miss";
|
|
3006
|
+
HandballGameLogTypes[HandballGameLogTypes["penalty_shot_on_goal"] = 9] = "penalty_shot_on_goal";
|
|
3007
|
+
HandballGameLogTypes[HandballGameLogTypes["penalty_goal"] = 10] = "penalty_goal";
|
|
3008
|
+
HandballGameLogTypes[HandballGameLogTypes["save"] = 11] = "save";
|
|
3009
|
+
HandballGameLogTypes[HandballGameLogTypes["penalty_save"] = 12] = "penalty_save";
|
|
3010
|
+
HandballGameLogTypes[HandballGameLogTypes["foul"] = 13] = "foul";
|
|
3011
|
+
HandballGameLogTypes[HandballGameLogTypes["yellow_card"] = 14] = "yellow_card";
|
|
3012
|
+
HandballGameLogTypes[HandballGameLogTypes["red_card"] = 15] = "red_card";
|
|
3013
|
+
HandballGameLogTypes[HandballGameLogTypes["two_minute_foul"] = 16] = "two_minute_foul";
|
|
3014
|
+
HandballGameLogTypes[HandballGameLogTypes["turnover"] = 17] = "turnover";
|
|
3015
|
+
HandballGameLogTypes[HandballGameLogTypes["steal"] = 18] = "steal";
|
|
3016
|
+
HandballGameLogTypes[HandballGameLogTypes["block_shot"] = 19] = "block_shot";
|
|
3017
|
+
HandballGameLogTypes[HandballGameLogTypes["timeout"] = 20] = "timeout";
|
|
3018
|
+
})(HandballGameLogTypes || (HandballGameLogTypes = {}));
|
|
3019
|
+
let HandballGameLog = class HandballGameLog extends BaseModel {
|
|
3020
|
+
constructor() {
|
|
3021
|
+
super(...arguments);
|
|
3022
|
+
this.active = true;
|
|
3023
|
+
}
|
|
3024
|
+
compare(model) {
|
|
3025
|
+
if (this.time === model.time && this.period === model.period) {
|
|
3026
|
+
return this.datetime.getTime() < model.datetime.getTime() ? 1 : -1;
|
|
3027
|
+
}
|
|
3028
|
+
if (this.period === model.period) {
|
|
3029
|
+
return this.time < model.time ? 1 : -1;
|
|
3030
|
+
}
|
|
3031
|
+
return this.period < model.period ? 1 : -1;
|
|
3032
|
+
}
|
|
3033
|
+
get timeFormatted() {
|
|
3034
|
+
const minutes = Math.floor(this.time / 60);
|
|
3035
|
+
const seconds = this.time - minutes * 60;
|
|
3036
|
+
return `${minutes < 10 ? '0' : ''}${minutes}:${seconds < 10 ? '0' : ''}${seconds}`;
|
|
3037
|
+
}
|
|
3038
|
+
isScoreType() {
|
|
3039
|
+
return [HandballGameLogTypes.goal, HandballGameLogTypes.penalty_goal].indexOf(this.logType) > -1;
|
|
3040
|
+
}
|
|
3041
|
+
isAfter(log) {
|
|
3042
|
+
if (this.time === log.time && this.period === log.period) {
|
|
3043
|
+
return this.id > log.id;
|
|
3044
|
+
}
|
|
3045
|
+
if (this.period === log.period) {
|
|
3046
|
+
return this.time > log.time;
|
|
3047
|
+
}
|
|
3048
|
+
return this.period > log.period;
|
|
3049
|
+
}
|
|
3050
|
+
isFoulType() {
|
|
3051
|
+
return [HandballGameLogTypes.foul, HandballGameLogTypes.yellow_card, HandballGameLogTypes.red_card].indexOf(this.logType) > -1;
|
|
3052
|
+
}
|
|
3053
|
+
static toFront(value) { }
|
|
3054
|
+
static toBack(value) { }
|
|
3055
|
+
};
|
|
3056
|
+
__decorate([
|
|
3057
|
+
ToFrontHook
|
|
3058
|
+
], HandballGameLog, "toFront", null);
|
|
3059
|
+
__decorate([
|
|
3060
|
+
ToBackHook
|
|
3061
|
+
], HandballGameLog, "toBack", null);
|
|
3062
|
+
HandballGameLog = __decorate([
|
|
3063
|
+
ModelInstance({
|
|
3064
|
+
mappingFields: {
|
|
3065
|
+
id: 'id',
|
|
3066
|
+
unique_id: 'uniqueId',
|
|
3067
|
+
game_id: 'gameId',
|
|
3068
|
+
game_user_id: 'gameUserId',
|
|
3069
|
+
team_id: 'teamId',
|
|
3070
|
+
log_type: 'logType',
|
|
3071
|
+
datetime: 'datetime',
|
|
3072
|
+
time: 'time',
|
|
3073
|
+
period: 'period',
|
|
3074
|
+
active: 'active',
|
|
3075
|
+
is_highlight: 'isHighlight',
|
|
3076
|
+
is_goalie: 'isGoalie',
|
|
3077
|
+
},
|
|
3078
|
+
relation: {
|
|
3079
|
+
datetime: DateTimeField,
|
|
3080
|
+
logType: enumField(HandballGameLogTypes)
|
|
3081
|
+
}
|
|
3082
|
+
})
|
|
3083
|
+
], HandballGameLog);
|
|
3084
|
+
|
|
3085
|
+
let HandballGameStatistic = class HandballGameStatistic extends BaseModel {
|
|
3086
|
+
get id() {
|
|
3087
|
+
return this.gameUserId;
|
|
3088
|
+
}
|
|
3089
|
+
get shots() {
|
|
3090
|
+
return (this.shotMisses || 0) + (this.shotsOnGoal || 0) + (this.shotsBlocked || 0);
|
|
3091
|
+
}
|
|
3092
|
+
get totalGoals() {
|
|
3093
|
+
return (this.goals || 0) + (this.penaltyGoals || 0);
|
|
3094
|
+
}
|
|
3095
|
+
get goalsPercent() {
|
|
3096
|
+
if (!this.shots || !this.totalGoals) {
|
|
3097
|
+
return 0;
|
|
3098
|
+
}
|
|
3099
|
+
return Math.round(1000 * this.totalGoals / this.shots) / 10;
|
|
3100
|
+
}
|
|
3101
|
+
get shotsOnGoalPercent() {
|
|
3102
|
+
if (!this.shotsOnGoal || !this.shots) {
|
|
3103
|
+
return 0;
|
|
3104
|
+
}
|
|
3105
|
+
return Math.round(1000 * this.shotsOnGoal / this.shots) / 10;
|
|
3106
|
+
}
|
|
3107
|
+
get penaltyShots() {
|
|
3108
|
+
return (this.penaltyShotsOnGoal || 0) + (this.penaltyMisses || 0);
|
|
3109
|
+
}
|
|
3110
|
+
get penaltyGoalsPercent() {
|
|
3111
|
+
if (!this.penaltyShots || !this.penaltyGoals) {
|
|
3112
|
+
return 0;
|
|
3113
|
+
}
|
|
3114
|
+
return Math.round(1000 * this.penaltyGoals / this.penaltyShots) / 10;
|
|
3115
|
+
}
|
|
3116
|
+
get shotsAgainst() {
|
|
3117
|
+
return (this.saves || 0) + (this.goalsAgainst || 0);
|
|
3118
|
+
}
|
|
3119
|
+
get penaltyShotsAgainst() {
|
|
3120
|
+
return (this.penaltySaves || 0) + (this.penaltyGoalsAgainst || 0);
|
|
3121
|
+
}
|
|
3122
|
+
get totalGoalsAgainst() {
|
|
3123
|
+
return (this.goalsAgainst || 0) + (this.penaltyGoalsAgainst || 0);
|
|
3124
|
+
}
|
|
3125
|
+
get totalSaves() {
|
|
3126
|
+
return (this.saves || 0) + (this.penaltySaves || 0);
|
|
3127
|
+
}
|
|
3128
|
+
get savesPercent() {
|
|
3129
|
+
if (!this.shotsAgainst || !this.saves) {
|
|
3130
|
+
return 0;
|
|
3131
|
+
}
|
|
3132
|
+
return Math.round(1000 * this.saves / this.shotsAgainst) / 10;
|
|
3133
|
+
}
|
|
3134
|
+
get penaltySavesPercent() {
|
|
3135
|
+
if (!this.penaltyShotsAgainst || !this.penaltySaves) {
|
|
3136
|
+
return 0;
|
|
3137
|
+
}
|
|
3138
|
+
return Math.round(1000 * this.penaltySaves / this.penaltyShotsAgainst) / 10;
|
|
3139
|
+
}
|
|
3140
|
+
get gameMinutes() {
|
|
3141
|
+
return Math.floor(this.gameTime / 60);
|
|
3142
|
+
}
|
|
3143
|
+
static toFront(data) { }
|
|
3144
|
+
static toBack(data) { }
|
|
3145
|
+
};
|
|
3146
|
+
__decorate([
|
|
3147
|
+
ToFrontHook
|
|
3148
|
+
], HandballGameStatistic, "toFront", null);
|
|
3149
|
+
__decorate([
|
|
3150
|
+
ToBackHook
|
|
3151
|
+
], HandballGameStatistic, "toBack", null);
|
|
3152
|
+
HandballGameStatistic = __decorate([
|
|
3153
|
+
ModelInstance({
|
|
3154
|
+
mappingFields: {
|
|
3155
|
+
game_user_id: 'gameUserId',
|
|
3156
|
+
points: 'points',
|
|
3157
|
+
shot_misses: 'shotMisses',
|
|
3158
|
+
shots_on_goal: 'shotsOnGoal',
|
|
3159
|
+
shots_blocked: 'shotsBlocked',
|
|
3160
|
+
goals: 'goals',
|
|
3161
|
+
assists: 'assists',
|
|
3162
|
+
penalty_goals: 'penaltyGoals',
|
|
3163
|
+
penalty_misses: 'penaltyMisses',
|
|
3164
|
+
penalty_shots_on_goal: 'penaltyShotsOnGoal',
|
|
3165
|
+
saves: 'saves',
|
|
3166
|
+
penalty_saves: 'penaltySaves',
|
|
3167
|
+
goals_against: 'goalsAgainst',
|
|
3168
|
+
penalty_goals_against: 'penaltyGoalsAgainst',
|
|
3169
|
+
safety_rate: 'safetyRate',
|
|
3170
|
+
fouls: 'fouls',
|
|
3171
|
+
yellowCards: 'yellowCards',
|
|
3172
|
+
red_cards: 'redCards',
|
|
3173
|
+
two_minute_fouls: 'twoMinuteFouls',
|
|
3174
|
+
turnovers: 'turnovers',
|
|
3175
|
+
steals: 'steals',
|
|
3176
|
+
block_shots: 'blockShots',
|
|
3177
|
+
game_time: 'gameTime',
|
|
3178
|
+
plus_minus: 'plusMinus'
|
|
3179
|
+
}
|
|
3180
|
+
})
|
|
3181
|
+
], HandballGameStatistic);
|
|
3182
|
+
|
|
3183
|
+
let HandballStatistic = class HandballStatistic extends BaseStatistic {
|
|
3184
|
+
get userMinutes() {
|
|
3185
|
+
if (!this.gameTime) {
|
|
3186
|
+
return '00:00';
|
|
3187
|
+
}
|
|
3188
|
+
const minutes = Math.floor(this.gameTime / 60);
|
|
3189
|
+
const seconds = Math.floor(this.gameTime - minutes * 60);
|
|
3190
|
+
return `${minutes < 10 ? 0 : ''}${minutes}:${seconds < 10 ? 0 : ''}${seconds}`;
|
|
3191
|
+
}
|
|
3192
|
+
static toFront(data) { }
|
|
3193
|
+
static toBack(data) { }
|
|
3194
|
+
};
|
|
3195
|
+
__decorate([
|
|
3196
|
+
ToFrontHook
|
|
3197
|
+
], HandballStatistic, "toFront", null);
|
|
3198
|
+
__decorate([
|
|
3199
|
+
ToBackHook
|
|
3200
|
+
], HandballStatistic, "toBack", null);
|
|
3201
|
+
HandballStatistic = __decorate([
|
|
3202
|
+
ModelInstance({
|
|
3203
|
+
mappingFields: {
|
|
3204
|
+
tournament_team_user: 'tournamentTeamUser',
|
|
3205
|
+
team: 'team',
|
|
3206
|
+
team_user: 'teamUser',
|
|
3207
|
+
user: 'user',
|
|
3208
|
+
tournament_team: 'tournamentTeam',
|
|
3209
|
+
month: 'month',
|
|
3210
|
+
win_lose: 'winLose',
|
|
3211
|
+
games_count: 'gamesCount',
|
|
3212
|
+
won_games_count: 'wonGamesCount',
|
|
3213
|
+
points: 'points',
|
|
3214
|
+
shot_misses: 'shotMisses',
|
|
3215
|
+
shots_on_goal: 'shotsOnGoal',
|
|
3216
|
+
shots_blocked: 'shotsBlocked',
|
|
3217
|
+
goals: 'goals',
|
|
3218
|
+
assists: 'assists',
|
|
3219
|
+
penalty_goals: 'penaltyGoals',
|
|
3220
|
+
penalty_misses: 'penaltyMisses',
|
|
3221
|
+
penalty_shots_on_goal: 'penaltyShotsOnGoal',
|
|
3222
|
+
saves: 'saves',
|
|
3223
|
+
penalty_saves: 'penaltySaves',
|
|
3224
|
+
goals_against: 'goalsAgainst',
|
|
3225
|
+
penalty_goals_against: 'penaltyGoalsAgainst',
|
|
3226
|
+
safety_rate: 'safetyRate',
|
|
3227
|
+
fouls: 'fouls',
|
|
3228
|
+
yellow_cards: 'yellowCards',
|
|
3229
|
+
red_cards: 'redCards',
|
|
3230
|
+
two_minute_fouls: 'twoMinuteFouls',
|
|
3231
|
+
turnovers: 'turnovers',
|
|
3232
|
+
steals: 'steals',
|
|
3233
|
+
block_shots: 'blockShots',
|
|
3234
|
+
game_time: 'gameTime',
|
|
3235
|
+
plus_minus: 'plusMinus',
|
|
3236
|
+
shots: 'shots',
|
|
3237
|
+
goals_percent: 'goalsPercent',
|
|
3238
|
+
penalty_shots: 'penaltyShots',
|
|
3239
|
+
penalty_goals_percent: 'penaltyGoalsPercent',
|
|
3240
|
+
shots_against: 'shotsAgainst',
|
|
3241
|
+
saves_percent: 'savesPercent',
|
|
3242
|
+
penalty_shots_against: 'penaltyShotsAgainst',
|
|
3243
|
+
penalty_saves_percent: 'penaltySavesPercent',
|
|
3244
|
+
total_goals: 'totalGoals',
|
|
3245
|
+
total_saves: 'totalSaves',
|
|
3246
|
+
total_goals_against: 'totalGoalsAgainst',
|
|
3247
|
+
newbie: 'newbie'
|
|
3248
|
+
},
|
|
3249
|
+
relation: {
|
|
3250
|
+
tournamentTeamUser: TournamentTeamUser,
|
|
3251
|
+
team: Team,
|
|
3252
|
+
teamUser: TeamUser,
|
|
3253
|
+
user: User,
|
|
3254
|
+
tournamentTeam: TournamentTeam,
|
|
3255
|
+
month: DateField
|
|
3256
|
+
}
|
|
3257
|
+
})
|
|
3258
|
+
], HandballStatistic);
|
|
3259
|
+
|
|
3260
|
+
let HandballGameTeamStatistic = class HandballGameTeamStatistic extends BaseModel {
|
|
3261
|
+
static toFront(data) { }
|
|
3262
|
+
static toBack(data) { }
|
|
3263
|
+
};
|
|
3264
|
+
__decorate([
|
|
3265
|
+
ToFrontHook
|
|
3266
|
+
], HandballGameTeamStatistic, "toFront", null);
|
|
3267
|
+
__decorate([
|
|
3268
|
+
ToBackHook
|
|
3269
|
+
], HandballGameTeamStatistic, "toBack", null);
|
|
3270
|
+
HandballGameTeamStatistic = __decorate([
|
|
3271
|
+
ModelInstance({
|
|
3272
|
+
mappingFields: {
|
|
3273
|
+
team: 'team',
|
|
3274
|
+
competitor_team: 'competitorTeam'
|
|
3275
|
+
},
|
|
3276
|
+
relation: {
|
|
3277
|
+
team: HandballStatistic,
|
|
3278
|
+
competitorTeam: HandballStatistic
|
|
3279
|
+
}
|
|
3280
|
+
})
|
|
3281
|
+
], HandballGameTeamStatistic);
|
|
3282
|
+
|
|
3283
|
+
let HandballGameApi = class HandballGameApi extends GameBaseApi {
|
|
3284
|
+
constructor(httpClient, configService) {
|
|
3285
|
+
super(httpClient, configService);
|
|
3286
|
+
this.httpClient = httpClient;
|
|
3287
|
+
this.configService = configService;
|
|
3288
|
+
}
|
|
3289
|
+
getById(gameId) {
|
|
3290
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3291
|
+
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/tournament_handball_game/${gameId}/`).pipe(map(result => Game.toFront(result))).toPromise();
|
|
3292
|
+
});
|
|
3293
|
+
}
|
|
3294
|
+
getTeamStatistic(gameId) {
|
|
3295
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3296
|
+
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/tournament_handball_game/${gameId}/team_statistic/`).pipe(map(result => HandballGameTeamStatistic.toFront(result))).toPromise();
|
|
3297
|
+
});
|
|
3298
|
+
}
|
|
3299
|
+
getUserStatistic(gameId) {
|
|
3300
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3301
|
+
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/tournament_handball_game/${gameId}/user_statistic/`).pipe(map(result => HandballGameStatistic.toFront(result))).toPromise();
|
|
3302
|
+
});
|
|
3303
|
+
}
|
|
3304
|
+
getLogs(gameId) {
|
|
3305
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3306
|
+
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/tournament_handball_game/${gameId}/logs/`).pipe(map(result => HandballGameLog.toFront(result))).toPromise();
|
|
3307
|
+
});
|
|
3308
|
+
}
|
|
3309
|
+
downloadProtocol(gameId, format) {
|
|
3310
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3311
|
+
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/tournament_handball_game/${gameId}/game_protocol/`, {
|
|
3312
|
+
params: new HttpParams().set('file_type', format),
|
|
3313
|
+
responseType: 'blob'
|
|
3314
|
+
}).toPromise();
|
|
3315
|
+
});
|
|
3316
|
+
}
|
|
3317
|
+
downloadApplication(gameId, format, type) {
|
|
3318
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3319
|
+
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/tournament_handball_game/${gameId}/game_application_file/`, {
|
|
3320
|
+
params: new HttpParams().set('file_type', format).set('application_type', type),
|
|
3321
|
+
responseType: 'blob'
|
|
3322
|
+
}).toPromise();
|
|
3323
|
+
});
|
|
3324
|
+
}
|
|
3325
|
+
};
|
|
3326
|
+
HandballGameApi.ctorParameters = () => [
|
|
3327
|
+
{ type: HttpClient },
|
|
3328
|
+
{ type: ConfigService }
|
|
3329
|
+
];
|
|
3330
|
+
HandballGameApi.ɵprov = ɵɵdefineInjectable({ factory: function HandballGameApi_Factory() { return new HandballGameApi(ɵɵinject(HttpClient), ɵɵinject(ConfigService)); }, token: HandballGameApi, providedIn: "root" });
|
|
3331
|
+
HandballGameApi = __decorate([
|
|
3332
|
+
Injectable({ providedIn: 'root' })
|
|
3333
|
+
], HandballGameApi);
|
|
3334
|
+
|
|
2919
3335
|
let TournamentNews = class TournamentNews extends BaseModel {
|
|
2920
3336
|
static toFront(data) { }
|
|
2921
3337
|
static toBack(data) { }
|
|
@@ -3546,6 +3962,25 @@ let TournamentApi = class TournamentApi {
|
|
|
3546
3962
|
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/football_statistic/`, { params }).pipe(map(result => FootballStatistic.toFront(result))).toPromise();
|
|
3547
3963
|
});
|
|
3548
3964
|
}
|
|
3965
|
+
getHandballStatistic(filters) {
|
|
3966
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
3967
|
+
let params = new HttpParams();
|
|
3968
|
+
if (filters) {
|
|
3969
|
+
for (const key of Object.keys(filters)) {
|
|
3970
|
+
if (filters[key]) {
|
|
3971
|
+
params = params.set(key, filters[key]);
|
|
3972
|
+
}
|
|
3973
|
+
}
|
|
3974
|
+
if (filters.per_game !== undefined) {
|
|
3975
|
+
params = params.set('per_game', filters.per_game ? '1' : '0');
|
|
3976
|
+
}
|
|
3977
|
+
if (filters.tournament_ids) {
|
|
3978
|
+
params = params.set('tournament_ids', filters.tournament_ids.join(','));
|
|
3979
|
+
}
|
|
3980
|
+
}
|
|
3981
|
+
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/handball_statistic/`, { params }).pipe(map(result => HandballStatistic.toFront(result))).toPromise();
|
|
3982
|
+
});
|
|
3983
|
+
}
|
|
3549
3984
|
getTournamentTeamUsers(tournamentTeamId) {
|
|
3550
3985
|
return __awaiter(this, void 0, void 0, function* () {
|
|
3551
3986
|
return this.httpClient.get(`${this.configService.get('apiUrl')}/api/v1/tournament_team/${tournamentTeamId}/users/`).pipe(map(result => TournamentTeamUser.toFront(result))).toPromise();
|
|
@@ -6015,6 +6450,29 @@ const FootballGameLogTypeLocalization = {
|
|
|
6015
6450
|
[FootballGameLogTypes.timeout]: 'Таймаут'
|
|
6016
6451
|
};
|
|
6017
6452
|
|
|
6453
|
+
const HandballGameLogTypeLocalization = {
|
|
6454
|
+
[HandballGameLogTypes.enter_game]: 'Выход на поле',
|
|
6455
|
+
[HandballGameLogTypes.exit_game]: 'Ушел с поля',
|
|
6456
|
+
[HandballGameLogTypes.shot_miss]: 'Бросок мимо',
|
|
6457
|
+
[HandballGameLogTypes.shot_on_goal]: 'Бросок в створ',
|
|
6458
|
+
[HandballGameLogTypes.shot_blocked]: 'Заблокированный бросок',
|
|
6459
|
+
[HandballGameLogTypes.goal]: 'Гол',
|
|
6460
|
+
[HandballGameLogTypes.assist]: 'Передача',
|
|
6461
|
+
[HandballGameLogTypes.penalty_miss]: 'Пенальти промах',
|
|
6462
|
+
[HandballGameLogTypes.penalty_shot_on_goal]: 'Пенальти в створ',
|
|
6463
|
+
[HandballGameLogTypes.penalty_goal]: 'Гол с пенальти',
|
|
6464
|
+
[HandballGameLogTypes.save]: 'Сэйв',
|
|
6465
|
+
[HandballGameLogTypes.penalty_save]: 'Сэйв пенальти',
|
|
6466
|
+
[HandballGameLogTypes.foul]: 'Фол',
|
|
6467
|
+
[HandballGameLogTypes.yellow_card]: 'Желлтая карточка',
|
|
6468
|
+
[HandballGameLogTypes.red_card]: 'Красная карточка',
|
|
6469
|
+
[HandballGameLogTypes.two_minute_foul]: '2х минутный штраф',
|
|
6470
|
+
[HandballGameLogTypes.turnover]: 'Потеря',
|
|
6471
|
+
[HandballGameLogTypes.steal]: 'Перехват',
|
|
6472
|
+
[HandballGameLogTypes.block_shot]: 'Блок броска',
|
|
6473
|
+
[HandballGameLogTypes.timeout]: 'Таймаут'
|
|
6474
|
+
};
|
|
6475
|
+
|
|
6018
6476
|
const OvertimeTypeLocalization = {
|
|
6019
6477
|
[OvertimeTypes.to_score_diff]: 'До разницы в N мячей',
|
|
6020
6478
|
[OvertimeTypes.to_score_total]: 'До N очков',
|
|
@@ -6099,6 +6557,13 @@ const FootballWorkFootLocalization = {
|
|
|
6099
6557
|
[FootballWorkFoot.right]: 'Правая',
|
|
6100
6558
|
[FootballWorkFoot.both]: 'Обе'
|
|
6101
6559
|
};
|
|
6560
|
+
const GameHandballPositionLocalization = {
|
|
6561
|
+
[GameHandballPosition.goalkeeper]: 'Вратарь',
|
|
6562
|
+
[GameHandballPosition.winger]: 'Крайний',
|
|
6563
|
+
[GameHandballPosition.pivot]: 'Линейный',
|
|
6564
|
+
[GameHandballPosition.centre_back]: 'Центральный',
|
|
6565
|
+
[GameHandballPosition.fullback]: 'Полусредний',
|
|
6566
|
+
};
|
|
6102
6567
|
|
|
6103
6568
|
const VolleyballGameLogTypeLocalization = {
|
|
6104
6569
|
[VolleyballGameLogType.enter_game]: 'Выход на площадку',
|
|
@@ -6514,5 +6979,5 @@ HttpCookieInterceptor = __decorate([
|
|
|
6514
6979
|
* Generated bundle index. Do not edit.
|
|
6515
6980
|
*/
|
|
6516
6981
|
|
|
6517
|
-
export { BannerLocation, BaseModel, BaseService, BaseStatistic, BasketballGameApi, BasketballGameConfig, BasketballGameLog, BasketballGameLogTypeLocalization, BasketballGameLogTypes, BasketballGameStatistic, BasketballGameTeamStatistic, BasketballProfile, BasketballStatistic, BasketballStatisticTypes, CONFIG_DATA, CentrifugoService, City, ConfigService, DateField, DateTimeField, FAULT_LOG_TYPES, Feedback, FeedbackApi, File, FileApi, FileEngine, FootballGameApi, FootballGameConfig, FootballGameLog, FootballGameLogTypeLocalization, FootballGameLogTypes, FootballGameStatistic, FootballGameTeamStatistic, FootballProfile, FootballStatistic, FootballWorkFoot, FootballWorkFootLocalization, Game, GameBasketballPosition, GameBasketballPositionLocalization, GameBasketballPositionShortLocalization, GameFootballPosition, GameFootballPositionLocalization, GameHockeyPosition, GameHockeyPositionLocalization, GameInvite, GameInviteStatus, GameResultTypes, GameStatuses, GameTimeTypes, GameTimelineStageItem, GameTimelineStages, GameUser, GameVolleyballPosition, GameVolleyballPositionLocalization, GameVolleyballPositionShortLocalization, GameVolleyballPositionShortRuLocalization, HockeyAdvantageTypes, HockeyGameApi, HockeyGameConfig, HockeyGameLog, HockeyGameLogTypeLocalization, HockeyGameLogTypes, HockeyGameStatistic, HockeyGameTeamStatistic, HockeyPenaltyTypes, HockeyProfile, HockeyStatistic, HockeyWorkHand, HttpCookieInterceptor, League, LeagueApi, LeagueBanner, LeagueCourt, LeagueNews, LeagueNewsApi, LeagueNewsType, LeaguePartner, LeaguePlaylist, LocalStorageEngine, MediaApi, MediaItem, ModelInstance, Notification, NotificationAllowTypes, NotificationApi, NotificationBaseApi, NotificationServiceEnum, NotificationSettings, NotificationType, OrgNotificationApi, Organization, OvertimeTypeLocalization, OvertimeTypes, Playoff, PlayoffSettings, PlayoffTypes, Poll, PollAnswer, PollStatuses, PollVariant, PublicTeamApi, PublicUserApi, ReferenceApi, SCORE_LOG_TYPES, Sport, SportTypes, StorageEngine, StorageEngineField, Store, Team, TeamAccess, TeamApi, TeamEvent, TeamEventApi, TeamEventInvite, TeamEventInviteStatuses, TeamEventTypeLocalization, TeamEventTypes, TeamInvite, TeamInviteExternal, TeamPermission, TeamPermissionTypes, TeamUser, TeamUserRole, TeamUserRoleLocalization, ToBackHook, ToFrontHook, Tournament, TournamentApi, TournamentDisqualification, TournamentEvent, TournamentEventTypes, TournamentGender, TournamentGroup, TournamentInvite, TournamentJoinApi, TournamentJoinData, TournamentJoinTeam, TournamentNews, TournamentSeason, TournamentSeasonApi, TournamentSeasonStatuses, TournamentSettings, TournamentStage, TournamentStageApi, TournamentStageStatuses, TournamentStageTeam, TournamentStatuses, TournamentTeam, TournamentTeamUser, TournamentTeamUserInvite, TournamentTeamWinner, TournamentTypes, UntilDestroy, User, UserAccess, UserApi, UserGender, UserPermission, UserPermissionTypes, UserProfile, VolleyballGameApi, VolleyballGameConfig, VolleyballGameLog, VolleyballGameLogType, VolleyballGameLogTypeLocalization, VolleyballGameStatistic, VolleyballGameTeamStatistic, VolleyballGameTypes, VolleyballProfile, VolleyballStatistic, VolleyballStatisticTypes, VolleyballWorkHand, VolleyballWorkHandLocalization, WorkHand, WorkHandLocalization, addItemInArray, changeFavicons, componentDestroyed, deleteItemFromArray, enumField, fileSizeValidator, generateArray, getArrayChunks, getCookie, getEnumOptions, getIconsData, handleError, isTouchDevice, listField, markFormGroupTouched, minLengthArrayValidator, patchItemInArray, updateItemInArray, updateItemsInArray, validateDate, validateEmail, validatePhone, validateUrl, penaltyTypeField as ɵa, GameBaseApi as ɵb };
|
|
6982
|
+
export { BannerLocation, BaseModel, BaseService, BaseStatistic, BasketballGameApi, BasketballGameConfig, BasketballGameLog, BasketballGameLogTypeLocalization, BasketballGameLogTypes, BasketballGameStatistic, BasketballGameTeamStatistic, BasketballProfile, BasketballStatistic, BasketballStatisticTypes, CONFIG_DATA, CentrifugoService, City, ConfigService, DateField, DateTimeField, FAULT_LOG_TYPES, Feedback, FeedbackApi, File, FileApi, FileEngine, FootballGameApi, FootballGameConfig, FootballGameLog, FootballGameLogTypeLocalization, FootballGameLogTypes, FootballGameStatistic, FootballGameTeamStatistic, FootballProfile, FootballStatistic, FootballWorkFoot, FootballWorkFootLocalization, Game, GameBasketballPosition, GameBasketballPositionLocalization, GameBasketballPositionShortLocalization, GameFootballPosition, GameFootballPositionLocalization, GameHandballPosition, GameHandballPositionLocalization, GameHockeyPosition, GameHockeyPositionLocalization, GameInvite, GameInviteStatus, GameResultTypes, GameStatuses, GameTimeTypes, GameTimelineStageItem, GameTimelineStages, GameUser, GameVolleyballPosition, GameVolleyballPositionLocalization, GameVolleyballPositionShortLocalization, GameVolleyballPositionShortRuLocalization, HandballGameApi, HandballGameConfig, HandballGameLog, HandballGameLogTypeLocalization, HandballGameLogTypes, HandballGameStatistic, HandballGameTeamStatistic, HandballProfile, HandballStatistic, HockeyAdvantageTypes, HockeyGameApi, HockeyGameConfig, HockeyGameLog, HockeyGameLogTypeLocalization, HockeyGameLogTypes, HockeyGameStatistic, HockeyGameTeamStatistic, HockeyPenaltyTypes, HockeyProfile, HockeyStatistic, HockeyWorkHand, HttpCookieInterceptor, League, LeagueApi, LeagueBanner, LeagueCourt, LeagueNews, LeagueNewsApi, LeagueNewsType, LeaguePartner, LeaguePlaylist, LocalStorageEngine, MediaApi, MediaItem, ModelInstance, Notification, NotificationAllowTypes, NotificationApi, NotificationBaseApi, NotificationServiceEnum, NotificationSettings, NotificationType, OrgNotificationApi, Organization, OvertimeTypeLocalization, OvertimeTypes, Playoff, PlayoffSettings, PlayoffTypes, Poll, PollAnswer, PollStatuses, PollVariant, PublicTeamApi, PublicUserApi, ReferenceApi, SCORE_LOG_TYPES, Sport, SportTypes, StorageEngine, StorageEngineField, Store, Team, TeamAccess, TeamApi, TeamEvent, TeamEventApi, TeamEventInvite, TeamEventInviteStatuses, TeamEventTypeLocalization, TeamEventTypes, TeamInvite, TeamInviteExternal, TeamPermission, TeamPermissionTypes, TeamUser, TeamUserRole, TeamUserRoleLocalization, ToBackHook, ToFrontHook, Tournament, TournamentApi, TournamentDisqualification, TournamentEvent, TournamentEventTypes, TournamentGender, TournamentGroup, TournamentInvite, TournamentJoinApi, TournamentJoinData, TournamentJoinTeam, TournamentNews, TournamentSeason, TournamentSeasonApi, TournamentSeasonStatuses, TournamentSettings, TournamentStage, TournamentStageApi, TournamentStageStatuses, TournamentStageTeam, TournamentStatuses, TournamentTeam, TournamentTeamUser, TournamentTeamUserInvite, TournamentTeamWinner, TournamentTypes, UntilDestroy, User, UserAccess, UserApi, UserGender, UserPermission, UserPermissionTypes, UserProfile, VolleyballGameApi, VolleyballGameConfig, VolleyballGameLog, VolleyballGameLogType, VolleyballGameLogTypeLocalization, VolleyballGameStatistic, VolleyballGameTeamStatistic, VolleyballGameTypes, VolleyballProfile, VolleyballStatistic, VolleyballStatisticTypes, VolleyballWorkHand, VolleyballWorkHandLocalization, WorkHand, WorkHandLocalization, addItemInArray, changeFavicons, componentDestroyed, deleteItemFromArray, enumField, fileSizeValidator, generateArray, getArrayChunks, getCookie, getEnumOptions, getIconsData, handleError, isTouchDevice, listField, markFormGroupTouched, minLengthArrayValidator, patchItemInArray, updateItemInArray, updateItemsInArray, validateDate, validateEmail, validatePhone, validateUrl, penaltyTypeField as ɵa, GameBaseApi as ɵb };
|
|
6518
6983
|
//# sourceMappingURL=mtgame-core.js.map
|