@villedemontreal/angular-ui 19.0.1 → 20.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.
Files changed (99) hide show
  1. package/fesm2022/villedemontreal-angular-ui.mjs +346 -335
  2. package/fesm2022/villedemontreal-angular-ui.mjs.map +1 -1
  3. package/index.d.ts +2385 -3
  4. package/package.json +5 -5
  5. package/lib/alert/alert.component.d.ts +0 -78
  6. package/lib/alert/index.d.ts +0 -2
  7. package/lib/alert/module.d.ts +0 -10
  8. package/lib/avatar/avatar.component.d.ts +0 -26
  9. package/lib/avatar/index.d.ts +0 -2
  10. package/lib/avatar/module.d.ts +0 -8
  11. package/lib/badge/badge.component.d.ts +0 -6
  12. package/lib/badge/index.d.ts +0 -2
  13. package/lib/badge/module.d.ts +0 -8
  14. package/lib/bao.module.d.ts +0 -28
  15. package/lib/breadcrumb/breadcrumb.component.d.ts +0 -12
  16. package/lib/breadcrumb/index.d.ts +0 -2
  17. package/lib/breadcrumb/module.d.ts +0 -9
  18. package/lib/button/button.component.d.ts +0 -47
  19. package/lib/button/index.d.ts +0 -2
  20. package/lib/button/module.d.ts +0 -9
  21. package/lib/card/card.component.d.ts +0 -44
  22. package/lib/card/index.d.ts +0 -2
  23. package/lib/card/module.d.ts +0 -8
  24. package/lib/checkbox/checkbox-group.component.d.ts +0 -25
  25. package/lib/checkbox/checkbox.component.d.ts +0 -152
  26. package/lib/checkbox/index.d.ts +0 -3
  27. package/lib/checkbox/module.d.ts +0 -11
  28. package/lib/common-components/error-text/errorText.component.d.ts +0 -5
  29. package/lib/common-components/guiding-text/guidingText.component.d.ts +0 -5
  30. package/lib/common-components/index.d.ts +0 -5
  31. package/lib/common-components/label-text/labelText.component.d.ts +0 -6
  32. package/lib/common-components/module.d.ts +0 -11
  33. package/lib/common-components/title-text/titleText.component.d.ts +0 -5
  34. package/lib/core/breakpoints.d.ts +0 -7
  35. package/lib/core/colors.d.ts +0 -12
  36. package/lib/core/index.d.ts +0 -2
  37. package/lib/dropdown-menu/dropdown-menu.component.d.ts +0 -174
  38. package/lib/dropdown-menu/index.d.ts +0 -2
  39. package/lib/dropdown-menu/module.d.ts +0 -11
  40. package/lib/file/file-input.component.d.ts +0 -123
  41. package/lib/file/file-intl.d.ts +0 -44
  42. package/lib/file/file-preview.component.d.ts +0 -31
  43. package/lib/file/index.d.ts +0 -4
  44. package/lib/file/module.d.ts +0 -13
  45. package/lib/header-info/header-info.component.d.ts +0 -39
  46. package/lib/header-info/index.d.ts +0 -2
  47. package/lib/header-info/module.d.ts +0 -8
  48. package/lib/hyperlink/hyperlink.component.d.ts +0 -18
  49. package/lib/hyperlink/index.d.ts +0 -2
  50. package/lib/hyperlink/module.d.ts +0 -8
  51. package/lib/icon/bao-icon-registry.d.ts +0 -12
  52. package/lib/icon/icon.component.d.ts +0 -44
  53. package/lib/icon/icons-dictionary.d.ts +0 -4
  54. package/lib/icon/index.d.ts +0 -2
  55. package/lib/icon/module.d.ts +0 -8
  56. package/lib/list/index.d.ts +0 -2
  57. package/lib/list/list.component.d.ts +0 -21
  58. package/lib/list/module.d.ts +0 -8
  59. package/lib/message-bar/index.d.ts +0 -2
  60. package/lib/message-bar/message-bar.component.d.ts +0 -28
  61. package/lib/message-bar/module.d.ts +0 -11
  62. package/lib/modal/index.d.ts +0 -6
  63. package/lib/modal/modal-config.d.ts +0 -116
  64. package/lib/modal/modal-container.d.ts +0 -105
  65. package/lib/modal/modal-directives.d.ts +0 -25
  66. package/lib/modal/modal-ref.d.ts +0 -104
  67. package/lib/modal/modal.d.ts +0 -90
  68. package/lib/modal/module.d.ts +0 -11
  69. package/lib/pagination/index.d.ts +0 -2
  70. package/lib/pagination/module.d.ts +0 -10
  71. package/lib/pagination/pagination.component.d.ts +0 -106
  72. package/lib/radio/index.d.ts +0 -3
  73. package/lib/radio/module.d.ts +0 -13
  74. package/lib/radio/radio-group.component.d.ts +0 -110
  75. package/lib/radio/radio.component.d.ts +0 -112
  76. package/lib/shared/enum/display-mode.d.ts +0 -4
  77. package/lib/shared/index.d.ts +0 -1
  78. package/lib/snack-bar/index.d.ts +0 -6
  79. package/lib/snack-bar/module.d.ts +0 -13
  80. package/lib/snack-bar/simple-snack-bar.component.d.ts +0 -51
  81. package/lib/snack-bar/snack-bar-animations.d.ts +0 -8
  82. package/lib/snack-bar/snack-bar-config.d.ts +0 -51
  83. package/lib/snack-bar/snack-bar-container.d.ts +0 -111
  84. package/lib/snack-bar/snack-bar-ref.d.ts +0 -51
  85. package/lib/snack-bar/snack-bar.d.ts +0 -89
  86. package/lib/summary/index.d.ts +0 -3
  87. package/lib/summary/list-summary.component.d.ts +0 -9
  88. package/lib/summary/module.d.ts +0 -10
  89. package/lib/summary/summary.component.d.ts +0 -47
  90. package/lib/system-header/index.d.ts +0 -2
  91. package/lib/system-header/module.d.ts +0 -9
  92. package/lib/system-header/system-header.component.d.ts +0 -42
  93. package/lib/tabs/index.d.ts +0 -2
  94. package/lib/tabs/module.d.ts +0 -8
  95. package/lib/tabs/tabs.component.d.ts +0 -95
  96. package/lib/tag/index.d.ts +0 -2
  97. package/lib/tag/module.d.ts +0 -8
  98. package/lib/tag/tag.component.d.ts +0 -25
  99. package/public-api.d.ts +0 -25
