valtech-components 4.0.585 → 4.0.586

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.585';
6
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9saWIvdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7O0dBR0c7QUFDSCxNQUFNLENBQUMsTUFBTSxPQUFPLEdBQUcsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDdXJyZW50IHZlcnNpb24gb2YgdmFsdGVjaC1jb21wb25lbnRzLlxuICogVGhpcyBpcyBhdXRvbWF0aWNhbGx5IHVwZGF0ZWQgZHVyaW5nIHRoZSBwdWJsaXNoIHByb2Nlc3MuXG4gKi9cbmV4cG9ydCBjb25zdCBWRVJTSU9OID0gJzQuMC41ODUnO1xuIl19
5
+ export const VERSION = '4.0.586';
6
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9saWIvdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7O0dBR0c7QUFDSCxNQUFNLENBQUMsTUFBTSxPQUFPLEdBQUcsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDdXJyZW50IHZlcnNpb24gb2YgdmFsdGVjaC1jb21wb25lbnRzLlxuICogVGhpcyBpcyBhdXRvbWF0aWNhbGx5IHVwZGF0ZWQgZHVyaW5nIHRoZSBwdWJsaXNoIHByb2Nlc3MuXG4gKi9cbmV4cG9ydCBjb25zdCBWRVJTSU9OID0gJzQuMC41ODYnO1xuIl19
@@ -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.585';
62
+ const VERSION = '4.0.586';
63
63
 
64
64
  // Control de estado de refresco (singleton a nivel de módulo)
65
65
  let isRefreshing = false;
@@ -62373,6 +62373,8 @@ const MINI_GAMES_I18N = {
62373
62373
  chessimalsAdventureHome: 'Modo Aventura',
62374
62374
  chessimalsAdventureHomeBody: 'Cuatro actos, dieciséis rivales. Gana estrellas.',
62375
62375
  chessimalsAdventureBoss: 'Jefe',
62376
+ chessimalsAdventureRestDone: 'Descansaste. Ganaste 1 estrella.',
62377
+ chessimalsAdventureMysteryReveal: 'Rival desconocido. A ver que pasa.',
62376
62378
  chessimalsAdventureAct1Title: 'La Sabana',
62377
62379
  chessimalsAdventureAct1Desc: 'Rivales lentos, tablero pequeño. El punto de partida.',
62378
62380
  chessimalsAdventureAct2Title: 'La Jungla',
@@ -63220,6 +63222,8 @@ const MINI_GAMES_I18N = {
63220
63222
  chessimalsAdventureHome: 'Adventure Mode',
63221
63223
  chessimalsAdventureHomeBody: 'Four acts, sixteen rivals. Earn stars.',
63222
63224
  chessimalsAdventureBoss: 'Boss',
63225
+ chessimalsAdventureRestDone: 'You rested. You earned 1 star.',
63226
+ chessimalsAdventureMysteryReveal: "Unknown rival. Let's see what happens.",
63223
63227
  chessimalsAdventureAct1Title: 'The Savanna',
63224
63228
  chessimalsAdventureAct1Desc: 'Slow rivals, small board. The starting point.',
63225
63229
  chessimalsAdventureAct2Title: 'The Jungle',
@@ -63627,6 +63631,7 @@ class ChessimalsAdventureComponent {
63627
63631
  this.i18n = inject(I18nService);
63628
63632
  this.router = inject(Router);
63629
63633
  this.progressService = inject(ChessimalsAdventureProgressService);
63634
+ this.toast = inject(ToastService);
63630
63635
  this.progress = toSignal(this.progressService.watchProgress(), {
63631
63636
  initialValue: undefined,
63632
63637
  });
@@ -63682,8 +63687,14 @@ class ChessimalsAdventureComponent {
63682
63687
  onNodeTap(nodeView) {
63683
63688
  if (nodeView.status === 'locked')
63684
63689
  return;
63685
- if (nodeView.node.type === 'rest' || nodeView.node.type === 'mystery')
63690
+ if (nodeView.node.type === 'rest') {
63691
+ this.onRestTap(nodeView);
63692
+ return;
63693
+ }
63694
+ if (nodeView.node.type === 'mystery') {
63695
+ this.onMysteryTap(nodeView);
63686
63696
  return;
63697
+ }
63687
63698
  void this.router.navigate([ADVENTURE_ROUTE_BASE], {
63688
63699
  queryParams: {
63689
63700
  adventureNode: nodeView.node.id,
@@ -63693,6 +63704,29 @@ class ChessimalsAdventureComponent {
63693
63704
  },
63694
63705
  });
63695
63706
  }
63707
+ onRestTap(nodeView) {
63708
+ if (nodeView.status === 'completed')
63709
+ return;
63710
+ void this.progressService.recordNodeCompleted(nodeView.node.id, 1).then(() => {
63711
+ this.toast.show({ message: this.t('chessimalsAdventureRestDone'), color: 'dark', duration: 2500 });
63712
+ });
63713
+ }
63714
+ onMysteryTap(nodeView) {
63715
+ const act = CHESSIMALS_ADVENTURE_ACTS.find(a => a.id === nodeView.node.actId);
63716
+ const battleNodes = act?.nodes.filter(n => n.type === 'battle' && n.profileId) ?? [];
63717
+ if (!battleNodes.length)
63718
+ return;
63719
+ const pick = battleNodes[Math.floor(Math.random() * battleNodes.length)];
63720
+ this.toast.show({ message: this.t('chessimalsAdventureMysteryReveal'), color: 'dark', duration: 2000 });
63721
+ void this.router.navigate([ADVENTURE_ROUTE_BASE], {
63722
+ queryParams: {
63723
+ adventureNode: nodeView.node.id,
63724
+ profileId: pick.profileId,
63725
+ difficulty: pick.difficulty,
63726
+ boardSize: pick.boardSize ?? 6,
63727
+ },
63728
+ });
63729
+ }
63696
63730
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChessimalsAdventureComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
63697
63731
  static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.14", type: ChessimalsAdventureComponent, isStandalone: true, selector: "val-chessimals-adventure", ngImport: i0, template: `
63698
63732
  <div class="adventure-hub">