@villedemontreal/angular-ui 14.0.1 → 14.2.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 (123) hide show
  1. package/esm2020/lib/alert/alert.component.mjs +2 -2
  2. package/esm2020/lib/alert/index.mjs +3 -3
  3. package/esm2020/lib/alert/module.mjs +2 -2
  4. package/esm2020/lib/avatar/avatar.component.mjs +2 -2
  5. package/esm2020/lib/avatar/index.mjs +2 -2
  6. package/esm2020/lib/avatar/module.mjs +2 -2
  7. package/esm2020/lib/badge/badge.component.mjs +2 -2
  8. package/esm2020/lib/badge/index.mjs +2 -2
  9. package/esm2020/lib/badge/module.mjs +2 -2
  10. package/esm2020/lib/bao.module.mjs +23 -11
  11. package/esm2020/lib/breadcrumb/breadcrumb.component.mjs +2 -2
  12. package/esm2020/lib/breadcrumb/index.mjs +2 -2
  13. package/esm2020/lib/breadcrumb/module.mjs +2 -2
  14. package/esm2020/lib/button/button.component.mjs +3 -3
  15. package/esm2020/lib/button/index.mjs +2 -2
  16. package/esm2020/lib/button/module.mjs +2 -2
  17. package/esm2020/lib/card/card.component.mjs +2 -2
  18. package/esm2020/lib/card/index.mjs +2 -2
  19. package/esm2020/lib/card/module.mjs +2 -2
  20. package/esm2020/lib/checkbox/checkbox-group.component.mjs +2 -2
  21. package/esm2020/lib/checkbox/checkbox.component.mjs +1 -1
  22. package/esm2020/lib/checkbox/index.mjs +2 -2
  23. package/esm2020/lib/checkbox/module.mjs +2 -2
  24. package/esm2020/lib/common-components/error-text/errorText.component.mjs +2 -2
  25. package/esm2020/lib/common-components/guiding-text/guidingText.component.mjs +2 -2
  26. package/esm2020/lib/common-components/index.mjs +2 -2
  27. package/esm2020/lib/common-components/label-text/labelText.component.mjs +4 -4
  28. package/esm2020/lib/common-components/module.mjs +6 -3
  29. package/esm2020/lib/common-components/title-text/titleText.component.mjs +2 -2
  30. package/esm2020/lib/core/breakpoints.mjs +13 -0
  31. package/esm2020/lib/core/colors.mjs +1 -1
  32. package/esm2020/lib/core/index.mjs +8 -0
  33. package/esm2020/lib/dropdown-menu/dropdown-menu.component.mjs +38 -8
  34. package/esm2020/lib/dropdown-menu/index.mjs +2 -2
  35. package/esm2020/lib/dropdown-menu/module.mjs +2 -2
  36. package/esm2020/lib/file/file-input.component.mjs +319 -0
  37. package/esm2020/lib/file/file-intl.mjs +65 -0
  38. package/esm2020/lib/file/file-preview.component.mjs +86 -0
  39. package/esm2020/lib/file/index.mjs +10 -0
  40. package/esm2020/lib/file/module.mjs +56 -0
  41. package/esm2020/lib/header-info/header-info.component.mjs +2 -2
  42. package/esm2020/lib/header-info/index.mjs +2 -2
  43. package/esm2020/lib/header-info/module.mjs +2 -2
  44. package/esm2020/lib/hyperlink/hyperlink.component.mjs +2 -2
  45. package/esm2020/lib/hyperlink/index.mjs +2 -2
  46. package/esm2020/lib/hyperlink/module.mjs +2 -2
  47. package/esm2020/lib/icon/bao-icon-registry.mjs +2 -2
  48. package/esm2020/lib/icon/icon.component.mjs +2 -2
  49. package/esm2020/lib/icon/icons-dictionary.mjs +3 -2
  50. package/esm2020/lib/icon/index.mjs +2 -2
  51. package/esm2020/lib/icon/module.mjs +2 -2
  52. package/esm2020/lib/list/index.mjs +2 -2
  53. package/esm2020/lib/list/list.component.mjs +2 -2
  54. package/esm2020/lib/list/module.mjs +2 -2
  55. package/esm2020/lib/modal/index.mjs +2 -2
  56. package/esm2020/lib/modal/modal-config.mjs +2 -2
  57. package/esm2020/lib/modal/modal-container.mjs +18 -32
  58. package/esm2020/lib/modal/modal-directives.mjs +2 -2
  59. package/esm2020/lib/modal/modal-ref.mjs +4 -1
  60. package/esm2020/lib/modal/modal.mjs +11 -32
  61. package/esm2020/lib/modal/module.mjs +5 -20
  62. package/esm2020/lib/radio/index.mjs +2 -2
  63. package/esm2020/lib/radio/module.mjs +2 -2
  64. package/esm2020/lib/radio/radio-group.component.mjs +2 -2
  65. package/esm2020/lib/radio/radio.component.mjs +1 -1
  66. package/esm2020/lib/shared/enum/display-mode.mjs +1 -1
  67. package/esm2020/lib/shared/index.mjs +2 -2
  68. package/esm2020/lib/snack-bar/index.mjs +12 -0
  69. package/esm2020/lib/snack-bar/module.mjs +51 -0
  70. package/esm2020/lib/snack-bar/simple-snack-bar.component.mjs +92 -0
  71. package/esm2020/lib/snack-bar/snack-bar-animations.mjs +28 -0
  72. package/esm2020/lib/snack-bar/snack-bar-config.mjs +44 -0
  73. package/esm2020/lib/snack-bar/snack-bar-container.mjs +273 -0
  74. package/esm2020/lib/snack-bar/snack-bar-ref.mjs +75 -0
  75. package/esm2020/lib/snack-bar/snack-bar.mjs +251 -0
  76. package/esm2020/lib/summary/index.mjs +2 -2
  77. package/esm2020/lib/summary/list-summary.component.mjs +2 -2
  78. package/esm2020/lib/summary/module.mjs +2 -2
  79. package/esm2020/lib/summary/summary.component.mjs +2 -2
  80. package/esm2020/lib/system-header/index.mjs +8 -0
  81. package/esm2020/lib/system-header/module.mjs +33 -0
  82. package/esm2020/lib/system-header/system-header.component.mjs +128 -0
  83. package/esm2020/lib/tabs/index.mjs +2 -2
  84. package/esm2020/lib/tabs/module.mjs +2 -2
  85. package/esm2020/lib/tabs/tabs.component.mjs +2 -2
  86. package/esm2020/lib/tag/index.mjs +2 -2
  87. package/esm2020/lib/tag/module.mjs +2 -2
  88. package/esm2020/lib/tag/tag.component.mjs +2 -2
  89. package/esm2020/public-api.mjs +5 -2
  90. package/fesm2015/villedemontreal-angular-ui.mjs +1745 -314
  91. package/fesm2015/villedemontreal-angular-ui.mjs.map +1 -1
  92. package/fesm2020/villedemontreal-angular-ui.mjs +1743 -314
  93. package/fesm2020/villedemontreal-angular-ui.mjs.map +1 -1
  94. package/lib/alert/index.d.ts +1 -1
  95. package/lib/bao.module.d.ts +14 -11
  96. package/lib/button/button.component.d.ts +3 -3
  97. package/lib/core/breakpoints.d.ts +7 -0
  98. package/lib/core/index.d.ts +2 -0
  99. package/lib/dropdown-menu/dropdown-menu.component.d.ts +10 -4
  100. package/lib/file/file-input.component.d.ts +123 -0
  101. package/lib/file/file-intl.d.ts +44 -0
  102. package/lib/file/file-preview.component.d.ts +29 -0
  103. package/lib/file/index.d.ts +4 -0
  104. package/lib/file/module.d.ts +13 -0
  105. package/lib/modal/modal-container.d.ts +4 -5
  106. package/lib/modal/modal-ref.d.ts +1 -0
  107. package/lib/modal/modal.d.ts +3 -4
  108. package/lib/modal/module.d.ts +1 -2
  109. package/lib/snack-bar/index.d.ts +6 -0
  110. package/lib/snack-bar/module.d.ts +13 -0
  111. package/lib/snack-bar/simple-snack-bar.component.d.ts +51 -0
  112. package/lib/snack-bar/snack-bar-animations.d.ts +8 -0
  113. package/lib/snack-bar/snack-bar-config.d.ts +55 -0
  114. package/lib/snack-bar/snack-bar-container.d.ts +111 -0
  115. package/lib/snack-bar/snack-bar-ref.d.ts +51 -0
  116. package/lib/snack-bar/snack-bar.d.ts +89 -0
  117. package/lib/system-header/index.d.ts +2 -0
  118. package/lib/system-header/module.d.ts +9 -0
  119. package/lib/system-header/system-header.component.d.ts +41 -0
  120. package/package.json +1 -1
  121. package/public-api.d.ts +3 -0
  122. package/esm2020/lib/modal/modal-animations.mjs +0 -29
  123. package/lib/modal/modal-animations.d.ts +0 -8
