@villedemontreal/angular-ui 14.1.0 → 14.3.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 +12 -5
- 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 +13 -8
- 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 +2 -2
- package/esm2020/lib/common-components/module.mjs +2 -2
- 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 +99 -54
- 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 +2 -2
- package/esm2020/lib/file/file-intl.mjs +2 -2
- package/esm2020/lib/file/file-preview.component.mjs +21 -14
- package/esm2020/lib/file/index.mjs +2 -2
- package/esm2020/lib/file/module.mjs +2 -2
- 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 +7 -5
- package/esm2020/lib/icon/icons-dictionary.mjs +2 -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 +4 -4
- 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 +3 -3
- package/esm2020/lib/modal/modal-directives.mjs +2 -2
- package/esm2020/lib/modal/modal-ref.mjs +1 -1
- package/esm2020/lib/modal/modal.mjs +2 -2
- package/esm2020/lib/modal/module.mjs +2 -2
- 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 +4 -2
- package/fesm2015/villedemontreal-angular-ui.mjs +1220 -194
- package/fesm2015/villedemontreal-angular-ui.mjs.map +1 -1
- package/fesm2020/villedemontreal-angular-ui.mjs +1216 -194
- package/fesm2020/villedemontreal-angular-ui.mjs.map +1 -1
- package/lib/alert/alert.component.d.ts +3 -1
- package/lib/alert/index.d.ts +1 -1
- package/lib/bao.module.d.ts +3 -1
- 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 +11 -14
- package/lib/file/file-preview.component.d.ts +7 -6
- package/lib/icon/icon.component.d.ts +1 -0
- package/lib/list/list.component.d.ts +1 -1
- 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 +2 -0
|
@@ -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,10 +12,14 @@ 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';
|
|
15
|
+
import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal, PortalModule, DomPortal, PortalInjector } from '@angular/cdk/portal';
|
|
16
16
|
import { Subject, filter, take, defer, startWith } from 'rxjs';
|
|
17
|
+
import * as i1$5 from '@angular/cdk/platform';
|
|
17
18
|
import { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';
|
|
18
19
|
import { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';
|
|
20
|
+
import { take as take$1 } from 'rxjs/operators';
|
|
21
|
+
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
22
|
+
import * as i2$1 from '@angular/cdk/layout';
|
|
19
23
|
|
|
20
24
|
function baoColorToHex(baoColor) {
|
|
21
25
|
switch (baoColor) {
|
|
@@ -43,7 +47,7 @@ function baoColorToHex(baoColor) {
|
|
|
43
47
|
}
|
|
44
48
|
|
|
45
49
|
/*
|
|
46
|
-
* Copyright (c)
|
|
50
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
47
51
|
* Licensed under the MIT license.
|
|
48
52
|
* See LICENSE file in the project root for full license information.
|
|
49
53
|
*/
|
|
@@ -168,7 +172,7 @@ const ICONS_DCT = {
|
|
|
168
172
|
};
|
|
169
173
|
|
|
170
174
|
/*
|
|
171
|
-
* Copyright (c)
|
|
175
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
172
176
|
* Licensed under the MIT license.
|
|
173
177
|
* See LICENSE file in the project root for full license information.
|
|
174
178
|
*/
|
|
@@ -207,7 +211,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
207
211
|
}] }, { type: i1.DomSanitizer }]; } });
|
|
208
212
|
|
|
209
213
|
/*
|
|
210
|
-
* Copyright (c)
|
|
214
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
211
215
|
* Licensed under the MIT license.
|
|
212
216
|
* See LICENSE file in the project root for full license information.
|
|
213
217
|
*/
|
|
@@ -308,6 +312,7 @@ class BaoIconComponent {
|
|
|
308
312
|
let svg = this.iconRegistry.getNamedSvgIcon(iconName);
|
|
309
313
|
if (title) {
|
|
310
314
|
svg = this.addTitleToSVG(svg, title);
|
|
315
|
+
this.removeTitleAttributeFromHost();
|
|
311
316
|
}
|
|
312
317
|
if (!title) {
|
|
313
318
|
svg.setAttribute('aria-hidden', 'true');
|
|
@@ -324,6 +329,9 @@ class BaoIconComponent {
|
|
|
324
329
|
svg.setAttribute('aria-labelledby', this._titleId);
|
|
325
330
|
return svg;
|
|
326
331
|
}
|
|
332
|
+
removeTitleAttributeFromHost() {
|
|
333
|
+
this.renderer.removeAttribute(this.elementRef.nativeElement, 'title');
|
|
334
|
+
}
|
|
327
335
|
generateUniqueTitleId() {
|
|
328
336
|
return this.title
|
|
329
337
|
? `${this.title
|
|
@@ -333,12 +341,10 @@ class BaoIconComponent {
|
|
|
333
341
|
}
|
|
334
342
|
}
|
|
335
343
|
BaoIconComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoIconComponent, deps: [{ token: i0.ElementRef }, { token: BaoIconDictionary }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component });
|
|
336
|
-
BaoIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoIconComponent, selector: "bao-icon", inputs: { color: "color", size: "size", svgIcon: "svgIcon", title: "title" }, host: {
|
|
344
|
+
BaoIconComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoIconComponent, selector: "bao-icon", inputs: { color: "color", size: "size", svgIcon: "svgIcon", title: "title" }, host: { properties: { "class.bao-icon": "true", "class.notranslate": "true", "class.bao-icon-medium": "size === \"medium\"", "class.bao-icon-small": "size === \"small\"", "class.bao-icon-x-small": "size === \"x-small\"", "class.bao-icon-xx-small": "size === \"xx-small\"", "attr.data-bao-icon-type": "\"svg\"", "style.color": "hexColor" } }, exportAs: ["baoIcon"], ngImport: i0, template: '<ng-content></ng-content>', isInline: true, styles: ["bao-icon{background-repeat:no-repeat;display:inline-block;fill:currentColor;line-height:normal}bao-icon svg{height:100%;width:100%}bao-icon.bao-icon-medium{height:2.5rem;width:2.5rem}bao-icon.bao-icon-small{height:2rem;width:2rem;line-height:1.75rem}bao-icon.bao-icon-x-small{height:1.5rem;width:1.5rem;line-height:.5rem}bao-icon.bao-icon-xx-small{height:1rem;width:1rem;line-height:.85rem}bao-icon.bao-icon-spinner{animation:spin .75s linear infinite}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
337
345
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoIconComponent, decorators: [{
|
|
338
346
|
type: Component,
|
|
339
347
|
args: [{ template: '<ng-content></ng-content>', selector: 'bao-icon', exportAs: 'baoIcon', host: {
|
|
340
|
-
role: 'img',
|
|
341
|
-
// '[class]': "'bao-icon notranslate ' + svgIcon",
|
|
342
348
|
'[class.bao-icon]': 'true',
|
|
343
349
|
'[class.notranslate]': 'true',
|
|
344
350
|
'[class.bao-icon-medium]': 'size === "medium"',
|
|
@@ -359,27 +365,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
359
365
|
}] } });
|
|
360
366
|
|
|
361
367
|
/*
|
|
362
|
-
* Copyright (c)
|
|
363
|
-
* Licensed under the MIT license.
|
|
364
|
-
* See LICENSE file in the project root for full license information.
|
|
365
|
-
*/
|
|
366
|
-
const ICON_DIRECTIVES = [BaoIconComponent];
|
|
367
|
-
class BaoIconModule {
|
|
368
|
-
}
|
|
369
|
-
BaoIconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
370
|
-
BaoIconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoIconModule, declarations: [BaoIconComponent], imports: [CommonModule], exports: [BaoIconComponent] });
|
|
371
|
-
BaoIconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoIconModule, imports: [CommonModule] });
|
|
372
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoIconModule, decorators: [{
|
|
373
|
-
type: NgModule,
|
|
374
|
-
args: [{
|
|
375
|
-
imports: [CommonModule],
|
|
376
|
-
declarations: ICON_DIRECTIVES,
|
|
377
|
-
exports: ICON_DIRECTIVES
|
|
378
|
-
}]
|
|
379
|
-
}] });
|
|
380
|
-
|
|
381
|
-
/*
|
|
382
|
-
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
368
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
383
369
|
* Licensed under the MIT license.
|
|
384
370
|
* See LICENSE file in the project root for full license information.
|
|
385
371
|
*/
|
|
@@ -429,7 +415,7 @@ class BaoButtonComponent {
|
|
|
429
415
|
get nativeElement() {
|
|
430
416
|
return this.elementRef.nativeElement;
|
|
431
417
|
}
|
|
432
|
-
|
|
418
|
+
ngAfterContentInit() {
|
|
433
419
|
const childNodes = Array.from(this.nativeElement.childNodes);
|
|
434
420
|
const textIndex = childNodes.findIndex(c => c.nodeType === Node.TEXT_NODE);
|
|
435
421
|
this.noText = textIndex === -1;
|
|
@@ -475,27 +461,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
475
461
|
}] } });
|
|
476
462
|
|
|
477
463
|
/*
|
|
478
|
-
* Copyright (c)
|
|
479
|
-
* Licensed under the MIT license.
|
|
480
|
-
* See LICENSE file in the project root for full license information.
|
|
481
|
-
*/
|
|
482
|
-
const BUTTON_DIRECTIVES = [BaoButtonComponent];
|
|
483
|
-
class BaoButtonModule {
|
|
484
|
-
}
|
|
485
|
-
BaoButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
486
|
-
BaoButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoButtonModule, declarations: [BaoButtonComponent], imports: [CommonModule, BaoIconModule], exports: [BaoButtonComponent, BaoIconModule] });
|
|
487
|
-
BaoButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoButtonModule, imports: [CommonModule, BaoIconModule, BaoIconModule] });
|
|
488
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoButtonModule, decorators: [{
|
|
489
|
-
type: NgModule,
|
|
490
|
-
args: [{
|
|
491
|
-
imports: [CommonModule, BaoIconModule],
|
|
492
|
-
declarations: BUTTON_DIRECTIVES,
|
|
493
|
-
exports: [...BUTTON_DIRECTIVES, BaoIconModule]
|
|
494
|
-
}]
|
|
495
|
-
}] });
|
|
496
|
-
|
|
497
|
-
/*
|
|
498
|
-
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
464
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
499
465
|
* Licensed under the MIT license.
|
|
500
466
|
* See LICENSE file in the project root for full license information.
|
|
501
467
|
*/
|
|
@@ -598,12 +564,15 @@ class BaoAlertComponent {
|
|
|
598
564
|
*/
|
|
599
565
|
this.type = 'info';
|
|
600
566
|
this.dismissible = false;
|
|
567
|
+
this.dismissibleButtonAriaLabel = 'Cacher le message';
|
|
601
568
|
this.dismiss = new EventEmitter();
|
|
602
569
|
}
|
|
603
570
|
ngOnChanges(changes) {
|
|
604
571
|
if (changes['type']) {
|
|
605
572
|
this.iconType = this.alertTypeIcon(changes['type'].currentValue);
|
|
606
|
-
this.iconTitle =
|
|
573
|
+
this.iconTitle =
|
|
574
|
+
this.alertTypeTitle ||
|
|
575
|
+
this.alertTitleIcon(changes['type'].currentValue);
|
|
607
576
|
}
|
|
608
577
|
}
|
|
609
578
|
alertTypeIcon(value) {
|
|
@@ -631,7 +600,7 @@ class BaoAlertComponent {
|
|
|
631
600
|
}
|
|
632
601
|
}
|
|
633
602
|
BaoAlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
634
|
-
BaoAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoAlertComponent, selector: "bao-alert", inputs: { type: "type", dismissible: "dismissible" }, outputs: { dismiss: "dismiss" }, host: { attributes: { "role": "alert" }, properties: { "class.bao-alert-success": "type === \"success\"", "class.bao-alert-danger": "type === \"danger\"", "class.bao-alert-warning": "type === \"warning\"", "class.bao-alert-info": "type === \"info\"", "class.bao-alert-emergency": "type === \"emergency\"" }, classAttribute: "bao-alert bao-alert-with-icon bao-alert-dismissible fade show" }, usesOnChanges: true, ngImport: i0, template: "<bao-icon [svgIcon]=\"iconType\" [title]=\"iconTitle\"></bao-icon>\n<div class=\"bao-alert-content-container\">\n <ng-content></ng-content>\n</div>\n<button\n bao-button\n *ngIf=\"dismissible\"\n type=\"utility\"\n level=\"tertiary\"\n data-dismiss=\"alert\"\n role=\"button\"\n aria-label=\"
|
|
603
|
+
BaoAlertComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoAlertComponent, selector: "bao-alert", inputs: { type: "type", dismissible: "dismissible", alertTypeTitle: "alertTypeTitle", dismissibleButtonAriaLabel: "dismissibleButtonAriaLabel" }, outputs: { dismiss: "dismiss" }, host: { attributes: { "role": "alert" }, properties: { "class.bao-alert-success": "type === \"success\"", "class.bao-alert-danger": "type === \"danger\"", "class.bao-alert-warning": "type === \"warning\"", "class.bao-alert-info": "type === \"info\"", "class.bao-alert-emergency": "type === \"emergency\"" }, classAttribute: "bao-alert bao-alert-with-icon bao-alert-dismissible fade show" }, usesOnChanges: true, ngImport: i0, template: "<bao-icon [svgIcon]=\"iconType\" [title]=\"iconTitle\"></bao-icon>\n<div class=\"bao-alert-content-container\">\n <ng-content></ng-content>\n</div>\n<button\n bao-button\n *ngIf=\"dismissible\"\n type=\"utility\"\n level=\"tertiary\"\n data-dismiss=\"alert\"\n role=\"button\"\n [attr.aria-label]=\"dismissibleButtonAriaLabel\"\n (click)=\"onDismissClicked()\"\n>\n <bao-icon svgIcon=\"icon-x\"></bao-icon>\n</button>\n", styles: [".bao-alert{font-weight:400;font-size:1rem;line-height:1.5rem;display:flex;padding:1rem;margin-bottom:1rem;border-radius:0rem}.bao-alert .bao-alert-content-container{margin:0 .5rem 0 1rem;display:flex;flex-direction:column}.bao-alert .bao-alert-title{font-weight:700;padding-bottom:.5rem}.bao-alert a{font-weight:700}.bao-alert.bao-alert-dismissible .bao-button[data-dismiss=alert]{background-color:#fff0;border-radius:0rem;height:2.5rem;width:2.5rem;margin-left:auto;margin-right:-.5rem;margin-top:-.5rem}.bao-alert.bao-alert-dismissible .bao-button[data-dismiss=alert]:hover,.bao-alert.bao-alert-dismissible .bao-button[data-dismiss=alert]:focus{opacity:.75}.bao-alert .bao-alert-actions .bao-button{margin:1rem 1rem 0 0}.bao-alert-info{background-color:#e6f5f9;border-left:.125rem solid #0079c4;border-top:none;border-right:none;border-bottom:none;color:#004b7b}.bao-alert-info .bao-alert-title,.bao-alert-info a{color:#004b7b}.bao-alert-info a:hover,.bao-alert-info a:focus{background-color:#f2fafc}.bao-alert-info .bao-icon svg{fill:#004b7b;width:auto}.bao-alert-info .bao-button.bao-button-primary{background-color:#004b7b;border-color:#004b7b}.bao-alert-info .bao-button.bao-button-primary:hover,.bao-alert-info .bao-button.bao-button-primary:focus{background-color:#002c48;border-color:#002c48}.bao-alert-info .bao-button.bao-button-primary:focus{box-shadow:0 0 0 .1875rem #004b7b4d}.bao-alert-info .bao-button.bao-button-secondary{background-color:#e6f5f9;color:#004b7b}.bao-alert-info .bao-button.bao-button-secondary:hover,.bao-alert-info .bao-button.bao-button-secondary:focus{background-color:#e6f5f9;border-color:#004b7b}.bao-alert-info .bao-button.bao-button-secondary:focus{box-shadow:0 0 0 .1875rem #004b7b4d}.bao-alert-info .bao-button.bao-button-tertiary{background-color:#e6f5f9;color:#004b7b}.bao-alert-info .bao-button.bao-button-tertiary:hover,.bao-alert-info .bao-button.bao-button-tertiary:focus{background-color:#e6f5f9}.bao-alert-info .bao-button.bao-button-tertiary:focus{box-shadow:0 0 0 .1875rem #004b7b4d}.bao-alert-success{background-color:#e7f6f0;border-left:.125rem solid #0da566;border-top:none;border-right:none;border-bottom:none;color:#025d29}.bao-alert-success .bao-alert-title,.bao-alert-success a{color:#025d29}.bao-alert-success a:hover,.bao-alert-success a:focus{background-color:#f2faf7}.bao-alert-success .bao-icon svg{fill:#025d29;width:auto}.bao-alert-success .bao-button.bao-button-primary{background-color:#025d29;border-color:#025d29}.bao-alert-success .bao-button.bao-button-primary:hover,.bao-alert-success .bao-button.bao-button-primary:focus{background-color:#012b13;border-color:#012b13}.bao-alert-success .bao-button.bao-button-primary:focus{box-shadow:0 0 0 .1875rem #025d294d}.bao-alert-success .bao-button.bao-button-secondary{background-color:#e7f6f0;color:#025d29}.bao-alert-success .bao-button.bao-button-secondary:hover,.bao-alert-success .bao-button.bao-button-secondary:focus{background-color:#e7f6f0;border-color:#025d29}.bao-alert-success .bao-button.bao-button-secondary:focus{box-shadow:0 0 0 .1875rem #025d294d}.bao-alert-success .bao-button.bao-button-tertiary{background-color:#e7f6f0;color:#025d29}.bao-alert-success .bao-button.bao-button-tertiary:hover,.bao-alert-success .bao-button.bao-button-tertiary:focus{background-color:#e7f6f0}.bao-alert-success .bao-button.bao-button-tertiary:focus{box-shadow:0 0 0 .1875rem #025d294d}.bao-alert-warning{background-color:#fefae6;border-left:.125rem solid #ffb833;border-top:none;border-right:none;border-bottom:none;color:#6c4600}.bao-alert-warning .bao-alert-title,.bao-alert-warning a{color:#6c4600}.bao-alert-warning a:hover,.bao-alert-warning a:focus{background-color:#fffdf5}.bao-alert-warning .bao-icon svg{fill:#6c4600;width:auto}.bao-alert-warning .bao-button.bao-button-primary{background-color:#6c4600;border-color:#6c4600}.bao-alert-warning .bao-button.bao-button-primary:hover,.bao-alert-warning .bao-button.bao-button-primary:focus{background-color:#392500;border-color:#392500}.bao-alert-warning .bao-button.bao-button-primary:focus{box-shadow:0 0 0 .1875rem #6c46004d}.bao-alert-warning .bao-button.bao-button-secondary{background-color:#fefae6;color:#6c4600}.bao-alert-warning .bao-button.bao-button-secondary:hover,.bao-alert-warning .bao-button.bao-button-secondary:focus{background-color:#fefae6;border-color:#6c4600}.bao-alert-warning .bao-button.bao-button-secondary:focus{box-shadow:0 0 0 .1875rem #6c46004d}.bao-alert-warning .bao-button.bao-button-tertiary{background-color:#fefae6;color:#6c4600}.bao-alert-warning .bao-button.bao-button-tertiary:hover,.bao-alert-warning .bao-button.bao-button-tertiary:focus{background-color:#fefae6}.bao-alert-warning .bao-button.bao-button-tertiary:focus{box-shadow:0 0 0 .1875rem #6c46004d}.bao-alert-danger{background-color:#ffebe6;border-left:.125rem solid #d3310a;border-top:none;border-right:none;border-bottom:none;color:#851a00}.bao-alert-danger .bao-alert-title,.bao-alert-danger a{color:#851a00}.bao-alert-danger a:hover,.bao-alert-danger a:focus{background-color:#fff7f5}.bao-alert-danger .bao-icon svg{fill:#851a00;width:auto}.bao-alert-danger .bao-button.bao-button-primary{background-color:#851a00;border-color:#851a00}.bao-alert-danger .bao-button.bao-button-primary:hover,.bao-alert-danger .bao-button.bao-button-primary:focus{background-color:#521000;border-color:#521000}.bao-alert-danger .bao-button.bao-button-primary:focus{box-shadow:0 0 0 .1875rem #851a004d}.bao-alert-danger .bao-button.bao-button-secondary{background-color:#ffebe6;color:#851a00}.bao-alert-danger .bao-button.bao-button-secondary:hover,.bao-alert-danger .bao-button.bao-button-secondary:focus{background-color:#ffebe6;border-color:#851a00}.bao-alert-danger .bao-button.bao-button-secondary:focus{box-shadow:0 0 0 .1875rem #851a004d}.bao-alert-danger .bao-button.bao-button-tertiary{background-color:#ffebe6;color:#851a00}.bao-alert-danger .bao-button.bao-button-tertiary:hover,.bao-alert-danger .bao-button.bao-button-tertiary:focus{background-color:#ffebe6}.bao-alert-danger .bao-button.bao-button-tertiary:focus{box-shadow:0 0 0 .1875rem #851a004d}.bao-alert-emergency{background-color:#ffebe6;border-left:.125rem solid #d3310a;border-top:none;border-right:none;border-bottom:none;color:#851a00}.bao-alert-emergency .bao-alert-title,.bao-alert-emergency a{color:#851a00}.bao-alert-emergency a:hover,.bao-alert-emergency a:focus{background-color:#fff7f5}.bao-alert-emergency .bao-icon svg{fill:#851a00;width:auto}.bao-alert-emergency .bao-button.bao-button-primary{background-color:#851a00;border-color:#851a00}.bao-alert-emergency .bao-button.bao-button-primary:hover,.bao-alert-emergency .bao-button.bao-button-primary:focus{background-color:#521000;border-color:#521000}.bao-alert-emergency .bao-button.bao-button-primary:focus{box-shadow:0 0 0 .1875rem #851a004d}.bao-alert-emergency .bao-button.bao-button-secondary{background-color:#ffebe6;color:#851a00}.bao-alert-emergency .bao-button.bao-button-secondary:hover,.bao-alert-emergency .bao-button.bao-button-secondary:focus{background-color:#ffebe6;border-color:#851a00}.bao-alert-emergency .bao-button.bao-button-secondary:focus{box-shadow:0 0 0 .1875rem #851a004d}.bao-alert-emergency .bao-button.bao-button-tertiary{background-color:#ffebe6;color:#851a00}.bao-alert-emergency .bao-button.bao-button-tertiary:hover,.bao-alert-emergency .bao-button.bao-button-tertiary:focus{background-color:#ffebe6}.bao-alert-emergency .bao-button.bao-button-tertiary:focus{box-shadow:0 0 0 .1875rem #851a004d}\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"] }, { kind: "component", type: BaoButtonComponent, selector: "button[bao-button]", inputs: ["displayType", "level", "size", "loading", "reversed", "loadingSpinnerAriaLabel", "fullWidth"] }], encapsulation: i0.ViewEncapsulation.None });
|
|
635
604
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoAlertComponent, decorators: [{
|
|
636
605
|
type: Component,
|
|
637
606
|
args: [{ selector: 'bao-alert', encapsulation: ViewEncapsulation.None, host: {
|
|
@@ -642,17 +611,61 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
642
611
|
'[class.bao-alert-info]': 'type === "info"',
|
|
643
612
|
'[class.bao-alert-emergency]': 'type === "emergency"',
|
|
644
613
|
role: 'alert'
|
|
645
|
-
}, template: "<bao-icon [svgIcon]=\"iconType\" [title]=\"iconTitle\"></bao-icon>\n<div class=\"bao-alert-content-container\">\n <ng-content></ng-content>\n</div>\n<button\n bao-button\n *ngIf=\"dismissible\"\n type=\"utility\"\n level=\"tertiary\"\n data-dismiss=\"alert\"\n role=\"button\"\n aria-label=\"
|
|
614
|
+
}, template: "<bao-icon [svgIcon]=\"iconType\" [title]=\"iconTitle\"></bao-icon>\n<div class=\"bao-alert-content-container\">\n <ng-content></ng-content>\n</div>\n<button\n bao-button\n *ngIf=\"dismissible\"\n type=\"utility\"\n level=\"tertiary\"\n data-dismiss=\"alert\"\n role=\"button\"\n [attr.aria-label]=\"dismissibleButtonAriaLabel\"\n (click)=\"onDismissClicked()\"\n>\n <bao-icon svgIcon=\"icon-x\"></bao-icon>\n</button>\n", styles: [".bao-alert{font-weight:400;font-size:1rem;line-height:1.5rem;display:flex;padding:1rem;margin-bottom:1rem;border-radius:0rem}.bao-alert .bao-alert-content-container{margin:0 .5rem 0 1rem;display:flex;flex-direction:column}.bao-alert .bao-alert-title{font-weight:700;padding-bottom:.5rem}.bao-alert a{font-weight:700}.bao-alert.bao-alert-dismissible .bao-button[data-dismiss=alert]{background-color:#fff0;border-radius:0rem;height:2.5rem;width:2.5rem;margin-left:auto;margin-right:-.5rem;margin-top:-.5rem}.bao-alert.bao-alert-dismissible .bao-button[data-dismiss=alert]:hover,.bao-alert.bao-alert-dismissible .bao-button[data-dismiss=alert]:focus{opacity:.75}.bao-alert .bao-alert-actions .bao-button{margin:1rem 1rem 0 0}.bao-alert-info{background-color:#e6f5f9;border-left:.125rem solid #0079c4;border-top:none;border-right:none;border-bottom:none;color:#004b7b}.bao-alert-info .bao-alert-title,.bao-alert-info a{color:#004b7b}.bao-alert-info a:hover,.bao-alert-info a:focus{background-color:#f2fafc}.bao-alert-info .bao-icon svg{fill:#004b7b;width:auto}.bao-alert-info .bao-button.bao-button-primary{background-color:#004b7b;border-color:#004b7b}.bao-alert-info .bao-button.bao-button-primary:hover,.bao-alert-info .bao-button.bao-button-primary:focus{background-color:#002c48;border-color:#002c48}.bao-alert-info .bao-button.bao-button-primary:focus{box-shadow:0 0 0 .1875rem #004b7b4d}.bao-alert-info .bao-button.bao-button-secondary{background-color:#e6f5f9;color:#004b7b}.bao-alert-info .bao-button.bao-button-secondary:hover,.bao-alert-info .bao-button.bao-button-secondary:focus{background-color:#e6f5f9;border-color:#004b7b}.bao-alert-info .bao-button.bao-button-secondary:focus{box-shadow:0 0 0 .1875rem #004b7b4d}.bao-alert-info .bao-button.bao-button-tertiary{background-color:#e6f5f9;color:#004b7b}.bao-alert-info .bao-button.bao-button-tertiary:hover,.bao-alert-info .bao-button.bao-button-tertiary:focus{background-color:#e6f5f9}.bao-alert-info .bao-button.bao-button-tertiary:focus{box-shadow:0 0 0 .1875rem #004b7b4d}.bao-alert-success{background-color:#e7f6f0;border-left:.125rem solid #0da566;border-top:none;border-right:none;border-bottom:none;color:#025d29}.bao-alert-success .bao-alert-title,.bao-alert-success a{color:#025d29}.bao-alert-success a:hover,.bao-alert-success a:focus{background-color:#f2faf7}.bao-alert-success .bao-icon svg{fill:#025d29;width:auto}.bao-alert-success .bao-button.bao-button-primary{background-color:#025d29;border-color:#025d29}.bao-alert-success .bao-button.bao-button-primary:hover,.bao-alert-success .bao-button.bao-button-primary:focus{background-color:#012b13;border-color:#012b13}.bao-alert-success .bao-button.bao-button-primary:focus{box-shadow:0 0 0 .1875rem #025d294d}.bao-alert-success .bao-button.bao-button-secondary{background-color:#e7f6f0;color:#025d29}.bao-alert-success .bao-button.bao-button-secondary:hover,.bao-alert-success .bao-button.bao-button-secondary:focus{background-color:#e7f6f0;border-color:#025d29}.bao-alert-success .bao-button.bao-button-secondary:focus{box-shadow:0 0 0 .1875rem #025d294d}.bao-alert-success .bao-button.bao-button-tertiary{background-color:#e7f6f0;color:#025d29}.bao-alert-success .bao-button.bao-button-tertiary:hover,.bao-alert-success .bao-button.bao-button-tertiary:focus{background-color:#e7f6f0}.bao-alert-success .bao-button.bao-button-tertiary:focus{box-shadow:0 0 0 .1875rem #025d294d}.bao-alert-warning{background-color:#fefae6;border-left:.125rem solid #ffb833;border-top:none;border-right:none;border-bottom:none;color:#6c4600}.bao-alert-warning .bao-alert-title,.bao-alert-warning a{color:#6c4600}.bao-alert-warning a:hover,.bao-alert-warning a:focus{background-color:#fffdf5}.bao-alert-warning .bao-icon svg{fill:#6c4600;width:auto}.bao-alert-warning .bao-button.bao-button-primary{background-color:#6c4600;border-color:#6c4600}.bao-alert-warning .bao-button.bao-button-primary:hover,.bao-alert-warning .bao-button.bao-button-primary:focus{background-color:#392500;border-color:#392500}.bao-alert-warning .bao-button.bao-button-primary:focus{box-shadow:0 0 0 .1875rem #6c46004d}.bao-alert-warning .bao-button.bao-button-secondary{background-color:#fefae6;color:#6c4600}.bao-alert-warning .bao-button.bao-button-secondary:hover,.bao-alert-warning .bao-button.bao-button-secondary:focus{background-color:#fefae6;border-color:#6c4600}.bao-alert-warning .bao-button.bao-button-secondary:focus{box-shadow:0 0 0 .1875rem #6c46004d}.bao-alert-warning .bao-button.bao-button-tertiary{background-color:#fefae6;color:#6c4600}.bao-alert-warning .bao-button.bao-button-tertiary:hover,.bao-alert-warning .bao-button.bao-button-tertiary:focus{background-color:#fefae6}.bao-alert-warning .bao-button.bao-button-tertiary:focus{box-shadow:0 0 0 .1875rem #6c46004d}.bao-alert-danger{background-color:#ffebe6;border-left:.125rem solid #d3310a;border-top:none;border-right:none;border-bottom:none;color:#851a00}.bao-alert-danger .bao-alert-title,.bao-alert-danger a{color:#851a00}.bao-alert-danger a:hover,.bao-alert-danger a:focus{background-color:#fff7f5}.bao-alert-danger .bao-icon svg{fill:#851a00;width:auto}.bao-alert-danger .bao-button.bao-button-primary{background-color:#851a00;border-color:#851a00}.bao-alert-danger .bao-button.bao-button-primary:hover,.bao-alert-danger .bao-button.bao-button-primary:focus{background-color:#521000;border-color:#521000}.bao-alert-danger .bao-button.bao-button-primary:focus{box-shadow:0 0 0 .1875rem #851a004d}.bao-alert-danger .bao-button.bao-button-secondary{background-color:#ffebe6;color:#851a00}.bao-alert-danger .bao-button.bao-button-secondary:hover,.bao-alert-danger .bao-button.bao-button-secondary:focus{background-color:#ffebe6;border-color:#851a00}.bao-alert-danger .bao-button.bao-button-secondary:focus{box-shadow:0 0 0 .1875rem #851a004d}.bao-alert-danger .bao-button.bao-button-tertiary{background-color:#ffebe6;color:#851a00}.bao-alert-danger .bao-button.bao-button-tertiary:hover,.bao-alert-danger .bao-button.bao-button-tertiary:focus{background-color:#ffebe6}.bao-alert-danger .bao-button.bao-button-tertiary:focus{box-shadow:0 0 0 .1875rem #851a004d}.bao-alert-emergency{background-color:#ffebe6;border-left:.125rem solid #d3310a;border-top:none;border-right:none;border-bottom:none;color:#851a00}.bao-alert-emergency .bao-alert-title,.bao-alert-emergency a{color:#851a00}.bao-alert-emergency a:hover,.bao-alert-emergency a:focus{background-color:#fff7f5}.bao-alert-emergency .bao-icon svg{fill:#851a00;width:auto}.bao-alert-emergency .bao-button.bao-button-primary{background-color:#851a00;border-color:#851a00}.bao-alert-emergency .bao-button.bao-button-primary:hover,.bao-alert-emergency .bao-button.bao-button-primary:focus{background-color:#521000;border-color:#521000}.bao-alert-emergency .bao-button.bao-button-primary:focus{box-shadow:0 0 0 .1875rem #851a004d}.bao-alert-emergency .bao-button.bao-button-secondary{background-color:#ffebe6;color:#851a00}.bao-alert-emergency .bao-button.bao-button-secondary:hover,.bao-alert-emergency .bao-button.bao-button-secondary:focus{background-color:#ffebe6;border-color:#851a00}.bao-alert-emergency .bao-button.bao-button-secondary:focus{box-shadow:0 0 0 .1875rem #851a004d}.bao-alert-emergency .bao-button.bao-button-tertiary{background-color:#ffebe6;color:#851a00}.bao-alert-emergency .bao-button.bao-button-tertiary:hover,.bao-alert-emergency .bao-button.bao-button-tertiary:focus{background-color:#ffebe6}.bao-alert-emergency .bao-button.bao-button-tertiary:focus{box-shadow:0 0 0 .1875rem #851a004d}\n"] }]
|
|
646
615
|
}], propDecorators: { type: [{
|
|
647
616
|
type: Input
|
|
648
617
|
}], dismissible: [{
|
|
649
618
|
type: Input
|
|
619
|
+
}], alertTypeTitle: [{
|
|
620
|
+
type: Input
|
|
621
|
+
}], dismissibleButtonAriaLabel: [{
|
|
622
|
+
type: Input
|
|
650
623
|
}], dismiss: [{
|
|
651
624
|
type: Output
|
|
652
625
|
}] } });
|
|
653
626
|
|
|
654
627
|
/*
|
|
655
|
-
* Copyright (c)
|
|
628
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
629
|
+
* Licensed under the MIT license.
|
|
630
|
+
* See LICENSE file in the project root for full license information.
|
|
631
|
+
*/
|
|
632
|
+
const ICON_DIRECTIVES = [BaoIconComponent];
|
|
633
|
+
class BaoIconModule {
|
|
634
|
+
}
|
|
635
|
+
BaoIconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
636
|
+
BaoIconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoIconModule, declarations: [BaoIconComponent], imports: [CommonModule], exports: [BaoIconComponent] });
|
|
637
|
+
BaoIconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoIconModule, imports: [CommonModule] });
|
|
638
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoIconModule, decorators: [{
|
|
639
|
+
type: NgModule,
|
|
640
|
+
args: [{
|
|
641
|
+
imports: [CommonModule],
|
|
642
|
+
declarations: ICON_DIRECTIVES,
|
|
643
|
+
exports: ICON_DIRECTIVES
|
|
644
|
+
}]
|
|
645
|
+
}] });
|
|
646
|
+
|
|
647
|
+
/*
|
|
648
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
649
|
+
* Licensed under the MIT license.
|
|
650
|
+
* See LICENSE file in the project root for full license information.
|
|
651
|
+
*/
|
|
652
|
+
const BUTTON_DIRECTIVES = [BaoButtonComponent];
|
|
653
|
+
class BaoButtonModule {
|
|
654
|
+
}
|
|
655
|
+
BaoButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
656
|
+
BaoButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoButtonModule, declarations: [BaoButtonComponent], imports: [CommonModule, BaoIconModule], exports: [BaoButtonComponent, BaoIconModule] });
|
|
657
|
+
BaoButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoButtonModule, imports: [CommonModule, BaoIconModule, BaoIconModule] });
|
|
658
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoButtonModule, decorators: [{
|
|
659
|
+
type: NgModule,
|
|
660
|
+
args: [{
|
|
661
|
+
imports: [CommonModule, BaoIconModule],
|
|
662
|
+
declarations: BUTTON_DIRECTIVES,
|
|
663
|
+
exports: [...BUTTON_DIRECTIVES, BaoIconModule]
|
|
664
|
+
}]
|
|
665
|
+
}] });
|
|
666
|
+
|
|
667
|
+
/*
|
|
668
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
656
669
|
* Licensed under the MIT license.
|
|
657
670
|
* See LICENSE file in the project root for full license information.
|
|
658
671
|
*/
|
|
@@ -687,13 +700,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
687
700
|
}] });
|
|
688
701
|
|
|
689
702
|
/*
|
|
690
|
-
* Copyright (c)
|
|
703
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
691
704
|
* Licensed under the MIT license.
|
|
692
705
|
* See LICENSE file in the project root for full license information.
|
|
693
706
|
*/
|
|
694
707
|
|
|
695
708
|
/*
|
|
696
|
-
* Copyright (c)
|
|
709
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
697
710
|
* Licensed under the MIT license.
|
|
698
711
|
* See LICENSE file in the project root for full license information.
|
|
699
712
|
*/
|
|
@@ -726,7 +739,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
726
739
|
}] } });
|
|
727
740
|
|
|
728
741
|
/*
|
|
729
|
-
* Copyright (c)
|
|
742
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
730
743
|
* Licensed under the MIT license.
|
|
731
744
|
* See LICENSE file in the project root for full license information.
|
|
732
745
|
*/
|
|
@@ -746,19 +759,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
746
759
|
}] });
|
|
747
760
|
|
|
748
761
|
/*
|
|
749
|
-
* Copyright (c)
|
|
762
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
750
763
|
* Licensed under the MIT license.
|
|
751
764
|
* See LICENSE file in the project root for full license information.
|
|
752
765
|
*/
|
|
753
766
|
|
|
754
767
|
/*
|
|
755
|
-
* Copyright (c)
|
|
768
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
756
769
|
* Licensed under the MIT license.
|
|
757
770
|
* See LICENSE file in the project root for full license information.
|
|
758
771
|
*/
|
|
759
772
|
|
|
760
773
|
/*
|
|
761
|
-
* Copyright (c)
|
|
774
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
762
775
|
* Licensed under the MIT license.
|
|
763
776
|
* See LICENSE file in the project root for full license information.
|
|
764
777
|
*/
|
|
@@ -850,7 +863,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
850
863
|
}] });
|
|
851
864
|
|
|
852
865
|
/*
|
|
853
|
-
* Copyright (c)
|
|
866
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
854
867
|
* Licensed under the MIT license.
|
|
855
868
|
* See LICENSE file in the project root for full license information.
|
|
856
869
|
*/
|
|
@@ -884,13 +897,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
884
897
|
}] });
|
|
885
898
|
|
|
886
899
|
/*
|
|
887
|
-
* Copyright (c)
|
|
900
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
888
901
|
* Licensed under the MIT license.
|
|
889
902
|
* See LICENSE file in the project root for full license information.
|
|
890
903
|
*/
|
|
891
904
|
|
|
892
905
|
/*
|
|
893
|
-
* Copyright (c)
|
|
906
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
894
907
|
* Licensed under the MIT license.
|
|
895
908
|
* See LICENSE file in the project root for full license information.
|
|
896
909
|
*/
|
|
@@ -904,7 +917,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
904
917
|
}] });
|
|
905
918
|
|
|
906
919
|
/*
|
|
907
|
-
* Copyright (c)
|
|
920
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
908
921
|
* Licensed under the MIT license.
|
|
909
922
|
* See LICENSE file in the project root for full license information.
|
|
910
923
|
*/
|
|
@@ -918,7 +931,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
918
931
|
}] });
|
|
919
932
|
|
|
920
933
|
/*
|
|
921
|
-
* Copyright (c)
|
|
934
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
922
935
|
* Licensed under the MIT license.
|
|
923
936
|
* See LICENSE file in the project root for full license information.
|
|
924
937
|
*/
|
|
@@ -937,7 +950,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
937
950
|
}] } });
|
|
938
951
|
|
|
939
952
|
/*
|
|
940
|
-
* Copyright (c)
|
|
953
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
941
954
|
* Licensed under the MIT license.
|
|
942
955
|
* See LICENSE file in the project root for full license information.
|
|
943
956
|
*/
|
|
@@ -951,7 +964,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
951
964
|
}] });
|
|
952
965
|
|
|
953
966
|
/*
|
|
954
|
-
* Copyright (c)
|
|
967
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
955
968
|
* Licensed under the MIT license.
|
|
956
969
|
* See LICENSE file in the project root for full license information.
|
|
957
970
|
*/
|
|
@@ -982,7 +995,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
982
995
|
}] });
|
|
983
996
|
|
|
984
997
|
/*
|
|
985
|
-
* Copyright (c)
|
|
998
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
986
999
|
* Licensed under the MIT license.
|
|
987
1000
|
* See LICENSE file in the project root for full license information.
|
|
988
1001
|
*/
|
|
@@ -1337,7 +1350,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
1337
1350
|
}] });
|
|
1338
1351
|
|
|
1339
1352
|
/*
|
|
1340
|
-
* Copyright (c)
|
|
1353
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
1341
1354
|
* Licensed under the MIT license.
|
|
1342
1355
|
* See LICENSE file in the project root for full license information.
|
|
1343
1356
|
*/
|
|
@@ -1365,19 +1378,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
1365
1378
|
}] });
|
|
1366
1379
|
|
|
1367
1380
|
/*
|
|
1368
|
-
* Copyright (c)
|
|
1381
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
1369
1382
|
* Licensed under the MIT license.
|
|
1370
1383
|
* See LICENSE file in the project root for full license information.
|
|
1371
1384
|
*/
|
|
1372
1385
|
|
|
1373
1386
|
/*
|
|
1374
|
-
* Copyright (c)
|
|
1387
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
1375
1388
|
* Licensed under the MIT license.
|
|
1376
1389
|
* See LICENSE file in the project root for full license information.
|
|
1377
1390
|
*/
|
|
1378
1391
|
|
|
1379
1392
|
/*
|
|
1380
|
-
* Copyright (c)
|
|
1393
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
1381
1394
|
* Licensed under the MIT license.
|
|
1382
1395
|
* See LICENSE file in the project root for full license information.
|
|
1383
1396
|
*/
|
|
@@ -1478,7 +1491,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
1478
1491
|
}] });
|
|
1479
1492
|
|
|
1480
1493
|
/*
|
|
1481
|
-
* Copyright (c)
|
|
1494
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
1482
1495
|
* Licensed under the MIT license.
|
|
1483
1496
|
* See LICENSE file in the project root for full license information.
|
|
1484
1497
|
*/
|
|
@@ -1515,32 +1528,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
1515
1528
|
}] });
|
|
1516
1529
|
|
|
1517
1530
|
/*
|
|
1518
|
-
* Copyright (c)
|
|
1531
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
1519
1532
|
* Licensed under the MIT license.
|
|
1520
1533
|
* See LICENSE file in the project root for full license information.
|
|
1521
1534
|
*/
|
|
1522
1535
|
|
|
1523
1536
|
/*
|
|
1524
|
-
* Copyright (c)
|
|
1537
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
1525
1538
|
* Licensed under the MIT license.
|
|
1526
1539
|
* See LICENSE file in the project root for full license information.
|
|
1527
1540
|
*/
|
|
1528
1541
|
|
|
1529
1542
|
/*
|
|
1530
|
-
* Copyright (c)
|
|
1543
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
1531
1544
|
* Licensed under the MIT license.
|
|
1532
1545
|
* See LICENSE file in the project root for full license information.
|
|
1533
1546
|
*/
|
|
1534
1547
|
class BaoListItem {
|
|
1535
1548
|
}
|
|
1536
1549
|
BaoListItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoListItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1537
|
-
BaoListItem.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoListItem, selector: "bao-list-item, [bao-list-item]", host: { attributes: { "role": "listitem" }, classAttribute: "bao-list-item" }, ngImport: i0, template: "<div class=\"bao-list-item-header\">\n <ng-content select=\"baoIconItemType, [baoIconItemType]\"></ng-content>\n</div>\n<div class=\"bao-list-item-content\">\n <div class=\"bao-list-item-text\">\n <ng-content></ng-content>\n </div>\n <div class=\"bao-list-item-tag\">\n <ng-content\n select=\"bao-tag, [bao-tag], baoIconTag, [baoIconTag]\"\n ></ng-content>\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%}}.bao-list{padding:0;margin:0}.bao-list>.bao-list-item:last-child{border-radius:.125rem;box-shadow:inset 0 .0625rem #ced4da,inset 0 -.0625rem #ced4da}.bao-list>a.bao-list-item{border-bottom:none}.bao-list>a.bao-list-item:focus{box-shadow:0 0 0 .1875rem #98bcde;background-color:#f8f9fa}.bao-list>a.bao-list-item:focus .bao-list-item-title{color:#097d6c}.bao-list>a.bao-list-item:hover{background-color:#f8f9fa}.bao-list>a.bao-list-item:hover .bao-list-item-text,.bao-list>a.bao-list-item:hover .bao-list-item-title{color:#097d6c}.bao-list .bao-list-item{display:flex;padding:1rem;background-color:#fff0;border-radius:.125rem .125rem 0rem 0rem;box-shadow:inset 0 .0625rem #ced4da}.bao-list .bao-list-item>.bao-list-item-header{align-self:flex-start;color:#adb2bd;line-height:0}.bao-list .bao-list-item>.bao-list-item-header .bao-icon{margin-right:1em}.bao-list .bao-list-item>.bao-list-item-content{display:flex;flex-grow:2}@media (min-width: 0){.bao-list .bao-list-item>.bao-list-item-content{flex-direction:column}}@media (min-width: 768px){.bao-list .bao-list-item>.bao-list-item-content{flex-direction:row;justify-content:space-between}}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text{display:flex;flex-direction:column;color:#212529;font-weight:700;font-size:1rem;line-height:1.5rem}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-title{font-weight:700;font-size:1rem;line-height:1.5rem}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>ul.bao-list-item-description{padding:0;margin:0}@media (min-width: 768px){.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>ul.bao-list-item-description{display:inline-flex;flex-wrap:wrap}}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description{color:#637381;margin-right:0 1rem}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description>*{font-weight:400;font-size:.875rem;line-height:1.25rem;list-style-type:none}@media (min-width: 0){.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description{display:block}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description>*{margin-bottom:.25rem}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description>*:last-child{margin-bottom:0}}@media (min-width: 768px){.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description>li{display:inline-flex;align-items:center;margin-bottom:0}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description>li:before{content:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ADB5BD' fill-rule='evenodd'><circle cx='12' cy='12' r='2'/></svg>\");height:1rem;width:1rem;margin:0 .25rem;flex-shrink:0}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description>li:first-child:before{content:none}}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-tag{line-height:0}@media (min-width: 0){.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-tag>*{margin:.5rem 0 0}}@media (min-width: 768px){.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-tag>*{margin:0 0 0 1rem}}\n"], encapsulation: i0.ViewEncapsulation.None });
|
|
1550
|
+
BaoListItem.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoListItem, selector: "bao-list-item, [bao-list-item]", host: { attributes: { "role": "listitem" }, classAttribute: "bao-list-item" }, ngImport: i0, template: "<div class=\"bao-list-item-header\">\n <ng-content select=\"baoIconItemType, [baoIconItemType]\"></ng-content>\n</div>\n<div class=\"bao-list-item-content\">\n <div class=\"bao-list-item-text\">\n <ng-content></ng-content>\n </div>\n <div class=\"bao-list-item-tag\">\n <ng-content\n select=\"bao-tag, [bao-tag], baoIconTag, [baoIconTag]\"\n ></ng-content>\n </div>\n</div>\n<div class=\"bao-list-item-actions\">\n <ng-content\n select=\"bao-button, [bao-button], bao-dropdown-menu, [bao-dropdown-menu]\"\n >\n </ng-content>\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%}}.bao-list{padding:0;margin:0}.bao-list>.bao-list-item:last-child{border-radius:.125rem;box-shadow:inset 0 .0625rem #ced4da,inset 0 -.0625rem #ced4da}.bao-list>a.bao-list-item{border-bottom:none}.bao-list>a.bao-list-item:focus{box-shadow:0 0 0 .1875rem #98bcde;background-color:#f8f9fa}.bao-list>a.bao-list-item:focus .bao-list-item-title{color:#097d6c}.bao-list>a.bao-list-item:hover{background-color:#f8f9fa}.bao-list>a.bao-list-item:hover .bao-list-item-text,.bao-list>a.bao-list-item:hover .bao-list-item-title{color:#097d6c}.bao-list .bao-list-item{display:flex;padding:1rem;background-color:#fff0;border-radius:.125rem .125rem 0rem 0rem;box-shadow:inset 0 .0625rem #ced4da}.bao-list .bao-list-item>.bao-list-item-header{align-self:flex-start;color:#adb2bd;line-height:0}.bao-list .bao-list-item>.bao-list-item-header .bao-icon{margin-right:1em}.bao-list .bao-list-item>.bao-list-item-content{display:flex;flex-grow:2}@media (min-width: 0){.bao-list .bao-list-item>.bao-list-item-content{flex-direction:column}}@media (min-width: 768px){.bao-list .bao-list-item>.bao-list-item-content{flex-direction:row;justify-content:space-between}}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text{display:flex;flex-direction:column;color:#212529;font-weight:700;font-size:1rem;line-height:1.5rem}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-title{font-weight:700;font-size:1rem;line-height:1.5rem}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>ul.bao-list-item-description{padding:0;margin:0}@media (min-width: 768px){.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>ul.bao-list-item-description{display:inline-flex;flex-wrap:wrap}}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description{color:#637381;margin-right:0 1rem}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description>*{font-weight:400;font-size:.875rem;line-height:1.25rem;list-style-type:none}@media (min-width: 0){.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description{display:block}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description>*{margin-bottom:.25rem}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description>*:last-child{margin-bottom:0}}@media (min-width: 768px){.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description>li{display:inline-flex;align-items:center;margin-bottom:0}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description>li:before{content:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ADB5BD' fill-rule='evenodd'><circle cx='12' cy='12' r='2'/></svg>\");height:1rem;width:1rem;margin:0 .25rem;flex-shrink:0}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description>li:first-child:before{content:none}}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-tag{line-height:0}@media (min-width: 0){.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-tag>*{margin:.5rem 0 0}}@media (min-width: 768px){.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-tag>*{margin:0 0 0 1rem}}.bao-list .bao-list-item>.bao-list-item-actions .bao-button{margin-left:2rem;margin-top:-.5rem}\n"], encapsulation: i0.ViewEncapsulation.None });
|
|
1538
1551
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoListItem, decorators: [{
|
|
1539
1552
|
type: Component,
|
|
1540
1553
|
args: [{ selector: 'bao-list-item, [bao-list-item]', encapsulation: ViewEncapsulation.None, host: {
|
|
1541
1554
|
class: 'bao-list-item',
|
|
1542
1555
|
role: 'listitem'
|
|
1543
|
-
}, template: "<div class=\"bao-list-item-header\">\n <ng-content select=\"baoIconItemType, [baoIconItemType]\"></ng-content>\n</div>\n<div class=\"bao-list-item-content\">\n <div class=\"bao-list-item-text\">\n <ng-content></ng-content>\n </div>\n <div class=\"bao-list-item-tag\">\n <ng-content\n select=\"bao-tag, [bao-tag], baoIconTag, [baoIconTag]\"\n ></ng-content>\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%}}.bao-list{padding:0;margin:0}.bao-list>.bao-list-item:last-child{border-radius:.125rem;box-shadow:inset 0 .0625rem #ced4da,inset 0 -.0625rem #ced4da}.bao-list>a.bao-list-item{border-bottom:none}.bao-list>a.bao-list-item:focus{box-shadow:0 0 0 .1875rem #98bcde;background-color:#f8f9fa}.bao-list>a.bao-list-item:focus .bao-list-item-title{color:#097d6c}.bao-list>a.bao-list-item:hover{background-color:#f8f9fa}.bao-list>a.bao-list-item:hover .bao-list-item-text,.bao-list>a.bao-list-item:hover .bao-list-item-title{color:#097d6c}.bao-list .bao-list-item{display:flex;padding:1rem;background-color:#fff0;border-radius:.125rem .125rem 0rem 0rem;box-shadow:inset 0 .0625rem #ced4da}.bao-list .bao-list-item>.bao-list-item-header{align-self:flex-start;color:#adb2bd;line-height:0}.bao-list .bao-list-item>.bao-list-item-header .bao-icon{margin-right:1em}.bao-list .bao-list-item>.bao-list-item-content{display:flex;flex-grow:2}@media (min-width: 0){.bao-list .bao-list-item>.bao-list-item-content{flex-direction:column}}@media (min-width: 768px){.bao-list .bao-list-item>.bao-list-item-content{flex-direction:row;justify-content:space-between}}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text{display:flex;flex-direction:column;color:#212529;font-weight:700;font-size:1rem;line-height:1.5rem}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-title{font-weight:700;font-size:1rem;line-height:1.5rem}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>ul.bao-list-item-description{padding:0;margin:0}@media (min-width: 768px){.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>ul.bao-list-item-description{display:inline-flex;flex-wrap:wrap}}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description{color:#637381;margin-right:0 1rem}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description>*{font-weight:400;font-size:.875rem;line-height:1.25rem;list-style-type:none}@media (min-width: 0){.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description{display:block}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description>*{margin-bottom:.25rem}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description>*:last-child{margin-bottom:0}}@media (min-width: 768px){.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description>li{display:inline-flex;align-items:center;margin-bottom:0}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description>li:before{content:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ADB5BD' fill-rule='evenodd'><circle cx='12' cy='12' r='2'/></svg>\");height:1rem;width:1rem;margin:0 .25rem;flex-shrink:0}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description>li:first-child:before{content:none}}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-tag{line-height:0}@media (min-width: 0){.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-tag>*{margin:.5rem 0 0}}@media (min-width: 768px){.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-tag>*{margin:0 0 0 1rem}}\n"] }]
|
|
1556
|
+
}, template: "<div class=\"bao-list-item-header\">\n <ng-content select=\"baoIconItemType, [baoIconItemType]\"></ng-content>\n</div>\n<div class=\"bao-list-item-content\">\n <div class=\"bao-list-item-text\">\n <ng-content></ng-content>\n </div>\n <div class=\"bao-list-item-tag\">\n <ng-content\n select=\"bao-tag, [bao-tag], baoIconTag, [baoIconTag]\"\n ></ng-content>\n </div>\n</div>\n<div class=\"bao-list-item-actions\">\n <ng-content\n select=\"bao-button, [bao-button], bao-dropdown-menu, [bao-dropdown-menu]\"\n >\n </ng-content>\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%}}.bao-list{padding:0;margin:0}.bao-list>.bao-list-item:last-child{border-radius:.125rem;box-shadow:inset 0 .0625rem #ced4da,inset 0 -.0625rem #ced4da}.bao-list>a.bao-list-item{border-bottom:none}.bao-list>a.bao-list-item:focus{box-shadow:0 0 0 .1875rem #98bcde;background-color:#f8f9fa}.bao-list>a.bao-list-item:focus .bao-list-item-title{color:#097d6c}.bao-list>a.bao-list-item:hover{background-color:#f8f9fa}.bao-list>a.bao-list-item:hover .bao-list-item-text,.bao-list>a.bao-list-item:hover .bao-list-item-title{color:#097d6c}.bao-list .bao-list-item{display:flex;padding:1rem;background-color:#fff0;border-radius:.125rem .125rem 0rem 0rem;box-shadow:inset 0 .0625rem #ced4da}.bao-list .bao-list-item>.bao-list-item-header{align-self:flex-start;color:#adb2bd;line-height:0}.bao-list .bao-list-item>.bao-list-item-header .bao-icon{margin-right:1em}.bao-list .bao-list-item>.bao-list-item-content{display:flex;flex-grow:2}@media (min-width: 0){.bao-list .bao-list-item>.bao-list-item-content{flex-direction:column}}@media (min-width: 768px){.bao-list .bao-list-item>.bao-list-item-content{flex-direction:row;justify-content:space-between}}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text{display:flex;flex-direction:column;color:#212529;font-weight:700;font-size:1rem;line-height:1.5rem}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-title{font-weight:700;font-size:1rem;line-height:1.5rem}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>ul.bao-list-item-description{padding:0;margin:0}@media (min-width: 768px){.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>ul.bao-list-item-description{display:inline-flex;flex-wrap:wrap}}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description{color:#637381;margin-right:0 1rem}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description>*{font-weight:400;font-size:.875rem;line-height:1.25rem;list-style-type:none}@media (min-width: 0){.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description{display:block}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description>*{margin-bottom:.25rem}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description>*:last-child{margin-bottom:0}}@media (min-width: 768px){.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description>li{display:inline-flex;align-items:center;margin-bottom:0}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description>li:before{content:url(\"data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ADB5BD' fill-rule='evenodd'><circle cx='12' cy='12' r='2'/></svg>\");height:1rem;width:1rem;margin:0 .25rem;flex-shrink:0}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-text>.bao-list-item-description>li:first-child:before{content:none}}.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-tag{line-height:0}@media (min-width: 0){.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-tag>*{margin:.5rem 0 0}}@media (min-width: 768px){.bao-list .bao-list-item>.bao-list-item-content>.bao-list-item-tag>*{margin:0 0 0 1rem}}.bao-list .bao-list-item>.bao-list-item-actions .bao-button{margin-left:2rem;margin-top:-.5rem}\n"] }]
|
|
1544
1557
|
}] });
|
|
1545
1558
|
class BaoList {
|
|
1546
1559
|
}
|
|
@@ -1598,7 +1611,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
1598
1611
|
}] });
|
|
1599
1612
|
|
|
1600
1613
|
/*
|
|
1601
|
-
* Copyright (c)
|
|
1614
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
1602
1615
|
* Licensed under the MIT license.
|
|
1603
1616
|
* See LICENSE file in the project root for full license information.
|
|
1604
1617
|
*/
|
|
@@ -1632,13 +1645,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
1632
1645
|
}] });
|
|
1633
1646
|
|
|
1634
1647
|
/*
|
|
1635
|
-
* Copyright (c)
|
|
1648
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
1636
1649
|
* Licensed under the MIT license.
|
|
1637
1650
|
* See LICENSE file in the project root for full license information.
|
|
1638
1651
|
*/
|
|
1639
1652
|
|
|
1640
1653
|
/*
|
|
1641
|
-
* Copyright (c)
|
|
1654
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
1642
1655
|
* Licensed under the MIT license.
|
|
1643
1656
|
* See LICENSE file in the project root for full license information.
|
|
1644
1657
|
*/
|
|
@@ -2164,7 +2177,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2164
2177
|
}] });
|
|
2165
2178
|
|
|
2166
2179
|
/*
|
|
2167
|
-
* Copyright (c)
|
|
2180
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2168
2181
|
* Licensed under the MIT license.
|
|
2169
2182
|
* See LICENSE file in the project root for full license information.
|
|
2170
2183
|
*/
|
|
@@ -2209,13 +2222,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2209
2222
|
}] });
|
|
2210
2223
|
|
|
2211
2224
|
/*
|
|
2212
|
-
* Copyright (c)
|
|
2225
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2213
2226
|
* Licensed under the MIT license.
|
|
2214
2227
|
* See LICENSE file in the project root for full license information.
|
|
2215
2228
|
*/
|
|
2216
2229
|
|
|
2217
2230
|
/*
|
|
2218
|
-
* Copyright (c)
|
|
2231
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2219
2232
|
* Licensed under the MIT license.
|
|
2220
2233
|
* See LICENSE file in the project root for full license information.
|
|
2221
2234
|
*/
|
|
@@ -2288,7 +2301,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2288
2301
|
}] } });
|
|
2289
2302
|
|
|
2290
2303
|
/*
|
|
2291
|
-
* Copyright (c)
|
|
2304
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2292
2305
|
* Licensed under the MIT license.
|
|
2293
2306
|
* See LICENSE file in the project root for full license information.
|
|
2294
2307
|
*/
|
|
@@ -2308,13 +2321,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2308
2321
|
}] });
|
|
2309
2322
|
|
|
2310
2323
|
/*
|
|
2311
|
-
* Copyright (c)
|
|
2324
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2312
2325
|
* Licensed under the MIT license.
|
|
2313
2326
|
* See LICENSE file in the project root for full license information.
|
|
2314
2327
|
*/
|
|
2315
2328
|
|
|
2316
2329
|
/*
|
|
2317
|
-
* Copyright (c)
|
|
2330
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2318
2331
|
* Licensed under the MIT license.
|
|
2319
2332
|
* See LICENSE file in the project root for full license information.
|
|
2320
2333
|
*/
|
|
@@ -2405,7 +2418,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2405
2418
|
}] });
|
|
2406
2419
|
|
|
2407
2420
|
/*
|
|
2408
|
-
* Copyright (c)
|
|
2421
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2409
2422
|
* Licensed under the MIT license.
|
|
2410
2423
|
* See LICENSE file in the project root for full license information.
|
|
2411
2424
|
*/
|
|
@@ -2433,7 +2446,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2433
2446
|
}] });
|
|
2434
2447
|
|
|
2435
2448
|
/*
|
|
2436
|
-
* Copyright (c)
|
|
2449
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2437
2450
|
* Licensed under the MIT license.
|
|
2438
2451
|
* See LICENSE file in the project root for full license information.
|
|
2439
2452
|
*/
|
|
@@ -2464,13 +2477,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2464
2477
|
}] });
|
|
2465
2478
|
|
|
2466
2479
|
/*
|
|
2467
|
-
* Copyright (c)
|
|
2480
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2468
2481
|
* Licensed under the MIT license.
|
|
2469
2482
|
* See LICENSE file in the project root for full license information.
|
|
2470
2483
|
*/
|
|
2471
2484
|
|
|
2472
2485
|
/*
|
|
2473
|
-
* Copyright (c)
|
|
2486
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2474
2487
|
* Licensed under the MIT license.
|
|
2475
2488
|
* See LICENSE file in the project root for full license information.
|
|
2476
2489
|
*/
|
|
@@ -2570,7 +2583,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2570
2583
|
}] } });
|
|
2571
2584
|
|
|
2572
2585
|
/*
|
|
2573
|
-
* Copyright (c)
|
|
2586
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2574
2587
|
* Licensed under the MIT license.
|
|
2575
2588
|
* See LICENSE file in the project root for full license information.
|
|
2576
2589
|
*/
|
|
@@ -2590,13 +2603,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2590
2603
|
}] });
|
|
2591
2604
|
|
|
2592
2605
|
/*
|
|
2593
|
-
* Copyright (c)
|
|
2606
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2594
2607
|
* Licensed under the MIT license.
|
|
2595
2608
|
* See LICENSE file in the project root for full license information.
|
|
2596
2609
|
*/
|
|
2597
2610
|
|
|
2598
2611
|
/*
|
|
2599
|
-
* Copyright (c)
|
|
2612
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2600
2613
|
* Licensed under the MIT license.
|
|
2601
2614
|
* See LICENSE file in the project root for full license information.
|
|
2602
2615
|
*/
|
|
@@ -2889,7 +2902,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2889
2902
|
}] } });
|
|
2890
2903
|
|
|
2891
2904
|
/*
|
|
2892
|
-
* Copyright (c)
|
|
2905
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2893
2906
|
* Licensed under the MIT license.
|
|
2894
2907
|
* See LICENSE file in the project root for full license information.
|
|
2895
2908
|
*/
|
|
@@ -2920,13 +2933,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2920
2933
|
}] });
|
|
2921
2934
|
|
|
2922
2935
|
/*
|
|
2923
|
-
* Copyright (c)
|
|
2936
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2924
2937
|
* Licensed under the MIT license.
|
|
2925
2938
|
* See LICENSE file in the project root for full license information.
|
|
2926
2939
|
*/
|
|
2927
2940
|
|
|
2928
2941
|
/*
|
|
2929
|
-
* Copyright (c)
|
|
2942
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2930
2943
|
* Licensed under the MIT license.
|
|
2931
2944
|
* See LICENSE file in the project root for full license information.
|
|
2932
2945
|
*/
|
|
@@ -3207,7 +3220,7 @@ class BaoModalContainer extends _BaoModalContainerBase {
|
|
|
3207
3220
|
}
|
|
3208
3221
|
}
|
|
3209
3222
|
BaoModalContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModalContainer, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3210
|
-
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}}@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;
|
|
3223
|
+
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 });
|
|
3211
3224
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModalContainer, decorators: [{
|
|
3212
3225
|
type: Component,
|
|
3213
3226
|
args: [{ selector: 'bao-modal-container', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, host: {
|
|
@@ -3219,18 +3232,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
3219
3232
|
'[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledBy',
|
|
3220
3233
|
'[attr.aria-label]': '_config.ariaLabel',
|
|
3221
3234
|
'[attr.aria-describedby]': '_config.ariaDescribedBy || null'
|
|
3222
|
-
}, 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;
|
|
3235
|
+
}, 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"] }]
|
|
3223
3236
|
}] });
|
|
3224
3237
|
|
|
3225
3238
|
// Counter for unique modal ids.
|
|
3226
|
-
let uniqueId = 0;
|
|
3239
|
+
let uniqueId$1 = 0;
|
|
3227
3240
|
/**
|
|
3228
3241
|
* Reference to a modal opened via the BaoModalService.
|
|
3229
3242
|
*/
|
|
3230
3243
|
class BaoModalRef {
|
|
3231
3244
|
constructor(_overlayRef, _containerInstance,
|
|
3232
3245
|
/** Id of the modal. */
|
|
3233
|
-
id = `bao-modal-${uniqueId++}`) {
|
|
3246
|
+
id = `bao-modal-${uniqueId$1++}`) {
|
|
3234
3247
|
this._overlayRef = _overlayRef;
|
|
3235
3248
|
this._containerInstance = _containerInstance;
|
|
3236
3249
|
this.id = id;
|
|
@@ -3419,7 +3432,7 @@ function _closeModalVia(ref, interactionType, result) {
|
|
|
3419
3432
|
}
|
|
3420
3433
|
|
|
3421
3434
|
/*
|
|
3422
|
-
* Copyright (c)
|
|
3435
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
3423
3436
|
* Licensed under the MIT license.
|
|
3424
3437
|
* See LICENSE file in the project root for full license information.
|
|
3425
3438
|
*/
|
|
@@ -3681,7 +3694,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
3681
3694
|
}] }, { type: i1$4.OverlayContainer }]; } });
|
|
3682
3695
|
|
|
3683
3696
|
/*
|
|
3684
|
-
* Copyright (c)
|
|
3697
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
3685
3698
|
* Licensed under the MIT license.
|
|
3686
3699
|
* See LICENSE file in the project root for full license information.
|
|
3687
3700
|
*/
|
|
@@ -3760,7 +3773,7 @@ function getClosestDialog(element, openDialogs) {
|
|
|
3760
3773
|
}
|
|
3761
3774
|
|
|
3762
3775
|
/*
|
|
3763
|
-
* Copyright (c)
|
|
3776
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
3764
3777
|
* Licensed under the MIT license.
|
|
3765
3778
|
* See LICENSE file in the project root for full license information.
|
|
3766
3779
|
*/
|
|
@@ -3781,7 +3794,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
3781
3794
|
}] });
|
|
3782
3795
|
|
|
3783
3796
|
/*
|
|
3784
|
-
* Copyright (c)
|
|
3797
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
3785
3798
|
* Licensed under the MIT license.
|
|
3786
3799
|
* See LICENSE file in the project root for full license information.
|
|
3787
3800
|
*/
|
|
@@ -3854,7 +3867,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
3854
3867
|
}] } });
|
|
3855
3868
|
|
|
3856
3869
|
/*
|
|
3857
|
-
* Copyright (c)
|
|
3870
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
3858
3871
|
* Licensed under the MIT license.
|
|
3859
3872
|
* See LICENSE file in the project root for full license information.
|
|
3860
3873
|
*/
|
|
@@ -3874,13 +3887,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
3874
3887
|
}] });
|
|
3875
3888
|
|
|
3876
3889
|
/*
|
|
3877
|
-
* Copyright (c)
|
|
3890
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
3878
3891
|
* Licensed under the MIT license.
|
|
3879
3892
|
* See LICENSE file in the project root for full license information.
|
|
3880
3893
|
*/
|
|
3881
3894
|
|
|
3882
3895
|
/*
|
|
3883
|
-
* Copyright (c)
|
|
3896
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
3884
3897
|
* Licensed under the MIT license.
|
|
3885
3898
|
* See LICENSE file in the project root for full license information.
|
|
3886
3899
|
*/
|
|
@@ -3897,6 +3910,10 @@ class BaoDropdownMenuItem {
|
|
|
3897
3910
|
* Is the list item disabled
|
|
3898
3911
|
*/
|
|
3899
3912
|
this.disabled = false;
|
|
3913
|
+
/**
|
|
3914
|
+
* Emits when menu item is clicked
|
|
3915
|
+
*/
|
|
3916
|
+
this.itemClicked = new EventEmitter();
|
|
3900
3917
|
}
|
|
3901
3918
|
get nativeElement() {
|
|
3902
3919
|
return this.elementRef.nativeElement;
|
|
@@ -3977,19 +3994,25 @@ class BaoDropdownMenuItem {
|
|
|
3977
3994
|
}
|
|
3978
3995
|
}
|
|
3979
3996
|
/**
|
|
3980
|
-
* This method propagates a click event to menu item children with inputs (checkbox, radio button)
|
|
3997
|
+
* This method propagates a click event to menu item children with inputs (checkbox, radio button).
|
|
3998
|
+
* It emits event to close menu if item does not contain an input.
|
|
3981
3999
|
*/
|
|
3982
4000
|
propagateClick() {
|
|
4001
|
+
let closeMenu = true;
|
|
3983
4002
|
for (let i = 0; i < this.nativeElement.children.length; i++) {
|
|
3984
4003
|
if (this.nativeElement.children.item(i).firstElementChild.localName ==
|
|
3985
4004
|
'input') {
|
|
3986
4005
|
this.nativeElement.children.item(i).firstElementChild.click();
|
|
4006
|
+
closeMenu = false;
|
|
3987
4007
|
}
|
|
3988
4008
|
}
|
|
4009
|
+
if (closeMenu) {
|
|
4010
|
+
this.itemClicked.emit();
|
|
4011
|
+
}
|
|
3989
4012
|
}
|
|
3990
4013
|
}
|
|
3991
4014
|
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 });
|
|
3992
|
-
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:
|
|
4015
|
+
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 });
|
|
3993
4016
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoDropdownMenuItem, decorators: [{
|
|
3994
4017
|
type: Directive,
|
|
3995
4018
|
args: [{
|
|
@@ -4001,6 +4024,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
4001
4024
|
}]
|
|
4002
4025
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: BaoDropdownMenuComponent }]; }, propDecorators: { disabled: [{
|
|
4003
4026
|
type: Input
|
|
4027
|
+
}], itemClicked: [{
|
|
4028
|
+
type: Output
|
|
4004
4029
|
}], spaceKeyEvent: [{
|
|
4005
4030
|
type: HostListener,
|
|
4006
4031
|
args: ['window:keyup.space']
|
|
@@ -4009,7 +4034,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
4009
4034
|
args: ['click', ['$event.target']]
|
|
4010
4035
|
}], enterKeyEvent: [{
|
|
4011
4036
|
type: HostListener,
|
|
4012
|
-
args: ['window:
|
|
4037
|
+
args: ['window:keyup.enter']
|
|
4013
4038
|
}] } });
|
|
4014
4039
|
class BaoDropdownMenuComponent {
|
|
4015
4040
|
constructor(cdr, renderer, elementRef) {
|
|
@@ -4055,16 +4080,20 @@ class BaoDropdownMenuComponent {
|
|
|
4055
4080
|
}
|
|
4056
4081
|
upKeyEvent() {
|
|
4057
4082
|
if (this.isOpen) {
|
|
4058
|
-
const index = isNaN(this._activeItemIndex) ?
|
|
4083
|
+
const index = isNaN(this._activeItemIndex) ? -1 : this._activeItemIndex;
|
|
4059
4084
|
const nextIndex = this.getNextActivableItemIndex(index, false);
|
|
4060
|
-
|
|
4085
|
+
if (nextIndex > -1) {
|
|
4086
|
+
this.focusNextItem(nextIndex);
|
|
4087
|
+
}
|
|
4061
4088
|
}
|
|
4062
4089
|
}
|
|
4063
4090
|
downKeyEvent() {
|
|
4064
4091
|
if (this.isOpen) {
|
|
4065
|
-
const index = isNaN(this._activeItemIndex) ?
|
|
4092
|
+
const index = isNaN(this._activeItemIndex) ? -1 : this._activeItemIndex;
|
|
4066
4093
|
const nextIndex = this.getNextActivableItemIndex(index, true);
|
|
4067
|
-
|
|
4094
|
+
if (nextIndex > -1) {
|
|
4095
|
+
this.focusNextItem(nextIndex);
|
|
4096
|
+
}
|
|
4068
4097
|
}
|
|
4069
4098
|
}
|
|
4070
4099
|
/** Prevents focus to be lost when TAB has reached end of menu */
|
|
@@ -4075,6 +4104,16 @@ class BaoDropdownMenuComponent {
|
|
|
4075
4104
|
}
|
|
4076
4105
|
}
|
|
4077
4106
|
}
|
|
4107
|
+
tabUpKeyEvent() {
|
|
4108
|
+
if (this.isOpen) {
|
|
4109
|
+
this._activeItemIndex = this._listItems.reduce((acc, element, index) => {
|
|
4110
|
+
if (element.nativeElement === document.activeElement) {
|
|
4111
|
+
acc = index;
|
|
4112
|
+
}
|
|
4113
|
+
return acc;
|
|
4114
|
+
}, -1);
|
|
4115
|
+
}
|
|
4116
|
+
}
|
|
4078
4117
|
/** Prevents focus to be lost when SHIFT + TAB has reached beginning of menu */
|
|
4079
4118
|
shiftTabKeyEvent() {
|
|
4080
4119
|
if (this.isOpen) {
|
|
@@ -4087,9 +4126,8 @@ class BaoDropdownMenuComponent {
|
|
|
4087
4126
|
this.renderer.setAttribute(this.nativeElement, 'id', this.menuId);
|
|
4088
4127
|
this._menuPortal = new DomPortal(this._menuContent);
|
|
4089
4128
|
}
|
|
4090
|
-
|
|
4091
|
-
this.
|
|
4092
|
-
this._listItems.first.nativeElement.focus();
|
|
4129
|
+
ngAfterContentInit() {
|
|
4130
|
+
this._listItems.forEach((item) => item.itemClicked.subscribe(() => this.isClosedByKeyEvent.emit()));
|
|
4093
4131
|
}
|
|
4094
4132
|
open() {
|
|
4095
4133
|
this.isOpen = true;
|
|
@@ -4097,6 +4135,10 @@ class BaoDropdownMenuComponent {
|
|
|
4097
4135
|
close() {
|
|
4098
4136
|
this.isOpen = false;
|
|
4099
4137
|
}
|
|
4138
|
+
focus() {
|
|
4139
|
+
this._activeItemIndex = -1;
|
|
4140
|
+
this._menuContent.nativeElement.focus();
|
|
4141
|
+
}
|
|
4100
4142
|
/** Move the aria-current attribute to new active page */
|
|
4101
4143
|
setNavigationAttribute(activePageElement) {
|
|
4102
4144
|
const previousActivePage = this._listItems.find((item) => {
|
|
@@ -4120,40 +4162,55 @@ class BaoDropdownMenuComponent {
|
|
|
4120
4162
|
* @param isBackward If recursive function is going backward looking for last activable item in list
|
|
4121
4163
|
* @returns Index of the next item that will receive focus
|
|
4122
4164
|
*/
|
|
4123
|
-
getNextActivableItemIndex(currentIndex, isDown
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4165
|
+
getNextActivableItemIndex(currentIndex, isDown) {
|
|
4166
|
+
const init = [];
|
|
4167
|
+
// Get all the activable indexes
|
|
4168
|
+
const activableIndexes = this._listItems.reduce((acc, element, index) => {
|
|
4169
|
+
if (!element.disabled) {
|
|
4170
|
+
acc = [...acc, index];
|
|
4127
4171
|
}
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4172
|
+
return acc;
|
|
4173
|
+
}, init);
|
|
4174
|
+
if (activableIndexes.length) {
|
|
4175
|
+
if (isDown) {
|
|
4176
|
+
// Select the first enabled element
|
|
4177
|
+
if (currentIndex === -1) {
|
|
4178
|
+
return activableIndexes[0];
|
|
4179
|
+
}
|
|
4180
|
+
// Select the only enabled element
|
|
4181
|
+
if (activableIndexes.length === 1) {
|
|
4182
|
+
return activableIndexes[0];
|
|
4183
|
+
}
|
|
4184
|
+
// Stay on the last enabled element
|
|
4185
|
+
if (currentIndex === activableIndexes[activableIndexes.length - 1]) {
|
|
4186
|
+
return currentIndex;
|
|
4187
|
+
}
|
|
4188
|
+
// Select the next enabled element
|
|
4189
|
+
return activableIndexes.find(index => index > currentIndex);
|
|
4133
4190
|
}
|
|
4134
|
-
|
|
4135
|
-
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4191
|
+
const isUp = !isDown;
|
|
4192
|
+
if (isUp) {
|
|
4193
|
+
// Do nothing whenever nothing is selected
|
|
4194
|
+
if (currentIndex === -1) {
|
|
4195
|
+
return currentIndex;
|
|
4196
|
+
}
|
|
4197
|
+
// Select the only enabled element
|
|
4198
|
+
if (activableIndexes.length === 1) {
|
|
4199
|
+
return activableIndexes[0];
|
|
4200
|
+
}
|
|
4201
|
+
// Stay on the first enabled element
|
|
4202
|
+
if (currentIndex === activableIndexes[0]) {
|
|
4203
|
+
return currentIndex;
|
|
4204
|
+
}
|
|
4205
|
+
// Select the above enabled element
|
|
4206
|
+
return activableIndexes.reverse().find(index => index < currentIndex);
|
|
4139
4207
|
}
|
|
4140
|
-
return
|
|
4208
|
+
return -1;
|
|
4141
4209
|
}
|
|
4142
|
-
return nextIndex;
|
|
4143
|
-
}
|
|
4144
|
-
/**
|
|
4145
|
-
* Finds if focus has reached end or beginning of list
|
|
4146
|
-
* @param currentIndex List item index which currently has focus
|
|
4147
|
-
* @param isDown Whether the navigation is going in the down direction or not
|
|
4148
|
-
* @returns Can focus move to next item or not
|
|
4149
|
-
*/
|
|
4150
|
-
canMove(currentIndex, isDown) {
|
|
4151
|
-
return !((currentIndex == 0 && !isDown) ||
|
|
4152
|
-
(currentIndex == this._listItems.length - 1 && isDown));
|
|
4153
4210
|
}
|
|
4154
4211
|
}
|
|
4155
4212
|
BaoDropdownMenuComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoDropdownMenuComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i0.Renderer2 }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
4156
|
-
BaoDropdownMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoDropdownMenuComponent, selector: "bao-dropdown-menu", outputs: { isOpenChange: "isOpenChange", isClosedByKeyEvent: "isClosedByKeyEvent" }, host: { listeners: { "window:keyup.arrowup": "upKeyEvent()", "window:keyup.arrowdown": "downKeyEvent()", "window:keydown.tab": "tabKeyEvent()", "window:keydown.shift.tab": "shiftTabKeyEvent()" }, properties: { "class.bao-overlay-transparent-backdrop": "isOpen===false", "class.bao-dropdown-menu-closed": "isOpen===false", "attr.aria-expanded": "isOpen" }, classAttribute: "bao-dropdown-menu-container" }, queries: [{ propertyName: "_listItems", predicate: BaoDropdownMenuItem, descendants: true }], viewQueries: [{ propertyName: "_menuContent", first: true, predicate: ["menuContent"], descendants: true }], ngImport: i0, template: "<div #menuContent class=\"bao-dropdown-menu\" tabindex=\"-1\">\n <ng-content></ng-content>\n</div>\n", styles: [".bao-dropdown-menu-container.bao-dropdown-menu-closed{display:none}.bao-dropdown-menu{min-width:16rem;max-width:32rem;overflow-y:auto;background:#ffffff;box-shadow:0 .5rem 2rem #0000001a;border-radius:.25rem;padding-top:.5rem;padding-bottom:.5rem}.bao-dropdown-menu .bao-overlay-transparent-backdrop{background-color:#fff0;display:none}.bao-dropdown-menu ul{list-style-type:none;padding:0;margin:0}.bao-dropdown-menu h5{padding:.5rem 0 .5rem 1rem;margin:0}.bao-dropdown-menu .bao-dropdown-menu-item{display:flex;align-items:center;text-decoration:none;border-bottom:none;cursor:default}.bao-dropdown-menu .bao-dropdown-menu-item:hover{background-color:#f8f9fa}.bao-dropdown-menu .bao-dropdown-menu-item:active{background-color:#eefaf8}.bao-dropdown-menu .bao-dropdown-menu-item:focus{box-shadow:inset 0 0 0 .25rem #98bcde}.bao-dropdown-menu .bao-dropdown-menu-item.active-link{background-color:#eefaf8}.bao-dropdown-menu .bao-dropdown-menu-item.has-element-right{padding-right:1.5rem}.bao-dropdown-menu .bao-dropdown-menu-item.has-element-left{padding-left:1rem}.bao-dropdown-menu .bao-dropdown-menu-item.bao-dropdown-menu-item-disabled{cursor:not-allowed;pointer-events:none}.bao-dropdown-menu .bao-dropdown-menu-item.bao-dropdown-menu-item-disabled:hover,.bao-dropdown-menu .bao-dropdown-menu-item.bao-dropdown-menu-item-disabled:active{background:#ffffff}.bao-dropdown-menu .bao-dropdown-menu-item.bao-dropdown-menu-item-disabled .bao-dropdown-menu-item-content .bao-dropdown-menu-item-label,.bao-dropdown-menu .bao-dropdown-menu-item.bao-dropdown-menu-item-disabled .bao-dropdown-menu-item-content .bao-dropdown-menu-item-description{color:#adb2bd}.bao-dropdown-menu .bao-dropdown-menu-item>.bao-dropdown-menu-item-content{display:flex;flex-direction:column;margin:.5rem 1rem;background-color:inherit}.bao-dropdown-menu .bao-dropdown-menu-item>.bao-dropdown-menu-item-content .bao-dropdown-menu-item-label{font-weight:400;font-size:1rem;line-height:1.5rem;color:#212529}.bao-dropdown-menu .bao-dropdown-menu-item>.bao-dropdown-menu-item-content .bao-dropdown-menu-item-description{font-weight:400;font-size:.875rem;line-height:1.25rem;color:#637381}.bao-dropdown-menu .bao-dropdown-menu-item>.bao-icon{color:#adb2bd;flex-shrink:0}.bao-dropdown-menu .bao-dropdown-menu-divider hr{margin-top:.5rem;margin-bottom:.5rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
4213
|
+
BaoDropdownMenuComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.1", type: BaoDropdownMenuComponent, selector: "bao-dropdown-menu", outputs: { isOpenChange: "isOpenChange", isClosedByKeyEvent: "isClosedByKeyEvent" }, host: { listeners: { "window:keyup.arrowup": "upKeyEvent()", "window:keyup.arrowdown": "downKeyEvent()", "window:keydown.tab": "tabKeyEvent()", "window:keyup.tab": "tabUpKeyEvent()", "window:keydown.shift.tab": "shiftTabKeyEvent()" }, properties: { "class.bao-overlay-transparent-backdrop": "isOpen===false", "class.bao-dropdown-menu-closed": "isOpen===false", "attr.aria-expanded": "isOpen" }, classAttribute: "bao-dropdown-menu-container" }, queries: [{ propertyName: "_listItems", predicate: BaoDropdownMenuItem, descendants: true }], viewQueries: [{ propertyName: "_menuContent", first: true, predicate: ["menuContent"], descendants: true }], ngImport: i0, template: "<div #menuContent class=\"bao-dropdown-menu\" tabindex=\"-1\">\n <ng-content></ng-content>\n</div>\n", styles: [".bao-dropdown-menu-container.bao-dropdown-menu-closed{display:none}.bao-dropdown-menu{min-width:16rem;max-width:32rem;overflow-y:auto;background:#ffffff;box-shadow:0 .5rem 2rem #0000001a;border-radius:.25rem;margin-top:.25rem;margin-bottom:.25rem;padding-top:.5rem;padding-bottom:.5rem}.bao-dropdown-menu:focus-visible{outline:none}.bao-dropdown-menu .bao-overlay-transparent-backdrop{background-color:#fff0;display:none}.bao-dropdown-menu ul{list-style-type:none;padding:0;margin:0}.bao-dropdown-menu h5{padding:.5rem 0 .5rem 1rem;margin:0}.bao-dropdown-menu .bao-dropdown-menu-item{display:flex;align-items:center;text-decoration:none;border-bottom:none;cursor:default}.bao-dropdown-menu .bao-dropdown-menu-item:hover{background-color:#f8f9fa}.bao-dropdown-menu .bao-dropdown-menu-item:active{background-color:#eefaf8}.bao-dropdown-menu .bao-dropdown-menu-item:focus{box-shadow:inset 0 0 0 .25rem #98bcde}.bao-dropdown-menu .bao-dropdown-menu-item.active-link{background-color:#eefaf8}.bao-dropdown-menu .bao-dropdown-menu-item.has-element-right{padding-right:1.5rem}.bao-dropdown-menu .bao-dropdown-menu-item.has-element-left{padding-left:1rem}.bao-dropdown-menu .bao-dropdown-menu-item.bao-dropdown-menu-item-disabled{cursor:not-allowed;pointer-events:none}.bao-dropdown-menu .bao-dropdown-menu-item.bao-dropdown-menu-item-disabled:hover,.bao-dropdown-menu .bao-dropdown-menu-item.bao-dropdown-menu-item-disabled:active{background:#ffffff}.bao-dropdown-menu .bao-dropdown-menu-item.bao-dropdown-menu-item-disabled .bao-dropdown-menu-item-content .bao-dropdown-menu-item-label,.bao-dropdown-menu .bao-dropdown-menu-item.bao-dropdown-menu-item-disabled .bao-dropdown-menu-item-content .bao-dropdown-menu-item-description{color:#adb2bd}.bao-dropdown-menu .bao-dropdown-menu-item>.bao-dropdown-menu-item-content{display:flex;flex-direction:column;margin:.5rem 1rem;background-color:inherit}.bao-dropdown-menu .bao-dropdown-menu-item>.bao-dropdown-menu-item-content .bao-dropdown-menu-item-label{font-weight:400;font-size:1rem;line-height:1.5rem;color:#212529}.bao-dropdown-menu .bao-dropdown-menu-item>.bao-dropdown-menu-item-content .bao-dropdown-menu-item-description{font-weight:400;font-size:.875rem;line-height:1.25rem;color:#637381}.bao-dropdown-menu .bao-dropdown-menu-item>.bao-icon{color:#adb2bd;flex-shrink:0}.bao-dropdown-menu .bao-dropdown-menu-divider hr{margin-top:.5rem;margin-bottom:.5rem}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None });
|
|
4157
4214
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoDropdownMenuComponent, decorators: [{
|
|
4158
4215
|
type: Component,
|
|
4159
4216
|
args: [{ selector: 'bao-dropdown-menu', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
@@ -4161,7 +4218,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
4161
4218
|
'[class.bao-overlay-transparent-backdrop]': 'isOpen===false',
|
|
4162
4219
|
'[class.bao-dropdown-menu-closed]': 'isOpen===false',
|
|
4163
4220
|
'[attr.aria-expanded]': 'isOpen'
|
|
4164
|
-
}, template: "<div #menuContent class=\"bao-dropdown-menu\" tabindex=\"-1\">\n <ng-content></ng-content>\n</div>\n", styles: [".bao-dropdown-menu-container.bao-dropdown-menu-closed{display:none}.bao-dropdown-menu{min-width:16rem;max-width:32rem;overflow-y:auto;background:#ffffff;box-shadow:0 .5rem 2rem #0000001a;border-radius:.25rem;padding-top:.5rem;padding-bottom:.5rem}.bao-dropdown-menu .bao-overlay-transparent-backdrop{background-color:#fff0;display:none}.bao-dropdown-menu ul{list-style-type:none;padding:0;margin:0}.bao-dropdown-menu h5{padding:.5rem 0 .5rem 1rem;margin:0}.bao-dropdown-menu .bao-dropdown-menu-item{display:flex;align-items:center;text-decoration:none;border-bottom:none;cursor:default}.bao-dropdown-menu .bao-dropdown-menu-item:hover{background-color:#f8f9fa}.bao-dropdown-menu .bao-dropdown-menu-item:active{background-color:#eefaf8}.bao-dropdown-menu .bao-dropdown-menu-item:focus{box-shadow:inset 0 0 0 .25rem #98bcde}.bao-dropdown-menu .bao-dropdown-menu-item.active-link{background-color:#eefaf8}.bao-dropdown-menu .bao-dropdown-menu-item.has-element-right{padding-right:1.5rem}.bao-dropdown-menu .bao-dropdown-menu-item.has-element-left{padding-left:1rem}.bao-dropdown-menu .bao-dropdown-menu-item.bao-dropdown-menu-item-disabled{cursor:not-allowed;pointer-events:none}.bao-dropdown-menu .bao-dropdown-menu-item.bao-dropdown-menu-item-disabled:hover,.bao-dropdown-menu .bao-dropdown-menu-item.bao-dropdown-menu-item-disabled:active{background:#ffffff}.bao-dropdown-menu .bao-dropdown-menu-item.bao-dropdown-menu-item-disabled .bao-dropdown-menu-item-content .bao-dropdown-menu-item-label,.bao-dropdown-menu .bao-dropdown-menu-item.bao-dropdown-menu-item-disabled .bao-dropdown-menu-item-content .bao-dropdown-menu-item-description{color:#adb2bd}.bao-dropdown-menu .bao-dropdown-menu-item>.bao-dropdown-menu-item-content{display:flex;flex-direction:column;margin:.5rem 1rem;background-color:inherit}.bao-dropdown-menu .bao-dropdown-menu-item>.bao-dropdown-menu-item-content .bao-dropdown-menu-item-label{font-weight:400;font-size:1rem;line-height:1.5rem;color:#212529}.bao-dropdown-menu .bao-dropdown-menu-item>.bao-dropdown-menu-item-content .bao-dropdown-menu-item-description{font-weight:400;font-size:.875rem;line-height:1.25rem;color:#637381}.bao-dropdown-menu .bao-dropdown-menu-item>.bao-icon{color:#adb2bd;flex-shrink:0}.bao-dropdown-menu .bao-dropdown-menu-divider hr{margin-top:.5rem;margin-bottom:.5rem}\n"] }]
|
|
4221
|
+
}, template: "<div #menuContent class=\"bao-dropdown-menu\" tabindex=\"-1\">\n <ng-content></ng-content>\n</div>\n", styles: [".bao-dropdown-menu-container.bao-dropdown-menu-closed{display:none}.bao-dropdown-menu{min-width:16rem;max-width:32rem;overflow-y:auto;background:#ffffff;box-shadow:0 .5rem 2rem #0000001a;border-radius:.25rem;margin-top:.25rem;margin-bottom:.25rem;padding-top:.5rem;padding-bottom:.5rem}.bao-dropdown-menu:focus-visible{outline:none}.bao-dropdown-menu .bao-overlay-transparent-backdrop{background-color:#fff0;display:none}.bao-dropdown-menu ul{list-style-type:none;padding:0;margin:0}.bao-dropdown-menu h5{padding:.5rem 0 .5rem 1rem;margin:0}.bao-dropdown-menu .bao-dropdown-menu-item{display:flex;align-items:center;text-decoration:none;border-bottom:none;cursor:default}.bao-dropdown-menu .bao-dropdown-menu-item:hover{background-color:#f8f9fa}.bao-dropdown-menu .bao-dropdown-menu-item:active{background-color:#eefaf8}.bao-dropdown-menu .bao-dropdown-menu-item:focus{box-shadow:inset 0 0 0 .25rem #98bcde}.bao-dropdown-menu .bao-dropdown-menu-item.active-link{background-color:#eefaf8}.bao-dropdown-menu .bao-dropdown-menu-item.has-element-right{padding-right:1.5rem}.bao-dropdown-menu .bao-dropdown-menu-item.has-element-left{padding-left:1rem}.bao-dropdown-menu .bao-dropdown-menu-item.bao-dropdown-menu-item-disabled{cursor:not-allowed;pointer-events:none}.bao-dropdown-menu .bao-dropdown-menu-item.bao-dropdown-menu-item-disabled:hover,.bao-dropdown-menu .bao-dropdown-menu-item.bao-dropdown-menu-item-disabled:active{background:#ffffff}.bao-dropdown-menu .bao-dropdown-menu-item.bao-dropdown-menu-item-disabled .bao-dropdown-menu-item-content .bao-dropdown-menu-item-label,.bao-dropdown-menu .bao-dropdown-menu-item.bao-dropdown-menu-item-disabled .bao-dropdown-menu-item-content .bao-dropdown-menu-item-description{color:#adb2bd}.bao-dropdown-menu .bao-dropdown-menu-item>.bao-dropdown-menu-item-content{display:flex;flex-direction:column;margin:.5rem 1rem;background-color:inherit}.bao-dropdown-menu .bao-dropdown-menu-item>.bao-dropdown-menu-item-content .bao-dropdown-menu-item-label{font-weight:400;font-size:1rem;line-height:1.5rem;color:#212529}.bao-dropdown-menu .bao-dropdown-menu-item>.bao-dropdown-menu-item-content .bao-dropdown-menu-item-description{font-weight:400;font-size:.875rem;line-height:1.25rem;color:#637381}.bao-dropdown-menu .bao-dropdown-menu-item>.bao-icon{color:#adb2bd;flex-shrink:0}.bao-dropdown-menu .bao-dropdown-menu-divider hr{margin-top:.5rem;margin-bottom:.5rem}\n"] }]
|
|
4165
4222
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { isOpenChange: [{
|
|
4166
4223
|
type: Output
|
|
4167
4224
|
}], isClosedByKeyEvent: [{
|
|
@@ -4181,6 +4238,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
4181
4238
|
}], tabKeyEvent: [{
|
|
4182
4239
|
type: HostListener,
|
|
4183
4240
|
args: ['window:keydown.tab']
|
|
4241
|
+
}], tabUpKeyEvent: [{
|
|
4242
|
+
type: HostListener,
|
|
4243
|
+
args: ['window:keyup.tab']
|
|
4184
4244
|
}], shiftTabKeyEvent: [{
|
|
4185
4245
|
type: HostListener,
|
|
4186
4246
|
args: ['window:keydown.shift.tab']
|
|
@@ -4205,13 +4265,6 @@ class BaoDropdownMenuTrigger {
|
|
|
4205
4265
|
this.nativeElement.focus();
|
|
4206
4266
|
}
|
|
4207
4267
|
}
|
|
4208
|
-
/** Enter key event triggers click event which opens menu,
|
|
4209
|
-
* then focus is put on first item in the menu */
|
|
4210
|
-
enterKeyEvent() {
|
|
4211
|
-
if (this._isMenuOpen && document.activeElement === this.nativeElement) {
|
|
4212
|
-
this.menu.focusFirstItem();
|
|
4213
|
-
}
|
|
4214
|
-
}
|
|
4215
4268
|
onClick() {
|
|
4216
4269
|
this.toggleMenu();
|
|
4217
4270
|
}
|
|
@@ -4220,7 +4273,7 @@ class BaoDropdownMenuTrigger {
|
|
|
4220
4273
|
this.renderer.setAttribute(this.nativeElement, 'aria-controls', `bao-dropdown-menu-${dropdownMenuUniqueId}`);
|
|
4221
4274
|
this.menu.isClosedByKeyEvent.subscribe(() => {
|
|
4222
4275
|
this.closeMenu();
|
|
4223
|
-
this.nativeElement.focus();
|
|
4276
|
+
setTimeout(() => this.nativeElement.focus(), 50);
|
|
4224
4277
|
});
|
|
4225
4278
|
}
|
|
4226
4279
|
ngOnDestroy() {
|
|
@@ -4246,6 +4299,7 @@ class BaoDropdownMenuTrigger {
|
|
|
4246
4299
|
overlayRef.attach(this.menu.menuPortal);
|
|
4247
4300
|
this._isMenuOpen = true;
|
|
4248
4301
|
this.menu.open();
|
|
4302
|
+
this.menu.focus();
|
|
4249
4303
|
}
|
|
4250
4304
|
createOverlay() {
|
|
4251
4305
|
if (!this._overlayRef) {
|
|
@@ -4280,11 +4334,18 @@ class BaoDropdownMenuTrigger {
|
|
|
4280
4334
|
overlayY: 'bottom'
|
|
4281
4335
|
},
|
|
4282
4336
|
{
|
|
4283
|
-
// top-right of the overlay is connected to bottom-
|
|
4284
|
-
originX: '
|
|
4337
|
+
// top-right of the overlay is connected to bottom-right of the origin;
|
|
4338
|
+
originX: 'end',
|
|
4285
4339
|
originY: 'bottom',
|
|
4286
4340
|
overlayX: 'end',
|
|
4287
4341
|
overlayY: 'top'
|
|
4342
|
+
},
|
|
4343
|
+
{
|
|
4344
|
+
// bottom-right of the overlay is connected to top-right of the origin;
|
|
4345
|
+
originX: 'end',
|
|
4346
|
+
originY: 'top',
|
|
4347
|
+
overlayX: 'end',
|
|
4348
|
+
overlayY: 'bottom'
|
|
4288
4349
|
}
|
|
4289
4350
|
]),
|
|
4290
4351
|
backdropClass: 'bao-overlay-transparent-backdrop',
|
|
@@ -4294,7 +4355,7 @@ class BaoDropdownMenuTrigger {
|
|
|
4294
4355
|
}
|
|
4295
4356
|
}
|
|
4296
4357
|
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 });
|
|
4297
|
-
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()", "
|
|
4358
|
+
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()", "click": "onClick()" }, classAttribute: "bao-dropdown-menu-trigger" }, ngImport: i0 });
|
|
4298
4359
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoDropdownMenuTrigger, decorators: [{
|
|
4299
4360
|
type: Directive,
|
|
4300
4361
|
args: [{
|
|
@@ -4307,9 +4368,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
4307
4368
|
}], escapeKeyEvent: [{
|
|
4308
4369
|
type: HostListener,
|
|
4309
4370
|
args: ['window:keyup.escape']
|
|
4310
|
-
}], enterKeyEvent: [{
|
|
4311
|
-
type: HostListener,
|
|
4312
|
-
args: ['window:keyup.enter']
|
|
4313
4371
|
}], onClick: [{
|
|
4314
4372
|
type: HostListener,
|
|
4315
4373
|
args: ['click']
|
|
@@ -4404,7 +4462,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
4404
4462
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; } });
|
|
4405
4463
|
|
|
4406
4464
|
/*
|
|
4407
|
-
* Copyright (c)
|
|
4465
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
4408
4466
|
* Licensed under the MIT license.
|
|
4409
4467
|
* See LICENSE file in the project root for full license information.
|
|
4410
4468
|
*/
|
|
@@ -4444,13 +4502,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
4444
4502
|
}] });
|
|
4445
4503
|
|
|
4446
4504
|
/*
|
|
4447
|
-
* Copyright (c)
|
|
4505
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
4448
4506
|
* Licensed under the MIT license.
|
|
4449
4507
|
* See LICENSE file in the project root for full license information.
|
|
4450
4508
|
*/
|
|
4451
4509
|
|
|
4452
4510
|
/*
|
|
4453
|
-
* Copyright (c)
|
|
4511
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
4454
4512
|
* Licensed under the MIT license.
|
|
4455
4513
|
* See LICENSE file in the project root for full license information.
|
|
4456
4514
|
*/
|
|
@@ -4470,13 +4528,18 @@ class BaoFilePreviewComponent {
|
|
|
4470
4528
|
this.insertGenericIcon = false;
|
|
4471
4529
|
this.thumbnailURL = '';
|
|
4472
4530
|
}
|
|
4531
|
+
/**
|
|
4532
|
+
* Uploaded file to display in list.
|
|
4533
|
+
*/
|
|
4534
|
+
set file(f) {
|
|
4535
|
+
this._file = f;
|
|
4536
|
+
this.setFileData();
|
|
4537
|
+
}
|
|
4473
4538
|
get nativeElement() {
|
|
4474
4539
|
return this.elementRef.nativeElement;
|
|
4475
4540
|
}
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
}
|
|
4479
|
-
ngAfterContentInit() {
|
|
4541
|
+
setFileData() {
|
|
4542
|
+
this.formatSize(this._file.size);
|
|
4480
4543
|
this.getThumbnail();
|
|
4481
4544
|
this.setIcon();
|
|
4482
4545
|
}
|
|
@@ -4491,8 +4554,8 @@ class BaoFilePreviewComponent {
|
|
|
4491
4554
|
}
|
|
4492
4555
|
}
|
|
4493
4556
|
getThumbnail() {
|
|
4494
|
-
if (this.
|
|
4495
|
-
(this.
|
|
4557
|
+
if (this._file &&
|
|
4558
|
+
(this._file.type === 'image/png' || this._file.type === 'image/jpeg')) {
|
|
4496
4559
|
const reader = new FileReader();
|
|
4497
4560
|
reader.onload = (event) => {
|
|
4498
4561
|
this.thumbnailURL = event.target.result;
|
|
@@ -4500,31 +4563,33 @@ class BaoFilePreviewComponent {
|
|
|
4500
4563
|
reader.onerror = () => {
|
|
4501
4564
|
this.thumbnailURL = '';
|
|
4502
4565
|
};
|
|
4503
|
-
reader.readAsDataURL(this.
|
|
4566
|
+
reader.readAsDataURL(this._file);
|
|
4504
4567
|
}
|
|
4505
4568
|
}
|
|
4506
4569
|
formatSize(size) {
|
|
4507
4570
|
if (size >= KILO_THRESHOLD && size / KILO_THRESHOLD < KILO_THRESHOLD) {
|
|
4508
|
-
|
|
4571
|
+
this.fileSize = this.getSizeAndUnit(size, KILO_THRESHOLD, 'Ko');
|
|
4572
|
+
return;
|
|
4509
4573
|
}
|
|
4510
4574
|
const sizeDividedByKoMultiplicator = size / KILO_THRESHOLD;
|
|
4511
4575
|
if (sizeDividedByKoMultiplicator >= KILO_THRESHOLD) {
|
|
4512
4576
|
const toFixed = sizeDividedByKoMultiplicator > 10 ? 0 : 1;
|
|
4513
|
-
|
|
4577
|
+
this.fileSize = this.getSizeAndUnit(size, MEGA_THRESHOLD, 'Mo', toFixed);
|
|
4578
|
+
return;
|
|
4514
4579
|
}
|
|
4515
|
-
|
|
4580
|
+
this.fileSize = `${size} octets`;
|
|
4516
4581
|
}
|
|
4517
4582
|
getSizeAndUnit(size, multiplicator, unit, toFixed = 0) {
|
|
4518
4583
|
return `${(size / multiplicator).toFixed(toFixed)} ${unit}`;
|
|
4519
4584
|
}
|
|
4520
4585
|
}
|
|
4521
4586
|
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 });
|
|
4522
|
-
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\">{{
|
|
4587
|
+
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 });
|
|
4523
4588
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoFilePreviewComponent, decorators: [{
|
|
4524
4589
|
type: Component,
|
|
4525
4590
|
args: [{ selector: 'bao-file-preview, [bao-file-preview]', encapsulation: ViewEncapsulation.None, host: {
|
|
4526
4591
|
class: 'bao-file-preview'
|
|
4527
|
-
}, 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\">{{
|
|
4592
|
+
}, 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"] }]
|
|
4528
4593
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { file: [{
|
|
4529
4594
|
type: Input
|
|
4530
4595
|
}], isLoading: [{
|
|
@@ -4532,7 +4597,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
4532
4597
|
}] } });
|
|
4533
4598
|
|
|
4534
4599
|
/*
|
|
4535
|
-
* Copyright (c)
|
|
4600
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
4536
4601
|
* Licensed under the MIT license.
|
|
4537
4602
|
* See LICENSE file in the project root for full license information.
|
|
4538
4603
|
*/
|
|
@@ -4594,7 +4659,7 @@ const BAO_FILE_INTL_PROVIDER = {
|
|
|
4594
4659
|
};
|
|
4595
4660
|
|
|
4596
4661
|
/*
|
|
4597
|
-
* Copyright (c)
|
|
4662
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
4598
4663
|
* Licensed under the MIT license.
|
|
4599
4664
|
* See LICENSE file in the project root for full license information.
|
|
4600
4665
|
*/
|
|
@@ -4903,7 +4968,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
4903
4968
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; } });
|
|
4904
4969
|
|
|
4905
4970
|
/*
|
|
4906
|
-
* Copyright (c)
|
|
4971
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
4907
4972
|
* Licensed under the MIT license.
|
|
4908
4973
|
* See LICENSE file in the project root for full license information.
|
|
4909
4974
|
*/
|
|
@@ -4948,8 +5013,956 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
4948
5013
|
}]
|
|
4949
5014
|
}] });
|
|
4950
5015
|
|
|
5016
|
+
/** Injection token that can be used to access the data that was passed in to a snack bar. */
|
|
5017
|
+
const BAO_SNACK_BAR_DATA = new InjectionToken('BaoSnackBarData');
|
|
5018
|
+
/** Possible types of toast to display the snack bar */
|
|
5019
|
+
var BaoSnackBarToastTypeEnum;
|
|
5020
|
+
(function (BaoSnackBarToastTypeEnum) {
|
|
5021
|
+
BaoSnackBarToastTypeEnum["Info"] = "info";
|
|
5022
|
+
BaoSnackBarToastTypeEnum["Success"] = "success";
|
|
5023
|
+
BaoSnackBarToastTypeEnum["Danger"] = "danger";
|
|
5024
|
+
})(BaoSnackBarToastTypeEnum || (BaoSnackBarToastTypeEnum = {}));
|
|
5025
|
+
/**
|
|
5026
|
+
* Configuration used when opening a snack-bar.
|
|
5027
|
+
*/
|
|
5028
|
+
class BaoSnackBarConfig {
|
|
5029
|
+
constructor() {
|
|
5030
|
+
/** The message to display in the snackbar. */
|
|
5031
|
+
this.message = 'No message';
|
|
5032
|
+
/** The type of snackbar template to display. */
|
|
5033
|
+
this.toastType = BaoSnackBarToastTypeEnum.Info;
|
|
5034
|
+
/**
|
|
5035
|
+
* The attached action to the snack bar. If the name of the action matches an icon provided as part of
|
|
5036
|
+
* angular-ui icon dictionnary an icon will be displayed instead of text.
|
|
5037
|
+
* */
|
|
5038
|
+
this.actionLabelOrIcon = '';
|
|
5039
|
+
/** Displays the close button when set to true */
|
|
5040
|
+
this.showClose = false;
|
|
5041
|
+
/** The length of time in milliseconds to wait before automatically dismissing the snack bar. */
|
|
5042
|
+
this.duration = 5000;
|
|
5043
|
+
/** The politeness level for the MatAriaLiveAnnouncer announcement. */
|
|
5044
|
+
this.politeness = 'assertive';
|
|
5045
|
+
/**
|
|
5046
|
+
* Message to be announced by the LiveAnnouncer. When opening a snackbar without a custom
|
|
5047
|
+
* component or template, the announcement message will default to the specified message.
|
|
5048
|
+
*/
|
|
5049
|
+
this.announcementMessage = '';
|
|
5050
|
+
/** Data being injected into the child component. */
|
|
5051
|
+
this.data = null;
|
|
5052
|
+
/** The horizontal position to place the snack bar. */
|
|
5053
|
+
this.horizontalPosition = 'left';
|
|
5054
|
+
/** The vertical position to place the snack bar. */
|
|
5055
|
+
this.verticalPosition = 'bottom';
|
|
5056
|
+
}
|
|
5057
|
+
}
|
|
5058
|
+
|
|
5059
|
+
/** Maximum amount of milliseconds that can be passed into setTimeout. */
|
|
5060
|
+
const MAX_TIMEOUT = Math.pow(2, 31) - 1;
|
|
5061
|
+
/**
|
|
5062
|
+
* Reference to a snack bar dispatched from the snack bar service.
|
|
5063
|
+
*/
|
|
5064
|
+
class BaoSnackBarRef {
|
|
5065
|
+
constructor(containerInstance, _overlayRef) {
|
|
5066
|
+
this._overlayRef = _overlayRef;
|
|
5067
|
+
/** Subject for notifying the user that the snack bar has been dismissed. */
|
|
5068
|
+
this._afterDismissed = new Subject();
|
|
5069
|
+
/** Subject for notifying the user that the snack bar has opened and appeared. */
|
|
5070
|
+
this._afterOpened = new Subject();
|
|
5071
|
+
/** Subject for notifying the user that the snack bar action was called. */
|
|
5072
|
+
this._onAction = new Subject();
|
|
5073
|
+
/** Whether the snack bar was dismissed using the action button. */
|
|
5074
|
+
this._dismissedByAction = false;
|
|
5075
|
+
this.containerInstance = containerInstance;
|
|
5076
|
+
// Dismiss snackbar on action.
|
|
5077
|
+
this.onAction().subscribe(() => this.dismiss());
|
|
5078
|
+
containerInstance._onExit.subscribe(() => this.finishDismiss());
|
|
5079
|
+
}
|
|
5080
|
+
/** Dismisses the snack bar. */
|
|
5081
|
+
dismiss() {
|
|
5082
|
+
if (!this._afterDismissed.closed) {
|
|
5083
|
+
this.containerInstance.exit();
|
|
5084
|
+
}
|
|
5085
|
+
clearTimeout(this._durationTimeoutId);
|
|
5086
|
+
}
|
|
5087
|
+
/** Marks the snackbar action clicked. */
|
|
5088
|
+
dismissWithAction() {
|
|
5089
|
+
if (!this._onAction.closed) {
|
|
5090
|
+
this._dismissedByAction = true;
|
|
5091
|
+
this._onAction.next();
|
|
5092
|
+
this._onAction.complete();
|
|
5093
|
+
}
|
|
5094
|
+
}
|
|
5095
|
+
/** Dismisses the snack bar after some duration */
|
|
5096
|
+
dismissAfter(duration) {
|
|
5097
|
+
// Note that we need to cap the duration to the maximum value for setTimeout, because
|
|
5098
|
+
// it'll revert to 1 if somebody passes in something greater (e.g. `Infinity`). See #17234.
|
|
5099
|
+
// @TODO: window.setTimeout() ?
|
|
5100
|
+
this._durationTimeoutId = window.setTimeout(() => this.dismiss(), Math.min(duration, MAX_TIMEOUT));
|
|
5101
|
+
}
|
|
5102
|
+
/** Marks the snackbar as opened */
|
|
5103
|
+
open() {
|
|
5104
|
+
if (!this._afterOpened.closed) {
|
|
5105
|
+
this._afterOpened.next();
|
|
5106
|
+
this._afterOpened.complete();
|
|
5107
|
+
}
|
|
5108
|
+
}
|
|
5109
|
+
/** Gets an observable that is notified when the snack bar is finished closing. */
|
|
5110
|
+
afterDismissed() {
|
|
5111
|
+
return this._afterDismissed;
|
|
5112
|
+
}
|
|
5113
|
+
/** Gets an observable that is notified when the snack bar has opened and appeared. */
|
|
5114
|
+
afterOpened() {
|
|
5115
|
+
return this.containerInstance._onEnter;
|
|
5116
|
+
}
|
|
5117
|
+
/** Gets an observable that is notified when the snack bar action is called. */
|
|
5118
|
+
onAction() {
|
|
5119
|
+
return this._onAction;
|
|
5120
|
+
}
|
|
5121
|
+
/** Cleans up the DOM after closing. */
|
|
5122
|
+
finishDismiss() {
|
|
5123
|
+
this._overlayRef.dispose();
|
|
5124
|
+
if (!this._onAction.closed) {
|
|
5125
|
+
this._onAction.complete();
|
|
5126
|
+
}
|
|
5127
|
+
this._afterDismissed.next({ dismissedByAction: this._dismissedByAction });
|
|
5128
|
+
this._afterDismissed.complete();
|
|
5129
|
+
this._dismissedByAction = false;
|
|
5130
|
+
}
|
|
5131
|
+
}
|
|
5132
|
+
|
|
5133
|
+
/*
|
|
5134
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
5135
|
+
* Licensed under the MIT license.
|
|
5136
|
+
* See LICENSE file in the project root for full license information.
|
|
5137
|
+
*/
|
|
5138
|
+
const toastTypeToAttributes = {
|
|
5139
|
+
info: {
|
|
5140
|
+
toast: 'snackbar-info',
|
|
5141
|
+
icon: 'icon-info',
|
|
5142
|
+
iconTitle: 'Information',
|
|
5143
|
+
politeness: 'assertive'
|
|
5144
|
+
},
|
|
5145
|
+
success: {
|
|
5146
|
+
toast: 'snackbar-success',
|
|
5147
|
+
icon: 'icon-check-circle',
|
|
5148
|
+
iconTitle: 'Succès',
|
|
5149
|
+
politeness: 'polite'
|
|
5150
|
+
},
|
|
5151
|
+
danger: {
|
|
5152
|
+
toast: 'snackbar-danger',
|
|
5153
|
+
icon: 'icon-error',
|
|
5154
|
+
iconTitle: 'Erreur',
|
|
5155
|
+
politeness: 'assertive'
|
|
5156
|
+
}
|
|
5157
|
+
};
|
|
5158
|
+
/**
|
|
5159
|
+
* A component used to open as the default snack bar, matching material spec.
|
|
5160
|
+
* This should only be used internally by the snack bar service.
|
|
5161
|
+
*/
|
|
5162
|
+
class BaoSimpleSnackBarComponent {
|
|
5163
|
+
constructor(snackBarRef, data) {
|
|
5164
|
+
this.snackBarRef = snackBarRef;
|
|
5165
|
+
this.showCloseTitle = 'Fermer le message';
|
|
5166
|
+
this.data = data;
|
|
5167
|
+
}
|
|
5168
|
+
/** Returns the politeness */
|
|
5169
|
+
get politeness() {
|
|
5170
|
+
return (toastTypeToAttributes[this.data.toastType]?.politeness ||
|
|
5171
|
+
toastTypeToAttributes['info'].politeness);
|
|
5172
|
+
}
|
|
5173
|
+
/** Returns the toast class */
|
|
5174
|
+
get toastType() {
|
|
5175
|
+
return (toastTypeToAttributes[this.data.toastType]?.toast ||
|
|
5176
|
+
toastTypeToAttributes['info'].toast);
|
|
5177
|
+
}
|
|
5178
|
+
/** Returns the toast icon */
|
|
5179
|
+
get toastIcon() {
|
|
5180
|
+
return (toastTypeToAttributes[this.data.toastType]?.icon ||
|
|
5181
|
+
toastTypeToAttributes['info'].icon);
|
|
5182
|
+
}
|
|
5183
|
+
/** Returns the toast icon title */
|
|
5184
|
+
get toastIconTitle() {
|
|
5185
|
+
return (toastTypeToAttributes[this.data.toastType]?.iconTitle ||
|
|
5186
|
+
toastTypeToAttributes['info'].iconTitle);
|
|
5187
|
+
}
|
|
5188
|
+
/** If the action button should be shown. */
|
|
5189
|
+
get hasAction() {
|
|
5190
|
+
return !!this.data.actionLabelOrIcon;
|
|
5191
|
+
}
|
|
5192
|
+
/** If the action is an icon */
|
|
5193
|
+
get isActionIcon() {
|
|
5194
|
+
return !!ICONS_DCT[this.data.actionLabelOrIcon];
|
|
5195
|
+
}
|
|
5196
|
+
/** Performs the action on the snack bar. */
|
|
5197
|
+
action() {
|
|
5198
|
+
this.snackBarRef.dismissWithAction();
|
|
5199
|
+
}
|
|
5200
|
+
/** Closes the snack bar. */
|
|
5201
|
+
close() {
|
|
5202
|
+
this.snackBarRef.dismiss();
|
|
5203
|
+
}
|
|
5204
|
+
}
|
|
5205
|
+
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 });
|
|
5206
|
+
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 });
|
|
5207
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSimpleSnackBarComponent, decorators: [{
|
|
5208
|
+
type: Component,
|
|
5209
|
+
args: [{ selector: 'bao-simple-snack-bar', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
5210
|
+
class: 'mat-simple-snackbar'
|
|
5211
|
+
}, 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"] }]
|
|
5212
|
+
}], ctorParameters: function () { return [{ type: BaoSnackBarRef }, { type: undefined, decorators: [{
|
|
5213
|
+
type: Inject,
|
|
5214
|
+
args: [BAO_SNACK_BAR_DATA]
|
|
5215
|
+
}] }]; } });
|
|
5216
|
+
|
|
5217
|
+
/*
|
|
5218
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
5219
|
+
* Licensed under the MIT license.
|
|
5220
|
+
* See LICENSE file in the project root for full license information.
|
|
5221
|
+
*/
|
|
5222
|
+
/**
|
|
5223
|
+
* Animations used by the Material snack bar.
|
|
5224
|
+
* @docs-private
|
|
5225
|
+
*/
|
|
5226
|
+
const matSnackBarAnimations = {
|
|
5227
|
+
/** Animation that shows and hides a snack bar. */
|
|
5228
|
+
snackBarState: trigger('state', [
|
|
5229
|
+
state('void, hidden', style({
|
|
5230
|
+
transform: 'scale(0.8)',
|
|
5231
|
+
opacity: 0
|
|
5232
|
+
})),
|
|
5233
|
+
state('visible', style({
|
|
5234
|
+
transform: 'scale(1)',
|
|
5235
|
+
opacity: 1
|
|
5236
|
+
})),
|
|
5237
|
+
transition('* => visible', animate('150ms cubic-bezier(0, 0, 0.2, 1)')),
|
|
5238
|
+
transition('* => void, * => hidden', animate('75ms cubic-bezier(0.4, 0.0, 1, 1)', style({
|
|
5239
|
+
opacity: 0
|
|
5240
|
+
})))
|
|
5241
|
+
])
|
|
5242
|
+
};
|
|
5243
|
+
|
|
5244
|
+
let uniqueId = 0;
|
|
5245
|
+
/**
|
|
5246
|
+
* Internal component that wraps user-provided snack bar content.
|
|
5247
|
+
* @docs-private
|
|
5248
|
+
*/
|
|
5249
|
+
class BaoSnackBarContainerComponent extends BasePortalOutlet {
|
|
5250
|
+
constructor(_ngZone, _elementRef, _changeDetectorRef, _platform,
|
|
5251
|
+
/** The snack bar configuration. */
|
|
5252
|
+
snackBarConfig) {
|
|
5253
|
+
super();
|
|
5254
|
+
this._ngZone = _ngZone;
|
|
5255
|
+
this._elementRef = _elementRef;
|
|
5256
|
+
this._changeDetectorRef = _changeDetectorRef;
|
|
5257
|
+
this._platform = _platform;
|
|
5258
|
+
this.snackBarConfig = snackBarConfig;
|
|
5259
|
+
this._document = inject(DOCUMENT);
|
|
5260
|
+
this._trackedModals = new Set();
|
|
5261
|
+
/** Subject for notifying that the snack bar has announced to screen readers. */
|
|
5262
|
+
this._onAnnounce = new Subject();
|
|
5263
|
+
/** Subject for notifying that the snack bar has exited from view. */
|
|
5264
|
+
this._onExit = new Subject();
|
|
5265
|
+
/** Subject for notifying that the snack bar has finished entering the view. */
|
|
5266
|
+
this._onEnter = new Subject();
|
|
5267
|
+
/** The state of the snack bar animations. */
|
|
5268
|
+
this._animationState = 'void';
|
|
5269
|
+
/** The number of milliseconds to wait before announcing the snack bar's content. */
|
|
5270
|
+
this._announceDelay = 150;
|
|
5271
|
+
/** Whether the component has been destroyed. */
|
|
5272
|
+
this._destroyed = false;
|
|
5273
|
+
/** Unique ID of the aria-live element. */
|
|
5274
|
+
this._liveElementId = `bao-snack-bar-container-live-${uniqueId++}`;
|
|
5275
|
+
/**
|
|
5276
|
+
* Attaches a DOM portal to the snack bar container.
|
|
5277
|
+
* @deprecated To be turned into a method.
|
|
5278
|
+
* @breaking-change 10.0.0
|
|
5279
|
+
*/
|
|
5280
|
+
this.attachDomPortal = (portal) => {
|
|
5281
|
+
this.assertNotAttached();
|
|
5282
|
+
const result = this._portalOutlet.attachDomPortal(portal);
|
|
5283
|
+
this._afterPortalAttached();
|
|
5284
|
+
return result;
|
|
5285
|
+
};
|
|
5286
|
+
// Use aria-live rather than a live role like 'alert' or 'status'
|
|
5287
|
+
// because NVDA and JAWS have show inconsistent behavior with live roles.
|
|
5288
|
+
if (snackBarConfig.politeness === 'assertive' &&
|
|
5289
|
+
!snackBarConfig.announcementMessage) {
|
|
5290
|
+
this._live = 'assertive';
|
|
5291
|
+
}
|
|
5292
|
+
else if (snackBarConfig.politeness === 'off') {
|
|
5293
|
+
this._live = 'off';
|
|
5294
|
+
}
|
|
5295
|
+
else {
|
|
5296
|
+
this._live = 'polite';
|
|
5297
|
+
}
|
|
5298
|
+
// Only set role for Firefox. Set role based on aria-live because setting role="alert" implies
|
|
5299
|
+
// aria-live="assertive" which may cause issues if aria-live is set to "polite" above.
|
|
5300
|
+
if (this._platform.FIREFOX) {
|
|
5301
|
+
if (this._live === 'polite') {
|
|
5302
|
+
this._role = 'status';
|
|
5303
|
+
}
|
|
5304
|
+
if (this._live === 'assertive') {
|
|
5305
|
+
this._role = 'alert';
|
|
5306
|
+
}
|
|
5307
|
+
}
|
|
5308
|
+
}
|
|
5309
|
+
/** Attach a component portal as content to this snack bar container. */
|
|
5310
|
+
attachComponentPortal(portal) {
|
|
5311
|
+
this.assertNotAttached();
|
|
5312
|
+
this.applySnackBarClasses();
|
|
5313
|
+
const result = this._portalOutlet.attachComponentPortal(portal);
|
|
5314
|
+
this._afterPortalAttached();
|
|
5315
|
+
return result;
|
|
5316
|
+
}
|
|
5317
|
+
/** Attach a template portal as content to this snack bar container. */
|
|
5318
|
+
attachTemplatePortal(portal) {
|
|
5319
|
+
this.assertNotAttached();
|
|
5320
|
+
this.applySnackBarClasses();
|
|
5321
|
+
const result = this._portalOutlet.attachTemplatePortal(portal);
|
|
5322
|
+
this._afterPortalAttached();
|
|
5323
|
+
return result;
|
|
5324
|
+
}
|
|
5325
|
+
/** Handle end of animations, updating the state of the snackbar. */
|
|
5326
|
+
onAnimationEnd(event) {
|
|
5327
|
+
const { fromState, toState } = event;
|
|
5328
|
+
if ((toState === 'void' && fromState !== 'void') || toState === 'hidden') {
|
|
5329
|
+
this.completeExit();
|
|
5330
|
+
}
|
|
5331
|
+
if (toState === 'visible') {
|
|
5332
|
+
// Note: we shouldn't use `this` inside the zone callback,
|
|
5333
|
+
// because it can cause a memory leak.
|
|
5334
|
+
const onEnter = this._onEnter;
|
|
5335
|
+
this._ngZone.run(() => {
|
|
5336
|
+
onEnter.next();
|
|
5337
|
+
onEnter.complete();
|
|
5338
|
+
});
|
|
5339
|
+
}
|
|
5340
|
+
}
|
|
5341
|
+
/** Begin animation of snack bar entrance into view. */
|
|
5342
|
+
enter() {
|
|
5343
|
+
if (!this._destroyed) {
|
|
5344
|
+
this._animationState = 'visible';
|
|
5345
|
+
this._changeDetectorRef.detectChanges();
|
|
5346
|
+
this.screenReaderAnnounce();
|
|
5347
|
+
}
|
|
5348
|
+
}
|
|
5349
|
+
/** Begin animation of the snack bar exiting from view. */
|
|
5350
|
+
exit() {
|
|
5351
|
+
// Note: this one transitions to `hidden`, rather than `void`, in order to handle the case
|
|
5352
|
+
// where multiple snack bars are opened in quick succession (e.g. two consecutive calls to
|
|
5353
|
+
// `MatSnackBar.open`).
|
|
5354
|
+
this._animationState = 'hidden';
|
|
5355
|
+
// Mark this element with an 'exit' attribute to indicate that the snackbar has
|
|
5356
|
+
// been dismissed and will soon be removed from the DOM. This is used by the snackbar
|
|
5357
|
+
// test harness.
|
|
5358
|
+
this._elementRef.nativeElement.setAttribute('mat-exit', '');
|
|
5359
|
+
// If the snack bar hasn't been announced by the time it exits it wouldn't have been open
|
|
5360
|
+
// long enough to visually read it either, so clear the timeout for announcing.
|
|
5361
|
+
clearTimeout(this._announceTimeoutId);
|
|
5362
|
+
return this._onExit;
|
|
5363
|
+
}
|
|
5364
|
+
/** Makes sure the exit callbacks have been invoked when the element is destroyed. */
|
|
5365
|
+
ngOnDestroy() {
|
|
5366
|
+
this._destroyed = true;
|
|
5367
|
+
this.completeExit();
|
|
5368
|
+
}
|
|
5369
|
+
/**
|
|
5370
|
+
* Waits for the zone to settle before removing the element. Helps prevent
|
|
5371
|
+
* errors where we end up removing an element which is in the middle of an animation.
|
|
5372
|
+
*/
|
|
5373
|
+
completeExit() {
|
|
5374
|
+
this._ngZone.onMicrotaskEmpty.pipe(take$1(1)).subscribe(() => {
|
|
5375
|
+
this._onExit.next();
|
|
5376
|
+
this._onExit.complete();
|
|
5377
|
+
});
|
|
5378
|
+
}
|
|
5379
|
+
/** Applies the various positioning and user-configured CSS classes to the snack bar. */
|
|
5380
|
+
applySnackBarClasses() {
|
|
5381
|
+
const element = this._elementRef.nativeElement;
|
|
5382
|
+
const panelClasses = this.snackBarConfig.panelClass;
|
|
5383
|
+
if (panelClasses) {
|
|
5384
|
+
if (Array.isArray(panelClasses)) {
|
|
5385
|
+
// Note that we can't use a spread here, because IE doesn't support multiple arguments.
|
|
5386
|
+
panelClasses.forEach(cssClass => element.classList.add(cssClass));
|
|
5387
|
+
}
|
|
5388
|
+
else {
|
|
5389
|
+
element.classList.add(panelClasses);
|
|
5390
|
+
}
|
|
5391
|
+
}
|
|
5392
|
+
if (this.snackBarConfig.horizontalPosition === 'center') {
|
|
5393
|
+
element.classList.add('bao-snack-bar-center');
|
|
5394
|
+
}
|
|
5395
|
+
if (this.snackBarConfig.verticalPosition === 'top') {
|
|
5396
|
+
element.classList.add('bao-snack-bar-top');
|
|
5397
|
+
}
|
|
5398
|
+
}
|
|
5399
|
+
/**
|
|
5400
|
+
* Called after the portal contents have been attached. Can be
|
|
5401
|
+
* used to modify the DOM once it's guaranteed to be in place.
|
|
5402
|
+
*/
|
|
5403
|
+
_afterPortalAttached() {
|
|
5404
|
+
const element = this._elementRef.nativeElement;
|
|
5405
|
+
const panelClasses = this.snackBarConfig.panelClass;
|
|
5406
|
+
if (panelClasses) {
|
|
5407
|
+
if (Array.isArray(panelClasses)) {
|
|
5408
|
+
// Note that we can't use a spread here, because IE doesn't support multiple arguments.
|
|
5409
|
+
panelClasses.forEach(cssClass => element.classList.add(cssClass));
|
|
5410
|
+
}
|
|
5411
|
+
else {
|
|
5412
|
+
element.classList.add(panelClasses);
|
|
5413
|
+
}
|
|
5414
|
+
}
|
|
5415
|
+
this._exposeToModals();
|
|
5416
|
+
}
|
|
5417
|
+
/**
|
|
5418
|
+
* Some browsers won't expose the accessibility node of the live element if there is an
|
|
5419
|
+
* `aria-modal` and the live element is outside of it. This method works around the issue by
|
|
5420
|
+
* pointing the `aria-owns` of all modals to the live element.
|
|
5421
|
+
*/
|
|
5422
|
+
_exposeToModals() {
|
|
5423
|
+
// TODO(crisbeto): consider de-duplicating this with the `LiveAnnouncer`.
|
|
5424
|
+
// Note that the selector here is limited to CDK overlays at the moment in order to reduce the
|
|
5425
|
+
// section of the DOM we need to look through. This should cover all the cases we support, but
|
|
5426
|
+
// the selector can be expanded if it turns out to be too narrow.
|
|
5427
|
+
const id = this._liveElementId;
|
|
5428
|
+
const modals = this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');
|
|
5429
|
+
for (let i = 0; i < modals.length; i++) {
|
|
5430
|
+
const modal = modals[i];
|
|
5431
|
+
const ariaOwns = modal.getAttribute('aria-owns');
|
|
5432
|
+
this._trackedModals.add(modal);
|
|
5433
|
+
if (!ariaOwns) {
|
|
5434
|
+
modal.setAttribute('aria-owns', id);
|
|
5435
|
+
}
|
|
5436
|
+
else if (ariaOwns.indexOf(id) === -1) {
|
|
5437
|
+
modal.setAttribute('aria-owns', ariaOwns + ' ' + id);
|
|
5438
|
+
}
|
|
5439
|
+
}
|
|
5440
|
+
}
|
|
5441
|
+
/** Clears the references to the live element from any modals it was added to. */
|
|
5442
|
+
_clearFromModals() {
|
|
5443
|
+
this._trackedModals.forEach(modal => {
|
|
5444
|
+
const ariaOwns = modal.getAttribute('aria-owns');
|
|
5445
|
+
if (ariaOwns) {
|
|
5446
|
+
const newValue = ariaOwns.replace(this._liveElementId, '').trim();
|
|
5447
|
+
if (newValue.length > 0) {
|
|
5448
|
+
modal.setAttribute('aria-owns', newValue);
|
|
5449
|
+
}
|
|
5450
|
+
else {
|
|
5451
|
+
modal.removeAttribute('aria-owns');
|
|
5452
|
+
}
|
|
5453
|
+
}
|
|
5454
|
+
});
|
|
5455
|
+
this._trackedModals.clear();
|
|
5456
|
+
}
|
|
5457
|
+
/** Asserts that no content is already attached to the container. */
|
|
5458
|
+
assertNotAttached() {
|
|
5459
|
+
if (this._portalOutlet.hasAttached()) {
|
|
5460
|
+
throw Error('Attempting to attach snack bar content after content is already attached');
|
|
5461
|
+
}
|
|
5462
|
+
}
|
|
5463
|
+
/**
|
|
5464
|
+
* Starts a timeout to move the snack bar content to the live region so screen readers will
|
|
5465
|
+
* announce it.
|
|
5466
|
+
*/
|
|
5467
|
+
screenReaderAnnounce() {
|
|
5468
|
+
if (!this._announceTimeoutId) {
|
|
5469
|
+
this._ngZone.runOutsideAngular(() => {
|
|
5470
|
+
this._announceTimeoutId = window.setTimeout(() => {
|
|
5471
|
+
const inertElement = this._elementRef.nativeElement.querySelector('[aria-hidden]');
|
|
5472
|
+
const liveElement = this._elementRef.nativeElement.querySelector('[aria-live]');
|
|
5473
|
+
if (inertElement && liveElement) {
|
|
5474
|
+
// If an element in the snack bar content is focused before being moved
|
|
5475
|
+
// track it and restore focus after moving to the live region.
|
|
5476
|
+
let focusedElement = null;
|
|
5477
|
+
if (this._platform.isBrowser &&
|
|
5478
|
+
document.activeElement instanceof HTMLElement &&
|
|
5479
|
+
inertElement.contains(document.activeElement)) {
|
|
5480
|
+
focusedElement = document.activeElement;
|
|
5481
|
+
}
|
|
5482
|
+
inertElement.removeAttribute('aria-hidden');
|
|
5483
|
+
liveElement.appendChild(inertElement);
|
|
5484
|
+
focusedElement?.focus();
|
|
5485
|
+
this._onAnnounce.next();
|
|
5486
|
+
this._onAnnounce.complete();
|
|
5487
|
+
}
|
|
5488
|
+
}, this._announceDelay);
|
|
5489
|
+
});
|
|
5490
|
+
}
|
|
5491
|
+
}
|
|
5492
|
+
}
|
|
5493
|
+
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 });
|
|
5494
|
+
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 });
|
|
5495
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSnackBarContainerComponent, decorators: [{
|
|
5496
|
+
type: Component,
|
|
5497
|
+
args: [{ selector: 'bao-snack-bar-container', changeDetection: ChangeDetectionStrategy.Default, encapsulation: ViewEncapsulation.None, animations: [matSnackBarAnimations.snackBarState], host: {
|
|
5498
|
+
class: 'bao-snack-bar-container',
|
|
5499
|
+
'[@state]': '_animationState',
|
|
5500
|
+
'(@state.done)': 'onAnimationEnd($event)'
|
|
5501
|
+
}, 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"] }]
|
|
5502
|
+
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$5.Platform }, { type: BaoSnackBarConfig }]; }, propDecorators: { _portalOutlet: [{
|
|
5503
|
+
type: ViewChild,
|
|
5504
|
+
args: [CdkPortalOutlet, { static: true }]
|
|
5505
|
+
}] } });
|
|
5506
|
+
|
|
5507
|
+
function baoFactory() {
|
|
5508
|
+
return new BaoSnackBarConfig();
|
|
5509
|
+
}
|
|
5510
|
+
/** Injection token that can be used to specify default snack bar. */
|
|
5511
|
+
const BAO_SNACK_BAR_DEFAULT_OPTIONS = new InjectionToken('bao-snack-bar-default-options', {
|
|
5512
|
+
providedIn: 'root',
|
|
5513
|
+
factory: baoFactory
|
|
5514
|
+
});
|
|
5515
|
+
/**
|
|
5516
|
+
* Service to dispatch Material Design snack bar messages.
|
|
5517
|
+
*/
|
|
5518
|
+
class BaoSnackBarService {
|
|
5519
|
+
constructor(_overlay, _live, _injector, _parentSnackBar, _defaultConfig) {
|
|
5520
|
+
this._overlay = _overlay;
|
|
5521
|
+
this._live = _live;
|
|
5522
|
+
this._injector = _injector;
|
|
5523
|
+
this._parentSnackBar = _parentSnackBar;
|
|
5524
|
+
this._defaultConfig = _defaultConfig;
|
|
5525
|
+
/** The component that should be rendered as the snack bar's simple component. */
|
|
5526
|
+
this.simpleSnackBarComponent = BaoSimpleSnackBarComponent;
|
|
5527
|
+
/** The container component that attaches the provided template or component. */
|
|
5528
|
+
this.snackBarContainerComponent = BaoSnackBarContainerComponent;
|
|
5529
|
+
/**
|
|
5530
|
+
* Reference to the current snack bar in the view *at this level* (in the Angular injector tree).
|
|
5531
|
+
* If there is a parent snack-bar service, all operations should delegate to that parent
|
|
5532
|
+
* via `_openedSnackBarRef`.
|
|
5533
|
+
*/
|
|
5534
|
+
this._snackBarRefAtThisLevel = null;
|
|
5535
|
+
}
|
|
5536
|
+
/** Reference to the currently opened snackbar at *any* level. */
|
|
5537
|
+
get _openedSnackBarRef() {
|
|
5538
|
+
const parent = this._parentSnackBar;
|
|
5539
|
+
return parent ? parent._openedSnackBarRef : this._snackBarRefAtThisLevel;
|
|
5540
|
+
}
|
|
5541
|
+
set _openedSnackBarRef(value) {
|
|
5542
|
+
if (this._parentSnackBar) {
|
|
5543
|
+
this._parentSnackBar._openedSnackBarRef = value;
|
|
5544
|
+
}
|
|
5545
|
+
else {
|
|
5546
|
+
this._snackBarRefAtThisLevel = value;
|
|
5547
|
+
}
|
|
5548
|
+
}
|
|
5549
|
+
/**
|
|
5550
|
+
* Creates and dispatches a snack bar with a custom component for the content, removing any
|
|
5551
|
+
* currently opened snack bars.
|
|
5552
|
+
*
|
|
5553
|
+
* @param component Component to be instantiated.
|
|
5554
|
+
* @param config Extra configuration for the snack bar.
|
|
5555
|
+
*/
|
|
5556
|
+
openFromComponent(component, config) {
|
|
5557
|
+
return this.attach(component, config);
|
|
5558
|
+
}
|
|
5559
|
+
/**
|
|
5560
|
+
* Creates and dispatches a snack bar with a custom template for the content, removing any
|
|
5561
|
+
* currently opened snack bars.
|
|
5562
|
+
*
|
|
5563
|
+
* @param template Template to be instantiated.
|
|
5564
|
+
* @param config Extra configuration for the snack bar.
|
|
5565
|
+
*/
|
|
5566
|
+
openFromTemplate(template, config) {
|
|
5567
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
5568
|
+
return this.attach(template, config);
|
|
5569
|
+
}
|
|
5570
|
+
/**
|
|
5571
|
+
* Opens a snackbar with a message and an optional action.
|
|
5572
|
+
* @param message The message to show in the snackbar.
|
|
5573
|
+
* @param toastType The type of of toast to display the snackbar.
|
|
5574
|
+
* @param actionLabelOrIcon The label or icon for the snackbar action.
|
|
5575
|
+
* @param showClose If true, the snackbar will require user interaction to close.
|
|
5576
|
+
* @param config Additional configuration options for the snackbar.
|
|
5577
|
+
*/
|
|
5578
|
+
open(config) {
|
|
5579
|
+
const _config = { ...this._defaultConfig, ...config };
|
|
5580
|
+
// Since the user doesn't have access to the component, we can
|
|
5581
|
+
// override the data to pass in our own message, action and type.
|
|
5582
|
+
_config.data = {
|
|
5583
|
+
message: _config.message,
|
|
5584
|
+
toastType: _config.toastType,
|
|
5585
|
+
actionLabelOrIcon: _config.actionLabelOrIcon,
|
|
5586
|
+
showClose: _config.showClose
|
|
5587
|
+
};
|
|
5588
|
+
if (_config.showClose)
|
|
5589
|
+
_config.duration = 0;
|
|
5590
|
+
if (!_config.announcementMessage) {
|
|
5591
|
+
_config.announcementMessage = _config.message;
|
|
5592
|
+
}
|
|
5593
|
+
return this.openFromComponent(this.simpleSnackBarComponent, _config);
|
|
5594
|
+
}
|
|
5595
|
+
/**
|
|
5596
|
+
* Dismisses the currently-visible snack bar.
|
|
5597
|
+
*/
|
|
5598
|
+
dismiss() {
|
|
5599
|
+
if (this._openedSnackBarRef) {
|
|
5600
|
+
this._openedSnackBarRef.dismiss();
|
|
5601
|
+
}
|
|
5602
|
+
}
|
|
5603
|
+
ngOnDestroy() {
|
|
5604
|
+
// Only dismiss the snack bar at the current level on destroy.
|
|
5605
|
+
if (this._snackBarRefAtThisLevel) {
|
|
5606
|
+
this._snackBarRefAtThisLevel.dismiss();
|
|
5607
|
+
}
|
|
5608
|
+
}
|
|
5609
|
+
/**
|
|
5610
|
+
* Attaches the snack bar container component to the overlay.
|
|
5611
|
+
*/
|
|
5612
|
+
attachSnackBarContainer(overlayRef, config) {
|
|
5613
|
+
const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;
|
|
5614
|
+
const injector = new PortalInjector(userInjector || this._injector, new WeakMap([[BaoSnackBarConfig, config]]));
|
|
5615
|
+
const containerPortal = new ComponentPortal(this.snackBarContainerComponent, config.viewContainerRef, injector);
|
|
5616
|
+
const containerRef = overlayRef.attach(containerPortal);
|
|
5617
|
+
containerRef.instance.snackBarConfig = config;
|
|
5618
|
+
return containerRef.instance;
|
|
5619
|
+
}
|
|
5620
|
+
/**
|
|
5621
|
+
* Places a new component or a template as the content of the snack bar container.
|
|
5622
|
+
*/
|
|
5623
|
+
attach(content, userConfig) {
|
|
5624
|
+
const config = {
|
|
5625
|
+
...new BaoSnackBarConfig(),
|
|
5626
|
+
...this._defaultConfig,
|
|
5627
|
+
...userConfig
|
|
5628
|
+
};
|
|
5629
|
+
const overlayRef = this.createOverlay(config);
|
|
5630
|
+
const container = this.attachSnackBarContainer(overlayRef, config);
|
|
5631
|
+
const snackBarRef = new BaoSnackBarRef(container, overlayRef);
|
|
5632
|
+
if (content instanceof TemplateRef) {
|
|
5633
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
5634
|
+
const portal = new TemplatePortal(content, null, {
|
|
5635
|
+
$implicit: config.data,
|
|
5636
|
+
snackBarRef
|
|
5637
|
+
});
|
|
5638
|
+
snackBarRef.instance = container.attachTemplatePortal(portal);
|
|
5639
|
+
}
|
|
5640
|
+
else {
|
|
5641
|
+
const injector = this.createInjector(config, snackBarRef);
|
|
5642
|
+
const portal = new ComponentPortal(content, undefined, injector);
|
|
5643
|
+
const contentRef = container.attachComponentPortal(portal);
|
|
5644
|
+
// We can't pass this via the injector, because the injector is created earlier.
|
|
5645
|
+
snackBarRef.instance = contentRef.instance;
|
|
5646
|
+
}
|
|
5647
|
+
this.animateSnackBar(snackBarRef, config);
|
|
5648
|
+
this._openedSnackBarRef = snackBarRef;
|
|
5649
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
5650
|
+
return this._openedSnackBarRef;
|
|
5651
|
+
}
|
|
5652
|
+
/** Animates the old snack bar out and the new one in. */
|
|
5653
|
+
animateSnackBar(snackBarRef, config) {
|
|
5654
|
+
// When the snackbar is dismissed, clear the reference to it.
|
|
5655
|
+
snackBarRef.afterDismissed().subscribe(() => {
|
|
5656
|
+
// Clear the snackbar ref if it hasn't already been replaced by a newer snackbar.
|
|
5657
|
+
// eslint-disable-next-line eqeqeq
|
|
5658
|
+
if (this._openedSnackBarRef == snackBarRef) {
|
|
5659
|
+
this._openedSnackBarRef = null;
|
|
5660
|
+
}
|
|
5661
|
+
if (config.announcementMessage) {
|
|
5662
|
+
this._live.clear();
|
|
5663
|
+
}
|
|
5664
|
+
});
|
|
5665
|
+
if (this._openedSnackBarRef) {
|
|
5666
|
+
// If a snack bar is already in view, dismiss it and enter the
|
|
5667
|
+
// new snack bar after exit animation is complete.
|
|
5668
|
+
this._openedSnackBarRef.afterDismissed().subscribe(() => {
|
|
5669
|
+
snackBarRef.containerInstance.enter();
|
|
5670
|
+
});
|
|
5671
|
+
this._openedSnackBarRef.dismiss();
|
|
5672
|
+
}
|
|
5673
|
+
else {
|
|
5674
|
+
// If no snack bar is in view, enter the new snack bar.
|
|
5675
|
+
snackBarRef.containerInstance.enter();
|
|
5676
|
+
}
|
|
5677
|
+
// If a dismiss timeout is provided, set up dismiss based on after the snackbar is opened.
|
|
5678
|
+
if (config.duration && config.duration > 0) {
|
|
5679
|
+
snackBarRef
|
|
5680
|
+
.afterOpened()
|
|
5681
|
+
.subscribe(() => snackBarRef.dismissAfter(config.duration));
|
|
5682
|
+
}
|
|
5683
|
+
if (config.announcementMessage) {
|
|
5684
|
+
void this._live.announce(config.announcementMessage, config.politeness);
|
|
5685
|
+
}
|
|
5686
|
+
}
|
|
5687
|
+
/**
|
|
5688
|
+
* Creates a new overlay and places it in the correct location.
|
|
5689
|
+
* @param config The user-specified snack bar config.
|
|
5690
|
+
*/
|
|
5691
|
+
createOverlay(config) {
|
|
5692
|
+
const overlayConfig = new OverlayConfig();
|
|
5693
|
+
overlayConfig.direction = config.direction;
|
|
5694
|
+
const positionStrategy = this._overlay.position().global();
|
|
5695
|
+
// Set horizontal position.
|
|
5696
|
+
const isRtl = config.direction === 'rtl';
|
|
5697
|
+
const isLeft = config.horizontalPosition === 'left' ||
|
|
5698
|
+
(config.horizontalPosition === 'start' && !isRtl) ||
|
|
5699
|
+
(config.horizontalPosition === 'end' && isRtl);
|
|
5700
|
+
const isRight = !isLeft && config.horizontalPosition !== 'center';
|
|
5701
|
+
if (isLeft) {
|
|
5702
|
+
positionStrategy.left('0');
|
|
5703
|
+
}
|
|
5704
|
+
else if (isRight) {
|
|
5705
|
+
positionStrategy.right('0');
|
|
5706
|
+
}
|
|
5707
|
+
else {
|
|
5708
|
+
positionStrategy.centerHorizontally();
|
|
5709
|
+
}
|
|
5710
|
+
// Set horizontal position.
|
|
5711
|
+
if (config.verticalPosition === 'top') {
|
|
5712
|
+
positionStrategy.top('0');
|
|
5713
|
+
}
|
|
5714
|
+
else {
|
|
5715
|
+
positionStrategy.bottom('0');
|
|
5716
|
+
}
|
|
5717
|
+
overlayConfig.positionStrategy = positionStrategy;
|
|
5718
|
+
return this._overlay.create(overlayConfig);
|
|
5719
|
+
}
|
|
5720
|
+
/**
|
|
5721
|
+
* Creates an injector to be used inside of a snack bar component.
|
|
5722
|
+
* @param config Config that was used to create the snack bar.
|
|
5723
|
+
* @param snackBarRef Reference to the snack bar.
|
|
5724
|
+
*/
|
|
5725
|
+
createInjector(config, snackBarRef) {
|
|
5726
|
+
const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;
|
|
5727
|
+
return new PortalInjector(userInjector || this._injector, new WeakMap([
|
|
5728
|
+
[BaoSnackBarRef, snackBarRef],
|
|
5729
|
+
[BAO_SNACK_BAR_DATA, config.data]
|
|
5730
|
+
]));
|
|
5731
|
+
}
|
|
5732
|
+
}
|
|
5733
|
+
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 });
|
|
5734
|
+
BaoSnackBarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSnackBarService, providedIn: 'root' });
|
|
5735
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSnackBarService, decorators: [{
|
|
5736
|
+
type: Injectable,
|
|
5737
|
+
args: [{ providedIn: 'root' }]
|
|
5738
|
+
}], ctorParameters: function () { return [{ type: i1$4.Overlay }, { type: i1$3.LiveAnnouncer }, { type: i0.Injector }, { type: BaoSnackBarService, decorators: [{
|
|
5739
|
+
type: Optional
|
|
5740
|
+
}, {
|
|
5741
|
+
type: SkipSelf
|
|
5742
|
+
}] }, { type: BaoSnackBarConfig, decorators: [{
|
|
5743
|
+
type: Inject,
|
|
5744
|
+
args: [BAO_SNACK_BAR_DEFAULT_OPTIONS]
|
|
5745
|
+
}] }]; } });
|
|
5746
|
+
|
|
5747
|
+
/*
|
|
5748
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
5749
|
+
* Licensed under the MIT license.
|
|
5750
|
+
* See LICENSE file in the project root for full license information.
|
|
5751
|
+
*/
|
|
5752
|
+
const SNACKBAR_DIRECTIVES = [
|
|
5753
|
+
BaoSimpleSnackBarComponent,
|
|
5754
|
+
BaoSnackBarContainerComponent
|
|
5755
|
+
];
|
|
5756
|
+
class BaoSnackBarModule {
|
|
5757
|
+
}
|
|
5758
|
+
BaoSnackBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSnackBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5759
|
+
BaoSnackBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoSnackBarModule, declarations: [BaoSimpleSnackBarComponent,
|
|
5760
|
+
BaoSnackBarContainerComponent], imports: [CommonModule,
|
|
5761
|
+
OverlayModule,
|
|
5762
|
+
PortalModule,
|
|
5763
|
+
BaoButtonModule,
|
|
5764
|
+
BaoIconModule], exports: [BaoSimpleSnackBarComponent,
|
|
5765
|
+
BaoSnackBarContainerComponent] });
|
|
5766
|
+
BaoSnackBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSnackBarModule, providers: [BaoSnackBarService], imports: [CommonModule,
|
|
5767
|
+
OverlayModule,
|
|
5768
|
+
PortalModule,
|
|
5769
|
+
BaoButtonModule,
|
|
5770
|
+
BaoIconModule] });
|
|
5771
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSnackBarModule, decorators: [{
|
|
5772
|
+
type: NgModule,
|
|
5773
|
+
args: [{
|
|
5774
|
+
imports: [
|
|
5775
|
+
CommonModule,
|
|
5776
|
+
OverlayModule,
|
|
5777
|
+
PortalModule,
|
|
5778
|
+
BaoButtonModule,
|
|
5779
|
+
BaoIconModule
|
|
5780
|
+
],
|
|
5781
|
+
providers: [BaoSnackBarService],
|
|
5782
|
+
declarations: SNACKBAR_DIRECTIVES,
|
|
5783
|
+
exports: SNACKBAR_DIRECTIVES,
|
|
5784
|
+
entryComponents: [SNACKBAR_DIRECTIVES]
|
|
5785
|
+
}]
|
|
5786
|
+
}] });
|
|
5787
|
+
|
|
5788
|
+
/*
|
|
5789
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
5790
|
+
* Licensed under the MIT license.
|
|
5791
|
+
* See LICENSE file in the project root for full license information.
|
|
5792
|
+
*/
|
|
5793
|
+
const Breakpoints = {
|
|
5794
|
+
XSmall: '(max-width: 575.98px)',
|
|
5795
|
+
Small: '(min-width: 576px) and (max-width: 767.98px)',
|
|
5796
|
+
Medium: '(min-width: 768px) and (max-width: 991.98px)',
|
|
5797
|
+
Large: '(min-width: 992px) and (max-width: 1199.98px)',
|
|
5798
|
+
XLarge: '(min-width: 1200px)'
|
|
5799
|
+
};
|
|
5800
|
+
|
|
4951
5801
|
/*
|
|
4952
|
-
* Copyright (c)
|
|
5802
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
5803
|
+
* Licensed under the MIT license.
|
|
5804
|
+
* See LICENSE file in the project root for full license information.
|
|
5805
|
+
*/
|
|
5806
|
+
|
|
5807
|
+
/**
|
|
5808
|
+
* This component is dynamically added to replace breadcrumb when System Header is viewed on tablet or mobile screens.
|
|
5809
|
+
* Used internally by BaoSystemHeaderComponent only, not to be used by host application.
|
|
5810
|
+
*/
|
|
5811
|
+
class BaoBackNavigationComponent {
|
|
5812
|
+
constructor(renderer, elementRef) {
|
|
5813
|
+
this.renderer = renderer;
|
|
5814
|
+
this.elementRef = elementRef;
|
|
5815
|
+
}
|
|
5816
|
+
ngOnChanges(changes) {
|
|
5817
|
+
if (changes['link'] && changes['link'].currentValue) {
|
|
5818
|
+
this.renderer.setAttribute(this.elementRef.nativeElement.children[0], 'href', changes['link'].currentValue);
|
|
5819
|
+
}
|
|
5820
|
+
}
|
|
5821
|
+
}
|
|
5822
|
+
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 });
|
|
5823
|
+
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>
|
|
5824
|
+
<bao-icon
|
|
5825
|
+
color="action"
|
|
5826
|
+
title="arrow-left"
|
|
5827
|
+
svgIcon="icon-arrow-left"
|
|
5828
|
+
size="x-small"
|
|
5829
|
+
></bao-icon>
|
|
5830
|
+
</a>`, isInline: true, dependencies: [{ kind: "component", type: BaoIconComponent, selector: "bao-icon", inputs: ["color", "size", "svgIcon", "title"], exportAs: ["baoIcon"] }] });
|
|
5831
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoBackNavigationComponent, decorators: [{
|
|
5832
|
+
type: Component,
|
|
5833
|
+
args: [{
|
|
5834
|
+
selector: 'bao-back-navigation-component',
|
|
5835
|
+
template: ` <a>
|
|
5836
|
+
<bao-icon
|
|
5837
|
+
color="action"
|
|
5838
|
+
title="arrow-left"
|
|
5839
|
+
svgIcon="icon-arrow-left"
|
|
5840
|
+
size="x-small"
|
|
5841
|
+
></bao-icon>
|
|
5842
|
+
</a>`,
|
|
5843
|
+
host: {
|
|
5844
|
+
class: 'bao-system-header-back-button'
|
|
5845
|
+
}
|
|
5846
|
+
}]
|
|
5847
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { link: [{
|
|
5848
|
+
type: Input
|
|
5849
|
+
}] } });
|
|
5850
|
+
/**
|
|
5851
|
+
* This directive is to mark the template where the BaoBackNavigationComponent should be dynamically inserted,
|
|
5852
|
+
* when a Breadcrumb component needs to be replaced
|
|
5853
|
+
*/
|
|
5854
|
+
class BaoBackNavigationInsert {
|
|
5855
|
+
constructor(viewContainerRef) {
|
|
5856
|
+
this.viewContainerRef = viewContainerRef;
|
|
5857
|
+
}
|
|
5858
|
+
}
|
|
5859
|
+
BaoBackNavigationInsert.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoBackNavigationInsert, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
5860
|
+
BaoBackNavigationInsert.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoBackNavigationInsert, selector: "[backNavigationInsert]", ngImport: i0 });
|
|
5861
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoBackNavigationInsert, decorators: [{
|
|
5862
|
+
type: Directive,
|
|
5863
|
+
args: [{
|
|
5864
|
+
selector: '[backNavigationInsert]'
|
|
5865
|
+
}]
|
|
5866
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; } });
|
|
5867
|
+
class BaoSystemHeaderComponent {
|
|
5868
|
+
constructor(breakpointObserver, renderer) {
|
|
5869
|
+
this.breakpointObserver = breakpointObserver;
|
|
5870
|
+
this.renderer = renderer;
|
|
5871
|
+
this.screenType = 'desktop';
|
|
5872
|
+
}
|
|
5873
|
+
get textContainerChildren() {
|
|
5874
|
+
return Array.from(this.textContainer.nativeElement.children);
|
|
5875
|
+
}
|
|
5876
|
+
ngOnInit() {
|
|
5877
|
+
if ([Breakpoints.XSmall, Breakpoints.Small].some(size => this.breakpointObserver.isMatched(size))) {
|
|
5878
|
+
this.screenType = 'mobile';
|
|
5879
|
+
}
|
|
5880
|
+
else if (this.breakpointObserver.isMatched(Breakpoints.Medium)) {
|
|
5881
|
+
this.screenType = 'tablet';
|
|
5882
|
+
}
|
|
5883
|
+
else if ([Breakpoints.Large, Breakpoints.XLarge].some(size => this.breakpointObserver.isMatched(size))) {
|
|
5884
|
+
this.screenType = 'desktop';
|
|
5885
|
+
}
|
|
5886
|
+
}
|
|
5887
|
+
ngAfterViewInit() {
|
|
5888
|
+
this.formatNavigation();
|
|
5889
|
+
this.applySizeClass();
|
|
5890
|
+
}
|
|
5891
|
+
formatNavigation() {
|
|
5892
|
+
// If view is rendered on a mobile/tablet screen
|
|
5893
|
+
if (this.screenType == 'mobile' || this.screenType == 'tablet') {
|
|
5894
|
+
if (this.textContainerChildren[0].className == 'bao-breadcrumb') {
|
|
5895
|
+
// Retrieve link of parent page
|
|
5896
|
+
const breadcrumbElementsList = this.textContainerChildren[0].children[0];
|
|
5897
|
+
const breadcrumbLength = breadcrumbElementsList.children.length;
|
|
5898
|
+
const parentLink = breadcrumbElementsList.children[breadcrumbLength - 2].attributes['href'].value;
|
|
5899
|
+
// Remove Breadcrumb component and replace it with back button
|
|
5900
|
+
this.renderer.removeChild(this.textContainer.nativeElement, this.textContainerChildren[0]);
|
|
5901
|
+
const viewContainerRef = this.backButtonInsert.viewContainerRef;
|
|
5902
|
+
viewContainerRef.clear();
|
|
5903
|
+
const componentRef = viewContainerRef.createComponent(BaoBackNavigationComponent);
|
|
5904
|
+
componentRef.instance.link = parentLink;
|
|
5905
|
+
}
|
|
5906
|
+
}
|
|
5907
|
+
}
|
|
5908
|
+
applySizeClass() {
|
|
5909
|
+
const tagInfoContainer = this.textContainer.nativeElement.childNodes[this.textContainerChildren.length - 1];
|
|
5910
|
+
if (this.screenType === 'mobile') {
|
|
5911
|
+
this.renderer.addClass(tagInfoContainer, 'mobile');
|
|
5912
|
+
}
|
|
5913
|
+
}
|
|
5914
|
+
}
|
|
5915
|
+
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 });
|
|
5916
|
+
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 });
|
|
5917
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSystemHeaderComponent, decorators: [{
|
|
5918
|
+
type: Component,
|
|
5919
|
+
args: [{ selector: 'bao-system-header', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
5920
|
+
class: 'bao-system-header'
|
|
5921
|
+
}, 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"] }]
|
|
5922
|
+
}], ctorParameters: function () { return [{ type: i2$1.BreakpointObserver }, { type: i0.Renderer2 }]; }, propDecorators: { textContainer: [{
|
|
5923
|
+
type: ViewChild,
|
|
5924
|
+
args: ['textContainer', { static: false }]
|
|
5925
|
+
}], backButtonInsert: [{
|
|
5926
|
+
type: ViewChild,
|
|
5927
|
+
args: [BaoBackNavigationInsert, { static: true }]
|
|
5928
|
+
}] } });
|
|
5929
|
+
|
|
5930
|
+
/*
|
|
5931
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
5932
|
+
* Licensed under the MIT license.
|
|
5933
|
+
* See LICENSE file in the project root for full license information.
|
|
5934
|
+
*/
|
|
5935
|
+
const SYSTEM_HEADER_DIRECTIVES = [
|
|
5936
|
+
BaoSystemHeaderComponent,
|
|
5937
|
+
BaoBackNavigationInsert,
|
|
5938
|
+
BaoBackNavigationComponent
|
|
5939
|
+
];
|
|
5940
|
+
class BaoSystemHeaderModule {
|
|
5941
|
+
}
|
|
5942
|
+
BaoSystemHeaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSystemHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5943
|
+
BaoSystemHeaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoSystemHeaderModule, declarations: [BaoSystemHeaderComponent,
|
|
5944
|
+
BaoBackNavigationInsert,
|
|
5945
|
+
BaoBackNavigationComponent], imports: [CommonModule, BaoIconModule], exports: [BaoSystemHeaderComponent,
|
|
5946
|
+
BaoBackNavigationInsert,
|
|
5947
|
+
BaoBackNavigationComponent] });
|
|
5948
|
+
BaoSystemHeaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSystemHeaderModule, imports: [CommonModule, BaoIconModule] });
|
|
5949
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSystemHeaderModule, decorators: [{
|
|
5950
|
+
type: NgModule,
|
|
5951
|
+
args: [{
|
|
5952
|
+
imports: [CommonModule, BaoIconModule],
|
|
5953
|
+
declarations: [SYSTEM_HEADER_DIRECTIVES],
|
|
5954
|
+
exports: [SYSTEM_HEADER_DIRECTIVES]
|
|
5955
|
+
}]
|
|
5956
|
+
}] });
|
|
5957
|
+
|
|
5958
|
+
/*
|
|
5959
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
5960
|
+
* Licensed under the MIT license.
|
|
5961
|
+
* See LICENSE file in the project root for full license information.
|
|
5962
|
+
*/
|
|
5963
|
+
|
|
5964
|
+
/*
|
|
5965
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
4953
5966
|
* Licensed under the MIT license.
|
|
4954
5967
|
* See LICENSE file in the project root for full license information.
|
|
4955
5968
|
*/
|
|
@@ -4978,9 +5991,10 @@ BaoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
|
4978
5991
|
BaoModalModule,
|
|
4979
5992
|
BaoHyperlinkModule,
|
|
4980
5993
|
BaoDropdownMenuModule,
|
|
4981
|
-
BaoFileModule
|
|
5994
|
+
BaoFileModule,
|
|
5995
|
+
BaoSnackBarModule,
|
|
5996
|
+
BaoSystemHeaderModule
|
|
4982
5997
|
// TODO: reactivate once component does not depend on global css BaoBadgeModule,
|
|
4983
|
-
// TODO: reactivate once component does not depend on global css BaoSnackBarModule,
|
|
4984
5998
|
] });
|
|
4985
5999
|
BaoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModule, imports: [BaoIconModule,
|
|
4986
6000
|
BaoButtonModule,
|
|
@@ -5004,9 +6018,10 @@ BaoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.
|
|
|
5004
6018
|
BaoModalModule,
|
|
5005
6019
|
BaoHyperlinkModule,
|
|
5006
6020
|
BaoDropdownMenuModule,
|
|
5007
|
-
BaoFileModule
|
|
6021
|
+
BaoFileModule,
|
|
6022
|
+
BaoSnackBarModule,
|
|
6023
|
+
BaoSystemHeaderModule
|
|
5008
6024
|
// TODO: reactivate once component does not depend on global css BaoBadgeModule,
|
|
5009
|
-
// TODO: reactivate once component does not depend on global css BaoSnackBarModule,
|
|
5010
6025
|
] });
|
|
5011
6026
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModule, decorators: [{
|
|
5012
6027
|
type: NgModule,
|
|
@@ -5037,15 +6052,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
5037
6052
|
BaoModalModule,
|
|
5038
6053
|
BaoHyperlinkModule,
|
|
5039
6054
|
BaoDropdownMenuModule,
|
|
5040
|
-
BaoFileModule
|
|
6055
|
+
BaoFileModule,
|
|
6056
|
+
BaoSnackBarModule,
|
|
6057
|
+
BaoSystemHeaderModule
|
|
5041
6058
|
// TODO: reactivate once component does not depend on global css BaoBadgeModule,
|
|
5042
|
-
// TODO: reactivate once component does not depend on global css BaoSnackBarModule,
|
|
5043
6059
|
]
|
|
5044
6060
|
}]
|
|
5045
6061
|
}] });
|
|
5046
6062
|
|
|
5047
6063
|
/*
|
|
5048
|
-
* Copyright (c)
|
|
6064
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
5049
6065
|
* Licensed under the MIT license.
|
|
5050
6066
|
* See LICENSE file in the project root for full license information.
|
|
5051
6067
|
*/
|
|
@@ -5070,7 +6086,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
5070
6086
|
}] } });
|
|
5071
6087
|
|
|
5072
6088
|
/*
|
|
5073
|
-
* Copyright (c)
|
|
6089
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
5074
6090
|
* Licensed under the MIT license.
|
|
5075
6091
|
* See LICENSE file in the project root for full license information.
|
|
5076
6092
|
*/
|
|
@@ -5090,31 +6106,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
5090
6106
|
}] });
|
|
5091
6107
|
|
|
5092
6108
|
/*
|
|
5093
|
-
* Copyright (c)
|
|
6109
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
6110
|
+
* Licensed under the MIT license.
|
|
6111
|
+
* See LICENSE file in the project root for full license information.
|
|
6112
|
+
*/
|
|
6113
|
+
|
|
6114
|
+
/*
|
|
6115
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
5094
6116
|
* Licensed under the MIT license.
|
|
5095
6117
|
* See LICENSE file in the project root for full license information.
|
|
5096
6118
|
*/
|
|
5097
6119
|
|
|
5098
6120
|
/*
|
|
5099
|
-
* Copyright (c)
|
|
6121
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
5100
6122
|
* Licensed under the MIT license.
|
|
5101
6123
|
* See LICENSE file in the project root for full license information.
|
|
5102
6124
|
*/
|
|
5103
6125
|
|
|
5104
6126
|
/*
|
|
5105
|
-
* Copyright (c)
|
|
6127
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
5106
6128
|
* Licensed under the MIT license.
|
|
5107
6129
|
* See LICENSE file in the project root for full license information.
|
|
5108
6130
|
*/
|
|
5109
6131
|
|
|
5110
6132
|
/*
|
|
5111
|
-
* Copyright (c)
|
|
6133
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
5112
6134
|
* Licensed under the MIT license.
|
|
5113
6135
|
* See LICENSE file in the project root for full license information.
|
|
5114
6136
|
*/
|
|
5115
6137
|
|
|
5116
6138
|
/*
|
|
5117
|
-
* Copyright (c)
|
|
6139
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
5118
6140
|
* Licensed under the MIT license.
|
|
5119
6141
|
* See LICENSE file in the project root for full license information.
|
|
5120
6142
|
*/
|
|
@@ -5123,5 +6145,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
5123
6145
|
* Generated bundle index. Do not edit.
|
|
5124
6146
|
*/
|
|
5125
6147
|
|
|
5126
|
-
export { BAO_FILE_INTL_PROVIDER, BAO_FILE_INTL_PROVIDER_FACTORY, 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, 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, BaoSummaryComponent, BaoSummaryDescription, BaoSummaryModule, BaoTabHeader, BaoTabPanel, BaoTablistComponent, BaoTabsContainer, BaoTabsModule, BaoTagComponent, BaoTagModule, BaoTitleTextComponent, _BaoModalContainerBase, _closeModalVia, eModalDesktopWidthSize, eModalMobileWidthSize, throwBaoModalContentAlreadyAttachedError };
|
|
6148
|
+
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 };
|
|
5127
6149
|
//# sourceMappingURL=villedemontreal-angular-ui.mjs.map
|