@villedemontreal/angular-ui 14.0.1 → 14.1.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 (94) hide show
  1. package/esm2020/lib/alert/alert.component.mjs +2 -2
  2. package/esm2020/lib/alert/index.mjs +2 -2
  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 +15 -8
  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 +2 -2
  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/colors.mjs +1 -1
  31. package/esm2020/lib/dropdown-menu/dropdown-menu.component.mjs +9 -2
  32. package/esm2020/lib/dropdown-menu/index.mjs +2 -2
  33. package/esm2020/lib/dropdown-menu/module.mjs +2 -2
  34. package/esm2020/lib/file/file-input.component.mjs +319 -0
  35. package/esm2020/lib/file/file-intl.mjs +65 -0
  36. package/esm2020/lib/file/file-preview.component.mjs +86 -0
  37. package/esm2020/lib/file/index.mjs +10 -0
  38. package/esm2020/lib/file/module.mjs +56 -0
  39. package/esm2020/lib/header-info/header-info.component.mjs +2 -2
  40. package/esm2020/lib/header-info/index.mjs +2 -2
  41. package/esm2020/lib/header-info/module.mjs +2 -2
  42. package/esm2020/lib/hyperlink/hyperlink.component.mjs +2 -2
  43. package/esm2020/lib/hyperlink/index.mjs +2 -2
  44. package/esm2020/lib/hyperlink/module.mjs +2 -2
  45. package/esm2020/lib/icon/bao-icon-registry.mjs +2 -2
  46. package/esm2020/lib/icon/icon.component.mjs +2 -2
  47. package/esm2020/lib/icon/icons-dictionary.mjs +3 -2
  48. package/esm2020/lib/icon/index.mjs +2 -2
  49. package/esm2020/lib/icon/module.mjs +2 -2
  50. package/esm2020/lib/list/index.mjs +2 -2
  51. package/esm2020/lib/list/list.component.mjs +2 -2
  52. package/esm2020/lib/list/module.mjs +2 -2
  53. package/esm2020/lib/modal/index.mjs +2 -2
  54. package/esm2020/lib/modal/modal-config.mjs +2 -2
  55. package/esm2020/lib/modal/modal-container.mjs +17 -31
  56. package/esm2020/lib/modal/modal-directives.mjs +2 -2
  57. package/esm2020/lib/modal/modal-ref.mjs +4 -1
  58. package/esm2020/lib/modal/modal.mjs +11 -32
  59. package/esm2020/lib/modal/module.mjs +5 -20
  60. package/esm2020/lib/radio/index.mjs +2 -2
  61. package/esm2020/lib/radio/module.mjs +2 -2
  62. package/esm2020/lib/radio/radio-group.component.mjs +2 -2
  63. package/esm2020/lib/radio/radio.component.mjs +1 -1
  64. package/esm2020/lib/shared/enum/display-mode.mjs +1 -1
  65. package/esm2020/lib/shared/index.mjs +2 -2
  66. package/esm2020/lib/summary/index.mjs +2 -2
  67. package/esm2020/lib/summary/list-summary.component.mjs +2 -2
  68. package/esm2020/lib/summary/module.mjs +2 -2
  69. package/esm2020/lib/summary/summary.component.mjs +2 -2
  70. package/esm2020/lib/tabs/index.mjs +2 -2
  71. package/esm2020/lib/tabs/module.mjs +2 -2
  72. package/esm2020/lib/tabs/tabs.component.mjs +2 -2
  73. package/esm2020/lib/tag/index.mjs +2 -2
  74. package/esm2020/lib/tag/module.mjs +2 -2
  75. package/esm2020/lib/tag/tag.component.mjs +2 -2
  76. package/esm2020/public-api.mjs +3 -2
  77. package/fesm2015/villedemontreal-angular-ui.mjs +629 -186
  78. package/fesm2015/villedemontreal-angular-ui.mjs.map +1 -1
  79. package/fesm2020/villedemontreal-angular-ui.mjs +629 -184
  80. package/fesm2020/villedemontreal-angular-ui.mjs.map +1 -1
  81. package/lib/bao.module.d.ts +12 -11
  82. package/lib/file/file-input.component.d.ts +123 -0
  83. package/lib/file/file-intl.d.ts +44 -0
  84. package/lib/file/file-preview.component.d.ts +29 -0
  85. package/lib/file/index.d.ts +4 -0
  86. package/lib/file/module.d.ts +13 -0
  87. package/lib/modal/modal-container.d.ts +4 -5
  88. package/lib/modal/modal-ref.d.ts +1 -0
  89. package/lib/modal/modal.d.ts +3 -4
  90. package/lib/modal/module.d.ts +1 -2
  91. package/package.json +1 -1
  92. package/public-api.d.ts +1 -0
  93. package/esm2020/lib/modal/modal-animations.mjs +0 -29
  94. package/lib/modal/modal-animations.d.ts +0 -8