@@ -1,2 +1,2 @@
1
- export * from './module';
2
1
  export * from './alert.component';
2
+ export * from './module';
@@ -4,20 +4,23 @@ import * as i2 from "./button/module";
4
4
  import * as i3 from "./alert/module";
5
5
  import * as i4 from "./card/module";
6
6
  import * as i5 from "./breadcrumb/module";
7
- import * as i6 from "./tag/module";
8
- import * as i7 from "./header-info/module";
9
- import * as i8 from "./list/module";
10
- import * as i9 from "./common-components/module";
11
- import * as i10 from "./checkbox/module";
12
- import * as i11 from "./radio/module";
13
- import * as i12 from "./summary/module";
14
- import * as i13 from "./avatar/module";
15
- import * as i14 from "./tabs/module";
16
- import * as i15 from "./modal/module";
7
+ import * as i6 from "./modal/module";
8
+ import * as i7 from "./tag/module";
9
+ import * as i8 from "./header-info/module";
10
+ import * as i9 from "./list/module";
11
+ import * as i10 from "./common-components/module";
12
+ import * as i11 from "./checkbox/module";
13
+ import * as i12 from "./radio/module";
14
+ import * as i13 from "./summary/module";
15
+ import * as i14 from "./avatar/module";
16
+ import * as i15 from "./tabs/module";
17
17
  import * as i16 from "./hyperlink/module";
