@noatgnu/cupcake-core 1.3.10 → 1.3.11

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/index.d.ts CHANGED
@@ -3,7 +3,7 @@ import { InjectionToken, OnDestroy, OnInit, ModuleWithProviders } from '@angular
3
3
  import * as rxjs from 'rxjs';
4
4
  import { Observable, Subject, BehaviorSubject } from 'rxjs';
5
5
  import * as i3 from '@angular/common/http';
6
- import { HttpClient, HttpParams, HttpInterceptorFn } from '@angular/common/http';
6
+ import { HttpClient, HttpParams, HttpInterceptorFn, HttpInterceptor, HttpRequest, HttpHandler, HttpEvent } from '@angular/common/http';
7
7
  import * as _noatgnu_cupcake_core from '@noatgnu/cupcake-core';
8
8
  import * as i4 from '@angular/router';
9
9
  import { CanActivateFn } from '@angular/router';
@@ -105,6 +105,7 @@ interface SiteConfig extends BaseTimestampedModel {
105
105
  bookingDeletionWindowMinutes: number;
106
106
  whisperCppModel: string;
107
107
  uiFeatures: UIFeatures;
108
+ uiFeaturesWithDefaults: UIFeatures;
108
109
  installedApps: {
109
110
  [appCode: string]: {
110
111
  name: string;
@@ -114,6 +115,8 @@ interface SiteConfig extends BaseTimestampedModel {
114
115
  };
115
116
  };
116
117
  updatedBy?: number;
118
+ demoMode?: boolean;
119
+ demoCleanupIntervalMinutes?: number;
117
120
  }
118
121
  interface SiteConfigUpdateRequest {
119
122
  siteName?: string;
@@ -1072,6 +1075,22 @@ declare class AsyncTaskMonitorService extends BaseApiService implements OnDestro
1072
1075
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<AsyncTaskMonitorService>;
1073
1076
  }
1074
1077
 
1078
+ interface DemoModeInfo {
1079
+ isActive: boolean;
1080
+ cleanupIntervalMinutes: number;
1081
+ lastDetected?: Date;
1082
+ }
1083
+ declare class DemoModeService {
1084
+ private demoModeSubject;
1085
+ demoMode$: Observable<DemoModeInfo>;
1086
+ setDemoMode(isActive: boolean, cleanupInterval?: number): void;
1087
+ isDemoMode(): boolean;
1088
+ getDemoModeInfo(): DemoModeInfo;
1089
+ checkLocalStorage(): void;
1090
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DemoModeService, never>;
1091
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<DemoModeService>;
1092
+ }
1093
+
1075
1094
  interface ToastMessage {
1076
1095
  id: string;
1077
1096
  message: string;
@@ -1133,10 +1152,11 @@ declare class NotificationService {
1133
1152
  }
1134
1153
 
1135
1154
  declare class SiteConfigService extends BaseApiService {
1155
+ private demoModeService;
1136
1156
  private readonly defaultConfig;
1137
1157
  private configSubject;
1138
1158
  config$: Observable<SiteConfig>;
1139
- constructor();
1159
+ constructor(demoModeService: DemoModeService);
1140
1160
  private startPeriodicRefresh;
1141
1161
  private loadConfig;
1142
1162
  refreshConfig(): void;
@@ -1159,6 +1179,7 @@ declare class SiteConfigService extends BaseApiService {
1159
1179
  job_id: string;
1160
1180
  }>;
1161
1181
  getWorkerStatus(): Observable<any>;
1182
+ private handleDemoMode;
1162
1183
  static ɵfac: _angular_core.ɵɵFactoryDeclaration<SiteConfigService, never>;
1163
1184
  static ɵprov: _angular_core.ɵɵInjectableDeclaration<SiteConfigService>;
1164
1185
  }
@@ -1426,6 +1447,14 @@ declare const adminGuard: CanActivateFn;
1426
1447
  declare function resetRefreshState(): void;
1427
1448
  declare const authInterceptor: HttpInterceptorFn;
1428
1449
 
1450
+ declare class DemoModeInterceptor implements HttpInterceptor {
1451
+ private demoModeService;
1452
+ constructor(demoModeService: DemoModeService);
1453
+ intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>>;
1454
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DemoModeInterceptor, never>;
1455
+ static ɵprov: _angular_core.ɵɵInjectableDeclaration<DemoModeInterceptor>;
1456
+ }
1457
+
1429
1458
  declare class LoginComponent implements OnInit {
1430
1459
  private authService;
1431
1460
  private fb;
@@ -1681,7 +1710,7 @@ declare class UserProfileComponent implements OnInit {
1681
1710
  profileForm: FormGroup;
1682
1711
  passwordForm: FormGroup;
1683
1712
  emailChangeForm: FormGroup;
1684
- activeTab: _angular_core.WritableSignal<"email" | "password" | "profile" | "account">;
1713
+ activeTab: _angular_core.WritableSignal<"password" | "email" | "profile" | "account">;
1685
1714
  isUpdatingProfile: _angular_core.WritableSignal<boolean>;
1686
1715
  isChangingPassword: _angular_core.WritableSignal<boolean>;
1687
1716
  isChangingEmail: _angular_core.WritableSignal<boolean>;
@@ -1765,6 +1794,21 @@ declare class SiteConfigComponent implements OnInit {
1765
1794
  static ɵcmp: _angular_core.ɵɵComponentDeclaration<SiteConfigComponent, "ccc-site-config", never, {}, {}, never, never, true, never>;
1766
1795
  }
1767
1796
 
1797
+ declare class DemoModeBannerComponent implements OnInit, OnDestroy {
1798
+ private demoModeService;
1799
+ private destroy$;
1800
+ isDemoMode: boolean;
1801
+ demoModeInfo: DemoModeInfo | null;
1802
+ isCollapsed: boolean;
1803
+ constructor(demoModeService: DemoModeService);
1804
+ ngOnInit(): void;
1805
+ ngOnDestroy(): void;
1806
+ toggleCollapse(): void;
1807
+ getMinutesRemaining(): number;
1808
+ static ɵfac: _angular_core.ɵɵFactoryDeclaration<DemoModeBannerComponent, never>;
1809
+ static ɵcmp: _angular_core.ɵɵComponentDeclaration<DemoModeBannerComponent, "cupcake-demo-mode-banner", never, {}, {}, never, never, true, never>;
1810
+ }
1811
+
1768
1812
  declare class ToastContainerComponent {
1769
1813
  private toastService;
1770
1814
  private cdr;
@@ -1791,5 +1835,5 @@ declare class CupcakeCoreModule {
1791
1835
  static ɵinj: _angular_core.ɵɵInjectorDeclaration<CupcakeCoreModule>;
1792
1836
  }
1793
1837
 
1794
- export { AdminWebSocketService, AnnotationType, ApiService, AsyncTaskMonitorService, AuthService, BaseApiService, CUPCAKE_CORE_CONFIG, CupcakeCoreModule, InvitationStatus, InvitationStatusLabels, LabGroupService, LabGroupsComponent, LoginComponent, NotificationService, PoweredByFooterComponent, RegisterComponent, ResourceRole, ResourceRoleLabels, ResourceService, ResourceType, ResourceTypeLabels, ResourceVisibility, ResourceVisibilityLabels, SiteConfigComponent, SiteConfigService, TASK_STATUS_COLORS, TASK_STATUS_LABELS, TASK_TYPE_LABELS, TaskStatus, TaskType, ThemeService, ToastContainerComponent, ToastService, UserManagementComponent, UserManagementService, UserProfileComponent, WEBSOCKET_ENDPOINT, WEBSOCKET_ENDPOINTS, WebSocketConfigService, WebSocketEndpoints, WebSocketService, adminGuard, authGuard, authInterceptor, resetRefreshState };
1795
- export type { AccountMergeRequest, AdminPasswordResetRequest, Annotation, AnnotationCreateRequest, AnnotationFolder, AnnotationFolderCreateRequest, AnnotationFolderUpdateRequest, AnnotationUpdateRequest, ApiResponse, AsyncTaskCreateResponse, AsyncTaskQueryParams, AsyncTaskStatus, AsyncTaskUpdateNotification, AuthConfig, AuthResponse, AuthStatus, BaseNotification, BaseResource, BaseTimestampedModel, BulkExcelExportRequest, BulkExportRequest, BulkPermissionRequest, ChunkedImportRequest, ConnectionEstablishedNotification, CupcakeCoreConfig, DownloadUrlResponse, EmailChangeConfirmRequest, EmailChangeConfirmResponse, EmailChangeRequest, InvitationResponseRequest, LabGroup, LabGroupCreateRequest, LabGroupInvitation, LabGroupInvitationCreateRequest, LabGroupInvitationQueryParams, LabGroupInvitationQueryResponse, LabGroupInviteRequest, LabGroupMember, LabGroupPathItem, LabGroupPermission, LabGroupPermissionCreateRequest, LabGroupPermissionQueryParams, LabGroupPermissionQueryResponse, LabGroupPermissionUpdateRequest, LabGroupQueryParams, LabGroupQueryResponse, LabGroupUpdateNotification, LabGroupUpdateRequest, MetadataExportRequest, MetadataImportRequest, MetadataTableUpdateNotification, MetadataValidationConfig, MetadataValidationRequest, NotificationAction, NotificationItem, PaginatedResponse, PasswordChangeRequest, PasswordChangeResponse, PasswordResetConfirmRequest, PasswordResetRequest, QueueStats, RegistrationStatus, RemoteHost, RemoteHostCreateRequest, RemoteHostUpdateRequest, ResourcePermission, ResourcePermissionCreateRequest, ResourcePermissionUpdateRequest, ResourceQueryParams, SiteConfig, SiteConfigUpdateRequest, SystemNotification, TaskListItem, TaskResult, Theme, ToastMessage, TranscriptionCompletedNotification, TranscriptionFailedNotification, TranscriptionStartedNotification, UIFeatures, User, UserCreateRequest, UserListResponse, UserOrcidProfile, UserProfileUpdateRequest, UserRegistrationRequest, UserResponse, WebSocketConfig, WebSocketEndpointConfig, WebSocketMessage, WebSocketNotification, Worker, WorkerCurrentJob, WorkerStatusResponse };
1838
+ export { AdminWebSocketService, AnnotationType, ApiService, AsyncTaskMonitorService, AuthService, BaseApiService, CUPCAKE_CORE_CONFIG, CupcakeCoreModule, DemoModeBannerComponent, DemoModeInterceptor, DemoModeService, InvitationStatus, InvitationStatusLabels, LabGroupService, LabGroupsComponent, LoginComponent, NotificationService, PoweredByFooterComponent, RegisterComponent, ResourceRole, ResourceRoleLabels, ResourceService, ResourceType, ResourceTypeLabels, ResourceVisibility, ResourceVisibilityLabels, SiteConfigComponent, SiteConfigService, TASK_STATUS_COLORS, TASK_STATUS_LABELS, TASK_TYPE_LABELS, TaskStatus, TaskType, ThemeService, ToastContainerComponent, ToastService, UserManagementComponent, UserManagementService, UserProfileComponent, WEBSOCKET_ENDPOINT, WEBSOCKET_ENDPOINTS, WebSocketConfigService, WebSocketEndpoints, WebSocketService, adminGuard, authGuard, authInterceptor, resetRefreshState };
1839
+ export type { AccountMergeRequest, AdminPasswordResetRequest, Annotation, AnnotationCreateRequest, AnnotationFolder, AnnotationFolderCreateRequest, AnnotationFolderUpdateRequest, AnnotationUpdateRequest, ApiResponse, AsyncTaskCreateResponse, AsyncTaskQueryParams, AsyncTaskStatus, AsyncTaskUpdateNotification, AuthConfig, AuthResponse, AuthStatus, BaseNotification, BaseResource, BaseTimestampedModel, BulkExcelExportRequest, BulkExportRequest, BulkPermissionRequest, ChunkedImportRequest, ConnectionEstablishedNotification, CupcakeCoreConfig, DemoModeInfo, DownloadUrlResponse, EmailChangeConfirmRequest, EmailChangeConfirmResponse, EmailChangeRequest, InvitationResponseRequest, LabGroup, LabGroupCreateRequest, LabGroupInvitation, LabGroupInvitationCreateRequest, LabGroupInvitationQueryParams, LabGroupInvitationQueryResponse, LabGroupInviteRequest, LabGroupMember, LabGroupPathItem, LabGroupPermission, LabGroupPermissionCreateRequest, LabGroupPermissionQueryParams, LabGroupPermissionQueryResponse, LabGroupPermissionUpdateRequest, LabGroupQueryParams, LabGroupQueryResponse, LabGroupUpdateNotification, LabGroupUpdateRequest, MetadataExportRequest, MetadataImportRequest, MetadataTableUpdateNotification, MetadataValidationConfig, MetadataValidationRequest, NotificationAction, NotificationItem, PaginatedResponse, PasswordChangeRequest, PasswordChangeResponse, PasswordResetConfirmRequest, PasswordResetRequest, QueueStats, RegistrationStatus, RemoteHost, RemoteHostCreateRequest, RemoteHostUpdateRequest, ResourcePermission, ResourcePermissionCreateRequest, ResourcePermissionUpdateRequest, ResourceQueryParams, SiteConfig, SiteConfigUpdateRequest, SystemNotification, TaskListItem, TaskResult, Theme, ToastMessage, TranscriptionCompletedNotification, TranscriptionFailedNotification, TranscriptionStartedNotification, UIFeatures, User, UserCreateRequest, UserListResponse, UserOrcidProfile, UserProfileUpdateRequest, UserRegistrationRequest, UserResponse, WebSocketConfig, WebSocketEndpointConfig, WebSocketMessage, WebSocketNotification, Worker, WorkerCurrentJob, WorkerStatusResponse };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noatgnu/cupcake-core",
3
- "version": "1.3.10",
3
+ "version": "1.3.11",
4
4
  "description": "A reusable Angular library that provides user management, authentication, and site configuration functionality for cupcake applications.",
5
5
  "keywords": [
6
6
  "angular",