valtech-components 4.0.632 → 4.0.633

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.
Files changed (26) hide show
  1. package/esm2022/lib/components/organisms/mini-games/chessimals-adventure-data.mjs +3 -3
  2. package/esm2022/lib/components/organisms/mini-games/chessimals-engine.mjs +10 -10
  3. package/esm2022/lib/components/organisms/mini-games/chessimals-game.component.mjs +11 -11
  4. package/esm2022/lib/components/organisms/mini-games/mini-games.i18n.mjs +5 -5
  5. package/esm2022/lib/components/organisms/mini-games/types.mjs +1 -1
  6. package/esm2022/lib/services/auth/auth.service.mjs +9 -2
  7. package/esm2022/lib/version.mjs +2 -2
  8. package/fesm2022/valtech-components.mjs +34 -27
  9. package/fesm2022/valtech-components.mjs.map +1 -1
  10. package/lib/components/atoms/rights-footer/rights-footer.component.d.ts +1 -1
  11. package/lib/components/molecules/cta-card/cta-card.component.d.ts +1 -1
  12. package/lib/components/molecules/metric-card/metric-card.component.d.ts +1 -1
  13. package/lib/components/molecules/phone-display/phone-display.component.d.ts +1 -1
  14. package/lib/components/organisms/account-view/account-view.component.d.ts +1 -1
  15. package/lib/components/organisms/article/article.component.d.ts +1 -1
  16. package/lib/components/organisms/auth-cta/auth-cta.component.d.ts +1 -1
  17. package/lib/components/organisms/member-import-modal/member-import-modal.component.d.ts +1 -1
  18. package/lib/components/organisms/mini-games/chessimals-game.component.d.ts +1 -1
  19. package/lib/components/organisms/mini-games/memory-game.component.d.ts +1 -1
  20. package/lib/components/organisms/mini-games/types.d.ts +2 -2
  21. package/lib/components/organisms/notification-preferences-view/notification-preferences-view.component.d.ts +1 -1
  22. package/lib/components/organisms/organization-view/organization-view.component.d.ts +1 -1
  23. package/lib/services/auth/auth.service.d.ts +5 -0
  24. package/lib/version.d.ts +1 -1
  25. package/package.json +1 -1
  26. /package/src/lib/assets/games/chessimals/challenge-avatars/{nightmare-magnus.png → nightmare-mandrill.png} +0 -0
@@ -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.632';
6
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9saWIvdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7O0dBR0c7QUFDSCxNQUFNLENBQUMsTUFBTSxPQUFPLEdBQUcsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDdXJyZW50IHZlcnNpb24gb2YgdmFsdGVjaC1jb21wb25lbnRzLlxuICogVGhpcyBpcyBhdXRvbWF0aWNhbGx5IHVwZGF0ZWQgZHVyaW5nIHRoZSBwdWJsaXNoIHByb2Nlc3MuXG4gKi9cbmV4cG9ydCBjb25zdCBWRVJTSU9OID0gJzQuMC42MzInO1xuIl19
5
+ export const VERSION = '4.0.633';
6
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidmVyc2lvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9saWIvdmVyc2lvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQTs7O0dBR0c7QUFDSCxNQUFNLENBQUMsTUFBTSxPQUFPLEdBQUcsU0FBUyxDQUFDIiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDdXJyZW50IHZlcnNpb24gb2YgdmFsdGVjaC1jb21wb25lbnRzLlxuICogVGhpcyBpcyBhdXRvbWF0aWNhbGx5IHVwZGF0ZWQgZHVyaW5nIHRoZSBwdWJsaXNoIHByb2Nlc3MuXG4gKi9cbmV4cG9ydCBjb25zdCBWRVJTSU9OID0gJzQuMC42MzMnO1xuIl19
@@ -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.632';
62
+ const VERSION = '4.0.633';
63
63
 
64
64
  // Control de estado de refresco (singleton a nivel de módulo)
65
65
  let isRefreshing = false;
@@ -8779,7 +8779,14 @@ class AuthService {
8779
8779
  const bridgeUrl = new URL(this.config.ssoBridgeUrl);
8780
8780
  bridgeUrl.searchParams.set('redirect_uri', redirectUri);
8781
8781
  console.log('[ValtechAuth] bootstrap — no local session, redirecting to SSO bridge');
8782
- window.location.href = bridgeUrl.toString();
8782
+ this.navigateToSSOBridgeUrl(bridgeUrl.toString());
8783
+ }
8784
+ /**
8785
+ * Navegación real (aislada en su propio método para poder espiarla en
8786
+ * tests unitarios sin que Karma navegue de verdad el runner).
8787
+ */
8788
+ navigateToSSOBridgeUrl(url) {
8789
+ window.location.href = url;
8783
8790
  }