18
18
  import * as i17 from "./dropdown-menu/module";
19
+ import * as i18 from "./file/module";
20
+ import * as i19 from "./snack-bar/module";
21
+ import * as i20 from "./system-header/module";
19
22
  export declare class BaoModule {
20
23
  static ɵfac: i0.ɵɵFactoryDeclaration<BaoModule, never>;
21
- static ɵmod: i0.ɵɵNgModuleDeclaration<BaoModule, never, [typeof i1.BaoIconModule, typeof i2.BaoButtonModule, typeof i3.BaoAlertModule, typeof i4.BaoCardModule, typeof i5.BaoBreadcrumbModule], [typeof i1.BaoIconModule, typeof i2.BaoButtonModule, typeof i3.BaoAlertModule, typeof i5.BaoBreadcrumbModule, typeof i4.BaoCardModule, typeof i6.BaoTagModule, typeof i7.BaoHeaderInfoModule, typeof i8.BaoListModule, typeof i9.BaoCommonComponentsModule, typeof i10.BaoCheckboxModule, typeof i11.BaoRadioModule, typeof i12.BaoSummaryModule, typeof i13.BaoAvatarModule, typeof i14.BaoTabsModule, typeof i15.BaoModalModule, typeof i16.BaoHyperlinkModule, typeof i17.BaoDropdownMenuModule]>;
24
+ static ɵmod: i0.ɵɵNgModuleDeclaration<BaoModule, never, [typeof i1.BaoIconModule, typeof i2.BaoButtonModule, typeof i3.BaoAlertModule, typeof i4.BaoCardModule, typeof i5.BaoBreadcrumbModule, typeof i6.BaoModalModule], [typeof i1.BaoIconModule, typeof i2.BaoButtonModule, typeof i3.BaoAlertModule, typeof i5.BaoBreadcrumbModule, typeof i4.BaoCardModule, typeof i7.BaoTagModule, typeof i8.BaoHeaderInfoModule, typeof i9.BaoListModule, typeof i10.BaoCommonComponentsModule, typeof i11.BaoCheckboxModule, typeof i12.BaoRadioModule, typeof i13.BaoSummaryModule, typeof i14.BaoAvatarModule, typeof i15.BaoTabsModule, typeof i6.BaoModalModule, typeof i16.BaoHyperlinkModule, typeof i17.BaoDropdownMenuModule, typeof i18.BaoFileModule, typeof i19.BaoSnackBarModule, typeof i20.BaoSystemHeaderModule]>;
22
25
  static ɵinj: i0.ɵɵInjectorDeclaration<BaoModule>;
23
26
  }
@@ -1,6 +1,6 @@
1
- import { AfterViewInit, ChangeDetectorRef, ElementRef } from '@angular/core';
1
+ import { AfterContentInit, ChangeDetectorRef, ElementRef } from '@angular/core';
2
2
  import * as i0 from "@angular/core";