@@ -4,20 +4,21 @@ 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";
19
20
  export declare class BaoModule {
20
21
  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]>;
22
+ 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]>;
22
23
  static ɵinj: i0.ɵɵInjectorDeclaration<BaoModule>;
23
24
  }
@@ -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
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@villedemontreal/angular-ui",
3
- "version": "14.0.1",
3
+ "version": "14.1.0",
4
4
  "peerDependencies": {
5
5
  "@angular/cdk": ">=8.0.0 <15.0.0",
6
6
  "@angular/common": ">=8.0.0 <15.0.0",
package/public-api.d.ts CHANGED
@@ -18,3 +18,4 @@ export * from './lib/tabs';
18
18
  export * from './lib/modal';
19
19
  export * from './lib/hyperlink';
20
20
  export * from './lib/dropdown-menu';
21
+ export * from './lib/file';
@@ -1,29 +0,0 @@
1
- /*
2
- * Copyright (c) 2022 Ville de Montreal. All rights reserved.
3
- * Licensed under the MIT license.
4
- * See LICENSE file in the project root for full license information.
5
- */
6
- import { animate, state, style, transition, trigger, query, animateChild, group } from '@angular/animations';
7
- /**
8
- * Animations used by MatDialog.
9
- * @docs-private
10
- */
11
- export const baoModalAnimations = {
12
- /** Animation that is applied on the modal container by default. */
13
- modalContainer: trigger('modalContainer', [
14
- // Note: The `enter` animation transitions to `transform: none`, because for some reason
15
- // specifying the transform explicitly, causes IE both to blur the modal content and
16
- // decimate the animation performance. Leaving it as `none` solves both issues.
17
- state('void, exit', style({ opacity: 0, transform: 'scale(0.7)' })),
18
- state('enter', style({ transform: 'none' })),
19
- transition('* => enter', group([
20
- animate('150ms cubic-bezier(0, 0, 0.2, 1)', style({ transform: 'none', opacity: 1 })),
21
- query('@*', animateChild(), { optional: true })
22
- ])),
23
- transition('* => void, * => exit', group([
24
- animate('75ms cubic-bezier(0.4, 0.0, 0.2, 1)', style({ opacity: 0 })),
25
- query('@*', animateChild(), { optional: true })
26
- ]))
27
- ])
28
- };
29
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibW9kYWwtYW5pbWF0aW9ucy5qcyIsInNvdXJjZVJvb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BhY2l0eTogMCB9KSksXG4gICAgICAgIHF1ZXJ5KCdAKicsIGFuaW1hdGVDaGlsZCgpLCB7IG9wdGlvbmFsOiB0cnVlIH0pXG4gICAgICBdKVxuICAgIClcbiAgXSlcbn07XG4iXX0=
@@ -1,8 +0,0 @@
1
- import { AnimationTriggerMetadata } from '@angular/animations';
2
- /**
3
- * Animations used by MatDialog.
4
- * @docs-private
5
- */
6
- export declare const baoModalAnimations: {
7
- readonly modalContainer: AnimationTriggerMetadata;
8
- };