@baloise/ds-angular-common 0.0.5-snapshot.18-20240228142632

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.
Files changed (36) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +45 -0
  3. package/directives/error.component.d.ts +25 -0
  4. package/directives/focus.directive.d.ts +10 -0
  5. package/esm2020/baloise-ds-angular-common.mjs +5 -0
  6. package/esm2020/directives/error.component.mjs +100 -0
  7. package/esm2020/directives/focus.directive.mjs +31 -0
  8. package/esm2020/index.mjs +12 -0
  9. package/esm2020/providers/angular-delegate.mjs +81 -0
  10. package/esm2020/providers/breakpoints.service.mjs +50 -0
  11. package/esm2020/providers/config.service.mjs +46 -0
  12. package/esm2020/providers/modal.service.mjs +29 -0
  13. package/esm2020/providers/orientation.service.mjs +44 -0
  14. package/esm2020/providers/overlay.mjs +30 -0
  15. package/esm2020/providers/snackbar.service.mjs +26 -0
  16. package/esm2020/providers/toast.service.mjs +26 -0
  17. package/esm2020/utils/config.mjs +2 -0
  18. package/esm2020/utils/token.mjs +12 -0
  19. package/esm2020/utils/utils.mjs +21 -0
  20. package/fesm2015/baloise-ds-angular-common.mjs +489 -0
  21. package/fesm2015/baloise-ds-angular-common.mjs.map +1 -0
  22. package/fesm2020/baloise-ds-angular-common.mjs +472 -0
  23. package/fesm2020/baloise-ds-angular-common.mjs.map +1 -0
  24. package/index.d.ts +13 -0
  25. package/package.json +43 -0
  26. package/providers/angular-delegate.d.ts +24 -0
  27. package/providers/breakpoints.service.d.ts +24 -0
  28. package/providers/config.service.d.ts +29 -0
  29. package/providers/modal.service.d.ts +14 -0
  30. package/providers/orientation.service.d.ts +19 -0
  31. package/providers/overlay.d.ts +27 -0
  32. package/providers/snackbar.service.d.ts +10 -0
  33. package/providers/toast.service.d.ts +10 -0
  34. package/utils/config.d.ts +8 -0
  35. package/utils/token.d.ts +10 -0
  36. package/utils/utils.d.ts +6 -0
