@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.
- package/esm2020/lib/alert/alert.component.mjs +2 -2
- package/esm2020/lib/alert/index.mjs +3 -3
- package/esm2020/lib/alert/module.mjs +2 -2
- package/esm2020/lib/avatar/avatar.component.mjs +2 -2
- package/esm2020/lib/avatar/index.mjs +2 -2
- package/esm2020/lib/avatar/module.mjs +2 -2
- package/esm2020/lib/badge/badge.component.mjs +2 -2
- package/esm2020/lib/badge/index.mjs +2 -2
- package/esm2020/lib/badge/module.mjs +2 -2
- package/esm2020/lib/bao.module.mjs +23 -11
- package/esm2020/lib/breadcrumb/breadcrumb.component.mjs +2 -2
- package/esm2020/lib/breadcrumb/index.mjs +2 -2
- package/esm2020/lib/breadcrumb/module.mjs +2 -2
- package/esm2020/lib/button/button.component.mjs +3 -3
- package/esm2020/lib/button/index.mjs +2 -2
- package/esm2020/lib/button/module.mjs +2 -2
- package/esm2020/lib/card/card.component.mjs +2 -2
- package/esm2020/lib/card/index.mjs +2 -2
- package/esm2020/lib/card/module.mjs +2 -2
- package/esm2020/lib/checkbox/checkbox-group.component.mjs +2 -2
- package/esm2020/lib/checkbox/checkbox.component.mjs +1 -1
- package/esm2020/lib/checkbox/index.mjs +2 -2
- package/esm2020/lib/checkbox/module.mjs +2 -2
- package/esm2020/lib/common-components/error-text/errorText.component.mjs +2 -2
- package/esm2020/lib/common-components/guiding-text/guidingText.component.mjs +2 -2
- package/esm2020/lib/common-components/index.mjs +2 -2
- package/esm2020/lib/common-components/label-text/labelText.component.mjs +4 -4
- package/esm2020/lib/common-components/module.mjs +6 -3
- package/esm2020/lib/common-components/title-text/titleText.component.mjs +2 -2
- package/esm2020/lib/core/breakpoints.mjs +13 -0
- package/esm2020/lib/core/colors.mjs +1 -1
- package/esm2020/lib/core/index.mjs +8 -0
- package/esm2020/lib/dropdown-menu/dropdown-menu.component.mjs +38 -8
- package/esm2020/lib/dropdown-menu/index.mjs +2 -2
- package/esm2020/lib/dropdown-menu/module.mjs +2 -2
- package/esm2020/lib/file/file-input.component.mjs +319 -0
- package/esm2020/lib/file/file-intl.mjs +65 -0
- package/esm2020/lib/file/file-preview.component.mjs +86 -0
- package/esm2020/lib/file/index.mjs +10 -0
- package/esm2020/lib/file/module.mjs +56 -0
- package/esm2020/lib/header-info/header-info.component.mjs +2 -2
- package/esm2020/lib/header-info/index.mjs +2 -2
- package/esm2020/lib/header-info/module.mjs +2 -2
- package/esm2020/lib/hyperlink/hyperlink.component.mjs +2 -2
- package/esm2020/lib/hyperlink/index.mjs +2 -2
- package/esm2020/lib/hyperlink/module.mjs +2 -2
- package/esm2020/lib/icon/bao-icon-registry.mjs +2 -2
- package/esm2020/lib/icon/icon.component.mjs +2 -2
- package/esm2020/lib/icon/icons-dictionary.mjs +3 -2
- package/esm2020/lib/icon/index.mjs +2 -2
- package/esm2020/lib/icon/module.mjs +2 -2
- package/esm2020/lib/list/index.mjs +2 -2
- package/esm2020/lib/list/list.component.mjs +2 -2
- package/esm2020/lib/list/module.mjs +2 -2
- package/esm2020/lib/modal/index.mjs +2 -2
- package/esm2020/lib/modal/modal-config.mjs +2 -2
- package/esm2020/lib/modal/modal-container.mjs +18 -32
- package/esm2020/lib/modal/modal-directives.mjs +2 -2
- package/esm2020/lib/modal/modal-ref.mjs +4 -1
- package/esm2020/lib/modal/modal.mjs +11 -32
- package/esm2020/lib/modal/module.mjs +5 -20
- package/esm2020/lib/radio/index.mjs +2 -2
- package/esm2020/lib/radio/module.mjs +2 -2
- package/esm2020/lib/radio/radio-group.component.mjs +2 -2
- package/esm2020/lib/radio/radio.component.mjs +1 -1
- package/esm2020/lib/shared/enum/display-mode.mjs +1 -1
- package/esm2020/lib/shared/index.mjs +2 -2
- package/esm2020/lib/snack-bar/index.mjs +12 -0
- package/esm2020/lib/snack-bar/module.mjs +51 -0
- package/esm2020/lib/snack-bar/simple-snack-bar.component.mjs +92 -0
- package/esm2020/lib/snack-bar/snack-bar-animations.mjs +28 -0
- package/esm2020/lib/snack-bar/snack-bar-config.mjs +44 -0
- package/esm2020/lib/snack-bar/snack-bar-container.mjs +273 -0
- package/esm2020/lib/snack-bar/snack-bar-ref.mjs +75 -0
- package/esm2020/lib/snack-bar/snack-bar.mjs +251 -0
- package/esm2020/lib/summary/index.mjs +2 -2
- package/esm2020/lib/summary/list-summary.component.mjs +2 -2
- package/esm2020/lib/summary/module.mjs +2 -2
- package/esm2020/lib/summary/summary.component.mjs +2 -2
- package/esm2020/lib/system-header/index.mjs +8 -0
- package/esm2020/lib/system-header/module.mjs +33 -0
- package/esm2020/lib/system-header/system-header.component.mjs +128 -0
- package/esm2020/lib/tabs/index.mjs +2 -2
- package/esm2020/lib/tabs/module.mjs +2 -2
- package/esm2020/lib/tabs/tabs.component.mjs +2 -2
- package/esm2020/lib/tag/index.mjs +2 -2
- package/esm2020/lib/tag/module.mjs +2 -2
- package/esm2020/lib/tag/tag.component.mjs +2 -2
- package/esm2020/public-api.mjs +5 -2
- package/fesm2015/villedemontreal-angular-ui.mjs +1745 -314
- package/fesm2015/villedemontreal-angular-ui.mjs.map +1 -1
- package/fesm2020/villedemontreal-angular-ui.mjs +1743 -314
- package/fesm2020/villedemontreal-angular-ui.mjs.map +1 -1
- package/lib/alert/index.d.ts +1 -1
- package/lib/bao.module.d.ts +14 -11
- package/lib/button/button.component.d.ts +3 -3
- package/lib/core/breakpoints.d.ts +7 -0
- package/lib/core/index.d.ts +2 -0
- package/lib/dropdown-menu/dropdown-menu.component.d.ts +10 -4
- package/lib/file/file-input.component.d.ts +123 -0
- package/lib/file/file-intl.d.ts +44 -0
- package/lib/file/file-preview.component.d.ts +29 -0
- package/lib/file/index.d.ts +4 -0
- package/lib/file/module.d.ts +13 -0
- package/lib/modal/modal-container.d.ts +4 -5
- package/lib/modal/modal-ref.d.ts +1 -0
- package/lib/modal/modal.d.ts +3 -4
- package/lib/modal/module.d.ts +1 -2
- package/lib/snack-bar/index.d.ts +6 -0
- package/lib/snack-bar/module.d.ts +13 -0
- package/lib/snack-bar/simple-snack-bar.component.d.ts +51 -0
- package/lib/snack-bar/snack-bar-animations.d.ts +8 -0
- package/lib/snack-bar/snack-bar-config.d.ts +55 -0
- package/lib/snack-bar/snack-bar-container.d.ts +111 -0
- package/lib/snack-bar/snack-bar-ref.d.ts +51 -0
- package/lib/snack-bar/snack-bar.d.ts +89 -0
- package/lib/system-header/index.d.ts +2 -0
- package/lib/system-header/module.d.ts +9 -0
- package/lib/system-header/system-header.component.d.ts +41 -0
- package/package.json +1 -1
- package/public-api.d.ts +3 -0
- package/esm2020/lib/modal/modal-animations.mjs +0 -29
- package/lib/modal/modal-animations.d.ts +0 -8
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
|
-
import { SecurityContext, Injectable, Inject, Component, ViewEncapsulation, ChangeDetectionStrategy, Input,
|
|
2
|
+
import { SecurityContext, Injectable, Inject, Component, ViewEncapsulation, ChangeDetectionStrategy, Input, Directive, EventEmitter, Output, NgModule, CUSTOM_ELEMENTS_SCHEMA, ViewChild, forwardRef, InjectionToken, ContentChildren, Optional, HostListener, ContentChild, Injector, TemplateRef, SkipSelf, ViewChildren, inject } from '@angular/core';
|
|
3
3
|
import * as i1$1 from '@angular/common';
|
|
4
4
|
import { DOCUMENT, CommonModule } from '@angular/common';
|
|
5
5
|
import * as i1 from '@angular/platform-browser';
|
|
@@ -12,13 +12,15 @@ import * as i2 from '@angular/cdk/collections';
|
|
|
12
12
|
import * as i1$4 from '@angular/cdk/overlay';
|
|
13
13
|
import { OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
|
|
14
14
|
import * as i3 from '@angular/cdk/portal';
|
|
15
|
-
import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal, PortalModule, DomPortal } from '@angular/cdk/portal';
|
|
16
|
-
import { Subject, filter, take, defer, startWith
|
|
15
|
+
import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal, PortalModule, DomPortal, PortalInjector } from '@angular/cdk/portal';
|
|
16
|
+
import { Subject, filter, take, defer, startWith } from 'rxjs';
|
|
17
17
|
import { __awaiter } from 'tslib';
|
|
18
|
+
import * as i1$5 from '@angular/cdk/platform';
|
|
18
19
|
import { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';
|
|
19
|
-
import { trigger, state, style, transition, group, animate, query, animateChild } from '@angular/animations';
|
|
20
20
|
import { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';
|
|
21
|
-
import {
|
|
21
|
+
import { take as take$1 } from 'rxjs/operators';
|
|
22
|
+
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
23
|
+
import * as i2$1 from '@angular/cdk/layout';
|
|
22
24
|
|
|
23
25
|
function baoColorToHex(baoColor) {
|
|
24
26
|
switch (baoColor) {
|
|
@@ -46,7 +48,7 @@ function baoColorToHex(baoColor) {
|
|
|
46
48
|
}
|
|
47
49
|
|
|
48
50
|
/*
|
|
49
|
-
* Copyright (c)
|
|
51
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
50
52
|
* Licensed under the MIT license.
|
|
51
53
|
* See LICENSE file in the project root for full license information.
|
|
52
54
|
*/
|
|
@@ -63,6 +65,7 @@ const ICONS_DCT = {
|
|
|
63
65
|
'icon-book': "<path fill-rule='evenodd' d='M11 7.5l-.4-.3A11 11 0 005 5.046v10.993a13 13 0 016 2.007V7.5zm2 0v10.546a13 13 0 016-2.007V5.046A11 11 0 0013.4 7.2l-.4.3zM3 7V4a1 1 0 011-1 13 13 0 017.8 2.6l.2.15.2-.15A13 13 0 0120 3a1 1 0 011 1v3h2a1 1 0 011 1v2a1 1 0 01-2 0V9h-1v8a1 1 0 01-1 1 11 11 0 00-4.583 1H22v-5a1 1 0 012 0v6a1 1 0 01-1 1H1a1 1 0 01-1-1V8a1 1 0 011-1h2zm0 2H2v10h6.583A11 11 0 004 18a1 1 0 01-1-1V9z'/>",
|
|
64
66
|
'icon-briefcase': "<path fill-rule='evenodd' clip-rule='evenodd' d='M14 2h-4a3 3 0 00-3 3v1H4a3 3 0 00-3 3v2.977a1 1 0 000 .046V19a3 3 0 003 3h16a3 3 0 003-3v-3a1 1 0 10-2 0v3a1 1 0 01-1 1H4a1 1 0 01-1-1v-5.523l8.629 3.451a1 1 0 00.742 0l9.979-3.99a1.002 1.002 0 00.65-.961V9a3 3 0 00-3-3h-3V5a3 3 0 00-3-3zm7 9.323V9a1 1 0 00-1-1H4a1 1 0 00-1 1v2.323l9 3.6 9-3.6zM15 6H9V5a1 1 0 011-1h4a1 1 0 011 1v1z'/>",
|
|
65
67
|
'icon-calendar': "<path fill-rule='evenodd' d='M20 10H4v9a1 1 0 001 1h14a1 1 0 001-1v-2a1 1 0 012 0v2a3 3 0 01-3 3H5a3 3 0 01-3-3V5a3 3 0 013-3h2V1a1 1 0 112 0v1h6V1a1 1 0 012 0v1h2a3 3 0 013 3v8a1 1 0 01-2 0v-3zm0-2V5a1 1 0 00-1-1h-2v1a1 1 0 01-2 0V4H9v1a1 1 0 11-2 0V4H5a1 1 0 00-1 1v3h16z'/>",
|
|
68
|
+
'icon-cell-phone': "<path fill-rule='evenodd' clip-rule='evenodd' d='M4 4C4 2.34315 5.34315 1 7 1H17C18.6569 1 20 2.34315 20 4V20C20 21.6569 18.6569 23 17 23H7C5.34315 23 4 21.6569 4 20V4ZM6 4C6 3.44772 6.44772 3 7 3H17C17.5523 3 18 3.44772 18 4V20C18 20.5523 17.5523 21 17 21H7C6.44771 21 6 20.5523 6 20V4ZM12 19C12.5523 19 13 18.5523 13 18C13 17.4477 12.5523 17 12 17C11.4477 17 11 17.4477 11 18C11 18.5523 11.4477 19 12 19Z' />",
|
|
66
69
|
'icon-check-circle-full': "<path fill-rule='evenodd' d='M12 23C5.925 23 1 18.075 1 12S5.925 1 12 1s11 4.925 11 11-4.925 11-11 11zm3.293-13.707L11 13.586l-1.293-1.293a1 1 0 10-1.414 1.414l2 2a1 1 0 001.414 0l5-5a1 1 0 10-1.414-1.414z'/>",
|
|
67
70
|
'icon-check-circle': "<path fill-rule='evenodd' d='M21.542 17.477a1 1 0 01-1.734-.997A8.953 8.953 0 0021 12a9 9 0 10-9 9 8.953 8.953 0 004.484-1.195 1 1 0 01.998 1.733A10.953 10.953 0 0112 23C5.925 23 1 18.075 1 12S5.925 1 12 1s11 4.925 11 11c0 1.948-.508 3.824-1.458 5.477zm-6.25-8.184a1 1 0 011.415 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L11 13.586l4.293-4.293z'/>",
|
|
68
71
|
'icon-check': "<path fill-rule='evenodd' d='M19.293 6.293a1 1 0 011.414 1.414l-7.947 7.948a1 1 0 01-1.415-1.415l7.948-7.947zm-9.586 11a1 1 0 11-1.414 1.414l-5-5a1 1 0 011.414-1.414l5 5z'/>",
|
|
@@ -170,7 +173,7 @@ const ICONS_DCT = {
|
|
|
170
173
|
};
|
|
171
174
|
|
|
172
175
|
/*
|
|
173
|
-
* Copyright (c)
|
|
176
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
174
177
|
* Licensed under the MIT license.
|
|
175
178
|
* See LICENSE file in the project root for full license information.
|
|
176
179
|
*/
|
|
@@ -211,7 +214,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
211
214
|
} });
|
|
212
215
|
|
|
213
216
|
/*
|
|
214
|
-
* Copyright (c)
|
|
217
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
215
218
|
* Licensed under the MIT license.
|
|
216
219
|
* See LICENSE file in the project root for full license information.
|
|
217
220
|
*/
|
|
@@ -363,27 +366,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
363
366
|
}] } });
|
|
364
367
|
|
|
365
368
|
/*
|
|
366
|
-
* Copyright (c)
|
|
367
|
-
* Licensed under the MIT license.
|
|
368
|
-
* See LICENSE file in the project root for full license information.
|
|
369
|
-
*/
|
|
370
|
-
const ICON_DIRECTIVES = [BaoIconComponent];
|
|
371
|
-
class BaoIconModule {
|
|
372
|
-
}
|
|
373
|
-
BaoIconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
374
|
-
BaoIconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoIconModule, declarations: [BaoIconComponent], imports: [CommonModule], exports: [BaoIconComponent] });
|
|
375
|
-
BaoIconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoIconModule, imports: [CommonModule] });
|
|
376
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoIconModule, decorators: [{
|
|
377
|
-
type: NgModule,
|
|
378
|
-
args: [{
|
|
379
|
-
imports: [CommonModule],
|
|
380
|
-
declarations: ICON_DIRECTIVES,
|
|
381
|
-
exports: ICON_DIRECTIVES
|
|
382
|
-
}]
|
|
383
|
-
}] });
|
|
384
|
-
|
|
385
|
-
/*
|
|
386
|
-
* Copyright (c) 2022 Ville de Montreal. All rights reserved.
|
|
369
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
387
370
|
* Licensed under the MIT license.
|
|
388
371
|
* See LICENSE file in the project root for full license information.
|
|
389
372
|
*/
|
|
@@ -433,7 +416,7 @@ class BaoButtonComponent {
|
|
|
433
416
|
get nativeElement() {
|
|
434
417
|
return this.elementRef.nativeElement;
|
|
435
418
|
}
|
|
436
|
-
|
|
419
|
+
ngAfterContentInit() {
|
|
437
420
|
const childNodes = Array.from(this.nativeElement.childNodes);
|
|
438
421
|
const textIndex = childNodes.findIndex(c => c.nodeType === Node.TEXT_NODE);
|
|
439
422
|
this.noText = textIndex === -1;
|
|
@@ -479,27 +462,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
479
462
|
}] } });
|
|
480
463
|
|
|
481
464
|
/*
|
|
482
|
-
* Copyright (c)
|
|
483
|
-
* Licensed under the MIT license.
|
|
484
|
-
* See LICENSE file in the project root for full license information.
|
|
485
|
-
*/
|
|
486
|
-
const BUTTON_DIRECTIVES = [BaoButtonComponent];
|
|
487
|
-
class BaoButtonModule {
|
|
488
|
-
}
|
|
489
|
-
BaoButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
490
|
-
BaoButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoButtonModule, declarations: [BaoButtonComponent], imports: [CommonModule, BaoIconModule], exports: [BaoButtonComponent, BaoIconModule] });
|
|
491
|
-
BaoButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoButtonModule, imports: [CommonModule, BaoIconModule, BaoIconModule] });
|
|
492
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoButtonModule, decorators: [{
|
|
493
|
-
type: NgModule,
|
|
494
|
-
args: [{
|
|
495
|
-
imports: [CommonModule, BaoIconModule],
|
|
496
|
-
declarations: BUTTON_DIRECTIVES,
|
|
497
|
-
exports: [...BUTTON_DIRECTIVES, BaoIconModule]
|
|
498
|
-
}]
|
|
499
|
-
}] });
|
|
500
|
-
|
|
501
|
-
/*
|
|
502
|
-
* Copyright (c) 2022 Ville de Montreal. All rights reserved.
|
|
465
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
503
466
|
* Licensed under the MIT license.
|
|
504
467
|
* See LICENSE file in the project root for full license information.
|
|
505
468
|
*/
|
|
@@ -656,7 +619,47 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
656
619
|
}] } });
|
|
657
620
|
|
|
658
621
|
/*
|
|
659
|
-
* Copyright (c)
|
|
622
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
623
|
+
* Licensed under the MIT license.
|
|
624
|
+
* See LICENSE file in the project root for full license information.
|
|
625
|
+
*/
|
|
626
|
+
const ICON_DIRECTIVES = [BaoIconComponent];
|
|
627
|
+
class BaoIconModule {
|
|
628
|
+
}
|
|
629
|
+
BaoIconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
630
|
+
BaoIconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoIconModule, declarations: [BaoIconComponent], imports: [CommonModule], exports: [BaoIconComponent] });
|
|
631
|
+
BaoIconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoIconModule, imports: [CommonModule] });
|
|
632
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoIconModule, decorators: [{
|
|
633
|
+
type: NgModule,
|
|
634
|
+
args: [{
|
|
635
|
+
imports: [CommonModule],
|
|
636
|
+
declarations: ICON_DIRECTIVES,
|
|
637
|
+
exports: ICON_DIRECTIVES
|
|
638
|
+
}]
|
|
639
|
+
}] });
|
|
640
|
+
|
|
641
|
+
/*
|
|
642
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
643
|
+
* Licensed under the MIT license.
|
|
644
|
+
* See LICENSE file in the project root for full license information.
|
|
645
|
+
*/
|
|
646
|
+
const BUTTON_DIRECTIVES = [BaoButtonComponent];
|
|
647
|
+
class BaoButtonModule {
|
|
648
|
+
}
|
|
649
|
+
BaoButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
650
|
+
BaoButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoButtonModule, declarations: [BaoButtonComponent], imports: [CommonModule, BaoIconModule], exports: [BaoButtonComponent, BaoIconModule] });
|
|
651
|
+
BaoButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoButtonModule, imports: [CommonModule, BaoIconModule, BaoIconModule] });
|
|
652
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoButtonModule, decorators: [{
|
|
653
|
+
type: NgModule,
|
|
654
|
+
args: [{
|
|
655
|
+
imports: [CommonModule, BaoIconModule],
|
|
656
|
+
declarations: BUTTON_DIRECTIVES,
|
|
657
|
+
exports: [...BUTTON_DIRECTIVES, BaoIconModule]
|
|
658
|
+
}]
|
|
659
|
+
}] });
|
|
660
|
+
|
|
661
|
+
/*
|
|
662
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
660
663
|
* Licensed under the MIT license.
|
|
661
664
|
* See LICENSE file in the project root for full license information.
|
|
662
665
|
*/
|
|
@@ -691,13 +694,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
691
694
|
}] });
|
|
692
695
|
|
|
693
696
|
/*
|
|
694
|
-
* Copyright (c)
|
|
697
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
695
698
|
* Licensed under the MIT license.
|
|
696
699
|
* See LICENSE file in the project root for full license information.
|
|
697
700
|
*/
|
|
698
701
|
|
|
699
702
|
/*
|
|
700
|
-
* Copyright (c)
|
|
703
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
701
704
|
* Licensed under the MIT license.
|
|
702
705
|
* See LICENSE file in the project root for full license information.
|
|
703
706
|
*/
|
|
@@ -730,7 +733,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
730
733
|
}] } });
|
|
731
734
|
|
|
732
735
|
/*
|
|
733
|
-
* Copyright (c)
|
|
736
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
734
737
|
* Licensed under the MIT license.
|
|
735
738
|
* See LICENSE file in the project root for full license information.
|
|
736
739
|
*/
|
|
@@ -750,19 +753,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
750
753
|
}] });
|
|
751
754
|
|
|
752
755
|
/*
|
|
753
|
-
* Copyright (c)
|
|
756
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
754
757
|
* Licensed under the MIT license.
|
|
755
758
|
* See LICENSE file in the project root for full license information.
|
|
756
759
|
*/
|
|
757
760
|
|
|
758
761
|
/*
|
|
759
|
-
* Copyright (c)
|
|
762
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
760
763
|
* Licensed under the MIT license.
|
|
761
764
|
* See LICENSE file in the project root for full license information.
|
|
762
765
|
*/
|
|
763
766
|
|
|
764
767
|
/*
|
|
765
|
-
* Copyright (c)
|
|
768
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
766
769
|
* Licensed under the MIT license.
|
|
767
770
|
* See LICENSE file in the project root for full license information.
|
|
768
771
|
*/
|
|
@@ -854,7 +857,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
854
857
|
}] });
|
|
855
858
|
|
|
856
859
|
/*
|
|
857
|
-
* Copyright (c)
|
|
860
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
858
861
|
* Licensed under the MIT license.
|
|
859
862
|
* See LICENSE file in the project root for full license information.
|
|
860
863
|
*/
|
|
@@ -888,13 +891,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
888
891
|
}] });
|
|
889
892
|
|
|
890
893
|
/*
|
|
891
|
-
* Copyright (c)
|
|
894
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
892
895
|
* Licensed under the MIT license.
|
|
893
896
|
* See LICENSE file in the project root for full license information.
|
|
894
897
|
*/
|
|
895
898
|
|
|
896
899
|
/*
|
|
897
|
-
* Copyright (c)
|
|
900
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
898
901
|
* Licensed under the MIT license.
|
|
899
902
|
* See LICENSE file in the project root for full license information.
|
|
900
903
|
*/
|
|
@@ -908,7 +911,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
908
911
|
}] });
|
|
909
912
|
|
|
910
913
|
/*
|
|
911
|
-
* Copyright (c)
|
|
914
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
912
915
|
* Licensed under the MIT license.
|
|
913
916
|
* See LICENSE file in the project root for full license information.
|
|
914
917
|
*/
|
|
@@ -922,7 +925,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
922
925
|
}] });
|
|
923
926
|
|
|
924
927
|
/*
|
|
925
|
-
* Copyright (c)
|
|
928
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
926
929
|
* Licensed under the MIT license.
|
|
927
930
|
* See LICENSE file in the project root for full license information.
|
|
928
931
|
*/
|
|
@@ -932,16 +935,16 @@ class BaoLabelTextComponent {
|
|
|
932
935
|
}
|
|
933
936
|
}
|
|
934
937
|
BaoLabelTextComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoLabelTextComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
935
|
-
BaoLabelTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoLabelTextComponent, selector: "bao-label, [bao-label]", inputs: { required: "required" }, host: { classAttribute: "bao-label" }, ngImport: i0, template: '<
|
|
938
|
+
BaoLabelTextComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoLabelTextComponent, selector: "bao-label, [bao-label]", inputs: { required: "required" }, host: { classAttribute: "bao-label" }, ngImport: i0, template: '<ng-content></ng-content><span *ngIf="required"> *</span>', isInline: true, styles: [".bao-label{color:#212529!important;font-weight:700;line-height:1.5em;font-size:1rem;margin-bottom:.5rem}.bao-label span{color:#d3310a;margin:0}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
936
939
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoLabelTextComponent, decorators: [{
|
|
937
940
|
type: Component,
|
|
938
|
-
args: [{ selector: 'bao-label, [bao-label]', encapsulation: ViewEncapsulation.None, template: '<
|
|
941
|
+
args: [{ selector: 'bao-label, [bao-label]', encapsulation: ViewEncapsulation.None, template: '<ng-content></ng-content><span *ngIf="required"> *</span>', host: { class: 'bao-label' }, styles: [".bao-label{color:#212529!important;font-weight:700;line-height:1.5em;font-size:1rem;margin-bottom:.5rem}.bao-label span{color:#d3310a;margin:0}\n"] }]
|
|
939
942
|
}], propDecorators: { required: [{
|
|
940
943
|
type: Input
|
|
941
944
|
}] } });
|
|
942
945
|
|
|
943
946
|
/*
|
|
944
|
-
* Copyright (c)
|
|
947
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
945
948
|
* Licensed under the MIT license.
|
|
946
949
|
* See LICENSE file in the project root for full license information.
|
|
947
950
|
*/
|
|
@@ -955,13 +958,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
955
958
|
}] });
|
|
956
959
|
|
|
957
960
|
/*
|
|
958
|
-
* Copyright (c)
|
|
959
|
-
* Licensed under the MIT license.
|
|
960
|
-
* See LICENSE file in the project root for full license information.
|
|
961
|
-
*/
|
|
962
|
-
|
|
963
|
-
/*
|
|
964
|
-
* Copyright (c) 2022 Ville de Montreal. All rights reserved.
|
|
961
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
965
962
|
* Licensed under the MIT license.
|
|
966
963
|
* See LICENSE file in the project root for full license information.
|
|
967
964
|
*/
|
|
@@ -992,7 +989,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
992
989
|
}] });
|
|
993
990
|
|
|
994
991
|
/*
|
|
995
|
-
* Copyright (c)
|
|
992
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
996
993
|
* Licensed under the MIT license.
|
|
997
994
|
* See LICENSE file in the project root for full license information.
|
|
998
995
|
*/
|
|
@@ -1347,7 +1344,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
1347
1344
|
}] });
|
|
1348
1345
|
|
|
1349
1346
|
/*
|
|
1350
|
-
* Copyright (c)
|
|
1347
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
1351
1348
|
* Licensed under the MIT license.
|
|
1352
1349
|
* See LICENSE file in the project root for full license information.
|
|
1353
1350
|
*/
|
|
@@ -1375,13 +1372,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
1375
1372
|
}] });
|
|
1376
1373
|
|
|
1377
1374
|
/*
|
|
1378
|
-
* Copyright (c)
|
|
1375
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
1376
|
+
* Licensed under the MIT license.
|
|
1377
|
+
* See LICENSE file in the project root for full license information.
|
|
1378
|
+
*/
|
|
1379
|
+
|
|
1380
|
+
/*
|
|
1381
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
1379
1382
|
* Licensed under the MIT license.
|
|
1380
1383
|
* See LICENSE file in the project root for full license information.
|
|
1381
1384
|
*/
|
|
1382
1385
|
|
|
1383
1386
|
/*
|
|
1384
|
-
* Copyright (c)
|
|
1387
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
1385
1388
|
* Licensed under the MIT license.
|
|
1386
1389
|
* See LICENSE file in the project root for full license information.
|
|
1387
1390
|
*/
|
|
@@ -1482,7 +1485,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
1482
1485
|
}] });
|
|
1483
1486
|
|
|
1484
1487
|
/*
|
|
1485
|
-
* Copyright (c)
|
|
1488
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
1486
1489
|
* Licensed under the MIT license.
|
|
1487
1490
|
* See LICENSE file in the project root for full license information.
|
|
1488
1491
|
*/
|
|
@@ -1519,19 +1522,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
1519
1522
|
}] });
|
|
1520
1523
|
|
|
1521
1524
|
/*
|
|
1522
|
-
* Copyright (c)
|
|
1525
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
1523
1526
|
* Licensed under the MIT license.
|
|
1524
1527
|
* See LICENSE file in the project root for full license information.
|
|
1525
1528
|
*/
|
|
1526
1529
|
|
|
1527
1530
|
/*
|
|
1528
|
-
* Copyright (c)
|
|
1531
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
1529
1532
|
* Licensed under the MIT license.
|
|
1530
1533
|
* See LICENSE file in the project root for full license information.
|
|
1531
1534
|
*/
|
|
1532
1535
|
|
|
1533
1536
|
/*
|
|
1534
|
-
* Copyright (c)
|
|
1537
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
1535
1538
|
* Licensed under the MIT license.
|
|
1536
1539
|
* See LICENSE file in the project root for full license information.
|
|
1537
1540
|
*/
|
|
@@ -1602,7 +1605,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
1602
1605
|
}] });
|
|
1603
1606
|
|
|
1604
1607
|
/*
|
|
1605
|
-
* Copyright (c)
|
|
1608
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
1606
1609
|
* Licensed under the MIT license.
|
|
1607
1610
|
* See LICENSE file in the project root for full license information.
|
|
1608
1611
|
*/
|
|
@@ -1636,13 +1639,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
1636
1639
|
}] });
|
|
1637
1640
|
|
|
1638
1641
|
/*
|
|
1639
|
-
* Copyright (c)
|
|
1642
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
1640
1643
|
* Licensed under the MIT license.
|
|
1641
1644
|
* See LICENSE file in the project root for full license information.
|
|
1642
1645
|
*/
|
|
1643
1646
|
|
|
1644
1647
|
/*
|
|
1645
|
-
* Copyright (c)
|
|
1648
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
1646
1649
|
* Licensed under the MIT license.
|
|
1647
1650
|
* See LICENSE file in the project root for full license information.
|
|
1648
1651
|
*/
|
|
@@ -2170,7 +2173,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2170
2173
|
}] });
|
|
2171
2174
|
|
|
2172
2175
|
/*
|
|
2173
|
-
* Copyright (c)
|
|
2176
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
2174
2177
|
* Licensed under the MIT license.
|
|
2175
2178
|
* See LICENSE file in the project root for full license information.
|
|
2176
2179
|
*/
|
|
@@ -2215,13 +2218,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2215
2218
|
}] });
|
|
2216
2219
|
|
|
2217
2220
|
/*
|
|
2218
|
-
* Copyright (c)
|
|
2221
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
2219
2222
|
* Licensed under the MIT license.
|
|
2220
2223
|
* See LICENSE file in the project root for full license information.
|
|
2221
2224
|
*/
|
|
2222
2225
|
|
|
2223
2226
|
/*
|
|
2224
|
-
* Copyright (c)
|
|
2227
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
2225
2228
|
* Licensed under the MIT license.
|
|
2226
2229
|
* See LICENSE file in the project root for full license information.
|
|
2227
2230
|
*/
|
|
@@ -2294,7 +2297,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2294
2297
|
}] } });
|
|
2295
2298
|
|
|
2296
2299
|
/*
|
|
2297
|
-
* Copyright (c)
|
|
2300
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
2298
2301
|
* Licensed under the MIT license.
|
|
2299
2302
|
* See LICENSE file in the project root for full license information.
|
|
2300
2303
|
*/
|
|
@@ -2314,13 +2317,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2314
2317
|
}] });
|
|
2315
2318
|
|
|
2316
2319
|
/*
|
|
2317
|
-
* Copyright (c)
|
|
2320
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
2318
2321
|
* Licensed under the MIT license.
|
|
2319
2322
|
* See LICENSE file in the project root for full license information.
|
|
2320
2323
|
*/
|
|
2321
2324
|
|
|
2322
2325
|
/*
|
|
2323
|
-
* Copyright (c)
|
|
2326
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
2324
2327
|
* Licensed under the MIT license.
|
|
2325
2328
|
* See LICENSE file in the project root for full license information.
|
|
2326
2329
|
*/
|
|
@@ -2411,7 +2414,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2411
2414
|
}] });
|
|
2412
2415
|
|
|
2413
2416
|
/*
|
|
2414
|
-
* Copyright (c)
|
|
2417
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
2415
2418
|
* Licensed under the MIT license.
|
|
2416
2419
|
* See LICENSE file in the project root for full license information.
|
|
2417
2420
|
*/
|
|
@@ -2439,7 +2442,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2439
2442
|
}] });
|
|
2440
2443
|
|
|
2441
2444
|
/*
|
|
2442
|
-
* Copyright (c)
|
|
2445
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
2443
2446
|
* Licensed under the MIT license.
|
|
2444
2447
|
* See LICENSE file in the project root for full license information.
|
|
2445
2448
|
*/
|
|
@@ -2470,13 +2473,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2470
2473
|
}] });
|
|
2471
2474
|
|
|
2472
2475
|
/*
|
|
2473
|
-
* Copyright (c)
|
|
2476
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
2474
2477
|
* Licensed under the MIT license.
|
|
2475
2478
|
* See LICENSE file in the project root for full license information.
|
|
2476
2479
|
*/
|
|
2477
2480
|
|
|
2478
2481
|
/*
|
|
2479
|
-
* Copyright (c)
|
|
2482
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
2480
2483
|
* Licensed under the MIT license.
|
|
2481
2484
|
* See LICENSE file in the project root for full license information.
|
|
2482
2485
|
*/
|
|
@@ -2576,7 +2579,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2576
2579
|
}] } });
|
|
2577
2580
|
|
|
2578
2581
|
/*
|
|
2579
|
-
* Copyright (c)
|
|
2582
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
2580
2583
|
* Licensed under the MIT license.
|
|
2581
2584
|
* See LICENSE file in the project root for full license information.
|
|
2582
2585
|
*/
|
|
@@ -2596,13 +2599,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2596
2599
|
}] });
|
|
2597
2600
|
|
|
2598
2601
|
/*
|
|
2599
|
-
* Copyright (c)
|
|
2602
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
2600
2603
|
* Licensed under the MIT license.
|
|
2601
2604
|
* See LICENSE file in the project root for full license information.
|
|
2602
2605
|
*/
|
|
2603
2606
|
|
|
2604
2607
|
/*
|
|
2605
|
-
* Copyright (c)
|
|
2608
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
2606
2609
|
* Licensed under the MIT license.
|
|
2607
2610
|
* See LICENSE file in the project root for full license information.
|
|
2608
2611
|
*/
|
|
@@ -2895,7 +2898,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2895
2898
|
}] } });
|
|
2896
2899
|
|
|
2897
2900
|
/*
|
|
2898
|
-
* Copyright (c)
|
|
2901
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
2899
2902
|
* Licensed under the MIT license.
|
|
2900
2903
|
* See LICENSE file in the project root for full license information.
|
|
2901
2904
|
*/
|
|
@@ -2926,41 +2929,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2926
2929
|
}] });
|
|
2927
2930
|
|
|
2928
2931
|
/*
|
|
2929
|
-
* Copyright (c)
|
|
2932
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
2930
2933
|
* Licensed under the MIT license.
|
|
2931
2934
|
* See LICENSE file in the project root for full license information.
|
|
2932
2935
|
*/
|
|
2933
2936
|
|
|
2934
2937
|
/*
|
|
2935
|
-
* Copyright (c)
|
|
2936
|
-
* Licensed under the MIT license.
|
|
2937
|
-
* See LICENSE file in the project root for full license information.
|
|
2938
|
-
*/
|
|
2939
|
-
/**
|
|
2940
|
-
* Animations used by MatDialog.
|
|
2941
|
-
* @docs-private
|
|
2942
|
-
*/
|
|
2943
|
-
const baoModalAnimations = {
|
|
2944
|
-
/** Animation that is applied on the modal container by default. */
|
|
2945
|
-
modalContainer: trigger('modalContainer', [
|
|
2946
|
-
// Note: The `enter` animation transitions to `transform: none`, because for some reason
|
|
2947
|
-
// specifying the transform explicitly, causes IE both to blur the modal content and
|
|
2948
|
-
// decimate the animation performance. Leaving it as `none` solves both issues.
|
|
2949
|
-
state('void, exit', style({ opacity: 0, transform: 'scale(0.7)' })),
|
|
2950
|
-
state('enter', style({ transform: 'none' })),
|
|
2951
|
-
transition('* => enter', group([
|
|
2952
|
-
animate('150ms cubic-bezier(0, 0, 0.2, 1)', style({ transform: 'none', opacity: 1 })),
|
|
2953
|
-
query('@*', animateChild(), { optional: true })
|
|
2954
|
-
])),
|
|
2955
|
-
transition('* => void, * => exit', group([
|
|
2956
|
-
animate('75ms cubic-bezier(0.4, 0.0, 0.2, 1)', style({ opacity: 0 })),
|
|
2957
|
-
query('@*', animateChild(), { optional: true })
|
|
2958
|
-
]))
|
|
2959
|
-
])
|
|
2960
|
-
};
|
|
2961
|
-
|
|
2962
|
-
/*
|
|
2963
|
-
* Copyright (c) 2022 Ville de Montreal. All rights reserved.
|
|
2938
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
2964
2939
|
* Licensed under the MIT license.
|
|
2965
2940
|
* See LICENSE file in the project root for full license information.
|
|
2966
2941
|
*/
|
|
@@ -3228,41 +3203,29 @@ class BaoModalContainer extends _BaoModalContainerBase {
|
|
|
3228
3203
|
/** State of the modal animation. */
|
|
3229
3204
|
this._state = 'enter';
|
|
3230
3205
|
}
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
if (toState === 'enter') {
|
|
3235
|
-
yield this._trapFocus();
|
|
3236
|
-
this._animationStateChanged.next({ state: 'opened', totalTime });
|
|
3237
|
-
}
|
|
3238
|
-
else if (toState === 'exit') {
|
|
3239
|
-
this._restoreFocus();
|
|
3240
|
-
this._animationStateChanged.next({ state: 'closed', totalTime });
|
|
3241
|
-
}
|
|
3242
|
-
});
|
|
3243
|
-
}
|
|
3244
|
-
/** Callback, invoked when an animation on the host starts. */
|
|
3245
|
-
_onAnimationStart({ toState, totalTime }) {
|
|
3246
|
-
if (toState === 'enter') {
|
|
3247
|
-
this._animationStateChanged.next({ state: 'opening', totalTime });
|
|
3248
|
-
}
|
|
3249
|
-
else if (toState === 'exit' || toState === 'void') {
|
|
3250
|
-
this._animationStateChanged.next({ state: 'closing', totalTime });
|
|
3251
|
-
}
|
|
3206
|
+
_startOpenAnimation() {
|
|
3207
|
+
this._animationStateChanged.emit({ state: 'opening', totalTime: 20 });
|
|
3208
|
+
void Promise.resolve().then(() => this._finishDialogOpen());
|
|
3252
3209
|
}
|
|
3253
3210
|
/** Starts the modal exit animation. */
|
|
3254
3211
|
_startExitAnimation() {
|
|
3255
|
-
this.
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
this.
|
|
3212
|
+
this._animationStateChanged.emit({ state: 'closed', totalTime: 20 });
|
|
3213
|
+
}
|
|
3214
|
+
_finishDialogOpen() {
|
|
3215
|
+
this._openAnimationDone(20);
|
|
3216
|
+
}
|
|
3217
|
+
_openAnimationDone(totalTime) {
|
|
3218
|
+
if (this._config.delayFocusTrap) {
|
|
3219
|
+
void this._trapFocus();
|
|
3220
|
+
}
|
|
3221
|
+
this._animationStateChanged.next({ state: 'opened', totalTime });
|
|
3259
3222
|
}
|
|
3260
3223
|
}
|
|
3261
3224
|
BaoModalContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModalContainer, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3262
|
-
BaoModalContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoModalContainer, selector: "bao-modal-container", host: { attributes: { "tabindex": "-1", "aria-modal": "true" },
|
|
3225
|
+
BaoModalContainer.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoModalContainer, selector: "bao-modal-container", host: { attributes: { "tabindex": "-1", "aria-modal": "true" }, properties: { "id": "_id", "attr.role": "_config.role", "attr.aria-labelledby": "_config.ariaLabel ? null : _ariaLabelledBy", "attr.aria-label": "_config.ariaLabel", "attr.aria-describedby": "_config.ariaDescribedBy || null" }, classAttribute: "bao-modal-container" }, usesInheritance: true, ngImport: i0, template: "<ng-template cdkPortalOutlet></ng-template>\n", styles: [".bao-container{padding-right:16px;padding-left:16px;margin-right:auto;margin-left:auto;width:100%}@media (min-width: 576px){.bao-container{max-width:576px}}@media (min-width: 768px){.bao-container{max-width:768px}}@media (min-width: 992px){.bao-container{max-width:992px}}@media (min-width: 1200px){.bao-container{max-width:1200px}}.bao-row{display:flex;flex-wrap:wrap;margin-right:-16px;margin-left:-16px}.bao-col-12,.bao-col-lg-7{position:relative;width:100%;padding-right:1rem;padding-left:1rem}@media (min-width: 992px){.bao-col-lg-7{flex:0 0 58.33333%;max-width:58.33333%}}.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex}.cdk-overlay-pane.bao-modal-mobil-full{width:100%;height:100%}.cdk-overlay-pane.bao-modal-mobil-compact{width:300px;height:100%}@media (min-width: 768px){.cdk-overlay-pane{width:500px;height:auto}.cdk-overlay-pane.bao-modal-lg{width:calc(100% - 4rem);height:calc(100% - 4rem)}.cdk-overlay-pane.bao-modal-md,.cdk-overlay-pane.bao-modal-sm{width:500px;height:auto;max-height:calc(100% - 4rem)}}@media (min-width: 992px){.cdk-overlay-pane{width:500px;height:auto}.cdk-overlay-pane.bao-modal-lg{width:calc(100% - 4rem);height:calc(100% - 4rem)}.cdk-overlay-pane.bao-modal-md{width:800px;height:auto;max-height:calc(100% - 4rem)}.cdk-overlay-pane.bao-modal-sm{width:500px;height:auto;max-height:calc(100% - 4rem)}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.5}.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:black}.cdk-overlay-transparent-backdrop,.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:.5}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}.bao-modal-container{display:block;overflow:auto;min-height:inherit;max-height:inherit;background-color:#fff;background-clip:padding-box;border:0 solid rgba(0,0,0,.2);border-radius:.5rem;outline:0}.bao-modal-content{display:flex;flex-direction:column;height:100%}.bao-modal-header{flex:0 0 auto;display:flex;align-items:flex-start;justify-content:space-between;border-bottom:1px solid #ced4da;border-top-left-radius:.5rem;border-top-right-radius:.5rem}.bao-modal-header .bao-modal-title{font-size:1rem;line-height:1.5rem;margin:1rem 0 1rem 1rem}.bao-modal-header button{margin:.5rem}.bao-modal-body{display:block;padding:1rem;overflow:auto;flex-grow:1}@media (min-width: 768px){.bao-modal-body{padding:2rem}}.bao-modal-footer{display:flex;flex-wrap:wrap;padding:1rem;border-top:1px solid #ced4da;border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.bao-modal-footer.bao-modal-footer-order{justify-content:unset;flex-direction:column-reverse}.bao-modal-footer button{text-align:center}.bao-modal-footer .bao-button-primary,.bao-modal-footer .bao-button-secondary{width:100%;display:block}.bao-modal-footer .bao-button-secondary{margin-bottom:.5rem}.bao-modal-footer .bao-button-tertiary{display:none}@media (min-width: 768px){.bao-modal-footer{justify-content:flex-end}.bao-modal-footer.bao-modal-footer-order{flex-direction:row-reverse}.bao-modal-footer .bao-button-primary{margin-left:1rem}.bao-modal-footer .bao-button-secondary{margin-bottom:0}.bao-modal-footer .bao-button-primary,.bao-modal-footer .bao-button-secondary{width:auto}.bao-modal-footer .bao-button-tertiary{display:block}}\n"], dependencies: [{ kind: "directive", type: i3.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
|
|
3263
3226
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModalContainer, decorators: [{
|
|
3264
3227
|
type: Component,
|
|
3265
|
-
args: [{ selector: 'bao-modal-container', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default,
|
|
3228
|
+
args: [{ selector: 'bao-modal-container', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, host: {
|
|
3266
3229
|
class: 'bao-modal-container',
|
|
3267
3230
|
tabindex: '-1',
|
|
3268
3231
|
'aria-modal': 'true',
|
|
@@ -3270,22 +3233,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
3270
3233
|
'[attr.role]': '_config.role',
|
|
3271
3234
|
'[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledBy',
|
|
3272
3235
|
'[attr.aria-label]': '_config.ariaLabel',
|
|
3273
|
-
'[attr.aria-describedby]': '_config.ariaDescribedBy || null'
|
|
3274
|
-
|
|
3275
|
-
'(@modalContainer.start)': '_onAnimationStart($event)',
|
|
3276
|
-
'(@modalContainer.done)': '_onAnimationDone($event)'
|
|
3277
|
-
}, template: "<ng-template cdkPortalOutlet></ng-template>\n", styles: [".bao-container{padding-right:16px;padding-left:16px;margin-right:auto;margin-left:auto;width:100%}@media (min-width: 576px){.bao-container{max-width:576px}}@media (min-width: 768px){.bao-container{max-width:768px}}@media (min-width: 992px){.bao-container{max-width:992px}}@media (min-width: 1200px){.bao-container{max-width:1200px}}.bao-row{display:flex;flex-wrap:wrap;margin-right:-16px;margin-left:-16px}.bao-col-12,.bao-col-lg-7{position:relative;width:100%;padding-right:1rem;padding-left:1rem}@media (min-width: 992px){.bao-col-lg-7{flex:0 0 58.33333%;max-width:58.33333%}}.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex}.cdk-overlay-pane.bao-modal-mobil-full{width:100%;height:100%}.cdk-overlay-pane.bao-modal-mobil-compact{width:300px;height:100%}@media (min-width: 768px){.cdk-overlay-pane{width:500px;height:auto}.cdk-overlay-pane.bao-modal-lg{width:calc(100% - 4rem);height:calc(100% - 4rem)}.cdk-overlay-pane.bao-modal-md,.cdk-overlay-pane.bao-modal-sm{width:500px;height:auto}}@media (min-width: 992px){.cdk-overlay-pane{width:500px;height:auto}.cdk-overlay-pane.bao-modal-lg{width:calc(100% - 4rem);height:calc(100% - 4rem)}.cdk-overlay-pane.bao-modal-md{width:800px;height:auto}.cdk-overlay-pane.bao-modal-sm{width:500px;height:auto}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.5}.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:black}.cdk-overlay-transparent-backdrop,.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:.5}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}.bao-modal-container{display:block;overflow:auto;width:100%;height:100%;min-height:inherit;max-height:inherit;background-color:#fff;background-clip:padding-box;border:0 solid rgba(0,0,0,.2);border-radius:.5rem;outline:0}.bao-modal-content{display:flex;flex-direction:column;height:100%}.bao-modal-header{flex:0 0 auto;display:flex;align-items:flex-start;justify-content:space-between;border-bottom:1px solid #ced4da;border-top-left-radius:.5rem;border-top-right-radius:.5rem}.bao-modal-header .bao-modal-title{font-size:1rem;line-height:1.5rem;margin:1rem 0 1rem 1rem}.bao-modal-header button{margin:.5rem}.bao-modal-body{display:block;padding:1rem;overflow:auto;flex-grow:1}@media (min-width: 768px){.bao-modal-body{padding:2rem}}.bao-modal-footer{display:flex;flex-wrap:wrap;padding:1rem;border-top:1px solid #ced4da;border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.bao-modal-footer.bao-modal-footer-order{justify-content:unset;flex-direction:column-reverse}.bao-modal-footer button{text-align:center}.bao-modal-footer .bao-button-primary,.bao-modal-footer .bao-button-secondary{width:100%;display:block}.bao-modal-footer .bao-button-secondary{margin-bottom:.5rem}.bao-modal-footer .bao-button-tertiary{display:none}@media (min-width: 768px){.bao-modal-footer{justify-content:flex-end}.bao-modal-footer.bao-modal-footer-order{flex-direction:row-reverse}.bao-modal-footer .bao-button-primary{margin-left:1rem}.bao-modal-footer .bao-button-secondary{margin-bottom:0}.bao-modal-footer .bao-button-primary,.bao-modal-footer .bao-button-secondary{width:auto}.bao-modal-footer .bao-button-tertiary{display:block}}\n"] }]
|
|
3236
|
+
'[attr.aria-describedby]': '_config.ariaDescribedBy || null'
|
|
3237
|
+
}, template: "<ng-template cdkPortalOutlet></ng-template>\n", styles: [".bao-container{padding-right:16px;padding-left:16px;margin-right:auto;margin-left:auto;width:100%}@media (min-width: 576px){.bao-container{max-width:576px}}@media (min-width: 768px){.bao-container{max-width:768px}}@media (min-width: 992px){.bao-container{max-width:992px}}@media (min-width: 1200px){.bao-container{max-width:1200px}}.bao-row{display:flex;flex-wrap:wrap;margin-right:-16px;margin-left:-16px}.bao-col-12,.bao-col-lg-7{position:relative;width:100%;padding-right:1rem;padding-left:1rem}@media (min-width: 992px){.bao-col-lg-7{flex:0 0 58.33333%;max-width:58.33333%}}.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex}.cdk-overlay-pane.bao-modal-mobil-full{width:100%;height:100%}.cdk-overlay-pane.bao-modal-mobil-compact{width:300px;height:100%}@media (min-width: 768px){.cdk-overlay-pane{width:500px;height:auto}.cdk-overlay-pane.bao-modal-lg{width:calc(100% - 4rem);height:calc(100% - 4rem)}.cdk-overlay-pane.bao-modal-md,.cdk-overlay-pane.bao-modal-sm{width:500px;height:auto;max-height:calc(100% - 4rem)}}@media (min-width: 992px){.cdk-overlay-pane{width:500px;height:auto}.cdk-overlay-pane.bao-modal-lg{width:calc(100% - 4rem);height:calc(100% - 4rem)}.cdk-overlay-pane.bao-modal-md{width:800px;height:auto;max-height:calc(100% - 4rem)}.cdk-overlay-pane.bao-modal-sm{width:500px;height:auto;max-height:calc(100% - 4rem)}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.5}.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:black}.cdk-overlay-transparent-backdrop,.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:.5}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}.bao-modal-container{display:block;overflow:auto;min-height:inherit;max-height:inherit;background-color:#fff;background-clip:padding-box;border:0 solid rgba(0,0,0,.2);border-radius:.5rem;outline:0}.bao-modal-content{display:flex;flex-direction:column;height:100%}.bao-modal-header{flex:0 0 auto;display:flex;align-items:flex-start;justify-content:space-between;border-bottom:1px solid #ced4da;border-top-left-radius:.5rem;border-top-right-radius:.5rem}.bao-modal-header .bao-modal-title{font-size:1rem;line-height:1.5rem;margin:1rem 0 1rem 1rem}.bao-modal-header button{margin:.5rem}.bao-modal-body{display:block;padding:1rem;overflow:auto;flex-grow:1}@media (min-width: 768px){.bao-modal-body{padding:2rem}}.bao-modal-footer{display:flex;flex-wrap:wrap;padding:1rem;border-top:1px solid #ced4da;border-bottom-right-radius:.5rem;border-bottom-left-radius:.5rem}.bao-modal-footer.bao-modal-footer-order{justify-content:unset;flex-direction:column-reverse}.bao-modal-footer button{text-align:center}.bao-modal-footer .bao-button-primary,.bao-modal-footer .bao-button-secondary{width:100%;display:block}.bao-modal-footer .bao-button-secondary{margin-bottom:.5rem}.bao-modal-footer .bao-button-tertiary{display:none}@media (min-width: 768px){.bao-modal-footer{justify-content:flex-end}.bao-modal-footer.bao-modal-footer-order{flex-direction:row-reverse}.bao-modal-footer .bao-button-primary{margin-left:1rem}.bao-modal-footer .bao-button-secondary{margin-bottom:0}.bao-modal-footer .bao-button-primary,.bao-modal-footer .bao-button-secondary{width:auto}.bao-modal-footer .bao-button-tertiary{display:block}}\n"] }]
|
|
3278
3238
|
}] });
|
|
3279
3239
|
|
|
3280
3240
|
// Counter for unique modal ids.
|
|
3281
|
-
let uniqueId = 0;
|
|
3241
|
+
let uniqueId$1 = 0;
|
|
3282
3242
|
/**
|
|
3283
3243
|
* Reference to a modal opened via the BaoModalService.
|
|
3284
3244
|
*/
|
|
3285
3245
|
class BaoModalRef {
|
|
3286
3246
|
constructor(_overlayRef, _containerInstance,
|
|
3287
3247
|
/** Id of the modal. */
|
|
3288
|
-
id = `bao-modal-${uniqueId++}`) {
|
|
3248
|
+
id = `bao-modal-${uniqueId$1++}`) {
|
|
3289
3249
|
this._overlayRef = _overlayRef;
|
|
3290
3250
|
this._containerInstance = _containerInstance;
|
|
3291
3251
|
this.id = id;
|
|
@@ -3366,6 +3326,9 @@ class BaoModalRef {
|
|
|
3366
3326
|
this._state = 1 /* CLOSING */;
|
|
3367
3327
|
this._containerInstance._startExitAnimation();
|
|
3368
3328
|
}
|
|
3329
|
+
startOpenAnimation() {
|
|
3330
|
+
this._containerInstance._startOpenAnimation();
|
|
3331
|
+
}
|
|
3369
3332
|
/**
|
|
3370
3333
|
* Gets an observable that is notified when the modal is finished opening.
|
|
3371
3334
|
*/
|
|
@@ -3471,14 +3434,14 @@ function _closeModalVia(ref, interactionType, result) {
|
|
|
3471
3434
|
}
|
|
3472
3435
|
|
|
3473
3436
|
/*
|
|
3474
|
-
* Copyright (c)
|
|
3437
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
3475
3438
|
* Licensed under the MIT license.
|
|
3476
3439
|
* See LICENSE file in the project root for full license information.
|
|
3477
3440
|
*/
|
|
3478
3441
|
/** Injection token that can be used to access the data that was passed in to a modal. */
|
|
3479
3442
|
const BAO_MODAL_DATA = new InjectionToken('BaoModalData');
|
|
3480
3443
|
class BaoModalBase {
|
|
3481
|
-
constructor(_overlay, _injector, _parentModal, _overlayContainer, _modalRefConstructor, _modalContainerType, _modalDataToken
|
|
3444
|
+
constructor(_overlay, _injector, _parentModal, _overlayContainer, _modalRefConstructor, _modalContainerType, _modalDataToken) {
|
|
3482
3445
|
this._overlay = _overlay;
|
|
3483
3446
|
this._injector = _injector;
|
|
3484
3447
|
this._parentModal = _parentModal;
|
|
@@ -3486,7 +3449,6 @@ class BaoModalBase {
|
|
|
3486
3449
|
this._modalRefConstructor = _modalRefConstructor;
|
|
3487
3450
|
this._modalContainerType = _modalContainerType;
|
|
3488
3451
|
this._modalDataToken = _modalDataToken;
|
|
3489
|
-
this._animationMode = _animationMode;
|
|
3490
3452
|
this.afterAllClosed = defer(() => this.openModals.length
|
|
3491
3453
|
? this.getAfterAllClosed()
|
|
3492
3454
|
: this.getAfterAllClosed().pipe(startWith(undefined)));
|
|
@@ -3526,21 +3488,6 @@ class BaoModalBase {
|
|
|
3526
3488
|
}
|
|
3527
3489
|
const overlayRef = this._createOverlay(conf);
|
|
3528
3490
|
const modalContainer = this._attachModalContainer(overlayRef, conf);
|
|
3529
|
-
if (this._animationMode !== 'NoopAnimations') {
|
|
3530
|
-
const animationStateSubscription = modalContainer._animationStateChanged.subscribe(modalAnimationEvent => {
|
|
3531
|
-
if (modalAnimationEvent.state === 'opening') {
|
|
3532
|
-
this._modalAnimatingOpen = true;
|
|
3533
|
-
}
|
|
3534
|
-
if (modalAnimationEvent.state === 'opened') {
|
|
3535
|
-
this._modalAnimatingOpen = false;
|
|
3536
|
-
animationStateSubscription.unsubscribe();
|
|
3537
|
-
}
|
|
3538
|
-
});
|
|
3539
|
-
if (!this._animationStateSubscriptions) {
|
|
3540
|
-
this._animationStateSubscriptions = new Subscription();
|
|
3541
|
-
}
|
|
3542
|
-
this._animationStateSubscriptions.add(animationStateSubscription);
|
|
3543
|
-
}
|
|
3544
3491
|
const modalRef = this._attachModalContent(componentOrTemplateRef, modalContainer, overlayRef, conf);
|
|
3545
3492
|
this._lastModalRef = modalRef;
|
|
3546
3493
|
// If this is the first modal that we're opening, hide all the non-overlay content.
|
|
@@ -3611,6 +3558,7 @@ class BaoModalBase {
|
|
|
3611
3558
|
});
|
|
3612
3559
|
const containerPortal = new ComponentPortal(this._modalContainerType, config.viewContainerRef, injector);
|
|
3613
3560
|
const containerRef = overlay.attach(containerPortal);
|
|
3561
|
+
containerRef.instance._startOpenAnimation();
|
|
3614
3562
|
return containerRef.instance;
|
|
3615
3563
|
}
|
|
3616
3564
|
/**
|
|
@@ -3725,16 +3673,16 @@ BaoModalBase.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "1
|
|
|
3725
3673
|
BaoModalBase.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoModalBase, ngImport: i0 });
|
|
3726
3674
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModalBase, decorators: [{
|
|
3727
3675
|
type: Directive
|
|
3728
|
-
}], ctorParameters: function () { return [{ type: i1$4.Overlay }, { type: i0.Injector }, { type: undefined }, { type: i1$4.OverlayContainer }, { type: i0.Type }, { type: i0.Type }, { type: i0.InjectionToken }
|
|
3676
|
+
}], ctorParameters: function () { return [{ type: i1$4.Overlay }, { type: i0.Injector }, { type: undefined }, { type: i1$4.OverlayContainer }, { type: i0.Type }, { type: i0.Type }, { type: i0.InjectionToken }]; } });
|
|
3729
3677
|
/**
|
|
3730
3678
|
* Service to open modal.
|
|
3731
3679
|
*/
|
|
3732
3680
|
class BaoModal extends BaoModalBase {
|
|
3733
|
-
constructor(overlay, injector, parentModal, overlayContainer
|
|
3734
|
-
super(overlay, injector, parentModal, overlayContainer, BaoModalRef, BaoModalContainer, BAO_MODAL_DATA
|
|
3681
|
+
constructor(overlay, injector, parentModal, overlayContainer) {
|
|
3682
|
+
super(overlay, injector, parentModal, overlayContainer, BaoModalRef, BaoModalContainer, BAO_MODAL_DATA);
|
|
3735
3683
|
}
|
|
3736
3684
|
}
|
|
3737
|
-
BaoModal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModal, deps: [{ token: i1$4.Overlay }, { token: i0.Injector }, { token: BaoModal, optional: true, skipSelf: true }, { token: i1$4.OverlayContainer }
|
|
3685
|
+
BaoModal.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModal, deps: [{ token: i1$4.Overlay }, { token: i0.Injector }, { token: BaoModal, optional: true, skipSelf: true }, { token: i1$4.OverlayContainer }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
3738
3686
|
BaoModal.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModal });
|
|
3739
3687
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModal, decorators: [{
|
|
3740
3688
|
type: Injectable
|
|
@@ -3743,16 +3691,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
3743
3691
|
type: Optional
|
|
3744
3692
|
}, {
|
|
3745
3693
|
type: SkipSelf
|
|
3746
|
-
}] }, { type: i1$4.OverlayContainer }
|
|
3747
|
-
type: Optional
|
|
3748
|
-
}, {
|
|
3749
|
-
type: Inject,
|
|
3750
|
-
args: [ANIMATION_MODULE_TYPE]
|
|
3751
|
-
}] }];
|
|
3694
|
+
}] }, { type: i1$4.OverlayContainer }];
|
|
3752
3695
|
} });
|
|
3753
3696
|
|
|
3754
3697
|
/*
|
|
3755
|
-
* Copyright (c)
|
|
3698
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
3756
3699
|
* Licensed under the MIT license.
|
|
3757
3700
|
* See LICENSE file in the project root for full license information.
|
|
3758
3701
|
*/
|
|
@@ -3833,7 +3776,7 @@ function getClosestDialog(element, openDialogs) {
|
|
|
3833
3776
|
}
|
|
3834
3777
|
|
|
3835
3778
|
/*
|
|
3836
|
-
* Copyright (c)
|
|
3779
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
3837
3780
|
* Licensed under the MIT license.
|
|
3838
3781
|
* See LICENSE file in the project root for full license information.
|
|
3839
3782
|
*/
|
|
@@ -3841,26 +3784,12 @@ const MODAL_DIRECTIVES = [BaoModalContainer, BaoModalClose];
|
|
|
3841
3784
|
class BaoModalModule {
|
|
3842
3785
|
}
|
|
3843
3786
|
BaoModalModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
3844
|
-
BaoModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoModalModule, declarations: [BaoModalContainer, BaoModalClose], imports: [CommonModule,
|
|
3845
|
-
|
|
3846
|
-
PortalModule,
|
|
3847
|
-
BrowserAnimationsModule,
|
|
3848
|
-
NoopAnimationsModule], exports: [BaoModalContainer, BaoModalClose] });
|
|
3849
|
-
BaoModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModalModule, providers: [BaoModal], imports: [CommonModule,
|
|
3850
|
-
OverlayModule,
|
|
3851
|
-
PortalModule,
|
|
3852
|
-
BrowserAnimationsModule,
|
|
3853
|
-
NoopAnimationsModule] });
|
|
3787
|
+
BaoModalModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoModalModule, declarations: [BaoModalContainer, BaoModalClose], imports: [CommonModule, OverlayModule, PortalModule], exports: [BaoModalContainer, BaoModalClose] });
|
|
3788
|
+
BaoModalModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModalModule, providers: [BaoModal], imports: [CommonModule, OverlayModule, PortalModule] });
|
|
3854
3789
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModalModule, decorators: [{
|
|
3855
3790
|
type: NgModule,
|
|
3856
3791
|
args: [{
|
|
3857
|
-
imports: [
|
|
3858
|
-
CommonModule,
|
|
3859
|
-
OverlayModule,
|
|
3860
|
-
PortalModule,
|
|
3861
|
-
BrowserAnimationsModule,
|
|
3862
|
-
NoopAnimationsModule
|
|
3863
|
-
],
|
|
3792
|
+
imports: [CommonModule, OverlayModule, PortalModule],
|
|
3864
3793
|
declarations: MODAL_DIRECTIVES,
|
|
3865
3794
|
exports: MODAL_DIRECTIVES,
|
|
3866
3795
|
providers: [BaoModal]
|
|
@@ -3868,7 +3797,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
3868
3797
|
}] });
|
|
3869
3798
|
|
|
3870
3799
|
/*
|
|
3871
|
-
* Copyright (c)
|
|
3800
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
3872
3801
|
* Licensed under the MIT license.
|
|
3873
3802
|
* See LICENSE file in the project root for full license information.
|
|
3874
3803
|
*/
|
|
@@ -3941,7 +3870,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
3941
3870
|
}] } });
|
|
3942
3871
|
|
|
3943
3872
|
/*
|
|
3944
|
-
* Copyright (c)
|
|
3873
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
3945
3874
|
* Licensed under the MIT license.
|
|
3946
3875
|
* See LICENSE file in the project root for full license information.
|
|
3947
3876
|
*/
|
|
@@ -3961,13 +3890,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
3961
3890
|
}] });
|
|
3962
3891
|
|
|
3963
3892
|
/*
|
|
3964
|
-
* Copyright (c)
|
|
3893
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
3965
3894
|
* Licensed under the MIT license.
|
|
3966
3895
|
* See LICENSE file in the project root for full license information.
|
|
3967
3896
|
*/
|
|
3968
3897
|
|
|
3969
3898
|
/*
|
|
3970
|
-
* Copyright (c)
|
|
3899
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
3971
3900
|
* Licensed under the MIT license.
|
|
3972
3901
|
* See LICENSE file in the project root for full license information.
|
|
3973
3902
|
*/
|
|
@@ -3984,6 +3913,10 @@ class BaoDropdownMenuItem {
|
|
|
3984
3913
|
* Is the list item disabled
|
|
3985
3914
|
*/
|
|
3986
3915
|
this.disabled = false;
|
|
3916
|
+
/**
|
|
3917
|
+
* Emits when menu item is clicked
|
|
3918
|
+
*/
|
|
3919
|
+
this.itemClicked = new EventEmitter();
|
|
3987
3920
|
}
|
|
3988
3921
|
get nativeElement() {
|
|
3989
3922
|
return this.elementRef.nativeElement;
|
|
@@ -4064,19 +3997,25 @@ class BaoDropdownMenuItem {
|
|
|
4064
3997
|
}
|
|
4065
3998
|
}
|
|
4066
3999
|
/**
|
|
4067
|
-
* This method propagates a click event to menu item children with inputs (checkbox, radio button)
|
|
4000
|
+
* This method propagates a click event to menu item children with inputs (checkbox, radio button).
|
|
4001
|
+
* It emits event to close menu if item does not contain an input.
|
|
4068
4002
|
*/
|
|
4069
4003
|
propagateClick() {
|
|
4004
|
+
let closeMenu = true;
|
|
4070
4005
|
for (let i = 0; i < this.nativeElement.children.length; i++) {
|
|
4071
4006
|
if (this.nativeElement.children.item(i).firstElementChild.localName ==
|
|
4072
4007
|
'input') {
|
|
4073
4008
|
this.nativeElement.children.item(i).firstElementChild.click();
|
|
4009
|
+
closeMenu = false;
|
|
4074
4010
|
}
|
|
4075
4011
|
}
|
|
4012
|
+
if (closeMenu) {
|
|
4013
|
+
this.itemClicked.emit();
|
|
4014
|
+
}
|
|
4076
4015
|
}
|
|
4077
4016
|
}
|
|
4078
4017
|
BaoDropdownMenuItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoDropdownMenuItem, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: BaoDropdownMenuComponent }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4079
|
-
BaoDropdownMenuItem.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoDropdownMenuItem, selector: "bao-dropdown-menu-item, [bao-dropdown-menu-item]", inputs: { disabled: "disabled" }, host: { listeners: { "window:keyup.space": "spaceKeyEvent()", "click": "onClick($event.target)", "window:
|
|
4018
|
+
BaoDropdownMenuItem.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoDropdownMenuItem, selector: "bao-dropdown-menu-item, [bao-dropdown-menu-item]", inputs: { disabled: "disabled" }, outputs: { itemClicked: "itemClicked" }, host: { listeners: { "window:keyup.space": "spaceKeyEvent()", "click": "onClick($event.target)", "window:keyup.enter": "enterKeyEvent()" }, properties: { "class.bao-dropdown-menu-item-disabled": "disabled===true" }, classAttribute: "bao-dropdown-menu-item" }, usesOnChanges: true, ngImport: i0 });
|
|
4080
4019
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoDropdownMenuItem, decorators: [{
|
|
4081
4020
|
type: Directive,
|
|
4082
4021
|
args: [{
|
|
@@ -4088,6 +4027,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
4088
4027
|
}]
|
|
4089
4028
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: BaoDropdownMenuComponent }]; }, propDecorators: { disabled: [{
|
|
4090
4029
|
type: Input
|
|
4030
|
+
}], itemClicked: [{
|
|
4031
|
+
type: Output
|
|
4091
4032
|
}], spaceKeyEvent: [{
|
|
4092
4033
|
type: HostListener,
|
|
4093
4034
|
args: ['window:keyup.space']
|
|
@@ -4096,7 +4037,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
4096
4037
|
args: ['click', ['$event.target']]
|
|
4097
4038
|
}], enterKeyEvent: [{
|
|
4098
4039
|
type: HostListener,
|
|
4099
|
-
args: ['window:
|
|
4040
|
+
args: ['window:keyup.enter']
|
|
4100
4041
|
}] } });
|
|
4101
4042
|
class BaoDropdownMenuComponent {
|
|
4102
4043
|
constructor(cdr, renderer, elementRef) {
|
|
@@ -4174,6 +4115,9 @@ class BaoDropdownMenuComponent {
|
|
|
4174
4115
|
this.renderer.setAttribute(this.nativeElement, 'id', this.menuId);
|
|
4175
4116
|
this._menuPortal = new DomPortal(this._menuContent);
|
|
4176
4117
|
}
|
|
4118
|
+
ngAfterContentInit() {
|
|
4119
|
+
this._listItems.forEach((item) => item.itemClicked.subscribe(() => this.isClosedByKeyEvent.emit()));
|
|
4120
|
+
}
|
|
4177
4121
|
focusFirstItem() {
|
|
4178
4122
|
this._activeItemIndex = 0;
|
|
4179
4123
|
this._listItems.first.nativeElement.focus();
|
|
@@ -4294,8 +4238,9 @@ class BaoDropdownMenuTrigger {
|
|
|
4294
4238
|
}
|
|
4295
4239
|
/** Enter key event triggers click event which opens menu,
|
|
4296
4240
|
* then focus is put on first item in the menu */
|
|
4297
|
-
enterKeyEvent() {
|
|
4241
|
+
enterKeyEvent(event) {
|
|
4298
4242
|
if (this._isMenuOpen && document.activeElement === this.nativeElement) {
|
|
4243
|
+
event.stopImmediatePropagation();
|
|
4299
4244
|
this.menu.focusFirstItem();
|
|
4300
4245
|
}
|
|
4301
4246
|
}
|
|
@@ -4365,6 +4310,20 @@ class BaoDropdownMenuTrigger {
|
|
|
4365
4310
|
originY: 'top',
|
|
4366
4311
|
overlayX: 'start',
|
|
4367
4312
|
overlayY: 'bottom'
|
|
4313
|
+
},
|
|
4314
|
+
{
|
|
4315
|
+
// top-right of the overlay is connected to bottom-right of the origin;
|
|
4316
|
+
originX: 'end',
|
|
4317
|
+
originY: 'bottom',
|
|
4318
|
+
overlayX: 'end',
|
|
4319
|
+
overlayY: 'top'
|
|
4320
|
+
},
|
|
4321
|
+
{
|
|
4322
|
+
// bottom-right of the overlay is connected to top-right of the origin;
|
|
4323
|
+
originX: 'end',
|
|
4324
|
+
originY: 'top',
|
|
4325
|
+
overlayX: 'end',
|
|
4326
|
+
overlayY: 'bottom'
|
|
4368
4327
|
}
|
|
4369
4328
|
]),
|
|
4370
4329
|
backdropClass: 'bao-overlay-transparent-backdrop',
|
|
@@ -4374,7 +4333,7 @@ class BaoDropdownMenuTrigger {
|
|
|
4374
4333
|
}
|
|
4375
4334
|
}
|
|
4376
4335
|
BaoDropdownMenuTrigger.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoDropdownMenuTrigger, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }, { token: i1$4.Overlay }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4377
|
-
BaoDropdownMenuTrigger.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoDropdownMenuTrigger, selector: "bao-dropdown-menu-trigger, [bao-dropdown-menu-trigger], [baoDropdownMenuTriggerFor]", inputs: { menu: ["baoDropdownMenuTriggerFor", "menu"] }, host: { listeners: { "window:keyup.escape": "escapeKeyEvent()", "window:keyup.enter": "enterKeyEvent()", "click": "onClick()" }, classAttribute: "bao-dropdown-menu-trigger" }, ngImport: i0 });
|
|
4336
|
+
BaoDropdownMenuTrigger.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoDropdownMenuTrigger, selector: "bao-dropdown-menu-trigger, [bao-dropdown-menu-trigger], [baoDropdownMenuTriggerFor]", inputs: { menu: ["baoDropdownMenuTriggerFor", "menu"] }, host: { listeners: { "window:keyup.escape": "escapeKeyEvent()", "window:keyup.enter": "enterKeyEvent($event)", "click": "onClick()" }, classAttribute: "bao-dropdown-menu-trigger" }, ngImport: i0 });
|
|
4378
4337
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoDropdownMenuTrigger, decorators: [{
|
|
4379
4338
|
type: Directive,
|
|
4380
4339
|
args: [{
|
|
@@ -4389,7 +4348,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
4389
4348
|
args: ['window:keyup.escape']
|
|
4390
4349
|
}], enterKeyEvent: [{
|
|
4391
4350
|
type: HostListener,
|
|
4392
|
-
args: ['window:keyup.enter']
|
|
4351
|
+
args: ['window:keyup.enter', ['$event']]
|
|
4393
4352
|
}], onClick: [{
|
|
4394
4353
|
type: HostListener,
|
|
4395
4354
|
args: ['click']
|
|
@@ -4484,7 +4443,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
4484
4443
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; } });
|
|
4485
4444
|
|
|
4486
4445
|
/*
|
|
4487
|
-
* Copyright (c)
|
|
4446
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
4488
4447
|
* Licensed under the MIT license.
|
|
4489
4448
|
* See LICENSE file in the project root for full license information.
|
|
4490
4449
|
*/
|
|
@@ -4524,109 +4483,1569 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
4524
4483
|
}] });
|
|
4525
4484
|
|
|
4526
4485
|
/*
|
|
4527
|
-
* Copyright (c)
|
|
4486
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
4528
4487
|
* Licensed under the MIT license.
|
|
4529
4488
|
* See LICENSE file in the project root for full license information.
|
|
4530
4489
|
*/
|
|
4531
4490
|
|
|
4532
4491
|
/*
|
|
4533
|
-
* Copyright (c)
|
|
4492
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
4534
4493
|
* Licensed under the MIT license.
|
|
4535
4494
|
* See LICENSE file in the project root for full license information.
|
|
4536
4495
|
*/
|
|
4537
|
-
|
|
4496
|
+
const KILO_THRESHOLD = 1000;
|
|
4497
|
+
const MEGA_THRESHOLD = 1000000;
|
|
4498
|
+
class BaoFilePreviewComponent {
|
|
4499
|
+
constructor(elementRef, renderer) {
|
|
4500
|
+
this.elementRef = elementRef;
|
|
4501
|
+
this.renderer = renderer;
|
|
4502
|
+
/**
|
|
4503
|
+
* Is file loading
|
|
4504
|
+
*/
|
|
4505
|
+
this.isLoading = false;
|
|
4506
|
+
/**
|
|
4507
|
+
* True if projected content has no icon and file does not have a thumbnail.
|
|
4508
|
+
*/
|
|
4509
|
+
this.insertGenericIcon = false;
|
|
4510
|
+
this.thumbnailURL = '';
|
|
4511
|
+
}
|
|
4512
|
+
get nativeElement() {
|
|
4513
|
+
return this.elementRef.nativeElement;
|
|
4514
|
+
}
|
|
4515
|
+
get fileSize() {
|
|
4516
|
+
return this.formatSize(this.file.size);
|
|
4517
|
+
}
|
|
4518
|
+
ngAfterContentInit() {
|
|
4519
|
+
this.getThumbnail();
|
|
4520
|
+
this.setIcon();
|
|
4521
|
+
}
|
|
4522
|
+
setIcon() {
|
|
4523
|
+
// If no icon is in the projected content, generic icon is added
|
|
4524
|
+
const contentIcon = Array.from(this.nativeElement.children.item(0).children).find((el) => el.localName === 'bao-icon');
|
|
4525
|
+
if (!contentIcon) {
|
|
4526
|
+
this.insertGenericIcon = true;
|
|
4527
|
+
}
|
|
4528
|
+
else {
|
|
4529
|
+
this.renderer.addClass(contentIcon, 'bao-file-media');
|
|
4530
|
+
}
|
|
4531
|
+
}
|
|
4532
|
+
getThumbnail() {
|
|
4533
|
+
if (this.file &&
|
|
4534
|
+
(this.file.type === 'image/png' || this.file.type === 'image/jpeg')) {
|
|
4535
|
+
const reader = new FileReader();
|
|
4536
|
+
reader.onload = (event) => {
|
|
4537
|
+
this.thumbnailURL = event.target.result;
|
|
4538
|
+
};
|
|
4539
|
+
reader.onerror = () => {
|
|
4540
|
+
this.thumbnailURL = '';
|
|
4541
|
+
};
|
|
4542
|
+
reader.readAsDataURL(this.file);
|
|
4543
|
+
}
|
|
4544
|
+
}
|
|
4545
|
+
formatSize(size) {
|
|
4546
|
+
if (size >= KILO_THRESHOLD && size / KILO_THRESHOLD < KILO_THRESHOLD) {
|
|
4547
|
+
return this.getSizeAndUnit(size, KILO_THRESHOLD, 'Ko');
|
|
4548
|
+
}
|
|
4549
|
+
const sizeDividedByKoMultiplicator = size / KILO_THRESHOLD;
|
|
4550
|
+
if (sizeDividedByKoMultiplicator >= KILO_THRESHOLD) {
|
|
4551
|
+
const toFixed = sizeDividedByKoMultiplicator > 10 ? 0 : 1;
|
|
4552
|
+
return this.getSizeAndUnit(size, MEGA_THRESHOLD, 'Mo', toFixed);
|
|
4553
|
+
}
|
|
4554
|
+
return `${size} octets`;
|
|
4555
|
+
}
|
|
4556
|
+
getSizeAndUnit(size, multiplicator, unit, toFixed = 0) {
|
|
4557
|
+
return `${(size / multiplicator).toFixed(toFixed)} ${unit}`;
|
|
4558
|
+
}
|
|
4538
4559
|
}
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
4548
|
-
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
BaoListModule,
|
|
4552
|
-
BaoCommonComponentsModule,
|
|
4553
|
-
BaoCheckboxModule,
|
|
4554
|
-
BaoRadioModule,
|
|
4555
|
-
BaoSummaryModule,
|
|
4556
|
-
BaoAvatarModule,
|
|
4557
|
-
BaoTabsModule,
|
|
4558
|
-
BaoModalModule,
|
|
4559
|
-
BaoHyperlinkModule,
|
|
4560
|
-
BaoDropdownMenuModule
|
|
4561
|
-
// TODO: reactivate once component does not depend on global css BaoBadgeModule,
|
|
4562
|
-
// TODO: reactivate once component does not depend on global css BaoSnackBarModule,
|
|
4563
|
-
] });
|
|
4564
|
-
BaoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModule, imports: [BaoIconModule,
|
|
4565
|
-
BaoButtonModule,
|
|
4566
|
-
BaoAlertModule,
|
|
4567
|
-
BaoCardModule,
|
|
4568
|
-
BaoBreadcrumbModule, BaoIconModule,
|
|
4569
|
-
BaoButtonModule,
|
|
4570
|
-
BaoAlertModule,
|
|
4571
|
-
BaoBreadcrumbModule,
|
|
4572
|
-
BaoCardModule,
|
|
4573
|
-
BaoTagModule,
|
|
4574
|
-
BaoHeaderInfoModule,
|
|
4575
|
-
BaoListModule,
|
|
4576
|
-
BaoCommonComponentsModule,
|
|
4577
|
-
BaoCheckboxModule,
|
|
4578
|
-
BaoRadioModule,
|
|
4579
|
-
BaoSummaryModule,
|
|
4580
|
-
BaoAvatarModule,
|
|
4581
|
-
BaoTabsModule,
|
|
4582
|
-
BaoModalModule,
|
|
4583
|
-
BaoHyperlinkModule,
|
|
4584
|
-
BaoDropdownMenuModule
|
|
4585
|
-
// TODO: reactivate once component does not depend on global css BaoBadgeModule,
|
|
4586
|
-
// TODO: reactivate once component does not depend on global css BaoSnackBarModule,
|
|
4587
|
-
] });
|
|
4588
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModule, decorators: [{
|
|
4589
|
-
type: NgModule,
|
|
4590
|
-
args: [{
|
|
4591
|
-
imports: [
|
|
4592
|
-
BaoIconModule,
|
|
4593
|
-
BaoButtonModule,
|
|
4594
|
-
BaoAlertModule,
|
|
4595
|
-
BaoCardModule,
|
|
4596
|
-
BaoBreadcrumbModule
|
|
4597
|
-
],
|
|
4598
|
-
exports: [
|
|
4599
|
-
BaoIconModule,
|
|
4600
|
-
BaoButtonModule,
|
|
4601
|
-
BaoAlertModule,
|
|
4602
|
-
BaoBreadcrumbModule,
|
|
4603
|
-
BaoCardModule,
|
|
4604
|
-
BaoTagModule,
|
|
4605
|
-
BaoHeaderInfoModule,
|
|
4606
|
-
BaoListModule,
|
|
4607
|
-
BaoCommonComponentsModule,
|
|
4608
|
-
BaoCheckboxModule,
|
|
4609
|
-
BaoRadioModule,
|
|
4610
|
-
BaoSummaryModule,
|
|
4611
|
-
BaoAvatarModule,
|
|
4612
|
-
BaoTabsModule,
|
|
4613
|
-
BaoModalModule,
|
|
4614
|
-
BaoHyperlinkModule,
|
|
4615
|
-
BaoDropdownMenuModule
|
|
4616
|
-
// TODO: reactivate once component does not depend on global css BaoBadgeModule,
|
|
4617
|
-
// TODO: reactivate once component does not depend on global css BaoSnackBarModule,
|
|
4618
|
-
]
|
|
4619
|
-
}]
|
|
4620
|
-
}] });
|
|
4560
|
+
BaoFilePreviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoFilePreviewComponent, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
4561
|
+
BaoFilePreviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoFilePreviewComponent, selector: "bao-file-preview, [bao-file-preview]", inputs: { file: "file", isLoading: "isLoading" }, host: { classAttribute: "bao-file-preview" }, ngImport: i0, template: "<div class=\"bao-file-info\">\n <ng-content select=\"bao-icon\"></ng-content>\n <bao-icon\n *ngIf=\"insertGenericIcon && !thumbnailURL\"\n class=\"bao-file-media\"\n svgIcon=\"icon-file\"\n >\n </bao-icon>\n <ng-container *ngIf=\"thumbnailURL && !isLoading\">\n <img\n class=\"bao-file-media\"\n [src]=\"thumbnailURL\"\n width=\"40px\"\n height=\"40px\"\n />\n </ng-container>\n <div class=\"bao-file-text\">\n <div class=\"bao-file-name\">{{ file.name }}</div>\n <div class=\"bao-file-size\">{{ fileSize }}</div>\n </div>\n</div>\n<ng-container *ngIf=\"!isLoading\">\n <ng-content select=\"button[bao-button]\"></ng-content>\n <ng-content select=\"baoDropdownTriggerFor\"></ng-content>\n</ng-container>\n<bao-icon\n *ngIf=\"isLoading\"\n class=\"loading-spinner\"\n svgIcon=\"icon-spinner\"\n title=\"chargement\"\n></bao-icon>\n", styles: [".bao-file-preview{display:flex;align-items:center;justify-content:space-between;padding-top:.625rem;padding-bottom:.625rem;list-style-type:none}.bao-file-preview>.bao-file-info{display:flex;align-items:center}.bao-file-preview>.bao-file-info>.bao-icon{color:#adb2bd;flex-shrink:0}.bao-file-preview>.bao-file-info>.bao-file-media{margin-right:1rem}.bao-file-preview>.bao-file-info>.bao-file-text{display:inline-flex;flex-direction:column;margin-right:1rem}.bao-file-preview>.bao-file-info>.bao-file-text>.bao-file-name{overflow:hidden;font-weight:700;font-size:.875rem;line-height:1.25rem;color:#212529}.bao-file-preview>.bao-file-info>.bao-file-text>.bao-file-size{font-weight:400;font-size:.75rem;line-height:1rem;color:#637381}.bao-file-preview .loading-spinner{color:#097d6c}.bao-file-preview .bao-dropdown-menu-container{position:absolute;margin-left:auto}\n"], dependencies: [{ kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: BaoIconComponent, selector: "bao-icon", inputs: ["color", "size", "svgIcon", "title"], exportAs: ["baoIcon"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
4562
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoFilePreviewComponent, decorators: [{
|
|
4563
|
+
type: Component,
|
|
4564
|
+
args: [{ selector: 'bao-file-preview, [bao-file-preview]', encapsulation: ViewEncapsulation.None, host: {
|
|
4565
|
+
class: 'bao-file-preview'
|
|
4566
|
+
}, template: "<div class=\"bao-file-info\">\n <ng-content select=\"bao-icon\"></ng-content>\n <bao-icon\n *ngIf=\"insertGenericIcon && !thumbnailURL\"\n class=\"bao-file-media\"\n svgIcon=\"icon-file\"\n >\n </bao-icon>\n <ng-container *ngIf=\"thumbnailURL && !isLoading\">\n <img\n class=\"bao-file-media\"\n [src]=\"thumbnailURL\"\n width=\"40px\"\n height=\"40px\"\n />\n </ng-container>\n <div class=\"bao-file-text\">\n <div class=\"bao-file-name\">{{ file.name }}</div>\n <div class=\"bao-file-size\">{{ fileSize }}</div>\n </div>\n</div>\n<ng-container *ngIf=\"!isLoading\">\n <ng-content select=\"button[bao-button]\"></ng-content>\n <ng-content select=\"baoDropdownTriggerFor\"></ng-content>\n</ng-container>\n<bao-icon\n *ngIf=\"isLoading\"\n class=\"loading-spinner\"\n svgIcon=\"icon-spinner\"\n title=\"chargement\"\n></bao-icon>\n", styles: [".bao-file-preview{display:flex;align-items:center;justify-content:space-between;padding-top:.625rem;padding-bottom:.625rem;list-style-type:none}.bao-file-preview>.bao-file-info{display:flex;align-items:center}.bao-file-preview>.bao-file-info>.bao-icon{color:#adb2bd;flex-shrink:0}.bao-file-preview>.bao-file-info>.bao-file-media{margin-right:1rem}.bao-file-preview>.bao-file-info>.bao-file-text{display:inline-flex;flex-direction:column;margin-right:1rem}.bao-file-preview>.bao-file-info>.bao-file-text>.bao-file-name{overflow:hidden;font-weight:700;font-size:.875rem;line-height:1.25rem;color:#212529}.bao-file-preview>.bao-file-info>.bao-file-text>.bao-file-size{font-weight:400;font-size:.75rem;line-height:1rem;color:#637381}.bao-file-preview .loading-spinner{color:#097d6c}.bao-file-preview .bao-dropdown-menu-container{position:absolute;margin-left:auto}\n"] }]
|
|
4567
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { file: [{
|
|
4568
|
+
type: Input
|
|
4569
|
+
}], isLoading: [{
|
|
4570
|
+
type: Input
|
|
4571
|
+
}] } });
|
|
4621
4572
|
|
|
4622
4573
|
/*
|
|
4623
|
-
* Copyright (c)
|
|
4574
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
4624
4575
|
* Licensed under the MIT license.
|
|
4625
4576
|
* See LICENSE file in the project root for full license information.
|
|
4626
4577
|
*/
|
|
4627
|
-
|
|
4578
|
+
/**
|
|
4579
|
+
* To modify the labels and text displayed, create a new instance of BaoFileIntl and
|
|
4580
|
+
* include it in a custom provider
|
|
4581
|
+
*/
|
|
4582
|
+
class BaoFileIntl {
|
|
4628
4583
|
constructor() {
|
|
4629
|
-
|
|
4584
|
+
/**
|
|
4585
|
+
* Stream to emit from when labels are changed. Use this to notify components when the labels have
|
|
4586
|
+
* changed after initialization.
|
|
4587
|
+
*/
|
|
4588
|
+
this.changes = new Subject();
|
|
4589
|
+
/** The label for button in dropzone */
|
|
4590
|
+
this.dropzoneButtonLabel = 'Parcourir';
|
|
4591
|
+
/** The default dropzone instructions */
|
|
4592
|
+
this.defaultDropzoneInstructions = 'ou déposer votre fichier ici';
|
|
4593
|
+
/** Error message displayed when uploaded file is too large */
|
|
4594
|
+
this.fileTooBigErrorMessage = 'La taille de ce fichier est trop grande';
|
|
4595
|
+
/** Error message displayed when uploaded file has an invalid type */
|
|
4596
|
+
this.invalidFileTypeErrorMessage = "Ce format de fichier n'est pas autorisé";
|
|
4597
|
+
}
|
|
4598
|
+
}
|
|
4599
|
+
BaoFileIntl.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoFileIntl, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
4600
|
+
BaoFileIntl.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoFileIntl, providedIn: 'root' });
|
|
4601
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoFileIntl, decorators: [{
|
|
4602
|
+
type: Injectable,
|
|
4603
|
+
args: [{ providedIn: 'root' }]
|
|
4604
|
+
}] });
|
|
4605
|
+
class BaoFileIntlEnglish extends BaoFileIntl {
|
|
4606
|
+
constructor() {
|
|
4607
|
+
super(...arguments);
|
|
4608
|
+
/** The label for button in dropzone */
|
|
4609
|
+
this.dropzoneButtonLabel = 'Browse';
|
|
4610
|
+
/** The default dropzone instructions */
|
|
4611
|
+
this.defaultDropzoneInstructions = 'or drop your file here';
|
|
4612
|
+
/** Error message displayed when uploaded file is too large */
|
|
4613
|
+
this.fileTooBigErrorMessage = 'The size of this file is too large';
|
|
4614
|
+
/** Error message displayed when uploaded file has an invalid type */
|
|
4615
|
+
this.invalidFileTypeErrorMessage = 'The format of this file is unauthorized';
|
|
4616
|
+
}
|
|
4617
|
+
}
|
|
4618
|
+
BaoFileIntlEnglish.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoFileIntlEnglish, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
4619
|
+
BaoFileIntlEnglish.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoFileIntlEnglish });
|
|
4620
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoFileIntlEnglish, decorators: [{
|
|
4621
|
+
type: Injectable
|
|
4622
|
+
}] });
|
|
4623
|
+
/** @docs-private */
|
|
4624
|
+
function BAO_FILE_INTL_PROVIDER_FACTORY(parentIntl) {
|
|
4625
|
+
return parentIntl || new BaoFileIntl();
|
|
4626
|
+
}
|
|
4627
|
+
/** @docs-private */
|
|
4628
|
+
const BAO_FILE_INTL_PROVIDER = {
|
|
4629
|
+
// If there is already an BaoFileIntl available, use that. Otherwise, provide a new one.
|
|
4630
|
+
provide: BaoFileIntl,
|
|
4631
|
+
deps: [[new Optional(), new SkipSelf(), BaoFileIntl]],
|
|
4632
|
+
useFactory: BAO_FILE_INTL_PROVIDER_FACTORY
|
|
4633
|
+
};
|
|
4634
|
+
|
|
4635
|
+
/*
|
|
4636
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
4637
|
+
* Licensed under the MIT license.
|
|
4638
|
+
* See LICENSE file in the project root for full license information.
|
|
4639
|
+
*/
|
|
4640
|
+
/**
|
|
4641
|
+
* Unique number to generate a unique ID
|
|
4642
|
+
*/
|
|
4643
|
+
let fileInputUniqueId = 0;
|
|
4644
|
+
let fileTextUniqueId = 0;
|
|
4645
|
+
class BaoFileInputComponent {
|
|
4646
|
+
constructor(intl, elementRef, renderer, cdr) {
|
|
4647
|
+
this.intl = intl;
|
|
4648
|
+
this.elementRef = elementRef;
|
|
4649
|
+
this.renderer = renderer;
|
|
4650
|
+
this.cdr = cdr;
|
|
4651
|
+
/**
|
|
4652
|
+
* Size of the file input label
|
|
4653
|
+
*/
|
|
4654
|
+
this.size = 'medium';
|
|
4655
|
+
/**
|
|
4656
|
+
* Maximum size accepted for uploaded files
|
|
4657
|
+
*/
|
|
4658
|
+
this.maximalFileSize = -1;
|
|
4659
|
+
/**
|
|
4660
|
+
* Accepted types of files
|
|
4661
|
+
*/
|
|
4662
|
+
this.acceptedMIMETypes = [];
|
|
4663
|
+
/**
|
|
4664
|
+
* Is field required
|
|
4665
|
+
*/
|
|
4666
|
+
this.required = false;
|
|
4667
|
+
/**
|
|
4668
|
+
* Is field disabled
|
|
4669
|
+
*/
|
|
4670
|
+
this.disabled = false;
|
|
4671
|
+
/**
|
|
4672
|
+
* File selected to be uploaded
|
|
4673
|
+
*/
|
|
4674
|
+
this.uploadedFile = new EventEmitter();
|
|
4675
|
+
this.insertDefaultInstructions = false;
|
|
4676
|
+
this.isFileTooBig = false;
|
|
4677
|
+
this.isFileTypeInvalid = false;
|
|
4678
|
+
/**
|
|
4679
|
+
* Saves the registerOnChange function so the component can call it whenever it wants.
|
|
4680
|
+
*/
|
|
4681
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function, @typescript-eslint/no-unused-vars
|
|
4682
|
+
this.propagateChange = (_) => { };
|
|
4683
|
+
/**
|
|
4684
|
+
* Saves the registerOnTouched function so the component can call it whenever it wants.
|
|
4685
|
+
*/
|
|
4686
|
+
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
4687
|
+
this.propagateTouched = () => { };
|
|
4688
|
+
this._intlChanges = intl.changes.subscribe(() => this.cdr.markForCheck());
|
|
4689
|
+
}
|
|
4690
|
+
get nativeElement() {
|
|
4691
|
+
return this.elementRef.nativeElement;
|
|
4692
|
+
}
|
|
4693
|
+
enterKeyEvent() {
|
|
4694
|
+
if (document.activeElement.id === this.inputId) {
|
|
4695
|
+
document.getElementById(this.inputId).click();
|
|
4696
|
+
}
|
|
4697
|
+
}
|
|
4698
|
+
tabKeyEvent() {
|
|
4699
|
+
if (document.activeElement.id === this.inputId) {
|
|
4700
|
+
this.renderer.addClass(this.dropzoneElement.nativeElement, 'dropzone-focus');
|
|
4701
|
+
}
|
|
4702
|
+
}
|
|
4703
|
+
shiftTabKeyEvent() {
|
|
4704
|
+
if (document.activeElement.id === this.inputId) {
|
|
4705
|
+
this.renderer.addClass(this.dropzoneElement.nativeElement, 'dropzone-focus');
|
|
4706
|
+
}
|
|
4707
|
+
}
|
|
4708
|
+
ngAfterContentInit() {
|
|
4709
|
+
this._errorForm.changes.subscribe(() => this.setErrorTextsAttribute());
|
|
4710
|
+
if (!this.inputId) {
|
|
4711
|
+
this.inputId = `file-input-${fileInputUniqueId++}`;
|
|
4712
|
+
}
|
|
4713
|
+
// If no content was added for dropzone instructions, add default text.
|
|
4714
|
+
const dropzoneElement = Array.from(this.nativeElement.children).find((el) => el.className === 'file-drop-zone');
|
|
4715
|
+
if (!Array.from(dropzoneElement.children).find(el => el.localName === 'bao-file-dropzone-instructions')) {
|
|
4716
|
+
this.insertDefaultInstructions = true;
|
|
4717
|
+
}
|
|
4718
|
+
this.setDescribedByAttribute();
|
|
4719
|
+
this._files.changes.subscribe((files) => {
|
|
4720
|
+
const filesList = files.map((el) => el.file);
|
|
4721
|
+
this.setValue(filesList);
|
|
4722
|
+
});
|
|
4723
|
+
}
|
|
4724
|
+
ngAfterViewInit() {
|
|
4725
|
+
this._errorTexts.changes.subscribe(() => this.setErrorTextsAttribute());
|
|
4726
|
+
}
|
|
4727
|
+
ngOnDestroy() {
|
|
4728
|
+
this._intlChanges.unsubscribe();
|
|
4729
|
+
}
|
|
4730
|
+
/**
|
|
4731
|
+
* Implements ControlValueAccessor interface
|
|
4732
|
+
*/
|
|
4733
|
+
writeValue(obj) {
|
|
4734
|
+
this._value = obj;
|
|
4735
|
+
}
|
|
4736
|
+
/**
|
|
4737
|
+
* Implements ControlValueAccessor interface
|
|
4738
|
+
*/
|
|
4739
|
+
registerOnChange(fn) {
|
|
4740
|
+
this.propagateChange = fn;
|
|
4741
|
+
}
|
|
4742
|
+
/**
|
|
4743
|
+
* Implements ControlValueAccessor interface
|
|
4744
|
+
*/
|
|
4745
|
+
registerOnTouched(fn) {
|
|
4746
|
+
this.propagateTouched = fn;
|
|
4747
|
+
}
|
|
4748
|
+
/**
|
|
4749
|
+
* Implements ControlValueAccessor interface
|
|
4750
|
+
*/
|
|
4751
|
+
setDisabledState(isDisabled) {
|
|
4752
|
+
this.disabled = isDisabled;
|
|
4753
|
+
}
|
|
4754
|
+
uploadFile(file) {
|
|
4755
|
+
if (!this.disabled) {
|
|
4756
|
+
this.isFileTypeInvalid = false;
|
|
4757
|
+
this.isFileTooBig = false;
|
|
4758
|
+
this.uploader.nativeElement.value = '';
|
|
4759
|
+
if (this.maximalFileSize > 0 && file.size > this.maximalFileSize) {
|
|
4760
|
+
this.isFileTooBig = true;
|
|
4761
|
+
}
|
|
4762
|
+
if (this.acceptedMIMETypes.length > 0 &&
|
|
4763
|
+
this.acceptedMIMETypes.indexOf(file.type) < 0) {
|
|
4764
|
+
this.isFileTypeInvalid = true;
|
|
4765
|
+
}
|
|
4766
|
+
if (!this.isFileTooBig && !this.isFileTypeInvalid) {
|
|
4767
|
+
this.uploadedFile.emit(file);
|
|
4768
|
+
}
|
|
4769
|
+
}
|
|
4770
|
+
}
|
|
4771
|
+
setValue(value) {
|
|
4772
|
+
this._value = value;
|
|
4773
|
+
this.propagateChange(this._value);
|
|
4774
|
+
this.propagateTouched();
|
|
4775
|
+
}
|
|
4776
|
+
setDescribedByAttribute() {
|
|
4777
|
+
const helperText = Array.from(this.nativeElement.children).find((el) => el.localName === 'bao-guiding-text');
|
|
4778
|
+
if (helperText) {
|
|
4779
|
+
this._helperTextId = `bao-guiding-text-${fileTextUniqueId++}`;
|
|
4780
|
+
this.renderer.setAttribute(helperText.firstElementChild, 'id', this._helperTextId);
|
|
4781
|
+
const inputElement = Array.from(this.nativeElement.children)
|
|
4782
|
+
.find((el) => el.className == 'file-drop-zone')
|
|
4783
|
+
.children.item(1);
|
|
4784
|
+
this.renderer.setAttribute(inputElement, 'aria-describedby', this._helperTextId);
|
|
4785
|
+
}
|
|
4786
|
+
}
|
|
4787
|
+
setErrorTextsAttribute() {
|
|
4788
|
+
const textsIds = [];
|
|
4789
|
+
const errors = Array.from(this.nativeElement.children).filter((el) => el.localName == 'bao-error');
|
|
4790
|
+
errors.forEach((errorText) => {
|
|
4791
|
+
const errorTextId = `bao-error-${fileTextUniqueId++}`;
|
|
4792
|
+
this.renderer.setAttribute(errorText.firstElementChild, 'id', errorTextId);
|
|
4793
|
+
textsIds.push(errorTextId);
|
|
4794
|
+
});
|
|
4795
|
+
const inputElement = Array.from(this.nativeElement.children)
|
|
4796
|
+
.find((el) => el.classList.contains('file-drop-zone'))
|
|
4797
|
+
.children.item(1);
|
|
4798
|
+
if (this._helperTextId) {
|
|
4799
|
+
textsIds.unshift(this._helperTextId);
|
|
4800
|
+
}
|
|
4801
|
+
this.renderer.setAttribute(inputElement, 'aria-describedby', textsIds.join(' '));
|
|
4802
|
+
}
|
|
4803
|
+
}
|
|
4804
|
+
BaoFileInputComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoFileInputComponent, deps: [{ token: BaoFileIntl }, { token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4805
|
+
BaoFileInputComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoFileInputComponent, selector: "bao-file-input, [bao-file-input]", inputs: { inputId: ["id", "inputId"], label: "label", size: "size", maximalFileSize: "maximalFileSize", acceptedMIMETypes: "acceptedMIMETypes", required: "required", disabled: "disabled" }, outputs: { uploadedFile: "uploadedFile" }, host: { listeners: { "window:keyup.enter": "enterKeyEvent()", "window:keyup.tab": "tabKeyEvent()", "window:keyup.shift.tab": "shiftTabKeyEvent()" }, properties: { "class.bao-file-label-small": "size === \"small\"", "class.bao-file-label-medium": "size === \"medium\"", "class.bao-file-input-disabled": "disabled" }, classAttribute: "bao-file-input" }, providers: [
|
|
4806
|
+
{
|
|
4807
|
+
provide: NG_VALUE_ACCESSOR,
|
|
4808
|
+
// tslint:disable-next-line:no-forward-ref
|
|
4809
|
+
useExisting: forwardRef(() => BaoFileInputComponent),
|
|
4810
|
+
multi: true
|
|
4811
|
+
}
|
|
4812
|
+
], queries: [{ propertyName: "_files", predicate: BaoFilePreviewComponent, descendants: true }, { propertyName: "_errorForm", predicate: BaoErrorTextComponent, descendants: true }], viewQueries: [{ propertyName: "uploader", first: true, predicate: ["uploader"], descendants: true }, { propertyName: "dropzoneElement", first: true, predicate: ["dropzone"], descendants: true }, { propertyName: "_errorTexts", predicate: BaoErrorTextComponent, descendants: true }], ngImport: i0, template: "<label bao-label [required]=\"required\" [for]=\"inputId\">{{ label }}</label>\n<ng-content select=\"bao-guiding-text\"></ng-content>\n<div\n baoFileDrop\n class=\"file-drop-zone\"\n (fileDrop)=\"uploadFile($event)\"\n #dropzone\n>\n <button\n bao-button\n type=\"button\"\n displayType=\"utility\"\n level=\"secondary\"\n [disabled]=\"disabled\"\n (click)=\"uploader.click()\"\n aria-hidden=\"true\"\n tabIndex=\"-1\"\n >\n {{ intl.dropzoneButtonLabel }}\n </button>\n <input\n [id]=\"inputId\"\n type=\"file\"\n class=\"sr-only\"\n [disabled]=\"disabled\"\n (change)=\"uploadFile($event.target.files[0])\"\n #uploader\n />\n <ng-container\n ><div #ref>\n <ng-content select=\"bao-file-dropzone-instructions\"></ng-content></div\n ></ng-container>\n <ng-container *ngIf=\"ref.childNodes.length === 0\"\n ><bao-file-dropzone-instructions>{{\n intl.defaultDropzoneInstructions\n }}</bao-file-dropzone-instructions></ng-container\n >\n</div>\n<bao-error *ngIf=\"isFileTooBig\">\n {{ intl.fileTooBigErrorMessage }}\n</bao-error>\n<bao-error *ngIf=\"isFileTypeInvalid\">\n {{ intl.invalidFileTypeErrorMessage }}\n</bao-error>\n<ng-content select=\"bao-error\"></ng-content>\n<ng-content></ng-content>\n", styles: ["bao-file-input{width:100%;display:inline-flex;flex-direction:column}bao-file-input>ul{padding:0;margin:0}bao-file-input .bao-label>span{font-size:inherit;font-weight:inherit}bao-file-input.bao-file-label-small label{font-weight:700;font-size:.875rem;line-height:1.25rem}bao-file-input.bao-file-label-medium label{font-weight:700;font-size:1rem;line-height:1.5rem}bao-file-input .bao-guiding-text{margin-bottom:.5rem}bao-file-input .file-drop-zone{padding:.5rem;background-color:#fff;border-radius:.25rem;border-style:dashed;border-color:#ced4da;border-width:1px;display:inline-flex;align-items:center}bao-file-input .file-drop-zone:focus-within.dropzone-focus{box-shadow:0 0 0 .1875rem #98bcde;background-color:#eefaf8}bao-file-input .file-drop-zone>.bao-button{margin-right:.5rem}bao-file-input .file-drop-zone.drag-over{background-color:#eefaf8;border-color:#097d6c;cursor:drag}bao-file-input .file-drop-zone.drag-over>.bao-button{background-color:#eefaf8}bao-file-input.bao-file-input-disabled .file-drop-zone{background-color:#f8f9fa;border-color:#ced4da}bao-file-input.bao-file-input-disabled .file-drop-zone .bao-button{background-color:#f8f9fa}bao-file-input.bao-file-input-disabled .file-drop-zone .bao-button:hover{background-color:#f8f9fa}bao-file-input .bao-file-preview:first-child{margin-top:1rem}bao-file-input .bao-error{margin-top:.5rem}\n"], dependencies: [{ kind: "directive", type: i0.forwardRef(function () { return i1$1.NgIf; }), selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i0.forwardRef(function () { return BaoErrorTextComponent; }), selector: "bao-error, [bao-error]" }, { kind: "component", type: i0.forwardRef(function () { return BaoLabelTextComponent; }), selector: "bao-label, [bao-label]", inputs: ["required"] }, { kind: "component", type: i0.forwardRef(function () { return BaoButtonComponent; }), selector: "button[bao-button]", inputs: ["displayType", "level", "size", "loading", "reversed", "loadingSpinnerAriaLabel", "fullWidth"] }, { kind: "directive", type: i0.forwardRef(function () { return BaoFileDropzoneIntructions; }), selector: "bao-file-dropzone-instructions, [bao-file-dropzone-instructions]" }, { kind: "directive", type: i0.forwardRef(function () { return BaoFileDropDirective; }), selector: "[baoFileDrop]", outputs: ["fileDrop"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
4813
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoFileInputComponent, decorators: [{
|
|
4814
|
+
type: Component,
|
|
4815
|
+
args: [{ selector: 'bao-file-input, [bao-file-input]', providers: [
|
|
4816
|
+
{
|
|
4817
|
+
provide: NG_VALUE_ACCESSOR,
|
|
4818
|
+
// tslint:disable-next-line:no-forward-ref
|
|
4819
|
+
useExisting: forwardRef(() => BaoFileInputComponent),
|
|
4820
|
+
multi: true
|
|
4821
|
+
}
|
|
4822
|
+
], encapsulation: ViewEncapsulation.None, host: {
|
|
4823
|
+
class: 'bao-file-input',
|
|
4824
|
+
'[class.bao-file-label-small]': 'size === "small"',
|
|
4825
|
+
'[class.bao-file-label-medium]': 'size === "medium"',
|
|
4826
|
+
'[class.bao-file-input-disabled]': 'disabled'
|
|
4827
|
+
}, template: "<label bao-label [required]=\"required\" [for]=\"inputId\">{{ label }}</label>\n<ng-content select=\"bao-guiding-text\"></ng-content>\n<div\n baoFileDrop\n class=\"file-drop-zone\"\n (fileDrop)=\"uploadFile($event)\"\n #dropzone\n>\n <button\n bao-button\n type=\"button\"\n displayType=\"utility\"\n level=\"secondary\"\n [disabled]=\"disabled\"\n (click)=\"uploader.click()\"\n aria-hidden=\"true\"\n tabIndex=\"-1\"\n >\n {{ intl.dropzoneButtonLabel }}\n </button>\n <input\n [id]=\"inputId\"\n type=\"file\"\n class=\"sr-only\"\n [disabled]=\"disabled\"\n (change)=\"uploadFile($event.target.files[0])\"\n #uploader\n />\n <ng-container\n ><div #ref>\n <ng-content select=\"bao-file-dropzone-instructions\"></ng-content></div\n ></ng-container>\n <ng-container *ngIf=\"ref.childNodes.length === 0\"\n ><bao-file-dropzone-instructions>{{\n intl.defaultDropzoneInstructions\n }}</bao-file-dropzone-instructions></ng-container\n >\n</div>\n<bao-error *ngIf=\"isFileTooBig\">\n {{ intl.fileTooBigErrorMessage }}\n</bao-error>\n<bao-error *ngIf=\"isFileTypeInvalid\">\n {{ intl.invalidFileTypeErrorMessage }}\n</bao-error>\n<ng-content select=\"bao-error\"></ng-content>\n<ng-content></ng-content>\n", styles: ["bao-file-input{width:100%;display:inline-flex;flex-direction:column}bao-file-input>ul{padding:0;margin:0}bao-file-input .bao-label>span{font-size:inherit;font-weight:inherit}bao-file-input.bao-file-label-small label{font-weight:700;font-size:.875rem;line-height:1.25rem}bao-file-input.bao-file-label-medium label{font-weight:700;font-size:1rem;line-height:1.5rem}bao-file-input .bao-guiding-text{margin-bottom:.5rem}bao-file-input .file-drop-zone{padding:.5rem;background-color:#fff;border-radius:.25rem;border-style:dashed;border-color:#ced4da;border-width:1px;display:inline-flex;align-items:center}bao-file-input .file-drop-zone:focus-within.dropzone-focus{box-shadow:0 0 0 .1875rem #98bcde;background-color:#eefaf8}bao-file-input .file-drop-zone>.bao-button{margin-right:.5rem}bao-file-input .file-drop-zone.drag-over{background-color:#eefaf8;border-color:#097d6c;cursor:drag}bao-file-input .file-drop-zone.drag-over>.bao-button{background-color:#eefaf8}bao-file-input.bao-file-input-disabled .file-drop-zone{background-color:#f8f9fa;border-color:#ced4da}bao-file-input.bao-file-input-disabled .file-drop-zone .bao-button{background-color:#f8f9fa}bao-file-input.bao-file-input-disabled .file-drop-zone .bao-button:hover{background-color:#f8f9fa}bao-file-input .bao-file-preview:first-child{margin-top:1rem}bao-file-input .bao-error{margin-top:.5rem}\n"] }]
|
|
4828
|
+
}], ctorParameters: function () { return [{ type: BaoFileIntl }, { type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { inputId: [{
|
|
4829
|
+
type: Input,
|
|
4830
|
+
args: ['id']
|
|
4831
|
+
}], label: [{
|
|
4832
|
+
type: Input
|
|
4833
|
+
}], size: [{
|
|
4834
|
+
type: Input
|
|
4835
|
+
}], maximalFileSize: [{
|
|
4836
|
+
type: Input
|
|
4837
|
+
}], acceptedMIMETypes: [{
|
|
4838
|
+
type: Input
|
|
4839
|
+
}], required: [{
|
|
4840
|
+
type: Input
|
|
4841
|
+
}], disabled: [{
|
|
4842
|
+
type: Input
|
|
4843
|
+
}], uploadedFile: [{
|
|
4844
|
+
type: Output
|
|
4845
|
+
}], _files: [{
|
|
4846
|
+
type: ContentChildren,
|
|
4847
|
+
args: [BaoFilePreviewComponent, { descendants: true }]
|
|
4848
|
+
}], _errorForm: [{
|
|
4849
|
+
type: ContentChildren,
|
|
4850
|
+
args: [BaoErrorTextComponent, { descendants: true }]
|
|
4851
|
+
}], _errorTexts: [{
|
|
4852
|
+
type: ViewChildren,
|
|
4853
|
+
args: [BaoErrorTextComponent]
|
|
4854
|
+
}], uploader: [{
|
|
4855
|
+
type: ViewChild,
|
|
4856
|
+
args: ['uploader', { static: false }]
|
|
4857
|
+
}], dropzoneElement: [{
|
|
4858
|
+
type: ViewChild,
|
|
4859
|
+
args: ['dropzone', { static: false }]
|
|
4860
|
+
}], enterKeyEvent: [{
|
|
4861
|
+
type: HostListener,
|
|
4862
|
+
args: ['window:keyup.enter']
|
|
4863
|
+
}], tabKeyEvent: [{
|
|
4864
|
+
type: HostListener,
|
|
4865
|
+
args: ['window:keyup.tab']
|
|
4866
|
+
}], shiftTabKeyEvent: [{
|
|
4867
|
+
type: HostListener,
|
|
4868
|
+
args: ['window:keyup.shift.tab']
|
|
4869
|
+
}] } });
|
|
4870
|
+
class BaoFileDropDirective {
|
|
4871
|
+
constructor() {
|
|
4872
|
+
this.fileDrop = new EventEmitter();
|
|
4873
|
+
this._isDragOver = false;
|
|
4874
|
+
}
|
|
4875
|
+
onDragOver(event) {
|
|
4876
|
+
this.preventAndStop(event);
|
|
4877
|
+
this._isDragOver = true;
|
|
4878
|
+
}
|
|
4879
|
+
onDragLeave(event) {
|
|
4880
|
+
this.preventAndStop(event);
|
|
4881
|
+
this._isDragOver = false;
|
|
4882
|
+
}
|
|
4883
|
+
onDrop(event) {
|
|
4884
|
+
this.preventAndStop(event);
|
|
4885
|
+
this._isDragOver = false;
|
|
4886
|
+
const transfer = this.getDataTransfer(event);
|
|
4887
|
+
this.fileDrop.emit(transfer.files[0]);
|
|
4888
|
+
}
|
|
4889
|
+
preventAndStop(event) {
|
|
4890
|
+
event.preventDefault();
|
|
4891
|
+
event.stopPropagation();
|
|
4892
|
+
}
|
|
4893
|
+
getDataTransfer(event) {
|
|
4894
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
4895
|
+
return event.dataTransfer
|
|
4896
|
+
? event.dataTransfer
|
|
4897
|
+
: event.originalEvent.dataTransfer;
|
|
4898
|
+
}
|
|
4899
|
+
}
|
|
4900
|
+
BaoFileDropDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoFileDropDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive });
|
|
4901
|
+
BaoFileDropDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoFileDropDirective, selector: "[baoFileDrop]", outputs: { fileDrop: "fileDrop" }, host: { listeners: { "dragover": "onDragOver($event)", "dragleave": "onDragLeave($event)", "drop": "onDrop($event)" }, properties: { "class.drag-over": "_isDragOver == true" } }, ngImport: i0 });
|
|
4902
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoFileDropDirective, decorators: [{
|
|
4903
|
+
type: Directive,
|
|
4904
|
+
args: [{
|
|
4905
|
+
selector: '[baoFileDrop]',
|
|
4906
|
+
host: { '[class.drag-over]': '_isDragOver == true' }
|
|
4907
|
+
}]
|
|
4908
|
+
}], propDecorators: { fileDrop: [{
|
|
4909
|
+
type: Output
|
|
4910
|
+
}], onDragOver: [{
|
|
4911
|
+
type: HostListener,
|
|
4912
|
+
args: ['dragover', ['$event']]
|
|
4913
|
+
}], onDragLeave: [{
|
|
4914
|
+
type: HostListener,
|
|
4915
|
+
args: ['dragleave', ['$event']]
|
|
4916
|
+
}], onDrop: [{
|
|
4917
|
+
type: HostListener,
|
|
4918
|
+
args: ['drop', ['$event']]
|
|
4919
|
+
}] } });
|
|
4920
|
+
class BaoFileDropzoneIntructions {
|
|
4921
|
+
constructor(renderer, elementRef) {
|
|
4922
|
+
this.renderer = renderer;
|
|
4923
|
+
this.elementRef = elementRef;
|
|
4924
|
+
}
|
|
4925
|
+
get nativeElement() {
|
|
4926
|
+
return this.elementRef.nativeElement;
|
|
4927
|
+
}
|
|
4928
|
+
ngAfterContentInit() {
|
|
4929
|
+
this.renderer.setAttribute(this.nativeElement, 'aria-hidden', 'true');
|
|
4930
|
+
}
|
|
4931
|
+
}
|
|
4932
|
+
BaoFileDropzoneIntructions.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoFileDropzoneIntructions, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
4933
|
+
BaoFileDropzoneIntructions.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoFileDropzoneIntructions, selector: "bao-file-dropzone-instructions, [bao-file-dropzone-instructions]", host: { classAttribute: "bao-file-dropzone-instructions" }, ngImport: i0 });
|
|
4934
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoFileDropzoneIntructions, decorators: [{
|
|
4935
|
+
type: Directive,
|
|
4936
|
+
args: [{
|
|
4937
|
+
selector: 'bao-file-dropzone-instructions, [bao-file-dropzone-instructions]',
|
|
4938
|
+
host: {
|
|
4939
|
+
class: 'bao-file-dropzone-instructions'
|
|
4940
|
+
}
|
|
4941
|
+
}]
|
|
4942
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; } });
|
|
4943
|
+
|
|
4944
|
+
/*
|
|
4945
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
4946
|
+
* Licensed under the MIT license.
|
|
4947
|
+
* See LICENSE file in the project root for full license information.
|
|
4948
|
+
*/
|
|
4949
|
+
const FILE_DIRECTIVES = [
|
|
4950
|
+
BaoFileInputComponent,
|
|
4951
|
+
BaoFileDropzoneIntructions,
|
|
4952
|
+
BaoFileDropDirective,
|
|
4953
|
+
BaoFilePreviewComponent
|
|
4954
|
+
];
|
|
4955
|
+
class BaoFileModule {
|
|
4956
|
+
}
|
|
4957
|
+
BaoFileModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoFileModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
4958
|
+
BaoFileModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoFileModule, declarations: [BaoFileInputComponent,
|
|
4959
|
+
BaoFileDropzoneIntructions,
|
|
4960
|
+
BaoFileDropDirective,
|
|
4961
|
+
BaoFilePreviewComponent], imports: [CommonModule,
|
|
4962
|
+
BaoDropdownMenuModule,
|
|
4963
|
+
BaoCommonComponentsModule,
|
|
4964
|
+
BaoIconModule,
|
|
4965
|
+
BaoButtonModule], exports: [BaoFileInputComponent,
|
|
4966
|
+
BaoFileDropzoneIntructions,
|
|
4967
|
+
BaoFileDropDirective,
|
|
4968
|
+
BaoFilePreviewComponent] });
|
|
4969
|
+
BaoFileModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoFileModule, providers: [BAO_FILE_INTL_PROVIDER], imports: [CommonModule,
|
|
4970
|
+
BaoDropdownMenuModule,
|
|
4971
|
+
BaoCommonComponentsModule,
|
|
4972
|
+
BaoIconModule,
|
|
4973
|
+
BaoButtonModule] });
|
|
4974
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoFileModule, decorators: [{
|
|
4975
|
+
type: NgModule,
|
|
4976
|
+
args: [{
|
|
4977
|
+
imports: [
|
|
4978
|
+
CommonModule,
|
|
4979
|
+
BaoDropdownMenuModule,
|
|
4980
|
+
BaoCommonComponentsModule,
|
|
4981
|
+
BaoIconModule,
|
|
4982
|
+
BaoButtonModule
|
|
4983
|
+
],
|
|
4984
|
+
declarations: [FILE_DIRECTIVES],
|
|
4985
|
+
exports: [FILE_DIRECTIVES],
|
|
4986
|
+
providers: [BAO_FILE_INTL_PROVIDER]
|
|
4987
|
+
}]
|
|
4988
|
+
}] });
|
|
4989
|
+
|
|
4990
|
+
/** Injection token that can be used to access the data that was passed in to a snack bar. */
|
|
4991
|
+
const BAO_SNACK_BAR_DATA = new InjectionToken('BaoSnackBarData');
|
|
4992
|
+
/** Possible types of toast to display the snack bar */
|
|
4993
|
+
var BaoSnackBarToastTypeEnum;
|
|
4994
|
+
(function (BaoSnackBarToastTypeEnum) {
|
|
4995
|
+
BaoSnackBarToastTypeEnum["Info"] = "info";
|
|
4996
|
+
BaoSnackBarToastTypeEnum["Success"] = "success";
|
|
4997
|
+
BaoSnackBarToastTypeEnum["Danger"] = "danger";
|
|
4998
|
+
})(BaoSnackBarToastTypeEnum || (BaoSnackBarToastTypeEnum = {}));
|
|
4999
|
+
/**
|
|
5000
|
+
* Configuration used when opening a snack-bar.
|
|
5001
|
+
*/
|
|
5002
|
+
class BaoSnackBarConfig {
|
|
5003
|
+
constructor() {
|
|
5004
|
+
/** The message to display in the snackbar. */
|
|
5005
|
+
this.message = 'No message';
|
|
5006
|
+
/** The type of snackbar template to display. */
|
|
5007
|
+
this.toastType = BaoSnackBarToastTypeEnum.Info;
|
|
5008
|
+
/**
|
|
5009
|
+
* The attached action to the snack bar. If the name of the action matches an icon provided as part of
|
|
5010
|
+
* angular-ui icon dictionnary an icon will be displayed instead of text.
|
|
5011
|
+
* */
|
|
5012
|
+
this.actionLabelOrIcon = '';
|
|
5013
|
+
/** Displays the close button when set to true */
|
|
5014
|
+
this.showClose = false;
|
|
5015
|
+
/** The length of time in milliseconds to wait before automatically dismissing the snack bar. */
|
|
5016
|
+
this.duration = 5000;
|
|
5017
|
+
/** The politeness level for the MatAriaLiveAnnouncer announcement. */
|
|
5018
|
+
this.politeness = 'assertive';
|
|
5019
|
+
/**
|
|
5020
|
+
* Message to be announced by the LiveAnnouncer. When opening a snackbar without a custom
|
|
5021
|
+
* component or template, the announcement message will default to the specified message.
|
|
5022
|
+
*/
|
|
5023
|
+
this.announcementMessage = '';
|
|
5024
|
+
/** Data being injected into the child component. */
|
|
5025
|
+
this.data = null;
|
|
5026
|
+
/** The horizontal position to place the snack bar. */
|
|
5027
|
+
this.horizontalPosition = 'left';
|
|
5028
|
+
/** The vertical position to place the snack bar. */
|
|
5029
|
+
this.verticalPosition = 'bottom';
|
|
5030
|
+
}
|
|
5031
|
+
}
|
|
5032
|
+
|
|
5033
|
+
/** Maximum amount of milliseconds that can be passed into setTimeout. */
|
|
5034
|
+
const MAX_TIMEOUT = Math.pow(2, 31) - 1;
|
|
5035
|
+
/**
|
|
5036
|
+
* Reference to a snack bar dispatched from the snack bar service.
|
|
5037
|
+
*/
|
|
5038
|
+
class BaoSnackBarRef {
|
|
5039
|
+
constructor(containerInstance, _overlayRef) {
|
|
5040
|
+
this._overlayRef = _overlayRef;
|
|
5041
|
+
/** Subject for notifying the user that the snack bar has been dismissed. */
|
|
5042
|
+
this._afterDismissed = new Subject();
|
|
5043
|
+
/** Subject for notifying the user that the snack bar has opened and appeared. */
|
|
5044
|
+
this._afterOpened = new Subject();
|
|
5045
|
+
/** Subject for notifying the user that the snack bar action was called. */
|
|
5046
|
+
this._onAction = new Subject();
|
|
5047
|
+
/** Whether the snack bar was dismissed using the action button. */
|
|
5048
|
+
this._dismissedByAction = false;
|
|
5049
|
+
this.containerInstance = containerInstance;
|
|
5050
|
+
// Dismiss snackbar on action.
|
|
5051
|
+
this.onAction().subscribe(() => this.dismiss());
|
|
5052
|
+
containerInstance._onExit.subscribe(() => this.finishDismiss());
|
|
5053
|
+
}
|
|
5054
|
+
/** Dismisses the snack bar. */
|
|
5055
|
+
dismiss() {
|
|
5056
|
+
if (!this._afterDismissed.closed) {
|
|
5057
|
+
this.containerInstance.exit();
|
|
5058
|
+
}
|
|
5059
|
+
clearTimeout(this._durationTimeoutId);
|
|
5060
|
+
}
|
|
5061
|
+
/** Marks the snackbar action clicked. */
|
|
5062
|
+
dismissWithAction() {
|
|
5063
|
+
if (!this._onAction.closed) {
|
|
5064
|
+
this._dismissedByAction = true;
|
|
5065
|
+
this._onAction.next();
|
|
5066
|
+
this._onAction.complete();
|
|
5067
|
+
}
|
|
5068
|
+
}
|
|
5069
|
+
/** Dismisses the snack bar after some duration */
|
|
5070
|
+
dismissAfter(duration) {
|
|
5071
|
+
// Note that we need to cap the duration to the maximum value for setTimeout, because
|
|
5072
|
+
// it'll revert to 1 if somebody passes in something greater (e.g. `Infinity`). See #17234.
|
|
5073
|
+
// @TODO: window.setTimeout() ?
|
|
5074
|
+
this._durationTimeoutId = window.setTimeout(() => this.dismiss(), Math.min(duration, MAX_TIMEOUT));
|
|
5075
|
+
}
|
|
5076
|
+
/** Marks the snackbar as opened */
|
|
5077
|
+
open() {
|
|
5078
|
+
if (!this._afterOpened.closed) {
|
|
5079
|
+
this._afterOpened.next();
|
|
5080
|
+
this._afterOpened.complete();
|
|
5081
|
+
}
|
|
5082
|
+
}
|
|
5083
|
+
/** Gets an observable that is notified when the snack bar is finished closing. */
|
|
5084
|
+
afterDismissed() {
|
|
5085
|
+
return this._afterDismissed;
|
|
5086
|
+
}
|
|
5087
|
+
/** Gets an observable that is notified when the snack bar has opened and appeared. */
|
|
5088
|
+
afterOpened() {
|
|
5089
|
+
return this.containerInstance._onEnter;
|
|
5090
|
+
}
|
|
5091
|
+
/** Gets an observable that is notified when the snack bar action is called. */
|
|
5092
|
+
onAction() {
|
|
5093
|
+
return this._onAction;
|
|
5094
|
+
}
|
|
5095
|
+
/** Cleans up the DOM after closing. */
|
|
5096
|
+
finishDismiss() {
|
|
5097
|
+
this._overlayRef.dispose();
|
|
5098
|
+
if (!this._onAction.closed) {
|
|
5099
|
+
this._onAction.complete();
|
|
5100
|
+
}
|
|
5101
|
+
this._afterDismissed.next({ dismissedByAction: this._dismissedByAction });
|
|
5102
|
+
this._afterDismissed.complete();
|
|
5103
|
+
this._dismissedByAction = false;
|
|
5104
|
+
}
|
|
5105
|
+
}
|
|
5106
|
+
|
|
5107
|
+
/*
|
|
5108
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
5109
|
+
* Licensed under the MIT license.
|
|
5110
|
+
* See LICENSE file in the project root for full license information.
|
|
5111
|
+
*/
|
|
5112
|
+
const toastTypeToAttributes = {
|
|
5113
|
+
info: {
|
|
5114
|
+
toast: 'snackbar-info',
|
|
5115
|
+
icon: 'icon-info',
|
|
5116
|
+
iconTitle: 'Information',
|
|
5117
|
+
politeness: 'assertive'
|
|
5118
|
+
},
|
|
5119
|
+
success: {
|
|
5120
|
+
toast: 'snackbar-success',
|
|
5121
|
+
icon: 'icon-check-circle',
|
|
5122
|
+
iconTitle: 'Succès',
|
|
5123
|
+
politeness: 'polite'
|
|
5124
|
+
},
|
|
5125
|
+
danger: {
|
|
5126
|
+
toast: 'snackbar-danger',
|
|
5127
|
+
icon: 'icon-error',
|
|
5128
|
+
iconTitle: 'Erreur',
|
|
5129
|
+
politeness: 'assertive'
|
|
5130
|
+
}
|
|
5131
|
+
};
|
|
5132
|
+
/**
|
|
5133
|
+
* A component used to open as the default snack bar, matching material spec.
|
|
5134
|
+
* This should only be used internally by the snack bar service.
|
|
5135
|
+
*/
|
|
5136
|
+
class BaoSimpleSnackBarComponent {
|
|
5137
|
+
constructor(snackBarRef, data) {
|
|
5138
|
+
this.snackBarRef = snackBarRef;
|
|
5139
|
+
this.showCloseTitle = 'Fermer le message';
|
|
5140
|
+
this.data = data;
|
|
5141
|
+
}
|
|
5142
|
+
/** Returns the politeness */
|
|
5143
|
+
get politeness() {
|
|
5144
|
+
var _a;
|
|
5145
|
+
return (((_a = toastTypeToAttributes[this.data.toastType]) === null || _a === void 0 ? void 0 : _a.politeness) ||
|
|
5146
|
+
toastTypeToAttributes['info'].politeness);
|
|
5147
|
+
}
|
|
5148
|
+
/** Returns the toast class */
|
|
5149
|
+
get toastType() {
|
|
5150
|
+
var _a;
|
|
5151
|
+
return (((_a = toastTypeToAttributes[this.data.toastType]) === null || _a === void 0 ? void 0 : _a.toast) ||
|
|
5152
|
+
toastTypeToAttributes['info'].toast);
|
|
5153
|
+
}
|
|
5154
|
+
/** Returns the toast icon */
|
|
5155
|
+
get toastIcon() {
|
|
5156
|
+
var _a;
|
|
5157
|
+
return (((_a = toastTypeToAttributes[this.data.toastType]) === null || _a === void 0 ? void 0 : _a.icon) ||
|
|
5158
|
+
toastTypeToAttributes['info'].icon);
|
|
5159
|
+
}
|
|
5160
|
+
/** Returns the toast icon title */
|
|
5161
|
+
get toastIconTitle() {
|
|
5162
|
+
var _a;
|
|
5163
|
+
return (((_a = toastTypeToAttributes[this.data.toastType]) === null || _a === void 0 ? void 0 : _a.iconTitle) ||
|
|
5164
|
+
toastTypeToAttributes['info'].iconTitle);
|
|
5165
|
+
}
|
|
5166
|
+
/** If the action button should be shown. */
|
|
5167
|
+
get hasAction() {
|
|
5168
|
+
return !!this.data.actionLabelOrIcon;
|
|
5169
|
+
}
|
|
5170
|
+
/** If the action is an icon */
|
|
5171
|
+
get isActionIcon() {
|
|
5172
|
+
return !!ICONS_DCT[this.data.actionLabelOrIcon];
|
|
5173
|
+
}
|
|
5174
|
+
/** Performs the action on the snack bar. */
|
|
5175
|
+
action() {
|
|
5176
|
+
this.snackBarRef.dismissWithAction();
|
|
5177
|
+
}
|
|
5178
|
+
/** Closes the snack bar. */
|
|
5179
|
+
close() {
|
|
5180
|
+
this.snackBarRef.dismiss();
|
|
5181
|
+
}
|
|
5182
|
+
}
|
|
5183
|
+
BaoSimpleSnackBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSimpleSnackBarComponent, deps: [{ token: BaoSnackBarRef }, { token: BAO_SNACK_BAR_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
5184
|
+
BaoSimpleSnackBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoSimpleSnackBarComponent, selector: "bao-simple-snack-bar", host: { classAttribute: "mat-simple-snackbar" }, ngImport: i0, template: "<div\n class=\"snackbar show\"\n [ngClass]=\"toastType\"\n [attr.aria-live]=\"politeness\"\n aria-atomic=\"true\"\n>\n <div class=\"snackbar-icon\">\n <bao-icon [svgIcon]=\"toastIcon\" [title]=\"toastIconTitle\"></bao-icon>\n </div>\n <div class=\"snackbar-body\">\n {{ data.message }}\n </div>\n <div class=\"snackbar-action\">\n <div *ngIf=\"hasAction\">\n <button\n bao-button\n role=\"button\"\n type=\"utility\"\n level=\"tertiary\"\n [reversed]=\"true\"\n [title]=\"data.actionLabelOrIcon\"\n (click)=\"action()\"\n >\n <bao-icon\n *ngIf=\"isActionIcon; else isActionText\"\n [svgIcon]=\"data.actionLabelOrIcon\"\n [title]=\"data.actionLabelOrIcon\"\n ></bao-icon>\n <ng-template #isActionText\n ><span>{{ data.actionLabelOrIcon }}</span></ng-template\n >\n </button>\n </div>\n <div *ngIf=\"data.showClose\">\n <button\n bao-button\n role=\"button\"\n type=\"utility\"\n level=\"tertiary\"\n [reversed]=\"true\"\n title=\"{{ showCloseTitle }}\"\n (click)=\"close()\"\n >\n <bao-icon svgIcon=\"icon-x\" title=\"{{ showCloseTitle }}\"></bao-icon>\n </button>\n </div>\n </div>\n</div>\n", styles: [".bao-container{padding-right:16px;padding-left:16px;margin-right:auto;margin-left:auto;width:100%}@media (min-width: 576px){.bao-container{max-width:576px}}@media (min-width: 768px){.bao-container{max-width:768px}}@media (min-width: 992px){.bao-container{max-width:992px}}@media (min-width: 1200px){.bao-container{max-width:1200px}}.bao-row{display:flex;flex-wrap:wrap;margin-right:-16px;margin-left:-16px}.bao-col-12,.bao-col-lg-7{position:relative;width:100%;padding-right:1rem;padding-left:1rem}@media (min-width: 992px){.bao-col-lg-7{flex:0 0 58.33333%;max-width:58.33333%}}.snackbar{overflow:hidden;font-size:.875rem;line-height:1.25rem;color:#fff;background-color:#004b7b;background-clip:padding-box;box-shadow:0 2px 8px #0000001a;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);opacity:0;border-radius:.25rem;width:100%}.snackbar:not(:last-child){margin-bottom:1rem}.snackbar.showing{opacity:1}.snackbar.show{display:inline-flex;opacity:1}.snackbar.hide{display:none}@media (min-width: 768px){.snackbar{margin:1rem;width:auto}}.snackbar-icon{display:inline-flex;align-items:center;flex-grow:0;margin:1rem 0 1rem 1rem}.snackbar-body{display:flex;align-items:center;padding:1rem;margin:0}.snackbar-action{display:flex;align-items:center;margin-left:auto}.snackbar-action:last-child{margin-right:.5rem}.snackbar-info{color:#fff;background-color:#004b7b}.snackbar-success{color:#fff;background-color:#025d29}.snackbar-danger{color:#fff;background-color:#851a00}\n"], dependencies: [{ kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: BaoButtonComponent, selector: "button[bao-button]", inputs: ["displayType", "level", "size", "loading", "reversed", "loadingSpinnerAriaLabel", "fullWidth"] }, { kind: "component", type: BaoIconComponent, selector: "bao-icon", inputs: ["color", "size", "svgIcon", "title"], exportAs: ["baoIcon"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
5185
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSimpleSnackBarComponent, decorators: [{
|
|
5186
|
+
type: Component,
|
|
5187
|
+
args: [{ selector: 'bao-simple-snack-bar', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
5188
|
+
class: 'mat-simple-snackbar'
|
|
5189
|
+
}, template: "<div\n class=\"snackbar show\"\n [ngClass]=\"toastType\"\n [attr.aria-live]=\"politeness\"\n aria-atomic=\"true\"\n>\n <div class=\"snackbar-icon\">\n <bao-icon [svgIcon]=\"toastIcon\" [title]=\"toastIconTitle\"></bao-icon>\n </div>\n <div class=\"snackbar-body\">\n {{ data.message }}\n </div>\n <div class=\"snackbar-action\">\n <div *ngIf=\"hasAction\">\n <button\n bao-button\n role=\"button\"\n type=\"utility\"\n level=\"tertiary\"\n [reversed]=\"true\"\n [title]=\"data.actionLabelOrIcon\"\n (click)=\"action()\"\n >\n <bao-icon\n *ngIf=\"isActionIcon; else isActionText\"\n [svgIcon]=\"data.actionLabelOrIcon\"\n [title]=\"data.actionLabelOrIcon\"\n ></bao-icon>\n <ng-template #isActionText\n ><span>{{ data.actionLabelOrIcon }}</span></ng-template\n >\n </button>\n </div>\n <div *ngIf=\"data.showClose\">\n <button\n bao-button\n role=\"button\"\n type=\"utility\"\n level=\"tertiary\"\n [reversed]=\"true\"\n title=\"{{ showCloseTitle }}\"\n (click)=\"close()\"\n >\n <bao-icon svgIcon=\"icon-x\" title=\"{{ showCloseTitle }}\"></bao-icon>\n </button>\n </div>\n </div>\n</div>\n", styles: [".bao-container{padding-right:16px;padding-left:16px;margin-right:auto;margin-left:auto;width:100%}@media (min-width: 576px){.bao-container{max-width:576px}}@media (min-width: 768px){.bao-container{max-width:768px}}@media (min-width: 992px){.bao-container{max-width:992px}}@media (min-width: 1200px){.bao-container{max-width:1200px}}.bao-row{display:flex;flex-wrap:wrap;margin-right:-16px;margin-left:-16px}.bao-col-12,.bao-col-lg-7{position:relative;width:100%;padding-right:1rem;padding-left:1rem}@media (min-width: 992px){.bao-col-lg-7{flex:0 0 58.33333%;max-width:58.33333%}}.snackbar{overflow:hidden;font-size:.875rem;line-height:1.25rem;color:#fff;background-color:#004b7b;background-clip:padding-box;box-shadow:0 2px 8px #0000001a;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);opacity:0;border-radius:.25rem;width:100%}.snackbar:not(:last-child){margin-bottom:1rem}.snackbar.showing{opacity:1}.snackbar.show{display:inline-flex;opacity:1}.snackbar.hide{display:none}@media (min-width: 768px){.snackbar{margin:1rem;width:auto}}.snackbar-icon{display:inline-flex;align-items:center;flex-grow:0;margin:1rem 0 1rem 1rem}.snackbar-body{display:flex;align-items:center;padding:1rem;margin:0}.snackbar-action{display:flex;align-items:center;margin-left:auto}.snackbar-action:last-child{margin-right:.5rem}.snackbar-info{color:#fff;background-color:#004b7b}.snackbar-success{color:#fff;background-color:#025d29}.snackbar-danger{color:#fff;background-color:#851a00}\n"] }]
|
|
5190
|
+
}], ctorParameters: function () {
|
|
5191
|
+
return [{ type: BaoSnackBarRef }, { type: undefined, decorators: [{
|
|
5192
|
+
type: Inject,
|
|
5193
|
+
args: [BAO_SNACK_BAR_DATA]
|
|
5194
|
+
}] }];
|
|
5195
|
+
} });
|
|
5196
|
+
|
|
5197
|
+
/*
|
|
5198
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
5199
|
+
* Licensed under the MIT license.
|
|
5200
|
+
* See LICENSE file in the project root for full license information.
|
|
5201
|
+
*/
|
|
5202
|
+
/**
|
|
5203
|
+
* Animations used by the Material snack bar.
|
|
5204
|
+
* @docs-private
|
|
5205
|
+
*/
|
|
5206
|
+
const matSnackBarAnimations = {
|
|
5207
|
+
/** Animation that shows and hides a snack bar. */
|
|
5208
|
+
snackBarState: trigger('state', [
|
|
5209
|
+
state('void, hidden', style({
|
|
5210
|
+
transform: 'scale(0.8)',
|
|
5211
|
+
opacity: 0
|
|
5212
|
+
})),
|
|
5213
|
+
state('visible', style({
|
|
5214
|
+
transform: 'scale(1)',
|
|
5215
|
+
opacity: 1
|
|
5216
|
+
})),
|
|
5217
|
+
transition('* => visible', animate('150ms cubic-bezier(0, 0, 0.2, 1)')),
|
|
5218
|
+
transition('* => void, * => hidden', animate('75ms cubic-bezier(0.4, 0.0, 1, 1)', style({
|
|
5219
|
+
opacity: 0
|
|
5220
|
+
})))
|
|
5221
|
+
])
|
|
5222
|
+
};
|
|
5223
|
+
|
|
5224
|
+
let uniqueId = 0;
|
|
5225
|
+
/**
|
|
5226
|
+
* Internal component that wraps user-provided snack bar content.
|
|
5227
|
+
* @docs-private
|
|
5228
|
+
*/
|
|
5229
|
+
class BaoSnackBarContainerComponent extends BasePortalOutlet {
|
|
5230
|
+
constructor(_ngZone, _elementRef, _changeDetectorRef, _platform,
|
|
5231
|
+
/** The snack bar configuration. */
|
|
5232
|
+
snackBarConfig) {
|
|
5233
|
+
super();
|
|
5234
|
+
this._ngZone = _ngZone;
|
|
5235
|
+
this._elementRef = _elementRef;
|
|
5236
|
+
this._changeDetectorRef = _changeDetectorRef;
|
|
5237
|
+
this._platform = _platform;
|
|
5238
|
+
this.snackBarConfig = snackBarConfig;
|
|
5239
|
+
this._document = inject(DOCUMENT);
|
|
5240
|
+
this._trackedModals = new Set();
|
|
5241
|
+
/** Subject for notifying that the snack bar has announced to screen readers. */
|
|
5242
|
+
this._onAnnounce = new Subject();
|
|
5243
|
+
/** Subject for notifying that the snack bar has exited from view. */
|
|
5244
|
+
this._onExit = new Subject();
|
|
5245
|
+
/** Subject for notifying that the snack bar has finished entering the view. */
|
|
5246
|
+
this._onEnter = new Subject();
|
|
5247
|
+
/** The state of the snack bar animations. */
|
|
5248
|
+
this._animationState = 'void';
|
|
5249
|
+
/** The number of milliseconds to wait before announcing the snack bar's content. */
|
|
5250
|
+
this._announceDelay = 150;
|
|
5251
|
+
/** Whether the component has been destroyed. */
|
|
5252
|
+
this._destroyed = false;
|
|
5253
|
+
/** Unique ID of the aria-live element. */
|
|
5254
|
+
this._liveElementId = `bao-snack-bar-container-live-${uniqueId++}`;
|
|
5255
|
+
/**
|
|
5256
|
+
* Attaches a DOM portal to the snack bar container.
|
|
5257
|
+
* @deprecated To be turned into a method.
|
|
5258
|
+
* @breaking-change 10.0.0
|
|
5259
|
+
*/
|
|
5260
|
+
this.attachDomPortal = (portal) => {
|
|
5261
|
+
this.assertNotAttached();
|
|
5262
|
+
const result = this._portalOutlet.attachDomPortal(portal);
|
|
5263
|
+
this._afterPortalAttached();
|
|
5264
|
+
return result;
|
|
5265
|
+
};
|
|
5266
|
+
// Use aria-live rather than a live role like 'alert' or 'status'
|
|
5267
|
+
// because NVDA and JAWS have show inconsistent behavior with live roles.
|
|
5268
|
+
if (snackBarConfig.politeness === 'assertive' &&
|
|
5269
|
+
!snackBarConfig.announcementMessage) {
|
|
5270
|
+
this._live = 'assertive';
|
|
5271
|
+
}
|
|
5272
|
+
else if (snackBarConfig.politeness === 'off') {
|
|
5273
|
+
this._live = 'off';
|
|
5274
|
+
}
|
|
5275
|
+
else {
|
|
5276
|
+
this._live = 'polite';
|
|
5277
|
+
}
|
|
5278
|
+
// Only set role for Firefox. Set role based on aria-live because setting role="alert" implies
|
|
5279
|
+
// aria-live="assertive" which may cause issues if aria-live is set to "polite" above.
|
|
5280
|
+
if (this._platform.FIREFOX) {
|
|
5281
|
+
if (this._live === 'polite') {
|
|
5282
|
+
this._role = 'status';
|
|
5283
|
+
}
|
|
5284
|
+
if (this._live === 'assertive') {
|
|
5285
|
+
this._role = 'alert';
|
|
5286
|
+
}
|
|
5287
|
+
}
|
|
5288
|
+
}
|
|
5289
|
+
/** Attach a component portal as content to this snack bar container. */
|
|
5290
|
+
attachComponentPortal(portal) {
|
|
5291
|
+
this.assertNotAttached();
|
|
5292
|
+
this.applySnackBarClasses();
|
|
5293
|
+
const result = this._portalOutlet.attachComponentPortal(portal);
|
|
5294
|
+
this._afterPortalAttached();
|
|
5295
|
+
return result;
|
|
5296
|
+
}
|
|
5297
|
+
/** Attach a template portal as content to this snack bar container. */
|
|
5298
|
+
attachTemplatePortal(portal) {
|
|
5299
|
+
this.assertNotAttached();
|
|
5300
|
+
this.applySnackBarClasses();
|
|
5301
|
+
const result = this._portalOutlet.attachTemplatePortal(portal);
|
|
5302
|
+
this._afterPortalAttached();
|
|
5303
|
+
return result;
|
|
5304
|
+
}
|
|
5305
|
+
/** Handle end of animations, updating the state of the snackbar. */
|
|
5306
|
+
onAnimationEnd(event) {
|
|
5307
|
+
const { fromState, toState } = event;
|
|
5308
|
+
if ((toState === 'void' && fromState !== 'void') || toState === 'hidden') {
|
|
5309
|
+
this.completeExit();
|
|
5310
|
+
}
|
|
5311
|
+
if (toState === 'visible') {
|
|
5312
|
+
// Note: we shouldn't use `this` inside the zone callback,
|
|
5313
|
+
// because it can cause a memory leak.
|
|
5314
|
+
const onEnter = this._onEnter;
|
|
5315
|
+
this._ngZone.run(() => {
|
|
5316
|
+
onEnter.next();
|
|
5317
|
+
onEnter.complete();
|
|
5318
|
+
});
|
|
5319
|
+
}
|
|
5320
|
+
}
|
|
5321
|
+
/** Begin animation of snack bar entrance into view. */
|
|
5322
|
+
enter() {
|
|
5323
|
+
if (!this._destroyed) {
|
|
5324
|
+
this._animationState = 'visible';
|
|
5325
|
+
this._changeDetectorRef.detectChanges();
|
|
5326
|
+
this.screenReaderAnnounce();
|
|
5327
|
+
}
|
|
5328
|
+
}
|
|
5329
|
+
/** Begin animation of the snack bar exiting from view. */
|
|
5330
|
+
exit() {
|
|
5331
|
+
// Note: this one transitions to `hidden`, rather than `void`, in order to handle the case
|
|
5332
|
+
// where multiple snack bars are opened in quick succession (e.g. two consecutive calls to
|
|
5333
|
+
// `MatSnackBar.open`).
|
|
5334
|
+
this._animationState = 'hidden';
|
|
5335
|
+
// Mark this element with an 'exit' attribute to indicate that the snackbar has
|
|
5336
|
+
// been dismissed and will soon be removed from the DOM. This is used by the snackbar
|
|
5337
|
+
// test harness.
|
|
5338
|
+
this._elementRef.nativeElement.setAttribute('mat-exit', '');
|
|
5339
|
+
// If the snack bar hasn't been announced by the time it exits it wouldn't have been open
|
|
5340
|
+
// long enough to visually read it either, so clear the timeout for announcing.
|
|
5341
|
+
clearTimeout(this._announceTimeoutId);
|
|
5342
|
+
return this._onExit;
|
|
5343
|
+
}
|
|
5344
|
+
/** Makes sure the exit callbacks have been invoked when the element is destroyed. */
|
|
5345
|
+
ngOnDestroy() {
|
|
5346
|
+
this._destroyed = true;
|
|
5347
|
+
this.completeExit();
|
|
5348
|
+
}
|
|
5349
|
+
/**
|
|
5350
|
+
* Waits for the zone to settle before removing the element. Helps prevent
|
|
5351
|
+
* errors where we end up removing an element which is in the middle of an animation.
|
|
5352
|
+
*/
|
|
5353
|
+
completeExit() {
|
|
5354
|
+
this._ngZone.onMicrotaskEmpty.pipe(take$1(1)).subscribe(() => {
|
|
5355
|
+
this._onExit.next();
|
|
5356
|
+
this._onExit.complete();
|
|
5357
|
+
});
|
|
5358
|
+
}
|
|
5359
|
+
/** Applies the various positioning and user-configured CSS classes to the snack bar. */
|
|
5360
|
+
applySnackBarClasses() {
|
|
5361
|
+
const element = this._elementRef.nativeElement;
|
|
5362
|
+
const panelClasses = this.snackBarConfig.panelClass;
|
|
5363
|
+
if (panelClasses) {
|
|
5364
|
+
if (Array.isArray(panelClasses)) {
|
|
5365
|
+
// Note that we can't use a spread here, because IE doesn't support multiple arguments.
|
|
5366
|
+
panelClasses.forEach(cssClass => element.classList.add(cssClass));
|
|
5367
|
+
}
|
|
5368
|
+
else {
|
|
5369
|
+
element.classList.add(panelClasses);
|
|
5370
|
+
}
|
|
5371
|
+
}
|
|
5372
|
+
if (this.snackBarConfig.horizontalPosition === 'center') {
|
|
5373
|
+
element.classList.add('bao-snack-bar-center');
|
|
5374
|
+
}
|
|
5375
|
+
if (this.snackBarConfig.verticalPosition === 'top') {
|
|
5376
|
+
element.classList.add('bao-snack-bar-top');
|
|
5377
|
+
}
|
|
5378
|
+
}
|
|
5379
|
+
/**
|
|
5380
|
+
* Called after the portal contents have been attached. Can be
|
|
5381
|
+
* used to modify the DOM once it's guaranteed to be in place.
|
|
5382
|
+
*/
|
|
5383
|
+
_afterPortalAttached() {
|
|
5384
|
+
const element = this._elementRef.nativeElement;
|
|
5385
|
+
const panelClasses = this.snackBarConfig.panelClass;
|
|
5386
|
+
if (panelClasses) {
|
|
5387
|
+
if (Array.isArray(panelClasses)) {
|
|
5388
|
+
// Note that we can't use a spread here, because IE doesn't support multiple arguments.
|
|
5389
|
+
panelClasses.forEach(cssClass => element.classList.add(cssClass));
|
|
5390
|
+
}
|
|
5391
|
+
else {
|
|
5392
|
+
element.classList.add(panelClasses);
|
|
5393
|
+
}
|
|
5394
|
+
}
|
|
5395
|
+
this._exposeToModals();
|
|
5396
|
+
}
|
|
5397
|
+
/**
|
|
5398
|
+
* Some browsers won't expose the accessibility node of the live element if there is an
|
|
5399
|
+
* `aria-modal` and the live element is outside of it. This method works around the issue by
|
|
5400
|
+
* pointing the `aria-owns` of all modals to the live element.
|
|
5401
|
+
*/
|
|
5402
|
+
_exposeToModals() {
|
|
5403
|
+
// TODO(crisbeto): consider de-duplicating this with the `LiveAnnouncer`.
|
|
5404
|
+
// Note that the selector here is limited to CDK overlays at the moment in order to reduce the
|
|
5405
|
+
// section of the DOM we need to look through. This should cover all the cases we support, but
|
|
5406
|
+
// the selector can be expanded if it turns out to be too narrow.
|
|
5407
|
+
const id = this._liveElementId;
|
|
5408
|
+
const modals = this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');
|
|
5409
|
+
for (let i = 0; i < modals.length; i++) {
|
|
5410
|
+
const modal = modals[i];
|
|
5411
|
+
const ariaOwns = modal.getAttribute('aria-owns');
|
|
5412
|
+
this._trackedModals.add(modal);
|
|
5413
|
+
if (!ariaOwns) {
|
|
5414
|
+
modal.setAttribute('aria-owns', id);
|
|
5415
|
+
}
|
|
5416
|
+
else if (ariaOwns.indexOf(id) === -1) {
|
|
5417
|
+
modal.setAttribute('aria-owns', ariaOwns + ' ' + id);
|
|
5418
|
+
}
|
|
5419
|
+
}
|
|
5420
|
+
}
|
|
5421
|
+
/** Clears the references to the live element from any modals it was added to. */
|
|
5422
|
+
_clearFromModals() {
|
|
5423
|
+
this._trackedModals.forEach(modal => {
|
|
5424
|
+
const ariaOwns = modal.getAttribute('aria-owns');
|
|
5425
|
+
if (ariaOwns) {
|
|
5426
|
+
const newValue = ariaOwns.replace(this._liveElementId, '').trim();
|
|
5427
|
+
if (newValue.length > 0) {
|
|
5428
|
+
modal.setAttribute('aria-owns', newValue);
|
|
5429
|
+
}
|
|
5430
|
+
else {
|
|
5431
|
+
modal.removeAttribute('aria-owns');
|
|
5432
|
+
}
|
|
5433
|
+
}
|
|
5434
|
+
});
|
|
5435
|
+
this._trackedModals.clear();
|
|
5436
|
+
}
|
|
5437
|
+
/** Asserts that no content is already attached to the container. */
|
|
5438
|
+
assertNotAttached() {
|
|
5439
|
+
if (this._portalOutlet.hasAttached()) {
|
|
5440
|
+
throw Error('Attempting to attach snack bar content after content is already attached');
|
|
5441
|
+
}
|
|
5442
|
+
}
|
|
5443
|
+
/**
|
|
5444
|
+
* Starts a timeout to move the snack bar content to the live region so screen readers will
|
|
5445
|
+
* announce it.
|
|
5446
|
+
*/
|
|
5447
|
+
screenReaderAnnounce() {
|
|
5448
|
+
if (!this._announceTimeoutId) {
|
|
5449
|
+
this._ngZone.runOutsideAngular(() => {
|
|
5450
|
+
this._announceTimeoutId = window.setTimeout(() => {
|
|
5451
|
+
const inertElement = this._elementRef.nativeElement.querySelector('[aria-hidden]');
|
|
5452
|
+
const liveElement = this._elementRef.nativeElement.querySelector('[aria-live]');
|
|
5453
|
+
if (inertElement && liveElement) {
|
|
5454
|
+
// If an element in the snack bar content is focused before being moved
|
|
5455
|
+
// track it and restore focus after moving to the live region.
|
|
5456
|
+
let focusedElement = null;
|
|
5457
|
+
if (this._platform.isBrowser &&
|
|
5458
|
+
document.activeElement instanceof HTMLElement &&
|
|
5459
|
+
inertElement.contains(document.activeElement)) {
|
|
5460
|
+
focusedElement = document.activeElement;
|
|
5461
|
+
}
|
|
5462
|
+
inertElement.removeAttribute('aria-hidden');
|
|
5463
|
+
liveElement.appendChild(inertElement);
|
|
5464
|
+
focusedElement === null || focusedElement === void 0 ? void 0 : focusedElement.focus();
|
|
5465
|
+
this._onAnnounce.next();
|
|
5466
|
+
this._onAnnounce.complete();
|
|
5467
|
+
}
|
|
5468
|
+
}, this._announceDelay);
|
|
5469
|
+
});
|
|
5470
|
+
}
|
|
5471
|
+
}
|
|
5472
|
+
}
|
|
5473
|
+
BaoSnackBarContainerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSnackBarContainerComponent, deps: [{ token: i0.NgZone }, { token: i0.ElementRef }, { token: i0.ChangeDetectorRef }, { token: i1$5.Platform }, { token: BaoSnackBarConfig }], target: i0.ɵɵFactoryTarget.Component });
|
|
5474
|
+
BaoSnackBarContainerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoSnackBarContainerComponent, selector: "bao-snack-bar-container", host: { listeners: { "@state.done": "onAnimationEnd($event)" }, properties: { "@state": "_animationState" }, classAttribute: "bao-snack-bar-container" }, viewQueries: [{ propertyName: "_portalOutlet", first: true, predicate: CdkPortalOutlet, descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<!-- Initialy holds the snack bar content, will be empty after announcing to screen readers. -->\n<div aria-hidden=\"true\">\n <ng-template cdkPortalOutlet></ng-template>\n</div>\n\n<!-- Will receive the snack bar content from the non-live div, move will happen a short delay after opening -->\n<div\n [attr.aria-live]=\"_live\"\n [attr.role]=\"_role\"\n [attr.id]=\"_liveElementId\"\n></div>\n", styles: [".bao-container{padding-right:16px;padding-left:16px;margin-right:auto;margin-left:auto;width:100%}@media (min-width: 576px){.bao-container{max-width:576px}}@media (min-width: 768px){.bao-container{max-width:768px}}@media (min-width: 992px){.bao-container{max-width:992px}}@media (min-width: 1200px){.bao-container{max-width:1200px}}.bao-row{display:flex;flex-wrap:wrap;margin-right:-16px;margin-left:-16px}.bao-col-12,.bao-col-lg-7{position:relative;width:100%;padding-right:1rem;padding-left:1rem}@media (min-width: 992px){.bao-col-lg-7{flex:0 0 58.33333%;max-width:58.33333%}}.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;width:100%}@media (min-width: 768px){.cdk-overlay-pane{margin:0;width:auto}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity .25s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.5}.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:black}.cdk-overlay-transparent-backdrop,.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:.5}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}.bao-snack-bar-container{border-radius:.25rem;box-sizing:border-box;display:block;margin:1rem;max-width:100vw;min-width:15rem;min-height:3rem;transform-origin:center;width:100%}\n"], dependencies: [{ kind: "directive", type: i3.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], animations: [matSnackBarAnimations.snackBarState], changeDetection: i0.ChangeDetectionStrategy.Default, encapsulation: i0.ViewEncapsulation.None });
|
|
5475
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSnackBarContainerComponent, decorators: [{
|
|
5476
|
+
type: Component,
|
|
5477
|
+
args: [{ selector: 'bao-snack-bar-container', changeDetection: ChangeDetectionStrategy.Default, encapsulation: ViewEncapsulation.None, animations: [matSnackBarAnimations.snackBarState], host: {
|
|
5478
|
+
class: 'bao-snack-bar-container',
|
|
5479
|
+
'[@state]': '_animationState',
|
|
5480
|
+
'(@state.done)': 'onAnimationEnd($event)'
|
|
5481
|
+
}, template: "<!-- Initialy holds the snack bar content, will be empty after announcing to screen readers. -->\n<div aria-hidden=\"true\">\n <ng-template cdkPortalOutlet></ng-template>\n</div>\n\n<!-- Will receive the snack bar content from the non-live div, move will happen a short delay after opening -->\n<div\n [attr.aria-live]=\"_live\"\n [attr.role]=\"_role\"\n [attr.id]=\"_liveElementId\"\n></div>\n", styles: [".bao-container{padding-right:16px;padding-left:16px;margin-right:auto;margin-left:auto;width:100%}@media (min-width: 576px){.bao-container{max-width:576px}}@media (min-width: 768px){.bao-container{max-width:768px}}@media (min-width: 992px){.bao-container{max-width:992px}}@media (min-width: 1200px){.bao-container{max-width:1200px}}.bao-row{display:flex;flex-wrap:wrap;margin-right:-16px;margin-left:-16px}.bao-col-12,.bao-col-lg-7{position:relative;width:100%;padding-right:1rem;padding-left:1rem}@media (min-width: 992px){.bao-col-lg-7{flex:0 0 58.33333%;max-width:58.33333%}}.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;width:100%}@media (min-width: 768px){.cdk-overlay-pane{margin:0;width:auto}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity .25s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.5}.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:black}.cdk-overlay-transparent-backdrop,.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:.5}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}.bao-snack-bar-container{border-radius:.25rem;box-sizing:border-box;display:block;margin:1rem;max-width:100vw;min-width:15rem;min-height:3rem;transform-origin:center;width:100%}\n"] }]
|
|
5482
|
+
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$5.Platform }, { type: BaoSnackBarConfig }]; }, propDecorators: { _portalOutlet: [{
|
|
5483
|
+
type: ViewChild,
|
|
5484
|
+
args: [CdkPortalOutlet, { static: true }]
|
|
5485
|
+
}] } });
|
|
5486
|
+
|
|
5487
|
+
function baoFactory() {
|
|
5488
|
+
return new BaoSnackBarConfig();
|
|
5489
|
+
}
|
|
5490
|
+
/** Injection token that can be used to specify default snack bar. */
|
|
5491
|
+
const BAO_SNACK_BAR_DEFAULT_OPTIONS = new InjectionToken('bao-snack-bar-default-options', {
|
|
5492
|
+
providedIn: 'root',
|
|
5493
|
+
factory: baoFactory
|
|
5494
|
+
});
|
|
5495
|
+
/**
|
|
5496
|
+
* Service to dispatch Material Design snack bar messages.
|
|
5497
|
+
*/
|
|
5498
|
+
class BaoSnackBarService {
|
|
5499
|
+
constructor(_overlay, _live, _injector, _parentSnackBar, _defaultConfig) {
|
|
5500
|
+
this._overlay = _overlay;
|
|
5501
|
+
this._live = _live;
|
|
5502
|
+
this._injector = _injector;
|
|
5503
|
+
this._parentSnackBar = _parentSnackBar;
|
|
5504
|
+
this._defaultConfig = _defaultConfig;
|
|
5505
|
+
/** The component that should be rendered as the snack bar's simple component. */
|
|
5506
|
+
this.simpleSnackBarComponent = BaoSimpleSnackBarComponent;
|
|
5507
|
+
/** The container component that attaches the provided template or component. */
|
|
5508
|
+
this.snackBarContainerComponent = BaoSnackBarContainerComponent;
|
|
5509
|
+
/**
|
|
5510
|
+
* Reference to the current snack bar in the view *at this level* (in the Angular injector tree).
|
|
5511
|
+
* If there is a parent snack-bar service, all operations should delegate to that parent
|
|
5512
|
+
* via `_openedSnackBarRef`.
|
|
5513
|
+
*/
|
|
5514
|
+
this._snackBarRefAtThisLevel = null;
|
|
5515
|
+
}
|
|
5516
|
+
/** Reference to the currently opened snackbar at *any* level. */
|
|
5517
|
+
get _openedSnackBarRef() {
|
|
5518
|
+
const parent = this._parentSnackBar;
|
|
5519
|
+
return parent ? parent._openedSnackBarRef : this._snackBarRefAtThisLevel;
|
|
5520
|
+
}
|
|
5521
|
+
set _openedSnackBarRef(value) {
|
|
5522
|
+
if (this._parentSnackBar) {
|
|
5523
|
+
this._parentSnackBar._openedSnackBarRef = value;
|
|
5524
|
+
}
|
|
5525
|
+
else {
|
|
5526
|
+
this._snackBarRefAtThisLevel = value;
|
|
5527
|
+
}
|
|
5528
|
+
}
|
|
5529
|
+
/**
|
|
5530
|
+
* Creates and dispatches a snack bar with a custom component for the content, removing any
|
|
5531
|
+
* currently opened snack bars.
|
|
5532
|
+
*
|
|
5533
|
+
* @param component Component to be instantiated.
|
|
5534
|
+
* @param config Extra configuration for the snack bar.
|
|
5535
|
+
*/
|
|
5536
|
+
openFromComponent(component, config) {
|
|
5537
|
+
return this.attach(component, config);
|
|
5538
|
+
}
|
|
5539
|
+
/**
|
|
5540
|
+
* Creates and dispatches a snack bar with a custom template for the content, removing any
|
|
5541
|
+
* currently opened snack bars.
|
|
5542
|
+
*
|
|
5543
|
+
* @param template Template to be instantiated.
|
|
5544
|
+
* @param config Extra configuration for the snack bar.
|
|
5545
|
+
*/
|
|
5546
|
+
openFromTemplate(template, config) {
|
|
5547
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
5548
|
+
return this.attach(template, config);
|
|
5549
|
+
}
|
|
5550
|
+
/**
|
|
5551
|
+
* Opens a snackbar with a message and an optional action.
|
|
5552
|
+
* @param message The message to show in the snackbar.
|
|
5553
|
+
* @param toastType The type of of toast to display the snackbar.
|
|
5554
|
+
* @param actionLabelOrIcon The label or icon for the snackbar action.
|
|
5555
|
+
* @param showClose If true, the snackbar will require user interaction to close.
|
|
5556
|
+
* @param config Additional configuration options for the snackbar.
|
|
5557
|
+
*/
|
|
5558
|
+
open(config) {
|
|
5559
|
+
const _config = Object.assign(Object.assign({}, this._defaultConfig), config);
|
|
5560
|
+
// Since the user doesn't have access to the component, we can
|
|
5561
|
+
// override the data to pass in our own message, action and type.
|
|
5562
|
+
_config.data = {
|
|
5563
|
+
message: _config.message,
|
|
5564
|
+
toastType: _config.toastType,
|
|
5565
|
+
actionLabelOrIcon: _config.actionLabelOrIcon,
|
|
5566
|
+
showClose: _config.showClose
|
|
5567
|
+
};
|
|
5568
|
+
if (_config.showClose)
|
|
5569
|
+
_config.duration = 0;
|
|
5570
|
+
if (!_config.announcementMessage) {
|
|
5571
|
+
_config.announcementMessage = _config.message;
|
|
5572
|
+
}
|
|
5573
|
+
return this.openFromComponent(this.simpleSnackBarComponent, _config);
|
|
5574
|
+
}
|
|
5575
|
+
/**
|
|
5576
|
+
* Dismisses the currently-visible snack bar.
|
|
5577
|
+
*/
|
|
5578
|
+
dismiss() {
|
|
5579
|
+
if (this._openedSnackBarRef) {
|
|
5580
|
+
this._openedSnackBarRef.dismiss();
|
|
5581
|
+
}
|
|
5582
|
+
}
|
|
5583
|
+
ngOnDestroy() {
|
|
5584
|
+
// Only dismiss the snack bar at the current level on destroy.
|
|
5585
|
+
if (this._snackBarRefAtThisLevel) {
|
|
5586
|
+
this._snackBarRefAtThisLevel.dismiss();
|
|
5587
|
+
}
|
|
5588
|
+
}
|
|
5589
|
+
/**
|
|
5590
|
+
* Attaches the snack bar container component to the overlay.
|
|
5591
|
+
*/
|
|
5592
|
+
attachSnackBarContainer(overlayRef, config) {
|
|
5593
|
+
const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;
|
|
5594
|
+
const injector = new PortalInjector(userInjector || this._injector, new WeakMap([[BaoSnackBarConfig, config]]));
|
|
5595
|
+
const containerPortal = new ComponentPortal(this.snackBarContainerComponent, config.viewContainerRef, injector);
|
|
5596
|
+
const containerRef = overlayRef.attach(containerPortal);
|
|
5597
|
+
containerRef.instance.snackBarConfig = config;
|
|
5598
|
+
return containerRef.instance;
|
|
5599
|
+
}
|
|
5600
|
+
/**
|
|
5601
|
+
* Places a new component or a template as the content of the snack bar container.
|
|
5602
|
+
*/
|
|
5603
|
+
attach(content, userConfig) {
|
|
5604
|
+
const config = Object.assign(Object.assign(Object.assign({}, new BaoSnackBarConfig()), this._defaultConfig), userConfig);
|
|
5605
|
+
const overlayRef = this.createOverlay(config);
|
|
5606
|
+
const container = this.attachSnackBarContainer(overlayRef, config);
|
|
5607
|
+
const snackBarRef = new BaoSnackBarRef(container, overlayRef);
|
|
5608
|
+
if (content instanceof TemplateRef) {
|
|
5609
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
5610
|
+
const portal = new TemplatePortal(content, null, {
|
|
5611
|
+
$implicit: config.data,
|
|
5612
|
+
snackBarRef
|
|
5613
|
+
});
|
|
5614
|
+
snackBarRef.instance = container.attachTemplatePortal(portal);
|
|
5615
|
+
}
|
|
5616
|
+
else {
|
|
5617
|
+
const injector = this.createInjector(config, snackBarRef);
|
|
5618
|
+
const portal = new ComponentPortal(content, undefined, injector);
|
|
5619
|
+
const contentRef = container.attachComponentPortal(portal);
|
|
5620
|
+
// We can't pass this via the injector, because the injector is created earlier.
|
|
5621
|
+
snackBarRef.instance = contentRef.instance;
|
|
5622
|
+
}
|
|
5623
|
+
this.animateSnackBar(snackBarRef, config);
|
|
5624
|
+
this._openedSnackBarRef = snackBarRef;
|
|
5625
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
5626
|
+
return this._openedSnackBarRef;
|
|
5627
|
+
}
|
|
5628
|
+
/** Animates the old snack bar out and the new one in. */
|
|
5629
|
+
animateSnackBar(snackBarRef, config) {
|
|
5630
|
+
// When the snackbar is dismissed, clear the reference to it.
|
|
5631
|
+
snackBarRef.afterDismissed().subscribe(() => {
|
|
5632
|
+
// Clear the snackbar ref if it hasn't already been replaced by a newer snackbar.
|
|
5633
|
+
// eslint-disable-next-line eqeqeq
|
|
5634
|
+
if (this._openedSnackBarRef == snackBarRef) {
|
|
5635
|
+
this._openedSnackBarRef = null;
|
|
5636
|
+
}
|
|
5637
|
+
if (config.announcementMessage) {
|
|
5638
|
+
this._live.clear();
|
|
5639
|
+
}
|
|
5640
|
+
});
|
|
5641
|
+
if (this._openedSnackBarRef) {
|
|
5642
|
+
// If a snack bar is already in view, dismiss it and enter the
|
|
5643
|
+
// new snack bar after exit animation is complete.
|
|
5644
|
+
this._openedSnackBarRef.afterDismissed().subscribe(() => {
|
|
5645
|
+
snackBarRef.containerInstance.enter();
|
|
5646
|
+
});
|
|
5647
|
+
this._openedSnackBarRef.dismiss();
|
|
5648
|
+
}
|
|
5649
|
+
else {
|
|
5650
|
+
// If no snack bar is in view, enter the new snack bar.
|
|
5651
|
+
snackBarRef.containerInstance.enter();
|
|
5652
|
+
}
|
|
5653
|
+
// If a dismiss timeout is provided, set up dismiss based on after the snackbar is opened.
|
|
5654
|
+
if (config.duration && config.duration > 0) {
|
|
5655
|
+
snackBarRef
|
|
5656
|
+
.afterOpened()
|
|
5657
|
+
.subscribe(() => snackBarRef.dismissAfter(config.duration));
|
|
5658
|
+
}
|
|
5659
|
+
if (config.announcementMessage) {
|
|
5660
|
+
void this._live.announce(config.announcementMessage, config.politeness);
|
|
5661
|
+
}
|
|
5662
|
+
}
|
|
5663
|
+
/**
|
|
5664
|
+
* Creates a new overlay and places it in the correct location.
|
|
5665
|
+
* @param config The user-specified snack bar config.
|
|
5666
|
+
*/
|
|
5667
|
+
createOverlay(config) {
|
|
5668
|
+
const overlayConfig = new OverlayConfig();
|
|
5669
|
+
overlayConfig.direction = config.direction;
|
|
5670
|
+
const positionStrategy = this._overlay.position().global();
|
|
5671
|
+
// Set horizontal position.
|
|
5672
|
+
const isRtl = config.direction === 'rtl';
|
|
5673
|
+
const isLeft = config.horizontalPosition === 'left' ||
|
|
5674
|
+
(config.horizontalPosition === 'start' && !isRtl) ||
|
|
5675
|
+
(config.horizontalPosition === 'end' && isRtl);
|
|
5676
|
+
const isRight = !isLeft && config.horizontalPosition !== 'center';
|
|
5677
|
+
if (isLeft) {
|
|
5678
|
+
positionStrategy.left('0');
|
|
5679
|
+
}
|
|
5680
|
+
else if (isRight) {
|
|
5681
|
+
positionStrategy.right('0');
|
|
5682
|
+
}
|
|
5683
|
+
else {
|
|
5684
|
+
positionStrategy.centerHorizontally();
|
|
5685
|
+
}
|
|
5686
|
+
// Set horizontal position.
|
|
5687
|
+
if (config.verticalPosition === 'top') {
|
|
5688
|
+
positionStrategy.top('0');
|
|
5689
|
+
}
|
|
5690
|
+
else {
|
|
5691
|
+
positionStrategy.bottom('0');
|
|
5692
|
+
}
|
|
5693
|
+
overlayConfig.positionStrategy = positionStrategy;
|
|
5694
|
+
return this._overlay.create(overlayConfig);
|
|
5695
|
+
}
|
|
5696
|
+
/**
|
|
5697
|
+
* Creates an injector to be used inside of a snack bar component.
|
|
5698
|
+
* @param config Config that was used to create the snack bar.
|
|
5699
|
+
* @param snackBarRef Reference to the snack bar.
|
|
5700
|
+
*/
|
|
5701
|
+
createInjector(config, snackBarRef) {
|
|
5702
|
+
const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;
|
|
5703
|
+
return new PortalInjector(userInjector || this._injector, new WeakMap([
|
|
5704
|
+
[BaoSnackBarRef, snackBarRef],
|
|
5705
|
+
[BAO_SNACK_BAR_DATA, config.data]
|
|
5706
|
+
]));
|
|
5707
|
+
}
|
|
5708
|
+
}
|
|
5709
|
+
BaoSnackBarService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSnackBarService, deps: [{ token: i1$4.Overlay }, { token: i1$3.LiveAnnouncer }, { token: i0.Injector }, { token: BaoSnackBarService, optional: true, skipSelf: true }, { token: BAO_SNACK_BAR_DEFAULT_OPTIONS }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
5710
|
+
BaoSnackBarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSnackBarService, providedIn: 'root' });
|
|
5711
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSnackBarService, decorators: [{
|
|
5712
|
+
type: Injectable,
|
|
5713
|
+
args: [{ providedIn: 'root' }]
|
|
5714
|
+
}], ctorParameters: function () {
|
|
5715
|
+
return [{ type: i1$4.Overlay }, { type: i1$3.LiveAnnouncer }, { type: i0.Injector }, { type: BaoSnackBarService, decorators: [{
|
|
5716
|
+
type: Optional
|
|
5717
|
+
}, {
|
|
5718
|
+
type: SkipSelf
|
|
5719
|
+
}] }, { type: BaoSnackBarConfig, decorators: [{
|
|
5720
|
+
type: Inject,
|
|
5721
|
+
args: [BAO_SNACK_BAR_DEFAULT_OPTIONS]
|
|
5722
|
+
}] }];
|
|
5723
|
+
} });
|
|
5724
|
+
|
|
5725
|
+
/*
|
|
5726
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
5727
|
+
* Licensed under the MIT license.
|
|
5728
|
+
* See LICENSE file in the project root for full license information.
|
|
5729
|
+
*/
|
|
5730
|
+
const SNACKBAR_DIRECTIVES = [
|
|
5731
|
+
BaoSimpleSnackBarComponent,
|
|
5732
|
+
BaoSnackBarContainerComponent
|
|
5733
|
+
];
|
|
5734
|
+
class BaoSnackBarModule {
|
|
5735
|
+
}
|
|
5736
|
+
BaoSnackBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSnackBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5737
|
+
BaoSnackBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoSnackBarModule, declarations: [BaoSimpleSnackBarComponent,
|
|
5738
|
+
BaoSnackBarContainerComponent], imports: [CommonModule,
|
|
5739
|
+
OverlayModule,
|
|
5740
|
+
PortalModule,
|
|
5741
|
+
BaoButtonModule,
|
|
5742
|
+
BaoIconModule], exports: [BaoSimpleSnackBarComponent,
|
|
5743
|
+
BaoSnackBarContainerComponent] });
|
|
5744
|
+
BaoSnackBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSnackBarModule, providers: [BaoSnackBarService], imports: [CommonModule,
|
|
5745
|
+
OverlayModule,
|
|
5746
|
+
PortalModule,
|
|
5747
|
+
BaoButtonModule,
|
|
5748
|
+
BaoIconModule] });
|
|
5749
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSnackBarModule, decorators: [{
|
|
5750
|
+
type: NgModule,
|
|
5751
|
+
args: [{
|
|
5752
|
+
imports: [
|
|
5753
|
+
CommonModule,
|
|
5754
|
+
OverlayModule,
|
|
5755
|
+
PortalModule,
|
|
5756
|
+
BaoButtonModule,
|
|
5757
|
+
BaoIconModule
|
|
5758
|
+
],
|
|
5759
|
+
providers: [BaoSnackBarService],
|
|
5760
|
+
declarations: SNACKBAR_DIRECTIVES,
|
|
5761
|
+
exports: SNACKBAR_DIRECTIVES,
|
|
5762
|
+
entryComponents: [SNACKBAR_DIRECTIVES]
|
|
5763
|
+
}]
|
|
5764
|
+
}] });
|
|
5765
|
+
|
|
5766
|
+
/*
|
|
5767
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
5768
|
+
* Licensed under the MIT license.
|
|
5769
|
+
* See LICENSE file in the project root for full license information.
|
|
5770
|
+
*/
|
|
5771
|
+
const Breakpoints = {
|
|
5772
|
+
XSmall: '(max-width: 575.98px)',
|
|
5773
|
+
Small: '(min-width: 576px) and (max-width: 767.98px)',
|
|
5774
|
+
Medium: '(min-width: 768px) and (max-width: 991.98px)',
|
|
5775
|
+
Large: '(min-width: 992px) and (max-width: 1199.98px)',
|
|
5776
|
+
XLarge: '(min-width: 1200px)'
|
|
5777
|
+
};
|
|
5778
|
+
|
|
5779
|
+
/*
|
|
5780
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
5781
|
+
* Licensed under the MIT license.
|
|
5782
|
+
* See LICENSE file in the project root for full license information.
|
|
5783
|
+
*/
|
|
5784
|
+
|
|
5785
|
+
/**
|
|
5786
|
+
* This component is dynamically added to replace breadcrumb when System Header is viewed on tablet or mobile screens.
|
|
5787
|
+
* Used internally by BaoSystemHeaderComponent only, not to be used by host application.
|
|
5788
|
+
*/
|
|
5789
|
+
class BaoBackNavigationComponent {
|
|
5790
|
+
constructor(renderer, elementRef) {
|
|
5791
|
+
this.renderer = renderer;
|
|
5792
|
+
this.elementRef = elementRef;
|
|
5793
|
+
}
|
|
5794
|
+
ngOnChanges(changes) {
|
|
5795
|
+
if (changes['link'] && changes['link'].currentValue) {
|
|
5796
|
+
this.renderer.setAttribute(this.elementRef.nativeElement.children[0], 'href', changes['link'].currentValue);
|
|
5797
|
+
}
|
|
5798
|
+
}
|
|
5799
|
+
}
|
|
5800
|
+
BaoBackNavigationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoBackNavigationComponent, deps: [{ token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
5801
|
+
BaoBackNavigationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoBackNavigationComponent, selector: "bao-back-navigation-component", inputs: { link: "link" }, host: { classAttribute: "bao-system-header-back-button" }, usesOnChanges: true, ngImport: i0, template: ` <a>
|
|
5802
|
+
<bao-icon
|
|
5803
|
+
color="action"
|
|
5804
|
+
title="arrow-left"
|
|
5805
|
+
svgIcon="icon-arrow-left"
|
|
5806
|
+
size="x-small"
|
|
5807
|
+
></bao-icon>
|
|
5808
|
+
</a>`, isInline: true, dependencies: [{ kind: "component", type: BaoIconComponent, selector: "bao-icon", inputs: ["color", "size", "svgIcon", "title"], exportAs: ["baoIcon"] }] });
|
|
5809
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoBackNavigationComponent, decorators: [{
|
|
5810
|
+
type: Component,
|
|
5811
|
+
args: [{
|
|
5812
|
+
selector: 'bao-back-navigation-component',
|
|
5813
|
+
template: ` <a>
|
|
5814
|
+
<bao-icon
|
|
5815
|
+
color="action"
|
|
5816
|
+
title="arrow-left"
|
|
5817
|
+
svgIcon="icon-arrow-left"
|
|
5818
|
+
size="x-small"
|
|
5819
|
+
></bao-icon>
|
|
5820
|
+
</a>`,
|
|
5821
|
+
host: {
|
|
5822
|
+
class: 'bao-system-header-back-button'
|
|
5823
|
+
}
|
|
5824
|
+
}]
|
|
5825
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { link: [{
|
|
5826
|
+
type: Input
|
|
5827
|
+
}] } });
|
|
5828
|
+
/**
|
|
5829
|
+
* This directive is to mark the template where the BaoBackNavigationComponent should be dynamically inserted,
|
|
5830
|
+
* when a Breadcrumb component needs to be replaced
|
|
5831
|
+
*/
|
|
5832
|
+
class BaoBackNavigationInsert {
|
|
5833
|
+
constructor(viewContainerRef) {
|
|
5834
|
+
this.viewContainerRef = viewContainerRef;
|
|
5835
|
+
}
|
|
5836
|
+
}
|
|
5837
|
+
BaoBackNavigationInsert.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoBackNavigationInsert, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
5838
|
+
BaoBackNavigationInsert.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoBackNavigationInsert, selector: "[backNavigationInsert]", ngImport: i0 });
|
|
5839
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoBackNavigationInsert, decorators: [{
|
|
5840
|
+
type: Directive,
|
|
5841
|
+
args: [{
|
|
5842
|
+
selector: '[backNavigationInsert]'
|
|
5843
|
+
}]
|
|
5844
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; } });
|
|
5845
|
+
class BaoSystemHeaderComponent {
|
|
5846
|
+
constructor(breakpointObserver, renderer) {
|
|
5847
|
+
this.breakpointObserver = breakpointObserver;
|
|
5848
|
+
this.renderer = renderer;
|
|
5849
|
+
this.screenType = 'desktop';
|
|
5850
|
+
}
|
|
5851
|
+
get textContainerChildren() {
|
|
5852
|
+
return Array.from(this.textContainer.nativeElement.children);
|
|
5853
|
+
}
|
|
5854
|
+
ngOnInit() {
|
|
5855
|
+
if ([Breakpoints.XSmall, Breakpoints.Small].some(size => this.breakpointObserver.isMatched(size))) {
|
|
5856
|
+
this.screenType = 'mobile';
|
|
5857
|
+
}
|
|
5858
|
+
else if (this.breakpointObserver.isMatched(Breakpoints.Medium)) {
|
|
5859
|
+
this.screenType = 'tablet';
|
|
5860
|
+
}
|
|
5861
|
+
else if ([Breakpoints.Large, Breakpoints.XLarge].some(size => this.breakpointObserver.isMatched(size))) {
|
|
5862
|
+
this.screenType = 'desktop';
|
|
5863
|
+
}
|
|
5864
|
+
}
|
|
5865
|
+
ngAfterViewInit() {
|
|
5866
|
+
this.formatNavigation();
|
|
5867
|
+
this.applySizeClass();
|
|
5868
|
+
}
|
|
5869
|
+
formatNavigation() {
|
|
5870
|
+
// If view is rendered on a mobile/tablet screen
|
|
5871
|
+
if (this.screenType == 'mobile' || this.screenType == 'tablet') {
|
|
5872
|
+
if (this.textContainerChildren[0].className == 'bao-breadcrumb') {
|
|
5873
|
+
// Retrieve link of parent page
|
|
5874
|
+
const breadcrumbElementsList = this.textContainerChildren[0].children[0];
|
|
5875
|
+
const breadcrumbLength = breadcrumbElementsList.children.length;
|
|
5876
|
+
const parentLink = breadcrumbElementsList.children[breadcrumbLength - 2].attributes['href'].value;
|
|
5877
|
+
// Remove Breadcrumb component and replace it with back button
|
|
5878
|
+
this.renderer.removeChild(this.textContainer.nativeElement, this.textContainerChildren[0]);
|
|
5879
|
+
const viewContainerRef = this.backButtonInsert.viewContainerRef;
|
|
5880
|
+
viewContainerRef.clear();
|
|
5881
|
+
const componentRef = viewContainerRef.createComponent(BaoBackNavigationComponent);
|
|
5882
|
+
componentRef.instance.link = parentLink;
|
|
5883
|
+
}
|
|
5884
|
+
}
|
|
5885
|
+
}
|
|
5886
|
+
applySizeClass() {
|
|
5887
|
+
const tagInfoContainer = this.textContainer.nativeElement.childNodes[this.textContainerChildren.length - 1];
|
|
5888
|
+
if (this.screenType === 'mobile') {
|
|
5889
|
+
this.renderer.addClass(tagInfoContainer, 'mobile');
|
|
5890
|
+
}
|
|
5891
|
+
}
|
|
5892
|
+
}
|
|
5893
|
+
BaoSystemHeaderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSystemHeaderComponent, deps: [{ token: i2$1.BreakpointObserver }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
5894
|
+
BaoSystemHeaderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoSystemHeaderComponent, selector: "bao-system-header", host: { classAttribute: "bao-system-header" }, viewQueries: [{ propertyName: "textContainer", first: true, predicate: ["textContainer"], descendants: true }, { propertyName: "backButtonInsert", first: true, predicate: BaoBackNavigationInsert, descendants: true, static: true }], ngImport: i0, template: "<div class=\"left-side-content\">\n <div class=\"back-navigation-container\">\n <ng-content select=\"a\"></ng-content>\n <ng-template backNavigationInsert></ng-template>\n </div>\n <div #textContainer class=\"text-content\">\n <ng-content select=\"bao-breadcrumb\"></ng-content>\n <ng-content select=\"h1\"></ng-content>\n <div class=\"tag-info-container\">\n <ng-content select=\"bao-tag\"></ng-content>\n <span class=\"additional-info\">\n <ng-content select=\"span\"></ng-content>\n </span>\n </div>\n </div>\n</div>\n<div class=\"button-container\">\n <ng-content></ng-content>\n</div>\n", styles: ["@charset \"UTF-8\";.bao-container{padding-right:16px;padding-left:16px;margin-right:auto;margin-left:auto;width:100%}@media (min-width: 576px){.bao-container{max-width:576px}}@media (min-width: 768px){.bao-container{max-width:768px}}@media (min-width: 992px){.bao-container{max-width:992px}}@media (min-width: 1200px){.bao-container{max-width:1200px}}.bao-row{display:flex;flex-wrap:wrap;margin-right:-16px;margin-left:-16px}.bao-col-12,.bao-col-lg-7{position:relative;width:100%;padding-right:1rem;padding-left:1rem}@media (min-width: 992px){.bao-col-lg-7{flex:0 0 58.33333%;max-width:58.33333%}}.bao-system-header{display:flex;justify-content:flex-start}.bao-system-header .left-side-content{display:inline-flex;width:75%}.bao-system-header .left-side-content .back-navigation-container a{margin-right:1.25rem;border-bottom:none}.bao-system-header .left-side-content .back-navigation-container a:hover{cursor:pointer}.bao-system-header .left-side-content .text-content{width:100%}.bao-system-header .left-side-content .text-content h1{font-weight:700;color:#212529;font-size:1.5rem;line-height:2rem;margin-bottom:.5rem}.bao-system-header .left-side-content .text-content .tag-info-container{width:100%;display:block}.bao-system-header .left-side-content .text-content .tag-info-container>span:nth-child(2):before{content:\"\\b7\";margin:0 .5rem}.bao-system-header .left-side-content .text-content .tag-info-container .additional-info>*{font-weight:400;font-size:.875rem;line-height:1.25rem}.bao-system-header .left-side-content .text-content .tag-info-container.mobile .bao-tag{margin-bottom:.25rem}.bao-system-header .left-side-content .text-content .tag-info-container.mobile .additional-info{display:block}.bao-system-header .left-side-content .text-content .tag-info-container.mobile .additional-info:before{content:none}.bao-system-header .left-side-content .text-content .tag-info-container>.bao-tag{max-width:100%}.bao-system-header .left-side-content .text-content .tag-info-container>.bao-tag>span{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bao-system-header .button-container{flex-shrink:0;margin-left:auto}.bao-system-header .button-container .bao-button{margin-left:1rem}\n"], dependencies: [{ kind: "directive", type: BaoBackNavigationInsert, selector: "[backNavigationInsert]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
5895
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSystemHeaderComponent, decorators: [{
|
|
5896
|
+
type: Component,
|
|
5897
|
+
args: [{ selector: 'bao-system-header', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
5898
|
+
class: 'bao-system-header'
|
|
5899
|
+
}, template: "<div class=\"left-side-content\">\n <div class=\"back-navigation-container\">\n <ng-content select=\"a\"></ng-content>\n <ng-template backNavigationInsert></ng-template>\n </div>\n <div #textContainer class=\"text-content\">\n <ng-content select=\"bao-breadcrumb\"></ng-content>\n <ng-content select=\"h1\"></ng-content>\n <div class=\"tag-info-container\">\n <ng-content select=\"bao-tag\"></ng-content>\n <span class=\"additional-info\">\n <ng-content select=\"span\"></ng-content>\n </span>\n </div>\n </div>\n</div>\n<div class=\"button-container\">\n <ng-content></ng-content>\n</div>\n", styles: ["@charset \"UTF-8\";.bao-container{padding-right:16px;padding-left:16px;margin-right:auto;margin-left:auto;width:100%}@media (min-width: 576px){.bao-container{max-width:576px}}@media (min-width: 768px){.bao-container{max-width:768px}}@media (min-width: 992px){.bao-container{max-width:992px}}@media (min-width: 1200px){.bao-container{max-width:1200px}}.bao-row{display:flex;flex-wrap:wrap;margin-right:-16px;margin-left:-16px}.bao-col-12,.bao-col-lg-7{position:relative;width:100%;padding-right:1rem;padding-left:1rem}@media (min-width: 992px){.bao-col-lg-7{flex:0 0 58.33333%;max-width:58.33333%}}.bao-system-header{display:flex;justify-content:flex-start}.bao-system-header .left-side-content{display:inline-flex;width:75%}.bao-system-header .left-side-content .back-navigation-container a{margin-right:1.25rem;border-bottom:none}.bao-system-header .left-side-content .back-navigation-container a:hover{cursor:pointer}.bao-system-header .left-side-content .text-content{width:100%}.bao-system-header .left-side-content .text-content h1{font-weight:700;color:#212529;font-size:1.5rem;line-height:2rem;margin-bottom:.5rem}.bao-system-header .left-side-content .text-content .tag-info-container{width:100%;display:block}.bao-system-header .left-side-content .text-content .tag-info-container>span:nth-child(2):before{content:\"\\b7\";margin:0 .5rem}.bao-system-header .left-side-content .text-content .tag-info-container .additional-info>*{font-weight:400;font-size:.875rem;line-height:1.25rem}.bao-system-header .left-side-content .text-content .tag-info-container.mobile .bao-tag{margin-bottom:.25rem}.bao-system-header .left-side-content .text-content .tag-info-container.mobile .additional-info{display:block}.bao-system-header .left-side-content .text-content .tag-info-container.mobile .additional-info:before{content:none}.bao-system-header .left-side-content .text-content .tag-info-container>.bao-tag{max-width:100%}.bao-system-header .left-side-content .text-content .tag-info-container>.bao-tag>span{width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bao-system-header .button-container{flex-shrink:0;margin-left:auto}.bao-system-header .button-container .bao-button{margin-left:1rem}\n"] }]
|
|
5900
|
+
}], ctorParameters: function () { return [{ type: i2$1.BreakpointObserver }, { type: i0.Renderer2 }]; }, propDecorators: { textContainer: [{
|
|
5901
|
+
type: ViewChild,
|
|
5902
|
+
args: ['textContainer', { static: false }]
|
|
5903
|
+
}], backButtonInsert: [{
|
|
5904
|
+
type: ViewChild,
|
|
5905
|
+
args: [BaoBackNavigationInsert, { static: true }]
|
|
5906
|
+
}] } });
|
|
5907
|
+
|
|
5908
|
+
/*
|
|
5909
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
5910
|
+
* Licensed under the MIT license.
|
|
5911
|
+
* See LICENSE file in the project root for full license information.
|
|
5912
|
+
*/
|
|
5913
|
+
const SYSTEM_HEADER_DIRECTIVES = [
|
|
5914
|
+
BaoSystemHeaderComponent,
|
|
5915
|
+
BaoBackNavigationInsert,
|
|
5916
|
+
BaoBackNavigationComponent
|
|
5917
|
+
];
|
|
5918
|
+
class BaoSystemHeaderModule {
|
|
5919
|
+
}
|
|
5920
|
+
BaoSystemHeaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSystemHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5921
|
+
BaoSystemHeaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoSystemHeaderModule, declarations: [BaoSystemHeaderComponent,
|
|
5922
|
+
BaoBackNavigationInsert,
|
|
5923
|
+
BaoBackNavigationComponent], imports: [CommonModule, BaoIconModule], exports: [BaoSystemHeaderComponent,
|
|
5924
|
+
BaoBackNavigationInsert,
|
|
5925
|
+
BaoBackNavigationComponent] });
|
|
5926
|
+
BaoSystemHeaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSystemHeaderModule, imports: [CommonModule, BaoIconModule] });
|
|
5927
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSystemHeaderModule, decorators: [{
|
|
5928
|
+
type: NgModule,
|
|
5929
|
+
args: [{
|
|
5930
|
+
imports: [CommonModule, BaoIconModule],
|
|
5931
|
+
declarations: [SYSTEM_HEADER_DIRECTIVES],
|
|
5932
|
+
exports: [SYSTEM_HEADER_DIRECTIVES]
|
|
5933
|
+
}]
|
|
5934
|
+
}] });
|
|
5935
|
+
|
|
5936
|
+
/*
|
|
5937
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
5938
|
+
* Licensed under the MIT license.
|
|
5939
|
+
* See LICENSE file in the project root for full license information.
|
|
5940
|
+
*/
|
|
5941
|
+
|
|
5942
|
+
/*
|
|
5943
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
5944
|
+
* Licensed under the MIT license.
|
|
5945
|
+
* See LICENSE file in the project root for full license information.
|
|
5946
|
+
*/
|
|
5947
|
+
class BaoModule {
|
|
5948
|
+
}
|
|
5949
|
+
BaoModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5950
|
+
BaoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoModule, imports: [BaoIconModule,
|
|
5951
|
+
BaoButtonModule,
|
|
5952
|
+
BaoAlertModule,
|
|
5953
|
+
BaoCardModule,
|
|
5954
|
+
BaoBreadcrumbModule,
|
|
5955
|
+
BaoModalModule], exports: [BaoIconModule,
|
|
5956
|
+
BaoButtonModule,
|
|
5957
|
+
BaoAlertModule,
|
|
5958
|
+
BaoBreadcrumbModule,
|
|
5959
|
+
BaoCardModule,
|
|
5960
|
+
BaoTagModule,
|
|
5961
|
+
BaoHeaderInfoModule,
|
|
5962
|
+
BaoListModule,
|
|
5963
|
+
BaoCommonComponentsModule,
|
|
5964
|
+
BaoCheckboxModule,
|
|
5965
|
+
BaoRadioModule,
|
|
5966
|
+
BaoSummaryModule,
|
|
5967
|
+
BaoAvatarModule,
|
|
5968
|
+
BaoTabsModule,
|
|
5969
|
+
BaoModalModule,
|
|
5970
|
+
BaoHyperlinkModule,
|
|
5971
|
+
BaoDropdownMenuModule,
|
|
5972
|
+
BaoFileModule,
|
|
5973
|
+
BaoSnackBarModule,
|
|
5974
|
+
BaoSystemHeaderModule
|
|
5975
|
+
// TODO: reactivate once component does not depend on global css BaoBadgeModule,
|
|
5976
|
+
] });
|
|
5977
|
+
BaoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModule, imports: [BaoIconModule,
|
|
5978
|
+
BaoButtonModule,
|
|
5979
|
+
BaoAlertModule,
|
|
5980
|
+
BaoCardModule,
|
|
5981
|
+
BaoBreadcrumbModule,
|
|
5982
|
+
BaoModalModule, BaoIconModule,
|
|
5983
|
+
BaoButtonModule,
|
|
5984
|
+
BaoAlertModule,
|
|
5985
|
+
BaoBreadcrumbModule,
|
|
5986
|
+
BaoCardModule,
|
|
5987
|
+
BaoTagModule,
|
|
5988
|
+
BaoHeaderInfoModule,
|
|
5989
|
+
BaoListModule,
|
|
5990
|
+
BaoCommonComponentsModule,
|
|
5991
|
+
BaoCheckboxModule,
|
|
5992
|
+
BaoRadioModule,
|
|
5993
|
+
BaoSummaryModule,
|
|
5994
|
+
BaoAvatarModule,
|
|
5995
|
+
BaoTabsModule,
|
|
5996
|
+
BaoModalModule,
|
|
5997
|
+
BaoHyperlinkModule,
|
|
5998
|
+
BaoDropdownMenuModule,
|
|
5999
|
+
BaoFileModule,
|
|
6000
|
+
BaoSnackBarModule,
|
|
6001
|
+
BaoSystemHeaderModule
|
|
6002
|
+
// TODO: reactivate once component does not depend on global css BaoBadgeModule,
|
|
6003
|
+
] });
|
|
6004
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModule, decorators: [{
|
|
6005
|
+
type: NgModule,
|
|
6006
|
+
args: [{
|
|
6007
|
+
imports: [
|
|
6008
|
+
BaoIconModule,
|
|
6009
|
+
BaoButtonModule,
|
|
6010
|
+
BaoAlertModule,
|
|
6011
|
+
BaoCardModule,
|
|
6012
|
+
BaoBreadcrumbModule,
|
|
6013
|
+
BaoModalModule
|
|
6014
|
+
],
|
|
6015
|
+
exports: [
|
|
6016
|
+
BaoIconModule,
|
|
6017
|
+
BaoButtonModule,
|
|
6018
|
+
BaoAlertModule,
|
|
6019
|
+
BaoBreadcrumbModule,
|
|
6020
|
+
BaoCardModule,
|
|
6021
|
+
BaoTagModule,
|
|
6022
|
+
BaoHeaderInfoModule,
|
|
6023
|
+
BaoListModule,
|
|
6024
|
+
BaoCommonComponentsModule,
|
|
6025
|
+
BaoCheckboxModule,
|
|
6026
|
+
BaoRadioModule,
|
|
6027
|
+
BaoSummaryModule,
|
|
6028
|
+
BaoAvatarModule,
|
|
6029
|
+
BaoTabsModule,
|
|
6030
|
+
BaoModalModule,
|
|
6031
|
+
BaoHyperlinkModule,
|
|
6032
|
+
BaoDropdownMenuModule,
|
|
6033
|
+
BaoFileModule,
|
|
6034
|
+
BaoSnackBarModule,
|
|
6035
|
+
BaoSystemHeaderModule
|
|
6036
|
+
// TODO: reactivate once component does not depend on global css BaoBadgeModule,
|
|
6037
|
+
]
|
|
6038
|
+
}]
|
|
6039
|
+
}] });
|
|
6040
|
+
|
|
6041
|
+
/*
|
|
6042
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
6043
|
+
* Licensed under the MIT license.
|
|
6044
|
+
* See LICENSE file in the project root for full license information.
|
|
6045
|
+
*/
|
|
6046
|
+
class BaoBadgeComponent {
|
|
6047
|
+
constructor() {
|
|
6048
|
+
this.type = '';
|
|
4630
6049
|
}
|
|
4631
6050
|
}
|
|
4632
6051
|
BaoBadgeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoBadgeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
@@ -4645,7 +6064,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
4645
6064
|
}] } });
|
|
4646
6065
|
|
|
4647
6066
|
/*
|
|
4648
|
-
* Copyright (c)
|
|
6067
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
4649
6068
|
* Licensed under the MIT license.
|
|
4650
6069
|
* See LICENSE file in the project root for full license information.
|
|
4651
6070
|
*/
|
|
@@ -4665,25 +6084,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
4665
6084
|
}] });
|
|
4666
6085
|
|
|
4667
6086
|
/*
|
|
4668
|
-
* Copyright (c)
|
|
6087
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
6088
|
+
* Licensed under the MIT license.
|
|
6089
|
+
* See LICENSE file in the project root for full license information.
|
|
6090
|
+
*/
|
|
6091
|
+
|
|
6092
|
+
/*
|
|
6093
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
6094
|
+
* Licensed under the MIT license.
|
|
6095
|
+
* See LICENSE file in the project root for full license information.
|
|
6096
|
+
*/
|
|
6097
|
+
|
|
6098
|
+
/*
|
|
6099
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
4669
6100
|
* Licensed under the MIT license.
|
|
4670
6101
|
* See LICENSE file in the project root for full license information.
|
|
4671
6102
|
*/
|
|
4672
6103
|
|
|
4673
6104
|
/*
|
|
4674
|
-
* Copyright (c)
|
|
6105
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
4675
6106
|
* Licensed under the MIT license.
|
|
4676
6107
|
* See LICENSE file in the project root for full license information.
|
|
4677
6108
|
*/
|
|
4678
6109
|
|
|
4679
6110
|
/*
|
|
4680
|
-
* Copyright (c)
|
|
6111
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
4681
6112
|
* Licensed under the MIT license.
|
|
4682
6113
|
* See LICENSE file in the project root for full license information.
|
|
4683
6114
|
*/
|
|
4684
6115
|
|
|
4685
6116
|
/*
|
|
4686
|
-
* Copyright (c)
|
|
6117
|
+
* Copyright (c) 2024 Ville de Montreal. All rights reserved.
|
|
4687
6118
|
* Licensed under the MIT license.
|
|
4688
6119
|
* See LICENSE file in the project root for full license information.
|
|
4689
6120
|
*/
|
|
@@ -4692,5 +6123,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
4692
6123
|
* Generated bundle index. Do not edit.
|
|
4693
6124
|
*/
|
|
4694
6125
|
|
|
4695
|
-
export { BAO_MODAL_DATA, BAO_RADIO_GROUP, BaoAlertActions, BaoAlertComponent, BaoAlertContent, BaoAlertLink, BaoAlertModule, BaoAlertTitle, BaoAvatarComponent, BaoAvatarContent, BaoAvatarModule, BaoBadgeComponent, BaoBadgeModule, BaoBreadcrumbComponent, BaoBreadcrumbModule, BaoButtonComponent, BaoButtonModule, BaoCardComponent, BaoCardContent, BaoCardHeader, BaoCardModule, BaoCardTextInterface, BaoCardTitle, BaoCheckBoxDescription, BaoCheckboxComponent, BaoCheckboxGroupComponent, BaoCheckboxModule, BaoCommonComponentsModule, BaoDropdownMenuComponent, BaoDropdownMenuDivider, BaoDropdownMenuItem, BaoDropdownMenuItemDescription, BaoDropdownMenuItemLabel, BaoDropdownMenuModule, BaoDropdownMenuSection, BaoDropdownMenuTrigger, BaoErrorTextComponent, BaoGuidingTextComponent, BaoHeaderInfoComponent, BaoHeaderInfoContent, BaoHeaderInfoModule, BaoHeaderInfoSubtitle, BaoHeaderInfoSurtitle, BaoHeaderInfoTitle, BaoHeaderInfoTitleGroupComponent, BaoHyperlinkComponent, BaoHyperlinkModule, BaoIconComponent, BaoIconModule, BaoLabelTextComponent, BaoList, BaoListItem, BaoListItemDescription, BaoListItemTitle, BaoListModule, BaoListSummary, BaoListSummaryItem, BaoModal, BaoModalBase, BaoModalClose, BaoModalContainer, BaoModalInitialConfig, BaoModalModule, BaoModalRef, BaoModule, BaoNavList, BaoRadioButtonComponent, BaoRadioButtonGroupComponent, BaoRadioDescription, BaoRadioModule, BaoSummaryComponent, BaoSummaryDescription, BaoSummaryModule, BaoTabHeader, BaoTabPanel, BaoTablistComponent, BaoTabsContainer, BaoTabsModule, BaoTagComponent, BaoTagModule, BaoTitleTextComponent, _BaoModalContainerBase, _closeModalVia, eModalDesktopWidthSize, eModalMobileWidthSize, throwBaoModalContentAlreadyAttachedError };
|
|
6126
|
+
export { BAO_FILE_INTL_PROVIDER, BAO_FILE_INTL_PROVIDER_FACTORY, BAO_MODAL_DATA, BAO_RADIO_GROUP, BAO_SNACK_BAR_DATA, BAO_SNACK_BAR_DEFAULT_OPTIONS, BaoAlertActions, BaoAlertComponent, BaoAlertContent, BaoAlertLink, BaoAlertModule, BaoAlertTitle, BaoAvatarComponent, BaoAvatarContent, BaoAvatarModule, BaoBackNavigationComponent, BaoBackNavigationInsert, BaoBadgeComponent, BaoBadgeModule, BaoBreadcrumbComponent, BaoBreadcrumbModule, BaoButtonComponent, BaoButtonModule, BaoCardComponent, BaoCardContent, BaoCardHeader, BaoCardModule, BaoCardTextInterface, BaoCardTitle, BaoCheckBoxDescription, BaoCheckboxComponent, BaoCheckboxGroupComponent, BaoCheckboxModule, BaoCommonComponentsModule, BaoDropdownMenuComponent, BaoDropdownMenuDivider, BaoDropdownMenuItem, BaoDropdownMenuItemDescription, BaoDropdownMenuItemLabel, BaoDropdownMenuModule, BaoDropdownMenuSection, BaoDropdownMenuTrigger, BaoErrorTextComponent, BaoFileDropDirective, BaoFileDropzoneIntructions, BaoFileInputComponent, BaoFileIntl, BaoFileIntlEnglish, BaoFileModule, BaoFilePreviewComponent, BaoGuidingTextComponent, BaoHeaderInfoComponent, BaoHeaderInfoContent, BaoHeaderInfoModule, BaoHeaderInfoSubtitle, BaoHeaderInfoSurtitle, BaoHeaderInfoTitle, BaoHeaderInfoTitleGroupComponent, BaoHyperlinkComponent, BaoHyperlinkModule, BaoIconComponent, BaoIconModule, BaoLabelTextComponent, BaoList, BaoListItem, BaoListItemDescription, BaoListItemTitle, BaoListModule, BaoListSummary, BaoListSummaryItem, BaoModal, BaoModalBase, BaoModalClose, BaoModalContainer, BaoModalInitialConfig, BaoModalModule, BaoModalRef, BaoModule, BaoNavList, BaoRadioButtonComponent, BaoRadioButtonGroupComponent, BaoRadioDescription, BaoRadioModule, BaoSimpleSnackBarComponent, BaoSnackBarConfig, BaoSnackBarContainerComponent, BaoSnackBarModule, BaoSnackBarRef, BaoSnackBarService, BaoSnackBarToastTypeEnum, BaoSummaryComponent, BaoSummaryDescription, BaoSummaryModule, BaoSystemHeaderComponent, BaoSystemHeaderModule, BaoTabHeader, BaoTabPanel, BaoTablistComponent, BaoTabsContainer, BaoTabsModule, BaoTagComponent, BaoTagModule, BaoTitleTextComponent, _BaoModalContainerBase, _closeModalVia, baoFactory, eModalDesktopWidthSize, eModalMobileWidthSize, throwBaoModalContentAlreadyAttachedError };
|
|
4696
6127
|
//# sourceMappingURL=villedemontreal-angular-ui.mjs.map
|