valtech-components 4.0.427 → 4.0.428
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/bubble-blitz-game.component.mjs +18 -9
- package/esm2022/lib/components/organisms/mini-games/chessimals-game.component.mjs +18 -9
- package/esm2022/lib/components/organisms/mini-games/christianity-game.component.mjs +28 -5
- package/esm2022/lib/components/organisms/mini-games/memory-game.component.mjs +18 -9
- package/esm2022/lib/components/organisms/mini-games/simon-game.component.mjs +18 -9
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +96 -37
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/organisms/mini-games/bubble-blitz-game.component.d.ts +2 -0
- package/lib/components/organisms/mini-games/chessimals-game.component.d.ts +3 -1
- package/lib/components/organisms/mini-games/christianity-game.component.d.ts +1 -0
- package/lib/components/organisms/mini-games/memory-game.component.d.ts +2 -0
- package/lib/components/organisms/mini-games/simon-game.component.d.ts +2 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -58,7 +58,7 @@ import fixWebmDuration from 'fix-webm-duration';
|
|
|
58
58
|
* Current version of valtech-components.
|
|
59
59
|
* This is automatically updated during the publish process.
|
|
60
60
|
*/
|
|
61
|
-
const VERSION = '4.0.
|
|
61
|
+
const VERSION = '4.0.428';
|
|
62
62
|
|
|
63
63
|
// Control de estado de refresco (singleton a nivel de módulo)
|
|
64
64
|
let isRefreshing = false;
|
|
@@ -64361,6 +64361,7 @@ class ChessimalsGameComponent {
|
|
|
64361
64361
|
});
|
|
64362
64362
|
this.botThinking = signal(false);
|
|
64363
64363
|
this.confirmAction = signal(undefined);
|
|
64364
|
+
this.confirmedAction = signal(undefined);
|
|
64364
64365
|
this.onlineJoinCode = signal('');
|
|
64365
64366
|
this.onlineLoading = signal(false);
|
|
64366
64367
|
this.onlineAction = signal(undefined);
|
|
@@ -65135,13 +65136,12 @@ class ChessimalsGameComponent {
|
|
|
65135
65136
|
closeConfirmModal() {
|
|
65136
65137
|
this.confirmAction.set(undefined);
|
|
65137
65138
|
}
|
|
65138
|
-
|
|
65139
|
-
if (token !== 'confirm') {
|
|
65140
|
-
this.closeConfirmModal();
|
|
65141
|
-
return;
|
|
65142
|
-
}
|
|
65143
|
-
const action = this.confirmAction();
|
|
65139
|
+
handleConfirmModalDismissed() {
|
|
65144
65140
|
this.confirmAction.set(undefined);
|
|
65141
|
+
const action = this.confirmedAction();
|
|
65142
|
+
this.confirmedAction.set(undefined);
|
|
65143
|
+
if (!action)
|
|
65144
|
+
return;
|
|
65145
65145
|
if (action === 'restart') {
|
|
65146
65146
|
this.restartGame();
|
|
65147
65147
|
return;
|
|
@@ -65158,6 +65158,15 @@ class ChessimalsGameComponent {
|
|
|
65158
65158
|
this.resignGame();
|
|
65159
65159
|
}
|
|
65160
65160
|
}
|
|
65161
|
+
confirmPendingAction(token) {
|
|
65162
|
+
if (token !== 'confirm') {
|
|
65163
|
+
this.closeConfirmModal();
|
|
65164
|
+
return;
|
|
65165
|
+
}
|
|
65166
|
+
const action = this.confirmAction();
|
|
65167
|
+
this.confirmedAction.set(action);
|
|
65168
|
+
this.confirmAction.set(undefined);
|
|
65169
|
+
}
|
|
65161
65170
|
resignGame() {
|
|
65162
65171
|
const game = this.game();
|
|
65163
65172
|
if (game.status === 'finished')
|
|
@@ -67005,7 +67014,7 @@ class ChessimalsGameComponent {
|
|
|
67005
67014
|
<ion-modal
|
|
67006
67015
|
[isOpen]="!!confirmAction()"
|
|
67007
67016
|
cssClass="val-modal-adaptive"
|
|
67008
|
-
(didDismiss)="
|
|
67017
|
+
(didDismiss)="handleConfirmModalDismissed()"
|
|
67009
67018
|
>
|
|
67010
67019
|
<ng-template>
|
|
67011
67020
|
<val-modal-layout
|
|
@@ -67846,7 +67855,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
67846
67855
|
<ion-modal
|
|
67847
67856
|
[isOpen]="!!confirmAction()"
|
|
67848
67857
|
cssClass="val-modal-adaptive"
|
|
67849
|
-
(didDismiss)="
|
|
67858
|
+
(didDismiss)="handleConfirmModalDismissed()"
|
|
67850
67859
|
>
|
|
67851
67860
|
<ng-template>
|
|
67852
67861
|
<val-modal-layout
|
|
@@ -67969,6 +67978,9 @@ class ChristianityGameComponent {
|
|
|
67969
67978
|
card: cards[index],
|
|
67970
67979
|
}));
|
|
67971
67980
|
}
|
|
67981
|
+
offeringCards(player) {
|
|
67982
|
+
return Array.from({ length: Math.max(0, player.maxOfferings) });
|
|
67983
|
+
}
|
|
67972
67984
|
canPlay(card) {
|
|
67973
67985
|
return this.isOwnTurn() && this.player().offeringPoints >= card.cost && this.player().battleZone.length < 5;
|
|
67974
67986
|
}
|
|
@@ -68113,6 +68125,11 @@ class ChristianityGameComponent {
|
|
|
68113
68125
|
<div class="christianity-offerings">
|
|
68114
68126
|
<span>{{ t('christianityOfferings') }}</span>
|
|
68115
68127
|
<strong>{{ opponent().offeringPoints }}/{{ opponent().maxOfferings }}</strong>
|
|
68128
|
+
<div class="christianity-offering-cards" aria-hidden="true">
|
|
68129
|
+
@for (_ of offeringCards(opponent()); track $index) {
|
|
68130
|
+
<i [class.is-used]="$index >= opponent().offeringPoints"></i>
|
|
68131
|
+
}
|
|
68132
|
+
</div>
|
|
68116
68133
|
</div>
|
|
68117
68134
|
<div class="christianity-hidden-hand">
|
|
68118
68135
|
<span>{{ t('christianityHand') }}</span>
|
|
@@ -68176,8 +68193,13 @@ class ChristianityGameComponent {
|
|
|
68176
68193
|
<div class="christianity-offerings">
|
|
68177
68194
|
<span>{{ t('christianityOfferings') }}</span>
|
|
68178
68195
|
<strong>{{ player().offeringPoints }}/{{ player().maxOfferings }}</strong>
|
|
68196
|
+
<div class="christianity-offering-cards" aria-hidden="true">
|
|
68197
|
+
@for (_ of offeringCards(player()); track $index) {
|
|
68198
|
+
<i [class.is-used]="$index >= player().offeringPoints"></i>
|
|
68199
|
+
}
|
|
68200
|
+
</div>
|
|
68179
68201
|
</div>
|
|
68180
|
-
<button type="button" class="christianity-leader
|
|
68202
|
+
<button type="button" class="christianity-leader christianity-leader--target" (click)="attackLeader()">
|
|
68181
68203
|
<span>{{ player().leaderName }}</span>
|
|
68182
68204
|
<strong>{{ player().leaderHp }}/{{ player().leaderMaxHp }}</strong>
|
|
68183
68205
|
</button>
|
|
@@ -68228,7 +68250,7 @@ class ChristianityGameComponent {
|
|
|
68228
68250
|
</section>
|
|
68229
68251
|
}
|
|
68230
68252
|
</main>
|
|
68231
|
-
`, isInline: true, styles: [":host{display:block;color:var(--val-text-color, #1f2933)}.christianity-shell{display:grid;gap:.875rem;padding
|
|
68253
|
+
`, isInline: true, styles: [":host{display:block;color:var(--val-text-color, #1f2933)}.christianity-shell{display:grid;gap:.875rem;padding:.75rem .25rem;border:1px solid rgba(36,48,68,.12);border-radius:.75rem;background:#f6f8fb}.christianity-header,.christianity-player__summary,.christianity-shared-zone,.christianity-actions{display:flex;align-items:center;justify-content:space-between;gap:.75rem}.christianity-header h1,.christianity-header p,.christianity-history h2,.christianity-actions p{margin:0}.christianity-header h1{font-size:1.35rem;line-height:1.1}.christianity-header p,.christianity-turn span,.christianity-offerings span,.christianity-hidden-hand span,.christianity-deck span,.christianity-place span,.christianity-pile span,.christianity-leader span{color:#1f2933a3;font-size:.75rem}.christianity-turn,.christianity-leader,.christianity-offerings,.christianity-hidden-hand,.christianity-pile,.christianity-deck,.christianity-place{display:grid;gap:.15rem;min-width:5.25rem;padding:.55rem .65rem;border:1px solid rgba(36,48,68,.12);border-radius:.5rem;background:#fff}.christianity-turn.is-own-turn{border-color:#12806c59;background:#ecfdf5}.christianity-table{display:grid;gap:.75rem;padding:.55rem .35rem;border-radius:.75rem;background:#dceafb}.christianity-player{display:grid;gap:.65rem}.christianity-battle-zone{display:grid;grid-template-columns:repeat(5,minmax(4.2rem,1fr));gap:.5rem;min-height:7rem;padding:.55rem .4rem;border-radius:.75rem;background:#ffffffc2}.christianity-shared-zone{padding:.55rem .4rem;border-radius:.75rem;background:#ffffffe6}.christianity-card,.christianity-end-turn,.christianity-actions button,.christianity-pile,.christianity-leader--target{border:1px solid rgba(36,48,68,.16);border-radius:.5rem;background:#fff;color:inherit;font:inherit}.christianity-card{display:grid;align-content:space-between;min-height:5.8rem;padding:.5rem;text-align:left;box-shadow:0 .5rem 1.25rem #24304414}.christianity-card span{font-weight:700}.christianity-card strong{justify-self:end;padding:.15rem .35rem;border-radius:999px;background:#edf2f7;font-size:.8rem}.christianity-card.is-selected{border-color:#2563eb;box-shadow:0 0 0 .2rem #2563eb29}.christianity-card.is-disabled,.christianity-card.is-exhausted{opacity:.55}.christianity-card.is-target{border-color:#dc2626}.christianity-offering-cards{display:grid;grid-auto-flow:column;grid-auto-columns:.7rem;gap:.16rem;align-items:end;min-height:1.05rem}.christianity-offering-cards i{display:block;width:.65rem;height:.95rem;border:1px solid rgba(16,42,67,.22);border-radius:.18rem;background:#f8fafc}.christianity-offering-cards i.is-used{background:#cbd5e1;transform:rotate(90deg);transform-origin:center}.christianity-slot{min-height:5.8rem;border:1px dashed rgba(36,48,68,.22);border-radius:.5rem;background:#ffffff73}.christianity-hand{display:grid;grid-auto-columns:minmax(6rem,8rem);grid-auto-flow:column;gap:.55rem;overflow-x:auto;padding-bottom:.25rem}.christianity-actions{align-items:flex-start;padding:.75rem;border-radius:.75rem;background:#fff}.christianity-actions div{display:flex;flex-wrap:wrap;gap:.5rem;justify-content:flex-end}.christianity-actions button,.christianity-end-turn{min-height:2.4rem;padding:0 .75rem;font-weight:700}.christianity-actions button:not(:disabled),.christianity-end-turn{background:#102a43;color:#fff}.christianity-history{padding:.75rem;border-radius:.75rem;background:#fff}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}button:focus-visible{outline:.1875rem solid rgba(37,99,235,.24);outline-offset:.125rem}@media (max-width: 720px){.christianity-shell{padding:.55rem 0;border-right:0;border-left:0;border-radius:0}.christianity-header,.christianity-player__summary,.christianity-shared-zone,.christianity-actions{align-items:stretch;flex-direction:column}.christianity-battle-zone{grid-template-columns:repeat(5,minmax(3.8rem,1fr));overflow-x:auto}}\n"] }); }
|
|
68232
68254
|
}
|
|
68233
68255
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: ChristianityGameComponent, decorators: [{
|
|
68234
68256
|
type: Component,
|
|
@@ -68255,6 +68277,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
68255
68277
|
<div class="christianity-offerings">
|
|
68256
68278
|
<span>{{ t('christianityOfferings') }}</span>
|
|
68257
68279
|
<strong>{{ opponent().offeringPoints }}/{{ opponent().maxOfferings }}</strong>
|
|
68280
|
+
<div class="christianity-offering-cards" aria-hidden="true">
|
|
68281
|
+
@for (_ of offeringCards(opponent()); track $index) {
|
|
68282
|
+
<i [class.is-used]="$index >= opponent().offeringPoints"></i>
|
|
68283
|
+
}
|
|
68284
|
+
</div>
|
|
68258
68285
|
</div>
|
|
68259
68286
|
<div class="christianity-hidden-hand">
|
|
68260
68287
|
<span>{{ t('christianityHand') }}</span>
|
|
@@ -68318,8 +68345,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
68318
68345
|
<div class="christianity-offerings">
|
|
68319
68346
|
<span>{{ t('christianityOfferings') }}</span>
|
|
68320
68347
|
<strong>{{ player().offeringPoints }}/{{ player().maxOfferings }}</strong>
|
|
68348
|
+
<div class="christianity-offering-cards" aria-hidden="true">
|
|
68349
|
+
@for (_ of offeringCards(player()); track $index) {
|
|
68350
|
+
<i [class.is-used]="$index >= player().offeringPoints"></i>
|
|
68351
|
+
}
|
|
68352
|
+
</div>
|
|
68321
68353
|
</div>
|
|
68322
|
-
<button type="button" class="christianity-leader
|
|
68354
|
+
<button type="button" class="christianity-leader christianity-leader--target" (click)="attackLeader()">
|
|
68323
68355
|
<span>{{ player().leaderName }}</span>
|
|
68324
68356
|
<strong>{{ player().leaderHp }}/{{ player().leaderMaxHp }}</strong>
|
|
68325
68357
|
</button>
|
|
@@ -68370,7 +68402,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
68370
68402
|
</section>
|
|
68371
68403
|
}
|
|
68372
68404
|
</main>
|
|
68373
|
-
`, styles: [":host{display:block;color:var(--val-text-color, #1f2933)}.christianity-shell{display:grid;gap:.875rem;padding
|
|
68405
|
+
`, styles: [":host{display:block;color:var(--val-text-color, #1f2933)}.christianity-shell{display:grid;gap:.875rem;padding:.75rem .25rem;border:1px solid rgba(36,48,68,.12);border-radius:.75rem;background:#f6f8fb}.christianity-header,.christianity-player__summary,.christianity-shared-zone,.christianity-actions{display:flex;align-items:center;justify-content:space-between;gap:.75rem}.christianity-header h1,.christianity-header p,.christianity-history h2,.christianity-actions p{margin:0}.christianity-header h1{font-size:1.35rem;line-height:1.1}.christianity-header p,.christianity-turn span,.christianity-offerings span,.christianity-hidden-hand span,.christianity-deck span,.christianity-place span,.christianity-pile span,.christianity-leader span{color:#1f2933a3;font-size:.75rem}.christianity-turn,.christianity-leader,.christianity-offerings,.christianity-hidden-hand,.christianity-pile,.christianity-deck,.christianity-place{display:grid;gap:.15rem;min-width:5.25rem;padding:.55rem .65rem;border:1px solid rgba(36,48,68,.12);border-radius:.5rem;background:#fff}.christianity-turn.is-own-turn{border-color:#12806c59;background:#ecfdf5}.christianity-table{display:grid;gap:.75rem;padding:.55rem .35rem;border-radius:.75rem;background:#dceafb}.christianity-player{display:grid;gap:.65rem}.christianity-battle-zone{display:grid;grid-template-columns:repeat(5,minmax(4.2rem,1fr));gap:.5rem;min-height:7rem;padding:.55rem .4rem;border-radius:.75rem;background:#ffffffc2}.christianity-shared-zone{padding:.55rem .4rem;border-radius:.75rem;background:#ffffffe6}.christianity-card,.christianity-end-turn,.christianity-actions button,.christianity-pile,.christianity-leader--target{border:1px solid rgba(36,48,68,.16);border-radius:.5rem;background:#fff;color:inherit;font:inherit}.christianity-card{display:grid;align-content:space-between;min-height:5.8rem;padding:.5rem;text-align:left;box-shadow:0 .5rem 1.25rem #24304414}.christianity-card span{font-weight:700}.christianity-card strong{justify-self:end;padding:.15rem .35rem;border-radius:999px;background:#edf2f7;font-size:.8rem}.christianity-card.is-selected{border-color:#2563eb;box-shadow:0 0 0 .2rem #2563eb29}.christianity-card.is-disabled,.christianity-card.is-exhausted{opacity:.55}.christianity-card.is-target{border-color:#dc2626}.christianity-offering-cards{display:grid;grid-auto-flow:column;grid-auto-columns:.7rem;gap:.16rem;align-items:end;min-height:1.05rem}.christianity-offering-cards i{display:block;width:.65rem;height:.95rem;border:1px solid rgba(16,42,67,.22);border-radius:.18rem;background:#f8fafc}.christianity-offering-cards i.is-used{background:#cbd5e1;transform:rotate(90deg);transform-origin:center}.christianity-slot{min-height:5.8rem;border:1px dashed rgba(36,48,68,.22);border-radius:.5rem;background:#ffffff73}.christianity-hand{display:grid;grid-auto-columns:minmax(6rem,8rem);grid-auto-flow:column;gap:.55rem;overflow-x:auto;padding-bottom:.25rem}.christianity-actions{align-items:flex-start;padding:.75rem;border-radius:.75rem;background:#fff}.christianity-actions div{display:flex;flex-wrap:wrap;gap:.5rem;justify-content:flex-end}.christianity-actions button,.christianity-end-turn{min-height:2.4rem;padding:0 .75rem;font-weight:700}.christianity-actions button:not(:disabled),.christianity-end-turn{background:#102a43;color:#fff}.christianity-history{padding:.75rem;border-radius:.75rem;background:#fff}button{cursor:pointer}button:disabled{cursor:not-allowed;opacity:.55}button:focus-visible{outline:.1875rem solid rgba(37,99,235,.24);outline-offset:.125rem}@media (max-width: 720px){.christianity-shell{padding:.55rem 0;border-right:0;border-left:0;border-radius:0}.christianity-header,.christianity-player__summary,.christianity-shared-zone,.christianity-actions{align-items:stretch;flex-direction:column}.christianity-battle-zone{grid-template-columns:repeat(5,minmax(3.8rem,1fr));overflow-x:auto}}\n"] }]
|
|
68374
68406
|
}], ctorParameters: () => [] });
|
|
68375
68407
|
|
|
68376
68408
|
addIcons({ refreshOutline, sparklesOutline, trophyOutline });
|
|
@@ -68429,6 +68461,7 @@ class BubbleBlitzGameComponent {
|
|
|
68429
68461
|
this.animating = signal(false);
|
|
68430
68462
|
this.leaderboard = signal(this.readLeaderboard());
|
|
68431
68463
|
this.confirmAction = signal(undefined);
|
|
68464
|
+
this.confirmedAction = signal(undefined);
|
|
68432
68465
|
this.config = computed(() => MODE_CONFIG[this.mode()]);
|
|
68433
68466
|
this.feverReady = computed(() => this.fever() >= this.config().feverTarget);
|
|
68434
68467
|
this.feverProgress = computed(() => Math.min(100, Math.round((this.fever() / this.config().feverTarget) * 100)));
|
|
@@ -68608,13 +68641,12 @@ class BubbleBlitzGameComponent {
|
|
|
68608
68641
|
closeConfirmModal() {
|
|
68609
68642
|
this.confirmAction.set(undefined);
|
|
68610
68643
|
}
|
|
68611
|
-
|
|
68612
|
-
if (token !== 'confirm') {
|
|
68613
|
-
this.closeConfirmModal();
|
|
68614
|
-
return;
|
|
68615
|
-
}
|
|
68616
|
-
const action = this.confirmAction();
|
|
68644
|
+
handleConfirmModalDismissed() {
|
|
68617
68645
|
this.confirmAction.set(undefined);
|
|
68646
|
+
const action = this.confirmedAction();
|
|
68647
|
+
this.confirmedAction.set(undefined);
|
|
68648
|
+
if (!action)
|
|
68649
|
+
return;
|
|
68618
68650
|
if (action === 'restart') {
|
|
68619
68651
|
this.start();
|
|
68620
68652
|
return;
|
|
@@ -68627,6 +68659,15 @@ class BubbleBlitzGameComponent {
|
|
|
68627
68659
|
this.resetToGamesMenu();
|
|
68628
68660
|
}
|
|
68629
68661
|
}
|
|
68662
|
+
confirmPendingAction(token) {
|
|
68663
|
+
if (token !== 'confirm') {
|
|
68664
|
+
this.closeConfirmModal();
|
|
68665
|
+
return;
|
|
68666
|
+
}
|
|
68667
|
+
const action = this.confirmAction();
|
|
68668
|
+
this.confirmedAction.set(action);
|
|
68669
|
+
this.confirmAction.set(undefined);
|
|
68670
|
+
}
|
|
68630
68671
|
startTimer() {
|
|
68631
68672
|
this.stopTimer();
|
|
68632
68673
|
this.timer = window.setInterval(() => {
|
|
@@ -68930,7 +68971,7 @@ class BubbleBlitzGameComponent {
|
|
|
68930
68971
|
<ion-modal
|
|
68931
68972
|
[isOpen]="!!confirmAction()"
|
|
68932
68973
|
cssClass="val-modal-adaptive"
|
|
68933
|
-
(didDismiss)="
|
|
68974
|
+
(didDismiss)="handleConfirmModalDismissed()"
|
|
68934
68975
|
>
|
|
68935
68976
|
<ng-template>
|
|
68936
68977
|
<val-modal-layout
|
|
@@ -69080,7 +69121,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
69080
69121
|
<ion-modal
|
|
69081
69122
|
[isOpen]="!!confirmAction()"
|
|
69082
69123
|
cssClass="val-modal-adaptive"
|
|
69083
|
-
(didDismiss)="
|
|
69124
|
+
(didDismiss)="handleConfirmModalDismissed()"
|
|
69084
69125
|
>
|
|
69085
69126
|
<ng-template>
|
|
69086
69127
|
<val-modal-layout
|
|
@@ -69144,6 +69185,7 @@ class MemoryGameComponent {
|
|
|
69144
69185
|
this.lockBoard = signal(false);
|
|
69145
69186
|
this.leaderboard = signal(this.readLeaderboard());
|
|
69146
69187
|
this.confirmAction = signal(undefined);
|
|
69188
|
+
this.confirmedAction = signal(undefined);
|
|
69147
69189
|
this.profileConfig = computed(() => PROFILE_CONFIG[this.profile()]);
|
|
69148
69190
|
this.pairCount = computed(() => this.profileConfig().pairs);
|
|
69149
69191
|
this.boardClass = computed(() => `memory-board ${this.profileConfig().boardClass}`);
|
|
@@ -69281,13 +69323,12 @@ class MemoryGameComponent {
|
|
|
69281
69323
|
closeConfirmModal() {
|
|
69282
69324
|
this.confirmAction.set(undefined);
|
|
69283
69325
|
}
|
|
69284
|
-
|
|
69285
|
-
if (token !== 'confirm') {
|
|
69286
|
-
this.closeConfirmModal();
|
|
69287
|
-
return;
|
|
69288
|
-
}
|
|
69289
|
-
const action = this.confirmAction();
|
|
69326
|
+
handleConfirmModalDismissed() {
|
|
69290
69327
|
this.confirmAction.set(undefined);
|
|
69328
|
+
const action = this.confirmedAction();
|
|
69329
|
+
this.confirmedAction.set(undefined);
|
|
69330
|
+
if (!action)
|
|
69331
|
+
return;
|
|
69291
69332
|
if (action === 'restart') {
|
|
69292
69333
|
this.start();
|
|
69293
69334
|
return;
|
|
@@ -69300,6 +69341,15 @@ class MemoryGameComponent {
|
|
|
69300
69341
|
this.resetToGamesMenu();
|
|
69301
69342
|
}
|
|
69302
69343
|
}
|
|
69344
|
+
confirmPendingAction(token) {
|
|
69345
|
+
if (token !== 'confirm') {
|
|
69346
|
+
this.closeConfirmModal();
|
|
69347
|
+
return;
|
|
69348
|
+
}
|
|
69349
|
+
const action = this.confirmAction();
|
|
69350
|
+
this.confirmedAction.set(action);
|
|
69351
|
+
this.confirmAction.set(undefined);
|
|
69352
|
+
}
|
|
69303
69353
|
flip(card) {
|
|
69304
69354
|
if (this.lockBoard() || card.flipped || card.matched || this.won() || this.failed())
|
|
69305
69355
|
return;
|
|
@@ -69614,7 +69664,7 @@ class MemoryGameComponent {
|
|
|
69614
69664
|
<ion-modal
|
|
69615
69665
|
[isOpen]="!!confirmAction()"
|
|
69616
69666
|
cssClass="val-modal-adaptive"
|
|
69617
|
-
(didDismiss)="
|
|
69667
|
+
(didDismiss)="handleConfirmModalDismissed()"
|
|
69618
69668
|
>
|
|
69619
69669
|
<ng-template>
|
|
69620
69670
|
<val-modal-layout
|
|
@@ -69772,7 +69822,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
69772
69822
|
<ion-modal
|
|
69773
69823
|
[isOpen]="!!confirmAction()"
|
|
69774
69824
|
cssClass="val-modal-adaptive"
|
|
69775
|
-
(didDismiss)="
|
|
69825
|
+
(didDismiss)="handleConfirmModalDismissed()"
|
|
69776
69826
|
>
|
|
69777
69827
|
<ng-template>
|
|
69778
69828
|
<val-modal-layout
|
|
@@ -70118,6 +70168,7 @@ class SimonGameComponent {
|
|
|
70118
70168
|
this.activePad = signal(undefined);
|
|
70119
70169
|
this.leaderboard = signal(this.readLeaderboard());
|
|
70120
70170
|
this.confirmAction = signal(undefined);
|
|
70171
|
+
this.confirmedAction = signal(undefined);
|
|
70121
70172
|
this.modeConfig = computed(() => SIMON_MODES[this.mode()]);
|
|
70122
70173
|
this.bestRound = computed(() => this.modeLeaderboard()[0]?.round ?? 0);
|
|
70123
70174
|
this.modeLeaderboard = computed(() => this.leaderboard()
|
|
@@ -70217,13 +70268,12 @@ class SimonGameComponent {
|
|
|
70217
70268
|
closeConfirmModal() {
|
|
70218
70269
|
this.confirmAction.set(undefined);
|
|
70219
70270
|
}
|
|
70220
|
-
|
|
70221
|
-
if (token !== 'confirm') {
|
|
70222
|
-
this.closeConfirmModal();
|
|
70223
|
-
return;
|
|
70224
|
-
}
|
|
70225
|
-
const action = this.confirmAction();
|
|
70271
|
+
handleConfirmModalDismissed() {
|
|
70226
70272
|
this.confirmAction.set(undefined);
|
|
70273
|
+
const action = this.confirmedAction();
|
|
70274
|
+
this.confirmedAction.set(undefined);
|
|
70275
|
+
if (!action)
|
|
70276
|
+
return;
|
|
70227
70277
|
if (action === 'restart') {
|
|
70228
70278
|
this.start();
|
|
70229
70279
|
return;
|
|
@@ -70236,6 +70286,15 @@ class SimonGameComponent {
|
|
|
70236
70286
|
this.resetToGamesMenu();
|
|
70237
70287
|
}
|
|
70238
70288
|
}
|
|
70289
|
+
confirmPendingAction(token) {
|
|
70290
|
+
if (token !== 'confirm') {
|
|
70291
|
+
this.closeConfirmModal();
|
|
70292
|
+
return;
|
|
70293
|
+
}
|
|
70294
|
+
const action = this.confirmAction();
|
|
70295
|
+
this.confirmedAction.set(action);
|
|
70296
|
+
this.confirmAction.set(undefined);
|
|
70297
|
+
}
|
|
70239
70298
|
tap(pad) {
|
|
70240
70299
|
if (this.phase() !== 'waiting' || !this.acceptingInput)
|
|
70241
70300
|
return;
|
|
@@ -70479,7 +70538,7 @@ class SimonGameComponent {
|
|
|
70479
70538
|
<ion-modal
|
|
70480
70539
|
[isOpen]="!!confirmAction()"
|
|
70481
70540
|
cssClass="val-modal-adaptive"
|
|
70482
|
-
(didDismiss)="
|
|
70541
|
+
(didDismiss)="handleConfirmModalDismissed()"
|
|
70483
70542
|
>
|
|
70484
70543
|
<ng-template>
|
|
70485
70544
|
<val-modal-layout
|
|
@@ -70609,7 +70668,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImpo
|
|
|
70609
70668
|
<ion-modal
|
|
70610
70669
|
[isOpen]="!!confirmAction()"
|
|
70611
70670
|
cssClass="val-modal-adaptive"
|
|
70612
|
-
(didDismiss)="
|
|
70671
|
+
(didDismiss)="handleConfirmModalDismissed()"
|
|
70613
70672
|
>
|
|
70614
70673
|
<ng-template>
|
|
70615
70674
|
<val-modal-layout
|