@@ -0,0 +1,29 @@
1
+ import { OnDestroy } from '@angular/core';
2
+ import type { BalConfigObserver, BalConfigState, BalIcons, BalLanguage, BalRegion } from '@baloise/ds-core';
3
+ import * as i0 from "@angular/core";
4
+ interface ConfigUtils {
5
+ defaultConfig: any;
6
+ attachToConfig: (observer: BalConfigObserver) => void;
7
+ detachFromConfig: (observer: BalConfigObserver) => void;
8
+ updateBalAllowedLanguages: (allowedLanguages: BalLanguage[]) => void;
9
+ updateBalAnimated: (animated: boolean) => void;
10
+ updateBalIcons: (icons: BalIcons) => void;
11
+ updateBalLanguage: (language: BalLanguage) => void;
12
+ updateBalRegion: (region: BalRegion) => void;
13
+ }
14
+ export declare class BalConfigService implements BalConfigObserver, OnDestroy {
15
+ private config;
16
+ private subject;
17
+ state$: import("rxjs").Observable<{}>;
18
+ constructor(config: ConfigUtils);
19
+ setLanguage(language: BalLanguage): void;
20
+ setRegion(region: BalRegion): void;
21
+ setAnimated(animated: boolean): void;
22
+ setIcons(icons: BalIcons): void;
23
+ setAllowedLanguages(languages: BalLanguage[]): void;
24
+ configChanged(state: BalConfigState): void;
25
+ ngOnDestroy(): void;
26
+ static ɵfac: i0.ɵɵFactoryDeclaration<BalConfigService, never>;
27
+ static ɵprov: i0.ɵɵInjectableDeclaration<BalConfigService>;
28
+ }
29
+ export {};
@@ -0,0 +1,14 @@
1
+ import { ComponentFactoryResolver, Injector } from '@angular/core';
2
+ import type { BalModalController, ModalOptions } from '@baloise/ds-core';
3
+ import { AngularDelegate } from './angular-delegate';
4
+ import { OverlayBaseController } from './overlay';
5
+ import * as i0 from "@angular/core";
6
+ export declare class BalModalService extends OverlayBaseController<ModalOptions, HTMLBalModalElement> {
7
+ private angularDelegate;
8
+ private resolver;
9
+ private injector;
10
+ constructor(angularDelegate: AngularDelegate, resolver: ComponentFactoryResolver, injector: Injector, ctrl: BalModalController);
11
+ create(opts: ModalOptions): Promise<HTMLBalModalElement>;
12
+ static ɵfac: i0.ɵɵFactoryDeclaration<BalModalService, never>;
13
+ static ɵprov: i0.ɵɵInjectableDeclaration<BalModalService>;
14
+ }
@@ -0,0 +1,19 @@
1
+ import { ApplicationRef, OnDestroy } from '@angular/core';
2
+ import { Observable } from 'rxjs';
3
+ import type { BalDevice, BalOrientationInfo, BalOrientationObserver, BalOrientationSubject } from '@baloise/ds-core';
4
+ import * as i0 from "@angular/core";
5
+ export declare class BalOrientationService implements BalOrientationObserver, OnDestroy {
6
+ private app;
7
+ private device;
8
+ private orientationSubject;
9
+ private _orientation$;
10
+ state$: Observable<BalOrientationInfo>;
11
+ portrait$: Observable<boolean>;
12
+ landscape$: Observable<boolean>;
13
+ constructor(app: ApplicationRef, device: BalDevice, orientationSubject: BalOrientationSubject);
14
+ orientationListener(info: BalOrientationInfo): void;
15
+ ngOnDestroy(): void;
16
+ get value(): BalOrientationInfo;
17
+ static ɵfac: i0.ɵɵFactoryDeclaration<BalOrientationService, never>;
18
+ static ɵprov: i0.ɵɵInjectableDeclaration<BalOrientationService>;
19
+ }
@@ -0,0 +1,27 @@
1
+ interface ControllerShape<Opts, HTMLElm> {
2
+ create(options: Opts): Promise<HTMLElm>;
3
+ dismiss(data?: any, role?: string, id?: string): Promise<boolean>;
4
+ dismissAll(data?: any, role?: string): Promise<void>;
5
+ getTop(): Promise<HTMLElm | undefined>;
6
+ }
7
+ export declare class OverlayBaseController<Opts, Overlay> implements ControllerShape<Opts, Overlay> {
8
+ private ctrl;
9
+ constructor(ctrl: ControllerShape<Opts, Overlay>);
10
+ /**
11
+ * Creates a new overlay
12
+ */
13
+ create(opts?: Opts): Promise<Overlay>;
14
+ /**
15
+ * When `id` is not provided, it dismisses the top overlay.
16
+ */
17
+ dismiss(data?: any, role?: string, id?: string): Promise<boolean>;
18
+ /**
19
+ * Dismisses all overlays
20
+ */
21
+ dismissAll(data?: any, role?: string): Promise<void>;
22
+ /**
23
+ * Returns the top overlay.
24
+ */
25
+ getTop(): Promise<Overlay | undefined>;
26
+ }
27
+ export {};
@@ -0,0 +1,10 @@
1
+ import type { BalSnackbarController, BalSnackbarOptions, Components } from '@baloise/ds-core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class BalSnackbarService {
4
+ private ctrl;
5
+ constructor(ctrl: BalSnackbarController);
6
+ create(options: BalSnackbarOptions): Components.BalSnackbar;
7
+ dismissAll(): Promise<void>;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<BalSnackbarService, never>;
9
+ static ɵprov: i0.ɵɵInjectableDeclaration<BalSnackbarService>;
10
+ }
@@ -0,0 +1,10 @@
1
+ import type { BalToastController, BalToastOptions, Components } from '@baloise/ds-core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class BalToastService {
4
+ private ctrl;
5
+ constructor(ctrl: BalToastController);
6
+ create(options: BalToastOptions): Components.BalToast;
7
+ dismissAll(): Promise<void>;
8
+ static ɵfac: i0.ɵɵFactoryDeclaration<BalToastService, never>;
9
+ static ɵprov: i0.ɵɵInjectableDeclaration<BalToastService>;
10
+ }
@@ -0,0 +1,8 @@
1
+ import type { BalConfig } from '@baloise/ds-core';
2
+ export interface BaloiseDesignSystemAngularConfig {
3
+ defaults?: BalConfig;
4
+ forms?: {
5
+ setInvalid?: boolean;
6
+ invalidateOn?: 'touched' | 'dirty';
7
+ };
8
+ }
@@ -0,0 +1,10 @@
1
+ import { InjectionToken } from '@angular/core';
2
+ export declare const BalTokenUserConfig: InjectionToken<any>;
3
+ export declare const BalTokenConfig: InjectionToken<any>;
4
+ export declare const BalTokenToast: InjectionToken<any>;
5
+ export declare const BalTokenSnackbar: InjectionToken<any>;
6
+ export declare const BalTokenModal: InjectionToken<any>;
7
+ export declare const BalTokenBreakpoints: InjectionToken<any>;
8
+ export declare const BalTokenBreakpointSubject: InjectionToken<any>;
9
+ export declare const BalTokenDevice: InjectionToken<any>;
10
+ export declare const BalTokenOrientationSubject: InjectionToken<any>;
@@ -0,0 +1,6 @@
1
+ export declare const raf: (h: any) => any;
2
+ export declare const parseCustomEvent: <T>(event: CustomEvent<T> | Event) => T;
3
+ export interface ProxyComponent<T> {
4
+ el: T;
5
+ }
6
+ export declare const element: <T>(elementReference: any) => T;