valtech-components 4.0.418 → 4.0.420
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 +732 -0
- package/esm2022/lib/components/organisms/mini-games/chessimals-game.component.mjs +9 -7
- package/esm2022/lib/components/organisms/mini-games/memory-game.component.mjs +151 -14
- package/esm2022/lib/components/organisms/mini-games/mini-games-menu.component.mjs +4 -2
- package/esm2022/lib/components/organisms/mini-games/mini-games.i18n.mjs +59 -1
- package/esm2022/lib/components/organisms/mini-games/simon-game.component.mjs +149 -12
- package/esm2022/lib/components/organisms/mini-games/types.mjs +1 -1
- package/esm2022/lib/version.mjs +2 -2
- package/esm2022/mini-games/public-api.mjs +44 -14
- package/esm2022/public-api.mjs +2 -1
- package/fesm2022/valtech-components-mini-games.mjs +44 -14
- package/fesm2022/valtech-components-mini-games.mjs.map +1 -1
- package/fesm2022/valtech-components.mjs +1210 -157
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/organisms/mini-games/bubble-blitz-game.component.d.ts +99 -0
- package/lib/components/organisms/mini-games/chessimals-game.component.d.ts +1 -1
- package/lib/components/organisms/mini-games/memory-game.component.d.ts +16 -1
- package/lib/components/organisms/mini-games/simon-game.component.d.ts +16 -1
- package/lib/components/organisms/mini-games/types.d.ts +11 -0
- package/lib/version.d.ts +1 -1
- package/mini-games/public-api.d.ts +4 -0
- package/package.json +1 -1
- package/public-api.d.ts +1 -0
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { OnDestroy } from '@angular/core';
|
|
2
|
+
import { BubbleBlitzCell, BubbleBlitzColor, BubbleBlitzMode, BubbleBlitzPhase } from './types';
|
|
3
|
+
import { ButtonMetadata } from '../../types';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
type BubbleConfirmAction = 'restart' | 'mode' | 'games';
|
|
6
|
+
type BubbleBlitzPalette = readonly BubbleBlitzColor[];
|
|
7
|
+
interface BubbleBlitzModeConfig {
|
|
8
|
+
rows: number;
|
|
9
|
+
cols: number;
|
|
10
|
+
seconds: number;
|
|
11
|
+
colors: BubbleBlitzPalette;
|
|
12
|
+
feverTarget: number;
|
|
13
|
+
}
|
|
14
|
+
interface BubbleLeaderboardEntry {
|
|
15
|
+
id: string;
|
|
16
|
+
mode: BubbleBlitzMode;
|
|
17
|
+
playerName: string;
|
|
18
|
+
playerAvatar: string;
|
|
19
|
+
playerColor: string;
|
|
20
|
+
score: number;
|
|
21
|
+
maxCombo: number;
|
|
22
|
+
popped: number;
|
|
23
|
+
createdAt: string;
|
|
24
|
+
}
|
|
25
|
+
export declare class BubbleBlitzGameComponent implements OnDestroy {
|
|
26
|
+
private readonly i18n;
|
|
27
|
+
private readonly router;
|
|
28
|
+
private readonly playerProfiles;
|
|
29
|
+
private readonly audio;
|
|
30
|
+
private timer?;
|
|
31
|
+
private animationTimer?;
|
|
32
|
+
miniGamesRoute: string;
|
|
33
|
+
readonly modes: BubbleBlitzMode[];
|
|
34
|
+
readonly phase: import("@angular/core").WritableSignal<BubbleBlitzPhase>;
|
|
35
|
+
readonly mode: import("@angular/core").WritableSignal<BubbleBlitzMode>;
|
|
36
|
+
readonly grid: import("@angular/core").WritableSignal<BubbleBlitzCell[]>;
|
|
37
|
+
readonly score: import("@angular/core").WritableSignal<number>;
|
|
38
|
+
readonly combo: import("@angular/core").WritableSignal<number>;
|
|
39
|
+
readonly maxCombo: import("@angular/core").WritableSignal<number>;
|
|
40
|
+
readonly popped: import("@angular/core").WritableSignal<number>;
|
|
41
|
+
readonly remaining: import("@angular/core").WritableSignal<number>;
|
|
42
|
+
readonly fever: import("@angular/core").WritableSignal<number>;
|
|
43
|
+
readonly selectedGroupKey: import("@angular/core").WritableSignal<string>;
|
|
44
|
+
readonly animating: import("@angular/core").WritableSignal<boolean>;
|
|
45
|
+
readonly leaderboard: import("@angular/core").WritableSignal<BubbleLeaderboardEntry[]>;
|
|
46
|
+
readonly confirmAction: import("@angular/core").WritableSignal<BubbleConfirmAction>;
|
|
47
|
+
readonly config: import("@angular/core").Signal<BubbleBlitzModeConfig>;
|
|
48
|
+
readonly feverReady: import("@angular/core").Signal<boolean>;
|
|
49
|
+
readonly feverProgress: import("@angular/core").Signal<number>;
|
|
50
|
+
readonly playerName: import("@angular/core").Signal<string>;
|
|
51
|
+
readonly activePlayerAvatar: import("@angular/core").Signal<string>;
|
|
52
|
+
readonly activePlayerColor: import("@angular/core").Signal<string>;
|
|
53
|
+
readonly modeLeaderboard: import("@angular/core").Signal<BubbleLeaderboardEntry[]>;
|
|
54
|
+
readonly leaderboardHeading: import("@angular/core").Signal<string>;
|
|
55
|
+
readonly resultBody: import("@angular/core").Signal<string>;
|
|
56
|
+
readonly confirmTitle: import("@angular/core").Signal<string>;
|
|
57
|
+
readonly confirmBody: import("@angular/core").Signal<string>;
|
|
58
|
+
readonly confirmActions: import("@angular/core").Signal<ButtonMetadata[]>;
|
|
59
|
+
constructor();
|
|
60
|
+
ngOnDestroy(): void;
|
|
61
|
+
protected t(key: string): string;
|
|
62
|
+
selectMode(mode: BubbleBlitzMode): void;
|
|
63
|
+
modeTitle(mode: BubbleBlitzMode): string;
|
|
64
|
+
modeDescription(mode: BubbleBlitzMode): string;
|
|
65
|
+
start(): void;
|
|
66
|
+
resetToSetup(): void;
|
|
67
|
+
popGroup(cell: BubbleBlitzCell): void;
|
|
68
|
+
bubbleColor(color: BubbleBlitzColor): string;
|
|
69
|
+
isTargetCell(cell: BubbleBlitzCell): boolean;
|
|
70
|
+
groupSizeLabel(cell: BubbleBlitzCell): string;
|
|
71
|
+
leaderboardLine(entry: BubbleLeaderboardEntry): string;
|
|
72
|
+
requestRestartGame(): void;
|
|
73
|
+
requestChangeMode(): void;
|
|
74
|
+
requestChangeGame(): void;
|
|
75
|
+
closeConfirmModal(): void;
|
|
76
|
+
confirmPendingAction(token?: string): void;
|
|
77
|
+
private startTimer;
|
|
78
|
+
private stopTimer;
|
|
79
|
+
private finishAnimation;
|
|
80
|
+
private clearAnimationTimer;
|
|
81
|
+
private finish;
|
|
82
|
+
private createBoard;
|
|
83
|
+
private createCell;
|
|
84
|
+
private randomColor;
|
|
85
|
+
private groupFrom;
|
|
86
|
+
private removeGroup;
|
|
87
|
+
private refillBoard;
|
|
88
|
+
private hasPlayableGroup;
|
|
89
|
+
private neighborPositions;
|
|
90
|
+
private positionKey;
|
|
91
|
+
private saveScore;
|
|
92
|
+
private readLeaderboard;
|
|
93
|
+
private resetToGamesMenu;
|
|
94
|
+
private miniGamesBaseRoute;
|
|
95
|
+
private capitalize;
|
|
96
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BubbleBlitzGameComponent, never>;
|
|
97
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BubbleBlitzGameComponent, "val-bubble-blitz-game", never, { "miniGamesRoute": { "alias": "miniGamesRoute"; "required": false; }; }, {}, never, never, true, never>;
|
|
98
|
+
}
|
|
99
|
+
export {};
|
|
@@ -64,7 +64,7 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
|
|
|
64
64
|
readonly botDifficulties: ChessimalsBotDifficulty[];
|
|
65
65
|
readonly botProfiles: ChessimalsBotProfile[];
|
|
66
66
|
readonly animals: ChessimalsAnimalView[];
|
|
67
|
-
readonly valtechComponentsVersion = "4.0.
|
|
67
|
+
readonly valtechComponentsVersion = "4.0.420";
|
|
68
68
|
readonly screen: import("@angular/core").WritableSignal<"home" | "game">;
|
|
69
69
|
readonly selectedBoardSize: import("@angular/core").WritableSignal<ChessimalsBoardSize>;
|
|
70
70
|
readonly selectedLocalMode: import("@angular/core").WritableSignal<ChessimalsLocalMode>;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { OnDestroy } from '@angular/core';
|
|
2
2
|
import { RetroAudioService } from './retro-audio.service';
|
|
3
3
|
import { MemoryGameCard, MemoryGameDifficulty, MemoryGameMode, MemoryGameProfile } from './types';
|
|
4
|
+
import { ButtonMetadata } from '../../types';
|
|
4
5
|
import * as i0 from "@angular/core";
|
|
5
6
|
type MemoryGamePhase = 'home' | 'playing' | 'won' | 'lost';
|
|
6
7
|
interface MemoryLeaderboardEntry {
|
|
@@ -16,10 +17,13 @@ interface MemoryLeaderboardEntry {
|
|
|
16
17
|
completedAt: string;
|
|
17
18
|
}
|
|
18
19
|
type MemoryMedal = 'gold' | 'silver' | 'bronze' | 'spark';
|
|
20
|
+
type MemoryConfirmAction = 'restart' | 'mode' | 'games';
|
|
19
21
|
export declare class MemoryGameComponent implements OnDestroy {
|
|
20
22
|
private readonly i18n;
|
|
23
|
+
private readonly router;
|
|
21
24
|
private readonly playerProfiles;
|
|
22
25
|
readonly audio: RetroAudioService;
|
|
26
|
+
miniGamesRoute: string;
|
|
23
27
|
readonly profiles: MemoryGameProfile[];
|
|
24
28
|
readonly confettiPieces: number[];
|
|
25
29
|
readonly phase: import("@angular/core").WritableSignal<MemoryGamePhase>;
|
|
@@ -36,6 +40,7 @@ export declare class MemoryGameComponent implements OnDestroy {
|
|
|
36
40
|
readonly failed: import("@angular/core").WritableSignal<boolean>;
|
|
37
41
|
readonly lockBoard: import("@angular/core").WritableSignal<boolean>;
|
|
38
42
|
readonly leaderboard: import("@angular/core").WritableSignal<MemoryLeaderboardEntry[]>;
|
|
43
|
+
readonly confirmAction: import("@angular/core").WritableSignal<MemoryConfirmAction>;
|
|
39
44
|
private timer?;
|
|
40
45
|
private firstPick?;
|
|
41
46
|
readonly profileConfig: import("@angular/core").Signal<{
|
|
@@ -57,15 +62,25 @@ export declare class MemoryGameComponent implements OnDestroy {
|
|
|
57
62
|
readonly resultMedal: import("@angular/core").Signal<MemoryMedal>;
|
|
58
63
|
readonly resultSeconds: import("@angular/core").Signal<number>;
|
|
59
64
|
readonly winBody: import("@angular/core").Signal<string>;
|
|
65
|
+
readonly confirmTitle: import("@angular/core").Signal<string>;
|
|
66
|
+
readonly confirmBody: import("@angular/core").Signal<string>;
|
|
67
|
+
readonly confirmActions: import("@angular/core").Signal<ButtonMetadata[]>;
|
|
60
68
|
constructor();
|
|
61
69
|
ngOnDestroy(): void;
|
|
62
70
|
protected t(key: string): string;
|
|
63
71
|
selectProfile(profile: MemoryGameProfile): void;
|
|
64
72
|
start(): void;
|
|
65
73
|
resetToSetup(): void;
|
|
74
|
+
requestRestartGame(): void;
|
|
75
|
+
requestChangeMode(): void;
|
|
76
|
+
requestChangeGame(): void;
|
|
77
|
+
closeConfirmModal(): void;
|
|
78
|
+
confirmPendingAction(token?: string): void;
|
|
66
79
|
flip(card: MemoryGameCard): void;
|
|
67
80
|
private startTimer;
|
|
68
81
|
private stopTimer;
|
|
82
|
+
private resetToGamesMenu;
|
|
83
|
+
private miniGamesBaseRoute;
|
|
69
84
|
private shuffle;
|
|
70
85
|
protected leaderboardLine(entry: MemoryLeaderboardEntry): string;
|
|
71
86
|
protected leaderboardTitle(entry: MemoryLeaderboardEntry): string;
|
|
@@ -78,6 +93,6 @@ export declare class MemoryGameComponent implements OnDestroy {
|
|
|
78
93
|
protected medalIcon(medal: MemoryMedal): string;
|
|
79
94
|
private formatSeconds;
|
|
80
95
|
static ɵfac: i0.ɵɵFactoryDeclaration<MemoryGameComponent, never>;
|
|
81
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<MemoryGameComponent, "val-memory-game", never, {}, {}, never, never, true, never>;
|
|
96
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<MemoryGameComponent, "val-memory-game", never, { "miniGamesRoute": { "alias": "miniGamesRoute"; "required": false; }; }, {}, never, never, true, never>;
|
|
82
97
|
}
|
|
83
98
|
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { OnDestroy } from '@angular/core';
|
|
2
2
|
import { SimonGameMode, SimonGamePhase, SimonPad } from './types';
|
|
3
|
+
import { ButtonMetadata } from '../../types';
|
|
3
4
|
import * as i0 from "@angular/core";
|
|
4
5
|
interface SimonModeConfig {
|
|
5
6
|
mode: SimonGameMode;
|
|
@@ -13,11 +14,14 @@ interface SimonLeaderboardEntry {
|
|
|
13
14
|
steps: number;
|
|
14
15
|
createdAt: string;
|
|
15
16
|
}
|
|
17
|
+
type SimonConfirmAction = 'restart' | 'mode' | 'games';
|
|
16
18
|
export declare class SimonGameComponent implements OnDestroy {
|
|
17
19
|
private readonly i18n;
|
|
20
|
+
private readonly router;
|
|
18
21
|
private readonly audio;
|
|
19
22
|
private timers;
|
|
20
23
|
private acceptingInput;
|
|
24
|
+
miniGamesRoute: string;
|
|
21
25
|
readonly modes: SimonGameMode[];
|
|
22
26
|
readonly pads: SimonPad[];
|
|
23
27
|
readonly phase: import("@angular/core").WritableSignal<SimonGamePhase>;
|
|
@@ -27,11 +31,15 @@ export declare class SimonGameComponent implements OnDestroy {
|
|
|
27
31
|
readonly inputIndex: import("@angular/core").WritableSignal<number>;
|
|
28
32
|
readonly activePad: import("@angular/core").WritableSignal<string>;
|
|
29
33
|
readonly leaderboard: import("@angular/core").WritableSignal<SimonLeaderboardEntry[]>;
|
|
34
|
+
readonly confirmAction: import("@angular/core").WritableSignal<SimonConfirmAction>;
|
|
30
35
|
readonly modeConfig: import("@angular/core").Signal<SimonModeConfig>;
|
|
31
36
|
readonly bestRound: import("@angular/core").Signal<number>;
|
|
32
37
|
readonly modeLeaderboard: import("@angular/core").Signal<SimonLeaderboardEntry[]>;
|
|
33
38
|
readonly leaderboardHeading: import("@angular/core").Signal<string>;
|
|
34
39
|
readonly failBody: import("@angular/core").Signal<string>;
|
|
40
|
+
readonly confirmTitle: import("@angular/core").Signal<string>;
|
|
41
|
+
readonly confirmBody: import("@angular/core").Signal<string>;
|
|
42
|
+
readonly confirmActions: import("@angular/core").Signal<ButtonMetadata[]>;
|
|
35
43
|
constructor();
|
|
36
44
|
ngOnDestroy(): void;
|
|
37
45
|
protected t(key: string): string;
|
|
@@ -40,6 +48,11 @@ export declare class SimonGameComponent implements OnDestroy {
|
|
|
40
48
|
modeDescription(mode: SimonGameMode): string;
|
|
41
49
|
start(): void;
|
|
42
50
|
resetToSetup(): void;
|
|
51
|
+
requestRestartGame(): void;
|
|
52
|
+
requestChangeMode(): void;
|
|
53
|
+
requestChangeGame(): void;
|
|
54
|
+
closeConfirmModal(): void;
|
|
55
|
+
confirmPendingAction(token?: string): void;
|
|
43
56
|
tap(pad: SimonPad): void;
|
|
44
57
|
scoreText(entry: SimonLeaderboardEntry): string;
|
|
45
58
|
dateText(value: string): string;
|
|
@@ -50,11 +63,13 @@ export declare class SimonGameComponent implements OnDestroy {
|
|
|
50
63
|
private createInitialSequence;
|
|
51
64
|
private randomPadId;
|
|
52
65
|
private saveScore;
|
|
66
|
+
private resetToGamesMenu;
|
|
67
|
+
private miniGamesBaseRoute;
|
|
53
68
|
private readLeaderboard;
|
|
54
69
|
private setTimer;
|
|
55
70
|
private clearTimers;
|
|
56
71
|
private capitalize;
|
|
57
72
|
static ɵfac: i0.ɵɵFactoryDeclaration<SimonGameComponent, never>;
|
|
58
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<SimonGameComponent, "val-simon-game", never, {}, {}, never, never, true, never>;
|
|
73
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SimonGameComponent, "val-simon-game", never, { "miniGamesRoute": { "alias": "miniGamesRoute"; "required": false; }; }, {}, never, never, true, never>;
|
|
59
74
|
}
|
|
60
75
|
export {};
|
|
@@ -33,6 +33,17 @@ export interface SimonPad {
|
|
|
33
33
|
color: string;
|
|
34
34
|
tone: number;
|
|
35
35
|
}
|
|
36
|
+
export type BubbleBlitzMode = 'kid' | 'classic' | 'ninja';
|
|
37
|
+
export type BubbleBlitzPhase = 'home' | 'playing' | 'finished';
|
|
38
|
+
export type BubbleBlitzColor = 'rose' | 'cyan' | 'sun' | 'violet' | 'leaf' | 'orange';
|
|
39
|
+
export interface BubbleBlitzCell {
|
|
40
|
+
id: string;
|
|
41
|
+
row: number;
|
|
42
|
+
col: number;
|
|
43
|
+
color: BubbleBlitzColor;
|
|
44
|
+
state?: 'idle' | 'popping' | 'falling' | 'entering';
|
|
45
|
+
drop?: number;
|
|
46
|
+
}
|
|
36
47
|
export type ChessimalsBoardSize = 6 | 8;
|
|
37
48
|
export type ChessimalsPlayerColor = 'white' | 'black';
|
|
38
49
|
export type ChessimalsAnimalType = 'eagle' | 'bull' | 'kangaroo' | 'lion';
|
package/lib/version.d.ts
CHANGED
|
@@ -19,6 +19,10 @@ export declare class SimonGamePageComponent {
|
|
|
19
19
|
static ɵfac: i0.ɵɵFactoryDeclaration<SimonGamePageComponent, never>;
|
|
20
20
|
static ɵcmp: i0.ɵɵComponentDeclaration<SimonGamePageComponent, "val-simon-game-page", never, {}, {}, never, never, true, never>;
|
|
21
21
|
}
|
|
22
|
+
export declare class BubbleBlitzGamePageComponent {
|
|
23
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<BubbleBlitzGamePageComponent, never>;
|
|
24
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<BubbleBlitzGamePageComponent, "val-bubble-blitz-game-page", never, {}, {}, never, never, true, never>;
|
|
25
|
+
}
|
|
22
26
|
export declare class ChessimalsGamePageComponent {
|
|
23
27
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChessimalsGamePageComponent, never>;
|
|
24
28
|
static ɵcmp: i0.ɵɵComponentDeclaration<ChessimalsGamePageComponent, "val-chessimals-game-page", never, {}, {}, never, never, true, never>;
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -340,6 +340,7 @@ export * from './lib/components/organisms/member-import-modal/member-import-moda
|
|
|
340
340
|
export * from './lib/components/organisms/mini-games/chessimals-engine';
|
|
341
341
|
export * from './lib/components/organisms/mini-games/chessimals-game.component';
|
|
342
342
|
export * from './lib/components/organisms/mini-games/chessimals-online.service';
|
|
343
|
+
export * from './lib/components/organisms/mini-games/bubble-blitz-game.component';
|
|
343
344
|
export * from './lib/components/organisms/mini-games/memory-game.component';
|
|
344
345
|
export * from './lib/components/organisms/mini-games/mini-game-player-profile.service';
|
|
345
346
|
export * from './lib/components/organisms/mini-games/mini-games-menu.component';
|