@cuby-ui/core 0.0.570 → 0.0.571

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
@@ -11,3 +11,4 @@ export * from './widgets';
11
11
  export * from './operators';
12
12
  export * from './pipes';
13
13
  export * from './i18n';
14
+ export * from './classes';
@@ -0,0 +1,2 @@
1
+ import { type HttpInterceptorFn } from '@angular/common/http';
2
+ export declare const cuiAuthErrorInterceptor: HttpInterceptorFn;
@@ -3,3 +3,4 @@ export { cuiLoaderInterceptor } from './loader.interceptor';
3
3
  export { cuiErrorHandlerInterceptor } from './error-handler.interceptor';
4
4
  export { cuiAuthInterceptor } from './auth.interceptor';
5
5
  export { sseStreamReaderInterceptor } from './sse-stream-reader.interceptor';
6
+ export { cuiAuthErrorInterceptor } from './auth-error.interceptor';
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@cuby-ui/core",
3
- "version": "0.0.570",
3
+ "version": "0.0.571",
4
4
  "peerDependencies": {
5
5
  "@angular/common": ">=18.0.0",
6
6
  "@angular/core": ">=18.0.0",
7
7
  "@angular/elements": ">=18.0.0",
8
8
  "@angular/forms": ">=18.0.0",
9
- "@cuby-ui/api": "^0.0.570",
10
- "@cuby-ui/cdk": "^0.0.570",
11
- "@cuby-ui/icons": "^0.0.570",
9
+ "@cuby-ui/api": "^0.0.571",
10
+ "@cuby-ui/cdk": "^0.0.571",
11
+ "@cuby-ui/icons": "^0.0.571",
12
12
  "@editorjs/editorjs": "2.29.1",
13
13
  "@editorjs/header": "^2.8.1",
14
14
  "@editorjs/list": "^1.9.0",
@@ -1,5 +1,7 @@
1
+ import type { Type } from '@angular/core';
1
2
  import { InjectionToken } from '@angular/core';
2
3
  import type { AuthConfig, OAuthModuleConfig } from 'angular-oauth2-oidc';
4
+ import type { CuiAuthLoginStrategyService } from '../tokens';
3
5
  import type { CuiBrowserAuthService } from '../services/browser-auth.service';
4
6
  import type { CuiMobileAuthService } from '../services/mobile-auth.service';
5
7
  import { CuiAuthBase } from '../services/auth.service';
@@ -11,5 +13,6 @@ export interface CuiAuthProviderConfig {
11
13
  readonly authConfig: CuiAuthConfig;
12
14
  readonly moduleConfig?: OAuthModuleConfig;
13
15
  readonly platform?: CuiAuthPlatform;
16
+ readonly loginStrategy?: Type<CuiAuthLoginStrategyService>;
14
17
  }
15
18
  export declare const CuiAuthService: InjectionToken<CuiBrowserAuthService | CuiMobileAuthService>;
@@ -1,3 +1,3 @@
1
1
  import type { Provider } from '@angular/core';
2
2
  import type { CuiAuthProviderConfig } from './auth.options';
3
- export declare function provideCuiAuth({ authConfig, moduleConfig, platform }: CuiAuthProviderConfig): Provider;
3
+ export declare function provideCuiAuth({ authConfig, moduleConfig, platform, loginStrategy }: CuiAuthProviderConfig): Provider;
@@ -5,4 +5,5 @@ export declare abstract class CuiAuthBase extends CuiTokenBase {
5
5
  createLoginUrl(state?: string, loginHint?: string, customRedirectUri?: string, noPrompt?: boolean, params?: object): Promise<string>;
6
6
  useCheckTokenFlow(loginCallback: () => void): Promise<TokenResponse | void>;
7
7
  initAuthRefreshEvents(loginCallback: () => void): void;
8
+ initAuthFailureEvents(onFailure: () => void): void;
8
9
  }
@@ -0,0 +1,8 @@
1
+ import type { CuiAuthLoginStrategyService } from '../tokens';
2
+ import * as i0 from "@angular/core";
3
+ export declare class CuiBrowserLoginStrategyService implements CuiAuthLoginStrategyService {
4
+ private readonly authService;
5
+ openLogin(): void;
6
+ static ɵfac: i0.ɵɵFactoryDeclaration<CuiBrowserLoginStrategyService, never>;
7
+ static ɵprov: i0.ɵɵInjectableDeclaration<CuiBrowserLoginStrategyService>;
8
+ }
@@ -8,3 +8,4 @@ export * from './auth.service';
8
8
  export * from './token.options';
9
9
  export * from './global-handler-error.service';
10
10
  export * from './hybrid-storage.service';
11
+ export * from './browser-login-strategy.service';
@@ -0,0 +1,5 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ export declare const CUI_AUTH_LOGIN_STRATEGY: InjectionToken<CuiAuthLoginStrategyService>;
3
+ export interface CuiAuthLoginStrategyService {
4
+ openLogin(): void | Promise<void>;
5
+ }
package/tokens/index.d.ts CHANGED
@@ -4,3 +4,4 @@ export * from './viewport';
4
4
  export * from './error-notification-service';
5
5
  export * from './error-translation-prefix';
6
6
  export * from './should-handle-error';
7
+ export * from './auth-login-strategy';
@@ -0,0 +1,2 @@
1
+ import type { EventType } from 'angular-oauth2-oidc';
2
+ export declare function cuiCheckAuthFailureEvent(type: EventType): boolean;
package/utils/index.d.ts CHANGED
@@ -2,3 +2,4 @@ export * from './format';
2
2
  export * from './miscellaneous';
3
3
  export * from './default-validators';
4
4
  export * from './check-fixed-position';
5
+ export * from './check-auth-failure-event';