valtech-components 4.0.395 → 4.0.397
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-game.component.mjs +51 -18
- package/esm2022/lib/components/organisms/mini-games/chessimals-online.service.mjs +145 -22
- package/esm2022/lib/components/organisms/mini-games/types.mjs +1 -1
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +194 -39
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/components/organisms/mini-games/chessimals-game.component.d.ts +4 -0
- package/lib/components/organisms/mini-games/chessimals-online.service.d.ts +14 -1
- package/lib/components/organisms/mini-games/types.d.ts +7 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -171,6 +171,10 @@ export declare class ChessimalsGameComponent implements OnInit, OnDestroy {
|
|
|
171
171
|
shareProjectionLink(): Promise<void>;
|
|
172
172
|
canReviewPendingGuest(): boolean;
|
|
173
173
|
pendingGuestName(): string;
|
|
174
|
+
pendingGuestHandle(): string;
|
|
175
|
+
pendingGuestAvatar(): string;
|
|
176
|
+
pendingGuestAvatarUrl(): string;
|
|
177
|
+
pendingGuestAvatarProps(): UserAvatarMetadata;
|
|
174
178
|
waitingTitle(): string;
|
|
175
179
|
waitingBody(): string;
|
|
176
180
|
acceptOnlineGuest(): Promise<void>;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Observable } from 'rxjs';
|
|
2
|
-
import { ChessimalsBoardSize, ChessimalsGameState, ChessimalsHistoryEntry, ChessimalsMove, ChessimalsPlayerColor } from './types';
|
|
2
|
+
import { ChessimalsBoardSize, ChessimalsGameState, ChessimalsHistoryEntry, ChessimalsMove, ChessimalsOnlineParticipant, ChessimalsPlayerColor } from './types';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class ChessimalsOnlineService {
|
|
5
|
+
private readonly firebaseAuth;
|
|
5
6
|
private readonly auth;
|
|
6
7
|
private readonly firestore;
|
|
7
8
|
private readonly firebase;
|
|
@@ -21,6 +22,10 @@ export declare class ChessimalsOnlineService {
|
|
|
21
22
|
participantSide(state: ChessimalsGameState, uid?: string): ChessimalsPlayerColor | undefined;
|
|
22
23
|
isParticipant(state: ChessimalsGameState, uid?: string): boolean;
|
|
23
24
|
isHostWaiting(state: ChessimalsGameState, uid?: string): boolean;
|
|
25
|
+
isPendingGuest(state: ChessimalsGameState, uid?: string): boolean;
|
|
26
|
+
hasCurrentRematchRequest(state: ChessimalsGameState, uid?: string): boolean;
|
|
27
|
+
hasOpponentRematchRequest(state: ChessimalsGameState, uid?: string): boolean;
|
|
28
|
+
participantKey(participant?: ChessimalsOnlineParticipant): string;
|
|
24
29
|
shareUrl(gameId: string, baseRoute?: string): string;
|
|
25
30
|
projectionShareUrl(gameId: string, baseRoute?: string): string;
|
|
26
31
|
saveCurrentUserHistory(state: ChessimalsGameState): Promise<void>;
|
|
@@ -30,6 +35,14 @@ export declare class ChessimalsOnlineService {
|
|
|
30
35
|
private ensureUser;
|
|
31
36
|
private decodeInput;
|
|
32
37
|
private createParticipant;
|
|
38
|
+
private normalizeHandle;
|
|
39
|
+
private buildSeatKey;
|
|
40
|
+
private currentSeatKey;
|
|
41
|
+
private participantForSide;
|
|
42
|
+
private participantEntries;
|
|
43
|
+
private participantRequestKeys;
|
|
44
|
+
private matchesCurrentParticipant;
|
|
45
|
+
private normalizeColor;
|
|
33
46
|
private withUpdatedAt;
|
|
34
47
|
private withMoveLog;
|
|
35
48
|
private createMoveLogEntry;
|
|
@@ -73,6 +73,8 @@ export interface ChessimalsMoveLogEntry {
|
|
|
73
73
|
id: string;
|
|
74
74
|
at: string;
|
|
75
75
|
uid: string;
|
|
76
|
+
profileId?: string;
|
|
77
|
+
seatKey?: string;
|
|
76
78
|
side?: ChessimalsPlayerColor;
|
|
77
79
|
status: ChessimalsMoveLogStatus;
|
|
78
80
|
code?: string;
|
|
@@ -84,9 +86,14 @@ export interface ChessimalsMoveLogEntry {
|
|
|
84
86
|
}
|
|
85
87
|
export interface ChessimalsOnlineParticipant {
|
|
86
88
|
uid: string;
|
|
89
|
+
accountUserId?: string;
|
|
87
90
|
profileId: string;
|
|
91
|
+
seatKey?: string;
|
|
88
92
|
name: string;
|
|
93
|
+
handle?: string;
|
|
94
|
+
email?: string;
|
|
89
95
|
avatar: string;
|
|
96
|
+
avatarUrl?: string;
|
|
90
97
|
color: string;
|
|
91
98
|
side?: ChessimalsPlayerColor;
|
|
92
99
|
joinedAt: string;
|
package/lib/version.d.ts
CHANGED