valtech-components 4.0.461 → 4.0.463
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/esm2022/lib/components/organisms/mini-games/chessimals-challenge-progress.service.mjs +55 -1
- package/esm2022/lib/components/organisms/mini-games/chessimals-game.component.mjs +81 -3
- package/esm2022/lib/components/organisms/mini-games/mini-games.i18n.mjs +5 -1
- package/esm2022/lib/components/organisms/mini-games/types.mjs +1 -1
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +139 -3
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/organisms/mini-games/chessimals-challenge-progress.service.d.ts +5 -1
- package/lib/components/organisms/mini-games/chessimals-game.component.d.ts +6 -2
- package/lib/components/organisms/mini-games/types.d.ts +7 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import { ChessimalsChallengeRoundStats, ChessimalsChallengeRun, ChessimalsChallengeStats } from './types';
|
|
2
|
+
import { ChessimalsChallengeRoundStats, ChessimalsChallengeRun, ChessimalsChallengeStats, ChessimalsStatsMode } from './types';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class ChessimalsChallengeProgressService {
|
|
5
5
|
private readonly firebaseAuth;
|
|
@@ -18,9 +18,13 @@ export declare class ChessimalsChallengeProgressService {
|
|
|
18
18
|
completed: boolean;
|
|
19
19
|
roundStats: ChessimalsChallengeRoundStats;
|
|
20
20
|
}): Promise<void>;
|
|
21
|
+
recordModeResult(mode: Exclude<ChessimalsStatsMode, 'challenge'>, won: boolean): Promise<void>;
|
|
21
22
|
emptyStats(): ChessimalsChallengeStats;
|
|
22
23
|
private readStats;
|
|
23
24
|
private normalizeStats;
|
|
25
|
+
private addModeResult;
|
|
26
|
+
private emptyModeStats;
|
|
27
|
+
private normalizeModeStats;
|
|
24
28
|
private ensureUser;
|
|
25
29
|
private statsRef;
|
|
26
30
|
private runRef;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { FormControl } from '@angular/forms';
|
|
3
|
-
import { ChessimalsAnimalType, ChessimalsBotDifficulty, ChessimalsBotProfile, ChessimalsBotProfileId, ChessimalsBoardSize, ChessimalsChallengeBot, ChessimalsChallengeRoundStats, ChessimalsChallengeRun, ChessimalsChallengeStats, ChessimalsGameState, ChessimalsHistoryEntry, ChessimalsLocalMode, ChessimalsMove, ChessimalsPiece, ChessimalsPlayerColor, ChessimalsPosition } from './types';
|
|
3
|
+
import { ChessimalsAnimalType, ChessimalsBotDifficulty, ChessimalsBotProfile, ChessimalsBotProfileId, ChessimalsBoardSize, ChessimalsChallengeBot, ChessimalsChallengeRoundStats, ChessimalsChallengeRun, ChessimalsChallengeStats, ChessimalsGameState, ChessimalsHistoryEntry, ChessimalsLocalMode, ChessimalsMove, ChessimalsPiece, ChessimalsPlayerColor, ChessimalsPosition, ChessimalsStatsMode } from './types';
|
|
4
4
|
import { RangeInputMetadata, RangeValue } from '../../molecules/range-input/types';
|
|
5
5
|
import { ToggleInputMetadata } from '../../molecules/toggle-input/types';
|
|
6
6
|
import { UserAvatarMetadata } from '../../atoms/user-avatar/types';
|
|
@@ -87,6 +87,7 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
|
|
|
87
87
|
private openedOnlineGameId;
|
|
88
88
|
private lastOutcomeSoundKey;
|
|
89
89
|
private lastChallengeHandledKey;
|
|
90
|
+
private lastModeStatsHandledKey;
|
|
90
91
|
private boardAnchor?;
|
|
91
92
|
readonly boardSizes: ChessimalsBoardSize[];
|
|
92
93
|
readonly localModes: ChessimalsLocalMode[];
|
|
@@ -94,7 +95,7 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
|
|
|
94
95
|
readonly botProfiles: ChessimalsBotProfile[];
|
|
95
96
|
readonly challengeLadder: ChessimalsChallengeBot[];
|
|
96
97
|
readonly animals: ChessimalsAnimalView[];
|
|
97
|
-
readonly valtechComponentsVersion = "4.0.
|
|
98
|
+
readonly valtechComponentsVersion = "4.0.463";
|
|
98
99
|
readonly screen: import("@angular/core").WritableSignal<"home" | "game">;
|
|
99
100
|
readonly selectedBoardSize: import("@angular/core").WritableSignal<ChessimalsBoardSize>;
|
|
100
101
|
readonly selectedLocalMode: import("@angular/core").WritableSignal<ChessimalsLocalMode>;
|
|
@@ -373,11 +374,14 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
|
|
|
373
374
|
challengeOutcomeBody(): string;
|
|
374
375
|
challengeNextRivalLabel(): string;
|
|
375
376
|
challengeContinueLabel(): string;
|
|
377
|
+
challengeWinRateLabel(): string;
|
|
378
|
+
modeWinRateLabel(mode: ChessimalsStatsMode): string;
|
|
376
379
|
challengeAchievements(): ChessimalsAchievementView[];
|
|
377
380
|
challengeTensionMoment(): ChessimalsChallengeTensionView | undefined;
|
|
378
381
|
challengeHasNewRecord(): boolean;
|
|
379
382
|
totalChallengePowers(stats?: ChessimalsChallengeRoundStats): number;
|
|
380
383
|
private createChallengeRoundStats;
|
|
384
|
+
private modeStatsResult;
|
|
381
385
|
animalLabel(type: ChessimalsAnimalType): string;
|
|
382
386
|
animalGlyph(type: ChessimalsAnimalType): string;
|
|
383
387
|
canReviewPrevious(): boolean;
|
|
@@ -115,8 +115,15 @@ export interface ChessimalsChallengeStats {
|
|
|
115
115
|
powersUsed: Record<ChessimalsAnimalType, number>;
|
|
116
116
|
powerCaptures: number;
|
|
117
117
|
promotions: number;
|
|
118
|
+
modeStats: Record<ChessimalsStatsMode, ChessimalsModeStats>;
|
|
118
119
|
updatedAt?: string;
|
|
119
120
|
}
|
|
121
|
+
export type ChessimalsStatsMode = 'challenge' | 'bot' | 'online';
|
|
122
|
+
export interface ChessimalsModeStats {
|
|
123
|
+
played: number;
|
|
124
|
+
wins: number;
|
|
125
|
+
losses: number;
|
|
126
|
+
}
|
|
120
127
|
export interface ChessimalsPosition {
|
|
121
128
|
row: number;
|
|
122
129
|
col: number;
|
package/lib/version.d.ts
CHANGED