@@ -1,110 +0,0 @@
1
- import { AfterContentInit, AfterViewInit, ChangeDetectorRef, EventEmitter, InjectionToken } from '@angular/core';
2
- import { ControlValueAccessor } from '@angular/forms';
3
- import { BaoRadioButtonComponent } from '.';
4
- import * as i0 from "@angular/core";
5
- /**
6
- * We have to inject the radio button group and all its children to each child.
7
- */
8
- export declare const BAO_RADIO_GROUP: InjectionToken<BaoRadioButtonGroupComponent>;
9
- export declare class BaoRadioButtonGroupComponent implements AfterContentInit, ControlValueAccessor, AfterViewInit {
10
- private cdr;
11
- /**
12
- * The checkbox group ID. It is set dynamically with an unique ID by default
13
- */
14
- id: string;
15
- /**
16
- * Emit the value of the selected radio button
17
- */
18
- readonly change: EventEmitter<string>;
19
- private staticContainer;
20
- /**
21
- * The aria-describedby for web accessibilty
22
- */
23
- ariaDescribedby: string | null;
24
- private _radios;
25
- private _value;
26
- private _name;
27
- private _selected;
28
- private _isInitialized;
29
- private _disabled;
30
- private _required;
31
- private _uniqueId;
32
- constructor(cdr: ChangeDetectorRef);
33
- /**
34
- * Define the name property of all radio buttons. Default : null
35
- */
36
- get name(): string | null;
37
- /**
38
- * Define the value of the selected radio button. Default : null
39
- */
40
- get value(): string | null;
41
- /**
42
- * Define which radio button is selected. Default : null
43
- */
44
- get selected(): BaoRadioButtonComponent | null;
45
- /**
46
- * Whether the radio button groupd is disabled. Default : false
47
- */
48
- get disabled(): boolean;
49
- /**
50
- * Whether the radio button groupd is required. Default : false
51
- */
52
- get required(): boolean;
53
- set name(value: string | null);
54
- set value(newValue: string | null);
55
- set selected(selected: BaoRadioButtonComponent | null);
56
- set disabled(value: boolean);
57
- set required(value: boolean);
58
- ngAfterContentInit(): void;
59
- ngAfterViewInit(): void;
60
- /**
61
- * Implement ControlValueAccessor
62
- */
63
- writeValue(value: string): void;
64
- /**
65
- * Implement ControlValueAccessor
66
- */
67
- registerOnChange(fn: (value: any) => void): void;
68
- /**
69
- * Implement ControlValueAccessor
70
- */
71
- registerOnTouched(fn: any): void;
72
- /**
73
- * Implement ControlValueAccessor
74
- */
75
- setDisabledState(isDisabled: boolean): void;
76
- /**
77
- * onTouch() called from the button children
78
- */
79
- onGroupTouch(): void;
80
- /**
81
- * Update all radio button name
82
- */
83
- updateRadioButtonNames(): void;
84
- /**
85
- * Define which radio button is selected.
86
- */
87
- updateSelectedRadioFromValue(): void;
88
- /**
89
- * Update checked property on selected radio button
90
- */
91
- checkSelectedRadioButton(): void;
92
- /**
93
- * Emit the value of the new selected radio button
94
- */
95
- emitChangeEvent(): void;
96
- /**
97
- * Call markForCheck function on all radio buttons since one of the parent inputs could't have change meanwhile. Prevent change detection error.
98
- */
99
- markRadiosForCheck(): void;
100
- onContentChange(): void;
101
- onModelChange: (value: any) => void;
102
- /**
103
- * Set the aria-describedby property to bao-guiding-text if available
104
- */
105
- private setAriaDescribedByToDescription;
106
- private showAriaDescribedBy;
107
- private onTouch;
108
- static ɵfac: i0.ɵɵFactoryDeclaration<BaoRadioButtonGroupComponent, never>;
109
- static ɵcmp: i0.ɵɵComponentDeclaration<BaoRadioButtonGroupComponent, "bao-radio-button-group, [bao-radio-button-group], [baoRadioButtonGroup]", ["baoRadioGroup"], { "id": { "alias": "id"; "required": false; }; "name": { "alias": "name"; "required": false; }; "value": { "alias": "value"; "required": false; }; "selected": { "alias": "selected"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; }, { "change": "change"; }, ["staticContainer"], ["*", "bao-error, [bao-error], bao-guiding-text, [bao-guiding-text]"], false, never>;
110
- }
@@ -1,112 +0,0 @@
1
- import { FocusMonitor, FocusOrigin } from '@angular/cdk/a11y';
2
- import { UniqueSelectionDispatcher } from '@angular/cdk/collections';
3
- import { AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, OnInit } from '@angular/core';
4
- import { BaoRadioButtonGroupComponent } from './radio-group.component';
5
- import * as i0 from "@angular/core";
6
- export declare class BaoRadioButtonComponent implements AfterViewInit, OnInit, OnDestroy {
7
- private elementRef;
8
- private cdr;
9
- private focusMonitor;
10
- private radioDispatcher;
11
- /**
12
- * The radio button ID. It is set dynamically with an unique ID by default
13
- */
14
- id: string;
15
- /**
16
- * The aria-label for web accessibility
17
- */
18
- ariaLabel: string | null;
19
- /**
20
- * Whether the radio button has a border and is considered as a card.
21
- */
22
- brandBorder: boolean;
23
- /**
24
- * Whether the radio button is inline.
25
- */
26
- inline: boolean;
27
- /**
28
- * The name property of the radio button
29
- */
30
- name: string | null;
31
- /**
32
- * The visible state of the label
33
- */
34
- hiddenLabel: boolean;
35
- /**
36
- * Emitted boolean on change
37
- */
38
- readonly change: EventEmitter<string>;
39
- /**
40
- * Reference to the input html element
41
- */
42
- private inputElement;
43
- /**
44
- * The radio buttons group
45
- */
46
- radioGroup: BaoRadioButtonGroupComponent;
47
- /**
48
- * The aria-describedby id for web accessibilty
49
- */
50
- ariaDescribedby: string | null;
51
- /**
52
- * The aria-labeledby id for web accessibilty
53
- */
54
- ariaLabelledby: string | null;
55
- /**
56
- * The ID of the input html element
57
- */
58
- inputID: string;
59
- private _checked;
60
- private _disabled;
61
- private _required;
62
- private _value;
63
- private _uniqueId;
64
- constructor(radioGroup: BaoRadioButtonGroupComponent, elementRef: ElementRef<HTMLElement>, cdr: ChangeDetectorRef, focusMonitor: FocusMonitor, radioDispatcher: UniqueSelectionDispatcher);
65
- /**
66
- * Whether the radio button is checked. Default : false
67
- */
68
- get checked(): boolean;
69
- /**
70
- * Define the radio button value. Default : null
71
- */
72
- get value(): string;
73
- /**
74
- * Whether the radio button is disabled. Default : false
75
- */
76
- get disabled(): boolean;
77
- /**
78
- * Whether the radio button is required. Default : false
79
- */
80
- get required(): boolean;
81
- get nativeElement(): HTMLElement;
82
- set checked(value: boolean);
83
- set value(value: string);
84
- set disabled(value: boolean);
85
- set required(value: boolean);
86
- focus(options?: FocusOptions, origin?: FocusOrigin): void;
87
- /**
88
- * Method called from the parent as one of the parent input has changed. Prevent change detection error.
89
- */
90
- markForCheck(): void;
91
- ngOnInit(): void;
92
- ngAfterViewInit(): void;
93
- ngOnDestroy(): void;
94
- /**
95
- * Emit the new value from the selected radio-button and the parent
96
- */
97
- onInputInteraction(event: Event): void;
98
- private emitChangeEvent;
99
- private setDisabled;
100
- /**
101
- * Set the id property to bao-radio-button-description as a description to the input
102
- */
103
- private setAriaDescribedByToDescription;
104
- /** Unregister function for radioDispatcher */
105
- private _removeUniqueSelectionListener;
106
- static ɵfac: i0.ɵɵFactoryDeclaration<BaoRadioButtonComponent, [{ optional: true; }, null, null, null, null]>;
107
- static ɵcmp: i0.ɵɵComponentDeclaration<BaoRadioButtonComponent, "bao-radio-button, [bao-radio-button]", never, { "id": { "alias": "id"; "required": false; }; "ariaLabel": { "alias": "aria-label"; "required": false; }; "brandBorder": { "alias": "brandBorder"; "required": false; }; "inline": { "alias": "inline"; "required": false; }; "name": { "alias": "name"; "required": false; }; "hiddenLabel": { "alias": "hiddenLabel"; "required": false; }; "checked": { "alias": "checked"; "required": false; }; "value": { "alias": "value"; "required": false; }; "disabled": { "alias": "disabled"; "required": false; }; "required": { "alias": "required"; "required": false; }; }, { "change": "change"; }, never, ["*", "bao-radio-button-description, [bao-radio-button-description], [baoRadioButtonDescription]"], false, never>;
108
- }
109
- export declare class BaoRadioDescription {
110
- static ɵfac: i0.ɵɵFactoryDeclaration<BaoRadioDescription, never>;
111
- static ɵdir: i0.ɵɵDirectiveDeclaration<BaoRadioDescription, "bao-radio-button-description, [bao-radio-button-description], [baoRadioButtonDescription]", never, {}, {}, never, never, false, never>;
112
- }
@@ -1,4 +0,0 @@
1
- export declare const enum EDisplayMode {
2
- COMPACT = "compact",
3
- RESPONSIVE = "responsive"
4
- }
@@ -1 +0,0 @@
1
- export * from './enum/display-mode';
@@ -1,6 +0,0 @@
1
- export * from './module';
2
- export * from './snack-bar';
3
- export * from './snack-bar-config';
4
- export * from './snack-bar-ref';
5
- export * from './snack-bar-container';
6
- export * from './simple-snack-bar.component';
@@ -1,13 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./simple-snack-bar.component";
3
- import * as i2 from "./snack-bar-container";
4
- import * as i3 from "@angular/common";
5
- import * as i4 from "@angular/cdk/overlay";
6
- import * as i5 from "@angular/cdk/portal";
7
- import * as i6 from "../button/module";
8
- import * as i7 from "../icon/module";
9
- export declare class BaoSnackBarModule {
10
- static ɵfac: i0.ɵɵFactoryDeclaration<BaoSnackBarModule, never>;
11
- static ɵmod: i0.ɵɵNgModuleDeclaration<BaoSnackBarModule, [typeof i1.BaoSimpleSnackBarComponent, typeof i2.BaoSnackBarContainerComponent], [typeof i3.CommonModule, typeof i4.OverlayModule, typeof i5.PortalModule, typeof i6.BaoButtonModule, typeof i7.BaoIconModule], [typeof i1.BaoSimpleSnackBarComponent, typeof i2.BaoSnackBarContainerComponent]>;
12
- static ɵinj: i0.ɵɵInjectorDeclaration<BaoSnackBarModule>;
13
- }
@@ -1,51 +0,0 @@
1
- import { BaoSnackBarToastType } from './snack-bar-config';
2
- import { BaoSnackBarRef } from './snack-bar-ref';
3
- import * as i0 from "@angular/core";
4
- /**
5
- * Interface for a simple snack bar component that has a message and a single action.
6
- */
7
- export interface ITextOnlySnackBar {
8
- data: {
9
- message: string;
10
- toastType: BaoSnackBarToastType;
11
- actionLabelOrIcon: string;
12
- showClose: boolean;
13
- };
14
- snackBarRef: BaoSnackBarRef<ITextOnlySnackBar>;
15
- action: () => void;
16
- hasAction: boolean;
17
- }
18
- /**
19
- * A component used to open as the default snack bar, matching material spec.
20
- * This should only be used internally by the snack bar service.
21
- */
22
- export declare class BaoSimpleSnackBarComponent implements ITextOnlySnackBar {
23
- snackBarRef: BaoSnackBarRef<BaoSimpleSnackBarComponent>;
24
- showCloseTitle: string;
25
- /** Data that was injected into the snack bar. */
26
- data: {
27
- message: string;
28
- toastType: BaoSnackBarToastType;
29
- actionLabelOrIcon: string;
30
- showClose: boolean;
31
- };
32
- constructor(snackBarRef: BaoSnackBarRef<BaoSimpleSnackBarComponent>, data: any);
33
- /** Returns the politeness */
34
- get politeness(): string;
35
- /** Returns the toast class */
36
- get toastClass(): string;
37
- /** Returns the toast icon */
38
- get toastIcon(): string;
39
- /** Returns the toast icon title */
40
- get toastIconTitle(): string;
41
- /** If the action button should be shown. */
42
- get hasAction(): boolean;
43
- /** If the action is an icon */
44
- get isActionIcon(): boolean;
45
- /** Performs the action on the snack bar. */
46
- action(): void;
47
- /** Closes the snack bar. */
48
- close(): void;
49
- static ɵfac: i0.ɵɵFactoryDeclaration<BaoSimpleSnackBarComponent, never>;
50
- static ɵcmp: i0.ɵɵComponentDeclaration<BaoSimpleSnackBarComponent, "bao-simple-snack-bar", never, {}, {}, never, never, false, never>;
51
- }
@@ -1,8 +0,0 @@
1
- import { AnimationTriggerMetadata } from '@angular/animations';
2
- /**
3
- * Animations used by the Material snack bar.
4
- * @docs-private
5
- */
6
- export declare const matSnackBarAnimations: {
7
- readonly snackBarState: AnimationTriggerMetadata;
8
- };
@@ -1,51 +0,0 @@
1
- import { AriaLivePoliteness } from '@angular/cdk/a11y';
2
- import { Direction } from '@angular/cdk/bidi';
3
- import { InjectionToken, ViewContainerRef } from '@angular/core';
4
- /** Injection token that can be used to access the data that was passed in to a snack bar. */
5
- export declare const BAO_SNACK_BAR_DATA: InjectionToken<any>;
6
- /** Possible values for horizontalPosition on MatSnackBarConfig. */
7
- export type BaoSnackBarHorizontalPosition = 'start' | 'center' | 'end' | 'left' | 'right';
8
- /** Possible values for verticalPosition on MatSnackBarConfig. */
9
- export type BaoSnackBarVerticalPosition = 'top' | 'bottom';
10
- /** Possible types of toast to display the snack bar */
11
- export type BaoSnackBarToastType = 'info' | 'success' | 'danger';
12
- /**
13
- * Configuration used when opening a snack-bar.
14
- */
15
- export declare class BaoSnackBarConfig<D = any> {
16
- /** The message to display in the snackbar. */
17
- message: string;
18
- /** The type of snackbar template to display. */
19
- toastType?: BaoSnackBarToastType;
20
- /**
21
- * The attached action to the snack bar. If the name of the action matches an icon provided as part of
22
- * angular-ui icon dictionnary an icon will be displayed instead of text.
23
- * */
24
- actionLabelOrIcon?: string;
25
- /** Displays the close button when set to true */
26
- showClose?: boolean;
27
- /** The length of time in milliseconds to wait before automatically dismissing the snack bar. */
28
- duration?: number;
29
- /** The politeness level for the MatAriaLiveAnnouncer announcement. */
30
- politeness?: AriaLivePoliteness;
31
- /**
32
- * Message to be announced by the LiveAnnouncer. When opening a snackbar without a custom
33
- * component or template, the announcement message will default to the specified message.
34
- */
35
- announcementMessage?: string;
36
- /**
37
- * The view container that serves as the parent for the snackbar for the purposes of dependency
38
- * injection. Note: this does not affect where the snackbar is inserted in the DOM.
39
- */
40
- viewContainerRef?: ViewContainerRef;
41
- /** Extra CSS classes to be added to the snack bar container. */
42
- panelClass?: string | string[];
43
- /** Text layout direction for the snack bar. */
44
- direction?: Direction;
45
- /** Data being injected into the child component. */
46
- data?: D | null;
47
- /** The horizontal position to place the snack bar. */
48
- horizontalPosition?: BaoSnackBarHorizontalPosition;
49
- /** The vertical position to place the snack bar. */
50
- verticalPosition?: BaoSnackBarVerticalPosition;
51
- }
@@ -1,111 +0,0 @@
1
- import { AnimationEvent } from '@angular/animations';
2
- import { AriaLivePoliteness } from '@angular/cdk/a11y';
3
- import { Platform } from '@angular/cdk/platform';
4
- import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, DomPortal, TemplatePortal } from '@angular/cdk/portal';
5
- import { ChangeDetectorRef, ComponentRef, ElementRef, EmbeddedViewRef, NgZone, OnDestroy } from '@angular/core';
6
- import { Observable, Subject } from 'rxjs';
7
- import { BaoSnackBarConfig } from './snack-bar-config';
8
- import * as i0 from "@angular/core";
9
- /**
10
- * Internal interface for a snack bar container.
11
- * @docs-private
12
- */
13
- export interface IBaoSnackBarContainer {
14
- snackBarConfig: BaoSnackBarConfig;
15
- _onAnnounce: Subject<any>;
16
- _onExit: Subject<any>;
17
- _onEnter: Subject<any>;
18
- enter: () => void;
19
- exit: () => Observable<void>;
20
- attachTemplatePortal: <C>(portal: TemplatePortal<C>) => EmbeddedViewRef<C>;
21
- attachComponentPortal: <T>(portal: ComponentPortal<T>) => ComponentRef<T>;
22
- }
23
- /**
24
- * Internal component that wraps user-provided snack bar content.
25
- * @docs-private
26
- */
27
- export declare class BaoSnackBarContainerComponent extends BasePortalOutlet implements OnDestroy, IBaoSnackBarContainer {
28
- private _ngZone;
29
- private _elementRef;
30
- private _changeDetectorRef;
31
- private _platform;
32
- /** The snack bar configuration. */
33
- snackBarConfig: BaoSnackBarConfig;
34
- /** The portal outlet inside of this container into which the snack bar content will be loaded. */
35
- _portalOutlet: CdkPortalOutlet;
36
- private _document;
37
- private _trackedModals;
38
- /** Subject for notifying that the snack bar has announced to screen readers. */
39
- readonly _onAnnounce: Subject<void>;
40
- /** Subject for notifying that the snack bar has exited from view. */
41
- readonly _onExit: Subject<void>;
42
- /** Subject for notifying that the snack bar has finished entering the view. */
43
- readonly _onEnter: Subject<void>;
44
- /** The state of the snack bar animations. */
45
- _animationState: string;
46
- /** aria-live value for the live region. */
47
- _live: AriaLivePoliteness;
48
- /** The number of milliseconds to wait before announcing the snack bar's content. */
49
- private readonly _announceDelay;
50
- /** The timeout for announcing the snack bar's content. */
51
- private _announceTimeoutId;
52
- /** Whether the component has been destroyed. */
53
- private _destroyed;
54
- /**
55
- * Role of the live region. This is only for Firefox as there is a known issue where Firefox +
56
- * JAWS does not read out aria-live message.
57
- */
58
- _role?: 'status' | 'alert';
59
- /** Unique ID of the aria-live element. */
60
- readonly _liveElementId: string;
61
- constructor(_ngZone: NgZone, _elementRef: ElementRef<HTMLElement>, _changeDetectorRef: ChangeDetectorRef, _platform: Platform,
62
- /** The snack bar configuration. */
63
- snackBarConfig: BaoSnackBarConfig);
64
- /** Attach a component portal as content to this snack bar container. */
65
- attachComponentPortal<T>(portal: ComponentPortal<T>): ComponentRef<T>;
66
- /** Attach a template portal as content to this snack bar container. */
67
- attachTemplatePortal<C>(portal: TemplatePortal<C>): EmbeddedViewRef<C>;
68
- /**
69
- * Attaches a DOM portal to the snack bar container.
70
- * @deprecated To be turned into a method.
71
- * @breaking-change 10.0.0
72
- */
73
- attachDomPortal: (portal: DomPortal) => void;
74
- /** Handle end of animations, updating the state of the snackbar. */
75
- onAnimationEnd(event: AnimationEvent): void;
76
- /** Begin animation of snack bar entrance into view. */
77
- enter(): void;
78
- /** Begin animation of the snack bar exiting from view. */
79
- exit(): Observable<void>;
80
- /** Makes sure the exit callbacks have been invoked when the element is destroyed. */
81
- ngOnDestroy(): void;
82
- /**
83
- * Waits for the zone to settle before removing the element. Helps prevent
84
- * errors where we end up removing an element which is in the middle of an animation.
85
- */
86
- private completeExit;
87
- /** Applies the various positioning and user-configured CSS classes to the snack bar. */
88
- private applySnackBarClasses;
89
- /**
90
- * Called after the portal contents have been attached. Can be
91
- * used to modify the DOM once it's guaranteed to be in place.
92
- */
93
- protected _afterPortalAttached(): void;
94
- /**
95
- * Some browsers won't expose the accessibility node of the live element if there is an
96
- * `aria-modal` and the live element is outside of it. This method works around the issue by
97
- * pointing the `aria-owns` of all modals to the live element.
98
- */
99
- private _exposeToModals;
100
- /** Clears the references to the live element from any modals it was added to. */
101
- private _clearFromModals;
102
- /** Asserts that no content is already attached to the container. */
103
- private assertNotAttached;
104
- /**
105
- * Starts a timeout to move the snack bar content to the live region so screen readers will
106
- * announce it.
107
- */
108
- private screenReaderAnnounce;
109
- static ɵfac: i0.ɵɵFactoryDeclaration<BaoSnackBarContainerComponent, never>;
110
- static ɵcmp: i0.ɵɵComponentDeclaration<BaoSnackBarContainerComponent, "bao-snack-bar-container", never, {}, {}, never, never, false, never>;
111
- }
@@ -1,51 +0,0 @@
1
- import { OverlayRef } from '@angular/cdk/overlay';
2
- import { Observable } from 'rxjs';
3
- import { IBaoSnackBarContainer } from './snack-bar-container';
4
- /** Event that is emitted when a snack bar is dismissed. */
5
- export interface IBaoSnackBarDismiss {
6
- /** Whether the snack bar was dismissed using the action button. */
7
- dismissedByAction: boolean;
8
- }
9
- /**
10
- * Reference to a snack bar dispatched from the snack bar service.
11
- */
12
- export declare class BaoSnackBarRef<T> {
13
- private _overlayRef;
14
- /** The instance of the component making up the content of the snack bar. */
15
- instance: T;
16
- /**
17
- * The instance of the component making up the content of the snack bar.
18
- * @docs-private
19
- */
20
- containerInstance: IBaoSnackBarContainer;
21
- /** Subject for notifying the user that the snack bar has been dismissed. */
22
- private readonly _afterDismissed;
23
- /** Subject for notifying the user that the snack bar has opened and appeared. */
24
- private readonly _afterOpened;
25
- /** Subject for notifying the user that the snack bar action was called. */
26
- private readonly _onAction;
27
- /**
28
- * Timeout ID for the duration setTimeout call. Used to clear the timeout if the snackbar is
29
- * dismissed before the duration passes.
30
- */
31
- private _durationTimeoutId;
32
- /** Whether the snack bar was dismissed using the action button. */
33
- private _dismissedByAction;
34
- constructor(containerInstance: IBaoSnackBarContainer, _overlayRef: OverlayRef);
35
- /** Dismisses the snack bar. */
36
- dismiss(): void;
37
- /** Marks the snackbar action clicked. */
38
- dismissWithAction(): void;
39
- /** Dismisses the snack bar after some duration */
40
- dismissAfter(duration: number): void;
41
- /** Marks the snackbar as opened */
42
- open(): void;
43
- /** Gets an observable that is notified when the snack bar is finished closing. */
44
- afterDismissed(): Observable<IBaoSnackBarDismiss>;
45
- /** Gets an observable that is notified when the snack bar has opened and appeared. */
46
- afterOpened(): Observable<void>;
47
- /** Gets an observable that is notified when the snack bar action is called. */
48
- onAction(): Observable<void>;
49
- /** Cleans up the DOM after closing. */
50
- private finishDismiss;
51
- }
@@ -1,89 +0,0 @@
1
- import { LiveAnnouncer } from '@angular/cdk/a11y';
2
- import { Overlay } from '@angular/cdk/overlay';
3
- import { ComponentType } from '@angular/cdk/portal';
4
- import { EmbeddedViewRef, InjectionToken, Injector, OnDestroy, TemplateRef, Type } from '@angular/core';
5
- import { ITextOnlySnackBar } from './simple-snack-bar.component';
6
- import { BaoSnackBarConfig } from './snack-bar-config';
7
- import { IBaoSnackBarContainer } from './snack-bar-container';
8
- import { BaoSnackBarRef } from './snack-bar-ref';
9
- import * as i0 from "@angular/core";
10
- export declare function baoFactory(): BaoSnackBarConfig<any>;
11
- /** Injection token that can be used to specify default snack bar. */
12
- export declare const BAO_SNACK_BAR_DEFAULT_OPTIONS: InjectionToken<BaoSnackBarConfig<any>>;
13
- /**
14
- * Service to dispatch Material Design snack bar messages.
15
- */
16
- export declare class BaoSnackBarService implements OnDestroy {
17
- private _overlay;
18
- private _live;
19
- private _injector;
20
- private _parentSnackBar;
21
- private _defaultConfig;
22
- /** The component that should be rendered as the snack bar's simple component. */
23
- protected simpleSnackBarComponent: Type<ITextOnlySnackBar>;
24
- /** The container component that attaches the provided template or component. */
25
- protected snackBarContainerComponent: Type<IBaoSnackBarContainer>;
26
- /**
27
- * Reference to the current snack bar in the view *at this level* (in the Angular injector tree).
28
- * If there is a parent snack-bar service, all operations should delegate to that parent
29
- * via `_openedSnackBarRef`.
30
- */
31
- private _snackBarRefAtThisLevel;
32
- constructor(_overlay: Overlay, _live: LiveAnnouncer, _injector: Injector, _parentSnackBar: BaoSnackBarService, _defaultConfig: BaoSnackBarConfig);
33
- /** Reference to the currently opened snackbar at *any* level. */
34
- get _openedSnackBarRef(): BaoSnackBarRef<any> | null;
35
- set _openedSnackBarRef(value: BaoSnackBarRef<any> | null);
36
- /**
37
- * Creates and dispatches a snack bar with a custom component for the content, removing any
38
- * currently opened snack bars.
39
- *
40
- * @param component Component to be instantiated.
41
- * @param config Extra configuration for the snack bar.
42
- */
43
- openFromComponent<T>(component: ComponentType<T>, config?: BaoSnackBarConfig): BaoSnackBarRef<T>;
44
- /**
45
- * Creates and dispatches a snack bar with a custom template for the content, removing any
46
- * currently opened snack bars.
47
- *
48
- * @param template Template to be instantiated.
49
- * @param config Extra configuration for the snack bar.
50
- */
51
- openFromTemplate(template: TemplateRef<any>, config?: BaoSnackBarConfig): BaoSnackBarRef<EmbeddedViewRef<any>>;
52
- /**
53
- * Opens a snackbar with a message and an optional action.
54
- * @param message The message to show in the snackbar.
55
- * @param toastType The type of of toast to display the snackbar.
56
- * @param actionLabelOrIcon The label or icon for the snackbar action.
57
- * @param showClose If true, the snackbar will require user interaction to close.
58
- * @param config Additional configuration options for the snackbar.
59
- */
60
- open(config: BaoSnackBarConfig): BaoSnackBarRef<ITextOnlySnackBar>;
61
- /**
62
- * Dismisses the currently-visible snack bar.
63
- */
64
- dismiss(): void;
65
- ngOnDestroy(): void;
66
- /**
67
- * Attaches the snack bar container component to the overlay.
68
- */
69
- private attachSnackBarContainer;
70
- /**
71
- * Places a new component or a template as the content of the snack bar container.
72
- */
73
- private attach;
74
- /** Animates the old snack bar out and the new one in. */
75
- private animateSnackBar;
76
- /**
77
- * Creates a new overlay and places it in the correct location.
78
- * @param config The user-specified snack bar config.
79
- */
80
- private createOverlay;
81
- /**
82
- * Creates an injector to be used inside of a snack bar component.
83
- * @param config Config that was used to create the snack bar.
84
- * @param snackBarRef Reference to the snack bar.
85
- */
86
- private createInjector;
87
- static ɵfac: i0.ɵɵFactoryDeclaration<BaoSnackBarService, [null, null, null, { optional: true; skipSelf: true; }, null]>;
88
- static ɵprov: i0.ɵɵInjectableDeclaration<BaoSnackBarService>;
89
- }
@@ -1,3 +0,0 @@
1
- export * from './module';
2
- export * from './summary.component';
3
- export * from './list-summary.component';
@@ -1,9 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- export declare class BaoListSummaryItem {
3
- static ɵfac: i0.ɵɵFactoryDeclaration<BaoListSummaryItem, never>;
4
- static ɵcmp: i0.ɵɵComponentDeclaration<BaoListSummaryItem, "bao-list-summary-item, [bao-list-summary-item], [baoListSummaryItem]", never, {}, {}, never, ["*"], false, never>;
5
- }
6
- export declare class BaoListSummary {
7
- static ɵfac: i0.ɵɵFactoryDeclaration<BaoListSummary, never>;
8
- static ɵcmp: i0.ɵɵComponentDeclaration<BaoListSummary, "bao-list-summary, [bao-list-summary], [baoListSummary]", never, {}, {}, never, ["*"], false, never>;
9
- }
@@ -1,10 +0,0 @@
1
- import * as i0 from "@angular/core";
2
- import * as i1 from "./summary.component";
3
- import * as i2 from "./list-summary.component";
4
- import * as i3 from "@angular/common";
5
- import * as i4 from "../common-components/module";
6
- export declare class BaoSummaryModule {
7
- static ɵfac: i0.ɵɵFactoryDeclaration<BaoSummaryModule, never>;
8
- static ɵmod: i0.ɵɵNgModuleDeclaration<BaoSummaryModule, [typeof i1.BaoSummaryComponent, typeof i1.BaoSummaryDescription, typeof i2.BaoListSummary, typeof i2.BaoListSummaryItem], [typeof i3.CommonModule, typeof i4.BaoCommonComponentsModule], [typeof i1.BaoSummaryComponent, typeof i1.BaoSummaryDescription, typeof i2.BaoListSummary, typeof i2.BaoListSummaryItem]>;
9
- static ɵinj: i0.ɵɵInjectorDeclaration<BaoSummaryModule>;
10
- }