valtech-components 4.0.580 → 4.0.583
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/chessimals-adventure-data.mjs +279 -0
- package/esm2022/lib/components/organisms/mini-games/chessimals-adventure-progress.service.mjs +79 -0
- package/esm2022/lib/components/organisms/mini-games/chessimals-adventure.component.mjs +234 -0
- package/esm2022/lib/components/organisms/mini-games/chessimals-game.component.mjs +76 -5
- package/esm2022/lib/components/organisms/mini-games/mini-games.i18n.mjs +103 -3
- 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 +49 -7
- package/esm2022/public-api.mjs +4 -1
- package/fesm2022/valtech-components-mini-games.mjs +49 -7
- package/fesm2022/valtech-components-mini-games.mjs.map +1 -1
- package/fesm2022/valtech-components.mjs +3072 -2326
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/organisms/mini-games/chessimals-adventure-data.d.ts +4 -0
- package/lib/components/organisms/mini-games/chessimals-adventure-progress.service.d.ts +16 -0
- package/lib/components/organisms/mini-games/chessimals-adventure.component.d.ts +30 -0
- package/lib/components/organisms/mini-games/chessimals-game.component.d.ts +14 -2
- package/lib/components/organisms/mini-games/types.d.ts +36 -0
- package/lib/version.d.ts +1 -1
- package/mini-games/public-api.d.ts +11 -0
- package/package.json +1 -1
- package/public-api.d.ts +3 -0
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { ChessimalsAdventureAct } from './types';
|
|
2
|
+
export declare const CHESSIMALS_ADVENTURE_ACTS: ChessimalsAdventureAct[];
|
|
3
|
+
export declare function adventureActIsUnlocked(actId: string, completedNodes: Record<string, unknown>): boolean;
|
|
4
|
+
export declare function adventureNodeIsAvailable(nodeId: string, completedNodes: Record<string, unknown>): boolean;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { ChessimalsAdventureProgress } from './types';
|
|
3
|
+
import * as i0 from "@angular/core";
|
|
4
|
+
export declare class ChessimalsAdventureProgressService {
|
|
5
|
+
private readonly firebaseAuth;
|
|
6
|
+
private readonly firestore;
|
|
7
|
+
private readonly firebase;
|
|
8
|
+
get currentUid(): string | undefined;
|
|
9
|
+
watchProgress(): Observable<ChessimalsAdventureProgress | undefined>;
|
|
10
|
+
recordNodeCompleted(nodeId: string, stars: number): Promise<void>;
|
|
11
|
+
empty(): ChessimalsAdventureProgress;
|
|
12
|
+
private normalize;
|
|
13
|
+
private progressRef;
|
|
14
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChessimalsAdventureProgressService, never>;
|
|
15
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ChessimalsAdventureProgressService>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ChessimalsAdventureAct, ChessimalsAdventureNode, ChessimalsAdventureNodeStatus } from './types';
|
|
2
|
+
import * as i0 from "@angular/core";
|
|
3
|
+
interface AdventureNodeView {
|
|
4
|
+
node: ChessimalsAdventureNode;
|
|
5
|
+
status: ChessimalsAdventureNodeStatus;
|
|
6
|
+
stars: number;
|
|
7
|
+
}
|
|
8
|
+
interface AdventureActView {
|
|
9
|
+
act: ChessimalsAdventureAct;
|
|
10
|
+
unlocked: boolean;
|
|
11
|
+
nodes: AdventureNodeView[];
|
|
12
|
+
completedCount: number;
|
|
13
|
+
totalCount: number;
|
|
14
|
+
}
|
|
15
|
+
export declare class ChessimalsAdventureComponent {
|
|
16
|
+
private readonly i18n;
|
|
17
|
+
private readonly router;
|
|
18
|
+
private readonly progressService;
|
|
19
|
+
private readonly progress;
|
|
20
|
+
readonly selectedActId: import("@angular/core").WritableSignal<string>;
|
|
21
|
+
readonly totalStars: import("@angular/core").Signal<number>;
|
|
22
|
+
readonly actViews: import("@angular/core").Signal<AdventureActView[]>;
|
|
23
|
+
constructor();
|
|
24
|
+
t(key: string): string;
|
|
25
|
+
nodeIcon(type: ChessimalsAdventureNode['type']): string;
|
|
26
|
+
onNodeTap(nodeView: AdventureNodeView): void;
|
|
27
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChessimalsAdventureComponent, never>;
|
|
28
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChessimalsAdventureComponent, "val-chessimals-adventure", never, {}, {}, never, never, true, never>;
|
|
29
|
+
}
|
|
30
|
+
export {};
|
|
@@ -53,6 +53,7 @@ interface ChessimalsAchievementView {
|
|
|
53
53
|
interface ChessimalsProgressMetricView {
|
|
54
54
|
label: string;
|
|
55
55
|
value: string | number;
|
|
56
|
+
percent: string;
|
|
56
57
|
}
|
|
57
58
|
interface ChessimalsProgressRingView {
|
|
58
59
|
label: string;
|
|
@@ -88,6 +89,7 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
|
|
|
88
89
|
private readonly audio;
|
|
89
90
|
private readonly online;
|
|
90
91
|
private readonly challengeProgress;
|
|
92
|
+
private readonly adventureProgress;
|
|
91
93
|
private readonly router;
|
|
92
94
|
private readonly toast;
|
|
93
95
|
private readonly auth;
|
|
@@ -121,6 +123,8 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
|
|
|
121
123
|
private lastOutcomeSoundKey;
|
|
122
124
|
private lastChallengeHandledKey;
|
|
123
125
|
private lastModeStatsHandledKey;
|
|
126
|
+
private lastAdventureHandledKey;
|
|
127
|
+
readonly adventureNodeId: import("@angular/core").WritableSignal<string>;
|
|
124
128
|
private boardAnchor?;
|
|
125
129
|
readonly boardSizes: ChessimalsBoardSize[];
|
|
126
130
|
readonly localModes: ChessimalsLocalMode[];
|
|
@@ -129,7 +133,7 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
|
|
|
129
133
|
readonly botProfiles: ChessimalsBotProfile[];
|
|
130
134
|
readonly challengeLadder: ChessimalsChallengeBot[];
|
|
131
135
|
readonly animals: ChessimalsAnimalView[];
|
|
132
|
-
readonly valtechComponentsVersion = "4.0.
|
|
136
|
+
readonly valtechComponentsVersion = "4.0.583";
|
|
133
137
|
readonly screen: import("@angular/core").WritableSignal<"home" | "challenge" | "path" | "game">;
|
|
134
138
|
readonly selectedBoardSize: import("@angular/core").WritableSignal<ChessimalsBoardSize>;
|
|
135
139
|
readonly selectedLocalMode: import("@angular/core").WritableSignal<ChessimalsLocalMode>;
|
|
@@ -215,6 +219,12 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
|
|
|
215
219
|
set onlineGameId(value: string | null | undefined);
|
|
216
220
|
miniGamesRoute: string;
|
|
217
221
|
projectionMode: boolean;
|
|
222
|
+
set adventureNode(params: {
|
|
223
|
+
nodeId: string;
|
|
224
|
+
profileId: ChessimalsBotProfileId;
|
|
225
|
+
difficulty: ChessimalsBotDifficulty;
|
|
226
|
+
boardSize: ChessimalsBoardSize;
|
|
227
|
+
} | undefined);
|
|
218
228
|
readonly replayEntries: import("@angular/core").Signal<import("./types").ChessimalsMoveHistoryEntry[]>;
|
|
219
229
|
readonly activeReviewIndex: import("@angular/core").Signal<number>;
|
|
220
230
|
readonly hasReplayControls: import("@angular/core").Signal<boolean>;
|
|
@@ -286,6 +296,8 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
|
|
|
286
296
|
constructor();
|
|
287
297
|
ngOnDestroy(): void;
|
|
288
298
|
ngOnInit(): void;
|
|
299
|
+
private startAdventureBattle;
|
|
300
|
+
private adventureStarsForGame;
|
|
289
301
|
protected t(key: string): string;
|
|
290
302
|
private shortUserId;
|
|
291
303
|
private rangeValueToNumber;
|
|
@@ -542,6 +554,6 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
|
|
|
542
554
|
private chessimalsGameRoute;
|
|
543
555
|
private capitalize;
|
|
544
556
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChessimalsGameComponent, never>;
|
|
545
|
-
static ɵcmp: i0.ɵɵComponentDeclaration<ChessimalsGameComponent, "val-chessimals-game", never, { "onlineGameId": { "alias": "onlineGameId"; "required": false; }; "miniGamesRoute": { "alias": "miniGamesRoute"; "required": false; }; "projectionMode": { "alias": "projectionMode"; "required": false; }; }, {}, never, never, true, never>;
|
|
557
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChessimalsGameComponent, "val-chessimals-game", never, { "onlineGameId": { "alias": "onlineGameId"; "required": false; }; "miniGamesRoute": { "alias": "miniGamesRoute"; "required": false; }; "projectionMode": { "alias": "projectionMode"; "required": false; }; "adventureNode": { "alias": "adventureNode"; "required": false; }; }, {}, never, never, true, never>;
|
|
546
558
|
}
|
|
547
559
|
export {};
|
|
@@ -257,6 +257,42 @@ export interface ChessimalsGameState {
|
|
|
257
257
|
moveHistory?: ChessimalsMoveHistoryEntry[];
|
|
258
258
|
online?: ChessimalsOnlineState;
|
|
259
259
|
}
|
|
260
|
+
export type ChessimalsAdventureNodeType = 'battle' | 'boss' | 'rest' | 'mystery';
|
|
261
|
+
export type ChessimalsAdventureNodeStatus = 'locked' | 'available' | 'completed' | 'failed';
|
|
262
|
+
export interface ChessimalsAdventurePosition {
|
|
263
|
+
x: number;
|
|
264
|
+
y: number;
|
|
265
|
+
}
|
|
266
|
+
export interface ChessimalsAdventureNode {
|
|
267
|
+
id: string;
|
|
268
|
+
actId: string;
|
|
269
|
+
type: ChessimalsAdventureNodeType;
|
|
270
|
+
profileId?: ChessimalsBotProfileId;
|
|
271
|
+
difficulty?: ChessimalsBotDifficulty;
|
|
272
|
+
boardSize?: ChessimalsBoardSize;
|
|
273
|
+
position: ChessimalsAdventurePosition;
|
|
274
|
+
connectsTo: string[];
|
|
275
|
+
titleKey: string;
|
|
276
|
+
descriptionKey: string;
|
|
277
|
+
specialRule?: string;
|
|
278
|
+
}
|
|
279
|
+
export interface ChessimalsAdventureAct {
|
|
280
|
+
id: string;
|
|
281
|
+
titleKey: string;
|
|
282
|
+
descriptionKey: string;
|
|
283
|
+
emoji: string;
|
|
284
|
+
nodes: ChessimalsAdventureNode[];
|
|
285
|
+
}
|
|
286
|
+
export interface ChessimalsAdventureNodeResult {
|
|
287
|
+
stars: number;
|
|
288
|
+
completedAt: string;
|
|
289
|
+
}
|
|
290
|
+
export interface ChessimalsAdventureProgress {
|
|
291
|
+
userId?: string;
|
|
292
|
+
completedNodes: Record<string, ChessimalsAdventureNodeResult>;
|
|
293
|
+
totalStars: number;
|
|
294
|
+
updatedAt: string;
|
|
295
|
+
}
|
|
260
296
|
export type ChristianitySeat = 'P1' | 'P2';
|
|
261
297
|
export type ChristianityGameStatus = 'in_progress' | 'finished';
|
|
262
298
|
export type ChristianityGameMode = 'solo_bot' | 'two_player' | 'local_pass';
|
package/lib/version.d.ts
CHANGED
|
@@ -39,6 +39,13 @@ export declare class BubbleBlitzGamePageComponent {
|
|
|
39
39
|
static ɵcmp: i0.ɵɵComponentDeclaration<BubbleBlitzGamePageComponent, "val-bubble-blitz-game-page", never, {}, {}, never, never, true, never>;
|
|
40
40
|
}
|
|
41
41
|
export declare class ChessimalsGamePageComponent {
|
|
42
|
+
private readonly route;
|
|
43
|
+
get adventureParams(): {
|
|
44
|
+
nodeId: string;
|
|
45
|
+
profileId: import("valtech-components").ChessimalsBotProfileId;
|
|
46
|
+
difficulty: import("valtech-components").ChessimalsBotDifficulty;
|
|
47
|
+
boardSize: import("valtech-components").ChessimalsBoardSize;
|
|
48
|
+
};
|
|
42
49
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChessimalsGamePageComponent, never>;
|
|
43
50
|
static ɵcmp: i0.ɵɵComponentDeclaration<ChessimalsGamePageComponent, "val-chessimals-game-page", never, {}, {}, never, never, true, never>;
|
|
44
51
|
}
|
|
@@ -54,3 +61,7 @@ export declare class ChessimalsProjectionGamePageComponent {
|
|
|
54
61
|
static ɵfac: i0.ɵɵFactoryDeclaration<ChessimalsProjectionGamePageComponent, never>;
|
|
55
62
|
static ɵcmp: i0.ɵɵComponentDeclaration<ChessimalsProjectionGamePageComponent, "val-chessimals-projection-game-page", never, {}, {}, never, never, true, never>;
|
|
56
63
|
}
|
|
64
|
+
export declare class ChessimalsAdventurePageComponent {
|
|
65
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ChessimalsAdventurePageComponent, never>;
|
|
66
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<ChessimalsAdventurePageComponent, "val-chessimals-adventure-page", never, {}, {}, never, never, true, never>;
|
|
67
|
+
}
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -341,6 +341,9 @@ export * from './lib/components/organisms/invite-member-modal/invite-member-moda
|
|
|
341
341
|
export * from './lib/components/organisms/member-detail-modal/member-detail-modal.component';
|
|
342
342
|
export * from './lib/components/organisms/member-detail-modal/types';
|
|
343
343
|
export * from './lib/components/organisms/member-import-modal/member-import-modal.component';
|
|
344
|
+
export * from './lib/components/organisms/mini-games/chessimals-adventure.component';
|
|
345
|
+
export * from './lib/components/organisms/mini-games/chessimals-adventure-data';
|
|
346
|
+
export * from './lib/components/organisms/mini-games/chessimals-adventure-progress.service';
|
|
344
347
|
export * from './lib/components/organisms/mini-games/chessimals-engine';
|
|
345
348
|
export * from './lib/components/organisms/mini-games/chessimals-game.component';
|
|
346
349
|
export * from './lib/components/organisms/mini-games/chessimals-online.service';
|