@noatgnu/cupcake-core 1.0.0
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/README.md +121 -0
- package/fesm2022/noatgnu-cupcake-core.mjs +2684 -0
- package/fesm2022/noatgnu-cupcake-core.mjs.map +1 -0
- package/index.d.ts +1175 -0
- package/package.json +47 -0
- package/src/lib/styles/_bootstrap-integration.scss +345 -0
- package/src/lib/styles/_components.scss +494 -0
- package/src/lib/styles/_mixins.scss +231 -0
- package/src/lib/styles/_variables.scss +151 -0
- package/src/lib/styles/cupcake-core.scss +74 -0
- package/src/lib/styles/index.scss +42 -0
- package/src/lib/styles/themes/_dark.scss +64 -0
- package/src/lib/styles/themes/_light.scss +63 -0
package/index.d.ts
ADDED
|
@@ -0,0 +1,1175 @@
|
|
|
1
|
+
import * as _angular_core from '@angular/core';
|
|
2
|
+
import { InjectionToken, OnInit, ModuleWithProviders } from '@angular/core';
|
|
3
|
+
import * as rxjs from 'rxjs';
|
|
4
|
+
import { Observable } from 'rxjs';
|
|
5
|
+
import * as i3 from '@angular/common/http';
|
|
6
|
+
import { HttpClient, HttpParams, HttpInterceptorFn } from '@angular/common/http';
|
|
7
|
+
import * as i4 from '@angular/router';
|
|
8
|
+
import { CanActivateFn } from '@angular/router';
|
|
9
|
+
import * as _noatgnu_cupcake_core from '@noatgnu/cupcake-core';
|
|
10
|
+
import * as i2 from '@angular/forms';
|
|
11
|
+
import { FormGroup } from '@angular/forms';
|
|
12
|
+
import * as i1 from '@angular/common';
|
|
13
|
+
import * as i5 from '@ng-bootstrap/ng-bootstrap';
|
|
14
|
+
|
|
15
|
+
declare enum ResourceType {
|
|
16
|
+
METADATA_TABLE = "metadata_table",
|
|
17
|
+
METADATA_TABLE_TEMPLATE = "metadata_table_template",
|
|
18
|
+
METADATA_COLUMN_TEMPLATE = "metadata_column_template",
|
|
19
|
+
FILE = "file",
|
|
20
|
+
DATASET = "dataset",
|
|
21
|
+
SCHEMA = "schema"
|
|
22
|
+
}
|
|
23
|
+
declare const ResourceTypeLabels: Record<ResourceType, string>;
|
|
24
|
+
declare enum ResourceVisibility {
|
|
25
|
+
PRIVATE = "private",
|
|
26
|
+
GROUP = "group",
|
|
27
|
+
PUBLIC = "public"
|
|
28
|
+
}
|
|
29
|
+
declare const ResourceVisibilityLabels: Record<ResourceVisibility, string>;
|
|
30
|
+
declare enum ResourceRole {
|
|
31
|
+
OWNER = "owner",
|
|
32
|
+
ADMIN = "admin",
|
|
33
|
+
EDITOR = "editor",
|
|
34
|
+
VIEWER = "viewer"
|
|
35
|
+
}
|
|
36
|
+
declare const ResourceRoleLabels: Record<ResourceRole, string>;
|
|
37
|
+
declare enum InvitationStatus {
|
|
38
|
+
PENDING = "pending",
|
|
39
|
+
ACCEPTED = "accepted",
|
|
40
|
+
REJECTED = "rejected",
|
|
41
|
+
EXPIRED = "expired",
|
|
42
|
+
CANCELLED = "cancelled"
|
|
43
|
+
}
|
|
44
|
+
declare const InvitationStatusLabels: Record<InvitationStatus, string>;
|
|
45
|
+
|
|
46
|
+
interface BaseTimestampedModel {
|
|
47
|
+
createdAt: string;
|
|
48
|
+
updatedAt: string;
|
|
49
|
+
}
|
|
50
|
+
interface BaseResource extends BaseTimestampedModel {
|
|
51
|
+
id: number;
|
|
52
|
+
resourceType: ResourceType;
|
|
53
|
+
owner?: number;
|
|
54
|
+
labGroup?: number;
|
|
55
|
+
visibility: ResourceVisibility;
|
|
56
|
+
isActive: boolean;
|
|
57
|
+
isLocked: boolean;
|
|
58
|
+
canEdit?: boolean;
|
|
59
|
+
canView?: boolean;
|
|
60
|
+
canDelete?: boolean;
|
|
61
|
+
}
|
|
62
|
+
interface PaginatedResponse<T> {
|
|
63
|
+
count: number;
|
|
64
|
+
next?: string;
|
|
65
|
+
previous?: string;
|
|
66
|
+
results: T[];
|
|
67
|
+
}
|
|
68
|
+
interface ApiResponse<T = any> {
|
|
69
|
+
data?: T;
|
|
70
|
+
error?: any;
|
|
71
|
+
status: number;
|
|
72
|
+
success: boolean;
|
|
73
|
+
}
|
|
74
|
+
interface ResourceQueryParams {
|
|
75
|
+
page?: number;
|
|
76
|
+
pageSize?: number;
|
|
77
|
+
search?: string;
|
|
78
|
+
ordering?: string;
|
|
79
|
+
visibility?: ResourceVisibility;
|
|
80
|
+
owner?: number;
|
|
81
|
+
labGroup?: number;
|
|
82
|
+
includeInactive?: boolean;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
interface SiteConfig extends BaseTimestampedModel {
|
|
86
|
+
siteName: string;
|
|
87
|
+
logoUrl?: string;
|
|
88
|
+
logoImage?: string;
|
|
89
|
+
primaryColor?: string;
|
|
90
|
+
showPoweredBy: boolean;
|
|
91
|
+
allowUserRegistration: boolean;
|
|
92
|
+
enableOrcidLogin: boolean;
|
|
93
|
+
installedApps: {
|
|
94
|
+
[appCode: string]: {
|
|
95
|
+
name: string;
|
|
96
|
+
code: string;
|
|
97
|
+
description: string;
|
|
98
|
+
installed: boolean;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
updatedBy?: number;
|
|
102
|
+
}
|
|
103
|
+
interface SiteConfigUpdateRequest {
|
|
104
|
+
siteName?: string;
|
|
105
|
+
logoUrl?: string;
|
|
106
|
+
logoImage?: string;
|
|
107
|
+
primaryColor?: string;
|
|
108
|
+
showPoweredBy?: boolean;
|
|
109
|
+
allowUserRegistration?: boolean;
|
|
110
|
+
enableOrcidLogin?: boolean;
|
|
111
|
+
}
|
|
112
|
+
interface AuthConfig {
|
|
113
|
+
registrationEnabled: boolean;
|
|
114
|
+
orcidLoginEnabled: boolean;
|
|
115
|
+
regularLoginEnabled: boolean;
|
|
116
|
+
}
|
|
117
|
+
interface RegistrationStatus {
|
|
118
|
+
registrationEnabled: boolean;
|
|
119
|
+
message: string;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
interface User {
|
|
123
|
+
id: number;
|
|
124
|
+
username: string;
|
|
125
|
+
email: string;
|
|
126
|
+
firstName?: string;
|
|
127
|
+
lastName?: string;
|
|
128
|
+
isStaff: boolean;
|
|
129
|
+
isSuperuser: boolean;
|
|
130
|
+
isActive: boolean;
|
|
131
|
+
dateJoined: string;
|
|
132
|
+
lastLogin?: string;
|
|
133
|
+
hasOrcid: boolean;
|
|
134
|
+
orcidId?: string;
|
|
135
|
+
}
|
|
136
|
+
interface UserCreateRequest {
|
|
137
|
+
username: string;
|
|
138
|
+
email: string;
|
|
139
|
+
firstName?: string;
|
|
140
|
+
lastName?: string;
|
|
141
|
+
password: string;
|
|
142
|
+
passwordConfirm: string;
|
|
143
|
+
isStaff?: boolean;
|
|
144
|
+
isSuperuser?: boolean;
|
|
145
|
+
isActive?: boolean;
|
|
146
|
+
}
|
|
147
|
+
interface UserRegistrationRequest {
|
|
148
|
+
username: string;
|
|
149
|
+
email: string;
|
|
150
|
+
firstName?: string;
|
|
151
|
+
lastName?: string;
|
|
152
|
+
password: string;
|
|
153
|
+
passwordConfirm: string;
|
|
154
|
+
}
|
|
155
|
+
interface UserOrcidProfile extends BaseTimestampedModel {
|
|
156
|
+
user: number;
|
|
157
|
+
userUsername?: string;
|
|
158
|
+
userEmail?: string;
|
|
159
|
+
orcidId: string;
|
|
160
|
+
orcidName?: string;
|
|
161
|
+
orcidEmail?: string;
|
|
162
|
+
verified: boolean;
|
|
163
|
+
linkedAt: string;
|
|
164
|
+
}
|
|
165
|
+
interface AccountMergeRequest extends BaseTimestampedModel {
|
|
166
|
+
id: number;
|
|
167
|
+
primaryUser: number;
|
|
168
|
+
primaryUserUsername?: string;
|
|
169
|
+
duplicateUser: number;
|
|
170
|
+
duplicateUserUsername?: string;
|
|
171
|
+
requestedBy: number;
|
|
172
|
+
requestedByUsername?: string;
|
|
173
|
+
reason?: string;
|
|
174
|
+
status: string;
|
|
175
|
+
reviewedBy?: number;
|
|
176
|
+
reviewedByUsername?: string;
|
|
177
|
+
adminNotes?: string;
|
|
178
|
+
completedAt?: string;
|
|
179
|
+
}
|
|
180
|
+
interface PasswordChangeRequest {
|
|
181
|
+
currentPassword: string;
|
|
182
|
+
newPassword: string;
|
|
183
|
+
confirmPassword: string;
|
|
184
|
+
}
|
|
185
|
+
interface UserProfileUpdateRequest {
|
|
186
|
+
firstName?: string;
|
|
187
|
+
lastName?: string;
|
|
188
|
+
email?: string;
|
|
189
|
+
currentPassword: string;
|
|
190
|
+
}
|
|
191
|
+
interface PasswordResetRequest {
|
|
192
|
+
email: string;
|
|
193
|
+
}
|
|
194
|
+
interface PasswordResetConfirmRequest {
|
|
195
|
+
token: string;
|
|
196
|
+
password: string;
|
|
197
|
+
passwordConfirm: string;
|
|
198
|
+
}
|
|
199
|
+
interface EmailChangeRequest {
|
|
200
|
+
newEmail: string;
|
|
201
|
+
currentPassword: string;
|
|
202
|
+
}
|
|
203
|
+
interface EmailChangeConfirmRequest {
|
|
204
|
+
token: string;
|
|
205
|
+
}
|
|
206
|
+
interface UserResponse {
|
|
207
|
+
user: User;
|
|
208
|
+
message?: string;
|
|
209
|
+
}
|
|
210
|
+
interface PasswordChangeResponse {
|
|
211
|
+
message: string;
|
|
212
|
+
}
|
|
213
|
+
interface AdminPasswordResetRequest {
|
|
214
|
+
userId: number;
|
|
215
|
+
newPassword: string;
|
|
216
|
+
confirmPassword: string;
|
|
217
|
+
forcePasswordChange?: boolean;
|
|
218
|
+
reason?: string;
|
|
219
|
+
}
|
|
220
|
+
interface EmailChangeConfirmResponse {
|
|
221
|
+
message: string;
|
|
222
|
+
}
|
|
223
|
+
interface UserListResponse {
|
|
224
|
+
count: number;
|
|
225
|
+
next?: string;
|
|
226
|
+
previous?: string;
|
|
227
|
+
results: User[];
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
interface LabGroup extends BaseTimestampedModel {
|
|
231
|
+
id: number;
|
|
232
|
+
name: string;
|
|
233
|
+
description?: string;
|
|
234
|
+
creator: number;
|
|
235
|
+
creatorName?: string;
|
|
236
|
+
isActive: boolean;
|
|
237
|
+
allowMemberInvites: boolean;
|
|
238
|
+
memberCount: number;
|
|
239
|
+
isCreator: boolean;
|
|
240
|
+
isMember: boolean;
|
|
241
|
+
canInvite: boolean;
|
|
242
|
+
canManage: boolean;
|
|
243
|
+
}
|
|
244
|
+
interface LabGroupInvitation extends BaseTimestampedModel {
|
|
245
|
+
id: number;
|
|
246
|
+
labGroup: number;
|
|
247
|
+
labGroupName?: string;
|
|
248
|
+
inviter: number;
|
|
249
|
+
inviterName?: string;
|
|
250
|
+
invitedUser?: number;
|
|
251
|
+
invitedEmail: string;
|
|
252
|
+
status: InvitationStatus;
|
|
253
|
+
message?: string;
|
|
254
|
+
invitationToken: string;
|
|
255
|
+
expiresAt: string;
|
|
256
|
+
respondedAt?: string;
|
|
257
|
+
canAccept: boolean;
|
|
258
|
+
}
|
|
259
|
+
interface LabGroupCreateRequest {
|
|
260
|
+
name: string;
|
|
261
|
+
description?: string;
|
|
262
|
+
allowMemberInvites?: boolean;
|
|
263
|
+
}
|
|
264
|
+
interface LabGroupUpdateRequest {
|
|
265
|
+
name?: string;
|
|
266
|
+
description?: string;
|
|
267
|
+
isActive?: boolean;
|
|
268
|
+
allowMemberInvites?: boolean;
|
|
269
|
+
}
|
|
270
|
+
interface LabGroupInviteRequest {
|
|
271
|
+
emails: string[];
|
|
272
|
+
message?: string;
|
|
273
|
+
}
|
|
274
|
+
interface InvitationResponseRequest {
|
|
275
|
+
accept: boolean;
|
|
276
|
+
}
|
|
277
|
+
interface LabGroupMember {
|
|
278
|
+
id: number;
|
|
279
|
+
username: string;
|
|
280
|
+
email: string;
|
|
281
|
+
firstName?: string;
|
|
282
|
+
lastName?: string;
|
|
283
|
+
isStaff: boolean;
|
|
284
|
+
isSuperuser: boolean;
|
|
285
|
+
isActive: boolean;
|
|
286
|
+
dateJoined: string;
|
|
287
|
+
lastLogin?: string;
|
|
288
|
+
hasOrcid: boolean;
|
|
289
|
+
orcidId?: string;
|
|
290
|
+
}
|
|
291
|
+
interface LabGroupQueryResponse {
|
|
292
|
+
count: number;
|
|
293
|
+
next?: string;
|
|
294
|
+
previous?: string;
|
|
295
|
+
results: LabGroup[];
|
|
296
|
+
}
|
|
297
|
+
interface LabGroupInvitationQueryResponse {
|
|
298
|
+
count: number;
|
|
299
|
+
next?: string;
|
|
300
|
+
previous?: string;
|
|
301
|
+
results: LabGroupInvitation[];
|
|
302
|
+
}
|
|
303
|
+
interface LabGroupInvitationCreateRequest {
|
|
304
|
+
labGroup: number;
|
|
305
|
+
invitedEmail: string;
|
|
306
|
+
message?: string;
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
interface AnnotationFolder extends BaseResource {
|
|
310
|
+
folderName: string;
|
|
311
|
+
parentFolder?: number;
|
|
312
|
+
isSharedDocumentFolder: boolean;
|
|
313
|
+
ownerName?: string;
|
|
314
|
+
fullPath?: string;
|
|
315
|
+
childFoldersCount: number;
|
|
316
|
+
annotationsCount: number;
|
|
317
|
+
}
|
|
318
|
+
interface Annotation extends BaseResource {
|
|
319
|
+
annotation: string;
|
|
320
|
+
annotationType: string;
|
|
321
|
+
file?: number;
|
|
322
|
+
fileUrl?: string;
|
|
323
|
+
fileSize?: number;
|
|
324
|
+
folder?: number;
|
|
325
|
+
folderPath?: string;
|
|
326
|
+
transcribed: boolean;
|
|
327
|
+
transcription?: string;
|
|
328
|
+
language?: string;
|
|
329
|
+
translation?: string;
|
|
330
|
+
scratched: boolean;
|
|
331
|
+
ownerName?: string;
|
|
332
|
+
}
|
|
333
|
+
interface AnnotationFolderCreateRequest {
|
|
334
|
+
folderName: string;
|
|
335
|
+
parentFolder?: number;
|
|
336
|
+
isSharedDocumentFolder?: boolean;
|
|
337
|
+
labGroup?: number;
|
|
338
|
+
visibility?: string;
|
|
339
|
+
}
|
|
340
|
+
interface AnnotationFolderUpdateRequest {
|
|
341
|
+
folderName?: string;
|
|
342
|
+
parentFolder?: number;
|
|
343
|
+
isSharedDocumentFolder?: boolean;
|
|
344
|
+
isActive?: boolean;
|
|
345
|
+
}
|
|
346
|
+
interface AnnotationCreateRequest {
|
|
347
|
+
annotation: string;
|
|
348
|
+
annotationType?: string;
|
|
349
|
+
file?: File;
|
|
350
|
+
folder?: number;
|
|
351
|
+
language?: string;
|
|
352
|
+
labGroup?: number;
|
|
353
|
+
visibility?: string;
|
|
354
|
+
}
|
|
355
|
+
interface AnnotationUpdateRequest {
|
|
356
|
+
annotation?: string;
|
|
357
|
+
annotationType?: string;
|
|
358
|
+
folder?: number;
|
|
359
|
+
transcribed?: boolean;
|
|
360
|
+
transcription?: string;
|
|
361
|
+
language?: string;
|
|
362
|
+
translation?: string;
|
|
363
|
+
scratched?: boolean;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
interface ResourcePermission extends BaseTimestampedModel {
|
|
367
|
+
id: number;
|
|
368
|
+
user: number;
|
|
369
|
+
userUsername?: string;
|
|
370
|
+
userDisplayName?: string;
|
|
371
|
+
resourceContentType: number;
|
|
372
|
+
resourceTypeName?: string;
|
|
373
|
+
resourceModel?: string;
|
|
374
|
+
resourceObjectId: number;
|
|
375
|
+
role: ResourceRole;
|
|
376
|
+
grantedBy?: number;
|
|
377
|
+
grantedByUsername?: string;
|
|
378
|
+
grantedAt: string;
|
|
379
|
+
}
|
|
380
|
+
interface ResourcePermissionCreateRequest {
|
|
381
|
+
user: number;
|
|
382
|
+
resourceContentType: number;
|
|
383
|
+
resourceObjectId: number;
|
|
384
|
+
role: ResourceRole;
|
|
385
|
+
}
|
|
386
|
+
interface ResourcePermissionUpdateRequest {
|
|
387
|
+
role: ResourceRole;
|
|
388
|
+
}
|
|
389
|
+
interface BulkPermissionRequest {
|
|
390
|
+
users: number[];
|
|
391
|
+
role: ResourceRole;
|
|
392
|
+
resourceContentType: number;
|
|
393
|
+
resourceObjectId: number;
|
|
394
|
+
}
|
|
395
|
+
|
|
396
|
+
interface RemoteHost extends BaseTimestampedModel {
|
|
397
|
+
id: number;
|
|
398
|
+
hostName: string;
|
|
399
|
+
hostPort: number;
|
|
400
|
+
hostProtocol: string;
|
|
401
|
+
hostDescription?: string;
|
|
402
|
+
hostToken?: string;
|
|
403
|
+
}
|
|
404
|
+
interface RemoteHostCreateRequest {
|
|
405
|
+
hostName: string;
|
|
406
|
+
hostPort?: number;
|
|
407
|
+
hostProtocol?: string;
|
|
408
|
+
hostDescription?: string;
|
|
409
|
+
hostToken?: string;
|
|
410
|
+
}
|
|
411
|
+
interface RemoteHostUpdateRequest {
|
|
412
|
+
hostName?: string;
|
|
413
|
+
hostPort?: number;
|
|
414
|
+
hostProtocol?: string;
|
|
415
|
+
hostDescription?: string;
|
|
416
|
+
hostToken?: string;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
interface CupcakeCoreConfig {
|
|
420
|
+
apiUrl: string;
|
|
421
|
+
}
|
|
422
|
+
declare const CUPCAKE_CORE_CONFIG: InjectionToken<CupcakeCoreConfig>;
|
|
423
|
+
interface AuthResponse {
|
|
424
|
+
accessToken: string;
|
|
425
|
+
refreshToken: string;
|
|
426
|
+
user: User;
|
|
427
|
+
}
|
|
428
|
+
interface AuthStatus {
|
|
429
|
+
authenticated: boolean;
|
|
430
|
+
user?: User;
|
|
431
|
+
}
|
|
432
|
+
declare class AuthService {
|
|
433
|
+
private http;
|
|
434
|
+
private config;
|
|
435
|
+
private apiUrl;
|
|
436
|
+
private currentUserSubject;
|
|
437
|
+
currentUser$: Observable<User | null>;
|
|
438
|
+
private isAuthenticatedSubject;
|
|
439
|
+
isAuthenticated$: Observable<boolean>;
|
|
440
|
+
constructor();
|
|
441
|
+
private hasValidTokenOnInit;
|
|
442
|
+
private initializeAuthState;
|
|
443
|
+
private isTokenExpired;
|
|
444
|
+
getUserFromToken(): User | null;
|
|
445
|
+
initiateORCIDLogin(): Observable<{
|
|
446
|
+
authorizationUrl: string;
|
|
447
|
+
state: string;
|
|
448
|
+
}>;
|
|
449
|
+
handleORCIDCallback(code: string, state: string): Observable<AuthResponse>;
|
|
450
|
+
exchangeORCIDToken(accessToken: string, orcidId: string): Observable<AuthResponse>;
|
|
451
|
+
login(username: string, password: string): Observable<AuthResponse>;
|
|
452
|
+
logout(): Observable<any>;
|
|
453
|
+
checkAuthStatus(): Observable<AuthStatus>;
|
|
454
|
+
fetchUserProfile(): Observable<User>;
|
|
455
|
+
getCurrentUser(): User | null;
|
|
456
|
+
isAuthenticated(): boolean;
|
|
457
|
+
getAccessToken(): string | null;
|
|
458
|
+
getRefreshToken(): string | null;
|
|
459
|
+
private setAuthData;
|
|
460
|
+
tryRefreshToken(): Observable<{
|
|
461
|
+
access: string;
|
|
462
|
+
}>;
|
|
463
|
+
refreshToken(): Observable<{
|
|
464
|
+
access: string;
|
|
465
|
+
}>;
|
|
466
|
+
updateAuthStateAfterRefresh(): void;
|
|
467
|
+
private clearAuthData;
|
|
468
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<AuthService, never>;
|
|
469
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<AuthService>;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
declare class ApiService {
|
|
473
|
+
private http;
|
|
474
|
+
private config;
|
|
475
|
+
private apiUrl;
|
|
476
|
+
private resourceService;
|
|
477
|
+
constructor(http: HttpClient);
|
|
478
|
+
/**
|
|
479
|
+
* Transform camelCase object to snake_case for API requests
|
|
480
|
+
*/
|
|
481
|
+
private transformToSnakeCase;
|
|
482
|
+
/**
|
|
483
|
+
* Transform snake_case object to camelCase for TypeScript interfaces
|
|
484
|
+
*/
|
|
485
|
+
private transformToCamelCase;
|
|
486
|
+
/**
|
|
487
|
+
* Make HTTP GET request with automatic snake_case to camelCase transformation
|
|
488
|
+
*/
|
|
489
|
+
get<T>(url: string, options?: any): Observable<T>;
|
|
490
|
+
/**
|
|
491
|
+
* Make HTTP POST request with automatic camelCase to snake_case transformation
|
|
492
|
+
*/
|
|
493
|
+
post<T>(url: string, body: any, options?: any): Observable<T>;
|
|
494
|
+
/**
|
|
495
|
+
* Make HTTP PUT request with automatic camelCase to snake_case transformation
|
|
496
|
+
*/
|
|
497
|
+
put<T>(url: string, body: any, options?: any): Observable<T>;
|
|
498
|
+
/**
|
|
499
|
+
* Make HTTP PATCH request with automatic camelCase to snake_case transformation
|
|
500
|
+
*/
|
|
501
|
+
patch<T>(url: string, body: any, options?: any): Observable<T>;
|
|
502
|
+
/**
|
|
503
|
+
* Make HTTP DELETE request with automatic snake_case to camelCase transformation
|
|
504
|
+
*/
|
|
505
|
+
delete<T>(url: string, options?: any): Observable<T>;
|
|
506
|
+
getUserProfile(): Observable<{
|
|
507
|
+
user: any;
|
|
508
|
+
}>;
|
|
509
|
+
getSiteConfig(): Observable<SiteConfig[]>;
|
|
510
|
+
updateSiteConfig(id: number, config: Partial<SiteConfig>): Observable<SiteConfig>;
|
|
511
|
+
getUsers(params?: {
|
|
512
|
+
isStaff?: boolean;
|
|
513
|
+
isActive?: boolean;
|
|
514
|
+
search?: string;
|
|
515
|
+
page?: number;
|
|
516
|
+
pageSize?: number;
|
|
517
|
+
}): Observable<UserListResponse>;
|
|
518
|
+
getUser(id: number): Observable<User>;
|
|
519
|
+
createUser(userData: UserCreateRequest): Observable<UserResponse>;
|
|
520
|
+
updateUser(id: number, userData: Partial<User>): Observable<User>;
|
|
521
|
+
deleteUser(id: number): Observable<void>;
|
|
522
|
+
registerUser(userData: UserRegistrationRequest): Observable<UserResponse>;
|
|
523
|
+
getAuthConfig(): Observable<AuthConfig>;
|
|
524
|
+
getRegistrationStatus(): Observable<RegistrationStatus>;
|
|
525
|
+
changePassword(passwordData: PasswordChangeRequest): Observable<PasswordChangeResponse>;
|
|
526
|
+
updateProfile(profileData: UserProfileUpdateRequest): Observable<UserResponse>;
|
|
527
|
+
requestEmailChange(emailData: EmailChangeRequest): Observable<{
|
|
528
|
+
message: string;
|
|
529
|
+
new_email: string;
|
|
530
|
+
}>;
|
|
531
|
+
confirmEmailChange(confirmData: EmailChangeConfirmRequest): Observable<{
|
|
532
|
+
message: string;
|
|
533
|
+
}>;
|
|
534
|
+
resetUserPassword(userId: number, passwordData: AdminPasswordResetRequest): Observable<PasswordChangeResponse>;
|
|
535
|
+
requestPasswordReset(resetData: PasswordResetRequest): Observable<PasswordChangeResponse>;
|
|
536
|
+
confirmPasswordReset(confirmData: PasswordResetConfirmRequest): Observable<PasswordChangeResponse>;
|
|
537
|
+
linkOrcid(orcidData: {
|
|
538
|
+
orcidId: string;
|
|
539
|
+
verificationCode?: string;
|
|
540
|
+
}): Observable<any>;
|
|
541
|
+
unlinkOrcid(): Observable<PasswordChangeResponse>;
|
|
542
|
+
detectDuplicateAccounts(searchData: {
|
|
543
|
+
email?: string;
|
|
544
|
+
orcidId?: string;
|
|
545
|
+
firstName?: string;
|
|
546
|
+
lastName?: string;
|
|
547
|
+
}): Observable<any>;
|
|
548
|
+
requestAccountMerge(mergeData: {
|
|
549
|
+
duplicateUserId: number;
|
|
550
|
+
reason: string;
|
|
551
|
+
}): Observable<any>;
|
|
552
|
+
getAnnotationFolders(params?: {
|
|
553
|
+
search?: string;
|
|
554
|
+
parentFolder?: number;
|
|
555
|
+
isSharedDocumentFolder?: boolean;
|
|
556
|
+
labGroup?: number;
|
|
557
|
+
limit?: number;
|
|
558
|
+
offset?: number;
|
|
559
|
+
}): Observable<{
|
|
560
|
+
count: number;
|
|
561
|
+
results: AnnotationFolder[];
|
|
562
|
+
}>;
|
|
563
|
+
getAnnotationFolder(id: number): Observable<AnnotationFolder>;
|
|
564
|
+
createAnnotationFolder(folderData: AnnotationFolderCreateRequest): Observable<AnnotationFolder>;
|
|
565
|
+
updateAnnotationFolder(id: number, folderData: AnnotationFolderUpdateRequest): Observable<AnnotationFolder>;
|
|
566
|
+
deleteAnnotationFolder(id: number): Observable<void>;
|
|
567
|
+
getAnnotations(params?: {
|
|
568
|
+
search?: string;
|
|
569
|
+
annotationType?: string;
|
|
570
|
+
folder?: number;
|
|
571
|
+
transcribed?: boolean;
|
|
572
|
+
scratched?: boolean;
|
|
573
|
+
labGroup?: number;
|
|
574
|
+
limit?: number;
|
|
575
|
+
offset?: number;
|
|
576
|
+
}): Observable<{
|
|
577
|
+
count: number;
|
|
578
|
+
results: Annotation[];
|
|
579
|
+
}>;
|
|
580
|
+
getAnnotation(id: number): Observable<Annotation>;
|
|
581
|
+
createAnnotation(annotationData: AnnotationCreateRequest): Observable<Annotation>;
|
|
582
|
+
updateAnnotation(id: number, annotationData: AnnotationUpdateRequest): Observable<Annotation>;
|
|
583
|
+
deleteAnnotation(id: number): Observable<void>;
|
|
584
|
+
getResourcePermissions(params?: {
|
|
585
|
+
user?: number;
|
|
586
|
+
resourceContentType?: number;
|
|
587
|
+
resourceObjectId?: number;
|
|
588
|
+
role?: string;
|
|
589
|
+
limit?: number;
|
|
590
|
+
offset?: number;
|
|
591
|
+
}): Observable<{
|
|
592
|
+
count: number;
|
|
593
|
+
results: ResourcePermission[];
|
|
594
|
+
}>;
|
|
595
|
+
getResourcePermission(id: number): Observable<ResourcePermission>;
|
|
596
|
+
createResourcePermission(permissionData: ResourcePermissionCreateRequest): Observable<ResourcePermission>;
|
|
597
|
+
updateResourcePermission(id: number, permissionData: ResourcePermissionUpdateRequest): Observable<ResourcePermission>;
|
|
598
|
+
deleteResourcePermission(id: number): Observable<void>;
|
|
599
|
+
createBulkPermissions(bulkData: BulkPermissionRequest): Observable<{
|
|
600
|
+
created: ResourcePermission[];
|
|
601
|
+
errors: any[];
|
|
602
|
+
}>;
|
|
603
|
+
getResourcePermissionsByResource(resourceContentType: number, resourceObjectId: number): Observable<ResourcePermission[]>;
|
|
604
|
+
getRemoteHosts(params?: {
|
|
605
|
+
search?: string;
|
|
606
|
+
hostName?: string;
|
|
607
|
+
hostProtocol?: string;
|
|
608
|
+
limit?: number;
|
|
609
|
+
offset?: number;
|
|
610
|
+
}): Observable<{
|
|
611
|
+
count: number;
|
|
612
|
+
results: RemoteHost[];
|
|
613
|
+
}>;
|
|
614
|
+
getRemoteHost(id: number): Observable<RemoteHost>;
|
|
615
|
+
createRemoteHost(hostData: RemoteHostCreateRequest): Observable<RemoteHost>;
|
|
616
|
+
updateRemoteHost(id: number, hostData: RemoteHostUpdateRequest): Observable<RemoteHost>;
|
|
617
|
+
deleteRemoteHost(id: number): Observable<void>;
|
|
618
|
+
testRemoteHostConnection(id: number): Observable<{
|
|
619
|
+
success: boolean;
|
|
620
|
+
message: string;
|
|
621
|
+
}>;
|
|
622
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ApiService, never>;
|
|
623
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ApiService>;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
/**
|
|
627
|
+
* Base API service with systematic case transformation
|
|
628
|
+
* All other API services should extend this to get automatic snake_case <-> camelCase conversion
|
|
629
|
+
*/
|
|
630
|
+
declare class BaseApiService {
|
|
631
|
+
protected http: HttpClient;
|
|
632
|
+
private config;
|
|
633
|
+
protected apiUrl: string;
|
|
634
|
+
/**
|
|
635
|
+
* Transform camelCase object to snake_case for API requests
|
|
636
|
+
*/
|
|
637
|
+
protected transformToSnakeCase(obj: any): any;
|
|
638
|
+
/**
|
|
639
|
+
* Transform snake_case object to camelCase for TypeScript interfaces
|
|
640
|
+
*/
|
|
641
|
+
protected transformToCamelCase(obj: any): any;
|
|
642
|
+
/**
|
|
643
|
+
* Make HTTP GET request with automatic snake_case to camelCase transformation
|
|
644
|
+
*/
|
|
645
|
+
protected get<T>(url: string, options?: any): Observable<T>;
|
|
646
|
+
/**
|
|
647
|
+
* Make HTTP POST request with automatic camelCase to snake_case transformation
|
|
648
|
+
*/
|
|
649
|
+
protected post<T>(url: string, body: any, options?: any): Observable<T>;
|
|
650
|
+
/**
|
|
651
|
+
* Make HTTP PUT request with automatic camelCase to snake_case transformation
|
|
652
|
+
*/
|
|
653
|
+
protected put<T>(url: string, body: any, options?: any): Observable<T>;
|
|
654
|
+
/**
|
|
655
|
+
* Make HTTP PATCH request with automatic camelCase to snake_case transformation
|
|
656
|
+
*/
|
|
657
|
+
protected patch<T>(url: string, body: any, options?: any): Observable<T>;
|
|
658
|
+
/**
|
|
659
|
+
* Make HTTP DELETE request with automatic snake_case to camelCase transformation
|
|
660
|
+
*/
|
|
661
|
+
protected delete<T>(url: string, options?: any): Observable<T>;
|
|
662
|
+
/**
|
|
663
|
+
* Build HttpParams from query parameters object with automatic case transformation
|
|
664
|
+
*/
|
|
665
|
+
protected buildHttpParams(params: any): HttpParams;
|
|
666
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<BaseApiService, never>;
|
|
667
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<BaseApiService>;
|
|
668
|
+
}
|
|
669
|
+
|
|
670
|
+
declare class SiteConfigService extends BaseApiService {
|
|
671
|
+
private readonly defaultConfig;
|
|
672
|
+
private configSubject;
|
|
673
|
+
config$: Observable<SiteConfig>;
|
|
674
|
+
constructor();
|
|
675
|
+
private loadConfig;
|
|
676
|
+
private fetchConfigFromBackend;
|
|
677
|
+
getCurrentConfig(): Observable<SiteConfig>;
|
|
678
|
+
updateConfig(config: Partial<SiteConfig>): Observable<SiteConfig>;
|
|
679
|
+
getSiteName(): string;
|
|
680
|
+
shouldShowPoweredBy(): boolean;
|
|
681
|
+
getLogoUrl(): string | null;
|
|
682
|
+
getPrimaryColor(): string;
|
|
683
|
+
isRegistrationEnabled(): boolean;
|
|
684
|
+
isOrcidLoginEnabled(): boolean;
|
|
685
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiteConfigService, never>;
|
|
686
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<SiteConfigService>;
|
|
687
|
+
}
|
|
688
|
+
|
|
689
|
+
interface ToastMessage {
|
|
690
|
+
id: string;
|
|
691
|
+
message: string;
|
|
692
|
+
type: 'success' | 'error' | 'warning' | 'info';
|
|
693
|
+
duration?: number;
|
|
694
|
+
dismissible?: boolean;
|
|
695
|
+
}
|
|
696
|
+
declare class ToastService {
|
|
697
|
+
private toastsSignal;
|
|
698
|
+
readonly toasts: _angular_core.Signal<ToastMessage[]>;
|
|
699
|
+
show(message: string, type?: 'success' | 'error' | 'warning' | 'info', duration?: number): void;
|
|
700
|
+
success(message: string, duration?: number): void;
|
|
701
|
+
error(message: string, duration?: number): void;
|
|
702
|
+
warning(message: string, duration?: number): void;
|
|
703
|
+
info(message: string, duration?: number): void;
|
|
704
|
+
remove(id: string): void;
|
|
705
|
+
clear(): void;
|
|
706
|
+
private generateId;
|
|
707
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ToastService, never>;
|
|
708
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ToastService>;
|
|
709
|
+
}
|
|
710
|
+
|
|
711
|
+
declare class UserManagementService {
|
|
712
|
+
private apiService;
|
|
713
|
+
private authService;
|
|
714
|
+
private usersSubject;
|
|
715
|
+
users$: Observable<User[]>;
|
|
716
|
+
private totalUsersSubject;
|
|
717
|
+
totalUsers$: Observable<number>;
|
|
718
|
+
constructor();
|
|
719
|
+
getUserProfile(): Observable<{
|
|
720
|
+
user: User;
|
|
721
|
+
}>;
|
|
722
|
+
updateProfile(profileData: UserProfileUpdateRequest): Observable<UserResponse>;
|
|
723
|
+
changePassword(passwordData: PasswordChangeRequest): Observable<{
|
|
724
|
+
message: string;
|
|
725
|
+
}>;
|
|
726
|
+
requestEmailChange(emailData: EmailChangeRequest): Observable<{
|
|
727
|
+
message: string;
|
|
728
|
+
new_email: string;
|
|
729
|
+
}>;
|
|
730
|
+
getUsers(params?: {
|
|
731
|
+
isStaff?: boolean;
|
|
732
|
+
isActive?: boolean;
|
|
733
|
+
search?: string;
|
|
734
|
+
page?: number;
|
|
735
|
+
pageSize?: number;
|
|
736
|
+
}): Observable<PaginatedResponse<User>>;
|
|
737
|
+
getUser(id: number): Observable<User>;
|
|
738
|
+
createUser(userData: UserCreateRequest): Observable<UserResponse>;
|
|
739
|
+
updateUser(id: number, userData: Partial<User>): Observable<User>;
|
|
740
|
+
deleteUser(id: number): Observable<void>;
|
|
741
|
+
resetUserPassword(userId: number, passwordData: AdminPasswordResetRequest): Observable<PasswordChangeResponse>;
|
|
742
|
+
getUserDisplayName(user: User | null): string;
|
|
743
|
+
formatDate(dateString?: string): string;
|
|
744
|
+
isCurrentUserAdmin(): boolean;
|
|
745
|
+
isCurrentUserSuperuser(): boolean;
|
|
746
|
+
updateUsersState(users: User[], total: number): void;
|
|
747
|
+
getCurrentUsers(): User[];
|
|
748
|
+
getCurrentTotalUsers(): number;
|
|
749
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserManagementService, never>;
|
|
750
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<UserManagementService>;
|
|
751
|
+
}
|
|
752
|
+
|
|
753
|
+
declare class ResourceService {
|
|
754
|
+
convertLegacyVisibility(isPublic: boolean | undefined, isDefault?: boolean): ResourceVisibility;
|
|
755
|
+
convertToLegacyVisibility(visibility: ResourceVisibility): boolean;
|
|
756
|
+
getVisibilityLabel(visibility: ResourceVisibility): string;
|
|
757
|
+
getRoleLabel(role: ResourceRole): string;
|
|
758
|
+
canPerformAction(resource: BaseResource, action: 'view' | 'edit' | 'delete' | 'share'): boolean;
|
|
759
|
+
getVisibilityOptions(): Array<{
|
|
760
|
+
value: ResourceVisibility;
|
|
761
|
+
label: string;
|
|
762
|
+
description: string;
|
|
763
|
+
}>;
|
|
764
|
+
getRoleOptions(): Array<{
|
|
765
|
+
value: ResourceRole;
|
|
766
|
+
label: string;
|
|
767
|
+
description: string;
|
|
768
|
+
}>;
|
|
769
|
+
transformLegacyResource<T extends Partial<BaseResource>>(legacyData: any): T;
|
|
770
|
+
prepareForAPI<T extends Record<string, any>>(resourceData: T): any;
|
|
771
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ResourceService, never>;
|
|
772
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<ResourceService>;
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
interface LabGroupQueryParams {
|
|
776
|
+
search?: string;
|
|
777
|
+
limit?: number;
|
|
778
|
+
offset?: number;
|
|
779
|
+
}
|
|
780
|
+
interface LabGroupInvitationQueryParams {
|
|
781
|
+
labGroup?: number;
|
|
782
|
+
status?: string;
|
|
783
|
+
limit?: number;
|
|
784
|
+
offset?: number;
|
|
785
|
+
}
|
|
786
|
+
declare class LabGroupService extends BaseApiService {
|
|
787
|
+
getLabGroups(params?: LabGroupQueryParams): Observable<LabGroupQueryResponse>;
|
|
788
|
+
getMyLabGroups(params?: LabGroupQueryParams): Observable<LabGroupQueryResponse>;
|
|
789
|
+
createLabGroup(labGroup: LabGroupCreateRequest): Observable<LabGroup>;
|
|
790
|
+
updateLabGroup(id: number, labGroup: Partial<LabGroup>): Observable<LabGroup>;
|
|
791
|
+
deleteLabGroup(id: number): Observable<void>;
|
|
792
|
+
getLabGroupMembers(id: number): Observable<LabGroupMember[]>;
|
|
793
|
+
inviteUserToLabGroup(id: number, invitation: LabGroupInvitationCreateRequest): Observable<LabGroupInvitation>;
|
|
794
|
+
leaveLabGroup(id: number): Observable<{
|
|
795
|
+
message: string;
|
|
796
|
+
}>;
|
|
797
|
+
removeMemberFromLabGroup(id: number, userId: number): Observable<{
|
|
798
|
+
message: string;
|
|
799
|
+
}>;
|
|
800
|
+
getLabGroupInvitations(params?: LabGroupInvitationQueryParams): Observable<LabGroupInvitationQueryResponse>;
|
|
801
|
+
getMyPendingInvitations(): Observable<LabGroupInvitation[]>;
|
|
802
|
+
acceptLabGroupInvitation(id: number): Observable<{
|
|
803
|
+
message: string;
|
|
804
|
+
invitation: LabGroupInvitation;
|
|
805
|
+
}>;
|
|
806
|
+
rejectLabGroupInvitation(id: number): Observable<{
|
|
807
|
+
message: string;
|
|
808
|
+
invitation: LabGroupInvitation;
|
|
809
|
+
}>;
|
|
810
|
+
cancelLabGroupInvitation(id: number): Observable<{
|
|
811
|
+
message: string;
|
|
812
|
+
}>;
|
|
813
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LabGroupService, never>;
|
|
814
|
+
static ɵprov: _angular_core.ɵɵInjectableDeclaration<LabGroupService>;
|
|
815
|
+
}
|
|
816
|
+
|
|
817
|
+
declare const authGuard: CanActivateFn;
|
|
818
|
+
|
|
819
|
+
declare const adminGuard: CanActivateFn;
|
|
820
|
+
|
|
821
|
+
declare const authInterceptor: HttpInterceptorFn;
|
|
822
|
+
|
|
823
|
+
declare class LoginComponent implements OnInit {
|
|
824
|
+
private authService;
|
|
825
|
+
private fb;
|
|
826
|
+
private router;
|
|
827
|
+
private route;
|
|
828
|
+
private siteConfigService;
|
|
829
|
+
private apiService;
|
|
830
|
+
loginForm: FormGroup;
|
|
831
|
+
loading: _angular_core.WritableSignal<boolean>;
|
|
832
|
+
error: _angular_core.WritableSignal<string | null>;
|
|
833
|
+
success: _angular_core.WritableSignal<string | null>;
|
|
834
|
+
siteConfig$: rxjs.Observable<_noatgnu_cupcake_core.SiteConfig>;
|
|
835
|
+
authConfig: _angular_core.WritableSignal<AuthConfig | null>;
|
|
836
|
+
registrationStatus: _angular_core.WritableSignal<RegistrationStatus | null>;
|
|
837
|
+
constructor();
|
|
838
|
+
private returnUrl;
|
|
839
|
+
ngOnInit(): void;
|
|
840
|
+
/**
|
|
841
|
+
* Load authentication configuration to determine available login options
|
|
842
|
+
*/
|
|
843
|
+
private loadAuthConfig;
|
|
844
|
+
/**
|
|
845
|
+
* Handle traditional username/password login
|
|
846
|
+
*/
|
|
847
|
+
onSubmit(): void;
|
|
848
|
+
/**
|
|
849
|
+
* Initiate ORCID OAuth login
|
|
850
|
+
*/
|
|
851
|
+
loginWithORCID(): void;
|
|
852
|
+
/**
|
|
853
|
+
* Handle ORCID OAuth callback
|
|
854
|
+
*/
|
|
855
|
+
private handleORCIDCallback;
|
|
856
|
+
/**
|
|
857
|
+
* Clear error message
|
|
858
|
+
*/
|
|
859
|
+
clearError(): void;
|
|
860
|
+
/**
|
|
861
|
+
* Clear success message
|
|
862
|
+
*/
|
|
863
|
+
clearSuccess(): void;
|
|
864
|
+
/**
|
|
865
|
+
* Computed signals for UI display logic
|
|
866
|
+
*/
|
|
867
|
+
shouldShowOrcidLogin: _angular_core.Signal<boolean>;
|
|
868
|
+
shouldShowRegistration: _angular_core.Signal<boolean>;
|
|
869
|
+
shouldShowRegularLogin: _angular_core.Signal<boolean>;
|
|
870
|
+
registrationMessage: _angular_core.Signal<string>;
|
|
871
|
+
/**
|
|
872
|
+
* Navigate to registration page
|
|
873
|
+
*/
|
|
874
|
+
goToRegister(): void;
|
|
875
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LoginComponent, never>;
|
|
876
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<LoginComponent, "app-login", never, {}, {}, never, never, true, never>;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
declare class RegisterComponent implements OnInit {
|
|
880
|
+
private apiService;
|
|
881
|
+
private fb;
|
|
882
|
+
private router;
|
|
883
|
+
private route;
|
|
884
|
+
private siteConfigService;
|
|
885
|
+
registrationForm: FormGroup;
|
|
886
|
+
loading: _angular_core.WritableSignal<boolean>;
|
|
887
|
+
error: _angular_core.WritableSignal<string | null>;
|
|
888
|
+
success: _angular_core.WritableSignal<string | null>;
|
|
889
|
+
siteConfig$: rxjs.Observable<_noatgnu_cupcake_core.SiteConfig>;
|
|
890
|
+
registrationStatus: _angular_core.WritableSignal<RegistrationStatus | null>;
|
|
891
|
+
registrationEnabled: _angular_core.WritableSignal<boolean>;
|
|
892
|
+
private returnUrl;
|
|
893
|
+
constructor();
|
|
894
|
+
ngOnInit(): void;
|
|
895
|
+
/**
|
|
896
|
+
* Check if registration is enabled
|
|
897
|
+
*/
|
|
898
|
+
private checkRegistrationStatus;
|
|
899
|
+
/**
|
|
900
|
+
* Custom validator to check if passwords match
|
|
901
|
+
*/
|
|
902
|
+
private passwordMatchValidator;
|
|
903
|
+
/**
|
|
904
|
+
* Handle form submission
|
|
905
|
+
*/
|
|
906
|
+
onSubmit(): void;
|
|
907
|
+
/**
|
|
908
|
+
* Navigate back to login
|
|
909
|
+
*/
|
|
910
|
+
goToLogin(): void;
|
|
911
|
+
/**
|
|
912
|
+
* Clear error message
|
|
913
|
+
*/
|
|
914
|
+
clearError(): void;
|
|
915
|
+
/**
|
|
916
|
+
* Clear success message
|
|
917
|
+
*/
|
|
918
|
+
clearSuccess(): void;
|
|
919
|
+
/**
|
|
920
|
+
* Get field error message
|
|
921
|
+
*/
|
|
922
|
+
getFieldErrorMessage(fieldName: string): string | null;
|
|
923
|
+
/**
|
|
924
|
+
* Get user-friendly field display name
|
|
925
|
+
*/
|
|
926
|
+
private getFieldDisplayName;
|
|
927
|
+
/**
|
|
928
|
+
* Check if a field has errors and should display error styling
|
|
929
|
+
*/
|
|
930
|
+
hasFieldError(fieldName: string): boolean;
|
|
931
|
+
/**
|
|
932
|
+
* Computed signals for UI display logic
|
|
933
|
+
*/
|
|
934
|
+
isRegistrationDisabled: _angular_core.Signal<boolean>;
|
|
935
|
+
canSubmitForm: _angular_core.Signal<boolean>;
|
|
936
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<RegisterComponent, never>;
|
|
937
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<RegisterComponent, "app-register", never, {}, {}, never, never, true, never>;
|
|
938
|
+
}
|
|
939
|
+
|
|
940
|
+
declare class UserManagementComponent implements OnInit {
|
|
941
|
+
private fb;
|
|
942
|
+
private userManagementService;
|
|
943
|
+
private authService;
|
|
944
|
+
private modalService;
|
|
945
|
+
users: _angular_core.WritableSignal<User[]>;
|
|
946
|
+
totalUsers: _angular_core.WritableSignal<number>;
|
|
947
|
+
isLoading: _angular_core.WritableSignal<boolean>;
|
|
948
|
+
searchForm: FormGroup;
|
|
949
|
+
searchTerm: _angular_core.WritableSignal<string>;
|
|
950
|
+
staffFilter: _angular_core.WritableSignal<string>;
|
|
951
|
+
activeFilter: _angular_core.WritableSignal<string>;
|
|
952
|
+
currentPage: _angular_core.WritableSignal<number>;
|
|
953
|
+
pageSize: _angular_core.WritableSignal<number>;
|
|
954
|
+
selectedUser: _angular_core.WritableSignal<User | null>;
|
|
955
|
+
isCreatingUser: _angular_core.WritableSignal<boolean>;
|
|
956
|
+
isUpdatingUser: _angular_core.WritableSignal<boolean>;
|
|
957
|
+
isDeletingUser: _angular_core.WritableSignal<boolean>;
|
|
958
|
+
isResettingPassword: _angular_core.WritableSignal<boolean>;
|
|
959
|
+
successMessage: _angular_core.WritableSignal<string>;
|
|
960
|
+
errorMessage: _angular_core.WritableSignal<string>;
|
|
961
|
+
Math: Math;
|
|
962
|
+
totalPages: _angular_core.Signal<number>;
|
|
963
|
+
pages: _angular_core.Signal<number[]>;
|
|
964
|
+
showingFrom: _angular_core.Signal<number>;
|
|
965
|
+
showingTo: _angular_core.Signal<number>;
|
|
966
|
+
hasResults: _angular_core.Signal<boolean>;
|
|
967
|
+
canGoToPreviousPage: _angular_core.Signal<boolean>;
|
|
968
|
+
canGoToNextPage: _angular_core.Signal<boolean>;
|
|
969
|
+
isAnyActionInProgress: _angular_core.Signal<boolean>;
|
|
970
|
+
selectedUserDisplayName: _angular_core.Signal<string>;
|
|
971
|
+
hasSelectedUser: _angular_core.Signal<boolean>;
|
|
972
|
+
canCreateUser: _angular_core.Signal<boolean>;
|
|
973
|
+
canUpdateUser: _angular_core.Signal<boolean>;
|
|
974
|
+
canResetPassword: _angular_core.Signal<boolean>;
|
|
975
|
+
constructor();
|
|
976
|
+
ngOnInit(): void;
|
|
977
|
+
loadUsers(): void;
|
|
978
|
+
openCreateUserModal(content: any): void;
|
|
979
|
+
openEditUserModal(content: any, user: User): void;
|
|
980
|
+
openPasswordResetModal(content: any, user: User): void;
|
|
981
|
+
createUser(userData: UserCreateRequest): void;
|
|
982
|
+
updateUser(userId: number, userData: Partial<User>): void;
|
|
983
|
+
deleteUser(user: User): void;
|
|
984
|
+
resetUserPassword(userId: number, passwordData: AdminPasswordResetRequest): void;
|
|
985
|
+
toggleUserStatus(user: User): void;
|
|
986
|
+
toggleStaffStatus(user: User): void;
|
|
987
|
+
onPageChange(page: number): void;
|
|
988
|
+
clearMessages(): void;
|
|
989
|
+
formatDate(dateString?: string): string;
|
|
990
|
+
getUserDisplayName(user: User): string;
|
|
991
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserManagementComponent, never>;
|
|
992
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserManagementComponent, "app-user-management", never, {}, {}, never, never, true, never>;
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
declare class LabGroupsComponent implements OnInit {
|
|
996
|
+
private readonly fb;
|
|
997
|
+
private readonly labGroupService;
|
|
998
|
+
private readonly modalService;
|
|
999
|
+
private readonly toastService;
|
|
1000
|
+
searchForm: FormGroup;
|
|
1001
|
+
createGroupForm: FormGroup;
|
|
1002
|
+
inviteForm: FormGroup;
|
|
1003
|
+
private searchParams;
|
|
1004
|
+
isLoading: _angular_core.WritableSignal<boolean>;
|
|
1005
|
+
isCreatingGroup: _angular_core.WritableSignal<boolean>;
|
|
1006
|
+
isInviting: _angular_core.WritableSignal<boolean>;
|
|
1007
|
+
currentPage: _angular_core.WritableSignal<number>;
|
|
1008
|
+
pageSize: _angular_core.WritableSignal<number>;
|
|
1009
|
+
totalItems: _angular_core.WritableSignal<number>;
|
|
1010
|
+
labGroupsData: _angular_core.WritableSignal<LabGroupQueryResponse>;
|
|
1011
|
+
selectedGroup: _angular_core.WritableSignal<LabGroup | null>;
|
|
1012
|
+
groupMembers: _angular_core.WritableSignal<LabGroupMember[]>;
|
|
1013
|
+
pendingInvitations: _angular_core.WritableSignal<LabGroupInvitation[]>;
|
|
1014
|
+
showCreateForm: _angular_core.WritableSignal<boolean>;
|
|
1015
|
+
showInviteForm: _angular_core.WritableSignal<boolean>;
|
|
1016
|
+
selectedGroupForMembers: _angular_core.WritableSignal<LabGroup | null>;
|
|
1017
|
+
hasLabGroups: _angular_core.Signal<boolean>;
|
|
1018
|
+
showPagination: _angular_core.Signal<boolean>;
|
|
1019
|
+
totalPages: _angular_core.Signal<number>;
|
|
1020
|
+
hasSearchValue: _angular_core.Signal<boolean>;
|
|
1021
|
+
hasGroupMembers: _angular_core.Signal<boolean>;
|
|
1022
|
+
hasPendingInvitations: _angular_core.Signal<boolean>;
|
|
1023
|
+
canInviteToCurrentGroup: _angular_core.Signal<boolean>;
|
|
1024
|
+
canManageCurrentGroup: _angular_core.Signal<boolean>;
|
|
1025
|
+
currentGroupName: _angular_core.Signal<string>;
|
|
1026
|
+
groupMembersCount: _angular_core.Signal<number>;
|
|
1027
|
+
pendingInvitationsCount: _angular_core.Signal<number>;
|
|
1028
|
+
constructor();
|
|
1029
|
+
ngOnInit(): void;
|
|
1030
|
+
private loadInitialData;
|
|
1031
|
+
private setupSearch;
|
|
1032
|
+
private loadLabGroupsWithParams;
|
|
1033
|
+
onPageChange(page: number): void;
|
|
1034
|
+
toggleCreateForm(): void;
|
|
1035
|
+
createLabGroup(): void;
|
|
1036
|
+
viewGroupMembers(group: LabGroup): void;
|
|
1037
|
+
private loadGroupMembers;
|
|
1038
|
+
private loadPendingInvitations;
|
|
1039
|
+
toggleInviteForm(): void;
|
|
1040
|
+
inviteMember(): void;
|
|
1041
|
+
removeMember(userId: number): void;
|
|
1042
|
+
cancelInvitation(invitationId: number): void;
|
|
1043
|
+
leaveGroup(group: LabGroup): void;
|
|
1044
|
+
deleteGroup(group: LabGroup): void;
|
|
1045
|
+
private refreshLabGroups;
|
|
1046
|
+
closeGroupDetails(): void;
|
|
1047
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<LabGroupsComponent, never>;
|
|
1048
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<LabGroupsComponent, "app-lab-groups", never, {}, {}, never, never, true, never>;
|
|
1049
|
+
}
|
|
1050
|
+
|
|
1051
|
+
declare class UserProfileComponent implements OnInit {
|
|
1052
|
+
private fb;
|
|
1053
|
+
private userManagementService;
|
|
1054
|
+
private authService;
|
|
1055
|
+
currentUser: _angular_core.WritableSignal<User | null>;
|
|
1056
|
+
isLoading: _angular_core.WritableSignal<boolean>;
|
|
1057
|
+
profileForm: FormGroup;
|
|
1058
|
+
passwordForm: FormGroup;
|
|
1059
|
+
emailChangeForm: FormGroup;
|
|
1060
|
+
activeTab: _angular_core.WritableSignal<"password" | "email" | "profile" | "account">;
|
|
1061
|
+
isUpdatingProfile: _angular_core.WritableSignal<boolean>;
|
|
1062
|
+
isChangingPassword: _angular_core.WritableSignal<boolean>;
|
|
1063
|
+
isChangingEmail: _angular_core.WritableSignal<boolean>;
|
|
1064
|
+
profileMessage: _angular_core.WritableSignal<string>;
|
|
1065
|
+
passwordMessage: _angular_core.WritableSignal<string>;
|
|
1066
|
+
emailMessage: _angular_core.WritableSignal<string>;
|
|
1067
|
+
errorMessage: _angular_core.WritableSignal<string>;
|
|
1068
|
+
fullName: _angular_core.Signal<string>;
|
|
1069
|
+
isStaff: _angular_core.Signal<boolean>;
|
|
1070
|
+
joinDate: _angular_core.Signal<string>;
|
|
1071
|
+
lastLogin: _angular_core.Signal<string>;
|
|
1072
|
+
constructor();
|
|
1073
|
+
ngOnInit(): void;
|
|
1074
|
+
loadUserProfile(): void;
|
|
1075
|
+
updateProfile(): void;
|
|
1076
|
+
changePassword(): void;
|
|
1077
|
+
requestEmailChange(): void;
|
|
1078
|
+
setActiveTab(tab: 'profile' | 'password' | 'email' | 'account'): void;
|
|
1079
|
+
private passwordMatchValidator;
|
|
1080
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<UserProfileComponent, never>;
|
|
1081
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<UserProfileComponent, "app-user-profile", never, {}, {}, never, never, true, never>;
|
|
1082
|
+
}
|
|
1083
|
+
|
|
1084
|
+
declare class SiteConfigComponent implements OnInit {
|
|
1085
|
+
private fb;
|
|
1086
|
+
private siteConfigService;
|
|
1087
|
+
configForm: FormGroup;
|
|
1088
|
+
loading: _angular_core.WritableSignal<boolean>;
|
|
1089
|
+
error: _angular_core.WritableSignal<string | null>;
|
|
1090
|
+
success: _angular_core.WritableSignal<string | null>;
|
|
1091
|
+
selectedLogoFile: _angular_core.WritableSignal<File | null>;
|
|
1092
|
+
currentConfig: _angular_core.WritableSignal<SiteConfig | null>;
|
|
1093
|
+
previewConfig: _angular_core.Signal<any>;
|
|
1094
|
+
presetColors: string[];
|
|
1095
|
+
constructor();
|
|
1096
|
+
ngOnInit(): void;
|
|
1097
|
+
/**
|
|
1098
|
+
* Update site configuration
|
|
1099
|
+
*/
|
|
1100
|
+
onSubmit(): void;
|
|
1101
|
+
/**
|
|
1102
|
+
* Reset form to current configuration
|
|
1103
|
+
*/
|
|
1104
|
+
resetForm(): void;
|
|
1105
|
+
/**
|
|
1106
|
+
* Handle color change from ngx-color picker
|
|
1107
|
+
*/
|
|
1108
|
+
onColorChange(event: any): void;
|
|
1109
|
+
/**
|
|
1110
|
+
* Get a darker version of the given color for gradients
|
|
1111
|
+
*/
|
|
1112
|
+
getDarkerColor(hex: string): string;
|
|
1113
|
+
/**
|
|
1114
|
+
* Get the current primary color value for styling
|
|
1115
|
+
*/
|
|
1116
|
+
getCurrentPrimaryColor(): string;
|
|
1117
|
+
/**
|
|
1118
|
+
* Clear error message
|
|
1119
|
+
*/
|
|
1120
|
+
clearError(): void;
|
|
1121
|
+
/**
|
|
1122
|
+
* Clear success message
|
|
1123
|
+
*/
|
|
1124
|
+
clearSuccess(): void;
|
|
1125
|
+
/**
|
|
1126
|
+
* Handle logo file selection
|
|
1127
|
+
*/
|
|
1128
|
+
onLogoFileSelected(event: Event): void;
|
|
1129
|
+
/**
|
|
1130
|
+
* Remove selected logo file
|
|
1131
|
+
*/
|
|
1132
|
+
clearLogoFile(): void;
|
|
1133
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiteConfigComponent, never>;
|
|
1134
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<SiteConfigComponent, "app-site-config", never, {}, {}, never, never, true, never>;
|
|
1135
|
+
}
|
|
1136
|
+
|
|
1137
|
+
declare class ToastContainerComponent {
|
|
1138
|
+
private toastService;
|
|
1139
|
+
/**
|
|
1140
|
+
* Signal containing all active toast messages
|
|
1141
|
+
*/
|
|
1142
|
+
toasts: _angular_core.Signal<ToastMessage[]>;
|
|
1143
|
+
/**
|
|
1144
|
+
* Computed signal that maps toast types to their CSS classes
|
|
1145
|
+
*/
|
|
1146
|
+
private toastClassMap;
|
|
1147
|
+
/**
|
|
1148
|
+
* Computed signal that maps toast types to their Bootstrap icons
|
|
1149
|
+
*/
|
|
1150
|
+
private toastIconMap;
|
|
1151
|
+
/**
|
|
1152
|
+
* Removes a toast message from the service
|
|
1153
|
+
*/
|
|
1154
|
+
remove(toast: ToastMessage): void;
|
|
1155
|
+
/**
|
|
1156
|
+
* Gets the CSS class for a toast based on its type
|
|
1157
|
+
*/
|
|
1158
|
+
getToastClass(type: string): string;
|
|
1159
|
+
/**
|
|
1160
|
+
* Gets the Bootstrap icon class for a toast based on its type
|
|
1161
|
+
*/
|
|
1162
|
+
getToastIcon(type: string): string;
|
|
1163
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<ToastContainerComponent, never>;
|
|
1164
|
+
static ɵcmp: _angular_core.ɵɵComponentDeclaration<ToastContainerComponent, "app-toast-container", never, {}, {}, never, never, true, never>;
|
|
1165
|
+
}
|
|
1166
|
+
|
|
1167
|
+
declare class CupcakeCoreModule {
|
|
1168
|
+
static forRoot(config: CupcakeCoreConfig): ModuleWithProviders<CupcakeCoreModule>;
|
|
1169
|
+
static ɵfac: _angular_core.ɵɵFactoryDeclaration<CupcakeCoreModule, never>;
|
|
1170
|
+
static ɵmod: _angular_core.ɵɵNgModuleDeclaration<CupcakeCoreModule, never, [typeof i1.CommonModule, typeof i2.ReactiveFormsModule, typeof i3.HttpClientModule, typeof i4.RouterModule, typeof i5.NgbModule, typeof LoginComponent, typeof RegisterComponent, typeof ToastContainerComponent], [typeof LoginComponent, typeof RegisterComponent, typeof ToastContainerComponent, typeof i1.CommonModule, typeof i2.ReactiveFormsModule, typeof i5.NgbModule]>;
|
|
1171
|
+
static ɵinj: _angular_core.ɵɵInjectorDeclaration<CupcakeCoreModule>;
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
export { ApiService, AuthService, BaseApiService, CUPCAKE_CORE_CONFIG, CupcakeCoreModule, InvitationStatus, InvitationStatusLabels, LabGroupService, LabGroupsComponent, LoginComponent, RegisterComponent, ResourceRole, ResourceRoleLabels, ResourceService, ResourceType, ResourceTypeLabels, ResourceVisibility, ResourceVisibilityLabels, SiteConfigComponent, SiteConfigService, ToastContainerComponent, ToastService, UserManagementComponent, UserManagementService, UserProfileComponent, adminGuard, authGuard, authInterceptor };
|
|
1175
|
+
export type { AccountMergeRequest, AdminPasswordResetRequest, Annotation, AnnotationCreateRequest, AnnotationFolder, AnnotationFolderCreateRequest, AnnotationFolderUpdateRequest, AnnotationUpdateRequest, ApiResponse, AuthConfig, AuthResponse, AuthStatus, BaseResource, BaseTimestampedModel, BulkPermissionRequest, CupcakeCoreConfig, EmailChangeConfirmRequest, EmailChangeConfirmResponse, EmailChangeRequest, InvitationResponseRequest, LabGroup, LabGroupCreateRequest, LabGroupInvitation, LabGroupInvitationCreateRequest, LabGroupInvitationQueryParams, LabGroupInvitationQueryResponse, LabGroupInviteRequest, LabGroupMember, LabGroupQueryParams, LabGroupQueryResponse, LabGroupUpdateRequest, PaginatedResponse, PasswordChangeRequest, PasswordChangeResponse, PasswordResetConfirmRequest, PasswordResetRequest, RegistrationStatus, RemoteHost, RemoteHostCreateRequest, RemoteHostUpdateRequest, ResourcePermission, ResourcePermissionCreateRequest, ResourcePermissionUpdateRequest, ResourceQueryParams, SiteConfig, SiteConfigUpdateRequest, ToastMessage, User, UserCreateRequest, UserListResponse, UserOrcidProfile, UserProfileUpdateRequest, UserRegistrationRequest, UserResponse };
|