3
- export declare class BaoButtonComponent implements AfterViewInit {
3
+ export declare class BaoButtonComponent implements AfterContentInit {
4
4
  private elementRef;
5
5
  private cdr;
6
6
  /**
@@ -41,7 +41,7 @@ export declare class BaoButtonComponent implements AfterViewInit {
41
41
  rightIcon: boolean;
42
42
  constructor(elementRef: ElementRef<HTMLElement>, cdr: ChangeDetectorRef);
43
43
  get nativeElement(): HTMLElement;
44
- ngAfterViewInit(): void;
44
+ ngAfterContentInit(): void;
45
45
  static ɵfac: i0.ɵɵFactoryDeclaration<BaoButtonComponent, never>;
46
46
  static ɵcmp: i0.ɵɵComponentDeclaration<BaoButtonComponent, "button[bao-button]", never, { "displayType": "displayType"; "level": "level"; "size": "size"; "loading": "loading"; "reversed": "reversed"; "loadingSpinnerAriaLabel": "loadingSpinnerAriaLabel"; "fullWidth": "fullWidth"; }, {}, never, ["*"], false>;
47
47
  }
@@ -0,0 +1,7 @@
1
+ export declare const Breakpoints: {
2
+ XSmall: string;
3
+ Small: string;
4
+ Medium: string;
5
+ Large: string;
6
+ XLarge: string;
7
+ };
@@ -0,0 +1,2 @@
1
+ export * from './colors';
2
+ export * from './breakpoints';
@@ -10,6 +10,10 @@ export declare class BaoDropdownMenuItem implements AfterViewInit, OnChanges {
10
10
  * Is the list item disabled
11
11
  */
12
12
  disabled: boolean;
13
+ /**
14
+ * Emits when menu item is clicked
15
+ */
16
+ itemClicked: EventEmitter<any>;
13
17
  constructor(renderer: Renderer2, elementRef: ElementRef<HTMLElement>, _parent: BaoDropdownMenuComponent);
14
18
  get nativeElement(): HTMLElement;
15
19
  spaceKeyEvent(): void;
@@ -22,13 +26,14 @@ export declare class BaoDropdownMenuItem implements AfterViewInit, OnChanges {
22
26
  private addPaddingClass;
23
27
  private disableItem;
24
28
  /**
25
- * This method propagates a click event to menu item children with inputs (checkbox, radio button)
29
+ * This method propagates a click event to menu item children with inputs (checkbox, radio button).
30
+ * It emits event to close menu if item does not contain an input.
26
31
  */
27
32
  private propagateClick;
28
33
  static ɵfac: i0.ɵɵFactoryDeclaration<BaoDropdownMenuItem, never>;
29
- static ɵdir: i0.ɵɵDirectiveDeclaration<BaoDropdownMenuItem, "bao-dropdown-menu-item, [bao-dropdown-menu-item]", never, { "disabled": "disabled"; }, {}, never, never, false>;
34
+ static ɵdir: i0.ɵɵDirectiveDeclaration<BaoDropdownMenuItem, "bao-dropdown-menu-item, [bao-dropdown-menu-item]", never, { "disabled": "disabled"; }, { "itemClicked": "itemClicked"; }, never, never, false>;
30
35
  }
31
- export declare class BaoDropdownMenuComponent implements AfterViewInit {
36
+ export declare class BaoDropdownMenuComponent implements AfterContentInit, AfterViewInit {
32
37
  private cdr;
33
38
  private renderer;
34
39
  private elementRef;
@@ -78,6 +83,7 @@ export declare class BaoDropdownMenuComponent implements AfterViewInit {
78
83
  /** Prevents focus to be lost when SHIFT + TAB has reached beginning of menu */
79
84
  shiftTabKeyEvent(): void;
80
85
  ngAfterViewInit(): void;
86
+ ngAfterContentInit(): void;
81
87
  focusFirstItem(): void;
82
88
  open(): void;
83
89
  close(): void;
@@ -117,7 +123,7 @@ export declare class BaoDropdownMenuTrigger implements AfterViewInit, OnDestroy
117
123
  escapeKeyEvent(): void;
118
124
  /** Enter key event triggers click event which opens menu,
119
125
  * then focus is put on first item in the menu */
120
- enterKeyEvent(): void;
126
+ enterKeyEvent(event: KeyboardEvent): void;
121
127
  onClick(): void;
122
128
  ngAfterViewInit(): void;
123
129
  ngOnDestroy(): void;
@@ -0,0 +1,123 @@
1
+ import { AfterContentInit, AfterViewInit, ChangeDetectorRef, ElementRef, EventEmitter, OnDestroy, Renderer2 } from '@angular/core';
2
+ import { ControlValueAccessor } from '@angular/forms';
3
+ import { BaoFileIntl } from './file-intl';
4
+ import * as i0 from "@angular/core";
5
+ export declare class BaoFileInputComponent implements AfterContentInit, AfterViewInit, OnDestroy, ControlValueAccessor {
6
+ intl: BaoFileIntl;
7
+ private elementRef;
8
+ private renderer;
9
+ private cdr;
10
+ /**
11
+ * Id of the file input field
12
+ */
13
+ inputId?: string;
14
+ /**
15
+ * Label of field to be displayed above
16
+ */
17
+ label: string;
18
+ /**
19
+ * Size of the file input label
20
+ */
21
+ size: 'small' | 'medium';
22
+ /**
23
+ * Maximum size accepted for uploaded files
24
+ */
25
+ maximalFileSize: number;
26
+ /**
27
+ * Accepted types of files
28
+ */
29
+ acceptedMIMETypes: string[];
30
+ /**
31
+ * Is field required
32
+ */
33
+ required?: boolean;
34
+ /**
35
+ * Is field disabled
36
+ */
37
+ disabled?: boolean;
38
+ /**
39
+ * File selected to be uploaded
40
+ */
41
+ uploadedFile: EventEmitter<File>;
42
+ /**
43
+ * List of files that have been uploaded so far
44
+ */
45
+ private _files;
46
+ /**
47
+ * Form errors when component is used in a form
48
+ */
49
+ private _errorForm;
50
+ /**
51
+ * Error texts
52
+ */
53
+ private _errorTexts;
54
+ /**
55
+ * File input that triggers uploading when clicked
56
+ */
57
+ private uploader;
58
+ private dropzoneElement;
59
+ insertDefaultInstructions: boolean;
60
+ isFileTooBig: boolean;
61
+ isFileTypeInvalid: boolean;
62
+ private _value;
63
+ private _intlChanges;
64
+ private _helperTextId;
65
+ constructor(intl: BaoFileIntl, elementRef: ElementRef<HTMLElement>, renderer: Renderer2, cdr: ChangeDetectorRef);
66
+ get nativeElement(): HTMLElement;
67
+ enterKeyEvent(): void;
68
+ tabKeyEvent(): void;
69
+ shiftTabKeyEvent(): void;
70
+ ngAfterContentInit(): void;
71
+ ngAfterViewInit(): void;
72
+ ngOnDestroy(): void;
73
+ /**
74
+ * Implements ControlValueAccessor interface
75
+ */
76
+ writeValue(obj: any): void;
77
+ /**
78
+ * Implements ControlValueAccessor interface
79
+ */
80
+ registerOnChange(fn: (value: any) => void): void;
81
+ /**
82
+ * Implements ControlValueAccessor interface
83
+ */
84
+ registerOnTouched(fn: any): void;
85
+ /**
86
+ * Implements ControlValueAccessor interface
87
+ */
88
+ setDisabledState(isDisabled: boolean): void;
89
+ uploadFile(file: File): void;
90
+ /**
91
+ * Saves the registerOnChange function so the component can call it whenever it wants.
92
+ */
93
+ propagateChange: (_: any) => void;
94
+ /**
95
+ * Saves the registerOnTouched function so the component can call it whenever it wants.
96
+ */
97
+ propagateTouched: () => void;
98
+ private setValue;
99
+ private setDescribedByAttribute;
100
+ private setErrorTextsAttribute;
101
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaoFileInputComponent, never>;
102
+ static ɵcmp: i0.ɵɵComponentDeclaration<BaoFileInputComponent, "bao-file-input, [bao-file-input]", never, { "inputId": "id"; "label": "label"; "size": "size"; "maximalFileSize": "maximalFileSize"; "acceptedMIMETypes": "acceptedMIMETypes"; "required": "required"; "disabled": "disabled"; }, { "uploadedFile": "uploadedFile"; }, ["_files", "_errorForm"], ["bao-guiding-text", "bao-file-dropzone-instructions", "bao-error", "*"], false>;
103
+ }
104
+ export declare class BaoFileDropDirective {
105
+ fileDrop: EventEmitter<File>;
106
+ private _isDragOver;
107
+ onDragOver(event: DragEvent): void;
108
+ onDragLeave(event: DragEvent): void;
109
+ onDrop(event: DragEvent): void;
110
+ private preventAndStop;
111
+ private getDataTransfer;
112
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaoFileDropDirective, never>;
113
+ static ɵdir: i0.ɵɵDirectiveDeclaration<BaoFileDropDirective, "[baoFileDrop]", never, {}, { "fileDrop": "fileDrop"; }, never, never, false>;
114
+ }
115
+ export declare class BaoFileDropzoneIntructions implements AfterContentInit {
116
+ private renderer;
117
+ private elementRef;
118
+ constructor(renderer: Renderer2, elementRef: ElementRef<HTMLElement>);
119
+ get nativeElement(): HTMLElement;
120
+ ngAfterContentInit(): void;
121
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaoFileDropzoneIntructions, never>;
122
+ static ɵdir: i0.ɵɵDirectiveDeclaration<BaoFileDropzoneIntructions, "bao-file-dropzone-instructions, [bao-file-dropzone-instructions]", never, {}, {}, never, never, false>;
123
+ }
@@ -0,0 +1,44 @@
1
+ import { Optional } from '@angular/core';
2
+ import { Subject } from 'rxjs';
3
+ import * as i0 from "@angular/core";
4
+ /**
5
+ * To modify the labels and text displayed, create a new instance of BaoFileIntl and
6
+ * include it in a custom provider
7
+ */
8
+ export declare class BaoFileIntl {
9
+ /**
10
+ * Stream to emit from when labels are changed. Use this to notify components when the labels have
11
+ * changed after initialization.
12
+ */
13
+ readonly changes: Subject<void>;
14
+ /** The label for button in dropzone */
15
+ dropzoneButtonLabel: string;
16
+ /** The default dropzone instructions */
17
+ defaultDropzoneInstructions: string;
18
+ /** Error message displayed when uploaded file is too large */
19
+ fileTooBigErrorMessage: string;
20
+ /** Error message displayed when uploaded file has an invalid type */
21
+ invalidFileTypeErrorMessage: string;
22
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaoFileIntl, never>;
23
+ static ɵprov: i0.ɵɵInjectableDeclaration<BaoFileIntl>;
24
+ }
25
+ export declare class BaoFileIntlEnglish extends BaoFileIntl {
26
+ /** The label for button in dropzone */
27
+ dropzoneButtonLabel: string;
28
+ /** The default dropzone instructions */
29
+ defaultDropzoneInstructions: string;
30
+ /** Error message displayed when uploaded file is too large */
31
+ fileTooBigErrorMessage: string;
32
+ /** Error message displayed when uploaded file has an invalid type */
33
+ invalidFileTypeErrorMessage: string;
34
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaoFileIntlEnglish, never>;
35
+ static ɵprov: i0.ɵɵInjectableDeclaration<BaoFileIntlEnglish>;
36
+ }
37
+ /** @docs-private */
38
+ export declare function BAO_FILE_INTL_PROVIDER_FACTORY(parentIntl: BaoFileIntl): BaoFileIntl;
39
+ /** @docs-private */
40
+ export declare const BAO_FILE_INTL_PROVIDER: {
41
+ provide: typeof BaoFileIntl;
42
+ deps: Optional[][];
43
+ useFactory: typeof BAO_FILE_INTL_PROVIDER_FACTORY;
44
+ };
@@ -0,0 +1,29 @@
1
+ import { AfterContentInit, ElementRef, Renderer2 } from '@angular/core';
2
+ import * as i0 from "@angular/core";
3
+ export declare class BaoFilePreviewComponent implements AfterContentInit {
4
+ private elementRef;
5
+ private renderer;
6
+ /**
7
+ * Uploaded file to display in list.
8
+ */
9
+ file: File;
10
+ /**
11
+ * Is file loading
12
+ */
13
+ isLoading: boolean;
14
+ /**
15
+ * True if projected content has no icon and file does not have a thumbnail.
16
+ */
17
+ insertGenericIcon: boolean;
18
+ thumbnailURL: string;
19
+ constructor(elementRef: ElementRef<HTMLElement>, renderer: Renderer2);
20
+ get nativeElement(): HTMLElement;
21
+ get fileSize(): string;
22
+ ngAfterContentInit(): void;
23
+ private setIcon;
24
+ private getThumbnail;
25
+ private formatSize;
26
+ private getSizeAndUnit;
27
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaoFilePreviewComponent, never>;
28
+ static ɵcmp: i0.ɵɵComponentDeclaration<BaoFilePreviewComponent, "bao-file-preview, [bao-file-preview]", never, { "file": "file"; "isLoading": "isLoading"; }, {}, never, ["bao-icon", "button[bao-button]", "baoDropdownTriggerFor"], false>;
29
+ }
@@ -0,0 +1,4 @@
1
+ export * from './module';
2
+ export * from './file-input.component';
3
+ export * from './file-preview.component';
4
+ export * from './file-intl';
@@ -0,0 +1,13 @@
1
+ import * as i0 from "@angular/core";
2
+ import * as i1 from "./file-input.component";
3
+ import * as i2 from "./file-preview.component";
4
+ import * as i3 from "@angular/common";
5
+ import * as i4 from "../dropdown-menu/module";
6
+ import * as i5 from "../common-components/module";
7
+ import * as i6 from "../icon/module";
8
+ import * as i7 from "../button/module";
9
+ export declare class BaoFileModule {
10
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaoFileModule, never>;
11
+ static ɵmod: i0.ɵɵNgModuleDeclaration<BaoFileModule, [typeof i1.BaoFileInputComponent, typeof i1.BaoFileDropzoneIntructions, typeof i1.BaoFileDropDirective, typeof i2.BaoFilePreviewComponent], [typeof i3.CommonModule, typeof i4.BaoDropdownMenuModule, typeof i5.BaoCommonComponentsModule, typeof i6.BaoIconModule, typeof i7.BaoButtonModule], [typeof i1.BaoFileInputComponent, typeof i1.BaoFileDropzoneIntructions, typeof i1.BaoFileDropDirective, typeof i2.BaoFilePreviewComponent]>;
12
+ static ɵinj: i0.ɵɵInjectorDeclaration<BaoFileModule>;
13
+ }
@@ -1,4 +1,3 @@
1
- import { AnimationEvent } from '@angular/animations';
2
1
  import { FocusMonitor, FocusOrigin, ConfigurableFocusTrapFactory, InteractivityChecker } from '@angular/cdk/a11y';
3
2
  import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal } from '@angular/cdk/portal';
4
3
  import { ChangeDetectorRef, ComponentRef, ElementRef, EmbeddedViewRef, EventEmitter, NgZone } from '@angular/core';
@@ -88,18 +87,18 @@ export declare abstract class _BaoModalContainerBase extends BasePortalOutlet {
88
87
  private _containsFocus;
89
88
  /** Starts the modal exit animation. */
90
89
  abstract _startExitAnimation(): void;
90
+ abstract _startOpenAnimation(): void;
91
91
  static ɵfac: i0.ɵɵFactoryDeclaration<_BaoModalContainerBase, [null, null, null, { optional: true; }, null, null, null, null]>;
92
92
  static ɵdir: i0.ɵɵDirectiveDeclaration<_BaoModalContainerBase, never, never, {}, {}, never, never, false>;
93
93
  }
94
94
  export declare class BaoModalContainer extends _BaoModalContainerBase {
95
95
  /** State of the modal animation. */
96
96
  _state: 'void' | 'enter' | 'exit';
97
- /** Callback, invoked whenever an animation on the host completes. */
98
- _onAnimationDone({ toState, totalTime }: AnimationEvent): Promise<void>;
99
- /** Callback, invoked when an animation on the host starts. */
100
- _onAnimationStart({ toState, totalTime }: AnimationEvent): void;
97
+ _startOpenAnimation(): void;
101
98
  /** Starts the modal exit animation. */
102
99
  _startExitAnimation(): void;
100
+ private _finishDialogOpen;
101
+ private _openAnimationDone;
103
102
  static ɵfac: i0.ɵɵFactoryDeclaration<BaoModalContainer, never>;
104
103
  static ɵcmp: i0.ɵɵComponentDeclaration<BaoModalContainer, "bao-modal-container", never, {}, {}, never, never, false>;
105
104
  }
@@ -41,6 +41,7 @@ export declare class BaoModalRef<T, R = unknown> {
41
41
  * @param modalResult Optional result to return to the modal opener.
42
42
  */
43
43
  close(modalResult?: R): void;
44
+ startOpenAnimation(): void;
44
45
  /**
45
46
  * Gets an observable that is notified when the modal is finished opening.
46
47
  */
@@ -15,7 +15,6 @@ export declare abstract class BaoModalBase<C extends _BaoModalContainerBase> imp
15
15
  private _modalRefConstructor;
16
16
  private _modalContainerType;
17
17
  private _modalDataToken;
18
- private _animationMode?;
19
18
  readonly afterAllClosed: Observable<void>;
20
19
  private _openModalsAtThisLevel;
21
20
  private readonly _afterAllClosedAtThisLevel;
@@ -24,7 +23,7 @@ export declare abstract class BaoModalBase<C extends _BaoModalContainerBase> imp
24
23
  private _modalAnimatingOpen;
25
24
  private _animationStateSubscriptions;
26
25
  private _lastModalRef;
27
- constructor(_overlay: Overlay, _injector: Injector, _parentModal: BaoModalBase<C> | undefined, _overlayContainer: OverlayContainer, _modalRefConstructor: Type<BaoModalRef<unknown>>, _modalContainerType: Type<C>, _modalDataToken: InjectionToken<unknown>, _animationMode?: 'NoopAnimations' | 'BrowserAnimations');
26
+ constructor(_overlay: Overlay, _injector: Injector, _parentModal: BaoModalBase<C> | undefined, _overlayContainer: OverlayContainer, _modalRefConstructor: Type<BaoModalRef<unknown>>, _modalContainerType: Type<C>, _modalDataToken: InjectionToken<unknown>);
28
27
  /** Keeps track of the currently-open modals. */
29
28
  get openModals(): BaoModalRef<unknown>[];
30
29
  /** Stream that emits when a modal has been opened. */
@@ -85,7 +84,7 @@ export declare abstract class BaoModalBase<C extends _BaoModalContainerBase> imp
85
84
  * Service to open modal.
86
85
  */
87
86
  export declare class BaoModal extends BaoModalBase<BaoModalContainer> {
88
- constructor(overlay: Overlay, injector: Injector, parentModal: BaoModal, overlayContainer: OverlayContainer, animationMode?: 'NoopAnimations' | 'BrowserAnimations');
89
- static ɵfac: i0.ɵɵFactoryDeclaration<BaoModal, [null, null, { optional: true; skipSelf: true; }, null, { optional: true; }]>;
87
+ constructor(overlay: Overlay, injector: Injector, parentModal: BaoModal, overlayContainer: OverlayContainer);
88
+ static ɵfac: i0.ɵɵFactoryDeclaration<BaoModal, [null, null, { optional: true; skipSelf: true; }, null]>;
90
89
  static ɵprov: i0.ɵɵInjectableDeclaration<BaoModal>;
91
90
  }
@@ -4,9 +4,8 @@ import * as i2 from "./modal-directives";
4
4
  import * as i3 from "@angular/common";
5
5
  import * as i4 from "@angular/cdk/overlay";
6
6
  import * as i5 from "@angular/cdk/portal";
7
- import * as i6 from "@angular/platform-browser/animations";
8
7
  export declare class BaoModalModule {
9
8
  static ɵfac: i0.ɵɵFactoryDeclaration<BaoModalModule, never>;
10
- static ɵmod: i0.ɵɵNgModuleDeclaration<BaoModalModule, [typeof i1.BaoModalContainer, typeof i2.BaoModalClose], [typeof i3.CommonModule, typeof i4.OverlayModule, typeof i5.PortalModule, typeof i6.BrowserAnimationsModule, typeof i6.NoopAnimationsModule], [typeof i1.BaoModalContainer, typeof i2.BaoModalClose]>;
9
+ static ɵmod: i0.ɵɵNgModuleDeclaration<BaoModalModule, [typeof i1.BaoModalContainer, typeof i2.BaoModalClose], [typeof i3.CommonModule, typeof i4.OverlayModule, typeof i5.PortalModule], [typeof i1.BaoModalContainer, typeof i2.BaoModalClose]>;
11
10
  static ɵinj: i0.ɵɵInjectorDeclaration<BaoModalModule>;
12
11
  }
@@ -0,0 +1,6 @@
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';
@@ -0,0 +1,13 @@
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
+ }
@@ -0,0 +1,51 @@
1
+ import { BaoSnackBarToastTypeEnum } 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: BaoSnackBarToastTypeEnum;
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: BaoSnackBarToastTypeEnum;
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 toastType(): 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>;
51
+ }
@@ -0,0 +1,8 @@
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
+ };
@@ -0,0 +1,55 @@
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 declare type BaoSnackBarHorizontalPosition = 'start' | 'center' | 'end' | 'left' | 'right';
8
+ /** Possible values for verticalPosition on MatSnackBarConfig. */
9
+ export declare type BaoSnackBarVerticalPosition = 'top' | 'bottom';
10
+ /** Possible types of toast to display the snack bar */
11
+ export declare enum BaoSnackBarToastTypeEnum {
12
+ Info = "info",
13
+ Success = "success",
14
+ Danger = "danger"
15
+ }
16
+ /**
17
+ * Configuration used when opening a snack-bar.
18
+ */
19
+ export declare class BaoSnackBarConfig<D = any> {
20
+ /** The message to display in the snackbar. */
21
+ message: string;
22
+ /** The type of snackbar template to display. */
23
+ toastType?: BaoSnackBarToastTypeEnum;
24
+ /**
25
+ * The attached action to the snack bar. If the name of the action matches an icon provided as part of
26
+ * angular-ui icon dictionnary an icon will be displayed instead of text.
27
+ * */
28
+ actionLabelOrIcon?: string;
29
+ /** Displays the close button when set to true */
30
+ showClose?: boolean;
31
+ /** The length of time in milliseconds to wait before automatically dismissing the snack bar. */
32
+ duration?: number;
33
+ /** The politeness level for the MatAriaLiveAnnouncer announcement. */
34
+ politeness?: AriaLivePoliteness;
35
+ /**
36
+ * Message to be announced by the LiveAnnouncer. When opening a snackbar without a custom
37
+ * component or template, the announcement message will default to the specified message.
38
+ */
39
+ announcementMessage?: string;
40
+ /**
41
+ * The view container that serves as the parent for the snackbar for the purposes of dependency
42
+ * injection. Note: this does not affect where the snackbar is inserted in the DOM.
43
+ */
44
+ viewContainerRef?: ViewContainerRef;
45
+ /** Extra CSS classes to be added to the snack bar container. */
46
+ panelClass?: string | string[];
47
+ /** Text layout direction for the snack bar. */
48
+ direction?: Direction;
49
+ /** Data being injected into the child component. */
50
+ data?: D | null;
51
+ /** The horizontal position to place the snack bar. */
52
+ horizontalPosition?: BaoSnackBarHorizontalPosition;
53
+ /** The vertical position to place the snack bar. */
54
+ verticalPosition?: BaoSnackBarVerticalPosition;
55
+ }