valtech-components 4.0.494 → 4.0.495
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-game.component.mjs +24 -9
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +24 -9
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/organisms/mini-games/chessimals-game.component.d.ts +2 -1
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
package/esm2022/lib/version.mjs
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* Current version of valtech-components.
|
|
3
3
|
* This is automatically updated during the publish process.
|
|
4
4
|
*/
|
|
5
|
-
export const VERSION = '4.0.
|
|
6
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
5
|
+
export const VERSION = '4.0.495';
|
|
6
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9saWIvdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7O0dBR0c7QUFDSCxNQUFNLENBQUMsTUFBTSxPQUFPLEdBQUcsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDdXJyZW50IHZlcnNpb24gb2YgdmFsdGVjaC1jb21wb25lbnRzLlxuICogVGhpcyBpcyBhdXRvbWF0aWNhbGx5IHVwZGF0ZWQgZHVyaW5nIHRoZSBwdWJsaXNoIHByb2Nlc3MuXG4gKi9cbmV4cG9ydCBjb25zdCBWRVJTSU9OID0gJzQuMC40OTUnO1xuIl19
|
|
@@ -59,7 +59,7 @@ import fixWebmDuration from 'fix-webm-duration';
|
|
|
59
59
|
* Current version of valtech-components.
|
|
60
60
|
* This is automatically updated during the publish process.
|
|
61
61
|
*/
|
|
62
|
-
const VERSION = '4.0.
|
|
62
|
+
const VERSION = '4.0.495';
|
|
63
63
|
|
|
64
64
|
// Control de estado de refresco (singleton a nivel de módulo)
|
|
65
65
|
let isRefreshing = false;
|
|
@@ -66079,6 +66079,10 @@ class ChessimalsGameComponent {
|
|
|
66079
66079
|
return false;
|
|
66080
66080
|
if (run.currentRound < 1 || run.currentRound > this.challengeLadder.length)
|
|
66081
66081
|
return false;
|
|
66082
|
+
if (run.wins >= this.challengeLadder.length)
|
|
66083
|
+
return false;
|
|
66084
|
+
if (run.currentRound !== run.wins + 1)
|
|
66085
|
+
return false;
|
|
66082
66086
|
return !!this.challengeLadder[run.currentRound - 1];
|
|
66083
66087
|
}
|
|
66084
66088
|
startGame() {
|
|
@@ -67504,7 +67508,7 @@ class ChessimalsGameComponent {
|
|
|
67504
67508
|
error: () => this.challengeHistory.set([]),
|
|
67505
67509
|
});
|
|
67506
67510
|
this.challengeActiveRunSubscription = this.challengeProgress.watchActiveRun().subscribe({
|
|
67507
|
-
next: (run) => this.activeStoredChallengeRun.set(run),
|
|
67511
|
+
next: (run) => this.activeStoredChallengeRun.set(this.isResumableChallengeRun(run) ? run : undefined),
|
|
67508
67512
|
error: () => this.activeStoredChallengeRun.set(undefined),
|
|
67509
67513
|
});
|
|
67510
67514
|
}
|
|
@@ -67549,6 +67553,10 @@ class ChessimalsGameComponent {
|
|
|
67549
67553
|
return this.challengeLadder[0];
|
|
67550
67554
|
}
|
|
67551
67555
|
challengeMenuBot() {
|
|
67556
|
+
const activeRun = this.resumableChallengeRun();
|
|
67557
|
+
if (activeRun) {
|
|
67558
|
+
return this.challengeLadder[Math.max(0, activeRun.currentRound - 1)] ?? this.challengeLadder[0];
|
|
67559
|
+
}
|
|
67552
67560
|
const bestRound = this.challengeStats().bestRoundReached;
|
|
67553
67561
|
const nextRoundIndex = Math.min(Math.max(bestRound, 0), this.challengeLadder.length - 1);
|
|
67554
67562
|
return this.challengeLadder[nextRoundIndex];
|
|
@@ -67556,6 +67564,12 @@ class ChessimalsGameComponent {
|
|
|
67556
67564
|
challengeMenuRoundLabel() {
|
|
67557
67565
|
return `${this.challengeMenuBot().round}/${this.challengeLadder.length}`;
|
|
67558
67566
|
}
|
|
67567
|
+
challengeMenuClearedRound() {
|
|
67568
|
+
const activeRun = this.resumableChallengeRun();
|
|
67569
|
+
if (activeRun)
|
|
67570
|
+
return Math.max(0, activeRun.currentRound - 1);
|
|
67571
|
+
return this.challengeStats().bestRoundReached;
|
|
67572
|
+
}
|
|
67559
67573
|
challengeBotName(bot) {
|
|
67560
67574
|
const profile = this.challengeBotProfile(bot);
|
|
67561
67575
|
return profile ? this.botProfileLabel(profile) : this.t('chessimalsBotName');
|
|
@@ -67568,10 +67582,11 @@ class ChessimalsGameComponent {
|
|
|
67568
67582
|
return profile ? this.botProfileTendency(profile) : this.t(bot.introKey);
|
|
67569
67583
|
}
|
|
67570
67584
|
challengeBotStatusLabel(bot) {
|
|
67571
|
-
const
|
|
67572
|
-
|
|
67585
|
+
const clearedRound = this.challengeMenuClearedRound();
|
|
67586
|
+
const currentRound = this.challengeMenuBot().round;
|
|
67587
|
+
if (clearedRound >= bot.round)
|
|
67573
67588
|
return this.t('chessimalsChallengeRivalCleared');
|
|
67574
|
-
if (
|
|
67589
|
+
if (currentRound === bot.round)
|
|
67575
67590
|
return this.t('chessimalsChallengeRivalCurrent');
|
|
67576
67591
|
if (bot.round === this.challengeLadder.length)
|
|
67577
67592
|
return this.t('chessimalsChallengeRivalFinal');
|
|
@@ -68441,7 +68456,7 @@ class ChessimalsGameComponent {
|
|
|
68441
68456
|
<div class="chessimals-challenge-path" [attr.aria-label]="t('chessimalsChallengePath')">
|
|
68442
68457
|
@for (bot of challengeLadder; track bot.id) {
|
|
68443
68458
|
<span
|
|
68444
|
-
[class.is-cleared]="
|
|
68459
|
+
[class.is-cleared]="challengeMenuClearedRound() >= bot.round"
|
|
68445
68460
|
[class.is-current]="challengeMenuBot().round === bot.round"
|
|
68446
68461
|
[class.is-final]="bot.round === challengeLadder.length"
|
|
68447
68462
|
[attr.title]="challengeBotName(bot)"
|
|
@@ -68508,7 +68523,7 @@ class ChessimalsGameComponent {
|
|
|
68508
68523
|
<div class="chessimals-challenge-roster" [attr.aria-label]="t('chessimalsChallengeRivals')">
|
|
68509
68524
|
@for (bot of challengeLadder; track bot.id) {
|
|
68510
68525
|
<article
|
|
68511
|
-
[class.is-cleared]="
|
|
68526
|
+
[class.is-cleared]="challengeMenuClearedRound() >= bot.round"
|
|
68512
68527
|
[class.is-current]="challengeMenuBot().round === bot.round"
|
|
68513
68528
|
[class.is-final]="bot.round === challengeLadder.length"
|
|
68514
68529
|
>
|
|
@@ -69831,7 +69846,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
69831
69846
|
<div class="chessimals-challenge-path" [attr.aria-label]="t('chessimalsChallengePath')">
|
|
69832
69847
|
@for (bot of challengeLadder; track bot.id) {
|
|
69833
69848
|
<span
|
|
69834
|
-
[class.is-cleared]="
|
|
69849
|
+
[class.is-cleared]="challengeMenuClearedRound() >= bot.round"
|
|
69835
69850
|
[class.is-current]="challengeMenuBot().round === bot.round"
|
|
69836
69851
|
[class.is-final]="bot.round === challengeLadder.length"
|
|
69837
69852
|
[attr.title]="challengeBotName(bot)"
|
|
@@ -69898,7 +69913,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
69898
69913
|
<div class="chessimals-challenge-roster" [attr.aria-label]="t('chessimalsChallengeRivals')">
|
|
69899
69914
|
@for (bot of challengeLadder; track bot.id) {
|
|
69900
69915
|
<article
|
|
69901
|
-
[class.is-cleared]="
|
|
69916
|
+
[class.is-cleared]="challengeMenuClearedRound() >= bot.round"
|
|
69902
69917
|
[class.is-current]="challengeMenuBot().round === bot.round"
|
|
69903
69918
|
[class.is-final]="bot.round === challengeLadder.length"
|
|
69904
69919
|
>
|