@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,11 +12,15 @@ import * as i2 from '@angular/cdk/collections';
|
|
|
12
12
|
import * as i1$4 from '@angular/cdk/overlay';
|
|
13
13
|
import { OverlayConfig, OverlayModule } from '@angular/cdk/overlay';
|
|
14
14
|
import * as i3 from '@angular/cdk/portal';
|
|
15
|
-
import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal, PortalModule, DomPortal } from '@angular/cdk/portal';
|
|
15
|
+
import { BasePortalOutlet, CdkPortalOutlet, ComponentPortal, TemplatePortal, PortalModule, DomPortal, PortalInjector } from '@angular/cdk/portal';
|
|
16
16
|
import { Subject, filter, take, defer, startWith } from 'rxjs';
|
|
17
17
|
import { __awaiter } from 'tslib';
|
|
18
|
+
import * as i1$5 from '@angular/cdk/platform';
|
|
18
19
|
import { _getFocusedElementPierceShadowDom } from '@angular/cdk/platform';
|
|
19
20
|
import { ESCAPE, hasModifierKey } from '@angular/cdk/keycodes';
|
|
21
|
+
import { take as take$1 } from 'rxjs/operators';
|
|
22
|
+
import { trigger, state, style, transition, animate } from '@angular/animations';
|
|
23
|
+
import * as i2$1 from '@angular/cdk/layout';
|
|
20
24
|
|
|
21
25
|
function baoColorToHex(baoColor) {
|
|
22
26
|
switch (baoColor) {
|
|
@@ -44,7 +48,7 @@ function baoColorToHex(baoColor) {
|
|
|
44
48
|
}
|
|
45
49
|
|
|
46
50
|
/*
|
|
47
|
-
* Copyright (c)
|
|
51
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
48
52
|
* Licensed under the MIT license.
|
|
49
53
|
* See LICENSE file in the project root for full license information.
|
|
50
54
|
*/
|
|
@@ -169,7 +173,7 @@ const ICONS_DCT = {
|
|
|
169
173
|
};
|
|
170
174
|
|
|
171
175
|
/*
|
|
172
|
-
* Copyright (c)
|
|
176
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
173
177
|
* Licensed under the MIT license.
|
|
174
178
|
* See LICENSE file in the project root for full license information.
|
|
175
179
|
*/
|
|
@@ -210,7 +214,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
210
214
|
} });
|
|
211
215
|
|
|
212
216
|
/*
|
|
213
|
-
* Copyright (c)
|
|
217
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
214
218
|
* Licensed under the MIT license.
|
|
215
219
|
* See LICENSE file in the project root for full license information.
|
|
216
220
|
*/
|
|
@@ -311,6 +315,7 @@ class BaoIconComponent {
|
|
|
311
315
|
let svg = this.iconRegistry.getNamedSvgIcon(iconName);
|
|
312
316
|
if (title) {
|
|
313
317
|
svg = this.addTitleToSVG(svg, title);
|
|
318
|
+
this.removeTitleAttributeFromHost();
|
|
314
319
|
}
|
|
315
320
|
if (!title) {
|
|
316
321
|
svg.setAttribute('aria-hidden', 'true');
|
|
@@ -327,6 +332,9 @@ class BaoIconComponent {
|
|
|
327
332
|
svg.setAttribute('aria-labelledby', this._titleId);
|
|
328
333
|
return svg;
|
|
329
334
|
}
|
|
335
|
+
removeTitleAttributeFromHost() {
|
|
336
|
+
this.renderer.removeAttribute(this.elementRef.nativeElement, 'title');
|
|
337
|
+
}
|
|
330
338
|
generateUniqueTitleId() {
|
|
331
339
|
return this.title
|
|
332
340
|
? `${this.title
|
|
@@ -336,12 +344,10 @@ class BaoIconComponent {
|
|
|
336
344
|
}
|
|
337
345
|
}
|
|
338
346
|
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 });
|
|
339
|
-
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: {
|
|
347
|
+
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 });
|
|
340
348
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoIconComponent, decorators: [{
|
|
341
349
|
type: Component,
|
|
342
350
|
args: [{ template: '<ng-content></ng-content>', selector: 'bao-icon', exportAs: 'baoIcon', host: {
|
|
343
|
-
role: 'img',
|
|
344
|
-
// '[class]': "'bao-icon notranslate ' + svgIcon",
|
|
345
351
|
'[class.bao-icon]': 'true',
|
|
346
352
|
'[class.notranslate]': 'true',
|
|
347
353
|
'[class.bao-icon-medium]': 'size === "medium"',
|
|
@@ -362,27 +368,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
362
368
|
}] } });
|
|
363
369
|
|
|
364
370
|
/*
|
|
365
|
-
* Copyright (c)
|
|
366
|
-
* Licensed under the MIT license.
|
|
367
|
-
* See LICENSE file in the project root for full license information.
|
|
368
|
-
*/
|
|
369
|
-
const ICON_DIRECTIVES = [BaoIconComponent];
|
|
370
|
-
class BaoIconModule {
|
|
371
|
-
}
|
|
372
|
-
BaoIconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
373
|
-
BaoIconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoIconModule, declarations: [BaoIconComponent], imports: [CommonModule], exports: [BaoIconComponent] });
|
|
374
|
-
BaoIconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoIconModule, imports: [CommonModule] });
|
|
375
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoIconModule, decorators: [{
|
|
376
|
-
type: NgModule,
|
|
377
|
-
args: [{
|
|
378
|
-
imports: [CommonModule],
|
|
379
|
-
declarations: ICON_DIRECTIVES,
|
|
380
|
-
exports: ICON_DIRECTIVES
|
|
381
|
-
}]
|
|
382
|
-
}] });
|
|
383
|
-
|
|
384
|
-
/*
|
|
385
|
-
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
371
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
386
372
|
* Licensed under the MIT license.
|
|
387
373
|
* See LICENSE file in the project root for full license information.
|
|
388
374
|
*/
|
|
@@ -432,7 +418,7 @@ class BaoButtonComponent {
|
|
|
432
418
|
get nativeElement() {
|
|
433
419
|
return this.elementRef.nativeElement;
|
|
434
420
|
}
|
|
435
|
-
|
|
421
|
+
ngAfterContentInit() {
|
|
436
422
|
const childNodes = Array.from(this.nativeElement.childNodes);
|
|
437
423
|
const textIndex = childNodes.findIndex(c => c.nodeType === Node.TEXT_NODE);
|
|
438
424
|
this.noText = textIndex === -1;
|
|
@@ -478,27 +464,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
478
464
|
}] } });
|
|
479
465
|
|
|
480
466
|
/*
|
|
481
|
-
* Copyright (c)
|
|
482
|
-
* Licensed under the MIT license.
|
|
483
|
-
* See LICENSE file in the project root for full license information.
|
|
484
|
-
*/
|
|
485
|
-
const BUTTON_DIRECTIVES = [BaoButtonComponent];
|
|
486
|
-
class BaoButtonModule {
|
|
487
|
-
}
|
|
488
|
-
BaoButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
489
|
-
BaoButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoButtonModule, declarations: [BaoButtonComponent], imports: [CommonModule, BaoIconModule], exports: [BaoButtonComponent, BaoIconModule] });
|
|
490
|
-
BaoButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoButtonModule, imports: [CommonModule, BaoIconModule, BaoIconModule] });
|
|
491
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoButtonModule, decorators: [{
|
|
492
|
-
type: NgModule,
|
|
493
|
-
args: [{
|
|
494
|
-
imports: [CommonModule, BaoIconModule],
|
|
495
|
-
declarations: BUTTON_DIRECTIVES,
|
|
496
|
-
exports: [...BUTTON_DIRECTIVES, BaoIconModule]
|
|
497
|
-
}]
|
|
498
|
-
}] });
|
|
499
|
-
|
|
500
|
-
/*
|
|
501
|
-
* Copyright (c) 2023 Ville de Montreal. All rights reserved.
|
|
467
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
502
468
|
* Licensed under the MIT license.
|
|
503
469
|
* See LICENSE file in the project root for full license information.
|
|
504
470
|
*/
|
|
@@ -601,12 +567,15 @@ class BaoAlertComponent {
|
|
|
601
567
|
*/
|
|
602
568
|
this.type = 'info';
|
|
603
569
|
this.dismissible = false;
|
|
570
|
+
this.dismissibleButtonAriaLabel = 'Cacher le message';
|
|
604
571
|
this.dismiss = new EventEmitter();
|
|
605
572
|
}
|
|
606
573
|
ngOnChanges(changes) {
|
|
607
574
|
if (changes['type']) {
|
|
608
575
|
this.iconType = this.alertTypeIcon(changes['type'].currentValue);
|
|
609
|
-
this.iconTitle =
|
|
576
|
+
this.iconTitle =
|
|
577
|
+
this.alertTypeTitle ||
|
|
578
|
+
this.alertTitleIcon(changes['type'].currentValue);
|
|
610
579
|
}
|
|
611
580
|
}
|
|
612
581
|
alertTypeIcon(value) {
|
|
@@ -634,7 +603,7 @@ class BaoAlertComponent {
|
|
|
634
603
|
}
|
|
635
604
|
}
|
|
636
605
|
BaoAlertComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoAlertComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
637
|
-
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=\"
|
|
606
|
+
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 });
|
|
638
607
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoAlertComponent, decorators: [{
|
|
639
608
|
type: Component,
|
|
640
609
|
args: [{ selector: 'bao-alert', encapsulation: ViewEncapsulation.None, host: {
|
|
@@ -645,17 +614,61 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
645
614
|
'[class.bao-alert-info]': 'type === "info"',
|
|
646
615
|
'[class.bao-alert-emergency]': 'type === "emergency"',
|
|
647
616
|
role: 'alert'
|
|
648
|
-
}, 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=\"
|
|
617
|
+
}, 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"] }]
|
|
649
618
|
}], propDecorators: { type: [{
|
|
650
619
|
type: Input
|
|
651
620
|
}], dismissible: [{
|
|
652
621
|
type: Input
|
|
622
|
+
}], alertTypeTitle: [{
|
|
623
|
+
type: Input
|
|
624
|
+
}], dismissibleButtonAriaLabel: [{
|
|
625
|
+
type: Input
|
|
653
626
|
}], dismiss: [{
|
|
654
627
|
type: Output
|
|
655
628
|
}] } });
|
|
656
629
|
|
|
657
630
|
/*
|
|
658
|
-
* Copyright (c)
|
|
631
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
632
|
+
* Licensed under the MIT license.
|
|
633
|
+
* See LICENSE file in the project root for full license information.
|
|
634
|
+
*/
|
|
635
|
+
const ICON_DIRECTIVES = [BaoIconComponent];
|
|
636
|
+
class BaoIconModule {
|
|
637
|
+
}
|
|
638
|
+
BaoIconModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoIconModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
639
|
+
BaoIconModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoIconModule, declarations: [BaoIconComponent], imports: [CommonModule], exports: [BaoIconComponent] });
|
|
640
|
+
BaoIconModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoIconModule, imports: [CommonModule] });
|
|
641
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoIconModule, decorators: [{
|
|
642
|
+
type: NgModule,
|
|
643
|
+
args: [{
|
|
644
|
+
imports: [CommonModule],
|
|
645
|
+
declarations: ICON_DIRECTIVES,
|
|
646
|
+
exports: ICON_DIRECTIVES
|
|
647
|
+
}]
|
|
648
|
+
}] });
|
|
649
|
+
|
|
650
|
+
/*
|
|
651
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
652
|
+
* Licensed under the MIT license.
|
|
653
|
+
* See LICENSE file in the project root for full license information.
|
|
654
|
+
*/
|
|
655
|
+
const BUTTON_DIRECTIVES = [BaoButtonComponent];
|
|
656
|
+
class BaoButtonModule {
|
|
657
|
+
}
|
|
658
|
+
BaoButtonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoButtonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
659
|
+
BaoButtonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoButtonModule, declarations: [BaoButtonComponent], imports: [CommonModule, BaoIconModule], exports: [BaoButtonComponent, BaoIconModule] });
|
|
660
|
+
BaoButtonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoButtonModule, imports: [CommonModule, BaoIconModule, BaoIconModule] });
|
|
661
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoButtonModule, decorators: [{
|
|
662
|
+
type: NgModule,
|
|
663
|
+
args: [{
|
|
664
|
+
imports: [CommonModule, BaoIconModule],
|
|
665
|
+
declarations: BUTTON_DIRECTIVES,
|
|
666
|
+
exports: [...BUTTON_DIRECTIVES, BaoIconModule]
|
|
667
|
+
}]
|
|
668
|
+
}] });
|
|
669
|
+
|
|
670
|
+
/*
|
|
671
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
659
672
|
* Licensed under the MIT license.
|
|
660
673
|
* See LICENSE file in the project root for full license information.
|
|
661
674
|
*/
|
|
@@ -690,13 +703,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
690
703
|
}] });
|
|
691
704
|
|
|
692
705
|
/*
|
|
693
|
-
* Copyright (c)
|
|
706
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
694
707
|
* Licensed under the MIT license.
|
|
695
708
|
* See LICENSE file in the project root for full license information.
|
|
696
709
|
*/
|
|
697
710
|
|
|
698
711
|
/*
|
|
699
|
-
* Copyright (c)
|
|
712
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
700
713
|
* Licensed under the MIT license.
|
|
701
714
|
* See LICENSE file in the project root for full license information.
|
|
702
715
|
*/
|
|
@@ -729,7 +742,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
729
742
|
}] } });
|
|
730
743
|
|
|
731
744
|
/*
|
|
732
|
-
* Copyright (c)
|
|
745
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
733
746
|
* Licensed under the MIT license.
|
|
734
747
|
* See LICENSE file in the project root for full license information.
|
|
735
748
|
*/
|
|
@@ -749,19 +762,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
749
762
|
}] });
|
|
750
763
|
|
|
751
764
|
/*
|
|
752
|
-
* Copyright (c)
|
|
765
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
753
766
|
* Licensed under the MIT license.
|
|
754
767
|
* See LICENSE file in the project root for full license information.
|
|
755
768
|
*/
|
|
756
769
|
|
|
757
770
|
/*
|
|
758
|
-
* Copyright (c)
|
|
771
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
759
772
|
* Licensed under the MIT license.
|
|
760
773
|
* See LICENSE file in the project root for full license information.
|
|
761
774
|
*/
|
|
762
775
|
|
|
763
776
|
/*
|
|
764
|
-
* Copyright (c)
|
|
777
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
765
778
|
* Licensed under the MIT license.
|
|
766
779
|
* See LICENSE file in the project root for full license information.
|
|
767
780
|
*/
|
|
@@ -853,7 +866,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
853
866
|
}] });
|
|
854
867
|
|
|
855
868
|
/*
|
|
856
|
-
* Copyright (c)
|
|
869
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
857
870
|
* Licensed under the MIT license.
|
|
858
871
|
* See LICENSE file in the project root for full license information.
|
|
859
872
|
*/
|
|
@@ -887,13 +900,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
887
900
|
}] });
|
|
888
901
|
|
|
889
902
|
/*
|
|
890
|
-
* Copyright (c)
|
|
903
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
891
904
|
* Licensed under the MIT license.
|
|
892
905
|
* See LICENSE file in the project root for full license information.
|
|
893
906
|
*/
|
|
894
907
|
|
|
895
908
|
/*
|
|
896
|
-
* Copyright (c)
|
|
909
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
897
910
|
* Licensed under the MIT license.
|
|
898
911
|
* See LICENSE file in the project root for full license information.
|
|
899
912
|
*/
|
|
@@ -907,7 +920,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
907
920
|
}] });
|
|
908
921
|
|
|
909
922
|
/*
|
|
910
|
-
* Copyright (c)
|
|
923
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
911
924
|
* Licensed under the MIT license.
|
|
912
925
|
* See LICENSE file in the project root for full license information.
|
|
913
926
|
*/
|
|
@@ -921,7 +934,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
921
934
|
}] });
|
|
922
935
|
|
|
923
936
|
/*
|
|
924
|
-
* Copyright (c)
|
|
937
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
925
938
|
* Licensed under the MIT license.
|
|
926
939
|
* See LICENSE file in the project root for full license information.
|
|
927
940
|
*/
|
|
@@ -940,7 +953,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
940
953
|
}] } });
|
|
941
954
|
|
|
942
955
|
/*
|
|
943
|
-
* Copyright (c)
|
|
956
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
944
957
|
* Licensed under the MIT license.
|
|
945
958
|
* See LICENSE file in the project root for full license information.
|
|
946
959
|
*/
|
|
@@ -954,7 +967,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
954
967
|
}] });
|
|
955
968
|
|
|
956
969
|
/*
|
|
957
|
-
* Copyright (c)
|
|
970
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
958
971
|
* Licensed under the MIT license.
|
|
959
972
|
* See LICENSE file in the project root for full license information.
|
|
960
973
|
*/
|
|
@@ -985,7 +998,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
985
998
|
}] });
|
|
986
999
|
|
|
987
1000
|
/*
|
|
988
|
-
* Copyright (c)
|
|
1001
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
989
1002
|
* Licensed under the MIT license.
|
|
990
1003
|
* See LICENSE file in the project root for full license information.
|
|
991
1004
|
*/
|
|
@@ -1340,7 +1353,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
1340
1353
|
}] });
|
|
1341
1354
|
|
|
1342
1355
|
/*
|
|
1343
|
-
* Copyright (c)
|
|
1356
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
1344
1357
|
* Licensed under the MIT license.
|
|
1345
1358
|
* See LICENSE file in the project root for full license information.
|
|
1346
1359
|
*/
|
|
@@ -1368,19 +1381,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
1368
1381
|
}] });
|
|
1369
1382
|
|
|
1370
1383
|
/*
|
|
1371
|
-
* Copyright (c)
|
|
1384
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
1372
1385
|
* Licensed under the MIT license.
|
|
1373
1386
|
* See LICENSE file in the project root for full license information.
|
|
1374
1387
|
*/
|
|
1375
1388
|
|
|
1376
1389
|
/*
|
|
1377
|
-
* Copyright (c)
|
|
1390
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
1378
1391
|
* Licensed under the MIT license.
|
|
1379
1392
|
* See LICENSE file in the project root for full license information.
|
|
1380
1393
|
*/
|
|
1381
1394
|
|
|
1382
1395
|
/*
|
|
1383
|
-
* Copyright (c)
|
|
1396
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
1384
1397
|
* Licensed under the MIT license.
|
|
1385
1398
|
* See LICENSE file in the project root for full license information.
|
|
1386
1399
|
*/
|
|
@@ -1481,7 +1494,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
1481
1494
|
}] });
|
|
1482
1495
|
|
|
1483
1496
|
/*
|
|
1484
|
-
* Copyright (c)
|
|
1497
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
1485
1498
|
* Licensed under the MIT license.
|
|
1486
1499
|
* See LICENSE file in the project root for full license information.
|
|
1487
1500
|
*/
|
|
@@ -1518,32 +1531,32 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
1518
1531
|
}] });
|
|
1519
1532
|
|
|
1520
1533
|
/*
|
|
1521
|
-
* Copyright (c)
|
|
1534
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
1522
1535
|
* Licensed under the MIT license.
|
|
1523
1536
|
* See LICENSE file in the project root for full license information.
|
|
1524
1537
|
*/
|
|
1525
1538
|
|
|
1526
1539
|
/*
|
|
1527
|
-
* Copyright (c)
|
|
1540
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
1528
1541
|
* Licensed under the MIT license.
|
|
1529
1542
|
* See LICENSE file in the project root for full license information.
|
|
1530
1543
|
*/
|
|
1531
1544
|
|
|
1532
1545
|
/*
|
|
1533
|
-
* Copyright (c)
|
|
1546
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
1534
1547
|
* Licensed under the MIT license.
|
|
1535
1548
|
* See LICENSE file in the project root for full license information.
|
|
1536
1549
|
*/
|
|
1537
1550
|
class BaoListItem {
|
|
1538
1551
|
}
|
|
1539
1552
|
BaoListItem.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoListItem, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1540
|
-
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 });
|
|
1553
|
+
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 });
|
|
1541
1554
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoListItem, decorators: [{
|
|
1542
1555
|
type: Component,
|
|
1543
1556
|
args: [{ selector: 'bao-list-item, [bao-list-item]', encapsulation: ViewEncapsulation.None, host: {
|
|
1544
1557
|
class: 'bao-list-item',
|
|
1545
1558
|
role: 'listitem'
|
|
1546
|
-
}, 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"] }]
|
|
1559
|
+
}, 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"] }]
|
|
1547
1560
|
}] });
|
|
1548
1561
|
class BaoList {
|
|
1549
1562
|
}
|
|
@@ -1601,7 +1614,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
1601
1614
|
}] });
|
|
1602
1615
|
|
|
1603
1616
|
/*
|
|
1604
|
-
* Copyright (c)
|
|
1617
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
1605
1618
|
* Licensed under the MIT license.
|
|
1606
1619
|
* See LICENSE file in the project root for full license information.
|
|
1607
1620
|
*/
|
|
@@ -1635,13 +1648,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
1635
1648
|
}] });
|
|
1636
1649
|
|
|
1637
1650
|
/*
|
|
1638
|
-
* Copyright (c)
|
|
1651
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
1639
1652
|
* Licensed under the MIT license.
|
|
1640
1653
|
* See LICENSE file in the project root for full license information.
|
|
1641
1654
|
*/
|
|
1642
1655
|
|
|
1643
1656
|
/*
|
|
1644
|
-
* Copyright (c)
|
|
1657
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
1645
1658
|
* Licensed under the MIT license.
|
|
1646
1659
|
* See LICENSE file in the project root for full license information.
|
|
1647
1660
|
*/
|
|
@@ -2169,7 +2182,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2169
2182
|
}] });
|
|
2170
2183
|
|
|
2171
2184
|
/*
|
|
2172
|
-
* Copyright (c)
|
|
2185
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2173
2186
|
* Licensed under the MIT license.
|
|
2174
2187
|
* See LICENSE file in the project root for full license information.
|
|
2175
2188
|
*/
|
|
@@ -2214,13 +2227,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2214
2227
|
}] });
|
|
2215
2228
|
|
|
2216
2229
|
/*
|
|
2217
|
-
* Copyright (c)
|
|
2230
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2218
2231
|
* Licensed under the MIT license.
|
|
2219
2232
|
* See LICENSE file in the project root for full license information.
|
|
2220
2233
|
*/
|
|
2221
2234
|
|
|
2222
2235
|
/*
|
|
2223
|
-
* Copyright (c)
|
|
2236
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2224
2237
|
* Licensed under the MIT license.
|
|
2225
2238
|
* See LICENSE file in the project root for full license information.
|
|
2226
2239
|
*/
|
|
@@ -2293,7 +2306,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2293
2306
|
}] } });
|
|
2294
2307
|
|
|
2295
2308
|
/*
|
|
2296
|
-
* Copyright (c)
|
|
2309
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2297
2310
|
* Licensed under the MIT license.
|
|
2298
2311
|
* See LICENSE file in the project root for full license information.
|
|
2299
2312
|
*/
|
|
@@ -2313,13 +2326,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2313
2326
|
}] });
|
|
2314
2327
|
|
|
2315
2328
|
/*
|
|
2316
|
-
* Copyright (c)
|
|
2329
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2317
2330
|
* Licensed under the MIT license.
|
|
2318
2331
|
* See LICENSE file in the project root for full license information.
|
|
2319
2332
|
*/
|
|
2320
2333
|
|
|
2321
2334
|
/*
|
|
2322
|
-
* Copyright (c)
|
|
2335
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2323
2336
|
* Licensed under the MIT license.
|
|
2324
2337
|
* See LICENSE file in the project root for full license information.
|
|
2325
2338
|
*/
|
|
@@ -2410,7 +2423,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2410
2423
|
}] });
|
|
2411
2424
|
|
|
2412
2425
|
/*
|
|
2413
|
-
* Copyright (c)
|
|
2426
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2414
2427
|
* Licensed under the MIT license.
|
|
2415
2428
|
* See LICENSE file in the project root for full license information.
|
|
2416
2429
|
*/
|
|
@@ -2438,7 +2451,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2438
2451
|
}] });
|
|
2439
2452
|
|
|
2440
2453
|
/*
|
|
2441
|
-
* Copyright (c)
|
|
2454
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2442
2455
|
* Licensed under the MIT license.
|
|
2443
2456
|
* See LICENSE file in the project root for full license information.
|
|
2444
2457
|
*/
|
|
@@ -2469,13 +2482,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2469
2482
|
}] });
|
|
2470
2483
|
|
|
2471
2484
|
/*
|
|
2472
|
-
* Copyright (c)
|
|
2485
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2473
2486
|
* Licensed under the MIT license.
|
|
2474
2487
|
* See LICENSE file in the project root for full license information.
|
|
2475
2488
|
*/
|
|
2476
2489
|
|
|
2477
2490
|
/*
|
|
2478
|
-
* Copyright (c)
|
|
2491
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2479
2492
|
* Licensed under the MIT license.
|
|
2480
2493
|
* See LICENSE file in the project root for full license information.
|
|
2481
2494
|
*/
|
|
@@ -2575,7 +2588,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2575
2588
|
}] } });
|
|
2576
2589
|
|
|
2577
2590
|
/*
|
|
2578
|
-
* Copyright (c)
|
|
2591
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2579
2592
|
* Licensed under the MIT license.
|
|
2580
2593
|
* See LICENSE file in the project root for full license information.
|
|
2581
2594
|
*/
|
|
@@ -2595,13 +2608,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2595
2608
|
}] });
|
|
2596
2609
|
|
|
2597
2610
|
/*
|
|
2598
|
-
* Copyright (c)
|
|
2611
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2599
2612
|
* Licensed under the MIT license.
|
|
2600
2613
|
* See LICENSE file in the project root for full license information.
|
|
2601
2614
|
*/
|
|
2602
2615
|
|
|
2603
2616
|
/*
|
|
2604
|
-
* Copyright (c)
|
|
2617
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2605
2618
|
* Licensed under the MIT license.
|
|
2606
2619
|
* See LICENSE file in the project root for full license information.
|
|
2607
2620
|
*/
|
|
@@ -2894,7 +2907,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2894
2907
|
}] } });
|
|
2895
2908
|
|
|
2896
2909
|
/*
|
|
2897
|
-
* Copyright (c)
|
|
2910
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2898
2911
|
* Licensed under the MIT license.
|
|
2899
2912
|
* See LICENSE file in the project root for full license information.
|
|
2900
2913
|
*/
|
|
@@ -2925,13 +2938,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
2925
2938
|
}] });
|
|
2926
2939
|
|
|
2927
2940
|
/*
|
|
2928
|
-
* Copyright (c)
|
|
2941
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2929
2942
|
* Licensed under the MIT license.
|
|
2930
2943
|
* See LICENSE file in the project root for full license information.
|
|
2931
2944
|
*/
|
|
2932
2945
|
|
|
2933
2946
|
/*
|
|
2934
|
-
* Copyright (c)
|
|
2947
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
2935
2948
|
* Licensed under the MIT license.
|
|
2936
2949
|
* See LICENSE file in the project root for full license information.
|
|
2937
2950
|
*/
|
|
@@ -3218,7 +3231,7 @@ class BaoModalContainer extends _BaoModalContainerBase {
|
|
|
3218
3231
|
}
|
|
3219
3232
|
}
|
|
3220
3233
|
BaoModalContainer.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModalContainer, deps: null, target: i0.ɵɵFactoryTarget.Component });
|
|
3221
|
-
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;
|
|
3234
|
+
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 });
|
|
3222
3235
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModalContainer, decorators: [{
|
|
3223
3236
|
type: Component,
|
|
3224
3237
|
args: [{ selector: 'bao-modal-container', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.Default, host: {
|
|
@@ -3230,18 +3243,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
3230
3243
|
'[attr.aria-labelledby]': '_config.ariaLabel ? null : _ariaLabelledBy',
|
|
3231
3244
|
'[attr.aria-label]': '_config.ariaLabel',
|
|
3232
3245
|
'[attr.aria-describedby]': '_config.ariaDescribedBy || null'
|
|
3233
|
-
}, 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;
|
|
3246
|
+
}, 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"] }]
|
|
3234
3247
|
}] });
|
|
3235
3248
|
|
|
3236
3249
|
// Counter for unique modal ids.
|
|
3237
|
-
let uniqueId = 0;
|
|
3250
|
+
let uniqueId$1 = 0;
|
|
3238
3251
|
/**
|
|
3239
3252
|
* Reference to a modal opened via the BaoModalService.
|
|
3240
3253
|
*/
|
|
3241
3254
|
class BaoModalRef {
|
|
3242
3255
|
constructor(_overlayRef, _containerInstance,
|
|
3243
3256
|
/** Id of the modal. */
|
|
3244
|
-
id = `bao-modal-${uniqueId++}`) {
|
|
3257
|
+
id = `bao-modal-${uniqueId$1++}`) {
|
|
3245
3258
|
this._overlayRef = _overlayRef;
|
|
3246
3259
|
this._containerInstance = _containerInstance;
|
|
3247
3260
|
this.id = id;
|
|
@@ -3430,7 +3443,7 @@ function _closeModalVia(ref, interactionType, result) {
|
|
|
3430
3443
|
}
|
|
3431
3444
|
|
|
3432
3445
|
/*
|
|
3433
|
-
* Copyright (c)
|
|
3446
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
3434
3447
|
* Licensed under the MIT license.
|
|
3435
3448
|
* See LICENSE file in the project root for full license information.
|
|
3436
3449
|
*/
|
|
@@ -3691,7 +3704,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
3691
3704
|
} });
|
|
3692
3705
|
|
|
3693
3706
|
/*
|
|
3694
|
-
* Copyright (c)
|
|
3707
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
3695
3708
|
* Licensed under the MIT license.
|
|
3696
3709
|
* See LICENSE file in the project root for full license information.
|
|
3697
3710
|
*/
|
|
@@ -3772,7 +3785,7 @@ function getClosestDialog(element, openDialogs) {
|
|
|
3772
3785
|
}
|
|
3773
3786
|
|
|
3774
3787
|
/*
|
|
3775
|
-
* Copyright (c)
|
|
3788
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
3776
3789
|
* Licensed under the MIT license.
|
|
3777
3790
|
* See LICENSE file in the project root for full license information.
|
|
3778
3791
|
*/
|
|
@@ -3793,7 +3806,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
3793
3806
|
}] });
|
|
3794
3807
|
|
|
3795
3808
|
/*
|
|
3796
|
-
* Copyright (c)
|
|
3809
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
3797
3810
|
* Licensed under the MIT license.
|
|
3798
3811
|
* See LICENSE file in the project root for full license information.
|
|
3799
3812
|
*/
|
|
@@ -3866,7 +3879,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
3866
3879
|
}] } });
|
|
3867
3880
|
|
|
3868
3881
|
/*
|
|
3869
|
-
* Copyright (c)
|
|
3882
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
3870
3883
|
* Licensed under the MIT license.
|
|
3871
3884
|
* See LICENSE file in the project root for full license information.
|
|
3872
3885
|
*/
|
|
@@ -3886,13 +3899,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
3886
3899
|
}] });
|
|
3887
3900
|
|
|
3888
3901
|
/*
|
|
3889
|
-
* Copyright (c)
|
|
3902
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
3890
3903
|
* Licensed under the MIT license.
|
|
3891
3904
|
* See LICENSE file in the project root for full license information.
|
|
3892
3905
|
*/
|
|
3893
3906
|
|
|
3894
3907
|
/*
|
|
3895
|
-
* Copyright (c)
|
|
3908
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
3896
3909
|
* Licensed under the MIT license.
|
|
3897
3910
|
* See LICENSE file in the project root for full license information.
|
|
3898
3911
|
*/
|
|
@@ -3909,6 +3922,10 @@ class BaoDropdownMenuItem {
|
|
|
3909
3922
|
* Is the list item disabled
|
|
3910
3923
|
*/
|
|
3911
3924
|
this.disabled = false;
|
|
3925
|
+
/**
|
|
3926
|
+
* Emits when menu item is clicked
|
|
3927
|
+
*/
|
|
3928
|
+
this.itemClicked = new EventEmitter();
|
|
3912
3929
|
}
|
|
3913
3930
|
get nativeElement() {
|
|
3914
3931
|
return this.elementRef.nativeElement;
|
|
@@ -3989,19 +4006,25 @@ class BaoDropdownMenuItem {
|
|
|
3989
4006
|
}
|
|
3990
4007
|
}
|
|
3991
4008
|
/**
|
|
3992
|
-
* This method propagates a click event to menu item children with inputs (checkbox, radio button)
|
|
4009
|
+
* This method propagates a click event to menu item children with inputs (checkbox, radio button).
|
|
4010
|
+
* It emits event to close menu if item does not contain an input.
|
|
3993
4011
|
*/
|
|
3994
4012
|
propagateClick() {
|
|
4013
|
+
let closeMenu = true;
|
|
3995
4014
|
for (let i = 0; i < this.nativeElement.children.length; i++) {
|
|
3996
4015
|
if (this.nativeElement.children.item(i).firstElementChild.localName ==
|
|
3997
4016
|
'input') {
|
|
3998
4017
|
this.nativeElement.children.item(i).firstElementChild.click();
|
|
4018
|
+
closeMenu = false;
|
|
3999
4019
|
}
|
|
4000
4020
|
}
|
|
4021
|
+
if (closeMenu) {
|
|
4022
|
+
this.itemClicked.emit();
|
|
4023
|
+
}
|
|
4001
4024
|
}
|
|
4002
4025
|
}
|
|
4003
4026
|
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 });
|
|
4004
|
-
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:
|
|
4027
|
+
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 });
|
|
4005
4028
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoDropdownMenuItem, decorators: [{
|
|
4006
4029
|
type: Directive,
|
|
4007
4030
|
args: [{
|
|
@@ -4013,6 +4036,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
4013
4036
|
}]
|
|
4014
4037
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }, { type: BaoDropdownMenuComponent }]; }, propDecorators: { disabled: [{
|
|
4015
4038
|
type: Input
|
|
4039
|
+
}], itemClicked: [{
|
|
4040
|
+
type: Output
|
|
4016
4041
|
}], spaceKeyEvent: [{
|
|
4017
4042
|
type: HostListener,
|
|
4018
4043
|
args: ['window:keyup.space']
|
|
@@ -4021,7 +4046,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
4021
4046
|
args: ['click', ['$event.target']]
|
|
4022
4047
|
}], enterKeyEvent: [{
|
|
4023
4048
|
type: HostListener,
|
|
4024
|
-
args: ['window:
|
|
4049
|
+
args: ['window:keyup.enter']
|
|
4025
4050
|
}] } });
|
|
4026
4051
|
class BaoDropdownMenuComponent {
|
|
4027
4052
|
constructor(cdr, renderer, elementRef) {
|
|
@@ -4067,16 +4092,20 @@ class BaoDropdownMenuComponent {
|
|
|
4067
4092
|
}
|
|
4068
4093
|
upKeyEvent() {
|
|
4069
4094
|
if (this.isOpen) {
|
|
4070
|
-
const index = isNaN(this._activeItemIndex) ?
|
|
4095
|
+
const index = isNaN(this._activeItemIndex) ? -1 : this._activeItemIndex;
|
|
4071
4096
|
const nextIndex = this.getNextActivableItemIndex(index, false);
|
|
4072
|
-
|
|
4097
|
+
if (nextIndex > -1) {
|
|
4098
|
+
this.focusNextItem(nextIndex);
|
|
4099
|
+
}
|
|
4073
4100
|
}
|
|
4074
4101
|
}
|
|
4075
4102
|
downKeyEvent() {
|
|
4076
4103
|
if (this.isOpen) {
|
|
4077
|
-
const index = isNaN(this._activeItemIndex) ?
|
|
4104
|
+
const index = isNaN(this._activeItemIndex) ? -1 : this._activeItemIndex;
|
|
4078
4105
|
const nextIndex = this.getNextActivableItemIndex(index, true);
|
|
4079
|
-
|
|
4106
|
+
if (nextIndex > -1) {
|
|
4107
|
+
this.focusNextItem(nextIndex);
|
|
4108
|
+
}
|
|
4080
4109
|
}
|
|
4081
4110
|
}
|
|
4082
4111
|
/** Prevents focus to be lost when TAB has reached end of menu */
|
|
@@ -4087,6 +4116,16 @@ class BaoDropdownMenuComponent {
|
|
|
4087
4116
|
}
|
|
4088
4117
|
}
|
|
4089
4118
|
}
|
|
4119
|
+
tabUpKeyEvent() {
|
|
4120
|
+
if (this.isOpen) {
|
|
4121
|
+
this._activeItemIndex = this._listItems.reduce((acc, element, index) => {
|
|
4122
|
+
if (element.nativeElement === document.activeElement) {
|
|
4123
|
+
acc = index;
|
|
4124
|
+
}
|
|
4125
|
+
return acc;
|
|
4126
|
+
}, -1);
|
|
4127
|
+
}
|
|
4128
|
+
}
|
|
4090
4129
|
/** Prevents focus to be lost when SHIFT + TAB has reached beginning of menu */
|
|
4091
4130
|
shiftTabKeyEvent() {
|
|
4092
4131
|
if (this.isOpen) {
|
|
@@ -4099,9 +4138,8 @@ class BaoDropdownMenuComponent {
|
|
|
4099
4138
|
this.renderer.setAttribute(this.nativeElement, 'id', this.menuId);
|
|
4100
4139
|
this._menuPortal = new DomPortal(this._menuContent);
|
|
4101
4140
|
}
|
|
4102
|
-
|
|
4103
|
-
this.
|
|
4104
|
-
this._listItems.first.nativeElement.focus();
|
|
4141
|
+
ngAfterContentInit() {
|
|
4142
|
+
this._listItems.forEach((item) => item.itemClicked.subscribe(() => this.isClosedByKeyEvent.emit()));
|
|
4105
4143
|
}
|
|
4106
4144
|
open() {
|
|
4107
4145
|
this.isOpen = true;
|
|
@@ -4109,6 +4147,10 @@ class BaoDropdownMenuComponent {
|
|
|
4109
4147
|
close() {
|
|
4110
4148
|
this.isOpen = false;
|
|
4111
4149
|
}
|
|
4150
|
+
focus() {
|
|
4151
|
+
this._activeItemIndex = -1;
|
|
4152
|
+
this._menuContent.nativeElement.focus();
|
|
4153
|
+
}
|
|
4112
4154
|
/** Move the aria-current attribute to new active page */
|
|
4113
4155
|
setNavigationAttribute(activePageElement) {
|
|
4114
4156
|
const previousActivePage = this._listItems.find((item) => {
|
|
@@ -4132,40 +4174,55 @@ class BaoDropdownMenuComponent {
|
|
|
4132
4174
|
* @param isBackward If recursive function is going backward looking for last activable item in list
|
|
4133
4175
|
* @returns Index of the next item that will receive focus
|
|
4134
4176
|
*/
|
|
4135
|
-
getNextActivableItemIndex(currentIndex, isDown
|
|
4136
|
-
|
|
4137
|
-
|
|
4138
|
-
|
|
4177
|
+
getNextActivableItemIndex(currentIndex, isDown) {
|
|
4178
|
+
const init = [];
|
|
4179
|
+
// Get all the activable indexes
|
|
4180
|
+
const activableIndexes = this._listItems.reduce((acc, element, index) => {
|
|
4181
|
+
if (!element.disabled) {
|
|
4182
|
+
acc = [...acc, index];
|
|
4139
4183
|
}
|
|
4140
|
-
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4184
|
+
return acc;
|
|
4185
|
+
}, init);
|
|
4186
|
+
if (activableIndexes.length) {
|
|
4187
|
+
if (isDown) {
|
|
4188
|
+
// Select the first enabled element
|
|
4189
|
+
if (currentIndex === -1) {
|
|
4190
|
+
return activableIndexes[0];
|
|
4191
|
+
}
|
|
4192
|
+
// Select the only enabled element
|
|
4193
|
+
if (activableIndexes.length === 1) {
|
|
4194
|
+
return activableIndexes[0];
|
|
4195
|
+
}
|
|
4196
|
+
// Stay on the last enabled element
|
|
4197
|
+
if (currentIndex === activableIndexes[activableIndexes.length - 1]) {
|
|
4198
|
+
return currentIndex;
|
|
4199
|
+
}
|
|
4200
|
+
// Select the next enabled element
|
|
4201
|
+
return activableIndexes.find(index => index > currentIndex);
|
|
4145
4202
|
}
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4203
|
+
const isUp = !isDown;
|
|
4204
|
+
if (isUp) {
|
|
4205
|
+
// Do nothing whenever nothing is selected
|
|
4206
|
+
if (currentIndex === -1) {
|
|
4207
|
+
return currentIndex;
|
|
4208
|
+
}
|
|
4209
|
+
// Select the only enabled element
|
|
4210
|
+
if (activableIndexes.length === 1) {
|
|
4211
|
+
return activableIndexes[0];
|
|
4212
|
+
}
|
|
4213
|
+
// Stay on the first enabled element
|
|
4214
|
+
if (currentIndex === activableIndexes[0]) {
|
|
4215
|
+
return currentIndex;
|
|
4216
|
+
}
|
|
4217
|
+
// Select the above enabled element
|
|
4218
|
+
return activableIndexes.reverse().find(index => index < currentIndex);
|
|
4151
4219
|
}
|
|
4152
|
-
return
|
|
4220
|
+
return -1;
|
|
4153
4221
|
}
|
|
4154
|
-
return nextIndex;
|
|
4155
|
-
}
|
|
4156
|
-
/**
|
|
4157
|
-
* Finds if focus has reached end or beginning of list
|
|
4158
|
-
* @param currentIndex List item index which currently has focus
|
|
4159
|
-
* @param isDown Whether the navigation is going in the down direction or not
|
|
4160
|
-
* @returns Can focus move to next item or not
|
|
4161
|
-
*/
|
|
4162
|
-
canMove(currentIndex, isDown) {
|
|
4163
|
-
return !((currentIndex == 0 && !isDown) ||
|
|
4164
|
-
(currentIndex == this._listItems.length - 1 && isDown));
|
|
4165
4222
|
}
|
|
4166
4223
|
}
|
|
4167
4224
|
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 });
|
|
4168
|
-
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 });
|
|
4225
|
+
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 });
|
|
4169
4226
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoDropdownMenuComponent, decorators: [{
|
|
4170
4227
|
type: Component,
|
|
4171
4228
|
args: [{ selector: 'bao-dropdown-menu', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
@@ -4173,7 +4230,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
4173
4230
|
'[class.bao-overlay-transparent-backdrop]': 'isOpen===false',
|
|
4174
4231
|
'[class.bao-dropdown-menu-closed]': 'isOpen===false',
|
|
4175
4232
|
'[attr.aria-expanded]': 'isOpen'
|
|
4176
|
-
}, 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"] }]
|
|
4233
|
+
}, 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"] }]
|
|
4177
4234
|
}], ctorParameters: function () { return [{ type: i0.ChangeDetectorRef }, { type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { isOpenChange: [{
|
|
4178
4235
|
type: Output
|
|
4179
4236
|
}], isClosedByKeyEvent: [{
|
|
@@ -4193,6 +4250,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
4193
4250
|
}], tabKeyEvent: [{
|
|
4194
4251
|
type: HostListener,
|
|
4195
4252
|
args: ['window:keydown.tab']
|
|
4253
|
+
}], tabUpKeyEvent: [{
|
|
4254
|
+
type: HostListener,
|
|
4255
|
+
args: ['window:keyup.tab']
|
|
4196
4256
|
}], shiftTabKeyEvent: [{
|
|
4197
4257
|
type: HostListener,
|
|
4198
4258
|
args: ['window:keydown.shift.tab']
|
|
@@ -4217,13 +4277,6 @@ class BaoDropdownMenuTrigger {
|
|
|
4217
4277
|
this.nativeElement.focus();
|
|
4218
4278
|
}
|
|
4219
4279
|
}
|
|
4220
|
-
/** Enter key event triggers click event which opens menu,
|
|
4221
|
-
* then focus is put on first item in the menu */
|
|
4222
|
-
enterKeyEvent() {
|
|
4223
|
-
if (this._isMenuOpen && document.activeElement === this.nativeElement) {
|
|
4224
|
-
this.menu.focusFirstItem();
|
|
4225
|
-
}
|
|
4226
|
-
}
|
|
4227
4280
|
onClick() {
|
|
4228
4281
|
this.toggleMenu();
|
|
4229
4282
|
}
|
|
@@ -4232,7 +4285,7 @@ class BaoDropdownMenuTrigger {
|
|
|
4232
4285
|
this.renderer.setAttribute(this.nativeElement, 'aria-controls', `bao-dropdown-menu-${dropdownMenuUniqueId}`);
|
|
4233
4286
|
this.menu.isClosedByKeyEvent.subscribe(() => {
|
|
4234
4287
|
this.closeMenu();
|
|
4235
|
-
this.nativeElement.focus();
|
|
4288
|
+
setTimeout(() => this.nativeElement.focus(), 50);
|
|
4236
4289
|
});
|
|
4237
4290
|
}
|
|
4238
4291
|
ngOnDestroy() {
|
|
@@ -4258,6 +4311,7 @@ class BaoDropdownMenuTrigger {
|
|
|
4258
4311
|
overlayRef.attach(this.menu.menuPortal);
|
|
4259
4312
|
this._isMenuOpen = true;
|
|
4260
4313
|
this.menu.open();
|
|
4314
|
+
this.menu.focus();
|
|
4261
4315
|
}
|
|
4262
4316
|
createOverlay() {
|
|
4263
4317
|
if (!this._overlayRef) {
|
|
@@ -4292,11 +4346,18 @@ class BaoDropdownMenuTrigger {
|
|
|
4292
4346
|
overlayY: 'bottom'
|
|
4293
4347
|
},
|
|
4294
4348
|
{
|
|
4295
|
-
// top-right of the overlay is connected to bottom-
|
|
4296
|
-
originX: '
|
|
4349
|
+
// top-right of the overlay is connected to bottom-right of the origin;
|
|
4350
|
+
originX: 'end',
|
|
4297
4351
|
originY: 'bottom',
|
|
4298
4352
|
overlayX: 'end',
|
|
4299
4353
|
overlayY: 'top'
|
|
4354
|
+
},
|
|
4355
|
+
{
|
|
4356
|
+
// bottom-right of the overlay is connected to top-right of the origin;
|
|
4357
|
+
originX: 'end',
|
|
4358
|
+
originY: 'top',
|
|
4359
|
+
overlayX: 'end',
|
|
4360
|
+
overlayY: 'bottom'
|
|
4300
4361
|
}
|
|
4301
4362
|
]),
|
|
4302
4363
|
backdropClass: 'bao-overlay-transparent-backdrop',
|
|
@@ -4306,7 +4367,7 @@ class BaoDropdownMenuTrigger {
|
|
|
4306
4367
|
}
|
|
4307
4368
|
}
|
|
4308
4369
|
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 });
|
|
4309
|
-
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()", "
|
|
4370
|
+
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 });
|
|
4310
4371
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoDropdownMenuTrigger, decorators: [{
|
|
4311
4372
|
type: Directive,
|
|
4312
4373
|
args: [{
|
|
@@ -4319,9 +4380,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
4319
4380
|
}], escapeKeyEvent: [{
|
|
4320
4381
|
type: HostListener,
|
|
4321
4382
|
args: ['window:keyup.escape']
|
|
4322
|
-
}], enterKeyEvent: [{
|
|
4323
|
-
type: HostListener,
|
|
4324
|
-
args: ['window:keyup.enter']
|
|
4325
4383
|
}], onClick: [{
|
|
4326
4384
|
type: HostListener,
|
|
4327
4385
|
args: ['click']
|
|
@@ -4416,7 +4474,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
4416
4474
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; } });
|
|
4417
4475
|
|
|
4418
4476
|
/*
|
|
4419
|
-
* Copyright (c)
|
|
4477
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
4420
4478
|
* Licensed under the MIT license.
|
|
4421
4479
|
* See LICENSE file in the project root for full license information.
|
|
4422
4480
|
*/
|
|
@@ -4456,13 +4514,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
4456
4514
|
}] });
|
|
4457
4515
|
|
|
4458
4516
|
/*
|
|
4459
|
-
* Copyright (c)
|
|
4517
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
4460
4518
|
* Licensed under the MIT license.
|
|
4461
4519
|
* See LICENSE file in the project root for full license information.
|
|
4462
4520
|
*/
|
|
4463
4521
|
|
|
4464
4522
|
/*
|
|
4465
|
-
* Copyright (c)
|
|
4523
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
4466
4524
|
* Licensed under the MIT license.
|
|
4467
4525
|
* See LICENSE file in the project root for full license information.
|
|
4468
4526
|
*/
|
|
@@ -4482,13 +4540,18 @@ class BaoFilePreviewComponent {
|
|
|
4482
4540
|
this.insertGenericIcon = false;
|
|
4483
4541
|
this.thumbnailURL = '';
|
|
4484
4542
|
}
|
|
4543
|
+
/**
|
|
4544
|
+
* Uploaded file to display in list.
|
|
4545
|
+
*/
|
|
4546
|
+
set file(f) {
|
|
4547
|
+
this._file = f;
|
|
4548
|
+
this.setFileData();
|
|
4549
|
+
}
|
|
4485
4550
|
get nativeElement() {
|
|
4486
4551
|
return this.elementRef.nativeElement;
|
|
4487
4552
|
}
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
}
|
|
4491
|
-
ngAfterContentInit() {
|
|
4553
|
+
setFileData() {
|
|
4554
|
+
this.formatSize(this._file.size);
|
|
4492
4555
|
this.getThumbnail();
|
|
4493
4556
|
this.setIcon();
|
|
4494
4557
|
}
|
|
@@ -4503,8 +4566,8 @@ class BaoFilePreviewComponent {
|
|
|
4503
4566
|
}
|
|
4504
4567
|
}
|
|
4505
4568
|
getThumbnail() {
|
|
4506
|
-
if (this.
|
|
4507
|
-
(this.
|
|
4569
|
+
if (this._file &&
|
|
4570
|
+
(this._file.type === 'image/png' || this._file.type === 'image/jpeg')) {
|
|
4508
4571
|
const reader = new FileReader();
|
|
4509
4572
|
reader.onload = (event) => {
|
|
4510
4573
|
this.thumbnailURL = event.target.result;
|
|
@@ -4512,31 +4575,33 @@ class BaoFilePreviewComponent {
|
|
|
4512
4575
|
reader.onerror = () => {
|
|
4513
4576
|
this.thumbnailURL = '';
|
|
4514
4577
|
};
|
|
4515
|
-
reader.readAsDataURL(this.
|
|
4578
|
+
reader.readAsDataURL(this._file);
|
|
4516
4579
|
}
|
|
4517
4580
|
}
|
|
4518
4581
|
formatSize(size) {
|
|
4519
4582
|
if (size >= KILO_THRESHOLD && size / KILO_THRESHOLD < KILO_THRESHOLD) {
|
|
4520
|
-
|
|
4583
|
+
this.fileSize = this.getSizeAndUnit(size, KILO_THRESHOLD, 'Ko');
|
|
4584
|
+
return;
|
|
4521
4585
|
}
|
|
4522
4586
|
const sizeDividedByKoMultiplicator = size / KILO_THRESHOLD;
|
|
4523
4587
|
if (sizeDividedByKoMultiplicator >= KILO_THRESHOLD) {
|
|
4524
4588
|
const toFixed = sizeDividedByKoMultiplicator > 10 ? 0 : 1;
|
|
4525
|
-
|
|
4589
|
+
this.fileSize = this.getSizeAndUnit(size, MEGA_THRESHOLD, 'Mo', toFixed);
|
|
4590
|
+
return;
|
|
4526
4591
|
}
|
|
4527
|
-
|
|
4592
|
+
this.fileSize = `${size} octets`;
|
|
4528
4593
|
}
|
|
4529
4594
|
getSizeAndUnit(size, multiplicator, unit, toFixed = 0) {
|
|
4530
4595
|
return `${(size / multiplicator).toFixed(toFixed)} ${unit}`;
|
|
4531
4596
|
}
|
|
4532
4597
|
}
|
|
4533
4598
|
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 });
|
|
4534
|
-
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\">{{
|
|
4599
|
+
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 });
|
|
4535
4600
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoFilePreviewComponent, decorators: [{
|
|
4536
4601
|
type: Component,
|
|
4537
4602
|
args: [{ selector: 'bao-file-preview, [bao-file-preview]', encapsulation: ViewEncapsulation.None, host: {
|
|
4538
4603
|
class: 'bao-file-preview'
|
|
4539
|
-
}, 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\">{{
|
|
4604
|
+
}, 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"] }]
|
|
4540
4605
|
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { file: [{
|
|
4541
4606
|
type: Input
|
|
4542
4607
|
}], isLoading: [{
|
|
@@ -4544,7 +4609,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
4544
4609
|
}] } });
|
|
4545
4610
|
|
|
4546
4611
|
/*
|
|
4547
|
-
* Copyright (c)
|
|
4612
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
4548
4613
|
* Licensed under the MIT license.
|
|
4549
4614
|
* See LICENSE file in the project root for full license information.
|
|
4550
4615
|
*/
|
|
@@ -4606,7 +4671,7 @@ const BAO_FILE_INTL_PROVIDER = {
|
|
|
4606
4671
|
};
|
|
4607
4672
|
|
|
4608
4673
|
/*
|
|
4609
|
-
* Copyright (c)
|
|
4674
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
4610
4675
|
* Licensed under the MIT license.
|
|
4611
4676
|
* See LICENSE file in the project root for full license information.
|
|
4612
4677
|
*/
|
|
@@ -4915,7 +4980,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
4915
4980
|
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; } });
|
|
4916
4981
|
|
|
4917
4982
|
/*
|
|
4918
|
-
* Copyright (c)
|
|
4983
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
4919
4984
|
* Licensed under the MIT license.
|
|
4920
4985
|
* See LICENSE file in the project root for full license information.
|
|
4921
4986
|
*/
|
|
@@ -4960,8 +5025,960 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
4960
5025
|
}]
|
|
4961
5026
|
}] });
|
|
4962
5027
|
|
|
5028
|
+
/** Injection token that can be used to access the data that was passed in to a snack bar. */
|
|
5029
|
+
const BAO_SNACK_BAR_DATA = new InjectionToken('BaoSnackBarData');
|
|
5030
|
+
/** Possible types of toast to display the snack bar */
|
|
5031
|
+
var BaoSnackBarToastTypeEnum;
|
|
5032
|
+
(function (BaoSnackBarToastTypeEnum) {
|
|
5033
|
+
BaoSnackBarToastTypeEnum["Info"] = "info";
|
|
5034
|
+
BaoSnackBarToastTypeEnum["Success"] = "success";
|
|
5035
|
+
BaoSnackBarToastTypeEnum["Danger"] = "danger";
|
|
5036
|
+
})(BaoSnackBarToastTypeEnum || (BaoSnackBarToastTypeEnum = {}));
|
|
5037
|
+
/**
|
|
5038
|
+
* Configuration used when opening a snack-bar.
|
|
5039
|
+
*/
|
|
5040
|
+
class BaoSnackBarConfig {
|
|
5041
|
+
constructor() {
|
|
5042
|
+
/** The message to display in the snackbar. */
|
|
5043
|
+
this.message = 'No message';
|
|
5044
|
+
/** The type of snackbar template to display. */
|
|
5045
|
+
this.toastType = BaoSnackBarToastTypeEnum.Info;
|
|
5046
|
+
/**
|
|
5047
|
+
* The attached action to the snack bar. If the name of the action matches an icon provided as part of
|
|
5048
|
+
* angular-ui icon dictionnary an icon will be displayed instead of text.
|
|
5049
|
+
* */
|
|
5050
|
+
this.actionLabelOrIcon = '';
|
|
5051
|
+
/** Displays the close button when set to true */
|
|
5052
|
+
this.showClose = false;
|
|
5053
|
+
/** The length of time in milliseconds to wait before automatically dismissing the snack bar. */
|
|
5054
|
+
this.duration = 5000;
|
|
5055
|
+
/** The politeness level for the MatAriaLiveAnnouncer announcement. */
|
|
5056
|
+
this.politeness = 'assertive';
|
|
5057
|
+
/**
|
|
5058
|
+
* Message to be announced by the LiveAnnouncer. When opening a snackbar without a custom
|
|
5059
|
+
* component or template, the announcement message will default to the specified message.
|
|
5060
|
+
*/
|
|
5061
|
+
this.announcementMessage = '';
|
|
5062
|
+
/** Data being injected into the child component. */
|
|
5063
|
+
this.data = null;
|
|
5064
|
+
/** The horizontal position to place the snack bar. */
|
|
5065
|
+
this.horizontalPosition = 'left';
|
|
5066
|
+
/** The vertical position to place the snack bar. */
|
|
5067
|
+
this.verticalPosition = 'bottom';
|
|
5068
|
+
}
|
|
5069
|
+
}
|
|
5070
|
+
|
|
5071
|
+
/** Maximum amount of milliseconds that can be passed into setTimeout. */
|
|
5072
|
+
const MAX_TIMEOUT = Math.pow(2, 31) - 1;
|
|
5073
|
+
/**
|
|
5074
|
+
* Reference to a snack bar dispatched from the snack bar service.
|
|
5075
|
+
*/
|
|
5076
|
+
class BaoSnackBarRef {
|
|
5077
|
+
constructor(containerInstance, _overlayRef) {
|
|
5078
|
+
this._overlayRef = _overlayRef;
|
|
5079
|
+
/** Subject for notifying the user that the snack bar has been dismissed. */
|
|
5080
|
+
this._afterDismissed = new Subject();
|
|
5081
|
+
/** Subject for notifying the user that the snack bar has opened and appeared. */
|
|
5082
|
+
this._afterOpened = new Subject();
|
|
5083
|
+
/** Subject for notifying the user that the snack bar action was called. */
|
|
5084
|
+
this._onAction = new Subject();
|
|
5085
|
+
/** Whether the snack bar was dismissed using the action button. */
|
|
5086
|
+
this._dismissedByAction = false;
|
|
5087
|
+
this.containerInstance = containerInstance;
|
|
5088
|
+
// Dismiss snackbar on action.
|
|
5089
|
+
this.onAction().subscribe(() => this.dismiss());
|
|
5090
|
+
containerInstance._onExit.subscribe(() => this.finishDismiss());
|
|
5091
|
+
}
|
|
5092
|
+
/** Dismisses the snack bar. */
|
|
5093
|
+
dismiss() {
|
|
5094
|
+
if (!this._afterDismissed.closed) {
|
|
5095
|
+
this.containerInstance.exit();
|
|
5096
|
+
}
|
|
5097
|
+
clearTimeout(this._durationTimeoutId);
|
|
5098
|
+
}
|
|
5099
|
+
/** Marks the snackbar action clicked. */
|
|
5100
|
+
dismissWithAction() {
|
|
5101
|
+
if (!this._onAction.closed) {
|
|
5102
|
+
this._dismissedByAction = true;
|
|
5103
|
+
this._onAction.next();
|
|
5104
|
+
this._onAction.complete();
|
|
5105
|
+
}
|
|
5106
|
+
}
|
|
5107
|
+
/** Dismisses the snack bar after some duration */
|
|
5108
|
+
dismissAfter(duration) {
|
|
5109
|
+
// Note that we need to cap the duration to the maximum value for setTimeout, because
|
|
5110
|
+
// it'll revert to 1 if somebody passes in something greater (e.g. `Infinity`). See #17234.
|
|
5111
|
+
// @TODO: window.setTimeout() ?
|
|
5112
|
+
this._durationTimeoutId = window.setTimeout(() => this.dismiss(), Math.min(duration, MAX_TIMEOUT));
|
|
5113
|
+
}
|
|
5114
|
+
/** Marks the snackbar as opened */
|
|
5115
|
+
open() {
|
|
5116
|
+
if (!this._afterOpened.closed) {
|
|
5117
|
+
this._afterOpened.next();
|
|
5118
|
+
this._afterOpened.complete();
|
|
5119
|
+
}
|
|
5120
|
+
}
|
|
5121
|
+
/** Gets an observable that is notified when the snack bar is finished closing. */
|
|
5122
|
+
afterDismissed() {
|
|
5123
|
+
return this._afterDismissed;
|
|
5124
|
+
}
|
|
5125
|
+
/** Gets an observable that is notified when the snack bar has opened and appeared. */
|
|
5126
|
+
afterOpened() {
|
|
5127
|
+
return this.containerInstance._onEnter;
|
|
5128
|
+
}
|
|
5129
|
+
/** Gets an observable that is notified when the snack bar action is called. */
|
|
5130
|
+
onAction() {
|
|
5131
|
+
return this._onAction;
|
|
5132
|
+
}
|
|
5133
|
+
/** Cleans up the DOM after closing. */
|
|
5134
|
+
finishDismiss() {
|
|
5135
|
+
this._overlayRef.dispose();
|
|
5136
|
+
if (!this._onAction.closed) {
|
|
5137
|
+
this._onAction.complete();
|
|
5138
|
+
}
|
|
5139
|
+
this._afterDismissed.next({ dismissedByAction: this._dismissedByAction });
|
|
5140
|
+
this._afterDismissed.complete();
|
|
5141
|
+
this._dismissedByAction = false;
|
|
5142
|
+
}
|
|
5143
|
+
}
|
|
5144
|
+
|
|
5145
|
+
/*
|
|
5146
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
5147
|
+
* Licensed under the MIT license.
|
|
5148
|
+
* See LICENSE file in the project root for full license information.
|
|
5149
|
+
*/
|
|
5150
|
+
const toastTypeToAttributes = {
|
|
5151
|
+
info: {
|
|
5152
|
+
toast: 'snackbar-info',
|
|
5153
|
+
icon: 'icon-info',
|
|
5154
|
+
iconTitle: 'Information',
|
|
5155
|
+
politeness: 'assertive'
|
|
5156
|
+
},
|
|
5157
|
+
success: {
|
|
5158
|
+
toast: 'snackbar-success',
|
|
5159
|
+
icon: 'icon-check-circle',
|
|
5160
|
+
iconTitle: 'Succès',
|
|
5161
|
+
politeness: 'polite'
|
|
5162
|
+
},
|
|
5163
|
+
danger: {
|
|
5164
|
+
toast: 'snackbar-danger',
|
|
5165
|
+
icon: 'icon-error',
|
|
5166
|
+
iconTitle: 'Erreur',
|
|
5167
|
+
politeness: 'assertive'
|
|
5168
|
+
}
|
|
5169
|
+
};
|
|
5170
|
+
/**
|
|
5171
|
+
* A component used to open as the default snack bar, matching material spec.
|
|
5172
|
+
* This should only be used internally by the snack bar service.
|
|
5173
|
+
*/
|
|
5174
|
+
class BaoSimpleSnackBarComponent {
|
|
5175
|
+
constructor(snackBarRef, data) {
|
|
5176
|
+
this.snackBarRef = snackBarRef;
|
|
5177
|
+
this.showCloseTitle = 'Fermer le message';
|
|
5178
|
+
this.data = data;
|
|
5179
|
+
}
|
|
5180
|
+
/** Returns the politeness */
|
|
5181
|
+
get politeness() {
|
|
5182
|
+
var _a;
|
|
5183
|
+
return (((_a = toastTypeToAttributes[this.data.toastType]) === null || _a === void 0 ? void 0 : _a.politeness) ||
|
|
5184
|
+
toastTypeToAttributes['info'].politeness);
|
|
5185
|
+
}
|
|
5186
|
+
/** Returns the toast class */
|
|
5187
|
+
get toastType() {
|
|
5188
|
+
var _a;
|
|
5189
|
+
return (((_a = toastTypeToAttributes[this.data.toastType]) === null || _a === void 0 ? void 0 : _a.toast) ||
|
|
5190
|
+
toastTypeToAttributes['info'].toast);
|
|
5191
|
+
}
|
|
5192
|
+
/** Returns the toast icon */
|
|
5193
|
+
get toastIcon() {
|
|
5194
|
+
var _a;
|
|
5195
|
+
return (((_a = toastTypeToAttributes[this.data.toastType]) === null || _a === void 0 ? void 0 : _a.icon) ||
|
|
5196
|
+
toastTypeToAttributes['info'].icon);
|
|
5197
|
+
}
|
|
5198
|
+
/** Returns the toast icon title */
|
|
5199
|
+
get toastIconTitle() {
|
|
5200
|
+
var _a;
|
|
5201
|
+
return (((_a = toastTypeToAttributes[this.data.toastType]) === null || _a === void 0 ? void 0 : _a.iconTitle) ||
|
|
5202
|
+
toastTypeToAttributes['info'].iconTitle);
|
|
5203
|
+
}
|
|
5204
|
+
/** If the action button should be shown. */
|
|
5205
|
+
get hasAction() {
|
|
5206
|
+
return !!this.data.actionLabelOrIcon;
|
|
5207
|
+
}
|
|
5208
|
+
/** If the action is an icon */
|
|
5209
|
+
get isActionIcon() {
|
|
5210
|
+
return !!ICONS_DCT[this.data.actionLabelOrIcon];
|
|
5211
|
+
}
|
|
5212
|
+
/** Performs the action on the snack bar. */
|
|
5213
|
+
action() {
|
|
5214
|
+
this.snackBarRef.dismissWithAction();
|
|
5215
|
+
}
|
|
5216
|
+
/** Closes the snack bar. */
|
|
5217
|
+
close() {
|
|
5218
|
+
this.snackBarRef.dismiss();
|
|
5219
|
+
}
|
|
5220
|
+
}
|
|
5221
|
+
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 });
|
|
5222
|
+
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 });
|
|
5223
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSimpleSnackBarComponent, decorators: [{
|
|
5224
|
+
type: Component,
|
|
5225
|
+
args: [{ selector: 'bao-simple-snack-bar', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
5226
|
+
class: 'mat-simple-snackbar'
|
|
5227
|
+
}, 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"] }]
|
|
5228
|
+
}], ctorParameters: function () {
|
|
5229
|
+
return [{ type: BaoSnackBarRef }, { type: undefined, decorators: [{
|
|
5230
|
+
type: Inject,
|
|
5231
|
+
args: [BAO_SNACK_BAR_DATA]
|
|
5232
|
+
}] }];
|
|
5233
|
+
} });
|
|
5234
|
+
|
|
4963
5235
|
/*
|
|
4964
|
-
* Copyright (c)
|
|
5236
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
5237
|
+
* Licensed under the MIT license.
|
|
5238
|
+
* See LICENSE file in the project root for full license information.
|
|
5239
|
+
*/
|
|
5240
|
+
/**
|
|
5241
|
+
* Animations used by the Material snack bar.
|
|
5242
|
+
* @docs-private
|
|
5243
|
+
*/
|
|
5244
|
+
const matSnackBarAnimations = {
|
|
5245
|
+
/** Animation that shows and hides a snack bar. */
|
|
5246
|
+
snackBarState: trigger('state', [
|
|
5247
|
+
state('void, hidden', style({
|
|
5248
|
+
transform: 'scale(0.8)',
|
|
5249
|
+
opacity: 0
|
|
5250
|
+
})),
|
|
5251
|
+
state('visible', style({
|
|
5252
|
+
transform: 'scale(1)',
|
|
5253
|
+
opacity: 1
|
|
5254
|
+
})),
|
|
5255
|
+
transition('* => visible', animate('150ms cubic-bezier(0, 0, 0.2, 1)')),
|
|
5256
|
+
transition('* => void, * => hidden', animate('75ms cubic-bezier(0.4, 0.0, 1, 1)', style({
|
|
5257
|
+
opacity: 0
|
|
5258
|
+
})))
|
|
5259
|
+
])
|
|
5260
|
+
};
|
|
5261
|
+
|
|
5262
|
+
let uniqueId = 0;
|
|
5263
|
+
/**
|
|
5264
|
+
* Internal component that wraps user-provided snack bar content.
|
|
5265
|
+
* @docs-private
|
|
5266
|
+
*/
|
|
5267
|
+
class BaoSnackBarContainerComponent extends BasePortalOutlet {
|
|
5268
|
+
constructor(_ngZone, _elementRef, _changeDetectorRef, _platform,
|
|
5269
|
+
/** The snack bar configuration. */
|
|
5270
|
+
snackBarConfig) {
|
|
5271
|
+
super();
|
|
5272
|
+
this._ngZone = _ngZone;
|
|
5273
|
+
this._elementRef = _elementRef;
|
|
5274
|
+
this._changeDetectorRef = _changeDetectorRef;
|
|
5275
|
+
this._platform = _platform;
|
|
5276
|
+
this.snackBarConfig = snackBarConfig;
|
|
5277
|
+
this._document = inject(DOCUMENT);
|
|
5278
|
+
this._trackedModals = new Set();
|
|
5279
|
+
/** Subject for notifying that the snack bar has announced to screen readers. */
|
|
5280
|
+
this._onAnnounce = new Subject();
|
|
5281
|
+
/** Subject for notifying that the snack bar has exited from view. */
|
|
5282
|
+
this._onExit = new Subject();
|
|
5283
|
+
/** Subject for notifying that the snack bar has finished entering the view. */
|
|
5284
|
+
this._onEnter = new Subject();
|
|
5285
|
+
/** The state of the snack bar animations. */
|
|
5286
|
+
this._animationState = 'void';
|
|
5287
|
+
/** The number of milliseconds to wait before announcing the snack bar's content. */
|
|
5288
|
+
this._announceDelay = 150;
|
|
5289
|
+
/** Whether the component has been destroyed. */
|
|
5290
|
+
this._destroyed = false;
|
|
5291
|
+
/** Unique ID of the aria-live element. */
|
|
5292
|
+
this._liveElementId = `bao-snack-bar-container-live-${uniqueId++}`;
|
|
5293
|
+
/**
|
|
5294
|
+
* Attaches a DOM portal to the snack bar container.
|
|
5295
|
+
* @deprecated To be turned into a method.
|
|
5296
|
+
* @breaking-change 10.0.0
|
|
5297
|
+
*/
|
|
5298
|
+
this.attachDomPortal = (portal) => {
|
|
5299
|
+
this.assertNotAttached();
|
|
5300
|
+
const result = this._portalOutlet.attachDomPortal(portal);
|
|
5301
|
+
this._afterPortalAttached();
|
|
5302
|
+
return result;
|
|
5303
|
+
};
|
|
5304
|
+
// Use aria-live rather than a live role like 'alert' or 'status'
|
|
5305
|
+
// because NVDA and JAWS have show inconsistent behavior with live roles.
|
|
5306
|
+
if (snackBarConfig.politeness === 'assertive' &&
|
|
5307
|
+
!snackBarConfig.announcementMessage) {
|
|
5308
|
+
this._live = 'assertive';
|
|
5309
|
+
}
|
|
5310
|
+
else if (snackBarConfig.politeness === 'off') {
|
|
5311
|
+
this._live = 'off';
|
|
5312
|
+
}
|
|
5313
|
+
else {
|
|
5314
|
+
this._live = 'polite';
|
|
5315
|
+
}
|
|
5316
|
+
// Only set role for Firefox. Set role based on aria-live because setting role="alert" implies
|
|
5317
|
+
// aria-live="assertive" which may cause issues if aria-live is set to "polite" above.
|
|
5318
|
+
if (this._platform.FIREFOX) {
|
|
5319
|
+
if (this._live === 'polite') {
|
|
5320
|
+
this._role = 'status';
|
|
5321
|
+
}
|
|
5322
|
+
if (this._live === 'assertive') {
|
|
5323
|
+
this._role = 'alert';
|
|
5324
|
+
}
|
|
5325
|
+
}
|
|
5326
|
+
}
|
|
5327
|
+
/** Attach a component portal as content to this snack bar container. */
|
|
5328
|
+
attachComponentPortal(portal) {
|
|
5329
|
+
this.assertNotAttached();
|
|
5330
|
+
this.applySnackBarClasses();
|
|
5331
|
+
const result = this._portalOutlet.attachComponentPortal(portal);
|
|
5332
|
+
this._afterPortalAttached();
|
|
5333
|
+
return result;
|
|
5334
|
+
}
|
|
5335
|
+
/** Attach a template portal as content to this snack bar container. */
|
|
5336
|
+
attachTemplatePortal(portal) {
|
|
5337
|
+
this.assertNotAttached();
|
|
5338
|
+
this.applySnackBarClasses();
|
|
5339
|
+
const result = this._portalOutlet.attachTemplatePortal(portal);
|
|
5340
|
+
this._afterPortalAttached();
|
|
5341
|
+
return result;
|
|
5342
|
+
}
|
|
5343
|
+
/** Handle end of animations, updating the state of the snackbar. */
|
|
5344
|
+
onAnimationEnd(event) {
|
|
5345
|
+
const { fromState, toState } = event;
|
|
5346
|
+
if ((toState === 'void' && fromState !== 'void') || toState === 'hidden') {
|
|
5347
|
+
this.completeExit();
|
|
5348
|
+
}
|
|
5349
|
+
if (toState === 'visible') {
|
|
5350
|
+
// Note: we shouldn't use `this` inside the zone callback,
|
|
5351
|
+
// because it can cause a memory leak.
|
|
5352
|
+
const onEnter = this._onEnter;
|
|
5353
|
+
this._ngZone.run(() => {
|
|
5354
|
+
onEnter.next();
|
|
5355
|
+
onEnter.complete();
|
|
5356
|
+
});
|
|
5357
|
+
}
|
|
5358
|
+
}
|
|
5359
|
+
/** Begin animation of snack bar entrance into view. */
|
|
5360
|
+
enter() {
|
|
5361
|
+
if (!this._destroyed) {
|
|
5362
|
+
this._animationState = 'visible';
|
|
5363
|
+
this._changeDetectorRef.detectChanges();
|
|
5364
|
+
this.screenReaderAnnounce();
|
|
5365
|
+
}
|
|
5366
|
+
}
|
|
5367
|
+
/** Begin animation of the snack bar exiting from view. */
|
|
5368
|
+
exit() {
|
|
5369
|
+
// Note: this one transitions to `hidden`, rather than `void`, in order to handle the case
|
|
5370
|
+
// where multiple snack bars are opened in quick succession (e.g. two consecutive calls to
|
|
5371
|
+
// `MatSnackBar.open`).
|
|
5372
|
+
this._animationState = 'hidden';
|
|
5373
|
+
// Mark this element with an 'exit' attribute to indicate that the snackbar has
|
|
5374
|
+
// been dismissed and will soon be removed from the DOM. This is used by the snackbar
|
|
5375
|
+
// test harness.
|
|
5376
|
+
this._elementRef.nativeElement.setAttribute('mat-exit', '');
|
|
5377
|
+
// If the snack bar hasn't been announced by the time it exits it wouldn't have been open
|
|
5378
|
+
// long enough to visually read it either, so clear the timeout for announcing.
|
|
5379
|
+
clearTimeout(this._announceTimeoutId);
|
|
5380
|
+
return this._onExit;
|
|
5381
|
+
}
|
|
5382
|
+
/** Makes sure the exit callbacks have been invoked when the element is destroyed. */
|
|
5383
|
+
ngOnDestroy() {
|
|
5384
|
+
this._destroyed = true;
|
|
5385
|
+
this.completeExit();
|
|
5386
|
+
}
|
|
5387
|
+
/**
|
|
5388
|
+
* Waits for the zone to settle before removing the element. Helps prevent
|
|
5389
|
+
* errors where we end up removing an element which is in the middle of an animation.
|
|
5390
|
+
*/
|
|
5391
|
+
completeExit() {
|
|
5392
|
+
this._ngZone.onMicrotaskEmpty.pipe(take$1(1)).subscribe(() => {
|
|
5393
|
+
this._onExit.next();
|
|
5394
|
+
this._onExit.complete();
|
|
5395
|
+
});
|
|
5396
|
+
}
|
|
5397
|
+
/** Applies the various positioning and user-configured CSS classes to the snack bar. */
|
|
5398
|
+
applySnackBarClasses() {
|
|
5399
|
+
const element = this._elementRef.nativeElement;
|
|
5400
|
+
const panelClasses = this.snackBarConfig.panelClass;
|
|
5401
|
+
if (panelClasses) {
|
|
5402
|
+
if (Array.isArray(panelClasses)) {
|
|
5403
|
+
// Note that we can't use a spread here, because IE doesn't support multiple arguments.
|
|
5404
|
+
panelClasses.forEach(cssClass => element.classList.add(cssClass));
|
|
5405
|
+
}
|
|
5406
|
+
else {
|
|
5407
|
+
element.classList.add(panelClasses);
|
|
5408
|
+
}
|
|
5409
|
+
}
|
|
5410
|
+
if (this.snackBarConfig.horizontalPosition === 'center') {
|
|
5411
|
+
element.classList.add('bao-snack-bar-center');
|
|
5412
|
+
}
|
|
5413
|
+
if (this.snackBarConfig.verticalPosition === 'top') {
|
|
5414
|
+
element.classList.add('bao-snack-bar-top');
|
|
5415
|
+
}
|
|
5416
|
+
}
|
|
5417
|
+
/**
|
|
5418
|
+
* Called after the portal contents have been attached. Can be
|
|
5419
|
+
* used to modify the DOM once it's guaranteed to be in place.
|
|
5420
|
+
*/
|
|
5421
|
+
_afterPortalAttached() {
|
|
5422
|
+
const element = this._elementRef.nativeElement;
|
|
5423
|
+
const panelClasses = this.snackBarConfig.panelClass;
|
|
5424
|
+
if (panelClasses) {
|
|
5425
|
+
if (Array.isArray(panelClasses)) {
|
|
5426
|
+
// Note that we can't use a spread here, because IE doesn't support multiple arguments.
|
|
5427
|
+
panelClasses.forEach(cssClass => element.classList.add(cssClass));
|
|
5428
|
+
}
|
|
5429
|
+
else {
|
|
5430
|
+
element.classList.add(panelClasses);
|
|
5431
|
+
}
|
|
5432
|
+
}
|
|
5433
|
+
this._exposeToModals();
|
|
5434
|
+
}
|
|
5435
|
+
/**
|
|
5436
|
+
* Some browsers won't expose the accessibility node of the live element if there is an
|
|
5437
|
+
* `aria-modal` and the live element is outside of it. This method works around the issue by
|
|
5438
|
+
* pointing the `aria-owns` of all modals to the live element.
|
|
5439
|
+
*/
|
|
5440
|
+
_exposeToModals() {
|
|
5441
|
+
// TODO(crisbeto): consider de-duplicating this with the `LiveAnnouncer`.
|
|
5442
|
+
// Note that the selector here is limited to CDK overlays at the moment in order to reduce the
|
|
5443
|
+
// section of the DOM we need to look through. This should cover all the cases we support, but
|
|
5444
|
+
// the selector can be expanded if it turns out to be too narrow.
|
|
5445
|
+
const id = this._liveElementId;
|
|
5446
|
+
const modals = this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');
|
|
5447
|
+
for (let i = 0; i < modals.length; i++) {
|
|
5448
|
+
const modal = modals[i];
|
|
5449
|
+
const ariaOwns = modal.getAttribute('aria-owns');
|
|
5450
|
+
this._trackedModals.add(modal);
|
|
5451
|
+
if (!ariaOwns) {
|
|
5452
|
+
modal.setAttribute('aria-owns', id);
|
|
5453
|
+
}
|
|
5454
|
+
else if (ariaOwns.indexOf(id) === -1) {
|
|
5455
|
+
modal.setAttribute('aria-owns', ariaOwns + ' ' + id);
|
|
5456
|
+
}
|
|
5457
|
+
}
|
|
5458
|
+
}
|
|
5459
|
+
/** Clears the references to the live element from any modals it was added to. */
|
|
5460
|
+
_clearFromModals() {
|
|
5461
|
+
this._trackedModals.forEach(modal => {
|
|
5462
|
+
const ariaOwns = modal.getAttribute('aria-owns');
|
|
5463
|
+
if (ariaOwns) {
|
|
5464
|
+
const newValue = ariaOwns.replace(this._liveElementId, '').trim();
|
|
5465
|
+
if (newValue.length > 0) {
|
|
5466
|
+
modal.setAttribute('aria-owns', newValue);
|
|
5467
|
+
}
|
|
5468
|
+
else {
|
|
5469
|
+
modal.removeAttribute('aria-owns');
|
|
5470
|
+
}
|
|
5471
|
+
}
|
|
5472
|
+
});
|
|
5473
|
+
this._trackedModals.clear();
|
|
5474
|
+
}
|
|
5475
|
+
/** Asserts that no content is already attached to the container. */
|
|
5476
|
+
assertNotAttached() {
|
|
5477
|
+
if (this._portalOutlet.hasAttached()) {
|
|
5478
|
+
throw Error('Attempting to attach snack bar content after content is already attached');
|
|
5479
|
+
}
|
|
5480
|
+
}
|
|
5481
|
+
/**
|
|
5482
|
+
* Starts a timeout to move the snack bar content to the live region so screen readers will
|
|
5483
|
+
* announce it.
|
|
5484
|
+
*/
|
|
5485
|
+
screenReaderAnnounce() {
|
|
5486
|
+
if (!this._announceTimeoutId) {
|
|
5487
|
+
this._ngZone.runOutsideAngular(() => {
|
|
5488
|
+
this._announceTimeoutId = window.setTimeout(() => {
|
|
5489
|
+
const inertElement = this._elementRef.nativeElement.querySelector('[aria-hidden]');
|
|
5490
|
+
const liveElement = this._elementRef.nativeElement.querySelector('[aria-live]');
|
|
5491
|
+
if (inertElement && liveElement) {
|
|
5492
|
+
// If an element in the snack bar content is focused before being moved
|
|
5493
|
+
// track it and restore focus after moving to the live region.
|
|
5494
|
+
let focusedElement = null;
|
|
5495
|
+
if (this._platform.isBrowser &&
|
|
5496
|
+
document.activeElement instanceof HTMLElement &&
|
|
5497
|
+
inertElement.contains(document.activeElement)) {
|
|
5498
|
+
focusedElement = document.activeElement;
|
|
5499
|
+
}
|
|
5500
|
+
inertElement.removeAttribute('aria-hidden');
|
|
5501
|
+
liveElement.appendChild(inertElement);
|
|
5502
|
+
focusedElement === null || focusedElement === void 0 ? void 0 : focusedElement.focus();
|
|
5503
|
+
this._onAnnounce.next();
|
|
5504
|
+
this._onAnnounce.complete();
|
|
5505
|
+
}
|
|
5506
|
+
}, this._announceDelay);
|
|
5507
|
+
});
|
|
5508
|
+
}
|
|
5509
|
+
}
|
|
5510
|
+
}
|
|
5511
|
+
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 });
|
|
5512
|
+
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 });
|
|
5513
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSnackBarContainerComponent, decorators: [{
|
|
5514
|
+
type: Component,
|
|
5515
|
+
args: [{ selector: 'bao-snack-bar-container', changeDetection: ChangeDetectionStrategy.Default, encapsulation: ViewEncapsulation.None, animations: [matSnackBarAnimations.snackBarState], host: {
|
|
5516
|
+
class: 'bao-snack-bar-container',
|
|
5517
|
+
'[@state]': '_animationState',
|
|
5518
|
+
'(@state.done)': 'onAnimationEnd($event)'
|
|
5519
|
+
}, 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"] }]
|
|
5520
|
+
}], ctorParameters: function () { return [{ type: i0.NgZone }, { type: i0.ElementRef }, { type: i0.ChangeDetectorRef }, { type: i1$5.Platform }, { type: BaoSnackBarConfig }]; }, propDecorators: { _portalOutlet: [{
|
|
5521
|
+
type: ViewChild,
|
|
5522
|
+
args: [CdkPortalOutlet, { static: true }]
|
|
5523
|
+
}] } });
|
|
5524
|
+
|
|
5525
|
+
function baoFactory() {
|
|
5526
|
+
return new BaoSnackBarConfig();
|
|
5527
|
+
}
|
|
5528
|
+
/** Injection token that can be used to specify default snack bar. */
|
|
5529
|
+
const BAO_SNACK_BAR_DEFAULT_OPTIONS = new InjectionToken('bao-snack-bar-default-options', {
|
|
5530
|
+
providedIn: 'root',
|
|
5531
|
+
factory: baoFactory
|
|
5532
|
+
});
|
|
5533
|
+
/**
|
|
5534
|
+
* Service to dispatch Material Design snack bar messages.
|
|
5535
|
+
*/
|
|
5536
|
+
class BaoSnackBarService {
|
|
5537
|
+
constructor(_overlay, _live, _injector, _parentSnackBar, _defaultConfig) {
|
|
5538
|
+
this._overlay = _overlay;
|
|
5539
|
+
this._live = _live;
|
|
5540
|
+
this._injector = _injector;
|
|
5541
|
+
this._parentSnackBar = _parentSnackBar;
|
|
5542
|
+
this._defaultConfig = _defaultConfig;
|
|
5543
|
+
/** The component that should be rendered as the snack bar's simple component. */
|
|
5544
|
+
this.simpleSnackBarComponent = BaoSimpleSnackBarComponent;
|
|
5545
|
+
/** The container component that attaches the provided template or component. */
|
|
5546
|
+
this.snackBarContainerComponent = BaoSnackBarContainerComponent;
|
|
5547
|
+
/**
|
|
5548
|
+
* Reference to the current snack bar in the view *at this level* (in the Angular injector tree).
|
|
5549
|
+
* If there is a parent snack-bar service, all operations should delegate to that parent
|
|
5550
|
+
* via `_openedSnackBarRef`.
|
|
5551
|
+
*/
|
|
5552
|
+
this._snackBarRefAtThisLevel = null;
|
|
5553
|
+
}
|
|
5554
|
+
/** Reference to the currently opened snackbar at *any* level. */
|
|
5555
|
+
get _openedSnackBarRef() {
|
|
5556
|
+
const parent = this._parentSnackBar;
|
|
5557
|
+
return parent ? parent._openedSnackBarRef : this._snackBarRefAtThisLevel;
|
|
5558
|
+
}
|
|
5559
|
+
set _openedSnackBarRef(value) {
|
|
5560
|
+
if (this._parentSnackBar) {
|
|
5561
|
+
this._parentSnackBar._openedSnackBarRef = value;
|
|
5562
|
+
}
|
|
5563
|
+
else {
|
|
5564
|
+
this._snackBarRefAtThisLevel = value;
|
|
5565
|
+
}
|
|
5566
|
+
}
|
|
5567
|
+
/**
|
|
5568
|
+
* Creates and dispatches a snack bar with a custom component for the content, removing any
|
|
5569
|
+
* currently opened snack bars.
|
|
5570
|
+
*
|
|
5571
|
+
* @param component Component to be instantiated.
|
|
5572
|
+
* @param config Extra configuration for the snack bar.
|
|
5573
|
+
*/
|
|
5574
|
+
openFromComponent(component, config) {
|
|
5575
|
+
return this.attach(component, config);
|
|
5576
|
+
}
|
|
5577
|
+
/**
|
|
5578
|
+
* Creates and dispatches a snack bar with a custom template for the content, removing any
|
|
5579
|
+
* currently opened snack bars.
|
|
5580
|
+
*
|
|
5581
|
+
* @param template Template to be instantiated.
|
|
5582
|
+
* @param config Extra configuration for the snack bar.
|
|
5583
|
+
*/
|
|
5584
|
+
openFromTemplate(template, config) {
|
|
5585
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
5586
|
+
return this.attach(template, config);
|
|
5587
|
+
}
|
|
5588
|
+
/**
|
|
5589
|
+
* Opens a snackbar with a message and an optional action.
|
|
5590
|
+
* @param message The message to show in the snackbar.
|
|
5591
|
+
* @param toastType The type of of toast to display the snackbar.
|
|
5592
|
+
* @param actionLabelOrIcon The label or icon for the snackbar action.
|
|
5593
|
+
* @param showClose If true, the snackbar will require user interaction to close.
|
|
5594
|
+
* @param config Additional configuration options for the snackbar.
|
|
5595
|
+
*/
|
|
5596
|
+
open(config) {
|
|
5597
|
+
const _config = Object.assign(Object.assign({}, this._defaultConfig), config);
|
|
5598
|
+
// Since the user doesn't have access to the component, we can
|
|
5599
|
+
// override the data to pass in our own message, action and type.
|
|
5600
|
+
_config.data = {
|
|
5601
|
+
message: _config.message,
|
|
5602
|
+
toastType: _config.toastType,
|
|
5603
|
+
actionLabelOrIcon: _config.actionLabelOrIcon,
|
|
5604
|
+
showClose: _config.showClose
|
|
5605
|
+
};
|
|
5606
|
+
if (_config.showClose)
|
|
5607
|
+
_config.duration = 0;
|
|
5608
|
+
if (!_config.announcementMessage) {
|
|
5609
|
+
_config.announcementMessage = _config.message;
|
|
5610
|
+
}
|
|
5611
|
+
return this.openFromComponent(this.simpleSnackBarComponent, _config);
|
|
5612
|
+
}
|
|
5613
|
+
/**
|
|
5614
|
+
* Dismisses the currently-visible snack bar.
|
|
5615
|
+
*/
|
|
5616
|
+
dismiss() {
|
|
5617
|
+
if (this._openedSnackBarRef) {
|
|
5618
|
+
this._openedSnackBarRef.dismiss();
|
|
5619
|
+
}
|
|
5620
|
+
}
|
|
5621
|
+
ngOnDestroy() {
|
|
5622
|
+
// Only dismiss the snack bar at the current level on destroy.
|
|
5623
|
+
if (this._snackBarRefAtThisLevel) {
|
|
5624
|
+
this._snackBarRefAtThisLevel.dismiss();
|
|
5625
|
+
}
|
|
5626
|
+
}
|
|
5627
|
+
/**
|
|
5628
|
+
* Attaches the snack bar container component to the overlay.
|
|
5629
|
+
*/
|
|
5630
|
+
attachSnackBarContainer(overlayRef, config) {
|
|
5631
|
+
const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;
|
|
5632
|
+
const injector = new PortalInjector(userInjector || this._injector, new WeakMap([[BaoSnackBarConfig, config]]));
|
|
5633
|
+
const containerPortal = new ComponentPortal(this.snackBarContainerComponent, config.viewContainerRef, injector);
|
|
5634
|
+
const containerRef = overlayRef.attach(containerPortal);
|
|
5635
|
+
containerRef.instance.snackBarConfig = config;
|
|
5636
|
+
return containerRef.instance;
|
|
5637
|
+
}
|
|
5638
|
+
/**
|
|
5639
|
+
* Places a new component or a template as the content of the snack bar container.
|
|
5640
|
+
*/
|
|
5641
|
+
attach(content, userConfig) {
|
|
5642
|
+
const config = Object.assign(Object.assign(Object.assign({}, new BaoSnackBarConfig()), this._defaultConfig), userConfig);
|
|
5643
|
+
const overlayRef = this.createOverlay(config);
|
|
5644
|
+
const container = this.attachSnackBarContainer(overlayRef, config);
|
|
5645
|
+
const snackBarRef = new BaoSnackBarRef(container, overlayRef);
|
|
5646
|
+
if (content instanceof TemplateRef) {
|
|
5647
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
|
|
5648
|
+
const portal = new TemplatePortal(content, null, {
|
|
5649
|
+
$implicit: config.data,
|
|
5650
|
+
snackBarRef
|
|
5651
|
+
});
|
|
5652
|
+
snackBarRef.instance = container.attachTemplatePortal(portal);
|
|
5653
|
+
}
|
|
5654
|
+
else {
|
|
5655
|
+
const injector = this.createInjector(config, snackBarRef);
|
|
5656
|
+
const portal = new ComponentPortal(content, undefined, injector);
|
|
5657
|
+
const contentRef = container.attachComponentPortal(portal);
|
|
5658
|
+
// We can't pass this via the injector, because the injector is created earlier.
|
|
5659
|
+
snackBarRef.instance = contentRef.instance;
|
|
5660
|
+
}
|
|
5661
|
+
this.animateSnackBar(snackBarRef, config);
|
|
5662
|
+
this._openedSnackBarRef = snackBarRef;
|
|
5663
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-return
|
|
5664
|
+
return this._openedSnackBarRef;
|
|
5665
|
+
}
|
|
5666
|
+
/** Animates the old snack bar out and the new one in. */
|
|
5667
|
+
animateSnackBar(snackBarRef, config) {
|
|
5668
|
+
// When the snackbar is dismissed, clear the reference to it.
|
|
5669
|
+
snackBarRef.afterDismissed().subscribe(() => {
|
|
5670
|
+
// Clear the snackbar ref if it hasn't already been replaced by a newer snackbar.
|
|
5671
|
+
// eslint-disable-next-line eqeqeq
|
|
5672
|
+
if (this._openedSnackBarRef == snackBarRef) {
|
|
5673
|
+
this._openedSnackBarRef = null;
|
|
5674
|
+
}
|
|
5675
|
+
if (config.announcementMessage) {
|
|
5676
|
+
this._live.clear();
|
|
5677
|
+
}
|
|
5678
|
+
});
|
|
5679
|
+
if (this._openedSnackBarRef) {
|
|
5680
|
+
// If a snack bar is already in view, dismiss it and enter the
|
|
5681
|
+
// new snack bar after exit animation is complete.
|
|
5682
|
+
this._openedSnackBarRef.afterDismissed().subscribe(() => {
|
|
5683
|
+
snackBarRef.containerInstance.enter();
|
|
5684
|
+
});
|
|
5685
|
+
this._openedSnackBarRef.dismiss();
|
|
5686
|
+
}
|
|
5687
|
+
else {
|
|
5688
|
+
// If no snack bar is in view, enter the new snack bar.
|
|
5689
|
+
snackBarRef.containerInstance.enter();
|
|
5690
|
+
}
|
|
5691
|
+
// If a dismiss timeout is provided, set up dismiss based on after the snackbar is opened.
|
|
5692
|
+
if (config.duration && config.duration > 0) {
|
|
5693
|
+
snackBarRef
|
|
5694
|
+
.afterOpened()
|
|
5695
|
+
.subscribe(() => snackBarRef.dismissAfter(config.duration));
|
|
5696
|
+
}
|
|
5697
|
+
if (config.announcementMessage) {
|
|
5698
|
+
void this._live.announce(config.announcementMessage, config.politeness);
|
|
5699
|
+
}
|
|
5700
|
+
}
|
|
5701
|
+
/**
|
|
5702
|
+
* Creates a new overlay and places it in the correct location.
|
|
5703
|
+
* @param config The user-specified snack bar config.
|
|
5704
|
+
*/
|
|
5705
|
+
createOverlay(config) {
|
|
5706
|
+
const overlayConfig = new OverlayConfig();
|
|
5707
|
+
overlayConfig.direction = config.direction;
|
|
5708
|
+
const positionStrategy = this._overlay.position().global();
|
|
5709
|
+
// Set horizontal position.
|
|
5710
|
+
const isRtl = config.direction === 'rtl';
|
|
5711
|
+
const isLeft = config.horizontalPosition === 'left' ||
|
|
5712
|
+
(config.horizontalPosition === 'start' && !isRtl) ||
|
|
5713
|
+
(config.horizontalPosition === 'end' && isRtl);
|
|
5714
|
+
const isRight = !isLeft && config.horizontalPosition !== 'center';
|
|
5715
|
+
if (isLeft) {
|
|
5716
|
+
positionStrategy.left('0');
|
|
5717
|
+
}
|
|
5718
|
+
else if (isRight) {
|
|
5719
|
+
positionStrategy.right('0');
|
|
5720
|
+
}
|
|
5721
|
+
else {
|
|
5722
|
+
positionStrategy.centerHorizontally();
|
|
5723
|
+
}
|
|
5724
|
+
// Set horizontal position.
|
|
5725
|
+
if (config.verticalPosition === 'top') {
|
|
5726
|
+
positionStrategy.top('0');
|
|
5727
|
+
}
|
|
5728
|
+
else {
|
|
5729
|
+
positionStrategy.bottom('0');
|
|
5730
|
+
}
|
|
5731
|
+
overlayConfig.positionStrategy = positionStrategy;
|
|
5732
|
+
return this._overlay.create(overlayConfig);
|
|
5733
|
+
}
|
|
5734
|
+
/**
|
|
5735
|
+
* Creates an injector to be used inside of a snack bar component.
|
|
5736
|
+
* @param config Config that was used to create the snack bar.
|
|
5737
|
+
* @param snackBarRef Reference to the snack bar.
|
|
5738
|
+
*/
|
|
5739
|
+
createInjector(config, snackBarRef) {
|
|
5740
|
+
const userInjector = config && config.viewContainerRef && config.viewContainerRef.injector;
|
|
5741
|
+
return new PortalInjector(userInjector || this._injector, new WeakMap([
|
|
5742
|
+
[BaoSnackBarRef, snackBarRef],
|
|
5743
|
+
[BAO_SNACK_BAR_DATA, config.data]
|
|
5744
|
+
]));
|
|
5745
|
+
}
|
|
5746
|
+
}
|
|
5747
|
+
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 });
|
|
5748
|
+
BaoSnackBarService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSnackBarService, providedIn: 'root' });
|
|
5749
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSnackBarService, decorators: [{
|
|
5750
|
+
type: Injectable,
|
|
5751
|
+
args: [{ providedIn: 'root' }]
|
|
5752
|
+
}], ctorParameters: function () {
|
|
5753
|
+
return [{ type: i1$4.Overlay }, { type: i1$3.LiveAnnouncer }, { type: i0.Injector }, { type: BaoSnackBarService, decorators: [{
|
|
5754
|
+
type: Optional
|
|
5755
|
+
}, {
|
|
5756
|
+
type: SkipSelf
|
|
5757
|
+
}] }, { type: BaoSnackBarConfig, decorators: [{
|
|
5758
|
+
type: Inject,
|
|
5759
|
+
args: [BAO_SNACK_BAR_DEFAULT_OPTIONS]
|
|
5760
|
+
}] }];
|
|
5761
|
+
} });
|
|
5762
|
+
|
|
5763
|
+
/*
|
|
5764
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
5765
|
+
* Licensed under the MIT license.
|
|
5766
|
+
* See LICENSE file in the project root for full license information.
|
|
5767
|
+
*/
|
|
5768
|
+
const SNACKBAR_DIRECTIVES = [
|
|
5769
|
+
BaoSimpleSnackBarComponent,
|
|
5770
|
+
BaoSnackBarContainerComponent
|
|
5771
|
+
];
|
|
5772
|
+
class BaoSnackBarModule {
|
|
5773
|
+
}
|
|
5774
|
+
BaoSnackBarModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSnackBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5775
|
+
BaoSnackBarModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoSnackBarModule, declarations: [BaoSimpleSnackBarComponent,
|
|
5776
|
+
BaoSnackBarContainerComponent], imports: [CommonModule,
|
|
5777
|
+
OverlayModule,
|
|
5778
|
+
PortalModule,
|
|
5779
|
+
BaoButtonModule,
|
|
5780
|
+
BaoIconModule], exports: [BaoSimpleSnackBarComponent,
|
|
5781
|
+
BaoSnackBarContainerComponent] });
|
|
5782
|
+
BaoSnackBarModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSnackBarModule, providers: [BaoSnackBarService], imports: [CommonModule,
|
|
5783
|
+
OverlayModule,
|
|
5784
|
+
PortalModule,
|
|
5785
|
+
BaoButtonModule,
|
|
5786
|
+
BaoIconModule] });
|
|
5787
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSnackBarModule, decorators: [{
|
|
5788
|
+
type: NgModule,
|
|
5789
|
+
args: [{
|
|
5790
|
+
imports: [
|
|
5791
|
+
CommonModule,
|
|
5792
|
+
OverlayModule,
|
|
5793
|
+
PortalModule,
|
|
5794
|
+
BaoButtonModule,
|
|
5795
|
+
BaoIconModule
|
|
5796
|
+
],
|
|
5797
|
+
providers: [BaoSnackBarService],
|
|
5798
|
+
declarations: SNACKBAR_DIRECTIVES,
|
|
5799
|
+
exports: SNACKBAR_DIRECTIVES,
|
|
5800
|
+
entryComponents: [SNACKBAR_DIRECTIVES]
|
|
5801
|
+
}]
|
|
5802
|
+
}] });
|
|
5803
|
+
|
|
5804
|
+
/*
|
|
5805
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
5806
|
+
* Licensed under the MIT license.
|
|
5807
|
+
* See LICENSE file in the project root for full license information.
|
|
5808
|
+
*/
|
|
5809
|
+
const Breakpoints = {
|
|
5810
|
+
XSmall: '(max-width: 575.98px)',
|
|
5811
|
+
Small: '(min-width: 576px) and (max-width: 767.98px)',
|
|
5812
|
+
Medium: '(min-width: 768px) and (max-width: 991.98px)',
|
|
5813
|
+
Large: '(min-width: 992px) and (max-width: 1199.98px)',
|
|
5814
|
+
XLarge: '(min-width: 1200px)'
|
|
5815
|
+
};
|
|
5816
|
+
|
|
5817
|
+
/*
|
|
5818
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
5819
|
+
* Licensed under the MIT license.
|
|
5820
|
+
* See LICENSE file in the project root for full license information.
|
|
5821
|
+
*/
|
|
5822
|
+
|
|
5823
|
+
/**
|
|
5824
|
+
* This component is dynamically added to replace breadcrumb when System Header is viewed on tablet or mobile screens.
|
|
5825
|
+
* Used internally by BaoSystemHeaderComponent only, not to be used by host application.
|
|
5826
|
+
*/
|
|
5827
|
+
class BaoBackNavigationComponent {
|
|
5828
|
+
constructor(renderer, elementRef) {
|
|
5829
|
+
this.renderer = renderer;
|
|
5830
|
+
this.elementRef = elementRef;
|
|
5831
|
+
}
|
|
5832
|
+
ngOnChanges(changes) {
|
|
5833
|
+
if (changes['link'] && changes['link'].currentValue) {
|
|
5834
|
+
this.renderer.setAttribute(this.elementRef.nativeElement.children[0], 'href', changes['link'].currentValue);
|
|
5835
|
+
}
|
|
5836
|
+
}
|
|
5837
|
+
}
|
|
5838
|
+
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 });
|
|
5839
|
+
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>
|
|
5840
|
+
<bao-icon
|
|
5841
|
+
color="action"
|
|
5842
|
+
title="arrow-left"
|
|
5843
|
+
svgIcon="icon-arrow-left"
|
|
5844
|
+
size="x-small"
|
|
5845
|
+
></bao-icon>
|
|
5846
|
+
</a>`, isInline: true, dependencies: [{ kind: "component", type: BaoIconComponent, selector: "bao-icon", inputs: ["color", "size", "svgIcon", "title"], exportAs: ["baoIcon"] }] });
|
|
5847
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoBackNavigationComponent, decorators: [{
|
|
5848
|
+
type: Component,
|
|
5849
|
+
args: [{
|
|
5850
|
+
selector: 'bao-back-navigation-component',
|
|
5851
|
+
template: ` <a>
|
|
5852
|
+
<bao-icon
|
|
5853
|
+
color="action"
|
|
5854
|
+
title="arrow-left"
|
|
5855
|
+
svgIcon="icon-arrow-left"
|
|
5856
|
+
size="x-small"
|
|
5857
|
+
></bao-icon>
|
|
5858
|
+
</a>`,
|
|
5859
|
+
host: {
|
|
5860
|
+
class: 'bao-system-header-back-button'
|
|
5861
|
+
}
|
|
5862
|
+
}]
|
|
5863
|
+
}], ctorParameters: function () { return [{ type: i0.Renderer2 }, { type: i0.ElementRef }]; }, propDecorators: { link: [{
|
|
5864
|
+
type: Input
|
|
5865
|
+
}] } });
|
|
5866
|
+
/**
|
|
5867
|
+
* This directive is to mark the template where the BaoBackNavigationComponent should be dynamically inserted,
|
|
5868
|
+
* when a Breadcrumb component needs to be replaced
|
|
5869
|
+
*/
|
|
5870
|
+
class BaoBackNavigationInsert {
|
|
5871
|
+
constructor(viewContainerRef) {
|
|
5872
|
+
this.viewContainerRef = viewContainerRef;
|
|
5873
|
+
}
|
|
5874
|
+
}
|
|
5875
|
+
BaoBackNavigationInsert.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoBackNavigationInsert, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
5876
|
+
BaoBackNavigationInsert.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.2.1", type: BaoBackNavigationInsert, selector: "[backNavigationInsert]", ngImport: i0 });
|
|
5877
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoBackNavigationInsert, decorators: [{
|
|
5878
|
+
type: Directive,
|
|
5879
|
+
args: [{
|
|
5880
|
+
selector: '[backNavigationInsert]'
|
|
5881
|
+
}]
|
|
5882
|
+
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; } });
|
|
5883
|
+
class BaoSystemHeaderComponent {
|
|
5884
|
+
constructor(breakpointObserver, renderer) {
|
|
5885
|
+
this.breakpointObserver = breakpointObserver;
|
|
5886
|
+
this.renderer = renderer;
|
|
5887
|
+
this.screenType = 'desktop';
|
|
5888
|
+
}
|
|
5889
|
+
get textContainerChildren() {
|
|
5890
|
+
return Array.from(this.textContainer.nativeElement.children);
|
|
5891
|
+
}
|
|
5892
|
+
ngOnInit() {
|
|
5893
|
+
if ([Breakpoints.XSmall, Breakpoints.Small].some(size => this.breakpointObserver.isMatched(size))) {
|
|
5894
|
+
this.screenType = 'mobile';
|
|
5895
|
+
}
|
|
5896
|
+
else if (this.breakpointObserver.isMatched(Breakpoints.Medium)) {
|
|
5897
|
+
this.screenType = 'tablet';
|
|
5898
|
+
}
|
|
5899
|
+
else if ([Breakpoints.Large, Breakpoints.XLarge].some(size => this.breakpointObserver.isMatched(size))) {
|
|
5900
|
+
this.screenType = 'desktop';
|
|
5901
|
+
}
|
|
5902
|
+
}
|
|
5903
|
+
ngAfterViewInit() {
|
|
5904
|
+
this.formatNavigation();
|
|
5905
|
+
this.applySizeClass();
|
|
5906
|
+
}
|
|
5907
|
+
formatNavigation() {
|
|
5908
|
+
// If view is rendered on a mobile/tablet screen
|
|
5909
|
+
if (this.screenType == 'mobile' || this.screenType == 'tablet') {
|
|
5910
|
+
if (this.textContainerChildren[0].className == 'bao-breadcrumb') {
|
|
5911
|
+
// Retrieve link of parent page
|
|
5912
|
+
const breadcrumbElementsList = this.textContainerChildren[0].children[0];
|
|
5913
|
+
const breadcrumbLength = breadcrumbElementsList.children.length;
|
|
5914
|
+
const parentLink = breadcrumbElementsList.children[breadcrumbLength - 2].attributes['href'].value;
|
|
5915
|
+
// Remove Breadcrumb component and replace it with back button
|
|
5916
|
+
this.renderer.removeChild(this.textContainer.nativeElement, this.textContainerChildren[0]);
|
|
5917
|
+
const viewContainerRef = this.backButtonInsert.viewContainerRef;
|
|
5918
|
+
viewContainerRef.clear();
|
|
5919
|
+
const componentRef = viewContainerRef.createComponent(BaoBackNavigationComponent);
|
|
5920
|
+
componentRef.instance.link = parentLink;
|
|
5921
|
+
}
|
|
5922
|
+
}
|
|
5923
|
+
}
|
|
5924
|
+
applySizeClass() {
|
|
5925
|
+
const tagInfoContainer = this.textContainer.nativeElement.childNodes[this.textContainerChildren.length - 1];
|
|
5926
|
+
if (this.screenType === 'mobile') {
|
|
5927
|
+
this.renderer.addClass(tagInfoContainer, 'mobile');
|
|
5928
|
+
}
|
|
5929
|
+
}
|
|
5930
|
+
}
|
|
5931
|
+
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 });
|
|
5932
|
+
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 });
|
|
5933
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSystemHeaderComponent, decorators: [{
|
|
5934
|
+
type: Component,
|
|
5935
|
+
args: [{ selector: 'bao-system-header', encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
5936
|
+
class: 'bao-system-header'
|
|
5937
|
+
}, 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"] }]
|
|
5938
|
+
}], ctorParameters: function () { return [{ type: i2$1.BreakpointObserver }, { type: i0.Renderer2 }]; }, propDecorators: { textContainer: [{
|
|
5939
|
+
type: ViewChild,
|
|
5940
|
+
args: ['textContainer', { static: false }]
|
|
5941
|
+
}], backButtonInsert: [{
|
|
5942
|
+
type: ViewChild,
|
|
5943
|
+
args: [BaoBackNavigationInsert, { static: true }]
|
|
5944
|
+
}] } });
|
|
5945
|
+
|
|
5946
|
+
/*
|
|
5947
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
5948
|
+
* Licensed under the MIT license.
|
|
5949
|
+
* See LICENSE file in the project root for full license information.
|
|
5950
|
+
*/
|
|
5951
|
+
const SYSTEM_HEADER_DIRECTIVES = [
|
|
5952
|
+
BaoSystemHeaderComponent,
|
|
5953
|
+
BaoBackNavigationInsert,
|
|
5954
|
+
BaoBackNavigationComponent
|
|
5955
|
+
];
|
|
5956
|
+
class BaoSystemHeaderModule {
|
|
5957
|
+
}
|
|
5958
|
+
BaoSystemHeaderModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSystemHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
5959
|
+
BaoSystemHeaderModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.2.1", ngImport: i0, type: BaoSystemHeaderModule, declarations: [BaoSystemHeaderComponent,
|
|
5960
|
+
BaoBackNavigationInsert,
|
|
5961
|
+
BaoBackNavigationComponent], imports: [CommonModule, BaoIconModule], exports: [BaoSystemHeaderComponent,
|
|
5962
|
+
BaoBackNavigationInsert,
|
|
5963
|
+
BaoBackNavigationComponent] });
|
|
5964
|
+
BaoSystemHeaderModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSystemHeaderModule, imports: [CommonModule, BaoIconModule] });
|
|
5965
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoSystemHeaderModule, decorators: [{
|
|
5966
|
+
type: NgModule,
|
|
5967
|
+
args: [{
|
|
5968
|
+
imports: [CommonModule, BaoIconModule],
|
|
5969
|
+
declarations: [SYSTEM_HEADER_DIRECTIVES],
|
|
5970
|
+
exports: [SYSTEM_HEADER_DIRECTIVES]
|
|
5971
|
+
}]
|
|
5972
|
+
}] });
|
|
5973
|
+
|
|
5974
|
+
/*
|
|
5975
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
5976
|
+
* Licensed under the MIT license.
|
|
5977
|
+
* See LICENSE file in the project root for full license information.
|
|
5978
|
+
*/
|
|
5979
|
+
|
|
5980
|
+
/*
|
|
5981
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
4965
5982
|
* Licensed under the MIT license.
|
|
4966
5983
|
* See LICENSE file in the project root for full license information.
|
|
4967
5984
|
*/
|
|
@@ -4990,9 +6007,10 @@ BaoModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.
|
|
|
4990
6007
|
BaoModalModule,
|
|
4991
6008
|
BaoHyperlinkModule,
|
|
4992
6009
|
BaoDropdownMenuModule,
|
|
4993
|
-
BaoFileModule
|
|
6010
|
+
BaoFileModule,
|
|
6011
|
+
BaoSnackBarModule,
|
|
6012
|
+
BaoSystemHeaderModule
|
|
4994
6013
|
// TODO: reactivate once component does not depend on global css BaoBadgeModule,
|
|
4995
|
-
// TODO: reactivate once component does not depend on global css BaoSnackBarModule,
|
|
4996
6014
|
] });
|
|
4997
6015
|
BaoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModule, imports: [BaoIconModule,
|
|
4998
6016
|
BaoButtonModule,
|
|
@@ -5016,9 +6034,10 @@ BaoModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.
|
|
|
5016
6034
|
BaoModalModule,
|
|
5017
6035
|
BaoHyperlinkModule,
|
|
5018
6036
|
BaoDropdownMenuModule,
|
|
5019
|
-
BaoFileModule
|
|
6037
|
+
BaoFileModule,
|
|
6038
|
+
BaoSnackBarModule,
|
|
6039
|
+
BaoSystemHeaderModule
|
|
5020
6040
|
// TODO: reactivate once component does not depend on global css BaoBadgeModule,
|
|
5021
|
-
// TODO: reactivate once component does not depend on global css BaoSnackBarModule,
|
|
5022
6041
|
] });
|
|
5023
6042
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImport: i0, type: BaoModule, decorators: [{
|
|
5024
6043
|
type: NgModule,
|
|
@@ -5049,15 +6068,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
5049
6068
|
BaoModalModule,
|
|
5050
6069
|
BaoHyperlinkModule,
|
|
5051
6070
|
BaoDropdownMenuModule,
|
|
5052
|
-
BaoFileModule
|
|
6071
|
+
BaoFileModule,
|
|
6072
|
+
BaoSnackBarModule,
|
|
6073
|
+
BaoSystemHeaderModule
|
|
5053
6074
|
// TODO: reactivate once component does not depend on global css BaoBadgeModule,
|
|
5054
|
-
// TODO: reactivate once component does not depend on global css BaoSnackBarModule,
|
|
5055
6075
|
]
|
|
5056
6076
|
}]
|
|
5057
6077
|
}] });
|
|
5058
6078
|
|
|
5059
6079
|
/*
|
|
5060
|
-
* Copyright (c)
|
|
6080
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
5061
6081
|
* Licensed under the MIT license.
|
|
5062
6082
|
* See LICENSE file in the project root for full license information.
|
|
5063
6083
|
*/
|
|
@@ -5082,7 +6102,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
5082
6102
|
}] } });
|
|
5083
6103
|
|
|
5084
6104
|
/*
|
|
5085
|
-
* Copyright (c)
|
|
6105
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
5086
6106
|
* Licensed under the MIT license.
|
|
5087
6107
|
* See LICENSE file in the project root for full license information.
|
|
5088
6108
|
*/
|
|
@@ -5102,31 +6122,37 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
5102
6122
|
}] });
|
|
5103
6123
|
|
|
5104
6124
|
/*
|
|
5105
|
-
* Copyright (c)
|
|
6125
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
6126
|
+
* Licensed under the MIT license.
|
|
6127
|
+
* See LICENSE file in the project root for full license information.
|
|
6128
|
+
*/
|
|
6129
|
+
|
|
6130
|
+
/*
|
|
6131
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
5106
6132
|
* Licensed under the MIT license.
|
|
5107
6133
|
* See LICENSE file in the project root for full license information.
|
|
5108
6134
|
*/
|
|
5109
6135
|
|
|
5110
6136
|
/*
|
|
5111
|
-
* Copyright (c)
|
|
6137
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
5112
6138
|
* Licensed under the MIT license.
|
|
5113
6139
|
* See LICENSE file in the project root for full license information.
|
|
5114
6140
|
*/
|
|
5115
6141
|
|
|
5116
6142
|
/*
|
|
5117
|
-
* Copyright (c)
|
|
6143
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
5118
6144
|
* Licensed under the MIT license.
|
|
5119
6145
|
* See LICENSE file in the project root for full license information.
|
|
5120
6146
|
*/
|
|
5121
6147
|
|
|
5122
6148
|
/*
|
|
5123
|
-
* Copyright (c)
|
|
6149
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
5124
6150
|
* Licensed under the MIT license.
|
|
5125
6151
|
* See LICENSE file in the project root for full license information.
|
|
5126
6152
|
*/
|
|
5127
6153
|
|
|
5128
6154
|
/*
|
|
5129
|
-
* Copyright (c)
|
|
6155
|
+
* Copyright (c) 2025 Ville de Montreal. All rights reserved.
|
|
5130
6156
|
* Licensed under the MIT license.
|
|
5131
6157
|
* See LICENSE file in the project root for full license information.
|
|
5132
6158
|
*/
|
|
@@ -5135,5 +6161,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.1", ngImpor
|
|
|
5135
6161
|
* Generated bundle index. Do not edit.
|
|
5136
6162
|
*/
|
|
5137
6163
|
|
|
5138
|
-
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 };
|
|
6164
|
+
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 };
|
|
5139
6165
|
//# sourceMappingURL=villedemontreal-angular-ui.mjs.map
|