8784
8791
  ngOnDestroy() {
8785
8792
  this.stopRefreshTimer();
@@ -62500,12 +62507,12 @@ const MINI_GAMES_I18N = {
62500
62507
  chessimalsAdventureA4N2Desc: 'La Matriarca controla el tablero completo. No bajes la guardia.',
62501
62508
  chessimalsAdventureA4N3Title: 'La anaconda',
62502
62509
  chessimalsAdventureA4N3Desc: 'Convierte cada ventaja pequeña en victoria. No hay descuido.',
62503
- chessimalsAdventureA4N4Title: 'Magnus el Eterno',
62510
+ chessimalsAdventureA4N4Title: 'El Gran Mandril',
62504
62511
  chessimalsAdventureA4N4Desc: 'El jefe final. Modo pesadilla activo. Solo los mejores llegan aqui.',
62505
62512
  chessimalsAdventureAct1Lore: 'Un viaje de mil batallas comienza con un solo movimiento. La Sabana te espera.',
62506
62513
  chessimalsAdventureAct2Lore: 'La Jungla no tiene reglas claras. Aqui aprenderas a pensar antes de ver.',
62507
62514
  chessimalsAdventureAct3Lore: 'El frio del Artico purifica la estrategia. Lo que no te quiebra, te hace mas preciso.',
62508
- chessimalsAdventureAct4Lore: 'Magnus el Eterno lleva decadas sin perder. Hoy alguien llego dispuesto a cambiar eso.',
62515
+ chessimalsAdventureAct4Lore: 'El Gran Mandril lleva decadas sin perder. Hoy alguien llego dispuesto a cambiar eso.',
62509
62516
  chessimalsAdventureA1N1Quote: 'Nuevo por aqui? Veamos cuanto duran tus piezas.',
62510
62517
  chessimalsAdventureA1N2Quote: 'La Liebre siempre llega primero. Ya lo veras.',
62511
62518
  chessimalsAdventureA1N5Quote: 'Pasan muchos por aqui. Yo sigo siendo el guardian.',
@@ -63380,12 +63387,12 @@ const MINI_GAMES_I18N = {
63380
63387
  chessimalsAdventureA4N2Desc: 'The Matriarch controls the whole board. Stay sharp.',
63381
63388
  chessimalsAdventureA4N3Title: 'The anaconda',
63382
63389
  chessimalsAdventureA4N3Desc: 'Turns every small edge into a win. No slip-ups allowed.',
63383
- chessimalsAdventureA4N4Title: 'Magnus the Eternal',
63390
+ chessimalsAdventureA4N4Title: 'The Grand Mandrill',
63384
63391
  chessimalsAdventureA4N4Desc: 'The final boss. Nightmare mode active. Only the best reach here.',
63385
63392
  chessimalsAdventureAct1Lore: 'A journey of a thousand battles begins with a single move. The Savanna awaits.',
63386
63393
  chessimalsAdventureAct2Lore: 'The Jungle has no clear rules. Here you will learn to think before you see.',
63387
63394
  chessimalsAdventureAct3Lore: 'The Arctic cold purifies strategy. What does not break you makes you more precise.',
63388
- chessimalsAdventureAct4Lore: 'Magnus the Eternal has not lost in decades. Today, someone arrived ready to change that.',
63395
+ chessimalsAdventureAct4Lore: 'The Grand Mandrill has not lost in decades. Today, someone arrived ready to change that.',
63389
63396
  chessimalsAdventureA1N1Quote: 'New here? Let us see how long your pieces last.',
63390
63397
  chessimalsAdventureA1N2Quote: 'The Hare always arrives first. You will see.',
63391
63398
  chessimalsAdventureA1N5Quote: 'Many pass through here. I am still the guardian.',
@@ -63664,7 +63671,7 @@ const CHESSIMALS_ADVENTURE_ACTS = [
63664
63671
  id: 'a4-n4',
63665
63672
  actId: 'act4',
63666
63673
  type: 'boss',
63667
- profileId: 'magnus',
63674
+ profileId: 'mandrill',
63668
63675
  difficulty: 'master',
63669
63676
  boardSize: 8,
63670
63677
  position: { x: 50, y: 12 },
@@ -63672,7 +63679,7 @@ const CHESSIMALS_ADVENTURE_ACTS = [
63672
63679
  titleKey: 'chessimalsAdventureA4N4Title',
63673
63680
  descriptionKey: 'chessimalsAdventureA4N4Desc',
63674
63681
  quoteKey: 'chessimalsAdventureA4N4Quote',
63675
- specialRule: 'nightmare-magnus',
63682
+ specialRule: 'nightmare-mandrill',
63676
63683
  },
63677
63684
  ],
63678
63685
  },
@@ -64320,10 +64327,10 @@ const CHESSIMALS_BOT_PROFILES = [
64320
64327
  descriptionKey: 'chessimalsBotAnacondaBody',
64321
64328
  },
64322
64329
  {
64323
- id: 'magnus',
64330
+ id: 'mandrill',
64324
64331
  difficulty: 'hard',
64325
64332
  avatar: '♟',
64326
- avatarSrc: `${CHESSIMALS_CHALLENGE_AVATAR_BASE}/nightmare-magnus.png`,
64333
+ avatarSrc: `${CHESSIMALS_CHALLENGE_AVATAR_BASE}/nightmare-mandrill.png`,
64327
64334
  labelKey: 'chessimalsBotMagnus',
64328
64335
  descriptionKey: 'chessimalsBotMagnusBody',
64329
64336
  },
@@ -64553,7 +64560,7 @@ const BOT_STYLES = {
64553
64560
  trap: 1.02,
64554
64561
  endgame: 1.86,
64555
64562
  },
64556
- magnus: {
64563
+ mandrill: {
64557
64564
  advancement: 1.04,
64558
64565
  capture: 1.22,
64559
64566
  safety: 1.9,
@@ -64572,7 +64579,7 @@ const DEFAULT_BOT_PROFILE_BY_DIFFICULTY = {
64572
64579
  easy: 'explorer',
64573
64580
  normal: 'hunter',
64574
64581
  hard: 'strategist',
64575
- master: 'magnus',
64582
+ master: 'mandrill',
64576
64583
  };
64577
64584
  function createChessimalsGame(boardSize = 6, options = {}) {
64578
64585
  const pieces = [];
@@ -64661,7 +64668,7 @@ function chooseChessimalsBotMove(state, difficulty = 'normal', profileId = DEFAU
64661
64668
  score: scoreBotMove(state, move, difficulty, style, challengePressure, false, options.nightmareMode),
64662
64669
  }))
64663
64670
  .sort((a, b) => b.score - a.score);
64664
- const lookaheadLimit = options.nightmareMode === 'magnus' || difficulty === 'master'
64671
+ const lookaheadLimit = options.nightmareMode === 'mandrill' || difficulty === 'master'
64665
64672
  ? 48
64666
64673
  : difficulty === 'hard'
64667
64674
  ? 32
@@ -64982,8 +64989,8 @@ function scoreBotMove(state, move, difficulty, style, challengePressure = 0, inc
64982
64989
  (targetPiece ? 120 : difficulty === 'hard' ? -60 - 170 * challengePressure : -30) *
64983
64990
  style.power;
64984
64991
  }
64985
- if (nightmareMode === 'magnus' && move.kind === 'power') {
64986
- score += scoreMagnusPowerPatience(state, move, targetPiece, style);
64992
+ if (nightmareMode === 'mandrill' && move.kind === 'power') {
64993
+ score += scoreMandrillPowerPatience(state, move, targetPiece, style);
64987
64994
  }
64988
64995
  if (move.animal === 'lion')
64989
64996
  score += nightmareMode === 'pride' ? 260 * style.power : -20 * style.power;
@@ -65127,7 +65134,7 @@ function tuneBotStyle(style, difficulty, challengePressure, nightmareMode = 'non
65127
65134
  randomness: Math.min(style.randomness, 16),
65128
65135
  };
65129
65136
  }
65130
- if (nightmareMode === 'magnus') {
65137
+ if (nightmareMode === 'mandrill') {
65131
65138
  style = {
65132
65139
  ...style,
65133
65140
  advancement: style.advancement * 1.04,
@@ -65195,7 +65202,7 @@ function chooseNightmareCapture(scored, nightmareMode) {
65195
65202
  return undefined;
65196
65203
  return best.score - capture.score <= 1800 ? capture.move : undefined;
65197
65204
  }
65198
- function scoreMagnusPowerPatience(state, move, targetPiece, style) {
65205
+ function scoreMandrillPowerPatience(state, move, targetPiece, style) {
65199
65206
  const color = state.currentTurn;
65200
65207
  const fromAdvancement = color === 'white' ? state.boardSize - 1 - move.from.row : move.from.row;
65201
65208
  const toAdvancement = color === 'white' ? state.boardSize - 1 - move.to.row : move.to.row;
@@ -67768,7 +67775,7 @@ const CHESSIMALS_CHALLENGE_LADDER = [
67768
67775
  {
67769
67776
  id: 'champion',
67770
67777
  round: 8,
67771
- profileId: 'magnus',
67778
+ profileId: 'mandrill',
67772
67779
  difficulty: 'master',
67773
67780
  boardSize: 8,
67774
67781
  introKey: 'chessimalsChallengeBotChampionIntro',
@@ -67811,7 +67818,7 @@ class ChessimalsGameComponent {
67811
67818
  this.boardSizes = [6, 8];
67812
67819
  this.localModes = ['one-device', 'bot'];
67813
67820
  this.botDifficulties = ['easy', 'normal', 'hard', 'master', 'nightmare'];
67814
- this.nightmareRivals = ['hunt', 'pride', 'magnus'];
67821
+ this.nightmareRivals = ['hunt', 'pride', 'mandrill'];
67815
67822
  this.botProfiles = CHESSIMALS_BOT_PROFILES;
67816
67823
  this.challengeLadder = CHESSIMALS_CHALLENGE_LADDER;
67817
67824
  this.animals = ANIMALS;
@@ -68037,8 +68044,8 @@ class ChessimalsGameComponent {
68037
68044
  if (difficulty === 'nightmare')
68038
68045
  return [];
68039
68046
  if (difficulty === 'master')
68040
- return this.botProfiles.filter(profile => profile.id === 'magnus');
68041
- return this.botProfiles.filter(profile => profile.difficulty === difficulty && profile.id !== 'magnus');
68047
+ return this.botProfiles.filter(profile => profile.id === 'mandrill');
68048
+ return this.botProfiles.filter(profile => profile.difficulty === difficulty && profile.id !== 'mandrill');
68042
68049
  });
68043
68050
  this.selectedBotProfile = computed(() => this.botProfiles.find(profile => profile.id === this.selectedBotProfileId()));
68044
68051
  this.gameBotProfile = computed(() => {
@@ -68966,7 +68973,7 @@ class ChessimalsGameComponent {
68966
68973
  return this.applyNightmarePreset(game, this.activeNightmareMode());
68967
68974
  }
68968
68975
  applyNightmarePreset(game, mode) {
68969
- if (mode === 'magnus') {
68976
+ if (mode === 'mandrill') {
68970
68977
  return {
68971
68978
  ...game,
68972
68979
  players: {
@@ -70606,7 +70613,7 @@ class ChessimalsGameComponent {
70606
70613
  else if (mode === 'pride')
70607
70614
  this.selectedBotProfileId.set('predator');
70608
70615
  else
70609
- this.selectedBotProfileId.set('magnus');
70616
+ this.selectedBotProfileId.set('mandrill');
70610
70617
  }
70611
70618
  activeNightmareMode() {
70612
70619
  if (this.selectedBotDifficulty() !== 'nightmare')
@@ -70622,7 +70629,7 @@ class ChessimalsGameComponent {
70622
70629
  return this.t('chessimalsNightmareHunt');
70623
70630
  if (mode === 'pride')
70624
70631
  return this.t('chessimalsNightmarePride');
70625
- if (mode === 'magnus')
70632
+ if (mode === 'mandrill')
70626
70633
  return this.t('chessimalsNightmareMagnus');
70627
70634
  return this.t('chessimalsNightmareNone');
70628
70635
  }
@@ -70631,7 +70638,7 @@ class ChessimalsGameComponent {
70631
70638
  return this.t('chessimalsNightmareHuntBody');
70632
70639
  if (mode === 'pride')
70633
70640
  return this.t('chessimalsNightmarePrideBody');
70634
- if (mode === 'magnus')
70641
+ if (mode === 'mandrill')
70635
70642
  return this.t('chessimalsNightmareMagnusBody');
70636
70643
  return this.t('chessimalsNightmareNoneBody');
70637
70644
  }
@@ -70640,8 +70647,8 @@ class ChessimalsGameComponent {
70640
70647
  return 'assets/games/chessimals/challenge-avatars/nightmare-hunt.png';
70641
70648
  if (mode === 'pride')
70642
70649
  return 'assets/games/chessimals/challenge-avatars/nightmare-pride.png';
70643
- if (mode === 'magnus')
70644
- return 'assets/games/chessimals/challenge-avatars/nightmare-magnus.png';
70650
+ if (mode === 'mandrill')
70651
+ return 'assets/games/chessimals/challenge-avatars/nightmare-mandrill.png';
70645
70652
  return '';
70646
70653
  }
70647
70654
  nightmareModeGlyph(mode) {