valtech-components 4.0.495 → 4.0.496

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.
@@ -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.495';
6
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9saWIvdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7O0dBR0c7QUFDSCxNQUFNLENBQUMsTUFBTSxPQUFPLEdBQUcsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDdXJyZW50IHZlcnNpb24gb2YgdmFsdGVjaC1jb21wb25lbnRzLlxuICogVGhpcyBpcyBhdXRvbWF0aWNhbGx5IHVwZGF0ZWQgZHVyaW5nIHRoZSBwdWJsaXNoIHByb2Nlc3MuXG4gKi9cbmV4cG9ydCBjb25zdCBWRVJTSU9OID0gJzQuMC40OTUnO1xuIl19
5
+ export const VERSION = '4.0.496';
6
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9saWIvdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7O0dBR0c7QUFDSCxNQUFNLENBQUMsTUFBTSxPQUFPLEdBQUcsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDdXJyZW50IHZlcnNpb24gb2YgdmFsdGVjaC1jb21wb25lbnRzLlxuICogVGhpcyBpcyBhdXRvbWF0aWNhbGx5IHVwZGF0ZWQgZHVyaW5nIHRoZSBwdWJsaXNoIHByb2Nlc3MuXG4gKi9cbmV4cG9ydCBjb25zdCBWRVJTSU9OID0gJzQuMC40OTYnO1xuIl19
@@ -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.495';
62
+ const VERSION = '4.0.496';
63
63
 
64
64
  // Control de estado de refresco (singleton a nivel de módulo)
65
65
  let isRefreshing = false;
@@ -66150,6 +66150,7 @@ class ChessimalsGameComponent {
66150
66150
  finishedAt: completed || failed ? finishedAt : undefined,
66151
66151
  };
66152
66152
  this.challengeRun.set(nextRun);
66153
+ this.activeStoredChallengeRun.set(nextRun.status === 'active' ? nextRun : undefined);
66153
66154
  this.challengeLastWon.set(won);
66154
66155
  this.challengeLastBot.set(bot);
66155
66156
  this.challengeLastRoundStats.set(roundStats);
@@ -67553,7 +67554,7 @@ class ChessimalsGameComponent {
67553
67554
  return this.challengeLadder[0];
67554
67555
  }
67555
67556
  challengeMenuBot() {
67556
- const activeRun = this.resumableChallengeRun();
67557
+ const activeRun = this.challengeMenuRun();
67557
67558
  if (activeRun) {
67558
67559
  return this.challengeLadder[Math.max(0, activeRun.currentRound - 1)] ?? this.challengeLadder[0];
67559
67560
  }
@@ -67564,12 +67565,21 @@ class ChessimalsGameComponent {
67564
67565
  challengeMenuRoundLabel() {
67565
67566
  return `${this.challengeMenuBot().round}/${this.challengeLadder.length}`;
67566
67567
  }
67568
+ challengeMenuLivesLabel() {
67569
+ return String(this.challengeMenuRun()?.livesRemaining ?? 3);
67570
+ }
67567
67571
  challengeMenuClearedRound() {
67568
- const activeRun = this.resumableChallengeRun();
67572
+ const activeRun = this.challengeMenuRun();
67569
67573
  if (activeRun)
67570
67574
  return Math.max(0, activeRun.currentRound - 1);
67571
67575
  return this.challengeStats().bestRoundReached;
67572
67576
  }
67577
+ challengeMenuRun() {
67578
+ const currentRun = this.challengeRun();
67579
+ if (this.isResumableChallengeRun(currentRun))
67580
+ return currentRun;
67581
+ return this.resumableChallengeRun();
67582
+ }
67573
67583
  challengeBotName(bot) {
67574
67584
  const profile = this.challengeBotProfile(bot);
67575
67585
  return profile ? this.botProfileLabel(profile) : this.t('chessimalsBotName');
@@ -68223,7 +68233,7 @@ class ChessimalsGameComponent {
68223
68233
  <div class="chessimals-challenge-cta__meta">
68224
68234
  <span>
68225
68235
  <small>{{ t('chessimalsChallengeLives') }}</small>
68226
- <strong>3</strong>
68236
+ <strong>{{ challengeMenuLivesLabel() }}</strong>
68227
68237
  </span>
68228
68238
  <span>
68229
68239
  <small>{{ t('chessimalsChallengeRound') }}</small>
@@ -69613,7 +69623,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
69613
69623
  <div class="chessimals-challenge-cta__meta">
69614
69624
  <span>
69615
69625
  <small>{{ t('chessimalsChallengeLives') }}</small>
69616
- <strong>3</strong>
69626
+ <strong>{{ challengeMenuLivesLabel() }}</strong>
69617
69627
  </span>
69618
69628
  <span>
69619
69629
  <small>{{ t('chessimalsChallengeRound') }}</small>