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