@mtgame/core 0.2.97 → 0.2.99
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/league-team-api.d.ts +6 -3
- package/bundles/mtgame-core.umd.js +18 -6
- package/bundles/mtgame-core.umd.js.map +1 -1
- package/esm2015/api/league-team-api.js +13 -6
- package/esm2015/models/hockey-game-config.js +10 -3
- package/fesm2015/mtgame-core.js +18 -6
- package/fesm2015/mtgame-core.js.map +1 -1
- package/models/hockey-game-config.d.ts +1 -0
- package/mtgame-core.metadata.json +1 -1
- package/package.json +1 -1
package/api/league-team-api.d.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { HttpClient } from '@angular/common/http';
|
|
2
2
|
import { Team } from '../models/team';
|
|
3
|
+
import { ConfigService } from '../services/config.service';
|
|
3
4
|
interface LeagueTeamFilters {
|
|
4
|
-
tournament_id
|
|
5
|
-
tournament_season_id
|
|
5
|
+
tournament_id?: number;
|
|
6
|
+
tournament_season_id?: number;
|
|
7
|
+
query?: string;
|
|
6
8
|
}
|
|
7
9
|
export declare class LeagueTeamApi {
|
|
8
10
|
private httpClient;
|
|
9
|
-
|
|
11
|
+
private configService;
|
|
12
|
+
constructor(httpClient: HttpClient, configService: ConfigService);
|
|
10
13
|
getLeagueTeams(filters?: LeagueTeamFilters): Promise<Team[]>;
|
|
11
14
|
getLeagueTeam(teamId: number): Promise<Team>;
|
|
12
15
|
}
|
|
@@ -2107,7 +2107,12 @@
|
|
|
2107
2107
|
});
|
|
2108
2108
|
Object.defineProperty(HockeyGameConfig.prototype, "playoffBullitsPeriod", {
|
|
2109
2109
|
get: function () {
|
|
2110
|
-
|
|
2110
|
+
if (this.playoffSeriesType === exports.OvertimeTypes.to_first_goal_and_bullitts) {
|
|
2111
|
+
return this.periodsCount + 4;
|
|
2112
|
+
}
|
|
2113
|
+
else {
|
|
2114
|
+
return this.periodsCount + 3;
|
|
2115
|
+
}
|
|
2111
2116
|
},
|
|
2112
2117
|
enumerable: false,
|
|
2113
2118
|
configurable: true
|
|
@@ -2138,10 +2143,12 @@
|
|
|
2138
2143
|
misconduct_penalty_time: 'misconductPenaltyTime',
|
|
2139
2144
|
game_misconduct_penalty_time: 'gameMisconductPenaltyTime',
|
|
2140
2145
|
match_penalty_time: 'matchPenaltyTime',
|
|
2146
|
+
playoff_series_type: 'playoffSeriesType',
|
|
2141
2147
|
},
|
|
2142
2148
|
relation: {
|
|
2143
2149
|
overtimeType: enumField(exports.OvertimeTypes),
|
|
2144
2150
|
gameTimeType: enumField(exports.GameTimeTypes),
|
|
2151
|
+
playoffSeriesType: enumField(exports.OvertimeTypes),
|
|
2145
2152
|
}
|
|
2146
2153
|
})
|
|
2147
2154
|
], exports.HockeyGameConfig);
|
|
@@ -8799,8 +8806,9 @@
|
|
|
8799
8806
|
]; };
|
|
8800
8807
|
|
|
8801
8808
|
var LeagueTeamApi = /** @class */ (function () {
|
|
8802
|
-
function LeagueTeamApi(httpClient) {
|
|
8809
|
+
function LeagueTeamApi(httpClient, configService) {
|
|
8803
8810
|
this.httpClient = httpClient;
|
|
8811
|
+
this.configService = configService;
|
|
8804
8812
|
}
|
|
8805
8813
|
LeagueTeamApi.prototype.getLeagueTeams = function (filters) {
|
|
8806
8814
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -8814,26 +8822,30 @@
|
|
|
8814
8822
|
if (filters.tournament_season_id) {
|
|
8815
8823
|
params = params.set('tournament_season_id', filters.tournament_season_id);
|
|
8816
8824
|
}
|
|
8825
|
+
if (filters.query) {
|
|
8826
|
+
params = params.set('query', filters.query);
|
|
8827
|
+
}
|
|
8817
8828
|
}
|
|
8818
|
-
return [2 /*return*/, this.httpClient.get('/api/v1/league_team/
|
|
8829
|
+
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league_team/", { params: params }).pipe(operators.map(function (response) { return response.map(function (item) { return exports.Team.toFront(item); }); })).toPromise()];
|
|
8819
8830
|
});
|
|
8820
8831
|
});
|
|
8821
8832
|
};
|
|
8822
8833
|
LeagueTeamApi.prototype.getLeagueTeam = function (teamId) {
|
|
8823
8834
|
return __awaiter(this, void 0, void 0, function () {
|
|
8824
8835
|
return __generator(this, function (_a) {
|
|
8825
|
-
return [2 /*return*/, this.httpClient.get("/api/v1/league_team/" + teamId + "/").pipe(operators.map(function (response) { return exports.Team.toFront(response); })).toPromise()];
|
|
8836
|
+
return [2 /*return*/, this.httpClient.get(this.configService.get('apiUrl') + "/api/v1/league_team/" + teamId + "/").pipe(operators.map(function (response) { return exports.Team.toFront(response); })).toPromise()];
|
|
8826
8837
|
});
|
|
8827
8838
|
});
|
|
8828
8839
|
};
|
|
8829
8840
|
return LeagueTeamApi;
|
|
8830
8841
|
}());
|
|
8831
|
-
LeagueTeamApi.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function LeagueTeamApi_Factory() { return new LeagueTeamApi(i0__namespace.ɵɵinject(i1__namespace.HttpClient)); }, token: LeagueTeamApi, providedIn: "root" });
|
|
8842
|
+
LeagueTeamApi.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function LeagueTeamApi_Factory() { return new LeagueTeamApi(i0__namespace.ɵɵinject(i1__namespace.HttpClient), i0__namespace.ɵɵinject(ConfigService)); }, token: LeagueTeamApi, providedIn: "root" });
|
|
8832
8843
|
LeagueTeamApi.decorators = [
|
|
8833
8844
|
{ type: i0.Injectable, args: [{ providedIn: 'root' },] }
|
|
8834
8845
|
];
|
|
8835
8846
|
LeagueTeamApi.ctorParameters = function () { return [
|
|
8836
|
-
{ type: i1.HttpClient }
|
|
8847
|
+
{ type: i1.HttpClient },
|
|
8848
|
+
{ type: ConfigService }
|
|
8837
8849
|
]; };
|
|
8838
8850
|
|
|
8839
8851
|
var MediaApi = /** @class */ (function () {
|